@incodetech/web 0.0.0-dev-20260320-e46eb90 → 0.0.0-dev-20260320-c2feb04

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.
@@ -267,17 +267,17 @@ function In() {
267
267
  const t = z().getSymbolSize;
268
268
  e.getRowColCoords = function(r) {
269
269
  if (r === 1) return [];
270
- const n = Math.floor(r / 7) + 2, o = t(r), a = o === 145 ? 26 : Math.ceil((o - 13) / (2 * n - 2)) * 2, s = [o - 7];
271
- for (let c = 1; c < n - 1; c++)
272
- s[c] = s[c - 1] - a;
273
- return s.push(6), s.reverse();
270
+ const n = Math.floor(r / 7) + 2, o = t(r), a = o === 145 ? 26 : Math.ceil((o - 13) / (2 * n - 2)) * 2, c = [o - 7];
271
+ for (let s = 1; s < n - 1; s++)
272
+ c[s] = c[s - 1] - a;
273
+ return c.push(6), c.reverse();
274
274
  }, e.getPositions = function(r) {
275
275
  const n = [], o = e.getRowColCoords(r), a = o.length;
276
- for (let s = 0; s < a; s++)
277
- for (let c = 0; c < a; c++)
278
- s === 0 && c === 0 || // top-left
279
- s === 0 && c === a - 1 || // bottom-left
280
- s === a - 1 && c === 0 || n.push([o[s], o[c]]);
276
+ for (let c = 0; c < a; c++)
277
+ for (let s = 0; s < a; s++)
278
+ c === 0 && s === 0 || // top-left
279
+ c === 0 && s === a - 1 || // bottom-left
280
+ c === a - 1 && s === 0 || n.push([o[c], o[s]]);
281
281
  return n;
282
282
  };
283
283
  })(he)), he;
