desktop-tool-pl-qrcode 1.0.3 → 1.0.5
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/dist/index.js +1951 -489
- package/package.json +1 -1
- package/src/QRCodePlugin.tsx +13 -2
- package/vite.config.ts +2 -3
package/dist/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
var ne = { exports: {} }, W = {};
|
|
1
|
+
import Ct, { useState as ie, useMemo as dn, useEffect as gn } from "react";
|
|
2
|
+
var xe = { exports: {} }, ae = {};
|
|
4
3
|
/**
|
|
5
4
|
* @license React
|
|
6
5
|
* react-jsx-runtime.production.min.js
|
|
@@ -10,25 +9,25 @@ var ne = { exports: {} }, W = {};
|
|
|
10
9
|
* This source code is licensed under the MIT license found in the
|
|
11
10
|
* LICENSE file in the root directory of this source tree.
|
|
12
11
|
*/
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
function
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
for (
|
|
23
|
-
|
|
24
|
-
if (
|
|
25
|
-
for (
|
|
26
|
-
|
|
27
|
-
return { $$typeof:
|
|
28
|
-
}
|
|
29
|
-
return
|
|
12
|
+
var pt;
|
|
13
|
+
function hn() {
|
|
14
|
+
if (pt)
|
|
15
|
+
return ae;
|
|
16
|
+
pt = 1;
|
|
17
|
+
var t = Ct, e = Symbol.for("react.element"), a = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, o = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
+
function u(c, s, m) {
|
|
19
|
+
var d, _ = {}, g = null, p = null;
|
|
20
|
+
m !== void 0 && (g = "" + m), s.key !== void 0 && (g = "" + s.key), s.ref !== void 0 && (p = s.ref);
|
|
21
|
+
for (d in s)
|
|
22
|
+
r.call(s, d) && !i.hasOwnProperty(d) && (_[d] = s[d]);
|
|
23
|
+
if (c && c.defaultProps)
|
|
24
|
+
for (d in s = c.defaultProps, s)
|
|
25
|
+
_[d] === void 0 && (_[d] = s[d]);
|
|
26
|
+
return { $$typeof: e, type: c, key: g, ref: p, props: _, _owner: o.current };
|
|
27
|
+
}
|
|
28
|
+
return ae.Fragment = a, ae.jsx = u, ae.jsxs = u, ae;
|
|
30
29
|
}
|
|
31
|
-
var
|
|
30
|
+
var se = {};
|
|
32
31
|
/**
|
|
33
32
|
* @license React
|
|
34
33
|
* react-jsx-runtime.development.js
|
|
@@ -38,91 +37,91 @@ var Y = {};
|
|
|
38
37
|
* This source code is licensed under the MIT license found in the
|
|
39
38
|
* LICENSE file in the root directory of this source tree.
|
|
40
39
|
*/
|
|
41
|
-
var
|
|
42
|
-
function
|
|
43
|
-
return
|
|
44
|
-
var
|
|
45
|
-
function
|
|
46
|
-
if (
|
|
40
|
+
var wt;
|
|
41
|
+
function mn() {
|
|
42
|
+
return wt || (wt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
43
|
+
var t = Ct, e = Symbol.for("react.element"), a = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), c = Symbol.for("react.context"), s = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), C = Symbol.iterator, R = "@@iterator";
|
|
44
|
+
function I(n) {
|
|
45
|
+
if (n === null || typeof n != "object")
|
|
47
46
|
return null;
|
|
48
|
-
var
|
|
49
|
-
return typeof
|
|
47
|
+
var l = C && n[C] || n[R];
|
|
48
|
+
return typeof l == "function" ? l : null;
|
|
50
49
|
}
|
|
51
|
-
var
|
|
52
|
-
function
|
|
50
|
+
var h = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
51
|
+
function w(n) {
|
|
53
52
|
{
|
|
54
|
-
for (var
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
for (var l = arguments.length, f = new Array(l > 1 ? l - 1 : 0), E = 1; E < l; E++)
|
|
54
|
+
f[E - 1] = arguments[E];
|
|
55
|
+
v("error", n, f);
|
|
57
56
|
}
|
|
58
57
|
}
|
|
59
|
-
function
|
|
58
|
+
function v(n, l, f) {
|
|
60
59
|
{
|
|
61
|
-
var
|
|
62
|
-
|
|
63
|
-
var
|
|
64
|
-
return String(
|
|
60
|
+
var E = h.ReactDebugCurrentFrame, P = E.getStackAddendum();
|
|
61
|
+
P !== "" && (l += "%s", f = f.concat([P]));
|
|
62
|
+
var N = f.map(function(S) {
|
|
63
|
+
return String(S);
|
|
65
64
|
});
|
|
66
|
-
|
|
65
|
+
N.unshift("Warning: " + l), Function.prototype.apply.call(console[n], console, N);
|
|
67
66
|
}
|
|
68
67
|
}
|
|
69
|
-
var
|
|
70
|
-
|
|
71
|
-
function
|
|
72
|
-
return !!(typeof
|
|
68
|
+
var y = !1, A = !1, B = !1, j = !1, x = !1, q;
|
|
69
|
+
q = Symbol.for("react.module.reference");
|
|
70
|
+
function U(n) {
|
|
71
|
+
return !!(typeof n == "string" || typeof n == "function" || n === r || n === i || x || n === o || n === m || n === d || j || n === p || y || A || B || typeof n == "object" && n !== null && (n.$$typeof === g || n.$$typeof === _ || n.$$typeof === u || n.$$typeof === c || n.$$typeof === s || // This needs to include all possible module reference object
|
|
73
72
|
// types supported by any Flight configuration anywhere since
|
|
74
73
|
// we don't know which Flight build this will end up being used
|
|
75
74
|
// with.
|
|
76
|
-
|
|
75
|
+
n.$$typeof === q || n.getModuleId !== void 0));
|
|
77
76
|
}
|
|
78
|
-
function
|
|
79
|
-
var
|
|
80
|
-
if (
|
|
81
|
-
return
|
|
82
|
-
var
|
|
83
|
-
return
|
|
77
|
+
function K(n, l, f) {
|
|
78
|
+
var E = n.displayName;
|
|
79
|
+
if (E)
|
|
80
|
+
return E;
|
|
81
|
+
var P = l.displayName || l.name || "";
|
|
82
|
+
return P !== "" ? f + "(" + P + ")" : f;
|
|
84
83
|
}
|
|
85
|
-
function
|
|
86
|
-
return
|
|
84
|
+
function W(n) {
|
|
85
|
+
return n.displayName || "Context";
|
|
87
86
|
}
|
|
88
|
-
function
|
|
89
|
-
if (
|
|
87
|
+
function k(n) {
|
|
88
|
+
if (n == null)
|
|
90
89
|
return null;
|
|
91
|
-
if (typeof
|
|
92
|
-
return
|
|
93
|
-
if (typeof
|
|
94
|
-
return
|
|
95
|
-
switch (
|
|
96
|
-
case
|
|
90
|
+
if (typeof n.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof n == "function")
|
|
91
|
+
return n.displayName || n.name || null;
|
|
92
|
+
if (typeof n == "string")
|
|
93
|
+
return n;
|
|
94
|
+
switch (n) {
|
|
95
|
+
case r:
|
|
97
96
|
return "Fragment";
|
|
98
|
-
case
|
|
97
|
+
case a:
|
|
99
98
|
return "Portal";
|
|
100
|
-
case
|
|
99
|
+
case i:
|
|
101
100
|
return "Profiler";
|
|
102
|
-
case
|
|
101
|
+
case o:
|
|
103
102
|
return "StrictMode";
|
|
104
|
-
case
|
|
103
|
+
case m:
|
|
105
104
|
return "Suspense";
|
|
106
|
-
case
|
|
105
|
+
case d:
|
|
107
106
|
return "SuspenseList";
|
|
108
107
|
}
|
|
109
|
-
if (typeof
|
|
110
|
-
switch (
|
|
111
|
-
case
|
|
112
|
-
var
|
|
113
|
-
return
|
|
114
|
-
case
|
|
115
|
-
var
|
|
116
|
-
return
|
|
117
|
-
case
|
|
118
|
-
return
|
|
119
|
-
case
|
|
120
|
-
var
|
|
121
|
-
return
|
|
122
|
-
case
|
|
123
|
-
var
|
|
108
|
+
if (typeof n == "object")
|
|
109
|
+
switch (n.$$typeof) {
|
|
110
|
+
case c:
|
|
111
|
+
var l = n;
|
|
112
|
+
return W(l) + ".Consumer";
|
|
113
|
+
case u:
|
|
114
|
+
var f = n;
|
|
115
|
+
return W(f._context) + ".Provider";
|
|
116
|
+
case s:
|
|
117
|
+
return K(n, n.render, "ForwardRef");
|
|
118
|
+
case _:
|
|
119
|
+
var E = n.displayName || null;
|
|
120
|
+
return E !== null ? E : k(n.type) || "Memo";
|
|
121
|
+
case g: {
|
|
122
|
+
var P = n, N = P._payload, S = P._init;
|
|
124
123
|
try {
|
|
125
|
-
return
|
|
124
|
+
return k(S(N));
|
|
126
125
|
} catch {
|
|
127
126
|
return null;
|
|
128
127
|
}
|
|
@@ -130,715 +129,2178 @@ function hr() {
|
|
|
130
129
|
}
|
|
131
130
|
return null;
|
|
132
131
|
}
|
|
133
|
-
var
|
|
134
|
-
function
|
|
132
|
+
var J = Object.assign, ne = 0, He, We, Ge, Qe, Xe, Ze, et;
|
|
133
|
+
function tt() {
|
|
135
134
|
}
|
|
136
|
-
|
|
137
|
-
function
|
|
135
|
+
tt.__reactDisabledLog = !0;
|
|
136
|
+
function xt() {
|
|
138
137
|
{
|
|
139
|
-
if (
|
|
140
|
-
|
|
141
|
-
var
|
|
138
|
+
if (ne === 0) {
|
|
139
|
+
He = console.log, We = console.info, Ge = console.warn, Qe = console.error, Xe = console.group, Ze = console.groupCollapsed, et = console.groupEnd;
|
|
140
|
+
var n = {
|
|
142
141
|
configurable: !0,
|
|
143
142
|
enumerable: !0,
|
|
144
|
-
value:
|
|
143
|
+
value: tt,
|
|
145
144
|
writable: !0
|
|
146
145
|
};
|
|
147
146
|
Object.defineProperties(console, {
|
|
148
|
-
info:
|
|
149
|
-
log:
|
|
150
|
-
warn:
|
|
151
|
-
error:
|
|
152
|
-
group:
|
|
153
|
-
groupCollapsed:
|
|
154
|
-
groupEnd:
|
|
147
|
+
info: n,
|
|
148
|
+
log: n,
|
|
149
|
+
warn: n,
|
|
150
|
+
error: n,
|
|
151
|
+
group: n,
|
|
152
|
+
groupCollapsed: n,
|
|
153
|
+
groupEnd: n
|
|
155
154
|
});
|
|
156
155
|
}
|
|
157
|
-
|
|
156
|
+
ne++;
|
|
158
157
|
}
|
|
159
158
|
}
|
|
160
|
-
function
|
|
159
|
+
function Ft() {
|
|
161
160
|
{
|
|
162
|
-
if (
|
|
163
|
-
var
|
|
161
|
+
if (ne--, ne === 0) {
|
|
162
|
+
var n = {
|
|
164
163
|
configurable: !0,
|
|
165
164
|
enumerable: !0,
|
|
166
165
|
writable: !0
|
|
167
166
|
};
|
|
168
167
|
Object.defineProperties(console, {
|
|
169
|
-
log:
|
|
170
|
-
value:
|
|
168
|
+
log: J({}, n, {
|
|
169
|
+
value: He
|
|
171
170
|
}),
|
|
172
|
-
info:
|
|
173
|
-
value:
|
|
171
|
+
info: J({}, n, {
|
|
172
|
+
value: We
|
|
174
173
|
}),
|
|
175
|
-
warn:
|
|
176
|
-
value:
|
|
174
|
+
warn: J({}, n, {
|
|
175
|
+
value: Ge
|
|
177
176
|
}),
|
|
178
|
-
error:
|
|
179
|
-
value:
|
|
177
|
+
error: J({}, n, {
|
|
178
|
+
value: Qe
|
|
180
179
|
}),
|
|
181
|
-
group:
|
|
182
|
-
value:
|
|
180
|
+
group: J({}, n, {
|
|
181
|
+
value: Xe
|
|
183
182
|
}),
|
|
184
|
-
groupCollapsed:
|
|
185
|
-
value:
|
|
183
|
+
groupCollapsed: J({}, n, {
|
|
184
|
+
value: Ze
|
|
186
185
|
}),
|
|
187
|
-
groupEnd:
|
|
188
|
-
value:
|
|
186
|
+
groupEnd: J({}, n, {
|
|
187
|
+
value: et
|
|
189
188
|
})
|
|
190
189
|
});
|
|
191
190
|
}
|
|
192
|
-
|
|
191
|
+
ne < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
193
192
|
}
|
|
194
193
|
}
|
|
195
|
-
var
|
|
196
|
-
function
|
|
194
|
+
var Te = h.ReactCurrentDispatcher, _e;
|
|
195
|
+
function de(n, l, f) {
|
|
197
196
|
{
|
|
198
|
-
if (
|
|
197
|
+
if (_e === void 0)
|
|
199
198
|
try {
|
|
200
199
|
throw Error();
|
|
201
|
-
} catch (
|
|
202
|
-
var
|
|
203
|
-
|
|
200
|
+
} catch (P) {
|
|
201
|
+
var E = P.stack.trim().match(/\n( *(at )?)/);
|
|
202
|
+
_e = E && E[1] || "";
|
|
204
203
|
}
|
|
205
204
|
return `
|
|
206
|
-
` +
|
|
205
|
+
` + _e + n;
|
|
207
206
|
}
|
|
208
207
|
}
|
|
209
|
-
var
|
|
208
|
+
var Se = !1, ge;
|
|
210
209
|
{
|
|
211
|
-
var
|
|
212
|
-
|
|
210
|
+
var Ut = typeof WeakMap == "function" ? WeakMap : Map;
|
|
211
|
+
ge = new Ut();
|
|
213
212
|
}
|
|
214
|
-
function
|
|
215
|
-
if (!
|
|
213
|
+
function nt(n, l) {
|
|
214
|
+
if (!n || Se)
|
|
216
215
|
return "";
|
|
217
216
|
{
|
|
218
|
-
var
|
|
219
|
-
if (
|
|
220
|
-
return
|
|
217
|
+
var f = ge.get(n);
|
|
218
|
+
if (f !== void 0)
|
|
219
|
+
return f;
|
|
221
220
|
}
|
|
222
|
-
var
|
|
223
|
-
|
|
224
|
-
var
|
|
221
|
+
var E;
|
|
222
|
+
Se = !0;
|
|
223
|
+
var P = Error.prepareStackTrace;
|
|
225
224
|
Error.prepareStackTrace = void 0;
|
|
226
|
-
var
|
|
227
|
-
|
|
225
|
+
var N;
|
|
226
|
+
N = Te.current, Te.current = null, xt();
|
|
228
227
|
try {
|
|
229
|
-
if (
|
|
230
|
-
var
|
|
228
|
+
if (l) {
|
|
229
|
+
var S = function() {
|
|
231
230
|
throw Error();
|
|
232
231
|
};
|
|
233
|
-
if (Object.defineProperty(
|
|
232
|
+
if (Object.defineProperty(S.prototype, "props", {
|
|
234
233
|
set: function() {
|
|
235
234
|
throw Error();
|
|
236
235
|
}
|
|
237
236
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
238
237
|
try {
|
|
239
|
-
Reflect.construct(
|
|
240
|
-
} catch (
|
|
241
|
-
|
|
238
|
+
Reflect.construct(S, []);
|
|
239
|
+
} catch (O) {
|
|
240
|
+
E = O;
|
|
242
241
|
}
|
|
243
|
-
Reflect.construct(
|
|
242
|
+
Reflect.construct(n, [], S);
|
|
244
243
|
} else {
|
|
245
244
|
try {
|
|
246
|
-
|
|
247
|
-
} catch (
|
|
248
|
-
|
|
245
|
+
S.call();
|
|
246
|
+
} catch (O) {
|
|
247
|
+
E = O;
|
|
249
248
|
}
|
|
250
|
-
|
|
249
|
+
n.call(S.prototype);
|
|
251
250
|
}
|
|
252
251
|
} else {
|
|
253
252
|
try {
|
|
254
253
|
throw Error();
|
|
255
|
-
} catch (
|
|
256
|
-
|
|
254
|
+
} catch (O) {
|
|
255
|
+
E = O;
|
|
257
256
|
}
|
|
258
|
-
|
|
257
|
+
n();
|
|
259
258
|
}
|
|
260
|
-
} catch (
|
|
261
|
-
if (
|
|
262
|
-
for (var
|
|
263
|
-
`),
|
|
264
|
-
`),
|
|
265
|
-
|
|
266
|
-
for (;
|
|
267
|
-
if (
|
|
268
|
-
if (
|
|
259
|
+
} catch (O) {
|
|
260
|
+
if (O && E && typeof O.stack == "string") {
|
|
261
|
+
for (var T = O.stack.split(`
|
|
262
|
+
`), D = E.stack.split(`
|
|
263
|
+
`), M = T.length - 1, L = D.length - 1; M >= 1 && L >= 0 && T[M] !== D[L]; )
|
|
264
|
+
L--;
|
|
265
|
+
for (; M >= 1 && L >= 0; M--, L--)
|
|
266
|
+
if (T[M] !== D[L]) {
|
|
267
|
+
if (M !== 1 || L !== 1)
|
|
269
268
|
do
|
|
270
|
-
if (
|
|
271
|
-
var
|
|
272
|
-
` +
|
|
273
|
-
return
|
|
269
|
+
if (M--, L--, L < 0 || T[M] !== D[L]) {
|
|
270
|
+
var $ = `
|
|
271
|
+
` + T[M].replace(" at new ", " at ");
|
|
272
|
+
return n.displayName && $.includes("<anonymous>") && ($ = $.replace("<anonymous>", n.displayName)), typeof n == "function" && ge.set(n, $), $;
|
|
274
273
|
}
|
|
275
|
-
while (
|
|
274
|
+
while (M >= 1 && L >= 0);
|
|
276
275
|
break;
|
|
277
276
|
}
|
|
278
277
|
}
|
|
279
278
|
} finally {
|
|
280
|
-
|
|
279
|
+
Se = !1, Te.current = N, Ft(), Error.prepareStackTrace = P;
|
|
281
280
|
}
|
|
282
|
-
var
|
|
283
|
-
return typeof
|
|
281
|
+
var Q = n ? n.displayName || n.name : "", H = Q ? de(Q) : "";
|
|
282
|
+
return typeof n == "function" && ge.set(n, H), H;
|
|
284
283
|
}
|
|
285
|
-
function
|
|
286
|
-
return
|
|
284
|
+
function $t(n, l, f) {
|
|
285
|
+
return nt(n, !1);
|
|
287
286
|
}
|
|
288
|
-
function
|
|
289
|
-
var
|
|
290
|
-
return !!(
|
|
287
|
+
function qt(n) {
|
|
288
|
+
var l = n.prototype;
|
|
289
|
+
return !!(l && l.isReactComponent);
|
|
291
290
|
}
|
|
292
|
-
function
|
|
293
|
-
if (
|
|
291
|
+
function he(n, l, f) {
|
|
292
|
+
if (n == null)
|
|
294
293
|
return "";
|
|
295
|
-
if (typeof
|
|
296
|
-
return
|
|
297
|
-
if (typeof
|
|
298
|
-
return
|
|
299
|
-
switch (
|
|
300
|
-
case
|
|
301
|
-
return
|
|
302
|
-
case
|
|
303
|
-
return
|
|
304
|
-
}
|
|
305
|
-
if (typeof
|
|
306
|
-
switch (
|
|
307
|
-
case
|
|
308
|
-
return
|
|
309
|
-
case
|
|
310
|
-
return
|
|
311
|
-
case
|
|
312
|
-
var
|
|
294
|
+
if (typeof n == "function")
|
|
295
|
+
return nt(n, qt(n));
|
|
296
|
+
if (typeof n == "string")
|
|
297
|
+
return de(n);
|
|
298
|
+
switch (n) {
|
|
299
|
+
case m:
|
|
300
|
+
return de("Suspense");
|
|
301
|
+
case d:
|
|
302
|
+
return de("SuspenseList");
|
|
303
|
+
}
|
|
304
|
+
if (typeof n == "object")
|
|
305
|
+
switch (n.$$typeof) {
|
|
306
|
+
case s:
|
|
307
|
+
return $t(n.render);
|
|
308
|
+
case _:
|
|
309
|
+
return he(n.type, l, f);
|
|
310
|
+
case g: {
|
|
311
|
+
var E = n, P = E._payload, N = E._init;
|
|
313
312
|
try {
|
|
314
|
-
return
|
|
313
|
+
return he(N(P), l, f);
|
|
315
314
|
} catch {
|
|
316
315
|
}
|
|
317
316
|
}
|
|
318
317
|
}
|
|
319
318
|
return "";
|
|
320
319
|
}
|
|
321
|
-
var
|
|
322
|
-
function
|
|
323
|
-
if (
|
|
324
|
-
var
|
|
325
|
-
|
|
320
|
+
var re = Object.prototype.hasOwnProperty, rt = {}, ot = h.ReactDebugCurrentFrame;
|
|
321
|
+
function me(n) {
|
|
322
|
+
if (n) {
|
|
323
|
+
var l = n._owner, f = he(n.type, n._source, l ? l.type : null);
|
|
324
|
+
ot.setExtraStackFrame(f);
|
|
326
325
|
} else
|
|
327
|
-
|
|
326
|
+
ot.setExtraStackFrame(null);
|
|
328
327
|
}
|
|
329
|
-
function
|
|
328
|
+
function Vt(n, l, f, E, P) {
|
|
330
329
|
{
|
|
331
|
-
var
|
|
332
|
-
for (var
|
|
333
|
-
if (
|
|
334
|
-
var
|
|
330
|
+
var N = Function.call.bind(re);
|
|
331
|
+
for (var S in n)
|
|
332
|
+
if (N(n, S)) {
|
|
333
|
+
var T = void 0;
|
|
335
334
|
try {
|
|
336
|
-
if (typeof
|
|
337
|
-
var
|
|
338
|
-
throw
|
|
335
|
+
if (typeof n[S] != "function") {
|
|
336
|
+
var D = Error((E || "React class") + ": " + f + " type `" + S + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[S] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
337
|
+
throw D.name = "Invariant Violation", D;
|
|
339
338
|
}
|
|
340
|
-
|
|
341
|
-
} catch (
|
|
342
|
-
|
|
339
|
+
T = n[S](l, S, E, f, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
|
+
} catch (M) {
|
|
341
|
+
T = M;
|
|
343
342
|
}
|
|
344
|
-
|
|
343
|
+
T && !(T instanceof Error) && (me(P), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", E || "React class", f, S, typeof T), me(null)), T instanceof Error && !(T.message in rt) && (rt[T.message] = !0, me(P), w("Failed %s type: %s", f, T.message), me(null));
|
|
345
344
|
}
|
|
346
345
|
}
|
|
347
346
|
}
|
|
348
|
-
var
|
|
349
|
-
function
|
|
350
|
-
return
|
|
347
|
+
var Yt = Array.isArray;
|
|
348
|
+
function Pe(n) {
|
|
349
|
+
return Yt(n);
|
|
351
350
|
}
|
|
352
|
-
function
|
|
351
|
+
function zt(n) {
|
|
353
352
|
{
|
|
354
|
-
var
|
|
355
|
-
return
|
|
353
|
+
var l = typeof Symbol == "function" && Symbol.toStringTag, f = l && n[Symbol.toStringTag] || n.constructor.name || "Object";
|
|
354
|
+
return f;
|
|
356
355
|
}
|
|
357
356
|
}
|
|
358
|
-
function
|
|
357
|
+
function Kt(n) {
|
|
359
358
|
try {
|
|
360
|
-
return
|
|
359
|
+
return it(n), !1;
|
|
361
360
|
} catch {
|
|
362
361
|
return !0;
|
|
363
362
|
}
|
|
364
363
|
}
|
|
365
|
-
function
|
|
366
|
-
return "" +
|
|
364
|
+
function it(n) {
|
|
365
|
+
return "" + n;
|
|
367
366
|
}
|
|
368
|
-
function
|
|
369
|
-
if (
|
|
370
|
-
return
|
|
367
|
+
function at(n) {
|
|
368
|
+
if (Kt(n))
|
|
369
|
+
return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", zt(n)), it(n);
|
|
371
370
|
}
|
|
372
|
-
var
|
|
371
|
+
var oe = h.ReactCurrentOwner, Jt = {
|
|
373
372
|
key: !0,
|
|
374
373
|
ref: !0,
|
|
375
374
|
__self: !0,
|
|
376
375
|
__source: !0
|
|
377
|
-
},
|
|
378
|
-
|
|
379
|
-
function
|
|
380
|
-
if (
|
|
381
|
-
var
|
|
382
|
-
if (
|
|
376
|
+
}, st, ut, Ae;
|
|
377
|
+
Ae = {};
|
|
378
|
+
function Ht(n) {
|
|
379
|
+
if (re.call(n, "ref")) {
|
|
380
|
+
var l = Object.getOwnPropertyDescriptor(n, "ref").get;
|
|
381
|
+
if (l && l.isReactWarning)
|
|
383
382
|
return !1;
|
|
384
383
|
}
|
|
385
|
-
return
|
|
384
|
+
return n.ref !== void 0;
|
|
386
385
|
}
|
|
387
|
-
function
|
|
388
|
-
if (
|
|
389
|
-
var
|
|
390
|
-
if (
|
|
386
|
+
function Wt(n) {
|
|
387
|
+
if (re.call(n, "key")) {
|
|
388
|
+
var l = Object.getOwnPropertyDescriptor(n, "key").get;
|
|
389
|
+
if (l && l.isReactWarning)
|
|
391
390
|
return !1;
|
|
392
391
|
}
|
|
393
|
-
return
|
|
392
|
+
return n.key !== void 0;
|
|
394
393
|
}
|
|
395
|
-
function
|
|
396
|
-
if (typeof
|
|
397
|
-
var
|
|
398
|
-
|
|
394
|
+
function Gt(n, l) {
|
|
395
|
+
if (typeof n.ref == "string" && oe.current && l && oe.current.stateNode !== l) {
|
|
396
|
+
var f = k(oe.current.type);
|
|
397
|
+
Ae[f] || (w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', k(oe.current.type), n.ref), Ae[f] = !0);
|
|
399
398
|
}
|
|
400
399
|
}
|
|
401
|
-
function
|
|
400
|
+
function Qt(n, l) {
|
|
402
401
|
{
|
|
403
|
-
var
|
|
404
|
-
|
|
402
|
+
var f = function() {
|
|
403
|
+
st || (st = !0, w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", l));
|
|
405
404
|
};
|
|
406
|
-
|
|
407
|
-
get:
|
|
405
|
+
f.isReactWarning = !0, Object.defineProperty(n, "key", {
|
|
406
|
+
get: f,
|
|
408
407
|
configurable: !0
|
|
409
408
|
});
|
|
410
409
|
}
|
|
411
410
|
}
|
|
412
|
-
function
|
|
411
|
+
function Xt(n, l) {
|
|
413
412
|
{
|
|
414
|
-
var
|
|
415
|
-
|
|
413
|
+
var f = function() {
|
|
414
|
+
ut || (ut = !0, w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", l));
|
|
416
415
|
};
|
|
417
|
-
|
|
418
|
-
get:
|
|
416
|
+
f.isReactWarning = !0, Object.defineProperty(n, "ref", {
|
|
417
|
+
get: f,
|
|
419
418
|
configurable: !0
|
|
420
419
|
});
|
|
421
420
|
}
|
|
422
421
|
}
|
|
423
|
-
var
|
|
424
|
-
var
|
|
422
|
+
var Zt = function(n, l, f, E, P, N, S) {
|
|
423
|
+
var T = {
|
|
425
424
|
// This tag allows us to uniquely identify this as a React Element
|
|
426
|
-
$$typeof:
|
|
425
|
+
$$typeof: e,
|
|
427
426
|
// Built-in properties that belong on the element
|
|
428
|
-
type:
|
|
429
|
-
key:
|
|
430
|
-
ref:
|
|
431
|
-
props:
|
|
427
|
+
type: n,
|
|
428
|
+
key: l,
|
|
429
|
+
ref: f,
|
|
430
|
+
props: S,
|
|
432
431
|
// Record the component responsible for creating this element.
|
|
433
|
-
_owner:
|
|
432
|
+
_owner: N
|
|
434
433
|
};
|
|
435
|
-
return
|
|
434
|
+
return T._store = {}, Object.defineProperty(T._store, "validated", {
|
|
436
435
|
configurable: !1,
|
|
437
436
|
enumerable: !1,
|
|
438
437
|
writable: !0,
|
|
439
438
|
value: !1
|
|
440
|
-
}), Object.defineProperty(
|
|
439
|
+
}), Object.defineProperty(T, "_self", {
|
|
441
440
|
configurable: !1,
|
|
442
441
|
enumerable: !1,
|
|
443
442
|
writable: !1,
|
|
444
|
-
value:
|
|
445
|
-
}), Object.defineProperty(
|
|
443
|
+
value: E
|
|
444
|
+
}), Object.defineProperty(T, "_source", {
|
|
446
445
|
configurable: !1,
|
|
447
446
|
enumerable: !1,
|
|
448
447
|
writable: !1,
|
|
449
|
-
value:
|
|
450
|
-
}), Object.freeze && (Object.freeze(
|
|
448
|
+
value: P
|
|
449
|
+
}), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
|
|
451
450
|
};
|
|
452
|
-
function
|
|
451
|
+
function en(n, l, f, E, P) {
|
|
453
452
|
{
|
|
454
|
-
var
|
|
455
|
-
|
|
456
|
-
for (
|
|
457
|
-
|
|
458
|
-
if (
|
|
459
|
-
var
|
|
460
|
-
for (
|
|
461
|
-
|
|
453
|
+
var N, S = {}, T = null, D = null;
|
|
454
|
+
f !== void 0 && (at(f), T = "" + f), Wt(l) && (at(l.key), T = "" + l.key), Ht(l) && (D = l.ref, Gt(l, P));
|
|
455
|
+
for (N in l)
|
|
456
|
+
re.call(l, N) && !Jt.hasOwnProperty(N) && (S[N] = l[N]);
|
|
457
|
+
if (n && n.defaultProps) {
|
|
458
|
+
var M = n.defaultProps;
|
|
459
|
+
for (N in M)
|
|
460
|
+
S[N] === void 0 && (S[N] = M[N]);
|
|
462
461
|
}
|
|
463
|
-
if (
|
|
464
|
-
var
|
|
465
|
-
|
|
462
|
+
if (T || D) {
|
|
463
|
+
var L = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
|
|
464
|
+
T && Qt(S, L), D && Xt(S, L);
|
|
466
465
|
}
|
|
467
|
-
return
|
|
466
|
+
return Zt(n, T, D, P, E, oe.current, S);
|
|
468
467
|
}
|
|
469
468
|
}
|
|
470
|
-
var
|
|
471
|
-
function
|
|
472
|
-
if (
|
|
473
|
-
var
|
|
474
|
-
|
|
469
|
+
var Ne = h.ReactCurrentOwner, ct = h.ReactDebugCurrentFrame;
|
|
470
|
+
function G(n) {
|
|
471
|
+
if (n) {
|
|
472
|
+
var l = n._owner, f = he(n.type, n._source, l ? l.type : null);
|
|
473
|
+
ct.setExtraStackFrame(f);
|
|
475
474
|
} else
|
|
476
|
-
|
|
475
|
+
ct.setExtraStackFrame(null);
|
|
477
476
|
}
|
|
478
|
-
var
|
|
479
|
-
|
|
480
|
-
function
|
|
481
|
-
return typeof
|
|
477
|
+
var Be;
|
|
478
|
+
Be = !1;
|
|
479
|
+
function Ie(n) {
|
|
480
|
+
return typeof n == "object" && n !== null && n.$$typeof === e;
|
|
482
481
|
}
|
|
483
|
-
function
|
|
482
|
+
function lt() {
|
|
484
483
|
{
|
|
485
|
-
if (
|
|
486
|
-
var
|
|
487
|
-
if (
|
|
484
|
+
if (Ne.current) {
|
|
485
|
+
var n = k(Ne.current.type);
|
|
486
|
+
if (n)
|
|
488
487
|
return `
|
|
489
488
|
|
|
490
|
-
Check the render method of \`` +
|
|
489
|
+
Check the render method of \`` + n + "`.";
|
|
491
490
|
}
|
|
492
491
|
return "";
|
|
493
492
|
}
|
|
494
493
|
}
|
|
495
|
-
function
|
|
494
|
+
function tn(n) {
|
|
496
495
|
{
|
|
497
|
-
if (
|
|
498
|
-
var
|
|
496
|
+
if (n !== void 0) {
|
|
497
|
+
var l = n.fileName.replace(/^.*[\\\/]/, ""), f = n.lineNumber;
|
|
499
498
|
return `
|
|
500
499
|
|
|
501
|
-
Check your code at ` +
|
|
500
|
+
Check your code at ` + l + ":" + f + ".";
|
|
502
501
|
}
|
|
503
502
|
return "";
|
|
504
503
|
}
|
|
505
504
|
}
|
|
506
|
-
var
|
|
507
|
-
function
|
|
505
|
+
var ft = {};
|
|
506
|
+
function nn(n) {
|
|
508
507
|
{
|
|
509
|
-
var
|
|
510
|
-
if (!
|
|
511
|
-
var
|
|
512
|
-
|
|
508
|
+
var l = lt();
|
|
509
|
+
if (!l) {
|
|
510
|
+
var f = typeof n == "string" ? n : n.displayName || n.name;
|
|
511
|
+
f && (l = `
|
|
513
512
|
|
|
514
|
-
Check the top-level render call using <` +
|
|
513
|
+
Check the top-level render call using <` + f + ">.");
|
|
515
514
|
}
|
|
516
|
-
return
|
|
515
|
+
return l;
|
|
517
516
|
}
|
|
518
517
|
}
|
|
519
|
-
function
|
|
518
|
+
function dt(n, l) {
|
|
520
519
|
{
|
|
521
|
-
if (!
|
|
520
|
+
if (!n._store || n._store.validated || n.key != null)
|
|
522
521
|
return;
|
|
523
|
-
|
|
524
|
-
var
|
|
525
|
-
if (
|
|
522
|
+
n._store.validated = !0;
|
|
523
|
+
var f = nn(l);
|
|
524
|
+
if (ft[f])
|
|
526
525
|
return;
|
|
527
|
-
|
|
528
|
-
var
|
|
529
|
-
|
|
526
|
+
ft[f] = !0;
|
|
527
|
+
var E = "";
|
|
528
|
+
n && n._owner && n._owner !== Ne.current && (E = " It was passed a child from " + k(n._owner.type) + "."), G(n), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', f, E), G(null);
|
|
530
529
|
}
|
|
531
530
|
}
|
|
532
|
-
function
|
|
531
|
+
function gt(n, l) {
|
|
533
532
|
{
|
|
534
|
-
if (typeof
|
|
533
|
+
if (typeof n != "object")
|
|
535
534
|
return;
|
|
536
|
-
if (
|
|
537
|
-
for (var
|
|
538
|
-
var
|
|
539
|
-
|
|
535
|
+
if (Pe(n))
|
|
536
|
+
for (var f = 0; f < n.length; f++) {
|
|
537
|
+
var E = n[f];
|
|
538
|
+
Ie(E) && dt(E, l);
|
|
540
539
|
}
|
|
541
|
-
else if (
|
|
542
|
-
|
|
543
|
-
else if (
|
|
544
|
-
var
|
|
545
|
-
if (typeof
|
|
546
|
-
for (var
|
|
547
|
-
|
|
540
|
+
else if (Ie(n))
|
|
541
|
+
n._store && (n._store.validated = !0);
|
|
542
|
+
else if (n) {
|
|
543
|
+
var P = I(n);
|
|
544
|
+
if (typeof P == "function" && P !== n.entries)
|
|
545
|
+
for (var N = P.call(n), S; !(S = N.next()).done; )
|
|
546
|
+
Ie(S.value) && dt(S.value, l);
|
|
548
547
|
}
|
|
549
548
|
}
|
|
550
549
|
}
|
|
551
|
-
function
|
|
550
|
+
function rn(n) {
|
|
552
551
|
{
|
|
553
|
-
var
|
|
554
|
-
if (
|
|
552
|
+
var l = n.type;
|
|
553
|
+
if (l == null || typeof l == "string")
|
|
555
554
|
return;
|
|
556
|
-
var
|
|
557
|
-
if (typeof
|
|
558
|
-
|
|
559
|
-
else if (typeof
|
|
555
|
+
var f;
|
|
556
|
+
if (typeof l == "function")
|
|
557
|
+
f = l.propTypes;
|
|
558
|
+
else if (typeof l == "object" && (l.$$typeof === s || // Note: Memo only checks outer props here.
|
|
560
559
|
// Inner props are checked in the reconciler.
|
|
561
|
-
|
|
562
|
-
|
|
560
|
+
l.$$typeof === _))
|
|
561
|
+
f = l.propTypes;
|
|
563
562
|
else
|
|
564
563
|
return;
|
|
565
|
-
if (
|
|
566
|
-
var
|
|
567
|
-
|
|
568
|
-
} else if (
|
|
569
|
-
|
|
570
|
-
var
|
|
571
|
-
|
|
564
|
+
if (f) {
|
|
565
|
+
var E = k(l);
|
|
566
|
+
Vt(f, n.props, "prop", E, n);
|
|
567
|
+
} else if (l.PropTypes !== void 0 && !Be) {
|
|
568
|
+
Be = !0;
|
|
569
|
+
var P = k(l);
|
|
570
|
+
w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", P || "Unknown");
|
|
572
571
|
}
|
|
573
|
-
typeof
|
|
572
|
+
typeof l.getDefaultProps == "function" && !l.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
574
573
|
}
|
|
575
574
|
}
|
|
576
|
-
function
|
|
575
|
+
function on(n) {
|
|
577
576
|
{
|
|
578
|
-
for (var
|
|
579
|
-
var
|
|
580
|
-
if (
|
|
581
|
-
|
|
577
|
+
for (var l = Object.keys(n.props), f = 0; f < l.length; f++) {
|
|
578
|
+
var E = l[f];
|
|
579
|
+
if (E !== "children" && E !== "key") {
|
|
580
|
+
G(n), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", E), G(null);
|
|
582
581
|
break;
|
|
583
582
|
}
|
|
584
583
|
}
|
|
585
|
-
|
|
584
|
+
n.ref !== null && (G(n), w("Invalid attribute `ref` supplied to `React.Fragment`."), G(null));
|
|
586
585
|
}
|
|
587
586
|
}
|
|
588
|
-
var
|
|
589
|
-
function
|
|
587
|
+
var ht = {};
|
|
588
|
+
function mt(n, l, f, E, P, N) {
|
|
590
589
|
{
|
|
591
|
-
var
|
|
592
|
-
if (!
|
|
593
|
-
var
|
|
594
|
-
(
|
|
595
|
-
var
|
|
596
|
-
|
|
597
|
-
var
|
|
598
|
-
|
|
590
|
+
var S = U(n);
|
|
591
|
+
if (!S) {
|
|
592
|
+
var T = "";
|
|
593
|
+
(n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
594
|
+
var D = tn(P);
|
|
595
|
+
D ? T += D : T += lt();
|
|
596
|
+
var M;
|
|
597
|
+
n === null ? M = "null" : Pe(n) ? M = "array" : n !== void 0 && n.$$typeof === e ? (M = "<" + (k(n.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : M = typeof n, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", M, T);
|
|
599
598
|
}
|
|
600
|
-
var
|
|
601
|
-
if (
|
|
602
|
-
return
|
|
603
|
-
if (
|
|
604
|
-
var
|
|
605
|
-
if (
|
|
606
|
-
if (
|
|
607
|
-
if (
|
|
608
|
-
for (var
|
|
609
|
-
|
|
610
|
-
Object.freeze && Object.freeze(
|
|
599
|
+
var L = en(n, l, f, P, N);
|
|
600
|
+
if (L == null)
|
|
601
|
+
return L;
|
|
602
|
+
if (S) {
|
|
603
|
+
var $ = l.children;
|
|
604
|
+
if ($ !== void 0)
|
|
605
|
+
if (E)
|
|
606
|
+
if (Pe($)) {
|
|
607
|
+
for (var Q = 0; Q < $.length; Q++)
|
|
608
|
+
gt($[Q], n);
|
|
609
|
+
Object.freeze && Object.freeze($);
|
|
611
610
|
} else
|
|
612
|
-
|
|
611
|
+
w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
613
612
|
else
|
|
614
|
-
|
|
613
|
+
gt($, n);
|
|
615
614
|
}
|
|
616
|
-
if (
|
|
617
|
-
var
|
|
618
|
-
return
|
|
619
|
-
}),
|
|
620
|
-
if (!
|
|
621
|
-
var
|
|
622
|
-
|
|
615
|
+
if (re.call(l, "key")) {
|
|
616
|
+
var H = k(n), O = Object.keys(l).filter(function(fn) {
|
|
617
|
+
return fn !== "key";
|
|
618
|
+
}), Me = O.length > 0 ? "{key: someKey, " + O.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
619
|
+
if (!ht[H + Me]) {
|
|
620
|
+
var ln = O.length > 0 ? "{" + O.join(": ..., ") + ": ...}" : "{}";
|
|
621
|
+
w(`A props object containing a "key" prop is being spread into JSX:
|
|
623
622
|
let props = %s;
|
|
624
623
|
<%s {...props} />
|
|
625
624
|
React keys must be passed directly to JSX without using spread:
|
|
626
625
|
let props = %s;
|
|
627
|
-
<%s key={someKey} {...props} />`,
|
|
626
|
+
<%s key={someKey} {...props} />`, Me, H, ln, H), ht[H + Me] = !0;
|
|
628
627
|
}
|
|
629
628
|
}
|
|
630
|
-
return
|
|
629
|
+
return n === r ? on(L) : rn(L), L;
|
|
631
630
|
}
|
|
632
631
|
}
|
|
633
|
-
function
|
|
634
|
-
return
|
|
632
|
+
function an(n, l, f) {
|
|
633
|
+
return mt(n, l, f, !0);
|
|
634
|
+
}
|
|
635
|
+
function sn(n, l, f) {
|
|
636
|
+
return mt(n, l, f, !1);
|
|
637
|
+
}
|
|
638
|
+
var un = sn, cn = an;
|
|
639
|
+
se.Fragment = r, se.jsx = un, se.jsxs = cn;
|
|
640
|
+
}()), se;
|
|
641
|
+
}
|
|
642
|
+
process.env.NODE_ENV === "production" ? xe.exports = hn() : xe.exports = mn();
|
|
643
|
+
var b = xe.exports, le = {}, pn = function() {
|
|
644
|
+
return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
|
|
645
|
+
}, bt = {}, F = {};
|
|
646
|
+
let Ve;
|
|
647
|
+
const wn = [
|
|
648
|
+
0,
|
|
649
|
+
// Not used
|
|
650
|
+
26,
|
|
651
|
+
44,
|
|
652
|
+
70,
|
|
653
|
+
100,
|
|
654
|
+
134,
|
|
655
|
+
172,
|
|
656
|
+
196,
|
|
657
|
+
242,
|
|
658
|
+
292,
|
|
659
|
+
346,
|
|
660
|
+
404,
|
|
661
|
+
466,
|
|
662
|
+
532,
|
|
663
|
+
581,
|
|
664
|
+
655,
|
|
665
|
+
733,
|
|
666
|
+
815,
|
|
667
|
+
901,
|
|
668
|
+
991,
|
|
669
|
+
1085,
|
|
670
|
+
1156,
|
|
671
|
+
1258,
|
|
672
|
+
1364,
|
|
673
|
+
1474,
|
|
674
|
+
1588,
|
|
675
|
+
1706,
|
|
676
|
+
1828,
|
|
677
|
+
1921,
|
|
678
|
+
2051,
|
|
679
|
+
2185,
|
|
680
|
+
2323,
|
|
681
|
+
2465,
|
|
682
|
+
2611,
|
|
683
|
+
2761,
|
|
684
|
+
2876,
|
|
685
|
+
3034,
|
|
686
|
+
3196,
|
|
687
|
+
3362,
|
|
688
|
+
3532,
|
|
689
|
+
3706
|
|
690
|
+
];
|
|
691
|
+
F.getSymbolSize = function(e) {
|
|
692
|
+
if (!e)
|
|
693
|
+
throw new Error('"version" cannot be null or undefined');
|
|
694
|
+
if (e < 1 || e > 40)
|
|
695
|
+
throw new Error('"version" should be in range from 1 to 40');
|
|
696
|
+
return e * 4 + 17;
|
|
697
|
+
};
|
|
698
|
+
F.getSymbolTotalCodewords = function(e) {
|
|
699
|
+
return wn[e];
|
|
700
|
+
};
|
|
701
|
+
F.getBCHDigit = function(t) {
|
|
702
|
+
let e = 0;
|
|
703
|
+
for (; t !== 0; )
|
|
704
|
+
e++, t >>>= 1;
|
|
705
|
+
return e;
|
|
706
|
+
};
|
|
707
|
+
F.setToSJISFunction = function(e) {
|
|
708
|
+
if (typeof e != "function")
|
|
709
|
+
throw new Error('"toSJISFunc" is not a valid function.');
|
|
710
|
+
Ve = e;
|
|
711
|
+
};
|
|
712
|
+
F.isKanjiModeEnabled = function() {
|
|
713
|
+
return typeof Ve < "u";
|
|
714
|
+
};
|
|
715
|
+
F.toSJIS = function(e) {
|
|
716
|
+
return Ve(e);
|
|
717
|
+
};
|
|
718
|
+
var Ee = {};
|
|
719
|
+
(function(t) {
|
|
720
|
+
t.L = { bit: 1 }, t.M = { bit: 0 }, t.Q = { bit: 3 }, t.H = { bit: 2 };
|
|
721
|
+
function e(a) {
|
|
722
|
+
if (typeof a != "string")
|
|
723
|
+
throw new Error("Param is not a string");
|
|
724
|
+
switch (a.toLowerCase()) {
|
|
725
|
+
case "l":
|
|
726
|
+
case "low":
|
|
727
|
+
return t.L;
|
|
728
|
+
case "m":
|
|
729
|
+
case "medium":
|
|
730
|
+
return t.M;
|
|
731
|
+
case "q":
|
|
732
|
+
case "quartile":
|
|
733
|
+
return t.Q;
|
|
734
|
+
case "h":
|
|
735
|
+
case "high":
|
|
736
|
+
return t.H;
|
|
737
|
+
default:
|
|
738
|
+
throw new Error("Unknown EC Level: " + a);
|
|
635
739
|
}
|
|
636
|
-
|
|
637
|
-
|
|
740
|
+
}
|
|
741
|
+
t.isValid = function(r) {
|
|
742
|
+
return r && typeof r.bit < "u" && r.bit >= 0 && r.bit < 4;
|
|
743
|
+
}, t.from = function(r, o) {
|
|
744
|
+
if (t.isValid(r))
|
|
745
|
+
return r;
|
|
746
|
+
try {
|
|
747
|
+
return e(r);
|
|
748
|
+
} catch {
|
|
749
|
+
return o;
|
|
638
750
|
}
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
751
|
+
};
|
|
752
|
+
})(Ee);
|
|
753
|
+
function Rt() {
|
|
754
|
+
this.buffer = [], this.length = 0;
|
|
642
755
|
}
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
756
|
+
Rt.prototype = {
|
|
757
|
+
get: function(t) {
|
|
758
|
+
const e = Math.floor(t / 8);
|
|
759
|
+
return (this.buffer[e] >>> 7 - t % 8 & 1) === 1;
|
|
760
|
+
},
|
|
761
|
+
put: function(t, e) {
|
|
762
|
+
for (let a = 0; a < e; a++)
|
|
763
|
+
this.putBit((t >>> e - a - 1 & 1) === 1);
|
|
764
|
+
},
|
|
765
|
+
getLengthInBits: function() {
|
|
766
|
+
return this.length;
|
|
767
|
+
},
|
|
768
|
+
putBit: function(t) {
|
|
769
|
+
const e = Math.floor(this.length / 8);
|
|
770
|
+
this.buffer.length <= e && this.buffer.push(0), t && (this.buffer[e] |= 128 >>> this.length % 8), this.length++;
|
|
771
|
+
}
|
|
772
|
+
};
|
|
773
|
+
var yn = Rt;
|
|
774
|
+
function fe(t) {
|
|
775
|
+
if (!t || t < 1)
|
|
776
|
+
throw new Error("BitMatrix size must be defined and greater than 0");
|
|
777
|
+
this.size = t, this.data = new Uint8Array(t * t), this.reservedBit = new Uint8Array(t * t);
|
|
778
|
+
}
|
|
779
|
+
fe.prototype.set = function(t, e, a, r) {
|
|
780
|
+
const o = t * this.size + e;
|
|
781
|
+
this.data[o] = a, r && (this.reservedBit[o] = !0);
|
|
782
|
+
};
|
|
783
|
+
fe.prototype.get = function(t, e) {
|
|
784
|
+
return this.data[t * this.size + e];
|
|
785
|
+
};
|
|
786
|
+
fe.prototype.xor = function(t, e, a) {
|
|
787
|
+
this.data[t * this.size + e] ^= a;
|
|
788
|
+
};
|
|
789
|
+
fe.prototype.isReserved = function(t, e) {
|
|
790
|
+
return this.reservedBit[t * this.size + e];
|
|
791
|
+
};
|
|
792
|
+
var vn = fe, Tt = {};
|
|
793
|
+
(function(t) {
|
|
794
|
+
const e = F.getSymbolSize;
|
|
795
|
+
t.getRowColCoords = function(r) {
|
|
796
|
+
if (r === 1)
|
|
797
|
+
return [];
|
|
798
|
+
const o = Math.floor(r / 7) + 2, i = e(r), u = i === 145 ? 26 : Math.ceil((i - 13) / (2 * o - 2)) * 2, c = [i - 7];
|
|
799
|
+
for (let s = 1; s < o - 1; s++)
|
|
800
|
+
c[s] = c[s - 1] - u;
|
|
801
|
+
return c.push(6), c.reverse();
|
|
802
|
+
}, t.getPositions = function(r) {
|
|
803
|
+
const o = [], i = t.getRowColCoords(r), u = i.length;
|
|
804
|
+
for (let c = 0; c < u; c++)
|
|
805
|
+
for (let s = 0; s < u; s++)
|
|
806
|
+
c === 0 && s === 0 || // top-left
|
|
807
|
+
c === 0 && s === u - 1 || // bottom-left
|
|
808
|
+
c === u - 1 && s === 0 || o.push([i[c], i[s]]);
|
|
809
|
+
return o;
|
|
810
|
+
};
|
|
811
|
+
})(Tt);
|
|
812
|
+
var _t = {};
|
|
813
|
+
const En = F.getSymbolSize, yt = 7;
|
|
814
|
+
_t.getPositions = function(e) {
|
|
815
|
+
const a = En(e);
|
|
816
|
+
return [
|
|
817
|
+
// top-left
|
|
818
|
+
[0, 0],
|
|
819
|
+
// top-right
|
|
820
|
+
[a - yt, 0],
|
|
821
|
+
// bottom-left
|
|
822
|
+
[0, a - yt]
|
|
823
|
+
];
|
|
824
|
+
};
|
|
825
|
+
var St = {};
|
|
826
|
+
(function(t) {
|
|
827
|
+
t.Patterns = {
|
|
828
|
+
PATTERN000: 0,
|
|
829
|
+
PATTERN001: 1,
|
|
830
|
+
PATTERN010: 2,
|
|
831
|
+
PATTERN011: 3,
|
|
832
|
+
PATTERN100: 4,
|
|
833
|
+
PATTERN101: 5,
|
|
834
|
+
PATTERN110: 6,
|
|
835
|
+
PATTERN111: 7
|
|
836
|
+
};
|
|
837
|
+
const e = {
|
|
838
|
+
N1: 3,
|
|
839
|
+
N2: 3,
|
|
840
|
+
N3: 40,
|
|
841
|
+
N4: 10
|
|
842
|
+
};
|
|
843
|
+
t.isValid = function(o) {
|
|
844
|
+
return o != null && o !== "" && !isNaN(o) && o >= 0 && o <= 7;
|
|
845
|
+
}, t.from = function(o) {
|
|
846
|
+
return t.isValid(o) ? parseInt(o, 10) : void 0;
|
|
847
|
+
}, t.getPenaltyN1 = function(o) {
|
|
848
|
+
const i = o.size;
|
|
849
|
+
let u = 0, c = 0, s = 0, m = null, d = null;
|
|
850
|
+
for (let _ = 0; _ < i; _++) {
|
|
851
|
+
c = s = 0, m = d = null;
|
|
852
|
+
for (let g = 0; g < i; g++) {
|
|
853
|
+
let p = o.get(_, g);
|
|
854
|
+
p === m ? c++ : (c >= 5 && (u += e.N1 + (c - 5)), m = p, c = 1), p = o.get(g, _), p === d ? s++ : (s >= 5 && (u += e.N1 + (s - 5)), d = p, s = 1);
|
|
855
|
+
}
|
|
856
|
+
c >= 5 && (u += e.N1 + (c - 5)), s >= 5 && (u += e.N1 + (s - 5));
|
|
857
|
+
}
|
|
858
|
+
return u;
|
|
859
|
+
}, t.getPenaltyN2 = function(o) {
|
|
860
|
+
const i = o.size;
|
|
861
|
+
let u = 0;
|
|
862
|
+
for (let c = 0; c < i - 1; c++)
|
|
863
|
+
for (let s = 0; s < i - 1; s++) {
|
|
864
|
+
const m = o.get(c, s) + o.get(c, s + 1) + o.get(c + 1, s) + o.get(c + 1, s + 1);
|
|
865
|
+
(m === 4 || m === 0) && u++;
|
|
866
|
+
}
|
|
867
|
+
return u * e.N2;
|
|
868
|
+
}, t.getPenaltyN3 = function(o) {
|
|
869
|
+
const i = o.size;
|
|
870
|
+
let u = 0, c = 0, s = 0;
|
|
871
|
+
for (let m = 0; m < i; m++) {
|
|
872
|
+
c = s = 0;
|
|
873
|
+
for (let d = 0; d < i; d++)
|
|
874
|
+
c = c << 1 & 2047 | o.get(m, d), d >= 10 && (c === 1488 || c === 93) && u++, s = s << 1 & 2047 | o.get(d, m), d >= 10 && (s === 1488 || s === 93) && u++;
|
|
875
|
+
}
|
|
876
|
+
return u * e.N3;
|
|
877
|
+
}, t.getPenaltyN4 = function(o) {
|
|
878
|
+
let i = 0;
|
|
879
|
+
const u = o.data.length;
|
|
880
|
+
for (let s = 0; s < u; s++)
|
|
881
|
+
i += o.data[s];
|
|
882
|
+
return Math.abs(Math.ceil(i * 100 / u / 5) - 10) * e.N4;
|
|
883
|
+
};
|
|
884
|
+
function a(r, o, i) {
|
|
885
|
+
switch (r) {
|
|
886
|
+
case t.Patterns.PATTERN000:
|
|
887
|
+
return (o + i) % 2 === 0;
|
|
888
|
+
case t.Patterns.PATTERN001:
|
|
889
|
+
return o % 2 === 0;
|
|
890
|
+
case t.Patterns.PATTERN010:
|
|
891
|
+
return i % 3 === 0;
|
|
892
|
+
case t.Patterns.PATTERN011:
|
|
893
|
+
return (o + i) % 3 === 0;
|
|
894
|
+
case t.Patterns.PATTERN100:
|
|
895
|
+
return (Math.floor(o / 2) + Math.floor(i / 3)) % 2 === 0;
|
|
896
|
+
case t.Patterns.PATTERN101:
|
|
897
|
+
return o * i % 2 + o * i % 3 === 0;
|
|
898
|
+
case t.Patterns.PATTERN110:
|
|
899
|
+
return (o * i % 2 + o * i % 3) % 2 === 0;
|
|
900
|
+
case t.Patterns.PATTERN111:
|
|
901
|
+
return (o * i % 3 + (o + i) % 2) % 2 === 0;
|
|
902
|
+
default:
|
|
903
|
+
throw new Error("bad maskPattern:" + r);
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
t.applyMask = function(o, i) {
|
|
907
|
+
const u = i.size;
|
|
908
|
+
for (let c = 0; c < u; c++)
|
|
909
|
+
for (let s = 0; s < u; s++)
|
|
910
|
+
i.isReserved(s, c) || i.xor(s, c, a(o, s, c));
|
|
911
|
+
}, t.getBestMask = function(o, i) {
|
|
912
|
+
const u = Object.keys(t.Patterns).length;
|
|
913
|
+
let c = 0, s = 1 / 0;
|
|
914
|
+
for (let m = 0; m < u; m++) {
|
|
915
|
+
i(m), t.applyMask(m, o);
|
|
916
|
+
const d = t.getPenaltyN1(o) + t.getPenaltyN2(o) + t.getPenaltyN3(o) + t.getPenaltyN4(o);
|
|
917
|
+
t.applyMask(m, o), d < s && (s = d, c = m);
|
|
918
|
+
}
|
|
919
|
+
return c;
|
|
920
|
+
};
|
|
921
|
+
})(St);
|
|
922
|
+
var Ce = {};
|
|
923
|
+
const Y = Ee, pe = [
|
|
924
|
+
// L M Q H
|
|
925
|
+
1,
|
|
926
|
+
1,
|
|
927
|
+
1,
|
|
928
|
+
1,
|
|
929
|
+
1,
|
|
930
|
+
1,
|
|
931
|
+
1,
|
|
932
|
+
1,
|
|
933
|
+
1,
|
|
934
|
+
1,
|
|
935
|
+
2,
|
|
936
|
+
2,
|
|
937
|
+
1,
|
|
938
|
+
2,
|
|
939
|
+
2,
|
|
940
|
+
4,
|
|
941
|
+
1,
|
|
942
|
+
2,
|
|
943
|
+
4,
|
|
944
|
+
4,
|
|
945
|
+
2,
|
|
946
|
+
4,
|
|
947
|
+
4,
|
|
948
|
+
4,
|
|
949
|
+
2,
|
|
950
|
+
4,
|
|
951
|
+
6,
|
|
952
|
+
5,
|
|
953
|
+
2,
|
|
954
|
+
4,
|
|
955
|
+
6,
|
|
956
|
+
6,
|
|
957
|
+
2,
|
|
958
|
+
5,
|
|
959
|
+
8,
|
|
960
|
+
8,
|
|
961
|
+
4,
|
|
962
|
+
5,
|
|
963
|
+
8,
|
|
964
|
+
8,
|
|
965
|
+
4,
|
|
966
|
+
5,
|
|
967
|
+
8,
|
|
968
|
+
11,
|
|
969
|
+
4,
|
|
970
|
+
8,
|
|
971
|
+
10,
|
|
972
|
+
11,
|
|
973
|
+
4,
|
|
974
|
+
9,
|
|
975
|
+
12,
|
|
976
|
+
16,
|
|
977
|
+
4,
|
|
978
|
+
9,
|
|
979
|
+
16,
|
|
980
|
+
16,
|
|
981
|
+
6,
|
|
982
|
+
10,
|
|
983
|
+
12,
|
|
984
|
+
18,
|
|
985
|
+
6,
|
|
986
|
+
10,
|
|
987
|
+
17,
|
|
988
|
+
16,
|
|
989
|
+
6,
|
|
990
|
+
11,
|
|
991
|
+
16,
|
|
992
|
+
19,
|
|
993
|
+
6,
|
|
994
|
+
13,
|
|
995
|
+
18,
|
|
996
|
+
21,
|
|
997
|
+
7,
|
|
998
|
+
14,
|
|
999
|
+
21,
|
|
1000
|
+
25,
|
|
1001
|
+
8,
|
|
1002
|
+
16,
|
|
1003
|
+
20,
|
|
1004
|
+
25,
|
|
1005
|
+
8,
|
|
1006
|
+
17,
|
|
1007
|
+
23,
|
|
1008
|
+
25,
|
|
1009
|
+
9,
|
|
1010
|
+
17,
|
|
1011
|
+
23,
|
|
1012
|
+
34,
|
|
1013
|
+
9,
|
|
1014
|
+
18,
|
|
1015
|
+
25,
|
|
1016
|
+
30,
|
|
1017
|
+
10,
|
|
1018
|
+
20,
|
|
1019
|
+
27,
|
|
1020
|
+
32,
|
|
1021
|
+
12,
|
|
1022
|
+
21,
|
|
1023
|
+
29,
|
|
1024
|
+
35,
|
|
1025
|
+
12,
|
|
1026
|
+
23,
|
|
1027
|
+
34,
|
|
1028
|
+
37,
|
|
1029
|
+
12,
|
|
1030
|
+
25,
|
|
1031
|
+
34,
|
|
1032
|
+
40,
|
|
1033
|
+
13,
|
|
1034
|
+
26,
|
|
1035
|
+
35,
|
|
1036
|
+
42,
|
|
1037
|
+
14,
|
|
1038
|
+
28,
|
|
1039
|
+
38,
|
|
1040
|
+
45,
|
|
1041
|
+
15,
|
|
1042
|
+
29,
|
|
1043
|
+
40,
|
|
1044
|
+
48,
|
|
1045
|
+
16,
|
|
1046
|
+
31,
|
|
1047
|
+
43,
|
|
1048
|
+
51,
|
|
1049
|
+
17,
|
|
1050
|
+
33,
|
|
1051
|
+
45,
|
|
1052
|
+
54,
|
|
1053
|
+
18,
|
|
1054
|
+
35,
|
|
1055
|
+
48,
|
|
1056
|
+
57,
|
|
1057
|
+
19,
|
|
1058
|
+
37,
|
|
1059
|
+
51,
|
|
1060
|
+
60,
|
|
1061
|
+
19,
|
|
1062
|
+
38,
|
|
1063
|
+
53,
|
|
1064
|
+
63,
|
|
1065
|
+
20,
|
|
1066
|
+
40,
|
|
1067
|
+
56,
|
|
1068
|
+
66,
|
|
1069
|
+
21,
|
|
1070
|
+
43,
|
|
1071
|
+
59,
|
|
1072
|
+
70,
|
|
1073
|
+
22,
|
|
1074
|
+
45,
|
|
1075
|
+
62,
|
|
1076
|
+
74,
|
|
1077
|
+
24,
|
|
1078
|
+
47,
|
|
1079
|
+
65,
|
|
1080
|
+
77,
|
|
1081
|
+
25,
|
|
1082
|
+
49,
|
|
1083
|
+
68,
|
|
1084
|
+
81
|
|
1085
|
+
], we = [
|
|
1086
|
+
// L M Q H
|
|
1087
|
+
7,
|
|
1088
|
+
10,
|
|
1089
|
+
13,
|
|
1090
|
+
17,
|
|
1091
|
+
10,
|
|
1092
|
+
16,
|
|
1093
|
+
22,
|
|
1094
|
+
28,
|
|
1095
|
+
15,
|
|
1096
|
+
26,
|
|
1097
|
+
36,
|
|
1098
|
+
44,
|
|
1099
|
+
20,
|
|
1100
|
+
36,
|
|
1101
|
+
52,
|
|
1102
|
+
64,
|
|
1103
|
+
26,
|
|
1104
|
+
48,
|
|
1105
|
+
72,
|
|
1106
|
+
88,
|
|
1107
|
+
36,
|
|
1108
|
+
64,
|
|
1109
|
+
96,
|
|
1110
|
+
112,
|
|
1111
|
+
40,
|
|
1112
|
+
72,
|
|
1113
|
+
108,
|
|
1114
|
+
130,
|
|
1115
|
+
48,
|
|
1116
|
+
88,
|
|
1117
|
+
132,
|
|
1118
|
+
156,
|
|
1119
|
+
60,
|
|
1120
|
+
110,
|
|
1121
|
+
160,
|
|
1122
|
+
192,
|
|
1123
|
+
72,
|
|
1124
|
+
130,
|
|
1125
|
+
192,
|
|
1126
|
+
224,
|
|
1127
|
+
80,
|
|
1128
|
+
150,
|
|
1129
|
+
224,
|
|
1130
|
+
264,
|
|
1131
|
+
96,
|
|
1132
|
+
176,
|
|
1133
|
+
260,
|
|
1134
|
+
308,
|
|
1135
|
+
104,
|
|
1136
|
+
198,
|
|
1137
|
+
288,
|
|
1138
|
+
352,
|
|
1139
|
+
120,
|
|
1140
|
+
216,
|
|
1141
|
+
320,
|
|
1142
|
+
384,
|
|
1143
|
+
132,
|
|
1144
|
+
240,
|
|
1145
|
+
360,
|
|
1146
|
+
432,
|
|
1147
|
+
144,
|
|
1148
|
+
280,
|
|
1149
|
+
408,
|
|
1150
|
+
480,
|
|
1151
|
+
168,
|
|
1152
|
+
308,
|
|
1153
|
+
448,
|
|
1154
|
+
532,
|
|
1155
|
+
180,
|
|
1156
|
+
338,
|
|
1157
|
+
504,
|
|
1158
|
+
588,
|
|
1159
|
+
196,
|
|
1160
|
+
364,
|
|
1161
|
+
546,
|
|
1162
|
+
650,
|
|
1163
|
+
224,
|
|
1164
|
+
416,
|
|
1165
|
+
600,
|
|
1166
|
+
700,
|
|
1167
|
+
224,
|
|
1168
|
+
442,
|
|
1169
|
+
644,
|
|
1170
|
+
750,
|
|
1171
|
+
252,
|
|
1172
|
+
476,
|
|
1173
|
+
690,
|
|
1174
|
+
816,
|
|
1175
|
+
270,
|
|
1176
|
+
504,
|
|
1177
|
+
750,
|
|
1178
|
+
900,
|
|
1179
|
+
300,
|
|
1180
|
+
560,
|
|
1181
|
+
810,
|
|
1182
|
+
960,
|
|
1183
|
+
312,
|
|
1184
|
+
588,
|
|
1185
|
+
870,
|
|
1186
|
+
1050,
|
|
1187
|
+
336,
|
|
1188
|
+
644,
|
|
1189
|
+
952,
|
|
1190
|
+
1110,
|
|
1191
|
+
360,
|
|
1192
|
+
700,
|
|
1193
|
+
1020,
|
|
1194
|
+
1200,
|
|
1195
|
+
390,
|
|
1196
|
+
728,
|
|
1197
|
+
1050,
|
|
1198
|
+
1260,
|
|
1199
|
+
420,
|
|
1200
|
+
784,
|
|
1201
|
+
1140,
|
|
1202
|
+
1350,
|
|
1203
|
+
450,
|
|
1204
|
+
812,
|
|
1205
|
+
1200,
|
|
1206
|
+
1440,
|
|
1207
|
+
480,
|
|
1208
|
+
868,
|
|
1209
|
+
1290,
|
|
1210
|
+
1530,
|
|
1211
|
+
510,
|
|
1212
|
+
924,
|
|
1213
|
+
1350,
|
|
1214
|
+
1620,
|
|
1215
|
+
540,
|
|
1216
|
+
980,
|
|
1217
|
+
1440,
|
|
1218
|
+
1710,
|
|
1219
|
+
570,
|
|
1220
|
+
1036,
|
|
1221
|
+
1530,
|
|
1222
|
+
1800,
|
|
1223
|
+
570,
|
|
1224
|
+
1064,
|
|
1225
|
+
1590,
|
|
1226
|
+
1890,
|
|
1227
|
+
600,
|
|
1228
|
+
1120,
|
|
1229
|
+
1680,
|
|
1230
|
+
1980,
|
|
1231
|
+
630,
|
|
1232
|
+
1204,
|
|
1233
|
+
1770,
|
|
1234
|
+
2100,
|
|
1235
|
+
660,
|
|
1236
|
+
1260,
|
|
1237
|
+
1860,
|
|
1238
|
+
2220,
|
|
1239
|
+
720,
|
|
1240
|
+
1316,
|
|
1241
|
+
1950,
|
|
1242
|
+
2310,
|
|
1243
|
+
750,
|
|
1244
|
+
1372,
|
|
1245
|
+
2040,
|
|
1246
|
+
2430
|
|
1247
|
+
];
|
|
1248
|
+
Ce.getBlocksCount = function(e, a) {
|
|
1249
|
+
switch (a) {
|
|
1250
|
+
case Y.L:
|
|
1251
|
+
return pe[(e - 1) * 4 + 0];
|
|
1252
|
+
case Y.M:
|
|
1253
|
+
return pe[(e - 1) * 4 + 1];
|
|
1254
|
+
case Y.Q:
|
|
1255
|
+
return pe[(e - 1) * 4 + 2];
|
|
1256
|
+
case Y.H:
|
|
1257
|
+
return pe[(e - 1) * 4 + 3];
|
|
1258
|
+
default:
|
|
1259
|
+
return;
|
|
1260
|
+
}
|
|
1261
|
+
};
|
|
1262
|
+
Ce.getTotalCodewordsCount = function(e, a) {
|
|
1263
|
+
switch (a) {
|
|
1264
|
+
case Y.L:
|
|
1265
|
+
return we[(e - 1) * 4 + 0];
|
|
1266
|
+
case Y.M:
|
|
1267
|
+
return we[(e - 1) * 4 + 1];
|
|
1268
|
+
case Y.Q:
|
|
1269
|
+
return we[(e - 1) * 4 + 2];
|
|
1270
|
+
case Y.H:
|
|
1271
|
+
return we[(e - 1) * 4 + 3];
|
|
1272
|
+
default:
|
|
1273
|
+
return;
|
|
1274
|
+
}
|
|
1275
|
+
};
|
|
1276
|
+
var Pt = {}, be = {};
|
|
1277
|
+
const ue = new Uint8Array(512), ye = new Uint8Array(256);
|
|
1278
|
+
(function() {
|
|
1279
|
+
let e = 1;
|
|
1280
|
+
for (let a = 0; a < 255; a++)
|
|
1281
|
+
ue[a] = e, ye[e] = a, e <<= 1, e & 256 && (e ^= 285);
|
|
1282
|
+
for (let a = 255; a < 512; a++)
|
|
1283
|
+
ue[a] = ue[a - 255];
|
|
1284
|
+
})();
|
|
1285
|
+
be.log = function(e) {
|
|
1286
|
+
if (e < 1)
|
|
1287
|
+
throw new Error("log(" + e + ")");
|
|
1288
|
+
return ye[e];
|
|
1289
|
+
};
|
|
1290
|
+
be.exp = function(e) {
|
|
1291
|
+
return ue[e];
|
|
1292
|
+
};
|
|
1293
|
+
be.mul = function(e, a) {
|
|
1294
|
+
return e === 0 || a === 0 ? 0 : ue[ye[e] + ye[a]];
|
|
1295
|
+
};
|
|
1296
|
+
(function(t) {
|
|
1297
|
+
const e = be;
|
|
1298
|
+
t.mul = function(r, o) {
|
|
1299
|
+
const i = new Uint8Array(r.length + o.length - 1);
|
|
1300
|
+
for (let u = 0; u < r.length; u++)
|
|
1301
|
+
for (let c = 0; c < o.length; c++)
|
|
1302
|
+
i[u + c] ^= e.mul(r[u], o[c]);
|
|
1303
|
+
return i;
|
|
1304
|
+
}, t.mod = function(r, o) {
|
|
1305
|
+
let i = new Uint8Array(r);
|
|
1306
|
+
for (; i.length - o.length >= 0; ) {
|
|
1307
|
+
const u = i[0];
|
|
1308
|
+
for (let s = 0; s < o.length; s++)
|
|
1309
|
+
i[s] ^= e.mul(o[s], u);
|
|
1310
|
+
let c = 0;
|
|
1311
|
+
for (; c < i.length && i[c] === 0; )
|
|
1312
|
+
c++;
|
|
1313
|
+
i = i.slice(c);
|
|
1314
|
+
}
|
|
1315
|
+
return i;
|
|
1316
|
+
}, t.generateECPolynomial = function(r) {
|
|
1317
|
+
let o = new Uint8Array([1]);
|
|
1318
|
+
for (let i = 0; i < r; i++)
|
|
1319
|
+
o = t.mul(o, new Uint8Array([1, e.exp(i)]));
|
|
1320
|
+
return o;
|
|
1321
|
+
};
|
|
1322
|
+
})(Pt);
|
|
1323
|
+
const At = Pt;
|
|
1324
|
+
function Ye(t) {
|
|
1325
|
+
this.genPoly = void 0, this.degree = t, this.degree && this.initialize(this.degree);
|
|
1326
|
+
}
|
|
1327
|
+
Ye.prototype.initialize = function(e) {
|
|
1328
|
+
this.degree = e, this.genPoly = At.generateECPolynomial(this.degree);
|
|
1329
|
+
};
|
|
1330
|
+
Ye.prototype.encode = function(e) {
|
|
1331
|
+
if (!this.genPoly)
|
|
1332
|
+
throw new Error("Encoder not initialized");
|
|
1333
|
+
const a = new Uint8Array(e.length + this.degree);
|
|
1334
|
+
a.set(e);
|
|
1335
|
+
const r = At.mod(a, this.genPoly), o = this.degree - r.length;
|
|
1336
|
+
if (o > 0) {
|
|
1337
|
+
const i = new Uint8Array(this.degree);
|
|
1338
|
+
return i.set(r, o), i;
|
|
1339
|
+
}
|
|
1340
|
+
return r;
|
|
1341
|
+
};
|
|
1342
|
+
var Cn = Ye, Nt = {}, z = {}, ze = {};
|
|
1343
|
+
ze.isValid = function(e) {
|
|
1344
|
+
return !isNaN(e) && e >= 1 && e <= 40;
|
|
1345
|
+
};
|
|
1346
|
+
var V = {};
|
|
1347
|
+
const Bt = "[0-9]+", bn = "[A-Z $%*+\\-./:]+";
|
|
1348
|
+
let ce = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
|
|
1349
|
+
ce = ce.replace(/u/g, "\\u");
|
|
1350
|
+
const Rn = "(?:(?![A-Z0-9 $%*+\\-./:]|" + ce + `)(?:.|[\r
|
|
1351
|
+
]))+`;
|
|
1352
|
+
V.KANJI = new RegExp(ce, "g");
|
|
1353
|
+
V.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
|
|
1354
|
+
V.BYTE = new RegExp(Rn, "g");
|
|
1355
|
+
V.NUMERIC = new RegExp(Bt, "g");
|
|
1356
|
+
V.ALPHANUMERIC = new RegExp(bn, "g");
|
|
1357
|
+
const Tn = new RegExp("^" + ce + "$"), _n = new RegExp("^" + Bt + "$"), Sn = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
|
|
1358
|
+
V.testKanji = function(e) {
|
|
1359
|
+
return Tn.test(e);
|
|
1360
|
+
};
|
|
1361
|
+
V.testNumeric = function(e) {
|
|
1362
|
+
return _n.test(e);
|
|
1363
|
+
};
|
|
1364
|
+
V.testAlphanumeric = function(e) {
|
|
1365
|
+
return Sn.test(e);
|
|
1366
|
+
};
|
|
1367
|
+
(function(t) {
|
|
1368
|
+
const e = ze, a = V;
|
|
1369
|
+
t.NUMERIC = {
|
|
1370
|
+
id: "Numeric",
|
|
1371
|
+
bit: 1,
|
|
1372
|
+
ccBits: [10, 12, 14]
|
|
1373
|
+
}, t.ALPHANUMERIC = {
|
|
1374
|
+
id: "Alphanumeric",
|
|
1375
|
+
bit: 2,
|
|
1376
|
+
ccBits: [9, 11, 13]
|
|
1377
|
+
}, t.BYTE = {
|
|
1378
|
+
id: "Byte",
|
|
1379
|
+
bit: 4,
|
|
1380
|
+
ccBits: [8, 16, 16]
|
|
1381
|
+
}, t.KANJI = {
|
|
1382
|
+
id: "Kanji",
|
|
1383
|
+
bit: 8,
|
|
1384
|
+
ccBits: [8, 10, 12]
|
|
1385
|
+
}, t.MIXED = {
|
|
1386
|
+
bit: -1
|
|
1387
|
+
}, t.getCharCountIndicator = function(i, u) {
|
|
1388
|
+
if (!i.ccBits)
|
|
1389
|
+
throw new Error("Invalid mode: " + i);
|
|
1390
|
+
if (!e.isValid(u))
|
|
1391
|
+
throw new Error("Invalid version: " + u);
|
|
1392
|
+
return u >= 1 && u < 10 ? i.ccBits[0] : u < 27 ? i.ccBits[1] : i.ccBits[2];
|
|
1393
|
+
}, t.getBestModeForData = function(i) {
|
|
1394
|
+
return a.testNumeric(i) ? t.NUMERIC : a.testAlphanumeric(i) ? t.ALPHANUMERIC : a.testKanji(i) ? t.KANJI : t.BYTE;
|
|
1395
|
+
}, t.toString = function(i) {
|
|
1396
|
+
if (i && i.id)
|
|
1397
|
+
return i.id;
|
|
1398
|
+
throw new Error("Invalid mode");
|
|
1399
|
+
}, t.isValid = function(i) {
|
|
1400
|
+
return i && i.bit && i.ccBits;
|
|
1401
|
+
};
|
|
1402
|
+
function r(o) {
|
|
1403
|
+
if (typeof o != "string")
|
|
1404
|
+
throw new Error("Param is not a string");
|
|
1405
|
+
switch (o.toLowerCase()) {
|
|
1406
|
+
case "numeric":
|
|
1407
|
+
return t.NUMERIC;
|
|
1408
|
+
case "alphanumeric":
|
|
1409
|
+
return t.ALPHANUMERIC;
|
|
1410
|
+
case "kanji":
|
|
1411
|
+
return t.KANJI;
|
|
1412
|
+
case "byte":
|
|
1413
|
+
return t.BYTE;
|
|
1414
|
+
default:
|
|
1415
|
+
throw new Error("Unknown mode: " + o);
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
t.from = function(i, u) {
|
|
1419
|
+
if (t.isValid(i))
|
|
1420
|
+
return i;
|
|
1421
|
+
try {
|
|
1422
|
+
return r(i);
|
|
1423
|
+
} catch {
|
|
1424
|
+
return u;
|
|
1425
|
+
}
|
|
1426
|
+
};
|
|
1427
|
+
})(z);
|
|
1428
|
+
(function(t) {
|
|
1429
|
+
const e = F, a = Ce, r = Ee, o = z, i = ze, u = 7973, c = e.getBCHDigit(u);
|
|
1430
|
+
function s(g, p, C) {
|
|
1431
|
+
for (let R = 1; R <= 40; R++)
|
|
1432
|
+
if (p <= t.getCapacity(R, C, g))
|
|
1433
|
+
return R;
|
|
1434
|
+
}
|
|
1435
|
+
function m(g, p) {
|
|
1436
|
+
return o.getCharCountIndicator(g, p) + 4;
|
|
1437
|
+
}
|
|
1438
|
+
function d(g, p) {
|
|
1439
|
+
let C = 0;
|
|
1440
|
+
return g.forEach(function(R) {
|
|
1441
|
+
const I = m(R.mode, p);
|
|
1442
|
+
C += I + R.getBitsLength();
|
|
1443
|
+
}), C;
|
|
1444
|
+
}
|
|
1445
|
+
function _(g, p) {
|
|
1446
|
+
for (let C = 1; C <= 40; C++)
|
|
1447
|
+
if (d(g, C) <= t.getCapacity(C, p, o.MIXED))
|
|
1448
|
+
return C;
|
|
1449
|
+
}
|
|
1450
|
+
t.from = function(p, C) {
|
|
1451
|
+
return i.isValid(p) ? parseInt(p, 10) : C;
|
|
1452
|
+
}, t.getCapacity = function(p, C, R) {
|
|
1453
|
+
if (!i.isValid(p))
|
|
1454
|
+
throw new Error("Invalid QR Code version");
|
|
1455
|
+
typeof R > "u" && (R = o.BYTE);
|
|
1456
|
+
const I = e.getSymbolTotalCodewords(p), h = a.getTotalCodewordsCount(p, C), w = (I - h) * 8;
|
|
1457
|
+
if (R === o.MIXED)
|
|
1458
|
+
return w;
|
|
1459
|
+
const v = w - m(R, p);
|
|
1460
|
+
switch (R) {
|
|
1461
|
+
case o.NUMERIC:
|
|
1462
|
+
return Math.floor(v / 10 * 3);
|
|
1463
|
+
case o.ALPHANUMERIC:
|
|
1464
|
+
return Math.floor(v / 11 * 2);
|
|
1465
|
+
case o.KANJI:
|
|
1466
|
+
return Math.floor(v / 13);
|
|
1467
|
+
case o.BYTE:
|
|
1468
|
+
default:
|
|
1469
|
+
return Math.floor(v / 8);
|
|
1470
|
+
}
|
|
1471
|
+
}, t.getBestVersionForData = function(p, C) {
|
|
1472
|
+
let R;
|
|
1473
|
+
const I = r.from(C, r.M);
|
|
1474
|
+
if (Array.isArray(p)) {
|
|
1475
|
+
if (p.length > 1)
|
|
1476
|
+
return _(p, I);
|
|
1477
|
+
if (p.length === 0)
|
|
1478
|
+
return 1;
|
|
1479
|
+
R = p[0];
|
|
1480
|
+
} else
|
|
1481
|
+
R = p;
|
|
1482
|
+
return s(R.mode, R.getLength(), I);
|
|
1483
|
+
}, t.getEncodedBits = function(p) {
|
|
1484
|
+
if (!i.isValid(p) || p < 7)
|
|
1485
|
+
throw new Error("Invalid QR Code version");
|
|
1486
|
+
let C = p << 12;
|
|
1487
|
+
for (; e.getBCHDigit(C) - c >= 0; )
|
|
1488
|
+
C ^= u << e.getBCHDigit(C) - c;
|
|
1489
|
+
return p << 12 | C;
|
|
1490
|
+
};
|
|
1491
|
+
})(Nt);
|
|
1492
|
+
var It = {};
|
|
1493
|
+
const Fe = F, Mt = 1335, Pn = 21522, vt = Fe.getBCHDigit(Mt);
|
|
1494
|
+
It.getEncodedBits = function(e, a) {
|
|
1495
|
+
const r = e.bit << 3 | a;
|
|
1496
|
+
let o = r << 10;
|
|
1497
|
+
for (; Fe.getBCHDigit(o) - vt >= 0; )
|
|
1498
|
+
o ^= Mt << Fe.getBCHDigit(o) - vt;
|
|
1499
|
+
return (r << 10 | o) ^ Pn;
|
|
1500
|
+
};
|
|
1501
|
+
var jt = {};
|
|
1502
|
+
const An = z;
|
|
1503
|
+
function X(t) {
|
|
1504
|
+
this.mode = An.NUMERIC, this.data = t.toString();
|
|
1505
|
+
}
|
|
1506
|
+
X.getBitsLength = function(e) {
|
|
1507
|
+
return 10 * Math.floor(e / 3) + (e % 3 ? e % 3 * 3 + 1 : 0);
|
|
1508
|
+
};
|
|
1509
|
+
X.prototype.getLength = function() {
|
|
1510
|
+
return this.data.length;
|
|
1511
|
+
};
|
|
1512
|
+
X.prototype.getBitsLength = function() {
|
|
1513
|
+
return X.getBitsLength(this.data.length);
|
|
1514
|
+
};
|
|
1515
|
+
X.prototype.write = function(e) {
|
|
1516
|
+
let a, r, o;
|
|
1517
|
+
for (a = 0; a + 3 <= this.data.length; a += 3)
|
|
1518
|
+
r = this.data.substr(a, 3), o = parseInt(r, 10), e.put(o, 10);
|
|
1519
|
+
const i = this.data.length - a;
|
|
1520
|
+
i > 0 && (r = this.data.substr(a), o = parseInt(r, 10), e.put(o, i * 3 + 1));
|
|
1521
|
+
};
|
|
1522
|
+
var Nn = X;
|
|
1523
|
+
const Bn = z, je = [
|
|
1524
|
+
"0",
|
|
1525
|
+
"1",
|
|
1526
|
+
"2",
|
|
1527
|
+
"3",
|
|
1528
|
+
"4",
|
|
1529
|
+
"5",
|
|
1530
|
+
"6",
|
|
1531
|
+
"7",
|
|
1532
|
+
"8",
|
|
1533
|
+
"9",
|
|
1534
|
+
"A",
|
|
1535
|
+
"B",
|
|
1536
|
+
"C",
|
|
1537
|
+
"D",
|
|
1538
|
+
"E",
|
|
1539
|
+
"F",
|
|
1540
|
+
"G",
|
|
1541
|
+
"H",
|
|
1542
|
+
"I",
|
|
1543
|
+
"J",
|
|
1544
|
+
"K",
|
|
1545
|
+
"L",
|
|
1546
|
+
"M",
|
|
1547
|
+
"N",
|
|
1548
|
+
"O",
|
|
1549
|
+
"P",
|
|
1550
|
+
"Q",
|
|
1551
|
+
"R",
|
|
1552
|
+
"S",
|
|
1553
|
+
"T",
|
|
1554
|
+
"U",
|
|
1555
|
+
"V",
|
|
1556
|
+
"W",
|
|
1557
|
+
"X",
|
|
1558
|
+
"Y",
|
|
1559
|
+
"Z",
|
|
1560
|
+
" ",
|
|
1561
|
+
"$",
|
|
1562
|
+
"%",
|
|
1563
|
+
"*",
|
|
1564
|
+
"+",
|
|
1565
|
+
"-",
|
|
1566
|
+
".",
|
|
1567
|
+
"/",
|
|
1568
|
+
":"
|
|
1569
|
+
];
|
|
1570
|
+
function Z(t) {
|
|
1571
|
+
this.mode = Bn.ALPHANUMERIC, this.data = t;
|
|
1572
|
+
}
|
|
1573
|
+
Z.getBitsLength = function(e) {
|
|
1574
|
+
return 11 * Math.floor(e / 2) + 6 * (e % 2);
|
|
1575
|
+
};
|
|
1576
|
+
Z.prototype.getLength = function() {
|
|
1577
|
+
return this.data.length;
|
|
1578
|
+
};
|
|
1579
|
+
Z.prototype.getBitsLength = function() {
|
|
1580
|
+
return Z.getBitsLength(this.data.length);
|
|
1581
|
+
};
|
|
1582
|
+
Z.prototype.write = function(e) {
|
|
1583
|
+
let a;
|
|
1584
|
+
for (a = 0; a + 2 <= this.data.length; a += 2) {
|
|
1585
|
+
let r = je.indexOf(this.data[a]) * 45;
|
|
1586
|
+
r += je.indexOf(this.data[a + 1]), e.put(r, 11);
|
|
1587
|
+
}
|
|
1588
|
+
this.data.length % 2 && e.put(je.indexOf(this.data[a]), 6);
|
|
1589
|
+
};
|
|
1590
|
+
var In = Z;
|
|
1591
|
+
const Mn = z;
|
|
1592
|
+
function ee(t) {
|
|
1593
|
+
this.mode = Mn.BYTE, typeof t == "string" ? this.data = new TextEncoder().encode(t) : this.data = new Uint8Array(t);
|
|
1594
|
+
}
|
|
1595
|
+
ee.getBitsLength = function(e) {
|
|
1596
|
+
return e * 8;
|
|
1597
|
+
};
|
|
1598
|
+
ee.prototype.getLength = function() {
|
|
1599
|
+
return this.data.length;
|
|
1600
|
+
};
|
|
1601
|
+
ee.prototype.getBitsLength = function() {
|
|
1602
|
+
return ee.getBitsLength(this.data.length);
|
|
1603
|
+
};
|
|
1604
|
+
ee.prototype.write = function(t) {
|
|
1605
|
+
for (let e = 0, a = this.data.length; e < a; e++)
|
|
1606
|
+
t.put(this.data[e], 8);
|
|
1607
|
+
};
|
|
1608
|
+
var jn = ee;
|
|
1609
|
+
const kn = z, Ln = F;
|
|
1610
|
+
function te(t) {
|
|
1611
|
+
this.mode = kn.KANJI, this.data = t;
|
|
1612
|
+
}
|
|
1613
|
+
te.getBitsLength = function(e) {
|
|
1614
|
+
return e * 13;
|
|
1615
|
+
};
|
|
1616
|
+
te.prototype.getLength = function() {
|
|
1617
|
+
return this.data.length;
|
|
1618
|
+
};
|
|
1619
|
+
te.prototype.getBitsLength = function() {
|
|
1620
|
+
return te.getBitsLength(this.data.length);
|
|
1621
|
+
};
|
|
1622
|
+
te.prototype.write = function(t) {
|
|
1623
|
+
let e;
|
|
1624
|
+
for (e = 0; e < this.data.length; e++) {
|
|
1625
|
+
let a = Ln.toSJIS(this.data[e]);
|
|
1626
|
+
if (a >= 33088 && a <= 40956)
|
|
1627
|
+
a -= 33088;
|
|
1628
|
+
else if (a >= 57408 && a <= 60351)
|
|
1629
|
+
a -= 49472;
|
|
1630
|
+
else
|
|
1631
|
+
throw new Error(
|
|
1632
|
+
"Invalid SJIS character: " + this.data[e] + `
|
|
1633
|
+
Make sure your charset is UTF-8`
|
|
1634
|
+
);
|
|
1635
|
+
a = (a >>> 8 & 255) * 192 + (a & 255), t.put(a, 13);
|
|
1636
|
+
}
|
|
1637
|
+
};
|
|
1638
|
+
var Dn = te, kt = { exports: {} };
|
|
1639
|
+
(function(t) {
|
|
1640
|
+
var e = {
|
|
1641
|
+
single_source_shortest_paths: function(a, r, o) {
|
|
1642
|
+
var i = {}, u = {};
|
|
1643
|
+
u[r] = 0;
|
|
1644
|
+
var c = e.PriorityQueue.make();
|
|
1645
|
+
c.push(r, 0);
|
|
1646
|
+
for (var s, m, d, _, g, p, C, R, I; !c.empty(); ) {
|
|
1647
|
+
s = c.pop(), m = s.value, _ = s.cost, g = a[m] || {};
|
|
1648
|
+
for (d in g)
|
|
1649
|
+
g.hasOwnProperty(d) && (p = g[d], C = _ + p, R = u[d], I = typeof u[d] > "u", (I || R > C) && (u[d] = C, c.push(d, C), i[d] = m));
|
|
1650
|
+
}
|
|
1651
|
+
if (typeof o < "u" && typeof u[o] > "u") {
|
|
1652
|
+
var h = ["Could not find a path from ", r, " to ", o, "."].join("");
|
|
1653
|
+
throw new Error(h);
|
|
1654
|
+
}
|
|
1655
|
+
return i;
|
|
1656
|
+
},
|
|
1657
|
+
extract_shortest_path_from_predecessor_list: function(a, r) {
|
|
1658
|
+
for (var o = [], i = r; i; )
|
|
1659
|
+
o.push(i), a[i], i = a[i];
|
|
1660
|
+
return o.reverse(), o;
|
|
1661
|
+
},
|
|
1662
|
+
find_path: function(a, r, o) {
|
|
1663
|
+
var i = e.single_source_shortest_paths(a, r, o);
|
|
1664
|
+
return e.extract_shortest_path_from_predecessor_list(
|
|
1665
|
+
i,
|
|
1666
|
+
o
|
|
1667
|
+
);
|
|
1668
|
+
},
|
|
1669
|
+
/**
|
|
1670
|
+
* A very naive priority queue implementation.
|
|
1671
|
+
*/
|
|
1672
|
+
PriorityQueue: {
|
|
1673
|
+
make: function(a) {
|
|
1674
|
+
var r = e.PriorityQueue, o = {}, i;
|
|
1675
|
+
a = a || {};
|
|
1676
|
+
for (i in r)
|
|
1677
|
+
r.hasOwnProperty(i) && (o[i] = r[i]);
|
|
1678
|
+
return o.queue = [], o.sorter = a.sorter || r.default_sorter, o;
|
|
1679
|
+
},
|
|
1680
|
+
default_sorter: function(a, r) {
|
|
1681
|
+
return a.cost - r.cost;
|
|
1682
|
+
},
|
|
1683
|
+
/**
|
|
1684
|
+
* Add a new item to the queue and ensure the highest priority element
|
|
1685
|
+
* is at the front of the queue.
|
|
1686
|
+
*/
|
|
1687
|
+
push: function(a, r) {
|
|
1688
|
+
var o = { value: a, cost: r };
|
|
1689
|
+
this.queue.push(o), this.queue.sort(this.sorter);
|
|
1690
|
+
},
|
|
1691
|
+
/**
|
|
1692
|
+
* Return the highest priority element in the queue.
|
|
1693
|
+
*/
|
|
1694
|
+
pop: function() {
|
|
1695
|
+
return this.queue.shift();
|
|
1696
|
+
},
|
|
1697
|
+
empty: function() {
|
|
1698
|
+
return this.queue.length === 0;
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
};
|
|
1702
|
+
t.exports = e;
|
|
1703
|
+
})(kt);
|
|
1704
|
+
var On = kt.exports;
|
|
1705
|
+
(function(t) {
|
|
1706
|
+
const e = z, a = Nn, r = In, o = jn, i = Dn, u = V, c = F, s = On;
|
|
1707
|
+
function m(h) {
|
|
1708
|
+
return unescape(encodeURIComponent(h)).length;
|
|
1709
|
+
}
|
|
1710
|
+
function d(h, w, v) {
|
|
1711
|
+
const y = [];
|
|
1712
|
+
let A;
|
|
1713
|
+
for (; (A = h.exec(v)) !== null; )
|
|
1714
|
+
y.push({
|
|
1715
|
+
data: A[0],
|
|
1716
|
+
index: A.index,
|
|
1717
|
+
mode: w,
|
|
1718
|
+
length: A[0].length
|
|
1719
|
+
});
|
|
1720
|
+
return y;
|
|
1721
|
+
}
|
|
1722
|
+
function _(h) {
|
|
1723
|
+
const w = d(u.NUMERIC, e.NUMERIC, h), v = d(u.ALPHANUMERIC, e.ALPHANUMERIC, h);
|
|
1724
|
+
let y, A;
|
|
1725
|
+
return c.isKanjiModeEnabled() ? (y = d(u.BYTE, e.BYTE, h), A = d(u.KANJI, e.KANJI, h)) : (y = d(u.BYTE_KANJI, e.BYTE, h), A = []), w.concat(v, y, A).sort(function(j, x) {
|
|
1726
|
+
return j.index - x.index;
|
|
1727
|
+
}).map(function(j) {
|
|
1728
|
+
return {
|
|
1729
|
+
data: j.data,
|
|
1730
|
+
mode: j.mode,
|
|
1731
|
+
length: j.length
|
|
1732
|
+
};
|
|
1733
|
+
});
|
|
1734
|
+
}
|
|
1735
|
+
function g(h, w) {
|
|
1736
|
+
switch (w) {
|
|
1737
|
+
case e.NUMERIC:
|
|
1738
|
+
return a.getBitsLength(h);
|
|
1739
|
+
case e.ALPHANUMERIC:
|
|
1740
|
+
return r.getBitsLength(h);
|
|
1741
|
+
case e.KANJI:
|
|
1742
|
+
return i.getBitsLength(h);
|
|
1743
|
+
case e.BYTE:
|
|
1744
|
+
return o.getBitsLength(h);
|
|
1745
|
+
}
|
|
1746
|
+
}
|
|
1747
|
+
function p(h) {
|
|
1748
|
+
return h.reduce(function(w, v) {
|
|
1749
|
+
const y = w.length - 1 >= 0 ? w[w.length - 1] : null;
|
|
1750
|
+
return y && y.mode === v.mode ? (w[w.length - 1].data += v.data, w) : (w.push(v), w);
|
|
1751
|
+
}, []);
|
|
1752
|
+
}
|
|
1753
|
+
function C(h) {
|
|
1754
|
+
const w = [];
|
|
1755
|
+
for (let v = 0; v < h.length; v++) {
|
|
1756
|
+
const y = h[v];
|
|
1757
|
+
switch (y.mode) {
|
|
1758
|
+
case e.NUMERIC:
|
|
1759
|
+
w.push([
|
|
1760
|
+
y,
|
|
1761
|
+
{ data: y.data, mode: e.ALPHANUMERIC, length: y.length },
|
|
1762
|
+
{ data: y.data, mode: e.BYTE, length: y.length }
|
|
1763
|
+
]);
|
|
1764
|
+
break;
|
|
1765
|
+
case e.ALPHANUMERIC:
|
|
1766
|
+
w.push([
|
|
1767
|
+
y,
|
|
1768
|
+
{ data: y.data, mode: e.BYTE, length: y.length }
|
|
1769
|
+
]);
|
|
1770
|
+
break;
|
|
1771
|
+
case e.KANJI:
|
|
1772
|
+
w.push([
|
|
1773
|
+
y,
|
|
1774
|
+
{ data: y.data, mode: e.BYTE, length: m(y.data) }
|
|
1775
|
+
]);
|
|
1776
|
+
break;
|
|
1777
|
+
case e.BYTE:
|
|
1778
|
+
w.push([
|
|
1779
|
+
{ data: y.data, mode: e.BYTE, length: m(y.data) }
|
|
1780
|
+
]);
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
return w;
|
|
1784
|
+
}
|
|
1785
|
+
function R(h, w) {
|
|
1786
|
+
const v = {}, y = { start: {} };
|
|
1787
|
+
let A = ["start"];
|
|
1788
|
+
for (let B = 0; B < h.length; B++) {
|
|
1789
|
+
const j = h[B], x = [];
|
|
1790
|
+
for (let q = 0; q < j.length; q++) {
|
|
1791
|
+
const U = j[q], K = "" + B + q;
|
|
1792
|
+
x.push(K), v[K] = { node: U, lastCount: 0 }, y[K] = {};
|
|
1793
|
+
for (let W = 0; W < A.length; W++) {
|
|
1794
|
+
const k = A[W];
|
|
1795
|
+
v[k] && v[k].node.mode === U.mode ? (y[k][K] = g(v[k].lastCount + U.length, U.mode) - g(v[k].lastCount, U.mode), v[k].lastCount += U.length) : (v[k] && (v[k].lastCount = U.length), y[k][K] = g(U.length, U.mode) + 4 + e.getCharCountIndicator(U.mode, w));
|
|
1796
|
+
}
|
|
1797
|
+
}
|
|
1798
|
+
A = x;
|
|
1799
|
+
}
|
|
1800
|
+
for (let B = 0; B < A.length; B++)
|
|
1801
|
+
y[A[B]].end = 0;
|
|
1802
|
+
return { map: y, table: v };
|
|
1803
|
+
}
|
|
1804
|
+
function I(h, w) {
|
|
1805
|
+
let v;
|
|
1806
|
+
const y = e.getBestModeForData(h);
|
|
1807
|
+
if (v = e.from(w, y), v !== e.BYTE && v.bit < y.bit)
|
|
1808
|
+
throw new Error('"' + h + '" cannot be encoded with mode ' + e.toString(v) + `.
|
|
1809
|
+
Suggested mode is: ` + e.toString(y));
|
|
1810
|
+
switch (v === e.KANJI && !c.isKanjiModeEnabled() && (v = e.BYTE), v) {
|
|
1811
|
+
case e.NUMERIC:
|
|
1812
|
+
return new a(h);
|
|
1813
|
+
case e.ALPHANUMERIC:
|
|
1814
|
+
return new r(h);
|
|
1815
|
+
case e.KANJI:
|
|
1816
|
+
return new i(h);
|
|
1817
|
+
case e.BYTE:
|
|
1818
|
+
return new o(h);
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
t.fromArray = function(w) {
|
|
1822
|
+
return w.reduce(function(v, y) {
|
|
1823
|
+
return typeof y == "string" ? v.push(I(y, null)) : y.data && v.push(I(y.data, y.mode)), v;
|
|
1824
|
+
}, []);
|
|
1825
|
+
}, t.fromString = function(w, v) {
|
|
1826
|
+
const y = _(w, c.isKanjiModeEnabled()), A = C(y), B = R(A, v), j = s.find_path(B.map, "start", "end"), x = [];
|
|
1827
|
+
for (let q = 1; q < j.length - 1; q++)
|
|
1828
|
+
x.push(B.table[j[q]].node);
|
|
1829
|
+
return t.fromArray(p(x));
|
|
1830
|
+
}, t.rawSplit = function(w) {
|
|
1831
|
+
return t.fromArray(
|
|
1832
|
+
_(w, c.isKanjiModeEnabled())
|
|
1833
|
+
);
|
|
1834
|
+
};
|
|
1835
|
+
})(jt);
|
|
1836
|
+
const Re = F, ke = Ee, xn = yn, Fn = vn, Un = Tt, $n = _t, Ue = St, $e = Ce, qn = Cn, ve = Nt, Vn = It, Yn = z, Le = jt;
|
|
1837
|
+
function zn(t, e) {
|
|
1838
|
+
const a = t.size, r = $n.getPositions(e);
|
|
1839
|
+
for (let o = 0; o < r.length; o++) {
|
|
1840
|
+
const i = r[o][0], u = r[o][1];
|
|
1841
|
+
for (let c = -1; c <= 7; c++)
|
|
1842
|
+
if (!(i + c <= -1 || a <= i + c))
|
|
1843
|
+
for (let s = -1; s <= 7; s++)
|
|
1844
|
+
u + s <= -1 || a <= u + s || (c >= 0 && c <= 6 && (s === 0 || s === 6) || s >= 0 && s <= 6 && (c === 0 || c === 6) || c >= 2 && c <= 4 && s >= 2 && s <= 4 ? t.set(i + c, u + s, !0, !0) : t.set(i + c, u + s, !1, !0));
|
|
1845
|
+
}
|
|
1846
|
+
}
|
|
1847
|
+
function Kn(t) {
|
|
1848
|
+
const e = t.size;
|
|
1849
|
+
for (let a = 8; a < e - 8; a++) {
|
|
1850
|
+
const r = a % 2 === 0;
|
|
1851
|
+
t.set(a, 6, r, !0), t.set(6, a, r, !0);
|
|
1852
|
+
}
|
|
1853
|
+
}
|
|
1854
|
+
function Jn(t, e) {
|
|
1855
|
+
const a = Un.getPositions(e);
|
|
1856
|
+
for (let r = 0; r < a.length; r++) {
|
|
1857
|
+
const o = a[r][0], i = a[r][1];
|
|
1858
|
+
for (let u = -2; u <= 2; u++)
|
|
1859
|
+
for (let c = -2; c <= 2; c++)
|
|
1860
|
+
u === -2 || u === 2 || c === -2 || c === 2 || u === 0 && c === 0 ? t.set(o + u, i + c, !0, !0) : t.set(o + u, i + c, !1, !0);
|
|
1861
|
+
}
|
|
1862
|
+
}
|
|
1863
|
+
function Hn(t, e) {
|
|
1864
|
+
const a = t.size, r = ve.getEncodedBits(e);
|
|
1865
|
+
let o, i, u;
|
|
1866
|
+
for (let c = 0; c < 18; c++)
|
|
1867
|
+
o = Math.floor(c / 3), i = c % 3 + a - 8 - 3, u = (r >> c & 1) === 1, t.set(o, i, u, !0), t.set(i, o, u, !0);
|
|
1868
|
+
}
|
|
1869
|
+
function De(t, e, a) {
|
|
1870
|
+
const r = t.size, o = Vn.getEncodedBits(e, a);
|
|
1871
|
+
let i, u;
|
|
1872
|
+
for (i = 0; i < 15; i++)
|
|
1873
|
+
u = (o >> i & 1) === 1, i < 6 ? t.set(i, 8, u, !0) : i < 8 ? t.set(i + 1, 8, u, !0) : t.set(r - 15 + i, 8, u, !0), i < 8 ? t.set(8, r - i - 1, u, !0) : i < 9 ? t.set(8, 15 - i - 1 + 1, u, !0) : t.set(8, 15 - i - 1, u, !0);
|
|
1874
|
+
t.set(r - 8, 8, 1, !0);
|
|
1875
|
+
}
|
|
1876
|
+
function Wn(t, e) {
|
|
1877
|
+
const a = t.size;
|
|
1878
|
+
let r = -1, o = a - 1, i = 7, u = 0;
|
|
1879
|
+
for (let c = a - 1; c > 0; c -= 2)
|
|
1880
|
+
for (c === 6 && c--; ; ) {
|
|
1881
|
+
for (let s = 0; s < 2; s++)
|
|
1882
|
+
if (!t.isReserved(o, c - s)) {
|
|
1883
|
+
let m = !1;
|
|
1884
|
+
u < e.length && (m = (e[u] >>> i & 1) === 1), t.set(o, c - s, m), i--, i === -1 && (u++, i = 7);
|
|
1885
|
+
}
|
|
1886
|
+
if (o += r, o < 0 || a <= o) {
|
|
1887
|
+
o -= r, r = -r;
|
|
1888
|
+
break;
|
|
1889
|
+
}
|
|
1890
|
+
}
|
|
1891
|
+
}
|
|
1892
|
+
function Gn(t, e, a) {
|
|
1893
|
+
const r = new xn();
|
|
1894
|
+
a.forEach(function(s) {
|
|
1895
|
+
r.put(s.mode.bit, 4), r.put(s.getLength(), Yn.getCharCountIndicator(s.mode, t)), s.write(r);
|
|
1896
|
+
});
|
|
1897
|
+
const o = Re.getSymbolTotalCodewords(t), i = $e.getTotalCodewordsCount(t, e), u = (o - i) * 8;
|
|
1898
|
+
for (r.getLengthInBits() + 4 <= u && r.put(0, 4); r.getLengthInBits() % 8 !== 0; )
|
|
1899
|
+
r.putBit(0);
|
|
1900
|
+
const c = (u - r.getLengthInBits()) / 8;
|
|
1901
|
+
for (let s = 0; s < c; s++)
|
|
1902
|
+
r.put(s % 2 ? 17 : 236, 8);
|
|
1903
|
+
return Qn(r, t, e);
|
|
1904
|
+
}
|
|
1905
|
+
function Qn(t, e, a) {
|
|
1906
|
+
const r = Re.getSymbolTotalCodewords(e), o = $e.getTotalCodewordsCount(e, a), i = r - o, u = $e.getBlocksCount(e, a), c = r % u, s = u - c, m = Math.floor(r / u), d = Math.floor(i / u), _ = d + 1, g = m - d, p = new qn(g);
|
|
1907
|
+
let C = 0;
|
|
1908
|
+
const R = new Array(u), I = new Array(u);
|
|
1909
|
+
let h = 0;
|
|
1910
|
+
const w = new Uint8Array(t.buffer);
|
|
1911
|
+
for (let j = 0; j < u; j++) {
|
|
1912
|
+
const x = j < s ? d : _;
|
|
1913
|
+
R[j] = w.slice(C, C + x), I[j] = p.encode(R[j]), C += x, h = Math.max(h, x);
|
|
1914
|
+
}
|
|
1915
|
+
const v = new Uint8Array(r);
|
|
1916
|
+
let y = 0, A, B;
|
|
1917
|
+
for (A = 0; A < h; A++)
|
|
1918
|
+
for (B = 0; B < u; B++)
|
|
1919
|
+
A < R[B].length && (v[y++] = R[B][A]);
|
|
1920
|
+
for (A = 0; A < g; A++)
|
|
1921
|
+
for (B = 0; B < u; B++)
|
|
1922
|
+
v[y++] = I[B][A];
|
|
1923
|
+
return v;
|
|
1924
|
+
}
|
|
1925
|
+
function Xn(t, e, a, r) {
|
|
1926
|
+
let o;
|
|
1927
|
+
if (Array.isArray(t))
|
|
1928
|
+
o = Le.fromArray(t);
|
|
1929
|
+
else if (typeof t == "string") {
|
|
1930
|
+
let m = e;
|
|
1931
|
+
if (!m) {
|
|
1932
|
+
const d = Le.rawSplit(t);
|
|
1933
|
+
m = ve.getBestVersionForData(d, a);
|
|
1934
|
+
}
|
|
1935
|
+
o = Le.fromString(t, m || 40);
|
|
1936
|
+
} else
|
|
1937
|
+
throw new Error("Invalid data");
|
|
1938
|
+
const i = ve.getBestVersionForData(o, a);
|
|
1939
|
+
if (!i)
|
|
1940
|
+
throw new Error("The amount of data is too big to be stored in a QR Code");
|
|
1941
|
+
if (!e)
|
|
1942
|
+
e = i;
|
|
1943
|
+
else if (e < i)
|
|
1944
|
+
throw new Error(
|
|
1945
|
+
`
|
|
1946
|
+
The chosen QR Code version cannot contain this amount of data.
|
|
1947
|
+
Minimum version required to store current data is: ` + i + `.
|
|
1948
|
+
`
|
|
1949
|
+
);
|
|
1950
|
+
const u = Gn(e, a, o), c = Re.getSymbolSize(e), s = new Fn(c);
|
|
1951
|
+
return zn(s, e), Kn(s), Jn(s, e), De(s, a, 0), e >= 7 && Hn(s, e), Wn(s, u), isNaN(r) && (r = Ue.getBestMask(
|
|
1952
|
+
s,
|
|
1953
|
+
De.bind(null, s, a)
|
|
1954
|
+
)), Ue.applyMask(r, s), De(s, a, r), {
|
|
1955
|
+
modules: s,
|
|
1956
|
+
version: e,
|
|
1957
|
+
errorCorrectionLevel: a,
|
|
1958
|
+
maskPattern: r,
|
|
1959
|
+
segments: o
|
|
1960
|
+
};
|
|
1961
|
+
}
|
|
1962
|
+
bt.create = function(e, a) {
|
|
1963
|
+
if (typeof e > "u" || e === "")
|
|
1964
|
+
throw new Error("No input text");
|
|
1965
|
+
let r = ke.M, o, i;
|
|
1966
|
+
return typeof a < "u" && (r = ke.from(a.errorCorrectionLevel, ke.M), o = ve.from(a.version), i = Ue.from(a.maskPattern), a.toSJISFunc && Re.setToSJISFunction(a.toSJISFunc)), Xn(e, o, r, i);
|
|
1967
|
+
};
|
|
1968
|
+
var Lt = {}, Ke = {};
|
|
1969
|
+
(function(t) {
|
|
1970
|
+
function e(a) {
|
|
1971
|
+
if (typeof a == "number" && (a = a.toString()), typeof a != "string")
|
|
1972
|
+
throw new Error("Color should be defined as hex string");
|
|
1973
|
+
let r = a.slice().replace("#", "").split("");
|
|
1974
|
+
if (r.length < 3 || r.length === 5 || r.length > 8)
|
|
1975
|
+
throw new Error("Invalid hex color: " + a);
|
|
1976
|
+
(r.length === 3 || r.length === 4) && (r = Array.prototype.concat.apply([], r.map(function(i) {
|
|
1977
|
+
return [i, i];
|
|
1978
|
+
}))), r.length === 6 && r.push("F", "F");
|
|
1979
|
+
const o = parseInt(r.join(""), 16);
|
|
1980
|
+
return {
|
|
1981
|
+
r: o >> 24 & 255,
|
|
1982
|
+
g: o >> 16 & 255,
|
|
1983
|
+
b: o >> 8 & 255,
|
|
1984
|
+
a: o & 255,
|
|
1985
|
+
hex: "#" + r.slice(0, 6).join("")
|
|
1986
|
+
};
|
|
1987
|
+
}
|
|
1988
|
+
t.getOptions = function(r) {
|
|
1989
|
+
r || (r = {}), r.color || (r.color = {});
|
|
1990
|
+
const o = typeof r.margin > "u" || r.margin === null || r.margin < 0 ? 4 : r.margin, i = r.width && r.width >= 21 ? r.width : void 0, u = r.scale || 4;
|
|
1991
|
+
return {
|
|
1992
|
+
width: i,
|
|
1993
|
+
scale: i ? 4 : u,
|
|
1994
|
+
margin: o,
|
|
1995
|
+
color: {
|
|
1996
|
+
dark: e(r.color.dark || "#000000ff"),
|
|
1997
|
+
light: e(r.color.light || "#ffffffff")
|
|
1998
|
+
},
|
|
1999
|
+
type: r.type,
|
|
2000
|
+
rendererOpts: r.rendererOpts || {}
|
|
2001
|
+
};
|
|
2002
|
+
}, t.getScale = function(r, o) {
|
|
2003
|
+
return o.width && o.width >= r + o.margin * 2 ? o.width / (r + o.margin * 2) : o.scale;
|
|
2004
|
+
}, t.getImageWidth = function(r, o) {
|
|
2005
|
+
const i = t.getScale(r, o);
|
|
2006
|
+
return Math.floor((r + o.margin * 2) * i);
|
|
2007
|
+
}, t.qrToImageData = function(r, o, i) {
|
|
2008
|
+
const u = o.modules.size, c = o.modules.data, s = t.getScale(u, i), m = Math.floor((u + i.margin * 2) * s), d = i.margin * s, _ = [i.color.light, i.color.dark];
|
|
2009
|
+
for (let g = 0; g < m; g++)
|
|
2010
|
+
for (let p = 0; p < m; p++) {
|
|
2011
|
+
let C = (g * m + p) * 4, R = i.color.light;
|
|
2012
|
+
if (g >= d && p >= d && g < m - d && p < m - d) {
|
|
2013
|
+
const I = Math.floor((g - d) / s), h = Math.floor((p - d) / s);
|
|
2014
|
+
R = _[c[I * u + h] ? 1 : 0];
|
|
2015
|
+
}
|
|
2016
|
+
r[C++] = R.r, r[C++] = R.g, r[C++] = R.b, r[C] = R.a;
|
|
2017
|
+
}
|
|
2018
|
+
};
|
|
2019
|
+
})(Ke);
|
|
2020
|
+
(function(t) {
|
|
2021
|
+
const e = Ke;
|
|
2022
|
+
function a(o, i, u) {
|
|
2023
|
+
o.clearRect(0, 0, i.width, i.height), i.style || (i.style = {}), i.height = u, i.width = u, i.style.height = u + "px", i.style.width = u + "px";
|
|
2024
|
+
}
|
|
2025
|
+
function r() {
|
|
2026
|
+
try {
|
|
2027
|
+
return document.createElement("canvas");
|
|
2028
|
+
} catch {
|
|
2029
|
+
throw new Error("You need to specify a canvas element");
|
|
2030
|
+
}
|
|
2031
|
+
}
|
|
2032
|
+
t.render = function(i, u, c) {
|
|
2033
|
+
let s = c, m = u;
|
|
2034
|
+
typeof s > "u" && (!u || !u.getContext) && (s = u, u = void 0), u || (m = r()), s = e.getOptions(s);
|
|
2035
|
+
const d = e.getImageWidth(i.modules.size, s), _ = m.getContext("2d"), g = _.createImageData(d, d);
|
|
2036
|
+
return e.qrToImageData(g.data, i, s), a(_, m, d), _.putImageData(g, 0, 0), m;
|
|
2037
|
+
}, t.renderToDataURL = function(i, u, c) {
|
|
2038
|
+
let s = c;
|
|
2039
|
+
typeof s > "u" && (!u || !u.getContext) && (s = u, u = void 0), s || (s = {});
|
|
2040
|
+
const m = t.render(i, u, s), d = s.type || "image/png", _ = s.rendererOpts || {};
|
|
2041
|
+
return m.toDataURL(d, _.quality);
|
|
2042
|
+
};
|
|
2043
|
+
})(Lt);
|
|
2044
|
+
var Dt = {};
|
|
2045
|
+
const Zn = Ke;
|
|
2046
|
+
function Et(t, e) {
|
|
2047
|
+
const a = t.a / 255, r = e + '="' + t.hex + '"';
|
|
2048
|
+
return a < 1 ? r + " " + e + '-opacity="' + a.toFixed(2).slice(1) + '"' : r;
|
|
2049
|
+
}
|
|
2050
|
+
function Oe(t, e, a) {
|
|
2051
|
+
let r = t + e;
|
|
2052
|
+
return typeof a < "u" && (r += " " + a), r;
|
|
2053
|
+
}
|
|
2054
|
+
function er(t, e, a) {
|
|
2055
|
+
let r = "", o = 0, i = !1, u = 0;
|
|
2056
|
+
for (let c = 0; c < t.length; c++) {
|
|
2057
|
+
const s = Math.floor(c % e), m = Math.floor(c / e);
|
|
2058
|
+
!s && !i && (i = !0), t[c] ? (u++, c > 0 && s > 0 && t[c - 1] || (r += i ? Oe("M", s + a, 0.5 + m + a) : Oe("m", o, 0), o = 0, i = !1), s + 1 < e && t[c + 1] || (r += Oe("h", u), u = 0)) : o++;
|
|
2059
|
+
}
|
|
2060
|
+
return r;
|
|
2061
|
+
}
|
|
2062
|
+
Dt.render = function(e, a, r) {
|
|
2063
|
+
const o = Zn.getOptions(a), i = e.modules.size, u = e.modules.data, c = i + o.margin * 2, s = o.color.light.a ? "<path " + Et(o.color.light, "fill") + ' d="M0 0h' + c + "v" + c + 'H0z"/>' : "", m = "<path " + Et(o.color.dark, "stroke") + ' d="' + er(u, i, o.margin) + '"/>', d = 'viewBox="0 0 ' + c + " " + c + '"', g = '<svg xmlns="http://www.w3.org/2000/svg" ' + (o.width ? 'width="' + o.width + '" height="' + o.width + '" ' : "") + d + ' shape-rendering="crispEdges">' + s + m + `</svg>
|
|
2064
|
+
`;
|
|
2065
|
+
return typeof r == "function" && r(null, g), g;
|
|
2066
|
+
};
|
|
2067
|
+
const tr = pn, qe = bt, Ot = Lt, nr = Dt;
|
|
2068
|
+
function Je(t, e, a, r, o) {
|
|
2069
|
+
const i = [].slice.call(arguments, 1), u = i.length, c = typeof i[u - 1] == "function";
|
|
2070
|
+
if (!c && !tr())
|
|
2071
|
+
throw new Error("Callback required as last argument");
|
|
2072
|
+
if (c) {
|
|
2073
|
+
if (u < 2)
|
|
2074
|
+
throw new Error("Too few arguments provided");
|
|
2075
|
+
u === 2 ? (o = a, a = e, e = r = void 0) : u === 3 && (e.getContext && typeof o > "u" ? (o = r, r = void 0) : (o = r, r = a, a = e, e = void 0));
|
|
2076
|
+
} else {
|
|
2077
|
+
if (u < 1)
|
|
2078
|
+
throw new Error("Too few arguments provided");
|
|
2079
|
+
return u === 1 ? (a = e, e = r = void 0) : u === 2 && !e.getContext && (r = a, a = e, e = void 0), new Promise(function(s, m) {
|
|
2080
|
+
try {
|
|
2081
|
+
const d = qe.create(a, r);
|
|
2082
|
+
s(t(d, e, r));
|
|
2083
|
+
} catch (d) {
|
|
2084
|
+
m(d);
|
|
2085
|
+
}
|
|
2086
|
+
});
|
|
2087
|
+
}
|
|
2088
|
+
try {
|
|
2089
|
+
const s = qe.create(a, r);
|
|
2090
|
+
o(null, t(s, e, r));
|
|
2091
|
+
} catch (s) {
|
|
2092
|
+
o(s);
|
|
2093
|
+
}
|
|
2094
|
+
}
|
|
2095
|
+
le.create = qe.create;
|
|
2096
|
+
le.toCanvas = Je.bind(null, Ot.render);
|
|
2097
|
+
le.toDataURL = Je.bind(null, Ot.renderToDataURL);
|
|
2098
|
+
le.toString = Je.bind(null, function(t, e, a) {
|
|
2099
|
+
return nr.render(t, a);
|
|
2100
|
+
});
|
|
2101
|
+
async function rr(t, e = {}) {
|
|
2102
|
+
const a = {
|
|
647
2103
|
width: 300,
|
|
648
2104
|
margin: 2,
|
|
649
2105
|
color: { dark: "#000000", light: "#ffffff" },
|
|
650
2106
|
errorCorrectionLevel: "M",
|
|
651
|
-
...
|
|
2107
|
+
...e
|
|
652
2108
|
};
|
|
653
|
-
if (!
|
|
2109
|
+
if (!t || t.trim() === "")
|
|
654
2110
|
throw new Error("输入内容不能为空");
|
|
655
2111
|
try {
|
|
656
|
-
return await
|
|
657
|
-
} catch (
|
|
658
|
-
throw new Error(`生成二维码失败: ${
|
|
2112
|
+
return await le.toDataURL(t, a);
|
|
2113
|
+
} catch (r) {
|
|
2114
|
+
throw new Error(`生成二维码失败: ${r.message}`);
|
|
659
2115
|
}
|
|
660
2116
|
}
|
|
661
|
-
function
|
|
662
|
-
const
|
|
663
|
-
|
|
2117
|
+
function or(t, e = "qrcode.png") {
|
|
2118
|
+
const a = document.createElement("a");
|
|
2119
|
+
a.href = t, a.download = e, document.body.appendChild(a), a.click(), document.body.removeChild(a);
|
|
664
2120
|
}
|
|
665
|
-
function
|
|
666
|
-
const [
|
|
2121
|
+
function ar({ onClose: t, onMinimize: e, onMaximize: a }) {
|
|
2122
|
+
const [r, o] = ie("text"), [i, u] = ie(""), [c, s] = ie(""), [m, d] = ie(""), _ = dn(() => {
|
|
2123
|
+
try {
|
|
2124
|
+
return window.self !== window.top;
|
|
2125
|
+
} catch {
|
|
2126
|
+
return !0;
|
|
2127
|
+
}
|
|
2128
|
+
}, []), [g, p] = ie({
|
|
667
2129
|
width: 300,
|
|
668
2130
|
margin: 2,
|
|
669
2131
|
color: "#000000",
|
|
670
2132
|
bgColor: "#ffffff",
|
|
671
2133
|
errorLevel: "M"
|
|
672
2134
|
});
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
}, [
|
|
676
|
-
const
|
|
677
|
-
if (!
|
|
678
|
-
|
|
2135
|
+
gn(() => {
|
|
2136
|
+
i.trim() ? C() : s("");
|
|
2137
|
+
}, [i, g, r]);
|
|
2138
|
+
const C = async () => {
|
|
2139
|
+
if (!i.trim()) {
|
|
2140
|
+
s("");
|
|
679
2141
|
return;
|
|
680
2142
|
}
|
|
681
|
-
|
|
2143
|
+
d("");
|
|
682
2144
|
try {
|
|
683
|
-
const
|
|
684
|
-
width:
|
|
685
|
-
margin:
|
|
686
|
-
color: { dark:
|
|
687
|
-
errorCorrectionLevel:
|
|
2145
|
+
const h = r === "url" && !i.match(/^https?:\/\//) ? `https://${i}` : i, w = await rr(h, {
|
|
2146
|
+
width: g.width,
|
|
2147
|
+
margin: g.margin,
|
|
2148
|
+
color: { dark: g.color, light: g.bgColor },
|
|
2149
|
+
errorCorrectionLevel: g.errorLevel
|
|
688
2150
|
});
|
|
689
|
-
|
|
690
|
-
} catch (
|
|
691
|
-
|
|
2151
|
+
s(w);
|
|
2152
|
+
} catch (h) {
|
|
2153
|
+
d(h.message), s("");
|
|
692
2154
|
}
|
|
693
|
-
},
|
|
694
|
-
if (
|
|
695
|
-
const
|
|
696
|
-
|
|
2155
|
+
}, R = () => {
|
|
2156
|
+
if (c) {
|
|
2157
|
+
const h = (/* @__PURE__ */ new Date()).getTime();
|
|
2158
|
+
or(c, `qrcode-${h}.png`);
|
|
697
2159
|
}
|
|
698
|
-
},
|
|
699
|
-
|
|
2160
|
+
}, I = (h) => {
|
|
2161
|
+
u(h.target.value);
|
|
700
2162
|
};
|
|
701
|
-
return /* @__PURE__ */
|
|
702
|
-
/* @__PURE__ */
|
|
703
|
-
/* @__PURE__ */
|
|
704
|
-
|
|
705
|
-
/* @__PURE__ */
|
|
706
|
-
/* @__PURE__ */
|
|
707
|
-
/* @__PURE__ */
|
|
2163
|
+
return /* @__PURE__ */ b.jsxs("div", { className: "qrcode-plugin", children: [
|
|
2164
|
+
/* @__PURE__ */ b.jsxs("div", { className: "qrcode-header", children: [
|
|
2165
|
+
/* @__PURE__ */ b.jsx("h2", { children: "📱 二维码生成器" }),
|
|
2166
|
+
t && !_ && /* @__PURE__ */ b.jsxs("div", { className: "qrcode-window-controls", children: [
|
|
2167
|
+
/* @__PURE__ */ b.jsx("button", { onClick: e, title: "最小化", children: "─" }),
|
|
2168
|
+
/* @__PURE__ */ b.jsx("button", { onClick: a, title: "最大化", children: "□" }),
|
|
2169
|
+
/* @__PURE__ */ b.jsx("button", { onClick: t, title: "关闭", children: "✕" })
|
|
708
2170
|
] })
|
|
709
2171
|
] }),
|
|
710
|
-
/* @__PURE__ */
|
|
711
|
-
/* @__PURE__ */
|
|
2172
|
+
/* @__PURE__ */ b.jsxs("div", { className: "qrcode-tabs", children: [
|
|
2173
|
+
/* @__PURE__ */ b.jsx(
|
|
712
2174
|
"button",
|
|
713
2175
|
{
|
|
714
|
-
className: `qrcode-tab ${
|
|
715
|
-
onClick: () =>
|
|
2176
|
+
className: `qrcode-tab ${r === "text" ? "active" : ""}`,
|
|
2177
|
+
onClick: () => o("text"),
|
|
716
2178
|
children: "文本"
|
|
717
2179
|
}
|
|
718
2180
|
),
|
|
719
|
-
/* @__PURE__ */
|
|
2181
|
+
/* @__PURE__ */ b.jsx(
|
|
720
2182
|
"button",
|
|
721
2183
|
{
|
|
722
|
-
className: `qrcode-tab ${
|
|
723
|
-
onClick: () =>
|
|
2184
|
+
className: `qrcode-tab ${r === "url" ? "active" : ""}`,
|
|
2185
|
+
onClick: () => o("url"),
|
|
724
2186
|
children: "链接"
|
|
725
2187
|
}
|
|
726
2188
|
)
|
|
727
2189
|
] }),
|
|
728
|
-
/* @__PURE__ */
|
|
729
|
-
/* @__PURE__ */
|
|
730
|
-
/* @__PURE__ */
|
|
731
|
-
/* @__PURE__ */
|
|
2190
|
+
/* @__PURE__ */ b.jsxs("div", { className: "qrcode-content", children: [
|
|
2191
|
+
/* @__PURE__ */ b.jsxs("div", { className: "qrcode-input-section", children: [
|
|
2192
|
+
/* @__PURE__ */ b.jsx("label", { children: r === "text" ? "输入文本内容" : "输入链接地址" }),
|
|
2193
|
+
/* @__PURE__ */ b.jsx(
|
|
732
2194
|
"textarea",
|
|
733
2195
|
{
|
|
734
|
-
value:
|
|
735
|
-
onChange:
|
|
736
|
-
placeholder:
|
|
2196
|
+
value: i,
|
|
2197
|
+
onChange: I,
|
|
2198
|
+
placeholder: r === "text" ? "请输入要生成二维码的文本内容..." : "请输入 URL 地址...",
|
|
737
2199
|
className: "qrcode-textarea",
|
|
738
2200
|
rows: 4
|
|
739
2201
|
}
|
|
740
2202
|
)
|
|
741
2203
|
] }),
|
|
742
|
-
|
|
2204
|
+
m && /* @__PURE__ */ b.jsxs("div", { className: "qrcode-error", children: [
|
|
743
2205
|
"⚠️ ",
|
|
744
|
-
|
|
2206
|
+
m
|
|
745
2207
|
] }),
|
|
746
|
-
|
|
747
|
-
/* @__PURE__ */
|
|
2208
|
+
c && /* @__PURE__ */ b.jsx("div", { className: "qrcode-preview-section", children: /* @__PURE__ */ b.jsxs("div", { className: "qrcode-preview-card", children: [
|
|
2209
|
+
/* @__PURE__ */ b.jsx(
|
|
748
2210
|
"img",
|
|
749
2211
|
{
|
|
750
|
-
src:
|
|
2212
|
+
src: c,
|
|
751
2213
|
alt: "二维码",
|
|
752
2214
|
className: "qrcode-image",
|
|
753
|
-
style: { width: `${
|
|
2215
|
+
style: { width: `${g.width}px` }
|
|
754
2216
|
}
|
|
755
2217
|
),
|
|
756
|
-
/* @__PURE__ */
|
|
2218
|
+
/* @__PURE__ */ b.jsx(
|
|
757
2219
|
"button",
|
|
758
2220
|
{
|
|
759
2221
|
className: "qrcode-download-btn",
|
|
760
|
-
onClick:
|
|
2222
|
+
onClick: R,
|
|
761
2223
|
children: "📥 下载二维码"
|
|
762
2224
|
}
|
|
763
2225
|
)
|
|
764
2226
|
] }) }),
|
|
765
|
-
/* @__PURE__ */
|
|
766
|
-
/* @__PURE__ */
|
|
767
|
-
/* @__PURE__ */
|
|
768
|
-
/* @__PURE__ */
|
|
769
|
-
/* @__PURE__ */
|
|
2227
|
+
/* @__PURE__ */ b.jsxs("div", { className: "qrcode-settings", children: [
|
|
2228
|
+
/* @__PURE__ */ b.jsx("h3", { children: "⚙️ 设置" }),
|
|
2229
|
+
/* @__PURE__ */ b.jsxs("div", { className: "qrcode-settings-grid", children: [
|
|
2230
|
+
/* @__PURE__ */ b.jsxs("div", { className: "qrcode-setting-item", children: [
|
|
2231
|
+
/* @__PURE__ */ b.jsxs("label", { children: [
|
|
770
2232
|
"尺寸: ",
|
|
771
|
-
|
|
2233
|
+
g.width,
|
|
772
2234
|
"px"
|
|
773
2235
|
] }),
|
|
774
|
-
/* @__PURE__ */
|
|
2236
|
+
/* @__PURE__ */ b.jsx(
|
|
775
2237
|
"input",
|
|
776
2238
|
{
|
|
777
2239
|
type: "range",
|
|
778
2240
|
min: "200",
|
|
779
2241
|
max: "600",
|
|
780
2242
|
step: "50",
|
|
781
|
-
value:
|
|
782
|
-
onChange: (
|
|
2243
|
+
value: g.width,
|
|
2244
|
+
onChange: (h) => p({ ...g, width: Number(h.target.value) }),
|
|
783
2245
|
className: "qrcode-slider"
|
|
784
2246
|
}
|
|
785
2247
|
)
|
|
786
2248
|
] }),
|
|
787
|
-
/* @__PURE__ */
|
|
788
|
-
/* @__PURE__ */
|
|
2249
|
+
/* @__PURE__ */ b.jsxs("div", { className: "qrcode-setting-item", children: [
|
|
2250
|
+
/* @__PURE__ */ b.jsxs("label", { children: [
|
|
789
2251
|
"边距: ",
|
|
790
|
-
|
|
2252
|
+
g.margin
|
|
791
2253
|
] }),
|
|
792
|
-
/* @__PURE__ */
|
|
2254
|
+
/* @__PURE__ */ b.jsx(
|
|
793
2255
|
"input",
|
|
794
2256
|
{
|
|
795
2257
|
type: "range",
|
|
796
2258
|
min: "0",
|
|
797
2259
|
max: "4",
|
|
798
2260
|
step: "1",
|
|
799
|
-
value:
|
|
800
|
-
onChange: (
|
|
2261
|
+
value: g.margin,
|
|
2262
|
+
onChange: (h) => p({ ...g, margin: Number(h.target.value) }),
|
|
801
2263
|
className: "qrcode-slider"
|
|
802
2264
|
}
|
|
803
2265
|
)
|
|
804
2266
|
] }),
|
|
805
|
-
/* @__PURE__ */
|
|
806
|
-
/* @__PURE__ */
|
|
807
|
-
/* @__PURE__ */
|
|
2267
|
+
/* @__PURE__ */ b.jsxs("div", { className: "qrcode-setting-item", children: [
|
|
2268
|
+
/* @__PURE__ */ b.jsx("label", { children: "前景色" }),
|
|
2269
|
+
/* @__PURE__ */ b.jsx(
|
|
808
2270
|
"input",
|
|
809
2271
|
{
|
|
810
2272
|
type: "color",
|
|
811
|
-
value:
|
|
812
|
-
onChange: (
|
|
2273
|
+
value: g.color,
|
|
2274
|
+
onChange: (h) => p({ ...g, color: h.target.value }),
|
|
813
2275
|
className: "qrcode-color-picker"
|
|
814
2276
|
}
|
|
815
2277
|
)
|
|
816
2278
|
] }),
|
|
817
|
-
/* @__PURE__ */
|
|
818
|
-
/* @__PURE__ */
|
|
819
|
-
/* @__PURE__ */
|
|
2279
|
+
/* @__PURE__ */ b.jsxs("div", { className: "qrcode-setting-item", children: [
|
|
2280
|
+
/* @__PURE__ */ b.jsx("label", { children: "背景色" }),
|
|
2281
|
+
/* @__PURE__ */ b.jsx(
|
|
820
2282
|
"input",
|
|
821
2283
|
{
|
|
822
2284
|
type: "color",
|
|
823
|
-
value:
|
|
824
|
-
onChange: (
|
|
2285
|
+
value: g.bgColor,
|
|
2286
|
+
onChange: (h) => p({ ...g, bgColor: h.target.value }),
|
|
825
2287
|
className: "qrcode-color-picker"
|
|
826
2288
|
}
|
|
827
2289
|
)
|
|
828
2290
|
] }),
|
|
829
|
-
/* @__PURE__ */
|
|
830
|
-
/* @__PURE__ */
|
|
831
|
-
/* @__PURE__ */
|
|
2291
|
+
/* @__PURE__ */ b.jsxs("div", { className: "qrcode-setting-item", children: [
|
|
2292
|
+
/* @__PURE__ */ b.jsx("label", { children: "容错率" }),
|
|
2293
|
+
/* @__PURE__ */ b.jsxs(
|
|
832
2294
|
"select",
|
|
833
2295
|
{
|
|
834
|
-
value:
|
|
835
|
-
onChange: (
|
|
2296
|
+
value: g.errorLevel,
|
|
2297
|
+
onChange: (h) => p({ ...g, errorLevel: h.target.value }),
|
|
836
2298
|
className: "qrcode-select",
|
|
837
2299
|
children: [
|
|
838
|
-
/* @__PURE__ */
|
|
839
|
-
/* @__PURE__ */
|
|
840
|
-
/* @__PURE__ */
|
|
841
|
-
/* @__PURE__ */
|
|
2300
|
+
/* @__PURE__ */ b.jsx("option", { value: "L", children: "L (7%)" }),
|
|
2301
|
+
/* @__PURE__ */ b.jsx("option", { value: "M", children: "M (15%)" }),
|
|
2302
|
+
/* @__PURE__ */ b.jsx("option", { value: "Q", children: "Q (25%)" }),
|
|
2303
|
+
/* @__PURE__ */ b.jsx("option", { value: "H", children: "H (30%)" })
|
|
842
2304
|
]
|
|
843
2305
|
}
|
|
844
2306
|
)
|
|
@@ -848,7 +2310,7 @@ function Rr({ onClose: E, onMinimize: C, onMaximize: y }) {
|
|
|
848
2310
|
] })
|
|
849
2311
|
] });
|
|
850
2312
|
}
|
|
851
|
-
const
|
|
2313
|
+
const sr = {
|
|
852
2314
|
id: "com.desktop-tool.plugin.qrcode",
|
|
853
2315
|
name: "二维码生成器",
|
|
854
2316
|
version: "1.0.0",
|
|
@@ -859,6 +2321,6 @@ const Er = {
|
|
|
859
2321
|
permissions: []
|
|
860
2322
|
};
|
|
861
2323
|
export {
|
|
862
|
-
|
|
863
|
-
|
|
2324
|
+
ar as default,
|
|
2325
|
+
sr as manifest
|
|
864
2326
|
};
|