@abaxx_tech/v-integration-react 1.1.1 → 1.1.2-dev.2

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,85 +1,86 @@
1
- import { jsx as P, jsxs as he, Fragment as He } from "react/jsx-runtime";
2
- import Nr, { createContext as Or, useState as ge, useContext as nt, useRef as Lt, useEffect as Qe, useCallback as Ge } from "react";
3
- const Ve = Or({}), qr = ({
4
- appId: W,
5
- clientId: X,
6
- apiUrl: ie,
7
- children: V
1
+ import { jsx as P, jsxs as he, Fragment as Qe } from "react/jsx-runtime";
2
+ import Bt, { createContext as Or, useState as ge, useContext as Ke, useRef as Lt, useEffect as Ge, useCallback as Ve } from "react";
3
+ const Oe = Or({}), qr = ({
4
+ clientId: G,
5
+ apiUrl: X,
6
+ children: ie
8
7
  }) => {
9
- const [O, Y] = ge(""), [$, M] = ge(""), [b, g] = ge(!1), [A, C] = ge(""), [F, E] = ge(""), [U, N] = ge(/* @__PURE__ */ new Date()), [S, Z] = ge(""), [Q, z] = ge(null), [H, o] = ge(null);
8
+ const [W, O] = ge(""), [Y, U] = ge(""), [M, x] = ge(!1), [d, A] = ge(""), [C, $] = ge(""), [D, H] = ge(/* @__PURE__ */ new Date()), [q, B] = ge(""), [Z, V] = ge(null), [z, E] = ge(null), o = Bt.useCallback(() => {
9
+ O(""), U(""), x(!1), A(""), $(""), B(""), H(/* @__PURE__ */ new Date()), V(null), E(null);
10
+ }, []);
10
11
  return /* @__PURE__ */ P(
11
- Ve.Provider,
12
+ Oe.Provider,
12
13
  {
13
14
  value: {
14
- appId: W,
15
- apiUrl: ie,
16
- clientId: X,
17
- identity: O,
18
- setIdentity: Y,
19
- authRequestId: $,
20
- setAuthRequestId: M,
21
- isAuthenticating: b,
22
- setIsAuthenticating: g,
23
- codeVerifier: A,
24
- setCodeVerifier: C,
25
- codeChallenge: F,
26
- setCodeChallenge: E,
27
- authCode: S,
28
- setAuthCode: Z,
29
- authRequestIdExpires: U,
30
- setAuthRequestIdExpires: N,
31
- token: Q,
32
- setToken: z,
33
- authError: H,
34
- setAuthError: o
15
+ apiUrl: X,
16
+ clientId: G,
17
+ identity: W,
18
+ setIdentity: O,
19
+ authRequestId: Y,
20
+ setAuthRequestId: U,
21
+ isAuthenticating: M,
22
+ setIsAuthenticating: x,
23
+ codeVerifier: d,
24
+ setCodeVerifier: A,
25
+ codeChallenge: C,
26
+ setCodeChallenge: $,
27
+ authCode: q,
28
+ setAuthCode: B,
29
+ authRequestIdExpires: D,
30
+ setAuthRequestIdExpires: H,
31
+ token: Z,
32
+ setToken: V,
33
+ authError: z,
34
+ setAuthError: E,
35
+ resetState: o
35
36
  },
36
- children: V
37
+ children: ie
37
38
  }
38
39
  );
39
40
  };
40
- function jr(W) {
41
- const X = new Uint8Array(W);
41
+ function jr(G) {
42
+ const X = new Uint8Array(G);
42
43
  return window.crypto.getRandomValues(X), X;
43
44
  }
44
- function Pt(W) {
45
- const X = Array.from(W);
45
+ function Pt(G) {
46
+ const X = Array.from(G);
46
47
  return btoa(String.fromCharCode(...X)).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
47
48
  }
48
- function $r() {
49
+ function Ur() {
49
50
  const {
50
- apiUrl: W,
51
+ apiUrl: G,
51
52
  clientId: X,
52
53
  authRequestId: ie,
53
54
  // results of the successful auth
54
- setIdentity: V,
55
+ setIdentity: W,
55
56
  authCode: O,
56
57
  setAuthCode: Y,
57
58
  // results of the successful begin auth
58
- setAuthRequestId: $,
59
+ setAuthRequestId: U,
59
60
  setAuthRequestIdExpires: M,
60
- setCodeChallenge: b,
61
- setCodeVerifier: g,
61
+ setCodeChallenge: x,
62
+ setCodeVerifier: d,
62
63
  codeChallenge: A,
63
64
  codeVerifier: C,
64
- setIsAuthenticating: F,
65
- token: E,
66
- setToken: U,
67
- setAuthError: N
68
- } = nt(Ve), S = Lt(null), Z = Lt(""), Q = (H) => {
65
+ setIsAuthenticating: $,
66
+ token: D,
67
+ setToken: H,
68
+ setAuthError: q
69
+ } = Ke(Oe), B = Lt(null), Z = Lt(""), V = (E) => {
69
70
  try {
70
71
  let o;
71
72
  try {
72
- o = JSON.parse(H.data);
73
+ o = JSON.parse(E.data);
73
74
  } catch {
74
- o = { type: H.type, message: H.data };
75
+ o = { type: E.type, message: E.data };
75
76
  }
76
- switch (H.type) {
77
+ switch (E.type) {
77
78
  case "start": {
78
- o.request_id && o.expires && ($(o.request_id), Z.current = o.request_id, M(new Date(o.expires)));
79
+ o.request_id && o.expires && (U(o.request_id), Z.current = o.request_id, M(new Date(o.expires)));
79
80
  break;
80
81
  }
81
82
  case "approved": {
82
- o.code && o.identity && o.approved && o.request_id && o.request_id == Z.current && (S.current && (console.info("Closing SSE connection after approval"), S.current.close(), S.current = null), Y(o.code), V(o.identity), F(!0));
83
+ o.code && o.identity && o.approved && o.request_id && o.request_id == Z.current && (B.current && (console.info("Closing SSE connection after approval"), B.current.close(), B.current = null), Y(o.code), W(o.identity), $(!0));
83
84
  break;
84
85
  }
85
86
  default:
@@ -89,108 +90,107 @@ function $r() {
89
90
  console.error("Error parsing SSE message:", o);
90
91
  }
91
92
  };
92
- Qe(() => {
93
+ Ge(() => {
93
94
  if (A)
94
95
  return;
95
- let H = !1;
96
+ let E = !1;
96
97
  return (async () => {
97
- const p = jr(64), v = await window.crypto.subtle.digest("SHA-256", p);
98
- if (!H) {
99
- const x = Pt(new Uint8Array(v)), f = Pt(p);
100
- b(x), g(f);
98
+ const b = jr(64), c = await window.crypto.subtle.digest("SHA-256", b);
99
+ if (!E) {
100
+ const y = Pt(new Uint8Array(c)), f = Pt(b);
101
+ x(y), d(f);
101
102
  }
102
103
  })(), () => {
103
- H = !0;
104
+ E = !0;
104
105
  };
105
- }, [A]), Qe(() => {
106
- if (E) {
107
- S.current && (console.info("Closing existing SSE connection"), S.current.close(), S.current = null);
106
+ }, [A]), Ge(() => {
107
+ if (D) {
108
+ B.current && (console.info("Closing existing SSE connection"), B.current.close(), B.current = null);
108
109
  return;
109
110
  }
110
- if (!(!A || S.current))
111
+ if (!(!A || B.current))
111
112
  try {
112
- const H = `${W}/v-plus/auth/start?cid=${X}`, o = new EventSource(H);
113
- return S.current = o, o.onmessage = Q, o.addEventListener("start", Q), o.addEventListener("approved", Q), o.onerror = () => {
114
- if (E || !S.current) {
115
- console.info("SSE connection closed"), S.current && (S.current.close(), S.current = null);
113
+ const E = `${G}/v-plus/auth/start?cid=${X}`, o = new EventSource(E);
114
+ return B.current = o, o.onmessage = V, o.addEventListener("start", V), o.addEventListener("approved", V), o.onerror = () => {
115
+ if (D || !B.current) {
116
+ console.info("SSE connection closed"), B.current && (B.current.close(), B.current = null);
116
117
  return;
117
118
  }
118
- E || console.info("Waiting for authentication...");
119
+ D || console.info("Waiting for authentication...");
119
120
  }, () => {
120
- o && (o.close(), S.current = null);
121
+ o && (o.close(), B.current = null);
121
122
  };
122
- } catch (H) {
123
- console.error("SSE connection setup failed:", H), S.current = null;
123
+ } catch (E) {
124
+ console.error("SSE connection setup failed:", E), B.current = null;
124
125
  }
125
- }, [E, A, W, X]);
126
- const z = Ge(async (H, o, p) => {
126
+ }, [D, A, G, X]);
127
+ const z = Ve(async (E, o, b) => {
127
128
  try {
128
- const x = await (await fetch(`${W}/v-plus/auth/token?cid=${X}`, {
129
+ const y = await (await fetch(`${G}/v-plus/auth/token?cid=${X}`, {
129
130
  method: "POST",
130
131
  headers: {
131
132
  "Content-Type": "application/json"
132
133
  },
133
134
  body: JSON.stringify({
134
- auth_code: H,
135
+ auth_code: E,
135
136
  request_id: o,
136
- code_verifier: p
137
+ code_verifier: b
137
138
  })
138
139
  })).json();
139
- if (x.token)
140
- U(x.token), F(!1);
140
+ if (y.token)
141
+ H(y.token), $(!1);
141
142
  else
142
143
  throw new Error("No token received");
143
- } catch (v) {
144
- console.error("Error fetching token:", v), F(!1), N(`Failed to obtain auth token: ${v}`), Y("");
144
+ } catch (c) {
145
+ console.error("Error fetching token:", c), $(!1), q(`Failed to obtain auth token: ${c}`), Y("");
145
146
  }
146
- }, [W, X]);
147
- return Qe(() => {
147
+ }, [G, X]);
148
+ return Ge(() => {
148
149
  O && z(O, ie, C);
149
150
  }, [O, C, ie]), null;
150
151
  }
151
152
  const Vr = ({
152
- appId: W,
153
- clientId: X,
154
- apiUrl: ie,
155
- children: V
156
- }) => /* @__PURE__ */ he(qr, { appId: W, apiUrl: ie, clientId: X, children: [
157
- /* @__PURE__ */ P($r, {}),
158
- V
153
+ clientId: G,
154
+ apiUrl: X,
155
+ children: ie
156
+ }) => /* @__PURE__ */ he(qr, { apiUrl: X, clientId: G, children: [
157
+ /* @__PURE__ */ P(Ur, {}),
158
+ ie
159
159
  ] });
160
- var rt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Te = {}, Ue = { exports: {} };
161
- Ue.exports;
160
+ var nt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Te = {}, He = { exports: {} };
161
+ He.exports;
162
162
  var Dt;
163
- function Fr() {
164
- return Dt || (Dt = 1, function(W, X) {
165
- var ie = 200, V = "__lodash_hash_undefined__", O = 1, Y = 2, $ = 9007199254740991, M = "[object Arguments]", b = "[object Array]", g = "[object AsyncFunction]", A = "[object Boolean]", C = "[object Date]", F = "[object Error]", E = "[object Function]", U = "[object GeneratorFunction]", N = "[object Map]", S = "[object Number]", Z = "[object Null]", Q = "[object Object]", z = "[object Promise]", H = "[object Proxy]", o = "[object RegExp]", p = "[object Set]", v = "[object String]", x = "[object Symbol]", f = "[object Undefined]", w = "[object WeakMap]", n = "[object ArrayBuffer]", t = "[object DataView]", h = "[object Float32Array]", i = "[object Float64Array]", y = "[object Int8Array]", L = "[object Int16Array]", T = "[object Int32Array]", K = "[object Uint8Array]", q = "[object Uint8ClampedArray]", re = "[object Uint16Array]", oe = "[object Uint32Array]", D = /[\\^$.*+?()[\]{}|]/g, k = /^\[object .+?Constructor\]$/, ue = /^(?:0|[1-9]\d*)$/, G = {};
166
- G[h] = G[i] = G[y] = G[L] = G[T] = G[K] = G[q] = G[re] = G[oe] = !0, G[M] = G[b] = G[n] = G[A] = G[t] = G[C] = G[F] = G[E] = G[N] = G[S] = G[Q] = G[o] = G[p] = G[v] = G[w] = !1;
167
- var se = typeof rt == "object" && rt && rt.Object === Object && rt, _e = typeof self == "object" && self && self.Object === Object && self, s = se || _e || Function("return this")(), u = X && !X.nodeType && X, a = u && !0 && W && !W.nodeType && W, l = a && a.exports === u, d = l && se.process, _ = function() {
163
+ function $r() {
164
+ return Dt || (Dt = 1, function(G, X) {
165
+ var ie = 200, W = "__lodash_hash_undefined__", O = 1, Y = 2, U = 9007199254740991, M = "[object Arguments]", x = "[object Array]", d = "[object AsyncFunction]", A = "[object Boolean]", C = "[object Date]", $ = "[object Error]", D = "[object Function]", H = "[object GeneratorFunction]", q = "[object Map]", B = "[object Number]", Z = "[object Null]", V = "[object Object]", z = "[object Promise]", E = "[object Proxy]", o = "[object RegExp]", b = "[object Set]", c = "[object String]", y = "[object Symbol]", f = "[object Undefined]", w = "[object WeakMap]", n = "[object ArrayBuffer]", t = "[object DataView]", g = "[object Float32Array]", i = "[object Float64Array]", p = "[object Int8Array]", L = "[object Int16Array]", T = "[object Int32Array]", K = "[object Uint8Array]", j = "[object Uint8ClampedArray]", re = "[object Uint16Array]", oe = "[object Uint32Array]", S = /[\\^$.*+?()[\]{}|]/g, k = /^\[object .+?Constructor\]$/, ue = /^(?:0|[1-9]\d*)$/, Q = {};
166
+ Q[g] = Q[i] = Q[p] = Q[L] = Q[T] = Q[K] = Q[j] = Q[re] = Q[oe] = !0, Q[M] = Q[x] = Q[n] = Q[A] = Q[t] = Q[C] = Q[$] = Q[D] = Q[q] = Q[B] = Q[V] = Q[o] = Q[b] = Q[c] = Q[w] = !1;
167
+ var se = typeof nt == "object" && nt && nt.Object === Object && nt, _e = typeof self == "object" && self && self.Object === Object && self, s = se || _e || Function("return this")(), u = X && !X.nodeType && X, a = u && !0 && G && !G.nodeType && G, l = a && a.exports === u, h = l && se.process, _ = function() {
168
168
  try {
169
- return d && d.binding && d.binding("util");
169
+ return h && h.binding && h.binding("util");
170
170
  } catch {
171
171
  }
172
172
  }(), R = _ && _.isTypedArray;
173
173
  function I(e, r) {
174
- for (var c = -1, m = e == null ? 0 : e.length, te = 0, j = []; ++c < m; ) {
175
- var ae = e[c];
176
- r(ae, c, e) && (j[te++] = ae);
174
+ for (var v = -1, m = e == null ? 0 : e.length, te = 0, F = []; ++v < m; ) {
175
+ var ae = e[v];
176
+ r(ae, v, e) && (F[te++] = ae);
177
177
  }
178
- return j;
178
+ return F;
179
179
  }
180
180
  function J(e, r) {
181
- for (var c = -1, m = r.length, te = e.length; ++c < m; )
182
- e[te + c] = r[c];
181
+ for (var v = -1, m = r.length, te = e.length; ++v < m; )
182
+ e[te + v] = r[v];
183
183
  return e;
184
184
  }
185
185
  function ee(e, r) {
186
- for (var c = -1, m = e == null ? 0 : e.length; ++c < m; )
187
- if (r(e[c], c, e))
186
+ for (var v = -1, m = e == null ? 0 : e.length; ++v < m; )
187
+ if (r(e[v], v, e))
188
188
  return !0;
189
189
  return !1;
190
190
  }
191
- function B(e, r) {
192
- for (var c = -1, m = Array(e); ++c < e; )
193
- m[c] = r(c);
191
+ function N(e, r) {
192
+ for (var v = -1, m = Array(e); ++v < e; )
193
+ m[v] = r(v);
194
194
  return m;
195
195
  }
196
196
  function le(e) {
@@ -201,239 +201,239 @@ function Fr() {
201
201
  function ve(e, r) {
202
202
  return e.has(r);
203
203
  }
204
- function ke(e, r) {
204
+ function Se(e, r) {
205
205
  return e == null ? void 0 : e[r];
206
206
  }
207
- function Be(e) {
208
- var r = -1, c = Array(e.size);
207
+ function ke(e) {
208
+ var r = -1, v = Array(e.size);
209
209
  return e.forEach(function(m, te) {
210
- c[++r] = [te, m];
211
- }), c;
210
+ v[++r] = [te, m];
211
+ }), v;
212
212
  }
213
- function Ke(e, r) {
214
- return function(c) {
215
- return e(r(c));
213
+ function We(e, r) {
214
+ return function(v) {
215
+ return e(r(v));
216
216
  };
217
217
  }
218
- function Oe(e) {
219
- var r = -1, c = Array(e.size);
218
+ function qe(e) {
219
+ var r = -1, v = Array(e.size);
220
220
  return e.forEach(function(m) {
221
- c[++r] = m;
222
- }), c;
221
+ v[++r] = m;
222
+ }), v;
223
223
  }
224
- var Se = Array.prototype, Ot = Function.prototype, We = Object.prototype, at = s["__core-js_shared__"], ct = Ot.toString, be = We.hasOwnProperty, ht = function() {
224
+ var Be = Array.prototype, qt = Function.prototype, Ze = Object.prototype, at = s["__core-js_shared__"], ct = qt.toString, be = Ze.hasOwnProperty, ht = function() {
225
225
  var e = /[^.]+$/.exec(at && at.keys && at.keys.IE_PROTO || "");
226
226
  return e ? "Symbol(src)_1." + e : "";
227
- }(), dt = We.toString, qt = RegExp(
228
- "^" + ct.call(be).replace(D, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
229
- ), gt = l ? s.Buffer : void 0, Ze = s.Symbol, pt = s.Uint8Array, yt = We.propertyIsEnumerable, jt = Se.splice, Ee = Ze ? Ze.toStringTag : void 0, wt = Object.getOwnPropertySymbols, $t = gt ? gt.isBuffer : void 0, Ft = Ke(Object.keys, Object), it = Ne(s, "DataView"), qe = Ne(s, "Map"), ot = Ne(s, "Promise"), st = Ne(s, "Set"), ft = Ne(s, "WeakMap"), je = Ne(Object, "create"), Ut = Pe(it), Ht = Pe(qe), Qt = Pe(ot), Gt = Pe(st), Vt = Pe(ft), xt = Ze ? Ze.prototype : void 0, ut = xt ? xt.valueOf : void 0;
227
+ }(), dt = Ze.toString, jt = RegExp(
228
+ "^" + ct.call(be).replace(S, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
229
+ ), gt = l ? s.Buffer : void 0, Je = s.Symbol, pt = s.Uint8Array, yt = Ze.propertyIsEnumerable, Ut = Be.splice, Ee = Je ? Je.toStringTag : void 0, wt = Object.getOwnPropertySymbols, $t = gt ? gt.isBuffer : void 0, Ft = We(Object.keys, Object), it = Ne(s, "DataView"), je = Ne(s, "Map"), ot = Ne(s, "Promise"), st = Ne(s, "Set"), ft = Ne(s, "WeakMap"), Ue = Ne(Object, "create"), Ht = Pe(it), Qt = Pe(je), Gt = Pe(ot), Vt = Pe(st), Kt = Pe(ft), xt = Je ? Je.prototype : void 0, ut = xt ? xt.valueOf : void 0;
230
230
  function Re(e) {
231
- var r = -1, c = e == null ? 0 : e.length;
232
- for (this.clear(); ++r < c; ) {
231
+ var r = -1, v = e == null ? 0 : e.length;
232
+ for (this.clear(); ++r < v; ) {
233
233
  var m = e[r];
234
234
  this.set(m[0], m[1]);
235
235
  }
236
236
  }
237
- function Kt() {
238
- this.__data__ = je ? je(null) : {}, this.size = 0;
237
+ function Wt() {
238
+ this.__data__ = Ue ? Ue(null) : {}, this.size = 0;
239
239
  }
240
- function Wt(e) {
240
+ function Zt(e) {
241
241
  var r = this.has(e) && delete this.__data__[e];
242
242
  return this.size -= r ? 1 : 0, r;
243
243
  }
244
- function Zt(e) {
244
+ function Jt(e) {
245
245
  var r = this.__data__;
246
- if (je) {
247
- var c = r[e];
248
- return c === V ? void 0 : c;
246
+ if (Ue) {
247
+ var v = r[e];
248
+ return v === W ? void 0 : v;
249
249
  }
250
250
  return be.call(r, e) ? r[e] : void 0;
251
251
  }
252
- function Jt(e) {
252
+ function Yt(e) {
253
253
  var r = this.__data__;
254
- return je ? r[e] !== void 0 : be.call(r, e);
254
+ return Ue ? r[e] !== void 0 : be.call(r, e);
255
255
  }
256
- function Yt(e, r) {
257
- var c = this.__data__;
258
- return this.size += this.has(e) ? 0 : 1, c[e] = je && r === void 0 ? V : r, this;
256
+ function Xt(e, r) {
257
+ var v = this.__data__;
258
+ return this.size += this.has(e) ? 0 : 1, v[e] = Ue && r === void 0 ? W : r, this;
259
259
  }
260
- Re.prototype.clear = Kt, Re.prototype.delete = Wt, Re.prototype.get = Zt, Re.prototype.has = Jt, Re.prototype.set = Yt;
260
+ Re.prototype.clear = Wt, Re.prototype.delete = Zt, Re.prototype.get = Jt, Re.prototype.has = Yt, Re.prototype.set = Xt;
261
261
  function Ae(e) {
262
- var r = -1, c = e == null ? 0 : e.length;
263
- for (this.clear(); ++r < c; ) {
262
+ var r = -1, v = e == null ? 0 : e.length;
263
+ for (this.clear(); ++r < v; ) {
264
264
  var m = e[r];
265
265
  this.set(m[0], m[1]);
266
266
  }
267
267
  }
268
- function Xt() {
268
+ function zt() {
269
269
  this.__data__ = [], this.size = 0;
270
270
  }
271
- function zt(e) {
272
- var r = this.__data__, c = Ye(r, e);
273
- if (c < 0)
271
+ function er(e) {
272
+ var r = this.__data__, v = Xe(r, e);
273
+ if (v < 0)
274
274
  return !1;
275
275
  var m = r.length - 1;
276
- return c == m ? r.pop() : jt.call(r, c, 1), --this.size, !0;
277
- }
278
- function er(e) {
279
- var r = this.__data__, c = Ye(r, e);
280
- return c < 0 ? void 0 : r[c][1];
276
+ return v == m ? r.pop() : Ut.call(r, v, 1), --this.size, !0;
281
277
  }
282
278
  function tr(e) {
283
- return Ye(this.__data__, e) > -1;
279
+ var r = this.__data__, v = Xe(r, e);
280
+ return v < 0 ? void 0 : r[v][1];
281
+ }
282
+ function rr(e) {
283
+ return Xe(this.__data__, e) > -1;
284
284
  }
285
- function rr(e, r) {
286
- var c = this.__data__, m = Ye(c, e);
287
- return m < 0 ? (++this.size, c.push([e, r])) : c[m][1] = r, this;
285
+ function nr(e, r) {
286
+ var v = this.__data__, m = Xe(v, e);
287
+ return m < 0 ? (++this.size, v.push([e, r])) : v[m][1] = r, this;
288
288
  }
289
- Ae.prototype.clear = Xt, Ae.prototype.delete = zt, Ae.prototype.get = er, Ae.prototype.has = tr, Ae.prototype.set = rr;
289
+ Ae.prototype.clear = zt, Ae.prototype.delete = er, Ae.prototype.get = tr, Ae.prototype.has = rr, Ae.prototype.set = nr;
290
290
  function Le(e) {
291
- var r = -1, c = e == null ? 0 : e.length;
292
- for (this.clear(); ++r < c; ) {
291
+ var r = -1, v = e == null ? 0 : e.length;
292
+ for (this.clear(); ++r < v; ) {
293
293
  var m = e[r];
294
294
  this.set(m[0], m[1]);
295
295
  }
296
296
  }
297
- function nr() {
297
+ function ar() {
298
298
  this.size = 0, this.__data__ = {
299
299
  hash: new Re(),
300
- map: new (qe || Ae)(),
300
+ map: new (je || Ae)(),
301
301
  string: new Re()
302
302
  };
303
303
  }
304
- function ar(e) {
305
- var r = Xe(this, e).delete(e);
306
- return this.size -= r ? 1 : 0, r;
307
- }
308
304
  function ir(e) {
309
- return Xe(this, e).get(e);
305
+ var r = ze(this, e).delete(e);
306
+ return this.size -= r ? 1 : 0, r;
310
307
  }
311
308
  function or(e) {
312
- return Xe(this, e).has(e);
309
+ return ze(this, e).get(e);
313
310
  }
314
- function sr(e, r) {
315
- var c = Xe(this, e), m = c.size;
316
- return c.set(e, r), this.size += c.size == m ? 0 : 1, this;
311
+ function sr(e) {
312
+ return ze(this, e).has(e);
317
313
  }
318
- Le.prototype.clear = nr, Le.prototype.delete = ar, Le.prototype.get = ir, Le.prototype.has = or, Le.prototype.set = sr;
319
- function Je(e) {
320
- var r = -1, c = e == null ? 0 : e.length;
321
- for (this.__data__ = new Le(); ++r < c; )
322
- this.add(e[r]);
314
+ function fr(e, r) {
315
+ var v = ze(this, e), m = v.size;
316
+ return v.set(e, r), this.size += v.size == m ? 0 : 1, this;
323
317
  }
324
- function fr(e) {
325
- return this.__data__.set(e, V), this;
318
+ Le.prototype.clear = ar, Le.prototype.delete = ir, Le.prototype.get = or, Le.prototype.has = sr, Le.prototype.set = fr;
319
+ function Ye(e) {
320
+ var r = -1, v = e == null ? 0 : e.length;
321
+ for (this.__data__ = new Le(); ++r < v; )
322
+ this.add(e[r]);
326
323
  }
327
324
  function ur(e) {
325
+ return this.__data__.set(e, W), this;
326
+ }
327
+ function lr(e) {
328
328
  return this.__data__.has(e);
329
329
  }
330
- Je.prototype.add = Je.prototype.push = fr, Je.prototype.has = ur;
330
+ Ye.prototype.add = Ye.prototype.push = ur, Ye.prototype.has = lr;
331
331
  function Ce(e) {
332
332
  var r = this.__data__ = new Ae(e);
333
333
  this.size = r.size;
334
334
  }
335
- function lr() {
335
+ function vr() {
336
336
  this.__data__ = new Ae(), this.size = 0;
337
337
  }
338
- function vr(e) {
339
- var r = this.__data__, c = r.delete(e);
340
- return this.size = r.size, c;
341
- }
342
338
  function cr(e) {
343
- return this.__data__.get(e);
339
+ var r = this.__data__, v = r.delete(e);
340
+ return this.size = r.size, v;
344
341
  }
345
342
  function hr(e) {
343
+ return this.__data__.get(e);
344
+ }
345
+ function dr(e) {
346
346
  return this.__data__.has(e);
347
347
  }
348
- function dr(e, r) {
349
- var c = this.__data__;
350
- if (c instanceof Ae) {
351
- var m = c.__data__;
352
- if (!qe || m.length < ie - 1)
353
- return m.push([e, r]), this.size = ++c.size, this;
354
- c = this.__data__ = new Le(m);
348
+ function gr(e, r) {
349
+ var v = this.__data__;
350
+ if (v instanceof Ae) {
351
+ var m = v.__data__;
352
+ if (!je || m.length < ie - 1)
353
+ return m.push([e, r]), this.size = ++v.size, this;
354
+ v = this.__data__ = new Le(m);
355
355
  }
356
- return c.set(e, r), this.size = c.size, this;
356
+ return v.set(e, r), this.size = v.size, this;
357
357
  }
358
- Ce.prototype.clear = lr, Ce.prototype.delete = vr, Ce.prototype.get = cr, Ce.prototype.has = hr, Ce.prototype.set = dr;
359
- function gr(e, r) {
360
- var c = ze(e), m = !c && Lr(e), te = !c && !m && lt(e), j = !c && !m && !te && Et(e), ae = c || m || te || j, fe = ae ? B(e.length, String) : [], ce = fe.length;
358
+ Ce.prototype.clear = vr, Ce.prototype.delete = cr, Ce.prototype.get = hr, Ce.prototype.has = dr, Ce.prototype.set = gr;
359
+ function pr(e, r) {
360
+ var v = et(e), m = !v && Pr(e), te = !v && !m && lt(e), F = !v && !m && !te && Et(e), ae = v || m || te || F, fe = ae ? N(e.length, String) : [], ce = fe.length;
361
361
  for (var ne in e)
362
362
  be.call(e, ne) && !(ae && // Safari 9 has enumerable `arguments.length` in strict mode.
363
363
  (ne == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
364
364
  te && (ne == "offset" || ne == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
365
- j && (ne == "buffer" || ne == "byteLength" || ne == "byteOffset") || // Skip index properties.
366
- Cr(ne, ce))) && fe.push(ne);
365
+ F && (ne == "buffer" || ne == "byteLength" || ne == "byteOffset") || // Skip index properties.
366
+ Mr(ne, ce))) && fe.push(ne);
367
367
  return fe;
368
368
  }
369
- function Ye(e, r) {
370
- for (var c = e.length; c--; )
371
- if (Tt(e[c][0], r))
372
- return c;
369
+ function Xe(e, r) {
370
+ for (var v = e.length; v--; )
371
+ if (Tt(e[v][0], r))
372
+ return v;
373
373
  return -1;
374
374
  }
375
- function pr(e, r, c) {
375
+ function yr(e, r, v) {
376
376
  var m = r(e);
377
- return ze(e) ? m : J(m, c(e));
377
+ return et(e) ? m : J(m, v(e));
378
378
  }
379
379
  function $e(e) {
380
- return e == null ? e === void 0 ? f : Z : Ee && Ee in Object(e) ? mr(e) : Rr(e);
380
+ return e == null ? e === void 0 ? f : Z : Ee && Ee in Object(e) ? Tr(e) : Lr(e);
381
381
  }
382
382
  function bt(e) {
383
383
  return Fe(e) && $e(e) == M;
384
384
  }
385
- function _t(e, r, c, m, te) {
386
- return e === r ? !0 : e == null || r == null || !Fe(e) && !Fe(r) ? e !== e && r !== r : yr(e, r, c, m, _t, te);
385
+ function _t(e, r, v, m, te) {
386
+ return e === r ? !0 : e == null || r == null || !Fe(e) && !Fe(r) ? e !== e && r !== r : wr(e, r, v, m, _t, te);
387
387
  }
388
- function yr(e, r, c, m, te, j) {
389
- var ae = ze(e), fe = ze(r), ce = ae ? b : Me(e), ne = fe ? b : Me(r);
390
- ce = ce == M ? Q : ce, ne = ne == M ? Q : ne;
391
- var pe = ce == Q, xe = ne == Q, de = ce == ne;
388
+ function wr(e, r, v, m, te, F) {
389
+ var ae = et(e), fe = et(r), ce = ae ? x : Me(e), ne = fe ? x : Me(r);
390
+ ce = ce == M ? V : ce, ne = ne == M ? V : ne;
391
+ var pe = ce == V, xe = ne == V, de = ce == ne;
392
392
  if (de && lt(e)) {
393
393
  if (!lt(r))
394
394
  return !1;
395
395
  ae = !0, pe = !1;
396
396
  }
397
397
  if (de && !pe)
398
- return j || (j = new Ce()), ae || Et(e) ? At(e, r, c, m, te, j) : _r(e, r, ce, c, m, te, j);
399
- if (!(c & O)) {
398
+ return F || (F = new Ce()), ae || Et(e) ? At(e, r, v, m, te, F) : Ar(e, r, ce, v, m, te, F);
399
+ if (!(v & O)) {
400
400
  var ye = pe && be.call(e, "__wrapped__"), we = xe && be.call(r, "__wrapped__");
401
401
  if (ye || we) {
402
402
  var Ie = ye ? e.value() : e, me = we ? r.value() : r;
403
- return j || (j = new Ce()), te(Ie, me, c, m, j);
403
+ return F || (F = new Ce()), te(Ie, me, v, m, F);
404
404
  }
405
405
  }
406
- return de ? (j || (j = new Ce()), Ar(e, r, c, m, te, j)) : !1;
406
+ return de ? (F || (F = new Ce()), mr(e, r, v, m, te, F)) : !1;
407
407
  }
408
- function wr(e) {
409
- if (!It(e) || Ir(e))
408
+ function xr(e) {
409
+ if (!It(e) || Er(e))
410
410
  return !1;
411
- var r = Ct(e) ? qt : k;
411
+ var r = Ct(e) ? jt : k;
412
412
  return r.test(Pe(e));
413
413
  }
414
- function xr(e) {
415
- return Fe(e) && Mt(e.length) && !!G[$e(e)];
416
- }
417
414
  function br(e) {
418
- if (!Er(e))
415
+ return Fe(e) && Mt(e.length) && !!Q[$e(e)];
416
+ }
417
+ function _r(e) {
418
+ if (!Rr(e))
419
419
  return Ft(e);
420
420
  var r = [];
421
- for (var c in Object(e))
422
- be.call(e, c) && c != "constructor" && r.push(c);
421
+ for (var v in Object(e))
422
+ be.call(e, v) && v != "constructor" && r.push(v);
423
423
  return r;
424
424
  }
425
- function At(e, r, c, m, te, j) {
426
- var ae = c & O, fe = e.length, ce = r.length;
425
+ function At(e, r, v, m, te, F) {
426
+ var ae = v & O, fe = e.length, ce = r.length;
427
427
  if (fe != ce && !(ae && ce > fe))
428
428
  return !1;
429
- var ne = j.get(e);
430
- if (ne && j.get(r))
429
+ var ne = F.get(e);
430
+ if (ne && F.get(r))
431
431
  return ne == r;
432
- var pe = -1, xe = !0, de = c & Y ? new Je() : void 0;
433
- for (j.set(e, r), j.set(r, e); ++pe < fe; ) {
432
+ var pe = -1, xe = !0, de = v & Y ? new Ye() : void 0;
433
+ for (F.set(e, r), F.set(r, e); ++pe < fe; ) {
434
434
  var ye = e[pe], we = r[pe];
435
435
  if (m)
436
- var Ie = ae ? m(we, ye, pe, r, e, j) : m(ye, we, pe, e, r, j);
436
+ var Ie = ae ? m(we, ye, pe, r, e, F) : m(ye, we, pe, e, r, F);
437
437
  if (Ie !== void 0) {
438
438
  if (Ie)
439
439
  continue;
@@ -442,56 +442,56 @@ function Fr() {
442
442
  }
443
443
  if (de) {
444
444
  if (!ee(r, function(me, De) {
445
- if (!ve(de, De) && (ye === me || te(ye, me, c, m, j)))
445
+ if (!ve(de, De) && (ye === me || te(ye, me, v, m, F)))
446
446
  return de.push(De);
447
447
  })) {
448
448
  xe = !1;
449
449
  break;
450
450
  }
451
- } else if (!(ye === we || te(ye, we, c, m, j))) {
451
+ } else if (!(ye === we || te(ye, we, v, m, F))) {
452
452
  xe = !1;
453
453
  break;
454
454
  }
455
455
  }
456
- return j.delete(e), j.delete(r), xe;
456
+ return F.delete(e), F.delete(r), xe;
457
457
  }
458
- function _r(e, r, c, m, te, j, ae) {
459
- switch (c) {
458
+ function Ar(e, r, v, m, te, F, ae) {
459
+ switch (v) {
460
460
  case t:
461
461
  if (e.byteLength != r.byteLength || e.byteOffset != r.byteOffset)
462
462
  return !1;
463
463
  e = e.buffer, r = r.buffer;
464
464
  case n:
465
- return !(e.byteLength != r.byteLength || !j(new pt(e), new pt(r)));
465
+ return !(e.byteLength != r.byteLength || !F(new pt(e), new pt(r)));
466
466
  case A:
467
467
  case C:
468
- case S:
468
+ case B:
469
469
  return Tt(+e, +r);
470
- case F:
470
+ case $:
471
471
  return e.name == r.name && e.message == r.message;
472
472
  case o:
473
- case v:
473
+ case c:
474
474
  return e == r + "";
475
- case N:
476
- var fe = Be;
477
- case p:
475
+ case q:
476
+ var fe = ke;
477
+ case b:
478
478
  var ce = m & O;
479
- if (fe || (fe = Oe), e.size != r.size && !ce)
479
+ if (fe || (fe = qe), e.size != r.size && !ce)
480
480
  return !1;
481
481
  var ne = ae.get(e);
482
482
  if (ne)
483
483
  return ne == r;
484
484
  m |= Y, ae.set(e, r);
485
- var pe = At(fe(e), fe(r), m, te, j, ae);
485
+ var pe = At(fe(e), fe(r), m, te, F, ae);
486
486
  return ae.delete(e), pe;
487
- case x:
487
+ case y:
488
488
  if (ut)
489
489
  return ut.call(e) == ut.call(r);
490
490
  }
491
491
  return !1;
492
492
  }
493
- function Ar(e, r, c, m, te, j) {
494
- var ae = c & O, fe = mt(e), ce = fe.length, ne = mt(r), pe = ne.length;
493
+ function mr(e, r, v, m, te, F) {
494
+ var ae = v & O, fe = mt(e), ce = fe.length, ne = mt(r), pe = ne.length;
495
495
  if (ce != pe && !ae)
496
496
  return !1;
497
497
  for (var xe = ce; xe--; ) {
@@ -499,86 +499,86 @@ function Fr() {
499
499
  if (!(ae ? de in r : be.call(r, de)))
500
500
  return !1;
501
501
  }
502
- var ye = j.get(e);
503
- if (ye && j.get(r))
502
+ var ye = F.get(e);
503
+ if (ye && F.get(r))
504
504
  return ye == r;
505
505
  var we = !0;
506
- j.set(e, r), j.set(r, e);
506
+ F.set(e, r), F.set(r, e);
507
507
  for (var Ie = ae; ++xe < ce; ) {
508
508
  de = fe[xe];
509
509
  var me = e[de], De = r[de];
510
510
  if (m)
511
- var Rt = ae ? m(De, me, de, r, e, j) : m(me, De, de, e, r, j);
512
- if (!(Rt === void 0 ? me === De || te(me, De, c, m, j) : Rt)) {
511
+ var Rt = ae ? m(De, me, de, r, e, F) : m(me, De, de, e, r, F);
512
+ if (!(Rt === void 0 ? me === De || te(me, De, v, m, F) : Rt)) {
513
513
  we = !1;
514
514
  break;
515
515
  }
516
516
  Ie || (Ie = de == "constructor");
517
517
  }
518
518
  if (we && !Ie) {
519
- var et = e.constructor, tt = r.constructor;
520
- et != tt && "constructor" in e && "constructor" in r && !(typeof et == "function" && et instanceof et && typeof tt == "function" && tt instanceof tt) && (we = !1);
519
+ var tt = e.constructor, rt = r.constructor;
520
+ tt != rt && "constructor" in e && "constructor" in r && !(typeof tt == "function" && tt instanceof tt && typeof rt == "function" && rt instanceof rt) && (we = !1);
521
521
  }
522
- return j.delete(e), j.delete(r), we;
522
+ return F.delete(e), F.delete(r), we;
523
523
  }
524
524
  function mt(e) {
525
- return pr(e, kr, Tr);
525
+ return yr(e, kr, Cr);
526
526
  }
527
- function Xe(e, r) {
528
- var c = e.__data__;
529
- return Mr(r) ? c[typeof r == "string" ? "string" : "hash"] : c.map;
527
+ function ze(e, r) {
528
+ var v = e.__data__;
529
+ return Ir(r) ? v[typeof r == "string" ? "string" : "hash"] : v.map;
530
530
  }
531
531
  function Ne(e, r) {
532
- var c = ke(e, r);
533
- return wr(c) ? c : void 0;
532
+ var v = Se(e, r);
533
+ return xr(v) ? v : void 0;
534
534
  }
535
- function mr(e) {
536
- var r = be.call(e, Ee), c = e[Ee];
535
+ function Tr(e) {
536
+ var r = be.call(e, Ee), v = e[Ee];
537
537
  try {
538
538
  e[Ee] = void 0;
539
539
  var m = !0;
540
540
  } catch {
541
541
  }
542
542
  var te = dt.call(e);
543
- return m && (r ? e[Ee] = c : delete e[Ee]), te;
543
+ return m && (r ? e[Ee] = v : delete e[Ee]), te;
544
544
  }
545
- var Tr = wt ? function(e) {
545
+ var Cr = wt ? function(e) {
546
546
  return e == null ? [] : (e = Object(e), I(wt(e), function(r) {
547
547
  return yt.call(e, r);
548
548
  }));
549
549
  } : Br, Me = $e;
550
- (it && Me(new it(new ArrayBuffer(1))) != t || qe && Me(new qe()) != N || ot && Me(ot.resolve()) != z || st && Me(new st()) != p || ft && Me(new ft()) != w) && (Me = function(e) {
551
- var r = $e(e), c = r == Q ? e.constructor : void 0, m = c ? Pe(c) : "";
550
+ (it && Me(new it(new ArrayBuffer(1))) != t || je && Me(new je()) != q || ot && Me(ot.resolve()) != z || st && Me(new st()) != b || ft && Me(new ft()) != w) && (Me = function(e) {
551
+ var r = $e(e), v = r == V ? e.constructor : void 0, m = v ? Pe(v) : "";
552
552
  if (m)
553
553
  switch (m) {
554
- case Ut:
555
- return t;
556
554
  case Ht:
557
- return N;
555
+ return t;
558
556
  case Qt:
559
- return z;
557
+ return q;
560
558
  case Gt:
561
- return p;
559
+ return z;
562
560
  case Vt:
561
+ return b;
562
+ case Kt:
563
563
  return w;
564
564
  }
565
565
  return r;
566
566
  });
567
- function Cr(e, r) {
568
- return r = r ?? $, !!r && (typeof e == "number" || ue.test(e)) && e > -1 && e % 1 == 0 && e < r;
567
+ function Mr(e, r) {
568
+ return r = r ?? U, !!r && (typeof e == "number" || ue.test(e)) && e > -1 && e % 1 == 0 && e < r;
569
569
  }
570
- function Mr(e) {
570
+ function Ir(e) {
571
571
  var r = typeof e;
572
572
  return r == "string" || r == "number" || r == "symbol" || r == "boolean" ? e !== "__proto__" : e === null;
573
573
  }
574
- function Ir(e) {
575
- return !!ht && ht in e;
576
- }
577
574
  function Er(e) {
578
- var r = e && e.constructor, c = typeof r == "function" && r.prototype || We;
579
- return e === c;
575
+ return !!ht && ht in e;
580
576
  }
581
577
  function Rr(e) {
578
+ var r = e && e.constructor, v = typeof r == "function" && r.prototype || Ze;
579
+ return e === v;
580
+ }
581
+ function Lr(e) {
582
582
  return dt.call(e);
583
583
  }
584
584
  function Pe(e) {
@@ -597,26 +597,26 @@ function Fr() {
597
597
  function Tt(e, r) {
598
598
  return e === r || e !== e && r !== r;
599
599
  }
600
- var Lr = bt(/* @__PURE__ */ function() {
600
+ var Pr = bt(/* @__PURE__ */ function() {
601
601
  return arguments;
602
602
  }()) ? bt : function(e) {
603
603
  return Fe(e) && be.call(e, "callee") && !yt.call(e, "callee");
604
- }, ze = Array.isArray;
605
- function Pr(e) {
604
+ }, et = Array.isArray;
605
+ function Dr(e) {
606
606
  return e != null && Mt(e.length) && !Ct(e);
607
607
  }
608
- var lt = $t || Sr;
609
- function Dr(e, r) {
608
+ var lt = $t || Nr;
609
+ function Sr(e, r) {
610
610
  return _t(e, r);
611
611
  }
612
612
  function Ct(e) {
613
613
  if (!It(e))
614
614
  return !1;
615
615
  var r = $e(e);
616
- return r == E || r == U || r == g || r == H;
616
+ return r == D || r == H || r == d || r == E;
617
617
  }
618
618
  function Mt(e) {
619
- return typeof e == "number" && e > -1 && e % 1 == 0 && e <= $;
619
+ return typeof e == "number" && e > -1 && e % 1 == 0 && e <= U;
620
620
  }
621
621
  function It(e) {
622
622
  var r = typeof e;
@@ -625,33 +625,33 @@ function Fr() {
625
625
  function Fe(e) {
626
626
  return e != null && typeof e == "object";
627
627
  }
628
- var Et = R ? le(R) : xr;
628
+ var Et = R ? le(R) : br;
629
629
  function kr(e) {
630
- return Pr(e) ? gr(e) : br(e);
630
+ return Dr(e) ? pr(e) : _r(e);
631
631
  }
632
632
  function Br() {
633
633
  return [];
634
634
  }
635
- function Sr() {
635
+ function Nr() {
636
636
  return !1;
637
637
  }
638
- W.exports = Dr;
639
- }(Ue, Ue.exports)), Ue.exports;
638
+ G.exports = Sr;
639
+ }(He, He.exports)), He.exports;
640
640
  }
641
- var vt = { exports: {} }, kt;
642
- function Ur() {
643
- return kt || (kt = 1, function(W, X) {
641
+ var vt = { exports: {} }, St;
642
+ function Fr() {
643
+ return St || (St = 1, function(G, X) {
644
644
  var ie = function() {
645
- var V = function(o, p) {
646
- var v = 236, x = 17, f = o, w = Y[p], n = null, t = 0, h = null, i = [], y = {}, L = function(s, u) {
645
+ var W = function(o, b) {
646
+ var c = 236, y = 17, f = o, w = Y[b], n = null, t = 0, g = null, i = [], p = {}, L = function(s, u) {
647
647
  t = f * 4 + 17, n = function(a) {
648
- for (var l = new Array(a), d = 0; d < a; d += 1) {
649
- l[d] = new Array(a);
648
+ for (var l = new Array(a), h = 0; h < a; h += 1) {
649
+ l[h] = new Array(a);
650
650
  for (var _ = 0; _ < a; _ += 1)
651
- l[d][_] = null;
651
+ l[h][_] = null;
652
652
  }
653
653
  return l;
654
- }(t), T(0, 0), T(t - 7, 0), T(0, t - 7), re(), q(), D(s, u), f >= 7 && oe(s), h == null && (h = G(f, w, i)), k(h, u);
654
+ }(t), T(0, 0), T(t - 7, 0), T(0, t - 7), re(), j(), S(s, u), f >= 7 && oe(s), g == null && (g = Q(f, w, i)), k(g, u);
655
655
  }, T = function(s, u) {
656
656
  for (var a = -1; a <= 7; a += 1)
657
657
  if (!(s + a <= -1 || t <= s + a))
@@ -660,11 +660,11 @@ function Ur() {
660
660
  }, K = function() {
661
661
  for (var s = 0, u = 0, a = 0; a < 8; a += 1) {
662
662
  L(!0, a);
663
- var l = M.getLostPoint(y);
663
+ var l = M.getLostPoint(p);
664
664
  (a == 0 || s > l) && (s = l, u = a);
665
665
  }
666
666
  return u;
667
- }, q = function() {
667
+ }, j = function() {
668
668
  for (var s = 8; s < t - 8; s += 1)
669
669
  n[s][6] == null && (n[s][6] = s % 2 == 0);
670
670
  for (var u = 8; u < t - 8; u += 1)
@@ -672,11 +672,11 @@ function Ur() {
672
672
  }, re = function() {
673
673
  for (var s = M.getPatternPosition(f), u = 0; u < s.length; u += 1)
674
674
  for (var a = 0; a < s.length; a += 1) {
675
- var l = s[u], d = s[a];
676
- if (n[l][d] == null)
675
+ var l = s[u], h = s[a];
676
+ if (n[l][h] == null)
677
677
  for (var _ = -2; _ <= 2; _ += 1)
678
678
  for (var R = -2; R <= 2; R += 1)
679
- _ == -2 || _ == 2 || R == -2 || R == 2 || _ == 0 && R == 0 ? n[l + _][d + R] = !0 : n[l + _][d + R] = !1;
679
+ _ == -2 || _ == 2 || R == -2 || R == 2 || _ == 0 && R == 0 ? n[l + _][h + R] = !0 : n[l + _][h + R] = !1;
680
680
  }
681
681
  }, oe = function(s) {
682
682
  for (var u = M.getBCHTypeNumber(f), a = 0; a < 18; a += 1) {
@@ -687,25 +687,25 @@ function Ur() {
687
687
  var l = !s && (u >> a & 1) == 1;
688
688
  n[a % 3 + t - 8 - 3][Math.floor(a / 3)] = l;
689
689
  }
690
- }, D = function(s, u) {
691
- for (var a = w << 3 | u, l = M.getBCHTypeInfo(a), d = 0; d < 15; d += 1) {
692
- var _ = !s && (l >> d & 1) == 1;
693
- d < 6 ? n[d][8] = _ : d < 8 ? n[d + 1][8] = _ : n[t - 15 + d][8] = _;
690
+ }, S = function(s, u) {
691
+ for (var a = w << 3 | u, l = M.getBCHTypeInfo(a), h = 0; h < 15; h += 1) {
692
+ var _ = !s && (l >> h & 1) == 1;
693
+ h < 6 ? n[h][8] = _ : h < 8 ? n[h + 1][8] = _ : n[t - 15 + h][8] = _;
694
694
  }
695
- for (var d = 0; d < 15; d += 1) {
696
- var _ = !s && (l >> d & 1) == 1;
697
- d < 8 ? n[8][t - d - 1] = _ : d < 9 ? n[8][15 - d - 1 + 1] = _ : n[8][15 - d - 1] = _;
695
+ for (var h = 0; h < 15; h += 1) {
696
+ var _ = !s && (l >> h & 1) == 1;
697
+ h < 8 ? n[8][t - h - 1] = _ : h < 9 ? n[8][15 - h - 1 + 1] = _ : n[8][15 - h - 1] = _;
698
698
  }
699
699
  n[t - 8][8] = !s;
700
700
  }, k = function(s, u) {
701
- for (var a = -1, l = t - 1, d = 7, _ = 0, R = M.getMaskFunction(u), I = t - 1; I > 0; I -= 2)
701
+ for (var a = -1, l = t - 1, h = 7, _ = 0, R = M.getMaskFunction(u), I = t - 1; I > 0; I -= 2)
702
702
  for (I == 6 && (I -= 1); ; ) {
703
703
  for (var J = 0; J < 2; J += 1)
704
704
  if (n[l][I - J] == null) {
705
705
  var ee = !1;
706
- _ < s.length && (ee = (s[_] >>> d & 1) == 1);
707
- var B = R(l, I - J);
708
- B && (ee = !ee), n[l][I - J] = ee, d -= 1, d == -1 && (_ += 1, d = 7);
706
+ _ < s.length && (ee = (s[_] >>> h & 1) == 1);
707
+ var N = R(l, I - J);
708
+ N && (ee = !ee), n[l][I - J] = ee, h -= 1, h == -1 && (_ += 1, h = 7);
709
709
  }
710
710
  if (l += a, l < 0 || t <= l) {
711
711
  l -= a, a = -a;
@@ -713,75 +713,75 @@ function Ur() {
713
713
  }
714
714
  }
715
715
  }, ue = function(s, u) {
716
- for (var a = 0, l = 0, d = 0, _ = new Array(u.length), R = new Array(u.length), I = 0; I < u.length; I += 1) {
716
+ for (var a = 0, l = 0, h = 0, _ = new Array(u.length), R = new Array(u.length), I = 0; I < u.length; I += 1) {
717
717
  var J = u[I].dataCount, ee = u[I].totalCount - J;
718
- l = Math.max(l, J), d = Math.max(d, ee), _[I] = new Array(J);
719
- for (var B = 0; B < _[I].length; B += 1)
720
- _[I][B] = 255 & s.getBuffer()[B + a];
718
+ l = Math.max(l, J), h = Math.max(h, ee), _[I] = new Array(J);
719
+ for (var N = 0; N < _[I].length; N += 1)
720
+ _[I][N] = 255 & s.getBuffer()[N + a];
721
721
  a += J;
722
- var le = M.getErrorCorrectPolynomial(ee), ve = g(_[I], le.getLength() - 1), ke = ve.mod(le);
722
+ var le = M.getErrorCorrectPolynomial(ee), ve = d(_[I], le.getLength() - 1), Se = ve.mod(le);
723
723
  R[I] = new Array(le.getLength() - 1);
724
- for (var B = 0; B < R[I].length; B += 1) {
725
- var Be = B + ke.getLength() - R[I].length;
726
- R[I][B] = Be >= 0 ? ke.getAt(Be) : 0;
724
+ for (var N = 0; N < R[I].length; N += 1) {
725
+ var ke = N + Se.getLength() - R[I].length;
726
+ R[I][N] = ke >= 0 ? Se.getAt(ke) : 0;
727
727
  }
728
728
  }
729
- for (var Ke = 0, B = 0; B < u.length; B += 1)
730
- Ke += u[B].totalCount;
731
- for (var Oe = new Array(Ke), Se = 0, B = 0; B < l; B += 1)
729
+ for (var We = 0, N = 0; N < u.length; N += 1)
730
+ We += u[N].totalCount;
731
+ for (var qe = new Array(We), Be = 0, N = 0; N < l; N += 1)
732
732
  for (var I = 0; I < u.length; I += 1)
733
- B < _[I].length && (Oe[Se] = _[I][B], Se += 1);
734
- for (var B = 0; B < d; B += 1)
733
+ N < _[I].length && (qe[Be] = _[I][N], Be += 1);
734
+ for (var N = 0; N < h; N += 1)
735
735
  for (var I = 0; I < u.length; I += 1)
736
- B < R[I].length && (Oe[Se] = R[I][B], Se += 1);
737
- return Oe;
738
- }, G = function(s, u, a) {
739
- for (var l = A.getRSBlocks(s, u), d = C(), _ = 0; _ < a.length; _ += 1) {
736
+ N < R[I].length && (qe[Be] = R[I][N], Be += 1);
737
+ return qe;
738
+ }, Q = function(s, u, a) {
739
+ for (var l = A.getRSBlocks(s, u), h = C(), _ = 0; _ < a.length; _ += 1) {
740
740
  var R = a[_];
741
- d.put(R.getMode(), 4), d.put(R.getLength(), M.getLengthInBits(R.getMode(), s)), R.write(d);
741
+ h.put(R.getMode(), 4), h.put(R.getLength(), M.getLengthInBits(R.getMode(), s)), R.write(h);
742
742
  }
743
743
  for (var I = 0, _ = 0; _ < l.length; _ += 1)
744
744
  I += l[_].dataCount;
745
- if (d.getLengthInBits() > I * 8)
746
- throw "code length overflow. (" + d.getLengthInBits() + ">" + I * 8 + ")";
747
- for (d.getLengthInBits() + 4 <= I * 8 && d.put(0, 4); d.getLengthInBits() % 8 != 0; )
748
- d.putBit(!1);
749
- for (; !(d.getLengthInBits() >= I * 8 || (d.put(v, 8), d.getLengthInBits() >= I * 8)); )
750
- d.put(x, 8);
751
- return ue(d, l);
745
+ if (h.getLengthInBits() > I * 8)
746
+ throw "code length overflow. (" + h.getLengthInBits() + ">" + I * 8 + ")";
747
+ for (h.getLengthInBits() + 4 <= I * 8 && h.put(0, 4); h.getLengthInBits() % 8 != 0; )
748
+ h.putBit(!1);
749
+ for (; !(h.getLengthInBits() >= I * 8 || (h.put(c, 8), h.getLengthInBits() >= I * 8)); )
750
+ h.put(y, 8);
751
+ return ue(h, l);
752
752
  };
753
- y.addData = function(s, u) {
753
+ p.addData = function(s, u) {
754
754
  u = u || "Byte";
755
755
  var a = null;
756
756
  switch (u) {
757
757
  case "Numeric":
758
- a = F(s);
758
+ a = $(s);
759
759
  break;
760
760
  case "Alphanumeric":
761
- a = E(s);
761
+ a = D(s);
762
762
  break;
763
763
  case "Byte":
764
- a = U(s);
764
+ a = H(s);
765
765
  break;
766
766
  case "Kanji":
767
- a = N(s);
767
+ a = q(s);
768
768
  break;
769
769
  default:
770
770
  throw "mode:" + u;
771
771
  }
772
- i.push(a), h = null;
773
- }, y.isDark = function(s, u) {
772
+ i.push(a), g = null;
773
+ }, p.isDark = function(s, u) {
774
774
  if (s < 0 || t <= s || u < 0 || t <= u)
775
775
  throw s + "," + u;
776
776
  return n[s][u];
777
- }, y.getModuleCount = function() {
777
+ }, p.getModuleCount = function() {
778
778
  return t;
779
- }, y.make = function() {
779
+ }, p.make = function() {
780
780
  if (f < 1) {
781
781
  for (var s = 1; s < 40; s++) {
782
782
  for (var u = A.getRSBlocks(s, w), a = C(), l = 0; l < i.length; l++) {
783
- var d = i[l];
784
- a.put(d.getMode(), 4), a.put(d.getLength(), M.getLengthInBits(d.getMode(), s)), d.write(a);
783
+ var h = i[l];
784
+ a.put(h.getMode(), 4), a.put(h.getLength(), M.getLengthInBits(h.getMode(), s)), h.write(a);
785
785
  }
786
786
  for (var _ = 0, l = 0; l < u.length; l++)
787
787
  _ += u[l].dataCount;
@@ -791,39 +791,39 @@ function Ur() {
791
791
  f = s;
792
792
  }
793
793
  L(!1, K());
794
- }, y.createTableTag = function(s, u) {
794
+ }, p.createTableTag = function(s, u) {
795
795
  s = s || 2, u = typeof u > "u" ? s * 4 : u;
796
796
  var a = "";
797
797
  a += '<table style="', a += " border-width: 0px; border-style: none;", a += " border-collapse: collapse;", a += " padding: 0px; margin: " + u + "px;", a += '">', a += "<tbody>";
798
- for (var l = 0; l < y.getModuleCount(); l += 1) {
798
+ for (var l = 0; l < p.getModuleCount(); l += 1) {
799
799
  a += "<tr>";
800
- for (var d = 0; d < y.getModuleCount(); d += 1)
801
- a += '<td style="', a += " border-width: 0px; border-style: none;", a += " border-collapse: collapse;", a += " padding: 0px; margin: 0px;", a += " width: " + s + "px;", a += " height: " + s + "px;", a += " background-color: ", a += y.isDark(l, d) ? "#000000" : "#ffffff", a += ";", a += '"/>';
800
+ for (var h = 0; h < p.getModuleCount(); h += 1)
801
+ a += '<td style="', a += " border-width: 0px; border-style: none;", a += " border-collapse: collapse;", a += " padding: 0px; margin: 0px;", a += " width: " + s + "px;", a += " height: " + s + "px;", a += " background-color: ", a += p.isDark(l, h) ? "#000000" : "#ffffff", a += ";", a += '"/>';
802
802
  a += "</tr>";
803
803
  }
804
804
  return a += "</tbody>", a += "</table>", a;
805
- }, y.createSvgTag = function(s, u, a, l) {
806
- var d = {};
807
- typeof arguments[0] == "object" && (d = arguments[0], s = d.cellSize, u = d.margin, a = d.alt, l = d.title), s = s || 2, u = typeof u > "u" ? s * 4 : u, a = typeof a == "string" ? { text: a } : a || {}, a.text = a.text || null, a.id = a.text ? a.id || "qrcode-description" : null, l = typeof l == "string" ? { text: l } : l || {}, l.text = l.text || null, l.id = l.text ? l.id || "qrcode-title" : null;
808
- var _ = y.getModuleCount() * s + u * 2, R, I, J, ee, B = "", le;
809
- for (le = "l" + s + ",0 0," + s + " -" + s + ",0 0,-" + s + "z ", B += '<svg version="1.1" xmlns="http://www.w3.org/2000/svg"', B += d.scalable ? "" : ' width="' + _ + 'px" height="' + _ + 'px"', B += ' viewBox="0 0 ' + _ + " " + _ + '" ', B += ' preserveAspectRatio="xMinYMin meet"', B += l.text || a.text ? ' role="img" aria-labelledby="' + se([l.id, a.id].join(" ").trim()) + '"' : "", B += ">", B += l.text ? '<title id="' + se(l.id) + '">' + se(l.text) + "</title>" : "", B += a.text ? '<description id="' + se(a.id) + '">' + se(a.text) + "</description>" : "", B += '<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>', B += '<path d="', J = 0; J < y.getModuleCount(); J += 1)
810
- for (ee = J * s + u, R = 0; R < y.getModuleCount(); R += 1)
811
- y.isDark(J, R) && (I = R * s + u, B += "M" + I + "," + ee + le);
812
- return B += '" stroke="transparent" fill="black"/>', B += "</svg>", B;
813
- }, y.createDataURL = function(s, u) {
805
+ }, p.createSvgTag = function(s, u, a, l) {
806
+ var h = {};
807
+ typeof arguments[0] == "object" && (h = arguments[0], s = h.cellSize, u = h.margin, a = h.alt, l = h.title), s = s || 2, u = typeof u > "u" ? s * 4 : u, a = typeof a == "string" ? { text: a } : a || {}, a.text = a.text || null, a.id = a.text ? a.id || "qrcode-description" : null, l = typeof l == "string" ? { text: l } : l || {}, l.text = l.text || null, l.id = l.text ? l.id || "qrcode-title" : null;
808
+ var _ = p.getModuleCount() * s + u * 2, R, I, J, ee, N = "", le;
809
+ for (le = "l" + s + ",0 0," + s + " -" + s + ",0 0,-" + s + "z ", N += '<svg version="1.1" xmlns="http://www.w3.org/2000/svg"', N += h.scalable ? "" : ' width="' + _ + 'px" height="' + _ + 'px"', N += ' viewBox="0 0 ' + _ + " " + _ + '" ', N += ' preserveAspectRatio="xMinYMin meet"', N += l.text || a.text ? ' role="img" aria-labelledby="' + se([l.id, a.id].join(" ").trim()) + '"' : "", N += ">", N += l.text ? '<title id="' + se(l.id) + '">' + se(l.text) + "</title>" : "", N += a.text ? '<description id="' + se(a.id) + '">' + se(a.text) + "</description>" : "", N += '<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>', N += '<path d="', J = 0; J < p.getModuleCount(); J += 1)
810
+ for (ee = J * s + u, R = 0; R < p.getModuleCount(); R += 1)
811
+ p.isDark(J, R) && (I = R * s + u, N += "M" + I + "," + ee + le);
812
+ return N += '" stroke="transparent" fill="black"/>', N += "</svg>", N;
813
+ }, p.createDataURL = function(s, u) {
814
814
  s = s || 2, u = typeof u > "u" ? s * 4 : u;
815
- var a = y.getModuleCount() * s + u * 2, l = u, d = a - u;
816
- return H(a, a, function(_, R) {
817
- if (l <= _ && _ < d && l <= R && R < d) {
815
+ var a = p.getModuleCount() * s + u * 2, l = u, h = a - u;
816
+ return E(a, a, function(_, R) {
817
+ if (l <= _ && _ < h && l <= R && R < h) {
818
818
  var I = Math.floor((_ - l) / s), J = Math.floor((R - l) / s);
819
- return y.isDark(J, I) ? 0 : 1;
819
+ return p.isDark(J, I) ? 0 : 1;
820
820
  } else
821
821
  return 1;
822
822
  });
823
- }, y.createImgTag = function(s, u, a) {
823
+ }, p.createImgTag = function(s, u, a) {
824
824
  s = s || 2, u = typeof u > "u" ? s * 4 : u;
825
- var l = y.getModuleCount() * s + u * 2, d = "";
826
- return d += "<img", d += ' src="', d += y.createDataURL(s, u), d += '"', d += ' width="', d += l, d += '"', d += ' height="', d += l, d += '"', a && (d += ' alt="', d += se(a), d += '"'), d += "/>", d;
825
+ var l = p.getModuleCount() * s + u * 2, h = "";
826
+ return h += "<img", h += ' src="', h += p.createDataURL(s, u), h += '"', h += ' width="', h += l, h += '"', h += ' height="', h += l, h += '"', a && (h += ' alt="', h += se(a), h += '"'), h += "/>", h;
827
827
  };
828
828
  var se = function(s) {
829
829
  for (var u = "", a = 0; a < s.length; a += 1) {
@@ -850,7 +850,7 @@ function Ur() {
850
850
  }, _e = function(s) {
851
851
  var u = 1;
852
852
  s = typeof s > "u" ? u * 2 : s;
853
- var a = y.getModuleCount() * u + s * 2, l = s, d = a - s, _, R, I, J, ee, B = {
853
+ var a = p.getModuleCount() * u + s * 2, l = s, h = a - s, _, R, I, J, ee, N = {
854
854
  "██": "█",
855
855
  "█ ": "▀",
856
856
  " █": "▄",
@@ -863,64 +863,64 @@ function Ur() {
863
863
  }, ve = "";
864
864
  for (_ = 0; _ < a; _ += 2) {
865
865
  for (I = Math.floor((_ - l) / u), J = Math.floor((_ + 1 - l) / u), R = 0; R < a; R += 1)
866
- ee = "█", l <= R && R < d && l <= _ && _ < d && y.isDark(I, Math.floor((R - l) / u)) && (ee = " "), l <= R && R < d && l <= _ + 1 && _ + 1 < d && y.isDark(J, Math.floor((R - l) / u)) ? ee += " " : ee += "█", ve += s < 1 && _ + 1 >= d ? le[ee] : B[ee];
866
+ ee = "█", l <= R && R < h && l <= _ && _ < h && p.isDark(I, Math.floor((R - l) / u)) && (ee = " "), l <= R && R < h && l <= _ + 1 && _ + 1 < h && p.isDark(J, Math.floor((R - l) / u)) ? ee += " " : ee += "█", ve += s < 1 && _ + 1 >= h ? le[ee] : N[ee];
867
867
  ve += `
868
868
  `;
869
869
  }
870
870
  return a % 2 && s > 0 ? ve.substring(0, ve.length - a - 1) + Array(a + 1).join("▀") : ve.substring(0, ve.length - 1);
871
871
  };
872
- return y.createASCII = function(s, u) {
872
+ return p.createASCII = function(s, u) {
873
873
  if (s = s || 1, s < 2)
874
874
  return _e(u);
875
875
  s -= 1, u = typeof u > "u" ? s * 2 : u;
876
- var a = y.getModuleCount() * s + u * 2, l = u, d = a - u, _, R, I, J, ee = Array(s + 1).join("██"), B = Array(s + 1).join(" "), le = "", ve = "";
876
+ var a = p.getModuleCount() * s + u * 2, l = u, h = a - u, _, R, I, J, ee = Array(s + 1).join("██"), N = Array(s + 1).join(" "), le = "", ve = "";
877
877
  for (_ = 0; _ < a; _ += 1) {
878
878
  for (I = Math.floor((_ - l) / s), ve = "", R = 0; R < a; R += 1)
879
- J = 1, l <= R && R < d && l <= _ && _ < d && y.isDark(I, Math.floor((R - l) / s)) && (J = 0), ve += J ? ee : B;
879
+ J = 1, l <= R && R < h && l <= _ && _ < h && p.isDark(I, Math.floor((R - l) / s)) && (J = 0), ve += J ? ee : N;
880
880
  for (I = 0; I < s; I += 1)
881
881
  le += ve + `
882
882
  `;
883
883
  }
884
884
  return le.substring(0, le.length - 1);
885
- }, y.renderTo2dContext = function(s, u) {
885
+ }, p.renderTo2dContext = function(s, u) {
886
886
  u = u || 2;
887
- for (var a = y.getModuleCount(), l = 0; l < a; l++)
888
- for (var d = 0; d < a; d++)
889
- s.fillStyle = y.isDark(l, d) ? "black" : "white", s.fillRect(l * u, d * u, u, u);
890
- }, y;
887
+ for (var a = p.getModuleCount(), l = 0; l < a; l++)
888
+ for (var h = 0; h < a; h++)
889
+ s.fillStyle = p.isDark(l, h) ? "black" : "white", s.fillRect(l * u, h * u, u, u);
890
+ }, p;
891
891
  };
892
- V.stringToBytesFuncs = {
892
+ W.stringToBytesFuncs = {
893
893
  default: function(o) {
894
- for (var p = [], v = 0; v < o.length; v += 1) {
895
- var x = o.charCodeAt(v);
896
- p.push(x & 255);
894
+ for (var b = [], c = 0; c < o.length; c += 1) {
895
+ var y = o.charCodeAt(c);
896
+ b.push(y & 255);
897
897
  }
898
- return p;
898
+ return b;
899
899
  }
900
- }, V.stringToBytes = V.stringToBytesFuncs.default, V.createStringToBytes = function(o, p) {
901
- var v = function() {
902
- for (var f = Q(o), w = function() {
903
- var q = f.read();
904
- if (q == -1) throw "eof";
905
- return q;
900
+ }, W.stringToBytes = W.stringToBytesFuncs.default, W.createStringToBytes = function(o, b) {
901
+ var c = function() {
902
+ for (var f = V(o), w = function() {
903
+ var j = f.read();
904
+ if (j == -1) throw "eof";
905
+ return j;
906
906
  }, n = 0, t = {}; ; ) {
907
- var h = f.read();
908
- if (h == -1) break;
909
- var i = w(), y = w(), L = w(), T = String.fromCharCode(h << 8 | i), K = y << 8 | L;
907
+ var g = f.read();
908
+ if (g == -1) break;
909
+ var i = w(), p = w(), L = w(), T = String.fromCharCode(g << 8 | i), K = p << 8 | L;
910
910
  t[T] = K, n += 1;
911
911
  }
912
- if (n != p)
913
- throw n + " != " + p;
912
+ if (n != b)
913
+ throw n + " != " + b;
914
914
  return t;
915
- }(), x = 63;
915
+ }(), y = 63;
916
916
  return function(f) {
917
917
  for (var w = [], n = 0; n < f.length; n += 1) {
918
918
  var t = f.charCodeAt(n);
919
919
  if (t < 128)
920
920
  w.push(t);
921
921
  else {
922
- var h = v[f.charAt(n)];
923
- typeof h == "number" ? (h & 255) == h ? w.push(h) : (w.push(h >>> 8), w.push(h & 255)) : w.push(x);
922
+ var g = c[f.charAt(n)];
923
+ typeof g == "number" ? (g & 255) == g ? w.push(g) : (w.push(g >>> 8), w.push(g & 255)) : w.push(y);
924
924
  }
925
925
  }
926
926
  return w;
@@ -936,7 +936,7 @@ function Ur() {
936
936
  M: 0,
937
937
  Q: 3,
938
938
  H: 2
939
- }, $ = {
939
+ }, U = {
940
940
  PATTERN000: 0,
941
941
  PATTERN001: 1,
942
942
  PATTERN010: 2,
@@ -987,61 +987,61 @@ function Ur() {
987
987
  [6, 32, 58, 84, 110, 136, 162],
988
988
  [6, 26, 54, 82, 110, 138, 166],
989
989
  [6, 30, 58, 86, 114, 142, 170]
990
- ], p = 1335, v = 7973, x = 21522, f = {}, w = function(n) {
990
+ ], b = 1335, c = 7973, y = 21522, f = {}, w = function(n) {
991
991
  for (var t = 0; n != 0; )
992
992
  t += 1, n >>>= 1;
993
993
  return t;
994
994
  };
995
995
  return f.getBCHTypeInfo = function(n) {
996
- for (var t = n << 10; w(t) - w(p) >= 0; )
997
- t ^= p << w(t) - w(p);
998
- return (n << 10 | t) ^ x;
996
+ for (var t = n << 10; w(t) - w(b) >= 0; )
997
+ t ^= b << w(t) - w(b);
998
+ return (n << 10 | t) ^ y;
999
999
  }, f.getBCHTypeNumber = function(n) {
1000
- for (var t = n << 12; w(t) - w(v) >= 0; )
1001
- t ^= v << w(t) - w(v);
1000
+ for (var t = n << 12; w(t) - w(c) >= 0; )
1001
+ t ^= c << w(t) - w(c);
1002
1002
  return n << 12 | t;
1003
1003
  }, f.getPatternPosition = function(n) {
1004
1004
  return o[n - 1];
1005
1005
  }, f.getMaskFunction = function(n) {
1006
1006
  switch (n) {
1007
- case $.PATTERN000:
1008
- return function(t, h) {
1009
- return (t + h) % 2 == 0;
1007
+ case U.PATTERN000:
1008
+ return function(t, g) {
1009
+ return (t + g) % 2 == 0;
1010
1010
  };
1011
- case $.PATTERN001:
1012
- return function(t, h) {
1011
+ case U.PATTERN001:
1012
+ return function(t, g) {
1013
1013
  return t % 2 == 0;
1014
1014
  };
1015
- case $.PATTERN010:
1016
- return function(t, h) {
1017
- return h % 3 == 0;
1015
+ case U.PATTERN010:
1016
+ return function(t, g) {
1017
+ return g % 3 == 0;
1018
1018
  };
1019
- case $.PATTERN011:
1020
- return function(t, h) {
1021
- return (t + h) % 3 == 0;
1019
+ case U.PATTERN011:
1020
+ return function(t, g) {
1021
+ return (t + g) % 3 == 0;
1022
1022
  };
1023
- case $.PATTERN100:
1024
- return function(t, h) {
1025
- return (Math.floor(t / 2) + Math.floor(h / 3)) % 2 == 0;
1023
+ case U.PATTERN100:
1024
+ return function(t, g) {
1025
+ return (Math.floor(t / 2) + Math.floor(g / 3)) % 2 == 0;
1026
1026
  };
1027
- case $.PATTERN101:
1028
- return function(t, h) {
1029
- return t * h % 2 + t * h % 3 == 0;
1027
+ case U.PATTERN101:
1028
+ return function(t, g) {
1029
+ return t * g % 2 + t * g % 3 == 0;
1030
1030
  };
1031
- case $.PATTERN110:
1032
- return function(t, h) {
1033
- return (t * h % 2 + t * h % 3) % 2 == 0;
1031
+ case U.PATTERN110:
1032
+ return function(t, g) {
1033
+ return (t * g % 2 + t * g % 3) % 2 == 0;
1034
1034
  };
1035
- case $.PATTERN111:
1036
- return function(t, h) {
1037
- return (t * h % 3 + (t + h) % 2) % 2 == 0;
1035
+ case U.PATTERN111:
1036
+ return function(t, g) {
1037
+ return (t * g % 3 + (t + g) % 2) % 2 == 0;
1038
1038
  };
1039
1039
  default:
1040
1040
  throw "bad maskPattern:" + n;
1041
1041
  }
1042
1042
  }, f.getErrorCorrectPolynomial = function(n) {
1043
- for (var t = g([1], 0), h = 0; h < n; h += 1)
1044
- t = t.multiply(g([1, b.gexp(h)], 0));
1043
+ for (var t = d([1], 0), g = 0; g < n; g += 1)
1044
+ t = t.multiply(d([1, x.gexp(g)], 0));
1045
1045
  return t;
1046
1046
  }, f.getLengthInBits = function(n, t) {
1047
1047
  if (1 <= t && t < 10)
@@ -1086,79 +1086,79 @@ function Ur() {
1086
1086
  else
1087
1087
  throw "type:" + t;
1088
1088
  }, f.getLostPoint = function(n) {
1089
- for (var t = n.getModuleCount(), h = 0, i = 0; i < t; i += 1)
1090
- for (var y = 0; y < t; y += 1) {
1091
- for (var L = 0, T = n.isDark(i, y), K = -1; K <= 1; K += 1)
1089
+ for (var t = n.getModuleCount(), g = 0, i = 0; i < t; i += 1)
1090
+ for (var p = 0; p < t; p += 1) {
1091
+ for (var L = 0, T = n.isDark(i, p), K = -1; K <= 1; K += 1)
1092
1092
  if (!(i + K < 0 || t <= i + K))
1093
- for (var q = -1; q <= 1; q += 1)
1094
- y + q < 0 || t <= y + q || K == 0 && q == 0 || T == n.isDark(i + K, y + q) && (L += 1);
1095
- L > 5 && (h += 3 + L - 5);
1093
+ for (var j = -1; j <= 1; j += 1)
1094
+ p + j < 0 || t <= p + j || K == 0 && j == 0 || T == n.isDark(i + K, p + j) && (L += 1);
1095
+ L > 5 && (g += 3 + L - 5);
1096
1096
  }
1097
1097
  for (var i = 0; i < t - 1; i += 1)
1098
- for (var y = 0; y < t - 1; y += 1) {
1098
+ for (var p = 0; p < t - 1; p += 1) {
1099
1099
  var re = 0;
1100
- n.isDark(i, y) && (re += 1), n.isDark(i + 1, y) && (re += 1), n.isDark(i, y + 1) && (re += 1), n.isDark(i + 1, y + 1) && (re += 1), (re == 0 || re == 4) && (h += 3);
1100
+ n.isDark(i, p) && (re += 1), n.isDark(i + 1, p) && (re += 1), n.isDark(i, p + 1) && (re += 1), n.isDark(i + 1, p + 1) && (re += 1), (re == 0 || re == 4) && (g += 3);
1101
1101
  }
1102
1102
  for (var i = 0; i < t; i += 1)
1103
- for (var y = 0; y < t - 6; y += 1)
1104
- n.isDark(i, y) && !n.isDark(i, y + 1) && n.isDark(i, y + 2) && n.isDark(i, y + 3) && n.isDark(i, y + 4) && !n.isDark(i, y + 5) && n.isDark(i, y + 6) && (h += 40);
1105
- for (var y = 0; y < t; y += 1)
1103
+ for (var p = 0; p < t - 6; p += 1)
1104
+ n.isDark(i, p) && !n.isDark(i, p + 1) && n.isDark(i, p + 2) && n.isDark(i, p + 3) && n.isDark(i, p + 4) && !n.isDark(i, p + 5) && n.isDark(i, p + 6) && (g += 40);
1105
+ for (var p = 0; p < t; p += 1)
1106
1106
  for (var i = 0; i < t - 6; i += 1)
1107
- n.isDark(i, y) && !n.isDark(i + 1, y) && n.isDark(i + 2, y) && n.isDark(i + 3, y) && n.isDark(i + 4, y) && !n.isDark(i + 5, y) && n.isDark(i + 6, y) && (h += 40);
1108
- for (var oe = 0, y = 0; y < t; y += 1)
1107
+ n.isDark(i, p) && !n.isDark(i + 1, p) && n.isDark(i + 2, p) && n.isDark(i + 3, p) && n.isDark(i + 4, p) && !n.isDark(i + 5, p) && n.isDark(i + 6, p) && (g += 40);
1108
+ for (var oe = 0, p = 0; p < t; p += 1)
1109
1109
  for (var i = 0; i < t; i += 1)
1110
- n.isDark(i, y) && (oe += 1);
1111
- var D = Math.abs(100 * oe / t / t - 50) / 5;
1112
- return h += D * 10, h;
1110
+ n.isDark(i, p) && (oe += 1);
1111
+ var S = Math.abs(100 * oe / t / t - 50) / 5;
1112
+ return g += S * 10, g;
1113
1113
  }, f;
1114
- }(), b = function() {
1115
- for (var o = new Array(256), p = new Array(256), v = 0; v < 8; v += 1)
1116
- o[v] = 1 << v;
1117
- for (var v = 8; v < 256; v += 1)
1118
- o[v] = o[v - 4] ^ o[v - 5] ^ o[v - 6] ^ o[v - 8];
1119
- for (var v = 0; v < 255; v += 1)
1120
- p[o[v]] = v;
1121
- var x = {};
1122
- return x.glog = function(f) {
1114
+ }(), x = function() {
1115
+ for (var o = new Array(256), b = new Array(256), c = 0; c < 8; c += 1)
1116
+ o[c] = 1 << c;
1117
+ for (var c = 8; c < 256; c += 1)
1118
+ o[c] = o[c - 4] ^ o[c - 5] ^ o[c - 6] ^ o[c - 8];
1119
+ for (var c = 0; c < 255; c += 1)
1120
+ b[o[c]] = c;
1121
+ var y = {};
1122
+ return y.glog = function(f) {
1123
1123
  if (f < 1)
1124
1124
  throw "glog(" + f + ")";
1125
- return p[f];
1126
- }, x.gexp = function(f) {
1125
+ return b[f];
1126
+ }, y.gexp = function(f) {
1127
1127
  for (; f < 0; )
1128
1128
  f += 255;
1129
1129
  for (; f >= 256; )
1130
1130
  f -= 255;
1131
1131
  return o[f];
1132
- }, x;
1132
+ }, y;
1133
1133
  }();
1134
- function g(o, p) {
1134
+ function d(o, b) {
1135
1135
  if (typeof o.length > "u")
1136
- throw o.length + "/" + p;
1137
- var v = function() {
1136
+ throw o.length + "/" + b;
1137
+ var c = function() {
1138
1138
  for (var f = 0; f < o.length && o[f] == 0; )
1139
1139
  f += 1;
1140
- for (var w = new Array(o.length - f + p), n = 0; n < o.length - f; n += 1)
1140
+ for (var w = new Array(o.length - f + b), n = 0; n < o.length - f; n += 1)
1141
1141
  w[n] = o[n + f];
1142
1142
  return w;
1143
- }(), x = {};
1144
- return x.getAt = function(f) {
1145
- return v[f];
1146
- }, x.getLength = function() {
1147
- return v.length;
1148
- }, x.multiply = function(f) {
1149
- for (var w = new Array(x.getLength() + f.getLength() - 1), n = 0; n < x.getLength(); n += 1)
1143
+ }(), y = {};
1144
+ return y.getAt = function(f) {
1145
+ return c[f];
1146
+ }, y.getLength = function() {
1147
+ return c.length;
1148
+ }, y.multiply = function(f) {
1149
+ for (var w = new Array(y.getLength() + f.getLength() - 1), n = 0; n < y.getLength(); n += 1)
1150
1150
  for (var t = 0; t < f.getLength(); t += 1)
1151
- w[n + t] ^= b.gexp(b.glog(x.getAt(n)) + b.glog(f.getAt(t)));
1152
- return g(w, 0);
1153
- }, x.mod = function(f) {
1154
- if (x.getLength() - f.getLength() < 0)
1155
- return x;
1156
- for (var w = b.glog(x.getAt(0)) - b.glog(f.getAt(0)), n = new Array(x.getLength()), t = 0; t < x.getLength(); t += 1)
1157
- n[t] = x.getAt(t);
1151
+ w[n + t] ^= x.gexp(x.glog(y.getAt(n)) + x.glog(f.getAt(t)));
1152
+ return d(w, 0);
1153
+ }, y.mod = function(f) {
1154
+ if (y.getLength() - f.getLength() < 0)
1155
+ return y;
1156
+ for (var w = x.glog(y.getAt(0)) - x.glog(f.getAt(0)), n = new Array(y.getLength()), t = 0; t < y.getLength(); t += 1)
1157
+ n[t] = y.getAt(t);
1158
1158
  for (var t = 0; t < f.getLength(); t += 1)
1159
- n[t] ^= b.gexp(b.glog(f.getAt(t)) + w);
1160
- return g(n, 0).mod(f);
1161
- }, x;
1159
+ n[t] ^= x.gexp(x.glog(f.getAt(t)) + w);
1160
+ return d(n, 0).mod(f);
1161
+ }, y;
1162
1162
  }
1163
1163
  var A = function() {
1164
1164
  var o = [
@@ -1366,10 +1366,10 @@ function Ur() {
1366
1366
  [18, 75, 47, 31, 76, 48],
1367
1367
  [34, 54, 24, 34, 55, 25],
1368
1368
  [20, 45, 15, 61, 46, 16]
1369
- ], p = function(f, w) {
1369
+ ], b = function(f, w) {
1370
1370
  var n = {};
1371
1371
  return n.totalCount = f, n.dataCount = w, n;
1372
- }, v = {}, x = function(f, w) {
1372
+ }, c = {}, y = function(f, w) {
1373
1373
  switch (w) {
1374
1374
  case Y.L:
1375
1375
  return o[(f - 1) * 4 + 0];
@@ -1383,60 +1383,60 @@ function Ur() {
1383
1383
  return;
1384
1384
  }
1385
1385
  };
1386
- return v.getRSBlocks = function(f, w) {
1387
- var n = x(f, w);
1386
+ return c.getRSBlocks = function(f, w) {
1387
+ var n = y(f, w);
1388
1388
  if (typeof n > "u")
1389
1389
  throw "bad rs block @ typeNumber:" + f + "/errorCorrectionLevel:" + w;
1390
- for (var t = n.length / 3, h = [], i = 0; i < t; i += 1)
1391
- for (var y = n[i * 3 + 0], L = n[i * 3 + 1], T = n[i * 3 + 2], K = 0; K < y; K += 1)
1392
- h.push(p(L, T));
1393
- return h;
1394
- }, v;
1390
+ for (var t = n.length / 3, g = [], i = 0; i < t; i += 1)
1391
+ for (var p = n[i * 3 + 0], L = n[i * 3 + 1], T = n[i * 3 + 2], K = 0; K < p; K += 1)
1392
+ g.push(b(L, T));
1393
+ return g;
1394
+ }, c;
1395
1395
  }(), C = function() {
1396
- var o = [], p = 0, v = {};
1397
- return v.getBuffer = function() {
1396
+ var o = [], b = 0, c = {};
1397
+ return c.getBuffer = function() {
1398
1398
  return o;
1399
- }, v.getAt = function(x) {
1400
- var f = Math.floor(x / 8);
1401
- return (o[f] >>> 7 - x % 8 & 1) == 1;
1402
- }, v.put = function(x, f) {
1399
+ }, c.getAt = function(y) {
1400
+ var f = Math.floor(y / 8);
1401
+ return (o[f] >>> 7 - y % 8 & 1) == 1;
1402
+ }, c.put = function(y, f) {
1403
1403
  for (var w = 0; w < f; w += 1)
1404
- v.putBit((x >>> f - w - 1 & 1) == 1);
1405
- }, v.getLengthInBits = function() {
1406
- return p;
1407
- }, v.putBit = function(x) {
1408
- var f = Math.floor(p / 8);
1409
- o.length <= f && o.push(0), x && (o[f] |= 128 >>> p % 8), p += 1;
1410
- }, v;
1411
- }, F = function(o) {
1412
- var p = O.MODE_NUMBER, v = o, x = {};
1413
- x.getMode = function() {
1414
- return p;
1415
- }, x.getLength = function(n) {
1416
- return v.length;
1417
- }, x.write = function(n) {
1418
- for (var t = v, h = 0; h + 2 < t.length; )
1419
- n.put(f(t.substring(h, h + 3)), 10), h += 3;
1420
- h < t.length && (t.length - h == 1 ? n.put(f(t.substring(h, h + 1)), 4) : t.length - h == 2 && n.put(f(t.substring(h, h + 2)), 7));
1404
+ c.putBit((y >>> f - w - 1 & 1) == 1);
1405
+ }, c.getLengthInBits = function() {
1406
+ return b;
1407
+ }, c.putBit = function(y) {
1408
+ var f = Math.floor(b / 8);
1409
+ o.length <= f && o.push(0), y && (o[f] |= 128 >>> b % 8), b += 1;
1410
+ }, c;
1411
+ }, $ = function(o) {
1412
+ var b = O.MODE_NUMBER, c = o, y = {};
1413
+ y.getMode = function() {
1414
+ return b;
1415
+ }, y.getLength = function(n) {
1416
+ return c.length;
1417
+ }, y.write = function(n) {
1418
+ for (var t = c, g = 0; g + 2 < t.length; )
1419
+ n.put(f(t.substring(g, g + 3)), 10), g += 3;
1420
+ g < t.length && (t.length - g == 1 ? n.put(f(t.substring(g, g + 1)), 4) : t.length - g == 2 && n.put(f(t.substring(g, g + 2)), 7));
1421
1421
  };
1422
1422
  var f = function(n) {
1423
- for (var t = 0, h = 0; h < n.length; h += 1)
1424
- t = t * 10 + w(n.charAt(h));
1423
+ for (var t = 0, g = 0; g < n.length; g += 1)
1424
+ t = t * 10 + w(n.charAt(g));
1425
1425
  return t;
1426
1426
  }, w = function(n) {
1427
1427
  if ("0" <= n && n <= "9")
1428
1428
  return n.charCodeAt(0) - 48;
1429
1429
  throw "illegal char :" + n;
1430
1430
  };
1431
- return x;
1432
- }, E = function(o) {
1433
- var p = O.MODE_ALPHA_NUM, v = o, x = {};
1434
- x.getMode = function() {
1435
- return p;
1436
- }, x.getLength = function(w) {
1437
- return v.length;
1438
- }, x.write = function(w) {
1439
- for (var n = v, t = 0; t + 1 < n.length; )
1431
+ return y;
1432
+ }, D = function(o) {
1433
+ var b = O.MODE_ALPHA_NUM, c = o, y = {};
1434
+ y.getMode = function() {
1435
+ return b;
1436
+ }, y.getLength = function(w) {
1437
+ return c.length;
1438
+ }, y.write = function(w) {
1439
+ for (var n = c, t = 0; t + 1 < n.length; )
1440
1440
  w.put(
1441
1441
  f(n.charAt(t)) * 45 + f(n.charAt(t + 1)),
1442
1442
  11
@@ -1471,70 +1471,70 @@ function Ur() {
1471
1471
  throw "illegal char :" + w;
1472
1472
  }
1473
1473
  };
1474
- return x;
1475
- }, U = function(o) {
1476
- var p = O.MODE_8BIT_BYTE, v = V.stringToBytes(o), x = {};
1477
- return x.getMode = function() {
1478
- return p;
1479
- }, x.getLength = function(f) {
1480
- return v.length;
1481
- }, x.write = function(f) {
1482
- for (var w = 0; w < v.length; w += 1)
1483
- f.put(v[w], 8);
1484
- }, x;
1485
- }, N = function(o) {
1486
- var p = O.MODE_KANJI, v = V.stringToBytesFuncs.SJIS;
1487
- if (!v)
1474
+ return y;
1475
+ }, H = function(o) {
1476
+ var b = O.MODE_8BIT_BYTE, c = W.stringToBytes(o), y = {};
1477
+ return y.getMode = function() {
1478
+ return b;
1479
+ }, y.getLength = function(f) {
1480
+ return c.length;
1481
+ }, y.write = function(f) {
1482
+ for (var w = 0; w < c.length; w += 1)
1483
+ f.put(c[w], 8);
1484
+ }, y;
1485
+ }, q = function(o) {
1486
+ var b = O.MODE_KANJI, c = W.stringToBytesFuncs.SJIS;
1487
+ if (!c)
1488
1488
  throw "sjis not supported.";
1489
1489
  (function(w, n) {
1490
- var t = v(w);
1490
+ var t = c(w);
1491
1491
  if (t.length != 2 || (t[0] << 8 | t[1]) != n)
1492
1492
  throw "sjis not supported.";
1493
1493
  })("友", 38726);
1494
- var x = v(o), f = {};
1494
+ var y = c(o), f = {};
1495
1495
  return f.getMode = function() {
1496
- return p;
1496
+ return b;
1497
1497
  }, f.getLength = function(w) {
1498
- return ~~(x.length / 2);
1498
+ return ~~(y.length / 2);
1499
1499
  }, f.write = function(w) {
1500
- for (var n = x, t = 0; t + 1 < n.length; ) {
1501
- var h = (255 & n[t]) << 8 | 255 & n[t + 1];
1502
- if (33088 <= h && h <= 40956)
1503
- h -= 33088;
1504
- else if (57408 <= h && h <= 60351)
1505
- h -= 49472;
1500
+ for (var n = y, t = 0; t + 1 < n.length; ) {
1501
+ var g = (255 & n[t]) << 8 | 255 & n[t + 1];
1502
+ if (33088 <= g && g <= 40956)
1503
+ g -= 33088;
1504
+ else if (57408 <= g && g <= 60351)
1505
+ g -= 49472;
1506
1506
  else
1507
- throw "illegal char at " + (t + 1) + "/" + h;
1508
- h = (h >>> 8 & 255) * 192 + (h & 255), w.put(h, 13), t += 2;
1507
+ throw "illegal char at " + (t + 1) + "/" + g;
1508
+ g = (g >>> 8 & 255) * 192 + (g & 255), w.put(g, 13), t += 2;
1509
1509
  }
1510
1510
  if (t < n.length)
1511
1511
  throw "illegal char at " + (t + 1);
1512
1512
  }, f;
1513
- }, S = function() {
1514
- var o = [], p = {};
1515
- return p.writeByte = function(v) {
1516
- o.push(v & 255);
1517
- }, p.writeShort = function(v) {
1518
- p.writeByte(v), p.writeByte(v >>> 8);
1519
- }, p.writeBytes = function(v, x, f) {
1520
- x = x || 0, f = f || v.length;
1513
+ }, B = function() {
1514
+ var o = [], b = {};
1515
+ return b.writeByte = function(c) {
1516
+ o.push(c & 255);
1517
+ }, b.writeShort = function(c) {
1518
+ b.writeByte(c), b.writeByte(c >>> 8);
1519
+ }, b.writeBytes = function(c, y, f) {
1520
+ y = y || 0, f = f || c.length;
1521
1521
  for (var w = 0; w < f; w += 1)
1522
- p.writeByte(v[w + x]);
1523
- }, p.writeString = function(v) {
1524
- for (var x = 0; x < v.length; x += 1)
1525
- p.writeByte(v.charCodeAt(x));
1526
- }, p.toByteArray = function() {
1522
+ b.writeByte(c[w + y]);
1523
+ }, b.writeString = function(c) {
1524
+ for (var y = 0; y < c.length; y += 1)
1525
+ b.writeByte(c.charCodeAt(y));
1526
+ }, b.toByteArray = function() {
1527
1527
  return o;
1528
- }, p.toString = function() {
1529
- var v = "";
1530
- v += "[";
1531
- for (var x = 0; x < o.length; x += 1)
1532
- x > 0 && (v += ","), v += o[x];
1533
- return v += "]", v;
1534
- }, p;
1528
+ }, b.toString = function() {
1529
+ var c = "";
1530
+ c += "[";
1531
+ for (var y = 0; y < o.length; y += 1)
1532
+ y > 0 && (c += ","), c += o[y];
1533
+ return c += "]", c;
1534
+ }, b;
1535
1535
  }, Z = function() {
1536
- var o = 0, p = 0, v = 0, x = "", f = {}, w = function(t) {
1537
- x += String.fromCharCode(n(t & 63));
1536
+ var o = 0, b = 0, c = 0, y = "", f = {}, w = function(t) {
1537
+ y += String.fromCharCode(n(t & 63));
1538
1538
  }, n = function(t) {
1539
1539
  if (!(t < 0)) {
1540
1540
  if (t < 26)
@@ -1551,33 +1551,33 @@ function Ur() {
1551
1551
  throw "n:" + t;
1552
1552
  };
1553
1553
  return f.writeByte = function(t) {
1554
- for (o = o << 8 | t & 255, p += 8, v += 1; p >= 6; )
1555
- w(o >>> p - 6), p -= 6;
1554
+ for (o = o << 8 | t & 255, b += 8, c += 1; b >= 6; )
1555
+ w(o >>> b - 6), b -= 6;
1556
1556
  }, f.flush = function() {
1557
- if (p > 0 && (w(o << 6 - p), o = 0, p = 0), v % 3 != 0)
1558
- for (var t = 3 - v % 3, h = 0; h < t; h += 1)
1559
- x += "=";
1557
+ if (b > 0 && (w(o << 6 - b), o = 0, b = 0), c % 3 != 0)
1558
+ for (var t = 3 - c % 3, g = 0; g < t; g += 1)
1559
+ y += "=";
1560
1560
  }, f.toString = function() {
1561
- return x;
1561
+ return y;
1562
1562
  }, f;
1563
- }, Q = function(o) {
1564
- var p = o, v = 0, x = 0, f = 0, w = {};
1563
+ }, V = function(o) {
1564
+ var b = o, c = 0, y = 0, f = 0, w = {};
1565
1565
  w.read = function() {
1566
1566
  for (; f < 8; ) {
1567
- if (v >= p.length) {
1567
+ if (c >= b.length) {
1568
1568
  if (f == 0)
1569
1569
  return -1;
1570
1570
  throw "unexpected end of file./" + f;
1571
1571
  }
1572
- var t = p.charAt(v);
1573
- if (v += 1, t == "=")
1572
+ var t = b.charAt(c);
1573
+ if (c += 1, t == "=")
1574
1574
  return f = 0, -1;
1575
1575
  if (t.match(/^\s$/))
1576
1576
  continue;
1577
- x = x << 6 | n(t.charCodeAt(0)), f += 6;
1577
+ y = y << 6 | n(t.charCodeAt(0)), f += 6;
1578
1578
  }
1579
- var h = x >>> f - 8 & 255;
1580
- return f -= 8, h;
1579
+ var g = y >>> f - 8 & 255;
1580
+ return f -= 8, g;
1581
1581
  };
1582
1582
  var n = function(t) {
1583
1583
  if (65 <= t && t <= 90)
@@ -1593,49 +1593,49 @@ function Ur() {
1593
1593
  throw "c:" + t;
1594
1594
  };
1595
1595
  return w;
1596
- }, z = function(o, p) {
1597
- var v = o, x = p, f = new Array(o * p), w = {};
1598
- w.setPixel = function(i, y, L) {
1599
- f[y * v + i] = L;
1596
+ }, z = function(o, b) {
1597
+ var c = o, y = b, f = new Array(o * b), w = {};
1598
+ w.setPixel = function(i, p, L) {
1599
+ f[p * c + i] = L;
1600
1600
  }, w.write = function(i) {
1601
- i.writeString("GIF87a"), i.writeShort(v), i.writeShort(x), i.writeByte(128), i.writeByte(0), i.writeByte(0), i.writeByte(0), i.writeByte(0), i.writeByte(0), i.writeByte(255), i.writeByte(255), i.writeByte(255), i.writeString(","), i.writeShort(0), i.writeShort(0), i.writeShort(v), i.writeShort(x), i.writeByte(0);
1602
- var y = 2, L = t(y);
1603
- i.writeByte(y);
1601
+ i.writeString("GIF87a"), i.writeShort(c), i.writeShort(y), i.writeByte(128), i.writeByte(0), i.writeByte(0), i.writeByte(0), i.writeByte(0), i.writeByte(0), i.writeByte(255), i.writeByte(255), i.writeByte(255), i.writeString(","), i.writeShort(0), i.writeShort(0), i.writeShort(c), i.writeShort(y), i.writeByte(0);
1602
+ var p = 2, L = t(p);
1603
+ i.writeByte(p);
1604
1604
  for (var T = 0; L.length - T > 255; )
1605
1605
  i.writeByte(255), i.writeBytes(L, T, 255), T += 255;
1606
1606
  i.writeByte(L.length - T), i.writeBytes(L, T, L.length - T), i.writeByte(0), i.writeString(";");
1607
1607
  };
1608
1608
  var n = function(i) {
1609
- var y = i, L = 0, T = 0, K = {};
1610
- return K.write = function(q, re) {
1611
- if (q >>> re)
1609
+ var p = i, L = 0, T = 0, K = {};
1610
+ return K.write = function(j, re) {
1611
+ if (j >>> re)
1612
1612
  throw "length over";
1613
1613
  for (; L + re >= 8; )
1614
- y.writeByte(255 & (q << L | T)), re -= 8 - L, q >>>= 8 - L, T = 0, L = 0;
1615
- T = q << L | T, L = L + re;
1614
+ p.writeByte(255 & (j << L | T)), re -= 8 - L, j >>>= 8 - L, T = 0, L = 0;
1615
+ T = j << L | T, L = L + re;
1616
1616
  }, K.flush = function() {
1617
- L > 0 && y.writeByte(T);
1617
+ L > 0 && p.writeByte(T);
1618
1618
  }, K;
1619
1619
  }, t = function(i) {
1620
- for (var y = 1 << i, L = (1 << i) + 1, T = i + 1, K = h(), q = 0; q < y; q += 1)
1621
- K.add(String.fromCharCode(q));
1622
- K.add(String.fromCharCode(y)), K.add(String.fromCharCode(L));
1623
- var re = S(), oe = n(re);
1624
- oe.write(y, T);
1625
- var D = 0, k = String.fromCharCode(f[D]);
1626
- for (D += 1; D < f.length; ) {
1627
- var ue = String.fromCharCode(f[D]);
1628
- D += 1, K.contains(k + ue) ? k = k + ue : (oe.write(K.indexOf(k), T), K.size() < 4095 && (K.size() == 1 << T && (T += 1), K.add(k + ue)), k = ue);
1620
+ for (var p = 1 << i, L = (1 << i) + 1, T = i + 1, K = g(), j = 0; j < p; j += 1)
1621
+ K.add(String.fromCharCode(j));
1622
+ K.add(String.fromCharCode(p)), K.add(String.fromCharCode(L));
1623
+ var re = B(), oe = n(re);
1624
+ oe.write(p, T);
1625
+ var S = 0, k = String.fromCharCode(f[S]);
1626
+ for (S += 1; S < f.length; ) {
1627
+ var ue = String.fromCharCode(f[S]);
1628
+ S += 1, K.contains(k + ue) ? k = k + ue : (oe.write(K.indexOf(k), T), K.size() < 4095 && (K.size() == 1 << T && (T += 1), K.add(k + ue)), k = ue);
1629
1629
  }
1630
1630
  return oe.write(K.indexOf(k), T), oe.write(L, T), oe.flush(), re.toByteArray();
1631
- }, h = function() {
1632
- var i = {}, y = 0, L = {};
1631
+ }, g = function() {
1632
+ var i = {}, p = 0, L = {};
1633
1633
  return L.add = function(T) {
1634
1634
  if (L.contains(T))
1635
1635
  throw "dup key:" + T;
1636
- i[T] = y, y += 1;
1636
+ i[T] = p, p += 1;
1637
1637
  }, L.size = function() {
1638
- return y;
1638
+ return p;
1639
1639
  }, L.indexOf = function(T) {
1640
1640
  return i[T];
1641
1641
  }, L.contains = function(T) {
@@ -1643,91 +1643,91 @@ function Ur() {
1643
1643
  }, L;
1644
1644
  };
1645
1645
  return w;
1646
- }, H = function(o, p, v) {
1647
- for (var x = z(o, p), f = 0; f < p; f += 1)
1646
+ }, E = function(o, b, c) {
1647
+ for (var y = z(o, b), f = 0; f < b; f += 1)
1648
1648
  for (var w = 0; w < o; w += 1)
1649
- x.setPixel(w, f, v(w, f));
1650
- var n = S();
1651
- x.write(n);
1652
- for (var t = Z(), h = n.toByteArray(), i = 0; i < h.length; i += 1)
1653
- t.writeByte(h[i]);
1649
+ y.setPixel(w, f, c(w, f));
1650
+ var n = B();
1651
+ y.write(n);
1652
+ for (var t = Z(), g = n.toByteArray(), i = 0; i < g.length; i += 1)
1653
+ t.writeByte(g[i]);
1654
1654
  return t.flush(), "data:image/gif;base64," + t;
1655
1655
  };
1656
- return V;
1656
+ return W;
1657
1657
  }();
1658
1658
  (function() {
1659
- ie.stringToBytesFuncs["UTF-8"] = function(V) {
1659
+ ie.stringToBytesFuncs["UTF-8"] = function(W) {
1660
1660
  function O(Y) {
1661
- for (var $ = [], M = 0; M < Y.length; M++) {
1662
- var b = Y.charCodeAt(M);
1663
- b < 128 ? $.push(b) : b < 2048 ? $.push(
1664
- 192 | b >> 6,
1665
- 128 | b & 63
1666
- ) : b < 55296 || b >= 57344 ? $.push(
1667
- 224 | b >> 12,
1668
- 128 | b >> 6 & 63,
1669
- 128 | b & 63
1670
- ) : (M++, b = 65536 + ((b & 1023) << 10 | Y.charCodeAt(M) & 1023), $.push(
1671
- 240 | b >> 18,
1672
- 128 | b >> 12 & 63,
1673
- 128 | b >> 6 & 63,
1674
- 128 | b & 63
1661
+ for (var U = [], M = 0; M < Y.length; M++) {
1662
+ var x = Y.charCodeAt(M);
1663
+ x < 128 ? U.push(x) : x < 2048 ? U.push(
1664
+ 192 | x >> 6,
1665
+ 128 | x & 63
1666
+ ) : x < 55296 || x >= 57344 ? U.push(
1667
+ 224 | x >> 12,
1668
+ 128 | x >> 6 & 63,
1669
+ 128 | x & 63
1670
+ ) : (M++, x = 65536 + ((x & 1023) << 10 | Y.charCodeAt(M) & 1023), U.push(
1671
+ 240 | x >> 18,
1672
+ 128 | x >> 12 & 63,
1673
+ 128 | x >> 6 & 63,
1674
+ 128 | x & 63
1675
1675
  ));
1676
1676
  }
1677
- return $;
1677
+ return U;
1678
1678
  }
1679
- return O(V);
1679
+ return O(W);
1680
1680
  };
1681
- })(), function(V) {
1682
- W.exports = V();
1681
+ })(), function(W) {
1682
+ G.exports = W();
1683
1683
  }(function() {
1684
1684
  return ie;
1685
1685
  });
1686
1686
  }(vt)), vt.exports;
1687
1687
  }
1688
- var Bt;
1688
+ var kt;
1689
1689
  function Hr() {
1690
- if (Bt) return Te;
1691
- Bt = 1;
1692
- var W = Te && Te.__extends || /* @__PURE__ */ function() {
1693
- var $ = function(M, b) {
1694
- return $ = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(g, A) {
1695
- g.__proto__ = A;
1696
- } || function(g, A) {
1697
- for (var C in A) Object.prototype.hasOwnProperty.call(A, C) && (g[C] = A[C]);
1698
- }, $(M, b);
1690
+ if (kt) return Te;
1691
+ kt = 1;
1692
+ var G = Te && Te.__extends || /* @__PURE__ */ function() {
1693
+ var U = function(M, x) {
1694
+ return U = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, A) {
1695
+ d.__proto__ = A;
1696
+ } || function(d, A) {
1697
+ for (var C in A) Object.prototype.hasOwnProperty.call(A, C) && (d[C] = A[C]);
1698
+ }, U(M, x);
1699
1699
  };
1700
- return function(M, b) {
1701
- if (typeof b != "function" && b !== null)
1702
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1703
- $(M, b);
1704
- function g() {
1700
+ return function(M, x) {
1701
+ if (typeof x != "function" && x !== null)
1702
+ throw new TypeError("Class extends value " + String(x) + " is not a constructor or null");
1703
+ U(M, x);
1704
+ function d() {
1705
1705
  this.constructor = M;
1706
1706
  }
1707
- M.prototype = b === null ? Object.create(b) : (g.prototype = b.prototype, new g());
1707
+ M.prototype = x === null ? Object.create(x) : (d.prototype = x.prototype, new d());
1708
1708
  };
1709
1709
  }(), X = Te && Te.__assign || function() {
1710
- return X = Object.assign || function($) {
1711
- for (var M, b = 1, g = arguments.length; b < g; b++) {
1712
- M = arguments[b];
1713
- for (var A in M) Object.prototype.hasOwnProperty.call(M, A) && ($[A] = M[A]);
1710
+ return X = Object.assign || function(U) {
1711
+ for (var M, x = 1, d = arguments.length; x < d; x++) {
1712
+ M = arguments[x];
1713
+ for (var A in M) Object.prototype.hasOwnProperty.call(M, A) && (U[A] = M[A]);
1714
1714
  }
1715
- return $;
1715
+ return U;
1716
1716
  }, X.apply(this, arguments);
1717
1717
  };
1718
1718
  Object.defineProperty(Te, "__esModule", { value: !0 }), Te.QRCode = void 0;
1719
- var ie = Fr(), V = Ur(), O = Nr, Y = (
1719
+ var ie = $r(), W = Fr(), O = Bt, Y = (
1720
1720
  /** @class */
1721
- function($) {
1722
- W(M, $);
1723
- function M(b) {
1724
- var g = $.call(this, b) || this;
1725
- return g.canvasRef = O.createRef(), g;
1721
+ function(U) {
1722
+ G(M, U);
1723
+ function M(x) {
1724
+ var d = U.call(this, x) || this;
1725
+ return d.canvasRef = O.createRef(), d;
1726
1726
  }
1727
- return M.prototype.download = function(b, g) {
1727
+ return M.prototype.download = function(x, d) {
1728
1728
  if (this.canvasRef.current) {
1729
1729
  var A = void 0;
1730
- switch (b) {
1730
+ switch (x) {
1731
1731
  case "jpg":
1732
1732
  A = "image/jpeg";
1733
1733
  break;
@@ -1739,102 +1739,102 @@ function Hr() {
1739
1739
  A = "image/png";
1740
1740
  break;
1741
1741
  }
1742
- var C = this.canvasRef.current.toDataURL(A, 1), F = document.createElement("a");
1743
- F.download = g ?? "react-qrcode-logo", F.href = C, F.click();
1742
+ var C = this.canvasRef.current.toDataURL(A, 1), $ = document.createElement("a");
1743
+ $.download = d ?? "react-qrcode-logo", $.href = C, $.click();
1744
1744
  }
1745
- }, M.prototype.utf16to8 = function(b) {
1746
- var g = "", A, C, F = b.length;
1747
- for (A = 0; A < F; A++)
1748
- C = b.charCodeAt(A), C >= 1 && C <= 127 ? g += b.charAt(A) : C > 2047 ? (g += String.fromCharCode(224 | C >> 12 & 15), g += String.fromCharCode(128 | C >> 6 & 63), g += String.fromCharCode(128 | C >> 0 & 63)) : (g += String.fromCharCode(192 | C >> 6 & 31), g += String.fromCharCode(128 | C >> 0 & 63));
1749
- return g;
1750
- }, M.prototype.drawRoundedSquare = function(b, g, A, C, F, E, U, N) {
1751
- N.lineWidth = b, N.fillStyle = F, N.strokeStyle = F, A += b / 2, g += b / 2, C -= b, Array.isArray(E) || (E = [E, E, E, E]), E = E.map(function(H) {
1752
- return H = Math.min(H, C / 2), H < 0 ? 0 : H;
1745
+ }, M.prototype.utf16to8 = function(x) {
1746
+ var d = "", A, C, $ = x.length;
1747
+ for (A = 0; A < $; A++)
1748
+ C = x.charCodeAt(A), C >= 1 && C <= 127 ? d += x.charAt(A) : C > 2047 ? (d += String.fromCharCode(224 | C >> 12 & 15), d += String.fromCharCode(128 | C >> 6 & 63), d += String.fromCharCode(128 | C >> 0 & 63)) : (d += String.fromCharCode(192 | C >> 6 & 31), d += String.fromCharCode(128 | C >> 0 & 63));
1749
+ return d;
1750
+ }, M.prototype.drawRoundedSquare = function(x, d, A, C, $, D, H, q) {
1751
+ q.lineWidth = x, q.fillStyle = $, q.strokeStyle = $, A += x / 2, d += x / 2, C -= x, Array.isArray(D) || (D = [D, D, D, D]), D = D.map(function(E) {
1752
+ return E = Math.min(E, C / 2), E < 0 ? 0 : E;
1753
1753
  });
1754
- var S = E[0] || 0, Z = E[1] || 0, Q = E[2] || 0, z = E[3] || 0;
1755
- N.beginPath(), N.moveTo(g + S, A), N.lineTo(g + C - Z, A), Z && N.quadraticCurveTo(g + C, A, g + C, A + Z), N.lineTo(g + C, A + C - Q), Q && N.quadraticCurveTo(g + C, A + C, g + C - Q, A + C), N.lineTo(g + z, A + C), z && N.quadraticCurveTo(g, A + C, g, A + C - z), N.lineTo(g, A + S), S && N.quadraticCurveTo(g, A, g + S, A), N.closePath(), N.stroke(), U && N.fill();
1756
- }, M.prototype.drawPositioningPattern = function(b, g, A, C, F, E, U) {
1757
- U === void 0 && (U = [0, 0, 0, 0]);
1758
- var N = Math.ceil(g), S, Z;
1759
- typeof U != "number" && !Array.isArray(U) ? (S = U.outer || 0, Z = U.inner || 0) : (S = U, Z = S);
1760
- var Q, z;
1761
- typeof E != "string" ? (Q = E.outer, z = E.inner) : (Q = E, z = E);
1762
- var H = C * g + A, o = F * g + A, p = g * 7;
1763
- this.drawRoundedSquare(N, o, H, p, Q, S, !1, b), p = g * 3, H += g * 2, o += g * 2, this.drawRoundedSquare(N, o, H, p, z, Z, !0, b);
1764
- }, M.prototype.isInPositioninZone = function(b, g, A) {
1754
+ var B = D[0] || 0, Z = D[1] || 0, V = D[2] || 0, z = D[3] || 0;
1755
+ q.beginPath(), q.moveTo(d + B, A), q.lineTo(d + C - Z, A), Z && q.quadraticCurveTo(d + C, A, d + C, A + Z), q.lineTo(d + C, A + C - V), V && q.quadraticCurveTo(d + C, A + C, d + C - V, A + C), q.lineTo(d + z, A + C), z && q.quadraticCurveTo(d, A + C, d, A + C - z), q.lineTo(d, A + B), B && q.quadraticCurveTo(d, A, d + B, A), q.closePath(), q.stroke(), H && q.fill();
1756
+ }, M.prototype.drawPositioningPattern = function(x, d, A, C, $, D, H) {
1757
+ H === void 0 && (H = [0, 0, 0, 0]);
1758
+ var q = Math.ceil(d), B, Z;
1759
+ typeof H != "number" && !Array.isArray(H) ? (B = H.outer || 0, Z = H.inner || 0) : (B = H, Z = B);
1760
+ var V, z;
1761
+ typeof D != "string" ? (V = D.outer, z = D.inner) : (V = D, z = D);
1762
+ var E = C * d + A, o = $ * d + A, b = d * 7;
1763
+ this.drawRoundedSquare(q, o, E, b, V, B, !1, x), b = d * 3, E += d * 2, o += d * 2, this.drawRoundedSquare(q, o, E, b, z, Z, !0, x);
1764
+ }, M.prototype.isInPositioninZone = function(x, d, A) {
1765
1765
  return A.some(function(C) {
1766
- return g >= C.row && g <= C.row + 7 && b >= C.col && b <= C.col + 7;
1766
+ return d >= C.row && d <= C.row + 7 && x >= C.col && x <= C.col + 7;
1767
1767
  });
1768
- }, M.prototype.transformPixelLengthIntoNumberOfCells = function(b, g) {
1769
- return b / g;
1770
- }, M.prototype.isCoordinateInImage = function(b, g, A, C, F, E, U, N) {
1771
- if (N) {
1772
- var S = 2, Z = this.transformPixelLengthIntoNumberOfCells(F, U), Q = this.transformPixelLengthIntoNumberOfCells(E, U), z = this.transformPixelLengthIntoNumberOfCells(A, U) - 1, H = this.transformPixelLengthIntoNumberOfCells(C, U) - 1;
1773
- return g >= Z - S && g <= Z + z + S && b >= Q - S && b <= Q + H + S;
1768
+ }, M.prototype.transformPixelLengthIntoNumberOfCells = function(x, d) {
1769
+ return x / d;
1770
+ }, M.prototype.isCoordinateInImage = function(x, d, A, C, $, D, H, q) {
1771
+ if (q) {
1772
+ var B = 2, Z = this.transformPixelLengthIntoNumberOfCells($, H), V = this.transformPixelLengthIntoNumberOfCells(D, H), z = this.transformPixelLengthIntoNumberOfCells(A, H) - 1, E = this.transformPixelLengthIntoNumberOfCells(C, H) - 1;
1773
+ return d >= Z - B && d <= Z + z + B && x >= V - B && x <= V + E + B;
1774
1774
  } else
1775
1775
  return !1;
1776
- }, M.prototype.shouldComponentUpdate = function(b) {
1777
- return !ie(this.props, b);
1776
+ }, M.prototype.shouldComponentUpdate = function(x) {
1777
+ return !ie(this.props, x);
1778
1778
  }, M.prototype.componentDidMount = function() {
1779
1779
  this.update();
1780
1780
  }, M.prototype.componentDidUpdate = function() {
1781
1781
  this.update();
1782
1782
  }, M.prototype.update = function() {
1783
- var b, g = this.props, A = g.value, C = g.ecLevel, F = g.enableCORS, E = g.bgColor, U = g.fgColor, N = g.logoImage, S = g.logoOpacity, Z = g.logoOnLoad, Q = g.removeQrCodeBehindLogo, z = g.qrStyle, H = g.eyeRadius, o = g.eyeColor, p = g.logoPaddingStyle, v = +this.props.size, x = +this.props.quietZone, f = this.props.logoWidth ? +this.props.logoWidth : 0, w = this.props.logoHeight ? +this.props.logoHeight : 0, n = this.props.logoPadding ? +this.props.logoPadding : 0, t = V(0, C);
1783
+ var x, d = this.props, A = d.value, C = d.ecLevel, $ = d.enableCORS, D = d.bgColor, H = d.fgColor, q = d.logoImage, B = d.logoOpacity, Z = d.logoOnLoad, V = d.removeQrCodeBehindLogo, z = d.qrStyle, E = d.eyeRadius, o = d.eyeColor, b = d.logoPaddingStyle, c = +this.props.size, y = +this.props.quietZone, f = this.props.logoWidth ? +this.props.logoWidth : 0, w = this.props.logoHeight ? +this.props.logoHeight : 0, n = this.props.logoPadding ? +this.props.logoPadding : 0, t = W(0, C);
1784
1784
  t.addData(this.utf16to8(A)), t.make();
1785
- var h = (b = this.canvasRef) === null || b === void 0 ? void 0 : b.current, i = h.getContext("2d"), y = v + 2 * x, L = t.getModuleCount(), T = v / L, K = window.devicePixelRatio || 1;
1786
- h.height = h.width = y * K, i.scale(K, K), i.fillStyle = E, i.fillRect(0, 0, y, y);
1787
- var q = x, re = [
1785
+ var g = (x = this.canvasRef) === null || x === void 0 ? void 0 : x.current, i = g.getContext("2d"), p = c + 2 * y, L = t.getModuleCount(), T = c / L, K = window.devicePixelRatio || 1;
1786
+ g.height = g.width = p * K, i.scale(K, K), i.fillStyle = D, i.fillRect(0, 0, p, p);
1787
+ var j = y, re = [
1788
1788
  { row: 0, col: 0 },
1789
1789
  { row: 0, col: L - 7 },
1790
1790
  { row: L - 7, col: 0 }
1791
1791
  ];
1792
- if (i.strokeStyle = U, z === "dots") {
1793
- i.fillStyle = U;
1794
- for (var oe = T / 2, D = 0; D < L; D++)
1792
+ if (i.strokeStyle = H, z === "dots") {
1793
+ i.fillStyle = H;
1794
+ for (var oe = T / 2, S = 0; S < L; S++)
1795
1795
  for (var k = 0; k < L; k++)
1796
- t.isDark(D, k) && !this.isInPositioninZone(D, k, re) && (i.beginPath(), i.arc(Math.round(k * T) + oe + q, Math.round(D * T) + oe + q, oe / 100 * 75, 0, 2 * Math.PI, !1), i.closePath(), i.fill());
1796
+ t.isDark(S, k) && !this.isInPositioninZone(S, k, re) && (i.beginPath(), i.arc(Math.round(k * T) + oe + j, Math.round(S * T) + oe + j, oe / 100 * 75, 0, 2 * Math.PI, !1), i.closePath(), i.fill());
1797
1797
  } else if (z === "fluid") {
1798
- for (var oe = Math.ceil(T / 2), D = 0; D < L; D++)
1798
+ for (var oe = Math.ceil(T / 2), S = 0; S < L; S++)
1799
1799
  for (var k = 0; k < L; k++)
1800
- if (t.isDark(D, k) && !this.isInPositioninZone(D, k, re)) {
1800
+ if (t.isDark(S, k) && !this.isInPositioninZone(S, k, re)) {
1801
1801
  var ue = [!1, !1, !1, !1];
1802
- D > 0 && !t.isDark(D - 1, k) && k > 0 && !t.isDark(D, k - 1) && (ue[0] = !0), D > 0 && !t.isDark(D - 1, k) && k < L - 1 && !t.isDark(D, k + 1) && (ue[1] = !0), D < L - 1 && !t.isDark(D + 1, k) && k < L - 1 && !t.isDark(D, k + 1) && (ue[2] = !0), D < L - 1 && !t.isDark(D + 1, k) && k > 0 && !t.isDark(D, k - 1) && (ue[3] = !0);
1803
- var G = Math.ceil((k + 1) * T) - Math.floor(k * T), se = Math.ceil((D + 1) * T) - Math.floor(D * T);
1804
- i.fillStyle = U, i.beginPath(), i.arc(Math.round(k * T) + oe + q, Math.round(D * T) + oe + q, oe, 0, 2 * Math.PI, !1), i.closePath(), i.fill(), ue[0] || i.fillRect(Math.round(k * T) + q, Math.round(D * T) + q, G / 2, se / 2), ue[1] || i.fillRect(Math.round(k * T) + q + Math.floor(G / 2), Math.round(D * T) + q, G / 2, se / 2), ue[2] || i.fillRect(Math.round(k * T) + q + Math.floor(G / 2), Math.round(D * T) + q + Math.floor(se / 2), G / 2, se / 2), ue[3] || i.fillRect(Math.round(k * T) + q, Math.round(D * T) + q + Math.floor(se / 2), G / 2, se / 2);
1802
+ S > 0 && !t.isDark(S - 1, k) && k > 0 && !t.isDark(S, k - 1) && (ue[0] = !0), S > 0 && !t.isDark(S - 1, k) && k < L - 1 && !t.isDark(S, k + 1) && (ue[1] = !0), S < L - 1 && !t.isDark(S + 1, k) && k < L - 1 && !t.isDark(S, k + 1) && (ue[2] = !0), S < L - 1 && !t.isDark(S + 1, k) && k > 0 && !t.isDark(S, k - 1) && (ue[3] = !0);
1803
+ var Q = Math.ceil((k + 1) * T) - Math.floor(k * T), se = Math.ceil((S + 1) * T) - Math.floor(S * T);
1804
+ i.fillStyle = H, i.beginPath(), i.arc(Math.round(k * T) + oe + j, Math.round(S * T) + oe + j, oe, 0, 2 * Math.PI, !1), i.closePath(), i.fill(), ue[0] || i.fillRect(Math.round(k * T) + j, Math.round(S * T) + j, Q / 2, se / 2), ue[1] || i.fillRect(Math.round(k * T) + j + Math.floor(Q / 2), Math.round(S * T) + j, Q / 2, se / 2), ue[2] || i.fillRect(Math.round(k * T) + j + Math.floor(Q / 2), Math.round(S * T) + j + Math.floor(se / 2), Q / 2, se / 2), ue[3] || i.fillRect(Math.round(k * T) + j, Math.round(S * T) + j + Math.floor(se / 2), Q / 2, se / 2);
1805
1805
  }
1806
1806
  } else
1807
- for (var D = 0; D < L; D++)
1807
+ for (var S = 0; S < L; S++)
1808
1808
  for (var k = 0; k < L; k++)
1809
- if (t.isDark(D, k) && !this.isInPositioninZone(D, k, re)) {
1810
- i.fillStyle = U;
1811
- var G = Math.ceil((k + 1) * T) - Math.floor(k * T), se = Math.ceil((D + 1) * T) - Math.floor(D * T);
1812
- i.fillRect(Math.round(k * T) + q, Math.round(D * T) + q, G, se);
1809
+ if (t.isDark(S, k) && !this.isInPositioninZone(S, k, re)) {
1810
+ i.fillStyle = H;
1811
+ var Q = Math.ceil((k + 1) * T) - Math.floor(k * T), se = Math.ceil((S + 1) * T) - Math.floor(S * T);
1812
+ i.fillRect(Math.round(k * T) + j, Math.round(S * T) + j, Q, se);
1813
1813
  }
1814
1814
  for (var _e = 0; _e < 3; _e++) {
1815
- var s = re[_e], D = s.row, k = s.col, u = H, a = void 0;
1816
- Array.isArray(u) && (u = u[_e]), typeof u == "number" && (u = [u, u, u, u]), o ? Array.isArray(o) ? a = o[_e] : a = o : a = U, this.drawPositioningPattern(i, T, q, D, k, a, u);
1815
+ var s = re[_e], S = s.row, k = s.col, u = E, a = void 0;
1816
+ Array.isArray(u) && (u = u[_e]), typeof u == "number" && (u = [u, u, u, u]), o ? Array.isArray(o) ? a = o[_e] : a = o : a = H, this.drawPositioningPattern(i, T, j, S, k, a, u);
1817
1817
  }
1818
- if (N) {
1818
+ if (q) {
1819
1819
  var l = new Image();
1820
- F && (l.crossOrigin = "Anonymous"), l.onload = function(d) {
1820
+ $ && (l.crossOrigin = "Anonymous"), l.onload = function(h) {
1821
1821
  i.save();
1822
- var _ = f || v * 0.2, R = w || _, I = (v - _) / 2, J = (v - R) / 2;
1823
- if (Q || n) {
1824
- i.beginPath(), i.strokeStyle = E, i.fillStyle = E;
1825
- var ee = _ + 2 * n, B = R + 2 * n, le = I + q - n, ve = J + q - n;
1826
- if (p === "circle") {
1827
- var ke = le + ee / 2, Be = ve + B / 2;
1828
- i.ellipse(ke, Be, ee / 2, B / 2, 0, 0, 2 * Math.PI), i.stroke(), i.fill();
1822
+ var _ = f || c * 0.2, R = w || _, I = (c - _) / 2, J = (c - R) / 2;
1823
+ if (V || n) {
1824
+ i.beginPath(), i.strokeStyle = D, i.fillStyle = D;
1825
+ var ee = _ + 2 * n, N = R + 2 * n, le = I + j - n, ve = J + j - n;
1826
+ if (b === "circle") {
1827
+ var Se = le + ee / 2, ke = ve + N / 2;
1828
+ i.ellipse(Se, ke, ee / 2, N / 2, 0, 0, 2 * Math.PI), i.stroke(), i.fill();
1829
1829
  } else
1830
- i.fillRect(le, ve, ee, B);
1830
+ i.fillRect(le, ve, ee, N);
1831
1831
  }
1832
- i.globalAlpha = S, i.drawImage(l, I + q, J + q, _, R), i.restore(), Z && Z(d);
1833
- }, l.src = N;
1832
+ i.globalAlpha = B, i.drawImage(l, I + j, J + j, _, R), i.restore(), Z && Z(h);
1833
+ }, l.src = q;
1834
1834
  }
1835
1835
  }, M.prototype.render = function() {
1836
- var b, g = +this.props.size + 2 * +this.props.quietZone;
1837
- return O.createElement("canvas", { id: (b = this.props.id) !== null && b !== void 0 ? b : "react-qrcode-logo", height: g, width: g, style: X({ height: g + "px", width: g + "px" }, this.props.style), ref: this.canvasRef });
1836
+ var x, d = +this.props.size + 2 * +this.props.quietZone;
1837
+ return O.createElement("canvas", { id: (x = this.props.id) !== null && x !== void 0 ? x : "react-qrcode-logo", height: d, width: d, style: X({ height: d + "px", width: d + "px" }, this.props.style), ref: this.canvasRef });
1838
1838
  }, M.defaultProps = {
1839
1839
  value: "https://reactjs.org/",
1840
1840
  ecLevel: "M",
@@ -1852,8 +1852,8 @@ function Hr() {
1852
1852
  );
1853
1853
  return Te.QRCode = Y, Te;
1854
1854
  }
1855
- var St = Hr();
1856
- const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v-justify-center", children: [
1855
+ var Nt = Hr();
1856
+ const Ot = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v-justify-center", children: [
1857
1857
  /* @__PURE__ */ P(
1858
1858
  "svg",
1859
1859
  {
@@ -1906,82 +1906,78 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
1906
1906
  }
1907
1907
  ` })
1908
1908
  ] }), Kr = ({
1909
- title: W,
1909
+ title: G,
1910
1910
  containerClass: X
1911
1911
  }) => {
1912
- const ie = (/* @__PURE__ */ new Date()).getFullYear(), [V, O] = ge(""), [Y, $] = ge(""), [M, b] = ge(!1), {
1913
- appId: g,
1914
- apiUrl: A,
1915
- clientId: C,
1916
- codeChallenge: F,
1917
- authRequestId: E,
1918
- authRequestIdExpires: U,
1919
- setIsAuthenticating: N,
1920
- isAuthenticating: S,
1921
- token: Z,
1922
- setAuthError: Q
1923
- } = nt(Ve);
1924
- Qe(() => {
1925
- if (F && E && U) {
1926
- const o = U.getTime() / 1e3, p = `c=${F},r=${E},e=${o},a=${C}`;
1927
- $(p);
1928
- }
1929
- }, [C, E, U, F]);
1930
- const z = Ge(async () => {
1931
- b(!0);
1912
+ const ie = (/* @__PURE__ */ new Date()).getFullYear(), [W, O] = ge(""), [Y, U] = ge(""), [M, x] = ge(!1), {
1913
+ apiUrl: d,
1914
+ clientId: A,
1915
+ codeChallenge: C,
1916
+ authRequestId: $,
1917
+ authRequestIdExpires: D,
1918
+ setIsAuthenticating: H,
1919
+ isAuthenticating: q,
1920
+ token: B,
1921
+ setAuthError: Z
1922
+ } = Ke(Oe);
1923
+ Ge(() => {
1924
+ if (C && $ && D) {
1925
+ const E = D.getTime() / 1e3, o = `c=${C},r=${$},e=${E},a=${A}`;
1926
+ U(o);
1927
+ }
1928
+ }, [A, $, D, C]);
1929
+ const V = Ve(async () => {
1930
+ x(!0);
1932
1931
  try {
1933
- if (!V) {
1934
- const p = "Invalid login. Email or Abaxx ID is required.";
1935
- window.alert(p), console.error(p);
1932
+ if (!W) {
1933
+ const o = "Invalid login. Email or Abaxx ID is required.";
1934
+ window.alert(o), console.error(o);
1936
1935
  return;
1937
1936
  }
1938
- const o = await H({
1939
- alias: V,
1940
- code_challenge: F,
1941
- request_id: E
1937
+ const E = await z({
1938
+ alias: W,
1939
+ code_challenge: C,
1940
+ request_id: $
1942
1941
  });
1943
- if (o != null && o.ok)
1944
- N(!0);
1945
- else if (!(o != null && o.ok) && (o == null ? void 0 : o.message) === "Unable to request auth.") {
1946
- const p = "Invalid login. Please use your existing Email or Abaxx ID.";
1947
- window.alert(p), console.error(p);
1942
+ if (E != null && E.ok)
1943
+ H(!0);
1944
+ else if (!(E != null && E.ok) && (E == null ? void 0 : E.message) === "Unable to request auth.") {
1945
+ const o = "Invalid login. Please use your existing Email or Abaxx ID.";
1946
+ window.alert(o), console.error(o);
1948
1947
  }
1949
- } catch (o) {
1950
- const p = "Something went wrong. Please try again later.";
1951
- window.alert(p), console.error(p), console.log(o);
1948
+ } catch (E) {
1949
+ const o = "Something went wrong. Please try again later.";
1950
+ window.alert(o), console.error(o), console.log(E);
1952
1951
  }
1953
- b(!1);
1954
- }, [F, E, V, b, N]), H = Ge(
1955
- async (o) => {
1952
+ x(!1);
1953
+ }, [C, $, W, x, H]), z = Ve(
1954
+ async (E) => {
1956
1955
  try {
1957
- const p = await fetch(
1958
- `${A}/v-plus/auth/req?cid=${C}`,
1956
+ const o = await fetch(
1957
+ `${d}/v-plus/auth/req?cid=${A}`,
1959
1958
  {
1960
1959
  method: "POST",
1961
1960
  headers: {
1962
1961
  Accept: "application/json",
1963
1962
  "Content-Type": "application/json"
1964
1963
  },
1965
- body: JSON.stringify({
1966
- ...o,
1967
- appId: g
1968
- })
1964
+ body: JSON.stringify(E)
1969
1965
  }
1970
- ), v = await p.json();
1971
- if (!p.ok || v.ok === !1) {
1972
- Q(
1973
- `Auth request failed: ${v.message || p.status}`
1966
+ ), b = await o.json();
1967
+ if (!o.ok || b.ok === !1) {
1968
+ Z(
1969
+ `Auth request failed: ${b.message || o.status}`
1974
1970
  );
1975
1971
  return;
1976
1972
  }
1977
- return v;
1978
- } catch (p) {
1979
- Q(`Auth request failed: ${p}`);
1973
+ return b;
1974
+ } catch (o) {
1975
+ Z(`Auth request failed: ${o}`);
1980
1976
  }
1981
1977
  },
1982
- [A, C, Q]
1978
+ [d, A, Z]
1983
1979
  );
1984
- return /* @__PURE__ */ P(He, { children: /* @__PURE__ */ he(
1980
+ return /* @__PURE__ */ P(Qe, { children: /* @__PURE__ */ he(
1985
1981
  "div",
1986
1982
  {
1987
1983
  className: `v-auth-container v-grid v-grid-responsive v-h-screen v-bg-white ${X}`,
@@ -2013,9 +2009,9 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2013
2009
  height: 56
2014
2010
  }
2015
2011
  ),
2016
- !Z && !S ? /* @__PURE__ */ he(He, { children: [
2017
- /* @__PURE__ */ P("div", { className: "v-mb-8", children: E && Y ? /* @__PURE__ */ P(
2018
- St.QRCode,
2012
+ !B && !q ? /* @__PURE__ */ he(Qe, { children: [
2013
+ /* @__PURE__ */ P("div", { className: "v-mb-8", children: $ && Y ? /* @__PURE__ */ P(
2014
+ Nt.QRCode,
2019
2015
  {
2020
2016
  value: Y,
2021
2017
  size: 130,
@@ -2026,8 +2022,8 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2026
2022
  logoHeight: 20,
2027
2023
  quietZone: 0
2028
2024
  }
2029
- ) : /* @__PURE__ */ P("div", { className: "v-w-130 v-h-130 v-flex v-items-center v-justify-center", children: /* @__PURE__ */ P(Nt, {}) }) }),
2030
- /* @__PURE__ */ P("h1", { className: "v-text-black v-text-xl v-tracking-wide v-mb-4 v-font-medium", children: W || "Verifier+ Login" }),
2025
+ ) : /* @__PURE__ */ P("div", { className: "v-w-130 v-h-130 v-flex v-items-center v-justify-center", children: /* @__PURE__ */ P(Ot, {}) }) }),
2026
+ /* @__PURE__ */ P("h1", { className: "v-text-black v-text-xl v-tracking-wide v-mb-4 v-font-medium", children: G || "Verifier+ Login" }),
2031
2027
  /* @__PURE__ */ P("p", { className: "v-text-gray-400 v-font-semibold v-mb-6 v-text-sm", children: "Sign in using the latest version of Verifier+ or enter Abaxx ID" }),
2032
2028
  /* @__PURE__ */ he("div", { className: "v-min-w-300", children: [
2033
2029
  /* @__PURE__ */ P(
@@ -2036,8 +2032,8 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2036
2032
  type: "text",
2037
2033
  className: "v-input v-w-full v-h-10 v-mb-4 v-rounded v-bg-transparent v-text-gray-600 v-border-gray-400 v-border v-px-2 v-text-center",
2038
2034
  placeholder: "Enter Email or Abaxx ID",
2039
- value: V,
2040
- onChange: (o) => O(o.target.value),
2035
+ value: W,
2036
+ onChange: (E) => O(E.target.value),
2041
2037
  disabled: M
2042
2038
  }
2043
2039
  ),
@@ -2045,8 +2041,8 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2045
2041
  "button",
2046
2042
  {
2047
2043
  className: "v-button v-h-10 v-w-full v-bg-red v-text-white v-text-base v-font-semibold v-flex v-items-center v-gap-2 v-justify-center",
2048
- disabled: M || !V || !E,
2049
- onClick: z,
2044
+ disabled: M || !W || !$,
2045
+ onClick: V,
2050
2046
  children: [
2051
2047
  M && /* @__PURE__ */ P(
2052
2048
  "svg",
@@ -2086,7 +2082,7 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2086
2082
  children: /* @__PURE__ */ P("path", { d: "M20 6 9 17l-5-5" })
2087
2083
  }
2088
2084
  ),
2089
- Z ? /* @__PURE__ */ P("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Login success!" }) }) : /* @__PURE__ */ he(He, { children: [
2085
+ B ? /* @__PURE__ */ P("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Login success!" }) }) : /* @__PURE__ */ he(Qe, { children: [
2090
2086
  /* @__PURE__ */ P("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Authorization requested!" }) }),
2091
2087
  /* @__PURE__ */ P("div", { className: "v-text-center v-rounded v-bg-slate-100 v-text-slate-800 v-p-3 v-my-4", children: /* @__PURE__ */ P("span", { children: "Please check the Abaxx Verifier App" }) })
2092
2088
  ] })
@@ -2104,38 +2100,38 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2104
2100
  }
2105
2101
  ) });
2106
2102
  }, Wr = ({
2107
- size: W = 130,
2103
+ size: G = 130,
2108
2104
  qrColor: X = "#e60100",
2109
2105
  logoImage: ie = "https://content.abaxx.com/assets/static/qr-logo.png",
2110
- logoWidth: V = 40,
2106
+ logoWidth: W = 40,
2111
2107
  logoHeight: O = 20,
2112
2108
  quietZone: Y = 0,
2113
- containerClass: $ = "",
2109
+ containerClass: U = "",
2114
2110
  showStatus: M = !0,
2115
- checkmarkColor: b = "#c40808"
2111
+ checkmarkColor: x = "#c40808"
2116
2112
  }) => {
2117
- const [g, A] = ge(""), {
2113
+ const [d, A] = ge(""), {
2118
2114
  clientId: C,
2119
- codeChallenge: F,
2120
- authRequestId: E,
2121
- authRequestIdExpires: U,
2122
- isAuthenticating: N,
2123
- token: S
2124
- } = nt(Ve);
2125
- return Qe(() => {
2126
- if (F && E && U) {
2127
- const Z = U.getTime() / 1e3, Q = `c=${F},r=${E},e=${Z},a=${C}`;
2128
- A(Q);
2129
- }
2130
- }, [C, E, U, F]), /* @__PURE__ */ P("div", { className: `v-auth-qr-container ${$}`, children: !S && !N ? /* @__PURE__ */ P("div", { className: "v-qr-wrapper", children: E && g ? /* @__PURE__ */ P(
2131
- St.QRCode,
2115
+ codeChallenge: $,
2116
+ authRequestId: D,
2117
+ authRequestIdExpires: H,
2118
+ isAuthenticating: q,
2119
+ token: B
2120
+ } = Ke(Oe);
2121
+ return Ge(() => {
2122
+ if ($ && D && H) {
2123
+ const Z = H.getTime() / 1e3, V = `c=${$},r=${D},e=${Z},a=${C}`;
2124
+ A(V);
2125
+ }
2126
+ }, [C, D, H, $]), /* @__PURE__ */ P("div", { className: `v-auth-qr-container ${U}`, children: !B && !q ? /* @__PURE__ */ P("div", { className: "v-qr-wrapper", children: D && d ? /* @__PURE__ */ P(
2127
+ Nt.QRCode,
2132
2128
  {
2133
- value: g,
2134
- size: W,
2129
+ value: d,
2130
+ size: G,
2135
2131
  fgColor: X,
2136
2132
  qrStyle: "dots",
2137
2133
  logoImage: ie,
2138
- logoWidth: V,
2134
+ logoWidth: W,
2139
2135
  logoHeight: O,
2140
2136
  quietZone: Y
2141
2137
  }
@@ -2143,8 +2139,8 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2143
2139
  "div",
2144
2140
  {
2145
2141
  className: "v-flex v-items-center v-justify-center",
2146
- style: { width: W, height: W },
2147
- children: /* @__PURE__ */ P(Nt, {})
2142
+ style: { width: G, height: G },
2143
+ children: /* @__PURE__ */ P(Ot, {})
2148
2144
  }
2149
2145
  ) }) : M ? /* @__PURE__ */ he("div", { className: "v-fade-in v-flex v-items-center v-flex-col", children: [
2150
2146
  /* @__PURE__ */ P(
@@ -2155,128 +2151,124 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2155
2151
  height: "24",
2156
2152
  viewBox: "0 0 24 24",
2157
2153
  fill: "none",
2158
- stroke: b,
2154
+ stroke: x,
2159
2155
  strokeWidth: "2",
2160
2156
  strokeLinecap: "round",
2161
2157
  strokeLinejoin: "round",
2162
2158
  className: "v-mb-5",
2163
- style: { width: W * 0.6, height: W * 0.6 },
2159
+ style: { width: G * 0.6, height: G * 0.6 },
2164
2160
  children: /* @__PURE__ */ P("path", { d: "M20 6 9 17l-5-5" })
2165
2161
  }
2166
2162
  ),
2167
- S ? /* @__PURE__ */ P("div", { className: "v-text-lg v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Login success!" }) }) : /* @__PURE__ */ he(He, { children: [
2163
+ B ? /* @__PURE__ */ P("div", { className: "v-text-lg v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Login success!" }) }) : /* @__PURE__ */ he(Qe, { children: [
2168
2164
  /* @__PURE__ */ P("div", { className: "v-text-lg v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Authorization requested!" }) }),
2169
2165
  /* @__PURE__ */ P("div", { className: "v-text-center v-rounded v-bg-slate-100 v-text-slate-800 v-p-3 v-my-4", children: /* @__PURE__ */ P("span", { children: "Please check the Abaxx Verifier App" }) })
2170
2166
  ] })
2171
2167
  ] }) : null });
2172
2168
  }, Zr = ({
2173
- inputPlaceholder: W = "Enter Email or Abaxx ID",
2169
+ inputPlaceholder: G = "Enter Email or Abaxx ID",
2174
2170
  buttonText: X = "Sign In",
2175
2171
  inputHeight: ie = "v-h-10",
2176
- inputWidth: V = "v-w-full",
2172
+ inputWidth: W = "v-w-full",
2177
2173
  inputTextColor: O = "v-text-gray-600",
2178
2174
  inputBorderColor: Y = "v-border-gray-400",
2179
- inputBackgroundColor: $ = "v-bg-transparent",
2175
+ inputBackgroundColor: U = "v-bg-transparent",
2180
2176
  buttonHeight: M = "v-h-10",
2181
- buttonWidth: b = "v-w-full",
2182
- buttonBackgroundColor: g = "v-bg-red",
2177
+ buttonWidth: x = "v-w-full",
2178
+ buttonBackgroundColor: d = "v-bg-red",
2183
2179
  buttonTextColor: A = "v-text-white",
2184
2180
  containerClass: C = "",
2185
- checkmarkColor: F = "#c40808"
2181
+ checkmarkColor: $ = "#c40808"
2186
2182
  }) => {
2187
- const [E, U] = ge(""), [N, S] = ge(!1), {
2188
- appId: Z,
2189
- apiUrl: Q,
2190
- clientId: z,
2191
- codeChallenge: H,
2192
- authRequestId: o,
2193
- setIsAuthenticating: p,
2194
- setAuthError: v,
2195
- isAuthenticating: x,
2196
- token: f
2197
- } = nt(Ve), w = Ge(async () => {
2198
- S(!0);
2183
+ const [D, H] = ge(""), [q, B] = ge(!1), {
2184
+ apiUrl: Z,
2185
+ clientId: V,
2186
+ codeChallenge: z,
2187
+ authRequestId: E,
2188
+ setIsAuthenticating: o,
2189
+ setAuthError: b,
2190
+ isAuthenticating: c,
2191
+ token: y
2192
+ } = Ke(Oe), f = Ve(async () => {
2193
+ B(!0);
2199
2194
  try {
2200
- if (!E) {
2201
- const h = "Invalid login. Email or Abaxx ID is required.";
2202
- window.alert(h), console.error(h);
2195
+ if (!D) {
2196
+ const t = "Invalid login. Email or Abaxx ID is required.";
2197
+ window.alert(t), console.error(t);
2203
2198
  return;
2204
2199
  }
2205
- const t = await n({
2206
- alias: E,
2207
- code_challenge: H,
2208
- request_id: o
2200
+ const n = await w({
2201
+ alias: D,
2202
+ code_challenge: z,
2203
+ request_id: E
2209
2204
  });
2210
- if (t != null && t.ok)
2211
- p(!0);
2212
- else if (!(t != null && t.ok) && (t == null ? void 0 : t.message) === "Unable to request auth.") {
2213
- const h = "Invalid login. Please use your existing Email or Abaxx ID.";
2214
- window.alert(h), console.error(h);
2205
+ if (n != null && n.ok)
2206
+ o(!0);
2207
+ else if (!(n != null && n.ok) && (n == null ? void 0 : n.message) === "Unable to request auth.") {
2208
+ const t = "Invalid login. Please use your existing Email or Abaxx ID.";
2209
+ window.alert(t), console.error(t);
2215
2210
  }
2216
- } catch (t) {
2217
- const h = "Something went wrong. Please try again later.";
2218
- window.alert(h), console.error(h), console.log(t);
2211
+ } catch (n) {
2212
+ const t = "Something went wrong. Please try again later.";
2213
+ window.alert(t), console.error(t), console.log(n);
2219
2214
  }
2220
- S(!1);
2221
- }, [H, o, E, S, p]), n = Ge(
2222
- async (t) => {
2215
+ B(!1);
2216
+ }, [z, E, D, B, o]), w = Ve(
2217
+ async (n) => {
2223
2218
  try {
2224
- const h = await fetch(
2225
- `${Q}/v-plus/auth/req?cid=${z}`,
2219
+ const t = await fetch(
2220
+ `${Z}/v-plus/auth/req?cid=${V}`,
2226
2221
  {
2227
2222
  method: "POST",
2228
2223
  headers: {
2229
2224
  Accept: "application/json",
2230
2225
  "Content-Type": "application/json"
2231
2226
  },
2232
- body: JSON.stringify({
2233
- ...t,
2234
- appId: Z
2235
- })
2227
+ body: JSON.stringify(n)
2236
2228
  }
2237
- ), i = await h.json();
2238
- if (!h.ok || i.ok === !1) {
2239
- v(
2240
- `Auth request failed: ${i.message || h.status}`
2229
+ ), g = await t.json();
2230
+ if (!t.ok || g.ok === !1) {
2231
+ b(
2232
+ `Auth request failed: ${g.message || t.status}`
2241
2233
  );
2242
2234
  return;
2243
2235
  }
2244
- return i;
2245
- } catch (h) {
2246
- v(`Auth request failed: ${h}`);
2236
+ return g;
2237
+ } catch (t) {
2238
+ b(`Auth request failed: ${t}`);
2247
2239
  }
2248
2240
  },
2249
- [Q, z, Z, v]
2241
+ [Z, V, b]
2250
2242
  );
2251
- return /* @__PURE__ */ P("div", { className: `v-auth-email-container ${C}`, children: !f && !x ? /* @__PURE__ */ he("div", { className: "v-min-w-300", children: [
2243
+ return /* @__PURE__ */ P("div", { className: `v-auth-email-container ${C}`, children: !y && !c ? /* @__PURE__ */ he("div", { className: "v-min-w-300", children: [
2252
2244
  /* @__PURE__ */ P(
2253
2245
  "input",
2254
2246
  {
2255
2247
  type: "text",
2256
- className: `v-input ${V} ${ie} v-mb-4 v-rounded v-border v-px-2 v-text-center`,
2248
+ className: `v-input ${W} ${ie} v-mb-4 v-rounded v-border v-px-2 v-text-center`,
2257
2249
  style: {
2258
- backgroundColor: $.startsWith("#") ? $ : $ === "v-bg-transparent" ? "transparent" : $ === "v-bg-white" ? "#ffffff" : "transparent",
2250
+ backgroundColor: U.startsWith("#") ? U : U === "v-bg-transparent" ? "transparent" : U === "v-bg-white" ? "#ffffff" : "transparent",
2259
2251
  color: O.startsWith("#") ? O : O === "v-text-gray-600" ? "#6b7280" : O === "v-text-black" ? "#000000" : O === "v-text-white" ? "#ffffff" : "#6b7280",
2260
2252
  borderColor: Y.startsWith("#") ? Y : Y === "v-border-gray-400" ? "#9ca3af" : Y === "v-border-blue-400" ? "#60a5fa" : "#9ca3af"
2261
2253
  },
2262
- placeholder: W,
2263
- value: E,
2264
- onChange: (t) => U(t.target.value),
2265
- disabled: N
2254
+ placeholder: G,
2255
+ value: D,
2256
+ onChange: (n) => H(n.target.value),
2257
+ disabled: q
2266
2258
  }
2267
2259
  ),
2268
2260
  /* @__PURE__ */ he(
2269
2261
  "button",
2270
2262
  {
2271
- className: `v-button ${M} ${b} v-text-base v-font-semibold v-flex v-items-center v-gap-2 v-justify-center`,
2263
+ className: `v-button ${M} ${x} v-text-base v-font-semibold v-flex v-items-center v-gap-2 v-justify-center`,
2272
2264
  style: {
2273
- backgroundColor: g.startsWith("#") ? g : g === "v-bg-blue" ? "#3b82f6" : g === "v-bg-red" ? "#ef4444" : g === "v-bg-green" ? "#10b981" : g === "v-bg-purple" ? "#8b5cf6" : g === "v-bg-yellow" ? "#f59e0b" : g === "v-bg-gray" ? "#6b7280" : "#ef4444",
2265
+ backgroundColor: d.startsWith("#") ? d : d === "v-bg-blue" ? "#3b82f6" : d === "v-bg-red" ? "#ef4444" : d === "v-bg-green" ? "#10b981" : d === "v-bg-purple" ? "#8b5cf6" : d === "v-bg-yellow" ? "#f59e0b" : d === "v-bg-gray" ? "#6b7280" : "#ef4444",
2274
2266
  color: A.startsWith("#") ? A : A === "v-text-white" ? "#ffffff" : A === "v-text-black" ? "#000000" : A === "v-text-gray-600" ? "#6b7280" : "#ffffff"
2275
2267
  },
2276
- disabled: N || !E || !o,
2277
- onClick: w,
2268
+ disabled: q || !D || !E,
2269
+ onClick: f,
2278
2270
  children: [
2279
- N && /* @__PURE__ */ P(
2271
+ q && /* @__PURE__ */ P(
2280
2272
  "svg",
2281
2273
  {
2282
2274
  xmlns: "http://www.w3.org/2000/svg",
@@ -2284,7 +2276,7 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2284
2276
  height: "24",
2285
2277
  viewBox: "0 0 24 24",
2286
2278
  fill: "none",
2287
- stroke: F,
2279
+ stroke: $,
2288
2280
  strokeWidth: "2",
2289
2281
  strokeLinecap: "round",
2290
2282
  strokeLinejoin: "round",
@@ -2305,7 +2297,7 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2305
2297
  height: "24",
2306
2298
  viewBox: "0 0 24 24",
2307
2299
  fill: "none",
2308
- stroke: F,
2300
+ stroke: $,
2309
2301
  strokeWidth: "2",
2310
2302
  strokeLinecap: "round",
2311
2303
  strokeLinejoin: "round",
@@ -2313,17 +2305,26 @@ const Nt = () => /* @__PURE__ */ he("div", { className: "v-flex v-items-center v
2313
2305
  children: /* @__PURE__ */ P("path", { d: "M20 6 9 17l-5-5" })
2314
2306
  }
2315
2307
  ),
2316
- f ? /* @__PURE__ */ P("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Login success!" }) }) : /* @__PURE__ */ he(He, { children: [
2308
+ y ? /* @__PURE__ */ P("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Login success!" }) }) : /* @__PURE__ */ he(Qe, { children: [
2317
2309
  /* @__PURE__ */ P("div", { className: "v-text-2xl v-mb-3 v-text-black", children: /* @__PURE__ */ P("span", { children: "Authorization requested!" }) }),
2318
2310
  /* @__PURE__ */ P("div", { className: "v-text-center v-rounded v-bg-slate-100 v-text-slate-800 v-p-3 v-my-4", children: /* @__PURE__ */ P("span", { children: "Please check the Abaxx Verifier App" }) })
2319
2311
  ] })
2320
2312
  ] }) });
2321
2313
  };
2314
+ function Jr() {
2315
+ const { resetState: G } = Ke(Oe);
2316
+ return G;
2317
+ }
2318
+ function Yr(G) {
2319
+ G.resetState();
2320
+ }
2322
2321
  export {
2323
- Ve as VContext,
2322
+ Oe as VContext,
2324
2323
  qr as VContextProvider,
2325
2324
  Kr as VerifierAuth,
2326
2325
  Zr as VerifierAuthEmail,
2327
2326
  Wr as VerifierAuthQr,
2328
- Vr as VerifierProvider
2327
+ Vr as VerifierProvider,
2328
+ Yr as resetVerifierStateUnsafe,
2329
+ Jr as useVerifierReset
2329
2330
  };