@danidoble/webserial 4.1.6 → 4.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/webserial.js CHANGED
@@ -1,29 +1,29 @@
1
1
  var fa = Object.defineProperty;
2
- var Kn = (r) => {
2
+ var Wn = (r) => {
3
3
  throw TypeError(r);
4
4
  };
5
5
  var ga = (r, n, t) => n in r ? fa(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t;
6
- var rt = (r, n, t) => ga(r, typeof n != "symbol" ? n + "" : n, t), $e = (r, n, t) => n.has(r) || Kn("Cannot " + t);
7
- var R = (r, n, t) => ($e(r, n, "read from private field"), t ? t.call(r) : n.get(r)), J = (r, n, t) => n.has(r) ? Kn("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(r) : n.set(r, t), M = (r, n, t, e) => ($e(r, n, "write to private field"), e ? e.call(r, t) : n.set(r, t), t), o = (r, n, t) => ($e(r, n, "access private method"), t);
6
+ var rt = (r, n, t) => ga(r, typeof n != "symbol" ? n + "" : n, t), $e = (r, n, t) => n.has(r) || Wn("Cannot " + t);
7
+ var R = (r, n, t) => ($e(r, n, "read from private field"), t ? t.call(r) : n.get(r)), J = (r, n, t) => n.has(r) ? Wn("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(r) : n.set(r, t), M = (r, n, t, e) => ($e(r, n, "write to private field"), e ? e.call(r, t) : n.set(r, t), t), o = (r, n, t) => ($e(r, n, "access private method"), t);
8
8
  function Ct(r = 100) {
9
9
  return new Promise((n) => setTimeout(() => n(), r));
10
10
  }
11
11
  function ba() {
12
12
  return "serial" in navigator;
13
13
  }
14
- function Wn() {
14
+ function zn() {
15
15
  return "geolocation" in navigator;
16
16
  }
17
17
  function ya() {
18
18
  return "crypto" in window;
19
19
  }
20
- function rn(r = 1) {
20
+ function sn(r = 1) {
21
21
  return r * 1e3;
22
22
  }
23
- function Tt(r) {
23
+ function St(r) {
24
24
  return r == null || r === "";
25
25
  }
26
- var ot, ht, d, Ci, Ti, C, an, B, N, ye, P, on, Zt;
26
+ var ot, ht, d, Ci, Ti, C, on, B, N, me, P, cn, Yt;
27
27
  const u = class u {
28
28
  static status(n = null) {
29
29
  var e, i;
@@ -84,12 +84,12 @@ const u = class u {
84
84
  }
85
85
  static gateInactive(n = null) {
86
86
  var t;
87
- if (!o(t = u, d, C).call(t, n) || !o(this, d, an).call(this)) return !1;
87
+ if (!o(t = u, d, C).call(t, n) || !o(this, d, on).call(this)) return !1;
88
88
  o(this, d, P).call(this, ["0", "7", "5", "5", "5"]);
89
89
  }
90
90
  static gateConfigured(n = null) {
91
91
  var t;
92
- if (!o(t = u, d, C).call(t, n) || !o(this, d, an).call(this)) return !1;
92
+ if (!o(t = u, d, C).call(t, n) || !o(this, d, on).call(this)) return !1;
93
93
  o(this, d, P).call(this, ["0", "6"]);
94
94
  }
95
95
  static keyPressed(n = null) {
@@ -100,7 +100,7 @@ const u = class u {
100
100
  }
101
101
  static doorOpened(n = null) {
102
102
  var i, s;
103
- if (!o(i = u, d, C).call(i, n) || !o(this, d, ye).call(this)) return !1;
103
+ if (!o(i = u, d, C).call(i, n) || !o(this, d, me).call(this)) return !1;
104
104
  let t = [];
105
105
  const e = (128 + R(u, ht)).toString(16);
106
106
  switch (R(u, ot)) {
@@ -115,7 +115,7 @@ const u = class u {
115
115
  }
116
116
  static doorClosed(n = null) {
117
117
  var i, s;
118
- if (!o(i = u, d, C).call(i, n) || !o(this, d, ye).call(this)) return !1;
118
+ if (!o(i = u, d, C).call(i, n) || !o(this, d, me).call(this)) return !1;
119
119
  let t = [];
120
120
  const e = (128 + R(u, ht)).toString(16);
121
121
  switch (R(u, ot)) {
@@ -154,7 +154,7 @@ const u = class u {
154
154
  }
155
155
  static currentTemperature(n = null) {
156
156
  var i, s, a;
157
- if (!o(i = u, d, C).call(i, n) || !o(s = u, d, ye).call(s)) return !1;
157
+ if (!o(i = u, d, C).call(i, n) || !o(s = u, d, me).call(s)) return !1;
158
158
  let t = [];
159
159
  const e = (128 + R(u, ht)).toString(16);
160
160
  switch (R(u, ot)) {
@@ -315,37 +315,37 @@ const u = class u {
315
315
  static coinInsertedBox(n = null, t = null) {
316
316
  var s, a, c, l;
317
317
  if (!o(s = u, d, C).call(s, n) || !o(a = u, d, B).call(a)) return !1;
318
- const e = ["40", "41", "42", "43", "44", "45"], i = o(c = u, d, on).call(c, e, t);
318
+ const e = ["40", "41", "42", "43", "44", "45"], i = o(c = u, d, cn).call(c, e, t);
319
319
  o(l = u, d, P).call(l, ["2", "A0", i]);
320
320
  }
321
321
  static coinInsertedTube(n = null, t = null) {
322
322
  var s, a, c, l;
323
323
  if (!o(s = u, d, C).call(s, n) || !o(a = u, d, B).call(a)) return !1;
324
- const e = ["50", "51", "52", "53", "54", "55"], i = o(c = u, d, on).call(c, e, t);
324
+ const e = ["50", "51", "52", "53", "54", "55"], i = o(c = u, d, cn).call(c, e, t);
325
325
  o(l = u, d, P).call(l, ["2", "A0", i]);
326
326
  }
327
327
  static banknoteInsertedStacker(n = null, t = null) {
328
328
  var s, a, c, l;
329
329
  if (!o(s = u, d, C).call(s, n) || !o(a = u, d, B).call(a)) return !1;
330
- const e = ["80", "81", "82", "83", "84"], i = o(c = u, d, Zt).call(c, e, t);
330
+ const e = ["80", "81", "82", "83", "84"], i = o(c = u, d, Yt).call(c, e, t);
331
331
  o(l = u, d, P).call(l, ["2", "B0", i]);
332
332
  }
333
333
  static banknoteInsertedEscrow(n = null, t = null) {
334
334
  var s, a, c, l;
335
335
  if (!o(s = u, d, C).call(s, n) || !o(a = u, d, B).call(a)) return !1;
336
- const e = ["90", "91", "92", "93", "94"], i = o(c = u, d, Zt).call(c, e, t);
336
+ const e = ["90", "91", "92", "93", "94"], i = o(c = u, d, Yt).call(c, e, t);
337
337
  o(l = u, d, P).call(l, ["2", "B0", i]);
338
338
  }
339
339
  static banknoteEjected(n = null, t = null) {
340
340
  var s, a, c, l;
341
341
  if (!o(s = u, d, C).call(s, n) || !o(a = u, d, B).call(a)) return !1;
342
- const e = ["A0", "A1", "A2", "A3", "A4"], i = o(c = u, d, Zt).call(c, e, t);
342
+ const e = ["A0", "A1", "A2", "A3", "A4"], i = o(c = u, d, Yt).call(c, e, t);
343
343
  o(l = u, d, P).call(l, ["2", "B0", i]);
344
344
  }
345
345
  static banknoteInsertedRecycler(n = null, t = null) {
346
346
  var s, a, c, l;
347
347
  if (!o(s = u, d, C).call(s, n) || !o(a = u, d, B).call(a)) return !1;
348
- const e = ["B0", "B1", "B2", "B3", "B4"], i = o(c = u, d, Zt).call(c, e, t);
348
+ const e = ["B0", "B1", "B2", "B3", "B4"], i = o(c = u, d, Yt).call(c, e, t);
349
349
  o(l = u, d, P).call(l, ["2", "B0", i]);
350
350
  }
351
351
  static banknoteTaken(n = null) {
@@ -661,13 +661,13 @@ ot = new WeakMap(), ht = new WeakMap(), d = new WeakSet(), Ci = function() {
661
661
  if (u.enable === !1) throw new Error("Emulator is disabled");
662
662
  return u.enable;
663
663
  }, Ti = function(n) {
664
- if (typeof n != "object" || !(n instanceof Lt))
664
+ if (typeof n != "object" || !(n instanceof Vt))
665
665
  throw new Error(`Type ${n.typeDevice} is not supported`);
666
666
  return u.instance = n, M(u, ot, n.typeDevice), M(u, ht, n.deviceNumber), !0;
667
667
  }, C = function(n = null) {
668
668
  var t, e;
669
669
  return !o(t = u, d, Ci).call(t) || n === null && u.instance === null ? !1 : (u.instance === null && o(e = u, d, Ti).call(e, n), !0);
670
- }, an = function() {
670
+ }, on = function() {
671
671
  if (R(u, ot) !== "locker") throw new Error("This function is only available for Locker devices");
672
672
  return !0;
673
673
  }, B = function() {
@@ -677,12 +677,12 @@ ot = new WeakMap(), ht = new WeakMap(), d = new WeakSet(), Ci = function() {
677
677
  }, N = function() {
678
678
  if (R(u, ot) !== "jofemar") throw new Error("This function is only available for Jofemar devices");
679
679
  return !0;
680
- }, ye = function() {
680
+ }, me = function() {
681
681
  if (R(u, ot) === "locker") throw new Error("This function is not available for Locker devices");
682
682
  return !0;
683
683
  }, P = function(n) {
684
684
  u.instance.__emulate({ code: n });
685
- }, on = function(n, t = null) {
685
+ }, cn = function(n, t = null) {
686
686
  let e = n[Math.floor(Math.random() * 5)];
687
687
  if (t !== null && !isNaN(parseFloat(t)))
688
688
  switch (t.toString()) {
@@ -703,7 +703,7 @@ ot = new WeakMap(), ht = new WeakMap(), d = new WeakSet(), Ci = function() {
703
703
  break;
704
704
  }
705
705
  return e;
706
- }, Zt = function(n, t = null) {
706
+ }, Yt = function(n, t = null) {
707
707
  let e = n[Math.floor(Math.random() * 4)];
708
708
  if (t !== null && !isNaN(parseFloat(t)))
709
709
  switch (t.toString()) {
@@ -725,10 +725,10 @@ ot = new WeakMap(), ht = new WeakMap(), d = new WeakSet(), Ci = function() {
725
725
  }
726
726
  return e;
727
727
  }, J(u, d), rt(u, "enable", !1), rt(u, "instance", null), J(u, ot, null), J(u, ht, 1);
728
- let sn = u;
728
+ let an = u;
729
729
  var ma = Object.defineProperty, Si = (r) => {
730
730
  throw TypeError(r);
731
- }, wa = (r, n, t) => n in r ? ma(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t, ae = (r, n, t) => wa(r, typeof n != "symbol" ? n + "" : n, t), va = (r, n, t) => n.has(r) || Si("Cannot " + t), Ea = (r, n, t) => n.has(r) ? Si("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(r) : n.set(r, t), K = (r, n, t) => (va(r, n, "access private method"), t);
731
+ }, wa = (r, n, t) => n in r ? ma(r, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[n] = t, oe = (r, n, t) => wa(r, typeof n != "symbol" ? n + "" : n, t), va = (r, n, t) => n.has(r) || Si("Cannot " + t), Ea = (r, n, t) => n.has(r) ? Si("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(r) : n.set(r, t), H = (r, n, t) => (va(r, n, "access private method"), t);
732
732
  const Q = [];
733
733
  for (let r = 0; r < 256; ++r)
734
734
  Q.push((r + 256).toString(16).slice(1));
@@ -745,31 +745,31 @@ function Ta() {
745
745
  }
746
746
  return Ge(Ca);
747
747
  }
748
- const Sa = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), zn = { randomUUID: Sa };
748
+ const Sa = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Xn = { randomUUID: Sa };
749
749
  function ka(r, n, t) {
750
750
  var e;
751
- if (zn.randomUUID && !r)
752
- return zn.randomUUID();
751
+ if (Xn.randomUUID && !r)
752
+ return Xn.randomUUID();
753
753
  r = r || {};
754
754
  const i = r.random ?? ((e = r.rng) == null ? void 0 : e.call(r)) ?? Ta();
755
755
  if (i.length < 16)
756
756
  throw new Error("Random bytes length must be >= 16");
757
757
  return i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, Pa(i);
758
758
  }
759
- class Xn extends CustomEvent {
759
+ class $n extends CustomEvent {
760
760
  constructor(n, t) {
761
761
  super(n, t);
762
762
  }
763
763
  }
764
764
  class ki extends EventTarget {
765
765
  constructor() {
766
- super(...arguments), ae(this, "__listeners__", {
766
+ super(...arguments), oe(this, "__listeners__", {
767
767
  debug: !1
768
- }), ae(this, "__debug__", !1);
768
+ }), oe(this, "__debug__", !1);
769
769
  }
770
770
  dispatch(n, t = null) {
771
- const e = new Xn(n, { detail: t });
772
- this.dispatchEvent(e), this.__debug__ && this.dispatchEvent(new Xn("debug", { detail: { type: n, data: t } }));
771
+ const e = new $n(n, { detail: t });
772
+ this.dispatchEvent(e), this.__debug__ && this.dispatchEvent(new $n("debug", { detail: { type: n, data: t } }));
773
773
  }
774
774
  dispatchAsync(n, t = null, e = 100) {
775
775
  const i = this;
@@ -793,7 +793,42 @@ class ki extends EventTarget {
793
793
  }));
794
794
  }
795
795
  }
796
- function $n(r = 100) {
796
+ const ln = class L extends ki {
797
+ static typeError(n) {
798
+ const t = new Error();
799
+ throw t.message = `Type ${n} is not supported`, t.name = "DeviceTypeError", t;
800
+ }
801
+ static registerType(n) {
802
+ typeof L.devices[n] > "u" && (L.devices[n] = {});
803
+ }
804
+ static add(n) {
805
+ const t = n.typeDevice;
806
+ typeof L.devices[t] > "u" && (L.devices[t] = {});
807
+ const e = n.uuid;
808
+ if (typeof L.devices[t] > "u" && L.typeError(t), this.instance.dispatch("change", L.devices), L.devices[t][e])
809
+ throw new Error(`Device with id ${e} already exists`);
810
+ return L.devices[t][e] = n, this.instance.dispatch("change", L.devices), Object.keys(L.devices[t]).indexOf(e);
811
+ }
812
+ static get(n, t) {
813
+ return typeof L.devices[n] > "u" && (L.devices[n] = {}), typeof L.devices[n] > "u" && L.typeError(n), L.devices[n][t];
814
+ }
815
+ static getAll(n = null) {
816
+ return n === null ? L.devices : (typeof L.devices[n] > "u" && L.typeError(n), L.devices[n]);
817
+ }
818
+ static getList() {
819
+ return Object.values(L.devices).map((n) => Object.values(n)).flat();
820
+ }
821
+ static getByNumber(n, t) {
822
+ return typeof L.devices[n] > "u" && L.typeError(n), Object.values(L.devices[n]).find((e) => e.deviceNumber === t) ?? null;
823
+ }
824
+ static getCustom(n, t = 1) {
825
+ return typeof L.devices[n] > "u" && L.typeError(n), Object.values(L.devices[n]).find((e) => e.deviceNumber === t) ?? null;
826
+ }
827
+ };
828
+ oe(ln, "instance"), oe(ln, "devices", {});
829
+ let Tt = ln;
830
+ Tt.instance || (Tt.instance = new Tt());
831
+ function Gn(r = 100) {
797
832
  return new Promise(
798
833
  (n) => setTimeout(() => n(), r)
799
834
  );
@@ -809,7 +844,7 @@ const Je = {
809
844
  bufferSize: 32768,
810
845
  flowControl: "none"
811
846
  };
812
- var j, Gn, cn, Rt, xi, Jn, Qn, Zn, Ai, Di, Ri, Ii, Yn, ti, Oi, Ni;
847
+ var j, Qe, hn, It, xi, Jn, Qn, Zn, Ai, Di, Ri, Ii, Yn, ti, Oi, Ni;
813
848
  let Aa = class extends ki {
814
849
  constructor({
815
850
  filters: n = null,
@@ -822,7 +857,7 @@ let Aa = class extends ki {
822
857
  no_device: 1,
823
858
  device_listen_on_channel: 1
824
859
  }) {
825
- if (super(), Ea(this, j), ae(this, "__internal__", {
860
+ if (super(), Ea(this, j), oe(this, "__internal__", {
826
861
  auto_response: !1,
827
862
  device_number: 1,
828
863
  aux_port_connector: 0,
@@ -871,7 +906,7 @@ let Aa = class extends ki {
871
906
  }
872
907
  }), !("serial" in navigator))
873
908
  throw new Error("Web Serial not supported");
874
- n && (this.serialFilters = n), t && (this.serialConfigPort = t), e && K(this, j, Oi).call(this, e), i && ["number", "string"].includes(typeof i) && (this.listenOnChannel = i), K(this, j, Ri).call(this), K(this, j, Ii).call(this);
909
+ n && (this.serialFilters = n), t && (this.serialConfigPort = t), e && H(this, j, Oi).call(this, e), i && ["number", "string"].includes(typeof i) && (this.listenOnChannel = i), H(this, j, Ri).call(this), H(this, j, Ii).call(this);
875
910
  }
876
911
  set listenOnChannel(n) {
877
912
  if (typeof n == "string" && (n = parseInt(n)), isNaN(n) || n < 1 || n > 255)
@@ -922,12 +957,12 @@ let Aa = class extends ki {
922
957
  });
923
958
  }
924
959
  async disconnect(n = null) {
925
- await this.serialDisconnect(), this.__internal__.serial.connected = !1, this.__internal__.aux_port_connector = 0, this.dispatch("serial:disconnected", n);
960
+ await this.serialDisconnect(), this.__internal__.serial.connected = !1, this.__internal__.aux_port_connector = 0, this.dispatch("serial:disconnected", n), Tt.instance.dispatch("change");
926
961
  }
927
962
  async connect() {
928
963
  return new Promise((n, t) => {
929
964
  xa() || t("Web Serial not supported"), setTimeout(async () => {
930
- await $n(499), await this.serialConnect(), this.isConnected ? n(`${this.typeDevice} device ${this.deviceNumber} connected`) : t(`${this.typeDevice} device ${this.deviceNumber} not connected`);
965
+ await Gn(499), await this.serialConnect(), this.isConnected ? n(`${this.typeDevice} device ${this.deviceNumber} connected`) : t(`${this.typeDevice} device ${this.deviceNumber} not connected`);
931
966
  }, 1);
932
967
  });
933
968
  }
@@ -976,7 +1011,7 @@ let Aa = class extends ki {
976
1011
  case t.includes(
977
1012
  "this readable stream reader has been released and cannot be used to cancel its previous owner stream"
978
1013
  ):
979
- this.dispatch("serial:need-permission", {});
1014
+ this.dispatch("serial:need-permission", {}), Tt.instance.dispatch("change");
980
1015
  break;
981
1016
  case t.includes("the port is already open."):
982
1017
  case t.includes("failed to open serial port"):
@@ -999,7 +1034,7 @@ let Aa = class extends ki {
999
1034
  case t.includes("the port is already closed."):
1000
1035
  break;
1001
1036
  case t.includes("the device has been lost"):
1002
- this.dispatch("serial:lost", {});
1037
+ this.dispatch("serial:lost", {}), Tt.instance.dispatch("change");
1003
1038
  break;
1004
1039
  case t.includes("navigator.serial is undefined"):
1005
1040
  this.dispatch("serial:unsupported", {});
@@ -1013,7 +1048,7 @@ let Aa = class extends ki {
1013
1048
  async serialConnect() {
1014
1049
  try {
1015
1050
  this.dispatch("serial:connecting", {});
1016
- const n = await K(this, j, xi).call(this);
1051
+ const n = await H(this, j, xi).call(this);
1017
1052
  if (n.length > 0)
1018
1053
  await this.serialPortsSaved(n);
1019
1054
  else {
@@ -1028,21 +1063,21 @@ let Aa = class extends ki {
1028
1063
  await t.open(this.serialConfigPort);
1029
1064
  const e = this;
1030
1065
  t.onconnect = (i) => {
1031
- e.dispatch("serial:connected", i), e.__internal__.serial.queue.length > 0 && e.dispatch("internal:queue", {});
1066
+ e.dispatch("serial:connected", i), Tt.instance.dispatch("change"), e.__internal__.serial.queue.length > 0 && e.dispatch("internal:queue", {});
1032
1067
  }, t.ondisconnect = async () => {
1033
1068
  await e.disconnect();
1034
- }, await $n(this.__internal__.serial.delay_first_connection), this.__internal__.timeout.until_response = setTimeout(async () => {
1069
+ }, await Gn(this.__internal__.serial.delay_first_connection), this.__internal__.timeout.until_response = setTimeout(async () => {
1035
1070
  await e.timeout(e.__internal__.serial.bytes_connection ?? [], "connection:start");
1036
- }, this.__internal__.time.response_connection), this.__internal__.serial.last_action = "connect", await K(this, j, cn).call(this, this.__internal__.serial.bytes_connection ?? []), this.dispatch("serial:sent", {
1071
+ }, this.__internal__.time.response_connection), this.__internal__.serial.last_action = "connect", await H(this, j, hn).call(this, this.__internal__.serial.bytes_connection ?? []), this.dispatch("serial:sent", {
1037
1072
  action: "connect",
1038
1073
  bytes: this.__internal__.serial.bytes_connection
1039
- }), this.__internal__.auto_response && K(this, j, Rt).call(this, ["DD", "DD"], null), await K(this, j, Ai).call(this);
1074
+ }), this.__internal__.auto_response && H(this, j, It).call(this, ["DD", "DD"], null), await H(this, j, Ai).call(this);
1040
1075
  } catch (n) {
1041
1076
  this.serialErrors(n);
1042
1077
  }
1043
1078
  }
1044
1079
  async serialForget() {
1045
- return await K(this, j, Di).call(this);
1080
+ return await H(this, j, Di).call(this);
1046
1081
  }
1047
1082
  decToHex(n) {
1048
1083
  return typeof n == "string" && (n = parseInt(n, 10)), n.toString(16);
@@ -1099,7 +1134,7 @@ let Aa = class extends ki {
1099
1134
  });
1100
1135
  }
1101
1136
  softReload() {
1102
- K(this, j, Ni).call(this), this.dispatch("serial:soft-reload", {});
1137
+ H(this, j, Ni).call(this), this.dispatch("serial:soft-reload", {});
1103
1138
  }
1104
1139
  async sendConnect() {
1105
1140
  if (!this.__internal__.serial.bytes_connection)
@@ -1164,17 +1199,17 @@ let Aa = class extends ki {
1164
1199
  return t.join("");
1165
1200
  }
1166
1201
  };
1167
- j = /* @__PURE__ */ new WeakSet(), Gn = function(r) {
1168
- return !!(r.readable && r.writable);
1169
- }, cn = async function(r) {
1202
+ j = /* @__PURE__ */ new WeakSet(), Qe = function(r) {
1203
+ return !!(r && r.readable && r.writable);
1204
+ }, hn = async function(r) {
1170
1205
  const n = this.__internal__.serial.port;
1171
- if (!n || !n.writable)
1206
+ if (!n || !n.readable || !n.writable)
1172
1207
  throw new Error("The port is closed or is not writable");
1173
1208
  const t = this.stringArrayToUint8Array(r), e = n.writable.getWriter();
1174
1209
  await e.write(t), e.releaseLock();
1175
- }, Rt = function(r = [], n = null) {
1210
+ }, It = function(r = [], n = null) {
1176
1211
  if (r && r.length > 0) {
1177
- this.__internal__.serial.connected || this.dispatch("serial:connected"), this.__internal__.serial.connected = !0, this.__internal__.interval.reconnection && (clearInterval(this.__internal__.interval.reconnection), this.__internal__.interval.reconnection = 0), this.__internal__.timeout.until_response && (clearTimeout(this.__internal__.timeout.until_response), this.__internal__.timeout.until_response = 0);
1212
+ this.__internal__.serial.connected || (this.dispatch("serial:connected"), Tt.instance.dispatch("change")), this.__internal__.serial.connected = !0, this.__internal__.interval.reconnection && (clearInterval(this.__internal__.interval.reconnection), this.__internal__.interval.reconnection = 0), this.__internal__.timeout.until_response && (clearTimeout(this.__internal__.timeout.until_response), this.__internal__.timeout.until_response = 0);
1178
1213
  const t = [];
1179
1214
  for (const e in r)
1180
1215
  t.push(r[e].toString().padStart(2, "0").toLowerCase());
@@ -1198,7 +1233,7 @@ j = /* @__PURE__ */ new WeakSet(), Gn = function(r) {
1198
1233
  return r.length === 0 ? n : n.filter((t) => {
1199
1234
  const e = t.getInfo();
1200
1235
  return r.some((i) => e.usbProductId === i.usbProductId && e.usbVendorId === i.usbVendorId);
1201
- }).filter((t) => !K(this, j, Gn).call(this, t));
1236
+ }).filter((t) => !H(this, j, Qe).call(this, t));
1202
1237
  }, Jn = function(r) {
1203
1238
  if (r) {
1204
1239
  const n = this.__internal__.serial.response.buffer, t = new Uint8Array(n.length + r.byteLength);
@@ -1209,7 +1244,7 @@ j = /* @__PURE__ */ new WeakSet(), Gn = function(r) {
1209
1244
  const r = [];
1210
1245
  for (const n in this.__internal__.serial.response.buffer)
1211
1246
  r.push(this.__internal__.serial.response.buffer[n].toString(16));
1212
- this.__internal__.serial.response.buffer && K(this, j, Rt).call(this, r), this.__internal__.serial.response.buffer = new Uint8Array(0);
1247
+ this.__internal__.serial.response.buffer && H(this, j, It).call(this, r), this.__internal__.serial.response.buffer = new Uint8Array(0);
1213
1248
  }, 400);
1214
1249
  }, Zn = async function() {
1215
1250
  if (this.__internal__.serial.response.length !== null) {
@@ -1217,7 +1252,7 @@ j = /* @__PURE__ */ new WeakSet(), Gn = function(r) {
1217
1252
  const r = [];
1218
1253
  for (const n in this.__internal__.serial.response.buffer)
1219
1254
  r.push(this.__internal__.serial.response.buffer[n].toString(16));
1220
- K(this, j, Rt).call(this, r), this.__internal__.serial.response.buffer = new Uint8Array(0);
1255
+ H(this, j, It).call(this, r), this.__internal__.serial.response.buffer = new Uint8Array(0);
1221
1256
  } else if (this.__internal__.serial.response.length < this.__internal__.serial.response.buffer.length) {
1222
1257
  let r = new Uint8Array(0);
1223
1258
  for (let t = 0; t < this.__internal__.serial.response.length; t++)
@@ -1226,7 +1261,7 @@ j = /* @__PURE__ */ new WeakSet(), Gn = function(r) {
1226
1261
  const t = [];
1227
1262
  for (const e in r)
1228
1263
  t.push(r[e].toString(16));
1229
- K(this, j, Rt).call(this, t), this.__internal__.serial.response.buffer = new Uint8Array(0);
1264
+ H(this, j, It).call(this, t), this.__internal__.serial.response.buffer = new Uint8Array(0);
1230
1265
  return;
1231
1266
  }
1232
1267
  r = new Uint8Array(0);
@@ -1238,7 +1273,7 @@ j = /* @__PURE__ */ new WeakSet(), Gn = function(r) {
1238
1273
  const t = [];
1239
1274
  for (const e in r)
1240
1275
  t.push(r[e].toString(16));
1241
- K(this, j, Rt).call(this, t), this.__internal__.serial.response.buffer = new Uint8Array(0);
1276
+ H(this, j, It).call(this, t), this.__internal__.serial.response.buffer = new Uint8Array(0);
1242
1277
  }
1243
1278
  }
1244
1279
  }
@@ -1257,7 +1292,7 @@ j = /* @__PURE__ */ new WeakSet(), Gn = function(r) {
1257
1292
  n.releaseLock(), this.__internal__.serial.keep_reading = !1, t = !1;
1258
1293
  break;
1259
1294
  }
1260
- K(this, j, Jn).call(this, e), this.__internal__.serial.response.length === null ? await K(this, j, Qn).call(this) : await K(this, j, Zn).call(this);
1295
+ H(this, j, Jn).call(this, e), this.__internal__.serial.response.length === null ? await H(this, j, Qn).call(this) : await H(this, j, Zn).call(this);
1261
1296
  }
1262
1297
  } catch (t) {
1263
1298
  this.serialErrors(t);
@@ -1291,8 +1326,8 @@ j = /* @__PURE__ */ new WeakSet(), Gn = function(r) {
1291
1326
  const r = this;
1292
1327
  this.on("internal:queue", async () => {
1293
1328
  var n;
1294
- await K(n = r, j, ti).call(n);
1295
- }), K(this, j, Yn).call(this);
1329
+ await H(n = r, j, ti).call(n);
1330
+ }), H(this, j, Yn).call(this);
1296
1331
  }, Yn = function() {
1297
1332
  const r = this;
1298
1333
  navigator.serial.addEventListener("connect", async () => {
@@ -1300,8 +1335,8 @@ j = /* @__PURE__ */ new WeakSet(), Gn = function(r) {
1300
1335
  });
1301
1336
  });
1302
1337
  }, ti = async function() {
1303
- if (!this.__internal__.serial.connected) {
1304
- await this.serialConnect();
1338
+ if (!H(this, j, Qe).call(this, this.__internal__.serial.port)) {
1339
+ this.__internal__.serial.connected = !1, this.__internal__.aux_port_connector = 0, this.dispatch("serial:disconnected", { error: "Port is closed, not readable or writable." }), Tt.instance.dispatch("change"), await this.serialConnect();
1305
1340
  return;
1306
1341
  }
1307
1342
  if (this.__internal__.timeout.until_response || this.__internal__.serial.queue.length === 0) return;
@@ -1309,10 +1344,10 @@ j = /* @__PURE__ */ new WeakSet(), Gn = function(r) {
1309
1344
  let n = this.__internal__.time.response_general;
1310
1345
  r.action === "connect" && (n = this.__internal__.time.response_connection), this.__internal__.timeout.until_response = setTimeout(async () => {
1311
1346
  await this.timeout(r.bytes, r.action);
1312
- }, n), this.__internal__.serial.last_action = r.action ?? "unknown", await K(this, j, cn).call(this, r.bytes), this.dispatch("serial:sent", {
1347
+ }, n), this.__internal__.serial.last_action = r.action ?? "unknown", await H(this, j, hn).call(this, r.bytes), this.dispatch("serial:sent", {
1313
1348
  action: r.action,
1314
1349
  bytes: r.bytes
1315
- }), this.__internal__.auto_response && K(this, j, Rt).call(this, ["DD", "DD"], null);
1350
+ }), this.__internal__.auto_response && H(this, j, It).call(this, ["DD", "DD"], null);
1316
1351
  const t = [...this.__internal__.serial.queue];
1317
1352
  this.__internal__.serial.queue = t.splice(1);
1318
1353
  }, Oi = function(r = 1) {
@@ -1325,42 +1360,7 @@ j = /* @__PURE__ */ new WeakSet(), Gn = function(r) {
1325
1360
  no_code: 0
1326
1361
  };
1327
1362
  };
1328
- const ln = class L extends ki {
1329
- static typeError(n) {
1330
- const t = new Error();
1331
- throw t.message = `Type ${n} is not supported`, t.name = "DeviceTypeError", t;
1332
- }
1333
- static registerType(n) {
1334
- typeof L.devices[n] > "u" && (L.devices[n] = {});
1335
- }
1336
- static add(n) {
1337
- const t = n.typeDevice;
1338
- typeof L.devices[t] > "u" && (L.devices[t] = {});
1339
- const e = n.uuid;
1340
- if (typeof L.devices[t] > "u" && L.typeError(t), this.instance.dispatch("change", L.devices), L.devices[t][e])
1341
- throw new Error(`Device with id ${e} already exists`);
1342
- return L.devices[t][e] = n, this.instance.dispatch("change", L.devices), Object.keys(L.devices[t]).indexOf(e);
1343
- }
1344
- static get(n, t) {
1345
- return typeof L.devices[n] > "u" && (L.devices[n] = {}), typeof L.devices[n] > "u" && L.typeError(n), L.devices[n][t];
1346
- }
1347
- static getAll(n = null) {
1348
- return n === null ? L.devices : (typeof L.devices[n] > "u" && L.typeError(n), L.devices[n]);
1349
- }
1350
- static getList() {
1351
- return Object.values(L.devices).map((n) => Object.values(n)).flat();
1352
- }
1353
- static getByNumber(n, t) {
1354
- return typeof L.devices[n] > "u" && L.typeError(n), Object.values(L.devices[n]).find((e) => e.deviceNumber === t) ?? null;
1355
- }
1356
- static getCustom(n, t = 1) {
1357
- return typeof L.devices[n] > "u" && L.typeError(n), Object.values(L.devices[n]).find((e) => e.deviceNumber === t) ?? null;
1358
- }
1359
- };
1360
- ae(ln, "instance"), ae(ln, "devices", {});
1361
- let me = ln;
1362
- me.instance || (me.instance = new me());
1363
- const I = class I extends me {
1363
+ const I = class I extends Tt {
1364
1364
  static typeError(n) {
1365
1365
  const t = new Error();
1366
1366
  throw t.message = `Type ${n} is not supported`, t.name = "DeviceTypeError", t;
@@ -1433,7 +1433,7 @@ rt(I, "instance", null), rt(I, "devices", {
1433
1433
  });
1434
1434
  let $ = I;
1435
1435
  $.instance || ($.instance = new $());
1436
- class Lt extends Aa {
1436
+ class Vt extends Aa {
1437
1437
  constructor(n) {
1438
1438
  super(n), this.getResponseAsArrayHex(), this.__internal__.device.door_open = !1, this.__internal__.time.response_engines = 2e3, this.__internal__.time.sense = 100, this.__internal__.interval.waiting_sense = 0, this.__internal__.dispense = {
1439
1439
  must_response: !1,
@@ -1504,7 +1504,7 @@ class Lt extends Aa {
1504
1504
  }
1505
1505
  async internalDispense(n) {
1506
1506
  if (this.isDispensing) throw new Error("Another dispensing process is running");
1507
- if (!sn.enable && !this.__internal__.serial.connected && (await this.serialConnect(), !this.__internal__.serial.connected))
1507
+ if (!an.enable && !this.__internal__.serial.connected && (await this.serialConnect(), !this.__internal__.serial.connected))
1508
1508
  throw new Error("Serial device not connected");
1509
1509
  return this.__internal__.serial.queue.length === 0 ? (await this.appendToQueue(n, "dispense"), await this.internalDispenseStatus()) : new Promise((t) => {
1510
1510
  const e = setInterval(async () => {
@@ -1540,12 +1540,12 @@ class Lt extends Aa {
1540
1540
  return this.__internal__.device.listen_on_port ?? 1;
1541
1541
  }
1542
1542
  }
1543
- var ce, Le, Bi;
1544
- class Ic extends Lt {
1543
+ var le, Le, Bi;
1544
+ class Ic extends Vt {
1545
1545
  constructor({ filters: t = null, config_port: e = null, no_device: i = 1 } = {}) {
1546
1546
  super({ filters: t, config_port: e, no_device: i });
1547
1547
  J(this, Le);
1548
- J(this, ce, {
1548
+ J(this, le, {
1549
1549
  activate: ["A0", "01", "01", "A2"],
1550
1550
  deactivate: ["A0", "01", "00", "A1"]
1551
1551
  });
@@ -1584,11 +1584,11 @@ class Ic extends Lt {
1584
1584
  return e[1] = this.hexMaker(this.decToHex(t.toString())), e[3] = this.serialRelaySumHex(e), this.add0x(e);
1585
1585
  }
1586
1586
  async turnOn() {
1587
- const t = R(this, ce).activate;
1587
+ const t = R(this, le).activate;
1588
1588
  t[3] = this.serialRelaySumHex(t), await this.appendToQueue(t, "relay:turn-on");
1589
1589
  }
1590
1590
  async turnOff() {
1591
- const t = R(this, ce).deactivate;
1591
+ const t = R(this, le).deactivate;
1592
1592
  t[3] = this.serialRelaySumHex(t), await this.appendToQueue(t, "relay:turn-off");
1593
1593
  }
1594
1594
  async toggle({ inverse: t = !1, ms: e = 300 } = {}) {
@@ -1596,11 +1596,11 @@ class Ic extends Lt {
1596
1596
  t ? (await i.turnOff(), await Ct(e), await i.turnOn()) : (await i.turnOn(), await Ct(e), await i.turnOff());
1597
1597
  }
1598
1598
  }
1599
- ce = new WeakMap(), Le = new WeakSet(), Bi = function() {
1599
+ le = new WeakMap(), Le = new WeakSet(), Bi = function() {
1600
1600
  $.add(this);
1601
1601
  };
1602
- var tt, X, Pt, D, Mi, Fi, Ui, Li, hn, Vi, It, Ot, we, ve, Ee;
1603
- class Oc extends Lt {
1602
+ var tt, X, Pt, D, Mi, Fi, Ui, Li, un, Vi, Ot, Nt, we, ve, Ee;
1603
+ class Oc extends Vt {
1604
1604
  constructor({ filters: t = null, config_port: e = null, no_device: i = 1, device_listen_on_port: s = 3 } = {}) {
1605
1605
  super({ filters: t, config_port: e, no_device: i, device_listen_on_port: s });
1606
1606
  J(this, D);
@@ -1688,12 +1688,12 @@ class Oc extends Lt {
1688
1688
  return i === 0 && (i = 8), [e, i];
1689
1689
  }
1690
1690
  async dispense({ cell: t = 1 } = {}) {
1691
- t = o(this, D, It).call(this, t);
1691
+ t = o(this, D, Ot).call(this, t);
1692
1692
  const e = o(this, D, Vi).call(this, t);
1693
1693
  return await this.internalDispense(e);
1694
1694
  }
1695
1695
  async status({ cell: t = 1 } = {}) {
1696
- t = o(this, D, It).call(this, t);
1696
+ t = o(this, D, Ot).call(this, t);
1697
1697
  const e = o(this, D, Ui).call(this, t);
1698
1698
  return await this.appendToQueue(e, "status");
1699
1699
  }
@@ -1704,36 +1704,36 @@ class Oc extends Lt {
1704
1704
  return await this.appendToQueue(i, "light-scan");
1705
1705
  }
1706
1706
  async enable({ cell: t = 1 } = {}) {
1707
- t = o(this, D, It).call(this, t);
1708
- const [e, i] = this.parseCellToColumnRow(t), s = o(this, D, hn).call(this, { enable: !0, column: e, row: i });
1707
+ t = o(this, D, Ot).call(this, t);
1708
+ const [e, i] = this.parseCellToColumnRow(t), s = o(this, D, un).call(this, { enable: !0, column: e, row: i });
1709
1709
  await this.appendToQueue(s, "activate");
1710
1710
  }
1711
1711
  async disable({ cell: t = 1 } = {}) {
1712
- t = o(this, D, It).call(this, t);
1713
- const [e, i] = this.parseCellToColumnRow(t), s = o(this, D, hn).call(this, { enable: !1, column: e, row: i });
1712
+ t = o(this, D, Ot).call(this, t);
1713
+ const [e, i] = this.parseCellToColumnRow(t), s = o(this, D, un).call(this, { enable: !1, column: e, row: i });
1714
1714
  await this.appendToQueue(s, "disable");
1715
1715
  }
1716
1716
  async openAll() {
1717
1717
  if (this.isDispensing) throw new Error("Another dispensing process is running");
1718
- o(this, D, Ot).call(this), M(this, tt, !0), o(this, D, we).call(this);
1718
+ o(this, D, Nt).call(this), M(this, tt, !0), o(this, D, we).call(this);
1719
1719
  const t = [];
1720
1720
  for (let e = 1; e <= 90; e++) {
1721
1721
  const i = await this.dispense(e);
1722
1722
  t.push(i), M(this, X, e), o(this, D, we).call(this);
1723
1723
  }
1724
- M(this, X, 90), o(this, D, we).call(this, t), o(this, D, Ot).call(this);
1724
+ M(this, X, 90), o(this, D, we).call(this, t), o(this, D, Nt).call(this);
1725
1725
  }
1726
1726
  async enableAll() {
1727
- o(this, D, Ot).call(this), M(this, tt, !0), o(this, D, ve).call(this);
1727
+ o(this, D, Nt).call(this), M(this, tt, !0), o(this, D, ve).call(this);
1728
1728
  for (let t = 1; t <= 90; t++)
1729
1729
  await this.enable(t), M(this, X, t), o(this, D, ve).call(this);
1730
- M(this, X, 90), o(this, D, ve).call(this), o(this, D, Ot).call(this);
1730
+ M(this, X, 90), o(this, D, ve).call(this), o(this, D, Nt).call(this);
1731
1731
  }
1732
1732
  async disableAll() {
1733
- o(this, D, Ot).call(this), M(this, tt, !0), o(this, D, Ee).call(this);
1733
+ o(this, D, Nt).call(this), M(this, tt, !0), o(this, D, Ee).call(this);
1734
1734
  for (let t = 1; t <= 90; t++)
1735
1735
  await this.enable(t), M(this, X, t), o(this, D, Ee).call(this);
1736
- M(this, X, 90), o(this, D, Ee).call(this), o(this, D, Ot).call(this);
1736
+ M(this, X, 90), o(this, D, Ee).call(this), o(this, D, Nt).call(this);
1737
1737
  }
1738
1738
  }
1739
1739
  tt = new WeakMap(), X = new WeakMap(), Pt = new WeakMap(), D = new WeakSet(), Mi = function() {
@@ -1743,25 +1743,25 @@ tt = new WeakMap(), X = new WeakMap(), Pt = new WeakMap(), D = new WeakSet(), Mi
1743
1743
  }, Fi = function() {
1744
1744
  $.add(this);
1745
1745
  }, Ui = function(t = 1) {
1746
- return t = o(this, D, It).call(this, t), this.serialLockerHexCmd(new Uint8Array([16, this.__internal__.device.listen_on_port, t]));
1746
+ return t = o(this, D, Ot).call(this, t), this.serialLockerHexCmd(new Uint8Array([16, this.__internal__.device.listen_on_port, t]));
1747
1747
  }, Li = function(t = 0, e = 10) {
1748
1748
  return this.serialLockerHexCmd(new Uint8Array([32, this.__internal__.device.listen_on_port, t, e]));
1749
- }, hn = function({ enable: t = !0, column: e = 0, row: i = 10 } = {}) {
1749
+ }, un = function({ enable: t = !0, column: e = 0, row: i = 10 } = {}) {
1750
1750
  if (e < 0 || e > 8) throw new Error("Invalid column number");
1751
1751
  if (i < 0 || i > 10) throw new Error("Invalid row number");
1752
1752
  let s = 1;
1753
1753
  return t || (s = 0), this.serialLockerHexCmd(new Uint8Array([48, this.__internal__.device.listen_on_port, e, i, s]));
1754
1754
  }, Vi = function(t = 1) {
1755
- t = o(this, D, It).call(this, t);
1755
+ t = o(this, D, Ot).call(this, t);
1756
1756
  const e = this.__internal__.device.milliseconds, i = e % 256, s = Math.floor(e / 3) % 256;
1757
1757
  return this.serialLockerHexCmd(
1758
1758
  new Uint8Array([64, this.__internal__.device.listen_on_port, t, i, s])
1759
1759
  );
1760
- }, It = function(t) {
1760
+ }, Ot = function(t) {
1761
1761
  const e = parseInt(t);
1762
1762
  if (isNaN(e) || e < 1 || e > 90) throw new Error("Invalid cell number");
1763
1763
  return e;
1764
- }, Ot = function() {
1764
+ }, Nt = function() {
1765
1765
  M(this, tt, !1), M(this, X, 0), M(this, Pt, 0);
1766
1766
  }, we = function(t = null) {
1767
1767
  M(this, Pt, Math.round(R(this, X) * 100 / 90)), this.dispatch("percentage:open", { percentage: R(this, Pt), dispensed: t });
@@ -1771,13 +1771,13 @@ tt = new WeakMap(), X = new WeakMap(), Pt = new WeakMap(), D = new WeakSet(), Mi
1771
1771
  M(this, Pt, Math.round(R(this, X) * 100 / 90)), this.dispatch("percentage:disable", { percentage: R(this, Pt) });
1772
1772
  };
1773
1773
  var Da = "0123456789abcdefghijklmnopqrstuvwxyz";
1774
- function St(r) {
1774
+ function kt(r) {
1775
1775
  return Da.charAt(r);
1776
1776
  }
1777
1777
  function Ra(r, n) {
1778
1778
  return r & n;
1779
1779
  }
1780
- function de(r, n) {
1780
+ function pe(r, n) {
1781
1781
  return r | n;
1782
1782
  }
1783
1783
  function ei(r, n) {
@@ -1797,42 +1797,42 @@ function Oa(r) {
1797
1797
  r &= r - 1, ++n;
1798
1798
  return n;
1799
1799
  }
1800
- var jt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", qi = "=";
1800
+ var Ht = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", qi = "=";
1801
1801
  function Me(r) {
1802
1802
  var n, t, e = "";
1803
1803
  for (n = 0; n + 3 <= r.length; n += 3)
1804
- t = parseInt(r.substring(n, n + 3), 16), e += jt.charAt(t >> 6) + jt.charAt(t & 63);
1805
- for (n + 1 == r.length ? (t = parseInt(r.substring(n, n + 1), 16), e += jt.charAt(t << 2)) : n + 2 == r.length && (t = parseInt(r.substring(n, n + 2), 16), e += jt.charAt(t >> 2) + jt.charAt((t & 3) << 4)); (e.length & 3) > 0; )
1804
+ t = parseInt(r.substring(n, n + 3), 16), e += Ht.charAt(t >> 6) + Ht.charAt(t & 63);
1805
+ for (n + 1 == r.length ? (t = parseInt(r.substring(n, n + 1), 16), e += Ht.charAt(t << 2)) : n + 2 == r.length && (t = parseInt(r.substring(n, n + 2), 16), e += Ht.charAt(t >> 2) + Ht.charAt((t & 3) << 4)); (e.length & 3) > 0; )
1806
1806
  e += qi;
1807
1807
  return e;
1808
1808
  }
1809
1809
  function ii(r) {
1810
1810
  var n = "", t, e = 0, i = 0;
1811
1811
  for (t = 0; t < r.length && r.charAt(t) != qi; ++t) {
1812
- var s = jt.indexOf(r.charAt(t));
1813
- s < 0 || (e == 0 ? (n += St(s >> 2), i = s & 3, e = 1) : e == 1 ? (n += St(i << 2 | s >> 4), i = s & 15, e = 2) : e == 2 ? (n += St(i), n += St(s >> 2), i = s & 3, e = 3) : (n += St(i << 2 | s >> 4), n += St(s & 15), e = 0));
1812
+ var s = Ht.indexOf(r.charAt(t));
1813
+ s < 0 || (e == 0 ? (n += kt(s >> 2), i = s & 3, e = 1) : e == 1 ? (n += kt(i << 2 | s >> 4), i = s & 15, e = 2) : e == 2 ? (n += kt(i), n += kt(s >> 2), i = s & 3, e = 3) : (n += kt(i << 2 | s >> 4), n += kt(s & 15), e = 0));
1814
1814
  }
1815
- return e == 1 && (n += St(i << 2)), n;
1815
+ return e == 1 && (n += kt(i << 2)), n;
1816
1816
  }
1817
- var Vt, Na = {
1817
+ var qt, Na = {
1818
1818
  decode: function(r) {
1819
1819
  var n;
1820
- if (Vt === void 0) {
1820
+ if (qt === void 0) {
1821
1821
  var t = "0123456789ABCDEF", e = ` \f
1822
1822
  \r  \u2028\u2029`;
1823
- for (Vt = {}, n = 0; n < 16; ++n)
1824
- Vt[t.charAt(n)] = n;
1823
+ for (qt = {}, n = 0; n < 16; ++n)
1824
+ qt[t.charAt(n)] = n;
1825
1825
  for (t = t.toLowerCase(), n = 10; n < 16; ++n)
1826
- Vt[t.charAt(n)] = n;
1826
+ qt[t.charAt(n)] = n;
1827
1827
  for (n = 0; n < e.length; ++n)
1828
- Vt[e.charAt(n)] = -1;
1828
+ qt[e.charAt(n)] = -1;
1829
1829
  }
1830
1830
  var i = [], s = 0, a = 0;
1831
1831
  for (n = 0; n < r.length; ++n) {
1832
1832
  var c = r.charAt(n);
1833
1833
  if (c == "=")
1834
1834
  break;
1835
- if (c = Vt[c], c != -1) {
1835
+ if (c = qt[c], c != -1) {
1836
1836
  if (c === void 0)
1837
1837
  throw new Error("Illegal character at offset " + n);
1838
1838
  s |= c, ++a >= 2 ? (i[i.length] = s, s = 0, a = 0) : s <<= 4;
@@ -1842,23 +1842,23 @@ var Vt, Na = {
1842
1842
  throw new Error("Hex encoding incomplete: 4 bits missing");
1843
1843
  return i;
1844
1844
  }
1845
- }, Dt, un = {
1845
+ }, Rt, dn = {
1846
1846
  decode: function(r) {
1847
1847
  var n;
1848
- if (Dt === void 0) {
1848
+ if (Rt === void 0) {
1849
1849
  var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", e = `= \f
1850
1850
  \r  \u2028\u2029`;
1851
- for (Dt = /* @__PURE__ */ Object.create(null), n = 0; n < 64; ++n)
1852
- Dt[t.charAt(n)] = n;
1853
- for (Dt["-"] = 62, Dt._ = 63, n = 0; n < e.length; ++n)
1854
- Dt[e.charAt(n)] = -1;
1851
+ for (Rt = /* @__PURE__ */ Object.create(null), n = 0; n < 64; ++n)
1852
+ Rt[t.charAt(n)] = n;
1853
+ for (Rt["-"] = 62, Rt._ = 63, n = 0; n < e.length; ++n)
1854
+ Rt[e.charAt(n)] = -1;
1855
1855
  }
1856
1856
  var i = [], s = 0, a = 0;
1857
1857
  for (n = 0; n < r.length; ++n) {
1858
1858
  var c = r.charAt(n);
1859
1859
  if (c == "=")
1860
1860
  break;
1861
- if (c = Dt[c], c != -1) {
1861
+ if (c = Rt[c], c != -1) {
1862
1862
  if (c === void 0)
1863
1863
  throw new Error("Illegal character at offset " + n);
1864
1864
  s |= c, ++a >= 4 ? (i[i.length] = s >> 16, i[i.length] = s >> 8 & 255, i[i.length] = s & 255, s = 0, a = 0) : s <<= 6;
@@ -1878,7 +1878,7 @@ var Vt, Na = {
1878
1878
  },
1879
1879
  re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
1880
1880
  unarmor: function(r) {
1881
- var n = un.re.exec(r);
1881
+ var n = dn.re.exec(r);
1882
1882
  if (n)
1883
1883
  if (n[1])
1884
1884
  r = n[1];
@@ -1886,9 +1886,9 @@ var Vt, Na = {
1886
1886
  r = n[2];
1887
1887
  else
1888
1888
  throw new Error("RegExp out of sync");
1889
- return un.decode(r);
1889
+ return dn.decode(r);
1890
1890
  }
1891
- }, qt = 1e13, Yt = (
1891
+ }, jt = 1e13, te = (
1892
1892
  /** @class */
1893
1893
  function() {
1894
1894
  function r(n) {
@@ -1897,23 +1897,23 @@ var Vt, Na = {
1897
1897
  return r.prototype.mulAdd = function(n, t) {
1898
1898
  var e = this.buf, i = e.length, s, a;
1899
1899
  for (s = 0; s < i; ++s)
1900
- a = e[s] * n + t, a < qt ? t = 0 : (t = 0 | a / qt, a -= t * qt), e[s] = a;
1900
+ a = e[s] * n + t, a < jt ? t = 0 : (t = 0 | a / jt, a -= t * jt), e[s] = a;
1901
1901
  t > 0 && (e[s] = t);
1902
1902
  }, r.prototype.sub = function(n) {
1903
1903
  var t = this.buf, e = t.length, i, s;
1904
1904
  for (i = 0; i < e; ++i)
1905
- s = t[i] - n, s < 0 ? (s += qt, n = 1) : n = 0, t[i] = s;
1905
+ s = t[i] - n, s < 0 ? (s += jt, n = 1) : n = 0, t[i] = s;
1906
1906
  for (; t[t.length - 1] === 0; )
1907
1907
  t.pop();
1908
1908
  }, r.prototype.toString = function(n) {
1909
1909
  if ((n || 10) != 10)
1910
1910
  throw new Error("only base 10 is supported");
1911
1911
  for (var t = this.buf, e = t[t.length - 1].toString(), i = t.length - 2; i >= 0; --i)
1912
- e += (qt + t[i]).toString().substring(1);
1912
+ e += (jt + t[i]).toString().substring(1);
1913
1913
  return e;
1914
1914
  }, r.prototype.valueOf = function() {
1915
1915
  for (var n = this.buf, t = 0, e = n.length - 1; e >= 0; --e)
1916
- t = t * qt + n[e];
1916
+ t = t * jt + n[e];
1917
1917
  return t;
1918
1918
  }, r.prototype.simplify = function() {
1919
1919
  var n = this.buf;
@@ -1921,10 +1921,10 @@ var Vt, Na = {
1921
1921
  }, r;
1922
1922
  }()
1923
1923
  ), ji = "…", Ba = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/, Ma = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
1924
- function Kt(r, n) {
1924
+ function Wt(r, n) {
1925
1925
  return r.length > n && (r = r.substring(0, n) + ji), r;
1926
1926
  }
1927
- var Qe = (
1927
+ var Ze = (
1928
1928
  /** @class */
1929
1929
  function() {
1930
1930
  function r(n, t) {
@@ -1987,7 +1987,7 @@ var Qe = (
1987
1987
  `;
1988
1988
  }
1989
1989
  i && (e = e - 256);
1990
- for (var l = new Yt(e), h = n + 1; h < t; ++h)
1990
+ for (var l = new te(e), h = n + 1; h < t; ++h)
1991
1991
  l.mulAdd(256, this.get(h));
1992
1992
  return c + l.toString();
1993
1993
  }, r.prototype.parseBitString = function(n, t, e) {
@@ -1996,12 +1996,12 @@ var Qe = (
1996
1996
  for (var h = this.get(l), p = l == t - 1 ? i : 0, f = 7; f >= p; --f)
1997
1997
  c += h >> f & 1 ? "1" : "0";
1998
1998
  if (c.length > e)
1999
- return a + Kt(c, e);
1999
+ return a + Wt(c, e);
2000
2000
  }
2001
2001
  return a + c;
2002
2002
  }, r.prototype.parseOctetString = function(n, t, e) {
2003
2003
  if (this.isASCII(n, t))
2004
- return Kt(this.parseStringISO(n, t), e);
2004
+ return Wt(this.parseStringISO(n, t), e);
2005
2005
  var i = t - n, s = "(" + i + ` byte)
2006
2006
  `;
2007
2007
  e /= 2, i > e && (t = n + e);
@@ -2009,11 +2009,11 @@ var Qe = (
2009
2009
  s += this.hexByte(this.get(a));
2010
2010
  return i > e && (s += ji), s;
2011
2011
  }, r.prototype.parseOID = function(n, t, e) {
2012
- for (var i = "", s = new Yt(), a = 0, c = n; c < t; ++c) {
2012
+ for (var i = "", s = new te(), a = 0, c = n; c < t; ++c) {
2013
2013
  var l = this.get(c);
2014
2014
  if (s.mulAdd(128, l & 127), a += 7, !(l & 128)) {
2015
2015
  if (i === "")
2016
- if (s = s.simplify(), s instanceof Yt)
2016
+ if (s = s.simplify(), s instanceof te)
2017
2017
  s.sub(80), i = "2." + s.toString();
2018
2018
  else {
2019
2019
  var h = s < 80 ? s < 40 ? 0 : 1 : 2;
@@ -2022,8 +2022,8 @@ var Qe = (
2022
2022
  else
2023
2023
  i += "." + s.toString();
2024
2024
  if (i.length > e)
2025
- return Kt(i, e);
2026
- s = new Yt(), a = 0;
2025
+ return Wt(i, e);
2026
+ s = new te(), a = 0;
2027
2027
  }
2028
2028
  }
2029
2029
  return a > 0 && (i += ".incomplete"), i;
@@ -2138,7 +2138,7 @@ var Qe = (
2138
2138
  case 17:
2139
2139
  return this.sub !== null ? "(" + this.sub.length + " elem)" : "(no elem)";
2140
2140
  case 12:
2141
- return Kt(this.stream.parseStringUTF(t, t + e), n);
2141
+ return Wt(this.stream.parseStringUTF(t, t + e), n);
2142
2142
  case 18:
2143
2143
  // NumericString
2144
2144
  case 19:
@@ -2151,9 +2151,9 @@ var Qe = (
2151
2151
  // IA5String
2152
2152
  // case 0x19: // GraphicString
2153
2153
  case 26:
2154
- return Kt(this.stream.parseStringISO(t, t + e), n);
2154
+ return Wt(this.stream.parseStringISO(t, t + e), n);
2155
2155
  case 30:
2156
- return Kt(this.stream.parseStringBMP(t, t + e), n);
2156
+ return Wt(this.stream.parseStringBMP(t, t + e), n);
2157
2157
  case 23:
2158
2158
  // UTCTime
2159
2159
  case 24:
@@ -2197,8 +2197,8 @@ var Qe = (
2197
2197
  return n.substr(t, e);
2198
2198
  }, r.decode = function(n) {
2199
2199
  var t;
2200
- n instanceof Qe ? t = n : t = new Qe(n, 0);
2201
- var e = new Qe(t), i = new ri(t), s = r.decodeLength(t), a = t.pos, c = a - e.pos, l = null, h = function() {
2200
+ n instanceof Ze ? t = n : t = new Ze(n, 0);
2201
+ var e = new Ze(t), i = new ri(t), s = r.decodeLength(t), a = t.pos, c = a - e.pos, l = null, h = function() {
2202
2202
  var f = [];
2203
2203
  if (s !== null) {
2204
2204
  for (var y = a + s; t.pos < y; )
@@ -2246,7 +2246,7 @@ var Qe = (
2246
2246
  function r(n) {
2247
2247
  var t = n.get();
2248
2248
  if (this.tagClass = t >> 6, this.tagConstructed = (t & 32) !== 0, this.tagNumber = t & 31, this.tagNumber == 31) {
2249
- var e = new Yt();
2249
+ var e = new te();
2250
2250
  do
2251
2251
  t = n.get(), e.mulAdd(128, t & 127);
2252
2252
  while (t & 128);
@@ -2259,7 +2259,7 @@ var Qe = (
2259
2259
  return this.tagClass === 0 && this.tagNumber === 0;
2260
2260
  }, r;
2261
2261
  }()
2262
- ), At, Ua = 244837814094590, si = (Ua & 16777215) == 15715070, nt = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997], La = (1 << 26) / nt[nt.length - 1], A = (
2262
+ ), Dt, Ua = 244837814094590, si = (Ua & 16777215) == 15715070, nt = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997], La = (1 << 26) / nt[nt.length - 1], A = (
2263
2263
  /** @class */
2264
2264
  function() {
2265
2265
  function r(n, t, e) {
@@ -2283,8 +2283,8 @@ var Qe = (
2283
2283
  return this.toRadix(n);
2284
2284
  var e = (1 << t) - 1, i, s = !1, a = "", c = this.t, l = this.DB - c * this.DB % t;
2285
2285
  if (c-- > 0)
2286
- for (l < this.DB && (i = this[c] >> l) > 0 && (s = !0, a = St(i)); c >= 0; )
2287
- l < t ? (i = (this[c] & (1 << l) - 1) << t - l, i |= this[--c] >> (l += this.DB - t)) : (i = this[c] >> (l -= t) & e, l <= 0 && (l += this.DB, --c)), i > 0 && (s = !0), s && (a += St(i));
2286
+ for (l < this.DB && (i = this[c] >> l) > 0 && (s = !0, a = kt(i)); c >= 0; )
2287
+ l < t ? (i = (this[c] & (1 << l) - 1) << t - l, i |= this[--c] >> (l += this.DB - t)) : (i = this[c] >> (l -= t) & e, l <= 0 && (l += this.DB, --c)), i > 0 && (s = !0), s && (a += kt(i));
2288
2288
  return s ? a : "0";
2289
2289
  }, r.prototype.negate = function() {
2290
2290
  var n = O();
@@ -2303,7 +2303,7 @@ var Qe = (
2303
2303
  return t;
2304
2304
  return 0;
2305
2305
  }, r.prototype.bitLength = function() {
2306
- return this.t <= 0 ? 0 : this.DB * (this.t - 1) + pe(this[this.t - 1] ^ this.s & this.DM);
2306
+ return this.t <= 0 ? 0 : this.DB * (this.t - 1) + _e(this[this.t - 1] ^ this.s & this.DM);
2307
2307
  }, r.prototype.mod = function(n) {
2308
2308
  var t = O();
2309
2309
  return this.abs().divRemTo(n, null, t), this.s < 0 && t.compareTo(r.ZERO) > 0 && n.subTo(t, t), t;
@@ -2351,7 +2351,7 @@ var Qe = (
2351
2351
  return this.bitwiseTo(n, Ra, t), t;
2352
2352
  }, r.prototype.or = function(n) {
2353
2353
  var t = O();
2354
- return this.bitwiseTo(n, de, t), t;
2354
+ return this.bitwiseTo(n, pe, t), t;
2355
2355
  }, r.prototype.xor = function(n) {
2356
2356
  var t = O();
2357
2357
  return this.bitwiseTo(n, ei, t), t;
@@ -2381,7 +2381,7 @@ var Qe = (
2381
2381
  var t = Math.floor(n / this.DB);
2382
2382
  return t >= this.t ? this.s != 0 : (this[t] & 1 << n % this.DB) != 0;
2383
2383
  }, r.prototype.setBit = function(n) {
2384
- return this.changeBit(n, de);
2384
+ return this.changeBit(n, pe);
2385
2385
  }, r.prototype.clearBit = function(n) {
2386
2386
  return this.changeBit(n, ni);
2387
2387
  }, r.prototype.flipBit = function(n) {
@@ -2405,7 +2405,7 @@ var Qe = (
2405
2405
  var t = O(), e = O();
2406
2406
  return this.divRemTo(n, t, e), [t, e];
2407
2407
  }, r.prototype.modPow = function(n, t) {
2408
- var e = n.bitLength(), i, s = kt(1), a;
2408
+ var e = n.bitLength(), i, s = xt(1), a;
2409
2409
  if (e <= 0)
2410
2410
  return s;
2411
2411
  e < 18 ? i = 1 : e < 48 ? i = 3 : e < 144 ? i = 4 : e < 768 ? i = 5 : i = 6, e < 8 ? a = new ai(t) : t.isEven() ? a = new qa(t) : a = new oi(t);
@@ -2416,7 +2416,7 @@ var Qe = (
2416
2416
  c[l] = O(), a.mulTo(f, c[l - 2], c[l]), l += 2;
2417
2417
  }
2418
2418
  var y = n.t - 1, E, v = !0, S = O(), T;
2419
- for (e = pe(n[y]) - 1; y >= 0; ) {
2419
+ for (e = _e(n[y]) - 1; y >= 0; ) {
2420
2420
  for (e >= h ? E = n[y] >> e - h & p : (E = (n[y] & (1 << e + 1) - 1) << h - e, y > 0 && (E |= n[y - 1] >> this.DB + e - h)), l = i; (E & 1) == 0; )
2421
2421
  E >>= 1, --l;
2422
2422
  if ((e -= l) < 0 && (e += this.DB, --y), v)
@@ -2434,7 +2434,7 @@ var Qe = (
2434
2434
  var t = n.isEven();
2435
2435
  if (this.isEven() && t || n.signum() == 0)
2436
2436
  return r.ZERO;
2437
- for (var e = n.clone(), i = this.clone(), s = kt(1), a = kt(0), c = kt(0), l = kt(1); e.signum() != 0; ) {
2437
+ for (var e = n.clone(), i = this.clone(), s = xt(1), a = xt(0), c = xt(0), l = xt(1); e.signum() != 0; ) {
2438
2438
  for (; e.isEven(); )
2439
2439
  e.rShiftTo(1, e), t ? ((!s.isEven() || !a.isEven()) && (s.addTo(this, s), a.subTo(n, a)), s.rShiftTo(1, s)) : a.isEven() || a.subTo(n, a), a.rShiftTo(1, a);
2440
2440
  for (; i.isEven(); )
@@ -2585,7 +2585,7 @@ var Qe = (
2585
2585
  return;
2586
2586
  }
2587
2587
  e == null && (e = O());
2588
- var a = O(), c = this.s, l = n.s, h = this.DB - pe(i[i.t - 1]);
2588
+ var a = O(), c = this.s, l = n.s, h = this.DB - _e(i[i.t - 1]);
2589
2589
  h > 0 ? (i.lShiftTo(h, a), s.lShiftTo(h, e)) : (i.copyTo(a), s.copyTo(e));
2590
2590
  var p = a.t, f = a[p - 1];
2591
2591
  if (f != 0) {
@@ -2614,7 +2614,7 @@ var Qe = (
2614
2614
  }, r.prototype.exp = function(n, t) {
2615
2615
  if (n > 4294967295 || n < 1)
2616
2616
  return r.ONE;
2617
- var e = O(), i = O(), s = t.convert(this), a = pe(n) - 1;
2617
+ var e = O(), i = O(), s = t.convert(this), a = _e(n) - 1;
2618
2618
  for (s.copyTo(e); --a >= 0; )
2619
2619
  if (t.sqrTo(e, i), (n & 1 << a) > 0)
2620
2620
  t.mulTo(i, s, e);
@@ -2628,7 +2628,7 @@ var Qe = (
2628
2628
  }, r.prototype.toRadix = function(n) {
2629
2629
  if (n == null && (n = 10), this.signum() == 0 || n < 2 || n > 36)
2630
2630
  return "0";
2631
- var t = this.chunkSize(n), e = Math.pow(n, t), i = kt(e), s = O(), a = O(), c = "";
2631
+ var t = this.chunkSize(n), e = Math.pow(n, t), i = xt(e), s = O(), a = O(), c = "";
2632
2632
  for (this.divRemTo(i, s, a); s.signum() > 0; )
2633
2633
  c = (e + a.intValue()).toString(n).substr(1) + c, s.divRemTo(i, s, a);
2634
2634
  return a.intValue().toString(n) + c;
@@ -2648,7 +2648,7 @@ var Qe = (
2648
2648
  if (n < 2)
2649
2649
  this.fromInt(1);
2650
2650
  else
2651
- for (this.fromNumber(n, e), this.testBit(n - 1) || this.bitwiseTo(r.ONE.shiftLeft(n - 1), de, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(t); )
2651
+ for (this.fromNumber(n, e), this.testBit(n - 1) || this.bitwiseTo(r.ONE.shiftLeft(n - 1), pe, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(t); )
2652
2652
  this.dAddOffset(2, 0), this.bitLength() > n && this.subTo(r.ONE.shiftLeft(n - 1), this);
2653
2653
  else {
2654
2654
  var i = [], s = n & 7;
@@ -2765,7 +2765,7 @@ var Qe = (
2765
2765
  if (n < 2)
2766
2766
  this.fromInt(1);
2767
2767
  else {
2768
- this.fromNumber(n, e), this.testBit(n - 1) || this.bitwiseTo(r.ONE.shiftLeft(n - 1), de, this), this.isEven() && this.dAddOffset(1, 0);
2768
+ this.fromNumber(n, e), this.testBit(n - 1) || this.bitwiseTo(r.ONE.shiftLeft(n - 1), pe, this), this.isEven() && this.dAddOffset(1, 0);
2769
2769
  var s = this, a = function() {
2770
2770
  s.dAddOffset(2, 0), s.bitLength() > n && s.subTo(r.ONE.shiftLeft(n - 1), s), s.isProbablePrime(t) ? setTimeout(function() {
2771
2771
  i();
@@ -2869,7 +2869,7 @@ var Qe = (
2869
2869
  function O() {
2870
2870
  return new A(null);
2871
2871
  }
2872
- function H(r, n) {
2872
+ function K(r, n) {
2873
2873
  return new A(r, n);
2874
2874
  }
2875
2875
  var ci = typeof navigator < "u";
@@ -2879,50 +2879,50 @@ ci && si && navigator.appName == "Microsoft Internet Explorer" ? (A.prototype.am
2879
2879
  h = c * h + ((f & 32767) << 15) + e[i] + (s & 1073741823), s = (h >>> 30) + (f >>> 15) + l * p + (s >>> 30), e[i++] = h & 1073741823;
2880
2880
  }
2881
2881
  return s;
2882
- }, At = 30) : ci && si && navigator.appName != "Netscape" ? (A.prototype.am = function(n, t, e, i, s, a) {
2882
+ }, Dt = 30) : ci && si && navigator.appName != "Netscape" ? (A.prototype.am = function(n, t, e, i, s, a) {
2883
2883
  for (; --a >= 0; ) {
2884
2884
  var c = t * this[n++] + e[i] + s;
2885
2885
  s = Math.floor(c / 67108864), e[i++] = c & 67108863;
2886
2886
  }
2887
2887
  return s;
2888
- }, At = 26) : (A.prototype.am = function(n, t, e, i, s, a) {
2888
+ }, Dt = 26) : (A.prototype.am = function(n, t, e, i, s, a) {
2889
2889
  for (var c = t & 16383, l = t >> 14; --a >= 0; ) {
2890
2890
  var h = this[n] & 16383, p = this[n++] >> 14, f = l * h + p * c;
2891
2891
  h = c * h + ((f & 16383) << 14) + e[i] + s, s = (h >> 28) + (f >> 14) + l * p, e[i++] = h & 268435455;
2892
2892
  }
2893
2893
  return s;
2894
- }, At = 28);
2895
- A.prototype.DB = At;
2896
- A.prototype.DM = (1 << At) - 1;
2897
- A.prototype.DV = 1 << At;
2898
- var Vn = 52;
2899
- A.prototype.FV = Math.pow(2, Vn);
2900
- A.prototype.F1 = Vn - At;
2901
- A.prototype.F2 = 2 * At - Vn;
2902
- var Ve = [], $t, pt;
2903
- $t = 48;
2894
+ }, Dt = 28);
2895
+ A.prototype.DB = Dt;
2896
+ A.prototype.DM = (1 << Dt) - 1;
2897
+ A.prototype.DV = 1 << Dt;
2898
+ var qn = 52;
2899
+ A.prototype.FV = Math.pow(2, qn);
2900
+ A.prototype.F1 = qn - Dt;
2901
+ A.prototype.F2 = 2 * Dt - qn;
2902
+ var Ve = [], Gt, pt;
2903
+ Gt = 48;
2904
2904
  for (pt = 0; pt <= 9; ++pt)
2905
- Ve[$t++] = pt;
2906
- $t = 97;
2905
+ Ve[Gt++] = pt;
2906
+ Gt = 97;
2907
2907
  for (pt = 10; pt < 36; ++pt)
2908
- Ve[$t++] = pt;
2909
- $t = 65;
2908
+ Ve[Gt++] = pt;
2909
+ Gt = 65;
2910
2910
  for (pt = 10; pt < 36; ++pt)
2911
- Ve[$t++] = pt;
2911
+ Ve[Gt++] = pt;
2912
2912
  function li(r, n) {
2913
2913
  var t = Ve[r.charCodeAt(n)];
2914
2914
  return t ?? -1;
2915
2915
  }
2916
- function kt(r) {
2916
+ function xt(r) {
2917
2917
  var n = O();
2918
2918
  return n.fromInt(r), n;
2919
2919
  }
2920
- function pe(r) {
2920
+ function _e(r) {
2921
2921
  var n = 1, t;
2922
2922
  return (t = r >>> 16) != 0 && (r = t, n += 16), (t = r >> 8) != 0 && (r = t, n += 8), (t = r >> 4) != 0 && (r = t, n += 4), (t = r >> 2) != 0 && (r = t, n += 2), (t = r >> 1) != 0 && (r = t, n += 1), n;
2923
2923
  }
2924
- A.ZERO = kt(0);
2925
- A.ONE = kt(1);
2924
+ A.ZERO = xt(0);
2925
+ A.ONE = xt(1);
2926
2926
  var ja = (
2927
2927
  /** @class */
2928
2928
  function() {
@@ -2945,41 +2945,41 @@ var ja = (
2945
2945
  function Ha() {
2946
2946
  return new ja();
2947
2947
  }
2948
- var Hi = 256, _e, xt = null, yt;
2949
- if (xt == null) {
2950
- xt = [], yt = 0;
2951
- var fe = void 0;
2948
+ var Hi = 256, fe, At = null, yt;
2949
+ if (At == null) {
2950
+ At = [], yt = 0;
2951
+ var ge = void 0;
2952
2952
  if (typeof window < "u" && window.crypto && window.crypto.getRandomValues) {
2953
- var Ze = new Uint32Array(256);
2954
- for (window.crypto.getRandomValues(Ze), fe = 0; fe < Ze.length; ++fe)
2955
- xt[yt++] = Ze[fe] & 255;
2953
+ var Ye = new Uint32Array(256);
2954
+ for (window.crypto.getRandomValues(Ye), ge = 0; ge < Ye.length; ++ge)
2955
+ At[yt++] = Ye[ge] & 255;
2956
2956
  }
2957
- var ge = 0, be = function(r) {
2958
- if (ge = ge || 0, ge >= 256 || yt >= Hi) {
2959
- window.removeEventListener ? window.removeEventListener("mousemove", be, !1) : window.detachEvent && window.detachEvent("onmousemove", be);
2957
+ var be = 0, ye = function(r) {
2958
+ if (be = be || 0, be >= 256 || yt >= Hi) {
2959
+ window.removeEventListener ? window.removeEventListener("mousemove", ye, !1) : window.detachEvent && window.detachEvent("onmousemove", ye);
2960
2960
  return;
2961
2961
  }
2962
2962
  try {
2963
2963
  var n = r.x + r.y;
2964
- xt[yt++] = n & 255, ge += 1;
2964
+ At[yt++] = n & 255, be += 1;
2965
2965
  } catch {
2966
2966
  }
2967
2967
  };
2968
- typeof window < "u" && (window.addEventListener ? window.addEventListener("mousemove", be, !1) : window.attachEvent && window.attachEvent("onmousemove", be));
2968
+ typeof window < "u" && (window.addEventListener ? window.addEventListener("mousemove", ye, !1) : window.attachEvent && window.attachEvent("onmousemove", ye));
2969
2969
  }
2970
2970
  function Ka() {
2971
- if (_e == null) {
2972
- for (_e = Ha(); yt < Hi; ) {
2971
+ if (fe == null) {
2972
+ for (fe = Ha(); yt < Hi; ) {
2973
2973
  var r = Math.floor(65536 * Math.random());
2974
- xt[yt++] = r & 255;
2974
+ At[yt++] = r & 255;
2975
2975
  }
2976
- for (_e.init(xt), yt = 0; yt < xt.length; ++yt)
2977
- xt[yt] = 0;
2976
+ for (fe.init(At), yt = 0; yt < At.length; ++yt)
2977
+ At[yt] = 0;
2978
2978
  yt = 0;
2979
2979
  }
2980
- return _e.next();
2980
+ return fe.next();
2981
2981
  }
2982
- var dn = (
2982
+ var pn = (
2983
2983
  /** @class */
2984
2984
  function() {
2985
2985
  function r() {
@@ -2996,7 +2996,7 @@ function Wa(r, n) {
2996
2996
  for (var t = n - r.length - 6, e = "", i = 0; i < t; i += 2)
2997
2997
  e += "ff";
2998
2998
  var s = "0001" + e + "00" + r;
2999
- return H(s, 16);
2999
+ return K(s, 16);
3000
3000
  }
3001
3001
  function za(r, n) {
3002
3002
  if (n < r.length + 11)
@@ -3006,7 +3006,7 @@ function za(r, n) {
3006
3006
  i < 128 ? t[--n] = i : i > 127 && i < 2048 ? (t[--n] = i & 63 | 128, t[--n] = i >> 6 | 192) : (t[--n] = i & 63 | 128, t[--n] = i >> 6 & 63 | 128, t[--n] = i >> 12 | 224);
3007
3007
  }
3008
3008
  t[--n] = 0;
3009
- for (var s = new dn(), a = []; n > 2; ) {
3009
+ for (var s = new pn(), a = []; n > 2; ) {
3010
3010
  for (a[0] = 0; a[0] == 0; )
3011
3011
  s.nextBytes(a);
3012
3012
  t[--n] = a[0];
@@ -3028,7 +3028,7 @@ var Xa = (
3028
3028
  t = t.add(this.p);
3029
3029
  return t.subtract(e).multiply(this.coeff).mod(this.p).multiply(this.q).add(e);
3030
3030
  }, r.prototype.setPublic = function(n, t) {
3031
- n != null && t != null && n.length > 0 && t.length > 0 ? (this.n = H(n, 16), this.e = parseInt(t, 16)) : console.error("Invalid RSA public key");
3031
+ n != null && t != null && n.length > 0 && t.length > 0 ? (this.n = K(n, 16), this.e = parseInt(t, 16)) : console.error("Invalid RSA public key");
3032
3032
  }, r.prototype.encrypt = function(n) {
3033
3033
  var t = this.n.bitLength() + 7 >> 3, e = za(n, t);
3034
3034
  if (e == null)
@@ -3040,11 +3040,11 @@ var Xa = (
3040
3040
  s = "0" + s;
3041
3041
  return s;
3042
3042
  }, r.prototype.setPrivate = function(n, t, e) {
3043
- n != null && t != null && n.length > 0 && t.length > 0 ? (this.n = H(n, 16), this.e = parseInt(t, 16), this.d = H(e, 16)) : console.error("Invalid RSA private key");
3043
+ n != null && t != null && n.length > 0 && t.length > 0 ? (this.n = K(n, 16), this.e = parseInt(t, 16), this.d = K(e, 16)) : console.error("Invalid RSA private key");
3044
3044
  }, r.prototype.setPrivateEx = function(n, t, e, i, s, a, c, l) {
3045
- n != null && t != null && n.length > 0 && t.length > 0 ? (this.n = H(n, 16), this.e = parseInt(t, 16), this.d = H(e, 16), this.p = H(i, 16), this.q = H(s, 16), this.dmp1 = H(a, 16), this.dmq1 = H(c, 16), this.coeff = H(l, 16)) : console.error("Invalid RSA private key");
3045
+ n != null && t != null && n.length > 0 && t.length > 0 ? (this.n = K(n, 16), this.e = parseInt(t, 16), this.d = K(e, 16), this.p = K(i, 16), this.q = K(s, 16), this.dmp1 = K(a, 16), this.dmq1 = K(c, 16), this.coeff = K(l, 16)) : console.error("Invalid RSA private key");
3046
3046
  }, r.prototype.generate = function(n, t) {
3047
- var e = new dn(), i = n >> 1;
3047
+ var e = new pn(), i = n >> 1;
3048
3048
  this.e = parseInt(t, 16);
3049
3049
  for (var s = new A(t, 16); ; ) {
3050
3050
  for (; this.p = new A(n - i, 1, e), !(this.p.subtract(A.ONE).gcd(s).compareTo(A.ONE) == 0 && this.p.isProbablePrime(10)); )
@@ -3062,10 +3062,10 @@ var Xa = (
3062
3062
  }
3063
3063
  }
3064
3064
  }, r.prototype.decrypt = function(n) {
3065
- var t = H(n, 16), e = this.doPrivate(t);
3065
+ var t = K(n, 16), e = this.doPrivate(t);
3066
3066
  return e == null ? null : $a(e, this.n.bitLength() + 7 >> 3);
3067
3067
  }, r.prototype.generateAsync = function(n, t, e) {
3068
- var i = new dn(), s = n >> 1;
3068
+ var i = new pn(), s = n >> 1;
3069
3069
  this.e = parseInt(t, 16);
3070
3070
  var a = new A(t, 16), c = this, l = function() {
3071
3071
  var h = function() {
@@ -3103,7 +3103,7 @@ var Xa = (
3103
3103
  var l = c.toString(16);
3104
3104
  return (l.length & 1) == 0 ? l : "0" + l;
3105
3105
  }, r.prototype.verify = function(n, t, e) {
3106
- var i = H(t, 16), s = this.doPublic(i);
3106
+ var i = K(t, 16), s = this.doPublic(i);
3107
3107
  if (s == null)
3108
3108
  return null;
3109
3109
  var a = s.toString(16).replace(/^1f+00/, ""), c = Ja(a);
@@ -3281,10 +3281,10 @@ m.asn1.ASN1Util = new function() {
3281
3281
  obj: _a
3282
3282
  });
3283
3283
  } else {
3284
- var ue = {};
3285
- if (_t.explicit !== void 0 && (ue.explicit = _t.explicit), _t.tag !== void 0 && (ue.tag = _t.tag), _t.obj === void 0)
3284
+ var de = {};
3285
+ if (_t.explicit !== void 0 && (de.explicit = _t.explicit), _t.tag !== void 0 && (de.tag = _t.tag), _t.obj === void 0)
3286
3286
  throw "obj shall be specified for 'tag'.";
3287
- return ue.obj = it(_t.obj), new q(ue);
3287
+ return de.obj = it(_t.obj), new q(de);
3288
3288
  }
3289
3289
  }
3290
3290
  }, this.jsonToASN1HEX = function(r) {
@@ -3606,27 +3606,27 @@ var Qa = /* @__PURE__ */ function() {
3606
3606
  }
3607
3607
  return n.prototype.parseKey = function(t) {
3608
3608
  try {
3609
- var e = 0, i = 0, s = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/, a = s.test(t) ? Na.decode(t) : un.unarmor(t), c = Fa.decode(a);
3609
+ var e = 0, i = 0, s = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/, a = s.test(t) ? Na.decode(t) : dn.unarmor(t), c = Fa.decode(a);
3610
3610
  if (c.sub.length === 3 && (c = c.sub[2].sub[0]), c.sub.length === 9) {
3611
- e = c.sub[1].getHexStringValue(), this.n = H(e, 16), i = c.sub[2].getHexStringValue(), this.e = parseInt(i, 16);
3611
+ e = c.sub[1].getHexStringValue(), this.n = K(e, 16), i = c.sub[2].getHexStringValue(), this.e = parseInt(i, 16);
3612
3612
  var l = c.sub[3].getHexStringValue();
3613
- this.d = H(l, 16);
3613
+ this.d = K(l, 16);
3614
3614
  var h = c.sub[4].getHexStringValue();
3615
- this.p = H(h, 16);
3615
+ this.p = K(h, 16);
3616
3616
  var p = c.sub[5].getHexStringValue();
3617
- this.q = H(p, 16);
3617
+ this.q = K(p, 16);
3618
3618
  var f = c.sub[6].getHexStringValue();
3619
- this.dmp1 = H(f, 16);
3619
+ this.dmp1 = K(f, 16);
3620
3620
  var y = c.sub[7].getHexStringValue();
3621
- this.dmq1 = H(y, 16);
3621
+ this.dmq1 = K(y, 16);
3622
3622
  var E = c.sub[8].getHexStringValue();
3623
- this.coeff = H(E, 16);
3623
+ this.coeff = K(E, 16);
3624
3624
  } else if (c.sub.length === 2)
3625
3625
  if (c.sub[0].sub) {
3626
3626
  var v = c.sub[1], S = v.sub[0];
3627
- e = S.sub[0].getHexStringValue(), this.n = H(e, 16), i = S.sub[1].getHexStringValue(), this.e = parseInt(i, 16);
3627
+ e = S.sub[0].getHexStringValue(), this.n = K(e, 16), i = S.sub[1].getHexStringValue(), this.e = parseInt(i, 16);
3628
3628
  } else
3629
- e = c.sub[0].getHexStringValue(), this.n = H(e, 16), i = c.sub[1].getHexStringValue(), this.e = parseInt(i, 16);
3629
+ e = c.sub[0].getHexStringValue(), this.n = K(e, 16), i = c.sub[1].getHexStringValue(), this.e = parseInt(i, 16);
3630
3630
  else
3631
3631
  return !1;
3632
3632
  return !0;
@@ -3694,7 +3694,7 @@ var Qa = /* @__PURE__ */ function() {
3694
3694
  this.n = t.n, this.e = t.e, t.hasOwnProperty("d") && (this.d = t.d, this.p = t.p, this.q = t.q, this.dmp1 = t.dmp1, this.dmq1 = t.dmq1, this.coeff = t.coeff);
3695
3695
  }, n;
3696
3696
  }(Xa)
3697
- ), Ye, Za = typeof process < "u" ? (Ye = process.env) === null || Ye === void 0 ? void 0 : Ye.npm_package_version : void 0, Ya = (
3697
+ ), tn, Za = typeof process < "u" ? (tn = process.env) === null || tn === void 0 ? void 0 : tn.npm_package_version : void 0, Ya = (
3698
3698
  /** @class */
3699
3699
  function() {
3700
3700
  function r(n) {
@@ -3755,12 +3755,12 @@ function Ki(r, n) {
3755
3755
  return r.apply(n, arguments);
3756
3756
  };
3757
3757
  }
3758
- const { toString: to } = Object.prototype, { getPrototypeOf: qn } = Object, qe = /* @__PURE__ */ ((r) => (n) => {
3758
+ const { toString: to } = Object.prototype, { getPrototypeOf: jn } = Object, qe = /* @__PURE__ */ ((r) => (n) => {
3759
3759
  const t = to.call(n);
3760
3760
  return r[t] || (r[t] = t.slice(8, -1).toLowerCase());
3761
- })(/* @__PURE__ */ Object.create(null)), mt = (r) => (r = r.toLowerCase(), (n) => qe(n) === r), je = (r) => (n) => typeof n === r, { isArray: Gt } = Array, oe = je("undefined");
3761
+ })(/* @__PURE__ */ Object.create(null)), mt = (r) => (r = r.toLowerCase(), (n) => qe(n) === r), je = (r) => (n) => typeof n === r, { isArray: Jt } = Array, ce = je("undefined");
3762
3762
  function eo(r) {
3763
- return r !== null && !oe(r) && r.constructor !== null && !oe(r.constructor) && ut(r.constructor.isBuffer) && r.constructor.isBuffer(r);
3763
+ return r !== null && !ce(r) && r.constructor !== null && !ce(r.constructor) && ut(r.constructor.isBuffer) && r.constructor.isBuffer(r);
3764
3764
  }
3765
3765
  const Wi = mt("ArrayBuffer");
3766
3766
  function no(r) {
@@ -3770,18 +3770,18 @@ function no(r) {
3770
3770
  const io = je("string"), ut = je("function"), zi = je("number"), He = (r) => r !== null && typeof r == "object", ro = (r) => r === !0 || r === !1, Ce = (r) => {
3771
3771
  if (qe(r) !== "object")
3772
3772
  return !1;
3773
- const n = qn(r);
3773
+ const n = jn(r);
3774
3774
  return (n === null || n === Object.prototype || Object.getPrototypeOf(n) === null) && !(Symbol.toStringTag in r) && !(Symbol.iterator in r);
3775
3775
  }, so = mt("Date"), ao = mt("File"), oo = mt("Blob"), co = mt("FileList"), lo = (r) => He(r) && ut(r.pipe), ho = (r) => {
3776
3776
  let n;
3777
3777
  return r && (typeof FormData == "function" && r instanceof FormData || ut(r.append) && ((n = qe(r)) === "formdata" || // detect form-data instance
3778
3778
  n === "object" && ut(r.toString) && r.toString() === "[object FormData]"));
3779
3779
  }, uo = mt("URLSearchParams"), [po, _o, fo, go] = ["ReadableStream", "Request", "Response", "Headers"].map(mt), bo = (r) => r.trim ? r.trim() : r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
3780
- function le(r, n, { allOwnKeys: t = !1 } = {}) {
3780
+ function he(r, n, { allOwnKeys: t = !1 } = {}) {
3781
3781
  if (r === null || typeof r > "u")
3782
3782
  return;
3783
3783
  let e, i;
3784
- if (typeof r != "object" && (r = [r]), Gt(r))
3784
+ if (typeof r != "object" && (r = [r]), Jt(r))
3785
3785
  for (e = 0, i = r.length; e < i; e++)
3786
3786
  n.call(null, r[e], e, r);
3787
3787
  else {
@@ -3800,17 +3800,17 @@ function Xi(r, n) {
3800
3800
  return i;
3801
3801
  return null;
3802
3802
  }
3803
- const Bt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, $i = (r) => !oe(r) && r !== Bt;
3804
- function pn() {
3803
+ const Mt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, $i = (r) => !ce(r) && r !== Mt;
3804
+ function _n() {
3805
3805
  const { caseless: r } = $i(this) && this || {}, n = {}, t = (e, i) => {
3806
3806
  const s = r && Xi(n, i) || i;
3807
- Ce(n[s]) && Ce(e) ? n[s] = pn(n[s], e) : Ce(e) ? n[s] = pn({}, e) : Gt(e) ? n[s] = e.slice() : n[s] = e;
3807
+ Ce(n[s]) && Ce(e) ? n[s] = _n(n[s], e) : Ce(e) ? n[s] = _n({}, e) : Jt(e) ? n[s] = e.slice() : n[s] = e;
3808
3808
  };
3809
3809
  for (let e = 0, i = arguments.length; e < i; e++)
3810
- arguments[e] && le(arguments[e], t);
3810
+ arguments[e] && he(arguments[e], t);
3811
3811
  return n;
3812
3812
  }
3813
- const yo = (r, n, t, { allOwnKeys: e } = {}) => (le(n, (i, s) => {
3813
+ const yo = (r, n, t, { allOwnKeys: e } = {}) => (he(n, (i, s) => {
3814
3814
  t && ut(i) ? r[s] = Ki(i, t) : r[s] = i;
3815
3815
  }, { allOwnKeys: e }), r), mo = (r) => (r.charCodeAt(0) === 65279 && (r = r.slice(1)), r), wo = (r, n, t, e) => {
3816
3816
  r.prototype = Object.create(n.prototype, e), r.prototype.constructor = r, Object.defineProperty(r, "super", {
@@ -3823,7 +3823,7 @@ const yo = (r, n, t, { allOwnKeys: e } = {}) => (le(n, (i, s) => {
3823
3823
  do {
3824
3824
  for (i = Object.getOwnPropertyNames(r), s = i.length; s-- > 0; )
3825
3825
  a = i[s], (!e || e(a, r, n)) && !c[a] && (n[a] = r[a], c[a] = !0);
3826
- r = t !== !1 && qn(r);
3826
+ r = t !== !1 && jn(r);
3827
3827
  } while (r && (!t || t(r, n)) && r !== Object.prototype);
3828
3828
  return n;
3829
3829
  }, Eo = (r, n, t) => {
@@ -3832,14 +3832,14 @@ const yo = (r, n, t, { allOwnKeys: e } = {}) => (le(n, (i, s) => {
3832
3832
  return e !== -1 && e === t;
3833
3833
  }, Po = (r) => {
3834
3834
  if (!r) return null;
3835
- if (Gt(r)) return r;
3835
+ if (Jt(r)) return r;
3836
3836
  let n = r.length;
3837
3837
  if (!zi(n)) return null;
3838
3838
  const t = new Array(n);
3839
3839
  for (; n-- > 0; )
3840
3840
  t[n] = r[n];
3841
3841
  return t;
3842
- }, Co = /* @__PURE__ */ ((r) => (n) => r && n instanceof r)(typeof Uint8Array < "u" && qn(Uint8Array)), To = (r, n) => {
3842
+ }, Co = /* @__PURE__ */ ((r) => (n) => r && n instanceof r)(typeof Uint8Array < "u" && jn(Uint8Array)), To = (r, n) => {
3843
3843
  const e = (r && r[Symbol.iterator]).call(r);
3844
3844
  let i;
3845
3845
  for (; (i = e.next()) && !i.done; ) {
@@ -3859,7 +3859,7 @@ const yo = (r, n, t, { allOwnKeys: e } = {}) => (le(n, (i, s) => {
3859
3859
  }
3860
3860
  ), ui = (({ hasOwnProperty: r }) => (n, t) => r.call(n, t))(Object.prototype), Ao = mt("RegExp"), Gi = (r, n) => {
3861
3861
  const t = Object.getOwnPropertyDescriptors(r), e = {};
3862
- le(t, (i, s) => {
3862
+ he(t, (i, s) => {
3863
3863
  let a;
3864
3864
  (a = n(i, s, r)) !== !1 && (e[s] = a || i);
3865
3865
  }), Object.defineProperties(r, e);
@@ -3884,7 +3884,7 @@ const yo = (r, n, t, { allOwnKeys: e } = {}) => (le(n, (i, s) => {
3884
3884
  t[s] = !0;
3885
3885
  });
3886
3886
  };
3887
- return Gt(r) ? e(r) : e(String(r).split(n)), t;
3887
+ return Jt(r) ? e(r) : e(String(r).split(n)), t;
3888
3888
  }, Io = () => {
3889
3889
  }, Oo = (r, n) => r != null && Number.isFinite(r = +r) ? r : n;
3890
3890
  function No(r) {
@@ -3897,25 +3897,25 @@ const Bo = (r) => {
3897
3897
  return;
3898
3898
  if (!("toJSON" in e)) {
3899
3899
  n[i] = e;
3900
- const s = Gt(e) ? [] : {};
3901
- return le(e, (a, c) => {
3900
+ const s = Jt(e) ? [] : {};
3901
+ return he(e, (a, c) => {
3902
3902
  const l = t(a, i + 1);
3903
- !oe(l) && (s[c] = l);
3903
+ !ce(l) && (s[c] = l);
3904
3904
  }), n[i] = void 0, s;
3905
3905
  }
3906
3906
  }
3907
3907
  return e;
3908
3908
  };
3909
3909
  return t(r, 0);
3910
- }, Mo = mt("AsyncFunction"), Fo = (r) => r && (He(r) || ut(r)) && ut(r.then) && ut(r.catch), Ji = ((r, n) => r ? setImmediate : n ? ((t, e) => (Bt.addEventListener("message", ({ source: i, data: s }) => {
3911
- i === Bt && s === t && e.length && e.shift()();
3910
+ }, Mo = mt("AsyncFunction"), Fo = (r) => r && (He(r) || ut(r)) && ut(r.then) && ut(r.catch), Ji = ((r, n) => r ? setImmediate : n ? ((t, e) => (Mt.addEventListener("message", ({ source: i, data: s }) => {
3911
+ i === Mt && s === t && e.length && e.shift()();
3912
3912
  }, !1), (i) => {
3913
- e.push(i), Bt.postMessage(t, "*");
3913
+ e.push(i), Mt.postMessage(t, "*");
3914
3914
  }))(`axios@${Math.random()}`, []) : (t) => setTimeout(t))(
3915
3915
  typeof setImmediate == "function",
3916
- ut(Bt.postMessage)
3917
- ), Uo = typeof queueMicrotask < "u" ? queueMicrotask.bind(Bt) : typeof process < "u" && process.nextTick || Ji, b = {
3918
- isArray: Gt,
3916
+ ut(Mt.postMessage)
3917
+ ), Uo = typeof queueMicrotask < "u" ? queueMicrotask.bind(Mt) : typeof process < "u" && process.nextTick || Ji, b = {
3918
+ isArray: Jt,
3919
3919
  isArrayBuffer: Wi,
3920
3920
  isBuffer: eo,
3921
3921
  isFormData: ho,
@@ -3929,7 +3929,7 @@ const Bo = (r) => {
3929
3929
  isRequest: _o,
3930
3930
  isResponse: fo,
3931
3931
  isHeaders: go,
3932
- isUndefined: oe,
3932
+ isUndefined: ce,
3933
3933
  isDate: so,
3934
3934
  isFile: ao,
3935
3935
  isBlob: oo,
@@ -3939,8 +3939,8 @@ const Bo = (r) => {
3939
3939
  isURLSearchParams: uo,
3940
3940
  isTypedArray: Co,
3941
3941
  isFileList: co,
3942
- forEach: le,
3943
- merge: pn,
3942
+ forEach: he,
3943
+ merge: _n,
3944
3944
  extend: yo,
3945
3945
  trim: bo,
3946
3946
  stripBOM: mo,
@@ -3963,7 +3963,7 @@ const Bo = (r) => {
3963
3963
  noop: Io,
3964
3964
  toFiniteNumber: Oo,
3965
3965
  findKey: Xi,
3966
- global: Bt,
3966
+ global: Mt,
3967
3967
  isContextDefined: $i,
3968
3968
  isSpecCompliantForm: No,
3969
3969
  toJSONObject: Bo,
@@ -4023,7 +4023,7 @@ x.from = (r, n, t, e, i, s) => {
4023
4023
  }, (c) => c !== "isAxiosError"), x.call(a, r.message, n, t, e, i), a.cause = r, a.name = r.name, s && Object.assign(a, s), a;
4024
4024
  };
4025
4025
  const Lo = null;
4026
- function _n(r) {
4026
+ function fn(r) {
4027
4027
  return b.isPlainObject(r) || b.isArray(r);
4028
4028
  }
4029
4029
  function Yi(r) {
@@ -4035,7 +4035,7 @@ function di(r, n, t) {
4035
4035
  }).join(t ? "." : "") : n;
4036
4036
  }
4037
4037
  function Vo(r) {
4038
- return b.isArray(r) && !r.some(_n);
4038
+ return b.isArray(r) && !r.some(fn);
4039
4039
  }
4040
4040
  const qo = b.toFlatObject(b, {}, null, function(n) {
4041
4041
  return /^is[A-Z]/.test(n);
@@ -4075,12 +4075,12 @@ function Ke(r, n, t) {
4075
4075
  );
4076
4076
  }), !1;
4077
4077
  }
4078
- return _n(v) ? !0 : (n.append(di(T, S, s), h(v)), !1);
4078
+ return fn(v) ? !0 : (n.append(di(T, S, s), h(v)), !1);
4079
4079
  }
4080
4080
  const f = [], y = Object.assign(qo, {
4081
4081
  defaultVisitor: p,
4082
4082
  convertValue: h,
4083
- isVisitable: _n
4083
+ isVisitable: fn
4084
4084
  });
4085
4085
  function E(v, S) {
4086
4086
  if (!b.isUndefined(v)) {
@@ -4115,10 +4115,10 @@ function pi(r) {
4115
4115
  return n[e];
4116
4116
  });
4117
4117
  }
4118
- function jn(r, n) {
4118
+ function Hn(r, n) {
4119
4119
  this._pairs = [], r && Ke(r, this, n);
4120
4120
  }
4121
- const tr = jn.prototype;
4121
+ const tr = Hn.prototype;
4122
4122
  tr.append = function(n, t) {
4123
4123
  this._pairs.push([n, t]);
4124
4124
  };
@@ -4142,7 +4142,7 @@ function er(r, n, t) {
4142
4142
  });
4143
4143
  const i = t && t.serialize;
4144
4144
  let s;
4145
- if (i ? s = i(n, t) : s = b.isURLSearchParams(n) ? n.toString() : new jn(n, t).toString(e), s) {
4145
+ if (i ? s = i(n, t) : s = b.isURLSearchParams(n) ? n.toString() : new Hn(n, t).toString(e), s) {
4146
4146
  const a = r.indexOf("#");
4147
4147
  a !== -1 && (r = r.slice(0, a)), r += (r.indexOf("?") === -1 ? "?" : "&") + s;
4148
4148
  }
@@ -4206,7 +4206,7 @@ const nr = {
4206
4206
  silentJSONParsing: !0,
4207
4207
  forcedJSONParsing: !0,
4208
4208
  clarifyTimeoutError: !1
4209
- }, Ho = typeof URLSearchParams < "u" ? URLSearchParams : jn, Ko = typeof FormData < "u" ? FormData : null, Wo = typeof Blob < "u" ? Blob : null, zo = {
4209
+ }, Ho = typeof URLSearchParams < "u" ? URLSearchParams : Hn, Ko = typeof FormData < "u" ? FormData : null, Wo = typeof Blob < "u" ? Blob : null, zo = {
4210
4210
  isBrowser: !0,
4211
4211
  classes: {
4212
4212
  URLSearchParams: Ho,
@@ -4214,13 +4214,13 @@ const nr = {
4214
4214
  Blob: Wo
4215
4215
  },
4216
4216
  protocols: ["http", "https", "file", "blob", "url", "data"]
4217
- }, Hn = typeof window < "u" && typeof document < "u", fn = typeof navigator == "object" && navigator || void 0, Xo = Hn && (!fn || ["ReactNative", "NativeScript", "NS"].indexOf(fn.product) < 0), $o = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
4218
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Go = Hn && window.location.href || "http://localhost", Jo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4217
+ }, Kn = typeof window < "u" && typeof document < "u", gn = typeof navigator == "object" && navigator || void 0, Xo = Kn && (!gn || ["ReactNative", "NativeScript", "NS"].indexOf(gn.product) < 0), $o = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
4218
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Go = Kn && window.location.href || "http://localhost", Jo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4219
4219
  __proto__: null,
4220
- hasBrowserEnv: Hn,
4220
+ hasBrowserEnv: Kn,
4221
4221
  hasStandardBrowserEnv: Xo,
4222
4222
  hasStandardBrowserWebWorkerEnv: $o,
4223
- navigator: fn,
4223
+ navigator: gn,
4224
4224
  origin: Go
4225
4225
  }, Symbol.toStringTag, { value: "Module" })), et = {
4226
4226
  ...Jo,
@@ -4270,7 +4270,7 @@ function tc(r, n, t) {
4270
4270
  }
4271
4271
  return (t || JSON.stringify)(r);
4272
4272
  }
4273
- const he = {
4273
+ const ue = {
4274
4274
  transitional: nr,
4275
4275
  adapter: ["xhr", "http", "fetch"],
4276
4276
  transformRequest: [function(n, t) {
@@ -4299,7 +4299,7 @@ const he = {
4299
4299
  return s || i ? (t.setContentType("application/json", !1), tc(n)) : n;
4300
4300
  }],
4301
4301
  transformResponse: [function(n) {
4302
- const t = this.transitional || he.transitional, e = t && t.forcedJSONParsing, i = this.responseType === "json";
4302
+ const t = this.transitional || ue.transitional, e = t && t.forcedJSONParsing, i = this.responseType === "json";
4303
4303
  if (b.isResponse(n) || b.isReadableStream(n))
4304
4304
  return n;
4305
4305
  if (n && b.isString(n) && (e && !this.responseType || i)) {
@@ -4337,7 +4337,7 @@ const he = {
4337
4337
  }
4338
4338
  };
4339
4339
  b.forEach(["delete", "get", "head", "post", "put", "patch"], (r) => {
4340
- he.headers[r] = {};
4340
+ ue.headers[r] = {};
4341
4341
  });
4342
4342
  const ec = b.toObjectSet([
4343
4343
  "age",
@@ -4365,7 +4365,7 @@ const ec = b.toObjectSet([
4365
4365
  i = a.indexOf(":"), t = a.substring(0, i).trim().toLowerCase(), e = a.substring(i + 1).trim(), !(!t || n[t] && ec[t]) && (t === "set-cookie" ? n[t] ? n[t].push(e) : n[t] = [e] : n[t] = n[t] ? n[t] + ", " + e : e);
4366
4366
  }), n;
4367
4367
  }, fi = Symbol("internals");
4368
- function Qt(r) {
4368
+ function Zt(r) {
4369
4369
  return r && String(r).trim().toLowerCase();
4370
4370
  }
4371
4371
  function Te(r) {
@@ -4379,7 +4379,7 @@ function ic(r) {
4379
4379
  return n;
4380
4380
  }
4381
4381
  const rc = (r) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());
4382
- function tn(r, n, t, e, i) {
4382
+ function en(r, n, t, e, i) {
4383
4383
  if (b.isFunction(e))
4384
4384
  return e.call(this, n, t);
4385
4385
  if (i && (n = t), !!b.isString(n)) {
@@ -4410,7 +4410,7 @@ let ct = class {
4410
4410
  set(n, t, e) {
4411
4411
  const i = this;
4412
4412
  function s(c, l, h) {
4413
- const p = Qt(l);
4413
+ const p = Zt(l);
4414
4414
  if (!p)
4415
4415
  throw new Error("header name must be a non-empty string");
4416
4416
  const f = b.findKey(i, p);
@@ -4429,7 +4429,7 @@ let ct = class {
4429
4429
  return this;
4430
4430
  }
4431
4431
  get(n, t) {
4432
- if (n = Qt(n), n) {
4432
+ if (n = Zt(n), n) {
4433
4433
  const e = b.findKey(this, n);
4434
4434
  if (e) {
4435
4435
  const i = this[e];
@@ -4446,9 +4446,9 @@ let ct = class {
4446
4446
  }
4447
4447
  }
4448
4448
  has(n, t) {
4449
- if (n = Qt(n), n) {
4449
+ if (n = Zt(n), n) {
4450
4450
  const e = b.findKey(this, n);
4451
- return !!(e && this[e] !== void 0 && (!t || tn(this, this[e], e, t)));
4451
+ return !!(e && this[e] !== void 0 && (!t || en(this, this[e], e, t)));
4452
4452
  }
4453
4453
  return !1;
4454
4454
  }
@@ -4456,9 +4456,9 @@ let ct = class {
4456
4456
  const e = this;
4457
4457
  let i = !1;
4458
4458
  function s(a) {
4459
- if (a = Qt(a), a) {
4459
+ if (a = Zt(a), a) {
4460
4460
  const c = b.findKey(e, a);
4461
- c && (!t || tn(e, e[c], c, t)) && (delete e[c], i = !0);
4461
+ c && (!t || en(e, e[c], c, t)) && (delete e[c], i = !0);
4462
4462
  }
4463
4463
  }
4464
4464
  return b.isArray(n) ? n.forEach(s) : s(n), i;
@@ -4468,7 +4468,7 @@ let ct = class {
4468
4468
  let e = t.length, i = !1;
4469
4469
  for (; e--; ) {
4470
4470
  const s = t[e];
4471
- (!n || tn(this, this[s], s, n, !0)) && (delete this[s], i = !0);
4471
+ (!n || en(this, this[s], s, n, !0)) && (delete this[s], i = !0);
4472
4472
  }
4473
4473
  return i;
4474
4474
  }
@@ -4515,7 +4515,7 @@ let ct = class {
4515
4515
  accessors: {}
4516
4516
  }).accessors, i = this.prototype;
4517
4517
  function s(a) {
4518
- const c = Qt(a);
4518
+ const c = Zt(a);
4519
4519
  e[c] || (ac(i, a), e[c] = !0);
4520
4520
  }
4521
4521
  return b.isArray(n) ? n.forEach(s) : s(n), this;
@@ -4532,8 +4532,8 @@ b.reduceDescriptors(ct.prototype, ({ value: r }, n) => {
4532
4532
  };
4533
4533
  });
4534
4534
  b.freezeMethods(ct);
4535
- function en(r, n) {
4536
- const t = this || he, e = n || t, i = ct.from(e.headers);
4535
+ function nn(r, n) {
4536
+ const t = this || ue, e = n || t, i = ct.from(e.headers);
4537
4537
  let s = e.data;
4538
4538
  return b.forEach(r, function(c) {
4539
4539
  s = c.call(t, s, i.normalize(), n ? n.status : void 0);
@@ -4542,10 +4542,10 @@ function en(r, n) {
4542
4542
  function rr(r) {
4543
4543
  return !!(r && r.__CANCEL__);
4544
4544
  }
4545
- function Jt(r, n, t) {
4545
+ function Qt(r, n, t) {
4546
4546
  x.call(this, r ?? "canceled", x.ERR_CANCELED, n, t), this.name = "CanceledError";
4547
4547
  }
4548
- b.inherits(Jt, x, {
4548
+ b.inherits(Qt, x, {
4549
4549
  __CANCEL__: !0
4550
4550
  });
4551
4551
  function sr(r, n, t) {
@@ -4657,7 +4657,7 @@ function ar(r, n, t) {
4657
4657
  return r && e || t == !1 ? pc(r, n) : n;
4658
4658
  }
4659
4659
  const yi = (r) => r instanceof ct ? { ...r } : r;
4660
- function Ut(r, n) {
4660
+ function Lt(r, n) {
4661
4661
  n = n || {};
4662
4662
  const t = {};
4663
4663
  function e(h, p, f, y) {
@@ -4722,7 +4722,7 @@ function Ut(r, n) {
4722
4722
  }), t;
4723
4723
  }
4724
4724
  const or = (r) => {
4725
- const n = Ut({}, r);
4725
+ const n = Lt({}, r);
4726
4726
  let { data: t, withXSRFToken: e, xsrfHeaderName: i, xsrfCookieName: s, headers: a, auth: c } = n;
4727
4727
  n.headers = a = ct.from(a), n.url = er(ar(n.baseURL, n.url), r.params, r.paramsSerializer), c && a.set(
4728
4728
  "Authorization",
@@ -4790,7 +4790,7 @@ const or = (r) => {
4790
4790
  }, s === void 0 && a.setContentType(null), "setRequestHeader" in T && b.forEach(a.toJSON(), function(it, G) {
4791
4791
  T.setRequestHeader(G, it);
4792
4792
  }), b.isUndefined(i.withCredentials) || (T.withCredentials = !!i.withCredentials), c && c !== "json" && (T.responseType = i.responseType), h && ([y, v] = Fe(h, !0), T.addEventListener("progress", y)), l && T.upload && ([f, E] = Fe(l), T.upload.addEventListener("progress", f), T.upload.addEventListener("loadend", E)), (i.cancelToken || i.signal) && (p = (q) => {
4793
- T && (e(!q || q.type ? new Jt(null, r, T) : q), T.abort(), T = null);
4793
+ T && (e(!q || q.type ? new Qt(null, r, T) : q), T.abort(), T = null);
4794
4794
  }, i.cancelToken && i.cancelToken.subscribe(p), i.signal && (i.signal.aborted ? p() : i.signal.addEventListener("abort", p)));
4795
4795
  const F = oc(i.url);
4796
4796
  if (F && et.protocols.indexOf(F) === -1) {
@@ -4807,7 +4807,7 @@ const or = (r) => {
4807
4807
  if (!i) {
4808
4808
  i = !0, c();
4809
4809
  const p = h instanceof Error ? h : this.reason;
4810
- e.abort(p instanceof x ? p : new Jt(p instanceof Error ? p.message : p));
4810
+ e.abort(p instanceof x ? p : new Qt(p instanceof Error ? p.message : p));
4811
4811
  }
4812
4812
  };
4813
4813
  let a = n && setTimeout(() => {
@@ -4895,8 +4895,8 @@ const or = (r) => {
4895
4895
  }
4896
4896
  }).headers.has("Content-Type");
4897
4897
  return r && !n;
4898
- }), wi = 64 * 1024, gn = cr && lr(() => b.isReadableStream(new Response("").body)), Ue = {
4899
- stream: gn && ((r) => r.body)
4898
+ }), wi = 64 * 1024, bn = cr && lr(() => b.isReadableStream(new Response("").body)), Ue = {
4899
+ stream: bn && ((r) => r.body)
4900
4900
  };
4901
4901
  We && ((r) => {
4902
4902
  ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((n) => {
@@ -4970,8 +4970,8 @@ const Ec = async (r) => {
4970
4970
  credentials: U ? f : void 0
4971
4971
  });
4972
4972
  let F = await fetch(v);
4973
- const q = gn && (h === "stream" || h === "response");
4974
- if (gn && (c || q && S)) {
4973
+ const q = bn && (h === "stream" || h === "response");
4974
+ if (bn && (c || q && S)) {
4975
4975
  const G = {};
4976
4976
  ["status", "statusText", "headers"].forEach((vt) => {
4977
4977
  G[vt] = F[vt];
@@ -5007,12 +5007,12 @@ const Ec = async (r) => {
5007
5007
  }
5008
5008
  ) : x.from(U, U && U.code, r, v);
5009
5009
  }
5010
- }), bn = {
5010
+ }), yn = {
5011
5011
  http: Lo,
5012
5012
  xhr: fc,
5013
5013
  fetch: Cc
5014
5014
  };
5015
- b.forEach(bn, (r, n) => {
5015
+ b.forEach(yn, (r, n) => {
5016
5016
  if (r) {
5017
5017
  try {
5018
5018
  Object.defineProperty(r, "name", { value: n });
@@ -5030,7 +5030,7 @@ const vi = (r) => `- ${r}`, Tc = (r) => b.isFunction(r) || r === null || r === !
5030
5030
  for (let s = 0; s < n; s++) {
5031
5031
  t = r[s];
5032
5032
  let a;
5033
- if (e = t, !Tc(t) && (e = bn[(a = String(t)).toLowerCase()], e === void 0))
5033
+ if (e = t, !Tc(t) && (e = yn[(a = String(t)).toLowerCase()], e === void 0))
5034
5034
  throw new x(`Unknown adapter '${a}'`);
5035
5035
  if (e)
5036
5036
  break;
@@ -5050,24 +5050,24 @@ const vi = (r) => `- ${r}`, Tc = (r) => b.isFunction(r) || r === null || r === !
5050
5050
  }
5051
5051
  return e;
5052
5052
  },
5053
- adapters: bn
5053
+ adapters: yn
5054
5054
  };
5055
- function nn(r) {
5055
+ function rn(r) {
5056
5056
  if (r.cancelToken && r.cancelToken.throwIfRequested(), r.signal && r.signal.aborted)
5057
- throw new Jt(null, r);
5057
+ throw new Qt(null, r);
5058
5058
  }
5059
5059
  function Ei(r) {
5060
- return nn(r), r.headers = ct.from(r.headers), r.data = en.call(
5060
+ return rn(r), r.headers = ct.from(r.headers), r.data = nn.call(
5061
5061
  r,
5062
5062
  r.transformRequest
5063
- ), ["post", "put", "patch"].indexOf(r.method) !== -1 && r.headers.setContentType("application/x-www-form-urlencoded", !1), hr.getAdapter(r.adapter || he.adapter)(r).then(function(e) {
5064
- return nn(r), e.data = en.call(
5063
+ ), ["post", "put", "patch"].indexOf(r.method) !== -1 && r.headers.setContentType("application/x-www-form-urlencoded", !1), hr.getAdapter(r.adapter || ue.adapter)(r).then(function(e) {
5064
+ return rn(r), e.data = nn.call(
5065
5065
  r,
5066
5066
  r.transformResponse,
5067
5067
  e
5068
5068
  ), e.headers = ct.from(e.headers), e;
5069
5069
  }, function(e) {
5070
- return rr(e) || (nn(r), e && e.response && (e.response.data = en.call(
5070
+ return rr(e) || (rn(r), e && e.response && (e.response.data = nn.call(
5071
5071
  r,
5072
5072
  r.transformResponse,
5073
5073
  e.response
@@ -5123,7 +5123,7 @@ const Se = {
5123
5123
  assertOptions: Sc,
5124
5124
  validators: ze
5125
5125
  }, Et = Se.validators;
5126
- let Ft = class {
5126
+ let Ut = class {
5127
5127
  constructor(n) {
5128
5128
  this.defaults = n, this.interceptors = {
5129
5129
  request: new _i(),
@@ -5156,7 +5156,7 @@ let Ft = class {
5156
5156
  }
5157
5157
  }
5158
5158
  _request(n, t) {
5159
- typeof n == "string" ? (t = t || {}, t.url = n) : t = n || {}, t = Ut(this.defaults, t);
5159
+ typeof n == "string" ? (t = t || {}, t.url = n) : t = n || {}, t = Lt(this.defaults, t);
5160
5160
  const { transitional: e, paramsSerializer: i, headers: s } = t;
5161
5161
  e !== void 0 && Se.assertOptions(e, {
5162
5162
  silentJSONParsing: Et.transitional(Et.boolean),
@@ -5218,14 +5218,14 @@ let Ft = class {
5218
5218
  return p;
5219
5219
  }
5220
5220
  getUri(n) {
5221
- n = Ut(this.defaults, n);
5221
+ n = Lt(this.defaults, n);
5222
5222
  const t = ar(n.baseURL, n.url, n.allowAbsoluteUrls);
5223
5223
  return er(t, n.params, n.paramsSerializer);
5224
5224
  }
5225
5225
  };
5226
5226
  b.forEach(["delete", "get", "head", "options"], function(n) {
5227
- Ft.prototype[n] = function(t, e) {
5228
- return this.request(Ut(e || {}, {
5227
+ Ut.prototype[n] = function(t, e) {
5228
+ return this.request(Lt(e || {}, {
5229
5229
  method: n,
5230
5230
  url: t,
5231
5231
  data: (e || {}).data
@@ -5235,7 +5235,7 @@ b.forEach(["delete", "get", "head", "options"], function(n) {
5235
5235
  b.forEach(["post", "put", "patch"], function(n) {
5236
5236
  function t(e) {
5237
5237
  return function(s, a, c) {
5238
- return this.request(Ut(c || {}, {
5238
+ return this.request(Lt(c || {}, {
5239
5239
  method: n,
5240
5240
  headers: e ? {
5241
5241
  "Content-Type": "multipart/form-data"
@@ -5245,7 +5245,7 @@ b.forEach(["post", "put", "patch"], function(n) {
5245
5245
  }));
5246
5246
  };
5247
5247
  }
5248
- Ft.prototype[n] = t(), Ft.prototype[n + "Form"] = t(!0);
5248
+ Ut.prototype[n] = t(), Ut.prototype[n + "Form"] = t(!0);
5249
5249
  });
5250
5250
  let kc = class dr {
5251
5251
  constructor(n) {
@@ -5271,7 +5271,7 @@ let kc = class dr {
5271
5271
  e.unsubscribe(s);
5272
5272
  }, a;
5273
5273
  }, n(function(s, a, c) {
5274
- e.reason || (e.reason = new Jt(s, a, c), t(e.reason));
5274
+ e.reason || (e.reason = new Qt(s, a, c), t(e.reason));
5275
5275
  });
5276
5276
  }
5277
5277
  /**
@@ -5328,7 +5328,7 @@ function xc(r) {
5328
5328
  function Ac(r) {
5329
5329
  return b.isObject(r) && r.isAxiosError === !0;
5330
5330
  }
5331
- const yn = {
5331
+ const mn = {
5332
5332
  Continue: 100,
5333
5333
  SwitchingProtocols: 101,
5334
5334
  Processing: 102,
@@ -5393,18 +5393,18 @@ const yn = {
5393
5393
  NotExtended: 510,
5394
5394
  NetworkAuthenticationRequired: 511
5395
5395
  };
5396
- Object.entries(yn).forEach(([r, n]) => {
5397
- yn[n] = r;
5396
+ Object.entries(mn).forEach(([r, n]) => {
5397
+ mn[n] = r;
5398
5398
  });
5399
5399
  function pr(r) {
5400
- const n = new Ft(r), t = Ki(Ft.prototype.request, n);
5401
- return b.extend(t, Ft.prototype, n, { allOwnKeys: !0 }), b.extend(t, n, null, { allOwnKeys: !0 }), t.create = function(i) {
5402
- return pr(Ut(r, i));
5400
+ const n = new Ut(r), t = Ki(Ut.prototype.request, n);
5401
+ return b.extend(t, Ut.prototype, n, { allOwnKeys: !0 }), b.extend(t, n, null, { allOwnKeys: !0 }), t.create = function(i) {
5402
+ return pr(Lt(r, i));
5403
5403
  }, t;
5404
5404
  }
5405
- const V = pr(he);
5406
- V.Axios = Ft;
5407
- V.CanceledError = Jt;
5405
+ const V = pr(ue);
5406
+ V.Axios = Ut;
5407
+ V.CanceledError = Qt;
5408
5408
  V.CancelToken = kc;
5409
5409
  V.isCancel = rr;
5410
5410
  V.VERSION = ur;
@@ -5416,11 +5416,11 @@ V.all = function(n) {
5416
5416
  };
5417
5417
  V.spread = xc;
5418
5418
  V.isAxiosError = Ac;
5419
- V.mergeConfig = Ut;
5419
+ V.mergeConfig = Lt;
5420
5420
  V.AxiosHeaders = ct;
5421
5421
  V.formToJSON = (r) => ir(b.isHTMLForm(r) ? new FormData(r) : r);
5422
5422
  V.getAdapter = hr.getAdapter;
5423
- V.HttpStatusCode = yn;
5423
+ V.HttpStatusCode = mn;
5424
5424
  V.default = V;
5425
5425
  const {
5426
5426
  Axios: Mc,
@@ -5440,8 +5440,8 @@ const {
5440
5440
  getAdapter: Jc,
5441
5441
  mergeConfig: Qc
5442
5442
  } = V;
5443
- var _, _r, fr, gr, mn, br, yr, mr, wr, vr, Er, Pr, Cr, Tr, Sr, te, ee, kr, ne, xr, Nt, Ar, z, Dr, Rr, wn, Ir, Or, Nr, vn, En, ie, Pn, Br, ft, gt, ke, Cn, re, Tn, Sn, Mr, kn, xn, Fr, Ur, Ht, An, Lr, Vr, qr, xe, jr, Hr, Dn, Kr, Wr, zr, Xr, $r, Gr, Jr, Qr, Zr, Rn, In, Yr, ts, es;
5444
- class Zc extends Lt {
5443
+ var _, _r, fr, gr, wn, br, yr, mr, wr, vr, Er, Pr, Cr, Tr, Sr, ee, ne, kr, ie, xr, Bt, Ar, z, Dr, Rr, vn, Ir, Or, Nr, En, Pn, re, Cn, Br, ft, gt, ke, Tn, se, Sn, kn, Mr, xn, An, Fr, Ur, Kt, Dn, Lr, Vr, qr, xe, jr, Hr, Rn, Kr, Wr, zr, Xr, $r, Gr, Jr, Qr, Zr, In, On, Yr, ts, es;
5444
+ class Zc extends Vt {
5445
5445
  constructor({
5446
5446
  filters: t = null,
5447
5447
  config_port: e = null,
@@ -5619,10 +5619,10 @@ class Zc extends Lt {
5619
5619
  let a = o(this, _, gr).call(this, s);
5620
5620
  switch (this.__pinPad__.buffer = s, e.parsed = a, e.code = s, e.request) {
5621
5621
  case "connect":
5622
- e.name = "connected", e.description = "Connection established", e.no_code = 100, o(this, _, mn).call(this, a, s);
5622
+ e.name = "connected", e.description = "Connection established", e.no_code = 100, o(this, _, wn).call(this, a, s);
5623
5623
  break;
5624
5624
  case "about":
5625
- e.name = "About PinPad", e.description = "Response of about", e.no_code = 101, o(this, _, mn).call(this, a, s);
5625
+ e.name = "About PinPad", e.description = "Response of about", e.no_code = 101, o(this, _, wn).call(this, a, s);
5626
5626
  break;
5627
5627
  case "inject":
5628
5628
  e.name = "Inject", e.description = "Response of inject values", e.no_code = 102, o(this, _, br).call(this, a, s);
@@ -5701,7 +5701,7 @@ class Zc extends Lt {
5701
5701
  return parseFloat(this.__pinPad__.operation.amount) || 0;
5702
5702
  }
5703
5703
  set reference(t) {
5704
- if (!o(this, _, Pn).call(this, t.trim())) throw new Error("Invalid reference");
5704
+ if (!o(this, _, Cn).call(this, t.trim())) throw new Error("Invalid reference");
5705
5705
  this.__pinPad__.operation.reference = t.trim().toString().replaceAll(" ", "").toUpperCase();
5706
5706
  }
5707
5707
  get reference() {
@@ -5752,7 +5752,7 @@ class Zc extends Lt {
5752
5752
  localStorage.removeItem("ppLoginResponse"), localStorage.removeItem("ppRSAKey"), localStorage.removeItem("ppPublicIP");
5753
5753
  }
5754
5754
  async checkPositionPermission() {
5755
- if (!Wn())
5755
+ if (!zn())
5756
5756
  throw new Error("Geolocation not supported");
5757
5757
  return new Promise((t, e) => {
5758
5758
  navigator.permissions.query({ name: "geolocation" }).then((i) => {
@@ -5769,7 +5769,7 @@ class Zc extends Lt {
5769
5769
  async print(t = "client") {
5770
5770
  this.__pinPad__.operation.errors = 0;
5771
5771
  const e = this.__pinPad__.constants.STX, i = this.__pinPad__.constants.ETX;
5772
- this.__pinPad__.operation.commerceVoucher.includes(":") || (this.__pinPad__.operation.commerceVoucher = o(this, _, Nt).call(this, this.__pinPad__.config.RC4Key, this.__pinPad__.operation.commerceVoucher)), this.__pinPad__.operation.clientVoucher.includes(":") || (this.__pinPad__.operation.clientVoucher = o(this, _, Nt).call(this, this.__pinPad__.config.RC4Key, this.__pinPad__.operation.clientVoucher));
5772
+ this.__pinPad__.operation.commerceVoucher.includes(":") || (this.__pinPad__.operation.commerceVoucher = o(this, _, Bt).call(this, this.__pinPad__.config.RC4Key, this.__pinPad__.operation.commerceVoucher)), this.__pinPad__.operation.clientVoucher.includes(":") || (this.__pinPad__.operation.clientVoucher = o(this, _, Bt).call(this, this.__pinPad__.config.RC4Key, this.__pinPad__.operation.clientVoucher));
5773
5773
  let s = t === "client" ? this.__pinPad__.operation.clientVoucher : this.__pinPad__.operation.commerceVoucher;
5774
5774
  if (s.length === 0) {
5775
5775
  this.dispatch("pp:print", {
@@ -5796,7 +5796,7 @@ class Zc extends Lt {
5796
5796
  * @return {Promise<any>}
5797
5797
  */
5798
5798
  async consult({ reference: t = null }) {
5799
- return t || (t = this.reference), Tt(t) && (t = "--", this.reference = t), o(this, _, Br).call(this, this.reference), this.__pinPad__.operation.consultDate = (/* @__PURE__ */ new Date()).toLocaleDateString("en-GB"), await o(this, _, re).call(this, {
5799
+ return t || (t = this.reference), St(t) && (t = "--", this.reference = t), o(this, _, Br).call(this, this.reference), this.__pinPad__.operation.consultDate = (/* @__PURE__ */ new Date()).toLocaleDateString("en-GB"), await o(this, _, se).call(this, {
5800
5800
  Ambiente: this.environment,
5801
5801
  User: this.username,
5802
5802
  Pwd: this.password,
@@ -5804,7 +5804,7 @@ class Zc extends Lt {
5804
5804
  IdCompany: this.__pinPad__.config.idCompany,
5805
5805
  Country: this.__pinPad__.config.country,
5806
5806
  Tx_Date: this.__pinPad__.operation.consultDate
5807
- }), o(this, _, Ht).call(this, this.url + this.__pinPad__.constants.uris.consult, {
5807
+ }), o(this, _, Kt).call(this, this.url + this.__pinPad__.constants.uris.consult, {
5808
5808
  user: this.username.toUpperCase(),
5809
5809
  pwd: this.password.toUpperCase(),
5810
5810
  id_branch: this.__pinPad__.config.idBranch.toUpperCase(),
@@ -5818,7 +5818,7 @@ class Zc extends Lt {
5818
5818
  * @return {Promise<any>}
5819
5819
  */
5820
5820
  async rePrint({ folio: t = null } = {}) {
5821
- t === null && (t = this.__pinPad__.operation.folio || ""), o(this, _, Tn).call(this, t), await o(this, _, re).call(this, {
5821
+ t === null && (t = this.__pinPad__.operation.folio || ""), o(this, _, Sn).call(this, t), await o(this, _, se).call(this, {
5822
5822
  Ambiente: this.environment,
5823
5823
  User: this.username,
5824
5824
  Pwd: this.password,
@@ -5827,7 +5827,7 @@ class Zc extends Lt {
5827
5827
  Country: this.__pinPad__.config.country,
5828
5828
  Tx_OperationNumber: t
5829
5829
  });
5830
- const e = await o(this, _, Ht).call(this, this.url + this.__pinPad__.constants.uris.rePrint, {
5830
+ const e = await o(this, _, Kt).call(this, this.url + this.__pinPad__.constants.uris.rePrint, {
5831
5831
  REPRINTVOUCHER: {
5832
5832
  business: {
5833
5833
  country: this.__pinPad__.config.country.toUpperCase(),
@@ -5841,13 +5841,13 @@ class Zc extends Lt {
5841
5841
  }
5842
5842
  });
5843
5843
  let i = e.voucher_comercio;
5844
- return this.__pinPad__.operation.commerceVoucher = "", i && (e.voucher_comercio.includes(":") ? this.__pinPad__.operation.commerceVoucher = e.voucher_comercio : this.__pinPad__.operation.commerceVoucher = o(this, _, Nt).call(this, this.__pinPad__.config.RC4Key, e.voucher_comercio)), i = e.voucher_cliente, this.__pinPad__.operation.clientVoucher = "", i && (e.voucher_cliente.includes(":") ? this.__pinPad__.operation.clientVoucher = e.voucher_cliente : this.__pinPad__.operation.clientVoucher = o(this, _, Nt).call(this, this.__pinPad__.config.RC4Key, e.voucher_cliente)), e;
5844
+ return this.__pinPad__.operation.commerceVoucher = "", i && (e.voucher_comercio.includes(":") ? this.__pinPad__.operation.commerceVoucher = e.voucher_comercio : this.__pinPad__.operation.commerceVoucher = o(this, _, Bt).call(this, this.__pinPad__.config.RC4Key, e.voucher_comercio)), i = e.voucher_cliente, this.__pinPad__.operation.clientVoucher = "", i && (e.voucher_cliente.includes(":") ? this.__pinPad__.operation.clientVoucher = e.voucher_cliente : this.__pinPad__.operation.clientVoucher = o(this, _, Bt).call(this, this.__pinPad__.config.RC4Key, e.voucher_cliente)), e;
5845
5845
  }
5846
5846
  async cancelPurchase({ amount: t = 0, authorization: e = "", folio: i = "" } = {}) {
5847
- if (!o(this, _, Cn).call(this, t)) throw new Error("Invalid amount");
5847
+ if (!o(this, _, Tn).call(this, t)) throw new Error("Invalid amount");
5848
5848
  if (!o(this, _, $r).call(this, e)) throw new Error("Invalid authorization");
5849
- if (!o(this, _, Tn).call(this, i)) throw new Error("Invalid folio");
5850
- t = o(this, _, Dn).call(this, t, 2);
5849
+ if (!o(this, _, Sn).call(this, i)) throw new Error("Invalid folio");
5850
+ t = o(this, _, Rn).call(this, t, 2);
5851
5851
  const s = {
5852
5852
  Ambiente: this.environment,
5853
5853
  User: this.username,
@@ -5860,8 +5860,8 @@ class Zc extends Lt {
5860
5860
  Tx_Auth: e,
5861
5861
  Amount: t
5862
5862
  };
5863
- await o(this, _, re).call(this, s);
5864
- const a = o(this, _, Ht).call(this, this.url + this.__pinPad__.constants.uris.cancellation, {
5863
+ await o(this, _, se).call(this, s);
5864
+ const a = o(this, _, Kt).call(this, this.url + this.__pinPad__.constants.uris.cancellation, {
5865
5865
  VMCAMEXMCANCELACION: {
5866
5866
  business: {
5867
5867
  country: this.__pinPad__.config.country.toUpperCase(),
@@ -5880,7 +5880,7 @@ class Zc extends Lt {
5880
5880
  }
5881
5881
  }
5882
5882
  });
5883
- return this.__pinPad__.operation.commerceVoucher = "", a.voucher_comercio && (a.voucher_comercio.includes(":") ? this.__pinPad__.operation.commerceVoucher = a.voucher_comercio : this.__pinPad__.operation.commerceVoucher = o(this, _, Nt).call(this, this.__pinPad__.config.RC4Key, a.voucher_comercio)), this.__pinPad__.operation.clientVoucher = "", a.voucher_cliente && (a.voucher_cliente.includes(":") ? this.__pinPad__.operation.clientVoucher = a.voucher_cliente : this.__pinPad__.operation.clientVoucher = o(this, _, Nt).call(this, this.__pinPad__.config.RC4Key, a.voucher_cliente)), JSON.stringify(a);
5883
+ return this.__pinPad__.operation.commerceVoucher = "", a.voucher_comercio && (a.voucher_comercio.includes(":") ? this.__pinPad__.operation.commerceVoucher = a.voucher_comercio : this.__pinPad__.operation.commerceVoucher = o(this, _, Bt).call(this, this.__pinPad__.config.RC4Key, a.voucher_comercio)), this.__pinPad__.operation.clientVoucher = "", a.voucher_cliente && (a.voucher_cliente.includes(":") ? this.__pinPad__.operation.clientVoucher = a.voucher_cliente : this.__pinPad__.operation.clientVoucher = o(this, _, Bt).call(this, this.__pinPad__.config.RC4Key, a.voucher_cliente)), JSON.stringify(a);
5884
5884
  }
5885
5885
  // ========================================================================================
5886
5886
  // Needed for WS v4
@@ -5893,7 +5893,7 @@ class Zc extends Lt {
5893
5893
  async makeSale({ amount: t = 0, reference: e = null } = {}) {
5894
5894
  if (t = parseFloat(t.toString()), isNaN(t) || t <= 0)
5895
5895
  throw new Error("Amount is required and must be greater than 0");
5896
- if (this.amount = t, !e || Tt(e) || !o(this, _, Pn).call(this, e))
5896
+ if (this.amount = t, !e || St(e) || !o(this, _, Cn).call(this, e))
5897
5897
  throw new Error("Reference is required and must be alphanumeric");
5898
5898
  if (this.reference = e, /^[A-Z-a-z\s]+$/g.test(this.__pinPad__.config.currency) === !1)
5899
5899
  throw new Error("Invalid currency");
@@ -5940,7 +5940,7 @@ _ = new WeakSet(), _r = function() {
5940
5940
  const y = f > 0 ? p.substring(0, 1) : "A", E = f > 0 ? p.substring(1) : p;
5941
5941
  return { [y]: E.replace(new RegExp(a, "g"), "") };
5942
5942
  }).forEach((p) => Object.assign(h, p)), h;
5943
- }, mn = function(t, e) {
5943
+ }, wn = function(t, e) {
5944
5944
  const i = this.__pinPad__.constants.ETX, s = e.substring(e.indexOf("D") + 2, e.indexOf("E"));
5945
5945
  let a = 0;
5946
5946
  const c = e.indexOf("N") > 0, l = e.substring(e.indexOf("A00") + 3, e.indexOf("B"));
@@ -5990,7 +5990,7 @@ mr = function(t, e) {
5990
5990
  }, wr = function(t, e) {
5991
5991
  const i = this.__pinPad__.about.brand.toLowerCase(), s = this.__pinPad__.about.model.toLowerCase(), a = i === "ingenico" && s === "ipp320" ? 500 : 350;
5992
5992
  if (e.length < a) {
5993
- e = e.replace("006P93A00.", "").replace("006P93A00,", ""), e.includes("E93") ? this.__pinPad__.operation.ignore.error = e.substring(e.indexOf("E93") + 3, e.indexOf("E93") + 6) : e.includes("E71") && (this.__pinPad__.operation.ignore.error = e.substring(e.indexOf("E71") + 3, e.indexOf("E71") + 6)), this.__pinPad__.operation.ignore.error !== "" && e.indexOf("OPERACION CANCELADA") === -1 && e.indexOf("TIEMPO EXCEDIDO") === -1 && this.__pinPad__.operation.ignore.error.length === 3 && (this.__pinPad__.operation.last_error = o(this, _, In).call(this, this.__pinPad__.operation.ignore.error), this.__pinPad__.waiting.statusReadCardWaiting = "rejected");
5993
+ e = e.replace("006P93A00.", "").replace("006P93A00,", ""), e.includes("E93") ? this.__pinPad__.operation.ignore.error = e.substring(e.indexOf("E93") + 3, e.indexOf("E93") + 6) : e.includes("E71") && (this.__pinPad__.operation.ignore.error = e.substring(e.indexOf("E71") + 3, e.indexOf("E71") + 6)), this.__pinPad__.operation.ignore.error !== "" && e.indexOf("OPERACION CANCELADA") === -1 && e.indexOf("TIEMPO EXCEDIDO") === -1 && this.__pinPad__.operation.ignore.error.length === 3 && (this.__pinPad__.operation.last_error = o(this, _, On).call(this, this.__pinPad__.operation.ignore.error), this.__pinPad__.waiting.statusReadCardWaiting = "rejected");
5994
5994
  return;
5995
5995
  }
5996
5996
  if (e.includes("M1") || e.includes("M0") || e.includes("M1") || e.includes("N1") || e.includes("N1") || e.includes("P93A022") && e.substring(e.length - 24).includes("I") && e.substring(e.length - 1).includes("") || e.includes("P93A800") && e.substring(e.length - 24).includes("I") && e.substring(e.length - 1).includes("") || e.includes("P93A022") && e.length >= 406 && s === "vx820" || e.includes("P93A022") && e.length >= 406 && s === "vx520" || e.includes("P93A800") && e.length >= 406 && s === "vx520" || e.includes("P93A800") && e.length >= 406 && s === "vx820" || e.includes("P93A022") && e.length >= 406 && s === "p400" || e.includes("P93A800") && e.length >= 406 && s === "p400" || e.includes("P93A022") && e.length >= 406 && s === "v205c" || e.includes("P93A800") && e.length >= 406 && s === "v205c" || e.includes("P93A022") && e.length >= 406 && s === "move2500" || e.includes("P93A800") && e.length >= 406 && s === "move2500" || e.includes("P93A022") && e.length >= 406 && s === "lane3000" || e.includes("P93A800") && e.length >= 406 && s === "lane3000") {
@@ -6078,10 +6078,10 @@ Sr = function(t, e) {
6078
6078
  }, // ========================================================================================
6079
6079
  // Updated to WS v4
6080
6080
  // ========================================================================================
6081
- te = function(t, e) {
6081
+ ee = function(t, e) {
6082
6082
  const i = new Ya();
6083
6083
  return i.setPublicKey(t), i.encrypt(e);
6084
- }, ee = function(t) {
6084
+ }, ne = function(t) {
6085
6085
  const e = "0123456789ABCDEF";
6086
6086
  let i = "";
6087
6087
  for (let s = 0; s < t; s++) {
@@ -6096,7 +6096,7 @@ te = function(t, e) {
6096
6096
  for (let a = 0; a < t.length; a++)
6097
6097
  s[a] = i[t.charCodeAt(a)];
6098
6098
  return s.join("");
6099
- }, ne = async function(t, e) {
6099
+ }, ie = async function(t, e) {
6100
6100
  const i = new Uint8Array(t.match(/.{1,2}/g).map((y) => parseInt(y, 16))), s = crypto.getRandomValues(new Uint8Array(16)), c = new TextEncoder().encode(e), l = await crypto.subtle.importKey("raw", i, { name: "AES-CBC" }, !1, ["encrypt"]), h = await crypto.subtle.encrypt({ name: "AES-CBC", iv: s }, l, c), p = btoa(String.fromCharCode(...s)), f = btoa(String.fromCharCode(...new Uint8Array(h)));
6101
6101
  return p + f;
6102
6102
  }, // async AESDecrypt(key, encryptedMessage) {
@@ -6136,7 +6136,7 @@ xr = function(t, e, i = !1) {
6136
6136
  h += String.fromCharCode(p.charCodeAt(0) ^ f);
6137
6137
  }
6138
6138
  return i ? o(this, _, kr).call(this, h).toUpperCase() : h;
6139
- }, Nt = function(t, e) {
6139
+ }, Bt = function(t, e) {
6140
6140
  return o(this, _, xr).call(this, t, this.hexToAscii(e));
6141
6141
  }, Ar = function(t) {
6142
6142
  return t.replaceAll("Á", "A"), t.replaceAll("É", "E"), t.replaceAll("Í", "I"), t.replaceAll("Ó", "O"), t.replaceAll("Ú", "U"), t.replaceAll("á", "a"), t.replaceAll("é", "e"), t.replaceAll("í", "i"), t.replaceAll("ó", "o"), t.replaceAll("ú", "u"), t.replaceAll("ñ", "n"), t.replaceAll("Ñ", "N"), t.replaceAll('Electr?a"', "Electronica"), t;
@@ -6150,7 +6150,7 @@ xr = function(t, e, i = !1) {
6150
6150
  const i = "@logo3 @br", s = "@cnn " + e;
6151
6151
  return t.includes("@cnb Santander") ? (t = t.replace("@cnb Santander", "@logo1@br"), o(this, _, z).call(this, t, i, s)) : t.includes("@cnb American Express") ? (t = t.replace("@cnb American Express", "@logo2@br"), o(this, _, z).call(this, t, i, s)) : t.includes("@cnb HSBC") ? (t = t.replace("@cnb HSBC", "@logo7@br"), o(this, _, z).call(this, t, i, s)) : t.includes("@cnb IXE") ? (t = t.replace("@cnb IXE", "@logo11@br"), o(this, _, z).call(this, t, i, s)) : t.includes("@cnb MULTIVA") ? (t = t.replace("@cnb MULTIVA", "@logo15@br"), o(this, _, z).call(this, t, i, s)) : t.includes("@cnb Multiva") ? (t = t.replace("@cnb Multiva", "@logo15@br"), o(this, _, z).call(this, t, i, s)) : t.includes("@cnb SCOTIA BANK") ? (t = t.replace("@cnb SCOTIA BANK", "@logo16@br"), o(this, _, z).call(this, t, i, s)) : t.includes("@cnb SCOTIABANK") ? (t = t.replace("@cnb SCOTIABANK", "@logo16@br"), o(this, _, z).call(this, t, i, s)) : t.includes("@cnb BANCOMER") ? (t = t.replace("@cnb BANCOMER", "@logo17@br"), o(this, _, z).call(this, t, i, s)) : t.includes("@cnb Bancomer") ? (t = t.replace("@cnb Bancomer", "@logo17@br"), o(this, _, z).call(this, t, i, s)) : t.includes("@cnb BBVA") ? (t = t.replace("@cnb BBVA", "@logo17@br"), o(this, _, z).call(this, t, i, s)) : t.includes("@cnb BANORTE") ? (t = t.replace("@cnb BANORTE", "@logo18@br"), o(this, _, z).call(this, t, i, s)) : t.includes("@cnb Banorte") ? (t = t.replace("@cnb Banorte", "@logo18@br"), o(this, _, z).call(this, t, i, s)) : t.includes("@cnb BANREGIO") ? (t = t.replace("@cnb BANREGIO", "@logo19@br"), o(this, _, z).call(this, t, i, s)) : t.includes("@cnb Banregio") ? (t = t.replace("@cnb Banregio", "@logo19@br"), o(this, _, z).call(this, t, i, s)) : t.includes("@cnb GETNET") ? (t = t.replace("@cnb GETNET", "@logo20@br"), o(this, _, z).call(this, t, i, s)) : t.includes("@cnb GetNET") ? (t = t.replace("@cnb GetNET", "@logo20@br"), o(this, _, z).call(this, t, i, s)) : o(this, _, z).call(this, t, i, s);
6152
6152
  }, Rr = async function(t = !1) {
6153
- if (o(this, _, Or).call(this), this.__pinPad__.config.loginResponse && !t) return await o(this, _, wn).call(this);
6153
+ if (o(this, _, Or).call(this), this.__pinPad__.config.loginResponse && !t) return await o(this, _, vn).call(this);
6154
6154
  const e = this.url + this.__pinPad__.constants.uris.login, i = {
6155
6155
  usuario: this.username,
6156
6156
  password: this.password,
@@ -6159,9 +6159,9 @@ xr = function(t, e, i = !1) {
6159
6159
  serieLector: "",
6160
6160
  canal: this.__pinPad__.constants.appChannel
6161
6161
  };
6162
- if (await o(this, _, ie).call(this), o(this, _, vn).call(this))
6162
+ if (await o(this, _, re).call(this), o(this, _, En).call(this))
6163
6163
  throw new Error("Empty RSA Key");
6164
- const s = o(this, _, ee).call(this, 32), a = o(this, _, te).call(this, this.__pinPad__.config.publicKeyRSA, s), c = await o(this, _, ne).call(this, s, JSON.stringify(i)), l = await V.post(e, c, {
6164
+ const s = o(this, _, ne).call(this, 32), a = o(this, _, ee).call(this, this.__pinPad__.config.publicKeyRSA, s), c = await o(this, _, ie).call(this, s, JSON.stringify(i)), l = await V.post(e, c, {
6165
6165
  headers: {
6166
6166
  "Content-Type": "application/json",
6167
6167
  "cache-control": "no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0",
@@ -6171,7 +6171,7 @@ xr = function(t, e, i = !1) {
6171
6171
  var f;
6172
6172
  throw new Error(`Error in request, verify internet connection: ${(f = p.response) == null ? void 0 : f.status} ${p.message}`);
6173
6173
  });
6174
- let h = o(this, _, Sn).call(this, JSON.stringify(l.data));
6174
+ let h = o(this, _, kn).call(this, JSON.stringify(l.data));
6175
6175
  if (typeof h == "string" && (h = JSON.parse(h)), !h)
6176
6176
  throw new Error("Invalid response JSON");
6177
6177
  if (h.RESPUESTA === "error")
@@ -6182,8 +6182,8 @@ xr = function(t, e, i = !1) {
6182
6182
  timestamp: (/* @__PURE__ */ new Date()).getTime(),
6183
6183
  data: h
6184
6184
  })
6185
- ), await o(this, _, wn).call(this);
6186
- }, wn = async function() {
6185
+ ), await o(this, _, vn).call(this);
6186
+ }, vn = async function() {
6187
6187
  await o(this, _, Ur).call(this);
6188
6188
  try {
6189
6189
  await o(this, _, Fr).call(this);
@@ -6225,18 +6225,18 @@ xr = function(t, e, i = !1) {
6225
6225
  data: e.data.key_public
6226
6226
  })
6227
6227
  ), this.__pinPad__.config.publicKeyRSA;
6228
- }, vn = function() {
6228
+ }, En = function() {
6229
6229
  let t = localStorage.getItem("ppRSAKey");
6230
6230
  return !t || (t = JSON.parse(t), this.__pinPad__.config.publicKeyRSA = t.data, (/* @__PURE__ */ new Date()).getTime() - t.timestamp >= 864e5) ? !0 : !this.__pinPad__.config.publicKeyRSA;
6231
- }, En = async function() {
6232
- return o(this, _, vn).call(this) ? await o(this, _, Nr).call(this) : this.__pinPad__.config.publicKeyRSA;
6233
- }, ie = async function() {
6234
- if (!await o(this, _, En).call(this))
6231
+ }, Pn = async function() {
6232
+ return o(this, _, En).call(this) ? await o(this, _, Nr).call(this) : this.__pinPad__.config.publicKeyRSA;
6233
+ }, re = async function() {
6234
+ if (!await o(this, _, Pn).call(this))
6235
6235
  throw new Error("RSA public key is empty");
6236
- }, Pn = function(t) {
6236
+ }, Cn = function(t) {
6237
6237
  return /^[A-Z-a-z0-9\s]+$/g.test(t);
6238
6238
  }, Br = function(t) {
6239
- if (Tt(t))
6239
+ if (St(t))
6240
6240
  return !0;
6241
6241
  const e = /^[A-Z-a-z0-9\s]+$/g.test(t) === !0;
6242
6242
  if (!e)
@@ -6251,18 +6251,18 @@ xr = function(t, e, i = !1) {
6251
6251
  return String.fromCharCode(e);
6252
6252
  }, ke = function(t, e = 0) {
6253
6253
  return t = parseFloat(t.toString().replace(/[^0-9.-]/g, "")), isNaN(t) ? 0 .toFixed(e) : t.toFixed(e).replace(/,/g, "");
6254
- }, Cn = function(t) {
6254
+ }, Tn = function(t) {
6255
6255
  return t = parseFloat(t.toString()), !(isNaN(t) || t < 0);
6256
- }, re = async function(t) {
6256
+ }, se = async function(t) {
6257
6257
  for (const e in t)
6258
6258
  if (typeof t[e] > "u" || t[e] === null || t[e] === "")
6259
6259
  throw new Error("Object incomplete to process");
6260
6260
  return t;
6261
- }, Tn = function(t) {
6261
+ }, Sn = function(t) {
6262
6262
  if (!t || isNaN(parseInt(t)) || t.toString().length !== 9)
6263
6263
  throw new Error("Number of operation must be number of 9 digits");
6264
6264
  return t;
6265
- }, Sn = function(t) {
6265
+ }, kn = function(t) {
6266
6266
  if (typeof t != "string") throw new Error("Invalid string");
6267
6267
  return !t || /<html(?:\s+lang=["'][^"']*["'])?>/i.test(t) || (t = t.replace(/aaa/g, "á"), t = t.replace(/eee/g, "é"), t = t.replace(/iii/g, "í"), t = t.replace(/ooo/g, "ó"), t = t.replace(/uuu/g, "ú"), t = t.replace(/NNN/g, "Ñ"), t = t.replace(/nnn/g, "ñ"), t = t.replace(/á/g, "á")), t;
6268
6268
  }, Mr = async function() {
@@ -6271,14 +6271,14 @@ xr = function(t, e, i = !1) {
6271
6271
  i = t + o(this, _, ft).call(this, i) + i + e, i = i + o(this, _, gt).call(this, i);
6272
6272
  const s = this.parseStringToBytes(i, "");
6273
6273
  await this.appendToQueue(s, "cancel");
6274
- }, kn = function() {
6274
+ }, xn = function() {
6275
6275
  const t = /* @__PURE__ */ new Date(), e = t.getDate().toString().padStart(2, "0"), i = (t.getMonth() + 1).toString().padStart(2, "0"), s = t.getFullYear().toString().substring(2);
6276
6276
  return e + i + s;
6277
- }, xn = function() {
6277
+ }, An = function() {
6278
6278
  const t = /* @__PURE__ */ new Date(), e = t.getHours().toString().padStart(2, "0"), i = t.getMinutes().toString().padStart(2, "0");
6279
6279
  return e + i;
6280
6280
  }, Fr = async function() {
6281
- return this.__pinPad__.config.latitude && this.__pinPad__.config.longitude ? this.latitudeLongitude : (this.__pinPad__.config.latitude = null, this.__pinPad__.config.longitude = null, Wn() ? new Promise((t) => {
6281
+ return this.__pinPad__.config.latitude && this.__pinPad__.config.longitude ? this.latitudeLongitude : (this.__pinPad__.config.latitude = null, this.__pinPad__.config.longitude = null, zn() ? new Promise((t) => {
6282
6282
  navigator.geolocation.getCurrentPosition(
6283
6283
  (e) => {
6284
6284
  this.__pinPad__.config.latitude = e.coords.latitude, this.__pinPad__.config.longitude = e.coords.longitude, t(this.latitudeLongitude);
@@ -6301,10 +6301,10 @@ xr = function(t, e, i = !1) {
6301
6301
  data: i.data.ip
6302
6302
  })
6303
6303
  ), this.__pinPad__.config.publicIP);
6304
- }, Ht = async function(t, e) {
6305
- await o(this, _, ie).call(this);
6306
- const i = o(this, _, ee).call(this, 32);
6307
- let s = o(this, _, te).call(this, this.__pinPad__.config.publicKeyRSA, i), a = await o(this, _, ne).call(this, i, JSON.stringify(e));
6304
+ }, Kt = async function(t, e) {
6305
+ await o(this, _, re).call(this);
6306
+ const i = o(this, _, ne).call(this, 32);
6307
+ let s = o(this, _, ee).call(this, this.__pinPad__.config.publicKeyRSA, i), a = await o(this, _, ie).call(this, i, JSON.stringify(e));
6308
6308
  return (await V.post(t, a, {
6309
6309
  headers: {
6310
6310
  "Content-Type": "application/json",
@@ -6315,9 +6315,9 @@ xr = function(t, e, i = !1) {
6315
6315
  var h;
6316
6316
  throw l.response.data.includes("Ha ocurrido un error al procesar su solicitud.") ? new Error("It was not possible to obtain the affiliations.") : l.response.status >= 500 && l.response.status <= 599 ? new Error(`Service Temporarily Unavailable ${l.message}`) : new Error(`Error in request, verify internet connection: ${(h = l.response) == null ? void 0 : h.status} ${l.message}`);
6317
6317
  })).data;
6318
- }, An = async function({ data: t, url: e, cancelable: i = !1 } = {}) {
6319
- await o(this, _, ie).call(this);
6320
- const s = o(this, _, ee).call(this, 32), a = o(this, _, te).call(this, this.__pinPad__.config.publicKeyRSA, s), c = await o(this, _, ne).call(this, s, JSON.stringify(t)), l = this;
6318
+ }, Dn = async function({ data: t, url: e, cancelable: i = !1 } = {}) {
6319
+ await o(this, _, re).call(this);
6320
+ const s = o(this, _, ne).call(this, 32), a = o(this, _, ee).call(this, this.__pinPad__.config.publicKeyRSA, s), c = await o(this, _, ie).call(this, s, JSON.stringify(t)), l = this;
6321
6321
  return (await V.post(e, c, {
6322
6322
  headers: {
6323
6323
  "Content-Type": "application/json",
@@ -6338,7 +6338,7 @@ xr = function(t, e, i = !1) {
6338
6338
  }
6339
6339
  }, Vr = async function() {
6340
6340
  this.__pinPad__.operation.bin8 && (this.__pinPad__.operation.bin = this.__pinPad__.operation.bin8), this.__pinPad__.operation.bin8 = "";
6341
- const t = await o(this, _, An).call(this, {
6341
+ const t = await o(this, _, Dn).call(this, {
6342
6342
  data: {
6343
6343
  accion: "tipoPagoInfo",
6344
6344
  cc_num: this.__pinPad__.operation.bin,
@@ -6362,7 +6362,7 @@ xr = function(t, e, i = !1) {
6362
6362
  if (this.__pinPad__.waiting.statusAboutWaiting) throw new Error("AboutPP is already running");
6363
6363
  const e = this.__pinPad__.constants.STX, i = this.__pinPad__.constants.ETX;
6364
6364
  let s = "C56AABOUT";
6365
- if (s = e + o(this, _, ft).call(this, s) + s + i, s = s + o(this, _, gt).call(this, s), Tt(this.__pinPad__.about.pp)) {
6365
+ if (s = e + o(this, _, ft).call(this, s) + s + i, s = s + o(this, _, gt).call(this, s), St(this.__pinPad__.about.pp)) {
6366
6366
  this.__pinPad__.waiting.statusAboutWaiting = "pending";
6367
6367
  const l = this.parseStringToBytes(s, "");
6368
6368
  await this.appendToQueue(l, "about");
@@ -6373,22 +6373,22 @@ xr = function(t, e, i = !1) {
6373
6373
  return new Promise((l, h) => {
6374
6374
  c = setInterval(() => {
6375
6375
  if (a.__pinPad__.waiting.statusAboutWaiting === "resolved") {
6376
- if (clearInterval(c), a.__pinPad__.waiting.statusAboutWaiting = null, Tt(a.__pinPad__.about.pp))
6376
+ if (clearInterval(c), a.__pinPad__.waiting.statusAboutWaiting = null, St(a.__pinPad__.about.pp))
6377
6377
  return;
6378
6378
  t || l(!0), l(t(a.__pinPad__.about.pp.supportDUKPT, a.__pinPad__.about.pp.hasDUKPTKeys));
6379
6379
  } else a.__pinPad__.waiting.statusAboutWaiting === "rejected" && (clearInterval(c), a.__pinPad__.waiting.statusAboutWaiting = null, h("Error"));
6380
6380
  }, 500);
6381
6381
  });
6382
6382
  }, xe = async function(t, e) {
6383
- if (t = t ? t.toString() : "", e = e ? e.toString() : "", Tt(t) || t === "0") {
6383
+ if (t = t ? t.toString() : "", e = e ? e.toString() : "", St(t) || t === "0") {
6384
6384
  this.dispatch("pp:dukpt", { status: "unsupported", already: !1 });
6385
6385
  return;
6386
6386
  }
6387
- if (Tt(e) || e === "1") {
6387
+ if (St(e) || e === "1") {
6388
6388
  this.dispatch("pp:dukpt", { status: "charged", already: !0 });
6389
6389
  return;
6390
6390
  }
6391
- const i = o(this, _, kn).call(this), s = o(this, _, xn).call(this), a = this.__pinPad__.constants.FS, c = this.__pinPad__.constants.ETX, l = this.__pinPad__.constants.STX;
6391
+ const i = o(this, _, xn).call(this), s = o(this, _, An).call(this), a = this.__pinPad__.constants.FS, c = this.__pinPad__.constants.ETX, l = this.__pinPad__.constants.STX;
6392
6392
  let h = "C91A" + i + a + "B" + s;
6393
6393
  h = l + o(this, _, ft).call(this, h) + h + c, h = h + o(this, _, gt).call(this, h);
6394
6394
  const p = this.parseStringToBytes(h, "");
@@ -6414,13 +6414,13 @@ xr = function(t, e, i = !1) {
6414
6414
  },
6415
6415
  terminal: this.__pinPad__.config.terminal
6416
6416
  }
6417
- }, e = await o(this, _, An).call(this, {
6417
+ }, e = await o(this, _, Dn).call(this, {
6418
6418
  data: t,
6419
6419
  url: this.url + this.__pinPad__.constants.uris.keysDUKPT
6420
6420
  });
6421
6421
  await o(this, _, ts).call(this, e);
6422
6422
  }, Hr = async function() {
6423
- if (!await o(this, _, En).call(this))
6423
+ if (!await o(this, _, Pn).call(this))
6424
6424
  throw new Error("RSA public key is empty");
6425
6425
  const e = this;
6426
6426
  await o(this, _, qr).call(this, async function(s, a) {
@@ -6435,7 +6435,7 @@ xr = function(t, e, i = !1) {
6435
6435
  }, 500);
6436
6436
  });
6437
6437
  });
6438
- }, Dn = function(t, e = 0) {
6438
+ }, Rn = function(t, e = 0) {
6439
6439
  if (t = parseFloat(t.toString().replace(/[^0-9.-]/g, "")), isNaN(t) || t === 0)
6440
6440
  return parseFloat("0").toFixed(e);
6441
6441
  t = t.toFixed(e);
@@ -6444,15 +6444,15 @@ xr = function(t, e, i = !1) {
6444
6444
  }, Kr = async function() {
6445
6445
  this.__pinPad__.operation.errors = 0;
6446
6446
  let t = "ACERQUE, INSERTE CHIP O DESLICE TARJETA";
6447
- if (this.__pinPad__.about.supportContactless || (t = "INSERTE CHIP O DESLICE TARJETA"), this.__pinPad__.about.model.toUpperCase().includes("UX300") && (t = "ACERQUE O INSERTE TARJETA"), Tt(this.amount) || this.amount <= 0)
6447
+ if (this.__pinPad__.about.supportContactless || (t = "INSERTE CHIP O DESLICE TARJETA"), this.__pinPad__.about.model.toUpperCase().includes("UX300") && (t = "ACERQUE O INSERTE TARJETA"), St(this.amount) || this.amount <= 0)
6448
6448
  throw new Error("Amount required");
6449
- if (o(this, _, Cn).call(this, this.amount) === !1)
6449
+ if (o(this, _, Tn).call(this, this.amount) === !1)
6450
6450
  throw new Error("Invalid amount required");
6451
6451
  if (o(this, _, ke).call(this, this.amount, 2) <= 0)
6452
6452
  throw new Error("Amount must be greater than 0");
6453
6453
  const e = this.__pinPad__.constants.FS, i = this.__pinPad__.constants.STX, s = this.__pinPad__.constants.ETX;
6454
6454
  let a = "C93A" + t;
6455
- a = a + e + "B" + o(this, _, kn).call(this), a = a + e + "C" + o(this, _, xn).call(this), a = a + e + "D" + o(this, _, ke).call(this, this.amount, 2), a = a + e + "E0.00", a = a + e + "F" + this.__pinPad__.config.currencyCode, this.__pinPad__.about.supportDUKPT && this.__pinPad__.about.supportDUKPT !== "0" && this.__pinPad__.about.supportDUKPT !== "false" && (this.__pinPad__.about.supportContactless ? (a = a + e + "G" + this.timeoutPinPad, a = a + e + "HTAGS", a = a + e + "I" + this.__pinPad__.config.requireCVVAmex, a = a + e + "J" + this.__pinPad__.config.forceOnline, a = a + e + "K" + this.__pinPad__.about.supportContactless, a = a + e + "L" + this.__pinPad__.config.emvCard, this.__pinPad__.about.hasCashback && (a = a + e + "M0", a = a + e + "N00")) : (a = a + e + "G" + this.timeoutPinPad, a = a + e + "HTAGS", a = a + e + "I" + this.__pinPad__.config.requireCVVAmex, a = a + e + "L" + this.__pinPad__.config.emvCard), this.__pinPad__.about.supportInjection && (a = a + e + "O" + this.__pinPad__.config.validateQPS)), a = i + o(this, _, ft).call(this, a) + a + s, a = a + o(this, _, gt).call(this, a), o(this, _, es).call(this);
6455
+ a = a + e + "B" + o(this, _, xn).call(this), a = a + e + "C" + o(this, _, An).call(this), a = a + e + "D" + o(this, _, ke).call(this, this.amount, 2), a = a + e + "E0.00", a = a + e + "F" + this.__pinPad__.config.currencyCode, this.__pinPad__.about.supportDUKPT && this.__pinPad__.about.supportDUKPT !== "0" && this.__pinPad__.about.supportDUKPT !== "false" && (this.__pinPad__.about.supportContactless ? (a = a + e + "G" + this.timeoutPinPad, a = a + e + "HTAGS", a = a + e + "I" + this.__pinPad__.config.requireCVVAmex, a = a + e + "J" + this.__pinPad__.config.forceOnline, a = a + e + "K" + this.__pinPad__.about.supportContactless, a = a + e + "L" + this.__pinPad__.config.emvCard, this.__pinPad__.about.hasCashback && (a = a + e + "M0", a = a + e + "N00")) : (a = a + e + "G" + this.timeoutPinPad, a = a + e + "HTAGS", a = a + e + "I" + this.__pinPad__.config.requireCVVAmex, a = a + e + "L" + this.__pinPad__.config.emvCard), this.__pinPad__.about.supportInjection && (a = a + e + "O" + this.__pinPad__.config.validateQPS)), a = i + o(this, _, ft).call(this, a) + a + s, a = a + o(this, _, gt).call(this, a), o(this, _, es).call(this);
6456
6456
  const c = this.parseStringToBytes(a, "");
6457
6457
  await this.appendToQueue(c, "read-card");
6458
6458
  let l = 0;
@@ -6475,7 +6475,7 @@ xr = function(t, e, i = !1) {
6475
6475
  return t > 1 && this.environment === "production" && (e = e.replace(
6476
6476
  this.__pinPad__.constants.urls.production,
6477
6477
  this.__pinPad__.constants.urls.productionAlternative
6478
- )), this.__pinPad__.operation.consultDate = (/* @__PURE__ */ new Date()).toLocaleDateString("en-GB"), await o(this, _, Ht).call(this, e, {
6478
+ )), this.__pinPad__.operation.consultDate = (/* @__PURE__ */ new Date()).toLocaleDateString("en-GB"), await o(this, _, Kt).call(this, e, {
6479
6479
  user: this.username.toUpperCase(),
6480
6480
  pwd: this.password.toUpperCase(),
6481
6481
  id_branch: this.__pinPad__.config.idBranch.toUpperCase(),
@@ -6489,8 +6489,8 @@ xr = function(t, e, i = !1) {
6489
6489
  i > 1 && this.environment === "production" && (t = t.replace(
6490
6490
  this.__pinPad__.constants.urls.production,
6491
6491
  this.__pinPad__.constants.urls.productionAlternative
6492
- ), await o(this, _, Wr).call(this, 5)), await o(this, _, ie).call(this);
6493
- const a = o(this, _, ee).call(this, 32), c = o(this, _, te).call(this, this.__pinPad__.config.publicKeyRSA, a), l = await o(this, _, ne).call(this, a, JSON.stringify(e));
6492
+ ), await o(this, _, Wr).call(this, 5)), await o(this, _, re).call(this);
6493
+ const a = o(this, _, ne).call(this, 32), c = o(this, _, ee).call(this, this.__pinPad__.config.publicKeyRSA, a), l = await o(this, _, ie).call(this, a, JSON.stringify(e));
6494
6494
  let h = !1;
6495
6495
  const p = await V.post(t, l, {
6496
6496
  headers: {
@@ -6508,7 +6508,7 @@ xr = function(t, e, i = !1) {
6508
6508
  } while (i++ <= 3);
6509
6509
  return s ? Promise.reject(s) : Promise.reject("Communication error with CDP. IL/MTY");
6510
6510
  }, $r = function(t) {
6511
- if (Tt(t)) throw new Error("Number of authorization invalid");
6511
+ if (St(t)) throw new Error("Number of authorization invalid");
6512
6512
  if (/^[A-Za-z0-9]+$/g.test(t) !== !0) throw new Error("Number of authorization invalid");
6513
6513
  if (t.length !== 6) throw new Error("Number of authorization invalid");
6514
6514
  return !0;
@@ -6554,7 +6554,7 @@ Gr = function(t) {
6554
6554
  auth: t.auth,
6555
6555
  cd_response: i,
6556
6556
  cd_error: t.cd_error,
6557
- nb_error: o(a = e, _, Sn).call(a, t.nb_error ?? ""),
6557
+ nb_error: o(a = e, _, kn).call(a, t.nb_error ?? ""),
6558
6558
  time: t.time,
6559
6559
  date: t.date,
6560
6560
  nb_company: t.nb_company,
@@ -6588,8 +6588,8 @@ Gr = function(t) {
6588
6588
  object: {}
6589
6589
  };
6590
6590
  try {
6591
- const c = await o(this, _, Dn).call(this, this.amount, 2);
6592
- await o(this, _, re).call(this, {
6591
+ const c = await o(this, _, Rn).call(this, this.amount, 2);
6592
+ await o(this, _, se).call(this, {
6593
6593
  Ambiente: this.environment,
6594
6594
  Country: this.__pinPad__.config.country,
6595
6595
  IdBranch: this.__pinPad__.config.idBranch,
@@ -6673,7 +6673,7 @@ Gr = function(t) {
6673
6673
  const p = o(this, _, Gr).call(this, h);
6674
6674
  return i.object = p, await o(this, _, Qr).call(this, p), i.approved = this.__pinPad__.operation.responseMit._approved, this.__pinPad__.operation.finalResult = p, i;
6675
6675
  } catch (c) {
6676
- throw t.__pinPad__.finishCommand.A = "01", t.__pinPad__.finishCommand.B = "", t.__pinPad__.finishCommand.C = "", t.__pinPad__.finishCommand.D = "", t.__pinPad__.finishCommand.E = "", t.__pinPad__.finishCommand.F = "", t.__pinPad__.finishCommand.G = "", t.__pinPad__.finishCommand.H = "", t.__pinPad__.finishCommand.I = "", t.__pinPad__.finishCommand.J = "", t.__pinPad__.finishCommand.K = "", await o(a = t, _, Yr).call(a, o(s = t, _, In).call(s, c)), c;
6676
+ throw t.__pinPad__.finishCommand.A = "01", t.__pinPad__.finishCommand.B = "", t.__pinPad__.finishCommand.C = "", t.__pinPad__.finishCommand.D = "", t.__pinPad__.finishCommand.E = "", t.__pinPad__.finishCommand.F = "", t.__pinPad__.finishCommand.G = "", t.__pinPad__.finishCommand.H = "", t.__pinPad__.finishCommand.I = "", t.__pinPad__.finishCommand.J = "", t.__pinPad__.finishCommand.K = "", await o(a = t, _, Yr).call(a, o(s = t, _, On).call(s, c)), c;
6677
6677
  }
6678
6678
  }, Qr = async function(t) {
6679
6679
  if (this.__pinPad__.config.read.POSEM === "022" || this.__pinPad__.config.read.POSEM === "800" || this.__pinPad__.config.read.ReadCTLS === "1")
@@ -6690,7 +6690,7 @@ Gr = function(t) {
6690
6690
  var y, E;
6691
6691
  if (h.__pinPad__.waiting.statusSecondGenerateWaiting === "resolved") {
6692
6692
  if (clearInterval(l), h.__pinPad__.waiting.statusSecondGenerateWaiting = null, h.__pinPad__.operation.applyReverse) {
6693
- const v = await o(y = h, _, Ht).call(y, h.url + h.__pinPad__.constants.uris.reverse, {
6693
+ const v = await o(y = h, _, Kt).call(y, h.url + h.__pinPad__.constants.uris.reverse, {
6694
6694
  VMCAMEXMREVERSO: {
6695
6695
  business: {
6696
6696
  id_company: this.__pinPad__.config.idCompany.toUpperCase(),
@@ -6720,14 +6720,14 @@ Gr = function(t) {
6720
6720
  });
6721
6721
  }, Zr = async function(t, e) {
6722
6722
  this.__pinPad__.operation.ignore.responseGlobal = t, this.__pinPad__.operation.ignore.C93Global = e, this.__pinPad__.operation.ignore.isError92TRX = !0, await o(this, _, xe).call(this, 1, 0);
6723
- }, Rn = async function() {
6723
+ }, In = async function() {
6724
6724
  if (this.__pinPad__.operation.ignore.isError92TRX = !1, this.__pinPad__.config.read.POSEM === "022" || this.__pinPad__.config.read.POSEM === "800" || this.__pinPad__.config.read.ReadCTLS === "1")
6725
6725
  this.dispatch("pp:response", this.__pinPad__.operation.ignore.responseGlobal);
6726
6726
  else {
6727
6727
  const t = this.parseStringToBytes(this.__pinPad__.operation.ignore.C93Global, "");
6728
6728
  await this.appendToQueue(t, "code93"), await Ct(1400), this.dispatch("pp:response", this.__pinPad__.operation.ignore.responseGlobal);
6729
6729
  }
6730
- }, In = function(t) {
6730
+ }, On = function(t) {
6731
6731
  const e = {
6732
6732
  PPE02: "Importe Incorrecto.",
6733
6733
  A02: "Importe Incorrecto.",
@@ -6783,7 +6783,7 @@ Gr = function(t) {
6783
6783
  await this.appendToQueue(c, "finish-emv-end");
6784
6784
  }, ts = async function(t) {
6785
6785
  if (t.cd_estatus = t.cd_estatus ? t.cd_estatus : "0", t.cd_estatus !== "1") {
6786
- this.__pinPad__.operation.ignore.isError92TRX && await o(this, _, Rn).call(this);
6786
+ this.__pinPad__.operation.ignore.isError92TRX && await o(this, _, In).call(this);
6787
6787
  return;
6788
6788
  }
6789
6789
  const e = this.__pinPad__.constants.FS, i = this.__pinPad__.constants.ETX, s = this.__pinPad__.constants.STX, a = t.nb_ksn, c = t.nb_kcv || "", l = t.nb_ipek || "";
@@ -6797,14 +6797,14 @@ Gr = function(t) {
6797
6797
  return new Promise((E, v) => {
6798
6798
  f = setInterval(async () => {
6799
6799
  var S;
6800
- y.__pinPad__.waiting.statuswritingDUKPTWaiting === "resolved" ? (clearInterval(f), y.__pinPad__.waiting.statuswritingDUKPTWaiting = null, this.__pinPad__.operation.ignore.isError92TRX && await o(S = y, _, Rn).call(S), E(!0)) : y.__pinPad__.waiting.statuswritingDUKPTWaiting === "rejected" && (clearInterval(f), y.__pinPad__.waiting.statuswritingDUKPTWaiting = null, v("Error writing DUKPT keys"));
6800
+ y.__pinPad__.waiting.statuswritingDUKPTWaiting === "resolved" ? (clearInterval(f), y.__pinPad__.waiting.statuswritingDUKPTWaiting = null, this.__pinPad__.operation.ignore.isError92TRX && await o(S = y, _, In).call(S), E(!0)) : y.__pinPad__.waiting.statuswritingDUKPTWaiting === "rejected" && (clearInterval(f), y.__pinPad__.waiting.statuswritingDUKPTWaiting = null, v("Error writing DUKPT keys"));
6801
6801
  }, 500);
6802
6802
  });
6803
6803
  }, es = function() {
6804
6804
  this.__pinPad__.config.read.AppId = "", this.__pinPad__.config.read.AppIdLabel = "", this.__pinPad__.config.read.Arqc = "", this.__pinPad__.config.read.ChipName = "", this.__pinPad__.config.read.ReadCTLS = "", this.__pinPad__.config.read.NB_Data = "", this.__pinPad__.config.read.NB_ksn = "", this.__pinPad__.config.read.PIN = "", this.__pinPad__.config.read.POSEM = "", this.__pinPad__.config.read.Tags = "", this.__pinPad__.config.read.Type = "", this.__pinPad__.config.read.Chip = "", this.__pinPad__.config.read.ChipNameEnc = "", this.__pinPad__.operation.ignore.error = "", this.__pinPad__.operation.ignore.C93Global = "", this.__pinPad__.operation.folio = "", this.__pinPad__.operation.authorization = "", this.__pinPad__.config.tokenizeTRX = !1;
6805
6805
  };
6806
- var g, ns, is, rs, st, Ae, ss, as, os, cs, ls, hs, us, ds, ps, _s, fs, gs, bs, ys, ms, ws, vs, Es, Ps, Cs, Ts, Ss, ks, xs, As, Ds, dt, Z, De, Y, bt, Rs, Is, Os, Ns, se, On, Nn, Re, Ie, Bs;
6807
- class Yc extends Lt {
6806
+ var g, ns, is, rs, st, Ae, ss, as, os, cs, ls, hs, us, ds, ps, _s, fs, gs, bs, ys, ms, ws, vs, Es, Ps, Cs, Ts, Ss, ks, xs, As, Ds, dt, Z, De, Y, bt, Rs, Is, Os, Ns, ae, Nn, Bn, Re, Ie, Bs;
6807
+ class Yc extends Vt {
6808
6808
  constructor({
6809
6809
  filters: t = null,
6810
6810
  config_port: e = null,
@@ -6964,15 +6964,15 @@ class Yc extends Lt {
6964
6964
  return await o(this, g, st).call(this, t, "collect");
6965
6965
  }
6966
6966
  async resetSoldOutErrors() {
6967
- return await o(this, g, se).call(this, "80");
6967
+ return await o(this, g, ae).call(this, "80");
6968
6968
  }
6969
6969
  async resetWaitingProductRemovedError() {
6970
- return await o(this, g, se).call(this, "81");
6970
+ return await o(this, g, ae).call(this, "81");
6971
6971
  }
6972
6972
  async resetMachineErrors() {
6973
- return this.__internal__.serial.queue.length === 0 ? (o(this, g, On).call(this), await o(this, g, se).call(this, "FF")) : new Promise((t) => {
6973
+ return this.__internal__.serial.queue.length === 0 ? (o(this, g, Nn).call(this), await o(this, g, ae).call(this, "FF")) : new Promise((t) => {
6974
6974
  const e = setInterval(async () => {
6975
- this.__internal__.serial.queue.length > 0 || (clearInterval(e), await o(this, g, se).call(this, "FF"), o(this, g, On).call(this), t(!0));
6975
+ this.__internal__.serial.queue.length > 0 || (clearInterval(e), await o(this, g, ae).call(this, "FF"), o(this, g, Nn).call(this), t(!0));
6976
6976
  }, 100);
6977
6977
  });
6978
6978
  }
@@ -6984,10 +6984,10 @@ class Yc extends Lt {
6984
6984
  return await o(this, g, st).call(this, t, "status");
6985
6985
  }
6986
6986
  async lightsOn() {
6987
- return await o(this, g, Nn).call(this, "81");
6987
+ return await o(this, g, Bn).call(this, "81");
6988
6988
  }
6989
6989
  async lightsOff() {
6990
- return await o(this, g, Nn).call(this, "80");
6990
+ return await o(this, g, Bn).call(this, "80");
6991
6991
  }
6992
6992
  async program(t, e) {
6993
6993
  const i = ["02", "30", "30", "81", "50", t, e];
@@ -7868,18 +7868,18 @@ bt = function({ type: t = null, severity: e = "high" } = {}) {
7868
7868
  });
7869
7869
  }, t.__internal__.dispense.interval_time);
7870
7870
  }, t.__internal__.dispense.timeout_time);
7871
- }, se = async function(t) {
7871
+ }, ae = async function(t) {
7872
7872
  const e = ["02", "30", "30", "81", "52", t, "FF"];
7873
7873
  return await o(this, g, st).call(this, e, "reset");
7874
- }, On = function() {
7875
- const t = this.__device.type === "iceplus" ? rn(40) : rn(25), e = /* @__PURE__ */ new Date(), i = 1e3 * t + e.getTime(), s = new Date(i);
7874
+ }, Nn = function() {
7875
+ const t = this.__device.type === "iceplus" ? sn(40) : sn(25), e = /* @__PURE__ */ new Date(), i = 1e3 * t + e.getTime(), s = new Date(i);
7876
7876
  this.dispatch("reset:errors", {
7877
7877
  description: "Resetting machine errors",
7878
7878
  duration: t,
7879
7879
  started_at: e,
7880
7880
  finished_at: s
7881
7881
  });
7882
- }, Nn = async function(t) {
7882
+ }, Bn = async function(t) {
7883
7883
  const e = ["02", "30", "30", "81", "4C", t, "FF"];
7884
7884
  return await o(this, g, st).call(this, e, "lights");
7885
7885
  }, Re = async function(t = "80", e = []) {
@@ -7898,8 +7898,8 @@ bt = function({ type: t = null, severity: e = "high" } = {}) {
7898
7898
  h.push(l.charCodeAt(p).toString(16));
7899
7899
  return h;
7900
7900
  };
7901
- var Wt, Mt, zt, w, Ms, Fs, Oe, Us, Ls, Vs, qs, js, Hs, Ks, Ws, Bn, zs, Xs, $s, Gs, Js, Qs, Zs, Ys, ta, ea, na, ia, ra, sa, at, Ne, aa, oa, ca, la, Mn, Be, ha, ua, Fn, Un, Ln;
7902
- class tl extends Lt {
7901
+ var zt, Ft, Xt, w, Ms, Fs, Oe, Us, Ls, Vs, qs, js, Hs, Ks, Ws, Mn, zs, Xs, $s, Gs, Js, Qs, Zs, Ys, ta, ea, na, ia, ra, sa, at, Ne, aa, oa, ca, la, Fn, Be, ha, ua, Un, Ln, Vn;
7902
+ class tl extends Vt {
7903
7903
  constructor({ filters: t = null, config_port: e = null, no_device: i = 1 } = {}) {
7904
7904
  super({ filters: t, config_port: e, no_device: i });
7905
7905
  J(this, w);
@@ -7949,9 +7949,9 @@ class tl extends Lt {
7949
7949
  available: !1,
7950
7950
  max_pre_credit: 0
7951
7951
  });
7952
- J(this, Wt, !1);
7953
- J(this, Mt, 0);
7954
- J(this, zt, 0);
7952
+ J(this, zt, !1);
7953
+ J(this, Ft, 0);
7954
+ J(this, Xt, 0);
7955
7955
  if (this.__internal__.device.type = "boardroid", $.getCustom(this.typeDevice, i))
7956
7956
  throw new Error(`Device ${this.typeDevice} ${i} already exists`);
7957
7957
  this.__internal__.serial.config_port.baudRate = 115200, this.__internal__.serial.response.length = 14, this.__internal__.time.response_connection = 600, this.__internal__.time.response_general = 4e3, this.__internal__.time.response_engines = 15e3, this.__internal__.dispense.limit_counter = 15, this.__internal__.dispense.custom_limit_counter = null, this.__internal__.dispense.backup_dispense = {
@@ -8266,8 +8266,8 @@ class tl extends Lt {
8266
8266
  }
8267
8267
  async testEngines({ singleEngine: t = !1 } = {}) {
8268
8268
  if (this.isDispensing) throw new Error("Another dispensing process is running");
8269
- if (R(this, Wt)) throw new Error("Another test is running");
8270
- o(this, w, Mn).call(this), M(this, Wt, !0);
8269
+ if (R(this, zt)) throw new Error("Another test is running");
8270
+ o(this, w, Fn).call(this), M(this, zt, !0);
8271
8271
  const e = [];
8272
8272
  o(this, w, Be).call(this);
8273
8273
  for (let i = 1; i <= 80; i++) {
@@ -8278,9 +8278,9 @@ class tl extends Lt {
8278
8278
  seconds: 0.4,
8279
8279
  retry: !1
8280
8280
  });
8281
- e.push(s), M(this, Mt, i), o(this, w, Be).call(this), t || i++;
8281
+ e.push(s), M(this, Ft, i), o(this, w, Be).call(this), t || i++;
8282
8282
  }
8283
- M(this, Mt, 80), o(this, w, Be).call(this, { dispensed: e }), o(this, w, Mn).call(this);
8283
+ M(this, Ft, 80), o(this, w, Be).call(this, { dispensed: e }), o(this, w, Fn).call(this);
8284
8284
  }
8285
8285
  async sendCustomCode({ code: t = [] } = {}) {
8286
8286
  if (t.length === 0) throw new Error("Invalid code");
@@ -8289,19 +8289,19 @@ class tl extends Lt {
8289
8289
  }
8290
8290
  hasToReturnChange(t = 0) {
8291
8291
  let e = t;
8292
- return e <= 0 ? !0 : (e = o(this, w, Fn).call(this, e).pending, e = o(this, w, Un).call(this, e).pending, !(e > 0));
8292
+ return e <= 0 ? !0 : (e = o(this, w, Un).call(this, e).pending, e = o(this, w, Ln).call(this, e).pending, !(e > 0));
8293
8293
  }
8294
8294
  async returnChange() {
8295
- return await o(this, w, Ln).call(this);
8295
+ return await o(this, w, Vn).call(this);
8296
8296
  }
8297
8297
  async returnInsertedMoney() {
8298
- return this.__money_session.inserted <= 0 ? !1 : await o(this, w, Ln).call(this, this.__money_session.inserted);
8298
+ return this.__money_session.inserted <= 0 ? !1 : await o(this, w, Vn).call(this, this.__money_session.inserted);
8299
8299
  }
8300
8300
  async serialCorruptMessage(t, e) {
8301
8301
  this.dispatch("corrupt:message", { data: t, message: e });
8302
8302
  }
8303
8303
  }
8304
- Wt = new WeakMap(), Mt = new WeakMap(), zt = new WeakMap(), w = new WeakSet(), Ms = function() {
8304
+ zt = new WeakMap(), Ft = new WeakMap(), Xt = new WeakMap(), w = new WeakSet(), Ms = function() {
8305
8305
  const t = [
8306
8306
  "banknote-purse:banknote-scrow-status",
8307
8307
  "banknote-purse:config",
@@ -8392,7 +8392,7 @@ Wt = new WeakMap(), Mt = new WeakMap(), zt = new WeakMap(), w = new WeakSet(), M
8392
8392
  return ["r20", "r50", "r100"].includes(t);
8393
8393
  }, Ws = function() {
8394
8394
  return ["r20", "r50", "r100", "r200", "r500"][this.__banknote_purse.recycler.banknote];
8395
- }, Bn = function(t, e, i) {
8395
+ }, Mn = function(t, e, i) {
8396
8396
  if (!t) return;
8397
8397
  let s = !0;
8398
8398
  if (o(this, w, qs).call(this, t) && i === "coin") {
@@ -8414,10 +8414,10 @@ Wt = new WeakMap(), Mt = new WeakMap(), zt = new WeakMap(), w = new WeakSet(), M
8414
8414
  s && this.dispatch("session:money-request", {});
8415
8415
  }, zs = function(t, e) {
8416
8416
  const i = parseInt(t[2], 16);
8417
- return e.name = "Coin Inserted", e.no_code = 2, e.additional = { where: null, coin: null }, i === 1 ? (e.name = "Lever pressed", e.description = "Reject lever", e.no_code = 100, this.dispatch("coin-purse:reject-lever", {})) : i === 2 ? (e.name = "Reset coin purse", e.description = "The configuration of coin purse was reset", e.no_code = 101, this.dispatch("coin-purse:reset", {})) : i >= 64 && i <= 79 ? (e.name = "Coin inserted in profit box", e.additional.where = "box") : i >= 80 && i <= 95 ? (e.name = "Coin inserted in tube", e.additional.where = "tube") : i >= 96 && i <= 111 ? (e.name = "Unused coin", e.description = "Something come from coin changer but in MDB Docs is unused", e.additional.where = "unused") : i >= 112 && i <= 127 ? (e.name = "Coin rejected", e.additional.where = "rejected") : i >= 144 && i <= 159 ? (e.name = "Coin dispensed", e.additional.where = "out", e.description = `Undefined value: ¿${t[2]}?`) : (e.name = "Coin inserted", e.description = "Undefined status. Without information of this", e.no_code = 400), i === 1 || i === 2 || i >= 160 || i >= 128 && i <= 143 || ([e.description, e.additional.coin] = o(this, w, Vs).call(this, t[2]), e.no_code = 38 + i, o(this, w, Bn).call(this, e.additional.coin, e.additional.where, "coin"), ["tube", "out"].includes(e.additional.where) && this.dispatch("coin-purse:tubes", this.coins.tubes), this.dispatch("coin-purse:coin-event", this.coins)), e;
8417
+ return e.name = "Coin Inserted", e.no_code = 2, e.additional = { where: null, coin: null }, i === 1 ? (e.name = "Lever pressed", e.description = "Reject lever", e.no_code = 100, this.dispatch("coin-purse:reject-lever", {})) : i === 2 ? (e.name = "Reset coin purse", e.description = "The configuration of coin purse was reset", e.no_code = 101, this.dispatch("coin-purse:reset", {})) : i >= 64 && i <= 79 ? (e.name = "Coin inserted in profit box", e.additional.where = "box") : i >= 80 && i <= 95 ? (e.name = "Coin inserted in tube", e.additional.where = "tube") : i >= 96 && i <= 111 ? (e.name = "Unused coin", e.description = "Something come from coin changer but in MDB Docs is unused", e.additional.where = "unused") : i >= 112 && i <= 127 ? (e.name = "Coin rejected", e.additional.where = "rejected") : i >= 144 && i <= 159 ? (e.name = "Coin dispensed", e.additional.where = "out", e.description = `Undefined value: ¿${t[2]}?`) : (e.name = "Coin inserted", e.description = "Undefined status. Without information of this", e.no_code = 400), i === 1 || i === 2 || i >= 160 || i >= 128 && i <= 143 || ([e.description, e.additional.coin] = o(this, w, Vs).call(this, t[2]), e.no_code = 38 + i, o(this, w, Mn).call(this, e.additional.coin, e.additional.where, "coin"), ["tube", "out"].includes(e.additional.where) && this.dispatch("coin-purse:tubes", this.coins.tubes), this.dispatch("coin-purse:coin-event", this.coins)), e;
8418
8418
  }, Xs = function(t, e) {
8419
8419
  const i = parseInt(t[2], 16);
8420
- return e.name = "Banknote Inserted", e.no_code = 2, e.additional = { where: null, banknote: null }, i === 42 ? (e.name = "Banknote dispensed", e.description = "Banknote dispensed by request.", e.additional.banknote = o(this, w, Ws).call(this), e.additional.where = "out", e.no_code = 200) : i >= 128 && i <= 143 ? (e.name = "Banknote inserted", e.additional.where = "stacker") : i >= 144 && i <= 159 ? (e.name = "Banknote inserted in pre stacker", e.additional.where = "tmp") : i >= 160 && i <= 175 ? (e.name = "Banknote rejected", e.additional.where = "nothing") : i >= 176 && i <= 191 && (e.name = "Banknote inserted", e.additional.where = "recycler"), i >= 128 && i <= 191 && ([e.description, e.additional.banknote] = o(this, w, js).call(this, t[2]), e.no_code = 74 + i), o(this, w, Bn).call(this, e.additional.banknote, e.additional.where, "banknote"), this.dispatch("banknote-purse:event-banknote", this.banknotes), e;
8420
+ return e.name = "Banknote Inserted", e.no_code = 2, e.additional = { where: null, banknote: null }, i === 42 ? (e.name = "Banknote dispensed", e.description = "Banknote dispensed by request.", e.additional.banknote = o(this, w, Ws).call(this), e.additional.where = "out", e.no_code = 200) : i >= 128 && i <= 143 ? (e.name = "Banknote inserted", e.additional.where = "stacker") : i >= 144 && i <= 159 ? (e.name = "Banknote inserted in pre stacker", e.additional.where = "tmp") : i >= 160 && i <= 175 ? (e.name = "Banknote rejected", e.additional.where = "nothing") : i >= 176 && i <= 191 && (e.name = "Banknote inserted", e.additional.where = "recycler"), i >= 128 && i <= 191 && ([e.description, e.additional.banknote] = o(this, w, js).call(this, t[2]), e.no_code = 74 + i), o(this, w, Mn).call(this, e.additional.banknote, e.additional.where, "banknote"), this.dispatch("banknote-purse:event-banknote", this.banknotes), e;
8421
8421
  }, $s = function(t, e) {
8422
8422
  const i = parseInt(t, 16);
8423
8423
  return i === 1 ? (e.name = "Coin purse enabled", e.description = "Configuration complete, enabled", e.no_code = 3) : i === 0 ? (e.name = "Coin purse disabled", e.description = "Disabled by system request", e.no_code = 4) : (e.name = "Status unknown", e.description = "The response of coin purse doesn't identify successfully", e.no_code = 400), this.dispatch("coin-purse:config", { enabled: i === 1 }), e;
@@ -8551,15 +8551,15 @@ Wt = new WeakMap(), Mt = new WeakMap(), zt = new WeakMap(), w = new WeakSet(), M
8551
8551
  this.decToHex(a),
8552
8552
  this.decToHex(c)
8553
8553
  ], ["F1", "C5", t, e, i, s, a, c, "00", "00", "F2", "00"];
8554
- }, Mn = function() {
8555
- M(this, Wt, !1), M(this, Mt, 0), M(this, zt, 0);
8554
+ }, Fn = function() {
8555
+ M(this, zt, !1), M(this, Ft, 0), M(this, Xt, 0);
8556
8556
  }, /**
8557
8557
  *
8558
8558
  * @param {null|object} dispensed
8559
8559
  * @param {number} limit
8560
8560
  */
8561
8561
  Be = function({ dispensed: t = null, limit: e = 80 } = {}) {
8562
- M(this, zt, Math.round(R(this, Mt) * 100 / e)), this.dispatch("percentage:test", { percentage: R(this, zt), dispensed: t });
8562
+ M(this, Xt, Math.round(R(this, Ft) * 100 / e)), this.dispatch("percentage:test", { percentage: R(this, Xt), dispensed: t });
8563
8563
  }, ha = function(t) {
8564
8564
  const e = ["20", "50", "100", "200", "500"], i = this.__banknote_purse.recycler.banknote, s = "$_" + e[i], a = parseInt(e[i]), c = this.banknotes.recycler[`p${e[i]}`], l = Math.min(Math.floor(t / a), c), h = {
8565
8565
  banknotes: { $_20: 0, $_50: 0, $_100: 0, $_200: 0, $_500: 0, $_1000: 0 },
@@ -8581,13 +8581,13 @@ Be = function({ dispensed: t = null, limit: e = 80 } = {}) {
8581
8581
  }
8582
8582
  };
8583
8583
  return i(1e3, "p1000"), i(500, "p500"), i(200, "p200"), i(100, "p100"), i(50, "p50"), i(20, "p20"), e.will_dispense = Object.values(e.banknotes).some((s) => s > 0), e;
8584
- }, Fn = function(t) {
8584
+ }, Un = function(t) {
8585
8585
  return this.hasRecycler ? o(this, w, Oe).call(this) ? o(this, w, ha).call(this, t) : o(this, w, ua).call(this, t) : {
8586
8586
  banknotes: { $_20: 0, $_50: 0, $_100: 0, $_200: 0, $_500: 0, $_1000: 0 },
8587
8587
  pending: t,
8588
8588
  will_dispense: !1
8589
8589
  };
8590
- }, Un = function(t) {
8590
+ }, Ln = function(t) {
8591
8591
  const e = {
8592
8592
  coins: { $_50c: 0, $_1: 0, $_2: 0, $_5: 0, $_10: 0 },
8593
8593
  pending: t,
@@ -8602,13 +8602,13 @@ Be = function({ dispensed: t = null, limit: e = 80 } = {}) {
8602
8602
  }
8603
8603
  };
8604
8604
  return i(10, "p10"), i(5, "p5"), i(2, "p2"), i(1, "p1"), i(0.5, "g50", "$_50c"), e.will_dispense = Object.values(e.coins).some((s) => s > 0), e;
8605
- }, Ln = async function(t = null) {
8605
+ }, Vn = async function(t = null) {
8606
8606
  if (!o(this, w, Us).call(this)) throw new Error("Change not available");
8607
8607
  let e = this.change, i = this.change;
8608
8608
  if (t !== null && (e = t, i = t), i <= 0) return !1;
8609
- const s = o(this, w, Fn).call(this, i);
8609
+ const s = o(this, w, Un).call(this, i);
8610
8610
  i = s.pending;
8611
- const a = o(this, w, Un).call(this, i);
8611
+ const a = o(this, w, Ln).call(this, i);
8612
8612
  return i = a.pending, i > 0 && this.dispatch("change:pending", { pending: i }), this.dispatch("change:dispense", {
8613
8613
  recycler: s.banknotes,
8614
8614
  coins: a.coins,
@@ -8616,14 +8616,14 @@ Be = function({ dispensed: t = null, limit: e = 80 } = {}) {
8616
8616
  delivery: e - i
8617
8617
  }), i === e ? !1 : (s.will_dispense && await this.banknotePurseDispense(s.banknotes), a.will_dispense && await this.coinPurseDispense(a.coins), !0);
8618
8618
  };
8619
- var Xt, da, pa;
8620
- class el extends Lt {
8619
+ var $t, da, pa;
8620
+ class el extends Vt {
8621
8621
  constructor({ filters: t = null, config_port: e = null, no_device: i = 1 } = {}) {
8622
8622
  super({ filters: t, config_port: e, no_device: i });
8623
- J(this, Xt);
8623
+ J(this, $t);
8624
8624
  if (this.__internal__.device.type = "arduino", $.getCustom(this.typeDevice, i))
8625
8625
  throw new Error(`Device ${this.typeDevice} ${i} already exists`);
8626
- this.__internal__.time.response_connection = 2e3, this.__internal__.time.response_general = 2e3, this.__internal__.serial.delay_first_connection = 1e3, o(this, Xt, pa).call(this), o(this, Xt, da).call(this), this.getResponseAsString();
8626
+ this.__internal__.time.response_connection = 2e3, this.__internal__.time.response_general = 2e3, this.__internal__.serial.delay_first_connection = 1e3, o(this, $t, pa).call(this), o(this, $t, da).call(this), this.getResponseAsString();
8627
8627
  }
8628
8628
  serialMessage(t) {
8629
8629
  const e = this.stringToArrayHex(t), i = this.stringToArrayBuffer(t), s = {
@@ -8679,7 +8679,7 @@ class el extends Lt {
8679
8679
  await this.sayCredits(), await this.sayAra(), await this.sayHi();
8680
8680
  }
8681
8681
  }
8682
- Xt = new WeakSet(), da = function() {
8682
+ $t = new WeakSet(), da = function() {
8683
8683
  $.addCustom("arduino", this);
8684
8684
  }, pa = function() {
8685
8685
  };
@@ -8694,16 +8694,16 @@ Xt = new WeakSet(), da = function() {
8694
8694
  */
8695
8695
  const nl = {
8696
8696
  wait: Ct,
8697
- getSeconds: rn,
8697
+ getSeconds: sn,
8698
8698
  supportWebSerial: ba
8699
- }, il = "4.1.6";
8699
+ }, il = "4.1.7";
8700
8700
  export {
8701
8701
  el as Arduino,
8702
8702
  tl as Boardroid,
8703
8703
  $ as Devices,
8704
- sn as Emulator,
8704
+ an as Emulator,
8705
8705
  Yc as Jofemar,
8706
- Lt as Kernel,
8706
+ Vt as Kernel,
8707
8707
  Oc as Locker,
8708
8708
  Zc as PinPad,
8709
8709
  Ic as Relay,