@yuneta/gobj-js 7.16.5 → 7.21.0
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/gobj-js.cjs.js +73 -14
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +535 -518
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +73 -15
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +291 -273
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +73 -14
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +658 -641
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +73 -14
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +765 -748
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.es.min.js
CHANGED
|
@@ -173,7 +173,7 @@ var O = class {
|
|
|
173
173
|
constructor(e, t, n = 0, r = null, l = "", o = null, i = null, s = 0, a = null, u = null, _ = null) {
|
|
174
174
|
this.type = e, this.name = t, this.alias = o, this.flag = n, this.default_value = r, this.header = i, this.fillspace = s, this.description = l, this.json_fn = a, this.schema = u, this.authpth = _;
|
|
175
175
|
}
|
|
176
|
-
}, S = () => new O(0, null), N = (e, t, n, r, l) => new O(e, t, n, r, l), R = (e, t, n, r, l, o) => new O(e, t, 0, null, o, n, null, 0, l, r, null),
|
|
176
|
+
}, S = () => new O(0, null), N = (e, t, n, r, l) => new O(e, t, n, r, l), R = (e, t, n, r, l, o) => new O(e, t, 0, null, o, n, null, 0, l, r, null), w = (e, t, n, r, l, o, i) => new O(e, t, n, null, i, r, null, 0, o, l, null), j = (e, t, n, r, l) => new O(e, t, n, r, l), D = (e, t, n, r, l, o) => new O(e, t, n, null, o, r, null, 0, null, l, null), A = (e, t, n, r, l) => new O(e, t, n, null, l, null, null, 0, null, null, r), $ = (e, t, n, r, l, o) => new O(e, t, n, null, o, null, r, l), I = class {
|
|
177
177
|
constructor(e, t, n, r, l, o, i, s, a) {
|
|
178
178
|
this.gclass_name = e, this.dl_states = [], this.dl_events = [], this.gmt = t, this.lmt = n, this.attrs_table = r, this.priv = l, this.authz_table = o, this.command_table = i, this.s_user_trace_level = s, this.gclass_flag = Number(a) || 0, this.instances = 0, this.trace_level = 0, this.no_trace_level = 0, this.jn_trace_filter = null, this.fsm_checked = !1;
|
|
179
179
|
}
|
|
@@ -388,7 +388,7 @@ function ae(e) {
|
|
|
388
388
|
return Q = Number(e) || 0, 0;
|
|
389
389
|
}
|
|
390
390
|
function ue(e, t, n) {
|
|
391
|
-
const r = pr(e) ?
|
|
391
|
+
const r = pr(e) ? $e(e) : e;
|
|
392
392
|
if (!r) return xn(`gobj_set_gclass_trace: gclass NOT FOUND: ${e}`), -1;
|
|
393
393
|
const l = z(t, "gobj_set_gclass_trace");
|
|
394
394
|
return l ? (n ? r.trace_level |= l : r.trace_level &= ~l, 0) : -1;
|
|
@@ -399,7 +399,7 @@ function _e(e, t, n) {
|
|
|
399
399
|
return r ? (n ? e.trace_level |= r : e.trace_level &= ~r, 0) : -1;
|
|
400
400
|
}
|
|
401
401
|
function ce(e, t, n) {
|
|
402
|
-
const r = pr(e) ?
|
|
402
|
+
const r = pr(e) ? $e(e) : e;
|
|
403
403
|
if (!r) return xn(`gobj_set_gclass_no_trace: gclass NOT FOUND: ${e}`), -1;
|
|
404
404
|
const l = z(t, "gobj_set_gclass_no_trace");
|
|
405
405
|
return l ? (n ? r.no_trace_level |= l : r.no_trace_level &= ~l, 0) : -1;
|
|
@@ -422,7 +422,7 @@ function de(e, t, n, r, l, o, i) {
|
|
|
422
422
|
const s = [["EV_STATE_CHANGED", U.EVF_SYSTEM_EVENT | U.EVF_OUTPUT_EVENT | U.EVF_NO_WARN_SUBS], [0, 0]];
|
|
423
423
|
for (let e = 0; e < s.length; e++) {
|
|
424
424
|
let t = s[e][0], n = s[e][1];
|
|
425
|
-
|
|
425
|
+
we(b, t, n);
|
|
426
426
|
}
|
|
427
427
|
return 0;
|
|
428
428
|
}
|
|
@@ -538,7 +538,7 @@ function Te(e, t, n) {
|
|
|
538
538
|
return Vt(e, t) ? Ee(e) : e && e.bottom_gobj ? Te(e.bottom_gobj, t, n) : (n && xn(`GClass Attribute NOT FOUND: ${Tt(e)}, attr ${t}`), null);
|
|
539
539
|
}
|
|
540
540
|
function he(e, t, n) {
|
|
541
|
-
if (!(e && e instanceof
|
|
541
|
+
if (!(e && e instanceof I)) return n && xn("gclass NULL"), null;
|
|
542
542
|
if (!t) return e.attrs_table;
|
|
543
543
|
for (let n = 0; n < e.attrs_table.length; n++) {
|
|
544
544
|
const r = e.attrs_table[n];
|
|
@@ -549,10 +549,10 @@ function he(e, t, n) {
|
|
|
549
549
|
function ye(e, t, n, r, l, o, i, s, a, u, _) {
|
|
550
550
|
if (Sr(e)) return xn("gclass_name EMPTY"), null;
|
|
551
551
|
if (e.includes("`") || e.includes("^") || e.includes(".")) return xn(`GClass name CANNOT have '.' or '^' or '\`' char: ${e}`), null;
|
|
552
|
-
if (
|
|
553
|
-
let c = new
|
|
552
|
+
if ($e(e)) return xn(`GClass ALREADY exists: ${e}`), null;
|
|
553
|
+
let c = new I(e, r, l, o, i, s, a, u, _);
|
|
554
554
|
(function(e, t) {
|
|
555
|
-
e && e instanceof
|
|
555
|
+
e && e instanceof I ? t ? p[t] ? xn(`gclass ALREADY REGISTERED: ${t}`) : p[t] = e : xn("gclass_name undefined") : xn("gclass undefined");
|
|
556
556
|
})(c, e);
|
|
557
557
|
const f = n.length;
|
|
558
558
|
for (let e = 0; e < f; e++) {
|
|
@@ -569,7 +569,7 @@ function ye(e, t, n, r, l, o, i, s, a, u, _) {
|
|
|
569
569
|
let n = t[e][0], r = t[e][1];
|
|
570
570
|
if (!Sr(n)) {
|
|
571
571
|
if (De(c, n)) return xn(`SMachine: event repeated in input_events: ${n}`), ve(c), null;
|
|
572
|
-
|
|
572
|
+
je(c, n, r);
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
575
|
if (!c.fsm_checked) {
|
|
@@ -582,7 +582,7 @@ function ve(e) {
|
|
|
582
582
|
let t;
|
|
583
583
|
if (pr(e)) t = e;
|
|
584
584
|
else {
|
|
585
|
-
if (!(e instanceof
|
|
585
|
+
if (!(e instanceof I)) return xn("Cannot unregister gclass, type unknown"), -1;
|
|
586
586
|
t = e.gclass_name;
|
|
587
587
|
}
|
|
588
588
|
let n = p[t];
|
|
@@ -605,22 +605,22 @@ function Se(e, t) {
|
|
|
605
605
|
return null;
|
|
606
606
|
}
|
|
607
607
|
function Ne(e, t) {
|
|
608
|
-
return e instanceof
|
|
608
|
+
return e instanceof I ? Oe(e, t) ? (xn(`state already exists: ${t}`), -1) : (e.dl_states.push(new V(t)), 0) : (xn("Cannot add state, typeof not GClass"), -1);
|
|
609
609
|
}
|
|
610
610
|
function Re(e, t, n, r, l) {
|
|
611
|
-
if (!(e instanceof
|
|
611
|
+
if (!(e instanceof I)) return xn("Cannot add state, typeof not GClass"), -1;
|
|
612
612
|
if (Sr(t)) return xn("state_name EMPTY"), -1;
|
|
613
613
|
let o = Oe(e, t);
|
|
614
614
|
return o ? Se(o, n) ? (xn(`event already exists: gclass ${e.gclass_name}, state ${t}, event ${n}`), -1) : (o.dl_actions.push(new G(n, r, l)), 0) : (xn(`state not found: ${t}`), -1);
|
|
615
615
|
}
|
|
616
|
-
function
|
|
616
|
+
function we(e, t, n) {
|
|
617
617
|
Sr(t) || e.push(new M(t, n));
|
|
618
618
|
}
|
|
619
|
-
function
|
|
620
|
-
return e instanceof
|
|
619
|
+
function je(e, t, n) {
|
|
620
|
+
return e instanceof I ? we(e.dl_events, t, n) : (xn("Cannot add state, typeof not GClass"), -1);
|
|
621
621
|
}
|
|
622
622
|
function De(e, t) {
|
|
623
|
-
if (!(e instanceof
|
|
623
|
+
if (!(e instanceof I)) return xn("Cannot add state, typeof not GClass"), 0;
|
|
624
624
|
const n = e.dl_events.length, r = e.dl_events;
|
|
625
625
|
for (let e = 0; e < n; e++) {
|
|
626
626
|
let n = r[e];
|
|
@@ -629,7 +629,7 @@ function De(e, t) {
|
|
|
629
629
|
return null;
|
|
630
630
|
}
|
|
631
631
|
function Ae(e) {
|
|
632
|
-
if (!(e instanceof
|
|
632
|
+
if (!(e instanceof I)) return xn("Cannot add state, typeof not GClass"), -1;
|
|
633
633
|
let t = 0;
|
|
634
634
|
cr(e.dl_states) || (xn(`GClass without states: ${e.gclass_name}`), t += -1);
|
|
635
635
|
for (let n = 0; n < e.dl_states.length; n++) {
|
|
@@ -652,14 +652,14 @@ function Ae(e) {
|
|
|
652
652
|
}
|
|
653
653
|
return t;
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function $e(e, t) {
|
|
656
656
|
let n = null;
|
|
657
657
|
try {
|
|
658
658
|
n = p[e];
|
|
659
659
|
} catch (e) {}
|
|
660
660
|
return n || (t && xn(`gclass not found: ${e}`), null);
|
|
661
661
|
}
|
|
662
|
-
function
|
|
662
|
+
function Ie() {
|
|
663
663
|
let e = [];
|
|
664
664
|
for (const t of Object.keys(m)) sr(e, t);
|
|
665
665
|
return e;
|
|
@@ -679,7 +679,7 @@ function Pe(e, t) {
|
|
|
679
679
|
t.parent && xn(`_add_child() ALREADY HAS PARENT: ${t.gobj_name}`), e.dl_children.push(t), t.parent = e;
|
|
680
680
|
}
|
|
681
681
|
function Ue(e, t) {
|
|
682
|
-
let n =
|
|
682
|
+
let n = Kl(e.dl_children, t);
|
|
683
683
|
n >= 0 && (ar(e.dl_children, n), t.parent = null);
|
|
684
684
|
}
|
|
685
685
|
function Fe(e, t) {
|
|
@@ -724,7 +724,7 @@ function xe(e, n, r, l, o) {
|
|
|
724
724
|
o |= L.gobj_flag_service;
|
|
725
725
|
}
|
|
726
726
|
if (Sr(n)) return xn("gclass_name must be a string"), null;
|
|
727
|
-
let i =
|
|
727
|
+
let i = $e(n, !1);
|
|
728
728
|
if (!i) return xn(`GClass not registered: ${n}^${e}`), null;
|
|
729
729
|
if (!pr(e)) return xn(`gobj_name must be a string: ${n}`), null;
|
|
730
730
|
if (!Sr(e)) {
|
|
@@ -788,7 +788,7 @@ function Ze(e, t, n) {
|
|
|
788
788
|
return e.gclass.gclass_flag & C.gcflag_manual_start || St(e) || ut(e) || _t(e) || Xe(e), 0;
|
|
789
789
|
}
|
|
790
790
|
function et(e) {
|
|
791
|
-
return St(e) ? (xn("gobj NULL or DESTROYED"), -1) :
|
|
791
|
+
return St(e) ? (xn("gobj NULL or DESTROYED"), -1) : jt(e, F.WALK_FIRST2LAST, Ze, 0, 0);
|
|
792
792
|
}
|
|
793
793
|
function tt(e, t, n) {
|
|
794
794
|
return e.gclass.gclass_flag & C.gcflag_manual_start || _t(e) ? 1 : (ut(e) || Xe(e), 0);
|
|
@@ -807,7 +807,7 @@ function lt(e, t, n) {
|
|
|
807
807
|
return ut(e) && rt(e), 0;
|
|
808
808
|
}
|
|
809
809
|
function ot(e) {
|
|
810
|
-
return St(e) ? (xn("gobj NULL or DESTROYED"), -1) :
|
|
810
|
+
return St(e) ? (xn("gobj NULL or DESTROYED"), -1) : jt(e, F.WALK_FIRST2LAST, lt, 0, 0);
|
|
811
811
|
}
|
|
812
812
|
function it(e) {
|
|
813
813
|
return St(e) ? (xn("gobj NULL or DESTROYED"), -1) : (ne(e) && Y(t("⏹ ⏹ ⏹ ⏹ stop_tree: %s", ht(e))), ut(e) && rt(e), Dt(e, F.WALK_TOP2BOTTOM, lt, 0, 0));
|
|
@@ -888,11 +888,11 @@ function Rt(e, t) {
|
|
|
888
888
|
if (!Or(e)) return xn("gobj NULL of bad type"), null;
|
|
889
889
|
e.bottom_gobj && Yn(`${Tt(e)}: bottom_gobj already set`), e.bottom_gobj = t;
|
|
890
890
|
}
|
|
891
|
-
function
|
|
891
|
+
function wt(e, t, n) {
|
|
892
892
|
return Or(e) ? t ? he(e.gclass, t, n) : e.gclass.attrs_table : (xn("gobj NULL of bad type"), null);
|
|
893
893
|
}
|
|
894
|
-
function
|
|
895
|
-
return St(e) ? (xn("gobj NULL, destroying, or bad type"), 0) :
|
|
894
|
+
function jt(e, t, n, r, l) {
|
|
895
|
+
return St(e) ? (xn("gobj NULL, destroying, or bad type"), 0) : $t(e.dl_children, t, n, r, l);
|
|
896
896
|
}
|
|
897
897
|
function Dt(e, t, n, r, l) {
|
|
898
898
|
return St(e) ? (xn("gobj NULL, destroying, or bad type"), 0) : kt(e.dl_children, t, n, r, l);
|
|
@@ -900,7 +900,7 @@ function Dt(e, t, n, r, l) {
|
|
|
900
900
|
function At(e) {
|
|
901
901
|
return "number" == typeof e && isFinite(e) ? e : (null == e || xn(`walk callback must return a NUMBER (-1 stop, 0 descend, >0 skip children), got ${typeof e}: taken as 0`), 0);
|
|
902
902
|
}
|
|
903
|
-
function
|
|
903
|
+
function $t(e, t, n, r, l) {
|
|
904
904
|
let o, i = [...e];
|
|
905
905
|
if (t & F.WALK_LAST2FIRST) for (let e = i.length; e > 0; e--) {
|
|
906
906
|
o = i[e - 1];
|
|
@@ -914,16 +914,16 @@ function It(e, t, n, r, l) {
|
|
|
914
914
|
}
|
|
915
915
|
return 0;
|
|
916
916
|
}
|
|
917
|
-
function
|
|
918
|
-
let o, i =
|
|
917
|
+
function It(e, t, n, r, l) {
|
|
918
|
+
let o, i = $t(e, t, n, r, l);
|
|
919
919
|
if (i < 0) return i;
|
|
920
920
|
if (t & F.WALK_LAST2FIRST) {
|
|
921
|
-
for (let s = e.length; s > 0; s--) if (o = e[s - 1], i =
|
|
922
|
-
} else for (let s = 0; s < e.length; s++) if (o = e[s], i =
|
|
921
|
+
for (let s = e.length; s > 0; s--) if (o = e[s - 1], i = It([...o.dl_children], t, n, r, l), i < 0) return i;
|
|
922
|
+
} else for (let s = 0; s < e.length; s++) if (o = e[s], i = It([...o.dl_children], t, n, r, l), i < 0) return i;
|
|
923
923
|
return i;
|
|
924
924
|
}
|
|
925
925
|
function kt(e, t, n, r, l) {
|
|
926
|
-
if (t & F.WALK_BYLEVEL) return
|
|
926
|
+
if (t & F.WALK_BYLEVEL) return It(e, t, n, r, l);
|
|
927
927
|
let o, i;
|
|
928
928
|
if (t & F.WALK_BOTTOM2TOP) for (let s = e.length; s > 0; s--) {
|
|
929
929
|
if (i = e[s - 1], o = kt([...i.dl_children], t, n, r, l), o < 0) return o;
|
|
@@ -1030,21 +1030,21 @@ function Wt(e, t, n) {
|
|
|
1030
1030
|
}
|
|
1031
1031
|
function Kt(e, t) {
|
|
1032
1032
|
if (t) {
|
|
1033
|
-
if (0 ===
|
|
1034
|
-
if (0 ===
|
|
1035
|
-
if (0 ===
|
|
1036
|
-
if (0 ===
|
|
1033
|
+
if (0 === jr(t, "__disabled__")) return _t(e);
|
|
1034
|
+
if (0 === jr(t, "__running__")) return ut(e);
|
|
1035
|
+
if (0 === jr(t, "__playing__")) return ft(e);
|
|
1036
|
+
if (0 === jr(t, "__service__")) return ct(e);
|
|
1037
1037
|
}
|
|
1038
1038
|
let n = Te(e, t, !1);
|
|
1039
1039
|
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ? nr(n, t) : e.gclass.gmt.mt_reading(e, t) : (xn(`${Tt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1040
1040
|
}
|
|
1041
1041
|
function xt(e, t) {
|
|
1042
|
-
t &&
|
|
1042
|
+
t && jr(t, "__trace_level__");
|
|
1043
1043
|
let n = Te(e, t, !1);
|
|
1044
1044
|
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ? nr(n, t) : e.gclass.gmt.mt_reading(e, t) : (xn(`${Tt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1045
1045
|
}
|
|
1046
1046
|
function Yt(e, t) {
|
|
1047
|
-
if (t && 0 ===
|
|
1047
|
+
if (t && 0 === jr(t, "__state__")) return en(e);
|
|
1048
1048
|
let n = Te(e, t, !1);
|
|
1049
1049
|
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ? nr(n, t) : e.gclass.gmt.mt_reading(e, t) : (xn(`${Tt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1050
1050
|
}
|
|
@@ -1090,7 +1090,7 @@ function qt(e) {
|
|
|
1090
1090
|
function Ht(e, t, n, r) {
|
|
1091
1091
|
let l = Ee(e), o = 0;
|
|
1092
1092
|
for (const [r, i] of Object.entries(t)) {
|
|
1093
|
-
let t =
|
|
1093
|
+
let t = wt(e, r, !0);
|
|
1094
1094
|
t && (-1 === n || t.flag & n) && (o += me(e, l, t, i));
|
|
1095
1095
|
}
|
|
1096
1096
|
return o;
|
|
@@ -1178,7 +1178,7 @@ function cn(e, n, r, l) {
|
|
|
1178
1178
|
if (1 === W) Y(t("🔄 %s %s%s %s from %s%s", n || "", e.running ? "" : "!!", Tt(e), o.state_name, l && !l.running ? "!!" : "", Tt(l)));
|
|
1179
1179
|
else {
|
|
1180
1180
|
let r = "";
|
|
1181
|
-
s.action && (r =
|
|
1181
|
+
s.action && (r = Bl(s.action)), Y(t("🔄 mach(%s%s^%s), st: %s, ev: %s%s%s, ac: %s, from(%s%s^%s)", e.running ? "" : "!!", Et(e), mt(e), o.state_name, "", n || "", "", r, l && !l.running ? "!!" : "", Et(l), mt(l)));
|
|
1182
1182
|
}
|
|
1183
1183
|
r && (X(e) | ee()) & B.TRACE_EV_KW && _r(r) && Hn(r);
|
|
1184
1184
|
}
|
|
@@ -1238,8 +1238,8 @@ function pn(e, t, n, r, l) {
|
|
|
1238
1238
|
return -1;
|
|
1239
1239
|
}
|
|
1240
1240
|
function mn(e, n, r, l) {
|
|
1241
|
-
let o = Mr(e, n, "publisher", null,
|
|
1242
|
-
if (!!(Fr(e, n, "subs_flag", null,
|
|
1241
|
+
let o = Mr(e, n, "publisher", null, wn.KW_REQUIRED), i = Mr(e, n, "subscriber", null, wn.KW_REQUIRED), s = Vr(e, n, "event", "", wn.KW_REQUIRED);
|
|
1242
|
+
if (!!(Fr(e, n, "subs_flag", null, wn.KW_REQUIRED) & fn.__hard_subscription__) && !r) return -1;
|
|
1243
1243
|
E && Kt(E, "trace_subscriptions") && (Y(t("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s'", s || "", Tt(o), Tt(i))), Hn(n)), o.obflag & P.obflag_destroyed || l || o.gclass.gmt.mt_subscription_deleted && o.gclass.gmt.mt_subscription_deleted(o, n);
|
|
1244
1244
|
let a = pn(o.dl_subscriptions, o, s, n, i);
|
|
1245
1245
|
return a >= 0 ? ar(o.dl_subscriptions, a) : (xn(`${Tt(e)}: subscription in publisher not found`), Hn(n)), a = pn(i.dl_subscribings, o, s, n, i), a >= 0 ? ar(i.dl_subscribings, a) : (xn(`${Tt(e)}: subscription in subscriber not found`), Hn(n)), 0;
|
|
@@ -1320,13 +1320,13 @@ function yn(e, t, n, r) {
|
|
|
1320
1320
|
function vn(e) {
|
|
1321
1321
|
let t = yn(e, null, null, null);
|
|
1322
1322
|
for (let n = 0; n < t.length; n++) {
|
|
1323
|
-
let r = t[n], l = Mr(e, r, "publisher", null,
|
|
1324
|
-
or(r, "s_event", Vr(e, r, "event", "",
|
|
1323
|
+
let r = t[n], l = Mr(e, r, "publisher", null, wn.KW_REQUIRED), o = Mr(e, r, "subscriber", null, wn.KW_REQUIRED);
|
|
1324
|
+
or(r, "s_event", Vr(e, r, "event", "", wn.KW_REQUIRED)), or(r, "s_publisher", Tt(l)), or(r, "s_subscriber", Tt(o));
|
|
1325
1325
|
}
|
|
1326
1326
|
let n = On(e, 0, null, 0);
|
|
1327
1327
|
for (let t = 0; t < n.length; t++) {
|
|
1328
|
-
let r = n[t], l = Mr(e, r, "publisher", null,
|
|
1329
|
-
or(r, "s_event", Vr(e, r, "event", "",
|
|
1328
|
+
let r = n[t], l = Mr(e, r, "publisher", null, wn.KW_REQUIRED), o = Mr(e, r, "subscriber", null, wn.KW_REQUIRED);
|
|
1329
|
+
or(r, "s_event", Vr(e, r, "event", "", wn.KW_REQUIRED)), or(r, "s_publisher", Tt(l)), or(r, "s_subscriber", Tt(o));
|
|
1330
1330
|
}
|
|
1331
1331
|
return {
|
|
1332
1332
|
subscriptions: t,
|
|
@@ -1356,10 +1356,10 @@ function Sn(e, n, r) {
|
|
|
1356
1356
|
if (t < 0) break;
|
|
1357
1357
|
if (!t) continue;
|
|
1358
1358
|
}
|
|
1359
|
-
let _ = Mr(e, u, "subscriber", null,
|
|
1359
|
+
let _ = Mr(e, u, "subscriber", null, wn.KW_REQUIRED);
|
|
1360
1360
|
if (!_ || St(_)) continue;
|
|
1361
|
-
let c = Fr(e, u, "subs_flag", 0,
|
|
1362
|
-
if (Sr(f) || 0 ===
|
|
1361
|
+
let c = Fr(e, u, "subs_flag", 0, wn.KW_REQUIRED), f = Vr(e, u, "event", "", wn.KW_REQUIRED);
|
|
1362
|
+
if (Sr(f) || 0 === jr(f, n)) {
|
|
1363
1363
|
Wr(e, u, "__config__", null, 0);
|
|
1364
1364
|
let l = Wr(e, u, "__global__", null, 0), i = Wr(e, u, "__local__", null, 0), f = Kr(e, u, "__filter__", null, 0), g = r, d = 1;
|
|
1365
1365
|
if (e.gclass.gmt.mt_publication_filter ? d = e.gclass.gmt.mt_publication_filter(e, n, g, _) : fr(f) > 0 && (d = qr(g, f) ? 1 : 0, o && (Y(t("💜💜🔄%s publishing with filter, event '%s', subscriber'%s', publisher %s", d ? "👍" : "👎", n || "", Tt(_), Tt(e))), Hn(f))), d < 0) break;
|
|
@@ -1385,7 +1385,7 @@ function Nn(e, n, r, l) {
|
|
|
1385
1385
|
function Rn(e, n, r, l) {
|
|
1386
1386
|
return St(e) ? (xn("gobj NULL or DESTROYED"), -1) : e.gclass.gmt.mt_stats ? e.gclass.gmt.mt_stats(e, n, r, l) : d ? d(e, n, r, l) : s(0, -1, t("%s, stats parser not available", Tt(e)), 0, 0);
|
|
1387
1387
|
}
|
|
1388
|
-
var
|
|
1388
|
+
var wn = Object.freeze({
|
|
1389
1389
|
KW_REQUIRED: 1,
|
|
1390
1390
|
KW_CREATE: 2,
|
|
1391
1391
|
KW_WILD_NUMBER: 4,
|
|
@@ -1405,7 +1405,7 @@ Object.freeze({
|
|
|
1405
1405
|
JSON_FALSE: 7,
|
|
1406
1406
|
JSON_NULL: 8
|
|
1407
1407
|
});
|
|
1408
|
-
var
|
|
1408
|
+
var jn = "undefined" != typeof window ? window.console : console, Dn = jn.error, An = jn.warn, $n = jn.info, In = jn.debug, kn = null;
|
|
1409
1409
|
function Cn(e) {
|
|
1410
1410
|
kn = "function" == typeof e ? e : null;
|
|
1411
1411
|
}
|
|
@@ -1438,7 +1438,7 @@ function Mn(e, t, n) {
|
|
|
1438
1438
|
}
|
|
1439
1439
|
}
|
|
1440
1440
|
function Wn(e) {
|
|
1441
|
-
e ? (Dn = e, An = e) : (Dn =
|
|
1441
|
+
e ? (Dn = e, An = e) : (Dn = jn.error, An = jn.warn);
|
|
1442
1442
|
}
|
|
1443
1443
|
function Kn(e) {
|
|
1444
1444
|
const t = Array.prototype.slice.call(arguments);
|
|
@@ -1463,27 +1463,27 @@ function Kn(e) {
|
|
|
1463
1463
|
return n;
|
|
1464
1464
|
}
|
|
1465
1465
|
function xn(e) {
|
|
1466
|
-
let t = Kn(e), n =
|
|
1467
|
-
Dn && (Dn ===
|
|
1466
|
+
let t = Kn(e), n = Ml();
|
|
1467
|
+
Dn && (Dn === jn.error ? Gn("error", t) && Dn("%c" + n + " ERROR: " + String(t), "color:red") : (Gn("error", t) && jn.error("%c" + n + " ERROR: " + String(t), "color:red"), Dn(`${n} ERROR: ${String(t)}`))), Mn("error", t, n);
|
|
1468
1468
|
}
|
|
1469
1469
|
function Yn(e) {
|
|
1470
|
-
let t = Kn(e), n =
|
|
1471
|
-
An && (An ===
|
|
1470
|
+
let t = Kn(e), n = Ml();
|
|
1471
|
+
An && (An === jn.warn ? Gn("warning", t) && An("%c" + n + " WARNING: " + String(t), "color:yellow") : (Gn("warning", t) && jn.warn("%c" + n + " WARNING: " + String(t), "color:yellow"), An(`${n} WARNING: ${String(t)}`))), Mn("warning", t, n);
|
|
1472
1472
|
}
|
|
1473
1473
|
function Bn(e) {
|
|
1474
|
-
let t = Kn(e), n =
|
|
1475
|
-
|
|
1474
|
+
let t = Kn(e), n = Ml();
|
|
1475
|
+
$n && Gn("info", t) && $n("%c" + n + " INFO: " + String(t), "color:cyan"), Mn("info", t, n);
|
|
1476
1476
|
}
|
|
1477
1477
|
function Jn(e) {
|
|
1478
|
-
let t = Kn(e), n =
|
|
1479
|
-
|
|
1478
|
+
let t = Kn(e), n = Ml();
|
|
1479
|
+
In && Gn("debug", t) && In("%c" + n + " DEBUG: " + String(t), "color:silver"), Mn("debug", t, n);
|
|
1480
1480
|
}
|
|
1481
1481
|
function qn(e) {
|
|
1482
|
-
let t = Kn(e), n =
|
|
1483
|
-
|
|
1482
|
+
let t = Kn(e), n = Ml();
|
|
1483
|
+
In && Gn("msg", t) && In("%c" + n + " MSG: " + String(t), "color:cyan"), Mn("msg", t, n);
|
|
1484
1484
|
}
|
|
1485
1485
|
function Hn(e, t) {
|
|
1486
|
-
Gn("json", t) && (t && window.console.warn("=====> " + t), window.console.dir(e)), Mn("json", e,
|
|
1486
|
+
Gn("json", t) && (t && window.console.warn("=====> " + t), window.console.dir(e)), Mn("json", e, Ml());
|
|
1487
1487
|
}
|
|
1488
1488
|
function Qn(e) {
|
|
1489
1489
|
return structuredClone(e);
|
|
@@ -1611,10 +1611,10 @@ function Rr(e, t, n) {
|
|
|
1611
1611
|
var r = (e + "").substring(0, n), l = (t + "").substring(0, n);
|
|
1612
1612
|
return r === l ? 0 : r > l ? 1 : -1;
|
|
1613
1613
|
}
|
|
1614
|
-
function
|
|
1614
|
+
function wr(e, t) {
|
|
1615
1615
|
return e === t ? 0 : e > t ? 1 : -1;
|
|
1616
1616
|
}
|
|
1617
|
-
function
|
|
1617
|
+
function jr(e, t) {
|
|
1618
1618
|
let n = e.toLowerCase(), r = t.toLowerCase();
|
|
1619
1619
|
return n === r ? 0 : n > r ? 1 : -1;
|
|
1620
1620
|
}
|
|
@@ -1628,19 +1628,19 @@ function Dr(e, t) {
|
|
|
1628
1628
|
let n = Number(e), r = Number(t);
|
|
1629
1629
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
1630
1630
|
}
|
|
1631
|
-
return
|
|
1631
|
+
return wr(String(e), String(t));
|
|
1632
1632
|
}
|
|
1633
1633
|
function Ar(e, t, n) {
|
|
1634
1634
|
var r;
|
|
1635
1635
|
return -1 !== (r = (e += "").indexOf(t)) && (n ? e.substring(0, r) : e.slice(r));
|
|
1636
1636
|
}
|
|
1637
|
-
function
|
|
1637
|
+
function $r(e) {
|
|
1638
1638
|
if (!pr(e)) return !1;
|
|
1639
1639
|
let t;
|
|
1640
1640
|
for (t = 0; t < e.length && "_" === e[t] && !(t > 2); t++);
|
|
1641
1641
|
return 2 === t;
|
|
1642
1642
|
}
|
|
1643
|
-
function
|
|
1643
|
+
function Ir(e) {
|
|
1644
1644
|
if (!pr(e)) return !1;
|
|
1645
1645
|
let t;
|
|
1646
1646
|
for (t = 0; t < e.length && "_" === e[t] && !(t > 2); t++);
|
|
@@ -1674,7 +1674,7 @@ function Pr(e, t, n) {
|
|
|
1674
1674
|
function Ur(e, t, n, r, l) {
|
|
1675
1675
|
e && !Or(e) && xn("GObj bad instanceof");
|
|
1676
1676
|
let o = Lr(e, t, n, !1);
|
|
1677
|
-
const i = l && l &
|
|
1677
|
+
const i = l && l & wn.KW_REQUIRED, s = l && l & wn.KW_CREATE, a = l && l & wn.KW_EXTRACT;
|
|
1678
1678
|
if (void 0 === o) {
|
|
1679
1679
|
if (s) {
|
|
1680
1680
|
let l = Boolean(r);
|
|
@@ -1687,7 +1687,7 @@ function Ur(e, t, n, r, l) {
|
|
|
1687
1687
|
function Fr(e, t, n, r, l) {
|
|
1688
1688
|
e && !Or(e) && xn("GObj bad instanceof");
|
|
1689
1689
|
let o = Lr(e, t, n, !1);
|
|
1690
|
-
const i = l && l &
|
|
1690
|
+
const i = l && l & wn.KW_REQUIRED, s = l && l & wn.KW_CREATE, a = l && l & wn.KW_EXTRACT;
|
|
1691
1691
|
if (void 0 === o) {
|
|
1692
1692
|
if (s) {
|
|
1693
1693
|
let l = parseInt(r);
|
|
@@ -1700,7 +1700,7 @@ function Fr(e, t, n, r, l) {
|
|
|
1700
1700
|
function Gr(e, t, n, r, l) {
|
|
1701
1701
|
e && !Or(e) && xn("GObj bad instanceof");
|
|
1702
1702
|
let o = Lr(e, t, n, !1);
|
|
1703
|
-
const i = l && l &
|
|
1703
|
+
const i = l && l & wn.KW_REQUIRED, s = l && l & wn.KW_CREATE, a = l && l & wn.KW_EXTRACT;
|
|
1704
1704
|
if (void 0 === o) {
|
|
1705
1705
|
if (s) {
|
|
1706
1706
|
let l = Number(r);
|
|
@@ -1713,7 +1713,7 @@ function Gr(e, t, n, r, l) {
|
|
|
1713
1713
|
function Vr(e, t, n, r, l) {
|
|
1714
1714
|
e && !Or(e) && xn("GObj bad instanceof");
|
|
1715
1715
|
let o = Lr(e, t, n, !1);
|
|
1716
|
-
const i = l && l &
|
|
1716
|
+
const i = l && l & wn.KW_REQUIRED, s = l && l & wn.KW_CREATE, a = l && l & wn.KW_EXTRACT;
|
|
1717
1717
|
if (void 0 === o) {
|
|
1718
1718
|
if (s) {
|
|
1719
1719
|
let l = String(r);
|
|
@@ -1726,7 +1726,7 @@ function Vr(e, t, n, r, l) {
|
|
|
1726
1726
|
function Mr(e, t, n, r, l) {
|
|
1727
1727
|
e && !Or(e) && xn("GObj bad instanceof");
|
|
1728
1728
|
let o = Lr(e, t, n, !1);
|
|
1729
|
-
const i = l && l &
|
|
1729
|
+
const i = l && l & wn.KW_REQUIRED, s = l && l & wn.KW_CREATE, a = l && l & wn.KW_EXTRACT;
|
|
1730
1730
|
if (void 0 === o) {
|
|
1731
1731
|
if (s) {
|
|
1732
1732
|
let l = r;
|
|
@@ -1739,7 +1739,7 @@ function Mr(e, t, n, r, l) {
|
|
|
1739
1739
|
function Wr(e, t, n, r, l) {
|
|
1740
1740
|
e && !Or(e) && xn("GObj bad instanceof");
|
|
1741
1741
|
let o = Lr(e, t, n, !1);
|
|
1742
|
-
const i = l && l &
|
|
1742
|
+
const i = l && l & wn.KW_REQUIRED, s = l && l & wn.KW_CREATE, a = l && l & wn.KW_EXTRACT;
|
|
1743
1743
|
if (void 0 === o) {
|
|
1744
1744
|
if (s) {
|
|
1745
1745
|
let l = Object(r);
|
|
@@ -1752,7 +1752,7 @@ function Wr(e, t, n, r, l) {
|
|
|
1752
1752
|
function Kr(e, t, n, r, l) {
|
|
1753
1753
|
e && !Or(e) && xn("GObj bad instanceof");
|
|
1754
1754
|
let o = Lr(e, t, n, !1);
|
|
1755
|
-
const i = l && l &
|
|
1755
|
+
const i = l && l & wn.KW_REQUIRED, s = l && l & wn.KW_CREATE, a = l && l & wn.KW_EXTRACT;
|
|
1756
1756
|
if (void 0 === o) {
|
|
1757
1757
|
if (s) {
|
|
1758
1758
|
let l = r;
|
|
@@ -1765,7 +1765,7 @@ function Kr(e, t, n, r, l) {
|
|
|
1765
1765
|
function xr(e, t, n, r, l) {
|
|
1766
1766
|
e && !Or(e) && xn("GObj bad instanceof");
|
|
1767
1767
|
let o = Lr(e, t, n, !1);
|
|
1768
|
-
const i = l && l &
|
|
1768
|
+
const i = l && l & wn.KW_REQUIRED, s = l && l & wn.KW_CREATE, a = l && l & wn.KW_EXTRACT;
|
|
1769
1769
|
if (void 0 === o) {
|
|
1770
1770
|
if (s) {
|
|
1771
1771
|
let l = Array(r);
|
|
@@ -1951,18 +1951,30 @@ function ol(e, t, n) {
|
|
|
1951
1951
|
let r = {};
|
|
1952
1952
|
if (Sr(n) || (t = Lr(e, t, n)), dr(t)) r = t;
|
|
1953
1953
|
else if (br(t)) for (let n = 0; n < t.length; n++) {
|
|
1954
|
-
let l = t[n], o = Vr(e, l, "id", "",
|
|
1954
|
+
let l = t[n], o = Vr(e, l, "id", "", wn.KW_REQUIRED);
|
|
1955
1955
|
Sr(o) || (r[o] = l);
|
|
1956
1956
|
}
|
|
1957
1957
|
else xn(`${Tt(e)} kwid_new_dict: data type unknown`);
|
|
1958
1958
|
return r;
|
|
1959
1959
|
}
|
|
1960
|
-
function il(e, t, n
|
|
1960
|
+
function il(e, t, n) {
|
|
1961
|
+
if (e && !Or(e) && xn("GObj bad instanceof"), Sr(n) || (t = Lr(e, t, n)), br(t)) return t;
|
|
1962
|
+
if (dr(t)) {
|
|
1963
|
+
let n = [];
|
|
1964
|
+
for (let r of Object.keys(t)) {
|
|
1965
|
+
let l = t[r];
|
|
1966
|
+
dr(l) ? (l.id = r, n.push(l)) : xn(`${Tt(e)} kwid_new_list: not a record: '${r}'`);
|
|
1967
|
+
}
|
|
1968
|
+
return n;
|
|
1969
|
+
}
|
|
1970
|
+
return xn(`${Tt(e)} kwid_new_list: wrong type for list`), [];
|
|
1971
|
+
}
|
|
1972
|
+
function sl(e, t, n, r, l) {
|
|
1961
1973
|
e && !Or(e) && xn("GObj bad instanceof");
|
|
1962
1974
|
let o = ll(e, t, n, r, l);
|
|
1963
|
-
return o
|
|
1975
|
+
return o && 0 !== o.length ? o[0] : null;
|
|
1964
1976
|
}
|
|
1965
|
-
function
|
|
1977
|
+
function al(e, t) {
|
|
1966
1978
|
if (e && !Or(e) && xn("GObj bad instanceof"), !t) return [];
|
|
1967
1979
|
let n = [];
|
|
1968
1980
|
if (pr(t)) n.push(t);
|
|
@@ -1976,7 +1988,7 @@ function sl(e, t) {
|
|
|
1976
1988
|
});
|
|
1977
1989
|
return n;
|
|
1978
1990
|
}
|
|
1979
|
-
function
|
|
1991
|
+
function ul(e, t, n) {
|
|
1980
1992
|
t = t || "id", n = n || "value";
|
|
1981
1993
|
let r = [];
|
|
1982
1994
|
if (br(e)) for (let l = 0; l < e.length; l++) {
|
|
@@ -2013,12 +2025,12 @@ function al(e, t, n) {
|
|
|
2013
2025
|
else xn("list2options(): case2 not implemented");
|
|
2014
2026
|
return r;
|
|
2015
2027
|
}
|
|
2016
|
-
function
|
|
2028
|
+
function _l(e, t) {
|
|
2017
2029
|
if (!e) return -1;
|
|
2018
2030
|
for (let n = 0; n < e.length; n++) if (e[n] && e[n].id === t) return n;
|
|
2019
2031
|
return -1;
|
|
2020
2032
|
}
|
|
2021
|
-
function
|
|
2033
|
+
function cl(e, t, n) {
|
|
2022
2034
|
if (!e || !t) return xn("ERROR: str_in_list() list or str empty"), !1;
|
|
2023
2035
|
let r = e.length;
|
|
2024
2036
|
if (n) {
|
|
@@ -2030,17 +2042,17 @@ function _l(e, t, n) {
|
|
|
2030
2042
|
} else for (let n = 0; n < r; n++) if (e[n] === t) return !0;
|
|
2031
2043
|
return !1;
|
|
2032
2044
|
}
|
|
2033
|
-
function
|
|
2045
|
+
function fl(e, t, n) {
|
|
2034
2046
|
if (!e) return xn("ERROR: strs_in_list() list empty"), !1;
|
|
2035
2047
|
if (!t) return xn("ERROR: strs_in_list() str empty"), !1;
|
|
2036
|
-
for (let r = 0; r < t.length; r++) if (
|
|
2048
|
+
for (let r = 0; r < t.length; r++) if (cl(e, t[r], n)) return !0;
|
|
2037
2049
|
return !1;
|
|
2038
2050
|
}
|
|
2039
|
-
function
|
|
2051
|
+
function gl(e, t) {
|
|
2040
2052
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return e.splice(n, 1), !0;
|
|
2041
2053
|
return !1;
|
|
2042
2054
|
}
|
|
2043
|
-
function
|
|
2055
|
+
function dl(e, t) {
|
|
2044
2056
|
try {
|
|
2045
2057
|
let n = e.__md_iev__;
|
|
2046
2058
|
if (n) return n[t];
|
|
@@ -2048,34 +2060,34 @@ function gl(e, t) {
|
|
|
2048
2060
|
return;
|
|
2049
2061
|
}
|
|
2050
2062
|
}
|
|
2051
|
-
function
|
|
2063
|
+
function bl(e, t, n) {
|
|
2052
2064
|
let r = e.__md_iev__;
|
|
2053
2065
|
r || (r = {}, e.__md_iev__ = r), r[t] = n;
|
|
2054
2066
|
}
|
|
2055
|
-
function
|
|
2067
|
+
function pl(e, t, n, r) {
|
|
2056
2068
|
if (!Or(e)) return xn("gobj is not a GObj"), null;
|
|
2057
2069
|
if (!t) return;
|
|
2058
|
-
let l =
|
|
2059
|
-
l || (l = [],
|
|
2070
|
+
let l = dl(t, n);
|
|
2071
|
+
l || (l = [], bl(t, n, l));
|
|
2060
2072
|
try {
|
|
2061
2073
|
br(l) && l.unshift(r);
|
|
2062
2074
|
} catch (e) {
|
|
2063
2075
|
xn(e);
|
|
2064
2076
|
}
|
|
2065
2077
|
}
|
|
2066
|
-
function
|
|
2078
|
+
function ml(e, t, n, r) {
|
|
2067
2079
|
if (!Or(e)) return xn("gobj is not a GObj"), null;
|
|
2068
2080
|
if (!dr(t)) return xn("kw is not a dict"), null;
|
|
2069
|
-
let l =
|
|
2081
|
+
let l = dl(t, n);
|
|
2070
2082
|
return l ? 0 === l.length ? (r && xn(`stack empty: ${n}`), null) : l[0] : (r && xn(`stack NOT FOUND: ${n}`), null);
|
|
2071
2083
|
}
|
|
2072
|
-
function
|
|
2084
|
+
function El(e, t, n) {
|
|
2073
2085
|
return Sr(n) ? Pr(e, t, "__md_iev__`__msg_type__") : Br(e, t, "__md_iev__", "__msg_type__", n), 0;
|
|
2074
2086
|
}
|
|
2075
|
-
function
|
|
2087
|
+
function Tl(e, t) {
|
|
2076
2088
|
return Vr(e, t, "__md_iev__`__msg_type__", "", 0);
|
|
2077
2089
|
}
|
|
2078
|
-
function
|
|
2090
|
+
function hl(e, t, n) {
|
|
2079
2091
|
let r = new XMLHttpRequest();
|
|
2080
2092
|
r.open("GET", e, !0), r.setRequestHeader("Accept", "application/json"), r.onreadystatechange = function() {
|
|
2081
2093
|
if (4 === r.readyState) if (200 === r.status || 0 === (e = r).status && e.responseText && e.responseURL.startsWith("file:")) try {
|
|
@@ -2087,13 +2099,13 @@ function Tl(e, t, n) {
|
|
|
2087
2099
|
var e;
|
|
2088
2100
|
}, r.send();
|
|
2089
2101
|
}
|
|
2090
|
-
function
|
|
2102
|
+
function yl(e, t, n) {
|
|
2091
2103
|
let r = new XMLHttpRequest();
|
|
2092
2104
|
r.open("POST", e), r.setRequestHeader("Accept", "application/json"), r.setRequestHeader("Content-Type", "application/json"), r.onreadystatechange = function() {
|
|
2093
2105
|
4 === r.readyState && n(r.status, r.responseText);
|
|
2094
2106
|
}, r.send(t);
|
|
2095
2107
|
}
|
|
2096
|
-
function
|
|
2108
|
+
function vl(e, t, n) {
|
|
2097
2109
|
void 0 !== n && pr(n) || (n = "");
|
|
2098
2110
|
for (let r of Object.keys(e)) {
|
|
2099
2111
|
if (!e.hasOwnProperty(r)) continue;
|
|
@@ -2103,61 +2115,61 @@ function yl(e, t, n) {
|
|
|
2103
2115
|
r,
|
|
2104
2116
|
e[r],
|
|
2105
2117
|
n
|
|
2106
|
-
]), dr(e[r]) &&
|
|
2118
|
+
]), dr(e[r]) && vl(e[r], t, n), n = n.slice(0, -l.length);
|
|
2107
2119
|
}
|
|
2108
2120
|
}
|
|
2109
|
-
function
|
|
2121
|
+
function Ol(e, t, n) {
|
|
2110
2122
|
n && (e = Qn(e));
|
|
2111
2123
|
let r = Kr(null, e, "type", [], 1);
|
|
2112
2124
|
Vr(null, e, "hook", "data", 1);
|
|
2113
2125
|
let l = Kr(null, e, "schema", {}, 1), o = Kr(null, e, "topics", {}, 1);
|
|
2114
|
-
return
|
|
2126
|
+
return vl(l, function(e, t, n, l) {
|
|
2115
2127
|
"__" !== t.substring(0, 2) && Kr(null, o, l, Qn(r), 1);
|
|
2116
2128
|
}, t), e;
|
|
2117
2129
|
}
|
|
2118
|
-
function
|
|
2130
|
+
function Sl(e, t, n, r) {
|
|
2119
2131
|
let l = Kr(null, Kr(null, e, "topics", null, 0), t, null, 0);
|
|
2120
2132
|
if (!l) return xn("jdb_update: topic not found: " + t), null;
|
|
2121
2133
|
if (Sr(r.id)) return xn("jdb_update: record without id: " + r), qn(r), null;
|
|
2122
2134
|
let o, i = n.split("`"), s = l;
|
|
2123
|
-
for (; (o = i.shift()) && !Sr(o) && s;) dr(s) && (s = Kr(null, s, e.hook, [], 1)), s =
|
|
2135
|
+
for (; (o = i.shift()) && !Sr(o) && s;) dr(s) && (s = Kr(null, s, e.hook, [], 1)), s = Dl(s, null, o, !1);
|
|
2124
2136
|
if (0 === i.length && s) if (br(s)) s.push(r);
|
|
2125
2137
|
else if (s.id === r.id) Object.assign(s, r);
|
|
2126
2138
|
else {
|
|
2127
|
-
let t = Kr(null, s, e.hook, [], 1), n =
|
|
2139
|
+
let t = Kr(null, s, e.hook, [], 1), n = Dl(t, e.hook, r.id, !1);
|
|
2128
2140
|
n ? Object.assign(n, r) : t.push(r);
|
|
2129
2141
|
}
|
|
2130
2142
|
return l;
|
|
2131
2143
|
}
|
|
2132
|
-
function
|
|
2144
|
+
function Nl(e, t, n, r) {
|
|
2133
2145
|
let l = Kr(null, Kr(null, e, "topics", null, 0), t, null, 0);
|
|
2134
2146
|
if (!l) return xn("jdb_delete: topic not found: " + t), null;
|
|
2135
2147
|
if (Sr(r.id)) return xn("jdb_delete: record without id: " + r), qn(r), null;
|
|
2136
2148
|
let o, i = n.split("`"), s = l;
|
|
2137
|
-
for (; (o = i.shift()) && !Sr(o) && s;) dr(s) && (s = Kr(null, s, e.hook, null, 0)), s =
|
|
2149
|
+
for (; (o = i.shift()) && !Sr(o) && s;) dr(s) && (s = Kr(null, s, e.hook, null, 0)), s = Dl(s, null, o, !1);
|
|
2138
2150
|
if (0 === i.length && s) if (br(s)) {
|
|
2139
|
-
let e =
|
|
2151
|
+
let e = _l(s, r.id);
|
|
2140
2152
|
e >= 0 && s.splice(e, 1);
|
|
2141
2153
|
} else {
|
|
2142
|
-
let t = Kr(null, s, e.hook, null, 0), n =
|
|
2154
|
+
let t = Kr(null, s, e.hook, null, 0), n = _l(t, r.id);
|
|
2143
2155
|
n >= 0 && t.splice(n, 1);
|
|
2144
2156
|
}
|
|
2145
2157
|
return l;
|
|
2146
2158
|
}
|
|
2147
|
-
function
|
|
2159
|
+
function Rl(e, t) {
|
|
2148
2160
|
let n = Kr(null, e, "topics", null, 0);
|
|
2149
2161
|
if (!n) return xn("jdb topics section not found"), qn(e), null;
|
|
2150
2162
|
return Kr(null, n, t, null, 0) || (xn("jdb topic not found: " + t), qn(n), null);
|
|
2151
2163
|
}
|
|
2152
|
-
function
|
|
2164
|
+
function wl(e, t, n, r) {
|
|
2153
2165
|
let l = Kr(null, Kr(null, e, "topics", null, 0), t, null, 0);
|
|
2154
|
-
return l ? (void 0 === r && (r = !0),
|
|
2166
|
+
return l ? (void 0 === r && (r = !0), Dl(l, e.hook, n, r)) : (xn("jdb_get: topic not found: " + t), null);
|
|
2155
2167
|
}
|
|
2156
2168
|
function jl(e, t, n) {
|
|
2157
2169
|
let r = Kr(null, Kr(null, e, "topics", null, 0), t, null, 0);
|
|
2158
2170
|
return r ? n < r.length ? r[n] : {} : (xn("jdb_get_by_idx: topic not found: " + t), null);
|
|
2159
2171
|
}
|
|
2160
|
-
function
|
|
2172
|
+
function Dl(e, t, n, r) {
|
|
2161
2173
|
if (!e) return null;
|
|
2162
2174
|
let l, o = e.length;
|
|
2163
2175
|
for (l = 0; l < o; l++) {
|
|
@@ -2166,18 +2178,18 @@ function wl(e, t, n, r) {
|
|
|
2166
2178
|
let e = o.id;
|
|
2167
2179
|
if (e && e === n) return o;
|
|
2168
2180
|
if (r && Cr(o, t)) {
|
|
2169
|
-
let e =
|
|
2181
|
+
let e = Dl(o[t], t, n, r);
|
|
2170
2182
|
if (e) return e;
|
|
2171
2183
|
}
|
|
2172
2184
|
}
|
|
2173
2185
|
}
|
|
2174
2186
|
return null;
|
|
2175
2187
|
}
|
|
2176
|
-
function
|
|
2188
|
+
function Al(e, t) {
|
|
2177
2189
|
let n = Qn(e);
|
|
2178
2190
|
return er(n, t), n;
|
|
2179
2191
|
}
|
|
2180
|
-
function
|
|
2192
|
+
function $l(e) {
|
|
2181
2193
|
function t(e) {
|
|
2182
2194
|
let t = e.replace(/-/g, "+").replace(/_/g, "/");
|
|
2183
2195
|
switch (t.length % 4) {
|
|
@@ -2210,7 +2222,7 @@ function Al(e) {
|
|
|
2210
2222
|
}
|
|
2211
2223
|
function Il(e, t) {
|
|
2212
2224
|
try {
|
|
2213
|
-
let n =
|
|
2225
|
+
let n = $l(e);
|
|
2214
2226
|
switch (t) {
|
|
2215
2227
|
case "header": return JSON.parse(n.header);
|
|
2216
2228
|
case "signature": return JSON.parse(n.signature);
|
|
@@ -2220,19 +2232,19 @@ function Il(e, t) {
|
|
|
2220
2232
|
return null;
|
|
2221
2233
|
}
|
|
2222
2234
|
}
|
|
2223
|
-
function
|
|
2235
|
+
function kl(e) {
|
|
2224
2236
|
return null == e ? "" : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2225
2237
|
}
|
|
2226
|
-
function
|
|
2238
|
+
function Cl(e) {
|
|
2227
2239
|
if (!e) return "";
|
|
2228
2240
|
const t = String(e).trim();
|
|
2229
|
-
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" :
|
|
2241
|
+
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" : kl(t);
|
|
2230
2242
|
}
|
|
2231
|
-
function
|
|
2243
|
+
function Ll(e) {
|
|
2232
2244
|
const t = document.createElement("template");
|
|
2233
2245
|
return t.innerHTML = e.trim(), t.content.firstChild;
|
|
2234
2246
|
}
|
|
2235
|
-
function
|
|
2247
|
+
function Pl(e, t) {
|
|
2236
2248
|
let [n, r, l, o] = e;
|
|
2237
2249
|
if (!n) return void xn("Tag must be a valid HTML element.");
|
|
2238
2250
|
let i = document.createElement(n), s = "";
|
|
@@ -2241,17 +2253,17 @@ function Ll(e, t) {
|
|
|
2241
2253
|
for (const n of Object.keys(r[e])) t += `${n}: ${r[e][n]};`;
|
|
2242
2254
|
i.style.cssText = t;
|
|
2243
2255
|
} else "style" === e ? i.style.cssText = r[e] : "i18n" === e || "data-i18n" === e || "data_i18next" === e || "data-i18next" === e ? null !== r[e] && void 0 !== r[e] && (s = r[e], i.setAttribute("data-i18n", s)) : i.setAttribute(e, r[e]);
|
|
2244
|
-
if (pr(l)) if (l = l.trim(), l.length > 0 && "<" === l[0]) i.appendChild(
|
|
2256
|
+
if (pr(l)) if (l = l.trim(), l.length > 0 && "<" === l[0]) i.appendChild(Ll(l));
|
|
2245
2257
|
else if (t && s) i.textContent = t(s) || l;
|
|
2246
2258
|
else i.textContent = l;
|
|
2247
2259
|
else if (br(l)) {
|
|
2248
|
-
if (l.length > 0) if (pr(l[0])) i.appendChild(
|
|
2249
|
-
else for (let e of l) Array.isArray(e) && e.length > 0 ? i.appendChild(
|
|
2260
|
+
if (l.length > 0) if (pr(l[0])) i.appendChild(Pl(l, t));
|
|
2261
|
+
else for (let e of l) Array.isArray(e) && e.length > 0 ? i.appendChild(Pl(e, t)) : e instanceof HTMLElement && i.appendChild(e);
|
|
2250
2262
|
} else l instanceof HTMLElement || l instanceof Text || l instanceof SVGElement ? i.appendChild(l) : null != l && (xn("content ignored"), Hn(l));
|
|
2251
2263
|
if (o && "object" == typeof o) for (const e of Object.keys(o)) i.addEventListener(e, o[e]);
|
|
2252
2264
|
return i;
|
|
2253
2265
|
}
|
|
2254
|
-
function
|
|
2266
|
+
function Ul(e) {
|
|
2255
2267
|
if (!e) return {
|
|
2256
2268
|
top: 0,
|
|
2257
2269
|
left: 0,
|
|
@@ -2271,28 +2283,34 @@ function Pl(e) {
|
|
|
2271
2283
|
bottom: t + i + l
|
|
2272
2284
|
};
|
|
2273
2285
|
}
|
|
2274
|
-
function
|
|
2286
|
+
function Fl(e) {
|
|
2275
2287
|
return new DOMParser().parseFromString(e, "image/svg+xml").firstChild;
|
|
2276
2288
|
}
|
|
2277
|
-
function
|
|
2278
|
-
vr(t)
|
|
2289
|
+
function Gl(e, t) {
|
|
2290
|
+
if (!vr(t)) return void xn("You must supply a translation function");
|
|
2291
|
+
e || (e = document);
|
|
2292
|
+
const n = (t) => {
|
|
2293
|
+
let n = [];
|
|
2294
|
+
return "function" == typeof e.matches && e.matches(t) && n.push(e), n.push(...e.querySelectorAll(t)), n;
|
|
2295
|
+
};
|
|
2296
|
+
n("[data-i18n]").forEach(function(e) {
|
|
2279
2297
|
let n = e.getAttribute("data-i18n");
|
|
2280
2298
|
for (let r of e.childNodes) if (r.nodeType === Node.TEXT_NODE) {
|
|
2281
2299
|
n || (n = r.nodeValue), r.nodeValue = t(n);
|
|
2282
2300
|
break;
|
|
2283
2301
|
}
|
|
2284
|
-
}),
|
|
2302
|
+
}), n("[data-i18n-title]").forEach(function(e) {
|
|
2285
2303
|
let n = e.getAttribute("data-i18n-title");
|
|
2286
2304
|
n && e.setAttribute("title", t(n));
|
|
2287
|
-
}),
|
|
2305
|
+
}), n("[data-i18n-aria-label]").forEach(function(e) {
|
|
2288
2306
|
let n = e.getAttribute("data-i18n-aria-label");
|
|
2289
2307
|
n && e.setAttribute("aria-label", t(n));
|
|
2290
|
-
}),
|
|
2308
|
+
}), n("[data-i18n-placeholder]").forEach(function(e) {
|
|
2291
2309
|
let n = e.getAttribute("data-i18n-placeholder");
|
|
2292
2310
|
n && e.setAttribute("placeholder", t(n));
|
|
2293
|
-
})
|
|
2311
|
+
});
|
|
2294
2312
|
}
|
|
2295
|
-
function
|
|
2313
|
+
function Vl(e = "Time Tracker", t = !1) {
|
|
2296
2314
|
const n = e, r = performance.now();
|
|
2297
2315
|
let l = r;
|
|
2298
2316
|
return t && Yn(`--\x3e ${n} - starting`), { mark: (e = "Intermediate", o = "") => {
|
|
@@ -2303,30 +2321,30 @@ function Gl(e = "Time Tracker", t = !1) {
|
|
|
2303
2321
|
};
|
|
2304
2322
|
} };
|
|
2305
2323
|
}
|
|
2306
|
-
function
|
|
2324
|
+
function Ml() {
|
|
2307
2325
|
const e = /* @__PURE__ */ new Date(), t = e.toISOString().slice(0, 19), n = String(e.getMilliseconds()).padStart(3, "0"), r = e.getTimezoneOffset();
|
|
2308
2326
|
return `${t}.${n}${r > 0 ? "-" : "+"}${String(Math.abs(r) / 60).padStart(2, "0")}${String(Math.abs(r) % 60).padStart(2, "0")}`;
|
|
2309
2327
|
}
|
|
2310
|
-
function
|
|
2328
|
+
function Wl() {
|
|
2311
2329
|
return Math.floor(Date.now() / 1e3);
|
|
2312
2330
|
}
|
|
2313
|
-
function
|
|
2331
|
+
function Kl(e, t) {
|
|
2314
2332
|
if (!e) throw "ERROR: index_in_list() list empty";
|
|
2315
2333
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return n;
|
|
2316
2334
|
return -1;
|
|
2317
2335
|
}
|
|
2318
|
-
function
|
|
2336
|
+
function xl() {
|
|
2319
2337
|
let e = "";
|
|
2320
2338
|
return "undefined" != typeof window && window.localStorage ? (e = window.localStorage.getItem("host_uuid"), !e && window.crypto?.randomUUID && (e = window.crypto.randomUUID(), window.localStorage.setItem("host_uuid", e))) : e = "undefined" != typeof globalThis && globalThis.crypto?.randomUUID ? globalThis.crypto.randomUUID() : "00000000-0000-0000-0000-000000000000", e;
|
|
2321
2339
|
}
|
|
2322
|
-
function
|
|
2340
|
+
function Yl(e) {
|
|
2323
2341
|
return e.replace(/[?# ^:]/g, "_");
|
|
2324
2342
|
}
|
|
2325
|
-
function
|
|
2343
|
+
function Bl(e) {
|
|
2326
2344
|
let t = null;
|
|
2327
2345
|
return "function" != typeof e && "object" != typeof e || (t = ("" + e).match(/function\s*([\w\$]*)\s*\(/)), null !== t ? t[1] + "()" : "";
|
|
2328
2346
|
}
|
|
2329
|
-
function
|
|
2347
|
+
function Jl(e, t = 0, n = !1) {
|
|
2330
2348
|
let r = null, l = null, o = null;
|
|
2331
2349
|
const i = (...i) => {
|
|
2332
2350
|
o = this, l = i;
|
|
@@ -2341,20 +2359,20 @@ function Bl(e, t = 0, n = !1) {
|
|
|
2341
2359
|
clearTimeout(r), r = null, l = null, o = null;
|
|
2342
2360
|
}, i;
|
|
2343
2361
|
}
|
|
2344
|
-
function
|
|
2362
|
+
function ql(...e) {
|
|
2345
2363
|
let t = "", n = 0;
|
|
2346
2364
|
for (let r of e) null != r && "" !== r && (r = String(r), r = 0 === n ? r.replace(/\/+$/, "") : r.replace(/^\/+/, "").replace(/\/+$/, ""), "" !== r && (n > 0 && (t += "/"), t += r, n++));
|
|
2347
2365
|
return t;
|
|
2348
2366
|
}
|
|
2349
|
-
var
|
|
2350
|
-
function
|
|
2367
|
+
var Hl = 256, Ql = 1e5;
|
|
2368
|
+
function zl(e) {
|
|
2351
2369
|
const t = String(e).replace(/`/g, "``");
|
|
2352
2370
|
return "[" === t[0] ? "[" + t : t;
|
|
2353
2371
|
}
|
|
2354
|
-
function zl(e) {
|
|
2355
|
-
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` : Ql(e)).join("`") : "";
|
|
2356
|
-
}
|
|
2357
2372
|
function Xl(e) {
|
|
2373
|
+
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` : zl(e)).join("`") : "";
|
|
2374
|
+
}
|
|
2375
|
+
function Zl(e) {
|
|
2358
2376
|
if ("string" != typeof e) return null;
|
|
2359
2377
|
let t = [], n = "";
|
|
2360
2378
|
for (let r = 0; r < e.length; r++) if ("`" !== e[r]) n += e[r];
|
|
@@ -2375,9 +2393,9 @@ function Xl(e) {
|
|
|
2375
2393
|
return null !== t ? t : "[" === e[0] && "[" === e[1] ? e.slice(1) : e;
|
|
2376
2394
|
});
|
|
2377
2395
|
}
|
|
2378
|
-
function
|
|
2396
|
+
function eo(e) {
|
|
2379
2397
|
const t = {}, n = (e, r, l) => {
|
|
2380
|
-
if (l >
|
|
2398
|
+
if (l > Hl) throw new Error("json2flat: deeper than 256");
|
|
2381
2399
|
if (null === e || "object" != typeof e || Array.isArray(e)) {
|
|
2382
2400
|
if (Array.isArray(e) && e.length > 0) return void e.forEach((e, t) => {
|
|
2383
2401
|
const o = `[${t}]`;
|
|
@@ -2387,7 +2405,7 @@ function Zl(e) {
|
|
|
2387
2405
|
const t = Object.keys(e);
|
|
2388
2406
|
if (t.length > 0) {
|
|
2389
2407
|
for (const o of t) {
|
|
2390
|
-
const t =
|
|
2408
|
+
const t = zl(o);
|
|
2391
2409
|
n(e[o], 0 === l ? t : r + "`" + t, l + 1);
|
|
2392
2410
|
}
|
|
2393
2411
|
return;
|
|
@@ -2397,20 +2415,20 @@ function Zl(e) {
|
|
|
2397
2415
|
};
|
|
2398
2416
|
return null == e || n(e, "", 0), t;
|
|
2399
2417
|
}
|
|
2400
|
-
function
|
|
2418
|
+
function to(e) {
|
|
2401
2419
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat2json: a flat json is an object of id -> value");
|
|
2402
2420
|
let t = null;
|
|
2403
2421
|
for (const n of Object.keys(e)) {
|
|
2404
|
-
const r =
|
|
2422
|
+
const r = Zl(n);
|
|
2405
2423
|
if (!r || 0 === r.length) throw new Error(`flat2json: malformed flat id: '${n}'`);
|
|
2406
|
-
if (r.length >
|
|
2424
|
+
if (r.length > Hl) throw new Error(`flat2json: '${n}' deeper than 256`);
|
|
2407
2425
|
const l = "number" == typeof r[0];
|
|
2408
2426
|
if (null === t) t = l ? [] : {};
|
|
2409
2427
|
else if (l !== Array.isArray(t)) throw new Error(`flat2json: '${n}' does not fit a ${Array.isArray(t) ? "array" : "object"} root`);
|
|
2410
2428
|
let o = t;
|
|
2411
2429
|
for (let t = 0; t < r.length; t++) {
|
|
2412
2430
|
const l = r[t], i = "number" == typeof l, s = t === r.length - 1, a = !s && "number" == typeof r[t + 1];
|
|
2413
|
-
if (i && l >
|
|
2431
|
+
if (i && l > Ql) throw new Error(`flat2json: array index ${l} over the limit (100000) in '${n}'`);
|
|
2414
2432
|
if (i !== Array.isArray(o)) throw new Error(`flat2json: '${n}' uses a ${i ? "array index" : "key"} where the tree already has a ${Array.isArray(o) ? "array" : "object"}`);
|
|
2415
2433
|
if (s) {
|
|
2416
2434
|
if (Array.isArray(o)) {
|
|
@@ -2434,23 +2452,23 @@ function eo(e) {
|
|
|
2434
2452
|
}
|
|
2435
2453
|
return null === t ? {} : t;
|
|
2436
2454
|
}
|
|
2437
|
-
function
|
|
2455
|
+
function no(e, t) {
|
|
2438
2456
|
return e === t || null !== e && null !== t && "object" == typeof e && "object" == typeof t && JSON.stringify(e) === JSON.stringify(t);
|
|
2439
2457
|
}
|
|
2440
|
-
function
|
|
2458
|
+
function ro(e, t) {
|
|
2441
2459
|
const n = e && "object" == typeof e ? e : {}, r = t && "object" == typeof t ? t : {}, l = {
|
|
2442
2460
|
added: {},
|
|
2443
2461
|
removed: {},
|
|
2444
2462
|
changed: {}
|
|
2445
2463
|
};
|
|
2446
|
-
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ?
|
|
2464
|
+
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ? no(n[e], r[e]) || (l.changed[e] = {
|
|
2447
2465
|
from: n[e],
|
|
2448
2466
|
to: r[e]
|
|
2449
2467
|
}) : l.removed[e] = n[e];
|
|
2450
2468
|
for (const e of Object.keys(r)) Object.prototype.hasOwnProperty.call(n, e) || (l.added[e] = r[e]);
|
|
2451
2469
|
return l;
|
|
2452
2470
|
}
|
|
2453
|
-
function
|
|
2471
|
+
function lo(e, t) {
|
|
2454
2472
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat_apply: a flat json is an object of id -> value");
|
|
2455
2473
|
if (null === t || "object" != typeof t) throw new Error("flat_apply: a diff is the object flat_diff() answers");
|
|
2456
2474
|
for (const n of Object.keys(t.removed || {})) delete e[n];
|
|
@@ -2462,36 +2480,36 @@ function ro(e, t) {
|
|
|
2462
2480
|
}
|
|
2463
2481
|
return e;
|
|
2464
2482
|
}
|
|
2465
|
-
function
|
|
2483
|
+
function oo(e) {
|
|
2466
2484
|
return "persistent-attrs-" + Tt(e);
|
|
2467
2485
|
}
|
|
2468
|
-
function
|
|
2469
|
-
let n = Wt(e, v.SDF_PERSIST), r = el(
|
|
2486
|
+
function io(e, t) {
|
|
2487
|
+
let n = Wt(e, v.SDF_PERSIST), r = el(oo(e), null, !1);
|
|
2470
2488
|
if (r && dr(r)) {
|
|
2471
2489
|
let l = Xr(e, r, t, !1);
|
|
2472
2490
|
l = Xr(e, l, n, !1), Ht(e, l, v.SDF_PERSIST);
|
|
2473
2491
|
}
|
|
2474
2492
|
}
|
|
2475
|
-
function io(e, t) {
|
|
2476
|
-
let n = Xr(e, Wt(e, v.SDF_PERSIST), t, !1), r = el(lo(e), null, !1);
|
|
2477
|
-
return r && dr(r) && tr(n, r), tl(lo(e), n);
|
|
2478
|
-
}
|
|
2479
2493
|
function so(e, t) {
|
|
2480
|
-
let n =
|
|
2481
|
-
|
|
2494
|
+
let n = Xr(e, Wt(e, v.SDF_PERSIST), t, !1), r = el(oo(e), null, !1);
|
|
2495
|
+
return r && dr(r) && tr(n, r), tl(oo(e), n);
|
|
2482
2496
|
}
|
|
2483
2497
|
function ao(e, t) {
|
|
2484
|
-
let n = el(
|
|
2498
|
+
let n = Zr(e, el(oo(e), null, !1), t, !1);
|
|
2499
|
+
0 === _r(n) ? nl(oo(e)) : tl(oo(e), n);
|
|
2500
|
+
}
|
|
2501
|
+
function uo(e, t) {
|
|
2502
|
+
let n = el(oo(e), null, !1), r = {};
|
|
2485
2503
|
return n && dr(n) && (r = Xr(e, n, t, !1)), r;
|
|
2486
2504
|
}
|
|
2487
|
-
function
|
|
2505
|
+
function _o(e) {
|
|
2488
2506
|
if (br(e) && 1 === fr(e)) {
|
|
2489
2507
|
let t = e[0];
|
|
2490
2508
|
return Cr(t, "size") ? t.size : 1;
|
|
2491
2509
|
}
|
|
2492
2510
|
return fr(e);
|
|
2493
2511
|
}
|
|
2494
|
-
function
|
|
2512
|
+
function co(e, t) {
|
|
2495
2513
|
if (pr(t)) {
|
|
2496
2514
|
if (-1 === t.indexOf("^")) {
|
|
2497
2515
|
let n, r, l = e.fkey;
|
|
@@ -2521,11 +2539,11 @@ function _o(e, t) {
|
|
|
2521
2539
|
hook_name: t.hook_name
|
|
2522
2540
|
} : (xn("bad fkey 3"), xn(e), xn(t), null);
|
|
2523
2541
|
}
|
|
2524
|
-
function
|
|
2525
|
-
let n =
|
|
2542
|
+
function fo(e, t) {
|
|
2543
|
+
let n = co(e, t);
|
|
2526
2544
|
return n ? n.topic_name + "^" + n.id + "^" + n.hook_name : null;
|
|
2527
2545
|
}
|
|
2528
|
-
function
|
|
2546
|
+
function go(e, t) {
|
|
2529
2547
|
if (pr(t)) {
|
|
2530
2548
|
if (-1 === t.indexOf("^")) {
|
|
2531
2549
|
let n, r = e.hook;
|
|
@@ -2552,7 +2570,7 @@ function fo(e, t) {
|
|
|
2552
2570
|
id: t.id
|
|
2553
2571
|
} : (xn("bad hook 3"), xn(e), xn(t), null);
|
|
2554
2572
|
}
|
|
2555
|
-
var
|
|
2573
|
+
var bo = [
|
|
2556
2574
|
"string",
|
|
2557
2575
|
"integer",
|
|
2558
2576
|
"object",
|
|
@@ -2562,7 +2580,7 @@ var go = [
|
|
|
2562
2580
|
"real",
|
|
2563
2581
|
"boolean",
|
|
2564
2582
|
"blob"
|
|
2565
|
-
],
|
|
2583
|
+
], po = [
|
|
2566
2584
|
"persistent",
|
|
2567
2585
|
"required",
|
|
2568
2586
|
"notnull",
|
|
@@ -2574,7 +2592,7 @@ var go = [
|
|
|
2574
2592
|
"stats",
|
|
2575
2593
|
"rstats",
|
|
2576
2594
|
"pstats"
|
|
2577
|
-
],
|
|
2595
|
+
], mo = [
|
|
2578
2596
|
"hook",
|
|
2579
2597
|
"fkey",
|
|
2580
2598
|
"enum",
|
|
@@ -2603,7 +2621,7 @@ var go = [
|
|
|
2603
2621
|
"coordinates",
|
|
2604
2622
|
"gbuffer"
|
|
2605
2623
|
];
|
|
2606
|
-
function
|
|
2624
|
+
function Eo(e) {
|
|
2607
2625
|
let t = {
|
|
2608
2626
|
name: e.id,
|
|
2609
2627
|
header: e.header,
|
|
@@ -2622,7 +2640,7 @@ function mo(e) {
|
|
|
2622
2640
|
if (!e.flag) return t;
|
|
2623
2641
|
for (let n = 0; n < e.flag.length; n++) {
|
|
2624
2642
|
let r = e.flag[n];
|
|
2625
|
-
if (
|
|
2643
|
+
if (cl(mo, r)) {
|
|
2626
2644
|
switch (r) {
|
|
2627
2645
|
case "enum":
|
|
2628
2646
|
t.enum_list = e.enum;
|
|
@@ -2636,7 +2654,7 @@ function mo(e) {
|
|
|
2636
2654
|
case "file": t.is_file = !0;
|
|
2637
2655
|
}
|
|
2638
2656
|
t.type = r;
|
|
2639
|
-
} else if (
|
|
2657
|
+
} else if (cl(po, r)) switch (r) {
|
|
2640
2658
|
case "writable":
|
|
2641
2659
|
t.is_writable = !0;
|
|
2642
2660
|
break;
|
|
@@ -2649,7 +2667,7 @@ function mo(e) {
|
|
|
2649
2667
|
}
|
|
2650
2668
|
return t.is_file && (t.type = "file"), t;
|
|
2651
2669
|
}
|
|
2652
|
-
function
|
|
2670
|
+
function To(e, t) {
|
|
2653
2671
|
let n = {
|
|
2654
2672
|
name: e,
|
|
2655
2673
|
header: e,
|
|
@@ -2667,9 +2685,9 @@ function Eo(e, t) {
|
|
|
2667
2685
|
let e = t.split(".");
|
|
2668
2686
|
for (let t = 0; t < e.length; t++) {
|
|
2669
2687
|
let r = e[t];
|
|
2670
|
-
if (
|
|
2671
|
-
else if (
|
|
2672
|
-
else if (
|
|
2688
|
+
if (cl(bo, r)) n.real_type || (n.real_type = r);
|
|
2689
|
+
else if (cl(mo, r)) n.type || (n.type = r);
|
|
2690
|
+
else if (cl(po, r)) switch (r) {
|
|
2673
2691
|
case "writable":
|
|
2674
2692
|
n.is_writable = !0;
|
|
2675
2693
|
break;
|
|
@@ -2681,10 +2699,10 @@ function Eo(e, t) {
|
|
|
2681
2699
|
}
|
|
2682
2700
|
}
|
|
2683
2701
|
n.real_type || (n.real_type = "string");
|
|
2684
|
-
} else dr(t) ? (n =
|
|
2702
|
+
} else dr(t) ? (n = Eo(t), n.name || (n.name = e), n.header || (n.header = e)) : br(t) && (n.real_type = "array", n.enum_list = t);
|
|
2685
2703
|
return n.type || (n.type = n.real_type), n;
|
|
2686
2704
|
}
|
|
2687
|
-
function
|
|
2705
|
+
function ho(e, t) {
|
|
2688
2706
|
let n = {};
|
|
2689
2707
|
return t || (t = {}), Object.entries(e).forEach(([e, r]) => {
|
|
2690
2708
|
let l;
|
|
@@ -2693,23 +2711,23 @@ function To(e, t) {
|
|
|
2693
2711
|
n[e] = o;
|
|
2694
2712
|
}), n;
|
|
2695
2713
|
}
|
|
2696
|
-
var
|
|
2714
|
+
var yo = [
|
|
2697
2715
|
N(y.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
2698
2716
|
N(y.DTP_BOOLEAN, "periodic", 0, 0, "True for periodic timeouts"),
|
|
2699
2717
|
N(y.DTP_INTEGER, "msec", 0, 0, "Timeout in milliseconds"),
|
|
2700
2718
|
S()
|
|
2701
|
-
],
|
|
2719
|
+
], vo = {
|
|
2702
2720
|
periodic: !1,
|
|
2703
2721
|
msec: 0,
|
|
2704
2722
|
timer_id: -1
|
|
2705
|
-
},
|
|
2706
|
-
function
|
|
2723
|
+
}, Oo = null;
|
|
2724
|
+
function So(e, t, n, r) {
|
|
2707
2725
|
let l = e.priv, o = l.periodic ? "EV_TIMEOUT_PERIODIC" : "EV_TIMEOUT";
|
|
2708
2726
|
return l.periodic && l.msec > 0 ? l.timer_id = setTimeout(function() {
|
|
2709
2727
|
cn(e, "EV_TIMEOUT", {}, e);
|
|
2710
2728
|
}, l.msec) : l.timer_id = -1, Ot(e) ? cn(yt(e), o, {}, e) : Sn(e, o, {}), l.periodic || -1 !== l.timer_id || ut(e) && rt(e), 0;
|
|
2711
2729
|
}
|
|
2712
|
-
var
|
|
2730
|
+
var No = {
|
|
2713
2731
|
mt_create: function(e) {
|
|
2714
2732
|
let t = e.priv;
|
|
2715
2733
|
const n = Bt(e, "subscriber");
|
|
@@ -2734,31 +2752,31 @@ var So = {
|
|
|
2734
2752
|
},
|
|
2735
2753
|
mt_destroy: function(e) {}
|
|
2736
2754
|
};
|
|
2737
|
-
function
|
|
2755
|
+
function Ro() {
|
|
2738
2756
|
return function(e) {
|
|
2739
|
-
if (
|
|
2757
|
+
if (Oo) return xn(`GClass ALREADY created: ${e}`), -1;
|
|
2740
2758
|
const t = [["ST_IDLE", [[
|
|
2741
2759
|
"EV_TIMEOUT",
|
|
2742
|
-
|
|
2760
|
+
So,
|
|
2743
2761
|
null
|
|
2744
2762
|
]]]];
|
|
2745
|
-
return (
|
|
2763
|
+
return (Oo = ye(e, [
|
|
2746
2764
|
["EV_TIMEOUT", U.EVF_OUTPUT_EVENT],
|
|
2747
2765
|
["EV_TIMEOUT_PERIODIC", U.EVF_OUTPUT_EVENT],
|
|
2748
2766
|
[0, 0]
|
|
2749
|
-
], t,
|
|
2767
|
+
], t, No, 0, yo, vo, 0, 0, 0, C.gcflag_manual_start)) ? 0 : -1;
|
|
2750
2768
|
}("C_TIMER");
|
|
2751
2769
|
}
|
|
2752
|
-
function
|
|
2770
|
+
function wo(e, t) {
|
|
2753
2771
|
return e instanceof k ? "C_TIMER" !== Et(e) ? (xn("not C_TIMER GObj"), -1) : (Qt(e, "periodic", !1), void zt(e, "msec", t)) : (xn("not GObj TYPE"), -1);
|
|
2754
2772
|
}
|
|
2755
2773
|
function jo(e, t) {
|
|
2756
2774
|
return e instanceof k ? "C_TIMER" !== Et(e) ? (xn("not C_TIMER GObj"), -1) : (Qt(e, "periodic", !0), void zt(e, "msec", t)) : (xn("not GObj TYPE"), -1);
|
|
2757
2775
|
}
|
|
2758
|
-
function
|
|
2776
|
+
function Do(e) {
|
|
2759
2777
|
return e instanceof k ? "C_TIMER" !== Et(e) ? (xn("not C_TIMER GObj"), -1) : void zt(e, "msec", -1) : (xn("not GObj TYPE"), -1);
|
|
2760
2778
|
}
|
|
2761
|
-
var
|
|
2779
|
+
var Ao = [
|
|
2762
2780
|
N(y.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
2763
2781
|
N(y.DTP_BOOLEAN, "browser_beforeunload", 0, !1, "Set true to refreshing browser"),
|
|
2764
2782
|
N(y.DTP_STRING, "__username__", 0, "", "Username"),
|
|
@@ -2784,21 +2802,21 @@ var Do = [
|
|
|
2784
2802
|
N(y.DTP_BOOLEAN, "developer", 0, !1, "Developer mode enabled"),
|
|
2785
2803
|
N(y.DTP_INTEGER, "periodic_timeout", 0, "1000", "Timeout periodic, in miliseconds."),
|
|
2786
2804
|
S()
|
|
2787
|
-
],
|
|
2788
|
-
function
|
|
2805
|
+
], $o = { gobj_timer: null }, Io = null;
|
|
2806
|
+
function ko(e, t, n, r) {
|
|
2789
2807
|
return Sn(e, t, n), 0;
|
|
2790
2808
|
}
|
|
2791
|
-
var
|
|
2809
|
+
var Co = {
|
|
2792
2810
|
mt_create: function(e) {
|
|
2793
2811
|
let t = e.priv;
|
|
2794
|
-
Xt(e, "start_date",
|
|
2812
|
+
Xt(e, "start_date", Ml()), Xt(e, "node_uuid", xl()), e.priv.gobj_timer = He(mt(e), "C_TIMER", {}, e), t.periodic_timeout = Mt(e, "periodic_timeout");
|
|
2795
2813
|
},
|
|
2796
2814
|
mt_writing: function(e, t) {},
|
|
2797
2815
|
mt_start: function(e) {
|
|
2798
2816
|
return jo(e.priv.gobj_timer, e.priv.periodic_timeout), 0;
|
|
2799
2817
|
},
|
|
2800
2818
|
mt_stop: function(e) {
|
|
2801
|
-
return
|
|
2819
|
+
return Do(e.priv.gobj_timer), ot(e), 0;
|
|
2802
2820
|
},
|
|
2803
2821
|
mt_destroy: function(e) {},
|
|
2804
2822
|
mt_play: function(e) {
|
|
@@ -2809,18 +2827,18 @@ var ko = {
|
|
|
2809
2827
|
return at(ke()), 0;
|
|
2810
2828
|
}
|
|
2811
2829
|
};
|
|
2812
|
-
function
|
|
2830
|
+
function Lo() {
|
|
2813
2831
|
return function(e) {
|
|
2814
2832
|
if (Io) return xn(`GClass ALREADY created: ${e}`), -1;
|
|
2815
2833
|
const t = [["ST_IDLE", [[
|
|
2816
2834
|
"EV_TIMEOUT_PERIODIC",
|
|
2817
|
-
|
|
2835
|
+
ko,
|
|
2818
2836
|
null
|
|
2819
2837
|
]]]];
|
|
2820
|
-
return (Io = ye(e, [["EV_TIMEOUT_PERIODIC", U.EVF_OUTPUT_EVENT | U.EVF_NO_WARN_SUBS], [0, 0]], t,
|
|
2838
|
+
return (Io = ye(e, [["EV_TIMEOUT_PERIODIC", U.EVF_OUTPUT_EVENT | U.EVF_NO_WARN_SUBS], [0, 0]], t, Co, 0, Ao, $o, 0, 0, 0, 0)) ? 0 : -1;
|
|
2821
2839
|
}("C_YUNO");
|
|
2822
2840
|
}
|
|
2823
|
-
var
|
|
2841
|
+
var Po = "ievent_gate_stack", Uo = [
|
|
2824
2842
|
N(y.DTP_STRING, "wanted_yuno_role", v.SDF_RD, "", "wanted yuno role"),
|
|
2825
2843
|
N(y.DTP_STRING, "wanted_yuno_name", v.SDF_RD, "", "wanted yuno name"),
|
|
2826
2844
|
N(y.DTP_STRING, "wanted_yuno_service", v.SDF_RD, "", "wanted yuno service"),
|
|
@@ -2837,7 +2855,7 @@ var Lo = "ievent_gate_stack", Po = [
|
|
|
2837
2855
|
N(y.DTP_INTEGER, "timeout_idack", v.SDF_RD, "5000", "timeout waiting idAck"),
|
|
2838
2856
|
N(y.DTP_POINTER, "subscriber", 0, 0, "subscriber of output-events. If null then subscriber is the parent"),
|
|
2839
2857
|
S()
|
|
2840
|
-
],
|
|
2858
|
+
], Fo = {
|
|
2841
2859
|
url: null,
|
|
2842
2860
|
remote_yuno_name: null,
|
|
2843
2861
|
remote_yuno_role: null,
|
|
@@ -2847,8 +2865,8 @@ var Lo = "ievent_gate_stack", Po = [
|
|
|
2847
2865
|
websocket: null,
|
|
2848
2866
|
inside_on_open: !1,
|
|
2849
2867
|
retry_ms: 0
|
|
2850
|
-
},
|
|
2851
|
-
function
|
|
2868
|
+
}, Go = null;
|
|
2869
|
+
function Vo(e) {
|
|
2852
2870
|
e.priv.websocket && xn("Websocket ALREADY setup");
|
|
2853
2871
|
const t = Yt(e, "url");
|
|
2854
2872
|
let n;
|
|
@@ -2872,7 +2890,7 @@ function Go(e) {
|
|
|
2872
2890
|
}, e));
|
|
2873
2891
|
}, n) : (xn(`${Tt(e)}: Failed to initialize WebSocket.`), null);
|
|
2874
2892
|
}
|
|
2875
|
-
function
|
|
2893
|
+
function Mo(e, t = 1e3, n = "") {
|
|
2876
2894
|
let r = e.priv, l = r.websocket;
|
|
2877
2895
|
if (r.websocket = null, l && l.readyState !== WebSocket.CLOSED && l.readyState !== WebSocket.CLOSING) {
|
|
2878
2896
|
Jn(`Closing WebSocket (Code: ${t}, Reason: "${n}")`);
|
|
@@ -2883,25 +2901,25 @@ function Vo(e, t = 1e3, n = "") {
|
|
|
2883
2901
|
}
|
|
2884
2902
|
} else Yn("WebSocket is already closed or in the process of closing.");
|
|
2885
2903
|
}
|
|
2886
|
-
function
|
|
2887
|
-
let r =
|
|
2904
|
+
function Wo(e, t, n) {
|
|
2905
|
+
let r = Ml();
|
|
2888
2906
|
try {
|
|
2889
2907
|
Jn("\n" + r + " " + t + "\n"), Hn(n);
|
|
2890
2908
|
} catch (e) {
|
|
2891
2909
|
Jn("ERROR in trace_inter_event: " + e);
|
|
2892
2910
|
}
|
|
2893
2911
|
}
|
|
2894
|
-
var
|
|
2912
|
+
var Ko = class {
|
|
2895
2913
|
constructor(e, t) {
|
|
2896
2914
|
this.event = e, this.kw = t || {};
|
|
2897
2915
|
}
|
|
2898
2916
|
};
|
|
2899
|
-
function
|
|
2917
|
+
function xo(e, t, n, r) {
|
|
2900
2918
|
return function(e, t) {
|
|
2901
2919
|
let n = e.priv, r = JSON.stringify(t);
|
|
2902
2920
|
if (Kt(gt(), "trace_inter_event")) {
|
|
2903
2921
|
let n = Yt(e, "url"), l = mt(gt()) + " ==> " + n, o = Mt(gt(), "trace_ievent_callback");
|
|
2904
|
-
o ? o(l, t, 1, r.length) :
|
|
2922
|
+
o ? o(l, t, 1, r.length) : Wo(0, l, t);
|
|
2905
2923
|
}
|
|
2906
2924
|
if (!n.websocket || n.websocket.readyState !== WebSocket.OPEN) return Yn(`${Tt(e)}: send_iev(): websocket not open, message lost`), -1;
|
|
2907
2925
|
try {
|
|
@@ -2911,10 +2929,10 @@ function Ko(e, t, n, r) {
|
|
|
2911
2929
|
}
|
|
2912
2930
|
return 0;
|
|
2913
2931
|
}(e, function(e, t) {
|
|
2914
|
-
return Sr(e) ? (xn("iev_create() event NULL"), null) : new
|
|
2932
|
+
return Sr(e) ? (xn("iev_create() event NULL"), null) : new Ko(e, t);
|
|
2915
2933
|
}(t, n));
|
|
2916
2934
|
}
|
|
2917
|
-
function
|
|
2935
|
+
function Yo(e, t, n) {
|
|
2918
2936
|
return Sr(n) && (n = Yt(e, "wanted_yuno_service")), {
|
|
2919
2937
|
dst_yuno: Yt(e, "wanted_yuno_name"),
|
|
2920
2938
|
dst_role: Yt(e, "wanted_yuno_role"),
|
|
@@ -2922,10 +2940,10 @@ function xo(e, t, n) {
|
|
|
2922
2940
|
src_yuno: dt(),
|
|
2923
2941
|
src_role: bt(),
|
|
2924
2942
|
src_service: t,
|
|
2925
|
-
host:
|
|
2943
|
+
host: xl()
|
|
2926
2944
|
};
|
|
2927
2945
|
}
|
|
2928
|
-
function
|
|
2946
|
+
function Bo(e) {
|
|
2929
2947
|
let t = e.priv, n = ft(gt()), r = Yt(gt(), "yuno_version"), l = Yt(gt(), "yuno_release"), o = Yt(gt(), "yuno_tag"), i = Mt(e, "required_services");
|
|
2930
2948
|
i && i.length || (i = Mt(gt(), "required_services"));
|
|
2931
2949
|
let s = {
|
|
@@ -2943,27 +2961,27 @@ function Yo(e) {
|
|
|
2943
2961
|
username: Yt(gt(), "__username__"),
|
|
2944
2962
|
launch_id: 0,
|
|
2945
2963
|
yuno_startdate: Yt(gt(), "start_date"),
|
|
2946
|
-
id:
|
|
2964
|
+
id: xl(),
|
|
2947
2965
|
user_agent: "undefined" != typeof window ? window.navigator.userAgent : "",
|
|
2948
2966
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
2949
2967
|
required_services: i
|
|
2950
2968
|
};
|
|
2951
|
-
return
|
|
2969
|
+
return pl(e, s, Po, Yo(e, mt(yt(e)), null)), El(e, s, "__identity__"), wo(t.gobj_timer, xt(e, "timeout_idack")), xo(e, "EV_IDENTITY_CARD", s);
|
|
2952
2970
|
}
|
|
2953
|
-
function
|
|
2971
|
+
function Jo(e, t) {
|
|
2954
2972
|
if (Sr(t.event)) return -1;
|
|
2955
2973
|
let n = {}, r = t.__global__, l = t.__config__, o = t.__filter__, i = t.__service__, s = t.subscriber;
|
|
2956
2974
|
l && (n.__config__ = l), r && (n.__global__ = r), o && (n.__filter__ = o);
|
|
2957
|
-
return
|
|
2958
|
-
}
|
|
2959
|
-
function Jo(e, t, n, r) {
|
|
2960
|
-
let l = e.priv;
|
|
2961
|
-
return ut(e) && (l.websocket = Go(e)), 0;
|
|
2975
|
+
return pl(e, n, Po, Yo(e, mt(s), i)), El(e, n, "__subscribing__"), xo(e, t.event, n);
|
|
2962
2976
|
}
|
|
2963
2977
|
function qo(e, t, n, r) {
|
|
2964
|
-
|
|
2978
|
+
let l = e.priv;
|
|
2979
|
+
return ut(e) && (l.websocket = Vo(e)), 0;
|
|
2965
2980
|
}
|
|
2966
2981
|
function Ho(e, t, n, r) {
|
|
2982
|
+
return Jn("Websocket opened: " + e.priv.url), Bo(e), 0;
|
|
2983
|
+
}
|
|
2984
|
+
function Qo(e, t, n, r) {
|
|
2967
2985
|
let l = e.priv, o = n.e, i = n.url;
|
|
2968
2986
|
return Wn(), Yn(`${Tt(e)}: WebSocket closed ${i} (Code: ${o.code}, Reason: "${o.reason}", Clean: ${o.wasClean})`), l.websocket && (l.websocket.onopen = null, l.websocket.onmessage = null, l.websocket.onerror = null, l.websocket.onclose = null, l.websocket = null), l.inform_on_close ? (l.inform_on_close = !1, Sn(e, "EV_ON_CLOSE", {
|
|
2969
2987
|
url: i,
|
|
@@ -2978,7 +2996,7 @@ function Ho(e, t, n, r) {
|
|
|
2978
2996
|
code: o.code,
|
|
2979
2997
|
reason: o.reason,
|
|
2980
2998
|
was_clean: o.wasClean
|
|
2981
|
-
})), ut(e) &&
|
|
2999
|
+
})), ut(e) && wo(l.gobj_timer, function(e) {
|
|
2982
3000
|
let t = e.priv, n = xt(e, "timeout_retry"), r = xt(e, "timeout_retry_max");
|
|
2983
3001
|
r < n && (r = n);
|
|
2984
3002
|
t.retry_ms = t.retry_ms ? Math.min(2 * t.retry_ms, r) : n;
|
|
@@ -2986,17 +3004,17 @@ function Ho(e, t, n, r) {
|
|
|
2986
3004
|
return Math.max(1, Math.round(o));
|
|
2987
3005
|
}(e)), 0;
|
|
2988
3006
|
}
|
|
2989
|
-
function Qo(e, t, n, r) {
|
|
2990
|
-
return Yo(e), 0;
|
|
2991
|
-
}
|
|
2992
3007
|
function zo(e, t, n, r) {
|
|
3008
|
+
return Bo(e), 0;
|
|
3009
|
+
}
|
|
3010
|
+
function Xo(e, t, n, r) {
|
|
2993
3011
|
let l = e.priv;
|
|
2994
|
-
|
|
2995
|
-
let o =
|
|
3012
|
+
Do(l.gobj_timer);
|
|
3013
|
+
let o = ml(e, n, Po, !0), i = Vr(e, o, "src_yuno", ""), s = Vr(e, o, "src_role", ""), a = Vr(e, o, "src_service", "");
|
|
2996
3014
|
Xt(e, "remote_yuno_name", i), Xt(e, "remote_yuno_role", s), Xt(e, "remote_yuno_service", a);
|
|
2997
3015
|
let u = Fr(e, n, "result", -1, 0), _ = Vr(e, n, "comment", "", 0), c = Vr(e, n, "username", "", 0), f = Kr(e, n, "services_roles", {});
|
|
2998
3016
|
if (u < 0) {
|
|
2999
|
-
|
|
3017
|
+
Mo(e);
|
|
3000
3018
|
let t = {
|
|
3001
3019
|
url: Yt(e, "url"),
|
|
3002
3020
|
result: u,
|
|
@@ -3021,12 +3039,12 @@ function zo(e, t, n, r) {
|
|
|
3021
3039
|
}
|
|
3022
3040
|
l.inside_on_open = !1, function(e) {
|
|
3023
3041
|
let t = yn(e, null, null, null);
|
|
3024
|
-
for (let n = 0; n < t.length; n++)
|
|
3042
|
+
for (let n = 0; n < t.length; n++) Jo(e, t[n]);
|
|
3025
3043
|
}(e);
|
|
3026
3044
|
}
|
|
3027
3045
|
return 0;
|
|
3028
3046
|
}
|
|
3029
|
-
function
|
|
3047
|
+
function Zo(e, t, n, r) {
|
|
3030
3048
|
let l = e.priv.url, o = function(e, t) {
|
|
3031
3049
|
let n;
|
|
3032
3050
|
try {
|
|
@@ -3046,17 +3064,17 @@ function Xo(e, t, n, r) {
|
|
|
3046
3064
|
}(0, n.data);
|
|
3047
3065
|
if (Kt(gt(), "trace_inter_event")) {
|
|
3048
3066
|
let e = mt(gt()) + " <== " + l, t = n.data.length, r = Mt(gt(), "trace_ievent_callback");
|
|
3049
|
-
r ? r(e, o, 2, t) :
|
|
3067
|
+
r ? r(e, o, 2, t) : Wo(0, e, o);
|
|
3050
3068
|
}
|
|
3051
3069
|
let i = o.event, s = o.kw;
|
|
3052
3070
|
if ("ST_SESSION" !== en(e)) {
|
|
3053
3071
|
if (rn(e, i, U.EVF_PUBLIC_EVENT)) {
|
|
3054
3072
|
if (!(cn(e, i, s, e) < 0)) return 0;
|
|
3055
3073
|
} else xn(`${Tt(e)}: event UNKNOWN in not-session state ${i}`);
|
|
3056
|
-
return
|
|
3074
|
+
return Mo(e), -1;
|
|
3057
3075
|
}
|
|
3058
3076
|
o = null;
|
|
3059
|
-
let a =
|
|
3077
|
+
let a = Tl(e, s), u = ml(e, s, Po), _ = Vr(e, u, "dst_role", "");
|
|
3060
3078
|
if (_.toLowerCase() !== bt().toLowerCase()) return xn(`"It's not my role, dst_role: ${_}, my_role: ${bt()}`), 0;
|
|
3061
3079
|
let c = Vr(e, u, "dst_service", "");
|
|
3062
3080
|
if ("__subscribing__" === a) return -1;
|
|
@@ -3068,13 +3086,13 @@ function Xo(e, t, n, r) {
|
|
|
3068
3086
|
}
|
|
3069
3087
|
return Ot(e) ? cn(yt(e), i, s, e) : Sn(e, i, s), 0;
|
|
3070
3088
|
}
|
|
3071
|
-
function
|
|
3089
|
+
function ei(e, t, n, r) {
|
|
3072
3090
|
return 0;
|
|
3073
3091
|
}
|
|
3074
|
-
function
|
|
3092
|
+
function ti(e, t, n, r) {
|
|
3075
3093
|
return 0;
|
|
3076
3094
|
}
|
|
3077
|
-
var
|
|
3095
|
+
var ni = {
|
|
3078
3096
|
mt_create: function(e) {
|
|
3079
3097
|
let t = e.priv;
|
|
3080
3098
|
t.gobj_timer = He(mt(e), "C_TIMER", {}, e), t.url = Yt(e, "url"), t.remote_yuno_name = Yt(e, "remote_yuno_name"), t.remote_yuno_role = Yt(e, "remote_yuno_role"), t.remote_yuno_service = Yt(e, "remote_yuno_service"), Xt(e, "wanted_yuno_name", t.remote_yuno_name), Xt(e, "wanted_yuno_role", t.remote_yuno_role), Xt(e, "wanted_yuno_service", t.remote_yuno_service);
|
|
@@ -3098,43 +3116,43 @@ var ti = {
|
|
|
3098
3116
|
},
|
|
3099
3117
|
mt_start: function(e) {
|
|
3100
3118
|
let t = e.priv;
|
|
3101
|
-
return t.retry_ms = 0, t.websocket =
|
|
3119
|
+
return t.retry_ms = 0, t.websocket = Vo(e), 0;
|
|
3102
3120
|
},
|
|
3103
3121
|
mt_stop: function(e) {
|
|
3104
3122
|
let t = e.priv;
|
|
3105
|
-
return
|
|
3123
|
+
return Do(t.gobj_timer), t.websocket && Mo(e), 0;
|
|
3106
3124
|
},
|
|
3107
3125
|
mt_destroy: function(e) {},
|
|
3108
3126
|
mt_stats: function(e, t, n, r) {
|
|
3109
3127
|
if ("ST_SESSION" !== en(e)) return xn("Not in session"), null;
|
|
3110
3128
|
n || (n = {});
|
|
3111
|
-
let l =
|
|
3112
|
-
return o || (o = {}),
|
|
3129
|
+
let l = Yo(e, mt(r), Vr(e, n, "service", null, 0)), o = Kr(e, n, "__md_stats__", null, wn.KW_EXTRACT);
|
|
3130
|
+
return o || (o = {}), pl(e, n, "stats_stack", {
|
|
3113
3131
|
stats: t,
|
|
3114
3132
|
kw: o
|
|
3115
|
-
}),
|
|
3133
|
+
}), pl(e, n, Po, l), n.__stats__ = t, El(e, n, "__stats__"), xo(e, "EV_MT_STATS", n, r), null;
|
|
3116
3134
|
},
|
|
3117
3135
|
mt_command_parser: function(e, t, n, r) {
|
|
3118
3136
|
if ("ST_SESSION" !== en(e)) return xn("Not in session"), null;
|
|
3119
3137
|
n || (n = {});
|
|
3120
|
-
let l =
|
|
3121
|
-
return o || (o = {}),
|
|
3138
|
+
let l = Yo(e, mt(r), Vr(e, n, "service", "", 0)), o = Kr(e, n, "__md_command__", null, wn.KW_EXTRACT);
|
|
3139
|
+
return o || (o = {}), pl(e, n, "command_stack", {
|
|
3122
3140
|
command: t,
|
|
3123
3141
|
kw: o
|
|
3124
|
-
}),
|
|
3142
|
+
}), pl(e, n, Po, l), n.__command__ = t, El(e, n, "__command__"), xo(e, "EV_MT_COMMAND", n, r), null;
|
|
3125
3143
|
},
|
|
3126
3144
|
mt_inject_event: function(e, t, n, r) {
|
|
3127
3145
|
if ("ST_SESSION" !== en(e)) return window.console.error("Not in session"), -1;
|
|
3128
|
-
if (n || (n = {}),
|
|
3146
|
+
if (n || (n = {}), ml(e, n, Po));
|
|
3129
3147
|
else {
|
|
3130
|
-
let l =
|
|
3131
|
-
rr(n, "__service__"),
|
|
3148
|
+
let l = Yo(e, mt(r), Vr(e, n, "__service__", 0, 0));
|
|
3149
|
+
rr(n, "__service__"), pl(e, n, "__message__", t), pl(e, n, Po, l);
|
|
3132
3150
|
}
|
|
3133
|
-
return
|
|
3151
|
+
return El(e, n, "__message__"), xo(e, t, n, r);
|
|
3134
3152
|
},
|
|
3135
3153
|
mt_subscription_added: function(e, t) {
|
|
3136
3154
|
let n = e.priv;
|
|
3137
|
-
return "ST_SESSION" === en(e) && n.websocket ? n.inside_on_open ? 0 :
|
|
3155
|
+
return "ST_SESSION" === en(e) && n.websocket ? n.inside_on_open ? 0 : Jo(e, t) : 0;
|
|
3138
3156
|
},
|
|
3139
3157
|
mt_subscription_deleted: function(e, t) {
|
|
3140
3158
|
let n = e.priv;
|
|
@@ -3143,27 +3161,27 @@ var ti = {
|
|
|
3143
3161
|
if (Sr(t.event)) return 0;
|
|
3144
3162
|
let r = {}, l = t.__global__, o = t.__config__, i = t.__filter__, s = t.__service__, a = t.subscriber;
|
|
3145
3163
|
o && (r.__config__ = o), l && (r.__global__ = l), i && (r.__filter__ = i);
|
|
3146
|
-
return
|
|
3164
|
+
return pl(e, r, Po, Yo(e, mt(a), s)), El(e, r, "__unsubscribing__"), xo(e, t.event, r, e);
|
|
3147
3165
|
}
|
|
3148
3166
|
};
|
|
3149
|
-
function
|
|
3167
|
+
function ri() {
|
|
3150
3168
|
return function(e) {
|
|
3151
|
-
if (
|
|
3169
|
+
if (Go) return xn(`GClass ALREADY created: ${e}`), -1;
|
|
3152
3170
|
const t = [
|
|
3153
3171
|
["ST_DISCONNECTED", [
|
|
3154
3172
|
[
|
|
3155
3173
|
"EV_ON_OPEN",
|
|
3156
|
-
|
|
3174
|
+
Ho,
|
|
3157
3175
|
"ST_WAIT_IDENTITY_CARD_ACK"
|
|
3158
3176
|
],
|
|
3159
3177
|
[
|
|
3160
3178
|
"EV_ON_CLOSE",
|
|
3161
|
-
|
|
3179
|
+
Qo,
|
|
3162
3180
|
null
|
|
3163
3181
|
],
|
|
3164
3182
|
[
|
|
3165
3183
|
"EV_TIMEOUT",
|
|
3166
|
-
|
|
3184
|
+
qo,
|
|
3167
3185
|
null
|
|
3168
3186
|
],
|
|
3169
3187
|
[
|
|
@@ -3175,22 +3193,22 @@ function ni() {
|
|
|
3175
3193
|
["ST_WAIT_IDENTITY_CARD_ACK", [
|
|
3176
3194
|
[
|
|
3177
3195
|
"EV_ON_MESSAGE",
|
|
3178
|
-
|
|
3196
|
+
Zo,
|
|
3179
3197
|
null
|
|
3180
3198
|
],
|
|
3181
3199
|
[
|
|
3182
3200
|
"EV_IDENTITY_CARD_ACK",
|
|
3183
|
-
|
|
3201
|
+
Xo,
|
|
3184
3202
|
null
|
|
3185
3203
|
],
|
|
3186
3204
|
[
|
|
3187
3205
|
"EV_ON_CLOSE",
|
|
3188
|
-
|
|
3206
|
+
Qo,
|
|
3189
3207
|
"ST_DISCONNECTED"
|
|
3190
3208
|
],
|
|
3191
3209
|
[
|
|
3192
3210
|
"EV_TIMEOUT",
|
|
3193
|
-
|
|
3211
|
+
zo,
|
|
3194
3212
|
null
|
|
3195
3213
|
],
|
|
3196
3214
|
[
|
|
@@ -3202,22 +3220,22 @@ function ni() {
|
|
|
3202
3220
|
["ST_SESSION", [
|
|
3203
3221
|
[
|
|
3204
3222
|
"EV_ON_MESSAGE",
|
|
3205
|
-
|
|
3223
|
+
Zo,
|
|
3206
3224
|
null
|
|
3207
3225
|
],
|
|
3208
3226
|
[
|
|
3209
3227
|
"EV_MT_STATS",
|
|
3210
|
-
|
|
3228
|
+
ei,
|
|
3211
3229
|
null
|
|
3212
3230
|
],
|
|
3213
3231
|
[
|
|
3214
3232
|
"EV_MT_COMMAND",
|
|
3215
|
-
|
|
3233
|
+
ti,
|
|
3216
3234
|
null
|
|
3217
3235
|
],
|
|
3218
3236
|
[
|
|
3219
3237
|
"EV_ON_CLOSE",
|
|
3220
|
-
|
|
3238
|
+
Qo,
|
|
3221
3239
|
"ST_DISCONNECTED"
|
|
3222
3240
|
],
|
|
3223
3241
|
[
|
|
@@ -3228,7 +3246,7 @@ function ni() {
|
|
|
3228
3246
|
]],
|
|
3229
3247
|
[null, null]
|
|
3230
3248
|
];
|
|
3231
|
-
return (
|
|
3249
|
+
return (Go = ye(e, [
|
|
3232
3250
|
["EV_ON_MESSAGE", U.EVF_OUTPUT_EVENT],
|
|
3233
3251
|
["EV_IDENTITY_CARD_ACK", U.EVF_PUBLIC_EVENT],
|
|
3234
3252
|
["EV_ON_ID_NAK", U.EVF_PUBLIC_EVENT | U.EVF_OUTPUT_EVENT],
|
|
@@ -3239,9 +3257,9 @@ function ni() {
|
|
|
3239
3257
|
["EV_ON_OPEN_ERROR", U.EVF_OUTPUT_EVENT | U.EVF_NO_WARN_SUBS],
|
|
3240
3258
|
["EV_TIMEOUT", 0],
|
|
3241
3259
|
[null, 0]
|
|
3242
|
-
], t,
|
|
3260
|
+
], t, ni, 0, Uo, Fo, 0, 0, 0, C.gcflag_no_check_output_events)) ? 0 : -1;
|
|
3243
3261
|
}("C_IEVENT_CLI");
|
|
3244
3262
|
}
|
|
3245
|
-
export { k as GObj, N as SDATA, D as SDATAAUTHZ, R as SDATACM,
|
|
3263
|
+
export { k as GObj, N as SDATA, D as SDATAAUTHZ, R as SDATACM, w as SDATACM2, $ as SDATADF, j as SDATAPM, A as SDATAPM0, S as SDATA_END, O as SDataDesc, a as YUNETA_VERSION, E as __yuno__, o as build_command_response, ql as build_path, s as build_stats_response, Yl as clean_name, Do as clear_timeout, Dr as cmp_two_simple_json, l as command_parser, Pl as createElement2, Ll as createOneHtml, Al as create_json_record, ho as create_template_record, Ml as current_timestamp, y as data_type_t, uo as db_list_persistent_attrs, io as db_load_persistent_attrs, ao as db_remove_persistent_attrs, so as db_save_persistent_attrs, Jl as debounce, gl as delete_from_list, zn as duplicate_objects, gr as empty_json, Sr as empty_string, kl as escapeHtml, U as event_flag_t, to as flat2json, lo as flat_apply, ro as flat_diff, Xl as flat_key_join, Zl as flat_key_split, Re as gclass_add_ev_action, je as gclass_add_event_type, Ne as gclass_add_state, Ae as gclass_check_fsm, ye as gclass_create, De as gclass_event_type, $e as gclass_find_by_name, C as gclass_flag_t, ve as gclass_unregister, Ul as getPositionRelativeToBody, Bl as get_function_name, Wl as get_now, Nt as gobj_bottom_gobj, tn as gobj_change_parent, Zt as gobj_change_state, Nn as gobj_command, Qe as gobj_create, xe as gobj_create2, Je as gobj_create_default_service, He as gobj_create_pure_child, Be as gobj_create_service, qe as gobj_create_volatil, Ye as gobj_create_yuno, en as gobj_current_state, ke as gobj_default_service, _n as gobj_deliver_posted_events, ze as gobj_destroy, Pt as gobj_find_child, Ct as gobj_find_gobj, Ce as gobj_find_service, On as gobj_find_subscribings, yn as gobj_find_subscriptions, L as gobj_flag_t, ht as gobj_full_name, Et as gobj_gclass_name, se as gobj_global_trace_level, Vt as gobj_has_attr, rn as gobj_has_event, ln as gobj_has_output_event, Ee as gobj_hsdata, St as gobj_is_destroying, ft as gobj_is_playing, Ot as gobj_is_pure_child, ut as gobj_is_running, ct as gobj_is_service, vt as gobj_is_volatil, Me as gobj_list_persistent_attrs, vn as gobj_list_subscriptions, Fe as gobj_load_persistent_attrs, Ut as gobj_match_children, Ft as gobj_match_children_tree, Lt as gobj_match_gobj, mt as gobj_name, yt as gobj_parent, at as gobj_pause, st as gobj_play, an as gobj_post_event, un as gobj_posted_events_size, Sn as gobj_publish_event, Mt as gobj_read_attr, Wt as gobj_read_attrs, Kt as gobj_read_bool_attr, xt as gobj_read_integer_attr, Bt as gobj_read_pointer_attr, Yt as gobj_read_str_attr, Ve as gobj_remove_persistent_attrs, ge as gobj_repr_global_trace_levels, qt as gobj_reset_volatil_attrs, Ge as gobj_save_persistent_attrs, Gt as gobj_search_path, cn as gobj_send_event, Ie as gobj_services, Rt as gobj_set_bottom_gobj, ae as gobj_set_deep_trace, ce as gobj_set_gclass_no_trace, ue as gobj_set_gclass_trace, ie as gobj_set_global_no_trace, oe as gobj_set_global_trace, fe as gobj_set_gobj_no_trace, _e as gobj_set_gobj_trace, K as gobj_set_trace_machine_format, Tt as gobj_short_name, Xe as gobj_start, et as gobj_start_children, nt as gobj_start_tree, de as gobj_start_up, Rn as gobj_stats, rt as gobj_stop, ot as gobj_stop_children, it as gobj_stop_tree, En as gobj_subscribe_event, X as gobj_trace_level, x as gobj_trace_machine_format, Z as gobj_trace_no_level, Tn as gobj_unsubscribe_event, hn as gobj_unsubscribe_list, jt as gobj_walk_gobj_children, Dt as gobj_walk_gobj_children_tree, Jt as gobj_write_attr, Ht as gobj_write_attrs, Qt as gobj_write_bool_attr, zt as gobj_write_integer_attr, Xt as gobj_write_str_attr, gt as gobj_yuno, pt as gobj_yuno_id, dt as gobj_yuno_name, bt as gobj_yuno_role, _l as id_index_in_obj_list, Kl as index_in_list, br as is_array, Er as is_boolean, yr as is_date, vr as is_function, Or as is_gobj, $r as is_metadata_key, Tr as is_null, mr as is_number, dr as is_object, Ir as is_private_key, hr as is_pure_number, pr as is_string, Nl as jdb_delete, wl as jdb_get, jl as jdb_get_by_idx, Rl as jdb_get_topic, Ol as jdb_init, Sl as jdb_update, eo as json2flat, ir as json_array_append, sr as json_array_append_new, ur as json_array_extend, ar as json_array_remove, cr as json_array_size, Qn as json_deep_copy, Xn as json_is_identical, rr as json_object_del, nr as json_object_get, lr as json_object_set, or as json_object_set_new, _r as json_object_size, Zn as json_object_update, er as json_object_update_existing, tr as json_object_update_missing, fr as json_size, Il as jwt2json, $l as jwtDecode, Xr as kw_clone_by_keys, Zr as kw_clone_by_not_keys, zr as kw_collect, Pr as kw_delete, Hr as kw_find_json_in_list, Lr as kw_find_path, wn as kw_flag_t, Ur as kw_get_bool, Wr as kw_get_dict, Kr as kw_get_dict_value, Fr as kw_get_int, xr as kw_get_list, el as kw_get_local_storage_value, Mr as kw_get_pointer, Gr as kw_get_real, Vr as kw_get_str, Cr as kw_has_key, qr as kw_match_simple, kr as kw_pop, nl as kw_remove_local_storage_value, Qr as kw_select, Yr as kw_set_dict_value, tl as kw_set_local_storage_value, Br as kw_set_subdict_value, ll as kwid_collect, sl as kwid_find_one_record, al as kwid_get_ids, rl as kwid_match_id, ol as kwid_new_dict, il as kwid_new_list, ul as list2options, hl as load_json_file, Jn as log_debug, xn as log_error, Bn as log_info, Yn as log_warning, Tl as msg_iev_get_msg_type, ml as msg_iev_get_stack, pl as msg_iev_push_stack, dl as msg_iev_read_key, El as msg_iev_set_msg_type, bl as msg_iev_write_key, xl as node_uuid, Nr as parseBoolean, Fl as parseSVG, Gl as refresh_language, ri as register_c_ievent_cli, Ro as register_c_timer, Lo as register_c_yuno, Cl as safeSrc, v as sdata_flag_t, yl as send_http_json_post, Pn as set_console_log_enabled, Fn as set_console_log_filter, Cn as set_log_callback, Wn as set_remote_log_functions, wo as set_timeout, jo as set_timeout_periodic, t as sprintf, i as stats_parser, cl as str_in_list, jr as strcasecmp, wr as strcmp, Rr as strncmp, fl as strs_in_list, Ar as strstr, To as template_get_field_desc, Vl as timeTracker, Hn as trace_json, B as trace_level_t, qn as trace_msg, co as treedb_decoder_fkey, go as treedb_decoder_hook, fo as treedb_encoder_fkey, Eo as treedb_get_field_desc, _o as treedb_hook_data_size, n as vsprintf, F as walk_type_t };
|
|
3246
3264
|
|
|
3247
3265
|
//# sourceMappingURL=gobj-js.es.min.js.map
|