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