@everymatrix/player-profile-info 1.92.2 → 1.92.4

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