dev-classes 1.3.17 → 1.3.19

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.
@@ -1833,8 +1833,9 @@ N(w, "keyCookie", "AuthCookie"), N(w, "cookieOptions", {}), N(w, "registerReques
1833
1833
  if (A) {
1834
1834
  const U = JSON.parse(S);
1835
1835
  C.message = w.errorsHandler.getErrorMessageFromData(U), C.data = U;
1836
- }
1837
- typeof S == "string" && (C.message = S), s({ ...l, ...p, errExt: C });
1836
+ } else
1837
+ typeof S == "string" && (C.message = S);
1838
+ s({ ...l, ...p, errExt: C });
1838
1839
  }
1839
1840
  );
1840
1841
  } else
@@ -1,39 +1,39 @@
1
1
  var c = Object.defineProperty;
2
- var u = (e, t, s) => t in e ? c(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
- var i = (e, t, s) => (u(e, typeof t != "symbol" ? t + "" : t, s), s);
2
+ var u = (s, t, e) => t in s ? c(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
+ var n = (s, t, e) => (u(s, typeof t != "symbol" ? t + "" : t, e), e);
4
4
  const l = {
5
5
  isNetworkStatus: window.navigator.onLine,
6
6
  listCloseSignals: [],
7
7
  isWatcher: !1
8
8
  };
9
- class f {
9
+ class g {
10
10
  constructor() {
11
- i(this, "state", l);
12
- i(this, "resetState", () => this.state = l);
11
+ n(this, "state", l);
12
+ n(this, "resetState", () => this.state = l);
13
13
  }
14
14
  addWatchers(t) {
15
15
  if (!this.state.isWatcher) {
16
- this.state.isWatcher = !0;
17
- const s = [
16
+ console.log("InternetWatchers.addWatchers"), this.state.isWatcher = !0;
17
+ const e = [
18
18
  { event: "online", status: !0, textStatus: "network" },
19
19
  { event: "offline", status: !1, textStatus: "none" }
20
20
  ];
21
- for (let a = 0; a < s.length; a++) {
22
- const n = new AbortController(), { event: o, status: r, textStatus: h } = s[a];
23
- this.state.listCloseSignals.push(n), window.addEventListener(o, () => t(r, h), { signal: n.signal });
21
+ for (let a = 0; a < e.length; a++) {
22
+ const i = new AbortController(), { event: o, status: r, textStatus: h } = e[a];
23
+ this.state.listCloseSignals.push(i), window.addEventListener(o, () => t(r, h), { signal: i.signal });
24
24
  }
25
25
  }
26
26
  }
27
27
  removeWatchers() {
28
28
  if (this.state.isWatcher) {
29
29
  for (let t = 0; t < this.state.listCloseSignals.length; t++) {
30
- const s = this.state.listCloseSignals[t];
31
- s == null || s.abort();
30
+ const e = this.state.listCloseSignals[t];
31
+ e == null || e.abort();
32
32
  }
33
33
  this.resetState();
34
34
  }
35
35
  }
36
36
  }
37
37
  export {
38
- f as InternetWatchers
38
+ g as InternetWatchers
39
39
  };
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "homepage": "https://github.com/SinGlEBW/dev-classes#readme",
13
13
  "license": "MIT",
14
- "version": "1.3.17",
14
+ "version": "1.3.19",
15
15
  "type": "module",
16
16
  "module": "./dist/index.js",
17
17
  "main": "./dist/index.js",