@yuneta/gobj-js 7.26.11 → 7.26.13
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 +16 -6
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +76 -73
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +16 -6
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +165 -162
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +16 -6
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +90 -87
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +16 -6
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +90 -87
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.umd.min.js
CHANGED
|
@@ -193,11 +193,11 @@
|
|
|
193
193
|
gobj_flag_pure_child: 16,
|
|
194
194
|
gobj_flag_autostart: 32,
|
|
195
195
|
gobj_flag_autoplay: 64
|
|
196
|
-
}),
|
|
196
|
+
}), $ = Object.freeze({
|
|
197
197
|
obflag_destroying: 1,
|
|
198
198
|
obflag_destroyed: 2,
|
|
199
199
|
obflag_created: 4
|
|
200
|
-
}),
|
|
200
|
+
}), R = Object.freeze({
|
|
201
201
|
EVF_NO_WARN_SUBS: 1,
|
|
202
202
|
EVF_OUTPUT_EVENT: 2,
|
|
203
203
|
EVF_SYSTEM_EVENT: 4,
|
|
@@ -520,7 +520,7 @@
|
|
|
520
520
|
break;
|
|
521
521
|
case y.DTP_POINTER: l = r;
|
|
522
522
|
}
|
|
523
|
-
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 &
|
|
523
|
+
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;
|
|
524
524
|
}
|
|
525
525
|
function ce(e) {
|
|
526
526
|
return e.jn_attrs;
|
|
@@ -632,7 +632,7 @@
|
|
|
632
632
|
}
|
|
633
633
|
for (let n = 0; n < e.dl_events.length; n++) {
|
|
634
634
|
let r = e.dl_events[n];
|
|
635
|
-
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 &
|
|
635
|
+
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))) {
|
|
636
636
|
let n = !1;
|
|
637
637
|
for (let t = 0; t < e.dl_states.length; t++) {
|
|
638
638
|
let l = e.dl_states[t];
|
|
@@ -651,7 +651,7 @@
|
|
|
651
651
|
return n || (t && hn(`gclass not found: ${e}`), null);
|
|
652
652
|
}
|
|
653
653
|
function Se() {
|
|
654
|
-
return !m || m.obflag &
|
|
654
|
+
return !m || m.obflag & $.obflag_destroyed ? null : m;
|
|
655
655
|
}
|
|
656
656
|
function we(e, t) {
|
|
657
657
|
if (!tr(e)) return hn(`gobj_find_service(): service name must be a string: ${e}`), null;
|
|
@@ -662,10 +662,10 @@
|
|
|
662
662
|
let t = Xe(e);
|
|
663
663
|
return t = t.toLowerCase(), b[t] && hn(`service ALREADY REGISTERED: ${t}. Will be UPDATED`), b[t] = e, 0;
|
|
664
664
|
}
|
|
665
|
-
function
|
|
665
|
+
function $e(e, t) {
|
|
666
666
|
t.parent && hn(`_add_child() ALREADY HAS PARENT: ${t.gobj_name}`), e.dl_children.push(t), t.parent = e;
|
|
667
667
|
}
|
|
668
|
-
function
|
|
668
|
+
function Re(e, t) {
|
|
669
669
|
let n = tl(e.dl_children, t);
|
|
670
670
|
n >= 0 && (Hn(e.dl_children, n), t.parent = null);
|
|
671
671
|
}
|
|
@@ -716,14 +716,14 @@
|
|
|
716
716
|
_.jn_attrs = _e(_, s.attrs_table);
|
|
717
717
|
for (const [e, t] of Object.entries(_.jn_attrs)) e in _.priv && (_.priv[e] = t);
|
|
718
718
|
let a = Y(_);
|
|
719
|
-
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 ||
|
|
719
|
+
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(_))), _;
|
|
720
720
|
}
|
|
721
721
|
function Ce(e, t, n, r) {
|
|
722
722
|
return Ie(e, t, n, r, N.gobj_flag_pure_child);
|
|
723
723
|
}
|
|
724
724
|
function Le(e) {
|
|
725
725
|
if (ot(e)) return void hn("gobj NULL or DESTROYED");
|
|
726
|
-
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 |=
|
|
726
|
+
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) {
|
|
727
727
|
if (0 === Lt.length) return;
|
|
728
728
|
for (let t of Lt) t.src === e && (t.src = null);
|
|
729
729
|
Lt = Lt.filter((t) => t.dst !== e);
|
|
@@ -734,13 +734,13 @@
|
|
|
734
734
|
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) {
|
|
735
735
|
let t = Xe(e);
|
|
736
736
|
t = t.toLowerCase(), b[t] ? delete b[t] : hn(`"service NOT found in register": ${t}`);
|
|
737
|
-
}(e), e === m && (m = null), Ht(e, e.dl_subscriptions, !0), Ht(e, e.dl_subscribings, !0), r && (
|
|
737
|
+
}(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) {
|
|
738
738
|
let t = e.dl_children.slice();
|
|
739
739
|
for (let e = 0; e < t.length; e++) {
|
|
740
740
|
let n = t[e];
|
|
741
741
|
ot(n) || Le(n);
|
|
742
742
|
}
|
|
743
|
-
}(e), e.obflag &
|
|
743
|
+
}(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--;
|
|
744
744
|
}
|
|
745
745
|
function Pe(e) {
|
|
746
746
|
if (ot(e)) return hn("gobj NULL or DESTROYED"), -1;
|
|
@@ -797,7 +797,7 @@
|
|
|
797
797
|
return !ot(e) && e.playing;
|
|
798
798
|
}
|
|
799
799
|
function qe() {
|
|
800
|
-
return !p || p.obflag &
|
|
800
|
+
return !p || p.obflag & $.obflag_destroyed ? null : p;
|
|
801
801
|
}
|
|
802
802
|
function He() {
|
|
803
803
|
let e = qe();
|
|
@@ -836,7 +836,7 @@
|
|
|
836
836
|
return sr(e) ? !!(e.gobj_flag & N.gobj_flag_pure_child) : (hn("gobj NULL of bad type"), null);
|
|
837
837
|
}
|
|
838
838
|
function ot(e) {
|
|
839
|
-
return !sr(e) || !!(e.obflag & (
|
|
839
|
+
return !sr(e) || !!(e.obflag & ($.obflag_destroyed | $.obflag_destroying));
|
|
840
840
|
}
|
|
841
841
|
function st(e) {
|
|
842
842
|
return sr(e) ? e.bottom_gobj : (hn("gobj NULL of bad type"), null);
|
|
@@ -953,7 +953,7 @@
|
|
|
953
953
|
const o = l[n];
|
|
954
954
|
if (o.name && (-1 === t || o.flag & t)) {
|
|
955
955
|
let t;
|
|
956
|
-
!e.gclass.gmt.mt_reading || e.obflag &
|
|
956
|
+
!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);
|
|
957
957
|
}
|
|
958
958
|
}
|
|
959
959
|
return r;
|
|
@@ -966,28 +966,28 @@
|
|
|
966
966
|
if (0 === ur(t, "__service__")) return Be(e);
|
|
967
967
|
}
|
|
968
968
|
let n = fe(e, t, !1);
|
|
969
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag &
|
|
969
|
+
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);
|
|
970
970
|
}
|
|
971
971
|
function vt(e, t) {
|
|
972
972
|
t && ur(t, "__trace_level__");
|
|
973
973
|
let n = fe(e, t, !1);
|
|
974
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag &
|
|
974
|
+
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);
|
|
975
975
|
}
|
|
976
976
|
function jt(e, t) {
|
|
977
977
|
if (t && 0 === ur(t, "__state__")) return kt(e);
|
|
978
978
|
let n = fe(e, t, !1);
|
|
979
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag &
|
|
979
|
+
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);
|
|
980
980
|
}
|
|
981
981
|
function Ot(e, t) {
|
|
982
982
|
let n = fe(e, t, !1);
|
|
983
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag &
|
|
983
|
+
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);
|
|
984
984
|
}
|
|
985
985
|
function St(e, t, r, l) {
|
|
986
986
|
if (!tr(t)) return hn(n("gobj_write_attr(%s): path must be a string", et(e))), -1;
|
|
987
987
|
let o, s = e.jn_attrs, i = t.split("`");
|
|
988
988
|
if (i.length <= 1) {
|
|
989
989
|
let l = t;
|
|
990
|
-
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 &
|
|
990
|
+
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);
|
|
991
991
|
}
|
|
992
992
|
let _ = i.length;
|
|
993
993
|
for (let t = 0; t < _; t++) {
|
|
@@ -998,7 +998,7 @@
|
|
|
998
998
|
continue;
|
|
999
999
|
}
|
|
1000
1000
|
let l = e.jn_attrs;
|
|
1001
|
-
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 &
|
|
1001
|
+
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;
|
|
1002
1002
|
break;
|
|
1003
1003
|
}
|
|
1004
1004
|
return hn(n("gobj_write_attr(%s): attr not found '%s'", et(e), o)), -1;
|
|
@@ -1013,15 +1013,15 @@
|
|
|
1013
1013
|
}
|
|
1014
1014
|
function Nt(e, t, n) {
|
|
1015
1015
|
let r = fe(e, t, !1);
|
|
1016
|
-
return r ? (r[t] = _r(n), Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag &
|
|
1016
|
+
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);
|
|
1017
1017
|
}
|
|
1018
|
-
function
|
|
1018
|
+
function $t(e, t, n) {
|
|
1019
1019
|
let r = fe(e, t, !1);
|
|
1020
|
-
return r ? (r[t] = parseInt(n), Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag &
|
|
1020
|
+
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);
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1022
|
+
function Rt(e, t, n) {
|
|
1023
1023
|
let r = fe(e, t, !1);
|
|
1024
|
-
return r ? (r[t] = String(n), Zn(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag &
|
|
1024
|
+
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);
|
|
1025
1025
|
}
|
|
1026
1026
|
function Dt(e, t) {
|
|
1027
1027
|
if (ot(e)) return hn("gobj NULL or DESTROYED"), null;
|
|
@@ -1056,11 +1056,11 @@
|
|
|
1056
1056
|
}
|
|
1057
1057
|
function Ct(e, t, n) {
|
|
1058
1058
|
let r = At(e, t, !1);
|
|
1059
|
-
return !!r && !(n && !(r.event_flag & n)) && !!(r.event_flag &
|
|
1059
|
+
return !!r && !(n && !(r.event_flag & n)) && !!(r.event_flag & R.EVF_OUTPUT_EVENT);
|
|
1060
1060
|
}
|
|
1061
1061
|
var Lt = [], Pt = !1;
|
|
1062
1062
|
function Ut(e, t, r, l) {
|
|
1063
|
-
return e && e instanceof S ? e.obflag & (
|
|
1063
|
+
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({
|
|
1064
1064
|
dst: e,
|
|
1065
1065
|
event: t,
|
|
1066
1066
|
kw: r,
|
|
@@ -1074,7 +1074,7 @@
|
|
|
1074
1074
|
let t = 0;
|
|
1075
1075
|
for (let n = 0; n < e.length; n++) {
|
|
1076
1076
|
const r = e[n];
|
|
1077
|
-
if (!(r.dst.obflag & (
|
|
1077
|
+
if (!(r.dst.obflag & ($.obflag_destroyed | $.obflag_destroying))) {
|
|
1078
1078
|
try {
|
|
1079
1079
|
Vt(r.dst, r.event, r.kw, r.src);
|
|
1080
1080
|
} catch (t) {
|
|
@@ -1087,7 +1087,7 @@
|
|
|
1087
1087
|
}
|
|
1088
1088
|
function Vt(e, t, r, l) {
|
|
1089
1089
|
if (!(e && e instanceof S)) return hn("gobj dst NULL"), -1;
|
|
1090
|
-
if (e.obflag & (
|
|
1090
|
+
if (e.obflag & ($.obflag_destroyed | $.obflag_destroying)) return hn("gobj dst DESTROYED"), -1;
|
|
1091
1091
|
let o = e.current_state;
|
|
1092
1092
|
if (!o) return hn(`${et(e)}: current_state NULL`), -1;
|
|
1093
1093
|
let s = H(e, t) && !z(l, t);
|
|
@@ -1115,7 +1115,7 @@
|
|
|
1115
1115
|
}
|
|
1116
1116
|
throw n;
|
|
1117
1117
|
}
|
|
1118
|
-
return !s || 1 === C || e.obflag &
|
|
1118
|
+
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--, _;
|
|
1119
1119
|
}
|
|
1120
1120
|
var Gt = Object.freeze({
|
|
1121
1121
|
__rename_event_name__: 1,
|
|
@@ -1196,7 +1196,7 @@
|
|
|
1196
1196
|
if (!!(Er(e, t, "subs_flag", null, Zt.KW_REQUIRED) & Gt.__hard_subscription__) && !r) return -1;
|
|
1197
1197
|
let _ = B(s) || B(o);
|
|
1198
1198
|
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;
|
|
1199
|
-
_ && (L(n("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s'", i || "", et(o), et(s))), vn(t)), o.obflag &
|
|
1199
|
+
_ && (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);
|
|
1200
1200
|
let a = Bt(o.dl_subscriptions, t);
|
|
1201
1201
|
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;
|
|
1202
1202
|
}
|
|
@@ -1213,7 +1213,7 @@
|
|
|
1213
1213
|
if (Object.keys(r).forEach((n) => {
|
|
1214
1214
|
o.has(n) || hn(`${et(e)}: key ignored in subscription (key: ${n}, event: ${t})`);
|
|
1215
1215
|
}), ir(t)) t = "";
|
|
1216
|
-
else if (!(Ct(e, t,
|
|
1216
|
+
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;
|
|
1217
1217
|
let s = xt(r, t), i = Yt(e.dl_subscriptions, e, t, s.renamed_event, s.kw, l), _ = null;
|
|
1218
1218
|
for (let t = 0; t < i.length; t++) if (Er(e, i[t], "subs_flag", 0, Zt.KW_REQUIRED) & Gt.__hard_subscription__) {
|
|
1219
1219
|
_ = i[t];
|
|
@@ -1271,10 +1271,10 @@
|
|
|
1271
1271
|
return Yt(e.dl_subscribings, r, t, null, n, e);
|
|
1272
1272
|
}
|
|
1273
1273
|
function Xt(e, t, r) {
|
|
1274
|
-
if (Zn(r) || (r = {}), !e || e.obflag & (
|
|
1274
|
+
if (Zn(r) || (r = {}), !e || e.obflag & ($.obflag_destroyed | $.obflag_destroying)) return hn("gobj NULL or DESTROYED"), -1;
|
|
1275
1275
|
if (ir(t)) return hn(`${et(e)}: event EMPTY`), -1;
|
|
1276
1276
|
let l = At(e, t, !0);
|
|
1277
|
-
if (!(l && l.event_flag & (
|
|
1277
|
+
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;
|
|
1278
1278
|
let o = (B(e) || H(e, t)) && !z(e, t);
|
|
1279
1279
|
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) {
|
|
1280
1280
|
let n = e.gclass.gmt.mt_publish_event(e, t, r);
|
|
@@ -1296,10 +1296,10 @@
|
|
|
1296
1296
|
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;
|
|
1297
1297
|
ir(g) && (g = t);
|
|
1298
1298
|
let d = 1;
|
|
1299
|
-
if (e.gclass.gmt.mt_publication_filter ? d = e.gclass.gmt.mt_publication_filter(e, t, r, u) : Xn(f) > 0 && (d =
|
|
1299
|
+
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;
|
|
1300
1300
|
if (!d) continue;
|
|
1301
1301
|
let b = At(u, t, !0);
|
|
1302
|
-
if (b && b.event_flag &
|
|
1302
|
+
if (b && b.event_flag & R.EVF_SYSTEM_EVENT && !It(u, b.event_name, 0)) continue;
|
|
1303
1303
|
let p = r;
|
|
1304
1304
|
(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));
|
|
1305
1305
|
let m = Vt(u, g, p, e);
|
|
@@ -1310,7 +1310,7 @@
|
|
|
1310
1310
|
if (_ += m, i++, ot(e)) break;
|
|
1311
1311
|
}
|
|
1312
1312
|
}
|
|
1313
|
-
return i || l && l.event_flag &
|
|
1313
|
+
return i || l && l.event_flag & R.EVF_NO_WARN_SUBS || yn(`${et(e)}: Publish event WITHOUT subscribers, ev ${t}`), _;
|
|
1314
1314
|
}
|
|
1315
1315
|
var Zt = Object.freeze({
|
|
1316
1316
|
KW_REQUIRED: 1,
|
|
@@ -1497,10 +1497,10 @@
|
|
|
1497
1497
|
o = t;
|
|
1498
1498
|
}
|
|
1499
1499
|
}
|
|
1500
|
-
var
|
|
1500
|
+
var $n = 128, Rn = 4194304, Dn = "<not shown: too large to mask>";
|
|
1501
1501
|
function kn(e) {
|
|
1502
1502
|
if ("string" != typeof e || e.indexOf("=") < 0) return null;
|
|
1503
|
-
if (e.length >
|
|
1503
|
+
if (e.length > Rn) return Dn;
|
|
1504
1504
|
let t, n = !1, r = /(^|[ \t])attribute=["']?([^ \t"']*)/g;
|
|
1505
1505
|
for (; null !== (t = r.exec(e));) wn(t[2].slice(-128)) && (n = !0);
|
|
1506
1506
|
let l = [], o = 0, s = !1, i = "", _ = 0, a = 0;
|
|
@@ -1515,7 +1515,7 @@
|
|
|
1515
1515
|
a++;
|
|
1516
1516
|
continue;
|
|
1517
1517
|
}
|
|
1518
|
-
let r = e.substring(Math.max(_, a -
|
|
1518
|
+
let r = e.substring(Math.max(_, a - $n), a);
|
|
1519
1519
|
if (_ = a + 1, !(wn(r) || n && "value" === r.toLowerCase())) {
|
|
1520
1520
|
a++;
|
|
1521
1521
|
continue;
|
|
@@ -1584,7 +1584,7 @@
|
|
|
1584
1584
|
}
|
|
1585
1585
|
function Pn(e) {
|
|
1586
1586
|
try {
|
|
1587
|
-
return Ln(e, /* @__PURE__ */ new WeakMap(), 0, { left:
|
|
1587
|
+
return Ln(e, /* @__PURE__ */ new WeakMap(), 0, { left: Rn });
|
|
1588
1588
|
} catch (e) {
|
|
1589
1589
|
return In;
|
|
1590
1590
|
}
|
|
@@ -1865,6 +1865,7 @@
|
|
|
1865
1865
|
if (e && !sr(e) && hn("GObj bad instanceof"), !Zn(t)) return hn("kw is not an object"), -1;
|
|
1866
1866
|
if (!tr(n)) return hn(`${e ? et(e) + ": " : ""}kw_set_dict_value(): path must be a string: ${String(n)}`), -1;
|
|
1867
1867
|
if ("" === n) return hn((e ? et(e) + ": " : "") + "kw_set_dict_value(): path empty"), -1;
|
|
1868
|
+
if (n.split("`").includes("")) return hn(`${e ? et(e) + ": " : ""}kw_set_dict_value(): empty segment in path: '${n}'`), -1;
|
|
1868
1869
|
let l = n.split("`"), o = l.length;
|
|
1869
1870
|
for (let s = 0; s < o; s++) {
|
|
1870
1871
|
let i = l[s];
|
|
@@ -1934,10 +1935,10 @@
|
|
|
1934
1935
|
}
|
|
1935
1936
|
return o;
|
|
1936
1937
|
}
|
|
1937
|
-
function
|
|
1938
|
+
function $r(e, t) {
|
|
1938
1939
|
return 0 === Xn(t) || Nr(e, t, "");
|
|
1939
1940
|
}
|
|
1940
|
-
function
|
|
1941
|
+
function Rr(e, t, n, r) {
|
|
1941
1942
|
e && !sr(e) && hn("GObj bad instanceof");
|
|
1942
1943
|
let l = {};
|
|
1943
1944
|
if (tr(n) && !ir(n)) {
|
|
@@ -2007,7 +2008,7 @@
|
|
|
2007
2008
|
}
|
|
2008
2009
|
function Lr(e, t, n, r, l) {
|
|
2009
2010
|
if (e && !sr(e) && hn("GObj bad instanceof"), !t) return null;
|
|
2010
|
-
l || (l =
|
|
2011
|
+
l || (l = $r);
|
|
2011
2012
|
let o = [];
|
|
2012
2013
|
if (er(t)) for (let s = 0; s < t.length; s++) {
|
|
2013
2014
|
let i, _ = t[s];
|
|
@@ -2375,18 +2376,18 @@
|
|
|
2375
2376
|
return 0;
|
|
2376
2377
|
},
|
|
2377
2378
|
mt_stop: function(e) {
|
|
2378
|
-
return
|
|
2379
|
+
return $t(e, "msec", -1), 0;
|
|
2379
2380
|
},
|
|
2380
2381
|
mt_destroy: function(e) {}
|
|
2381
2382
|
};
|
|
2382
2383
|
function El(e, t) {
|
|
2383
|
-
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : (Nt(e, "periodic", !1), void
|
|
2384
|
+
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);
|
|
2384
2385
|
}
|
|
2385
2386
|
function Tl(e, t) {
|
|
2386
|
-
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : (Nt(e, "periodic", !0), void
|
|
2387
|
+
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);
|
|
2387
2388
|
}
|
|
2388
2389
|
function vl(e) {
|
|
2389
|
-
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : void
|
|
2390
|
+
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : void $t(e, "msec", -1) : (hn("not GObj TYPE"), -1);
|
|
2390
2391
|
}
|
|
2391
2392
|
var jl = [
|
|
2392
2393
|
j(y.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
@@ -2418,16 +2419,16 @@
|
|
|
2418
2419
|
let t = String(null == e ? "" : e).toLowerCase();
|
|
2419
2420
|
return "true" === t || "set" === t || "false" !== t && "reset" !== t && ("" === t || isNaN(Number(t)) ? null : !!Number(t));
|
|
2420
2421
|
}
|
|
2421
|
-
function
|
|
2422
|
+
function $l() {
|
|
2422
2423
|
return `${ze()}^${He()}`;
|
|
2423
2424
|
}
|
|
2424
|
-
function
|
|
2425
|
+
function Rl(e, t, n, r) {
|
|
2425
2426
|
return Xt(e, t, n), 0;
|
|
2426
2427
|
}
|
|
2427
2428
|
var Dl = {
|
|
2428
2429
|
mt_create: function(e) {
|
|
2429
2430
|
let t = e.priv;
|
|
2430
|
-
|
|
2431
|
+
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) {
|
|
2431
2432
|
let t = yt(e, "trace_levels");
|
|
2432
2433
|
if (!Zn(t)) return 0;
|
|
2433
2434
|
let n = t.__global_trace__;
|
|
@@ -2482,19 +2483,19 @@
|
|
|
2482
2483
|
case "set-global-trace":
|
|
2483
2484
|
case "set-global-no-trace": {
|
|
2484
2485
|
let r = "set-global-no-trace" === t, o = n.level, s = Nl(n.set);
|
|
2485
|
-
return o ? null === s ? l(0, -1, `${
|
|
2486
|
+
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);
|
|
2486
2487
|
}
|
|
2487
2488
|
case "get-gclass-trace":
|
|
2488
2489
|
case "get-gclass-no-trace":
|
|
2489
2490
|
case "set-gclass-trace":
|
|
2490
2491
|
case "set-gclass-no-trace": {
|
|
2491
2492
|
let r = t.indexOf("no-trace") >= 0, o = n.gclass_name || n.gclass || "", s = Oe(o);
|
|
2492
|
-
if (!s) return l(0, -1, `${
|
|
2493
|
+
if (!s) return l(0, -1, `${$l()}: what gclass is '${o}'?`, null, null);
|
|
2493
2494
|
if (0 === t.indexOf("get-")) return l(0, 0, null, null, r ? oe(s) : re(s));
|
|
2494
2495
|
let i = n.level, _ = Nl(n.set);
|
|
2495
|
-
return i ? null === _ ? l(0, -1, `${
|
|
2496
|
+
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);
|
|
2496
2497
|
}
|
|
2497
|
-
default: return l(0, -1, `${
|
|
2498
|
+
default: return l(0, -1, `${$l()}: command not available: ${t}`, null, null);
|
|
2498
2499
|
}
|
|
2499
2500
|
}
|
|
2500
2501
|
};
|
|
@@ -2692,7 +2693,7 @@
|
|
|
2692
2693
|
let l = e.priv;
|
|
2693
2694
|
vl(l.gobj_timer);
|
|
2694
2695
|
let o = Mr(e, n, kl, !0), s = Tr(e, o, "src_yuno", ""), i = Tr(e, o, "src_role", ""), _ = Tr(e, o, "src_service", "");
|
|
2695
|
-
|
|
2696
|
+
Rt(e, "remote_yuno_name", s), Rt(e, "remote_yuno_role", i), Rt(e, "remote_yuno_service", _);
|
|
2696
2697
|
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", {});
|
|
2697
2698
|
if (a < 0) {
|
|
2698
2699
|
Fl(e);
|
|
@@ -2750,7 +2751,7 @@
|
|
|
2750
2751
|
}
|
|
2751
2752
|
let s = o.event, i = o.kw;
|
|
2752
2753
|
if ("ST_SESSION" !== kt(e)) {
|
|
2753
|
-
if (It(e, s,
|
|
2754
|
+
if (It(e, s, R.EVF_PUBLIC_EVENT)) {
|
|
2754
2755
|
if (!(Vt(e, s, i, e) < 0)) return 0;
|
|
2755
2756
|
} else hn(`${et(e)}: event UNKNOWN in not-session state ${s}`);
|
|
2756
2757
|
return Fl(e), -1;
|
|
@@ -2761,10 +2762,10 @@
|
|
|
2761
2762
|
let c = Tr(e, a, "dst_service", "");
|
|
2762
2763
|
if ("__subscribing__" === _) return yn(`${et(e)}: subscription event ignored, I'm client (service: ${c}, event: ${s})`), -1;
|
|
2763
2764
|
if ("__unsubscribing__" === _) return yn(`${et(e)}: unsubscription event ignored, I'm client (service: ${c}, event: ${s})`), -1;
|
|
2764
|
-
if (It(e, s,
|
|
2765
|
+
if (It(e, s, R.EVF_PUBLIC_EVENT)) return Vt(e, s, i, e), 0;
|
|
2765
2766
|
if (!ir(c)) {
|
|
2766
2767
|
let t = we(c, !1);
|
|
2767
|
-
return t ? It(t, s,
|
|
2768
|
+
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);
|
|
2768
2769
|
}
|
|
2769
2770
|
return lt(e) ? Vt(nt(e), s, i, e) : Xt(e, s, i), 0;
|
|
2770
2771
|
}
|
|
@@ -2777,7 +2778,7 @@
|
|
|
2777
2778
|
var eo = {
|
|
2778
2779
|
mt_create: function(e) {
|
|
2779
2780
|
let t = e.priv;
|
|
2780
|
-
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"),
|
|
2781
|
+
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);
|
|
2781
2782
|
const n = Ot(e, "subscriber");
|
|
2782
2783
|
n && qt(e, null, {}, n);
|
|
2783
2784
|
},
|
|
@@ -2899,18 +2900,18 @@
|
|
|
2899
2900
|
}), n;
|
|
2900
2901
|
}, e.current_timestamp = el, e.data_type_t = y, e.db_list_persistent_attrs = function(e, t) {
|
|
2901
2902
|
let n = kr(al(e), null, !1), r = {};
|
|
2902
|
-
return n && Zn(n) && (r =
|
|
2903
|
+
return n && Zn(n) && (r = Rr(e, n, t, !1)), r;
|
|
2903
2904
|
}, e.db_load_persistent_attrs = function(e, t) {
|
|
2904
2905
|
let n = Et(e, E.SDF_PERSIST), r = kr(al(e), null, !1);
|
|
2905
2906
|
if (r && Zn(r)) {
|
|
2906
|
-
let l =
|
|
2907
|
-
l =
|
|
2907
|
+
let l = Rr(e, r, t, !1);
|
|
2908
|
+
l = Rr(e, l, n, !1), wt(e, l, E.SDF_PERSIST);
|
|
2908
2909
|
}
|
|
2909
2910
|
}, e.db_remove_persistent_attrs = function(e, t) {
|
|
2910
2911
|
let n = Dr(e, kr(al(e), null, !1), t, !1);
|
|
2911
2912
|
0 === zn(n) ? Ir(al(e)) : Ar(al(e), n);
|
|
2912
2913
|
}, e.db_save_persistent_attrs = function(e, t) {
|
|
2913
|
-
let n =
|
|
2914
|
+
let n = Rr(e, Et(e, E.SDF_PERSIST), t, !1), r = kr(al(e), null, !1);
|
|
2914
2915
|
return r && Zn(r) && Wn(n, r), Ar(al(e), n);
|
|
2915
2916
|
}, e.debounce = function(e, t = 0, n = !1) {
|
|
2916
2917
|
let r = null, l = null, o = null;
|
|
@@ -2935,7 +2936,7 @@
|
|
|
2935
2936
|
return t;
|
|
2936
2937
|
}, e.empty_json = function(e) {
|
|
2937
2938
|
return 0 === Xn(e);
|
|
2938
|
-
}, e.empty_string = ir, e.escapeHtml = Jr, e.event_flag_t =
|
|
2939
|
+
}, e.empty_string = ir, e.escapeHtml = Jr, e.event_flag_t = R, e.flat2json = function(e) {
|
|
2939
2940
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat2json: a flat json is an object of id -> value");
|
|
2940
2941
|
let t = null;
|
|
2941
2942
|
for (const n of Object.keys(e)) {
|
|
@@ -3018,7 +3019,7 @@
|
|
|
3018
3019
|
}, e.get_function_name = rl, e.get_now = function() {
|
|
3019
3020
|
return Math.floor(Date.now() / 1e3);
|
|
3020
3021
|
}, e.gobj_bottom_gobj = st, e.gobj_change_parent = function(e, t) {
|
|
3021
|
-
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 && (
|
|
3022
|
+
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);
|
|
3022
3023
|
}, e.gobj_change_state = Dt, e.gobj_command = function(e, t, r, o) {
|
|
3023
3024
|
if (ot(e)) return hn("gobj NULL or DESTROYED"), -1;
|
|
3024
3025
|
if (function(e) {
|
|
@@ -3130,7 +3131,7 @@
|
|
|
3130
3131
|
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)));
|
|
3131
3132
|
}, e.gobj_start_up = function(e, t, n, r, l, o, s) {
|
|
3132
3133
|
i = t, _ = n, a = r, u = l, c = o, f = s;
|
|
3133
|
-
const d = [["EV_STATE_CHANGED",
|
|
3134
|
+
const d = [["EV_STATE_CHANGED", R.EVF_SYSTEM_EVENT | R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS], [0, 0]];
|
|
3134
3135
|
for (let e = 0; e < d.length; e++) {
|
|
3135
3136
|
let t = d[e][0], n = d[e][1];
|
|
3136
3137
|
Ee(g, t, n);
|
|
@@ -3155,14 +3156,14 @@
|
|
|
3155
3156
|
if (Object.keys(n).forEach((n) => {
|
|
3156
3157
|
l.has(n) || hn(`${et(e)}: key ignored in subscription (key: ${n}, event: ${t})`);
|
|
3157
3158
|
}), ir(t)) t = "";
|
|
3158
|
-
else if (!(Ct(e, t,
|
|
3159
|
+
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;
|
|
3159
3160
|
let o = xt(n, t), s = Yt(e.dl_subscriptions, e, t, o.renamed_event, o.kw, r), i = 0, _ = 0, a = 0;
|
|
3160
3161
|
for (let t = 0; t < s.length; t++) {
|
|
3161
3162
|
let n = s[t], r = Jt(e, n, !1, !1);
|
|
3162
3163
|
0 === r ? i++ : r < 0 ? _++ : a++;
|
|
3163
3164
|
}
|
|
3164
3165
|
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;
|
|
3165
|
-
}, 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 =
|
|
3166
|
+
}, 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) {
|
|
3166
3167
|
return "string" != typeof e ? (hn("html_markup: not a string, type " + typeof e), new qr("")) : new qr(e);
|
|
3167
3168
|
}, 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) {
|
|
3168
3169
|
return e instanceof Date && !isNaN(e);
|
|
@@ -3184,8 +3185,9 @@
|
|
|
3184
3185
|
}, e.is_secret_name = wn, e.is_string = tr, e.jdb_delete = function(e, t, n, r) {
|
|
3185
3186
|
let l = Or(null, Or(null, e, "topics", null, 0), t, null, 0);
|
|
3186
3187
|
if (!l) return hn("jdb_delete: topic not found: " + t), null;
|
|
3187
|
-
if (ir(r.id)) return hn(
|
|
3188
|
+
if (!Zn(r) || ir(r.id)) return hn(`jdb_delete: record without id: ${JSON.stringify(r)}`), null;
|
|
3188
3189
|
if (!tr(n)) return hn(`jdb_delete: path must be a string: ${String(n)}`), null;
|
|
3190
|
+
if ("" !== n && n.split("`").includes("")) return hn(`jdb_delete: empty segment in path: '${n}'`), null;
|
|
3189
3191
|
let o, s = n.split("`"), i = l;
|
|
3190
3192
|
for (; (o = s.shift()) && !ir(o) && i;) Zn(i) && (i = Or(null, i, e.hook, null, 0)), i = Yr(i, null, o, !1);
|
|
3191
3193
|
if (!i || 0 !== s.length) return hn(`jdb_delete: path not found in topic '${t}': '${n}'`), null;
|
|
@@ -3212,8 +3214,9 @@
|
|
|
3212
3214
|
}, e.jdb_update = function(e, t, n, r) {
|
|
3213
3215
|
let l = Or(null, Or(null, e, "topics", null, 0), t, null, 0);
|
|
3214
3216
|
if (!l) return hn("jdb_update: topic not found: " + t), null;
|
|
3215
|
-
if (ir(r.id)) return hn(
|
|
3217
|
+
if (!Zn(r) || ir(r.id)) return hn(`jdb_update: record without id: ${JSON.stringify(r)}`), null;
|
|
3216
3218
|
if (!tr(n)) return hn(`jdb_update: path must be a string: ${String(n)}`), null;
|
|
3219
|
+
if ("" !== n && n.split("`").includes("")) return hn(`jdb_update: empty segment in path: '${n}'`), null;
|
|
3217
3220
|
let o, s, i = n.split("`"), _ = l;
|
|
3218
3221
|
for (; (o = i.shift()) && !ir(o) && _;) Zn(_) && (_ = Or(null, _, e.hook, null, 0)), _ = Yr(_, null, o, !1);
|
|
3219
3222
|
if (!_ || 0 !== i.length) return hn(`jdb_update: path not found in topic '${t}': '${n}'`), null;
|
|
@@ -3259,9 +3262,9 @@
|
|
|
3259
3262
|
} catch (e) {
|
|
3260
3263
|
return null;
|
|
3261
3264
|
}
|
|
3262
|
-
}, e.jwtDecode = Br, e.kw_clone_by_keys =
|
|
3265
|
+
}, e.jwtDecode = Br, e.kw_clone_by_keys = Rr, e.kw_clone_by_not_keys = Dr, e.kw_collect = function(e, t, n, r) {
|
|
3263
3266
|
if (e && !sr(e) && hn("GObj bad instanceof"), !t) return null;
|
|
3264
|
-
r || (r =
|
|
3267
|
+
r || (r = $r);
|
|
3265
3268
|
let l = [];
|
|
3266
3269
|
if (er(t)) for (let e = 0; e < t.length; e++) {
|
|
3267
3270
|
let o = t[e];
|
|
@@ -3304,9 +3307,9 @@
|
|
|
3304
3307
|
}
|
|
3305
3308
|
}
|
|
3306
3309
|
return _ && hr(e, t, n), u;
|
|
3307
|
-
}, e.kw_get_str = Tr, e.kw_has_key = gr, e.kw_match_simple =
|
|
3310
|
+
}, 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) {
|
|
3308
3311
|
if (e && !sr(e) && hn("GObj bad instanceof"), !t) return null;
|
|
3309
|
-
r || (r =
|
|
3312
|
+
r || (r = $r);
|
|
3310
3313
|
let l = [];
|
|
3311
3314
|
if (er(t)) for (let e = 0; e < t.length; e++) {
|
|
3312
3315
|
let o = t[e];
|
|
@@ -3513,14 +3516,14 @@
|
|
|
3513
3516
|
[null, null]
|
|
3514
3517
|
];
|
|
3515
3518
|
return (Pl = de(e, [
|
|
3516
|
-
["EV_ON_MESSAGE",
|
|
3517
|
-
["EV_IDENTITY_CARD_ACK",
|
|
3518
|
-
["EV_ON_ID_NAK",
|
|
3519
|
-
["EV_MT_STATS",
|
|
3520
|
-
["EV_MT_COMMAND",
|
|
3521
|
-
["EV_ON_OPEN",
|
|
3522
|
-
["EV_ON_CLOSE",
|
|
3523
|
-
["EV_ON_OPEN_ERROR",
|
|
3519
|
+
["EV_ON_MESSAGE", R.EVF_OUTPUT_EVENT],
|
|
3520
|
+
["EV_IDENTITY_CARD_ACK", R.EVF_PUBLIC_EVENT],
|
|
3521
|
+
["EV_ON_ID_NAK", R.EVF_PUBLIC_EVENT | R.EVF_OUTPUT_EVENT],
|
|
3522
|
+
["EV_MT_STATS", R.EVF_PUBLIC_EVENT],
|
|
3523
|
+
["EV_MT_COMMAND", R.EVF_PUBLIC_EVENT],
|
|
3524
|
+
["EV_ON_OPEN", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS],
|
|
3525
|
+
["EV_ON_CLOSE", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS],
|
|
3526
|
+
["EV_ON_OPEN_ERROR", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS],
|
|
3524
3527
|
["EV_TIMEOUT", 0],
|
|
3525
3528
|
[null, 0]
|
|
3526
3529
|
], t, eo, 0, Al, Ll, 0, 0, Il, w.gcflag_no_check_output_events)) ? 0 : -1;
|
|
@@ -3534,8 +3537,8 @@
|
|
|
3534
3537
|
null
|
|
3535
3538
|
]]]];
|
|
3536
3539
|
return (ml = de(e, [
|
|
3537
|
-
["EV_TIMEOUT",
|
|
3538
|
-
["EV_TIMEOUT_PERIODIC",
|
|
3540
|
+
["EV_TIMEOUT", R.EVF_OUTPUT_EVENT],
|
|
3541
|
+
["EV_TIMEOUT_PERIODIC", R.EVF_OUTPUT_EVENT],
|
|
3539
3542
|
[0, 0]
|
|
3540
3543
|
], t, yl, 0, bl, pl, 0, 0, 0, w.gcflag_manual_start)) ? 0 : -1;
|
|
3541
3544
|
}("C_TIMER");
|
|
@@ -3544,10 +3547,10 @@
|
|
|
3544
3547
|
if (Sl) return hn(`GClass ALREADY created: ${e}`), -1;
|
|
3545
3548
|
const t = [["ST_IDLE", [[
|
|
3546
3549
|
"EV_TIMEOUT_PERIODIC",
|
|
3547
|
-
|
|
3550
|
+
Rl,
|
|
3548
3551
|
null
|
|
3549
3552
|
]]]];
|
|
3550
|
-
return (Sl = de(e, [["EV_TIMEOUT_PERIODIC",
|
|
3553
|
+
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;
|
|
3551
3554
|
}("C_YUNO");
|
|
3552
3555
|
}, e.safeSrc = function(e) {
|
|
3553
3556
|
if (!e) return "";
|