@yuneta/gobj-js 7.25.6 → 7.25.8
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/README.md +23 -1
- package/dist/gobj-js.cjs.js +14 -7
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +18 -11
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +14 -7
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +155 -148
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +14 -7
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +18 -11
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +14 -7
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +18 -11
- 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 S = 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
|
-
}, O = () => new S(0, null), N = (e, t, n, r, l) => new S(e, t, n, r, l), R = (e, t, n, r, l, o) => new S(e, t, 0, null, o, n, null, 0, l, r, null),
|
|
176
|
+
}, O = () => new S(0, null), N = (e, t, n, r, l) => new S(e, t, n, r, l), R = (e, t, n, r, l, o) => new S(e, t, 0, null, o, n, null, 0, l, r, null), j = (e, t, n, r, l, o, i) => new S(e, t, n, null, i, r, null, 0, o, l, null), w = (e, t, n, r, l) => new S(e, t, n, r, l), D = (e, t, n, r, l, o) => new S(e, t, n, null, o, r, null, 0, null, l, null), $ = (e, t, n, r, l) => new S(e, t, n, null, l, null, null, 0, null, null, r), A = (e, t, n, r, l, o) => new S(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
|
}
|
|
@@ -231,7 +231,7 @@ function x() {
|
|
|
231
231
|
return W;
|
|
232
232
|
}
|
|
233
233
|
function Y(e) {
|
|
234
|
-
|
|
234
|
+
jr(e) && (e = JSON.stringify(e)), ir(" ".repeat(Math.max(1, 2 * T)) + String(e));
|
|
235
235
|
}
|
|
236
236
|
var B = Object.freeze({
|
|
237
237
|
TRACE_MACHINE: 65536,
|
|
@@ -461,7 +461,7 @@ function Oe(e, t, n, r, l, o, i) {
|
|
|
461
461
|
}
|
|
462
462
|
function Ne(e, t) {
|
|
463
463
|
let n = {};
|
|
464
|
-
if (!
|
|
464
|
+
if (!wr(t)) return rr("sdata_desc MUST be an array"), ar(t), n;
|
|
465
465
|
for (let r = 0; r < t.length; r++) {
|
|
466
466
|
const l = t[r];
|
|
467
467
|
l.name && Re(e, n, l);
|
|
@@ -490,7 +490,7 @@ function Re(e, t, n) {
|
|
|
490
490
|
rr(`JSON parse error: ${e.message}`);
|
|
491
491
|
}
|
|
492
492
|
else r = l;
|
|
493
|
-
|
|
493
|
+
wr(r) || (r = []);
|
|
494
494
|
break;
|
|
495
495
|
case y.DTP_DICT:
|
|
496
496
|
if (Dr(l)) try {
|
|
@@ -499,7 +499,7 @@ function Re(e, t, n) {
|
|
|
499
499
|
rr(`JSON parse error: ${e.message}`);
|
|
500
500
|
}
|
|
501
501
|
else r = l;
|
|
502
|
-
|
|
502
|
+
jr(r) || (r = {});
|
|
503
503
|
break;
|
|
504
504
|
case y.DTP_JSON:
|
|
505
505
|
if (Dr(l)) try {
|
|
@@ -513,7 +513,7 @@ function Re(e, t, n) {
|
|
|
513
513
|
}
|
|
514
514
|
return void 0 === r && (rr(`default_value WRONG, it: ${n.name}, value: ${n.default_value}`), r = null), t[n.name] = r, 0;
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function je(e, t, n, r) {
|
|
517
517
|
let l;
|
|
518
518
|
switch (n.type) {
|
|
519
519
|
case y.DTP_STRING:
|
|
@@ -540,7 +540,7 @@ function we(e, t, n, r) {
|
|
|
540
540
|
rr(`JSON parse error: ${e.message}`);
|
|
541
541
|
}
|
|
542
542
|
else l = r;
|
|
543
|
-
if (!
|
|
543
|
+
if (!wr(l)) return rr(`attr must be an array: ${n.name}`), -1;
|
|
544
544
|
break;
|
|
545
545
|
case y.DTP_DICT:
|
|
546
546
|
if (Dr(r)) try {
|
|
@@ -549,7 +549,7 @@ function we(e, t, n, r) {
|
|
|
549
549
|
rr(`JSON parse error: ${e.message}`);
|
|
550
550
|
}
|
|
551
551
|
else l = r;
|
|
552
|
-
if (!
|
|
552
|
+
if (!jr(l)) return rr(`attr must be an object: ${n.name}`), -1;
|
|
553
553
|
break;
|
|
554
554
|
case y.DTP_JSON:
|
|
555
555
|
if (Dr(r)) try {
|
|
@@ -558,17 +558,17 @@ function we(e, t, n, r) {
|
|
|
558
558
|
rr(`JSON parse error: ${e.message}`);
|
|
559
559
|
}
|
|
560
560
|
else l = r;
|
|
561
|
-
if (!
|
|
561
|
+
if (!wr(l) && !jr(l)) return rr(`attr must be a json dict/list: ${n.name}`), -1;
|
|
562
562
|
break;
|
|
563
563
|
case y.DTP_POINTER: l = r;
|
|
564
564
|
}
|
|
565
|
-
return void 0 === l && rr(`${Dt(e)}: attr undefined: ${n.name}`), t[n.name] = l,
|
|
565
|
+
return void 0 === l && rr(`${Dt(e)}: attr undefined: ${n.name}`), t[n.name] = l, jr(e.priv) && e.priv.hasOwnProperty(n.name) && (e.priv[n.name] = l), e.obflag & U.obflag_created && !(e.obflag & U.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, n.name), 0;
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function we(e) {
|
|
568
568
|
return e.jn_attrs;
|
|
569
569
|
}
|
|
570
570
|
function De(e, t, n) {
|
|
571
|
-
return Qt(e, t) ?
|
|
571
|
+
return Qt(e, t) ? we(e) : e && e.bottom_gobj ? De(e.bottom_gobj, t, n) : (n && rr(`GClass Attribute NOT FOUND: ${Dt(e)}, attr ${t}`), null);
|
|
572
572
|
}
|
|
573
573
|
function $e(e, t, n) {
|
|
574
574
|
if (!(e && e instanceof I)) return n && rr("gclass NULL"), null;
|
|
@@ -705,7 +705,7 @@ function xe(e, t) {
|
|
|
705
705
|
return m[e] || (t && rr(`gobj service not found: ${e}`), null);
|
|
706
706
|
}
|
|
707
707
|
function Ye(e) {
|
|
708
|
-
let t =
|
|
708
|
+
let t = jt(e);
|
|
709
709
|
return t = t.toLowerCase(), m[t] && rr(`service ALREADY REGISTERED: ${t}. Will be UPDATED`), m[t] = e, 0;
|
|
710
710
|
}
|
|
711
711
|
function Be(e, t) {
|
|
@@ -737,10 +737,10 @@ function Ze(e, t, n) {
|
|
|
737
737
|
let o = 0;
|
|
738
738
|
for (const [i, s] of Object.entries(t)) {
|
|
739
739
|
const t = $e(l.gclass, i, !1);
|
|
740
|
-
t ? (-1 === n || t.flag & n) && (t.flag & v.SDF_DEPRECATED && lr(`${Dt(l)}: Deprecated attribute used in gobj creation: ${i}`), o +=
|
|
740
|
+
t ? (-1 === n || t.flag & n) && (t.flag & v.SDF_DEPRECATED && lr(`${Dt(l)}: Deprecated attribute used in gobj creation: ${i}`), o += je(l, e, t, s)) : r && (r(l, i), o--);
|
|
741
741
|
}
|
|
742
742
|
return o;
|
|
743
|
-
})(
|
|
743
|
+
})(we(e), r, -1, e.gclass.gclass_flag & C.gcflag_ignore_unknown_attrs ? 0 : Xe, e) < 0 && (rr(`${Dt(e)} json2data() FAILED`), ar(r));
|
|
744
744
|
}
|
|
745
745
|
function et(e, n, r, l, o) {
|
|
746
746
|
if (o & L.gobj_flag_yuno) {
|
|
@@ -799,7 +799,7 @@ function st(e) {
|
|
|
799
799
|
n && Y(t("💔💔⏩ destroying: %s", $t(e)));
|
|
800
800
|
let r = At(e);
|
|
801
801
|
r && r.gclass.gmt.mt_child_removed && (n && Y(t("👦👦🔴 child_removed(%s): %s", $t(r), Dt(e))), r.gclass.gmt.mt_child_removed(r, e)), e.gobj_flag & L.gobj_flag_service && function(e) {
|
|
802
|
-
let t =
|
|
802
|
+
let t = jt(e);
|
|
803
803
|
t = t.toLowerCase(), m[t] ? delete m[t] : rr(`"service NOT found in register": ${t}`);
|
|
804
804
|
}(e), $n(e, e.dl_subscriptions, !0), $n(e, e.dl_subscribings, !0), r && (Je(r, e), It(e) && (Lt(r) !== e || Ct(r) || Ut(r, null))), function(e) {
|
|
805
805
|
let t = e.dl_children.slice();
|
|
@@ -877,7 +877,7 @@ function St() {
|
|
|
877
877
|
}
|
|
878
878
|
function Ot() {
|
|
879
879
|
let e = St();
|
|
880
|
-
return e ?
|
|
880
|
+
return e ? jt(e) : "";
|
|
881
881
|
}
|
|
882
882
|
function Nt() {
|
|
883
883
|
let e = St();
|
|
@@ -887,14 +887,14 @@ function Rt() {
|
|
|
887
887
|
let e = St();
|
|
888
888
|
return e ? tn(e, "yuno_id") : "";
|
|
889
889
|
}
|
|
890
|
-
function
|
|
890
|
+
function jt(e) {
|
|
891
891
|
return Ur(e) ? e.gobj_name : (rr("gobj bad type"), null);
|
|
892
892
|
}
|
|
893
|
-
function
|
|
893
|
+
function wt(e) {
|
|
894
894
|
return Ur(e) ? e.gclass.gclass_name : (rr("gobj NULL of bad type"), null);
|
|
895
895
|
}
|
|
896
896
|
function Dt(e) {
|
|
897
|
-
return Ur(e) ? e.gclass.gclass_name + "^" +
|
|
897
|
+
return Ur(e) ? e.gclass.gclass_name + "^" + jt(e) : (rr("gobj bad type"), null);
|
|
898
898
|
}
|
|
899
899
|
function $t(e) {
|
|
900
900
|
if (!Ur(e)) return rr("gobj NULL of bad type"), null;
|
|
@@ -978,11 +978,11 @@ function Yt(e, t) {
|
|
|
978
978
|
let n = t.__gclass_name__, r = t.__gobj_name__, l = t.__prefix_gobj_name__;
|
|
979
979
|
t.__disabled__;
|
|
980
980
|
let o = t.__state__;
|
|
981
|
-
if (n && n !==
|
|
982
|
-
if (r && r !==
|
|
981
|
+
if (n && n !== wt(e)) return !1;
|
|
982
|
+
if (r && r !== jt(e)) return !1;
|
|
983
983
|
if (l) {
|
|
984
984
|
let t = l.length;
|
|
985
|
-
if (l !==
|
|
985
|
+
if (l !== jt(e).substring(0, t)) return !1;
|
|
986
986
|
}
|
|
987
987
|
if (o && o !== cn(e)) return !1;
|
|
988
988
|
let i = e.jn_attrs;
|
|
@@ -1026,12 +1026,12 @@ function Ht(e, t) {
|
|
|
1026
1026
|
if (!function(e, t) {
|
|
1027
1027
|
let n = t.split("^"), r = null, l = null;
|
|
1028
1028
|
if (2 === n.length) {
|
|
1029
|
-
if (l = n[0], r = n[1], l !==
|
|
1029
|
+
if (l = n[0], r = n[1], l !== wt(e)) return !1;
|
|
1030
1030
|
} else {
|
|
1031
1031
|
if (1 !== n.length) return !1;
|
|
1032
1032
|
r = n[0];
|
|
1033
1033
|
}
|
|
1034
|
-
return r ===
|
|
1034
|
+
return r === jt(e);
|
|
1035
1035
|
}(e, n[0])) return null;
|
|
1036
1036
|
if (1 === n.length) return e;
|
|
1037
1037
|
let r = n[1].split("^"), l = {};
|
|
@@ -1090,7 +1090,7 @@ function rn(e, n, r, l) {
|
|
|
1090
1090
|
let o, i = e.jn_attrs, s = n.split("`");
|
|
1091
1091
|
if (s.length <= 1) {
|
|
1092
1092
|
let l = n;
|
|
1093
|
-
return l in i && i.hasOwnProperty(l) ? (i[l] = r,
|
|
1093
|
+
return l in i && i.hasOwnProperty(l) ? (i[l] = r, jr(e.priv) && e.priv.hasOwnProperty(l) && (e.priv[l] = r), e.obflag & U.obflag_created && !(e.obflag & U.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, l), 0) : (rr(t("gobj_write_attr(%s): attr not found '%s'", Dt(e), l)), -1);
|
|
1094
1094
|
}
|
|
1095
1095
|
let a = s.length;
|
|
1096
1096
|
for (let t = 0; t < a; t++) {
|
|
@@ -1101,7 +1101,7 @@ function rn(e, n, r, l) {
|
|
|
1101
1101
|
continue;
|
|
1102
1102
|
}
|
|
1103
1103
|
let l = e.jn_attrs;
|
|
1104
|
-
if (o in l && l.hasOwnProperty(o)) return l[o] = r,
|
|
1104
|
+
if (o in l && l.hasOwnProperty(o)) return l[o] = r, jr(e.priv) && e.priv.hasOwnProperty(o) && (e.priv[o] = r), e.obflag & U.obflag_created && !(e.obflag & U.obflag_destroyed) && e.mt_writing && e.mt_writing(e, o), 0;
|
|
1105
1105
|
break;
|
|
1106
1106
|
}
|
|
1107
1107
|
return rr(t("gobj_write_attr(%s): attr not found '%s'", Dt(e), o)), -1;
|
|
@@ -1114,31 +1114,31 @@ function ln(e) {
|
|
|
1114
1114
|
const o = r[l];
|
|
1115
1115
|
if (o.name && !(n && o.flag & n) && (-1 === t || o.flag & t)) {
|
|
1116
1116
|
const t = Re(e, e.jn_attrs, o);
|
|
1117
|
-
|
|
1117
|
+
jr(e.priv) && e.priv.hasOwnProperty(o.name) && (e.priv[o.name] = t), e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, o.name);
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
1120
|
return 0;
|
|
1121
1121
|
}(e, v.SDF_VOLATIL, 0);
|
|
1122
1122
|
}
|
|
1123
1123
|
function on(e, t, n, r) {
|
|
1124
|
-
let l =
|
|
1124
|
+
let l = we(e), o = 0;
|
|
1125
1125
|
for (const [r, i] of Object.entries(t)) {
|
|
1126
1126
|
let t = Pt(e, r, !0);
|
|
1127
|
-
t && (-1 === n || t.flag & n) && (o +=
|
|
1127
|
+
t && (-1 === n || t.flag & n) && (o += je(e, l, t, i));
|
|
1128
1128
|
}
|
|
1129
1129
|
return o;
|
|
1130
1130
|
}
|
|
1131
1131
|
function sn(e, t, n) {
|
|
1132
1132
|
let r = De(e, t, !1);
|
|
1133
|
-
return r ? (r[t] = Fr(n),
|
|
1133
|
+
return r ? (r[t] = Fr(n), jr(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag & U.obflag_created && !(e.obflag & U.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1134
1134
|
}
|
|
1135
1135
|
function an(e, t, n) {
|
|
1136
1136
|
let r = De(e, t, !1);
|
|
1137
|
-
return r ? (r[t] = parseInt(n),
|
|
1137
|
+
return r ? (r[t] = parseInt(n), jr(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag & U.obflag_created && !(e.obflag & U.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1138
1138
|
}
|
|
1139
1139
|
function un(e, t, n) {
|
|
1140
1140
|
let r = De(e, t, !1);
|
|
1141
|
-
return r ? (r[t] = String(n),
|
|
1141
|
+
return r ? (r[t] = String(n), jr(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag & U.obflag_created && !(e.obflag & U.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1142
1142
|
}
|
|
1143
1143
|
function _n(e, n) {
|
|
1144
1144
|
if (Ct(e)) return rr("gobj NULL or DESTROYED"), null;
|
|
@@ -1149,7 +1149,7 @@ function _n(e, n) {
|
|
|
1149
1149
|
let l = oe(e, "EV_STATE_CHANGED"), o = !!function(e) {
|
|
1150
1150
|
return Z(e) & B.TRACE_STATES;
|
|
1151
1151
|
}(e);
|
|
1152
|
-
return (l || o) && (1 === W || Y(t("🔀🔀 mach(%s%s^%s), new st(%s), prev st(%s)", e.running ? "" : "!!",
|
|
1152
|
+
return (l || o) && (1 === W || Y(t("🔀🔀 mach(%s%s^%s), new st(%s), prev st(%s)", e.running ? "" : "!!", wt(e), jt(e), cn(e), e.last_state.state_name))), !0;
|
|
1153
1153
|
}
|
|
1154
1154
|
function cn(e) {
|
|
1155
1155
|
return Ur(e) ? e.current_state.state_name : (rr("hgobj NULL"), "");
|
|
@@ -1185,7 +1185,7 @@ function En(e, n, r, l) {
|
|
|
1185
1185
|
event: n,
|
|
1186
1186
|
kw: r,
|
|
1187
1187
|
src: l
|
|
1188
|
-
}), oe(e, n) && !ie(l, n) && Y(t("📬 posted(%s%s), ev: %s, pending: %d", e.running ? "" : "!!", Dt(e), n, pn.length)), mn || (mn = !0, setTimeout(Tn, 0)), 0) : (rr(`gobj_post_event(): event NOT DEFINED in gclass ${
|
|
1188
|
+
}), oe(e, n) && !ie(l, n) && Y(t("📬 posted(%s%s), ev: %s, pending: %d", e.running ? "" : "!!", Dt(e), n, pn.length)), mn || (mn = !0, setTimeout(Tn, 0)), 0) : (rr(`gobj_post_event(): event NOT DEFINED in gclass ${wt(e)}, event ${n}`), -1) : (rr(`gobj_post_event(): gobj dst NULL, event ${n}`), -1);
|
|
1189
1189
|
}
|
|
1190
1190
|
function hn() {
|
|
1191
1191
|
return pn.length;
|
|
@@ -1206,12 +1206,12 @@ function yn(e, n, r, l) {
|
|
|
1206
1206
|
let i = oe(e, n) && !ie(l, n);
|
|
1207
1207
|
T++;
|
|
1208
1208
|
let s = Ce(o, n);
|
|
1209
|
-
if (!s) return e.gclass.gmt.mt_inject_event ? (T--, i && (Y(1 === W ? t("🔜 %s %s%s %s", n || "", e.running ? "" : "!!", Dt(e), o.state_name) : t("🔃 mach(%s%s), st: %s, ev: %s, from(%s%s)", e.running ? "" : "!!", Dt(e), o.state_name, n || "", l && !l.running ? "!!" : "", Dt(l))), r && le(e) && Sr(r) && ar(r)), e.gclass.gmt.mt_inject_event(e, n, r, l)) : (i && Y(t("📛 mach(%s%s^%s), st: %s, ev: %s, 📛📛ERROR Event NOT DEFINED in state📛📛, from(%s%s^%s)", e.running ? "" : "!!",
|
|
1209
|
+
if (!s) return e.gclass.gmt.mt_inject_event ? (T--, i && (Y(1 === W ? t("🔜 %s %s%s %s", n || "", e.running ? "" : "!!", Dt(e), o.state_name) : t("🔃 mach(%s%s), st: %s, ev: %s, from(%s%s)", e.running ? "" : "!!", Dt(e), o.state_name, n || "", l && !l.running ? "!!" : "", Dt(l))), r && le(e) && Sr(r) && ar(r)), e.gclass.gmt.mt_inject_event(e, n, r, l)) : (i && Y(t("📛 mach(%s%s^%s), st: %s, ev: %s, 📛📛ERROR Event NOT DEFINED in state📛📛, from(%s%s^%s)", e.running ? "" : "!!", wt(e), jt(e), o.state_name, n || "", l && !l.running ? "!!" : "", wt(l), jt(l))), rr(`📛📛 Event NOT DEFINED in state 📛📛: ${Dt(e)}, ${o.state_name}, ${n}`), T--, -1);
|
|
1210
1210
|
if (i) {
|
|
1211
1211
|
if (1 === W) Y(t("🔄 %s %s%s %s from %s%s", n || "", e.running ? "" : "!!", Dt(e), o.state_name, l && !l.running ? "!!" : "", Dt(l)));
|
|
1212
1212
|
else {
|
|
1213
1213
|
let r = "";
|
|
1214
|
-
s.action && (r = oo(s.action)), Y(t("🔄 mach(%s%s^%s), st: %s, ev: %s%s%s, ac: %s, from(%s%s^%s)", e.running ? "" : "!!",
|
|
1214
|
+
s.action && (r = oo(s.action)), Y(t("🔄 mach(%s%s^%s), st: %s, ev: %s%s%s, ac: %s, from(%s%s^%s)", e.running ? "" : "!!", wt(e), jt(e), o.state_name, "", n || "", "", r, l && !l.running ? "!!" : "", wt(l), jt(l)));
|
|
1215
1215
|
}
|
|
1216
1216
|
r && le(e) && Sr(r) && ar(r);
|
|
1217
1217
|
}
|
|
@@ -1220,7 +1220,7 @@ function yn(e, n, r, l) {
|
|
|
1220
1220
|
try {
|
|
1221
1221
|
s.action && (a = s.action(e, n, r, l));
|
|
1222
1222
|
} finally {}
|
|
1223
|
-
return !i || 1 === W || e.obflag & U.obflag_destroyed || Y(t("<- mach(%s%s^%s), st: %s, ev: %s, ret: %d", e.running ? "" : "!!",
|
|
1223
|
+
return !i || 1 === W || e.obflag & U.obflag_destroyed || Y(t("<- mach(%s%s^%s), st: %s, ev: %s, ret: %d", e.running ? "" : "!!", wt(e), jt(e), e.current_state.state_name, n || "", $r(a) ? a : 0)), T--, a;
|
|
1224
1224
|
}
|
|
1225
1225
|
var vn = Object.freeze({
|
|
1226
1226
|
__hard_subscription__: 1,
|
|
@@ -1270,14 +1270,14 @@ function Rn(e, t, n, r, l) {
|
|
|
1270
1270
|
for (let o = 0; o < e.length; o++) if (On(e[o], t, n, r, l)) return o;
|
|
1271
1271
|
return -1;
|
|
1272
1272
|
}
|
|
1273
|
-
function
|
|
1273
|
+
function jn(e, n, r, l) {
|
|
1274
1274
|
let o = el(e, n, "publisher", null, Pn.KW_REQUIRED), i = el(e, n, "subscriber", null, Pn.KW_REQUIRED), s = Zr(e, n, "event", "", Pn.KW_REQUIRED);
|
|
1275
1275
|
if (!!(zr(e, n, "subs_flag", null, Pn.KW_REQUIRED) & vn.__hard_subscription__) && !r) return -1;
|
|
1276
1276
|
(ne(i) || ne(o)) && (Y(t("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s'", s || "", Dt(o), Dt(i))), ar(n)), o.obflag & U.obflag_destroyed || l || o.gclass.gmt.mt_subscription_deleted && o.gclass.gmt.mt_subscription_deleted(o, n);
|
|
1277
1277
|
let a = Rn(o.dl_subscriptions, o, s, n, i);
|
|
1278
1278
|
return a >= 0 ? yr(o.dl_subscriptions, a) : (rr(`${Dt(e)}: subscription in publisher not found`), ar(n)), a = Rn(i.dl_subscribings, o, s, n, i), a >= 0 ? yr(i.dl_subscribings, a) : (rr(`${Dt(e)}: subscription in subscriber not found`), ar(n)), 0;
|
|
1279
1279
|
}
|
|
1280
|
-
function
|
|
1280
|
+
function wn(e, n, r, l) {
|
|
1281
1281
|
if (null == r && (r = {}), !e) return rr(`publisher NULL: ev ${n}`), 0;
|
|
1282
1282
|
if (!l) return rr(`subscriber NULL: ev ${n}`), 0;
|
|
1283
1283
|
const o = /* @__PURE__ */ new Set([
|
|
@@ -1317,7 +1317,7 @@ function jn(e, n, r, l) {
|
|
|
1317
1317
|
if (!s) return rr(`${Dt(e)}: _create_subscription() FAILED`), 0;
|
|
1318
1318
|
if (hr(e.dl_subscriptions, s), hr(l.dl_subscribings, s), (ne(l) || ne(e)) && (Y(t("💜💜👍 subscribing event '%s', publisher '%s', subscriber %s", n || "", Dt(e), Dt(l))), r && (le(l) || le(e)) && ar(r)), e.gclass.gmt.mt_subscription_added) {
|
|
1319
1319
|
let t = e.gclass.gmt.mt_subscription_added(e, s);
|
|
1320
|
-
(t < 0 || !1 === t) && (
|
|
1320
|
+
(t < 0 || !1 === t) && (jn(e, s, !0, !0), s = 0);
|
|
1321
1321
|
}
|
|
1322
1322
|
return s;
|
|
1323
1323
|
}
|
|
@@ -1338,13 +1338,13 @@ function Dn(e, t, n, r) {
|
|
|
1338
1338
|
let o = Nn(e.dl_subscriptions, e, t, n, r), i = 0;
|
|
1339
1339
|
for (let t = 0; t < o.length; t++) {
|
|
1340
1340
|
let n = o[t];
|
|
1341
|
-
|
|
1341
|
+
jn(e, n, !1, !1), i++;
|
|
1342
1342
|
}
|
|
1343
1343
|
return i || (lr(`${Dt(e)}: No subscription found`), ar(n, "No subscription found")), 0;
|
|
1344
1344
|
}
|
|
1345
1345
|
function $n(e, t, n) {
|
|
1346
1346
|
let r = [...t];
|
|
1347
|
-
for (let t = 0; t < r.length; t++)
|
|
1347
|
+
for (let t = 0; t < r.length; t++) jn(e, r[t], n, !1);
|
|
1348
1348
|
return 0;
|
|
1349
1349
|
}
|
|
1350
1350
|
function An(e, t, n, r) {
|
|
@@ -1372,12 +1372,12 @@ function kn(e, t, n, r) {
|
|
|
1372
1372
|
return Nn(e.dl_subscribings, r, t, n, e);
|
|
1373
1373
|
}
|
|
1374
1374
|
function Cn(e, n, r) {
|
|
1375
|
-
if (
|
|
1375
|
+
if (jr(r) || (r = {}), !e || e.obflag & (U.obflag_destroyed | U.obflag_destroying)) return rr("gobj NULL or DESTROYED"), -1;
|
|
1376
1376
|
if (Pr(n)) return rr(`${Dt(e)}: event EMPTY`), -1;
|
|
1377
1377
|
let l = gn(e, n, !0);
|
|
1378
1378
|
if (!(l && l.event_flag & (P.EVF_SYSTEM_EVENT | P.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return rr(`event NOT in output event list: ${Dt(e)}, ev ${n}`), -1;
|
|
1379
1379
|
let o = (ne(e) || oe(e, n)) && !ie(e, n);
|
|
1380
|
-
if (o && (Y(1 === W ? t("🔝🔝 %s %s%s %s", n || "", e.running ? "" : "!!", Dt(e), e.current_state.state_name) : t("🔝🔝 mach(%s%s^%s), st: %s, ev: %s%s%s", e.running ? "" : "!!",
|
|
1380
|
+
if (o && (Y(1 === W ? t("🔝🔝 %s %s%s %s", n || "", e.running ? "" : "!!", Dt(e), e.current_state.state_name) : t("🔝🔝 mach(%s%s^%s), st: %s, ev: %s%s%s", e.running ? "" : "!!", wt(e), jt(e), e.current_state.state_name, "", n || "", "")), le(e) && Sr(r) && ar(r)), e.gclass.gmt.mt_publish_event) {
|
|
1381
1381
|
let t = e.gclass.gmt.mt_publish_event(e, n, r);
|
|
1382
1382
|
if (t <= 0) return t;
|
|
1383
1383
|
}
|
|
@@ -1394,13 +1394,14 @@ function Cn(e, n, r) {
|
|
|
1394
1394
|
let c = zr(e, u, "subs_flag", 0, Pn.KW_REQUIRED), f = Zr(e, u, "event", "", Pn.KW_REQUIRED);
|
|
1395
1395
|
if (Pr(f) || 0 === Mr(f, n)) {
|
|
1396
1396
|
tl(e, u, "__config__", null, 0);
|
|
1397
|
-
let l = tl(e, u, "__global__", null, 0), i = tl(e, u, "__local__", null, 0), f = nl(e, u, "__filter__", null, 0), g =
|
|
1398
|
-
if (e.gclass.gmt.mt_publication_filter ?
|
|
1399
|
-
if (!
|
|
1400
|
-
let
|
|
1401
|
-
if (
|
|
1402
|
-
|
|
1403
|
-
|
|
1397
|
+
let l = tl(e, u, "__global__", null, 0), i = tl(e, u, "__local__", null, 0), f = nl(e, u, "__filter__", null, 0), g = 1;
|
|
1398
|
+
if (e.gclass.gmt.mt_publication_filter ? g = e.gclass.gmt.mt_publication_filter(e, n, r, _) : Nr(f) > 0 && (g = sl(r, f) ? 1 : 0, o && (Y(t("💜💜🔄%s publishing with filter, event '%s', subscriber'%s', publisher %s", g ? "👍" : "👎", n || "", Dt(_), Dt(e))), ar(f))), g < 0) break;
|
|
1399
|
+
if (!g) continue;
|
|
1400
|
+
let d = gn(_, n, !0);
|
|
1401
|
+
if (d && d.event_flag & P.EVF_SYSTEM_EVENT && !dn(_, d.event_name, 0)) continue;
|
|
1402
|
+
let b = r;
|
|
1403
|
+
(Nr(i) > 0 || Nr(l) > 0) && (b = Object.assign({}, r)), Nr(i) > 0 && Br(b, i), Nr(l) > 0 && fr(b, ur(l)), o && (Y(1 === W ? t("🔝🔄 %s (%s) %s%s", n || "", n || "", _.running ? "" : "!!", Dt(_)) : t("🔝🔄 mach(%s%s), st: %s, ev: %s, from(%s%s)", _.running ? "" : "!!", Dt(_), cn(_), n || "", e && !e.running ? "!!" : "", Dt(e))), le(e) && Sr(b) && ar(b));
|
|
1404
|
+
let p = yn(_, n, b, e);
|
|
1404
1405
|
if (p < 0 && c & vn.__own_event__) {
|
|
1405
1406
|
s = -1;
|
|
1406
1407
|
break;
|
|
@@ -1616,21 +1617,21 @@ function vr(e, t) {
|
|
|
1616
1617
|
return t ? (Array.prototype.push.apply(e, t), e) : e;
|
|
1617
1618
|
}
|
|
1618
1619
|
function Sr(e) {
|
|
1619
|
-
return
|
|
1620
|
+
return jr(e) ? Object.keys(e).length : 0;
|
|
1620
1621
|
}
|
|
1621
1622
|
function Or(e) {
|
|
1622
|
-
return
|
|
1623
|
+
return wr(e) ? e.length : 0;
|
|
1623
1624
|
}
|
|
1624
1625
|
function Nr(e) {
|
|
1625
|
-
return
|
|
1626
|
+
return jr(e) ? Object.keys(e).length : wr(e) ? e.length : Dr(e) && e.length > 0 ? 1 : 0;
|
|
1626
1627
|
}
|
|
1627
1628
|
function Rr(e) {
|
|
1628
1629
|
return 0 === Nr(e);
|
|
1629
1630
|
}
|
|
1630
|
-
function
|
|
1631
|
+
function jr(e) {
|
|
1631
1632
|
return null !== e && "object" == typeof e && !Array.isArray(e);
|
|
1632
1633
|
}
|
|
1633
|
-
function
|
|
1634
|
+
function wr(e) {
|
|
1634
1635
|
return Array.isArray(e);
|
|
1635
1636
|
}
|
|
1636
1637
|
function Dr(e) {
|
|
@@ -1678,7 +1679,7 @@ function Mr(e, t) {
|
|
|
1678
1679
|
return n === r ? 0 : n > r ? 1 : -1;
|
|
1679
1680
|
}
|
|
1680
1681
|
function Wr(e, t) {
|
|
1681
|
-
if (
|
|
1682
|
+
if (jr(e) || jr(t) || wr(e) || wr(t)) return 0;
|
|
1682
1683
|
if ($r(e) || $r(t)) {
|
|
1683
1684
|
let n = Number(e), r = Number(t);
|
|
1684
1685
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
@@ -1716,12 +1717,12 @@ function Jr(e, t) {
|
|
|
1716
1717
|
function qr(e, t, n, r) {
|
|
1717
1718
|
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1718
1719
|
const l = e ? `${Dt(e)}: ` : "";
|
|
1719
|
-
if (!
|
|
1720
|
+
if (!jr(t) && !wr(t)) return void rr(`${l}kw must be list or dict: '${String(n)}'`);
|
|
1720
1721
|
if (!Dr(n)) return void rr(`${l}path must be a string: ${String(n)}`);
|
|
1721
1722
|
let o = n.split("`"), i = o.length;
|
|
1722
1723
|
for (let e = 0; e < i - 1; e++) {
|
|
1723
1724
|
if (null == (t = t[o[e]])) return void (r && rr(`${l}path not found: '${n}'`));
|
|
1724
|
-
if (!
|
|
1725
|
+
if (!jr(t) && !wr(t)) return void rr(`${l}kw must be list or dict: '${n}'`);
|
|
1725
1726
|
}
|
|
1726
1727
|
let s = t[o[i - 1]];
|
|
1727
1728
|
return void 0 === s && r && rr(`${l}path not found: '${n}'`), s;
|
|
@@ -1815,10 +1816,10 @@ function Zr(e, t, n, r, l) {
|
|
|
1815
1816
|
return void 0 === o ? s && t ? (ll(e, t, n, Dr(r) ? r : null), r) : (i && !function(e, t) {
|
|
1816
1817
|
let n = Dr(t) ? t.split("`") : [], r = e;
|
|
1817
1818
|
for (let e = 0; e < n.length - 1; e++) {
|
|
1818
|
-
if (!
|
|
1819
|
+
if (!jr(r) && !wr(r)) return !1;
|
|
1819
1820
|
r = r[n[e]];
|
|
1820
1821
|
}
|
|
1821
|
-
return !(!
|
|
1822
|
+
return !(!jr(r) && !wr(r) || 0 === n.length) && Object.prototype.hasOwnProperty.call(r, n[n.length - 1]);
|
|
1822
1823
|
}(t, n) && (rr(`path not found: '${n}'`), ar(t)), r) : Dr(o) ? (a && Hr(e, t, n), o) : (null !== o && (rr(`${e ? Dt(e) + ": " : ""}path MUST BE a json str: '${n}'`), ar(t)), r);
|
|
1823
1824
|
}
|
|
1824
1825
|
function el(e, t, n, r, l) {
|
|
@@ -1838,7 +1839,7 @@ function tl(e, t, n, r, l) {
|
|
|
1838
1839
|
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1839
1840
|
let o = qr(e, t, n, !1);
|
|
1840
1841
|
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT;
|
|
1841
|
-
return void 0 === o ? s &&
|
|
1842
|
+
return void 0 === o ? s && jr(r) && t ? (ll(e, t, n, r), r) : (i && (rr(`path not found: '${n}'`), ar(t)), r) : jr(o) ? (a && Hr(e, t, n), o) : (i && (rr(`${e ? Dt(e) + ": " : ""}path MUST BE a json dict: '${n}'`), ar(t)), r);
|
|
1842
1843
|
}
|
|
1843
1844
|
function nl(e, t, n, r, l) {
|
|
1844
1845
|
e && !Ur(e) && rr("GObj bad instanceof");
|
|
@@ -1857,38 +1858,44 @@ function rl(e, t, n, r, l) {
|
|
|
1857
1858
|
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1858
1859
|
let o = qr(e, t, n, !1);
|
|
1859
1860
|
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT;
|
|
1860
|
-
return void 0 === o ? s &&
|
|
1861
|
+
return void 0 === o ? s && wr(r) && t ? (ll(e, t, n, r), r) : (i && (rr(`path not found: '${n}'`), ar(t)), r) : wr(o) ? (a && Hr(e, t, n), o) : (i && (rr(`${e ? Dt(e) + ": " : ""}path MUST BE a json list: '${n}'`), ar(t)), r);
|
|
1861
1862
|
}
|
|
1862
1863
|
function ll(e, t, n, r) {
|
|
1863
|
-
if (e && !Ur(e) && rr("GObj bad instanceof"), !
|
|
1864
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), !jr(t)) return rr("kw is not an object"), -1;
|
|
1864
1865
|
let l = n.split("`");
|
|
1865
1866
|
if (l.length <= 1) return t[n] = r, 0;
|
|
1866
1867
|
let o = l.length;
|
|
1867
|
-
for (let
|
|
1868
|
-
let
|
|
1869
|
-
|
|
1868
|
+
for (let i = 0; i < o; i++) {
|
|
1869
|
+
let s = l[i];
|
|
1870
|
+
if (i === o - 1) t[s] = r;
|
|
1871
|
+
else {
|
|
1872
|
+
let r = t[s];
|
|
1873
|
+
if (void 0 === r) t[s] = {};
|
|
1874
|
+
else if (!jr(r) && !wr(r)) return rr(`${e ? Dt(e) + ": " : ""}kw_set_dict_value(): segment '${s}' is not a dict or a list: '${n}'`), -1;
|
|
1875
|
+
t = t[s];
|
|
1876
|
+
}
|
|
1870
1877
|
}
|
|
1871
1878
|
return 0;
|
|
1872
1879
|
}
|
|
1873
1880
|
function ol(e, t, n, r, l) {
|
|
1874
|
-
if (e && !Ur(e) && rr("GObj bad instanceof"), !
|
|
1881
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), !jr(t)) return rr("kw is not an object"), -1;
|
|
1875
1882
|
let o = tl(e, t, n, {}, Pn.KW_CREATE);
|
|
1876
|
-
return
|
|
1883
|
+
return jr(o) ? (o[r] = l, 0) : (rr("subdict is not an object"), -1);
|
|
1877
1884
|
}
|
|
1878
1885
|
function il(e, n, r) {
|
|
1879
1886
|
let l = "", o = !1;
|
|
1880
|
-
if (
|
|
1887
|
+
if (wr(n)) {
|
|
1881
1888
|
o = !1;
|
|
1882
1889
|
for (let i = 0; i < n.length; i++) {
|
|
1883
1890
|
let s = n[i];
|
|
1884
1891
|
if (l = Pr(r) ? t("%s", r) : t("%s`%d", r, i), o = il(e, s, l), o) break;
|
|
1885
1892
|
}
|
|
1886
|
-
} else if (
|
|
1893
|
+
} else if (jr(n)) {
|
|
1887
1894
|
o = !0;
|
|
1888
1895
|
let i = Object.keys(n);
|
|
1889
1896
|
for (let s = 0; s < i.length; s++) {
|
|
1890
1897
|
let a = i[s], u = n[a];
|
|
1891
|
-
if (l = Pr(r) ? t("%s", a) : t("%s`%s", r, a),
|
|
1898
|
+
if (l = Pr(r) ? t("%s", a) : t("%s`%s", r, a), wr(u) || jr(u)) {
|
|
1892
1899
|
if (o = il(e, u, l), !o) break;
|
|
1893
1900
|
continue;
|
|
1894
1901
|
}
|
|
@@ -1909,7 +1916,7 @@ function sl(e, t) {
|
|
|
1909
1916
|
return 0 === Nr(t) || il(e, t, "");
|
|
1910
1917
|
}
|
|
1911
1918
|
function al(e, t, n, r) {
|
|
1912
|
-
if (!n || !
|
|
1919
|
+
if (!n || !wr(t)) return r && rr("item NULL or kw_list is not a list"), -1;
|
|
1913
1920
|
for (let e = 0; e < t.length; e++) if (cr(n, t[e])) return e;
|
|
1914
1921
|
return r && rr("item not found in this list"), -1;
|
|
1915
1922
|
}
|
|
@@ -1917,12 +1924,12 @@ function ul(e, t, n, r) {
|
|
|
1917
1924
|
if (e && !Ur(e) && rr("GObj bad instanceof"), !t) return null;
|
|
1918
1925
|
r || (r = sl);
|
|
1919
1926
|
let l = [];
|
|
1920
|
-
if (
|
|
1927
|
+
if (wr(t)) for (let e = 0; e < t.length; e++) {
|
|
1921
1928
|
let o = t[e];
|
|
1922
1929
|
r(o, n) && l.push(ur(o));
|
|
1923
1930
|
}
|
|
1924
1931
|
else {
|
|
1925
|
-
if (!
|
|
1932
|
+
if (!jr(t)) return rr("kw_select() BAD kw parameter"), null;
|
|
1926
1933
|
r(t, n) && l.push(ur(t));
|
|
1927
1934
|
}
|
|
1928
1935
|
return l;
|
|
@@ -1931,12 +1938,12 @@ function _l(e, t, n, r) {
|
|
|
1931
1938
|
if (e && !Ur(e) && rr("GObj bad instanceof"), !t) return null;
|
|
1932
1939
|
r || (r = sl);
|
|
1933
1940
|
let l = [];
|
|
1934
|
-
if (
|
|
1941
|
+
if (wr(t)) for (let e = 0; e < t.length; e++) {
|
|
1935
1942
|
let o = t[e];
|
|
1936
1943
|
r(o, n) && l.push(o);
|
|
1937
1944
|
}
|
|
1938
1945
|
else {
|
|
1939
|
-
if (!
|
|
1946
|
+
if (!jr(t)) return rr("kw_select() BAD kw parameter"), null;
|
|
1940
1947
|
r(t, n) && l.push(t);
|
|
1941
1948
|
}
|
|
1942
1949
|
return l;
|
|
@@ -1947,9 +1954,9 @@ function cl(e, t, n, r) {
|
|
|
1947
1954
|
if (Dr(n) && !Pr(n)) {
|
|
1948
1955
|
let o = n;
|
|
1949
1956
|
t.hasOwnProperty(o) ? l[o] = t[o] : r && rr(`${Dt(e)}: key not found: ${o}`);
|
|
1950
|
-
} else if (
|
|
1957
|
+
} else if (jr(n) && Sr(n) > 0) for (let o of Object.keys(n)) t.hasOwnProperty(o) ? l[o] = t[o] : r && rr(`${Dt(e)}: key not found: ${o}`);
|
|
1951
1958
|
else {
|
|
1952
|
-
if (!(
|
|
1959
|
+
if (!(wr(n) && Or(n) > 0)) return t;
|
|
1953
1960
|
for (let o = 0; o < n.length; o++) {
|
|
1954
1961
|
let i = n[o];
|
|
1955
1962
|
t.hasOwnProperty(i) ? l[i] = t[i] : r && rr(`${Dt(e)}: key not found: ${i}`);
|
|
@@ -1962,9 +1969,9 @@ function fl(e, t, n, r) {
|
|
|
1962
1969
|
if (fr(l, t), Dr(n) && !Pr(n)) {
|
|
1963
1970
|
let o = n;
|
|
1964
1971
|
nl(e, t, o, 0, 0) ? pr(l, o) : r && rr(`${Dt(e)}: key not found: ${o}`);
|
|
1965
|
-
} else if (
|
|
1972
|
+
} else if (jr(n) && Sr(n) > 0) for (let o of Object.keys(n)) t.hasOwnProperty(o) ? pr(l, o) : r && rr(`${Dt(e)}: key not found: ${o}`);
|
|
1966
1973
|
else {
|
|
1967
|
-
if (!(
|
|
1974
|
+
if (!(wr(n) && Or(n) > 0)) return {};
|
|
1968
1975
|
for (let o = 0; o < n.length; o++) {
|
|
1969
1976
|
let i = n[o];
|
|
1970
1977
|
t.hasOwnProperty(i) ? pr(l, i) : r && rr(`${Dt(e)}: key not found: ${i}`);
|
|
@@ -1999,10 +2006,10 @@ function bl(e) {
|
|
|
1999
2006
|
}
|
|
2000
2007
|
function pl(e, t) {
|
|
2001
2008
|
if (Ir(e) || Ir(t)) return !0;
|
|
2002
|
-
if (
|
|
2009
|
+
if (wr(e)) {
|
|
2003
2010
|
if (0 === e.length) return !0;
|
|
2004
2011
|
for (let n = 0; n < e.length; n++) if (e[n] === t) return !0;
|
|
2005
|
-
} else if (
|
|
2012
|
+
} else if (jr(e)) {
|
|
2006
2013
|
if (0 === Object.keys(e).length) return !0;
|
|
2007
2014
|
for (let n in e) if (n === t) return !0;
|
|
2008
2015
|
} else if (Dr(e) && e === t) return !0;
|
|
@@ -2012,9 +2019,9 @@ function ml(e, t, n, r, l) {
|
|
|
2012
2019
|
if (e && !Ur(e) && rr("GObj bad instanceof"), !t) return null;
|
|
2013
2020
|
l || (l = sl);
|
|
2014
2021
|
let o = [];
|
|
2015
|
-
if (
|
|
2022
|
+
if (wr(t)) for (let i = 0; i < t.length; i++) {
|
|
2016
2023
|
let s, a = t[i];
|
|
2017
|
-
if (
|
|
2024
|
+
if (jr(a)) s = Zr(e, a, "id", "", 0);
|
|
2018
2025
|
else {
|
|
2019
2026
|
if (!Dr(a)) continue;
|
|
2020
2027
|
s = a;
|
|
@@ -2022,7 +2029,7 @@ function ml(e, t, n, r, l) {
|
|
|
2022
2029
|
pl(n, s) && l(a, r) && o.push(a);
|
|
2023
2030
|
}
|
|
2024
2031
|
else {
|
|
2025
|
-
if (!
|
|
2032
|
+
if (!jr(t)) return rr("kw_collect() BAD kw parameter"), null;
|
|
2026
2033
|
for (let e of Object.keys(t)) {
|
|
2027
2034
|
let i = t[e];
|
|
2028
2035
|
pl(n, e) && l(i, r) && o.push(i);
|
|
@@ -2033,8 +2040,8 @@ function ml(e, t, n, r, l) {
|
|
|
2033
2040
|
function El(e, t, n) {
|
|
2034
2041
|
e && !Ur(e) && rr("GObj bad instanceof");
|
|
2035
2042
|
let r = {};
|
|
2036
|
-
if (Pr(n) || (t = qr(e, t, n)),
|
|
2037
|
-
else if (
|
|
2043
|
+
if (Pr(n) || (t = qr(e, t, n)), jr(t)) r = t;
|
|
2044
|
+
else if (wr(t)) for (let n = 0; n < t.length; n++) {
|
|
2038
2045
|
let l = t[n], o = Zr(e, l, "id", "", Pn.KW_REQUIRED);
|
|
2039
2046
|
Pr(o) || (r[o] = l);
|
|
2040
2047
|
}
|
|
@@ -2042,12 +2049,12 @@ function El(e, t, n) {
|
|
|
2042
2049
|
return r;
|
|
2043
2050
|
}
|
|
2044
2051
|
function hl(e, t, n) {
|
|
2045
|
-
if (e && !Ur(e) && rr("GObj bad instanceof"), Pr(n) || (t = qr(e, t, n)),
|
|
2046
|
-
if (
|
|
2052
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), Pr(n) || (t = qr(e, t, n)), wr(t)) return t;
|
|
2053
|
+
if (jr(t)) {
|
|
2047
2054
|
let n = [];
|
|
2048
2055
|
for (let r of Object.keys(t)) {
|
|
2049
2056
|
let l = t[r];
|
|
2050
|
-
|
|
2057
|
+
jr(l) ? (l.id = r, n.push(l)) : rr(`${Dt(e)} kwid_new_list: not a record: '${r}'`);
|
|
2051
2058
|
}
|
|
2052
2059
|
return n;
|
|
2053
2060
|
}
|
|
@@ -2062,10 +2069,10 @@ function yl(e, t) {
|
|
|
2062
2069
|
if (e && !Ur(e) && rr("GObj bad instanceof"), !t) return [];
|
|
2063
2070
|
let n = [];
|
|
2064
2071
|
if (Dr(t)) n.push(t);
|
|
2065
|
-
else if (
|
|
2066
|
-
else
|
|
2072
|
+
else if (jr(t)) for (let e in t) t.hasOwnProperty(e) && n.push(e);
|
|
2073
|
+
else wr(t) && t.forEach(function(t) {
|
|
2067
2074
|
if (Dr(t)) Pr(t) || n.push(t);
|
|
2068
|
-
else if (
|
|
2075
|
+
else if (jr(t)) {
|
|
2069
2076
|
let r = Zr(e, t, "id", 0, 0);
|
|
2070
2077
|
r && n.push(r);
|
|
2071
2078
|
}
|
|
@@ -2075,13 +2082,13 @@ function yl(e, t) {
|
|
|
2075
2082
|
function vl(e, t, n) {
|
|
2076
2083
|
t = t || "id", n = n || "value";
|
|
2077
2084
|
let r = [];
|
|
2078
|
-
if (
|
|
2085
|
+
if (wr(e)) for (let l = 0; l < e.length; l++) {
|
|
2079
2086
|
let o = e[l];
|
|
2080
2087
|
if (Dr(o)) r.push({
|
|
2081
2088
|
id: e[l],
|
|
2082
2089
|
value: e[l]
|
|
2083
2090
|
});
|
|
2084
|
-
else if (
|
|
2091
|
+
else if (jr(o)) {
|
|
2085
2092
|
let e = {};
|
|
2086
2093
|
if (Jr(o, t)) {
|
|
2087
2094
|
if (!Jr(o, n)) {
|
|
@@ -2102,7 +2109,7 @@ function vl(e, t, n) {
|
|
|
2102
2109
|
r.push(e);
|
|
2103
2110
|
} else rr("list2options(): case1 not implemented");
|
|
2104
2111
|
}
|
|
2105
|
-
else if (
|
|
2112
|
+
else if (jr(e)) for (let t of Object.keys(e)) r.push({
|
|
2106
2113
|
id: t,
|
|
2107
2114
|
value: t
|
|
2108
2115
|
});
|
|
@@ -2136,7 +2143,7 @@ function Rl(e, t) {
|
|
|
2136
2143
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return e.splice(n, 1), !0;
|
|
2137
2144
|
return !1;
|
|
2138
2145
|
}
|
|
2139
|
-
function
|
|
2146
|
+
function jl(e, t) {
|
|
2140
2147
|
try {
|
|
2141
2148
|
let n = e.__md_iev__;
|
|
2142
2149
|
if (n) return n[t];
|
|
@@ -2144,25 +2151,25 @@ function wl(e, t) {
|
|
|
2144
2151
|
return;
|
|
2145
2152
|
}
|
|
2146
2153
|
}
|
|
2147
|
-
function
|
|
2154
|
+
function wl(e, t, n) {
|
|
2148
2155
|
let r = e.__md_iev__;
|
|
2149
2156
|
r || (r = {}, e.__md_iev__ = r), r[t] = n;
|
|
2150
2157
|
}
|
|
2151
2158
|
function Dl(e, t, n, r) {
|
|
2152
2159
|
if (!Ur(e)) return rr("gobj is not a GObj"), null;
|
|
2153
2160
|
if (!t) return;
|
|
2154
|
-
let l =
|
|
2155
|
-
l || (l = [],
|
|
2161
|
+
let l = jl(t, n);
|
|
2162
|
+
l || (l = [], wl(t, n, l));
|
|
2156
2163
|
try {
|
|
2157
|
-
|
|
2164
|
+
wr(l) && l.unshift(r);
|
|
2158
2165
|
} catch (e) {
|
|
2159
2166
|
rr(e);
|
|
2160
2167
|
}
|
|
2161
2168
|
}
|
|
2162
2169
|
function $l(e, t, n, r) {
|
|
2163
2170
|
if (!Ur(e)) return rr("gobj is not a GObj"), null;
|
|
2164
|
-
if (!
|
|
2165
|
-
let l =
|
|
2171
|
+
if (!jr(t)) return rr("kw is not a dict"), null;
|
|
2172
|
+
let l = jl(t, n);
|
|
2166
2173
|
return l ? 0 === l.length ? (r && rr(`stack empty: ${n}`), null) : l[0] : (r && rr(`stack NOT FOUND: ${n}`), null);
|
|
2167
2174
|
}
|
|
2168
2175
|
function Al(e, t, n) {
|
|
@@ -2199,7 +2206,7 @@ function Ll(e, t, n) {
|
|
|
2199
2206
|
r,
|
|
2200
2207
|
e[r],
|
|
2201
2208
|
n
|
|
2202
|
-
]),
|
|
2209
|
+
]), jr(e[r]) && Ll(e[r], t, n), n = n.slice(0, -l.length);
|
|
2203
2210
|
}
|
|
2204
2211
|
}
|
|
2205
2212
|
function Ul(e, t, n) {
|
|
@@ -2216,8 +2223,8 @@ function Pl(e, t, n, r) {
|
|
|
2216
2223
|
if (!l) return rr("jdb_update: topic not found: " + t), null;
|
|
2217
2224
|
if (Pr(r.id)) return rr("jdb_update: record without id: " + r), sr(r), null;
|
|
2218
2225
|
let o, i = n.split("`"), s = l;
|
|
2219
|
-
for (; (o = i.shift()) && !Pr(o) && s;)
|
|
2220
|
-
if (0 === i.length && s) if (
|
|
2226
|
+
for (; (o = i.shift()) && !Pr(o) && s;) jr(s) && (s = nl(null, s, e.hook, [], 1)), s = Wl(s, null, o, !1);
|
|
2227
|
+
if (0 === i.length && s) if (wr(s)) s.push(r);
|
|
2221
2228
|
else if (s.id === r.id) Object.assign(s, r);
|
|
2222
2229
|
else {
|
|
2223
2230
|
let t = nl(null, s, e.hook, [], 1), n = Wl(t, e.hook, r.id, !1);
|
|
@@ -2230,8 +2237,8 @@ function Fl(e, t, n, r) {
|
|
|
2230
2237
|
if (!l) return rr("jdb_delete: topic not found: " + t), null;
|
|
2231
2238
|
if (Pr(r.id)) return rr("jdb_delete: record without id: " + r), sr(r), null;
|
|
2232
2239
|
let o, i = n.split("`"), s = l;
|
|
2233
|
-
for (; (o = i.shift()) && !Pr(o) && s;)
|
|
2234
|
-
if (0 === i.length && s) if (
|
|
2240
|
+
for (; (o = i.shift()) && !Pr(o) && s;) jr(s) && (s = nl(null, s, e.hook, null, 0)), s = Wl(s, null, o, !1);
|
|
2241
|
+
if (0 === i.length && s) if (wr(s)) {
|
|
2235
2242
|
let e = Sl(s, r.id);
|
|
2236
2243
|
e >= 0 && s.splice(e, 1);
|
|
2237
2244
|
} else {
|
|
@@ -2340,7 +2347,7 @@ function Hl(e, t) {
|
|
|
2340
2347
|
if (Dr(l)) if (l = l.trim(), l.length > 0 && "<" === l[0]) i.appendChild(ql(l));
|
|
2341
2348
|
else if (t && s) i.textContent = t(s) || l;
|
|
2342
2349
|
else i.textContent = l;
|
|
2343
|
-
else if (
|
|
2350
|
+
else if (wr(l)) {
|
|
2344
2351
|
if (l.length > 0) if (Dr(l[0])) i.appendChild(Hl(l, t));
|
|
2345
2352
|
else for (let e of l) Array.isArray(e) && e.length > 0 ? i.appendChild(Hl(e, t)) : e instanceof HTMLElement && i.appendChild(e);
|
|
2346
2353
|
} else l instanceof HTMLElement || l instanceof Text || l instanceof SVGElement ? i.appendChild(l) : null != l && (rr("content ignored"), ar(l));
|
|
@@ -2569,14 +2576,14 @@ function ho(e) {
|
|
|
2569
2576
|
}
|
|
2570
2577
|
function To(e, t) {
|
|
2571
2578
|
let n = Xt(e, v.SDF_PERSIST), r = gl(ho(e), null, !1);
|
|
2572
|
-
if (r &&
|
|
2579
|
+
if (r && jr(r)) {
|
|
2573
2580
|
let l = cl(e, r, t, !1);
|
|
2574
2581
|
l = cl(e, l, n, !1), on(e, l, v.SDF_PERSIST);
|
|
2575
2582
|
}
|
|
2576
2583
|
}
|
|
2577
2584
|
function yo(e, t) {
|
|
2578
2585
|
let n = cl(e, Xt(e, v.SDF_PERSIST), t, !1), r = gl(ho(e), null, !1);
|
|
2579
|
-
return r &&
|
|
2586
|
+
return r && jr(r) && dr(n, r), dl(ho(e), n);
|
|
2580
2587
|
}
|
|
2581
2588
|
function vo(e, t) {
|
|
2582
2589
|
let n = fl(e, gl(ho(e), null, !1), t, !1);
|
|
@@ -2584,10 +2591,10 @@ function vo(e, t) {
|
|
|
2584
2591
|
}
|
|
2585
2592
|
function So(e, t) {
|
|
2586
2593
|
let n = gl(ho(e), null, !1), r = {};
|
|
2587
|
-
return n &&
|
|
2594
|
+
return n && jr(n) && (r = cl(e, n, t, !1)), r;
|
|
2588
2595
|
}
|
|
2589
2596
|
function Oo(e) {
|
|
2590
|
-
if (
|
|
2597
|
+
if (wr(e) && 1 === Nr(e)) {
|
|
2591
2598
|
let t = e[0];
|
|
2592
2599
|
return Jr(t, "size") ? t.size : 1;
|
|
2593
2600
|
}
|
|
@@ -2617,7 +2624,7 @@ function No(e, t) {
|
|
|
2617
2624
|
};
|
|
2618
2625
|
}
|
|
2619
2626
|
}
|
|
2620
|
-
return
|
|
2627
|
+
return jr(t) ? {
|
|
2621
2628
|
topic_name: t.topic_name,
|
|
2622
2629
|
id: t.id,
|
|
2623
2630
|
hook_name: t.hook_name
|
|
@@ -2627,7 +2634,7 @@ function Ro(e, t) {
|
|
|
2627
2634
|
let n = No(e, t);
|
|
2628
2635
|
return n ? n.topic_name + "^" + n.id + "^" + n.hook_name : null;
|
|
2629
2636
|
}
|
|
2630
|
-
function
|
|
2637
|
+
function jo(e, t) {
|
|
2631
2638
|
if (Dr(t)) {
|
|
2632
2639
|
if (-1 === t.indexOf("^")) {
|
|
2633
2640
|
let n, r = e.hook;
|
|
@@ -2649,12 +2656,12 @@ function wo(e, t) {
|
|
|
2649
2656
|
};
|
|
2650
2657
|
}
|
|
2651
2658
|
}
|
|
2652
|
-
return
|
|
2659
|
+
return jr(t) ? {
|
|
2653
2660
|
topic_name: t.topic_name,
|
|
2654
2661
|
id: t.id
|
|
2655
2662
|
} : (rr("bad hook 3"), rr(e), rr(t), null);
|
|
2656
2663
|
}
|
|
2657
|
-
var
|
|
2664
|
+
var wo = [
|
|
2658
2665
|
"string",
|
|
2659
2666
|
"integer",
|
|
2660
2667
|
"object",
|
|
@@ -2769,7 +2776,7 @@ function Io(e, t) {
|
|
|
2769
2776
|
let e = t.split(".");
|
|
2770
2777
|
for (let t = 0; t < e.length; t++) {
|
|
2771
2778
|
let r = e[t];
|
|
2772
|
-
if (Ol(
|
|
2779
|
+
if (Ol(wo, r)) n.real_type || (n.real_type = r);
|
|
2773
2780
|
else if (Ol($o, r)) n.type || (n.type = r);
|
|
2774
2781
|
else if (Ol(Do, r)) switch (r) {
|
|
2775
2782
|
case "writable":
|
|
@@ -2783,14 +2790,14 @@ function Io(e, t) {
|
|
|
2783
2790
|
}
|
|
2784
2791
|
}
|
|
2785
2792
|
n.real_type || (n.real_type = "string");
|
|
2786
|
-
} else
|
|
2793
|
+
} else jr(t) ? (n = Ao(t), n.name || (n.name = e), n.header || (n.header = e)) : wr(t) && (n.real_type = "array", n.enum_list = t);
|
|
2787
2794
|
return n.type || (n.type = n.real_type), n;
|
|
2788
2795
|
}
|
|
2789
2796
|
function ko(e, t) {
|
|
2790
2797
|
let n = {};
|
|
2791
2798
|
return t || (t = {}), Object.entries(e).forEach(([e, r]) => {
|
|
2792
2799
|
let l;
|
|
2793
|
-
|
|
2800
|
+
jr(r) && (l = r.default);
|
|
2794
2801
|
let o = nl(null, t, e, l);
|
|
2795
2802
|
n[e] = o;
|
|
2796
2803
|
}), n;
|
|
@@ -2815,7 +2822,7 @@ var Fo = {
|
|
|
2815
2822
|
mt_create: function(e) {
|
|
2816
2823
|
let t = e.priv;
|
|
2817
2824
|
const n = nn(e, "subscriber");
|
|
2818
|
-
n &&
|
|
2825
|
+
n && wn(e, null, {}, n), t.periodic = Zt(e, "periodic"), t.msec = en(e, "msec");
|
|
2819
2826
|
},
|
|
2820
2827
|
mt_writing: function(e, t) {
|
|
2821
2828
|
let n = e.priv;
|
|
@@ -2852,13 +2859,13 @@ function Go() {
|
|
|
2852
2859
|
}("C_TIMER");
|
|
2853
2860
|
}
|
|
2854
2861
|
function Vo(e, t) {
|
|
2855
|
-
return e instanceof k ? "C_TIMER" !==
|
|
2862
|
+
return e instanceof k ? "C_TIMER" !== wt(e) ? (rr("not C_TIMER GObj"), -1) : (sn(e, "periodic", !1), void an(e, "msec", t)) : (rr("not GObj TYPE"), -1);
|
|
2856
2863
|
}
|
|
2857
2864
|
function Mo(e, t) {
|
|
2858
|
-
return e instanceof k ? "C_TIMER" !==
|
|
2865
|
+
return e instanceof k ? "C_TIMER" !== wt(e) ? (rr("not C_TIMER GObj"), -1) : (sn(e, "periodic", !0), void an(e, "msec", t)) : (rr("not GObj TYPE"), -1);
|
|
2859
2866
|
}
|
|
2860
2867
|
function Wo(e) {
|
|
2861
|
-
return e instanceof k ? "C_TIMER" !==
|
|
2868
|
+
return e instanceof k ? "C_TIMER" !== wt(e) ? (rr("not C_TIMER GObj"), -1) : void an(e, "msec", -1) : (rr("not GObj TYPE"), -1);
|
|
2862
2869
|
}
|
|
2863
2870
|
var Ko = [
|
|
2864
2871
|
N(y.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
@@ -2883,7 +2890,7 @@ var Ko = [
|
|
|
2883
2890
|
], xo = { gobj_timer: null }, Yo = null;
|
|
2884
2891
|
function Bo(e, t, n, r) {
|
|
2885
2892
|
let l = zt(e, t);
|
|
2886
|
-
return
|
|
2893
|
+
return jr(l) || (l = {}), l[n] = r, rn(e, t, l), He(e, t);
|
|
2887
2894
|
}
|
|
2888
2895
|
function Jo(e) {
|
|
2889
2896
|
if (!0 === e || !1 === e) return e;
|
|
@@ -2899,35 +2906,35 @@ function Ho(e, t, n, r) {
|
|
|
2899
2906
|
var Qo = {
|
|
2900
2907
|
mt_create: function(e) {
|
|
2901
2908
|
let t = e.priv;
|
|
2902
|
-
un(e, "start_date", eo()), un(e, "node_uuid", ro()), e.priv.gobj_timer = ot(
|
|
2909
|
+
un(e, "start_date", eo()), un(e, "node_uuid", ro()), e.priv.gobj_timer = ot(jt(e), "C_TIMER", {}, e), t.periodic_timeout = zt(e, "periodic_timeout"), function(e) {
|
|
2903
2910
|
let t = zt(e, "trace_levels");
|
|
2904
|
-
if (!
|
|
2911
|
+
if (!jr(t)) return 0;
|
|
2905
2912
|
let n = t.__global_trace__;
|
|
2906
|
-
if (
|
|
2913
|
+
if (wr(n)) {
|
|
2907
2914
|
ce(4294967295, !1);
|
|
2908
2915
|
for (let e of n) se(e, !0);
|
|
2909
2916
|
}
|
|
2910
2917
|
for (const [n, r] of Object.entries(t)) {
|
|
2911
2918
|
let t = Me(n);
|
|
2912
|
-
if (t) if (
|
|
2919
|
+
if (t) if (wr(r)) {
|
|
2913
2920
|
he(t, null, !1);
|
|
2914
2921
|
for (let e of r) he(t, e, !0);
|
|
2915
|
-
} else rr(`${
|
|
2922
|
+
} else rr(`${jt(e)}: trace_levels of ${n} MUST be a list`);
|
|
2916
2923
|
}
|
|
2917
2924
|
}(e), function(e) {
|
|
2918
2925
|
let t = zt(e, "no_trace_levels");
|
|
2919
|
-
if (!
|
|
2926
|
+
if (!jr(t)) return 0;
|
|
2920
2927
|
let n = t.__global_no_trace__;
|
|
2921
|
-
if (
|
|
2928
|
+
if (wr(n)) {
|
|
2922
2929
|
fe(4294967295, !1);
|
|
2923
2930
|
for (let e of n) ae(e, !0);
|
|
2924
2931
|
}
|
|
2925
2932
|
for (const [n, r] of Object.entries(t)) {
|
|
2926
2933
|
let t = Me(n);
|
|
2927
|
-
if (t) if (
|
|
2934
|
+
if (t) if (wr(r)) {
|
|
2928
2935
|
ye(t, null, !1);
|
|
2929
2936
|
for (let e of r) ye(t, e, !0);
|
|
2930
|
-
} else rr(`${
|
|
2937
|
+
} else rr(`${jt(e)}: no_trace_levels of ${n} MUST be a list`);
|
|
2931
2938
|
}
|
|
2932
2939
|
}(e);
|
|
2933
2940
|
},
|
|
@@ -3068,7 +3075,7 @@ function ai(e, t, n, r) {
|
|
|
3068
3075
|
return function(e, t) {
|
|
3069
3076
|
let n = e.priv, r = JSON.stringify(t);
|
|
3070
3077
|
if (ti(e)) {
|
|
3071
|
-
let n = tn(e, "url"), l =
|
|
3078
|
+
let n = tn(e, "url"), l = jt(St()) + " ==> " + n, o = zt(St(), "trace_ievent_callback");
|
|
3072
3079
|
o ? o(l, t, 1, r.length) : ii(0, l, t);
|
|
3073
3080
|
}
|
|
3074
3081
|
if (!n.websocket || n.websocket.readyState !== WebSocket.OPEN) return lr(`${Dt(e)}: send_iev(): websocket not open, message lost`), -1;
|
|
@@ -3116,13 +3123,13 @@ function _i(e) {
|
|
|
3116
3123
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
3117
3124
|
required_services: i
|
|
3118
3125
|
};
|
|
3119
|
-
return Dl(e, s, Xo, ui(e,
|
|
3126
|
+
return Dl(e, s, Xo, ui(e, jt(At(e)), null)), Al(e, s, "__identity__"), Vo(t.gobj_timer, en(e, "timeout_idack")), ai(e, "EV_IDENTITY_CARD", s);
|
|
3120
3127
|
}
|
|
3121
3128
|
function ci(e, t) {
|
|
3122
3129
|
if (Pr(t.event)) return -1;
|
|
3123
3130
|
let n = {}, r = t.__global__, l = t.__config__, o = t.__filter__, i = t.__service__, s = t.subscriber;
|
|
3124
3131
|
l && (n.__config__ = l), r && (n.__global__ = r), o && (n.__filter__ = o);
|
|
3125
|
-
return Dl(e, n, Xo, ui(e,
|
|
3132
|
+
return Dl(e, n, Xo, ui(e, jt(s), i)), Al(e, n, "__subscribing__"), ai(e, t.event, n);
|
|
3126
3133
|
}
|
|
3127
3134
|
function fi(e, t, n, r) {
|
|
3128
3135
|
let l = e.priv;
|
|
@@ -3213,7 +3220,7 @@ function mi(e, t, n, r) {
|
|
|
3213
3220
|
} : (rr("parsing inter_event: kw not a json object"), null) : (rr("parsing inter_kw: no kw"), null);
|
|
3214
3221
|
}(0, n.data);
|
|
3215
3222
|
if (ti(e)) {
|
|
3216
|
-
let e =
|
|
3223
|
+
let e = jt(St()) + " <== " + l, t = n.data.length, r = zt(St(), "trace_ievent_callback");
|
|
3217
3224
|
r ? r(e, o, 2, t) : ii(0, e, o);
|
|
3218
3225
|
}
|
|
3219
3226
|
let i = o.event, s = o.kw;
|
|
@@ -3245,9 +3252,9 @@ function hi(e, t, n, r) {
|
|
|
3245
3252
|
var Ti = {
|
|
3246
3253
|
mt_create: function(e) {
|
|
3247
3254
|
let t = e.priv;
|
|
3248
|
-
t.gobj_timer = ot(
|
|
3255
|
+
t.gobj_timer = ot(jt(e), "C_TIMER", {}, e), t.url = tn(e, "url"), t.remote_yuno_name = tn(e, "remote_yuno_name"), t.remote_yuno_role = tn(e, "remote_yuno_role"), t.remote_yuno_service = tn(e, "remote_yuno_service"), un(e, "wanted_yuno_name", t.remote_yuno_name), un(e, "wanted_yuno_role", t.remote_yuno_role), un(e, "wanted_yuno_service", t.remote_yuno_service);
|
|
3249
3256
|
const n = nn(e, "subscriber");
|
|
3250
|
-
n &&
|
|
3257
|
+
n && wn(e, null, {}, n);
|
|
3251
3258
|
},
|
|
3252
3259
|
mt_writing: function(e, t) {
|
|
3253
3260
|
let n = e.priv;
|
|
@@ -3276,7 +3283,7 @@ var Ti = {
|
|
|
3276
3283
|
mt_stats: function(e, t, n, r) {
|
|
3277
3284
|
if ("ST_SESSION" !== cn(e)) return rr("Not in session"), null;
|
|
3278
3285
|
n || (n = {});
|
|
3279
|
-
let l = ui(e,
|
|
3286
|
+
let l = ui(e, jt(r), Zr(e, n, "service", null, 0)), o = nl(e, n, "__md_stats__", null, Pn.KW_EXTRACT);
|
|
3280
3287
|
return o || (o = {}), Dl(e, n, "stats_stack", {
|
|
3281
3288
|
stats: t,
|
|
3282
3289
|
kw: o
|
|
@@ -3285,7 +3292,7 @@ var Ti = {
|
|
|
3285
3292
|
mt_command_parser: function(e, t, n, r) {
|
|
3286
3293
|
if ("ST_SESSION" !== cn(e)) return rr("Not in session"), null;
|
|
3287
3294
|
n || (n = {});
|
|
3288
|
-
let l = ui(e,
|
|
3295
|
+
let l = ui(e, jt(r), Zr(e, n, "service", "", 0)), o = nl(e, n, "__md_command__", null, Pn.KW_EXTRACT);
|
|
3289
3296
|
return o || (o = {}), Dl(e, n, "command_stack", {
|
|
3290
3297
|
command: t,
|
|
3291
3298
|
kw: o
|
|
@@ -3293,9 +3300,9 @@ var Ti = {
|
|
|
3293
3300
|
},
|
|
3294
3301
|
mt_inject_event: function(e, t, n, r) {
|
|
3295
3302
|
if ("ST_SESSION" !== cn(e)) return window.console.error("Not in session"), -1;
|
|
3296
|
-
if (n
|
|
3303
|
+
if (n = Object.assign({}, jr(n) ? n : {}), jr(n.__md_iev__) && (n.__md_iev__ = ur(n.__md_iev__)), $l(e, n, Xo));
|
|
3297
3304
|
else {
|
|
3298
|
-
let l = ui(e,
|
|
3305
|
+
let l = ui(e, jt(r), Zr(e, n, "__service__", 0, 0));
|
|
3299
3306
|
pr(n, "__service__"), Dl(e, n, "__message__", t), Dl(e, n, Xo, l);
|
|
3300
3307
|
}
|
|
3301
3308
|
return Al(e, n, "__message__"), ai(e, t, n, r);
|
|
@@ -3311,7 +3318,7 @@ var Ti = {
|
|
|
3311
3318
|
if (Pr(t.event)) return 0;
|
|
3312
3319
|
let r = {}, l = t.__global__, o = t.__config__, i = t.__filter__, s = t.__service__, a = t.subscriber;
|
|
3313
3320
|
o && (r.__config__ = o), l && (r.__global__ = l), i && (r.__filter__ = i);
|
|
3314
|
-
return Dl(e, r, Xo, ui(e,
|
|
3321
|
+
return Dl(e, r, Xo, ui(e, jt(a), s)), Al(e, r, "__unsubscribing__"), ai(e, t.event, r, e);
|
|
3315
3322
|
}
|
|
3316
3323
|
};
|
|
3317
3324
|
function yi() {
|
|
@@ -3410,6 +3417,6 @@ function yi() {
|
|
|
3410
3417
|
], t, Ti, 0, Zo, ni, 0, 0, ei, C.gcflag_no_check_output_events)) ? 0 : -1;
|
|
3411
3418
|
}("C_IEVENT_CLI");
|
|
3412
3419
|
}
|
|
3413
|
-
export { k as GObj, N as SDATA, D as SDATAAUTHZ, R as SDATACM,
|
|
3420
|
+
export { k as GObj, N as SDATA, D as SDATAAUTHZ, R as SDATACM, j as SDATACM2, A as SDATADF, w as SDATAPM, $ as SDATAPM0, O as SDATA_END, S as SDataDesc, a as YUNETA_VERSION, E as __yuno__, o as build_command_response, so as build_path, s as build_stats_response, lo as clean_name, Wo as clear_timeout, Wr as cmp_two_simple_json, l as command_parser, Hl as createElement2, ql as createOneHtml, Kl as create_json_record, ko as create_template_record, eo as current_timestamp, y as data_type_t, So as db_list_persistent_attrs, To as db_load_persistent_attrs, vo as db_remove_persistent_attrs, yo as db_save_persistent_attrs, io as debounce, Rl as delete_from_list, _r as duplicate_objects, Rr as empty_json, Pr as empty_string, Bl as escapeHtml, P as event_flag_t, bo as flat2json, Eo as flat_apply, mo as flat_diff, co as flat_key_join, fo as flat_key_split, Ue as gclass_add_ev_action, Fe as gclass_add_event_type, Le as gclass_add_state, Ve as gclass_check_fsm, Ae as gclass_create, Ge as gclass_event_type, Me as gclass_find_by_name, C as gclass_flag_t, Ie as gclass_unregister, Ql as getPositionRelativeToBody, oo as get_function_name, to as get_now, Lt as gobj_bottom_gobj, fn as gobj_change_parent, _n as gobj_change_state, Ln as gobj_command, it as gobj_create, et as gobj_create2, rt as gobj_create_default_service, ot as gobj_create_pure_child, nt as gobj_create_service, lt as gobj_create_volatil, tt as gobj_create_yuno, cn as gobj_current_state, Ke as gobj_default_service, Tn as gobj_deliver_posted_events, st as gobj_destroy, Bt as gobj_find_child, xt as gobj_find_gobj, xe as gobj_find_service, kn as gobj_find_subscribings, An as gobj_find_subscriptions, L as gobj_flag_t, $t as gobj_full_name, wt as gobj_gclass_name, be as gobj_get_gclass_trace_level, pe as gobj_get_gclass_trace_level2, me as gobj_get_gclass_trace_no_level, ge as gobj_get_global_trace_level, de as gobj_get_global_trace_no_level, ue as gobj_global_trace_level, _e as gobj_global_trace_no_level, Qt as gobj_has_attr, dn as gobj_has_event, bn as gobj_has_output_event, we as gobj_hsdata, Ct as gobj_is_destroying, vt as gobj_is_playing, kt as gobj_is_pure_child, ht as gobj_is_running, yt as gobj_is_service, It as gobj_is_volatil, ze as gobj_list_persistent_attrs, In as gobj_list_subscriptions, qe as gobj_load_persistent_attrs, Jt as gobj_match_children, qt as gobj_match_children_tree, Yt as gobj_match_gobj, jt as gobj_name, At as gobj_parent, Et as gobj_pause, mt as gobj_play, En as gobj_post_event, hn as gobj_posted_events_size, Cn as gobj_publish_event, zt as gobj_read_attr, Xt as gobj_read_attrs, Zt as gobj_read_bool_attr, en as gobj_read_integer_attr, nn as gobj_read_pointer_attr, tn as gobj_read_str_attr, Qe as gobj_remove_persistent_attrs, Se as gobj_repr_global_trace_levels, ln as gobj_reset_volatil_attrs, He as gobj_save_persistent_attrs, Ht as gobj_search_path, yn as gobj_send_event, We as gobj_services, Ut as gobj_set_bottom_gobj, Ee as gobj_set_deep_trace, ye as gobj_set_gclass_no_trace, he as gobj_set_gclass_trace, ae as gobj_set_global_no_trace, fe as gobj_set_global_no_trace2, se as gobj_set_global_trace, ce as gobj_set_global_trace2, ve as gobj_set_gobj_no_trace, Te as gobj_set_gobj_trace, K as gobj_set_trace_machine_format, Dt as gobj_short_name, at as gobj_start, _t as gobj_start_children, ft as gobj_start_tree, Oe as gobj_start_up, Un as gobj_stats, gt as gobj_stop, bt as gobj_stop_children, pt as gobj_stop_tree, wn as gobj_subscribe_event, Z as gobj_trace_level, x as gobj_trace_machine_format, ee as gobj_trace_no_level, Dn as gobj_unsubscribe_event, $n as gobj_unsubscribe_list, Ft as gobj_walk_gobj_children, Gt as gobj_walk_gobj_children_tree, rn as gobj_write_attr, on as gobj_write_attrs, sn as gobj_write_bool_attr, an as gobj_write_integer_attr, un as gobj_write_str_attr, St as gobj_yuno, Rt as gobj_yuno_id, Ot as gobj_yuno_name, Nt as gobj_yuno_role, Sl as id_index_in_obj_list, no as index_in_list, wr as is_array, Ar as is_boolean, Cr as is_date, Lr as is_function, Ur as is_gobj, xr as is_metadata_key, Ir as is_null, $r as is_number, jr as is_object, Yr as is_private_key, kr as is_pure_number, Dr as is_string, Fl as jdb_delete, Vl as jdb_get, Ml as jdb_get_by_idx, Gl as jdb_get_topic, Ul as jdb_init, Pl as jdb_update, go as json2flat, hr as json_array_append, Tr as json_array_append_new, vr as json_array_extend, yr as json_array_remove, Or as json_array_size, ur as json_deep_copy, cr as json_is_identical, pr as json_object_del, br as json_object_get, mr as json_object_set, Er as json_object_set_new, Sr as json_object_size, fr as json_object_update, gr as json_object_update_existing, dr as json_object_update_missing, Nr as json_size, Yl as jwt2json, xl as jwtDecode, cl as kw_clone_by_keys, fl as kw_clone_by_not_keys, _l as kw_collect, Hr as kw_delete, al as kw_find_json_in_list, qr as kw_find_path, Pn as kw_flag_t, Qr as kw_get_bool, tl as kw_get_dict, nl as kw_get_dict_value, zr as kw_get_int, rl as kw_get_list, gl as kw_get_local_storage_value, el as kw_get_pointer, Xr as kw_get_real, Zr as kw_get_str, Jr as kw_has_key, sl as kw_match_simple, Br as kw_pop, bl as kw_remove_local_storage_value, ul as kw_select, ll as kw_set_dict_value, dl as kw_set_local_storage_value, ol as kw_set_subdict_value, ml as kwid_collect, Tl as kwid_find_one_record, yl as kwid_get_ids, pl as kwid_match_id, El as kwid_new_dict, hl as kwid_new_list, vl as list2options, kl as load_json_file, ir as log_debug, rr as log_error, or as log_info, lr as log_warning, Il as msg_iev_get_msg_type, $l as msg_iev_get_stack, Dl as msg_iev_push_stack, jl as msg_iev_read_key, Al as msg_iev_set_msg_type, wl as msg_iev_write_key, ro as node_uuid, Fr as parseBoolean, zl as parseSVG, Xl as refresh_language, yi as register_c_ievent_cli, Go as register_c_timer, zo as register_c_yuno, Jl as safeSrc, v as sdata_flag_t, Cl as send_http_json_post, qn as set_console_log_enabled, Qn as set_console_log_filter, Bn as set_log_callback, tr as set_remote_log_functions, Vo as set_timeout, Mo as set_timeout_periodic, t as sprintf, i as stats_parser, Ol as str_in_list, Mr as strcasecmp, Vr as strcmp, Gr as strncmp, Nl as strs_in_list, Kr as strstr, Io as template_get_field_desc, Zl as timeTracker, ar as trace_json, B as trace_level_t, sr as trace_msg, No as treedb_decoder_fkey, jo as treedb_decoder_hook, Ro as treedb_encoder_fkey, Ao as treedb_get_field_desc, Oo as treedb_hook_data_size, n as vsprintf, F as walk_type_t };
|
|
3414
3421
|
|
|
3415
3422
|
//# sourceMappingURL=gobj-js.es.min.js.map
|