zero-ai-ui-lib 0.1.1 → 0.2.0

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.
@@ -0,0 +1,2766 @@
1
+ import { g as Qt } from "./_commonjsHelpers-C6fGbg64.js";
2
+ function Wt(s, d) {
3
+ for (var v = 0; v < d.length; v++) {
4
+ const c = d[v];
5
+ if (typeof c != "string" && !Array.isArray(c)) {
6
+ for (const h in c)
7
+ if (h !== "default" && !(h in s)) {
8
+ const _ = Object.getOwnPropertyDescriptor(c, h);
9
+ _ && Object.defineProperty(s, h, _.get ? _ : {
10
+ enumerable: !0,
11
+ get: () => c[h]
12
+ });
13
+ }
14
+ }
15
+ }
16
+ return Object.freeze(Object.defineProperty(s, Symbol.toStringTag, { value: "Module" }));
17
+ }
18
+ var Q = {}, $ = {}, W = {}, $e;
19
+ function T() {
20
+ if ($e) return W;
21
+ $e = 1, Object.defineProperty(W, "__esModule", {
22
+ value: !0
23
+ });
24
+ function s(v, c) {
25
+ if (!(v instanceof c))
26
+ throw new TypeError("Cannot call a class as a function");
27
+ }
28
+ var d = function v(c, h) {
29
+ s(this, v), this.data = c, this.text = h.text || c, this.options = h;
30
+ };
31
+ return W.default = d, W;
32
+ }
33
+ var Ne;
34
+ function Zt() {
35
+ if (Ne) return $;
36
+ Ne = 1, Object.defineProperty($, "__esModule", {
37
+ value: !0
38
+ }), $.CODE39 = void 0;
39
+ var s = /* @__PURE__ */ function() {
40
+ function o(y, p) {
41
+ for (var g = 0; g < p.length; g++) {
42
+ var w = p[g];
43
+ w.enumerable = w.enumerable || !1, w.configurable = !0, "value" in w && (w.writable = !0), Object.defineProperty(y, w.key, w);
44
+ }
45
+ }
46
+ return function(y, p, g) {
47
+ return p && o(y.prototype, p), g && o(y, g), y;
48
+ };
49
+ }(), d = T(), v = c(d);
50
+ function c(o) {
51
+ return o && o.__esModule ? o : { default: o };
52
+ }
53
+ function h(o, y) {
54
+ if (!(o instanceof y))
55
+ throw new TypeError("Cannot call a class as a function");
56
+ }
57
+ function _(o, y) {
58
+ if (!o)
59
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
60
+ return y && (typeof y == "object" || typeof y == "function") ? y : o;
61
+ }
62
+ function l(o, y) {
63
+ if (typeof y != "function" && y !== null)
64
+ throw new TypeError("Super expression must either be null or a function, not " + typeof y);
65
+ o.prototype = Object.create(y && y.prototype, { constructor: { value: o, enumerable: !1, writable: !0, configurable: !0 } }), y && (Object.setPrototypeOf ? Object.setPrototypeOf(o, y) : o.__proto__ = y);
66
+ }
67
+ var f = function(o) {
68
+ l(y, o);
69
+ function y(p, g) {
70
+ return h(this, y), p = p.toUpperCase(), g.mod43 && (p += r(u(p))), _(this, (y.__proto__ || Object.getPrototypeOf(y)).call(this, p, g));
71
+ }
72
+ return s(y, [{
73
+ key: "encode",
74
+ value: function() {
75
+ for (var g = t("*"), w = 0; w < this.data.length; w++)
76
+ g += t(this.data[w]) + "0";
77
+ return g += t("*"), {
78
+ data: g,
79
+ text: this.text
80
+ };
81
+ }
82
+ }, {
83
+ key: "valid",
84
+ value: function() {
85
+ return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/) !== -1;
86
+ }
87
+ }]), y;
88
+ }(v.default), a = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "-", ".", " ", "$", "/", "+", "%", "*"], e = [20957, 29783, 23639, 30485, 20951, 29813, 23669, 20855, 29789, 23645, 29975, 23831, 30533, 22295, 30149, 24005, 21623, 29981, 23837, 22301, 30023, 23879, 30545, 22343, 30161, 24017, 21959, 30065, 23921, 22385, 29015, 18263, 29141, 17879, 29045, 18293, 17783, 29021, 18269, 17477, 17489, 17681, 20753, 35770];
89
+ function t(o) {
90
+ return n(i(o));
91
+ }
92
+ function n(o) {
93
+ return e[o].toString(2);
94
+ }
95
+ function r(o) {
96
+ return a[o];
97
+ }
98
+ function i(o) {
99
+ return a.indexOf(o);
100
+ }
101
+ function u(o) {
102
+ for (var y = 0, p = 0; p < o.length; p++)
103
+ y += i(o[p]);
104
+ return y = y % 43, y;
105
+ }
106
+ return $.CODE39 = f, $;
107
+ }
108
+ var I = {}, Z = {}, K = {}, S = {}, Ge;
109
+ function z() {
110
+ if (Ge) return S;
111
+ Ge = 1, Object.defineProperty(S, "__esModule", {
112
+ value: !0
113
+ });
114
+ var s;
115
+ function d(a, e, t) {
116
+ return e in a ? Object.defineProperty(a, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[e] = t, a;
117
+ }
118
+ var v = S.SET_A = 0, c = S.SET_B = 1, h = S.SET_C = 2;
119
+ S.SHIFT = 98;
120
+ var _ = S.START_A = 103, l = S.START_B = 104, f = S.START_C = 105;
121
+ return S.MODULO = 103, S.STOP = 106, S.FNC1 = 207, S.SET_BY_CODE = (s = {}, d(s, _, v), d(s, l, c), d(s, f, h), s), S.SWAP = {
122
+ 101: v,
123
+ 100: c,
124
+ 99: h
125
+ }, S.A_START_CHAR = "Ð", S.B_START_CHAR = "Ñ", S.C_START_CHAR = "Ò", S.A_CHARS = "[\0-_È-Ï]", S.B_CHARS = "[ -È-Ï]", S.C_CHARS = "(Ï*[0-9]{2}Ï*)", S.BARS = [11011001100, 11001101100, 11001100110, 10010011e3, 10010001100, 10001001100, 10011001e3, 10011000100, 10001100100, 11001001e3, 11001000100, 11000100100, 10110011100, 10011011100, 10011001110, 10111001100, 10011101100, 10011100110, 11001110010, 11001011100, 11001001110, 11011100100, 11001110100, 11101101110, 11101001100, 11100101100, 11100100110, 11101100100, 11100110100, 11100110010, 11011011e3, 11011000110, 11000110110, 10100011e3, 10001011e3, 10001000110, 10110001e3, 10001101e3, 10001100010, 11010001e3, 11000101e3, 11000100010, 10110111e3, 10110001110, 10001101110, 10111011e3, 10111000110, 10001110110, 11101110110, 11010001110, 11000101110, 11011101e3, 11011100010, 11011101110, 11101011e3, 11101000110, 11100010110, 11101101e3, 11101100010, 11100011010, 11101111010, 11001000010, 11110001010, 1010011e4, 10100001100, 1001011e4, 10010000110, 10000101100, 10000100110, 1011001e4, 10110000100, 1001101e4, 10011000010, 10000110100, 10000110010, 11000010010, 1100101e4, 11110111010, 11000010100, 10001111010, 10100111100, 10010111100, 10010011110, 10111100100, 10011110100, 10011110010, 11110100100, 11110010100, 11110010010, 11011011110, 11011110110, 11110110110, 10101111e3, 10100011110, 10001011110, 10111101e3, 10111100010, 11110101e3, 11110100010, 10111011110, 10111101110, 11101011110, 11110101110, 11010000100, 1101001e4, 11010011100, 1100011101011], S;
126
+ }
127
+ var Fe;
128
+ function De() {
129
+ if (Fe) return K;
130
+ Fe = 1, Object.defineProperty(K, "__esModule", {
131
+ value: !0
132
+ });
133
+ var s = /* @__PURE__ */ function() {
134
+ function e(t, n) {
135
+ for (var r = 0; r < n.length; r++) {
136
+ var i = n[r];
137
+ i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
138
+ }
139
+ }
140
+ return function(t, n, r) {
141
+ return n && e(t.prototype, n), r && e(t, r), t;
142
+ };
143
+ }(), d = T(), v = h(d), c = z();
144
+ function h(e) {
145
+ return e && e.__esModule ? e : { default: e };
146
+ }
147
+ function _(e, t) {
148
+ if (!(e instanceof t))
149
+ throw new TypeError("Cannot call a class as a function");
150
+ }
151
+ function l(e, t) {
152
+ if (!e)
153
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
154
+ return t && (typeof t == "object" || typeof t == "function") ? t : e;
155
+ }
156
+ function f(e, t) {
157
+ if (typeof t != "function" && t !== null)
158
+ throw new TypeError("Super expression must either be null or a function, not " + typeof t);
159
+ e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
160
+ }
161
+ var a = function(e) {
162
+ f(t, e);
163
+ function t(n, r) {
164
+ _(this, t);
165
+ var i = l(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, n.substring(1), r));
166
+ return i.bytes = n.split("").map(function(u) {
167
+ return u.charCodeAt(0);
168
+ }), i;
169
+ }
170
+ return s(t, [{
171
+ key: "valid",
172
+ value: function() {
173
+ return /^[\x00-\x7F\xC8-\xD3]+$/.test(this.data);
174
+ }
175
+ // The public encoding function
176
+ }, {
177
+ key: "encode",
178
+ value: function() {
179
+ var r = this.bytes, i = r.shift() - 105, u = c.SET_BY_CODE[i];
180
+ if (u === void 0)
181
+ throw new RangeError("The encoding does not start with a start character.");
182
+ this.shouldEncodeAsEan128() === !0 && r.unshift(c.FNC1);
183
+ var o = t.next(r, 1, u);
184
+ return {
185
+ text: this.text === this.data ? this.text.replace(/[^\x20-\x7E]/g, "") : this.text,
186
+ data: (
187
+ // Add the start bits
188
+ t.getBar(i) + // Add the encoded bits
189
+ o.result + // Add the checksum
190
+ t.getBar((o.checksum + i) % c.MODULO) + // Add the end bits
191
+ t.getBar(c.STOP)
192
+ )
193
+ };
194
+ }
195
+ // GS1-128/EAN-128
196
+ }, {
197
+ key: "shouldEncodeAsEan128",
198
+ value: function() {
199
+ var r = this.options.ean128 || !1;
200
+ return typeof r == "string" && (r = r.toLowerCase() === "true"), r;
201
+ }
202
+ // Get a bar symbol by index
203
+ }], [{
204
+ key: "getBar",
205
+ value: function(r) {
206
+ return c.BARS[r] ? c.BARS[r].toString() : "";
207
+ }
208
+ // Correct an index by a set and shift it from the bytes array
209
+ }, {
210
+ key: "correctIndex",
211
+ value: function(r, i) {
212
+ if (i === c.SET_A) {
213
+ var u = r.shift();
214
+ return u < 32 ? u + 64 : u - 32;
215
+ } else return i === c.SET_B ? r.shift() - 32 : (r.shift() - 48) * 10 + r.shift() - 48;
216
+ }
217
+ }, {
218
+ key: "next",
219
+ value: function(r, i, u) {
220
+ if (!r.length)
221
+ return { result: "", checksum: 0 };
222
+ var o = void 0, y = void 0;
223
+ if (r[0] >= 200) {
224
+ y = r.shift() - 105;
225
+ var p = c.SWAP[y];
226
+ p !== void 0 ? o = t.next(r, i + 1, p) : ((u === c.SET_A || u === c.SET_B) && y === c.SHIFT && (r[0] = u === c.SET_A ? r[0] > 95 ? r[0] - 96 : r[0] : r[0] < 32 ? r[0] + 96 : r[0]), o = t.next(r, i + 1, u));
227
+ } else
228
+ y = t.correctIndex(r, u), o = t.next(r, i + 1, u);
229
+ var g = t.getBar(y), w = y * i;
230
+ return {
231
+ result: g + o.result,
232
+ checksum: w + o.checksum
233
+ };
234
+ }
235
+ }]), t;
236
+ }(v.default);
237
+ return K.default = a, K;
238
+ }
239
+ var ee = {}, He;
240
+ function Kt() {
241
+ if (He) return ee;
242
+ He = 1, Object.defineProperty(ee, "__esModule", {
243
+ value: !0
244
+ });
245
+ var s = z(), d = function(f) {
246
+ return f.match(new RegExp("^" + s.A_CHARS + "*"))[0].length;
247
+ }, v = function(f) {
248
+ return f.match(new RegExp("^" + s.B_CHARS + "*"))[0].length;
249
+ }, c = function(f) {
250
+ return f.match(new RegExp("^" + s.C_CHARS + "*"))[0];
251
+ };
252
+ function h(l, f) {
253
+ var a = f ? s.A_CHARS : s.B_CHARS, e = l.match(new RegExp("^(" + a + "+?)(([0-9]{2}){2,})([^0-9]|$)"));
254
+ if (e)
255
+ return e[1] + "Ì" + _(l.substring(e[1].length));
256
+ var t = l.match(new RegExp("^" + a + "+"))[0];
257
+ return t.length === l.length ? l : t + String.fromCharCode(f ? 205 : 206) + h(l.substring(t.length), !f);
258
+ }
259
+ function _(l) {
260
+ var f = c(l), a = f.length;
261
+ if (a === l.length)
262
+ return l;
263
+ l = l.substring(a);
264
+ var e = d(l) >= v(l);
265
+ return f + String.fromCharCode(e ? 206 : 205) + h(l, e);
266
+ }
267
+ return ee.default = function(l) {
268
+ var f = void 0, a = c(l).length;
269
+ if (a >= 2)
270
+ f = s.C_START_CHAR + _(l);
271
+ else {
272
+ var e = d(l) > v(l);
273
+ f = (e ? s.A_START_CHAR : s.B_START_CHAR) + h(l, e);
274
+ }
275
+ return f.replace(
276
+ /[\xCD\xCE]([^])[\xCD\xCE]/,
277
+ // Any sequence between 205 and 206 characters
278
+ function(t, n) {
279
+ return "Ë" + n;
280
+ }
281
+ );
282
+ }, ee;
283
+ }
284
+ var Ue;
285
+ function er() {
286
+ if (Ue) return Z;
287
+ Ue = 1, Object.defineProperty(Z, "__esModule", {
288
+ value: !0
289
+ });
290
+ var s = De(), d = h(s), v = Kt(), c = h(v);
291
+ function h(e) {
292
+ return e && e.__esModule ? e : { default: e };
293
+ }
294
+ function _(e, t) {
295
+ if (!(e instanceof t))
296
+ throw new TypeError("Cannot call a class as a function");
297
+ }
298
+ function l(e, t) {
299
+ if (!e)
300
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
301
+ return t && (typeof t == "object" || typeof t == "function") ? t : e;
302
+ }
303
+ function f(e, t) {
304
+ if (typeof t != "function" && t !== null)
305
+ throw new TypeError("Super expression must either be null or a function, not " + typeof t);
306
+ e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
307
+ }
308
+ var a = function(e) {
309
+ f(t, e);
310
+ function t(n, r) {
311
+ if (_(this, t), /^[\x00-\x7F\xC8-\xD3]+$/.test(n))
312
+ var i = l(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, (0, c.default)(n), r));
313
+ else
314
+ var i = l(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, n, r));
315
+ return l(i);
316
+ }
317
+ return t;
318
+ }(d.default);
319
+ return Z.default = a, Z;
320
+ }
321
+ var te = {}, ze;
322
+ function tr() {
323
+ if (ze) return te;
324
+ ze = 1, Object.defineProperty(te, "__esModule", {
325
+ value: !0
326
+ });
327
+ var s = /* @__PURE__ */ function() {
328
+ function e(t, n) {
329
+ for (var r = 0; r < n.length; r++) {
330
+ var i = n[r];
331
+ i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
332
+ }
333
+ }
334
+ return function(t, n, r) {
335
+ return n && e(t.prototype, n), r && e(t, r), t;
336
+ };
337
+ }(), d = De(), v = h(d), c = z();
338
+ function h(e) {
339
+ return e && e.__esModule ? e : { default: e };
340
+ }
341
+ function _(e, t) {
342
+ if (!(e instanceof t))
343
+ throw new TypeError("Cannot call a class as a function");
344
+ }
345
+ function l(e, t) {
346
+ if (!e)
347
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
348
+ return t && (typeof t == "object" || typeof t == "function") ? t : e;
349
+ }
350
+ function f(e, t) {
351
+ if (typeof t != "function" && t !== null)
352
+ throw new TypeError("Super expression must either be null or a function, not " + typeof t);
353
+ e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
354
+ }
355
+ var a = function(e) {
356
+ f(t, e);
357
+ function t(n, r) {
358
+ return _(this, t), l(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, c.A_START_CHAR + n, r));
359
+ }
360
+ return s(t, [{
361
+ key: "valid",
362
+ value: function() {
363
+ return new RegExp("^" + c.A_CHARS + "+$").test(this.data);
364
+ }
365
+ }]), t;
366
+ }(v.default);
367
+ return te.default = a, te;
368
+ }
369
+ var re = {}, Xe;
370
+ function rr() {
371
+ if (Xe) return re;
372
+ Xe = 1, Object.defineProperty(re, "__esModule", {
373
+ value: !0
374
+ });
375
+ var s = /* @__PURE__ */ function() {
376
+ function e(t, n) {
377
+ for (var r = 0; r < n.length; r++) {
378
+ var i = n[r];
379
+ i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
380
+ }
381
+ }
382
+ return function(t, n, r) {
383
+ return n && e(t.prototype, n), r && e(t, r), t;
384
+ };
385
+ }(), d = De(), v = h(d), c = z();
386
+ function h(e) {
387
+ return e && e.__esModule ? e : { default: e };
388
+ }
389
+ function _(e, t) {
390
+ if (!(e instanceof t))
391
+ throw new TypeError("Cannot call a class as a function");
392
+ }
393
+ function l(e, t) {
394
+ if (!e)
395
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
396
+ return t && (typeof t == "object" || typeof t == "function") ? t : e;
397
+ }
398
+ function f(e, t) {
399
+ if (typeof t != "function" && t !== null)
400
+ throw new TypeError("Super expression must either be null or a function, not " + typeof t);
401
+ e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
402
+ }
403
+ var a = function(e) {
404
+ f(t, e);
405
+ function t(n, r) {
406
+ return _(this, t), l(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, c.B_START_CHAR + n, r));
407
+ }
408
+ return s(t, [{
409
+ key: "valid",
410
+ value: function() {
411
+ return new RegExp("^" + c.B_CHARS + "+$").test(this.data);
412
+ }
413
+ }]), t;
414
+ }(v.default);
415
+ return re.default = a, re;
416
+ }
417
+ var ne = {}, Ve;
418
+ function nr() {
419
+ if (Ve) return ne;
420
+ Ve = 1, Object.defineProperty(ne, "__esModule", {
421
+ value: !0
422
+ });
423
+ var s = /* @__PURE__ */ function() {
424
+ function e(t, n) {
425
+ for (var r = 0; r < n.length; r++) {
426
+ var i = n[r];
427
+ i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
428
+ }
429
+ }
430
+ return function(t, n, r) {
431
+ return n && e(t.prototype, n), r && e(t, r), t;
432
+ };
433
+ }(), d = De(), v = h(d), c = z();
434
+ function h(e) {
435
+ return e && e.__esModule ? e : { default: e };
436
+ }
437
+ function _(e, t) {
438
+ if (!(e instanceof t))
439
+ throw new TypeError("Cannot call a class as a function");
440
+ }
441
+ function l(e, t) {
442
+ if (!e)
443
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
444
+ return t && (typeof t == "object" || typeof t == "function") ? t : e;
445
+ }
446
+ function f(e, t) {
447
+ if (typeof t != "function" && t !== null)
448
+ throw new TypeError("Super expression must either be null or a function, not " + typeof t);
449
+ e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
450
+ }
451
+ var a = function(e) {
452
+ f(t, e);
453
+ function t(n, r) {
454
+ return _(this, t), l(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, c.C_START_CHAR + n, r));
455
+ }
456
+ return s(t, [{
457
+ key: "valid",
458
+ value: function() {
459
+ return new RegExp("^" + c.C_CHARS + "+$").test(this.data);
460
+ }
461
+ }]), t;
462
+ }(v.default);
463
+ return ne.default = a, ne;
464
+ }
465
+ var Je;
466
+ function ir() {
467
+ if (Je) return I;
468
+ Je = 1, Object.defineProperty(I, "__esModule", {
469
+ value: !0
470
+ }), I.CODE128C = I.CODE128B = I.CODE128A = I.CODE128 = void 0;
471
+ var s = er(), d = a(s), v = tr(), c = a(v), h = rr(), _ = a(h), l = nr(), f = a(l);
472
+ function a(e) {
473
+ return e && e.__esModule ? e : { default: e };
474
+ }
475
+ return I.CODE128 = d.default, I.CODE128A = c.default, I.CODE128B = _.default, I.CODE128C = f.default, I;
476
+ }
477
+ var R = {}, ie = {}, D = {}, Ye;
478
+ function X() {
479
+ return Ye || (Ye = 1, Object.defineProperty(D, "__esModule", {
480
+ value: !0
481
+ }), D.SIDE_BIN = "101", D.MIDDLE_BIN = "01010", D.BINARIES = {
482
+ L: [
483
+ // The L (left) type of encoding
484
+ "0001101",
485
+ "0011001",
486
+ "0010011",
487
+ "0111101",
488
+ "0100011",
489
+ "0110001",
490
+ "0101111",
491
+ "0111011",
492
+ "0110111",
493
+ "0001011"
494
+ ],
495
+ G: [
496
+ // The G type of encoding
497
+ "0100111",
498
+ "0110011",
499
+ "0011011",
500
+ "0100001",
501
+ "0011101",
502
+ "0111001",
503
+ "0000101",
504
+ "0010001",
505
+ "0001001",
506
+ "0010111"
507
+ ],
508
+ R: [
509
+ // The R (right) type of encoding
510
+ "1110010",
511
+ "1100110",
512
+ "1101100",
513
+ "1000010",
514
+ "1011100",
515
+ "1001110",
516
+ "1010000",
517
+ "1000100",
518
+ "1001000",
519
+ "1110100"
520
+ ],
521
+ O: [
522
+ // The O (odd) encoding for UPC-E
523
+ "0001101",
524
+ "0011001",
525
+ "0010011",
526
+ "0111101",
527
+ "0100011",
528
+ "0110001",
529
+ "0101111",
530
+ "0111011",
531
+ "0110111",
532
+ "0001011"
533
+ ],
534
+ E: [
535
+ // The E (even) encoding for UPC-E
536
+ "0100111",
537
+ "0110011",
538
+ "0011011",
539
+ "0100001",
540
+ "0011101",
541
+ "0111001",
542
+ "0000101",
543
+ "0010001",
544
+ "0001001",
545
+ "0010111"
546
+ ]
547
+ }, D.EAN2_STRUCTURE = ["LL", "LG", "GL", "GG"], D.EAN5_STRUCTURE = ["GGLLL", "GLGLL", "GLLGL", "GLLLG", "LGGLL", "LLGGL", "LLLGG", "LGLGL", "LGLLG", "LLGLG"], D.EAN13_STRUCTURE = ["LLLLLL", "LLGLGG", "LLGGLG", "LLGGGL", "LGLLGG", "LGGLLG", "LGGGLL", "LGLGLG", "LGLGGL", "LGGLGL"]), D;
548
+ }
549
+ var ae = {}, ue = {}, Qe;
550
+ function V() {
551
+ if (Qe) return ue;
552
+ Qe = 1, Object.defineProperty(ue, "__esModule", {
553
+ value: !0
554
+ });
555
+ var s = X(), d = function(c, h, _) {
556
+ var l = c.split("").map(function(a, e) {
557
+ return s.BINARIES[h[e]];
558
+ }).map(function(a, e) {
559
+ return a ? a[c[e]] : "";
560
+ });
561
+ if (_) {
562
+ var f = c.length - 1;
563
+ l = l.map(function(a, e) {
564
+ return e < f ? a + _ : a;
565
+ });
566
+ }
567
+ return l.join("");
568
+ };
569
+ return ue.default = d, ue;
570
+ }
571
+ var We;
572
+ function $t() {
573
+ if (We) return ae;
574
+ We = 1, Object.defineProperty(ae, "__esModule", {
575
+ value: !0
576
+ });
577
+ var s = /* @__PURE__ */ function() {
578
+ function n(r, i) {
579
+ for (var u = 0; u < i.length; u++) {
580
+ var o = i[u];
581
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(r, o.key, o);
582
+ }
583
+ }
584
+ return function(r, i, u) {
585
+ return i && n(r.prototype, i), u && n(r, u), r;
586
+ };
587
+ }(), d = X(), v = V(), c = l(v), h = T(), _ = l(h);
588
+ function l(n) {
589
+ return n && n.__esModule ? n : { default: n };
590
+ }
591
+ function f(n, r) {
592
+ if (!(n instanceof r))
593
+ throw new TypeError("Cannot call a class as a function");
594
+ }
595
+ function a(n, r) {
596
+ if (!n)
597
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
598
+ return r && (typeof r == "object" || typeof r == "function") ? r : n;
599
+ }
600
+ function e(n, r) {
601
+ if (typeof r != "function" && r !== null)
602
+ throw new TypeError("Super expression must either be null or a function, not " + typeof r);
603
+ n.prototype = Object.create(r && r.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), r && (Object.setPrototypeOf ? Object.setPrototypeOf(n, r) : n.__proto__ = r);
604
+ }
605
+ var t = function(n) {
606
+ e(r, n);
607
+ function r(i, u) {
608
+ f(this, r);
609
+ var o = a(this, (r.__proto__ || Object.getPrototypeOf(r)).call(this, i, u));
610
+ return o.fontSize = !u.flat && u.fontSize > u.width * 10 ? u.width * 10 : u.fontSize, o.guardHeight = u.height + o.fontSize / 2 + u.textMargin, o;
611
+ }
612
+ return s(r, [{
613
+ key: "encode",
614
+ value: function() {
615
+ return this.options.flat ? this.encodeFlat() : this.encodeGuarded();
616
+ }
617
+ }, {
618
+ key: "leftText",
619
+ value: function(u, o) {
620
+ return this.text.substr(u, o);
621
+ }
622
+ }, {
623
+ key: "leftEncode",
624
+ value: function(u, o) {
625
+ return (0, c.default)(u, o);
626
+ }
627
+ }, {
628
+ key: "rightText",
629
+ value: function(u, o) {
630
+ return this.text.substr(u, o);
631
+ }
632
+ }, {
633
+ key: "rightEncode",
634
+ value: function(u, o) {
635
+ return (0, c.default)(u, o);
636
+ }
637
+ }, {
638
+ key: "encodeGuarded",
639
+ value: function() {
640
+ var u = { fontSize: this.fontSize }, o = { height: this.guardHeight };
641
+ return [{ data: d.SIDE_BIN, options: o }, { data: this.leftEncode(), text: this.leftText(), options: u }, { data: d.MIDDLE_BIN, options: o }, { data: this.rightEncode(), text: this.rightText(), options: u }, { data: d.SIDE_BIN, options: o }];
642
+ }
643
+ }, {
644
+ key: "encodeFlat",
645
+ value: function() {
646
+ var u = [d.SIDE_BIN, this.leftEncode(), d.MIDDLE_BIN, this.rightEncode(), d.SIDE_BIN];
647
+ return {
648
+ data: u.join(""),
649
+ text: this.text
650
+ };
651
+ }
652
+ }]), r;
653
+ }(_.default);
654
+ return ae.default = t, ae;
655
+ }
656
+ var Ze;
657
+ function ar() {
658
+ if (Ze) return ie;
659
+ Ze = 1, Object.defineProperty(ie, "__esModule", {
660
+ value: !0
661
+ });
662
+ var s = /* @__PURE__ */ function() {
663
+ function n(r, i) {
664
+ for (var u = 0; u < i.length; u++) {
665
+ var o = i[u];
666
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(r, o.key, o);
667
+ }
668
+ }
669
+ return function(r, i, u) {
670
+ return i && n(r.prototype, i), u && n(r, u), r;
671
+ };
672
+ }(), d = function n(r, i, u) {
673
+ r === null && (r = Function.prototype);
674
+ var o = Object.getOwnPropertyDescriptor(r, i);
675
+ if (o === void 0) {
676
+ var y = Object.getPrototypeOf(r);
677
+ return y === null ? void 0 : n(y, i, u);
678
+ } else {
679
+ if ("value" in o)
680
+ return o.value;
681
+ var p = o.get;
682
+ return p === void 0 ? void 0 : p.call(u);
683
+ }
684
+ }, v = X(), c = $t(), h = _(c);
685
+ function _(n) {
686
+ return n && n.__esModule ? n : { default: n };
687
+ }
688
+ function l(n, r) {
689
+ if (!(n instanceof r))
690
+ throw new TypeError("Cannot call a class as a function");
691
+ }
692
+ function f(n, r) {
693
+ if (!n)
694
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
695
+ return r && (typeof r == "object" || typeof r == "function") ? r : n;
696
+ }
697
+ function a(n, r) {
698
+ if (typeof r != "function" && r !== null)
699
+ throw new TypeError("Super expression must either be null or a function, not " + typeof r);
700
+ n.prototype = Object.create(r && r.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), r && (Object.setPrototypeOf ? Object.setPrototypeOf(n, r) : n.__proto__ = r);
701
+ }
702
+ var e = function(r) {
703
+ var i = r.substr(0, 12).split("").map(function(u) {
704
+ return +u;
705
+ }).reduce(function(u, o, y) {
706
+ return y % 2 ? u + o * 3 : u + o;
707
+ }, 0);
708
+ return (10 - i % 10) % 10;
709
+ }, t = function(n) {
710
+ a(r, n);
711
+ function r(i, u) {
712
+ l(this, r), i.search(/^[0-9]{12}$/) !== -1 && (i += e(i));
713
+ var o = f(this, (r.__proto__ || Object.getPrototypeOf(r)).call(this, i, u));
714
+ return o.lastChar = u.lastChar, o;
715
+ }
716
+ return s(r, [{
717
+ key: "valid",
718
+ value: function() {
719
+ return this.data.search(/^[0-9]{13}$/) !== -1 && +this.data[12] === e(this.data);
720
+ }
721
+ }, {
722
+ key: "leftText",
723
+ value: function() {
724
+ return d(r.prototype.__proto__ || Object.getPrototypeOf(r.prototype), "leftText", this).call(this, 1, 6);
725
+ }
726
+ }, {
727
+ key: "leftEncode",
728
+ value: function() {
729
+ var u = this.data.substr(1, 6), o = v.EAN13_STRUCTURE[this.data[0]];
730
+ return d(r.prototype.__proto__ || Object.getPrototypeOf(r.prototype), "leftEncode", this).call(this, u, o);
731
+ }
732
+ }, {
733
+ key: "rightText",
734
+ value: function() {
735
+ return d(r.prototype.__proto__ || Object.getPrototypeOf(r.prototype), "rightText", this).call(this, 7, 6);
736
+ }
737
+ }, {
738
+ key: "rightEncode",
739
+ value: function() {
740
+ var u = this.data.substr(7, 6);
741
+ return d(r.prototype.__proto__ || Object.getPrototypeOf(r.prototype), "rightEncode", this).call(this, u, "RRRRRR");
742
+ }
743
+ // The "standard" way of printing EAN13 barcodes with guard bars
744
+ }, {
745
+ key: "encodeGuarded",
746
+ value: function() {
747
+ var u = d(r.prototype.__proto__ || Object.getPrototypeOf(r.prototype), "encodeGuarded", this).call(this);
748
+ return this.options.displayValue && (u.unshift({
749
+ data: "000000000000",
750
+ text: this.text.substr(0, 1),
751
+ options: { textAlign: "left", fontSize: this.fontSize }
752
+ }), this.options.lastChar && (u.push({
753
+ data: "00"
754
+ }), u.push({
755
+ data: "00000",
756
+ text: this.options.lastChar,
757
+ options: { fontSize: this.fontSize }
758
+ }))), u;
759
+ }
760
+ }]), r;
761
+ }(h.default);
762
+ return ie.default = t, ie;
763
+ }
764
+ var oe = {}, Ke;
765
+ function ur() {
766
+ if (Ke) return oe;
767
+ Ke = 1, Object.defineProperty(oe, "__esModule", {
768
+ value: !0
769
+ });
770
+ var s = /* @__PURE__ */ function() {
771
+ function t(n, r) {
772
+ for (var i = 0; i < r.length; i++) {
773
+ var u = r[i];
774
+ u.enumerable = u.enumerable || !1, u.configurable = !0, "value" in u && (u.writable = !0), Object.defineProperty(n, u.key, u);
775
+ }
776
+ }
777
+ return function(n, r, i) {
778
+ return r && t(n.prototype, r), i && t(n, i), n;
779
+ };
780
+ }(), d = function t(n, r, i) {
781
+ n === null && (n = Function.prototype);
782
+ var u = Object.getOwnPropertyDescriptor(n, r);
783
+ if (u === void 0) {
784
+ var o = Object.getPrototypeOf(n);
785
+ return o === null ? void 0 : t(o, r, i);
786
+ } else {
787
+ if ("value" in u)
788
+ return u.value;
789
+ var y = u.get;
790
+ return y === void 0 ? void 0 : y.call(i);
791
+ }
792
+ }, v = $t(), c = h(v);
793
+ function h(t) {
794
+ return t && t.__esModule ? t : { default: t };
795
+ }
796
+ function _(t, n) {
797
+ if (!(t instanceof n))
798
+ throw new TypeError("Cannot call a class as a function");
799
+ }
800
+ function l(t, n) {
801
+ if (!t)
802
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
803
+ return n && (typeof n == "object" || typeof n == "function") ? n : t;
804
+ }
805
+ function f(t, n) {
806
+ if (typeof n != "function" && n !== null)
807
+ throw new TypeError("Super expression must either be null or a function, not " + typeof n);
808
+ t.prototype = Object.create(n && n.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }), n && (Object.setPrototypeOf ? Object.setPrototypeOf(t, n) : t.__proto__ = n);
809
+ }
810
+ var a = function(n) {
811
+ var r = n.substr(0, 7).split("").map(function(i) {
812
+ return +i;
813
+ }).reduce(function(i, u, o) {
814
+ return o % 2 ? i + u : i + u * 3;
815
+ }, 0);
816
+ return (10 - r % 10) % 10;
817
+ }, e = function(t) {
818
+ f(n, t);
819
+ function n(r, i) {
820
+ return _(this, n), r.search(/^[0-9]{7}$/) !== -1 && (r += a(r)), l(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, r, i));
821
+ }
822
+ return s(n, [{
823
+ key: "valid",
824
+ value: function() {
825
+ return this.data.search(/^[0-9]{8}$/) !== -1 && +this.data[7] === a(this.data);
826
+ }
827
+ }, {
828
+ key: "leftText",
829
+ value: function() {
830
+ return d(n.prototype.__proto__ || Object.getPrototypeOf(n.prototype), "leftText", this).call(this, 0, 4);
831
+ }
832
+ }, {
833
+ key: "leftEncode",
834
+ value: function() {
835
+ var i = this.data.substr(0, 4);
836
+ return d(n.prototype.__proto__ || Object.getPrototypeOf(n.prototype), "leftEncode", this).call(this, i, "LLLL");
837
+ }
838
+ }, {
839
+ key: "rightText",
840
+ value: function() {
841
+ return d(n.prototype.__proto__ || Object.getPrototypeOf(n.prototype), "rightText", this).call(this, 4, 4);
842
+ }
843
+ }, {
844
+ key: "rightEncode",
845
+ value: function() {
846
+ var i = this.data.substr(4, 4);
847
+ return d(n.prototype.__proto__ || Object.getPrototypeOf(n.prototype), "rightEncode", this).call(this, i, "RRRR");
848
+ }
849
+ }]), n;
850
+ }(c.default);
851
+ return oe.default = e, oe;
852
+ }
853
+ var fe = {}, et;
854
+ function or() {
855
+ if (et) return fe;
856
+ et = 1, Object.defineProperty(fe, "__esModule", {
857
+ value: !0
858
+ });
859
+ var s = /* @__PURE__ */ function() {
860
+ function r(i, u) {
861
+ for (var o = 0; o < u.length; o++) {
862
+ var y = u[o];
863
+ y.enumerable = y.enumerable || !1, y.configurable = !0, "value" in y && (y.writable = !0), Object.defineProperty(i, y.key, y);
864
+ }
865
+ }
866
+ return function(i, u, o) {
867
+ return u && r(i.prototype, u), o && r(i, o), i;
868
+ };
869
+ }(), d = X(), v = V(), c = l(v), h = T(), _ = l(h);
870
+ function l(r) {
871
+ return r && r.__esModule ? r : { default: r };
872
+ }
873
+ function f(r, i) {
874
+ if (!(r instanceof i))
875
+ throw new TypeError("Cannot call a class as a function");
876
+ }
877
+ function a(r, i) {
878
+ if (!r)
879
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
880
+ return i && (typeof i == "object" || typeof i == "function") ? i : r;
881
+ }
882
+ function e(r, i) {
883
+ if (typeof i != "function" && i !== null)
884
+ throw new TypeError("Super expression must either be null or a function, not " + typeof i);
885
+ r.prototype = Object.create(i && i.prototype, { constructor: { value: r, enumerable: !1, writable: !0, configurable: !0 } }), i && (Object.setPrototypeOf ? Object.setPrototypeOf(r, i) : r.__proto__ = i);
886
+ }
887
+ var t = function(i) {
888
+ var u = i.split("").map(function(o) {
889
+ return +o;
890
+ }).reduce(function(o, y, p) {
891
+ return p % 2 ? o + y * 9 : o + y * 3;
892
+ }, 0);
893
+ return u % 10;
894
+ }, n = function(r) {
895
+ e(i, r);
896
+ function i(u, o) {
897
+ return f(this, i), a(this, (i.__proto__ || Object.getPrototypeOf(i)).call(this, u, o));
898
+ }
899
+ return s(i, [{
900
+ key: "valid",
901
+ value: function() {
902
+ return this.data.search(/^[0-9]{5}$/) !== -1;
903
+ }
904
+ }, {
905
+ key: "encode",
906
+ value: function() {
907
+ var o = d.EAN5_STRUCTURE[t(this.data)];
908
+ return {
909
+ data: "1011" + (0, c.default)(this.data, o, "01"),
910
+ text: this.text
911
+ };
912
+ }
913
+ }]), i;
914
+ }(_.default);
915
+ return fe.default = n, fe;
916
+ }
917
+ var ce = {}, tt;
918
+ function fr() {
919
+ if (tt) return ce;
920
+ tt = 1, Object.defineProperty(ce, "__esModule", {
921
+ value: !0
922
+ });
923
+ var s = /* @__PURE__ */ function() {
924
+ function n(r, i) {
925
+ for (var u = 0; u < i.length; u++) {
926
+ var o = i[u];
927
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(r, o.key, o);
928
+ }
929
+ }
930
+ return function(r, i, u) {
931
+ return i && n(r.prototype, i), u && n(r, u), r;
932
+ };
933
+ }(), d = X(), v = V(), c = l(v), h = T(), _ = l(h);
934
+ function l(n) {
935
+ return n && n.__esModule ? n : { default: n };
936
+ }
937
+ function f(n, r) {
938
+ if (!(n instanceof r))
939
+ throw new TypeError("Cannot call a class as a function");
940
+ }
941
+ function a(n, r) {
942
+ if (!n)
943
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
944
+ return r && (typeof r == "object" || typeof r == "function") ? r : n;
945
+ }
946
+ function e(n, r) {
947
+ if (typeof r != "function" && r !== null)
948
+ throw new TypeError("Super expression must either be null or a function, not " + typeof r);
949
+ n.prototype = Object.create(r && r.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), r && (Object.setPrototypeOf ? Object.setPrototypeOf(n, r) : n.__proto__ = r);
950
+ }
951
+ var t = function(n) {
952
+ e(r, n);
953
+ function r(i, u) {
954
+ return f(this, r), a(this, (r.__proto__ || Object.getPrototypeOf(r)).call(this, i, u));
955
+ }
956
+ return s(r, [{
957
+ key: "valid",
958
+ value: function() {
959
+ return this.data.search(/^[0-9]{2}$/) !== -1;
960
+ }
961
+ }, {
962
+ key: "encode",
963
+ value: function() {
964
+ var u = d.EAN2_STRUCTURE[parseInt(this.data) % 4];
965
+ return {
966
+ // Start bits + Encode the two digits with 01 in between
967
+ data: "1011" + (0, c.default)(this.data, u, "01"),
968
+ text: this.text
969
+ };
970
+ }
971
+ }]), r;
972
+ }(_.default);
973
+ return ce.default = t, ce;
974
+ }
975
+ var N = {}, rt;
976
+ function Nt() {
977
+ if (rt) return N;
978
+ rt = 1, Object.defineProperty(N, "__esModule", {
979
+ value: !0
980
+ });
981
+ var s = /* @__PURE__ */ function() {
982
+ function n(r, i) {
983
+ for (var u = 0; u < i.length; u++) {
984
+ var o = i[u];
985
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(r, o.key, o);
986
+ }
987
+ }
988
+ return function(r, i, u) {
989
+ return i && n(r.prototype, i), u && n(r, u), r;
990
+ };
991
+ }();
992
+ N.checksum = t;
993
+ var d = V(), v = _(d), c = T(), h = _(c);
994
+ function _(n) {
995
+ return n && n.__esModule ? n : { default: n };
996
+ }
997
+ function l(n, r) {
998
+ if (!(n instanceof r))
999
+ throw new TypeError("Cannot call a class as a function");
1000
+ }
1001
+ function f(n, r) {
1002
+ if (!n)
1003
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1004
+ return r && (typeof r == "object" || typeof r == "function") ? r : n;
1005
+ }
1006
+ function a(n, r) {
1007
+ if (typeof r != "function" && r !== null)
1008
+ throw new TypeError("Super expression must either be null or a function, not " + typeof r);
1009
+ n.prototype = Object.create(r && r.prototype, { constructor: { value: n, enumerable: !1, writable: !0, configurable: !0 } }), r && (Object.setPrototypeOf ? Object.setPrototypeOf(n, r) : n.__proto__ = r);
1010
+ }
1011
+ var e = function(n) {
1012
+ a(r, n);
1013
+ function r(i, u) {
1014
+ l(this, r), i.search(/^[0-9]{11}$/) !== -1 && (i += t(i));
1015
+ var o = f(this, (r.__proto__ || Object.getPrototypeOf(r)).call(this, i, u));
1016
+ return o.displayValue = u.displayValue, u.fontSize > u.width * 10 ? o.fontSize = u.width * 10 : o.fontSize = u.fontSize, o.guardHeight = u.height + o.fontSize / 2 + u.textMargin, o;
1017
+ }
1018
+ return s(r, [{
1019
+ key: "valid",
1020
+ value: function() {
1021
+ return this.data.search(/^[0-9]{12}$/) !== -1 && this.data[11] == t(this.data);
1022
+ }
1023
+ }, {
1024
+ key: "encode",
1025
+ value: function() {
1026
+ return this.options.flat ? this.flatEncoding() : this.guardedEncoding();
1027
+ }
1028
+ }, {
1029
+ key: "flatEncoding",
1030
+ value: function() {
1031
+ var u = "";
1032
+ return u += "101", u += (0, v.default)(this.data.substr(0, 6), "LLLLLL"), u += "01010", u += (0, v.default)(this.data.substr(6, 6), "RRRRRR"), u += "101", {
1033
+ data: u,
1034
+ text: this.text
1035
+ };
1036
+ }
1037
+ }, {
1038
+ key: "guardedEncoding",
1039
+ value: function() {
1040
+ var u = [];
1041
+ return this.displayValue && u.push({
1042
+ data: "00000000",
1043
+ text: this.text.substr(0, 1),
1044
+ options: { textAlign: "left", fontSize: this.fontSize }
1045
+ }), u.push({
1046
+ data: "101" + (0, v.default)(this.data[0], "L"),
1047
+ options: { height: this.guardHeight }
1048
+ }), u.push({
1049
+ data: (0, v.default)(this.data.substr(1, 5), "LLLLL"),
1050
+ text: this.text.substr(1, 5),
1051
+ options: { fontSize: this.fontSize }
1052
+ }), u.push({
1053
+ data: "01010",
1054
+ options: { height: this.guardHeight }
1055
+ }), u.push({
1056
+ data: (0, v.default)(this.data.substr(6, 5), "RRRRR"),
1057
+ text: this.text.substr(6, 5),
1058
+ options: { fontSize: this.fontSize }
1059
+ }), u.push({
1060
+ data: (0, v.default)(this.data[11], "R") + "101",
1061
+ options: { height: this.guardHeight }
1062
+ }), this.displayValue && u.push({
1063
+ data: "00000000",
1064
+ text: this.text.substr(11, 1),
1065
+ options: { textAlign: "right", fontSize: this.fontSize }
1066
+ }), u;
1067
+ }
1068
+ }]), r;
1069
+ }(h.default);
1070
+ function t(n) {
1071
+ var r = 0, i;
1072
+ for (i = 1; i < 11; i += 2)
1073
+ r += parseInt(n[i]);
1074
+ for (i = 0; i < 11; i += 2)
1075
+ r += parseInt(n[i]) * 3;
1076
+ return (10 - r % 10) % 10;
1077
+ }
1078
+ return N.default = e, N;
1079
+ }
1080
+ var le = {}, nt;
1081
+ function cr() {
1082
+ if (nt) return le;
1083
+ nt = 1, Object.defineProperty(le, "__esModule", {
1084
+ value: !0
1085
+ });
1086
+ var s = /* @__PURE__ */ function() {
1087
+ function u(o, y) {
1088
+ for (var p = 0; p < y.length; p++) {
1089
+ var g = y[p];
1090
+ g.enumerable = g.enumerable || !1, g.configurable = !0, "value" in g && (g.writable = !0), Object.defineProperty(o, g.key, g);
1091
+ }
1092
+ }
1093
+ return function(o, y, p) {
1094
+ return y && u(o.prototype, y), p && u(o, p), o;
1095
+ };
1096
+ }(), d = V(), v = l(d), c = T(), h = l(c), _ = Nt();
1097
+ function l(u) {
1098
+ return u && u.__esModule ? u : { default: u };
1099
+ }
1100
+ function f(u, o) {
1101
+ if (!(u instanceof o))
1102
+ throw new TypeError("Cannot call a class as a function");
1103
+ }
1104
+ function a(u, o) {
1105
+ if (!u)
1106
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1107
+ return o && (typeof o == "object" || typeof o == "function") ? o : u;
1108
+ }
1109
+ function e(u, o) {
1110
+ if (typeof o != "function" && o !== null)
1111
+ throw new TypeError("Super expression must either be null or a function, not " + typeof o);
1112
+ u.prototype = Object.create(o && o.prototype, { constructor: { value: u, enumerable: !1, writable: !0, configurable: !0 } }), o && (Object.setPrototypeOf ? Object.setPrototypeOf(u, o) : u.__proto__ = o);
1113
+ }
1114
+ var t = ["XX00000XXX", "XX10000XXX", "XX20000XXX", "XXX00000XX", "XXXX00000X", "XXXXX00005", "XXXXX00006", "XXXXX00007", "XXXXX00008", "XXXXX00009"], n = [["EEEOOO", "OOOEEE"], ["EEOEOO", "OOEOEE"], ["EEOOEO", "OOEEOE"], ["EEOOOE", "OOEEEO"], ["EOEEOO", "OEOOEE"], ["EOOEEO", "OEEOOE"], ["EOOOEE", "OEEEOO"], ["EOEOEO", "OEOEOE"], ["EOEOOE", "OEOEEO"], ["EOOEOE", "OEEOEO"]], r = function(u) {
1115
+ e(o, u);
1116
+ function o(y, p) {
1117
+ f(this, o);
1118
+ var g = a(this, (o.__proto__ || Object.getPrototypeOf(o)).call(this, y, p));
1119
+ if (g.isValid = !1, y.search(/^[0-9]{6}$/) !== -1)
1120
+ g.middleDigits = y, g.upcA = i(y, "0"), g.text = p.text || "" + g.upcA[0] + y + g.upcA[g.upcA.length - 1], g.isValid = !0;
1121
+ else if (y.search(/^[01][0-9]{7}$/) !== -1)
1122
+ if (g.middleDigits = y.substring(1, y.length - 1), g.upcA = i(g.middleDigits, y[0]), g.upcA[g.upcA.length - 1] === y[y.length - 1])
1123
+ g.isValid = !0;
1124
+ else
1125
+ return a(g);
1126
+ else
1127
+ return a(g);
1128
+ return g.displayValue = p.displayValue, p.fontSize > p.width * 10 ? g.fontSize = p.width * 10 : g.fontSize = p.fontSize, g.guardHeight = p.height + g.fontSize / 2 + p.textMargin, g;
1129
+ }
1130
+ return s(o, [{
1131
+ key: "valid",
1132
+ value: function() {
1133
+ return this.isValid;
1134
+ }
1135
+ }, {
1136
+ key: "encode",
1137
+ value: function() {
1138
+ return this.options.flat ? this.flatEncoding() : this.guardedEncoding();
1139
+ }
1140
+ }, {
1141
+ key: "flatEncoding",
1142
+ value: function() {
1143
+ var p = "";
1144
+ return p += "101", p += this.encodeMiddleDigits(), p += "010101", {
1145
+ data: p,
1146
+ text: this.text
1147
+ };
1148
+ }
1149
+ }, {
1150
+ key: "guardedEncoding",
1151
+ value: function() {
1152
+ var p = [];
1153
+ return this.displayValue && p.push({
1154
+ data: "00000000",
1155
+ text: this.text[0],
1156
+ options: { textAlign: "left", fontSize: this.fontSize }
1157
+ }), p.push({
1158
+ data: "101",
1159
+ options: { height: this.guardHeight }
1160
+ }), p.push({
1161
+ data: this.encodeMiddleDigits(),
1162
+ text: this.text.substring(1, 7),
1163
+ options: { fontSize: this.fontSize }
1164
+ }), p.push({
1165
+ data: "010101",
1166
+ options: { height: this.guardHeight }
1167
+ }), this.displayValue && p.push({
1168
+ data: "00000000",
1169
+ text: this.text[7],
1170
+ options: { textAlign: "right", fontSize: this.fontSize }
1171
+ }), p;
1172
+ }
1173
+ }, {
1174
+ key: "encodeMiddleDigits",
1175
+ value: function() {
1176
+ var p = this.upcA[0], g = this.upcA[this.upcA.length - 1], w = n[parseInt(g)][parseInt(p)];
1177
+ return (0, v.default)(this.middleDigits, w);
1178
+ }
1179
+ }]), o;
1180
+ }(h.default);
1181
+ function i(u, o) {
1182
+ for (var y = parseInt(u[u.length - 1]), p = t[y], g = "", w = 0, C = 0; C < p.length; C++) {
1183
+ var Y = p[C];
1184
+ Y === "X" ? g += u[w++] : g += Y;
1185
+ }
1186
+ return g = "" + o + g, "" + g + (0, _.checksum)(g);
1187
+ }
1188
+ return le.default = r, le;
1189
+ }
1190
+ var it;
1191
+ function lr() {
1192
+ if (it) return R;
1193
+ it = 1, Object.defineProperty(R, "__esModule", {
1194
+ value: !0
1195
+ }), R.UPCE = R.UPC = R.EAN2 = R.EAN5 = R.EAN8 = R.EAN13 = void 0;
1196
+ var s = ar(), d = r(s), v = ur(), c = r(v), h = or(), _ = r(h), l = fr(), f = r(l), a = Nt(), e = r(a), t = cr(), n = r(t);
1197
+ function r(i) {
1198
+ return i && i.__esModule ? i : { default: i };
1199
+ }
1200
+ return R.EAN13 = d.default, R.EAN8 = c.default, R.EAN5 = _.default, R.EAN2 = f.default, R.UPC = e.default, R.UPCE = n.default, R;
1201
+ }
1202
+ var k = {}, de = {}, B = {}, at;
1203
+ function dr() {
1204
+ return at || (at = 1, Object.defineProperty(B, "__esModule", {
1205
+ value: !0
1206
+ }), B.START_BIN = "1010", B.END_BIN = "11101", B.BINARIES = ["00110", "10001", "01001", "11000", "00101", "10100", "01100", "00011", "10010", "01010"]), B;
1207
+ }
1208
+ var ut;
1209
+ function Gt() {
1210
+ if (ut) return de;
1211
+ ut = 1, Object.defineProperty(de, "__esModule", {
1212
+ value: !0
1213
+ });
1214
+ var s = /* @__PURE__ */ function() {
1215
+ function e(t, n) {
1216
+ for (var r = 0; r < n.length; r++) {
1217
+ var i = n[r];
1218
+ i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
1219
+ }
1220
+ }
1221
+ return function(t, n, r) {
1222
+ return n && e(t.prototype, n), r && e(t, r), t;
1223
+ };
1224
+ }(), d = dr(), v = T(), c = h(v);
1225
+ function h(e) {
1226
+ return e && e.__esModule ? e : { default: e };
1227
+ }
1228
+ function _(e, t) {
1229
+ if (!(e instanceof t))
1230
+ throw new TypeError("Cannot call a class as a function");
1231
+ }
1232
+ function l(e, t) {
1233
+ if (!e)
1234
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1235
+ return t && (typeof t == "object" || typeof t == "function") ? t : e;
1236
+ }
1237
+ function f(e, t) {
1238
+ if (typeof t != "function" && t !== null)
1239
+ throw new TypeError("Super expression must either be null or a function, not " + typeof t);
1240
+ e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
1241
+ }
1242
+ var a = function(e) {
1243
+ f(t, e);
1244
+ function t() {
1245
+ return _(this, t), l(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments));
1246
+ }
1247
+ return s(t, [{
1248
+ key: "valid",
1249
+ value: function() {
1250
+ return this.data.search(/^([0-9]{2})+$/) !== -1;
1251
+ }
1252
+ }, {
1253
+ key: "encode",
1254
+ value: function() {
1255
+ var r = this, i = this.data.match(/.{2}/g).map(function(u) {
1256
+ return r.encodePair(u);
1257
+ }).join("");
1258
+ return {
1259
+ data: d.START_BIN + i + d.END_BIN,
1260
+ text: this.text
1261
+ };
1262
+ }
1263
+ // Calculate the data of a number pair
1264
+ }, {
1265
+ key: "encodePair",
1266
+ value: function(r) {
1267
+ var i = d.BINARIES[r[1]];
1268
+ return d.BINARIES[r[0]].split("").map(function(u, o) {
1269
+ return (u === "1" ? "111" : "1") + (i[o] === "1" ? "000" : "0");
1270
+ }).join("");
1271
+ }
1272
+ }]), t;
1273
+ }(c.default);
1274
+ return de.default = a, de;
1275
+ }
1276
+ var he = {}, ot;
1277
+ function hr() {
1278
+ if (ot) return he;
1279
+ ot = 1, Object.defineProperty(he, "__esModule", {
1280
+ value: !0
1281
+ });
1282
+ var s = /* @__PURE__ */ function() {
1283
+ function e(t, n) {
1284
+ for (var r = 0; r < n.length; r++) {
1285
+ var i = n[r];
1286
+ i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
1287
+ }
1288
+ }
1289
+ return function(t, n, r) {
1290
+ return n && e(t.prototype, n), r && e(t, r), t;
1291
+ };
1292
+ }(), d = Gt(), v = c(d);
1293
+ function c(e) {
1294
+ return e && e.__esModule ? e : { default: e };
1295
+ }
1296
+ function h(e, t) {
1297
+ if (!(e instanceof t))
1298
+ throw new TypeError("Cannot call a class as a function");
1299
+ }
1300
+ function _(e, t) {
1301
+ if (!e)
1302
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1303
+ return t && (typeof t == "object" || typeof t == "function") ? t : e;
1304
+ }
1305
+ function l(e, t) {
1306
+ if (typeof t != "function" && t !== null)
1307
+ throw new TypeError("Super expression must either be null or a function, not " + typeof t);
1308
+ e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
1309
+ }
1310
+ var f = function(t) {
1311
+ var n = t.substr(0, 13).split("").map(function(r) {
1312
+ return parseInt(r, 10);
1313
+ }).reduce(function(r, i, u) {
1314
+ return r + i * (3 - u % 2 * 2);
1315
+ }, 0);
1316
+ return Math.ceil(n / 10) * 10 - n;
1317
+ }, a = function(e) {
1318
+ l(t, e);
1319
+ function t(n, r) {
1320
+ return h(this, t), n.search(/^[0-9]{13}$/) !== -1 && (n += f(n)), _(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, n, r));
1321
+ }
1322
+ return s(t, [{
1323
+ key: "valid",
1324
+ value: function() {
1325
+ return this.data.search(/^[0-9]{14}$/) !== -1 && +this.data[13] === f(this.data);
1326
+ }
1327
+ }]), t;
1328
+ }(v.default);
1329
+ return he.default = a, he;
1330
+ }
1331
+ var ft;
1332
+ function vr() {
1333
+ if (ft) return k;
1334
+ ft = 1, Object.defineProperty(k, "__esModule", {
1335
+ value: !0
1336
+ }), k.ITF14 = k.ITF = void 0;
1337
+ var s = Gt(), d = h(s), v = hr(), c = h(v);
1338
+ function h(_) {
1339
+ return _ && _.__esModule ? _ : { default: _ };
1340
+ }
1341
+ return k.ITF = d.default, k.ITF14 = c.default, k;
1342
+ }
1343
+ var A = {}, ve = {}, ct;
1344
+ function J() {
1345
+ if (ct) return ve;
1346
+ ct = 1, Object.defineProperty(ve, "__esModule", {
1347
+ value: !0
1348
+ });
1349
+ var s = /* @__PURE__ */ function() {
1350
+ function e(t, n) {
1351
+ for (var r = 0; r < n.length; r++) {
1352
+ var i = n[r];
1353
+ i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
1354
+ }
1355
+ }
1356
+ return function(t, n, r) {
1357
+ return n && e(t.prototype, n), r && e(t, r), t;
1358
+ };
1359
+ }(), d = T(), v = c(d);
1360
+ function c(e) {
1361
+ return e && e.__esModule ? e : { default: e };
1362
+ }
1363
+ function h(e, t) {
1364
+ if (!(e instanceof t))
1365
+ throw new TypeError("Cannot call a class as a function");
1366
+ }
1367
+ function _(e, t) {
1368
+ if (!e)
1369
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1370
+ return t && (typeof t == "object" || typeof t == "function") ? t : e;
1371
+ }
1372
+ function l(e, t) {
1373
+ if (typeof t != "function" && t !== null)
1374
+ throw new TypeError("Super expression must either be null or a function, not " + typeof t);
1375
+ e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
1376
+ }
1377
+ var f = function(e) {
1378
+ l(t, e);
1379
+ function t(n, r) {
1380
+ return h(this, t), _(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, n, r));
1381
+ }
1382
+ return s(t, [{
1383
+ key: "encode",
1384
+ value: function() {
1385
+ for (var r = "110", i = 0; i < this.data.length; i++) {
1386
+ var u = parseInt(this.data[i]), o = u.toString(2);
1387
+ o = a(o, 4 - o.length);
1388
+ for (var y = 0; y < o.length; y++)
1389
+ r += o[y] == "0" ? "100" : "110";
1390
+ }
1391
+ return r += "1001", {
1392
+ data: r,
1393
+ text: this.text
1394
+ };
1395
+ }
1396
+ }, {
1397
+ key: "valid",
1398
+ value: function() {
1399
+ return this.data.search(/^[0-9]+$/) !== -1;
1400
+ }
1401
+ }]), t;
1402
+ }(v.default);
1403
+ function a(e, t) {
1404
+ for (var n = 0; n < t; n++)
1405
+ e = "0" + e;
1406
+ return e;
1407
+ }
1408
+ return ve.default = f, ve;
1409
+ }
1410
+ var _e = {}, G = {}, lt;
1411
+ function ke() {
1412
+ if (lt) return G;
1413
+ lt = 1, Object.defineProperty(G, "__esModule", {
1414
+ value: !0
1415
+ }), G.mod10 = s, G.mod11 = d;
1416
+ function s(v) {
1417
+ for (var c = 0, h = 0; h < v.length; h++) {
1418
+ var _ = parseInt(v[h]);
1419
+ (h + v.length) % 2 === 0 ? c += _ : c += _ * 2 % 10 + Math.floor(_ * 2 / 10);
1420
+ }
1421
+ return (10 - c % 10) % 10;
1422
+ }
1423
+ function d(v) {
1424
+ for (var c = 0, h = [2, 3, 4, 5, 6, 7], _ = 0; _ < v.length; _++) {
1425
+ var l = parseInt(v[v.length - 1 - _]);
1426
+ c += h[_ % h.length] * l;
1427
+ }
1428
+ return (11 - c % 11) % 11;
1429
+ }
1430
+ return G;
1431
+ }
1432
+ var dt;
1433
+ function _r() {
1434
+ if (dt) return _e;
1435
+ dt = 1, Object.defineProperty(_e, "__esModule", {
1436
+ value: !0
1437
+ });
1438
+ var s = J(), d = c(s), v = ke();
1439
+ function c(a) {
1440
+ return a && a.__esModule ? a : { default: a };
1441
+ }
1442
+ function h(a, e) {
1443
+ if (!(a instanceof e))
1444
+ throw new TypeError("Cannot call a class as a function");
1445
+ }
1446
+ function _(a, e) {
1447
+ if (!a)
1448
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1449
+ return e && (typeof e == "object" || typeof e == "function") ? e : a;
1450
+ }
1451
+ function l(a, e) {
1452
+ if (typeof e != "function" && e !== null)
1453
+ throw new TypeError("Super expression must either be null or a function, not " + typeof e);
1454
+ a.prototype = Object.create(e && e.prototype, { constructor: { value: a, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(a, e) : a.__proto__ = e);
1455
+ }
1456
+ var f = function(a) {
1457
+ l(e, a);
1458
+ function e(t, n) {
1459
+ return h(this, e), _(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t + (0, v.mod10)(t), n));
1460
+ }
1461
+ return e;
1462
+ }(d.default);
1463
+ return _e.default = f, _e;
1464
+ }
1465
+ var se = {}, ht;
1466
+ function sr() {
1467
+ if (ht) return se;
1468
+ ht = 1, Object.defineProperty(se, "__esModule", {
1469
+ value: !0
1470
+ });
1471
+ var s = J(), d = c(s), v = ke();
1472
+ function c(a) {
1473
+ return a && a.__esModule ? a : { default: a };
1474
+ }
1475
+ function h(a, e) {
1476
+ if (!(a instanceof e))
1477
+ throw new TypeError("Cannot call a class as a function");
1478
+ }
1479
+ function _(a, e) {
1480
+ if (!a)
1481
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1482
+ return e && (typeof e == "object" || typeof e == "function") ? e : a;
1483
+ }
1484
+ function l(a, e) {
1485
+ if (typeof e != "function" && e !== null)
1486
+ throw new TypeError("Super expression must either be null or a function, not " + typeof e);
1487
+ a.prototype = Object.create(e && e.prototype, { constructor: { value: a, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(a, e) : a.__proto__ = e);
1488
+ }
1489
+ var f = function(a) {
1490
+ l(e, a);
1491
+ function e(t, n) {
1492
+ return h(this, e), _(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t + (0, v.mod11)(t), n));
1493
+ }
1494
+ return e;
1495
+ }(d.default);
1496
+ return se.default = f, se;
1497
+ }
1498
+ var ye = {}, vt;
1499
+ function yr() {
1500
+ if (vt) return ye;
1501
+ vt = 1, Object.defineProperty(ye, "__esModule", {
1502
+ value: !0
1503
+ });
1504
+ var s = J(), d = c(s), v = ke();
1505
+ function c(a) {
1506
+ return a && a.__esModule ? a : { default: a };
1507
+ }
1508
+ function h(a, e) {
1509
+ if (!(a instanceof e))
1510
+ throw new TypeError("Cannot call a class as a function");
1511
+ }
1512
+ function _(a, e) {
1513
+ if (!a)
1514
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1515
+ return e && (typeof e == "object" || typeof e == "function") ? e : a;
1516
+ }
1517
+ function l(a, e) {
1518
+ if (typeof e != "function" && e !== null)
1519
+ throw new TypeError("Super expression must either be null or a function, not " + typeof e);
1520
+ a.prototype = Object.create(e && e.prototype, { constructor: { value: a, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(a, e) : a.__proto__ = e);
1521
+ }
1522
+ var f = function(a) {
1523
+ l(e, a);
1524
+ function e(t, n) {
1525
+ return h(this, e), t += (0, v.mod10)(t), t += (0, v.mod10)(t), _(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n));
1526
+ }
1527
+ return e;
1528
+ }(d.default);
1529
+ return ye.default = f, ye;
1530
+ }
1531
+ var pe = {}, _t;
1532
+ function pr() {
1533
+ if (_t) return pe;
1534
+ _t = 1, Object.defineProperty(pe, "__esModule", {
1535
+ value: !0
1536
+ });
1537
+ var s = J(), d = c(s), v = ke();
1538
+ function c(a) {
1539
+ return a && a.__esModule ? a : { default: a };
1540
+ }
1541
+ function h(a, e) {
1542
+ if (!(a instanceof e))
1543
+ throw new TypeError("Cannot call a class as a function");
1544
+ }
1545
+ function _(a, e) {
1546
+ if (!a)
1547
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1548
+ return e && (typeof e == "object" || typeof e == "function") ? e : a;
1549
+ }
1550
+ function l(a, e) {
1551
+ if (typeof e != "function" && e !== null)
1552
+ throw new TypeError("Super expression must either be null or a function, not " + typeof e);
1553
+ a.prototype = Object.create(e && e.prototype, { constructor: { value: a, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(a, e) : a.__proto__ = e);
1554
+ }
1555
+ var f = function(a) {
1556
+ l(e, a);
1557
+ function e(t, n) {
1558
+ return h(this, e), t += (0, v.mod11)(t), t += (0, v.mod10)(t), _(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n));
1559
+ }
1560
+ return e;
1561
+ }(d.default);
1562
+ return pe.default = f, pe;
1563
+ }
1564
+ var st;
1565
+ function gr() {
1566
+ if (st) return A;
1567
+ st = 1, Object.defineProperty(A, "__esModule", {
1568
+ value: !0
1569
+ }), A.MSI1110 = A.MSI1010 = A.MSI11 = A.MSI10 = A.MSI = void 0;
1570
+ var s = J(), d = t(s), v = _r(), c = t(v), h = sr(), _ = t(h), l = yr(), f = t(l), a = pr(), e = t(a);
1571
+ function t(n) {
1572
+ return n && n.__esModule ? n : { default: n };
1573
+ }
1574
+ return A.MSI = d.default, A.MSI10 = c.default, A.MSI11 = _.default, A.MSI1010 = f.default, A.MSI1110 = e.default, A;
1575
+ }
1576
+ var F = {}, yt;
1577
+ function Or() {
1578
+ if (yt) return F;
1579
+ yt = 1, Object.defineProperty(F, "__esModule", {
1580
+ value: !0
1581
+ }), F.pharmacode = void 0;
1582
+ var s = /* @__PURE__ */ function() {
1583
+ function a(e, t) {
1584
+ for (var n = 0; n < t.length; n++) {
1585
+ var r = t[n];
1586
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
1587
+ }
1588
+ }
1589
+ return function(e, t, n) {
1590
+ return t && a(e.prototype, t), n && a(e, n), e;
1591
+ };
1592
+ }(), d = T(), v = c(d);
1593
+ function c(a) {
1594
+ return a && a.__esModule ? a : { default: a };
1595
+ }
1596
+ function h(a, e) {
1597
+ if (!(a instanceof e))
1598
+ throw new TypeError("Cannot call a class as a function");
1599
+ }
1600
+ function _(a, e) {
1601
+ if (!a)
1602
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1603
+ return e && (typeof e == "object" || typeof e == "function") ? e : a;
1604
+ }
1605
+ function l(a, e) {
1606
+ if (typeof e != "function" && e !== null)
1607
+ throw new TypeError("Super expression must either be null or a function, not " + typeof e);
1608
+ a.prototype = Object.create(e && e.prototype, { constructor: { value: a, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(a, e) : a.__proto__ = e);
1609
+ }
1610
+ var f = function(a) {
1611
+ l(e, a);
1612
+ function e(t, n) {
1613
+ h(this, e);
1614
+ var r = _(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n));
1615
+ return r.number = parseInt(t, 10), r;
1616
+ }
1617
+ return s(e, [{
1618
+ key: "encode",
1619
+ value: function() {
1620
+ for (var n = this.number, r = ""; !isNaN(n) && n != 0; )
1621
+ n % 2 === 0 ? (r = "11100" + r, n = (n - 2) / 2) : (r = "100" + r, n = (n - 1) / 2);
1622
+ return r = r.slice(0, -2), {
1623
+ data: r,
1624
+ text: this.text
1625
+ };
1626
+ }
1627
+ }, {
1628
+ key: "valid",
1629
+ value: function() {
1630
+ return this.number >= 3 && this.number <= 131070;
1631
+ }
1632
+ }]), e;
1633
+ }(v.default);
1634
+ return F.pharmacode = f, F;
1635
+ }
1636
+ var H = {}, pt;
1637
+ function Er() {
1638
+ if (pt) return H;
1639
+ pt = 1, Object.defineProperty(H, "__esModule", {
1640
+ value: !0
1641
+ }), H.codabar = void 0;
1642
+ var s = /* @__PURE__ */ function() {
1643
+ function a(e, t) {
1644
+ for (var n = 0; n < t.length; n++) {
1645
+ var r = t[n];
1646
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
1647
+ }
1648
+ }
1649
+ return function(e, t, n) {
1650
+ return t && a(e.prototype, t), n && a(e, n), e;
1651
+ };
1652
+ }(), d = T(), v = c(d);
1653
+ function c(a) {
1654
+ return a && a.__esModule ? a : { default: a };
1655
+ }
1656
+ function h(a, e) {
1657
+ if (!(a instanceof e))
1658
+ throw new TypeError("Cannot call a class as a function");
1659
+ }
1660
+ function _(a, e) {
1661
+ if (!a)
1662
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1663
+ return e && (typeof e == "object" || typeof e == "function") ? e : a;
1664
+ }
1665
+ function l(a, e) {
1666
+ if (typeof e != "function" && e !== null)
1667
+ throw new TypeError("Super expression must either be null or a function, not " + typeof e);
1668
+ a.prototype = Object.create(e && e.prototype, { constructor: { value: a, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(a, e) : a.__proto__ = e);
1669
+ }
1670
+ var f = function(a) {
1671
+ l(e, a);
1672
+ function e(t, n) {
1673
+ h(this, e), t.search(/^[0-9\-\$\:\.\+\/]+$/) === 0 && (t = "A" + t + "A");
1674
+ var r = _(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t.toUpperCase(), n));
1675
+ return r.text = r.options.text || r.text.replace(/[A-D]/g, ""), r;
1676
+ }
1677
+ return s(e, [{
1678
+ key: "valid",
1679
+ value: function() {
1680
+ return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/) !== -1;
1681
+ }
1682
+ }, {
1683
+ key: "encode",
1684
+ value: function() {
1685
+ for (var n = [], r = this.getEncodings(), i = 0; i < this.data.length; i++)
1686
+ n.push(r[this.data.charAt(i)]), i !== this.data.length - 1 && n.push("0");
1687
+ return {
1688
+ text: this.text,
1689
+ data: n.join("")
1690
+ };
1691
+ }
1692
+ }, {
1693
+ key: "getEncodings",
1694
+ value: function() {
1695
+ return {
1696
+ 0: "101010011",
1697
+ 1: "101011001",
1698
+ 2: "101001011",
1699
+ 3: "110010101",
1700
+ 4: "101101001",
1701
+ 5: "110101001",
1702
+ 6: "100101011",
1703
+ 7: "100101101",
1704
+ 8: "100110101",
1705
+ 9: "110100101",
1706
+ "-": "101001101",
1707
+ $: "101100101",
1708
+ ":": "1101011011",
1709
+ "/": "1101101011",
1710
+ ".": "1101101101",
1711
+ "+": "1011011011",
1712
+ A: "1011001001",
1713
+ B: "1001001011",
1714
+ C: "1010010011",
1715
+ D: "1010011001"
1716
+ };
1717
+ }
1718
+ }]), e;
1719
+ }(v.default);
1720
+ return H.codabar = f, H;
1721
+ }
1722
+ var q = {}, ge = {}, j = {}, gt;
1723
+ function br() {
1724
+ return gt || (gt = 1, Object.defineProperty(j, "__esModule", {
1725
+ value: !0
1726
+ }), j.SYMBOLS = [
1727
+ "0",
1728
+ "1",
1729
+ "2",
1730
+ "3",
1731
+ "4",
1732
+ "5",
1733
+ "6",
1734
+ "7",
1735
+ "8",
1736
+ "9",
1737
+ "A",
1738
+ "B",
1739
+ "C",
1740
+ "D",
1741
+ "E",
1742
+ "F",
1743
+ "G",
1744
+ "H",
1745
+ "I",
1746
+ "J",
1747
+ "K",
1748
+ "L",
1749
+ "M",
1750
+ "N",
1751
+ "O",
1752
+ "P",
1753
+ "Q",
1754
+ "R",
1755
+ "S",
1756
+ "T",
1757
+ "U",
1758
+ "V",
1759
+ "W",
1760
+ "X",
1761
+ "Y",
1762
+ "Z",
1763
+ "-",
1764
+ ".",
1765
+ " ",
1766
+ "$",
1767
+ "/",
1768
+ "+",
1769
+ "%",
1770
+ // Only used for csum and multi-symbols character encodings
1771
+ "($)",
1772
+ "(%)",
1773
+ "(/)",
1774
+ "(+)",
1775
+ // Start/Stop
1776
+ "ÿ"
1777
+ ], j.BINARIES = ["100010100", "101001000", "101000100", "101000010", "100101000", "100100100", "100100010", "101010000", "100010010", "100001010", "110101000", "110100100", "110100010", "110010100", "110010010", "110001010", "101101000", "101100100", "101100010", "100110100", "100011010", "101011000", "101001100", "101000110", "100101100", "100010110", "110110100", "110110010", "110101100", "110100110", "110010110", "110011010", "101101100", "101100110", "100110110", "100111010", "100101110", "111010100", "111010010", "111001010", "101101110", "101110110", "110101110", "100100110", "111011010", "111010110", "100110010", "101011110"], j.MULTI_SYMBOLS = {
1778
+ "\0": ["(%)", "U"],
1779
+ "": ["($)", "A"],
1780
+ "": ["($)", "B"],
1781
+ "": ["($)", "C"],
1782
+ "": ["($)", "D"],
1783
+ "": ["($)", "E"],
1784
+ "": ["($)", "F"],
1785
+ "\x07": ["($)", "G"],
1786
+ "\b": ["($)", "H"],
1787
+ " ": ["($)", "I"],
1788
+ "\n": ["($)", "J"],
1789
+ "\v": ["($)", "K"],
1790
+ "\f": ["($)", "L"],
1791
+ "\r": ["($)", "M"],
1792
+ "": ["($)", "N"],
1793
+ "": ["($)", "O"],
1794
+ "": ["($)", "P"],
1795
+ "": ["($)", "Q"],
1796
+ "": ["($)", "R"],
1797
+ "": ["($)", "S"],
1798
+ "": ["($)", "T"],
1799
+ "": ["($)", "U"],
1800
+ "": ["($)", "V"],
1801
+ "": ["($)", "W"],
1802
+ "": ["($)", "X"],
1803
+ "": ["($)", "Y"],
1804
+ "": ["($)", "Z"],
1805
+ "\x1B": ["(%)", "A"],
1806
+ "": ["(%)", "B"],
1807
+ "": ["(%)", "C"],
1808
+ "": ["(%)", "D"],
1809
+ "": ["(%)", "E"],
1810
+ "!": ["(/)", "A"],
1811
+ '"': ["(/)", "B"],
1812
+ "#": ["(/)", "C"],
1813
+ "&": ["(/)", "F"],
1814
+ "'": ["(/)", "G"],
1815
+ "(": ["(/)", "H"],
1816
+ ")": ["(/)", "I"],
1817
+ "*": ["(/)", "J"],
1818
+ ",": ["(/)", "L"],
1819
+ ":": ["(/)", "Z"],
1820
+ ";": ["(%)", "F"],
1821
+ "<": ["(%)", "G"],
1822
+ "=": ["(%)", "H"],
1823
+ ">": ["(%)", "I"],
1824
+ "?": ["(%)", "J"],
1825
+ "@": ["(%)", "V"],
1826
+ "[": ["(%)", "K"],
1827
+ "\\": ["(%)", "L"],
1828
+ "]": ["(%)", "M"],
1829
+ "^": ["(%)", "N"],
1830
+ _: ["(%)", "O"],
1831
+ "`": ["(%)", "W"],
1832
+ a: ["(+)", "A"],
1833
+ b: ["(+)", "B"],
1834
+ c: ["(+)", "C"],
1835
+ d: ["(+)", "D"],
1836
+ e: ["(+)", "E"],
1837
+ f: ["(+)", "F"],
1838
+ g: ["(+)", "G"],
1839
+ h: ["(+)", "H"],
1840
+ i: ["(+)", "I"],
1841
+ j: ["(+)", "J"],
1842
+ k: ["(+)", "K"],
1843
+ l: ["(+)", "L"],
1844
+ m: ["(+)", "M"],
1845
+ n: ["(+)", "N"],
1846
+ o: ["(+)", "O"],
1847
+ p: ["(+)", "P"],
1848
+ q: ["(+)", "Q"],
1849
+ r: ["(+)", "R"],
1850
+ s: ["(+)", "S"],
1851
+ t: ["(+)", "T"],
1852
+ u: ["(+)", "U"],
1853
+ v: ["(+)", "V"],
1854
+ w: ["(+)", "W"],
1855
+ x: ["(+)", "X"],
1856
+ y: ["(+)", "Y"],
1857
+ z: ["(+)", "Z"],
1858
+ "{": ["(%)", "P"],
1859
+ "|": ["(%)", "Q"],
1860
+ "}": ["(%)", "R"],
1861
+ "~": ["(%)", "S"],
1862
+ "": ["(%)", "T"]
1863
+ }), j;
1864
+ }
1865
+ var Ot;
1866
+ function Ft() {
1867
+ if (Ot) return ge;
1868
+ Ot = 1, Object.defineProperty(ge, "__esModule", {
1869
+ value: !0
1870
+ });
1871
+ var s = /* @__PURE__ */ function() {
1872
+ function e(t, n) {
1873
+ for (var r = 0; r < n.length; r++) {
1874
+ var i = n[r];
1875
+ i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);
1876
+ }
1877
+ }
1878
+ return function(t, n, r) {
1879
+ return n && e(t.prototype, n), r && e(t, r), t;
1880
+ };
1881
+ }(), d = br(), v = T(), c = h(v);
1882
+ function h(e) {
1883
+ return e && e.__esModule ? e : { default: e };
1884
+ }
1885
+ function _(e, t) {
1886
+ if (!(e instanceof t))
1887
+ throw new TypeError("Cannot call a class as a function");
1888
+ }
1889
+ function l(e, t) {
1890
+ if (!e)
1891
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1892
+ return t && (typeof t == "object" || typeof t == "function") ? t : e;
1893
+ }
1894
+ function f(e, t) {
1895
+ if (typeof t != "function" && t !== null)
1896
+ throw new TypeError("Super expression must either be null or a function, not " + typeof t);
1897
+ e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
1898
+ }
1899
+ var a = function(e) {
1900
+ f(t, e);
1901
+ function t(n, r) {
1902
+ return _(this, t), l(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, n, r));
1903
+ }
1904
+ return s(t, [{
1905
+ key: "valid",
1906
+ value: function() {
1907
+ return /^[0-9A-Z\-. $/+%]+$/.test(this.data);
1908
+ }
1909
+ }, {
1910
+ key: "encode",
1911
+ value: function() {
1912
+ var r = this.data.split("").flatMap(function(y) {
1913
+ return d.MULTI_SYMBOLS[y] || y;
1914
+ }), i = r.map(function(y) {
1915
+ return t.getEncoding(y);
1916
+ }).join(""), u = t.checksum(r, 20), o = t.checksum(r.concat(u), 15);
1917
+ return {
1918
+ text: this.text,
1919
+ data: (
1920
+ // Add the start bits
1921
+ t.getEncoding("ÿ") + // Add the encoded bits
1922
+ i + // Add the checksum
1923
+ t.getEncoding(u) + t.getEncoding(o) + // Add the stop bits
1924
+ t.getEncoding("ÿ") + // Add the termination bit
1925
+ "1"
1926
+ )
1927
+ };
1928
+ }
1929
+ // Get the binary encoding of a symbol
1930
+ }], [{
1931
+ key: "getEncoding",
1932
+ value: function(r) {
1933
+ return d.BINARIES[t.symbolValue(r)];
1934
+ }
1935
+ // Get the symbol for a symbol value
1936
+ }, {
1937
+ key: "getSymbol",
1938
+ value: function(r) {
1939
+ return d.SYMBOLS[r];
1940
+ }
1941
+ // Get the symbol value of a symbol
1942
+ }, {
1943
+ key: "symbolValue",
1944
+ value: function(r) {
1945
+ return d.SYMBOLS.indexOf(r);
1946
+ }
1947
+ // Calculate a checksum symbol
1948
+ }, {
1949
+ key: "checksum",
1950
+ value: function(r, i) {
1951
+ var u = r.slice().reverse().reduce(function(o, y, p) {
1952
+ var g = p % i + 1;
1953
+ return o + t.symbolValue(y) * g;
1954
+ }, 0);
1955
+ return t.getSymbol(u % 47);
1956
+ }
1957
+ }]), t;
1958
+ }(c.default);
1959
+ return ge.default = a, ge;
1960
+ }
1961
+ var Oe = {}, Et;
1962
+ function mr() {
1963
+ if (Et) return Oe;
1964
+ Et = 1, Object.defineProperty(Oe, "__esModule", {
1965
+ value: !0
1966
+ });
1967
+ var s = /* @__PURE__ */ function() {
1968
+ function a(e, t) {
1969
+ for (var n = 0; n < t.length; n++) {
1970
+ var r = t[n];
1971
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
1972
+ }
1973
+ }
1974
+ return function(e, t, n) {
1975
+ return t && a(e.prototype, t), n && a(e, n), e;
1976
+ };
1977
+ }(), d = Ft(), v = c(d);
1978
+ function c(a) {
1979
+ return a && a.__esModule ? a : { default: a };
1980
+ }
1981
+ function h(a, e) {
1982
+ if (!(a instanceof e))
1983
+ throw new TypeError("Cannot call a class as a function");
1984
+ }
1985
+ function _(a, e) {
1986
+ if (!a)
1987
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1988
+ return e && (typeof e == "object" || typeof e == "function") ? e : a;
1989
+ }
1990
+ function l(a, e) {
1991
+ if (typeof e != "function" && e !== null)
1992
+ throw new TypeError("Super expression must either be null or a function, not " + typeof e);
1993
+ a.prototype = Object.create(e && e.prototype, { constructor: { value: a, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(a, e) : a.__proto__ = e);
1994
+ }
1995
+ var f = function(a) {
1996
+ l(e, a);
1997
+ function e(t, n) {
1998
+ return h(this, e), _(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n));
1999
+ }
2000
+ return s(e, [{
2001
+ key: "valid",
2002
+ value: function() {
2003
+ return /^[\x00-\x7f]+$/.test(this.data);
2004
+ }
2005
+ }]), e;
2006
+ }(v.default);
2007
+ return Oe.default = f, Oe;
2008
+ }
2009
+ var bt;
2010
+ function wr() {
2011
+ if (bt) return q;
2012
+ bt = 1, Object.defineProperty(q, "__esModule", {
2013
+ value: !0
2014
+ }), q.CODE93FullASCII = q.CODE93 = void 0;
2015
+ var s = Ft(), d = h(s), v = mr(), c = h(v);
2016
+ function h(_) {
2017
+ return _ && _.__esModule ? _ : { default: _ };
2018
+ }
2019
+ return q.CODE93 = d.default, q.CODE93FullASCII = c.default, q;
2020
+ }
2021
+ var U = {}, mt;
2022
+ function Sr() {
2023
+ if (mt) return U;
2024
+ mt = 1, Object.defineProperty(U, "__esModule", {
2025
+ value: !0
2026
+ }), U.GenericBarcode = void 0;
2027
+ var s = /* @__PURE__ */ function() {
2028
+ function a(e, t) {
2029
+ for (var n = 0; n < t.length; n++) {
2030
+ var r = t[n];
2031
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
2032
+ }
2033
+ }
2034
+ return function(e, t, n) {
2035
+ return t && a(e.prototype, t), n && a(e, n), e;
2036
+ };
2037
+ }(), d = T(), v = c(d);
2038
+ function c(a) {
2039
+ return a && a.__esModule ? a : { default: a };
2040
+ }
2041
+ function h(a, e) {
2042
+ if (!(a instanceof e))
2043
+ throw new TypeError("Cannot call a class as a function");
2044
+ }
2045
+ function _(a, e) {
2046
+ if (!a)
2047
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2048
+ return e && (typeof e == "object" || typeof e == "function") ? e : a;
2049
+ }
2050
+ function l(a, e) {
2051
+ if (typeof e != "function" && e !== null)
2052
+ throw new TypeError("Super expression must either be null or a function, not " + typeof e);
2053
+ a.prototype = Object.create(e && e.prototype, { constructor: { value: a, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(a, e) : a.__proto__ = e);
2054
+ }
2055
+ var f = function(a) {
2056
+ l(e, a);
2057
+ function e(t, n) {
2058
+ return h(this, e), _(this, (e.__proto__ || Object.getPrototypeOf(e)).call(this, t, n));
2059
+ }
2060
+ return s(e, [{
2061
+ key: "encode",
2062
+ value: function() {
2063
+ return {
2064
+ data: "10101010101010101010101010101010101010101",
2065
+ text: this.text
2066
+ };
2067
+ }
2068
+ // Resturn true/false if the string provided is valid for this encoder
2069
+ }, {
2070
+ key: "valid",
2071
+ value: function() {
2072
+ return !0;
2073
+ }
2074
+ }]), e;
2075
+ }(v.default);
2076
+ return U.GenericBarcode = f, U;
2077
+ }
2078
+ var wt;
2079
+ function xr() {
2080
+ if (wt) return Q;
2081
+ wt = 1, Object.defineProperty(Q, "__esModule", {
2082
+ value: !0
2083
+ });
2084
+ var s = Zt(), d = ir(), v = lr(), c = vr(), h = gr(), _ = Or(), l = Er(), f = wr(), a = Sr();
2085
+ return Q.default = {
2086
+ CODE39: s.CODE39,
2087
+ CODE128: d.CODE128,
2088
+ CODE128A: d.CODE128A,
2089
+ CODE128B: d.CODE128B,
2090
+ CODE128C: d.CODE128C,
2091
+ EAN13: v.EAN13,
2092
+ EAN8: v.EAN8,
2093
+ EAN5: v.EAN5,
2094
+ EAN2: v.EAN2,
2095
+ UPC: v.UPC,
2096
+ UPCE: v.UPCE,
2097
+ ITF14: c.ITF14,
2098
+ ITF: c.ITF,
2099
+ MSI: h.MSI,
2100
+ MSI10: h.MSI10,
2101
+ MSI11: h.MSI11,
2102
+ MSI1010: h.MSI1010,
2103
+ MSI1110: h.MSI1110,
2104
+ pharmacode: _.pharmacode,
2105
+ codabar: l.codabar,
2106
+ CODE93: f.CODE93,
2107
+ CODE93FullASCII: f.CODE93FullASCII,
2108
+ GenericBarcode: a.GenericBarcode
2109
+ }, Q;
2110
+ }
2111
+ var Ee = {}, St;
2112
+ function qe() {
2113
+ if (St) return Ee;
2114
+ St = 1, Object.defineProperty(Ee, "__esModule", {
2115
+ value: !0
2116
+ });
2117
+ var s = Object.assign || function(d) {
2118
+ for (var v = 1; v < arguments.length; v++) {
2119
+ var c = arguments[v];
2120
+ for (var h in c)
2121
+ Object.prototype.hasOwnProperty.call(c, h) && (d[h] = c[h]);
2122
+ }
2123
+ return d;
2124
+ };
2125
+ return Ee.default = function(d, v) {
2126
+ return s({}, d, v);
2127
+ }, Ee;
2128
+ }
2129
+ var be = {}, xt;
2130
+ function Rr() {
2131
+ if (xt) return be;
2132
+ xt = 1, Object.defineProperty(be, "__esModule", {
2133
+ value: !0
2134
+ }), be.default = s;
2135
+ function s(d) {
2136
+ var v = [];
2137
+ function c(h) {
2138
+ if (Array.isArray(h))
2139
+ for (var _ = 0; _ < h.length; _++)
2140
+ c(h[_]);
2141
+ else
2142
+ h.text = h.text || "", h.data = h.data || "", v.push(h);
2143
+ }
2144
+ return c(d), v;
2145
+ }
2146
+ return be;
2147
+ }
2148
+ var me = {}, Rt;
2149
+ function Ar() {
2150
+ if (Rt) return me;
2151
+ Rt = 1, Object.defineProperty(me, "__esModule", {
2152
+ value: !0
2153
+ }), me.default = s;
2154
+ function s(d) {
2155
+ return d.marginTop = d.marginTop || d.margin, d.marginBottom = d.marginBottom || d.margin, d.marginRight = d.marginRight || d.margin, d.marginLeft = d.marginLeft || d.margin, d;
2156
+ }
2157
+ return me;
2158
+ }
2159
+ var we = {}, Se = {}, xe = {}, At;
2160
+ function Ht() {
2161
+ if (At) return xe;
2162
+ At = 1, Object.defineProperty(xe, "__esModule", {
2163
+ value: !0
2164
+ }), xe.default = s;
2165
+ function s(d) {
2166
+ var v = ["width", "height", "textMargin", "fontSize", "margin", "marginTop", "marginBottom", "marginLeft", "marginRight"];
2167
+ for (var c in v)
2168
+ v.hasOwnProperty(c) && (c = v[c], typeof d[c] == "string" && (d[c] = parseInt(d[c], 10)));
2169
+ return typeof d.displayValue == "string" && (d.displayValue = d.displayValue != "false"), d;
2170
+ }
2171
+ return xe;
2172
+ }
2173
+ var Re = {}, Pt;
2174
+ function Ut() {
2175
+ if (Pt) return Re;
2176
+ Pt = 1, Object.defineProperty(Re, "__esModule", {
2177
+ value: !0
2178
+ });
2179
+ var s = {
2180
+ width: 2,
2181
+ height: 100,
2182
+ format: "auto",
2183
+ displayValue: !0,
2184
+ fontOptions: "",
2185
+ font: "monospace",
2186
+ text: void 0,
2187
+ textAlign: "center",
2188
+ textPosition: "bottom",
2189
+ textMargin: 2,
2190
+ fontSize: 20,
2191
+ background: "#ffffff",
2192
+ lineColor: "#000000",
2193
+ margin: 10,
2194
+ marginTop: void 0,
2195
+ marginBottom: void 0,
2196
+ marginLeft: void 0,
2197
+ marginRight: void 0,
2198
+ valid: function() {
2199
+ }
2200
+ };
2201
+ return Re.default = s, Re;
2202
+ }
2203
+ var Tt;
2204
+ function Pr() {
2205
+ if (Tt) return Se;
2206
+ Tt = 1, Object.defineProperty(Se, "__esModule", {
2207
+ value: !0
2208
+ });
2209
+ var s = Ht(), d = h(s), v = Ut(), c = h(v);
2210
+ function h(l) {
2211
+ return l && l.__esModule ? l : { default: l };
2212
+ }
2213
+ function _(l) {
2214
+ var f = {};
2215
+ for (var a in c.default)
2216
+ c.default.hasOwnProperty(a) && (l.hasAttribute("jsbarcode-" + a.toLowerCase()) && (f[a] = l.getAttribute("jsbarcode-" + a.toLowerCase())), l.hasAttribute("data-" + a.toLowerCase()) && (f[a] = l.getAttribute("data-" + a.toLowerCase())));
2217
+ return f.value = l.getAttribute("jsbarcode-value") || l.getAttribute("data-value"), f = (0, d.default)(f), f;
2218
+ }
2219
+ return Se.default = _, Se;
2220
+ }
2221
+ var Ae = {}, Pe = {}, P = {}, Mt;
2222
+ function zt() {
2223
+ if (Mt) return P;
2224
+ Mt = 1, Object.defineProperty(P, "__esModule", {
2225
+ value: !0
2226
+ }), P.getTotalWidthOfEncodings = P.calculateEncodingAttributes = P.getBarcodePadding = P.getEncodingHeight = P.getMaximumHeightOfEncodings = void 0;
2227
+ var s = qe(), d = v(s);
2228
+ function v(e) {
2229
+ return e && e.__esModule ? e : { default: e };
2230
+ }
2231
+ function c(e, t) {
2232
+ return t.height + (t.displayValue && e.text.length > 0 ? t.fontSize + t.textMargin : 0) + t.marginTop + t.marginBottom;
2233
+ }
2234
+ function h(e, t, n) {
2235
+ if (n.displayValue && t < e) {
2236
+ if (n.textAlign == "center")
2237
+ return Math.floor((e - t) / 2);
2238
+ if (n.textAlign == "left")
2239
+ return 0;
2240
+ if (n.textAlign == "right")
2241
+ return Math.floor(e - t);
2242
+ }
2243
+ return 0;
2244
+ }
2245
+ function _(e, t, n) {
2246
+ for (var r = 0; r < e.length; r++) {
2247
+ var i = e[r], u = (0, d.default)(t, i.options), o;
2248
+ u.displayValue ? o = a(i.text, u, n) : o = 0;
2249
+ var y = i.data.length * u.width;
2250
+ i.width = Math.ceil(Math.max(o, y)), i.height = c(i, u), i.barcodePadding = h(o, y, u);
2251
+ }
2252
+ }
2253
+ function l(e) {
2254
+ for (var t = 0, n = 0; n < e.length; n++)
2255
+ t += e[n].width;
2256
+ return t;
2257
+ }
2258
+ function f(e) {
2259
+ for (var t = 0, n = 0; n < e.length; n++)
2260
+ e[n].height > t && (t = e[n].height);
2261
+ return t;
2262
+ }
2263
+ function a(e, t, n) {
2264
+ var r;
2265
+ if (n)
2266
+ r = n;
2267
+ else if (typeof document < "u")
2268
+ r = document.createElement("canvas").getContext("2d");
2269
+ else
2270
+ return 0;
2271
+ r.font = t.fontOptions + " " + t.fontSize + "px " + t.font;
2272
+ var i = r.measureText(e);
2273
+ if (!i)
2274
+ return 0;
2275
+ var u = i.width;
2276
+ return u;
2277
+ }
2278
+ return P.getMaximumHeightOfEncodings = f, P.getEncodingHeight = c, P.getBarcodePadding = h, P.calculateEncodingAttributes = _, P.getTotalWidthOfEncodings = l, P;
2279
+ }
2280
+ var It;
2281
+ function Tr() {
2282
+ if (It) return Pe;
2283
+ It = 1, Object.defineProperty(Pe, "__esModule", {
2284
+ value: !0
2285
+ });
2286
+ var s = /* @__PURE__ */ function() {
2287
+ function f(a, e) {
2288
+ for (var t = 0; t < e.length; t++) {
2289
+ var n = e[t];
2290
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(a, n.key, n);
2291
+ }
2292
+ }
2293
+ return function(a, e, t) {
2294
+ return e && f(a.prototype, e), t && f(a, t), a;
2295
+ };
2296
+ }(), d = qe(), v = h(d), c = zt();
2297
+ function h(f) {
2298
+ return f && f.__esModule ? f : { default: f };
2299
+ }
2300
+ function _(f, a) {
2301
+ if (!(f instanceof a))
2302
+ throw new TypeError("Cannot call a class as a function");
2303
+ }
2304
+ var l = function() {
2305
+ function f(a, e, t) {
2306
+ _(this, f), this.canvas = a, this.encodings = e, this.options = t;
2307
+ }
2308
+ return s(f, [{
2309
+ key: "render",
2310
+ value: function() {
2311
+ if (!this.canvas.getContext)
2312
+ throw new Error("The browser does not support canvas.");
2313
+ this.prepareCanvas();
2314
+ for (var e = 0; e < this.encodings.length; e++) {
2315
+ var t = (0, v.default)(this.options, this.encodings[e].options);
2316
+ this.drawCanvasBarcode(t, this.encodings[e]), this.drawCanvasText(t, this.encodings[e]), this.moveCanvasDrawing(this.encodings[e]);
2317
+ }
2318
+ this.restoreCanvas();
2319
+ }
2320
+ }, {
2321
+ key: "prepareCanvas",
2322
+ value: function() {
2323
+ var e = this.canvas.getContext("2d");
2324
+ e.save(), (0, c.calculateEncodingAttributes)(this.encodings, this.options, e);
2325
+ var t = (0, c.getTotalWidthOfEncodings)(this.encodings), n = (0, c.getMaximumHeightOfEncodings)(this.encodings);
2326
+ this.canvas.width = t + this.options.marginLeft + this.options.marginRight, this.canvas.height = n, e.clearRect(0, 0, this.canvas.width, this.canvas.height), this.options.background && (e.fillStyle = this.options.background, e.fillRect(0, 0, this.canvas.width, this.canvas.height)), e.translate(this.options.marginLeft, 0);
2327
+ }
2328
+ }, {
2329
+ key: "drawCanvasBarcode",
2330
+ value: function(e, t) {
2331
+ var n = this.canvas.getContext("2d"), r = t.data, i;
2332
+ e.textPosition == "top" ? i = e.marginTop + e.fontSize + e.textMargin : i = e.marginTop, n.fillStyle = e.lineColor;
2333
+ for (var u = 0; u < r.length; u++) {
2334
+ var o = u * e.width + t.barcodePadding;
2335
+ r[u] === "1" ? n.fillRect(o, i, e.width, e.height) : r[u] && n.fillRect(o, i, e.width, e.height * r[u]);
2336
+ }
2337
+ }
2338
+ }, {
2339
+ key: "drawCanvasText",
2340
+ value: function(e, t) {
2341
+ var n = this.canvas.getContext("2d"), r = e.fontOptions + " " + e.fontSize + "px " + e.font;
2342
+ if (e.displayValue) {
2343
+ var i, u;
2344
+ e.textPosition == "top" ? u = e.marginTop + e.fontSize - e.textMargin : u = e.height + e.textMargin + e.marginTop + e.fontSize, n.font = r, e.textAlign == "left" || t.barcodePadding > 0 ? (i = 0, n.textAlign = "left") : e.textAlign == "right" ? (i = t.width - 1, n.textAlign = "right") : (i = t.width / 2, n.textAlign = "center"), n.fillText(t.text, i, u);
2345
+ }
2346
+ }
2347
+ }, {
2348
+ key: "moveCanvasDrawing",
2349
+ value: function(e) {
2350
+ var t = this.canvas.getContext("2d");
2351
+ t.translate(e.width, 0);
2352
+ }
2353
+ }, {
2354
+ key: "restoreCanvas",
2355
+ value: function() {
2356
+ var e = this.canvas.getContext("2d");
2357
+ e.restore();
2358
+ }
2359
+ }]), f;
2360
+ }();
2361
+ return Pe.default = l, Pe;
2362
+ }
2363
+ var Te = {}, Dt;
2364
+ function Mr() {
2365
+ if (Dt) return Te;
2366
+ Dt = 1, Object.defineProperty(Te, "__esModule", {
2367
+ value: !0
2368
+ });
2369
+ var s = /* @__PURE__ */ function() {
2370
+ function a(e, t) {
2371
+ for (var n = 0; n < t.length; n++) {
2372
+ var r = t[n];
2373
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
2374
+ }
2375
+ }
2376
+ return function(e, t, n) {
2377
+ return t && a(e.prototype, t), n && a(e, n), e;
2378
+ };
2379
+ }(), d = qe(), v = h(d), c = zt();
2380
+ function h(a) {
2381
+ return a && a.__esModule ? a : { default: a };
2382
+ }
2383
+ function _(a, e) {
2384
+ if (!(a instanceof e))
2385
+ throw new TypeError("Cannot call a class as a function");
2386
+ }
2387
+ var l = "http://www.w3.org/2000/svg", f = function() {
2388
+ function a(e, t, n) {
2389
+ _(this, a), this.svg = e, this.encodings = t, this.options = n, this.document = n.xmlDocument || document;
2390
+ }
2391
+ return s(a, [{
2392
+ key: "render",
2393
+ value: function() {
2394
+ var t = this.options.marginLeft;
2395
+ this.prepareSVG();
2396
+ for (var n = 0; n < this.encodings.length; n++) {
2397
+ var r = this.encodings[n], i = (0, v.default)(this.options, r.options), u = this.createGroup(t, i.marginTop, this.svg);
2398
+ this.setGroupOptions(u, i), this.drawSvgBarcode(u, i, r), this.drawSVGText(u, i, r), t += r.width;
2399
+ }
2400
+ }
2401
+ }, {
2402
+ key: "prepareSVG",
2403
+ value: function() {
2404
+ for (; this.svg.firstChild; )
2405
+ this.svg.removeChild(this.svg.firstChild);
2406
+ (0, c.calculateEncodingAttributes)(this.encodings, this.options);
2407
+ var t = (0, c.getTotalWidthOfEncodings)(this.encodings), n = (0, c.getMaximumHeightOfEncodings)(this.encodings), r = t + this.options.marginLeft + this.options.marginRight;
2408
+ this.setSvgAttributes(r, n), this.options.background && this.drawRect(0, 0, r, n, this.svg).setAttribute("fill", this.options.background);
2409
+ }
2410
+ }, {
2411
+ key: "drawSvgBarcode",
2412
+ value: function(t, n, r) {
2413
+ var i = r.data, u;
2414
+ n.textPosition == "top" ? u = n.fontSize + n.textMargin : u = 0;
2415
+ for (var o = 0, y = 0, p = 0; p < i.length; p++)
2416
+ y = p * n.width + r.barcodePadding, i[p] === "1" ? o++ : o > 0 && (this.drawRect(y - n.width * o, u, n.width * o, n.height, t), o = 0);
2417
+ o > 0 && this.drawRect(y - n.width * (o - 1), u, n.width * o, n.height, t);
2418
+ }
2419
+ }, {
2420
+ key: "drawSVGText",
2421
+ value: function(t, n, r) {
2422
+ var i = this.document.createElementNS(l, "text");
2423
+ if (n.displayValue) {
2424
+ var u, o;
2425
+ i.setAttribute("font-family", n.font), i.setAttribute("font-size", n.fontSize), n.fontOptions.includes("bold") && i.setAttribute("font-weight", "bold"), n.fontOptions.includes("italic") && i.setAttribute("font-style", "italic"), n.textPosition == "top" ? o = n.fontSize - n.textMargin : o = n.height + n.textMargin + n.fontSize, n.textAlign == "left" || r.barcodePadding > 0 ? (u = 0, i.setAttribute("text-anchor", "start")) : n.textAlign == "right" ? (u = r.width - 1, i.setAttribute("text-anchor", "end")) : (u = r.width / 2, i.setAttribute("text-anchor", "middle")), i.setAttribute("x", u), i.setAttribute("y", o), i.appendChild(this.document.createTextNode(r.text)), t.appendChild(i);
2426
+ }
2427
+ }
2428
+ }, {
2429
+ key: "setSvgAttributes",
2430
+ value: function(t, n) {
2431
+ var r = this.svg;
2432
+ r.setAttribute("width", t + "px"), r.setAttribute("height", n + "px"), r.setAttribute("x", "0px"), r.setAttribute("y", "0px"), r.setAttribute("viewBox", "0 0 " + t + " " + n), r.setAttribute("xmlns", l), r.setAttribute("version", "1.1");
2433
+ }
2434
+ }, {
2435
+ key: "createGroup",
2436
+ value: function(t, n, r) {
2437
+ var i = this.document.createElementNS(l, "g");
2438
+ return i.setAttribute("transform", "translate(" + t + ", " + n + ")"), r.appendChild(i), i;
2439
+ }
2440
+ }, {
2441
+ key: "setGroupOptions",
2442
+ value: function(t, n) {
2443
+ t.setAttribute("fill", n.lineColor);
2444
+ }
2445
+ }, {
2446
+ key: "drawRect",
2447
+ value: function(t, n, r, i, u) {
2448
+ var o = this.document.createElementNS(l, "rect");
2449
+ return o.setAttribute("x", t), o.setAttribute("y", n), o.setAttribute("width", r), o.setAttribute("height", i), u.appendChild(o), o;
2450
+ }
2451
+ }]), a;
2452
+ }();
2453
+ return Te.default = f, Te;
2454
+ }
2455
+ var Me = {}, kt;
2456
+ function Ir() {
2457
+ if (kt) return Me;
2458
+ kt = 1, Object.defineProperty(Me, "__esModule", {
2459
+ value: !0
2460
+ });
2461
+ var s = /* @__PURE__ */ function() {
2462
+ function c(h, _) {
2463
+ for (var l = 0; l < _.length; l++) {
2464
+ var f = _[l];
2465
+ f.enumerable = f.enumerable || !1, f.configurable = !0, "value" in f && (f.writable = !0), Object.defineProperty(h, f.key, f);
2466
+ }
2467
+ }
2468
+ return function(h, _, l) {
2469
+ return _ && c(h.prototype, _), l && c(h, l), h;
2470
+ };
2471
+ }();
2472
+ function d(c, h) {
2473
+ if (!(c instanceof h))
2474
+ throw new TypeError("Cannot call a class as a function");
2475
+ }
2476
+ var v = function() {
2477
+ function c(h, _, l) {
2478
+ d(this, c), this.object = h, this.encodings = _, this.options = l;
2479
+ }
2480
+ return s(c, [{
2481
+ key: "render",
2482
+ value: function() {
2483
+ this.object.encodings = this.encodings;
2484
+ }
2485
+ }]), c;
2486
+ }();
2487
+ return Me.default = v, Me;
2488
+ }
2489
+ var qt;
2490
+ function Dr() {
2491
+ if (qt) return Ae;
2492
+ qt = 1, Object.defineProperty(Ae, "__esModule", {
2493
+ value: !0
2494
+ });
2495
+ var s = Tr(), d = l(s), v = Mr(), c = l(v), h = Ir(), _ = l(h);
2496
+ function l(f) {
2497
+ return f && f.__esModule ? f : { default: f };
2498
+ }
2499
+ return Ae.default = { CanvasRenderer: d.default, SVGRenderer: c.default, ObjectRenderer: _.default }, Ae;
2500
+ }
2501
+ var L = {}, Ct;
2502
+ function Xt() {
2503
+ if (Ct) return L;
2504
+ Ct = 1, Object.defineProperty(L, "__esModule", {
2505
+ value: !0
2506
+ });
2507
+ function s(l, f) {
2508
+ if (!(l instanceof f))
2509
+ throw new TypeError("Cannot call a class as a function");
2510
+ }
2511
+ function d(l, f) {
2512
+ if (!l)
2513
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2514
+ return f && (typeof f == "object" || typeof f == "function") ? f : l;
2515
+ }
2516
+ function v(l, f) {
2517
+ if (typeof f != "function" && f !== null)
2518
+ throw new TypeError("Super expression must either be null or a function, not " + typeof f);
2519
+ l.prototype = Object.create(f && f.prototype, { constructor: { value: l, enumerable: !1, writable: !0, configurable: !0 } }), f && (Object.setPrototypeOf ? Object.setPrototypeOf(l, f) : l.__proto__ = f);
2520
+ }
2521
+ var c = function(l) {
2522
+ v(f, l);
2523
+ function f(a, e) {
2524
+ s(this, f);
2525
+ var t = d(this, (f.__proto__ || Object.getPrototypeOf(f)).call(this));
2526
+ return t.name = "InvalidInputException", t.symbology = a, t.input = e, t.message = '"' + t.input + '" is not a valid input for ' + t.symbology, t;
2527
+ }
2528
+ return f;
2529
+ }(Error), h = function(l) {
2530
+ v(f, l);
2531
+ function f() {
2532
+ s(this, f);
2533
+ var a = d(this, (f.__proto__ || Object.getPrototypeOf(f)).call(this));
2534
+ return a.name = "InvalidElementException", a.message = "Not supported type to render on", a;
2535
+ }
2536
+ return f;
2537
+ }(Error), _ = function(l) {
2538
+ v(f, l);
2539
+ function f() {
2540
+ s(this, f);
2541
+ var a = d(this, (f.__proto__ || Object.getPrototypeOf(f)).call(this));
2542
+ return a.name = "NoElementException", a.message = "No element to render on.", a;
2543
+ }
2544
+ return f;
2545
+ }(Error);
2546
+ return L.InvalidInputException = c, L.InvalidElementException = h, L.NoElementException = _, L;
2547
+ }
2548
+ var Bt;
2549
+ function kr() {
2550
+ if (Bt) return we;
2551
+ Bt = 1, Object.defineProperty(we, "__esModule", {
2552
+ value: !0
2553
+ });
2554
+ var s = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
2555
+ return typeof t;
2556
+ } : function(t) {
2557
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
2558
+ }, d = Pr(), v = l(d), c = Dr(), h = l(c), _ = Xt();
2559
+ function l(t) {
2560
+ return t && t.__esModule ? t : { default: t };
2561
+ }
2562
+ function f(t) {
2563
+ if (typeof t == "string")
2564
+ return a(t);
2565
+ if (Array.isArray(t)) {
2566
+ for (var n = [], r = 0; r < t.length; r++)
2567
+ n.push(f(t[r]));
2568
+ return n;
2569
+ } else {
2570
+ if (typeof HTMLCanvasElement < "u" && t instanceof HTMLImageElement)
2571
+ return e(t);
2572
+ if (t && t.nodeName && t.nodeName.toLowerCase() === "svg" || typeof SVGElement < "u" && t instanceof SVGElement)
2573
+ return {
2574
+ element: t,
2575
+ options: (0, v.default)(t),
2576
+ renderer: h.default.SVGRenderer
2577
+ };
2578
+ if (typeof HTMLCanvasElement < "u" && t instanceof HTMLCanvasElement)
2579
+ return {
2580
+ element: t,
2581
+ options: (0, v.default)(t),
2582
+ renderer: h.default.CanvasRenderer
2583
+ };
2584
+ if (t && t.getContext)
2585
+ return {
2586
+ element: t,
2587
+ renderer: h.default.CanvasRenderer
2588
+ };
2589
+ if (t && (typeof t > "u" ? "undefined" : s(t)) === "object" && !t.nodeName)
2590
+ return {
2591
+ element: t,
2592
+ renderer: h.default.ObjectRenderer
2593
+ };
2594
+ throw new _.InvalidElementException();
2595
+ }
2596
+ }
2597
+ function a(t) {
2598
+ var n = document.querySelectorAll(t);
2599
+ if (n.length !== 0) {
2600
+ for (var r = [], i = 0; i < n.length; i++)
2601
+ r.push(f(n[i]));
2602
+ return r;
2603
+ }
2604
+ }
2605
+ function e(t) {
2606
+ var n = document.createElement("canvas");
2607
+ return {
2608
+ element: n,
2609
+ options: (0, v.default)(t),
2610
+ renderer: h.default.CanvasRenderer,
2611
+ afterRender: function() {
2612
+ t.setAttribute("src", n.toDataURL());
2613
+ }
2614
+ };
2615
+ }
2616
+ return we.default = f, we;
2617
+ }
2618
+ var Ie = {}, jt;
2619
+ function qr() {
2620
+ if (jt) return Ie;
2621
+ jt = 1, Object.defineProperty(Ie, "__esModule", {
2622
+ value: !0
2623
+ });
2624
+ var s = /* @__PURE__ */ function() {
2625
+ function c(h, _) {
2626
+ for (var l = 0; l < _.length; l++) {
2627
+ var f = _[l];
2628
+ f.enumerable = f.enumerable || !1, f.configurable = !0, "value" in f && (f.writable = !0), Object.defineProperty(h, f.key, f);
2629
+ }
2630
+ }
2631
+ return function(h, _, l) {
2632
+ return _ && c(h.prototype, _), l && c(h, l), h;
2633
+ };
2634
+ }();
2635
+ function d(c, h) {
2636
+ if (!(c instanceof h))
2637
+ throw new TypeError("Cannot call a class as a function");
2638
+ }
2639
+ var v = function() {
2640
+ function c(h) {
2641
+ d(this, c), this.api = h;
2642
+ }
2643
+ return s(c, [{
2644
+ key: "handleCatch",
2645
+ value: function(_) {
2646
+ if (_.name === "InvalidInputException")
2647
+ if (this.api._options.valid !== this.api._defaults.valid)
2648
+ this.api._options.valid(!1);
2649
+ else
2650
+ throw _.message;
2651
+ else
2652
+ throw _;
2653
+ this.api.render = function() {
2654
+ };
2655
+ }
2656
+ }, {
2657
+ key: "wrapBarcodeCall",
2658
+ value: function(_) {
2659
+ try {
2660
+ var l = _.apply(void 0, arguments);
2661
+ return this.api._options.valid(!0), l;
2662
+ } catch (f) {
2663
+ return this.handleCatch(f), this.api;
2664
+ }
2665
+ }
2666
+ }]), c;
2667
+ }();
2668
+ return Ie.default = v, Ie;
2669
+ }
2670
+ var Be, Lt;
2671
+ function Cr() {
2672
+ if (Lt) return Be;
2673
+ Lt = 1;
2674
+ var s = xr(), d = p(s), v = qe(), c = p(v), h = Rr(), _ = p(h), l = Ar(), f = p(l), a = kr(), e = p(a), t = Ht(), n = p(t), r = qr(), i = p(r), u = Xt(), o = Ut(), y = p(o);
2675
+ function p(O) {
2676
+ return O && O.__esModule ? O : { default: O };
2677
+ }
2678
+ var g = function() {
2679
+ }, w = function(b, x, E) {
2680
+ var m = new g();
2681
+ if (typeof b > "u")
2682
+ throw Error("No element to render on was provided.");
2683
+ return m._renderProperties = (0, e.default)(b), m._encodings = [], m._options = y.default, m._errorHandler = new i.default(m), typeof x < "u" && (E = E || {}, E.format || (E.format = Le()), m.options(E)[E.format](x, E).render()), m;
2684
+ };
2685
+ w.getModule = function(O) {
2686
+ return d.default[O];
2687
+ };
2688
+ for (var C in d.default)
2689
+ d.default.hasOwnProperty(C) && Y(d.default, C);
2690
+ function Y(O, b) {
2691
+ g.prototype[b] = g.prototype[b.toUpperCase()] = g.prototype[b.toLowerCase()] = function(x, E) {
2692
+ var m = this;
2693
+ return m._errorHandler.wrapBarcodeCall(function() {
2694
+ E.text = typeof E.text > "u" ? void 0 : "" + E.text;
2695
+ var M = (0, c.default)(m._options, E);
2696
+ M = (0, n.default)(M);
2697
+ var Jt = O[b], Yt = je(x, Jt, M);
2698
+ return m._encodings.push(Yt), m;
2699
+ });
2700
+ };
2701
+ }
2702
+ function je(O, b, x) {
2703
+ O = "" + O;
2704
+ var E = new b(O, x);
2705
+ if (!E.valid())
2706
+ throw new u.InvalidInputException(E.constructor.name, O);
2707
+ var m = E.encode();
2708
+ m = (0, _.default)(m);
2709
+ for (var M = 0; M < m.length; M++)
2710
+ m[M].options = (0, c.default)(x, m[M].options);
2711
+ return m;
2712
+ }
2713
+ function Le() {
2714
+ return d.default.CODE128 ? "CODE128" : Object.keys(d.default)[0];
2715
+ }
2716
+ g.prototype.options = function(O) {
2717
+ return this._options = (0, c.default)(this._options, O), this;
2718
+ }, g.prototype.blank = function(O) {
2719
+ var b = new Array(O + 1).join("0");
2720
+ return this._encodings.push({ data: b }), this;
2721
+ }, g.prototype.init = function() {
2722
+ if (this._renderProperties) {
2723
+ Array.isArray(this._renderProperties) || (this._renderProperties = [this._renderProperties]);
2724
+ var O;
2725
+ for (var b in this._renderProperties) {
2726
+ O = this._renderProperties[b];
2727
+ var x = (0, c.default)(this._options, O.options);
2728
+ x.format == "auto" && (x.format = Le()), this._errorHandler.wrapBarcodeCall(function() {
2729
+ var E = x.value, m = d.default[x.format.toUpperCase()], M = je(E, m, x);
2730
+ Ce(O, M, x);
2731
+ });
2732
+ }
2733
+ }
2734
+ }, g.prototype.render = function() {
2735
+ if (!this._renderProperties)
2736
+ throw new u.NoElementException();
2737
+ if (Array.isArray(this._renderProperties))
2738
+ for (var O = 0; O < this._renderProperties.length; O++)
2739
+ Ce(this._renderProperties[O], this._encodings, this._options);
2740
+ else
2741
+ Ce(this._renderProperties, this._encodings, this._options);
2742
+ return this;
2743
+ }, g.prototype._defaults = y.default;
2744
+ function Ce(O, b, x) {
2745
+ b = (0, _.default)(b);
2746
+ for (var E = 0; E < b.length; E++)
2747
+ b[E].options = (0, c.default)(x, b[E].options), (0, f.default)(b[E].options);
2748
+ (0, f.default)(x);
2749
+ var m = O.renderer, M = new m(O.element, b, x);
2750
+ M.render(), O.afterRender && O.afterRender();
2751
+ }
2752
+ return typeof window < "u" && (window.JsBarcode = w), typeof jQuery < "u" && (jQuery.fn.JsBarcode = function(O, b) {
2753
+ var x = [];
2754
+ return jQuery(this).each(function() {
2755
+ x.push(this);
2756
+ }), w(x, O, b);
2757
+ }), Be = w, Be;
2758
+ }
2759
+ var Vt = Cr();
2760
+ const Br = /* @__PURE__ */ Qt(Vt), Lr = /* @__PURE__ */ Wt({
2761
+ __proto__: null,
2762
+ default: Br
2763
+ }, [Vt]);
2764
+ export {
2765
+ Lr as J
2766
+ };