@@ -324,38 +324,38 @@ function yn() {
324
324
  return e.isValid(n) ? parseInt(n, 10) : void 0;
325
325
  }, e.getPenaltyN1 = function(n) {
326
326
  const o = n.size;
327
- let a = 0, s = 0, c = 0, h = null, f = null;
328
- for (let u = 0; u < o; u++) {
329
- s = c = 0, h = f = null;
327
+ let a = 0, c = 0, s = 0, u = null, h = null;
328
+ for (let g = 0; g < o; g++) {
329
+ c = s = 0, u = h = null;
330
330
  for (let d = 0; d < o; d++) {
331
- let g = n.get(u, d);
332
- g === h ? s++ : (s >= 5 && (a += t.N1 + (s - 5)), h = g, s = 1), g = n.get(d, u), g === f ? c++ : (c >= 5 && (a += t.N1 + (c - 5)), f = g, c = 1);
331
+ let f = n.get(g, d);
332
+ f === u ? c++ : (c >= 5 && (a += t.N1 + (c - 5)), u = f, c = 1), f = n.get(d, g), f === h ? s++ : (s >= 5 && (a += t.N1 + (s - 5)), h = f, s = 1);
333
333
  }
334
- s >= 5 && (a += t.N1 + (s - 5)), c >= 5 && (a += t.N1 + (c - 5));
334
+ c >= 5 && (a += t.N1 + (c - 5)), s >= 5 && (a += t.N1 + (s - 5));
335
335
  }
336
336
  return a;
337
337
  }, e.getPenaltyN2 = function(n) {
338
338
  const o = n.size;
339
339
  let a = 0;
340
- for (let s = 0; s < o - 1; s++)
341
- for (let c = 0; c < o - 1; c++) {
342
- const h = n.get(s, c) + n.get(s, c + 1) + n.get(s + 1, c) + n.get(s + 1, c + 1);
343
- (h === 4 || h === 0) && a++;
340
+ for (let c = 0; c < o - 1; c++)
341
+ for (let s = 0; s < o - 1; s++) {
342
+ const u = n.get(c, s) + n.get(c, s + 1) + n.get(c + 1, s) + n.get(c + 1, s + 1);
343
+ (u === 4 || u === 0) && a++;
344
344
  }
345
345
  return a * t.N2;
346
346
  }, e.getPenaltyN3 = function(n) {
347
347
  const o = n.size;
348
- let a = 0, s = 0, c = 0;
349
- for (let h = 0; h < o; h++) {
350
- s = c = 0;
351
- for (let f = 0; f < o; f++)
352
- s = s << 1 & 2047 | n.get(h, f), f >= 10 && (s === 1488 || s === 93) && a++, c = c << 1 & 2047 | n.get(f, h), f >= 10 && (c === 1488 || c === 93) && a++;
348
+ let a = 0, c = 0, s = 0;
349
+ for (let u = 0; u < o; u++) {
350
+ c = s = 0;
351
+ for (let h = 0; h < o; h++)
352
+ c = c << 1 & 2047 | n.get(u, h), h >= 10 && (c === 1488 || c === 93) && a++, s = s << 1 & 2047 | n.get(h, u), h >= 10 && (s === 1488 || s === 93) && a++;
353
353
  }
354
354
  return a * t.N3;
355
355
  }, e.getPenaltyN4 = function(n) {
356
356
  let o = 0;
357
357
  const a = n.data.length;
358
- for (let c = 0; c < a; c++) o += n.data[c];
358
+ for (let s = 0; s < a; s++) o += n.data[s];
359
359
  return Math.abs(Math.ceil(o * 100 / a / 5) - 10) * t.N4;
360
360
  };
361
361
  function i(r, n, o) {
@@ -382,18 +382,18 @@ function yn() {
382
382
  }
383
383
  e.applyMask = function(n, o) {
384
384
  const a = o.size;
385
- for (let s = 0; s < a; s++)
386
- for (let c = 0; c < a; c++)
387
- o.isReserved(c, s) || o.xor(c, s, i(n, c, s));
385
+ for (let c = 0; c < a; c++)
386
+ for (let s = 0; s < a; s++)
387
+ o.isReserved(s, c) || o.xor(s, c, i(n, s, c));
388
388
  }, e.getBestMask = function(n, o) {
389
389
  const a = Object.keys(e.Patterns).length;
390
- let s = 0, c = 1 / 0;
391
- for (let h = 0; h < a; h++) {
392
- o(h), e.applyMask(h, n);
393
- const f = e.getPenaltyN1(n) + e.getPenaltyN2(n) + e.getPenaltyN3(n) + e.getPenaltyN4(n);
394
- e.applyMask(h, n), f < c && (c = f, s = h);
390
+ let c = 0, s = 1 / 0;
391
+ for (let u = 0; u < a; u++) {
392
+ o(u), e.applyMask(u, n);
393
+ const h = e.getPenaltyN1(n) + e.getPenaltyN2(n) + e.getPenaltyN3(n) + e.getPenaltyN4(n);
394
+ e.applyMask(u, n), h < s && (s = h, c = u);
395
395
  }
396
- return s;
396
+ return c;
397
397
  };
398
398
  })(me)), me;
399
399
  }
@@ -781,18 +781,18 @@ function Mn() {
781
781
  e.mul = function(r, n) {
782
782
  const o = new Uint8Array(r.length + n.length - 1);
783
783
  for (let a = 0; a < r.length; a++)
784
- for (let s = 0; s < n.length; s++)
785
- o[a + s] ^= t.mul(r[a], n[s]);
784
+ for (let c = 0; c < n.length; c++)
785
+ o[a + c] ^= t.mul(r[a], n[c]);
786
786
  return o;
787
787
  }, e.mod = function(r, n) {
788
788
  let o = new Uint8Array(r);
789
789
  for (; o.length - n.length >= 0; ) {
790
790
  const a = o[0];
791
- for (let c = 0; c < n.length; c++)
792
- o[c] ^= t.mul(n[c], a);
793
- let s = 0;
794
- for (; s < o.length && o[s] === 0; ) s++;
795
- o = o.slice(s);
791
+ for (let s = 0; s < n.length; s++)
792
+ o[s] ^= t.mul(n[s], a);
793
+ let c = 0;
794
+ for (; c < o.length && o[c] === 0; ) c++;
795
+ o = o.slice(c);
796
796
  }
797
797
  return o;
798
798
  }, e.generateECPolynomial = function(r) {
@@ -820,8 +820,8 @@ function bn() {
820
820
  n.set(r);
821
821
  const o = e.mod(n, this.genPoly), a = this.degree - o.length;
822
822
  if (a > 0) {
823
- const s = new Uint8Array(this.degree);
824
- return s.set(o, a), s;
823
+ const c = new Uint8Array(this.degree);
824
+ return c.set(o, a), c;
825
825
  }
826
826
  return o;
827
827
  }, we = t, we;
@@ -843,12 +843,12 @@ function At() {
843
843
  ]))+`;
844
844
  D.KANJI = new RegExp(i, "g"), D.BYTE_KANJI = new RegExp("[^A-Z0-9 $%*+\\-./:]+", "g"), D.BYTE = new RegExp(r, "g"), D.NUMERIC = new RegExp(e, "g"), D.ALPHANUMERIC = new RegExp(t, "g");
845
845
  const n = new RegExp("^" + i + "$"), o = new RegExp("^" + e + "$"), a = new RegExp("^[A-Z0-9 $%*+\\-./:]+$");
846
- return D.testKanji = function(c) {
847
- return n.test(c);
848
- }, D.testNumeric = function(c) {
849
- return o.test(c);
850
- }, D.testAlphanumeric = function(c) {
851
- return a.test(c);
846
+ return D.testKanji = function(s) {
847
+ return n.test(s);
848
+ }, D.testNumeric = function(s) {
849
+ return o.test(s);
850
+ }, D.testAlphanumeric = function(s) {
851
+ return a.test(s);
852
852
  }, D;
853
853
  }
854
854
  var tt;
@@ -916,66 +916,66 @@ function H() {
916
916
  var nt;
917
917
  function Rn() {
918
918
  return nt || (nt = 1, (function(e) {
919
- const t = z(), i = Rt(), r = Ue(), n = H(), o = St(), a = 7973, s = t.getBCHDigit(a);
920
- function c(d, g, R) {
921
- for (let E = 1; E <= 40; E++)
922
- if (g <= e.getCapacity(E, R, d))
923
- return E;
919
+ const t = z(), i = Rt(), r = Ue(), n = H(), o = St(), a = 7973, c = t.getBCHDigit(a);
920
+ function s(d, f, M) {
921
+ for (let I = 1; I <= 40; I++)
922
+ if (f <= e.getCapacity(I, M, d))
923
+ return I;
924
924
  }
925
- function h(d, g) {
926
- return n.getCharCountIndicator(d, g) + 4;
925
+ function u(d, f) {
926
+ return n.getCharCountIndicator(d, f) + 4;
927
927
  }
928
- function f(d, g) {
929
- let R = 0;
930
- return d.forEach(function(E) {
931
- const B = h(E.mode, g);
932
- R += B + E.getBitsLength();
933
- }), R;
928
+ function h(d, f) {
929
+ let M = 0;
930
+ return d.forEach(function(I) {
931
+ const P = u(I.mode, f);
932
+ M += P + I.getBitsLength();
933
+ }), M;
934
934
  }
935
- function u(d, g) {
936
- for (let R = 1; R <= 40; R++)
937
- if (f(d, R) <= e.getCapacity(R, g, n.MIXED))
938
- return R;
935
+ function g(d, f) {
936
+ for (let M = 1; M <= 40; M++)
937
+ if (h(d, M) <= e.getCapacity(M, f, n.MIXED))
938
+ return M;
939
939
  }
940
- e.from = function(g, R) {
941
- return o.isValid(g) ? parseInt(g, 10) : R;
942
- }, e.getCapacity = function(g, R, E) {
943
- if (!o.isValid(g))
940
+ e.from = function(f, M) {
941
+ return o.isValid(f) ? parseInt(f, 10) : M;
942
+ }, e.getCapacity = function(f, M, I) {
943
+ if (!o.isValid(f))
944
944
  throw new Error("Invalid QR Code version");
945
- typeof E > "u" && (E = n.BYTE);
946
- const B = t.getSymbolTotalCodewords(g), w = i.getTotalCodewordsCount(g, R), m = (B - w) * 8;
947
- if (E === n.MIXED) return m;
948
- const p = m - h(E, g);
949
- switch (E) {
945
+ typeof I > "u" && (I = n.BYTE);
946
+ const P = t.getSymbolTotalCodewords(f), A = i.getTotalCodewordsCount(f, M), E = (P - A) * 8;
947
+ if (I === n.MIXED) return E;
948
+ const m = E - u(I, f);
949
+ switch (I) {
950
950
  case n.NUMERIC:
951
- return Math.floor(p / 10 * 3);
951
+ return Math.floor(m / 10 * 3);
952
952
  case n.ALPHANUMERIC:
953
- return Math.floor(p / 11 * 2);
953
+ return Math.floor(m / 11 * 2);
954
954
  case n.KANJI:
955
- return Math.floor(p / 13);
955
+ return Math.floor(m / 13);
956
956
  case n.BYTE:
957
957
  default:
958
- return Math.floor(p / 8);
958
+ return Math.floor(m / 8);
959
959
  }
960
- }, e.getBestVersionForData = function(g, R) {
961
- let E;
962
- const B = r.from(R, r.M);
963
- if (Array.isArray(g)) {
964
- if (g.length > 1)
965
- return u(g, B);
966
- if (g.length === 0)
960
+ }, e.getBestVersionForData = function(f, M) {
961
+ let I;
962
+ const P = r.from(M, r.M);
963
+ if (Array.isArray(f)) {
964
+ if (f.length > 1)
965
+ return g(f, P);
966
+ if (f.length === 0)
967
967
  return 1;
968
- E = g[0];
968
+ I = f[0];
969
969
  } else
970
- E = g;
971
- return c(E.mode, E.getLength(), B);
972
- }, e.getEncodedBits = function(g) {
973
- if (!o.isValid(g) || g < 7)
970
+ I = f;
971
+ return s(I.mode, I.getLength(), P);
972
+ }, e.getEncodedBits = function(f) {
973
+ if (!o.isValid(f) || f < 7)
974
974
  throw new Error("Invalid QR Code version");
975
- let R = g << 12;
976
- for (; t.getBCHDigit(R) - s >= 0; )
977
- R ^= a << t.getBCHDigit(R) - s;
978
- return g << 12 | R;
975
+ let M = f << 12;
976
+ for (; t.getBCHDigit(M) - c >= 0; )
977
+ M ^= a << t.getBCHDigit(M) - c;
978
+ return f << 12 | M;
979
979
  };
980
980
  })(Ce)), Ce;
981
981
  }
@@ -985,11 +985,11 @@ function Sn() {
985
985
  rt = 1;
986
986
  const e = z(), t = 1335, i = 21522, r = e.getBCHDigit(t);
987
987
  return ye.getEncodedBits = function(o, a) {
988
- const s = o.bit << 3 | a;
989
- let c = s << 10;
990
- for (; e.getBCHDigit(c) - r >= 0; )
991
- c ^= t << e.getBCHDigit(c) - r;
992
- return (s << 10 | c) ^ i;
988
+ const c = o.bit << 3 | a;
989
+ let s = c << 10;
990
+ for (; e.getBCHDigit(s) - r >= 0; )
991
+ s ^= t << e.getBCHDigit(s) - r;
992
+ return (c << 10 | s) ^ i;
993
993
  }, ye;
994
994
  }
995
995
  var Te = {}, Me, ot;
@@ -1010,8 +1010,8 @@ function An() {
1010
1010
  let n, o, a;
1011
1011
  for (n = 0; n + 3 <= this.data.length; n += 3)
1012
1012
  o = this.data.substr(n, 3), a = parseInt(o, 10), r.put(a, 10);
1013
- const s = this.data.length - n;
1014
- s > 0 && (o = this.data.substr(n), a = parseInt(o, 10), r.put(a, s * 3 + 1));
1013
+ const c = this.data.length - n;
1014
+ c > 0 && (o = this.data.substr(n), a = parseInt(o, 10), r.put(a, c * 3 + 1));
1015
1015
  }, Me = t, Me;
1016
1016
  }
1017
1017
  var be, it;
@@ -1140,16 +1140,16 @@ function Pn() {
1140
1140
  single_source_shortest_paths: function(i, r, n) {
1141
1141
  var o = {}, a = {};
1142
1142
  a[r] = 0;
1143
- var s = t.PriorityQueue.make();
1144
- s.push(r, 0);
1145
- for (var c, h, f, u, d, g, R, E, B; !s.empty(); ) {
1146
- c = s.pop(), h = c.value, u = c.cost, d = i[h] || {};
1147
- for (f in d)
1148
- d.hasOwnProperty(f) && (g = d[f], R = u + g, E = a[f], B = typeof a[f] > "u", (B || E > R) && (a[f] = R, s.push(f, R), o[f] = h));
1143
+ var c = t.PriorityQueue.make();
1144
+ c.push(r, 0);
1145
+ for (var s, u, h, g, d, f, M, I, P; !c.empty(); ) {
1146
+ s = c.pop(), u = s.value, g = s.cost, d = i[u] || {};
1147
+ for (h in d)
1148
+ d.hasOwnProperty(h) && (f = d[h], M = g + f, I = a[h], P = typeof a[h] > "u", (P || I > M) && (a[h] = M, c.push(h, M), o[h] = u));
1149
1149
  }
1150
1150
  if (typeof n < "u" && typeof a[n] > "u") {
1151
- var w = ["Could not find a path from ", r, " to ", n, "."].join("");
1152
- throw new Error(w);
1151
+ var A = ["Could not find a path from ", r, " to ", n, "."].join("");
1152
+ throw new Error(A);
1153
1153
  }
1154
1154
  return o;
1155
1155
  },
@@ -1204,133 +1204,133 @@ function Pn() {
1204
1204
  var lt;
1205
1205
  function Ln() {
1206
1206
  return lt || (lt = 1, (function(e) {
1207
- const t = H(), i = An(), r = vn(), n = Nn(), o = Bn(), a = At(), s = z(), c = Pn();
1208
- function h(w) {
1209
- return unescape(encodeURIComponent(w)).length;
1207
+ const t = H(), i = An(), r = vn(), n = Nn(), o = Bn(), a = At(), c = z(), s = Pn();
1208
+ function u(A) {
1209
+ return unescape(encodeURIComponent(A)).length;
1210
1210
  }
1211
- function f(w, m, p) {
1212
- const y = [];
1213
- let P;
1214
- for (; (P = w.exec(p)) !== null; )
1215
- y.push({
1216
- data: P[0],
1217
- index: P.index,
1218
- mode: m,
1219
- length: P[0].length
1211
+ function h(A, E, m) {
1212
+ const p = [];
1213
+ let B;
1214
+ for (; (B = A.exec(m)) !== null; )
1215
+ p.push({
1216
+ data: B[0],
1217
+ index: B.index,
1218
+ mode: E,
1219
+ length: B[0].length
1220
1220
  });
1221
- return y;
1221
+ return p;
1222
1222
  }
1223
- function u(w) {
1224
- const m = f(a.NUMERIC, t.NUMERIC, w), p = f(a.ALPHANUMERIC, t.ALPHANUMERIC, w);
1225
- let y, P;
1226
- return s.isKanjiModeEnabled() ? (y = f(a.BYTE, t.BYTE, w), P = f(a.KANJI, t.KANJI, w)) : (y = f(a.BYTE_KANJI, t.BYTE, w), P = []), m.concat(p, y, P).sort(function(S, b) {
1227
- return S.index - b.index;
1228
- }).map(function(S) {
1223
+ function g(A) {
1224
+ const E = h(a.NUMERIC, t.NUMERIC, A), m = h(a.ALPHANUMERIC, t.ALPHANUMERIC, A);
1225
+ let p, B;
1226
+ return c.isKanjiModeEnabled() ? (p = h(a.BYTE, t.BYTE, A), B = h(a.KANJI, t.KANJI, A)) : (p = h(a.BYTE_KANJI, t.BYTE, A), B = []), E.concat(m, p, B).sort(function(R, b) {
1227
+ return R.index - b.index;
1228
+ }).map(function(R) {
1229
1229
  return {
1230
- data: S.data,
1231
- mode: S.mode,
1232
- length: S.length
1230
+ data: R.data,
1231
+ mode: R.mode,
1232
+ length: R.length
1233
1233
  };
1234
1234
  });
1235
1235
  }
1236
- function d(w, m) {
1237
- switch (m) {
1236
+ function d(A, E) {
1237
+ switch (E) {
1238
1238
  case t.NUMERIC:
1239
- return i.getBitsLength(w);
1239
+ return i.getBitsLength(A);
1240
1240
  case t.ALPHANUMERIC:
1241
- return r.getBitsLength(w);
1241
+ return r.getBitsLength(A);
1242
1242
  case t.KANJI:
1243
- return o.getBitsLength(w);
1243
+ return o.getBitsLength(A);
1244
1244
  case t.BYTE:
1245
- return n.getBitsLength(w);
1245
+ return n.getBitsLength(A);
1246
1246
  }
1247
1247
  }
1248
- function g(w) {
1249
- return w.reduce(function(m, p) {
1250
- const y = m.length - 1 >= 0 ? m[m.length - 1] : null;
1251
- return y && y.mode === p.mode ? (m[m.length - 1].data += p.data, m) : (m.push(p), m);
1248
+ function f(A) {
1249
+ return A.reduce(function(E, m) {
1250
+ const p = E.length - 1 >= 0 ? E[E.length - 1] : null;
1251
+ return p && p.mode === m.mode ? (E[E.length - 1].data += m.data, E) : (E.push(m), E);
1252
1252
  }, []);
1253
1253
  }
1254
- function R(w) {
1255
- const m = [];
1256
- for (let p = 0; p < w.length; p++) {
1257
- const y = w[p];
1258
- switch (y.mode) {
1254
+ function M(A) {
1255
+ const E = [];
1256
+ for (let m = 0; m < A.length; m++) {
1257
+ const p = A[m];
1258
+ switch (p.mode) {
1259
1259
  case t.NUMERIC:
1260
- m.push([
1261
- y,
1262
- { data: y.data, mode: t.ALPHANUMERIC, length: y.length },
1263
- { data: y.data, mode: t.BYTE, length: y.length }
1260
+ E.push([
1261
+ p,
1262
+ { data: p.data, mode: t.ALPHANUMERIC, length: p.length },
1263
+ { data: p.data, mode: t.BYTE, length: p.length }
1264
1264
  ]);
1265
1265
  break;
1266
1266
  case t.ALPHANUMERIC:
1267
- m.push([
1268
- y,
1269
- { data: y.data, mode: t.BYTE, length: y.length }
1267
+ E.push([
1268
+ p,
1269
+ { data: p.data, mode: t.BYTE, length: p.length }
1270
1270
  ]);
1271
1271
  break;
1272
1272
  case t.KANJI:
1273
- m.push([
1274
- y,
1275
- { data: y.data, mode: t.BYTE, length: h(y.data) }
1273
+ E.push([
1274
+ p,
1275
+ { data: p.data, mode: t.BYTE, length: u(p.data) }
1276
1276
  ]);
1277
1277
  break;
1278
1278
  case t.BYTE:
1279
- m.push([
1280
- { data: y.data, mode: t.BYTE, length: h(y.data) }
1279
+ E.push([
1280
+ { data: p.data, mode: t.BYTE, length: u(p.data) }
1281
1281
  ]);
1282
1282
  }
1283
1283
  }
1284
- return m;
1284
+ return E;
1285
1285
  }
1286
- function E(w, m) {
1287
- const p = {}, y = { start: {} };
1288
- let P = ["start"];
1289
- for (let I = 0; I < w.length; I++) {
1290
- const S = w[I], b = [];
1291
- for (let C = 0; C < S.length; C++) {
1292
- const v = S[C], T = "" + I + C;
1293
- b.push(T), p[T] = { node: v, lastCount: 0 }, y[T] = {};
1294
- for (let A = 0; A < P.length; A++) {
1295
- const M = P[A];
1296
- p[M] && p[M].node.mode === v.mode ? (y[M][T] = d(p[M].lastCount + v.length, v.mode) - d(p[M].lastCount, v.mode), p[M].lastCount += v.length) : (p[M] && (p[M].lastCount = v.length), y[M][T] = d(v.length, v.mode) + 4 + t.getCharCountIndicator(v.mode, m));
1286
+ function I(A, E) {
1287
+ const m = {}, p = { start: {} };
1288
+ let B = ["start"];
1289
+ for (let w = 0; w < A.length; w++) {
1290
+ const R = A[w], b = [];
1291
+ for (let C = 0; C < R.length; C++) {
1292
+ const v = R[C], y = "" + w + C;
1293
+ b.push(y), m[y] = { node: v, lastCount: 0 }, p[y] = {};
1294
+ for (let S = 0; S < B.length; S++) {
1295
+ const T = B[S];
1296
+ m[T] && m[T].node.mode === v.mode ? (p[T][y] = d(m[T].lastCount + v.length, v.mode) - d(m[T].lastCount, v.mode), m[T].lastCount += v.length) : (m[T] && (m[T].lastCount = v.length), p[T][y] = d(v.length, v.mode) + 4 + t.getCharCountIndicator(v.mode, E));
1297
1297
  }
1298
1298
  }
1299
- P = b;
1299
+ B = b;
1300
1300
  }
1301
- for (let I = 0; I < P.length; I++)
1302
- y[P[I]].end = 0;
1303
- return { map: y, table: p };
1301
+ for (let w = 0; w < B.length; w++)
1302
+ p[B[w]].end = 0;
1303
+ return { map: p, table: m };
1304
1304
  }
1305
- function B(w, m) {
1306
- let p;
1307
- const y = t.getBestModeForData(w);
1308
- if (p = t.from(m, y), p !== t.BYTE && p.bit < y.bit)
1309
- throw new Error('"' + w + '" cannot be encoded with mode ' + t.toString(p) + `.
1310
- Suggested mode is: ` + t.toString(y));
1311
- switch (p === t.KANJI && !s.isKanjiModeEnabled() && (p = t.BYTE), p) {
1305
+ function P(A, E) {
1306
+ let m;
1307
+ const p = t.getBestModeForData(A);
1308
+ if (m = t.from(E, p), m !== t.BYTE && m.bit < p.bit)
1309
+ throw new Error('"' + A + '" cannot be encoded with mode ' + t.toString(m) + `.
1310
+ Suggested mode is: ` + t.toString(p));
1311
+ switch (m === t.KANJI && !c.isKanjiModeEnabled() && (m = t.BYTE), m) {
1312
1312
  case t.NUMERIC:
1313
- return new i(w);
1313
+ return new i(A);
1314
1314
  case t.ALPHANUMERIC:
1315
- return new r(w);
1315
+ return new r(A);
1316
1316
  case t.KANJI:
1317
- return new o(w);
1317
+ return new o(A);
1318
1318
  case t.BYTE:
1319
- return new n(w);
1319
+ return new n(A);
1320
1320
  }
1321
1321
  }
1322
- e.fromArray = function(m) {
1323
- return m.reduce(function(p, y) {
1324
- return typeof y == "string" ? p.push(B(y, null)) : y.data && p.push(B(y.data, y.mode)), p;
1322
+ e.fromArray = function(E) {
1323
+ return E.reduce(function(m, p) {
1324
+ return typeof p == "string" ? m.push(P(p, null)) : p.data && m.push(P(p.data, p.mode)), m;
1325
1325
  }, []);
1326
- }, e.fromString = function(m, p) {
1327
- const y = u(m, s.isKanjiModeEnabled()), P = R(y), I = E(P, p), S = c.find_path(I.map, "start", "end"), b = [];
1328
- for (let C = 1; C < S.length - 1; C++)
1329
- b.push(I.table[S[C]].node);
1330
- return e.fromArray(g(b));
1331
- }, e.rawSplit = function(m) {
1326
+ }, e.fromString = function(E, m) {
1327
+ const p = g(E, c.isKanjiModeEnabled()), B = M(p), w = I(B, m), R = s.find_path(w.map, "start", "end"), b = [];
1328
+ for (let C = 1; C < R.length - 1; C++)
1329
+ b.push(w.table[R[C]].node);
1330
+ return e.fromArray(f(b));
1331
+ }, e.rawSplit = function(E) {
1332
1332
  return e.fromArray(
1333
- u(m, s.isKanjiModeEnabled())
1333
+ g(E, c.isKanjiModeEnabled())
1334
1334
  );
1335
1335
  };
1336
1336
  })(Te)), Te;
@@ -1339,55 +1339,55 @@ var ut;
1339
1339
  function Dn() {
1340
1340
  if (ut) return le;
1341
1341
  ut = 1;
1342
- const e = z(), t = Ue(), i = wn(), r = Cn(), n = In(), o = En(), a = yn(), s = Rt(), c = bn(), h = Rn(), f = Sn(), u = H(), d = Ln();
1343
- function g(I, S) {
1344
- const b = I.size, C = o.getPositions(S);
1342
+ const e = z(), t = Ue(), i = wn(), r = Cn(), n = In(), o = En(), a = yn(), c = Rt(), s = bn(), u = Rn(), h = Sn(), g = H(), d = Ln();
1343
+ function f(w, R) {
1344
+ const b = w.size, C = o.getPositions(R);
1345
1345
  for (let v = 0; v < C.length; v++) {
1346
- const T = C[v][0], A = C[v][1];
1347
- for (let M = -1; M <= 7; M++)
1348
- if (!(T + M <= -1 || b <= T + M))
1346
+ const y = C[v][0], S = C[v][1];
1347
+ for (let T = -1; T <= 7; T++)
1348
+ if (!(y + T <= -1 || b <= y + T))
1349
1349
  for (let N = -1; N <= 7; N++)
1350
- A + N <= -1 || b <= A + N || (M >= 0 && M <= 6 && (N === 0 || N === 6) || N >= 0 && N <= 6 && (M === 0 || M === 6) || M >= 2 && M <= 4 && N >= 2 && N <= 4 ? I.set(T + M, A + N, !0, !0) : I.set(T + M, A + N, !1, !0));
1350
+ S + N <= -1 || b <= S + N || (T >= 0 && T <= 6 && (N === 0 || N === 6) || N >= 0 && N <= 6 && (T === 0 || T === 6) || T >= 2 && T <= 4 && N >= 2 && N <= 4 ? w.set(y + T, S + N, !0, !0) : w.set(y + T, S + N, !1, !0));
1351
1351
  }
1352
1352
  }
1353
- function R(I) {
1354
- const S = I.size;
1355
- for (let b = 8; b < S - 8; b++) {
1353
+ function M(w) {
1354
+ const R = w.size;
1355
+ for (let b = 8; b < R - 8; b++) {
1356
1356
  const C = b % 2 === 0;
1357
- I.set(b, 6, C, !0), I.set(6, b, C, !0);
1357
+ w.set(b, 6, C, !0), w.set(6, b, C, !0);
1358
1358
  }
1359
1359
  }
1360
- function E(I, S) {
1361
- const b = n.getPositions(S);
1360
+ function I(w, R) {
1361
+ const b = n.getPositions(R);
1362
1362
  for (let C = 0; C < b.length; C++) {
1363
- const v = b[C][0], T = b[C][1];
1364
- for (let A = -2; A <= 2; A++)
1365
- for (let M = -2; M <= 2; M++)
1366
- A === -2 || A === 2 || M === -2 || M === 2 || A === 0 && M === 0 ? I.set(v + A, T + M, !0, !0) : I.set(v + A, T + M, !1, !0);
1363
+ const v = b[C][0], y = b[C][1];
1364
+ for (let S = -2; S <= 2; S++)
1365
+ for (let T = -2; T <= 2; T++)
1366
+ S === -2 || S === 2 || T === -2 || T === 2 || S === 0 && T === 0 ? w.set(v + S, y + T, !0, !0) : w.set(v + S, y + T, !1, !0);
1367
1367
  }
1368
1368
  }
1369
- function B(I, S) {
1370
- const b = I.size, C = h.getEncodedBits(S);
1371
- let v, T, A;
1372
- for (let M = 0; M < 18; M++)
1373
- v = Math.floor(M / 3), T = M % 3 + b - 8 - 3, A = (C >> M & 1) === 1, I.set(v, T, A, !0), I.set(T, v, A, !0);
1369
+ function P(w, R) {
1370
+ const b = w.size, C = u.getEncodedBits(R);
1371
+ let v, y, S;
1372
+ for (let T = 0; T < 18; T++)
1373
+ v = Math.floor(T / 3), y = T % 3 + b - 8 - 3, S = (C >> T & 1) === 1, w.set(v, y, S, !0), w.set(y, v, S, !0);
1374
1374
  }
1375
- function w(I, S, b) {
1376
- const C = I.size, v = f.getEncodedBits(S, b);
1377
- let T, A;
1378
- for (T = 0; T < 15; T++)
1379
- A = (v >> T & 1) === 1, T < 6 ? I.set(T, 8, A, !0) : T < 8 ? I.set(T + 1, 8, A, !0) : I.set(C - 15 + T, 8, A, !0), T < 8 ? I.set(8, C - T - 1, A, !0) : T < 9 ? I.set(8, 15 - T - 1 + 1, A, !0) : I.set(8, 15 - T - 1, A, !0);
1380
- I.set(C - 8, 8, 1, !0);
1375
+ function A(w, R, b) {
1376
+ const C = w.size, v = h.getEncodedBits(R, b);
1377
+ let y, S;
1378
+ for (y = 0; y < 15; y++)
1379
+ S = (v >> y & 1) === 1, y < 6 ? w.set(y, 8, S, !0) : y < 8 ? w.set(y + 1, 8, S, !0) : w.set(C - 15 + y, 8, S, !0), y < 8 ? w.set(8, C - y - 1, S, !0) : y < 9 ? w.set(8, 15 - y - 1 + 1, S, !0) : w.set(8, 15 - y - 1, S, !0);
1380
+ w.set(C - 8, 8, 1, !0);
1381
1381
  }
1382
- function m(I, S) {
1383
- const b = I.size;
1384
- let C = -1, v = b - 1, T = 7, A = 0;
1385
- for (let M = b - 1; M > 0; M -= 2)
1386
- for (M === 6 && M--; ; ) {
1382
+ function E(w, R) {
1383
+ const b = w.size;
1384
+ let C = -1, v = b - 1, y = 7, S = 0;
1385
+ for (let T = b - 1; T > 0; T -= 2)
1386
+ for (T === 6 && T--; ; ) {
1387
1387
  for (let N = 0; N < 2; N++)
1388
- if (!I.isReserved(v, M - N)) {
1388
+ if (!w.isReserved(v, T - N)) {
1389
1389
  let O = !1;
1390
- A < S.length && (O = (S[A] >>> T & 1) === 1), I.set(v, M - N, O), T--, T === -1 && (A++, T = 7);
1390
+ S < R.length && (O = (R[S] >>> y & 1) === 1), w.set(v, T - N, O), y--, y === -1 && (S++, y = 7);
1391
1391
  }
1392
1392
  if (v += C, v < 0 || b <= v) {
1393
1393
  v -= C, C = -C;
@@ -1395,81 +1395,81 @@ function Dn() {
1395
1395
  }
1396
1396
  }
1397
1397
  }
1398
- function p(I, S, b) {
1398
+ function m(w, R, b) {
1399
1399
  const C = new i();
1400
1400
  b.forEach(function(N) {
1401
- C.put(N.mode.bit, 4), C.put(N.getLength(), u.getCharCountIndicator(N.mode, I)), N.write(C);
1401
+ C.put(N.mode.bit, 4), C.put(N.getLength(), g.getCharCountIndicator(N.mode, w)), N.write(C);
1402
1402
  });
1403
- const v = e.getSymbolTotalCodewords(I), T = s.getTotalCodewordsCount(I, S), A = (v - T) * 8;
1404
- for (C.getLengthInBits() + 4 <= A && C.put(0, 4); C.getLengthInBits() % 8 !== 0; )
1403
+ const v = e.getSymbolTotalCodewords(w), y = c.getTotalCodewordsCount(w, R), S = (v - y) * 8;
1404
+ for (C.getLengthInBits() + 4 <= S && C.put(0, 4); C.getLengthInBits() % 8 !== 0; )
1405
1405
  C.putBit(0);
1406
- const M = (A - C.getLengthInBits()) / 8;
1407
- for (let N = 0; N < M; N++)
1406
+ const T = (S - C.getLengthInBits()) / 8;
1407
+ for (let N = 0; N < T; N++)
1408
1408
  C.put(N % 2 ? 17 : 236, 8);
1409
- return y(C, I, S);
1409
+ return p(C, w, R);
1410
1410
  }
1411
- function y(I, S, b) {
1412
- const C = e.getSymbolTotalCodewords(S), v = s.getTotalCodewordsCount(S, b), T = C - v, A = s.getBlocksCount(S, b), M = C % A, N = A - M, O = Math.floor(C / A), Q = Math.floor(T / A), Ft = Q + 1, _e = O - Q, Ut = new c(_e);
1411
+ function p(w, R, b) {
1412
+ const C = e.getSymbolTotalCodewords(R), v = c.getTotalCodewordsCount(R, b), y = C - v, S = c.getBlocksCount(R, b), T = C % S, N = S - T, O = Math.floor(C / S), Q = Math.floor(y / S), Ft = Q + 1, _e = O - Q, Ut = new s(_e);
1413
1413
  let re = 0;
1414
- const $ = new Array(A), Oe = new Array(A);
1414
+ const $ = new Array(S), Oe = new Array(S);
1415
1415
  let oe = 0;
1416
- const kt = new Uint8Array(I.buffer);
1417
- for (let K = 0; K < A; K++) {
1416
+ const kt = new Uint8Array(w.buffer);
1417
+ for (let K = 0; K < S; K++) {
1418
1418
  const se = K < N ? Q : Ft;
1419
1419
  $[K] = kt.slice(re, re + se), Oe[K] = Ut.encode($[K]), re += se, oe = Math.max(oe, se);
1420
1420
  }
1421
1421
  const ie = new Uint8Array(C);
1422
1422
  let qe = 0, U, k;
1423
1423
  for (U = 0; U < oe; U++)
1424
- for (k = 0; k < A; k++)
1424
+ for (k = 0; k < S; k++)
1425
1425
  U < $[k].length && (ie[qe++] = $[k][U]);
1426
1426
  for (U = 0; U < _e; U++)
1427
- for (k = 0; k < A; k++)
1427
+ for (k = 0; k < S; k++)
1428
1428
  ie[qe++] = Oe[k][U];
1429
1429
  return ie;
1430
1430
  }
1431
- function P(I, S, b, C) {
1431
+ function B(w, R, b, C) {
1432
1432
  let v;
1433
- if (Array.isArray(I))
1434
- v = d.fromArray(I);
1435
- else if (typeof I == "string") {
1436
- let O = S;
1433
+ if (Array.isArray(w))
1434
+ v = d.fromArray(w);
1435
+ else if (typeof w == "string") {
1436
+ let O = R;
1437
1437
  if (!O) {
1438
- const Q = d.rawSplit(I);
1439
- O = h.getBestVersionForData(Q, b);
1438
+ const Q = d.rawSplit(w);
1439
+ O = u.getBestVersionForData(Q, b);
1440
1440
  }
1441
- v = d.fromString(I, O || 40);
1441
+ v = d.fromString(w, O || 40);
1442
1442
  } else
1443
1443
  throw new Error("Invalid data");
1444
- const T = h.getBestVersionForData(v, b);
1445
- if (!T)
1444
+ const y = u.getBestVersionForData(v, b);
1445
+ if (!y)
1446
1446
  throw new Error("The amount of data is too big to be stored in a QR Code");
1447
- if (!S)
1448
- S = T;
1449
- else if (S < T)
1447
+ if (!R)
1448
+ R = y;
1449
+ else if (R < y)
1450
1450
  throw new Error(
1451
1451
  `
1452
1452
  The chosen QR Code version cannot contain this amount of data.
1453
- Minimum version required to store current data is: ` + T + `.
1453
+ Minimum version required to store current data is: ` + y + `.
1454
1454
  `
1455
1455
  );
1456
- const A = p(S, b, v), M = e.getSymbolSize(S), N = new r(M);
1457
- return g(N, S), R(N), E(N, S), w(N, b, 0), S >= 7 && B(N, S), m(N, A), isNaN(C) && (C = a.getBestMask(
1456
+ const S = m(R, b, v), T = e.getSymbolSize(R), N = new r(T);
1457
+ return f(N, R), M(N), I(N, R), A(N, b, 0), R >= 7 && P(N, R), E(N, S), isNaN(C) && (C = a.getBestMask(
1458
1458
  N,
1459
- w.bind(null, N, b)
1460
- )), a.applyMask(C, N), w(N, b, C), {
1459
+ A.bind(null, N, b)
1460
+ )), a.applyMask(C, N), A(N, b, C), {
1461
1461
  modules: N,
1462
- version: S,
1462
+ version: R,
1463
1463
  errorCorrectionLevel: b,
1464
1464
  maskPattern: C,
1465
1465
  segments: v
1466
1466
  };
1467
1467
  }
1468
- return le.create = function(S, b) {
1469
- if (typeof S > "u" || S === "")
1468
+ return le.create = function(R, b) {
1469
+ if (typeof R > "u" || R === "")
1470
1470
  throw new Error("No input text");
1471
- let C = t.M, v, T;
1472
- return typeof b < "u" && (C = t.from(b.errorCorrectionLevel, t.M), v = h.from(b.version), T = a.from(b.maskPattern), b.toSJISFunc && e.setToSJISFunction(b.toSJISFunc)), P(S, v, C, T);
1471
+ let C = t.M, v, y;
1472
+ return typeof b < "u" && (C = t.from(b.errorCorrectionLevel, t.M), v = u.from(b.version), y = a.from(b.maskPattern), b.toSJISFunc && e.setToSJISFunction(b.toSJISFunc)), B(R, v, C, y);
1473
1473
  }, le;
1474
1474
  }
1475
1475
  var ve = {}, Ne = {}, dt;
@@ -1513,15 +1513,15 @@ function vt() {
1513
1513
  const o = e.getScale(r, n);
1514
1514
  return Math.floor((r + n.margin * 2) * o);
1515
1515
  }, e.qrToImageData = function(r, n, o) {
1516
- const a = n.modules.size, s = n.modules.data, c = e.getScale(a, o), h = Math.floor((a + o.margin * 2) * c), f = o.margin * c, u = [o.color.light, o.color.dark];
1517
- for (let d = 0; d < h; d++)
1518
- for (let g = 0; g < h; g++) {
1519
- let R = (d * h + g) * 4, E = o.color.light;
1520
- if (d >= f && g >= f && d < h - f && g < h - f) {
1521
- const B = Math.floor((d - f) / c), w = Math.floor((g - f) / c);
1522
- E = u[s[B * a + w] ? 1 : 0];
1516
+ const a = n.modules.size, c = n.modules.data, s = e.getScale(a, o), u = Math.floor((a + o.margin * 2) * s), h = o.margin * s, g = [o.color.light, o.color.dark];
1517
+ for (let d = 0; d < u; d++)
1518
+ for (let f = 0; f < u; f++) {
1519
+ let M = (d * u + f) * 4, I = o.color.light;
1520
+ if (d >= h && f >= h && d < u - h && f < u - h) {
1521
+ const P = Math.floor((d - h) / s), A = Math.floor((f - h) / s);
1522
+ I = g[c[P * a + A] ? 1 : 0];
1523
1523
  }
1524
- r[R++] = E.r, r[R++] = E.g, r[R++] = E.b, r[R] = E.a;
1524
+ r[M++] = I.r, r[M++] = I.g, r[M++] = I.b, r[M] = I.a;
1525
1525
  }
1526
1526
  };
1527
1527
  })(Ne)), Ne;
@@ -1540,16 +1540,16 @@ function Fn() {
1540
1540
  throw new Error("You need to specify a canvas element");
1541
1541
  }
1542
1542
  }
1543
- e.render = function(o, a, s) {
1544
- let c = s, h = a;
1545
- typeof c > "u" && (!a || !a.getContext) && (c = a, a = void 0), a || (h = r()), c = t.getOptions(c);
1546
- const f = t.getImageWidth(o.modules.size, c), u = h.getContext("2d"), d = u.createImageData(f, f);
1547
- return t.qrToImageData(d.data, o, c), i(u, h, f), u.putImageData(d, 0, 0), h;
1548
- }, e.renderToDataURL = function(o, a, s) {
1549
- let c = s;
1550
- typeof c > "u" && (!a || !a.getContext) && (c = a, a = void 0), c || (c = {});
1551
- const h = e.render(o, a, c), f = c.type || "image/png", u = c.rendererOpts || {};
1552
- return h.toDataURL(f, u.quality);
1543
+ e.render = function(o, a, c) {
1544
+ let s = c, u = a;
1545
+ typeof s > "u" && (!a || !a.getContext) && (s = a, a = void 0), a || (u = r()), s = t.getOptions(s);
1546
+ const h = t.getImageWidth(o.modules.size, s), g = u.getContext("2d"), d = g.createImageData(h, h);
1547
+ return t.qrToImageData(d.data, o, s), i(g, u, h), g.putImageData(d, 0, 0), u;
1548
+ }, e.renderToDataURL = function(o, a, c) {
1549
+ let s = c;
1550
+ typeof s > "u" && (!a || !a.getContext) && (s = a, a = void 0), s || (s = {});
1551
+ const u = e.render(o, a, s), h = s.type || "image/png", g = s.rendererOpts || {};
1552
+ return u.toDataURL(h, g.quality);
1553
1553
  };
1554
1554
  })(ve)), ve;
1555
1555
  }
@@ -1559,25 +1559,25 @@ function Un() {
1559
1559
  ht = 1;
1560
1560
  const e = vt();
1561
1561
  function t(n, o) {
1562
- const a = n.a / 255, s = o + '="' + n.hex + '"';
1563
- return a < 1 ? s + " " + o + '-opacity="' + a.toFixed(2).slice(1) + '"' : s;
1562
+ const a = n.a / 255, c = o + '="' + n.hex + '"';
1563
+ return a < 1 ? c + " " + o + '-opacity="' + a.toFixed(2).slice(1) + '"' : c;
1564
1564
  }
1565
1565
  function i(n, o, a) {
1566
- let s = n + o;
1567
- return typeof a < "u" && (s += " " + a), s;
1566
+ let c = n + o;
1567
+ return typeof a < "u" && (c += " " + a), c;
1568
1568
  }
1569
1569
  function r(n, o, a) {
1570
- let s = "", c = 0, h = !1, f = 0;
1571
- for (let u = 0; u < n.length; u++) {
1572
- const d = Math.floor(u % o), g = Math.floor(u / o);
1573
- !d && !h && (h = !0), n[u] ? (f++, u > 0 && d > 0 && n[u - 1] || (s += h ? i("M", d + a, 0.5 + g + a) : i("m", c, 0), c = 0, h = !1), d + 1 < o && n[u + 1] || (s += i("h", f), f = 0)) : c++;
1570
+ let c = "", s = 0, u = !1, h = 0;
1571
+ for (let g = 0; g < n.length; g++) {
1572
+ const d = Math.floor(g % o), f = Math.floor(g / o);
1573
+ !d && !u && (u = !0), n[g] ? (h++, g > 0 && d > 0 && n[g - 1] || (c += u ? i("M", d + a, 0.5 + f + a) : i("m", s, 0), s = 0, u = !1), d + 1 < o && n[g + 1] || (c += i("h", h), h = 0)) : s++;
1574
1574
  }
1575
- return s;
1575
+ return c;
1576
1576
  }
1577
- return Be.render = function(o, a, s) {
1578
- const c = e.getOptions(a), h = o.modules.size, f = o.modules.data, u = h + c.margin * 2, d = c.color.light.a ? "<path " + t(c.color.light, "fill") + ' d="M0 0h' + u + "v" + u + 'H0z"/>' : "", g = "<path " + t(c.color.dark, "stroke") + ' d="' + r(f, h, c.margin) + '"/>', R = 'viewBox="0 0 ' + u + " " + u + '"', B = '<svg xmlns="http://www.w3.org/2000/svg" ' + (c.width ? 'width="' + c.width + '" height="' + c.width + '" ' : "") + R + ' shape-rendering="crispEdges">' + d + g + `</svg>
1577
+ return Be.render = function(o, a, c) {
1578
+ const s = e.getOptions(a), u = o.modules.size, h = o.modules.data, g = u + s.margin * 2, d = s.color.light.a ? "<path " + t(s.color.light, "fill") + ' d="M0 0h' + g + "v" + g + 'H0z"/>' : "", f = "<path " + t(s.color.dark, "stroke") + ' d="' + r(h, u, s.margin) + '"/>', M = 'viewBox="0 0 ' + g + " " + g + '"', P = '<svg xmlns="http://www.w3.org/2000/svg" ' + (s.width ? 'width="' + s.width + '" height="' + s.width + '" ' : "") + M + ' shape-rendering="crispEdges">' + d + f + `</svg>
1579
1579
  `;
1580
- return typeof s == "function" && s(null, B), B;
1580
+ return typeof c == "function" && c(null, P), P;
1581
1581
  }, Be;
1582
1582
  }
