@everymatrix/player-profile-info 1.92.1 → 1.92.3
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/components/{PlayerAccountBiometricsAction-BA9Ie2Za.js → PlayerAccountBiometricsAction-BAGMeJ7n.js} +1 -1
- package/components/{PlayerAccountBiometricsAction-BT9CnaZn.cjs → PlayerAccountBiometricsAction-C80Si6jU.cjs} +1 -1
- package/components/{PlayerAccountBiometricsAction-CdjRpYV-.js → PlayerAccountBiometricsAction-Dyt5-VKL.js} +1 -1
- package/components/{PlayerProfileInfo-CTEj5Rw2.js → PlayerProfileInfo-BD3Smhlz.js} +2 -2
- package/components/{PlayerProfileInfo-DWSJ3IK_.js → PlayerProfileInfo-D7JsveZr.js} +2 -2
- package/components/{PlayerProfileInfo-BjnZ5Gd8.cjs → PlayerProfileInfo-DeA5q7TR.cjs} +1 -1
- package/components/QrSessionGenerator-98YJa0kO.cjs +8 -0
- package/components/{QrSessionGenerator-BwR-VKzG.js → QrSessionGenerator-_j3dUSs4.js} +458 -465
- package/components/{QrSessionGenerator-B4KOHnOP.js → QrSessionGenerator-mkYXTmck.js} +487 -460
- package/es2015/player-profile-info.cjs +1 -1
- package/es2015/player-profile-info.js +1 -1
- package/esnext/player-profile-info.js +1 -1
- package/package.json +1 -1
- package/components/QrSessionGenerator-Cf0niVes.cjs +0 -8
|
@@ -1,47 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
a(n.next(l));
|
|
5
|
-
} catch (u) {
|
|
6
|
-
r(u);
|
|
7
|
-
}
|
|
8
|
-
}, s = (l) => {
|
|
9
|
-
try {
|
|
10
|
-
a(n.throw(l));
|
|
11
|
-
} catch (u) {
|
|
12
|
-
r(u);
|
|
13
|
-
}
|
|
14
|
-
}, a = (l) => l.done ? o(l.value) : Promise.resolve(l.value).then(i, s);
|
|
15
|
-
a((n = n.apply(e, t)).next());
|
|
16
|
-
});
|
|
17
|
-
import { a as Jt, $ as jt, S as Gt, i as Yt, s as qt, f as z, b as Wt, n as at, d as Z, k as ut, c as x, l as _, m as Xt, h as U, t as ct, y as bt, p as L, g as Zt, o as xt, z as $t, j as te, A as Bt, r as ee, u as ne, v as re, w as oe, x as ie } from "./PlayerProfileInfo-CTEj5Rw2.js";
|
|
18
|
-
function St(e, t) {
|
|
19
|
-
Jt(e, t);
|
|
1
|
+
import { a as Yt, $ as qt, S as Wt, i as Xt, s as Zt, f as z, b as xt, n as dt, d as tt, l as gt, e as et, m as P, p as $t, j as D, t as ht, y as At, q as _, h as te, z as ee, k as ne, A as Tt, v as re, w as oe, x as ie, c as se, u as ae } from "./PlayerProfileInfo-D7JsveZr.js";
|
|
2
|
+
function It(e, t) {
|
|
3
|
+
Yt(e, t);
|
|
20
4
|
}
|
|
21
|
-
function
|
|
22
|
-
|
|
5
|
+
function le(e) {
|
|
6
|
+
qt.set(e);
|
|
23
7
|
}
|
|
24
|
-
const
|
|
8
|
+
const Nt = {
|
|
25
9
|
en: {
|
|
26
10
|
titleQRSessionGenerator: "Scan the QR Code to access your account on retail devices.",
|
|
27
11
|
generateQRButton: "Generate QR",
|
|
28
12
|
unauthorized: "Authentication failed.",
|
|
29
13
|
failedToFetch: "Cannot generate QR, Please try again.",
|
|
30
|
-
unexpectedError: "Unexpected error occurred. Please try again later."
|
|
14
|
+
unexpectedError: "Unexpected error occurred. Please try again later.",
|
|
15
|
+
second: "s"
|
|
31
16
|
},
|
|
32
17
|
fr: {
|
|
33
18
|
titleQRSessionGenerator: "Scannez le code QR pour accéder à votre compte sur les appareils en magasin.",
|
|
34
19
|
generateQRButton: "Générer des QR",
|
|
35
20
|
unauthorized: "L'authentification a échoué.",
|
|
36
21
|
failedToFetch: "Impossible de générer le code QR, veuillez réessayer.",
|
|
37
|
-
unexpectedError: "Une erreur inattendue s'est produite. Veuillez réessayer plus tard."
|
|
22
|
+
unexpectedError: "Une erreur inattendue s'est produite. Veuillez réessayer plus tard.",
|
|
23
|
+
second: "s"
|
|
38
24
|
}
|
|
39
25
|
};
|
|
40
|
-
var
|
|
26
|
+
var G = {}, ue = function() {
|
|
41
27
|
return typeof Promise == "function" && Promise.prototype && Promise.prototype.then;
|
|
42
|
-
},
|
|
43
|
-
let
|
|
44
|
-
const
|
|
28
|
+
}, _t = {}, I = {};
|
|
29
|
+
let pt;
|
|
30
|
+
const ce = [
|
|
45
31
|
0,
|
|
46
32
|
// Not used
|
|
47
33
|
26,
|
|
@@ -85,34 +71,34 @@ const ae = [
|
|
|
85
71
|
3532,
|
|
86
72
|
3706
|
|
87
73
|
];
|
|
88
|
-
|
|
74
|
+
I.getSymbolSize = function(t) {
|
|
89
75
|
if (!t)
|
|
90
76
|
throw new Error('"version" cannot be null or undefined');
|
|
91
77
|
if (t < 1 || t > 40)
|
|
92
78
|
throw new Error('"version" should be in range from 1 to 40');
|
|
93
79
|
return t * 4 + 17;
|
|
94
80
|
};
|
|
95
|
-
|
|
96
|
-
return
|
|
81
|
+
I.getSymbolTotalCodewords = function(t) {
|
|
82
|
+
return ce[t];
|
|
97
83
|
};
|
|
98
|
-
|
|
84
|
+
I.getBCHDigit = function(e) {
|
|
99
85
|
let t = 0;
|
|
100
86
|
for (; e !== 0; )
|
|
101
87
|
t++, e >>>= 1;
|
|
102
88
|
return t;
|
|
103
89
|
};
|
|
104
|
-
|
|
90
|
+
I.setToSJISFunction = function(t) {
|
|
105
91
|
if (typeof t != "function")
|
|
106
92
|
throw new Error('"toSJISFunc" is not a valid function.');
|
|
107
|
-
|
|
93
|
+
pt = t;
|
|
108
94
|
};
|
|
109
|
-
|
|
110
|
-
return typeof
|
|
95
|
+
I.isKanjiModeEnabled = function() {
|
|
96
|
+
return typeof pt < "u";
|
|
111
97
|
};
|
|
112
|
-
|
|
113
|
-
return
|
|
98
|
+
I.toSJIS = function(t) {
|
|
99
|
+
return pt(t);
|
|
114
100
|
};
|
|
115
|
-
var
|
|
101
|
+
var nt = {};
|
|
116
102
|
(function(e) {
|
|
117
103
|
e.L = { bit: 1 }, e.M = { bit: 0 }, e.Q = { bit: 3 }, e.H = { bit: 2 };
|
|
118
104
|
function t(n) {
|
|
@@ -136,21 +122,21 @@ var $ = {};
|
|
|
136
122
|
}
|
|
137
123
|
}
|
|
138
124
|
e.isValid = function(o) {
|
|
139
|
-
return o && typeof o.bit
|
|
125
|
+
return o && typeof o.bit < "u" && o.bit >= 0 && o.bit < 4;
|
|
140
126
|
}, e.from = function(o, r) {
|
|
141
127
|
if (e.isValid(o))
|
|
142
128
|
return o;
|
|
143
129
|
try {
|
|
144
130
|
return t(o);
|
|
145
|
-
} catch
|
|
131
|
+
} catch {
|
|
146
132
|
return r;
|
|
147
133
|
}
|
|
148
134
|
};
|
|
149
|
-
})(
|
|
150
|
-
function
|
|
135
|
+
})(nt);
|
|
136
|
+
function Lt() {
|
|
151
137
|
this.buffer = [], this.length = 0;
|
|
152
138
|
}
|
|
153
|
-
|
|
139
|
+
Lt.prototype = {
|
|
154
140
|
get: function(e) {
|
|
155
141
|
const t = Math.floor(e / 8);
|
|
156
142
|
return (this.buffer[t] >>> 7 - e % 8 & 1) === 1;
|
|
@@ -167,28 +153,28 @@ Mt.prototype = {
|
|
|
167
153
|
this.buffer.length <= t && this.buffer.push(0), e && (this.buffer[t] |= 128 >>> this.length % 8), this.length++;
|
|
168
154
|
}
|
|
169
155
|
};
|
|
170
|
-
var
|
|
171
|
-
function
|
|
156
|
+
var fe = Lt;
|
|
157
|
+
function Y(e) {
|
|
172
158
|
if (!e || e < 1)
|
|
173
159
|
throw new Error("BitMatrix size must be defined and greater than 0");
|
|
174
160
|
this.size = e, this.data = new Uint8Array(e * e), this.reservedBit = new Uint8Array(e * e);
|
|
175
161
|
}
|
|
176
|
-
|
|
162
|
+
Y.prototype.set = function(e, t, n, o) {
|
|
177
163
|
const r = e * this.size + t;
|
|
178
164
|
this.data[r] = n, o && (this.reservedBit[r] = !0);
|
|
179
165
|
};
|
|
180
|
-
|
|
166
|
+
Y.prototype.get = function(e, t) {
|
|
181
167
|
return this.data[e * this.size + t];
|
|
182
168
|
};
|
|
183
|
-
|
|
169
|
+
Y.prototype.xor = function(e, t, n) {
|
|
184
170
|
this.data[e * this.size + t] ^= n;
|
|
185
171
|
};
|
|
186
|
-
|
|
172
|
+
Y.prototype.isReserved = function(e, t) {
|
|
187
173
|
return this.reservedBit[e * this.size + t];
|
|
188
174
|
};
|
|
189
|
-
var
|
|
175
|
+
var de = Y, Ut = {};
|
|
190
176
|
(function(e) {
|
|
191
|
-
const t =
|
|
177
|
+
const t = I.getSymbolSize;
|
|
192
178
|
e.getRowColCoords = function(o) {
|
|
193
179
|
if (o === 1)
|
|
194
180
|
return [];
|
|
@@ -205,21 +191,21 @@ var ce = G, Pt = {};
|
|
|
205
191
|
a === s - 1 && l === 0 || r.push([i[a], i[l]]);
|
|
206
192
|
return r;
|
|
207
193
|
};
|
|
208
|
-
})(
|
|
209
|
-
var
|
|
210
|
-
const
|
|
211
|
-
|
|
212
|
-
const n =
|
|
194
|
+
})(Ut);
|
|
195
|
+
var Dt = {};
|
|
196
|
+
const ge = I.getSymbolSize, Rt = 7;
|
|
197
|
+
Dt.getPositions = function(t) {
|
|
198
|
+
const n = ge(t);
|
|
213
199
|
return [
|
|
214
200
|
// top-left
|
|
215
201
|
[0, 0],
|
|
216
202
|
// top-right
|
|
217
|
-
[n -
|
|
203
|
+
[n - Rt, 0],
|
|
218
204
|
// bottom-left
|
|
219
|
-
[0, n -
|
|
205
|
+
[0, n - Rt]
|
|
220
206
|
];
|
|
221
207
|
};
|
|
222
|
-
var
|
|
208
|
+
var kt = {};
|
|
223
209
|
(function(e) {
|
|
224
210
|
e.Patterns = {
|
|
225
211
|
PATTERN000: 0,
|
|
@@ -243,12 +229,12 @@ var Lt = {};
|
|
|
243
229
|
return e.isValid(r) ? parseInt(r, 10) : void 0;
|
|
244
230
|
}, e.getPenaltyN1 = function(r) {
|
|
245
231
|
const i = r.size;
|
|
246
|
-
let s = 0, a = 0, l = 0,
|
|
232
|
+
let s = 0, a = 0, l = 0, f = null, c = null;
|
|
247
233
|
for (let b = 0; b < i; b++) {
|
|
248
|
-
a = l = 0,
|
|
234
|
+
a = l = 0, f = c = null;
|
|
249
235
|
for (let d = 0; d < i; d++) {
|
|
250
236
|
let g = r.get(b, d);
|
|
251
|
-
g ===
|
|
237
|
+
g === f ? a++ : (a >= 5 && (s += t.N1 + (a - 5)), f = g, a = 1), g = r.get(d, b), g === c ? l++ : (l >= 5 && (s += t.N1 + (l - 5)), c = g, l = 1);
|
|
252
238
|
}
|
|
253
239
|
a >= 5 && (s += t.N1 + (a - 5)), l >= 5 && (s += t.N1 + (l - 5));
|
|
254
240
|
}
|
|
@@ -258,17 +244,17 @@ var Lt = {};
|
|
|
258
244
|
let s = 0;
|
|
259
245
|
for (let a = 0; a < i - 1; a++)
|
|
260
246
|
for (let l = 0; l < i - 1; l++) {
|
|
261
|
-
const
|
|
262
|
-
(
|
|
247
|
+
const f = r.get(a, l) + r.get(a, l + 1) + r.get(a + 1, l) + r.get(a + 1, l + 1);
|
|
248
|
+
(f === 4 || f === 0) && s++;
|
|
263
249
|
}
|
|
264
250
|
return s * t.N2;
|
|
265
251
|
}, e.getPenaltyN3 = function(r) {
|
|
266
252
|
const i = r.size;
|
|
267
253
|
let s = 0, a = 0, l = 0;
|
|
268
|
-
for (let
|
|
254
|
+
for (let f = 0; f < i; f++) {
|
|
269
255
|
a = l = 0;
|
|
270
256
|
for (let c = 0; c < i; c++)
|
|
271
|
-
a = a << 1 & 2047 | r.get(
|
|
257
|
+
a = a << 1 & 2047 | r.get(f, c), c >= 10 && (a === 1488 || a === 93) && s++, l = l << 1 & 2047 | r.get(c, f), c >= 10 && (l === 1488 || l === 93) && s++;
|
|
272
258
|
}
|
|
273
259
|
return s * t.N3;
|
|
274
260
|
}, e.getPenaltyN4 = function(r) {
|
|
@@ -308,16 +294,16 @@ var Lt = {};
|
|
|
308
294
|
}, e.getBestMask = function(r, i) {
|
|
309
295
|
const s = Object.keys(e.Patterns).length;
|
|
310
296
|
let a = 0, l = 1 / 0;
|
|
311
|
-
for (let
|
|
312
|
-
i(
|
|
297
|
+
for (let f = 0; f < s; f++) {
|
|
298
|
+
i(f), e.applyMask(f, r);
|
|
313
299
|
const c = e.getPenaltyN1(r) + e.getPenaltyN2(r) + e.getPenaltyN3(r) + e.getPenaltyN4(r);
|
|
314
|
-
e.applyMask(
|
|
300
|
+
e.applyMask(f, r), c < l && (l = c, a = f);
|
|
315
301
|
}
|
|
316
302
|
return a;
|
|
317
303
|
};
|
|
318
|
-
})(
|
|
319
|
-
var
|
|
320
|
-
const
|
|
304
|
+
})(kt);
|
|
305
|
+
var rt = {};
|
|
306
|
+
const k = nt, W = [
|
|
321
307
|
// L M Q H
|
|
322
308
|
1,
|
|
323
309
|
1,
|
|
@@ -479,7 +465,7 @@ const D = $, Y = [
|
|
|
479
465
|
49,
|
|
480
466
|
68,
|
|
481
467
|
81
|
|
482
|
-
],
|
|
468
|
+
], X = [
|
|
483
469
|
// L M Q H
|
|
484
470
|
7,
|
|
485
471
|
10,
|
|
@@ -642,56 +628,56 @@ const D = $, Y = [
|
|
|
642
628
|
2040,
|
|
643
629
|
2430
|
|
644
630
|
];
|
|
645
|
-
|
|
631
|
+
rt.getBlocksCount = function(t, n) {
|
|
646
632
|
switch (n) {
|
|
647
|
-
case
|
|
648
|
-
return
|
|
649
|
-
case
|
|
650
|
-
return
|
|
651
|
-
case
|
|
652
|
-
return
|
|
653
|
-
case
|
|
654
|
-
return
|
|
633
|
+
case k.L:
|
|
634
|
+
return W[(t - 1) * 4 + 0];
|
|
635
|
+
case k.M:
|
|
636
|
+
return W[(t - 1) * 4 + 1];
|
|
637
|
+
case k.Q:
|
|
638
|
+
return W[(t - 1) * 4 + 2];
|
|
639
|
+
case k.H:
|
|
640
|
+
return W[(t - 1) * 4 + 3];
|
|
655
641
|
default:
|
|
656
642
|
return;
|
|
657
643
|
}
|
|
658
644
|
};
|
|
659
|
-
|
|
645
|
+
rt.getTotalCodewordsCount = function(t, n) {
|
|
660
646
|
switch (n) {
|
|
661
|
-
case
|
|
662
|
-
return
|
|
663
|
-
case
|
|
664
|
-
return
|
|
665
|
-
case
|
|
666
|
-
return
|
|
667
|
-
case
|
|
668
|
-
return
|
|
647
|
+
case k.L:
|
|
648
|
+
return X[(t - 1) * 4 + 0];
|
|
649
|
+
case k.M:
|
|
650
|
+
return X[(t - 1) * 4 + 1];
|
|
651
|
+
case k.Q:
|
|
652
|
+
return X[(t - 1) * 4 + 2];
|
|
653
|
+
case k.H:
|
|
654
|
+
return X[(t - 1) * 4 + 3];
|
|
669
655
|
default:
|
|
670
656
|
return;
|
|
671
657
|
}
|
|
672
658
|
};
|
|
673
|
-
var
|
|
674
|
-
const
|
|
659
|
+
var Ft = {}, ot = {};
|
|
660
|
+
const J = new Uint8Array(512), x = new Uint8Array(256);
|
|
675
661
|
(function() {
|
|
676
662
|
let t = 1;
|
|
677
663
|
for (let n = 0; n < 255; n++)
|
|
678
|
-
|
|
664
|
+
J[n] = t, x[t] = n, t <<= 1, t & 256 && (t ^= 285);
|
|
679
665
|
for (let n = 255; n < 512; n++)
|
|
680
|
-
|
|
666
|
+
J[n] = J[n - 255];
|
|
681
667
|
})();
|
|
682
|
-
|
|
668
|
+
ot.log = function(t) {
|
|
683
669
|
if (t < 1)
|
|
684
670
|
throw new Error("log(" + t + ")");
|
|
685
|
-
return
|
|
671
|
+
return x[t];
|
|
686
672
|
};
|
|
687
|
-
|
|
688
|
-
return
|
|
673
|
+
ot.exp = function(t) {
|
|
674
|
+
return J[t];
|
|
689
675
|
};
|
|
690
|
-
|
|
691
|
-
return t === 0 || n === 0 ? 0 :
|
|
676
|
+
ot.mul = function(t, n) {
|
|
677
|
+
return t === 0 || n === 0 ? 0 : J[x[t] + x[n]];
|
|
692
678
|
};
|
|
693
679
|
(function(e) {
|
|
694
|
-
const t =
|
|
680
|
+
const t = ot;
|
|
695
681
|
e.mul = function(o, r) {
|
|
696
682
|
const i = new Uint8Array(o.length + r.length - 1);
|
|
697
683
|
for (let s = 0; s < o.length; s++)
|
|
@@ -716,53 +702,53 @@ et.mul = function(t, n) {
|
|
|
716
702
|
r = e.mul(r, new Uint8Array([1, t.exp(i)]));
|
|
717
703
|
return r;
|
|
718
704
|
};
|
|
719
|
-
})(
|
|
720
|
-
const
|
|
721
|
-
function
|
|
705
|
+
})(Ft);
|
|
706
|
+
const zt = Ft;
|
|
707
|
+
function Ct(e) {
|
|
722
708
|
this.genPoly = void 0, this.degree = e, this.degree && this.initialize(this.degree);
|
|
723
709
|
}
|
|
724
|
-
|
|
725
|
-
this.degree = t, this.genPoly =
|
|
710
|
+
Ct.prototype.initialize = function(t) {
|
|
711
|
+
this.degree = t, this.genPoly = zt.generateECPolynomial(this.degree);
|
|
726
712
|
};
|
|
727
|
-
|
|
713
|
+
Ct.prototype.encode = function(t) {
|
|
728
714
|
if (!this.genPoly)
|
|
729
715
|
throw new Error("Encoder not initialized");
|
|
730
716
|
const n = new Uint8Array(t.length + this.degree);
|
|
731
717
|
n.set(t);
|
|
732
|
-
const o =
|
|
718
|
+
const o = zt.mod(n, this.genPoly), r = this.degree - o.length;
|
|
733
719
|
if (r > 0) {
|
|
734
720
|
const i = new Uint8Array(this.degree);
|
|
735
721
|
return i.set(o, r), i;
|
|
736
722
|
}
|
|
737
723
|
return o;
|
|
738
724
|
};
|
|
739
|
-
var
|
|
740
|
-
|
|
725
|
+
var he = Ct, vt = {}, F = {}, bt = {};
|
|
726
|
+
bt.isValid = function(t) {
|
|
741
727
|
return !isNaN(t) && t >= 1 && t <= 40;
|
|
742
728
|
};
|
|
743
|
-
var
|
|
744
|
-
const
|
|
745
|
-
let
|
|
746
|
-
|
|
747
|
-
const
|
|
729
|
+
var M = {};
|
|
730
|
+
const Vt = "[0-9]+", me = "[A-Z $%*+\\-./:]+";
|
|
731
|
+
let j = "(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";
|
|
732
|
+
j = j.replace(/u/g, "\\u");
|
|
733
|
+
const we = "(?:(?![A-Z0-9 $%*+\\-./:]|" + j + `)(?:.|[\r
|
|
748
734
|
]))+`;
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
const
|
|
755
|
-
|
|
756
|
-
return
|
|
735
|
+
M.KANJI = new RegExp(j, "g");
|
|
736
|
+
M.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g");
|
|
737
|
+
M.BYTE = new RegExp(we, "g");
|
|
738
|
+
M.NUMERIC = new RegExp(Vt, "g");
|
|
739
|
+
M.ALPHANUMERIC = new RegExp(me, "g");
|
|
740
|
+
const ye = new RegExp("^" + j + "$"), Ee = new RegExp("^" + Vt + "$"), pe = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
|
|
741
|
+
M.testKanji = function(t) {
|
|
742
|
+
return ye.test(t);
|
|
757
743
|
};
|
|
758
|
-
|
|
759
|
-
return
|
|
744
|
+
M.testNumeric = function(t) {
|
|
745
|
+
return Ee.test(t);
|
|
760
746
|
};
|
|
761
|
-
|
|
762
|
-
return
|
|
747
|
+
M.testAlphanumeric = function(t) {
|
|
748
|
+
return pe.test(t);
|
|
763
749
|
};
|
|
764
750
|
(function(e) {
|
|
765
|
-
const t =
|
|
751
|
+
const t = bt, n = M;
|
|
766
752
|
e.NUMERIC = {
|
|
767
753
|
id: "Numeric",
|
|
768
754
|
bit: 1,
|
|
@@ -817,88 +803,88 @@ P.testAlphanumeric = function(t) {
|
|
|
817
803
|
return i;
|
|
818
804
|
try {
|
|
819
805
|
return o(i);
|
|
820
|
-
} catch
|
|
806
|
+
} catch {
|
|
821
807
|
return s;
|
|
822
808
|
}
|
|
823
809
|
};
|
|
824
|
-
})(
|
|
810
|
+
})(F);
|
|
825
811
|
(function(e) {
|
|
826
|
-
const t =
|
|
827
|
-
function l(d, g,
|
|
828
|
-
for (let
|
|
829
|
-
if (g <= e.getCapacity(
|
|
830
|
-
return
|
|
812
|
+
const t = I, n = rt, o = nt, r = F, i = bt, s = 7973, a = t.getBCHDigit(s);
|
|
813
|
+
function l(d, g, h) {
|
|
814
|
+
for (let m = 1; m <= 40; m++)
|
|
815
|
+
if (g <= e.getCapacity(m, h, d))
|
|
816
|
+
return m;
|
|
831
817
|
}
|
|
832
|
-
function
|
|
818
|
+
function f(d, g) {
|
|
833
819
|
return r.getCharCountIndicator(d, g) + 4;
|
|
834
820
|
}
|
|
835
821
|
function c(d, g) {
|
|
836
|
-
let
|
|
837
|
-
return d.forEach(function(
|
|
838
|
-
const
|
|
839
|
-
|
|
840
|
-
}),
|
|
822
|
+
let h = 0;
|
|
823
|
+
return d.forEach(function(m) {
|
|
824
|
+
const C = f(m.mode, g);
|
|
825
|
+
h += C + m.getBitsLength();
|
|
826
|
+
}), h;
|
|
841
827
|
}
|
|
842
828
|
function b(d, g) {
|
|
843
|
-
for (let
|
|
844
|
-
if (c(d,
|
|
845
|
-
return
|
|
829
|
+
for (let h = 1; h <= 40; h++)
|
|
830
|
+
if (c(d, h) <= e.getCapacity(h, g, r.MIXED))
|
|
831
|
+
return h;
|
|
846
832
|
}
|
|
847
|
-
e.from = function(g,
|
|
848
|
-
return i.isValid(g) ? parseInt(g, 10) :
|
|
849
|
-
}, e.getCapacity = function(g,
|
|
833
|
+
e.from = function(g, h) {
|
|
834
|
+
return i.isValid(g) ? parseInt(g, 10) : h;
|
|
835
|
+
}, e.getCapacity = function(g, h, m) {
|
|
850
836
|
if (!i.isValid(g))
|
|
851
837
|
throw new Error("Invalid QR Code version");
|
|
852
|
-
typeof
|
|
853
|
-
const
|
|
854
|
-
if (
|
|
855
|
-
return
|
|
856
|
-
const
|
|
857
|
-
switch (
|
|
838
|
+
typeof m > "u" && (m = r.BYTE);
|
|
839
|
+
const C = t.getSymbolTotalCodewords(g), u = n.getTotalCodewordsCount(g, h), w = (C - u) * 8;
|
|
840
|
+
if (m === r.MIXED)
|
|
841
|
+
return w;
|
|
842
|
+
const E = w - f(m, g);
|
|
843
|
+
switch (m) {
|
|
858
844
|
case r.NUMERIC:
|
|
859
|
-
return Math.floor(
|
|
845
|
+
return Math.floor(E / 10 * 3);
|
|
860
846
|
case r.ALPHANUMERIC:
|
|
861
|
-
return Math.floor(
|
|
847
|
+
return Math.floor(E / 11 * 2);
|
|
862
848
|
case r.KANJI:
|
|
863
|
-
return Math.floor(
|
|
849
|
+
return Math.floor(E / 13);
|
|
864
850
|
case r.BYTE:
|
|
865
851
|
default:
|
|
866
|
-
return Math.floor(
|
|
852
|
+
return Math.floor(E / 8);
|
|
867
853
|
}
|
|
868
|
-
}, e.getBestVersionForData = function(g,
|
|
869
|
-
let
|
|
870
|
-
const
|
|
854
|
+
}, e.getBestVersionForData = function(g, h) {
|
|
855
|
+
let m;
|
|
856
|
+
const C = o.from(h, o.M);
|
|
871
857
|
if (Array.isArray(g)) {
|
|
872
858
|
if (g.length > 1)
|
|
873
|
-
return b(g,
|
|
859
|
+
return b(g, C);
|
|
874
860
|
if (g.length === 0)
|
|
875
861
|
return 1;
|
|
876
|
-
|
|
862
|
+
m = g[0];
|
|
877
863
|
} else
|
|
878
|
-
|
|
879
|
-
return l(
|
|
864
|
+
m = g;
|
|
865
|
+
return l(m.mode, m.getLength(), C);
|
|
880
866
|
}, e.getEncodedBits = function(g) {
|
|
881
867
|
if (!i.isValid(g) || g < 7)
|
|
882
868
|
throw new Error("Invalid QR Code version");
|
|
883
|
-
let
|
|
884
|
-
for (; t.getBCHDigit(
|
|
885
|
-
|
|
886
|
-
return g << 12 |
|
|
869
|
+
let h = g << 12;
|
|
870
|
+
for (; t.getBCHDigit(h) - a >= 0; )
|
|
871
|
+
h ^= s << t.getBCHDigit(h) - a;
|
|
872
|
+
return g << 12 | h;
|
|
887
873
|
};
|
|
888
|
-
})(
|
|
889
|
-
var
|
|
890
|
-
const
|
|
891
|
-
|
|
874
|
+
})(vt);
|
|
875
|
+
var Ht = {};
|
|
876
|
+
const mt = I, Ot = 1335, Ce = 21522, Mt = mt.getBCHDigit(Ot);
|
|
877
|
+
Ht.getEncodedBits = function(t, n) {
|
|
892
878
|
const o = t.bit << 3 | n;
|
|
893
879
|
let r = o << 10;
|
|
894
|
-
for (;
|
|
895
|
-
r ^=
|
|
880
|
+
for (; mt.getBCHDigit(r) - Mt >= 0; )
|
|
881
|
+
r ^= Ot << mt.getBCHDigit(r) - Mt;
|
|
896
882
|
return (o << 10 | r) ^ Ce;
|
|
897
883
|
};
|
|
898
|
-
var
|
|
899
|
-
const
|
|
884
|
+
var Qt = {};
|
|
885
|
+
const be = F;
|
|
900
886
|
function v(e) {
|
|
901
|
-
this.mode =
|
|
887
|
+
this.mode = be.NUMERIC, this.data = e.toString();
|
|
902
888
|
}
|
|
903
889
|
v.getBitsLength = function(t) {
|
|
904
890
|
return 10 * Math.floor(t / 3) + (t % 3 ? t % 3 * 3 + 1 : 0);
|
|
@@ -916,8 +902,8 @@ v.prototype.write = function(t) {
|
|
|
916
902
|
const i = this.data.length - n;
|
|
917
903
|
i > 0 && (o = this.data.substr(n), r = parseInt(o, 10), t.put(r, i * 3 + 1));
|
|
918
904
|
};
|
|
919
|
-
var
|
|
920
|
-
const
|
|
905
|
+
var Be = v;
|
|
906
|
+
const Se = F, at = [
|
|
921
907
|
"0",
|
|
922
908
|
"1",
|
|
923
909
|
"2",
|
|
@@ -965,7 +951,7 @@ const be = k, rt = [
|
|
|
965
951
|
":"
|
|
966
952
|
];
|
|
967
953
|
function V(e) {
|
|
968
|
-
this.mode =
|
|
954
|
+
this.mode = Se.ALPHANUMERIC, this.data = e;
|
|
969
955
|
}
|
|
970
956
|
V.getBitsLength = function(t) {
|
|
971
957
|
return 11 * Math.floor(t / 2) + 6 * (t % 2);
|
|
@@ -979,15 +965,15 @@ V.prototype.getBitsLength = function() {
|
|
|
979
965
|
V.prototype.write = function(t) {
|
|
980
966
|
let n;
|
|
981
967
|
for (n = 0; n + 2 <= this.data.length; n += 2) {
|
|
982
|
-
let o =
|
|
983
|
-
o +=
|
|
968
|
+
let o = at.indexOf(this.data[n]) * 45;
|
|
969
|
+
o += at.indexOf(this.data[n + 1]), t.put(o, 11);
|
|
984
970
|
}
|
|
985
|
-
this.data.length % 2 && t.put(
|
|
971
|
+
this.data.length % 2 && t.put(at.indexOf(this.data[n]), 6);
|
|
986
972
|
};
|
|
987
|
-
var
|
|
988
|
-
const
|
|
973
|
+
var Ae = V;
|
|
974
|
+
const Te = F;
|
|
989
975
|
function H(e) {
|
|
990
|
-
this.mode =
|
|
976
|
+
this.mode = Te.BYTE, typeof e == "string" ? this.data = new TextEncoder().encode(e) : this.data = new Uint8Array(e);
|
|
991
977
|
}
|
|
992
978
|
H.getBitsLength = function(t) {
|
|
993
979
|
return t * 8;
|
|
@@ -1002,10 +988,10 @@ H.prototype.write = function(e) {
|
|
|
1002
988
|
for (let t = 0, n = this.data.length; t < n; t++)
|
|
1003
989
|
e.put(this.data[t], 8);
|
|
1004
990
|
};
|
|
1005
|
-
var
|
|
1006
|
-
const
|
|
991
|
+
var Ie = H;
|
|
992
|
+
const Ne = F, Re = I;
|
|
1007
993
|
function O(e) {
|
|
1008
|
-
this.mode =
|
|
994
|
+
this.mode = Ne.KANJI, this.data = e;
|
|
1009
995
|
}
|
|
1010
996
|
O.getBitsLength = function(t) {
|
|
1011
997
|
return t * 13;
|
|
@@ -1019,7 +1005,7 @@ O.prototype.getBitsLength = function() {
|
|
|
1019
1005
|
O.prototype.write = function(e) {
|
|
1020
1006
|
let t;
|
|
1021
1007
|
for (t = 0; t < this.data.length; t++) {
|
|
1022
|
-
let n =
|
|
1008
|
+
let n = Re.toSJIS(this.data[t]);
|
|
1023
1009
|
if (n >= 33088 && n <= 40956)
|
|
1024
1010
|
n -= 33088;
|
|
1025
1011
|
else if (n >= 57408 && n <= 60351)
|
|
@@ -1032,7 +1018,7 @@ Make sure your charset is UTF-8`
|
|
|
1032
1018
|
n = (n >>> 8 & 255) * 192 + (n & 255), e.put(n, 13);
|
|
1033
1019
|
}
|
|
1034
1020
|
};
|
|
1035
|
-
var
|
|
1021
|
+
var Me = O, Kt = { exports: {} };
|
|
1036
1022
|
(function(e) {
|
|
1037
1023
|
var t = {
|
|
1038
1024
|
single_source_shortest_paths: function(n, o, r) {
|
|
@@ -1040,14 +1026,14 @@ var Ne = O, Ht = { exports: {} };
|
|
|
1040
1026
|
s[o] = 0;
|
|
1041
1027
|
var a = t.PriorityQueue.make();
|
|
1042
1028
|
a.push(o, 0);
|
|
1043
|
-
for (var l,
|
|
1044
|
-
l = a.pop(),
|
|
1029
|
+
for (var l, f, c, b, d, g, h, m, C; !a.empty(); ) {
|
|
1030
|
+
l = a.pop(), f = l.value, b = l.cost, d = n[f] || {};
|
|
1045
1031
|
for (c in d)
|
|
1046
|
-
d.hasOwnProperty(c) && (g = d[c],
|
|
1032
|
+
d.hasOwnProperty(c) && (g = d[c], h = b + g, m = s[c], C = typeof s[c] > "u", (C || m > h) && (s[c] = h, a.push(c, h), i[c] = f));
|
|
1047
1033
|
}
|
|
1048
|
-
if (typeof r
|
|
1049
|
-
var
|
|
1050
|
-
throw new Error(
|
|
1034
|
+
if (typeof r < "u" && typeof s[r] > "u") {
|
|
1035
|
+
var u = ["Could not find a path from ", o, " to ", r, "."].join("");
|
|
1036
|
+
throw new Error(u);
|
|
1051
1037
|
}
|
|
1052
1038
|
return i;
|
|
1053
1039
|
},
|
|
@@ -1097,29 +1083,29 @@ var Ne = O, Ht = { exports: {} };
|
|
|
1097
1083
|
}
|
|
1098
1084
|
};
|
|
1099
1085
|
e.exports = t;
|
|
1100
|
-
})(
|
|
1101
|
-
var
|
|
1086
|
+
})(Kt);
|
|
1087
|
+
var Pe = Kt.exports;
|
|
1102
1088
|
(function(e) {
|
|
1103
|
-
const t =
|
|
1104
|
-
function u
|
|
1105
|
-
return unescape(encodeURIComponent(
|
|
1089
|
+
const t = F, n = Be, o = Ae, r = Ie, i = Me, s = M, a = I, l = Pe;
|
|
1090
|
+
function f(u) {
|
|
1091
|
+
return unescape(encodeURIComponent(u)).length;
|
|
1106
1092
|
}
|
|
1107
|
-
function c(
|
|
1093
|
+
function c(u, w, E) {
|
|
1108
1094
|
const y = [];
|
|
1109
1095
|
let B;
|
|
1110
|
-
for (; (B =
|
|
1096
|
+
for (; (B = u.exec(E)) !== null; )
|
|
1111
1097
|
y.push({
|
|
1112
1098
|
data: B[0],
|
|
1113
1099
|
index: B.index,
|
|
1114
|
-
mode:
|
|
1100
|
+
mode: w,
|
|
1115
1101
|
length: B[0].length
|
|
1116
1102
|
});
|
|
1117
1103
|
return y;
|
|
1118
1104
|
}
|
|
1119
|
-
function b(
|
|
1120
|
-
const
|
|
1105
|
+
function b(u) {
|
|
1106
|
+
const w = c(s.NUMERIC, t.NUMERIC, u), E = c(s.ALPHANUMERIC, t.ALPHANUMERIC, u);
|
|
1121
1107
|
let y, B;
|
|
1122
|
-
return a.isKanjiModeEnabled() ? (y = c(s.BYTE, t.BYTE,
|
|
1108
|
+
return a.isKanjiModeEnabled() ? (y = c(s.BYTE, t.BYTE, u), B = c(s.KANJI, t.KANJI, u)) : (y = c(s.BYTE_KANJI, t.BYTE, u), B = []), w.concat(E, y, B).sort(function(A, T) {
|
|
1123
1109
|
return A.index - T.index;
|
|
1124
1110
|
}).map(function(A) {
|
|
1125
1111
|
return {
|
|
@@ -1129,110 +1115,110 @@ var Re = Ht.exports;
|
|
|
1129
1115
|
};
|
|
1130
1116
|
});
|
|
1131
1117
|
}
|
|
1132
|
-
function d(
|
|
1133
|
-
switch (
|
|
1118
|
+
function d(u, w) {
|
|
1119
|
+
switch (w) {
|
|
1134
1120
|
case t.NUMERIC:
|
|
1135
|
-
return n.getBitsLength(
|
|
1121
|
+
return n.getBitsLength(u);
|
|
1136
1122
|
case t.ALPHANUMERIC:
|
|
1137
|
-
return o.getBitsLength(
|
|
1123
|
+
return o.getBitsLength(u);
|
|
1138
1124
|
case t.KANJI:
|
|
1139
|
-
return i.getBitsLength(
|
|
1125
|
+
return i.getBitsLength(u);
|
|
1140
1126
|
case t.BYTE:
|
|
1141
|
-
return r.getBitsLength(
|
|
1127
|
+
return r.getBitsLength(u);
|
|
1142
1128
|
}
|
|
1143
1129
|
}
|
|
1144
|
-
function g(
|
|
1145
|
-
return
|
|
1146
|
-
const y =
|
|
1147
|
-
return y && y.mode ===
|
|
1130
|
+
function g(u) {
|
|
1131
|
+
return u.reduce(function(w, E) {
|
|
1132
|
+
const y = w.length - 1 >= 0 ? w[w.length - 1] : null;
|
|
1133
|
+
return y && y.mode === E.mode ? (w[w.length - 1].data += E.data, w) : (w.push(E), w);
|
|
1148
1134
|
}, []);
|
|
1149
1135
|
}
|
|
1150
|
-
function
|
|
1151
|
-
const
|
|
1152
|
-
for (let
|
|
1153
|
-
const y =
|
|
1136
|
+
function h(u) {
|
|
1137
|
+
const w = [];
|
|
1138
|
+
for (let E = 0; E < u.length; E++) {
|
|
1139
|
+
const y = u[E];
|
|
1154
1140
|
switch (y.mode) {
|
|
1155
1141
|
case t.NUMERIC:
|
|
1156
|
-
|
|
1142
|
+
w.push([
|
|
1157
1143
|
y,
|
|
1158
1144
|
{ data: y.data, mode: t.ALPHANUMERIC, length: y.length },
|
|
1159
1145
|
{ data: y.data, mode: t.BYTE, length: y.length }
|
|
1160
1146
|
]);
|
|
1161
1147
|
break;
|
|
1162
1148
|
case t.ALPHANUMERIC:
|
|
1163
|
-
|
|
1149
|
+
w.push([
|
|
1164
1150
|
y,
|
|
1165
1151
|
{ data: y.data, mode: t.BYTE, length: y.length }
|
|
1166
1152
|
]);
|
|
1167
1153
|
break;
|
|
1168
1154
|
case t.KANJI:
|
|
1169
|
-
|
|
1155
|
+
w.push([
|
|
1170
1156
|
y,
|
|
1171
|
-
{ data: y.data, mode: t.BYTE, length:
|
|
1157
|
+
{ data: y.data, mode: t.BYTE, length: f(y.data) }
|
|
1172
1158
|
]);
|
|
1173
1159
|
break;
|
|
1174
1160
|
case t.BYTE:
|
|
1175
|
-
|
|
1176
|
-
{ data: y.data, mode: t.BYTE, length:
|
|
1161
|
+
w.push([
|
|
1162
|
+
{ data: y.data, mode: t.BYTE, length: f(y.data) }
|
|
1177
1163
|
]);
|
|
1178
1164
|
}
|
|
1179
1165
|
}
|
|
1180
|
-
return
|
|
1166
|
+
return w;
|
|
1181
1167
|
}
|
|
1182
|
-
function
|
|
1183
|
-
const
|
|
1168
|
+
function m(u, w) {
|
|
1169
|
+
const E = {}, y = { start: {} };
|
|
1184
1170
|
let B = ["start"];
|
|
1185
|
-
for (let S = 0; S <
|
|
1186
|
-
const A =
|
|
1187
|
-
for (let
|
|
1188
|
-
const
|
|
1189
|
-
T.push(
|
|
1190
|
-
for (let
|
|
1191
|
-
const
|
|
1192
|
-
|
|
1171
|
+
for (let S = 0; S < u.length; S++) {
|
|
1172
|
+
const A = u[S], T = [];
|
|
1173
|
+
for (let N = 0; N < A.length; N++) {
|
|
1174
|
+
const R = A[N], L = "" + S + N;
|
|
1175
|
+
T.push(L), E[L] = { node: R, lastCount: 0 }, y[L] = {};
|
|
1176
|
+
for (let Q = 0; Q < B.length; Q++) {
|
|
1177
|
+
const p = B[Q];
|
|
1178
|
+
E[p] && E[p].node.mode === R.mode ? (y[p][L] = d(E[p].lastCount + R.length, R.mode) - d(E[p].lastCount, R.mode), E[p].lastCount += R.length) : (E[p] && (E[p].lastCount = R.length), y[p][L] = d(R.length, R.mode) + 4 + t.getCharCountIndicator(R.mode, w));
|
|
1193
1179
|
}
|
|
1194
1180
|
}
|
|
1195
1181
|
B = T;
|
|
1196
1182
|
}
|
|
1197
1183
|
for (let S = 0; S < B.length; S++)
|
|
1198
1184
|
y[B[S]].end = 0;
|
|
1199
|
-
return { map: y, table:
|
|
1185
|
+
return { map: y, table: E };
|
|
1200
1186
|
}
|
|
1201
|
-
function
|
|
1202
|
-
let
|
|
1203
|
-
const y = t.getBestModeForData(
|
|
1204
|
-
if (
|
|
1205
|
-
throw new Error('"' +
|
|
1187
|
+
function C(u, w) {
|
|
1188
|
+
let E;
|
|
1189
|
+
const y = t.getBestModeForData(u);
|
|
1190
|
+
if (E = t.from(w, y), E !== t.BYTE && E.bit < y.bit)
|
|
1191
|
+
throw new Error('"' + u + '" cannot be encoded with mode ' + t.toString(E) + `.
|
|
1206
1192
|
Suggested mode is: ` + t.toString(y));
|
|
1207
|
-
switch (
|
|
1193
|
+
switch (E === t.KANJI && !a.isKanjiModeEnabled() && (E = t.BYTE), E) {
|
|
1208
1194
|
case t.NUMERIC:
|
|
1209
|
-
return new n(
|
|
1195
|
+
return new n(u);
|
|
1210
1196
|
case t.ALPHANUMERIC:
|
|
1211
|
-
return new o(
|
|
1197
|
+
return new o(u);
|
|
1212
1198
|
case t.KANJI:
|
|
1213
|
-
return new i(
|
|
1199
|
+
return new i(u);
|
|
1214
1200
|
case t.BYTE:
|
|
1215
|
-
return new r(
|
|
1201
|
+
return new r(u);
|
|
1216
1202
|
}
|
|
1217
1203
|
}
|
|
1218
|
-
e.fromArray = function(
|
|
1219
|
-
return
|
|
1220
|
-
return typeof y == "string" ?
|
|
1204
|
+
e.fromArray = function(w) {
|
|
1205
|
+
return w.reduce(function(E, y) {
|
|
1206
|
+
return typeof y == "string" ? E.push(C(y, null)) : y.data && E.push(C(y.data, y.mode)), E;
|
|
1221
1207
|
}, []);
|
|
1222
|
-
}, e.fromString = function(
|
|
1223
|
-
const y = b(
|
|
1224
|
-
for (let
|
|
1225
|
-
T.push(S.table[A[
|
|
1208
|
+
}, e.fromString = function(w, E) {
|
|
1209
|
+
const y = b(w, a.isKanjiModeEnabled()), B = h(y), S = m(B, E), A = l.find_path(S.map, "start", "end"), T = [];
|
|
1210
|
+
for (let N = 1; N < A.length - 1; N++)
|
|
1211
|
+
T.push(S.table[A[N]].node);
|
|
1226
1212
|
return e.fromArray(g(T));
|
|
1227
|
-
}, e.rawSplit = function(
|
|
1213
|
+
}, e.rawSplit = function(w) {
|
|
1228
1214
|
return e.fromArray(
|
|
1229
|
-
b(
|
|
1215
|
+
b(w, a.isKanjiModeEnabled())
|
|
1230
1216
|
);
|
|
1231
1217
|
};
|
|
1232
|
-
})(
|
|
1233
|
-
const
|
|
1234
|
-
function
|
|
1235
|
-
const n = e.size, o =
|
|
1218
|
+
})(Qt);
|
|
1219
|
+
const it = I, lt = nt, _e = fe, Le = de, Ue = Ut, De = Dt, wt = kt, yt = rt, ke = he, $ = vt, Fe = Ht, ze = F, ut = Qt;
|
|
1220
|
+
function ve(e, t) {
|
|
1221
|
+
const n = e.size, o = De.getPositions(t);
|
|
1236
1222
|
for (let r = 0; r < o.length; r++) {
|
|
1237
1223
|
const i = o[r][0], s = o[r][1];
|
|
1238
1224
|
for (let a = -1; a <= 7; a++)
|
|
@@ -1241,15 +1227,15 @@ function Fe(e, t) {
|
|
|
1241
1227
|
s + l <= -1 || n <= s + l || (a >= 0 && a <= 6 && (l === 0 || l === 6) || l >= 0 && l <= 6 && (a === 0 || a === 6) || a >= 2 && a <= 4 && l >= 2 && l <= 4 ? e.set(i + a, s + l, !0, !0) : e.set(i + a, s + l, !1, !0));
|
|
1242
1228
|
}
|
|
1243
1229
|
}
|
|
1244
|
-
function
|
|
1230
|
+
function Ve(e) {
|
|
1245
1231
|
const t = e.size;
|
|
1246
1232
|
for (let n = 8; n < t - 8; n++) {
|
|
1247
1233
|
const o = n % 2 === 0;
|
|
1248
1234
|
e.set(n, 6, o, !0), e.set(6, n, o, !0);
|
|
1249
1235
|
}
|
|
1250
1236
|
}
|
|
1251
|
-
function
|
|
1252
|
-
const n =
|
|
1237
|
+
function He(e, t) {
|
|
1238
|
+
const n = Ue.getPositions(t);
|
|
1253
1239
|
for (let o = 0; o < n.length; o++) {
|
|
1254
1240
|
const r = n[o][0], i = n[o][1];
|
|
1255
1241
|
for (let s = -2; s <= 2; s++)
|
|
@@ -1257,28 +1243,28 @@ function ve(e, t) {
|
|
|
1257
1243
|
s === -2 || s === 2 || a === -2 || a === 2 || s === 0 && a === 0 ? e.set(r + s, i + a, !0, !0) : e.set(r + s, i + a, !1, !0);
|
|
1258
1244
|
}
|
|
1259
1245
|
}
|
|
1260
|
-
function
|
|
1261
|
-
const n = e.size, o =
|
|
1246
|
+
function Oe(e, t) {
|
|
1247
|
+
const n = e.size, o = $.getEncodedBits(t);
|
|
1262
1248
|
let r, i, s;
|
|
1263
1249
|
for (let a = 0; a < 18; a++)
|
|
1264
1250
|
r = Math.floor(a / 3), i = a % 3 + n - 8 - 3, s = (o >> a & 1) === 1, e.set(r, i, s, !0), e.set(i, r, s, !0);
|
|
1265
1251
|
}
|
|
1266
|
-
function
|
|
1267
|
-
const o = e.size, r =
|
|
1252
|
+
function ct(e, t, n) {
|
|
1253
|
+
const o = e.size, r = Fe.getEncodedBits(t, n);
|
|
1268
1254
|
let i, s;
|
|
1269
1255
|
for (i = 0; i < 15; i++)
|
|
1270
1256
|
s = (r >> i & 1) === 1, i < 6 ? e.set(i, 8, s, !0) : i < 8 ? e.set(i + 1, 8, s, !0) : e.set(o - 15 + i, 8, s, !0), i < 8 ? e.set(8, o - i - 1, s, !0) : i < 9 ? e.set(8, 15 - i - 1 + 1, s, !0) : e.set(8, 15 - i - 1, s, !0);
|
|
1271
1257
|
e.set(o - 8, 8, 1, !0);
|
|
1272
1258
|
}
|
|
1273
|
-
function
|
|
1259
|
+
function Qe(e, t) {
|
|
1274
1260
|
const n = e.size;
|
|
1275
1261
|
let o = -1, r = n - 1, i = 7, s = 0;
|
|
1276
1262
|
for (let a = n - 1; a > 0; a -= 2)
|
|
1277
1263
|
for (a === 6 && a--; ; ) {
|
|
1278
1264
|
for (let l = 0; l < 2; l++)
|
|
1279
1265
|
if (!e.isReserved(r, a - l)) {
|
|
1280
|
-
let
|
|
1281
|
-
s < t.length && (
|
|
1266
|
+
let f = !1;
|
|
1267
|
+
s < t.length && (f = (t[s] >>> i & 1) === 1), e.set(r, a - l, f), i--, i === -1 && (s++, i = 7);
|
|
1282
1268
|
}
|
|
1283
1269
|
if (r += o, r < 0 || n <= r) {
|
|
1284
1270
|
r -= o, o = -o;
|
|
@@ -1286,53 +1272,53 @@ function He(e, t) {
|
|
|
1286
1272
|
}
|
|
1287
1273
|
}
|
|
1288
1274
|
}
|
|
1289
|
-
function
|
|
1290
|
-
const o = new
|
|
1275
|
+
function Ke(e, t, n) {
|
|
1276
|
+
const o = new _e();
|
|
1291
1277
|
n.forEach(function(l) {
|
|
1292
|
-
o.put(l.mode.bit, 4), o.put(l.getLength(),
|
|
1278
|
+
o.put(l.mode.bit, 4), o.put(l.getLength(), ze.getCharCountIndicator(l.mode, e)), l.write(o);
|
|
1293
1279
|
});
|
|
1294
|
-
const r =
|
|
1280
|
+
const r = it.getSymbolTotalCodewords(e), i = yt.getTotalCodewordsCount(e, t), s = (r - i) * 8;
|
|
1295
1281
|
for (o.getLengthInBits() + 4 <= s && o.put(0, 4); o.getLengthInBits() % 8 !== 0; )
|
|
1296
1282
|
o.putBit(0);
|
|
1297
1283
|
const a = (s - o.getLengthInBits()) / 8;
|
|
1298
1284
|
for (let l = 0; l < a; l++)
|
|
1299
1285
|
o.put(l % 2 ? 17 : 236, 8);
|
|
1300
|
-
return
|
|
1286
|
+
return Je(o, e, t);
|
|
1301
1287
|
}
|
|
1302
|
-
function
|
|
1303
|
-
const o =
|
|
1304
|
-
let
|
|
1305
|
-
const
|
|
1306
|
-
let
|
|
1307
|
-
const
|
|
1288
|
+
function Je(e, t, n) {
|
|
1289
|
+
const o = it.getSymbolTotalCodewords(t), r = yt.getTotalCodewordsCount(t, n), i = o - r, s = yt.getBlocksCount(t, n), a = o % s, l = s - a, f = Math.floor(o / s), c = Math.floor(i / s), b = c + 1, d = f - c, g = new ke(d);
|
|
1290
|
+
let h = 0;
|
|
1291
|
+
const m = new Array(s), C = new Array(s);
|
|
1292
|
+
let u = 0;
|
|
1293
|
+
const w = new Uint8Array(e.buffer);
|
|
1308
1294
|
for (let A = 0; A < s; A++) {
|
|
1309
1295
|
const T = A < l ? c : b;
|
|
1310
|
-
|
|
1296
|
+
m[A] = w.slice(h, h + T), C[A] = g.encode(m[A]), h += T, u = Math.max(u, T);
|
|
1311
1297
|
}
|
|
1312
|
-
const
|
|
1298
|
+
const E = new Uint8Array(o);
|
|
1313
1299
|
let y = 0, B, S;
|
|
1314
|
-
for (B = 0; B <
|
|
1300
|
+
for (B = 0; B < u; B++)
|
|
1315
1301
|
for (S = 0; S < s; S++)
|
|
1316
|
-
B <
|
|
1302
|
+
B < m[S].length && (E[y++] = m[S][B]);
|
|
1317
1303
|
for (B = 0; B < d; B++)
|
|
1318
1304
|
for (S = 0; S < s; S++)
|
|
1319
|
-
|
|
1320
|
-
return
|
|
1305
|
+
E[y++] = C[S][B];
|
|
1306
|
+
return E;
|
|
1321
1307
|
}
|
|
1322
|
-
function
|
|
1308
|
+
function je(e, t, n, o) {
|
|
1323
1309
|
let r;
|
|
1324
1310
|
if (Array.isArray(e))
|
|
1325
|
-
r =
|
|
1311
|
+
r = ut.fromArray(e);
|
|
1326
1312
|
else if (typeof e == "string") {
|
|
1327
|
-
let
|
|
1328
|
-
if (!
|
|
1329
|
-
const c =
|
|
1330
|
-
|
|
1313
|
+
let f = t;
|
|
1314
|
+
if (!f) {
|
|
1315
|
+
const c = ut.rawSplit(e);
|
|
1316
|
+
f = $.getBestVersionForData(c, n);
|
|
1331
1317
|
}
|
|
1332
|
-
r =
|
|
1318
|
+
r = ut.fromString(e, f || 40);
|
|
1333
1319
|
} else
|
|
1334
1320
|
throw new Error("Invalid data");
|
|
1335
|
-
const i =
|
|
1321
|
+
const i = $.getBestVersionForData(r, n);
|
|
1336
1322
|
if (!i)
|
|
1337
1323
|
throw new Error("The amount of data is too big to be stored in a QR Code");
|
|
1338
1324
|
if (!t)
|
|
@@ -1344,11 +1330,11 @@ The chosen QR Code version cannot contain this amount of data.
|
|
|
1344
1330
|
Minimum version required to store current data is: ` + i + `.
|
|
1345
1331
|
`
|
|
1346
1332
|
);
|
|
1347
|
-
const s =
|
|
1348
|
-
return
|
|
1333
|
+
const s = Ke(t, n, r), a = it.getSymbolSize(t), l = new Le(a);
|
|
1334
|
+
return ve(l, t), Ve(l), He(l, t), ct(l, n, 0), t >= 7 && Oe(l, t), Qe(l, s), isNaN(o) && (o = wt.getBestMask(
|
|
1349
1335
|
l,
|
|
1350
|
-
|
|
1351
|
-
)),
|
|
1336
|
+
ct.bind(null, l, n)
|
|
1337
|
+
)), wt.applyMask(o, l), ct(l, n, o), {
|
|
1352
1338
|
modules: l,
|
|
1353
1339
|
version: t,
|
|
1354
1340
|
errorCorrectionLevel: n,
|
|
@@ -1356,13 +1342,13 @@ Minimum version required to store current data is: ` + i + `.
|
|
|
1356
1342
|
segments: r
|
|
1357
1343
|
};
|
|
1358
1344
|
}
|
|
1359
|
-
|
|
1360
|
-
if (typeof t
|
|
1345
|
+
_t.create = function(t, n) {
|
|
1346
|
+
if (typeof t > "u" || t === "")
|
|
1361
1347
|
throw new Error("No input text");
|
|
1362
|
-
let o =
|
|
1363
|
-
return typeof n
|
|
1348
|
+
let o = lt.M, r, i;
|
|
1349
|
+
return typeof n < "u" && (o = lt.from(n.errorCorrectionLevel, lt.M), r = $.from(n.version), i = wt.from(n.maskPattern), n.toSJISFunc && it.setToSJISFunction(n.toSJISFunc)), je(t, r, o, i);
|
|
1364
1350
|
};
|
|
1365
|
-
var
|
|
1351
|
+
var Jt = {}, Bt = {};
|
|
1366
1352
|
(function(e) {
|
|
1367
1353
|
function t(n) {
|
|
1368
1354
|
if (typeof n == "number" && (n = n.toString()), typeof n != "string")
|
|
@@ -1384,7 +1370,7 @@ var Ot = {}, Ct = {};
|
|
|
1384
1370
|
}
|
|
1385
1371
|
e.getOptions = function(o) {
|
|
1386
1372
|
o || (o = {}), o.color || (o.color = {});
|
|
1387
|
-
const r = typeof o.margin
|
|
1373
|
+
const r = typeof o.margin > "u" || o.margin === null || o.margin < 0 ? 4 : o.margin, i = o.width && o.width >= 21 ? o.width : void 0, s = o.scale || 4;
|
|
1388
1374
|
return {
|
|
1389
1375
|
width: i,
|
|
1390
1376
|
scale: i ? 4 : s,
|
|
@@ -1402,138 +1388,139 @@ var Ot = {}, Ct = {};
|
|
|
1402
1388
|
const i = e.getScale(o, r);
|
|
1403
1389
|
return Math.floor((o + r.margin * 2) * i);
|
|
1404
1390
|
}, e.qrToImageData = function(o, r, i) {
|
|
1405
|
-
const s = r.modules.size, a = r.modules.data, l = e.getScale(s, i),
|
|
1406
|
-
for (let d = 0; d <
|
|
1407
|
-
for (let g = 0; g <
|
|
1408
|
-
let
|
|
1409
|
-
if (d >= c && g >= c && d <
|
|
1410
|
-
const
|
|
1411
|
-
|
|
1391
|
+
const s = r.modules.size, a = r.modules.data, l = e.getScale(s, i), f = Math.floor((s + i.margin * 2) * l), c = i.margin * l, b = [i.color.light, i.color.dark];
|
|
1392
|
+
for (let d = 0; d < f; d++)
|
|
1393
|
+
for (let g = 0; g < f; g++) {
|
|
1394
|
+
let h = (d * f + g) * 4, m = i.color.light;
|
|
1395
|
+
if (d >= c && g >= c && d < f - c && g < f - c) {
|
|
1396
|
+
const C = Math.floor((d - c) / l), u = Math.floor((g - c) / l);
|
|
1397
|
+
m = b[a[C * s + u] ? 1 : 0];
|
|
1412
1398
|
}
|
|
1413
|
-
o[
|
|
1399
|
+
o[h++] = m.r, o[h++] = m.g, o[h++] = m.b, o[h] = m.a;
|
|
1414
1400
|
}
|
|
1415
1401
|
};
|
|
1416
|
-
})(
|
|
1402
|
+
})(Bt);
|
|
1417
1403
|
(function(e) {
|
|
1418
|
-
const t =
|
|
1404
|
+
const t = Bt;
|
|
1419
1405
|
function n(r, i, s) {
|
|
1420
1406
|
r.clearRect(0, 0, i.width, i.height), i.style || (i.style = {}), i.height = s, i.width = s, i.style.height = s + "px", i.style.width = s + "px";
|
|
1421
1407
|
}
|
|
1422
1408
|
function o() {
|
|
1423
1409
|
try {
|
|
1424
1410
|
return document.createElement("canvas");
|
|
1425
|
-
} catch
|
|
1411
|
+
} catch {
|
|
1426
1412
|
throw new Error("You need to specify a canvas element");
|
|
1427
1413
|
}
|
|
1428
1414
|
}
|
|
1429
1415
|
e.render = function(i, s, a) {
|
|
1430
|
-
let l = a,
|
|
1431
|
-
typeof l
|
|
1432
|
-
const c = t.getImageWidth(i.modules.size, l), b =
|
|
1433
|
-
return t.qrToImageData(d.data, i, l), n(b,
|
|
1416
|
+
let l = a, f = s;
|
|
1417
|
+
typeof l > "u" && (!s || !s.getContext) && (l = s, s = void 0), s || (f = o()), l = t.getOptions(l);
|
|
1418
|
+
const c = t.getImageWidth(i.modules.size, l), b = f.getContext("2d"), d = b.createImageData(c, c);
|
|
1419
|
+
return t.qrToImageData(d.data, i, l), n(b, f, c), b.putImageData(d, 0, 0), f;
|
|
1434
1420
|
}, e.renderToDataURL = function(i, s, a) {
|
|
1435
1421
|
let l = a;
|
|
1436
|
-
typeof l
|
|
1437
|
-
const
|
|
1438
|
-
return
|
|
1422
|
+
typeof l > "u" && (!s || !s.getContext) && (l = s, s = void 0), l || (l = {});
|
|
1423
|
+
const f = e.render(i, s, l), c = l.type || "image/png", b = l.rendererOpts || {};
|
|
1424
|
+
return f.toDataURL(c, b.quality);
|
|
1439
1425
|
};
|
|
1440
|
-
})(
|
|
1441
|
-
var
|
|
1442
|
-
const
|
|
1443
|
-
function
|
|
1426
|
+
})(Jt);
|
|
1427
|
+
var jt = {};
|
|
1428
|
+
const Ge = Bt;
|
|
1429
|
+
function Pt(e, t) {
|
|
1444
1430
|
const n = e.a / 255, o = t + '="' + e.hex + '"';
|
|
1445
1431
|
return n < 1 ? o + " " + t + '-opacity="' + n.toFixed(2).slice(1) + '"' : o;
|
|
1446
1432
|
}
|
|
1447
|
-
function
|
|
1433
|
+
function ft(e, t, n) {
|
|
1448
1434
|
let o = e + t;
|
|
1449
|
-
return typeof n
|
|
1435
|
+
return typeof n < "u" && (o += " " + n), o;
|
|
1450
1436
|
}
|
|
1451
|
-
function
|
|
1437
|
+
function Ye(e, t, n) {
|
|
1452
1438
|
let o = "", r = 0, i = !1, s = 0;
|
|
1453
1439
|
for (let a = 0; a < e.length; a++) {
|
|
1454
|
-
const l = Math.floor(a % t),
|
|
1455
|
-
!l && !i && (i = !0), e[a] ? (s++, a > 0 && l > 0 && e[a - 1] || (o += i ?
|
|
1440
|
+
const l = Math.floor(a % t), f = Math.floor(a / t);
|
|
1441
|
+
!l && !i && (i = !0), e[a] ? (s++, a > 0 && l > 0 && e[a - 1] || (o += i ? ft("M", l + n, 0.5 + f + n) : ft("m", r, 0), r = 0, i = !1), l + 1 < t && e[a + 1] || (o += ft("h", s), s = 0)) : r++;
|
|
1456
1442
|
}
|
|
1457
1443
|
return o;
|
|
1458
1444
|
}
|
|
1459
|
-
|
|
1460
|
-
const r =
|
|
1445
|
+
jt.render = function(t, n, o) {
|
|
1446
|
+
const r = Ge.getOptions(n), i = t.modules.size, s = t.modules.data, a = i + r.margin * 2, l = r.color.light.a ? "<path " + Pt(r.color.light, "fill") + ' d="M0 0h' + a + "v" + a + 'H0z"/>' : "", f = "<path " + Pt(r.color.dark, "stroke") + ' d="' + Ye(s, i, r.margin) + '"/>', c = 'viewBox="0 0 ' + a + " " + a + '"', d = '<svg xmlns="http://www.w3.org/2000/svg" ' + (r.width ? 'width="' + r.width + '" height="' + r.width + '" ' : "") + c + ' shape-rendering="crispEdges">' + l + f + `</svg>
|
|
1461
1447
|
`;
|
|
1462
1448
|
return typeof o == "function" && o(null, d), d;
|
|
1463
1449
|
};
|
|
1464
|
-
const
|
|
1465
|
-
function
|
|
1450
|
+
const qe = ue, Et = _t, Gt = Jt, We = jt;
|
|
1451
|
+
function St(e, t, n, o, r) {
|
|
1466
1452
|
const i = [].slice.call(arguments, 1), s = i.length, a = typeof i[s - 1] == "function";
|
|
1467
|
-
if (!a && !
|
|
1453
|
+
if (!a && !qe())
|
|
1468
1454
|
throw new Error("Callback required as last argument");
|
|
1469
1455
|
if (a) {
|
|
1470
1456
|
if (s < 2)
|
|
1471
1457
|
throw new Error("Too few arguments provided");
|
|
1472
|
-
s === 2 ? (r = n, n = t, t = o = void 0) : s === 3 && (t.getContext && typeof r
|
|
1458
|
+
s === 2 ? (r = n, n = t, t = o = void 0) : s === 3 && (t.getContext && typeof r > "u" ? (r = o, o = void 0) : (r = o, o = n, n = t, t = void 0));
|
|
1473
1459
|
} else {
|
|
1474
1460
|
if (s < 1)
|
|
1475
1461
|
throw new Error("Too few arguments provided");
|
|
1476
|
-
return s === 1 ? (n = t, t = o = void 0) : s === 2 && !t.getContext && (o = n, n = t, t = void 0), new Promise(function(l,
|
|
1462
|
+
return s === 1 ? (n = t, t = o = void 0) : s === 2 && !t.getContext && (o = n, n = t, t = void 0), new Promise(function(l, f) {
|
|
1477
1463
|
try {
|
|
1478
|
-
const c =
|
|
1464
|
+
const c = Et.create(n, o);
|
|
1479
1465
|
l(e(c, t, o));
|
|
1480
1466
|
} catch (c) {
|
|
1481
|
-
|
|
1467
|
+
f(c);
|
|
1482
1468
|
}
|
|
1483
1469
|
});
|
|
1484
1470
|
}
|
|
1485
1471
|
try {
|
|
1486
|
-
const l =
|
|
1472
|
+
const l = Et.create(n, o);
|
|
1487
1473
|
r(null, e(l, t, o));
|
|
1488
1474
|
} catch (l) {
|
|
1489
1475
|
r(l);
|
|
1490
1476
|
}
|
|
1491
1477
|
}
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
return
|
|
1478
|
+
G.create = Et.create;
|
|
1479
|
+
G.toCanvas = St.bind(null, Gt.render);
|
|
1480
|
+
G.toDataURL = St.bind(null, Gt.renderToDataURL);
|
|
1481
|
+
G.toString = St.bind(null, function(e, t, n) {
|
|
1482
|
+
return We.render(e, n);
|
|
1497
1483
|
});
|
|
1498
|
-
|
|
1499
|
-
|
|
1484
|
+
var Z = /* @__PURE__ */ ((e) => (e.unauthorizedError = "unauthorized", e.unexpectedError = "unexpectedError", e.failedToFetch = "failedToFetch", e))(Z || {});
|
|
1485
|
+
function Xe(e) {
|
|
1486
|
+
xt(e, "svelte-ty0b2n", '*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box;font-family:inherit}.LoadingSpinner{display:block;width:80px;height:80px;margin:0 auto 0 0}.LoadingSpinner:after{content:" ";display:block;width:64px;height:64px;margin:8px;border-radius:50%;border:6px solid var(--emw--casino-color-primary, var(--emw--color-primary, #22b04e));border-color:var(--emw--casino-color-primary, var(--emw--color-primary, #22b04e)) transparent var(--emw--casino-color-primary, var(--emw--color-primary, #22b04e)) transparent;animation:LoadingSpinner 1.2s linear infinite}@keyframes LoadingSpinner{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}');
|
|
1500
1487
|
}
|
|
1501
|
-
function
|
|
1488
|
+
function Ze(e) {
|
|
1502
1489
|
let t, n, o;
|
|
1503
1490
|
return {
|
|
1504
1491
|
c() {
|
|
1505
|
-
t =
|
|
1506
|
-
e[3]) ||
|
|
1492
|
+
t = D("div"), n = D("img"), _(n, "class", "qr-image"), Tt(n.src, o = /*qrImageUrl*/
|
|
1493
|
+
e[3]) || _(n, "src", o), _(n, "alt", "qr-session-login"), _(t, "class", "qr-section");
|
|
1507
1494
|
},
|
|
1508
1495
|
m(r, i) {
|
|
1509
|
-
|
|
1496
|
+
et(r, t, i), P(t, n);
|
|
1510
1497
|
},
|
|
1511
1498
|
p(r, i) {
|
|
1512
1499
|
i & /*qrImageUrl*/
|
|
1513
|
-
8 && !
|
|
1514
|
-
r[3]) &&
|
|
1500
|
+
8 && !Tt(n.src, o = /*qrImageUrl*/
|
|
1501
|
+
r[3]) && _(n, "src", o);
|
|
1515
1502
|
},
|
|
1516
1503
|
d(r) {
|
|
1517
|
-
r &&
|
|
1504
|
+
r && tt(t);
|
|
1518
1505
|
}
|
|
1519
1506
|
};
|
|
1520
1507
|
}
|
|
1521
|
-
function
|
|
1508
|
+
function xe(e) {
|
|
1522
1509
|
let t;
|
|
1523
1510
|
return {
|
|
1524
1511
|
c() {
|
|
1525
|
-
t =
|
|
1512
|
+
t = D("div"), _(t, "class", "LoadingSpinner");
|
|
1526
1513
|
},
|
|
1527
1514
|
m(n, o) {
|
|
1528
|
-
|
|
1515
|
+
et(n, t, o);
|
|
1529
1516
|
},
|
|
1530
|
-
p:
|
|
1517
|
+
p: dt,
|
|
1531
1518
|
d(n) {
|
|
1532
|
-
n &&
|
|
1519
|
+
n && tt(t);
|
|
1533
1520
|
}
|
|
1534
1521
|
};
|
|
1535
1522
|
}
|
|
1536
|
-
function
|
|
1523
|
+
function $e(e) {
|
|
1537
1524
|
let t, n = (
|
|
1538
1525
|
/*$_*/
|
|
1539
1526
|
e[5](
|
|
@@ -1543,10 +1530,10 @@ function Ze(e) {
|
|
|
1543
1530
|
), o;
|
|
1544
1531
|
return {
|
|
1545
1532
|
c() {
|
|
1546
|
-
t =
|
|
1533
|
+
t = D("p"), o = ht(n), _(t, "class", "generate-qr-error-message");
|
|
1547
1534
|
},
|
|
1548
1535
|
m(r, i) {
|
|
1549
|
-
|
|
1536
|
+
et(r, t, i), P(t, o);
|
|
1550
1537
|
},
|
|
1551
1538
|
p(r, i) {
|
|
1552
1539
|
i & /*$_, errorCode*/
|
|
@@ -1554,181 +1541,187 @@ function Ze(e) {
|
|
|
1554
1541
|
r[5](
|
|
1555
1542
|
/*errorCode*/
|
|
1556
1543
|
r[4]
|
|
1557
|
-
) + "") &&
|
|
1544
|
+
) + "") && gt(o, n);
|
|
1558
1545
|
},
|
|
1559
1546
|
d(r) {
|
|
1560
|
-
r &&
|
|
1547
|
+
r && tt(t);
|
|
1561
1548
|
}
|
|
1562
1549
|
};
|
|
1563
1550
|
}
|
|
1564
|
-
function
|
|
1551
|
+
function tn(e) {
|
|
1565
1552
|
let t, n, o, r = (
|
|
1566
1553
|
/*$_*/
|
|
1567
1554
|
e[5]("titleQRSessionGenerator") + ""
|
|
1568
1555
|
), i, s, a, l = (
|
|
1569
1556
|
/*remaining*/
|
|
1570
1557
|
(e[1] > 0 ? `${/*remaining*/
|
|
1571
|
-
e[1]}
|
|
1558
|
+
e[1]}${/*$_*/
|
|
1559
|
+
e[5]("second")}` : (
|
|
1572
1560
|
/*$_*/
|
|
1573
1561
|
e[5]("generateQRButton")
|
|
1574
1562
|
)) + ""
|
|
1575
|
-
),
|
|
1576
|
-
function
|
|
1563
|
+
), f, c, b, d, g;
|
|
1564
|
+
function h(u, w) {
|
|
1577
1565
|
if (
|
|
1578
1566
|
/*errorCode*/
|
|
1579
|
-
|
|
1567
|
+
u[4]
|
|
1580
1568
|
)
|
|
1581
|
-
return
|
|
1569
|
+
return $e;
|
|
1582
1570
|
if (
|
|
1583
1571
|
/*isGenerating*/
|
|
1584
|
-
|
|
1572
|
+
u[2]
|
|
1585
1573
|
)
|
|
1586
|
-
return
|
|
1574
|
+
return xe;
|
|
1587
1575
|
if (
|
|
1588
1576
|
/*qrImageUrl*/
|
|
1589
|
-
|
|
1577
|
+
u[3]
|
|
1590
1578
|
)
|
|
1591
|
-
return
|
|
1579
|
+
return Ze;
|
|
1592
1580
|
}
|
|
1593
|
-
let
|
|
1581
|
+
let m = h(e), C = m && m(e);
|
|
1594
1582
|
return {
|
|
1595
1583
|
c() {
|
|
1596
|
-
t =
|
|
1584
|
+
t = D("div"), n = D("div"), o = D("p"), i = ht(r), s = At(), a = D("button"), f = ht(l), b = At(), C && C.c(), _(a, "class", "generate-qr-btn"), a.disabled = c = /*isGenerating*/
|
|
1597
1585
|
e[2] || /*remaining*/
|
|
1598
|
-
e[1] > 0,
|
|
1586
|
+
e[1] > 0, _(n, "class", "qr-session-generator");
|
|
1599
1587
|
},
|
|
1600
|
-
m(
|
|
1601
|
-
|
|
1588
|
+
m(u, w) {
|
|
1589
|
+
et(u, t, w), P(t, n), P(n, o), P(o, i), P(n, s), P(n, a), P(a, f), P(n, b), C && C.m(n, null), e[14](t), d || (g = $t(
|
|
1602
1590
|
a,
|
|
1603
1591
|
"click",
|
|
1604
1592
|
/*onGenerateQRClick*/
|
|
1605
1593
|
e[6]
|
|
1606
1594
|
), d = !0);
|
|
1607
1595
|
},
|
|
1608
|
-
p(
|
|
1609
|
-
|
|
1596
|
+
p(u, [w]) {
|
|
1597
|
+
w & /*$_*/
|
|
1610
1598
|
32 && r !== (r = /*$_*/
|
|
1611
|
-
|
|
1599
|
+
u[5]("titleQRSessionGenerator") + "") && gt(i, r), w & /*remaining, $_*/
|
|
1612
1600
|
34 && l !== (l = /*remaining*/
|
|
1613
|
-
(
|
|
1614
|
-
|
|
1601
|
+
(u[1] > 0 ? `${/*remaining*/
|
|
1602
|
+
u[1]}${/*$_*/
|
|
1603
|
+
u[5]("second")}` : (
|
|
1615
1604
|
/*$_*/
|
|
1616
|
-
|
|
1617
|
-
)) + "") &&
|
|
1605
|
+
u[5]("generateQRButton")
|
|
1606
|
+
)) + "") && gt(f, l), w & /*isGenerating, remaining*/
|
|
1618
1607
|
6 && c !== (c = /*isGenerating*/
|
|
1619
|
-
|
|
1620
|
-
|
|
1608
|
+
u[2] || /*remaining*/
|
|
1609
|
+
u[1] > 0) && (a.disabled = c), m === (m = h(u)) && C ? C.p(u, w) : (C && C.d(1), C = m && m(u), C && (C.c(), C.m(n, null)));
|
|
1621
1610
|
},
|
|
1622
|
-
i:
|
|
1623
|
-
o:
|
|
1624
|
-
d(
|
|
1625
|
-
|
|
1611
|
+
i: dt,
|
|
1612
|
+
o: dt,
|
|
1613
|
+
d(u) {
|
|
1614
|
+
u && tt(t), C && C.d(), e[14](null), d = !1, g();
|
|
1626
1615
|
}
|
|
1627
1616
|
};
|
|
1628
1617
|
}
|
|
1629
|
-
const
|
|
1630
|
-
function
|
|
1618
|
+
const en = 60, nn = 1e3;
|
|
1619
|
+
function rn(e, t, n) {
|
|
1631
1620
|
let o;
|
|
1632
|
-
|
|
1633
|
-
let { clientstyling: r = "" } = t, { clientstylingurl: i = "" } = t, { mbsource: s } = t, { lang: a = "en" } = t, { endpoint: l = "" } = t, { sessionid:
|
|
1621
|
+
te(e, ae, (p) => n(5, o = p));
|
|
1622
|
+
let { clientstyling: r = "" } = t, { clientstylingurl: i = "" } = t, { mbsource: s } = t, { lang: a = "en" } = t, { endpoint: l = "" } = t, { sessionid: f } = t, { translationurl: c } = t;
|
|
1634
1623
|
const b = {
|
|
1635
|
-
"gm.norway.unauthorized":
|
|
1624
|
+
"gm.norway.unauthorized": Z.unauthorizedError
|
|
1636
1625
|
};
|
|
1637
|
-
let d, g,
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
Object.keys(
|
|
1643
|
-
|
|
1626
|
+
let d, g, h = 0, m = !1, C = null, u = null, w = null;
|
|
1627
|
+
const E = async () => {
|
|
1628
|
+
const p = c;
|
|
1629
|
+
try {
|
|
1630
|
+
const q = await (await fetch(p)).json();
|
|
1631
|
+
Object.keys(q).forEach((U) => {
|
|
1632
|
+
It(U, q[U]);
|
|
1644
1633
|
});
|
|
1645
|
-
}
|
|
1646
|
-
console.error(
|
|
1647
|
-
}
|
|
1634
|
+
} catch (K) {
|
|
1635
|
+
console.error(K);
|
|
1636
|
+
}
|
|
1648
1637
|
};
|
|
1649
|
-
Object.keys(
|
|
1650
|
-
|
|
1638
|
+
Object.keys(Nt).forEach((p) => {
|
|
1639
|
+
It(p, Nt[p]);
|
|
1651
1640
|
});
|
|
1652
1641
|
const y = () => {
|
|
1653
|
-
|
|
1654
|
-
}, B = () =>
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
const
|
|
1660
|
-
|
|
1661
|
-
const
|
|
1662
|
-
n(4, h = null);
|
|
1663
|
-
const F = yield fetch(E.href, M);
|
|
1642
|
+
le(a);
|
|
1643
|
+
}, B = async (p) => {
|
|
1644
|
+
n(3, u = await G.toDataURL(p));
|
|
1645
|
+
}, S = (p) => {
|
|
1646
|
+
n(4, w = p), L();
|
|
1647
|
+
}, A = async () => {
|
|
1648
|
+
const p = new URL(`${l}/api/pam/v1/qr/authenticate`), K = new Headers();
|
|
1649
|
+
K.append("X-SessionID", f);
|
|
1650
|
+
const q = { method: "POST", headers: K };
|
|
1664
1651
|
try {
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1652
|
+
const U = await fetch(p.href, q);
|
|
1653
|
+
if (U.ok) {
|
|
1654
|
+
const st = await U.json();
|
|
1655
|
+
await B(JSON.stringify(st));
|
|
1668
1656
|
} else {
|
|
1669
|
-
const
|
|
1670
|
-
|
|
1657
|
+
const st = await U.json();
|
|
1658
|
+
S(b[st.Code] ?? Z.unexpectedError);
|
|
1671
1659
|
}
|
|
1672
|
-
} catch (
|
|
1673
|
-
console.error(
|
|
1660
|
+
} catch (U) {
|
|
1661
|
+
console.error(U), S(Z.failedToFetch);
|
|
1674
1662
|
} finally {
|
|
1675
|
-
n(2,
|
|
1663
|
+
n(2, m = !1);
|
|
1676
1664
|
}
|
|
1677
|
-
})
|
|
1678
|
-
|
|
1679
|
-
|
|
1665
|
+
}, T = async () => {
|
|
1666
|
+
m || h > 0 || (n(2, m = !0), n(4, w = null), n(3, u = null), n(1, h = en), R(), await A());
|
|
1667
|
+
};
|
|
1668
|
+
function N() {
|
|
1669
|
+
C !== null && clearInterval(C);
|
|
1670
|
+
}
|
|
1671
|
+
function R() {
|
|
1672
|
+
N(), C = setInterval(
|
|
1680
1673
|
() => {
|
|
1681
|
-
|
|
1674
|
+
h > 1 ? n(1, h -= 1) : (n(1, h = 0), n(2, m = !1), n(3, u = null), L());
|
|
1682
1675
|
},
|
|
1683
|
-
|
|
1676
|
+
nn
|
|
1684
1677
|
);
|
|
1685
1678
|
}
|
|
1686
|
-
function
|
|
1687
|
-
|
|
1679
|
+
function L() {
|
|
1680
|
+
N(), C = null, n(1, h = 0);
|
|
1688
1681
|
}
|
|
1689
|
-
|
|
1690
|
-
|
|
1682
|
+
ee(() => {
|
|
1683
|
+
N();
|
|
1691
1684
|
});
|
|
1692
|
-
function
|
|
1693
|
-
|
|
1694
|
-
d =
|
|
1685
|
+
function Q(p) {
|
|
1686
|
+
ne[p ? "unshift" : "push"](() => {
|
|
1687
|
+
d = p, n(0, d);
|
|
1695
1688
|
});
|
|
1696
1689
|
}
|
|
1697
|
-
return e.$$set = (
|
|
1698
|
-
"clientstyling" in
|
|
1690
|
+
return e.$$set = (p) => {
|
|
1691
|
+
"clientstyling" in p && n(7, r = p.clientstyling), "clientstylingurl" in p && n(8, i = p.clientstylingurl), "mbsource" in p && n(9, s = p.mbsource), "lang" in p && n(10, a = p.lang), "endpoint" in p && n(11, l = p.endpoint), "sessionid" in p && n(12, f = p.sessionid), "translationurl" in p && n(13, c = p.translationurl);
|
|
1699
1692
|
}, e.$$.update = () => {
|
|
1700
1693
|
e.$$.dirty & /*clientstyling, customStylingContainer*/
|
|
1701
|
-
129 && r && d &&
|
|
1702
|
-
257 && i && d &&
|
|
1703
|
-
513 && s && d &&
|
|
1694
|
+
129 && r && d && re(d, r), e.$$.dirty & /*clientstylingurl, customStylingContainer*/
|
|
1695
|
+
257 && i && d && oe(d, i), e.$$.dirty & /*mbsource, customStylingContainer*/
|
|
1696
|
+
513 && s && d && ie(d, `${s}.Style`, g), e.$$.dirty & /*lang*/
|
|
1704
1697
|
1024 && a && y(), e.$$.dirty & /*translationurl*/
|
|
1705
|
-
8192 && c &&
|
|
1698
|
+
8192 && c && E();
|
|
1706
1699
|
}, [
|
|
1707
1700
|
d,
|
|
1701
|
+
h,
|
|
1708
1702
|
m,
|
|
1703
|
+
u,
|
|
1709
1704
|
w,
|
|
1710
|
-
f,
|
|
1711
|
-
h,
|
|
1712
1705
|
o,
|
|
1713
|
-
|
|
1706
|
+
T,
|
|
1714
1707
|
r,
|
|
1715
1708
|
i,
|
|
1716
1709
|
s,
|
|
1717
1710
|
a,
|
|
1718
1711
|
l,
|
|
1719
|
-
|
|
1712
|
+
f,
|
|
1720
1713
|
c,
|
|
1721
|
-
|
|
1714
|
+
Q
|
|
1722
1715
|
];
|
|
1723
1716
|
}
|
|
1724
|
-
class
|
|
1717
|
+
class on extends Wt {
|
|
1725
1718
|
constructor(t) {
|
|
1726
|
-
super(),
|
|
1719
|
+
super(), Xt(
|
|
1727
1720
|
this,
|
|
1728
1721
|
t,
|
|
1722
|
+
rn,
|
|
1729
1723
|
tn,
|
|
1730
|
-
|
|
1731
|
-
qt,
|
|
1724
|
+
Zt,
|
|
1732
1725
|
{
|
|
1733
1726
|
clientstyling: 7,
|
|
1734
1727
|
clientstylingurl: 8,
|
|
@@ -1738,7 +1731,7 @@ class en extends Gt {
|
|
|
1738
1731
|
sessionid: 12,
|
|
1739
1732
|
translationurl: 13
|
|
1740
1733
|
},
|
|
1741
|
-
|
|
1734
|
+
Xe
|
|
1742
1735
|
);
|
|
1743
1736
|
}
|
|
1744
1737
|
get clientstyling() {
|
|
@@ -1784,7 +1777,7 @@ class en extends Gt {
|
|
|
1784
1777
|
this.$$set({ translationurl: t }), z();
|
|
1785
1778
|
}
|
|
1786
1779
|
}
|
|
1787
|
-
|
|
1780
|
+
se(on, { clientstyling: {}, clientstylingurl: {}, mbsource: {}, lang: {}, endpoint: {}, sessionid: {}, translationurl: {} }, [], [], !0);
|
|
1788
1781
|
export {
|
|
1789
|
-
|
|
1782
|
+
on as default
|
|
1790
1783
|
};
|