mp-front-cli 0.0.79 → 0.0.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,27 +1,27 @@
1
- var oe = Object.defineProperty;
2
- var ne = (r, t, e) => t in r ? oe(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
3
- var g = (r, t, e) => (ne(r, typeof t != "symbol" ? t + "" : t, e), e);
4
- import { MessageHandler as J, LoadingHandler as C } from "./mp-front-cli-utils-rxjs.es.js";
5
- import { RxSubjectManager as Ur } from "./mp-front-cli-utils-rxjs.es.js";
6
- import ae, { t as y } from "i18next";
7
- import { t as se } from "./index-f596eb97.js";
8
- import { CustomLogger as le } from "./mp-front-cli-logger.es.js";
9
- import { of as d, switchMap as T, forkJoin as Y, catchError as W, EMPTY as Z, filter as X } from "rxjs";
10
- import { CustomEncrypter as ie } from "./mp-front-cli-encrypter.es.js";
11
- import { CustomHeader as ce } from "./mp-front-cli-header.es.js";
12
- import { CustomEncoder as Ae } from "./mp-front-cli-encoder.es.js";
13
- import { u as ue } from "./stringify-788d71a0.js";
1
+ var Q = Object.defineProperty;
2
+ var h = (l, t, e) => t in l ? Q(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
3
+ var L = (l, t, e) => (h(l, typeof t != "symbol" ? t + "" : t, e), e);
4
+ import { MessageHandler as u, LoadingHandler as U } from "./mp-front-cli-utils-rxjs.es.js";
5
+ import { RxSubjectManager as ge } from "./mp-front-cli-utils-rxjs.es.js";
6
+ import w, { t as C } from "i18next";
7
+ import { t as v } from "./index-f596eb97.js";
8
+ import { CustomLogger as x } from "./mp-front-cli-logger.es.js";
9
+ import { of as T, switchMap as c, forkJoin as I, catchError as B, EMPTY as p, filter as P } from "rxjs";
10
+ import { CustomEncrypter as G } from "./mp-front-cli-encrypter.es.js";
11
+ import { C as M, f as D } from "./custom-header-b6432556.js";
12
+ import { CustomEncoder as F } from "./mp-front-cli-encoder.es.js";
13
+ import { u as V } from "./stringify-788d71a0.js";
14
14
  import "node-jose";
15
15
  import "crypto";
16
- const Ee = {
16
+ const J = {
17
17
  es: {
18
18
  translation: {
19
- ...se
19
+ ...v
20
20
  }
21
21
  }
22
22
  };
23
- ae.init({
24
- resources: Ee,
23
+ w.init({
24
+ resources: J,
25
25
  lng: "es",
26
26
  // language to use, more information here: https://www.i18next.com/overview/configuration-options#languages-namespaces-resources
27
27
  // you can use the i18n.changeLanguage function to change the language manually: https://www.i18next.com/overview/api#changelanguage
@@ -33,7 +33,7 @@ ae.init({
33
33
  },
34
34
  debug: !1
35
35
  });
36
- const L = {
36
+ const g = {
37
37
  "MP-001": {
38
38
  code: 400,
39
39
  type: "modal",
@@ -594,1084 +594,288 @@ const L = {
594
594
  level: "warning"
595
595
  }
596
596
  };
597
- class D extends le {
597
+ class O extends x {
598
598
  get(t = "default", e = "NOT_FOUND") {
599
- var n, s;
599
+ var A, a;
600
600
  if (t instanceof Error)
601
601
  return this.logError(t.message), {
602
- ...L.internalError,
603
- title: y(L.internalError.title),
604
- message: y(L.internalError.message),
602
+ ...g.internalError,
603
+ title: C(g.internalError.title),
604
+ message: C(g.internalError.message),
605
605
  uuid: e
606
606
  };
607
- const o = typeof t == "string" ? t : t.code ?? t.errorType;
608
- this.logDebug("statusCode", o);
609
- const a = typeof t == "string" ? {} : { ...t };
607
+ const r = typeof t == "string" ? t : t.code ?? t.errorType;
608
+ this.logDebug("statusCode", r);
609
+ const s = typeof t == "string" ? {} : { ...t };
610
610
  return {
611
- ...L[o] ?? L.default,
612
- title: y(
613
- ((n = L[o]) == null ? void 0 : n.title) ?? L.default.title,
614
- a
611
+ ...g[r] ?? g.default,
612
+ title: C(
613
+ ((A = g[r]) == null ? void 0 : A.title) ?? g.default.title,
614
+ s
615
615
  ),
616
- message: y(
617
- ((s = L[o]) == null ? void 0 : s.message) ?? L.default.message,
618
- a
616
+ message: C(
617
+ ((a = g[r]) == null ? void 0 : a.message) ?? g.default.message,
618
+ s
619
619
  ),
620
620
  uuid: e
621
621
  };
622
622
  }
623
623
  }
624
- class mr extends ie {
624
+ class Re extends G {
625
625
  constructor() {
626
626
  super(...arguments);
627
- g(this, "uuid", "");
628
- g(this, "session", null);
627
+ L(this, "uuid", "");
628
+ L(this, "session", null);
629
629
  }
630
630
  setSession(e) {
631
631
  this.session = e;
632
632
  }
633
633
  getSession() {
634
634
  if (!this.session)
635
- throw new D().get("SESSION_NOT_FOUND");
635
+ throw new O().get("SESSION_NOT_FOUND");
636
636
  return this.session;
637
637
  }
638
- returnData(e, o, a) {
639
- const n = this.encode(o, a);
640
- e.status(200).json(n);
638
+ returnData(e, r, s) {
639
+ const A = this.encode(r, s);
640
+ e.status(200).json(A);
641
641
  }
642
- returnError(e, o) {
643
- return o != null && o.uuid ? e.status(520).json(o) : e.status(520).json(new D().get(o, this.uuid));
642
+ returnError(e, r) {
643
+ return r != null && r.uuid ? e.status(520).json(r) : e.status(520).json(new O().get(r, this.uuid));
644
644
  }
645
645
  get(e) {
646
- return this.logDebug("get ApiMiddleware"), (o, a) => {
647
- var n;
648
- this.logDebug("return ApiMiddleware"), this.uuid = (n = o == null ? void 0 : o.body) == null ? void 0 : n.uuid, d(o).pipe(
649
- T(
650
- (s) => Y({
651
- params: d(this.decode(s.body)),
652
- headers: d(s.headers)
646
+ return this.logDebug("get ApiMiddleware"), (r, s) => {
647
+ var A;
648
+ this.logDebug("return ApiMiddleware"), this.uuid = (A = r == null ? void 0 : r.body) == null ? void 0 : A.uuid, T(r).pipe(
649
+ c(
650
+ (a) => I({
651
+ params: T(this.decode(a.body)),
652
+ headers: T(a.headers)
653
653
  })
654
654
  ),
655
- T(
656
- ({ params: s, headers: l }) => Y({
657
- response: e(s, this.uuid, l),
658
- headers: d(l),
659
- params: d(s)
655
+ c(
656
+ ({ params: a, headers: o }) => I({
657
+ response: e(a, this.uuid, o),
658
+ headers: T(o),
659
+ params: T(a)
660
660
  })
661
661
  ),
662
- T(({ params: s, response: l, headers: i }) => (this.logDebug(
663
- `ApiMiddleware \x1B[37m <URL>: \x1B[33m ${o.url} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(i)} \x1B[37m <UUID> \x1B[33m ${o.body.uuid} \x1B[37m <PARAMS> \x1B[33m ${JSON.stringify(s)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(l)}`
664
- ), d(l))),
665
- W((s) => {
666
- var l;
662
+ c(({ params: a, response: o, headers: E }) => (this.logDebug(
663
+ `ApiMiddleware \x1B[37m <URL>: \x1B[33m ${r.url} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(E)} \x1B[37m <UUID> \x1B[33m ${r.body.uuid} \x1B[37m <PARAMS> \x1B[33m ${JSON.stringify(a)} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(o)}`
664
+ ), T(o))),
665
+ B((a) => {
666
+ var o;
667
667
  return this.logError(
668
- `ApiMiddleware <URL>: ${o == null ? void 0 : o.url} <HEADERS>: ${JSON.stringify(o == null ? void 0 : o.headers)} <UUID> ${(l = o == null ? void 0 : o.body) == null ? void 0 : l.uuid} <PARAMS> ${JSON.stringify(o == null ? void 0 : o.body)} <ERROR>: ${JSON.stringify(s)}`
669
- ), this.returnError(a, s), Z;
668
+ `ApiMiddleware <URL>: ${r == null ? void 0 : r.url} <HEADERS>: ${JSON.stringify(r == null ? void 0 : r.headers)} <UUID> ${(o = r == null ? void 0 : r.body) == null ? void 0 : o.uuid} <PARAMS> ${JSON.stringify(r == null ? void 0 : r.body)} <ERROR>: ${JSON.stringify(a)}`
669
+ ), this.returnError(s, a), p;
670
670
  })
671
671
  ).subscribe({
672
- next: (s) => {
673
- this.logDebug("ApiMiddleware subscribe next", JSON.stringify(s)), this.returnData(a, s, this.uuid);
672
+ next: (a) => {
673
+ this.logDebug("ApiMiddleware subscribe next", JSON.stringify(a)), this.returnData(s, a, this.uuid);
674
674
  }
675
675
  });
676
676
  };
677
677
  }
678
678
  }
679
- var P = function(r, t) {
680
- return P = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, o) {
681
- e.__proto__ = o;
682
- } || function(e, o) {
683
- for (var a in o)
684
- Object.prototype.hasOwnProperty.call(o, a) && (e[a] = o[a]);
685
- }, P(r, t);
686
- };
687
- function G(r, t) {
688
- if (typeof t != "function" && t !== null)
689
- throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
690
- P(r, t);
691
- function e() {
692
- this.constructor = r;
693
- }
694
- r.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
695
- }
696
- var v = function() {
697
- return v = Object.assign || function(t) {
698
- for (var e, o = 1, a = arguments.length; o < a; o++) {
699
- e = arguments[o];
700
- for (var n in e)
701
- Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
702
- }
703
- return t;
704
- }, v.apply(this, arguments);
705
- };
706
- function fe(r, t) {
707
- var e = {};
708
- for (var o in r)
709
- Object.prototype.hasOwnProperty.call(r, o) && t.indexOf(o) < 0 && (e[o] = r[o]);
710
- if (r != null && typeof Object.getOwnPropertySymbols == "function")
711
- for (var a = 0, o = Object.getOwnPropertySymbols(r); a < o.length; a++)
712
- t.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(r, o[a]) && (e[o[a]] = r[o[a]]);
713
- return e;
714
- }
715
- function Re(r, t, e, o) {
716
- function a(n) {
717
- return n instanceof e ? n : new e(function(s) {
718
- s(n);
719
- });
720
- }
721
- return new (e || (e = Promise))(function(n, s) {
722
- function l(A) {
723
- try {
724
- c(o.next(A));
725
- } catch (f) {
726
- s(f);
727
- }
728
- }
729
- function i(A) {
730
- try {
731
- c(o.throw(A));
732
- } catch (f) {
733
- s(f);
734
- }
735
- }
736
- function c(A) {
737
- A.done ? n(A.value) : a(A.value).then(l, i);
738
- }
739
- c((o = o.apply(r, t || [])).next());
740
- });
741
- }
742
- function z(r, t) {
743
- var e = { label: 0, sent: function() {
744
- if (n[0] & 1)
745
- throw n[1];
746
- return n[1];
747
- }, trys: [], ops: [] }, o, a, n, s;
748
- return s = { next: l(0), throw: l(1), return: l(2) }, typeof Symbol == "function" && (s[Symbol.iterator] = function() {
749
- return this;
750
- }), s;
751
- function l(c) {
752
- return function(A) {
753
- return i([c, A]);
754
- };
755
- }
756
- function i(c) {
757
- if (o)
758
- throw new TypeError("Generator is already executing.");
759
- for (; s && (s = 0, c[0] && (e = 0)), e; )
760
- try {
761
- if (o = 1, a && (n = c[0] & 2 ? a.return : c[0] ? a.throw || ((n = a.return) && n.call(a), 0) : a.next) && !(n = n.call(a, c[1])).done)
762
- return n;
763
- switch (a = 0, n && (c = [c[0] & 2, n.value]), c[0]) {
764
- case 0:
765
- case 1:
766
- n = c;
767
- break;
768
- case 4:
769
- return e.label++, { value: c[1], done: !1 };
770
- case 5:
771
- e.label++, a = c[1], c = [0];
772
- continue;
773
- case 7:
774
- c = e.ops.pop(), e.trys.pop();
775
- continue;
776
- default:
777
- if (n = e.trys, !(n = n.length > 0 && n[n.length - 1]) && (c[0] === 6 || c[0] === 2)) {
778
- e = 0;
779
- continue;
780
- }
781
- if (c[0] === 3 && (!n || c[1] > n[0] && c[1] < n[3])) {
782
- e.label = c[1];
783
- break;
784
- }
785
- if (c[0] === 6 && e.label < n[1]) {
786
- e.label = n[1], n = c;
787
- break;
788
- }
789
- if (n && e.label < n[2]) {
790
- e.label = n[2], e.ops.push(c);
791
- break;
792
- }
793
- n[2] && e.ops.pop(), e.trys.pop();
794
- continue;
795
- }
796
- c = t.call(r, e);
797
- } catch (A) {
798
- c = [6, A], a = 0;
799
- } finally {
800
- o = n = 0;
801
- }
802
- if (c[0] & 5)
803
- throw c[1];
804
- return { value: c[0] ? c[1] : void 0, done: !0 };
805
- }
806
- }
807
- function p(r) {
808
- var t = typeof Symbol == "function" && Symbol.iterator, e = t && r[t], o = 0;
809
- if (e)
810
- return e.call(r);
811
- if (r && typeof r.length == "number")
812
- return {
813
- next: function() {
814
- return r && o >= r.length && (r = void 0), { value: r && r[o++], done: !r };
815
- }
816
- };
817
- throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
818
- }
819
- function N(r, t) {
820
- var e = typeof Symbol == "function" && r[Symbol.iterator];
821
- if (!e)
822
- return r;
823
- var o = e.call(r), a, n = [], s;
824
- try {
825
- for (; (t === void 0 || t-- > 0) && !(a = o.next()).done; )
826
- n.push(a.value);
827
- } catch (l) {
828
- s = { error: l };
829
- } finally {
830
- try {
831
- a && !a.done && (e = o.return) && e.call(o);
832
- } finally {
833
- if (s)
834
- throw s.error;
835
- }
836
- }
837
- return n;
838
- }
839
- function I(r, t, e) {
840
- if (e || arguments.length === 2)
841
- for (var o = 0, a = t.length, n; o < a; o++)
842
- (n || !(o in t)) && (n || (n = Array.prototype.slice.call(t, 0, o)), n[o] = t[o]);
843
- return r.concat(n || Array.prototype.slice.call(t));
844
- }
845
- function S(r) {
846
- return this instanceof S ? (this.v = r, this) : new S(r);
847
- }
848
- function me(r, t, e) {
849
- if (!Symbol.asyncIterator)
850
- throw new TypeError("Symbol.asyncIterator is not defined.");
851
- var o = e.apply(r, t || []), a, n = [];
852
- return a = {}, s("next"), s("throw"), s("return"), a[Symbol.asyncIterator] = function() {
853
- return this;
854
- }, a;
855
- function s(u) {
856
- o[u] && (a[u] = function(E) {
857
- return new Promise(function(U, R) {
858
- n.push([u, E, U, R]) > 1 || l(u, E);
859
- });
860
- });
861
- }
862
- function l(u, E) {
863
- try {
864
- i(o[u](E));
865
- } catch (U) {
866
- f(n[0][3], U);
867
- }
679
+ const b = process.env.ID_FRONT ?? "NOT_AVAILABLE";
680
+ class Te extends M {
681
+ constructor(e, r, s = {}) {
682
+ super(s);
683
+ L(this, "apiUrl");
684
+ L(this, "method");
685
+ this.apiUrl = e, this.method = r ?? "POST";
868
686
  }
869
- function i(u) {
870
- u.value instanceof S ? Promise.resolve(u.value.v).then(c, A) : f(n[0][2], u);
871
- }
872
- function c(u) {
873
- l("next", u);
874
- }
875
- function A(u) {
876
- l("throw", u);
877
- }
878
- function f(u, E) {
879
- u(E), n.shift(), n.length && l(n[0][0], n[0][1]);
880
- }
881
- }
882
- function de(r) {
883
- if (!Symbol.asyncIterator)
884
- throw new TypeError("Symbol.asyncIterator is not defined.");
885
- var t = r[Symbol.asyncIterator], e;
886
- return t ? t.call(r) : (r = typeof p == "function" ? p(r) : r[Symbol.iterator](), e = {}, o("next"), o("throw"), o("return"), e[Symbol.asyncIterator] = function() {
887
- return this;
888
- }, e);
889
- function o(n) {
890
- e[n] = r[n] && function(s) {
891
- return new Promise(function(l, i) {
892
- s = r[n](s), a(l, i, s.done, s.value);
893
- });
894
- };
895
- }
896
- function a(n, s, l, i) {
897
- Promise.resolve(i).then(function(c) {
898
- n({ value: c, done: l });
899
- }, s);
900
- }
901
- }
902
- function m(r) {
903
- return typeof r == "function";
904
- }
905
- function Te(r) {
906
- var t = function(o) {
907
- Error.call(o), o.stack = new Error().stack;
908
- }, e = r(t);
909
- return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
910
- }
911
- var b = Te(function(r) {
912
- return function(e) {
913
- r(this), this.message = e ? e.length + ` errors occurred during unsubscription:
914
- ` + e.map(function(o, a) {
915
- return a + 1 + ") " + o.toString();
916
- }).join(`
917
- `) : "", this.name = "UnsubscriptionError", this.errors = e;
918
- };
919
- });
920
- function H(r, t) {
921
- if (r) {
922
- var e = r.indexOf(t);
923
- 0 <= e && r.splice(e, 1);
924
- }
925
- }
926
- var M = function() {
927
- function r(t) {
928
- this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
929
- }
930
- return r.prototype.unsubscribe = function() {
931
- var t, e, o, a, n;
932
- if (!this.closed) {
933
- this.closed = !0;
934
- var s = this._parentage;
935
- if (s)
936
- if (this._parentage = null, Array.isArray(s))
937
- try {
938
- for (var l = p(s), i = l.next(); !i.done; i = l.next()) {
939
- var c = i.value;
940
- c.remove(this);
941
- }
942
- } catch (R) {
943
- t = { error: R };
944
- } finally {
945
- try {
946
- i && !i.done && (e = l.return) && e.call(l);
947
- } finally {
948
- if (t)
949
- throw t.error;
950
- }
951
- }
952
- else
953
- s.remove(this);
954
- var A = this.initialTeardown;
955
- if (m(A))
956
- try {
957
- A();
958
- } catch (R) {
959
- n = R instanceof b ? R.errors : [R];
960
- }
961
- var f = this._finalizers;
962
- if (f) {
963
- this._finalizers = null;
964
- try {
965
- for (var u = p(f), E = u.next(); !E.done; E = u.next()) {
966
- var U = E.value;
967
- try {
968
- $(U);
969
- } catch (R) {
970
- n = n ?? [], R instanceof b ? n = I(I([], N(n)), N(R.errors)) : n.push(R);
971
- }
972
- }
973
- } catch (R) {
974
- o = { error: R };
975
- } finally {
976
- try {
977
- E && !E.done && (a = u.return) && a.call(u);
978
- } finally {
979
- if (o)
980
- throw o.error;
981
- }
982
- }
983
- }
984
- if (n)
985
- throw new b(n);
986
- }
987
- }, r.prototype.add = function(t) {
988
- var e;
989
- if (t && t !== this)
990
- if (this.closed)
991
- $(t);
992
- else {
993
- if (t instanceof r) {
994
- if (t.closed || t._hasParent(this))
995
- return;
996
- t._addParent(this);
997
- }
998
- (this._finalizers = (e = this._finalizers) !== null && e !== void 0 ? e : []).push(t);
999
- }
1000
- }, r.prototype._hasParent = function(t) {
1001
- var e = this._parentage;
1002
- return e === t || Array.isArray(e) && e.includes(t);
1003
- }, r.prototype._addParent = function(t) {
1004
- var e = this._parentage;
1005
- this._parentage = Array.isArray(e) ? (e.push(t), e) : e ? [e, t] : t;
1006
- }, r.prototype._removeParent = function(t) {
1007
- var e = this._parentage;
1008
- e === t ? this._parentage = null : Array.isArray(e) && H(e, t);
1009
- }, r.prototype.remove = function(t) {
1010
- var e = this._finalizers;
1011
- e && H(e, t), t instanceof r && t._removeParent(this);
1012
- }, r.EMPTY = function() {
1013
- var t = new r();
1014
- return t.closed = !0, t;
1015
- }(), r;
1016
- }();
1017
- M.EMPTY;
1018
- function q(r) {
1019
- return r instanceof M || r && "closed" in r && m(r.remove) && m(r.add) && m(r.unsubscribe);
1020
- }
1021
- function $(r) {
1022
- m(r) ? r() : r.unsubscribe();
1023
- }
1024
- var ee = {
1025
- onUnhandledError: null,
1026
- onStoppedNotification: null,
1027
- Promise: void 0,
1028
- useDeprecatedSynchronousErrorHandling: !1,
1029
- useDeprecatedNextContext: !1
1030
- }, x = {
1031
- setTimeout: function(r, t) {
1032
- for (var e = [], o = 2; o < arguments.length; o++)
1033
- e[o - 2] = arguments[o];
1034
- var a = x.delegate;
1035
- return a != null && a.setTimeout ? a.setTimeout.apply(a, I([r, t], N(e))) : setTimeout.apply(void 0, I([r, t], N(e)));
1036
- },
1037
- clearTimeout: function(r) {
1038
- var t = x.delegate;
1039
- return ((t == null ? void 0 : t.clearTimeout) || clearTimeout)(r);
1040
- },
1041
- delegate: void 0
1042
- };
1043
- function re(r) {
1044
- x.setTimeout(function() {
1045
- throw r;
1046
- });
1047
- }
1048
- function j() {
1049
- }
1050
- function ge(r) {
1051
- r();
1052
- }
1053
- var V = function(r) {
1054
- G(t, r);
1055
- function t(e) {
1056
- var o = r.call(this) || this;
1057
- return o.isStopped = !1, e ? (o.destination = e, q(e) && e.add(o)) : o.destination = Se, o;
1058
- }
1059
- return t.create = function(e, o, a) {
1060
- return new Q(e, o, a);
1061
- }, t.prototype.next = function(e) {
1062
- this.isStopped || this._next(e);
1063
- }, t.prototype.error = function(e) {
1064
- this.isStopped || (this.isStopped = !0, this._error(e));
1065
- }, t.prototype.complete = function() {
1066
- this.isStopped || (this.isStopped = !0, this._complete());
1067
- }, t.prototype.unsubscribe = function() {
1068
- this.closed || (this.isStopped = !0, r.prototype.unsubscribe.call(this), this.destination = null);
1069
- }, t.prototype._next = function(e) {
1070
- this.destination.next(e);
1071
- }, t.prototype._error = function(e) {
1072
- try {
1073
- this.destination.error(e);
1074
- } finally {
1075
- this.unsubscribe();
1076
- }
1077
- }, t.prototype._complete = function() {
1078
- try {
1079
- this.destination.complete();
1080
- } finally {
1081
- this.unsubscribe();
1082
- }
1083
- }, t;
1084
- }(M), Le = Function.prototype.bind;
1085
- function B(r, t) {
1086
- return Le.call(r, t);
1087
- }
1088
- var Ue = function() {
1089
- function r(t) {
1090
- this.partialObserver = t;
1091
- }
1092
- return r.prototype.next = function(t) {
1093
- var e = this.partialObserver;
1094
- if (e.next)
1095
- try {
1096
- e.next(t);
1097
- } catch (o) {
1098
- h(o);
1099
- }
1100
- }, r.prototype.error = function(t) {
1101
- var e = this.partialObserver;
1102
- if (e.error)
1103
- try {
1104
- e.error(t);
1105
- } catch (o) {
1106
- h(o);
1107
- }
1108
- else
1109
- h(t);
1110
- }, r.prototype.complete = function() {
1111
- var t = this.partialObserver;
1112
- if (t.complete)
1113
- try {
1114
- t.complete();
1115
- } catch (e) {
1116
- h(e);
1117
- }
1118
- }, r;
1119
- }(), Q = function(r) {
1120
- G(t, r);
1121
- function t(e, o, a) {
1122
- var n = r.call(this) || this, s;
1123
- if (m(e) || !e)
1124
- s = {
1125
- next: e ?? void 0,
1126
- error: o ?? void 0,
1127
- complete: a ?? void 0
1128
- };
1129
- else {
1130
- var l;
1131
- n && ee.useDeprecatedNextContext ? (l = Object.create(e), l.unsubscribe = function() {
1132
- return n.unsubscribe();
1133
- }, s = {
1134
- next: e.next && B(e.next, l),
1135
- error: e.error && B(e.error, l),
1136
- complete: e.complete && B(e.complete, l)
1137
- }) : s = e;
1138
- }
1139
- return n.destination = new Ue(s), n;
1140
- }
1141
- return t;
1142
- }(V);
1143
- function h(r) {
1144
- re(r);
1145
- }
1146
- function Oe(r) {
1147
- throw r;
1148
- }
1149
- var Se = {
1150
- closed: !0,
1151
- next: j,
1152
- error: Oe,
1153
- complete: j
1154
- };
1155
- function pe(r, t, e, o, a) {
1156
- return new Ce(r, t, e, o, a);
1157
- }
1158
- var Ce = function(r) {
1159
- G(t, r);
1160
- function t(e, o, a, n, s, l) {
1161
- var i = r.call(this, e) || this;
1162
- return i.onFinalize = s, i.shouldUnsubscribe = l, i._next = o ? function(c) {
1163
- try {
1164
- o(c);
1165
- } catch (A) {
1166
- e.error(A);
1167
- }
1168
- } : r.prototype._next, i._error = n ? function(c) {
1169
- try {
1170
- n(c);
1171
- } catch (A) {
1172
- e.error(A);
1173
- } finally {
1174
- this.unsubscribe();
1175
- }
1176
- } : r.prototype._error, i._complete = a ? function() {
1177
- try {
1178
- a();
1179
- } catch (c) {
1180
- e.error(c);
1181
- } finally {
1182
- this.unsubscribe();
1183
- }
1184
- } : r.prototype._complete, i;
1185
- }
1186
- return t.prototype.unsubscribe = function() {
1187
- var e;
1188
- if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {
1189
- var o = this.closed;
1190
- r.prototype.unsubscribe.call(this), !o && ((e = this.onFinalize) === null || e === void 0 || e.call(this));
1191
- }
1192
- }, t;
1193
- }(V), _ = function() {
1194
- return typeof Symbol == "function" && Symbol.observable || "@@observable";
1195
- }();
1196
- function ye(r) {
1197
- return r;
1198
- }
1199
- function he(r) {
1200
- return r.length === 0 ? ye : r.length === 1 ? r[0] : function(e) {
1201
- return r.reduce(function(o, a) {
1202
- return a(o);
1203
- }, e);
1204
- };
1205
- }
1206
- var O = function() {
1207
- function r(t) {
1208
- t && (this._subscribe = t);
1209
- }
1210
- return r.prototype.lift = function(t) {
1211
- var e = new r();
1212
- return e.source = this, e.operator = t, e;
1213
- }, r.prototype.subscribe = function(t, e, o) {
1214
- var a = this, n = ve(t) ? t : new Q(t, e, o);
1215
- return ge(function() {
1216
- var s = a, l = s.operator, i = s.source;
1217
- n.add(l ? l.call(n, i) : i ? a._subscribe(n) : a._trySubscribe(n));
1218
- }), n;
1219
- }, r.prototype._trySubscribe = function(t) {
1220
- try {
1221
- return this._subscribe(t);
1222
- } catch (e) {
1223
- t.error(e);
1224
- }
1225
- }, r.prototype.forEach = function(t, e) {
1226
- var o = this;
1227
- return e = k(e), new e(function(a, n) {
1228
- var s = new Q({
1229
- next: function(l) {
1230
- try {
1231
- t(l);
1232
- } catch (i) {
1233
- n(i), s.unsubscribe();
1234
- }
1235
- },
1236
- error: n,
1237
- complete: a
1238
- });
1239
- o.subscribe(s);
1240
- });
1241
- }, r.prototype._subscribe = function(t) {
1242
- var e;
1243
- return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(t);
1244
- }, r.prototype[_] = function() {
1245
- return this;
1246
- }, r.prototype.pipe = function() {
1247
- for (var t = [], e = 0; e < arguments.length; e++)
1248
- t[e] = arguments[e];
1249
- return he(t)(this);
1250
- }, r.prototype.toPromise = function(t) {
1251
- var e = this;
1252
- return t = k(t), new t(function(o, a) {
1253
- var n;
1254
- e.subscribe(function(s) {
1255
- return n = s;
1256
- }, function(s) {
1257
- return a(s);
1258
- }, function() {
1259
- return o(n);
1260
- });
1261
- });
1262
- }, r.create = function(t) {
1263
- return new r(t);
1264
- }, r;
1265
- }();
1266
- function k(r) {
1267
- var t;
1268
- return (t = r ?? ee.Promise) !== null && t !== void 0 ? t : Promise;
1269
- }
1270
- function De(r) {
1271
- return r && m(r.next) && m(r.error) && m(r.complete);
1272
- }
1273
- function ve(r) {
1274
- return r && r instanceof V || De(r) && q(r);
1275
- }
1276
- var Ne = function(r) {
1277
- return r && typeof r.length == "number" && typeof r != "function";
1278
- };
1279
- function Ie(r) {
1280
- return m(r == null ? void 0 : r.then);
1281
- }
1282
- function be(r) {
1283
- return m(r[_]);
1284
- }
1285
- function Be(r) {
1286
- return Symbol.asyncIterator && m(r == null ? void 0 : r[Symbol.asyncIterator]);
1287
- }
1288
- function we(r) {
1289
- return new TypeError("You provided " + (r !== null && typeof r == "object" ? "an invalid object" : "'" + r + "'") + " where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.");
1290
- }
1291
- function Pe() {
1292
- return typeof Symbol != "function" || !Symbol.iterator ? "@@iterator" : Symbol.iterator;
1293
- }
1294
- var xe = Pe();
1295
- function Qe(r) {
1296
- return m(r == null ? void 0 : r[xe]);
1297
- }
1298
- function Fe(r) {
1299
- return me(this, arguments, function() {
1300
- var e, o, a, n;
1301
- return z(this, function(s) {
1302
- switch (s.label) {
1303
- case 0:
1304
- e = r.getReader(), s.label = 1;
1305
- case 1:
1306
- s.trys.push([1, , 9, 10]), s.label = 2;
1307
- case 2:
1308
- return [4, S(e.read())];
1309
- case 3:
1310
- return o = s.sent(), a = o.value, n = o.done, n ? [4, S(void 0)] : [3, 5];
1311
- case 4:
1312
- return [2, s.sent()];
1313
- case 5:
1314
- return [4, S(a)];
1315
- case 6:
1316
- return [4, s.sent()];
1317
- case 7:
1318
- return s.sent(), [3, 2];
1319
- case 8:
1320
- return [3, 10];
1321
- case 9:
1322
- return e.releaseLock(), [7];
1323
- case 10:
1324
- return [2];
1325
- }
1326
- });
1327
- });
1328
- }
1329
- function Ge(r) {
1330
- return m(r == null ? void 0 : r.getReader);
1331
- }
1332
- function Me(r) {
1333
- if (r instanceof O)
1334
- return r;
1335
- if (r != null) {
1336
- if (be(r))
1337
- return Ve(r);
1338
- if (Ne(r))
1339
- return _e(r);
1340
- if (Ie(r))
1341
- return Je(r);
1342
- if (Be(r))
1343
- return te(r);
1344
- if (Qe(r))
1345
- return Ye(r);
1346
- if (Ge(r))
1347
- return He(r);
1348
- }
1349
- throw we(r);
1350
- }
1351
- function Ve(r) {
1352
- return new O(function(t) {
1353
- var e = r[_]();
1354
- if (m(e.subscribe))
1355
- return e.subscribe(t);
1356
- throw new TypeError("Provided object does not correctly implement Symbol.observable");
1357
- });
1358
- }
1359
- function _e(r) {
1360
- return new O(function(t) {
1361
- for (var e = 0; e < r.length && !t.closed; e++)
1362
- t.next(r[e]);
1363
- t.complete();
1364
- });
1365
- }
1366
- function Je(r) {
1367
- return new O(function(t) {
1368
- r.then(function(e) {
1369
- t.closed || (t.next(e), t.complete());
1370
- }, function(e) {
1371
- return t.error(e);
1372
- }).then(null, re);
1373
- });
1374
- }
1375
- function Ye(r) {
1376
- return new O(function(t) {
1377
- var e, o;
1378
- try {
1379
- for (var a = p(r), n = a.next(); !n.done; n = a.next()) {
1380
- var s = n.value;
1381
- if (t.next(s), t.closed)
1382
- return;
1383
- }
1384
- } catch (l) {
1385
- e = { error: l };
1386
- } finally {
1387
- try {
1388
- n && !n.done && (o = a.return) && o.call(a);
1389
- } finally {
1390
- if (e)
1391
- throw e.error;
1392
- }
1393
- }
1394
- t.complete();
1395
- });
1396
- }
1397
- function te(r) {
1398
- return new O(function(t) {
1399
- $e(r, t).catch(function(e) {
1400
- return t.error(e);
1401
- });
1402
- });
1403
- }
1404
- function He(r) {
1405
- return te(Fe(r));
1406
- }
1407
- function $e(r, t) {
1408
- var e, o, a, n;
1409
- return Re(this, void 0, void 0, function() {
1410
- var s, l;
1411
- return z(this, function(i) {
1412
- switch (i.label) {
1413
- case 0:
1414
- i.trys.push([0, 5, 6, 11]), e = de(r), i.label = 1;
1415
- case 1:
1416
- return [4, e.next()];
1417
- case 2:
1418
- if (o = i.sent(), !!o.done)
1419
- return [3, 4];
1420
- if (s = o.value, t.next(s), t.closed)
1421
- return [2];
1422
- i.label = 3;
1423
- case 3:
1424
- return [3, 1];
1425
- case 4:
1426
- return [3, 11];
1427
- case 5:
1428
- return l = i.sent(), a = { error: l }, [3, 11];
1429
- case 6:
1430
- return i.trys.push([6, , 9, 10]), o && !o.done && (n = e.return) ? [4, n.call(e)] : [3, 8];
1431
- case 7:
1432
- i.sent(), i.label = 8;
1433
- case 8:
1434
- return [3, 10];
1435
- case 9:
1436
- if (a)
1437
- throw a.error;
1438
- return [7];
1439
- case 10:
1440
- return [7];
1441
- case 11:
1442
- return t.complete(), [2];
1443
- }
1444
- });
1445
- });
1446
- }
1447
- function F(r, t) {
1448
- t === void 0 && (t = {});
1449
- var e = t.selector, o = fe(t, ["selector"]);
1450
- return new O(function(a) {
1451
- var n = new AbortController(), s = n.signal, l = !0, i = o.signal;
1452
- if (i)
1453
- if (i.aborted)
1454
- n.abort();
1455
- else {
1456
- var c = function() {
1457
- s.aborted || n.abort();
1458
- };
1459
- i.addEventListener("abort", c), a.add(function() {
1460
- return i.removeEventListener("abort", c);
1461
- });
1462
- }
1463
- var A = v(v({}, o), { signal: s }), f = function(u) {
1464
- l = !1, a.error(u);
1465
- };
1466
- return fetch(r, A).then(function(u) {
1467
- e ? Me(e(u)).subscribe(pe(a, void 0, function() {
1468
- l = !1, a.complete();
1469
- }, f)) : (l = !1, a.next(u), a.complete());
1470
- }).catch(f), function() {
1471
- l && n.abort();
1472
- };
1473
- });
1474
- }
1475
- const je = process.env.ID_FRONT ?? "NOT_AVAILABLE";
1476
- class dr extends ce {
1477
- constructor(e, o, a = {}) {
1478
- super(a);
1479
- g(this, "apiUrl");
1480
- g(this, "method");
1481
- this.apiUrl = e, this.method = o ?? "POST";
1482
- }
1483
- errorHandler(e, o) {
687
+ errorHandler(e, r) {
1484
688
  if (e != null && e.errors)
1485
- throw new D().get(e.errors[0], o);
689
+ throw new O().get(e.errors[0], r);
1486
690
  return !(e != null && e.errors);
1487
691
  }
1488
692
  formatParams(e) {
1489
693
  return JSON.stringify({
1490
694
  data: {
1491
- type: je,
695
+ type: b,
1492
696
  attributes: e
1493
697
  }
1494
698
  });
1495
699
  }
1496
- fetchData(e = {}, o) {
700
+ fetchData(e = {}, r) {
1497
701
  return this.getHeaders().pipe(
1498
- T(
1499
- (a) => F(
702
+ c(
703
+ (s) => D(
1500
704
  this.apiUrl,
1501
705
  {
1502
706
  method: "POST",
1503
- headers: a,
707
+ headers: s,
1504
708
  body: this.formatParams(e),
1505
- selector: (n) => n.json()
709
+ selector: (A) => A.json()
1506
710
  }
1507
711
  ).pipe(
1508
- T((n) => (this.logDebug(
1509
- `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${o} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
1510
- a
712
+ c((A) => (this.logDebug(
713
+ `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
714
+ s
1511
715
  )} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
1512
716
  this.formatParams(e)
1513
- )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(n)} \x1B[33m`
1514
- ), d(n)))
717
+ )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(A)} \x1B[33m`
718
+ ), T(A)))
1515
719
  )
1516
720
  ),
1517
- X((a) => this.errorHandler(a, o))
721
+ P((s) => this.errorHandler(s, r))
1518
722
  );
1519
723
  }
1520
- fetchCustomData(e = {}, o) {
724
+ fetchCustomData(e = {}, r) {
1521
725
  return this.getHeaders().pipe(
1522
- T(
1523
- (a) => F(this.apiUrl, {
726
+ c(
727
+ (s) => D(this.apiUrl, {
1524
728
  method: this.method,
1525
- headers: a,
729
+ headers: s,
1526
730
  body: this.method === "GET" ? null : JSON.stringify(e),
1527
- selector: (n) => n.json()
731
+ selector: (A) => A.json()
1528
732
  }).pipe(
1529
- T((n) => (this.logDebug(
1530
- `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m \x1B[37m <METHOD>: \x1B[33m ${this.method} <UUID>: \x1B[33m ${o} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
1531
- a
733
+ c((A) => (this.logDebug(
734
+ `FetchServiceBE \x1B[37m <URL>: \x1B[33m ${this.apiUrl} \x1B[37m \x1B[37m <METHOD>: \x1B[33m ${this.method} <UUID>: \x1B[33m ${r} \x1B[37m <HEADERS>: \x1B[33m ${JSON.stringify(
735
+ s
1532
736
  )} \x1B[37m <BODY>: \x1B[33m ${JSON.stringify(
1533
737
  e
1534
- )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(n)} \x1B[33m`
1535
- ), d(n)))
738
+ )} \x1B[37m <RESPONSE>: \x1B[33m ${JSON.stringify(A)} \x1B[33m`
739
+ ), T(A)))
1536
740
  )
1537
741
  )
1538
742
  );
1539
743
  }
1540
744
  }
1541
- const ke = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
1542
- function Ke(r) {
1543
- return typeof r == "string" && ke.test(r);
745
+ const Y = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
746
+ function H(l) {
747
+ return typeof l == "string" && Y.test(l);
1544
748
  }
1545
- function We(r) {
1546
- if (!Ke(r))
749
+ function $(l) {
750
+ if (!H(l))
1547
751
  throw TypeError("Invalid UUID");
1548
752
  let t;
1549
753
  const e = new Uint8Array(16);
1550
- return e[0] = (t = parseInt(r.slice(0, 8), 16)) >>> 24, e[1] = t >>> 16 & 255, e[2] = t >>> 8 & 255, e[3] = t & 255, e[4] = (t = parseInt(r.slice(9, 13), 16)) >>> 8, e[5] = t & 255, e[6] = (t = parseInt(r.slice(14, 18), 16)) >>> 8, e[7] = t & 255, e[8] = (t = parseInt(r.slice(19, 23), 16)) >>> 8, e[9] = t & 255, e[10] = (t = parseInt(r.slice(24, 36), 16)) / 1099511627776 & 255, e[11] = t / 4294967296 & 255, e[12] = t >>> 24 & 255, e[13] = t >>> 16 & 255, e[14] = t >>> 8 & 255, e[15] = t & 255, e;
754
+ return e[0] = (t = parseInt(l.slice(0, 8), 16)) >>> 24, e[1] = t >>> 16 & 255, e[2] = t >>> 8 & 255, e[3] = t & 255, e[4] = (t = parseInt(l.slice(9, 13), 16)) >>> 8, e[5] = t & 255, e[6] = (t = parseInt(l.slice(14, 18), 16)) >>> 8, e[7] = t & 255, e[8] = (t = parseInt(l.slice(19, 23), 16)) >>> 8, e[9] = t & 255, e[10] = (t = parseInt(l.slice(24, 36), 16)) / 1099511627776 & 255, e[11] = t / 4294967296 & 255, e[12] = t >>> 24 & 255, e[13] = t >>> 16 & 255, e[14] = t >>> 8 & 255, e[15] = t & 255, e;
1551
755
  }
1552
- function Ze(r) {
1553
- r = unescape(encodeURIComponent(r));
756
+ function j(l) {
757
+ l = unescape(encodeURIComponent(l));
1554
758
  const t = [];
1555
- for (let e = 0; e < r.length; ++e)
1556
- t.push(r.charCodeAt(e));
759
+ for (let e = 0; e < l.length; ++e)
760
+ t.push(l.charCodeAt(e));
1557
761
  return t;
1558
762
  }
1559
- const Xe = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", ze = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
1560
- function qe(r, t, e) {
1561
- function o(a, n, s, l) {
1562
- var i;
1563
- if (typeof a == "string" && (a = Ze(a)), typeof n == "string" && (n = We(n)), ((i = n) === null || i === void 0 ? void 0 : i.length) !== 16)
763
+ const _ = "6ba7b810-9dad-11d1-80b4-00c04fd430c8", W = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
764
+ function K(l, t, e) {
765
+ function r(s, A, a, o) {
766
+ var E;
767
+ if (typeof s == "string" && (s = j(s)), typeof A == "string" && (A = $(A)), ((E = A) === null || E === void 0 ? void 0 : E.length) !== 16)
1564
768
  throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
1565
- let c = new Uint8Array(16 + a.length);
1566
- if (c.set(n), c.set(a, n.length), c = e(c), c[6] = c[6] & 15 | t, c[8] = c[8] & 63 | 128, s) {
1567
- l = l || 0;
1568
- for (let A = 0; A < 16; ++A)
1569
- s[l + A] = c[A];
1570
- return s;
769
+ let R = new Uint8Array(16 + s.length);
770
+ if (R.set(A), R.set(s, A.length), R = e(R), R[6] = R[6] & 15 | t, R[8] = R[8] & 63 | 128, a) {
771
+ o = o || 0;
772
+ for (let n = 0; n < 16; ++n)
773
+ a[o + n] = R[n];
774
+ return a;
1571
775
  }
1572
- return ue(c);
776
+ return V(R);
1573
777
  }
1574
778
  try {
1575
- o.name = r;
779
+ r.name = l;
1576
780
  } catch {
1577
781
  }
1578
- return o.DNS = Xe, o.URL = ze, o;
782
+ return r.DNS = _, r.URL = W, r;
1579
783
  }
1580
- function er(r, t, e, o) {
1581
- switch (r) {
784
+ function Z(l, t, e, r) {
785
+ switch (l) {
1582
786
  case 0:
1583
- return t & e ^ ~t & o;
787
+ return t & e ^ ~t & r;
1584
788
  case 1:
1585
- return t ^ e ^ o;
789
+ return t ^ e ^ r;
1586
790
  case 2:
1587
- return t & e ^ t & o ^ e & o;
791
+ return t & e ^ t & r ^ e & r;
1588
792
  case 3:
1589
- return t ^ e ^ o;
793
+ return t ^ e ^ r;
1590
794
  }
1591
795
  }
1592
- function w(r, t) {
1593
- return r << t | r >>> 32 - t;
796
+ function S(l, t) {
797
+ return l << t | l >>> 32 - t;
1594
798
  }
1595
- function rr(r) {
799
+ function k(l) {
1596
800
  const t = [1518500249, 1859775393, 2400959708, 3395469782], e = [1732584193, 4023233417, 2562383102, 271733878, 3285377520];
1597
- if (typeof r == "string") {
1598
- const s = unescape(encodeURIComponent(r));
1599
- r = [];
1600
- for (let l = 0; l < s.length; ++l)
1601
- r.push(s.charCodeAt(l));
801
+ if (typeof l == "string") {
802
+ const a = unescape(encodeURIComponent(l));
803
+ l = [];
804
+ for (let o = 0; o < a.length; ++o)
805
+ l.push(a.charCodeAt(o));
1602
806
  } else
1603
- Array.isArray(r) || (r = Array.prototype.slice.call(r));
1604
- r.push(128);
1605
- const o = r.length / 4 + 2, a = Math.ceil(o / 16), n = new Array(a);
1606
- for (let s = 0; s < a; ++s) {
1607
- const l = new Uint32Array(16);
1608
- for (let i = 0; i < 16; ++i)
1609
- l[i] = r[s * 64 + i * 4] << 24 | r[s * 64 + i * 4 + 1] << 16 | r[s * 64 + i * 4 + 2] << 8 | r[s * 64 + i * 4 + 3];
1610
- n[s] = l;
1611
- }
1612
- n[a - 1][14] = (r.length - 1) * 8 / Math.pow(2, 32), n[a - 1][14] = Math.floor(n[a - 1][14]), n[a - 1][15] = (r.length - 1) * 8 & 4294967295;
1613
- for (let s = 0; s < a; ++s) {
1614
- const l = new Uint32Array(80);
807
+ Array.isArray(l) || (l = Array.prototype.slice.call(l));
808
+ l.push(128);
809
+ const r = l.length / 4 + 2, s = Math.ceil(r / 16), A = new Array(s);
810
+ for (let a = 0; a < s; ++a) {
811
+ const o = new Uint32Array(16);
1615
812
  for (let E = 0; E < 16; ++E)
1616
- l[E] = n[s][E];
1617
- for (let E = 16; E < 80; ++E)
1618
- l[E] = w(l[E - 3] ^ l[E - 8] ^ l[E - 14] ^ l[E - 16], 1);
1619
- let i = e[0], c = e[1], A = e[2], f = e[3], u = e[4];
1620
- for (let E = 0; E < 80; ++E) {
1621
- const U = Math.floor(E / 20), R = w(i, 5) + er(U, c, A, f) + u + t[U] + l[E] >>> 0;
1622
- u = f, f = A, A = w(c, 30) >>> 0, c = i, i = R;
813
+ o[E] = l[a * 64 + E * 4] << 24 | l[a * 64 + E * 4 + 1] << 16 | l[a * 64 + E * 4 + 2] << 8 | l[a * 64 + E * 4 + 3];
814
+ A[a] = o;
815
+ }
816
+ A[s - 1][14] = (l.length - 1) * 8 / Math.pow(2, 32), A[s - 1][14] = Math.floor(A[s - 1][14]), A[s - 1][15] = (l.length - 1) * 8 & 4294967295;
817
+ for (let a = 0; a < s; ++a) {
818
+ const o = new Uint32Array(80);
819
+ for (let i = 0; i < 16; ++i)
820
+ o[i] = A[a][i];
821
+ for (let i = 16; i < 80; ++i)
822
+ o[i] = S(o[i - 3] ^ o[i - 8] ^ o[i - 14] ^ o[i - 16], 1);
823
+ let E = e[0], R = e[1], n = e[2], m = e[3], d = e[4];
824
+ for (let i = 0; i < 80; ++i) {
825
+ const N = Math.floor(i / 20), y = S(E, 5) + Z(N, R, n, m) + d + t[N] + o[i] >>> 0;
826
+ d = m, m = n, n = S(R, 30) >>> 0, R = E, E = y;
1623
827
  }
1624
- e[0] = e[0] + i >>> 0, e[1] = e[1] + c >>> 0, e[2] = e[2] + A >>> 0, e[3] = e[3] + f >>> 0, e[4] = e[4] + u >>> 0;
828
+ e[0] = e[0] + E >>> 0, e[1] = e[1] + R >>> 0, e[2] = e[2] + n >>> 0, e[3] = e[3] + m >>> 0, e[4] = e[4] + d >>> 0;
1625
829
  }
1626
830
  return [e[0] >> 24 & 255, e[0] >> 16 & 255, e[0] >> 8 & 255, e[0] & 255, e[1] >> 24 & 255, e[1] >> 16 & 255, e[1] >> 8 & 255, e[1] & 255, e[2] >> 24 & 255, e[2] >> 16 & 255, e[2] >> 8 & 255, e[2] & 255, e[3] >> 24 & 255, e[3] >> 16 & 255, e[3] >> 8 & 255, e[3] & 255, e[4] >> 24 & 255, e[4] >> 16 & 255, e[4] >> 8 & 255, e[4] & 255];
1627
831
  }
1628
- const tr = qe("v5", 80, rr), K = tr;
1629
- class Tr extends Ae {
1630
- constructor(e, o = "POST", a = {}) {
832
+ const X = K("v5", 80, k), f = X;
833
+ class ce extends F {
834
+ constructor(e, r = "POST", s = {}) {
1631
835
  super();
1632
- g(this, "apiUrl");
1633
- g(this, "method");
1634
- g(this, "headers");
1635
- g(this, "isLoadingEnabled", !0);
1636
- this.apiUrl = e, this.method = o, this.headers = {
836
+ L(this, "apiUrl");
837
+ L(this, "method");
838
+ L(this, "headers");
839
+ L(this, "isLoadingEnabled", !0);
840
+ this.apiUrl = e, this.method = r, this.headers = {
1637
841
  "Content-Type": "application/json",
1638
- ...a
842
+ ...s
1639
843
  };
1640
844
  }
1641
845
  setIsLoadingEnabled(e) {
1642
846
  this.isLoadingEnabled = e;
1643
847
  }
1644
848
  errorHandler(e) {
1645
- return e.code && (e.type === "modal" || e.type === "message") && (J.getInstance().setSubject(e), C.getInstance().setSubject(!1)), !e.code;
849
+ return e.code && (e.type === "modal" || e.type === "message") && (u.getInstance().setSubject(e), U.getInstance().setSubject(!1)), !e.code;
1646
850
  }
1647
851
  fetchData(e = {}) {
1648
- const o = (/* @__PURE__ */ new Date()).toISOString(), a = K(o, K.URL), n = this.encode({ ...e }, a);
1649
- C.getInstance().setSubject(this.isLoadingEnabled);
1650
- const l = new URLSearchParams(window.location.search).get("flow") ?? "N/A";
1651
- return F(this.apiUrl, {
852
+ const r = (/* @__PURE__ */ new Date()).toISOString(), s = f(r, f.URL), A = this.encode({ ...e }, s);
853
+ U.getInstance().setSubject(this.isLoadingEnabled);
854
+ const o = new URLSearchParams(window.location.search).get("flow") ?? "N/A";
855
+ return D(this.apiUrl, {
1652
856
  method: this.method,
1653
- headers: { ...this.headers, flow: l },
1654
- body: n,
1655
- selector: (i) => i.json()
857
+ headers: { ...this.headers, flow: o },
858
+ body: A,
859
+ selector: (E) => E.json()
1656
860
  }).pipe(
1657
- T((i) => d(this.decode(i))),
1658
- T((i) => (this.logDebug(
1659
- `FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${n} <RESPONSE>: ${JSON.stringify(i)}`
1660
- ), d(i))),
1661
- X(this.errorHandler),
1662
- T((i) => (C.getInstance().setSubject(!1), d(i))),
1663
- W((i) => (C.getInstance().setSubject(!1), J.getInstance().setSubject(
1664
- new D().get(i, a)
1665
- ), Z))
861
+ c((E) => T(this.decode(E))),
862
+ c((E) => (this.logDebug(
863
+ `FetchServiceFE <URL>: ${this.apiUrl} <HEADERS>: ${JSON.stringify(this.headers)} <PARAMS> ${JSON.stringify(e)} <BODY> ${A} <RESPONSE>: ${JSON.stringify(E)}`
864
+ ), T(E))),
865
+ P(this.errorHandler),
866
+ c((E) => (U.getInstance().setSubject(!1), T(E))),
867
+ B((E) => (U.getInstance().setSubject(!1), u.getInstance().setSubject(
868
+ new O().get(E, s)
869
+ ), p))
1666
870
  );
1667
871
  }
1668
872
  }
1669
873
  export {
1670
- mr as ApiMiddleware,
1671
- D as ErrorCatalog,
1672
- dr as FetchServiceBE,
1673
- Tr as FetchServiceFE,
1674
- C as LoadingHandler,
1675
- J as MessageHandler,
1676
- Ur as RxSubjectManager
874
+ Re as ApiMiddleware,
875
+ O as ErrorCatalog,
876
+ Te as FetchServiceBE,
877
+ ce as FetchServiceFE,
878
+ U as LoadingHandler,
879
+ u as MessageHandler,
880
+ ge as RxSubjectManager
1677
881
  };