1583
1583
  var gt;
@@ -1585,35 +1585,35 @@ function kn() {
1585
1585
  if (gt) return j;
1586
1586
  gt = 1;
1587
1587
  const e = pn(), t = Dn(), i = Fn(), r = Un();
1588
- function n(o, a, s, c, h) {
1589
- const f = [].slice.call(arguments, 1), u = f.length, d = typeof f[u - 1] == "function";
1588
+ function n(o, a, c, s, u) {
1589
+ const h = [].slice.call(arguments, 1), g = h.length, d = typeof h[g - 1] == "function";
1590
1590
  if (!d && !e())
1591
1591
  throw new Error("Callback required as last argument");
1592
1592
  if (d) {
1593
- if (u < 2)
1593
+ if (g < 2)
1594
1594
  throw new Error("Too few arguments provided");
1595
- u === 2 ? (h = s, s = a, a = c = void 0) : u === 3 && (a.getContext && typeof h > "u" ? (h = c, c = void 0) : (h = c, c = s, s = a, a = void 0));
1595
+ g === 2 ? (u = c, c = a, a = s = void 0) : g === 3 && (a.getContext && typeof u > "u" ? (u = s, s = void 0) : (u = s, s = c, c = a, a = void 0));
1596
1596
  } else {
1597
- if (u < 1)
1597
+ if (g < 1)
1598
1598
  throw new Error("Too few arguments provided");
1599
- return u === 1 ? (s = a, a = c = void 0) : u === 2 && !a.getContext && (c = s, s = a, a = void 0), new Promise(function(g, R) {
1599
+ return g === 1 ? (c = a, a = s = void 0) : g === 2 && !a.getContext && (s = c, c = a, a = void 0), new Promise(function(f, M) {
1600
1600
  try {
1601
- const E = t.create(s, c);
1602
- g(o(E, a, c));
1603
- } catch (E) {
1604
- R(E);
1601
+ const I = t.create(c, s);
1602
+ f(o(I, a, s));
1603
+ } catch (I) {
1604
+ M(I);
1605
1605
  }
1606
1606
  });
1607
1607
  }
1608
1608
  try {
1609
- const g = t.create(s, c);
1610
- h(null, o(g, a, c));
1611
- } catch (g) {
1612
- h(g);
1609
+ const f = t.create(c, s);
1610
+ u(null, o(f, a, s));
1611
+ } catch (f) {
1612
+ u(f);
1613
1613
  }
1614
1614
  }
1615
- return j.create = t.create, j.toCanvas = n.bind(null, i.render), j.toDataURL = n.bind(null, i.renderToDataURL), j.toString = n.bind(null, function(o, a, s) {
1616
- return r.render(o, s);
1615
+ return j.create = t.create, j.toCanvas = n.bind(null, i.render), j.toDataURL = n.bind(null, i.renderToDataURL), j.toString = n.bind(null, function(o, a, c) {
1616
+ return r.render(o, c);
1617
1617
  }), j;
1618
1618
  }
1619
1619
  var _n = kn();
@@ -1683,7 +1683,7 @@ const On = ({
1683
1683
  onPhoneChange: o,
1684
1684
  onSendSms: a
1685
1685
  }) => {
1686
- const { t: s } = F();
1686
+ const { t: c } = F();
1687
1687
  return /* @__PURE__ */ l(ne, { children: [
1688
1688
  /* @__PURE__ */ l(Gt, { fallback: /* @__PURE__ */ l(J, {}), children: /* @__PURE__ */ l(
1689
1689
  zn,
@@ -1703,7 +1703,7 @@ const On = ({
1703
1703
  disabled: !n || r,
1704
1704
  isLoading: r,
1705
1705
  class: "IncodeRedirectSmsSendButton",
1706
- children: s("redirect.sendLinkViaSms")
1706
+ children: c("redirect.sendLinkViaSms")
1707
1707
  }
1708
1708
  )
1709
1709
  ] });
@@ -1718,23 +1718,23 @@ const On = ({
1718
1718
  manager: r,
1719
1719
  onResend: n
1720
1720
  }) => {
1721
- const { t: o } = F(), [a, s] = _(e), [c, h] = _(!1), [f, u] = _(!1), d = Jt(e)?.code ?? "", g = Kn(a, e), R = x((m, p) => {
1722
- s(m), h(p);
1723
- }, []), E = x(() => {
1724
- u(!0), r.sendSms(a), u(!1);
1725
- }, [r, a]), B = x(() => {
1726
- E(), n();
1727
- }, [E, n]), w = x(() => {
1728
- s(e), h(!1), r.resetSms();
1721
+ const { t: o } = F(), [a, c] = _(e), [s, u] = _(!1), [h, g] = _(!1), d = Jt(e)?.code ?? "", f = Kn(a, e), M = x((E, m) => {
1722
+ c(E), u(m);
1723
+ }, []), I = x(() => {
1724
+ g(!0), r.sendSms(a), g(!1);
1725
+ }, [r, a]), P = x(() => {
1726
+ I(), n();
1727
+ }, [I, n]), A = x(() => {
1728
+ c(e), u(!1), r.resetSms();
1729
1729
  }, [r, e]);
1730
1730
  return /* @__PURE__ */ l(ne, { children: [
1731
1731
  /* @__PURE__ */ l("p", { class: "IncodeRedirectTabDescription", children: o("v2.redirectToMobile.sms.description") }),
1732
1732
  t ? /* @__PURE__ */ l(
1733
1733
  Vn,
1734
1734
  {
1735
- formattedPhone: g,
1736
- onResend: B,
1737
- onChangePhone: w
1735
+ formattedPhone: f,
1736
+ onResend: P,
1737
+ onChangePhone: A
1738
1738
  }
1739
1739
  ) : /* @__PURE__ */ l(
1740
1740
  Hn,
@@ -1742,10 +1742,10 @@ const On = ({
1742
1742
  countryCode: d,
1743
1743
  phonePrefix: e,
1744
1744
  error: i,
1745
- isSending: f,
1746
- isPhoneValid: c,
1747
- onPhoneChange: R,
1748
- onSendSms: E
1745
+ isSending: h,
1746
+ isPhoneValid: s,
1747
+ onPhoneChange: M,
1748
+ onSendSms: I
1749
1749
  }
1750
1750
  )
1751
1751
  ] });
@@ -1757,17 +1757,17 @@ const On = ({
1757
1757
  addContinueToDesktop: n,
1758
1758
  error: o,
1759
1759
  manager: a,
1760
- logoSrc: s
1760
+ logoSrc: c
1761
1761
  }) => {
1762
- const { t: c } = F(), [h, f] = _(!1), u = x(() => {
1763
- f(!0), setTimeout(() => f(!1), 3e3);
1762
+ const { t: s } = F(), [u, h] = _(!1), g = x(() => {
1763
+ h(!0), setTimeout(() => h(!1), 3e3);
1764
1764
  }, []), d = x(() => {
1765
1765
  a.continueOnDesktop();
1766
1766
  }, [a]);
1767
1767
  return /* @__PURE__ */ l("div", { class: "IncodeRedirectContainer", children: [
1768
- /* @__PURE__ */ l(mn, { visible: h }),
1768
+ /* @__PURE__ */ l(mn, { visible: u }),
1769
1769
  /* @__PURE__ */ l("div", { class: "IncodeRedirectCard", children: [
1770
- /* @__PURE__ */ l(hn, { logoSrc: s }),
1770
+ /* @__PURE__ */ l(hn, { logoSrc: c }),
1771
1771
  /* @__PURE__ */ l("div", { class: "IncodeRedirectOptions", children: /* @__PURE__ */ l(
1772
1772
  G,
1773
1773
  {
@@ -1777,8 +1777,8 @@ const On = ({
1777
1777
  activeTriggerClassName: "IncodeRedirectTabActive",
1778
1778
  children: [
1779
1779
  /* @__PURE__ */ l(G.List, { children: [
1780
- /* @__PURE__ */ l(G.Trigger, { value: "qr", children: c("v2.redirectToMobile.tabs.0") }),
1781
- r ? null : /* @__PURE__ */ l(G.Trigger, { value: "sms", children: c("v2.redirectToMobile.tabs.1") })
1780
+ /* @__PURE__ */ l(G.Trigger, { value: "qr", children: s("v2.redirectToMobile.tabs.0") }),
1781
+ r ? null : /* @__PURE__ */ l(G.Trigger, { value: "sms", children: s("v2.redirectToMobile.tabs.1") })
1782
1782
  ] }),
1783
1783
  /* @__PURE__ */ l(G.Content, { value: "qr", children: /* @__PURE__ */ l(qn, { redirectUrl: e }) }),
1784
1784
  r ? null : /* @__PURE__ */ l(G.Content, { value: "sms", children: /* @__PURE__ */ l(
@@ -1788,7 +1788,7 @@ const On = ({
1788
1788
  smsSent: i,
1789
1789
  error: o,
1790
1790
  manager: a,
1791
- onResend: u
1791
+ onResend: g
1792
1792
  }
1793
1793
  ) })
1794
1794
  ]
@@ -1822,7 +1822,7 @@ const On = ({
1822
1822
  }) => {
1823
1823
  const [n, o] = It(
1824
1824
  () => xt({ config: e })
1825
- ), { logoSrc: a, logoHeightPx: s } = qt({
1825
+ ), { logoSrc: a, logoHeightPx: c } = qt({
1826
1826
  hideHeader: void 0,
1827
1827
  hideFooterBranding: void 0,
1828
1828
  logo: void 0,
@@ -1835,7 +1835,7 @@ const On = ({
1835
1835
  }, [n.status, i]), L(() => {
1836
1836
  n.status === "error" && r?.(n.error);
1837
1837
  }, [n.status, r, n]);
1838
- const c = n.status === "idle" || n.status === "loading" ? /* @__PURE__ */ l(J, { fullScreen: !0 }) : n.status === "redirecting" ? /* @__PURE__ */ l(
1838
+ const s = n.status === "idle" || n.status === "loading" ? /* @__PURE__ */ l(J, { fullScreen: !0 }) : n.status === "redirecting" ? /* @__PURE__ */ l(
1839
1839
  jn,
1840
1840
  {
1841
1841
  redirectUrl: n.redirectUrl,
@@ -1852,8 +1852,8 @@ const On = ({
1852
1852
  "div",
1853
1853
  {
1854
1854
  class: "IncodeRedirectRoot",
1855
- style: { "--logo-height": `${s}px` },
1856
- children: c
1855
+ style: { "--logo-height": `${c}px` },
1856
+ children: s
1857
1857
  }
1858
1858
  );
1859
1859
  }, Nt = ({
@@ -1873,42 +1873,42 @@ const On = ({
1873
1873
  Tt(Nt, "incode-redirect-to-mobile");
1874
1874
  function Jn(e) {
1875
1875
  let t = e.replace("#", "");
1876
- t.length === 3 && (t = t.split("").map((u) => u + u).join(""));
1876
+ t.length === 3 && (t = t.split("").map((g) => g + g).join(""));
1877
1877
  const i = /^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);
1878
1878
  if (!i) return null;
1879
- const r = Number.parseInt(i[1], 16) / 255, n = Number.parseInt(i[2], 16) / 255, o = Number.parseInt(i[3], 16) / 255, a = Math.max(r, n, o), s = Math.min(r, n, o);
1880
- let c = 0, h = 0;
1881
- const f = (a + s) / 2;
1882
- if (a !== s) {
1883
- const u = a - s;
1884
- switch (h = f > 0.5 ? u / (2 - a - s) : u / (a + s), a) {
1879
+ const r = Number.parseInt(i[1], 16) / 255, n = Number.parseInt(i[2], 16) / 255, o = Number.parseInt(i[3], 16) / 255, a = Math.max(r, n, o), c = Math.min(r, n, o);
1880
+ let s = 0, u = 0;
1881
+ const h = (a + c) / 2;
1882
+ if (a !== c) {
1883
+ const g = a - c;
1884
+ switch (u = h > 0.5 ? g / (2 - a - c) : g / (a + c), a) {
1885
1885
  case r:
1886
- c = ((n - o) / u + (n < o ? 6 : 0)) / 6;
1886
+ s = ((n - o) / g + (n < o ? 6 : 0)) / 6;
1887
1887
  break;
1888
1888
  case n:
1889
- c = ((o - r) / u + 2) / 6;
1889
+ s = ((o - r) / g + 2) / 6;
1890
1890
  break;
1891
1891
  case o:
1892
- c = ((r - n) / u + 4) / 6;
1892
+ s = ((r - n) / g + 4) / 6;
1893
1893
  break;
1894
1894
  }
1895
1895
  }
1896
- return { h: c * 360, s: h * 100, l: f * 100 };
1896
+ return { h: s * 360, s: u * 100, l: h * 100 };
1897
1897
  }
1898
1898
  function Y(e, t, i) {
1899
1899
  const r = e / 360, n = t / 100, o = i / 100;
1900
- let a, s, c;
1900
+ let a, c, s;
1901
1901
  if (n === 0)
1902
- a = s = c = o;
1902
+ a = c = s = o;
1903
1903
  else {
1904
- const f = (g, R, E) => (E < 0 && (E += 1), E > 1 && (E -= 1), E < 0.16666666666666666 ? g + (R - g) * 6 * E : E < 0.5 ? R : E < 0.6666666666666666 ? g + (R - g) * (0.6666666666666666 - E) * 6 : g), u = o < 0.5 ? o * (1 + n) : o + n - o * n, d = 2 * o - u;
1905
- a = f(d, u, r + 1 / 3), s = f(d, u, r), c = f(d, u, r - 1 / 3);
1904
+ const h = (f, M, I) => (I < 0 && (I += 1), I > 1 && (I -= 1), I < 0.16666666666666666 ? f + (M - f) * 6 * I : I < 0.5 ? M : I < 0.6666666666666666 ? f + (M - f) * (0.6666666666666666 - I) * 6 : f), g = o < 0.5 ? o * (1 + n) : o + n - o * n, d = 2 * o - g;
1905
+ a = h(d, g, r + 1 / 3), c = h(d, g, r), s = h(d, g, r - 1 / 3);
1906
1906
  }
1907
- const h = (f) => {
1908
- const u = Math.round(f * 255).toString(16);
1909
- return u.length === 1 ? `0${u}` : u;
1907
+ const u = (h) => {
1908
+ const g = Math.round(h * 255).toString(16);
1909
+ return g.length === 1 ? `0${g}` : g;
1910
1910
  };
1911
- return `#${h(a)}${h(s)}${h(c)}`;
1911
+ return `#${u(a)}${u(c)}${u(s)}`;
1912
1912
  }
1913
1913
  function Qn(e) {
1914
1914
  const t = Jn(e);
@@ -1958,8 +1958,8 @@ async function Zn(e) {
1958
1958
  if (t)
1959
1959
  return t;
1960
1960
  const r = await (await fetch(e)).blob(), n = await new Promise((o, a) => {
1961
- const s = new FileReader();
1962
- s.onloadend = () => o(s.result), s.onerror = a, s.readAsDataURL(r);
1961
+ const c = new FileReader();
1962
+ c.onloadend = () => o(c.result), c.onerror = a, c.readAsDataURL(r);
1963
1963
  });
1964
1964
  return mt.set(e, n), n;
1965
1965
  }
@@ -2116,8 +2116,8 @@ function Dr(e) {
2116
2116
  if (V.has(t))
2117
2117
  return pt(t);
2118
2118
  let i, r;
2119
- const n = new Promise((c, h) => {
2120
- i = c, r = h;
2119
+ const n = new Promise((s, u) => {
2120
+ i = s, r = u;
2121
2121
  }), o = Bt(), a = {
2122
2122
  status: "loading",
2123
2123
  flowManager: o,
@@ -2133,18 +2133,18 @@ function Dr(e) {
2133
2133
  token: e.token,
2134
2134
  lang: e.lang
2135
2135
  });
2136
- const c = e.disableDashboardTheme ? Promise.resolve({}) : Lt().then((f) => {
2137
- a.theme = f.theme, a.uiConfig = f.uiConfig;
2138
- }), h = o.subscribe((f) => {
2139
- if (f.status === "ready") {
2140
- const u = f;
2141
- e.wasmConfig && Dt(u, e.wasmConfig), tr(u), a.unsubscribe?.(), a.unsubscribe = void 0, a.status = "ready", a.readyResolve();
2142
- } else f.status === "error" && (a.unsubscribe?.(), a.unsubscribe = void 0, a.status = "error", a.error = f.error, a.readyReject(new Error(f.error)));
2136
+ const s = e.disableDashboardTheme ? Promise.resolve({}) : Lt().then((h) => {
2137
+ a.theme = h.theme, a.uiConfig = h.uiConfig;
2138
+ }), u = o.subscribe((h) => {
2139
+ if (h.status === "ready") {
2140
+ const g = h;
2141
+ e.wasmConfig && Dt(g, e.wasmConfig), tr(g), a.unsubscribe?.(), a.unsubscribe = void 0, a.status = "ready", a.readyResolve();
2142
+ } else h.status === "error" && (a.unsubscribe?.(), a.unsubscribe = void 0, a.status = "error", a.error = h.error, a.readyReject(new Error(h.error)));
2143
2143
  });
2144
- a.unsubscribe = h, o.load(), await c;
2145
- } catch (c) {
2146
- a.status = "error", a.error = c instanceof Error ? c.message : "Failed to preload", a.readyReject(
2147
- c instanceof Error ? c : new Error("Failed to preload")
2144
+ a.unsubscribe = u, o.load(), await s;
2145
+ } catch (s) {
2146
+ a.status = "error", a.error = s instanceof Error ? s.message : "Failed to preload", a.readyReject(
2147
+ s instanceof Error ? s : new Error("Failed to preload")
2148
2148
  ), V.delete(t);
2149
2149
  }
2150
2150
  })(), pt(t);
@@ -2157,57 +2157,57 @@ function wt(e) {
2157
2157
  return t && V.delete(e), t;
2158
2158
  }
2159
2159
  function rr(e) {
2160
- const { apiURL: t, token: i, lang: r, disableDashboardTheme: n, onError: o } = e, a = Le(null), [s, c] = _(() => {
2161
- const f = De(i);
2162
- if (f?.status === "ready") {
2160
+ const { apiURL: t, token: i, lang: r, disableDashboardTheme: n, onError: o } = e, a = Le(null), [c, s] = _(() => {
2161
+ const h = De(i);
2162
+ if (h?.status === "ready") {
2163
2163
  const d = wt(i);
2164
2164
  if (d)
2165
2165
  return a.current = d.flowManager, d.uiConfig && te(d.uiConfig), { status: "ready", flowManager: d.flowManager };
2166
2166
  }
2167
- const u = Bt();
2168
- return a.current = u, f?.status === "error" ? {
2167
+ const g = Bt();
2168
+ return a.current = g, h?.status === "error" ? {
2169
2169
  status: "error",
2170
- error: f.error ?? "Preload failed",
2171
- flowManager: u
2172
- } : { status: "initializing", flowManager: u };
2173
- }), h = Le(!1);
2170
+ error: h.error ?? "Preload failed",
2171
+ flowManager: g
2172
+ } : { status: "initializing", flowManager: g };
2173
+ }), u = Le(!1);
2174
2174
  return L(() => {
2175
- if (s.status !== "initializing")
2175
+ if (c.status !== "initializing")
2176
2176
  return;
2177
- const f = De(i);
2178
- if (f?.status === "loading") {
2179
- f.readyPromise.then(() => {
2177
+ const h = De(i);
2178
+ if (h?.status === "loading") {
2179
+ h.readyPromise.then(() => {
2180
2180
  const d = wt(i);
2181
- d && (a.current = d.flowManager, d.uiConfig && te(d.uiConfig), c({ status: "ready", flowManager: d.flowManager }));
2181
+ d && (a.current = d.flowManager, d.uiConfig && te(d.uiConfig), s({ status: "ready", flowManager: d.flowManager }));
2182
2182
  }).catch((d) => {
2183
- const g = d instanceof Error ? d.message : "Preload failed";
2184
- c({
2183
+ const f = d instanceof Error ? d.message : "Preload failed";
2184
+ s({
2185
2185
  status: "error",
2186
- error: g,
2187
- flowManager: s.flowManager
2188
- }), o?.(g);
2186
+ error: f,
2187
+ flowManager: c.flowManager
2188
+ }), o?.(f);
2189
2189
  });
2190
2190
  return;
2191
2191
  }
2192
- if (h.current)
2192
+ if (u.current)
2193
2193
  return;
2194
- h.current = !0, (async () => {
2194
+ u.current = !0, (async () => {
2195
2195
  try {
2196
2196
  await Pt({ apiURL: t, token: i, lang: r });
2197
- const d = n ? Promise.resolve() : Lt().then((g) => {
2198
- g.uiConfig && te(g.uiConfig);
2197
+ const d = n ? Promise.resolve() : Lt().then((f) => {
2198
+ f.uiConfig && te(f.uiConfig);
2199
2199
  });
2200
- s.flowManager.load(), await d, c({ status: "ready", flowManager: s.flowManager });
2200
+ c.flowManager.load(), await d, s({ status: "ready", flowManager: c.flowManager });
2201
2201
  } catch (d) {
2202
- const g = d instanceof Error ? d.message : "Failed to initialize SDK";
2203
- c({
2202
+ const f = d instanceof Error ? d.message : "Failed to initialize SDK";
2203
+ s({
2204
2204
  status: "error",
2205
- error: g,
2206
- flowManager: s.flowManager
2207
- }), o?.(g);
2205
+ error: f,
2206
+ flowManager: c.flowManager
2207
+ }), o?.(f);
2208
2208
  }
2209
2209
  })();
2210
- }, [t, i, r, n, o, s]), s;
2210
+ }, [t, i, r, n, o, c]), c;
2211
2211
  }
2212
2212
  function or(e) {
2213
2213
  const { moduleKey: t, onModuleLoading: i, onModuleLoaded: r, onError: n } = e, [o, a] = _({ status: "idle" });
@@ -2216,22 +2216,22 @@ function or(e) {
2216
2216
  a({ status: "idle" });
2217
2217
  return;
2218
2218
  }
2219
- const s = ke[t];
2220
- if (!s) {
2219
+ const c = ke[t];
2220
+ if (!c) {
2221
2221
  a({ status: "unsupported", moduleKey: t });
2222
2222
  return;
2223
2223
  }
2224
2224
  a({ status: "loading", moduleKey: t }), i?.(t);
2225
- let c = !1;
2226
- return s().then((h) => {
2227
- c || (a({ status: "loaded", moduleKey: t, Component: h }), r?.(t));
2228
- }).catch((h) => {
2229
- if (!c) {
2230
- const f = h instanceof Error ? h.message : "Failed to load module";
2231
- a({ status: "error", moduleKey: t, error: f }), n?.(`Failed to load ${t}: ${f}`);
2225
+ let s = !1;
2226
+ return c().then((u) => {
2227
+ s || (a({ status: "loaded", moduleKey: t, Component: u }), r?.(t));
2228
+ }).catch((u) => {
2229
+ if (!s) {
2230
+ const h = u instanceof Error ? u.message : "Failed to load module";
2231
+ a({ status: "error", moduleKey: t, error: h }), n?.(`Failed to load ${t}: ${h}`);
2232
2232
  }
2233
2233
  }), () => {
2234
- c = !0;
2234
+ s = !0;
2235
2235
  };
2236
2236
  }, [t, i, r, n]), o;
2237
2237
  }
@@ -2255,15 +2255,15 @@ const sr = ({
2255
2255
  onFinish: t,
2256
2256
  onError: i
2257
2257
  }) => {
2258
- const { t: r } = F(), [n, o] = _(!1), a = rr({
2258
+ const { t: r, i18n: n } = F(), [o, a] = _(!1), c = rr({
2259
2259
  apiURL: e.apiURL,
2260
2260
  token: e.token,
2261
2261
  lang: e.lang,
2262
2262
  disableDashboardTheme: e.disableDashboardTheme,
2263
2263
  onError: i
2264
- }), [s, c] = It(() => a.flowManager, {
2264
+ }), [s, u] = It(() => c.flowManager, {
2265
2265
  autoLoad: !1
2266
- }), h = s?.status === "ready" && s.flow.redirectDesktopToMobile && !n, f = or({
2266
+ }), h = s?.status === "ready" && s.flow.redirectDesktopToMobile && !o, g = or({
2267
2267
  moduleKey: s?.status === "ready" && !h ? s.currentStep : void 0,
2268
2268
  onModuleLoading: e.onModuleLoading,
2269
2269
  onModuleLoaded: e.onModuleLoaded,
@@ -2273,22 +2273,24 @@ const sr = ({
2273
2273
  s?.status === "ready" ? s.steps : [],
2274
2274
  s?.status === "ready" ? s.currentStepIndex : -1
2275
2275
  ), L(() => {
2276
+ e.lang && n.language !== e.lang && n.changeLanguage(e.lang);
2277
+ }, [e.lang, n]), L(() => {
2276
2278
  if (s?.status === "ready" && e.wasmConfig) {
2277
- const u = s, d = Et(u.flow);
2278
- d.length > 0 && (e.onWasmWarmup?.(d), Dt(u, e.wasmConfig));
2279
+ const d = s, f = Et(d.flow);
2280
+ f.length > 0 && (e.onWasmWarmup?.(f), Dt(d, e.wasmConfig));
2279
2281
  }
2280
2282
  }, [s, e]), L(() => {
2281
2283
  s?.status === "finished" && t(s.finishStatus);
2282
2284
  }, [s?.status, t, s]), L(() => {
2283
2285
  s?.status === "error" && i && i(s.error);
2284
2286
  }, [s?.status, i, s]), L(() => {
2285
- s?.status === "ready" && s.currentStep === "ID" && s.steps.includes("TUTORIAL_ID") && c.completeModule();
2286
- }, [s, c]), a.status === "error")
2287
+ s?.status === "ready" && s.currentStep === "ID" && s.steps.includes("TUTORIAL_ID") && u.completeModule();
2288
+ }, [s, u]), c.status === "error")
2287
2289
  return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l("div", { children: [
2288
2290
  "Error: ",
2289
- a.error
2291
+ c.error
2290
2292
  ] }) });
2291
- if (a.status === "initializing")
2293
+ if (c.status === "initializing")
2292
2294
  return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
2293
2295
  J,
2294
2296
  {
@@ -2317,13 +2319,13 @@ const sr = ({
2317
2319
  return null;
2318
2320
  if (s.status === "ready") {
2319
2321
  const {
2320
- currentStep: u,
2321
- config: d,
2322
+ currentStep: d,
2323
+ config: f,
2322
2324
  flow: {
2323
- flowId: g,
2324
- disableSmsOption: R,
2325
- addContinueToDesktop: E,
2326
- qrPhishingResistance: B
2325
+ flowId: M,
2326
+ disableSmsOption: I,
2327
+ addContinueToDesktop: P,
2328
+ qrPhishingResistance: A
2327
2329
  }
2328
2330
  } = s;
2329
2331
  if (h)
@@ -2331,19 +2333,19 @@ const sr = ({
2331
2333
  Nt,
2332
2334
  {
2333
2335
  config: {
2334
- flowId: g,
2335
- disableSmsOption: R,
2336
- addContinueToDesktop: E,
2337
- qrPhishingResistance: B,
2336
+ flowId: M,
2337
+ disableSmsOption: I,
2338
+ addContinueToDesktop: P,
2339
+ qrPhishingResistance: A,
2338
2340
  authHint: e.authHint,
2339
2341
  lang: e.lang
2340
2342
  },
2341
- onFinish: () => c.completeFlow(),
2342
- onContinue: () => o(!0),
2343
+ onFinish: () => u.completeFlow(),
2344
+ onContinue: () => a(!0),
2343
2345
  onError: i
2344
2346
  }
2345
2347
  ) });
2346
- if (!u || !d)
2348
+ if (!d || !f)
2347
2349
  return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
2348
2350
  J,
2349
2351
  {
@@ -2353,15 +2355,15 @@ const sr = ({
2353
2355
  fullScreen: !0
2354
2356
  }
2355
2357
  ) });
2356
- if (f.status === "unsupported")
2358
+ if (g.status === "unsupported")
2357
2359
  return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
2358
2360
  nr,
2359
2361
  {
2360
- moduleKey: u,
2361
- onNext: () => c.completeModule()
2362
+ moduleKey: d,
2363
+ onNext: () => u.completeModule()
2362
2364
  }
2363
2365
  ) });
2364
- if (f.status === "idle" || f.status === "loading" || f.status === "error")
2366
+ if (g.status === "idle" || g.status === "loading" || g.status === "error")
2365
2367
  return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
2366
2368
  J,
2367
2369
  {
@@ -2371,53 +2373,53 @@ const sr = ({
2371
2373
  fullScreen: !0
2372
2374
  }
2373
2375
  ) });
2374
- const { Component: w } = f;
2375
- if (u === "SELFIE")
2376
+ const { Component: E } = g;
2377
+ if (d === "SELFIE")
2376
2378
  return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
2377
- w,
2379
+ E,
2378
2380
  {
2379
- config: d,
2380
- onFinish: () => c.completeModule(),
2381
+ config: f,
2382
+ onFinish: () => u.completeModule(),
2381
2383
  onError: (p) => {
2382
2384
  i?.(p ?? "Selfie verification error");
2383
2385
  }
2384
2386
  },
2385
2387
  `selfie-${s.currentStepIndex}`
2386
2388
  ) });
2387
- if (u === "AUTHENTICATION")
2389
+ if (d === "AUTHENTICATION")
2388
2390
  return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
2389
- w,
2391
+ E,
2390
2392
  {
2391
- config: { ...d, authHint: e.authHint },
2392
- onFinish: () => c.completeModule(),
2393
+ config: { ...f, authHint: e.authHint },
2394
+ onFinish: () => u.completeModule(),
2393
2395
  onError: (p) => {
2394
2396
  i?.(p ?? "Authentication error");
2395
2397
  }
2396
2398
  },
2397
2399
  `authentication-${s.currentStepIndex}`
2398
2400
  ) });
2399
- if (u === "PHONE")
2401
+ if (d === "PHONE")
2400
2402
  return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
2401
- w,
2403
+ E,
2402
2404
  {
2403
- config: d,
2404
- onFinish: () => c.completeModule(),
2405
+ config: f,
2406
+ onFinish: () => u.completeModule(),
2405
2407
  onError: (p) => {
2406
2408
  i?.(p ?? "Phone verification error");
2407
2409
  }
2408
2410
  },
2409
2411
  `phone-${s.currentStepIndex}`
2410
2412
  ) });
2411
- if (u === "EMAIL") {
2412
- const m = d;
2413
+ if (d === "EMAIL") {
2414
+ const m = f;
2413
2415
  return !m || typeof m.otpVerification != "boolean" || typeof m.otpExpirationInMinutes != "number" ? /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l("div", { children: "Error: Invalid email configuration" }) }) : /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
2414
- w,
2416
+ E,
2415
2417
  {
2416
2418
  config: {
2417
2419
  ...m,
2418
2420
  prefill: m.prefill ?? !1
2419
2421
  },
2420
- onFinish: () => c.completeModule(),
2422
+ onFinish: () => u.completeModule(),
2421
2423
  onError: (p) => {
2422
2424
  i?.(p ?? "Email verification error");
2423
2425
  }
@@ -2425,143 +2427,143 @@ const sr = ({
2425
2427
  `email-${s.currentStepIndex}`
2426
2428
  ) });
2427
2429
  }
2428
- if (u === "TUTORIAL_ID" || u === "SECOND_ID" || // Only render ID if TUTORIAL_ID doesn't exist (otherwise useEffect will skip it)
2429
- u === "ID" && !s.steps.includes("TUTORIAL_ID")) {
2430
- const m = d, y = u === "SECOND_ID" ? { ...m, isSecondId: !0 } : m;
2430
+ if (d === "TUTORIAL_ID" || d === "SECOND_ID" || // Only render ID if TUTORIAL_ID doesn't exist (otherwise useEffect will skip it)
2431
+ d === "ID" && !s.steps.includes("TUTORIAL_ID")) {
2432
+ const m = f, B = d === "SECOND_ID" ? { ...m, isSecondId: !0 } : m;
2431
2433
  return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
2432
- w,
2434
+ E,
2433
2435
  {
2434
- config: y,
2435
- onFinish: () => c.completeModule(),
2436
- onError: (P) => {
2437
- i?.(P ?? "ID capture error");
2436
+ config: B,
2437
+ onFinish: () => u.completeModule(),
2438
+ onError: (w) => {
2439
+ i?.(w ?? "ID capture error");
2438
2440
  }
2439
2441
  },
2440
2442
  `id-${s.currentStepIndex}`
2441
2443
  ) });
2442
2444
  }
2443
- if (u === "FACE_MATCH") {
2444
- const m = d, p = {
2445
+ if (d === "FACE_MATCH") {
2446
+ const m = f, p = {
2445
2447
  variant: m.matchingType,
2446
2448
  disableFaceMatchAnimation: m.disableFaceMatchAnimation ?? !1
2447
2449
  };
2448
2450
  return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
2449
- w,
2451
+ E,
2450
2452
  {
2451
2453
  config: p,
2452
- onFinish: () => c.completeModule(),
2453
- onError: (y) => {
2454
- i?.(y ?? "Face match error");
2454
+ onFinish: () => u.completeModule(),
2455
+ onError: (B) => {
2456
+ i?.(B ?? "Face match error");
2455
2457
  }
2456
2458
  },
2457
2459
  `face-match-${s.currentStepIndex}`
2458
2460
  ) });
2459
2461
  }
2460
- if (u === "CURP_VALIDATION")
2462
+ if (d === "CURP_VALIDATION")
2461
2463
  return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
2462
- w,
2464
+ E,
2463
2465
  {
2464
- config: d,
2465
- onFinish: () => c.completeModule(),
2466
+ config: f,
2467
+ onFinish: () => u.completeModule(),
2466
2468
  onError: (p) => {
2467
2469
  i?.(p ?? "CURP validation error");
2468
2470
  }
2469
2471
  },
2470
2472
  `curp-validation-${s.currentStepIndex}`
2471
2473
  ) });
2472
- if (u === "GOVT_VALIDATION_PROVISIONING")
2474
+ if (d === "GOVT_VALIDATION_PROVISIONING")
2473
2475
  return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
2474
- w,
2476
+ E,
2475
2477
  {
2476
- config: d,
2477
- onFinish: () => c.completeModule(),
2478
+ config: f,
2479
+ onFinish: () => u.completeModule(),
2478
2480
  onError: (p) => {
2479
2481
  i?.(p ?? "Government validation error");
2480
2482
  }
2481
2483
  },
2482
2484
  `govt-validation-${s.currentStepIndex}`
2483
2485
  ) });
2484
- if (u === "GEOLOCATION")
2486
+ if (d === "GEOLOCATION")
2485
2487
  return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
2486
- w,
2488
+ E,
2487
2489
  {
2488
- config: { allowSkip: d.allowUserToSkipGeolocation },
2489
- onFinish: () => c.completeModule(),
2490
+ config: { allowSkip: f.allowUserToSkipGeolocation },
2491
+ onFinish: () => u.completeModule(),
2490
2492
  onError: (p) => {
2491
2493
  i?.(p ?? "Geolocation error");
2492
2494
  }
2493
2495
  },
2494
2496
  `geolocation-${s.currentStepIndex}`
2495
2497
  ) });
2496
- if (u === "EXTERNAL_VERIFICATION")
2498
+ if (d === "EXTERNAL_VERIFICATION")
2497
2499
  return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
2498
- w,
2500
+ E,
2499
2501
  {
2500
2502
  config: { flowId: s.flow.flowId },
2501
- onFinish: () => c.completeModule(),
2503
+ onFinish: () => u.completeModule(),
2502
2504
  onError: (m) => {
2503
2505
  i?.(m ?? "External verification error");
2504
2506
  }
2505
2507
  },
2506
2508
  `ekyc-${s.currentStepIndex}`
2507
2509
  ) });
2508
- if (u === "DOCUMENT_CAPTURE")
2510
+ if (d === "DOCUMENT_CAPTURE")
2509
2511
  return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
2510
- w,
2512
+ E,
2511
2513
  {
2512
- config: d,
2513
- onFinish: () => c.completeModule(),
2514
+ config: f,
2515
+ onFinish: () => u.completeModule(),
2514
2516
  onError: (m) => {
2515
2517
  i?.(m ?? "Document capture error");
2516
2518
  }
2517
2519
  },
2518
2520
  `document-capture-${s.currentStepIndex}`
2519
2521
  ) });
2520
- if (u === "ADDRESS") {
2521
- const m = d, p = {
2522
+ if (d === "ADDRESS") {
2523
+ const m = f, p = {
2522
2524
  processingType: "addressStatement",
2523
2525
  allowSkipDocumentCapture: !m.disableSkipPoa,
2524
2526
  title: m.title,
2525
2527
  text: m.text
2526
2528
  };
2527
2529
  return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
2528
- w,
2530
+ E,
2529
2531
  {
2530
2532
  config: p,
2531
- onFinish: () => c.completeModule(),
2532
- onError: (y) => {
2533
- i?.(y ?? "Address capture error");
2533
+ onFinish: () => u.completeModule(),
2534
+ onError: (B) => {
2535
+ i?.(B ?? "Address capture error");
2534
2536
  }
2535
2537
  },
2536
2538
  `address-${s.currentStepIndex}`
2537
2539
  ) });
2538
2540
  }
2539
- if (u === "EKYB") {
2540
- const m = d, p = {
2541
- flowId: g,
2541
+ if (d === "EKYB") {
2542
+ const m = f, p = {
2543
+ flowId: M,
2542
2544
  checkBusinessName: m.checkBusinessName,
2543
2545
  checkAddress: m.checkAddress,
2544
2546
  checkTaxId: m.checkTaxId,
2545
2547
  checkUniqueBeneficialOwner: m.checkUniqueBeneficialOwner
2546
2548
  };
2547
2549
  return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
2548
- w,
2550
+ E,
2549
2551
  {
2550
2552
  config: p,
2551
- onFinish: () => c.completeModule(),
2552
- onError: (y) => {
2553
- i?.(y ?? "eKYB verification error");
2553
+ onFinish: () => u.completeModule(),
2554
+ onError: (B) => {
2555
+ i?.(B ?? "eKYB verification error");
2554
2556
  }
2555
2557
  },
2556
2558
  `ekyb-${s.currentStepIndex}`
2557
2559
  ) });
2558
2560
  }
2559
- if (u === "COMBINED_CONSENT")
2561
+ if (d === "COMBINED_CONSENT")
2560
2562
  return /* @__PURE__ */ l("div", { class: "IncodeFlow", children: /* @__PURE__ */ l(
2561
- w,
2563
+ E,
2562
2564
  {
2563
- config: d,
2564
- onFinish: () => c.completeModule(),
2565
+ config: f,
2566
+ onFinish: () => u.completeModule(),
2565
2567
  onError: (p) => {
2566
2568
  i?.(p ?? "Combined consent error");
2567
2569
  }