@yuneta/gobj-js 7.26.11 → 7.26.12
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 +12 -6
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +75 -73
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +12 -6
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +164 -162
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +12 -6
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +89 -87
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +12 -6
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +89 -87
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.iife.min.js
CHANGED
|
@@ -191,11 +191,11 @@ var gobjJs = function(e) {
|
|
|
191
191
|
gobj_flag_pure_child: 16,
|
|
192
192
|
gobj_flag_autostart: 32,
|
|
193
193
|
gobj_flag_autoplay: 64
|
|
194
|
-
}),
|
|
194
|
+
}), $ = Object.freeze({
|
|
195
195
|
obflag_destroying: 1,
|
|
196
196
|
obflag_destroyed: 2,
|
|
197
197
|
obflag_created: 4
|
|
198
|
-
}),
|
|
198
|
+
}), R = Object.freeze({
|
|
199
199
|
EVF_NO_WARN_SUBS: 1,
|
|
200
200
|
EVF_OUTPUT_EVENT: 2,
|
|
201
201
|
EVF_SYSTEM_EVENT: 4,
|
|
@@ -518,7 +518,7 @@ var gobjJs = function(e) {
|
|
|
518
518
|
break;
|
|
519
519
|
case y.DTP_POINTER: l = r;
|
|
520
520
|
}
|
|
521
|
-
return void 0 === l && hn(`${et(e)}: attr undefined: ${n.name}`), t[n.name] = l, Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, n.name) && (e.priv[n.name] = l), e.obflag &
|
|
521
|
+
return void 0 === l && hn(`${et(e)}: attr undefined: ${n.name}`), t[n.name] = l, Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, n.name) && (e.priv[n.name] = l), e.obflag & $.obflag_created && !(e.obflag & $.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, n.name), 0;
|
|
522
522
|
}
|
|
523
523
|
function ce(e) {
|
|
524
524
|
return e.jn_attrs;
|
|
@@ -630,7 +630,7 @@ var gobjJs = function(e) {
|
|
|
630
630
|
}
|
|
631
631
|
for (let n = 0; n < e.dl_events.length; n++) {
|
|
632
632
|
let r = e.dl_events[n];
|
|
633
|
-
if (!ir(r.event_name) && (nr(r.event_flag) || (hn(`SMachine: event flag is NOT number: gclass ${e.gclass_name}, event ${r.event_name}`), t += -1), !(r.event_flag &
|
|
633
|
+
if (!ir(r.event_name) && (nr(r.event_flag) || (hn(`SMachine: event flag is NOT number: gclass ${e.gclass_name}, event ${r.event_name}`), t += -1), !(r.event_flag & R.EVF_OUTPUT_EVENT))) {
|
|
634
634
|
let n = !1;
|
|
635
635
|
for (let t = 0; t < e.dl_states.length; t++) {
|
|
636
636
|
let l = e.dl_states[t];
|
|
@@ -649,7 +649,7 @@ var gobjJs = function(e) {
|
|
|
649
649
|
return n || (t && hn(`gclass not found: ${e}`), null);
|
|
650
650
|
}
|
|
651
651
|
function Se() {
|
|
652
|
-
return !m || m.obflag &
|
|
652
|
+
return !m || m.obflag & $.obflag_destroyed ? null : m;
|
|
653
653
|
}
|
|
654
654
|
function we(e, t) {
|
|
655
655
|
if (!tr(e)) return hn(`gobj_find_service(): service name must be a string: ${e}`), null;
|
|
@@ -660,10 +660,10 @@ var gobjJs = function(e) {
|
|
|
660
660
|
let t = Xe(e);
|
|
661
661
|
return t = t.toLowerCase(), b[t] && hn(`service ALREADY REGISTERED: ${t}. Will be UPDATED`), b[t] = e, 0;
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function $e(e, t) {
|
|
664
664
|
t.parent && hn(`_add_child() ALREADY HAS PARENT: ${t.gobj_name}`), e.dl_children.push(t), t.parent = e;
|
|
665
665
|
}
|
|
666
|
-
function
|
|
666
|
+
function Re(e, t) {
|
|
667
667
|
let n = tl(e.dl_children, t);
|
|
668
668
|
n >= 0 && (Hn(e.dl_children, n), t.parent = null);
|
|
669
669
|
}
|
|
@@ -714,14 +714,14 @@ var gobjJs = function(e) {
|
|
|
714
714
|
_.jn_attrs = _e(_, s.attrs_table);
|
|
715
715
|
for (const [e, t] of Object.entries(_.jn_attrs)) e in _.priv && (_.priv[e] = t);
|
|
716
716
|
let a = Y(_);
|
|
717
|
-
return a && L(n("💙💙⏩ creating: %s^%s", s.gclass_name, e)), _.gobj_flag & N.gobj_flag_service && Ne(_), _.gobj_flag & N.gobj_flag_yuno && (p = _), _.gobj_flag & N.gobj_flag_default_service && (m = _), _.gobj_flag & N.gobj_flag_yuno ||
|
|
717
|
+
return a && L(n("💙💙⏩ creating: %s^%s", s.gclass_name, e)), _.gobj_flag & N.gobj_flag_service && Ne(_), _.gobj_flag & N.gobj_flag_yuno && (p = _), _.gobj_flag & N.gobj_flag_default_service && (m = _), _.gobj_flag & N.gobj_flag_yuno || $e(l, _), _.obflag |= $.obflag_created, _.gclass.instances++, Ae(_, r), _.gobj_flag & N.gobj_flag_service && i && i(_, null), _.gclass.gmt.mt_create2 ? _.gclass.gmt.mt_create2(_, r) : _.gclass.gmt.mt_create && _.gclass.gmt.mt_create(_), l && l.gclass.gmt.mt_child_added && (a && L(n("👦👦🔵 child_added(%s): %s", tt(l), et(_))), l.gclass.gmt.mt_child_added(l, _)), a && L(n("💙💙⏪ created: %s", tt(_))), _;
|
|
718
718
|
}
|
|
719
719
|
function Ce(e, t, n, r) {
|
|
720
720
|
return Ie(e, t, n, r, N.gobj_flag_pure_child);
|
|
721
721
|
}
|
|
722
722
|
function Le(e) {
|
|
723
723
|
if (ot(e)) return void hn("gobj NULL or DESTROYED");
|
|
724
|
-
e.__refs__ > 0 && hn(`${et(e)}: gobj DESTROYING with references: ${e.__refs__}`), e.playing && (hn(`Destroying a PLAYING gobj: ${tt(e)}`), xe(e)), e.running && (hn(`Destroying a RUNNING gobj: ${tt(e)}`), Ve(e)), e.obflag |=
|
|
724
|
+
e.__refs__ > 0 && hn(`${et(e)}: gobj DESTROYING with references: ${e.__refs__}`), e.playing && (hn(`Destroying a PLAYING gobj: ${tt(e)}`), xe(e)), e.running && (hn(`Destroying a RUNNING gobj: ${tt(e)}`), Ve(e)), e.obflag |= $.obflag_destroying, function(e) {
|
|
725
725
|
if (0 === Lt.length) return;
|
|
726
726
|
for (let t of Lt) t.src === e && (t.src = null);
|
|
727
727
|
Lt = Lt.filter((t) => t.dst !== e);
|
|
@@ -732,13 +732,13 @@ var gobjJs = function(e) {
|
|
|
732
732
|
r && r.gclass.gmt.mt_child_removed && (t && L(n("👦👦🔴 child_removed(%s): %s", tt(r), et(e))), r.gclass.gmt.mt_child_removed(r, e)), e.gobj_flag & N.gobj_flag_service && function(e) {
|
|
733
733
|
let t = Xe(e);
|
|
734
734
|
t = t.toLowerCase(), b[t] ? delete b[t] : hn(`"service NOT found in register": ${t}`);
|
|
735
|
-
}(e), e === m && (m = null), Ht(e, e.dl_subscriptions, !0), Ht(e, e.dl_subscribings, !0), r && (
|
|
735
|
+
}(e), e === m && (m = null), Ht(e, e.dl_subscriptions, !0), Ht(e, e.dl_subscribings, !0), r && (Re(r, e), rt(e) && (st(r) !== e || ot(r) || it(r, null))), function(e) {
|
|
736
736
|
let t = e.dl_children.slice();
|
|
737
737
|
for (let e = 0; e < t.length; e++) {
|
|
738
738
|
let n = t[e];
|
|
739
739
|
ot(n) || Le(n);
|
|
740
740
|
}
|
|
741
|
-
}(e), e.obflag &
|
|
741
|
+
}(e), e.obflag & $.obflag_created && e.gclass.gmt.mt_destroy && e.gclass.gmt.mt_destroy(e), t && L(n("💔💔⏪ destroyed: %s", tt(e))), e.obflag |= $.obflag_destroyed, e.obflag & $.obflag_created && e.gclass.instances--;
|
|
742
742
|
}
|
|
743
743
|
function Pe(e) {
|
|
744
744
|
if (ot(e)) return hn("gobj NULL or DESTROYED"), -1;
|
|
@@ -795,7 +795,7 @@ var gobjJs = function(e) {
|
|
|
795
795
|
return !ot(e) && e.playing;
|
|
796
796
|
}
|
|
797
797
|
function qe() {
|
|
798
|
-
return !p || p.obflag &
|
|
798
|
+
return !p || p.obflag & $.obflag_destroyed ? null : p;
|
|
799
799
|
}
|
|
800
800
|
function He() {
|
|
801
801
|
let e = qe();
|
|
@@ -834,7 +834,7 @@ var gobjJs = function(e) {
|
|
|
834
834
|
return sr(e) ? !!(e.gobj_flag & N.gobj_flag_pure_child) : (hn("gobj NULL of bad type"), null);
|
|
835
835
|
}
|
|
836
836
|
function ot(e) {
|
|
837
|
-
return !sr(e) || !!(e.obflag & (
|
|
837
|
+
return !sr(e) || !!(e.obflag & ($.obflag_destroyed | $.obflag_destroying));
|
|
838
838
|
}
|
|
839
839
|
function st(e) {
|
|
840
840
|
return sr(e) ? e.bottom_gobj : (hn("gobj NULL of bad type"), null);
|
|
@@ -951,7 +951,7 @@ var gobjJs = function(e) {
|
|
|
951
951
|
const o = l[n];
|
|
952
952
|
if (o.name && (-1 === t || o.flag & t)) {
|
|
953
953
|
let t;
|
|
954
|
-
!e.gclass.gmt.mt_reading || e.obflag &
|
|
954
|
+
!e.gclass.gmt.mt_reading || e.obflag & $.obflag_destroyed ? t = xn(e.jn_attrs, o.name) : (t = e.gclass.gmt.mt_reading(e, o.name), void 0 === t && (t = xn(e.jn_attrs, o.name))), Yn(r, o.name, t);
|
|
955
955
|
}
|
|
956
956
|
}
|
|
957
957
|
return r;
|
|
@@ -964,28 +964,28 @@ var gobjJs = function(e) {
|
|
|
964
964
|
if (0 === ur(t, "__service__")) return Be(e);
|
|
965
965
|
}
|
|
966
966
|
let n = fe(e, t, !1);
|
|
967
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag &
|
|
967
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & $.obflag_destroyed ? xn(n, t) : e.gclass.gmt.mt_reading(e, t) : (hn(`${et(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
968
968
|
}
|
|
969
969
|
function vt(e, t) {
|
|
970
970
|
t && ur(t, "__trace_level__");
|
|
971
971
|
let n = fe(e, t, !1);
|
|
972
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag &
|
|
972
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & $.obflag_destroyed ? xn(n, t) : e.gclass.gmt.mt_reading(e, t) : (hn(`${et(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
973
973
|
}
|
|
974
974
|
function jt(e, t) {
|
|
975
975
|
if (t && 0 === ur(t, "__state__")) return kt(e);
|
|
976
976
|
let n = fe(e, t, !1);
|
|
977
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag &
|
|
977
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & $.obflag_destroyed ? xn(n, t) : e.gclass.gmt.mt_reading(e, t) : (hn(`${et(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
978
978
|
}
|
|
979
979
|
function Ot(e, t) {
|
|
980
980
|
let n = fe(e, t, !1);
|
|
981
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag &
|
|
981
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & $.obflag_destroyed ? xn(n, t) : e.gclass.gmt.mt_reading(e, t) : (hn(`${et(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
982
982
|
}
|
|
983
983
|
function St(e, t, r, l) {
|
|
984
984
|
if (!tr(t)) return hn(n("gobj_write_attr(%s): path must be a string", et(e))), -1;
|
|
985
985
|
let o, s = e.jn_attrs, i = t.split("`");
|
|
986
986
|
if (i.length <= 1) {
|
|
987
987
|
let l = t;
|
|
988
|
-
return l in s && Object.prototype.hasOwnProperty.call(s, l) ? (s[l] = r, Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, l) && (e.priv[l] = r), e.obflag &
|
|
988
|
+
return l in s && Object.prototype.hasOwnProperty.call(s, l) ? (s[l] = r, Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, l) && (e.priv[l] = r), e.obflag & $.obflag_created && !(e.obflag & $.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, l), 0) : (hn(n("gobj_write_attr(%s): attr not found '%s'", et(e), l)), -1);
|
|
989
989
|
}
|
|
990
990
|
let _ = i.length;
|
|
991
991
|
for (let t = 0; t < _; t++) {
|
|
@@ -996,7 +996,7 @@ var gobjJs = function(e) {
|
|
|
996
996
|
continue;
|
|
997
997
|
}
|
|
998
998
|
let l = e.jn_attrs;
|
|
999
|
-
if (o in l && Object.prototype.hasOwnProperty.call(l, o)) return l[o] = r, Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, o) && (e.priv[o] = r), e.obflag &
|
|
999
|
+
if (o in l && Object.prototype.hasOwnProperty.call(l, o)) return l[o] = r, Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, o) && (e.priv[o] = r), e.obflag & $.obflag_created && !(e.obflag & $.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, o), 0;
|
|
1000
1000
|
break;
|
|
1001
1001
|
}
|
|
1002
1002
|
return hn(n("gobj_write_attr(%s): attr not found '%s'", et(e), o)), -1;
|
|
@@ -1011,15 +1011,15 @@ var gobjJs = function(e) {
|
|
|
1011
1011
|
}
|
|
1012
1012
|
function Nt(e, t, n) {
|
|
1013
1013
|
let r = fe(e, t, !1);
|
|
1014
|
-
return r ? (r[t] = _r(n), Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag &
|
|
1014
|
+
return r ? (r[t] = _r(n), Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag & $.obflag_created && !(e.obflag & $.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (hn(`${et(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1015
1015
|
}
|
|
1016
|
-
function
|
|
1016
|
+
function $t(e, t, n) {
|
|
1017
1017
|
let r = fe(e, t, !1);
|
|
1018
|
-
return r ? (r[t] = parseInt(n), Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag &
|
|
1018
|
+
return r ? (r[t] = parseInt(n), Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag & $.obflag_created && !(e.obflag & $.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (hn(`${et(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1019
1019
|
}
|
|
1020
|
-
function
|
|
1020
|
+
function Rt(e, t, n) {
|
|
1021
1021
|
let r = fe(e, t, !1);
|
|
1022
|
-
return r ? (r[t] = String(n), Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag &
|
|
1022
|
+
return r ? (r[t] = String(n), Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag & $.obflag_created && !(e.obflag & $.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (hn(`${et(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1023
1023
|
}
|
|
1024
1024
|
function Dt(e, t) {
|
|
1025
1025
|
if (ot(e)) return hn("gobj NULL or DESTROYED"), null;
|
|
@@ -1054,11 +1054,11 @@ var gobjJs = function(e) {
|
|
|
1054
1054
|
}
|
|
1055
1055
|
function Ct(e, t, n) {
|
|
1056
1056
|
let r = At(e, t, !1);
|
|
1057
|
-
return !!r && !(n && !(r.event_flag & n)) && !!(r.event_flag &
|
|
1057
|
+
return !!r && !(n && !(r.event_flag & n)) && !!(r.event_flag & R.EVF_OUTPUT_EVENT);
|
|
1058
1058
|
}
|
|
1059
1059
|
var Lt = [], Pt = !1;
|
|
1060
1060
|
function Ut(e, t, r, l) {
|
|
1061
|
-
return e && e instanceof S ? e.obflag & (
|
|
1061
|
+
return e && e instanceof S ? e.obflag & ($.obflag_destroyed | $.obflag_destroying) ? (hn(`gobj_post_event(): gobj dst DESTROYING, event ${t}`), -1) : ir(t) ? (hn("gobj_post_event(): event EMPTY"), -1) : It(e, t, 0) ? Lt.length >= 1e4 ? (hn(`gobj_post_event(): too many posted events, this is NOT a work queue, event ${t}, pending ${Lt.length}`), -1) : (Lt.push({
|
|
1062
1062
|
dst: e,
|
|
1063
1063
|
event: t,
|
|
1064
1064
|
kw: r,
|
|
@@ -1072,7 +1072,7 @@ var gobjJs = function(e) {
|
|
|
1072
1072
|
let t = 0;
|
|
1073
1073
|
for (let n = 0; n < e.length; n++) {
|
|
1074
1074
|
const r = e[n];
|
|
1075
|
-
if (!(r.dst.obflag & (
|
|
1075
|
+
if (!(r.dst.obflag & ($.obflag_destroyed | $.obflag_destroying))) {
|
|
1076
1076
|
try {
|
|
1077
1077
|
Vt(r.dst, r.event, r.kw, r.src);
|
|
1078
1078
|
} catch (t) {
|
|
@@ -1085,7 +1085,7 @@ var gobjJs = function(e) {
|
|
|
1085
1085
|
}
|
|
1086
1086
|
function Vt(e, t, r, l) {
|
|
1087
1087
|
if (!(e && e instanceof S)) return hn("gobj dst NULL"), -1;
|
|
1088
|
-
if (e.obflag & (
|
|
1088
|
+
if (e.obflag & ($.obflag_destroyed | $.obflag_destroying)) return hn("gobj dst DESTROYED"), -1;
|
|
1089
1089
|
let o = e.current_state;
|
|
1090
1090
|
if (!o) return hn(`${et(e)}: current_state NULL`), -1;
|
|
1091
1091
|
let s = H(e, t) && !z(l, t);
|
|
@@ -1113,7 +1113,7 @@ var gobjJs = function(e) {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
throw n;
|
|
1115
1115
|
}
|
|
1116
|
-
return !s || 1 === C || e.obflag &
|
|
1116
|
+
return !s || 1 === C || e.obflag & $.obflag_destroyed || L(n("<- mach(%s%s^%s), st: %s, ev: %s, ret: %d", e.running ? "" : "!!", Ze(e), Xe(e), e.current_state.state_name, t || "", nr(_) ? _ : 0)), h--, _;
|
|
1117
1117
|
}
|
|
1118
1118
|
var Gt = Object.freeze({
|
|
1119
1119
|
__rename_event_name__: 1,
|
|
@@ -1194,7 +1194,7 @@ var gobjJs = function(e) {
|
|
|
1194
1194
|
if (!!(Er(e, t, "subs_flag", null, Zt.KW_REQUIRED) & Gt.__hard_subscription__) && !r) return -1;
|
|
1195
1195
|
let _ = B(s) || B(o);
|
|
1196
1196
|
if (Bt(o.dl_subscriptions, t) < 0) return _ && L(n("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s', ALREADY REMOVED", i || "", et(o), et(s))), 1;
|
|
1197
|
-
_ && (L(n("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s'", i || "", et(o), et(s))), vn(t)), o.obflag &
|
|
1197
|
+
_ && (L(n("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s'", i || "", et(o), et(s))), vn(t)), o.obflag & $.obflag_destroyed || l || o.gclass.gmt.mt_subscription_deleted && o.gclass.gmt.mt_subscription_deleted(o, t);
|
|
1198
1198
|
let a = Bt(o.dl_subscriptions, t);
|
|
1199
1199
|
return a >= 0 ? Hn(o.dl_subscriptions, a) : (hn(`${et(e)}: subscription in publisher not found`), vn(t)), a = Bt(s.dl_subscribings, t), a >= 0 ? Hn(s.dl_subscribings, a) : (hn(`${et(e)}: subscription in subscriber not found`), vn(t)), 0;
|
|
1200
1200
|
}
|
|
@@ -1211,7 +1211,7 @@ var gobjJs = function(e) {
|
|
|
1211
1211
|
if (Object.keys(r).forEach((n) => {
|
|
1212
1212
|
o.has(n) || hn(`${et(e)}: key ignored in subscription (key: ${n}, event: ${t})`);
|
|
1213
1213
|
}), ir(t)) t = "";
|
|
1214
|
-
else if (!(Ct(e, t,
|
|
1214
|
+
else if (!(Ct(e, t, R.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & w.gcflag_no_check_output_events)) return hn(`event NOT in output event list: ${et(e)}, ${t}`), 0;
|
|
1215
1215
|
let s = xt(r, t), i = Yt(e.dl_subscriptions, e, t, s.renamed_event, s.kw, l), _ = null;
|
|
1216
1216
|
for (let t = 0; t < i.length; t++) if (Er(e, i[t], "subs_flag", 0, Zt.KW_REQUIRED) & Gt.__hard_subscription__) {
|
|
1217
1217
|
_ = i[t];
|
|
@@ -1269,10 +1269,10 @@ var gobjJs = function(e) {
|
|
|
1269
1269
|
return Yt(e.dl_subscribings, r, t, null, n, e);
|
|
1270
1270
|
}
|
|
1271
1271
|
function Xt(e, t, r) {
|
|
1272
|
-
if (Zn(r) || (r = {}), !e || e.obflag & (
|
|
1272
|
+
if (Zn(r) || (r = {}), !e || e.obflag & ($.obflag_destroyed | $.obflag_destroying)) return hn("gobj NULL or DESTROYED"), -1;
|
|
1273
1273
|
if (ir(t)) return hn(`${et(e)}: event EMPTY`), -1;
|
|
1274
1274
|
let l = At(e, t, !0);
|
|
1275
|
-
if (!(l && l.event_flag & (
|
|
1275
|
+
if (!(l && l.event_flag & (R.EVF_SYSTEM_EVENT | R.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & w.gcflag_no_check_output_events)) return hn(`event NOT in output event list: ${et(e)}, ev ${t}`), -1;
|
|
1276
1276
|
let o = (B(e) || H(e, t)) && !z(e, t);
|
|
1277
1277
|
if (o && (L(1 === C ? n("🔝🔝 %s %s%s %s", t || "", e.running ? "" : "!!", et(e), e.current_state.state_name) : n("🔝🔝 mach(%s%s^%s), st: %s, ev: %s%s%s", e.running ? "" : "!!", Ze(e), Xe(e), e.current_state.state_name, "", t || "", "")), q(e) && zn(r) && Un(r)), e.gclass.gmt.mt_publish_event) {
|
|
1278
1278
|
let n = e.gclass.gmt.mt_publish_event(e, t, r);
|
|
@@ -1294,10 +1294,10 @@ var gobjJs = function(e) {
|
|
|
1294
1294
|
let l = jr(e, a, "__global__", null, 0), s = jr(e, a, "__local__", null, 0), f = Or(e, a, "__filter__", null, 0), g = a.renamed_event;
|
|
1295
1295
|
ir(g) && (g = t);
|
|
1296
1296
|
let d = 1;
|
|
1297
|
-
if (e.gclass.gmt.mt_publication_filter ? d = e.gclass.gmt.mt_publication_filter(e, t, r, u) : Xn(f) > 0 && (d =
|
|
1297
|
+
if (e.gclass.gmt.mt_publication_filter ? d = e.gclass.gmt.mt_publication_filter(e, t, r, u) : Xn(f) > 0 && (d = $r(r, f) ? 1 : 0, o && (L(n("💜💜🔄%s publishing with filter, event '%s', subscriber'%s', publisher %s", d ? "👍" : "👎", t || "", et(u), et(e))), vn(f))), d < 0) break;
|
|
1298
1298
|
if (!d) continue;
|
|
1299
1299
|
let b = At(u, t, !0);
|
|
1300
|
-
if (b && b.event_flag &
|
|
1300
|
+
if (b && b.event_flag & R.EVF_SYSTEM_EVENT && !It(u, b.event_name, 0)) continue;
|
|
1301
1301
|
let p = r;
|
|
1302
1302
|
(Xn(s) > 0 || Xn(l) > 0) && (p = Gn({}, r)), Xn(s) > 0 && fr(p, s), Xn(l) > 0 && Gn(p, Fn(l)), o && (L(1 === C ? n("🔝🔄 %s (%s) %s%s", t || "", g || "", u.running ? "" : "!!", et(u)) : n("🔝🔄 mach(%s%s), st: %s, ev: %s (%s), from(%s%s)", u.running ? "" : "!!", et(u), kt(u), t || "", g || "", e && !e.running ? "!!" : "", et(e))), q(e) && zn(p) && Un(p));
|
|
1303
1303
|
let m = Vt(u, g, p, e);
|
|
@@ -1308,7 +1308,7 @@ var gobjJs = function(e) {
|
|
|
1308
1308
|
if (_ += m, i++, ot(e)) break;
|
|
1309
1309
|
}
|
|
1310
1310
|
}
|
|
1311
|
-
return i || l && l.event_flag &
|
|
1311
|
+
return i || l && l.event_flag & R.EVF_NO_WARN_SUBS || yn(`${et(e)}: Publish event WITHOUT subscribers, ev ${t}`), _;
|
|
1312
1312
|
}
|
|
1313
1313
|
var Zt = Object.freeze({
|
|
1314
1314
|
KW_REQUIRED: 1,
|
|
@@ -1495,10 +1495,10 @@ var gobjJs = function(e) {
|
|
|
1495
1495
|
o = t;
|
|
1496
1496
|
}
|
|
1497
1497
|
}
|
|
1498
|
-
var
|
|
1498
|
+
var $n = 128, Rn = 4194304, Dn = "<not shown: too large to mask>";
|
|
1499
1499
|
function kn(e) {
|
|
1500
1500
|
if ("string" != typeof e || e.indexOf("=") < 0) return null;
|
|
1501
|
-
if (e.length >
|
|
1501
|
+
if (e.length > Rn) return Dn;
|
|
1502
1502
|
let t, n = !1, r = /(^|[ \t])attribute=["']?([^ \t"']*)/g;
|
|
1503
1503
|
for (; null !== (t = r.exec(e));) wn(t[2].slice(-128)) && (n = !0);
|
|
1504
1504
|
let l = [], o = 0, s = !1, i = "", _ = 0, a = 0;
|
|
@@ -1513,7 +1513,7 @@ var gobjJs = function(e) {
|
|
|
1513
1513
|
a++;
|
|
1514
1514
|
continue;
|
|
1515
1515
|
}
|
|
1516
|
-
let r = e.substring(Math.max(_, a -
|
|
1516
|
+
let r = e.substring(Math.max(_, a - $n), a);
|
|
1517
1517
|
if (_ = a + 1, !(wn(r) || n && "value" === r.toLowerCase())) {
|
|
1518
1518
|
a++;
|
|
1519
1519
|
continue;
|
|
@@ -1582,7 +1582,7 @@ var gobjJs = function(e) {
|
|
|
1582
1582
|
}
|
|
1583
1583
|
function Pn(e) {
|
|
1584
1584
|
try {
|
|
1585
|
-
return Ln(e, /* @__PURE__ */ new WeakMap(), 0, { left:
|
|
1585
|
+
return Ln(e, /* @__PURE__ */ new WeakMap(), 0, { left: Rn });
|
|
1586
1586
|
} catch (e) {
|
|
1587
1587
|
return In;
|
|
1588
1588
|
}
|
|
@@ -1932,10 +1932,10 @@ var gobjJs = function(e) {
|
|
|
1932
1932
|
}
|
|
1933
1933
|
return o;
|
|
1934
1934
|
}
|
|
1935
|
-
function
|
|
1935
|
+
function $r(e, t) {
|
|
1936
1936
|
return 0 === Xn(t) || Nr(e, t, "");
|
|
1937
1937
|
}
|
|
1938
|
-
function
|
|
1938
|
+
function Rr(e, t, n, r) {
|
|
1939
1939
|
e && !sr(e) && hn("GObj bad instanceof");
|
|
1940
1940
|
let l = {};
|
|
1941
1941
|
if (tr(n) && !ir(n)) {
|
|
@@ -2005,7 +2005,7 @@ var gobjJs = function(e) {
|
|
|
2005
2005
|
}
|
|
2006
2006
|
function Lr(e, t, n, r, l) {
|
|
2007
2007
|
if (e && !sr(e) && hn("GObj bad instanceof"), !t) return null;
|
|
2008
|
-
l || (l =
|
|
2008
|
+
l || (l = $r);
|
|
2009
2009
|
let o = [];
|
|
2010
2010
|
if (er(t)) for (let s = 0; s < t.length; s++) {
|
|
2011
2011
|
let i, _ = t[s];
|
|
@@ -2373,18 +2373,18 @@ var gobjJs = function(e) {
|
|
|
2373
2373
|
return 0;
|
|
2374
2374
|
},
|
|
2375
2375
|
mt_stop: function(e) {
|
|
2376
|
-
return
|
|
2376
|
+
return $t(e, "msec", -1), 0;
|
|
2377
2377
|
},
|
|
2378
2378
|
mt_destroy: function(e) {}
|
|
2379
2379
|
};
|
|
2380
2380
|
function El(e, t) {
|
|
2381
|
-
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : (Nt(e, "periodic", !1), void
|
|
2381
|
+
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : (Nt(e, "periodic", !1), void $t(e, "msec", t)) : (hn("not GObj TYPE"), -1);
|
|
2382
2382
|
}
|
|
2383
2383
|
function Tl(e, t) {
|
|
2384
|
-
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : (Nt(e, "periodic", !0), void
|
|
2384
|
+
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : (Nt(e, "periodic", !0), void $t(e, "msec", t)) : (hn("not GObj TYPE"), -1);
|
|
2385
2385
|
}
|
|
2386
2386
|
function vl(e) {
|
|
2387
|
-
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : void
|
|
2387
|
+
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : void $t(e, "msec", -1) : (hn("not GObj TYPE"), -1);
|
|
2388
2388
|
}
|
|
2389
2389
|
var jl = [
|
|
2390
2390
|
j(y.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
@@ -2416,16 +2416,16 @@ var gobjJs = function(e) {
|
|
|
2416
2416
|
let t = String(null == e ? "" : e).toLowerCase();
|
|
2417
2417
|
return "true" === t || "set" === t || "false" !== t && "reset" !== t && ("" === t || isNaN(Number(t)) ? null : !!Number(t));
|
|
2418
2418
|
}
|
|
2419
|
-
function
|
|
2419
|
+
function $l() {
|
|
2420
2420
|
return `${ze()}^${He()}`;
|
|
2421
2421
|
}
|
|
2422
|
-
function
|
|
2422
|
+
function Rl(e, t, n, r) {
|
|
2423
2423
|
return Xt(e, t, n), 0;
|
|
2424
2424
|
}
|
|
2425
2425
|
var Dl = {
|
|
2426
2426
|
mt_create: function(e) {
|
|
2427
2427
|
let t = e.priv;
|
|
2428
|
-
|
|
2428
|
+
Rt(e, "start_date", el()), Rt(e, "node_uuid", nl()), e.priv.gobj_timer = Ce(Xe(e), "C_TIMER", {}, e), t.periodic_timeout = yt(e, "periodic_timeout"), function(e) {
|
|
2429
2429
|
let t = yt(e, "trace_levels");
|
|
2430
2430
|
if (!Zn(t)) return 0;
|
|
2431
2431
|
let n = t.__global_trace__;
|
|
@@ -2480,19 +2480,19 @@ var gobjJs = function(e) {
|
|
|
2480
2480
|
case "set-global-trace":
|
|
2481
2481
|
case "set-global-no-trace": {
|
|
2482
2482
|
let r = "set-global-no-trace" === t, o = n.level, s = Nl(n.set);
|
|
2483
|
-
return o ? null === s ? l(0, -1, `${
|
|
2483
|
+
return o ? null === s ? l(0, -1, `${$l()}: bitmask set or re-set?`, null, null) : (r ? X(o, s) : Q(o, s)) < 0 ? l(0, -1, `${$l()}: global trace level not found: ${o}`, null, null) : r ? (wl(e, "no_trace_levels", "__global_no_trace__", ne()), l(0, 0, null, null, ne())) : (wl(e, "trace_levels", "__global_trace__", te()), l(0, 0, null, null, te())) : l(0, -1, `${$l()}: what level?`, null, null);
|
|
2484
2484
|
}
|
|
2485
2485
|
case "get-gclass-trace":
|
|
2486
2486
|
case "get-gclass-no-trace":
|
|
2487
2487
|
case "set-gclass-trace":
|
|
2488
2488
|
case "set-gclass-no-trace": {
|
|
2489
2489
|
let r = t.indexOf("no-trace") >= 0, o = n.gclass_name || n.gclass || "", s = Oe(o);
|
|
2490
|
-
if (!s) return l(0, -1, `${
|
|
2490
|
+
if (!s) return l(0, -1, `${$l()}: what gclass is '${o}'?`, null, null);
|
|
2491
2491
|
if (0 === t.indexOf("get-")) return l(0, 0, null, null, r ? oe(s) : re(s));
|
|
2492
2492
|
let i = n.level, _ = Nl(n.set);
|
|
2493
|
-
return i ? null === _ ? l(0, -1, `${
|
|
2493
|
+
return i ? null === _ ? l(0, -1, `${$l()}: bitmask set or re-set?`, null, null) : (r ? ie(s, i, _) : se(s, i, _)) < 0 ? l(0, -1, `${$l()}: trace level of ${o} not found: ${i}`, null, null) : r ? (wl(e, "no_trace_levels", o, oe(s)), l(0, 0, null, null, oe(s))) : (wl(e, "trace_levels", o, le(s)), l(0, 0, null, null, re(s))) : l(0, -1, `${$l()}: what level?`, null, null);
|
|
2494
2494
|
}
|
|
2495
|
-
default: return l(0, -1, `${
|
|
2495
|
+
default: return l(0, -1, `${$l()}: command not available: ${t}`, null, null);
|
|
2496
2496
|
}
|
|
2497
2497
|
}
|
|
2498
2498
|
};
|
|
@@ -2690,7 +2690,7 @@ var gobjJs = function(e) {
|
|
|
2690
2690
|
let l = e.priv;
|
|
2691
2691
|
vl(l.gobj_timer);
|
|
2692
2692
|
let o = Mr(e, n, kl, !0), s = Tr(e, o, "src_yuno", ""), i = Tr(e, o, "src_role", ""), _ = Tr(e, o, "src_service", "");
|
|
2693
|
-
|
|
2693
|
+
Rt(e, "remote_yuno_name", s), Rt(e, "remote_yuno_role", i), Rt(e, "remote_yuno_service", _);
|
|
2694
2694
|
let a = Er(e, n, "result", -1, 0), u = Tr(e, n, "comment", "", 0), c = Tr(e, n, "username", "", 0), f = Or(e, n, "services_roles", {});
|
|
2695
2695
|
if (a < 0) {
|
|
2696
2696
|
Fl(e);
|
|
@@ -2748,7 +2748,7 @@ var gobjJs = function(e) {
|
|
|
2748
2748
|
}
|
|
2749
2749
|
let s = o.event, i = o.kw;
|
|
2750
2750
|
if ("ST_SESSION" !== kt(e)) {
|
|
2751
|
-
if (It(e, s,
|
|
2751
|
+
if (It(e, s, R.EVF_PUBLIC_EVENT)) {
|
|
2752
2752
|
if (!(Vt(e, s, i, e) < 0)) return 0;
|
|
2753
2753
|
} else hn(`${et(e)}: event UNKNOWN in not-session state ${s}`);
|
|
2754
2754
|
return Fl(e), -1;
|
|
@@ -2759,10 +2759,10 @@ var gobjJs = function(e) {
|
|
|
2759
2759
|
let c = Tr(e, a, "dst_service", "");
|
|
2760
2760
|
if ("__subscribing__" === _) return yn(`${et(e)}: subscription event ignored, I'm client (service: ${c}, event: ${s})`), -1;
|
|
2761
2761
|
if ("__unsubscribing__" === _) return yn(`${et(e)}: unsubscription event ignored, I'm client (service: ${c}, event: ${s})`), -1;
|
|
2762
|
-
if (It(e, s,
|
|
2762
|
+
if (It(e, s, R.EVF_PUBLIC_EVENT)) return Vt(e, s, i, e), 0;
|
|
2763
2763
|
if (!ir(c)) {
|
|
2764
2764
|
let t = we(c, !1);
|
|
2765
|
-
return t ? It(t, s,
|
|
2765
|
+
return t ? It(t, s, R.EVF_PUBLIC_EVENT) ? (Vt(t, s, i, e), 0) : (hn(`${et(e)}: Service found but no event or not public, service '${et(t)}', ev '${s}'`), -1) : (yn(`${et(e)}: event for a service that is gone, DROPPED: service '${c}', ev '${s}'`), 0);
|
|
2766
2766
|
}
|
|
2767
2767
|
return lt(e) ? Vt(nt(e), s, i, e) : Xt(e, s, i), 0;
|
|
2768
2768
|
}
|
|
@@ -2775,7 +2775,7 @@ var gobjJs = function(e) {
|
|
|
2775
2775
|
var eo = {
|
|
2776
2776
|
mt_create: function(e) {
|
|
2777
2777
|
let t = e.priv;
|
|
2778
|
-
t.gobj_timer = Ce(Xe(e), "C_TIMER", {}, e), t.ws_seq = 0, t.url = jt(e, "url"), t.remote_yuno_name = jt(e, "remote_yuno_name"), t.remote_yuno_role = jt(e, "remote_yuno_role"), t.remote_yuno_service = jt(e, "remote_yuno_service"),
|
|
2778
|
+
t.gobj_timer = Ce(Xe(e), "C_TIMER", {}, e), t.ws_seq = 0, t.url = jt(e, "url"), t.remote_yuno_name = jt(e, "remote_yuno_name"), t.remote_yuno_role = jt(e, "remote_yuno_role"), t.remote_yuno_service = jt(e, "remote_yuno_service"), Rt(e, "wanted_yuno_name", t.remote_yuno_name), Rt(e, "wanted_yuno_role", t.remote_yuno_role), Rt(e, "wanted_yuno_service", t.remote_yuno_service);
|
|
2779
2779
|
const n = Ot(e, "subscriber");
|
|
2780
2780
|
n && qt(e, null, {}, n);
|
|
2781
2781
|
},
|
|
@@ -2897,18 +2897,18 @@ var gobjJs = function(e) {
|
|
|
2897
2897
|
}), n;
|
|
2898
2898
|
}, e.current_timestamp = el, e.data_type_t = y, e.db_list_persistent_attrs = function(e, t) {
|
|
2899
2899
|
let n = kr(al(e), null, !1), r = {};
|
|
2900
|
-
return n && Zn(n) && (r =
|
|
2900
|
+
return n && Zn(n) && (r = Rr(e, n, t, !1)), r;
|
|
2901
2901
|
}, e.db_load_persistent_attrs = function(e, t) {
|
|
2902
2902
|
let n = Et(e, E.SDF_PERSIST), r = kr(al(e), null, !1);
|
|
2903
2903
|
if (r && Zn(r)) {
|
|
2904
|
-
let l =
|
|
2905
|
-
l =
|
|
2904
|
+
let l = Rr(e, r, t, !1);
|
|
2905
|
+
l = Rr(e, l, n, !1), wt(e, l, E.SDF_PERSIST);
|
|
2906
2906
|
}
|
|
2907
2907
|
}, e.db_remove_persistent_attrs = function(e, t) {
|
|
2908
2908
|
let n = Dr(e, kr(al(e), null, !1), t, !1);
|
|
2909
2909
|
0 === zn(n) ? Ir(al(e)) : Ar(al(e), n);
|
|
2910
2910
|
}, e.db_save_persistent_attrs = function(e, t) {
|
|
2911
|
-
let n =
|
|
2911
|
+
let n = Rr(e, Et(e, E.SDF_PERSIST), t, !1), r = kr(al(e), null, !1);
|
|
2912
2912
|
return r && Zn(r) && Wn(n, r), Ar(al(e), n);
|
|
2913
2913
|
}, e.debounce = function(e, t = 0, n = !1) {
|
|
2914
2914
|
let r = null, l = null, o = null;
|
|
@@ -2933,7 +2933,7 @@ var gobjJs = function(e) {
|
|
|
2933
2933
|
return t;
|
|
2934
2934
|
}, e.empty_json = function(e) {
|
|
2935
2935
|
return 0 === Xn(e);
|
|
2936
|
-
}, e.empty_string = ir, e.escapeHtml = Jr, e.event_flag_t =
|
|
2936
|
+
}, e.empty_string = ir, e.escapeHtml = Jr, e.event_flag_t = R, e.flat2json = function(e) {
|
|
2937
2937
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat2json: a flat json is an object of id -> value");
|
|
2938
2938
|
let t = null;
|
|
2939
2939
|
for (const n of Object.keys(e)) {
|
|
@@ -3016,7 +3016,7 @@ var gobjJs = function(e) {
|
|
|
3016
3016
|
}, e.get_function_name = rl, e.get_now = function() {
|
|
3017
3017
|
return Math.floor(Date.now() / 1e3);
|
|
3018
3018
|
}, e.gobj_bottom_gobj = st, e.gobj_change_parent = function(e, t) {
|
|
3019
|
-
return ot(e) ? (hn("gobj NULL or DESTROYED"), null) : t instanceof S ? (e.parent && e.parent.gclass.gmt.mt_child_removed && e.parent.gclass.gmt.mt_child_removed(e.parent, e), e.parent && (
|
|
3019
|
+
return ot(e) ? (hn("gobj NULL or DESTROYED"), null) : t instanceof S ? (e.parent && e.parent.gclass.gmt.mt_child_removed && e.parent.gclass.gmt.mt_child_removed(e.parent, e), e.parent && (Re(e.parent, e), e.parent = null), $e(t, e), t.gclass.gmt.mt_child_added && (Y(e) && En(n("👦👦🔵 child_added(%s): %s", tt(t), et(e))), t.gclass.gmt.mt_child_added(t, e)), 0) : (hn(`${et(e)}: gobj_change_parent() BAD TYPE of parent`), -1);
|
|
3020
3020
|
}, e.gobj_change_state = Dt, e.gobj_command = function(e, t, r, o) {
|
|
3021
3021
|
if (ot(e)) return hn("gobj NULL or DESTROYED"), -1;
|
|
3022
3022
|
if (function(e) {
|
|
@@ -3128,7 +3128,7 @@ var gobjJs = function(e) {
|
|
|
3128
3128
|
return ot(e) ? (hn("gobj NULL or DESTROYED"), -1) : (J(e) && L(n("⏺ ⏺ ⏺ ⏺ start_tree: %s", tt(e))), e.gclass.gclass_flag & w.gcflag_manual_start || e.disabled ? 0 : (e.running || Pe(e), ut(e, D.WALK_TOP2BOTTOM, Fe, 0, 0)));
|
|
3129
3129
|
}, e.gobj_start_up = function(e, t, n, r, l, o, s) {
|
|
3130
3130
|
i = t, _ = n, a = r, u = l, c = o, f = s;
|
|
3131
|
-
const d = [["EV_STATE_CHANGED",
|
|
3131
|
+
const d = [["EV_STATE_CHANGED", R.EVF_SYSTEM_EVENT | R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS], [0, 0]];
|
|
3132
3132
|
for (let e = 0; e < d.length; e++) {
|
|
3133
3133
|
let t = d[e][0], n = d[e][1];
|
|
3134
3134
|
Ee(g, t, n);
|
|
@@ -3153,14 +3153,14 @@ var gobjJs = function(e) {
|
|
|
3153
3153
|
if (Object.keys(n).forEach((n) => {
|
|
3154
3154
|
l.has(n) || hn(`${et(e)}: key ignored in subscription (key: ${n}, event: ${t})`);
|
|
3155
3155
|
}), ir(t)) t = "";
|
|
3156
|
-
else if (!(Ct(e, t,
|
|
3156
|
+
else if (!(Ct(e, t, R.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & w.gcflag_no_check_output_events)) return hn(`event NOT in output event list: ${et(e)}, ev ${t}`), 0;
|
|
3157
3157
|
let o = xt(n, t), s = Yt(e.dl_subscriptions, e, t, o.renamed_event, o.kw, r), i = 0, _ = 0, a = 0;
|
|
3158
3158
|
for (let t = 0; t < s.length; t++) {
|
|
3159
3159
|
let n = s[t], r = Jt(e, n, !1, !1);
|
|
3160
3160
|
0 === r ? i++ : r < 0 ? _++ : a++;
|
|
3161
3161
|
}
|
|
3162
3162
|
return _ ? yn(`${et(e)}: Hard subscription not removed, only gobj_unsubscribe_list() with force removes it (event: ${t}, hard: ${_})`) : i || a || (yn(`${et(e)}: No subscription found`), Un(n, "No subscription found")), 0;
|
|
3163
|
-
}, e.gobj_unsubscribe_list = Ht, e.gobj_walk_gobj_children = at, e.gobj_walk_gobj_children_tree = ut, e.gobj_write_attr = St, e.gobj_write_attrs = wt, e.gobj_write_bool_attr = Nt, e.gobj_write_integer_attr =
|
|
3163
|
+
}, e.gobj_unsubscribe_list = Ht, e.gobj_walk_gobj_children = at, e.gobj_walk_gobj_children_tree = ut, e.gobj_write_attr = St, e.gobj_write_attrs = wt, e.gobj_write_bool_attr = Nt, e.gobj_write_integer_attr = $t, e.gobj_write_str_attr = Rt, e.gobj_yuno = qe, e.gobj_yuno_id = Qe, e.gobj_yuno_name = He, e.gobj_yuno_role = ze, e.html_markup = function(e) {
|
|
3164
3164
|
return "string" != typeof e ? (hn("html_markup: not a string, type " + typeof e), new qr("")) : new qr(e);
|
|
3165
3165
|
}, e.id_index_in_obj_list = Pr, e.index_in_list = tl, e.is_array = er, e.is_boolean = rr, e.is_date = function(e) {
|
|
3166
3166
|
return e instanceof Date && !isNaN(e);
|
|
@@ -3182,8 +3182,9 @@ var gobjJs = function(e) {
|
|
|
3182
3182
|
}, e.is_secret_name = wn, e.is_string = tr, e.jdb_delete = function(e, t, n, r) {
|
|
3183
3183
|
let l = Or(null, Or(null, e, "topics", null, 0), t, null, 0);
|
|
3184
3184
|
if (!l) return hn("jdb_delete: topic not found: " + t), null;
|
|
3185
|
-
if (ir(r.id)) return hn(
|
|
3185
|
+
if (!Zn(r) || ir(r.id)) return hn(`jdb_delete: record without id: ${JSON.stringify(r)}`), null;
|
|
3186
3186
|
if (!tr(n)) return hn(`jdb_delete: path must be a string: ${String(n)}`), null;
|
|
3187
|
+
if ("" !== n && n.split("`").includes("")) return hn(`jdb_delete: empty segment in path: '${n}'`), null;
|
|
3187
3188
|
let o, s = n.split("`"), i = l;
|
|
3188
3189
|
for (; (o = s.shift()) && !ir(o) && i;) Zn(i) && (i = Or(null, i, e.hook, null, 0)), i = Yr(i, null, o, !1);
|
|
3189
3190
|
if (!i || 0 !== s.length) return hn(`jdb_delete: path not found in topic '${t}': '${n}'`), null;
|
|
@@ -3210,8 +3211,9 @@ var gobjJs = function(e) {
|
|
|
3210
3211
|
}, e.jdb_update = function(e, t, n, r) {
|
|
3211
3212
|
let l = Or(null, Or(null, e, "topics", null, 0), t, null, 0);
|
|
3212
3213
|
if (!l) return hn("jdb_update: topic not found: " + t), null;
|
|
3213
|
-
if (ir(r.id)) return hn(
|
|
3214
|
+
if (!Zn(r) || ir(r.id)) return hn(`jdb_update: record without id: ${JSON.stringify(r)}`), null;
|
|
3214
3215
|
if (!tr(n)) return hn(`jdb_update: path must be a string: ${String(n)}`), null;
|
|
3216
|
+
if ("" !== n && n.split("`").includes("")) return hn(`jdb_update: empty segment in path: '${n}'`), null;
|
|
3215
3217
|
let o, s, i = n.split("`"), _ = l;
|
|
3216
3218
|
for (; (o = i.shift()) && !ir(o) && _;) Zn(_) && (_ = Or(null, _, e.hook, null, 0)), _ = Yr(_, null, o, !1);
|
|
3217
3219
|
if (!_ || 0 !== i.length) return hn(`jdb_update: path not found in topic '${t}': '${n}'`), null;
|
|
@@ -3257,9 +3259,9 @@ var gobjJs = function(e) {
|
|
|
3257
3259
|
} catch (e) {
|
|
3258
3260
|
return null;
|
|
3259
3261
|
}
|
|
3260
|
-
}, e.jwtDecode = Br, e.kw_clone_by_keys =
|
|
3262
|
+
}, e.jwtDecode = Br, e.kw_clone_by_keys = Rr, e.kw_clone_by_not_keys = Dr, e.kw_collect = function(e, t, n, r) {
|
|
3261
3263
|
if (e && !sr(e) && hn("GObj bad instanceof"), !t) return null;
|
|
3262
|
-
r || (r =
|
|
3264
|
+
r || (r = $r);
|
|
3263
3265
|
let l = [];
|
|
3264
3266
|
if (er(t)) for (let e = 0; e < t.length; e++) {
|
|
3265
3267
|
let o = t[e];
|
|
@@ -3302,9 +3304,9 @@ var gobjJs = function(e) {
|
|
|
3302
3304
|
}
|
|
3303
3305
|
}
|
|
3304
3306
|
return _ && hr(e, t, n), u;
|
|
3305
|
-
}, e.kw_get_str = Tr, e.kw_has_key = gr, e.kw_match_simple =
|
|
3307
|
+
}, e.kw_get_str = Tr, e.kw_has_key = gr, e.kw_match_simple = $r, e.kw_pop = fr, e.kw_remove_local_storage_value = Ir, e.kw_select = function(e, t, n, r) {
|
|
3306
3308
|
if (e && !sr(e) && hn("GObj bad instanceof"), !t) return null;
|
|
3307
|
-
r || (r =
|
|
3309
|
+
r || (r = $r);
|
|
3308
3310
|
let l = [];
|
|
3309
3311
|
if (er(t)) for (let e = 0; e < t.length; e++) {
|
|
3310
3312
|
let o = t[e];
|
|
@@ -3511,14 +3513,14 @@ var gobjJs = function(e) {
|
|
|
3511
3513
|
[null, null]
|
|
3512
3514
|
];
|
|
3513
3515
|
return (Pl = de(e, [
|
|
3514
|
-
["EV_ON_MESSAGE",
|
|
3515
|
-
["EV_IDENTITY_CARD_ACK",
|
|
3516
|
-
["EV_ON_ID_NAK",
|
|
3517
|
-
["EV_MT_STATS",
|
|
3518
|
-
["EV_MT_COMMAND",
|
|
3519
|
-
["EV_ON_OPEN",
|
|
3520
|
-
["EV_ON_CLOSE",
|
|
3521
|
-
["EV_ON_OPEN_ERROR",
|
|
3516
|
+
["EV_ON_MESSAGE", R.EVF_OUTPUT_EVENT],
|
|
3517
|
+
["EV_IDENTITY_CARD_ACK", R.EVF_PUBLIC_EVENT],
|
|
3518
|
+
["EV_ON_ID_NAK", R.EVF_PUBLIC_EVENT | R.EVF_OUTPUT_EVENT],
|
|
3519
|
+
["EV_MT_STATS", R.EVF_PUBLIC_EVENT],
|
|
3520
|
+
["EV_MT_COMMAND", R.EVF_PUBLIC_EVENT],
|
|
3521
|
+
["EV_ON_OPEN", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS],
|
|
3522
|
+
["EV_ON_CLOSE", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS],
|
|
3523
|
+
["EV_ON_OPEN_ERROR", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS],
|
|
3522
3524
|
["EV_TIMEOUT", 0],
|
|
3523
3525
|
[null, 0]
|
|
3524
3526
|
], t, eo, 0, Al, Ll, 0, 0, Il, w.gcflag_no_check_output_events)) ? 0 : -1;
|
|
@@ -3532,8 +3534,8 @@ var gobjJs = function(e) {
|
|
|
3532
3534
|
null
|
|
3533
3535
|
]]]];
|
|
3534
3536
|
return (ml = de(e, [
|
|
3535
|
-
["EV_TIMEOUT",
|
|
3536
|
-
["EV_TIMEOUT_PERIODIC",
|
|
3537
|
+
["EV_TIMEOUT", R.EVF_OUTPUT_EVENT],
|
|
3538
|
+
["EV_TIMEOUT_PERIODIC", R.EVF_OUTPUT_EVENT],
|
|
3537
3539
|
[0, 0]
|
|
3538
3540
|
], t, yl, 0, bl, pl, 0, 0, 0, w.gcflag_manual_start)) ? 0 : -1;
|
|
3539
3541
|
}("C_TIMER");
|
|
@@ -3542,10 +3544,10 @@ var gobjJs = function(e) {
|
|
|
3542
3544
|
if (Sl) return hn(`GClass ALREADY created: ${e}`), -1;
|
|
3543
3545
|
const t = [["ST_IDLE", [[
|
|
3544
3546
|
"EV_TIMEOUT_PERIODIC",
|
|
3545
|
-
|
|
3547
|
+
Rl,
|
|
3546
3548
|
null
|
|
3547
3549
|
]]]];
|
|
3548
|
-
return (Sl = de(e, [["EV_TIMEOUT_PERIODIC",
|
|
3550
|
+
return (Sl = de(e, [["EV_TIMEOUT_PERIODIC", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS], [0, 0]], t, Dl, 0, jl, Ol, 0, 0, 0, 0)) ? 0 : -1;
|
|
3549
3551
|
}("C_YUNO");
|
|
3550
3552
|
}, e.safeSrc = function(e) {
|
|
3551
3553
|
if (!e) return "";
|