@yuneta/gobj-js 7.25.3 → 7.25.5
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 +16 -1
- package/dist/gobj-js.cjs.js +114 -31
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +96 -62
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +114 -31
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +174 -140
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +114 -31
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +141 -107
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +114 -31
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +183 -149
- 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
|
}
|
|
@@ -1616,21 +1616,21 @@ function vr(e, t) {
|
|
|
1616
1616
|
return t ? (Array.prototype.push.apply(e, t), e) : e;
|
|
1617
1617
|
}
|
|
1618
1618
|
function Sr(e) {
|
|
1619
|
-
return
|
|
1619
|
+
return jr(e) ? Object.keys(e).length : 0;
|
|
1620
1620
|
}
|
|
1621
1621
|
function Or(e) {
|
|
1622
|
-
return
|
|
1622
|
+
return wr(e) ? e.length : 0;
|
|
1623
1623
|
}
|
|
1624
1624
|
function Nr(e) {
|
|
1625
|
-
return
|
|
1625
|
+
return jr(e) ? Object.keys(e).length : wr(e) ? e.length : Dr(e) && e.length > 0 ? 1 : 0;
|
|
1626
1626
|
}
|
|
1627
1627
|
function Rr(e) {
|
|
1628
1628
|
return 0 === Nr(e);
|
|
1629
1629
|
}
|
|
1630
|
-
function
|
|
1630
|
+
function jr(e) {
|
|
1631
1631
|
return null !== e && "object" == typeof e && !Array.isArray(e);
|
|
1632
1632
|
}
|
|
1633
|
-
function
|
|
1633
|
+
function wr(e) {
|
|
1634
1634
|
return Array.isArray(e);
|
|
1635
1635
|
}
|
|
1636
1636
|
function Dr(e) {
|
|
@@ -1678,7 +1678,7 @@ function Mr(e, t) {
|
|
|
1678
1678
|
return n === r ? 0 : n > r ? 1 : -1;
|
|
1679
1679
|
}
|
|
1680
1680
|
function Wr(e, t) {
|
|
1681
|
-
if (
|
|
1681
|
+
if (jr(e) || jr(t) || wr(e) || wr(t)) return 0;
|
|
1682
1682
|
if ($r(e) || $r(t)) {
|
|
1683
1683
|
let n = Number(e), r = Number(t);
|
|
1684
1684
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
@@ -1714,7 +1714,7 @@ function Jr(e, t) {
|
|
|
1714
1714
|
return !(!(t in e) || !e.hasOwnProperty(t));
|
|
1715
1715
|
}
|
|
1716
1716
|
function qr(e, t, n, r) {
|
|
1717
|
-
if (e && !Ur(e) && rr("GObj bad instanceof"), !
|
|
1717
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), !jr(t) && !wr(t)) return rr(`${Dt(e)}: kw must be list or dict`), 0;
|
|
1718
1718
|
if (!Dr(n)) return rr(`${Dt(e)}: path must be a string: ${String(n)}`), 0;
|
|
1719
1719
|
let l = n.split("`");
|
|
1720
1720
|
if (l.length <= 1) return t[n];
|
|
@@ -1744,7 +1744,7 @@ function Qr(e, t, n, r, l) {
|
|
|
1744
1744
|
let _;
|
|
1745
1745
|
if (Ar(o)) _ = o;
|
|
1746
1746
|
else if (u && $r(o)) _ = 0 !== o;
|
|
1747
|
-
else if (u && Dr(o)) _ = "true" === o.toLowerCase() || "false" !== o.toLowerCase() && 0 !== (parseInt(o) || 0);
|
|
1747
|
+
else if (u && Dr(o)) _ = "true" === o.toLowerCase() || "false" !== o.toLowerCase() && 0 !== (parseInt(o, 10) || 0);
|
|
1748
1748
|
else {
|
|
1749
1749
|
if (!u || null !== o) return u ? (rr(`${e ? Dt(e) + ": " : ""}path MUST BE a simple json element: '${n}'`), ar(t), !1) : (rr(`${e ? Dt(e) + ": " : ""}path MUST BE a json boolean: '${n}'`), ar(t), Boolean(r));
|
|
1750
1750
|
_ = !1;
|
|
@@ -1754,7 +1754,7 @@ function Qr(e, t, n, r, l) {
|
|
|
1754
1754
|
function zr(e, t, n, r, l) {
|
|
1755
1755
|
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1756
1756
|
let o = qr(e, t, n, !1);
|
|
1757
|
-
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT;
|
|
1757
|
+
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT, u = l && l & Pn.KW_WILD_NUMBER;
|
|
1758
1758
|
if (void 0 === o) {
|
|
1759
1759
|
if (s) {
|
|
1760
1760
|
let l = parseInt(r);
|
|
@@ -1762,12 +1762,28 @@ function zr(e, t, n, r, l) {
|
|
|
1762
1762
|
}
|
|
1763
1763
|
return i && (rr(`path not found: '${n}'`), ar(t)), parseInt(r);
|
|
1764
1764
|
}
|
|
1765
|
-
|
|
1765
|
+
let _;
|
|
1766
|
+
if ($r(o)) _ = Math.trunc(o);
|
|
1767
|
+
else {
|
|
1768
|
+
if (!u) return rr(`${e ? Dt(e) + ": " : ""}path MUST BE a json integer: '${n}'`), ar(t), parseInt(r);
|
|
1769
|
+
if (Ar(o)) _ = o ? 1 : 0;
|
|
1770
|
+
else if (Dr(o)) _ = function(e) {
|
|
1771
|
+
const t = /^\s*([+-]?)(0[xX][0-9a-fA-F]+|0[0-7]*|[1-9][0-9]*)/.exec(e);
|
|
1772
|
+
if (!t) return 0;
|
|
1773
|
+
let n, r = t[2];
|
|
1774
|
+
return n = r.length > 1 && ("x" === r[1] || "X" === r[1]) ? parseInt(r.substring(2), 16) : "0" === r[0] ? parseInt(r, 8) : parseInt(r, 10), "-" === t[1] ? -n : n;
|
|
1775
|
+
}(o);
|
|
1776
|
+
else {
|
|
1777
|
+
if (null !== o) return rr(`${e ? Dt(e) + ": " : ""}path MUST BE a simple json element: '${n}'`), ar(t), 0;
|
|
1778
|
+
_ = 0;
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
return a && Hr(e, t, n), _;
|
|
1766
1782
|
}
|
|
1767
1783
|
function Xr(e, t, n, r, l) {
|
|
1768
1784
|
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1769
1785
|
let o = qr(e, t, n, !1);
|
|
1770
|
-
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT;
|
|
1786
|
+
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT, u = l && l & Pn.KW_WILD_NUMBER;
|
|
1771
1787
|
if (void 0 === o) {
|
|
1772
1788
|
if (s) {
|
|
1773
1789
|
let l = Number(r);
|
|
@@ -1775,13 +1791,31 @@ function Xr(e, t, n, r, l) {
|
|
|
1775
1791
|
}
|
|
1776
1792
|
return i && (rr(`path not found: '${n}'`), ar(t)), Number(r);
|
|
1777
1793
|
}
|
|
1778
|
-
|
|
1794
|
+
let _;
|
|
1795
|
+
if ($r(o)) _ = o;
|
|
1796
|
+
else {
|
|
1797
|
+
if (!u) return rr(`${e ? Dt(e) + ": " : ""}path MUST BE a json real: '${n}'`), ar(t), Number(r);
|
|
1798
|
+
if (Ar(o)) _ = o ? 1 : 0;
|
|
1799
|
+
else if (Dr(o)) _ = parseFloat(o), Number.isNaN(_) && (_ = 0);
|
|
1800
|
+
else {
|
|
1801
|
+
if (null !== o) return rr(`${e ? Dt(e) + ": " : ""}path MUST BE a simple json element: '${n}'`), ar(t), 0;
|
|
1802
|
+
_ = 0;
|
|
1803
|
+
}
|
|
1804
|
+
}
|
|
1805
|
+
return a && Hr(e, t, n), _;
|
|
1779
1806
|
}
|
|
1780
1807
|
function Zr(e, t, n, r, l) {
|
|
1781
1808
|
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1782
1809
|
let o = qr(e, t, n, !1);
|
|
1783
1810
|
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT;
|
|
1784
|
-
return void 0 === o ? s ? (ll(e, t, n, Dr(r) ? r : null), r) : (i && (
|
|
1811
|
+
return void 0 === o ? s ? (ll(e, t, n, Dr(r) ? r : null), r) : (i && !function(e, t) {
|
|
1812
|
+
let n = Dr(t) ? t.split("`") : [], r = e;
|
|
1813
|
+
for (let e = 0; e < n.length - 1; e++) {
|
|
1814
|
+
if (!jr(r) && !wr(r)) return !1;
|
|
1815
|
+
r = r[n[e]];
|
|
1816
|
+
}
|
|
1817
|
+
return !(!jr(r) && !wr(r) || 0 === n.length) && Object.prototype.hasOwnProperty.call(r, n[n.length - 1]);
|
|
1818
|
+
}(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);
|
|
1785
1819
|
}
|
|
1786
1820
|
function el(e, t, n, r, l) {
|
|
1787
1821
|
e && !Ur(e) && rr("GObj bad instanceof");
|
|
@@ -1800,7 +1834,7 @@ function tl(e, t, n, r, l) {
|
|
|
1800
1834
|
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1801
1835
|
let o = qr(e, t, n, !1);
|
|
1802
1836
|
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT;
|
|
1803
|
-
return void 0 === o ? s &&
|
|
1837
|
+
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);
|
|
1804
1838
|
}
|
|
1805
1839
|
function nl(e, t, n, r, l) {
|
|
1806
1840
|
e && !Ur(e) && rr("GObj bad instanceof");
|
|
@@ -1819,10 +1853,10 @@ function rl(e, t, n, r, l) {
|
|
|
1819
1853
|
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1820
1854
|
let o = qr(e, t, n, !1);
|
|
1821
1855
|
const i = l && l & Pn.KW_REQUIRED, s = l && l & Pn.KW_CREATE, a = l && l & Pn.KW_EXTRACT;
|
|
1822
|
-
return void 0 === o ? s &&
|
|
1856
|
+
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);
|
|
1823
1857
|
}
|
|
1824
1858
|
function ll(e, t, n, r) {
|
|
1825
|
-
if (e && !Ur(e) && rr("GObj bad instanceof"), !
|
|
1859
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), !jr(t)) return rr("kw is not an object"), -1;
|
|
1826
1860
|
let l = n.split("`");
|
|
1827
1861
|
if (l.length <= 1) return t[n] = r, 0;
|
|
1828
1862
|
let o = l.length;
|
|
@@ -1833,24 +1867,24 @@ function ll(e, t, n, r) {
|
|
|
1833
1867
|
return 0;
|
|
1834
1868
|
}
|
|
1835
1869
|
function ol(e, t, n, r, l) {
|
|
1836
|
-
if (e && !Ur(e) && rr("GObj bad instanceof"), !
|
|
1870
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), !jr(t)) return rr("kw is not an object"), -1;
|
|
1837
1871
|
let o = tl(e, t, n, {}, Pn.KW_CREATE);
|
|
1838
|
-
return
|
|
1872
|
+
return jr(o) ? (o[r] = l, 0) : (rr("subdict is not an object"), -1);
|
|
1839
1873
|
}
|
|
1840
1874
|
function il(e, n, r) {
|
|
1841
1875
|
let l = "", o = !1;
|
|
1842
|
-
if (
|
|
1876
|
+
if (wr(n)) {
|
|
1843
1877
|
o = !1;
|
|
1844
1878
|
for (let i = 0; i < n.length; i++) {
|
|
1845
1879
|
let s = n[i];
|
|
1846
1880
|
if (l = Pr(r) ? t("%s", r) : t("%s`%d", r, i), o = il(e, s, l), o) break;
|
|
1847
1881
|
}
|
|
1848
|
-
} else if (
|
|
1882
|
+
} else if (jr(n)) {
|
|
1849
1883
|
o = !0;
|
|
1850
1884
|
let i = Object.keys(n);
|
|
1851
1885
|
for (let s = 0; s < i.length; s++) {
|
|
1852
1886
|
let a = i[s], u = n[a];
|
|
1853
|
-
if (l = Pr(r) ? t("%s", a) : t("%s`%s", r, a),
|
|
1887
|
+
if (l = Pr(r) ? t("%s", a) : t("%s`%s", r, a), wr(u) || jr(u)) {
|
|
1854
1888
|
if (o = il(e, u, l), !o) break;
|
|
1855
1889
|
continue;
|
|
1856
1890
|
}
|
|
@@ -1871,7 +1905,7 @@ function sl(e, t) {
|
|
|
1871
1905
|
return 0 === Nr(t) || il(e, t, "");
|
|
1872
1906
|
}
|
|
1873
1907
|
function al(e, t, n, r) {
|
|
1874
|
-
if (!n || !
|
|
1908
|
+
if (!n || !wr(t)) return r && rr("item NULL or kw_list is not a list"), -1;
|
|
1875
1909
|
for (let e = 0; e < t.length; e++) if (cr(n, t[e])) return e;
|
|
1876
1910
|
return r && rr("item not found in this list"), -1;
|
|
1877
1911
|
}
|
|
@@ -1879,12 +1913,12 @@ function ul(e, t, n, r) {
|
|
|
1879
1913
|
if (e && !Ur(e) && rr("GObj bad instanceof"), !t) return null;
|
|
1880
1914
|
r || (r = sl);
|
|
1881
1915
|
let l = [];
|
|
1882
|
-
if (
|
|
1916
|
+
if (wr(t)) for (let e = 0; e < t.length; e++) {
|
|
1883
1917
|
let o = t[e];
|
|
1884
1918
|
r(o, n) && l.push(ur(o));
|
|
1885
1919
|
}
|
|
1886
1920
|
else {
|
|
1887
|
-
if (!
|
|
1921
|
+
if (!jr(t)) return rr("kw_select() BAD kw parameter"), null;
|
|
1888
1922
|
r(t, n) && l.push(ur(t));
|
|
1889
1923
|
}
|
|
1890
1924
|
return l;
|
|
@@ -1893,12 +1927,12 @@ function _l(e, t, n, r) {
|
|
|
1893
1927
|
if (e && !Ur(e) && rr("GObj bad instanceof"), !t) return null;
|
|
1894
1928
|
r || (r = sl);
|
|
1895
1929
|
let l = [];
|
|
1896
|
-
if (
|
|
1930
|
+
if (wr(t)) for (let e = 0; e < t.length; e++) {
|
|
1897
1931
|
let o = t[e];
|
|
1898
1932
|
r(o, n) && l.push(o);
|
|
1899
1933
|
}
|
|
1900
1934
|
else {
|
|
1901
|
-
if (!
|
|
1935
|
+
if (!jr(t)) return rr("kw_select() BAD kw parameter"), null;
|
|
1902
1936
|
r(t, n) && l.push(t);
|
|
1903
1937
|
}
|
|
1904
1938
|
return l;
|
|
@@ -1909,9 +1943,9 @@ function cl(e, t, n, r) {
|
|
|
1909
1943
|
if (Dr(n) && !Pr(n)) {
|
|
1910
1944
|
let o = n;
|
|
1911
1945
|
t.hasOwnProperty(o) ? l[o] = t[o] : r && rr(`${Dt(e)}: key not found: ${o}`);
|
|
1912
|
-
} else if (
|
|
1946
|
+
} 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}`);
|
|
1913
1947
|
else {
|
|
1914
|
-
if (!(
|
|
1948
|
+
if (!(wr(n) && Or(n) > 0)) return t;
|
|
1915
1949
|
for (let o = 0; o < n.length; o++) {
|
|
1916
1950
|
let i = n[o];
|
|
1917
1951
|
t.hasOwnProperty(i) ? l[i] = t[i] : r && rr(`${Dt(e)}: key not found: ${i}`);
|
|
@@ -1924,9 +1958,9 @@ function fl(e, t, n, r) {
|
|
|
1924
1958
|
if (fr(l, t), Dr(n) && !Pr(n)) {
|
|
1925
1959
|
let o = n;
|
|
1926
1960
|
nl(e, t, o, 0, 0) ? pr(l, o) : r && rr(`${Dt(e)}: key not found: ${o}`);
|
|
1927
|
-
} else if (
|
|
1961
|
+
} 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}`);
|
|
1928
1962
|
else {
|
|
1929
|
-
if (!(
|
|
1963
|
+
if (!(wr(n) && Or(n) > 0)) return {};
|
|
1930
1964
|
for (let o = 0; o < n.length; o++) {
|
|
1931
1965
|
let i = n[o];
|
|
1932
1966
|
t.hasOwnProperty(i) ? pr(l, i) : r && rr(`${Dt(e)}: key not found: ${i}`);
|
|
@@ -1961,10 +1995,10 @@ function bl(e) {
|
|
|
1961
1995
|
}
|
|
1962
1996
|
function pl(e, t) {
|
|
1963
1997
|
if (Ir(e) || Ir(t)) return !0;
|
|
1964
|
-
if (
|
|
1998
|
+
if (wr(e)) {
|
|
1965
1999
|
if (0 === e.length) return !0;
|
|
1966
2000
|
for (let n = 0; n < e.length; n++) if (e[n] === t) return !0;
|
|
1967
|
-
} else if (
|
|
2001
|
+
} else if (jr(e)) {
|
|
1968
2002
|
if (0 === Object.keys(e).length) return !0;
|
|
1969
2003
|
for (let n in e) if (n === t) return !0;
|
|
1970
2004
|
} else if (Dr(e) && e === t) return !0;
|
|
@@ -1974,9 +2008,9 @@ function ml(e, t, n, r, l) {
|
|
|
1974
2008
|
if (e && !Ur(e) && rr("GObj bad instanceof"), !t) return null;
|
|
1975
2009
|
l || (l = sl);
|
|
1976
2010
|
let o = [];
|
|
1977
|
-
if (
|
|
2011
|
+
if (wr(t)) for (let i = 0; i < t.length; i++) {
|
|
1978
2012
|
let s, a = t[i];
|
|
1979
|
-
if (
|
|
2013
|
+
if (jr(a)) s = Zr(e, a, "id", "", 0);
|
|
1980
2014
|
else {
|
|
1981
2015
|
if (!Dr(a)) continue;
|
|
1982
2016
|
s = a;
|
|
@@ -1984,7 +2018,7 @@ function ml(e, t, n, r, l) {
|
|
|
1984
2018
|
pl(n, s) && l(a, r) && o.push(a);
|
|
1985
2019
|
}
|
|
1986
2020
|
else {
|
|
1987
|
-
if (!
|
|
2021
|
+
if (!jr(t)) return rr("kw_collect() BAD kw parameter"), null;
|
|
1988
2022
|
for (let e of Object.keys(t)) {
|
|
1989
2023
|
let i = t[e];
|
|
1990
2024
|
pl(n, e) && l(i, r) && o.push(i);
|
|
@@ -1995,8 +2029,8 @@ function ml(e, t, n, r, l) {
|
|
|
1995
2029
|
function El(e, t, n) {
|
|
1996
2030
|
e && !Ur(e) && rr("GObj bad instanceof");
|
|
1997
2031
|
let r = {};
|
|
1998
|
-
if (Pr(n) || (t = qr(e, t, n)),
|
|
1999
|
-
else if (
|
|
2032
|
+
if (Pr(n) || (t = qr(e, t, n)), jr(t)) r = t;
|
|
2033
|
+
else if (wr(t)) for (let n = 0; n < t.length; n++) {
|
|
2000
2034
|
let l = t[n], o = Zr(e, l, "id", "", Pn.KW_REQUIRED);
|
|
2001
2035
|
Pr(o) || (r[o] = l);
|
|
2002
2036
|
}
|
|
@@ -2004,12 +2038,12 @@ function El(e, t, n) {
|
|
|
2004
2038
|
return r;
|
|
2005
2039
|
}
|
|
2006
2040
|
function hl(e, t, n) {
|
|
2007
|
-
if (e && !Ur(e) && rr("GObj bad instanceof"), Pr(n) || (t = qr(e, t, n)),
|
|
2008
|
-
if (
|
|
2041
|
+
if (e && !Ur(e) && rr("GObj bad instanceof"), Pr(n) || (t = qr(e, t, n)), wr(t)) return t;
|
|
2042
|
+
if (jr(t)) {
|
|
2009
2043
|
let n = [];
|
|
2010
2044
|
for (let r of Object.keys(t)) {
|
|
2011
2045
|
let l = t[r];
|
|
2012
|
-
|
|
2046
|
+
jr(l) ? (l.id = r, n.push(l)) : rr(`${Dt(e)} kwid_new_list: not a record: '${r}'`);
|
|
2013
2047
|
}
|
|
2014
2048
|
return n;
|
|
2015
2049
|
}
|
|
@@ -2024,10 +2058,10 @@ function yl(e, t) {
|
|
|
2024
2058
|
if (e && !Ur(e) && rr("GObj bad instanceof"), !t) return [];
|
|
2025
2059
|
let n = [];
|
|
2026
2060
|
if (Dr(t)) n.push(t);
|
|
2027
|
-
else if (
|
|
2028
|
-
else
|
|
2061
|
+
else if (jr(t)) for (let e in t) t.hasOwnProperty(e) && n.push(e);
|
|
2062
|
+
else wr(t) && t.forEach(function(t) {
|
|
2029
2063
|
if (Dr(t)) Pr(t) || n.push(t);
|
|
2030
|
-
else if (
|
|
2064
|
+
else if (jr(t)) {
|
|
2031
2065
|
let r = Zr(e, t, "id", 0, 0);
|
|
2032
2066
|
r && n.push(r);
|
|
2033
2067
|
}
|
|
@@ -2037,13 +2071,13 @@ function yl(e, t) {
|
|
|
2037
2071
|
function vl(e, t, n) {
|
|
2038
2072
|
t = t || "id", n = n || "value";
|
|
2039
2073
|
let r = [];
|
|
2040
|
-
if (
|
|
2074
|
+
if (wr(e)) for (let l = 0; l < e.length; l++) {
|
|
2041
2075
|
let o = e[l];
|
|
2042
2076
|
if (Dr(o)) r.push({
|
|
2043
2077
|
id: e[l],
|
|
2044
2078
|
value: e[l]
|
|
2045
2079
|
});
|
|
2046
|
-
else if (
|
|
2080
|
+
else if (jr(o)) {
|
|
2047
2081
|
let e = {};
|
|
2048
2082
|
if (Jr(o, t)) {
|
|
2049
2083
|
if (!Jr(o, n)) {
|
|
@@ -2064,7 +2098,7 @@ function vl(e, t, n) {
|
|
|
2064
2098
|
r.push(e);
|
|
2065
2099
|
} else rr("list2options(): case1 not implemented");
|
|
2066
2100
|
}
|
|
2067
|
-
else if (
|
|
2101
|
+
else if (jr(e)) for (let t of Object.keys(e)) r.push({
|
|
2068
2102
|
id: t,
|
|
2069
2103
|
value: t
|
|
2070
2104
|
});
|
|
@@ -2098,7 +2132,7 @@ function Rl(e, t) {
|
|
|
2098
2132
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return e.splice(n, 1), !0;
|
|
2099
2133
|
return !1;
|
|
2100
2134
|
}
|
|
2101
|
-
function
|
|
2135
|
+
function jl(e, t) {
|
|
2102
2136
|
try {
|
|
2103
2137
|
let n = e.__md_iev__;
|
|
2104
2138
|
if (n) return n[t];
|
|
@@ -2106,25 +2140,25 @@ function wl(e, t) {
|
|
|
2106
2140
|
return;
|
|
2107
2141
|
}
|
|
2108
2142
|
}
|
|
2109
|
-
function
|
|
2143
|
+
function wl(e, t, n) {
|
|
2110
2144
|
let r = e.__md_iev__;
|
|
2111
2145
|
r || (r = {}, e.__md_iev__ = r), r[t] = n;
|
|
2112
2146
|
}
|
|
2113
2147
|
function Dl(e, t, n, r) {
|
|
2114
2148
|
if (!Ur(e)) return rr("gobj is not a GObj"), null;
|
|
2115
2149
|
if (!t) return;
|
|
2116
|
-
let l =
|
|
2117
|
-
l || (l = [],
|
|
2150
|
+
let l = jl(t, n);
|
|
2151
|
+
l || (l = [], wl(t, n, l));
|
|
2118
2152
|
try {
|
|
2119
|
-
|
|
2153
|
+
wr(l) && l.unshift(r);
|
|
2120
2154
|
} catch (e) {
|
|
2121
2155
|
rr(e);
|
|
2122
2156
|
}
|
|
2123
2157
|
}
|
|
2124
2158
|
function $l(e, t, n, r) {
|
|
2125
2159
|
if (!Ur(e)) return rr("gobj is not a GObj"), null;
|
|
2126
|
-
if (!
|
|
2127
|
-
let l =
|
|
2160
|
+
if (!jr(t)) return rr("kw is not a dict"), null;
|
|
2161
|
+
let l = jl(t, n);
|
|
2128
2162
|
return l ? 0 === l.length ? (r && rr(`stack empty: ${n}`), null) : l[0] : (r && rr(`stack NOT FOUND: ${n}`), null);
|
|
2129
2163
|
}
|
|
2130
2164
|
function Al(e, t, n) {
|
|
@@ -2161,7 +2195,7 @@ function Ll(e, t, n) {
|
|
|
2161
2195
|
r,
|
|
2162
2196
|
e[r],
|
|
2163
2197
|
n
|
|
2164
|
-
]),
|
|
2198
|
+
]), jr(e[r]) && Ll(e[r], t, n), n = n.slice(0, -l.length);
|
|
2165
2199
|
}
|
|
2166
2200
|
}
|
|
2167
2201
|
function Ul(e, t, n) {
|
|
@@ -2178,8 +2212,8 @@ function Pl(e, t, n, r) {
|
|
|
2178
2212
|
if (!l) return rr("jdb_update: topic not found: " + t), null;
|
|
2179
2213
|
if (Pr(r.id)) return rr("jdb_update: record without id: " + r), sr(r), null;
|
|
2180
2214
|
let o, i = n.split("`"), s = l;
|
|
2181
|
-
for (; (o = i.shift()) && !Pr(o) && s;)
|
|
2182
|
-
if (0 === i.length && s) if (
|
|
2215
|
+
for (; (o = i.shift()) && !Pr(o) && s;) jr(s) && (s = nl(null, s, e.hook, [], 1)), s = Wl(s, null, o, !1);
|
|
2216
|
+
if (0 === i.length && s) if (wr(s)) s.push(r);
|
|
2183
2217
|
else if (s.id === r.id) Object.assign(s, r);
|
|
2184
2218
|
else {
|
|
2185
2219
|
let t = nl(null, s, e.hook, [], 1), n = Wl(t, e.hook, r.id, !1);
|
|
@@ -2192,8 +2226,8 @@ function Fl(e, t, n, r) {
|
|
|
2192
2226
|
if (!l) return rr("jdb_delete: topic not found: " + t), null;
|
|
2193
2227
|
if (Pr(r.id)) return rr("jdb_delete: record without id: " + r), sr(r), null;
|
|
2194
2228
|
let o, i = n.split("`"), s = l;
|
|
2195
|
-
for (; (o = i.shift()) && !Pr(o) && s;)
|
|
2196
|
-
if (0 === i.length && s) if (
|
|
2229
|
+
for (; (o = i.shift()) && !Pr(o) && s;) jr(s) && (s = nl(null, s, e.hook, null, 0)), s = Wl(s, null, o, !1);
|
|
2230
|
+
if (0 === i.length && s) if (wr(s)) {
|
|
2197
2231
|
let e = Sl(s, r.id);
|
|
2198
2232
|
e >= 0 && s.splice(e, 1);
|
|
2199
2233
|
} else {
|
|
@@ -2302,7 +2336,7 @@ function Hl(e, t) {
|
|
|
2302
2336
|
if (Dr(l)) if (l = l.trim(), l.length > 0 && "<" === l[0]) i.appendChild(ql(l));
|
|
2303
2337
|
else if (t && s) i.textContent = t(s) || l;
|
|
2304
2338
|
else i.textContent = l;
|
|
2305
|
-
else if (
|
|
2339
|
+
else if (wr(l)) {
|
|
2306
2340
|
if (l.length > 0) if (Dr(l[0])) i.appendChild(Hl(l, t));
|
|
2307
2341
|
else for (let e of l) Array.isArray(e) && e.length > 0 ? i.appendChild(Hl(e, t)) : e instanceof HTMLElement && i.appendChild(e);
|
|
2308
2342
|
} else l instanceof HTMLElement || l instanceof Text || l instanceof SVGElement ? i.appendChild(l) : null != l && (rr("content ignored"), ar(l));
|
|
@@ -2531,14 +2565,14 @@ function ho(e) {
|
|
|
2531
2565
|
}
|
|
2532
2566
|
function To(e, t) {
|
|
2533
2567
|
let n = Xt(e, v.SDF_PERSIST), r = gl(ho(e), null, !1);
|
|
2534
|
-
if (r &&
|
|
2568
|
+
if (r && jr(r)) {
|
|
2535
2569
|
let l = cl(e, r, t, !1);
|
|
2536
2570
|
l = cl(e, l, n, !1), on(e, l, v.SDF_PERSIST);
|
|
2537
2571
|
}
|
|
2538
2572
|
}
|
|
2539
2573
|
function yo(e, t) {
|
|
2540
2574
|
let n = cl(e, Xt(e, v.SDF_PERSIST), t, !1), r = gl(ho(e), null, !1);
|
|
2541
|
-
return r &&
|
|
2575
|
+
return r && jr(r) && dr(n, r), dl(ho(e), n);
|
|
2542
2576
|
}
|
|
2543
2577
|
function vo(e, t) {
|
|
2544
2578
|
let n = fl(e, gl(ho(e), null, !1), t, !1);
|
|
@@ -2546,10 +2580,10 @@ function vo(e, t) {
|
|
|
2546
2580
|
}
|
|
2547
2581
|
function So(e, t) {
|
|
2548
2582
|
let n = gl(ho(e), null, !1), r = {};
|
|
2549
|
-
return n &&
|
|
2583
|
+
return n && jr(n) && (r = cl(e, n, t, !1)), r;
|
|
2550
2584
|
}
|
|
2551
2585
|
function Oo(e) {
|
|
2552
|
-
if (
|
|
2586
|
+
if (wr(e) && 1 === Nr(e)) {
|
|
2553
2587
|
let t = e[0];
|
|
2554
2588
|
return Jr(t, "size") ? t.size : 1;
|
|
2555
2589
|
}
|
|
@@ -2579,7 +2613,7 @@ function No(e, t) {
|
|
|
2579
2613
|
};
|
|
2580
2614
|
}
|
|
2581
2615
|
}
|
|
2582
|
-
return
|
|
2616
|
+
return jr(t) ? {
|
|
2583
2617
|
topic_name: t.topic_name,
|
|
2584
2618
|
id: t.id,
|
|
2585
2619
|
hook_name: t.hook_name
|
|
@@ -2589,7 +2623,7 @@ function Ro(e, t) {
|
|
|
2589
2623
|
let n = No(e, t);
|
|
2590
2624
|
return n ? n.topic_name + "^" + n.id + "^" + n.hook_name : null;
|
|
2591
2625
|
}
|
|
2592
|
-
function
|
|
2626
|
+
function jo(e, t) {
|
|
2593
2627
|
if (Dr(t)) {
|
|
2594
2628
|
if (-1 === t.indexOf("^")) {
|
|
2595
2629
|
let n, r = e.hook;
|
|
@@ -2611,12 +2645,12 @@ function wo(e, t) {
|
|
|
2611
2645
|
};
|
|
2612
2646
|
}
|
|
2613
2647
|
}
|
|
2614
|
-
return
|
|
2648
|
+
return jr(t) ? {
|
|
2615
2649
|
topic_name: t.topic_name,
|
|
2616
2650
|
id: t.id
|
|
2617
2651
|
} : (rr("bad hook 3"), rr(e), rr(t), null);
|
|
2618
2652
|
}
|
|
2619
|
-
var
|
|
2653
|
+
var wo = [
|
|
2620
2654
|
"string",
|
|
2621
2655
|
"integer",
|
|
2622
2656
|
"object",
|
|
@@ -2731,7 +2765,7 @@ function Io(e, t) {
|
|
|
2731
2765
|
let e = t.split(".");
|
|
2732
2766
|
for (let t = 0; t < e.length; t++) {
|
|
2733
2767
|
let r = e[t];
|
|
2734
|
-
if (Ol(
|
|
2768
|
+
if (Ol(wo, r)) n.real_type || (n.real_type = r);
|
|
2735
2769
|
else if (Ol($o, r)) n.type || (n.type = r);
|
|
2736
2770
|
else if (Ol(Do, r)) switch (r) {
|
|
2737
2771
|
case "writable":
|
|
@@ -2745,14 +2779,14 @@ function Io(e, t) {
|
|
|
2745
2779
|
}
|
|
2746
2780
|
}
|
|
2747
2781
|
n.real_type || (n.real_type = "string");
|
|
2748
|
-
} else
|
|
2782
|
+
} 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);
|
|
2749
2783
|
return n.type || (n.type = n.real_type), n;
|
|
2750
2784
|
}
|
|
2751
2785
|
function ko(e, t) {
|
|
2752
2786
|
let n = {};
|
|
2753
2787
|
return t || (t = {}), Object.entries(e).forEach(([e, r]) => {
|
|
2754
2788
|
let l;
|
|
2755
|
-
|
|
2789
|
+
jr(r) && (l = r.default);
|
|
2756
2790
|
let o = nl(null, t, e, l);
|
|
2757
2791
|
n[e] = o;
|
|
2758
2792
|
}), n;
|
|
@@ -2777,7 +2811,7 @@ var Fo = {
|
|
|
2777
2811
|
mt_create: function(e) {
|
|
2778
2812
|
let t = e.priv;
|
|
2779
2813
|
const n = nn(e, "subscriber");
|
|
2780
|
-
n &&
|
|
2814
|
+
n && wn(e, null, {}, n), t.periodic = Zt(e, "periodic"), t.msec = en(e, "msec");
|
|
2781
2815
|
},
|
|
2782
2816
|
mt_writing: function(e, t) {
|
|
2783
2817
|
let n = e.priv;
|
|
@@ -2814,13 +2848,13 @@ function Go() {
|
|
|
2814
2848
|
}("C_TIMER");
|
|
2815
2849
|
}
|
|
2816
2850
|
function Vo(e, t) {
|
|
2817
|
-
return e instanceof k ? "C_TIMER" !==
|
|
2851
|
+
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);
|
|
2818
2852
|
}
|
|
2819
2853
|
function Mo(e, t) {
|
|
2820
|
-
return e instanceof k ? "C_TIMER" !==
|
|
2854
|
+
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);
|
|
2821
2855
|
}
|
|
2822
2856
|
function Wo(e) {
|
|
2823
|
-
return e instanceof k ? "C_TIMER" !==
|
|
2857
|
+
return e instanceof k ? "C_TIMER" !== wt(e) ? (rr("not C_TIMER GObj"), -1) : void an(e, "msec", -1) : (rr("not GObj TYPE"), -1);
|
|
2824
2858
|
}
|
|
2825
2859
|
var Ko = [
|
|
2826
2860
|
N(y.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
@@ -2845,7 +2879,7 @@ var Ko = [
|
|
|
2845
2879
|
], xo = { gobj_timer: null }, Yo = null;
|
|
2846
2880
|
function Bo(e, t, n, r) {
|
|
2847
2881
|
let l = zt(e, t);
|
|
2848
|
-
return
|
|
2882
|
+
return jr(l) || (l = {}), l[n] = r, rn(e, t, l), He(e, t);
|
|
2849
2883
|
}
|
|
2850
2884
|
function Jo(e) {
|
|
2851
2885
|
if (!0 === e || !1 === e) return e;
|
|
@@ -2861,35 +2895,35 @@ function Ho(e, t, n, r) {
|
|
|
2861
2895
|
var Qo = {
|
|
2862
2896
|
mt_create: function(e) {
|
|
2863
2897
|
let t = e.priv;
|
|
2864
|
-
un(e, "start_date", eo()), un(e, "node_uuid", ro()), e.priv.gobj_timer = ot(
|
|
2898
|
+
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) {
|
|
2865
2899
|
let t = zt(e, "trace_levels");
|
|
2866
|
-
if (!
|
|
2900
|
+
if (!jr(t)) return 0;
|
|
2867
2901
|
let n = t.__global_trace__;
|
|
2868
|
-
if (
|
|
2902
|
+
if (wr(n)) {
|
|
2869
2903
|
ce(4294967295, !1);
|
|
2870
2904
|
for (let e of n) se(e, !0);
|
|
2871
2905
|
}
|
|
2872
2906
|
for (const [n, r] of Object.entries(t)) {
|
|
2873
2907
|
let t = Me(n);
|
|
2874
|
-
if (t) if (
|
|
2908
|
+
if (t) if (wr(r)) {
|
|
2875
2909
|
he(t, null, !1);
|
|
2876
2910
|
for (let e of r) he(t, e, !0);
|
|
2877
|
-
} else rr(`${
|
|
2911
|
+
} else rr(`${jt(e)}: trace_levels of ${n} MUST be a list`);
|
|
2878
2912
|
}
|
|
2879
2913
|
}(e), function(e) {
|
|
2880
2914
|
let t = zt(e, "no_trace_levels");
|
|
2881
|
-
if (!
|
|
2915
|
+
if (!jr(t)) return 0;
|
|
2882
2916
|
let n = t.__global_no_trace__;
|
|
2883
|
-
if (
|
|
2917
|
+
if (wr(n)) {
|
|
2884
2918
|
fe(4294967295, !1);
|
|
2885
2919
|
for (let e of n) ae(e, !0);
|
|
2886
2920
|
}
|
|
2887
2921
|
for (const [n, r] of Object.entries(t)) {
|
|
2888
2922
|
let t = Me(n);
|
|
2889
|
-
if (t) if (
|
|
2923
|
+
if (t) if (wr(r)) {
|
|
2890
2924
|
ye(t, null, !1);
|
|
2891
2925
|
for (let e of r) ye(t, e, !0);
|
|
2892
|
-
} else rr(`${
|
|
2926
|
+
} else rr(`${jt(e)}: no_trace_levels of ${n} MUST be a list`);
|
|
2893
2927
|
}
|
|
2894
2928
|
}(e);
|
|
2895
2929
|
},
|
|
@@ -3030,7 +3064,7 @@ function ai(e, t, n, r) {
|
|
|
3030
3064
|
return function(e, t) {
|
|
3031
3065
|
let n = e.priv, r = JSON.stringify(t);
|
|
3032
3066
|
if (ti(e)) {
|
|
3033
|
-
let n = tn(e, "url"), l =
|
|
3067
|
+
let n = tn(e, "url"), l = jt(St()) + " ==> " + n, o = zt(St(), "trace_ievent_callback");
|
|
3034
3068
|
o ? o(l, t, 1, r.length) : ii(0, l, t);
|
|
3035
3069
|
}
|
|
3036
3070
|
if (!n.websocket || n.websocket.readyState !== WebSocket.OPEN) return lr(`${Dt(e)}: send_iev(): websocket not open, message lost`), -1;
|
|
@@ -3078,13 +3112,13 @@ function _i(e) {
|
|
|
3078
3112
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
3079
3113
|
required_services: i
|
|
3080
3114
|
};
|
|
3081
|
-
return Dl(e, s, Xo, ui(e,
|
|
3115
|
+
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);
|
|
3082
3116
|
}
|
|
3083
3117
|
function ci(e, t) {
|
|
3084
3118
|
if (Pr(t.event)) return -1;
|
|
3085
3119
|
let n = {}, r = t.__global__, l = t.__config__, o = t.__filter__, i = t.__service__, s = t.subscriber;
|
|
3086
3120
|
l && (n.__config__ = l), r && (n.__global__ = r), o && (n.__filter__ = o);
|
|
3087
|
-
return Dl(e, n, Xo, ui(e,
|
|
3121
|
+
return Dl(e, n, Xo, ui(e, jt(s), i)), Al(e, n, "__subscribing__"), ai(e, t.event, n);
|
|
3088
3122
|
}
|
|
3089
3123
|
function fi(e, t, n, r) {
|
|
3090
3124
|
let l = e.priv;
|
|
@@ -3175,7 +3209,7 @@ function mi(e, t, n, r) {
|
|
|
3175
3209
|
} : (rr("parsing inter_event: kw not a json object"), null) : (rr("parsing inter_kw: no kw"), null);
|
|
3176
3210
|
}(0, n.data);
|
|
3177
3211
|
if (ti(e)) {
|
|
3178
|
-
let e =
|
|
3212
|
+
let e = jt(St()) + " <== " + l, t = n.data.length, r = zt(St(), "trace_ievent_callback");
|
|
3179
3213
|
r ? r(e, o, 2, t) : ii(0, e, o);
|
|
3180
3214
|
}
|
|
3181
3215
|
let i = o.event, s = o.kw;
|
|
@@ -3207,9 +3241,9 @@ function hi(e, t, n, r) {
|
|
|
3207
3241
|
var Ti = {
|
|
3208
3242
|
mt_create: function(e) {
|
|
3209
3243
|
let t = e.priv;
|
|
3210
|
-
t.gobj_timer = ot(
|
|
3244
|
+
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);
|
|
3211
3245
|
const n = nn(e, "subscriber");
|
|
3212
|
-
n &&
|
|
3246
|
+
n && wn(e, null, {}, n);
|
|
3213
3247
|
},
|
|
3214
3248
|
mt_writing: function(e, t) {
|
|
3215
3249
|
let n = e.priv;
|
|
@@ -3238,7 +3272,7 @@ var Ti = {
|
|
|
3238
3272
|
mt_stats: function(e, t, n, r) {
|
|
3239
3273
|
if ("ST_SESSION" !== cn(e)) return rr("Not in session"), null;
|
|
3240
3274
|
n || (n = {});
|
|
3241
|
-
let l = ui(e,
|
|
3275
|
+
let l = ui(e, jt(r), Zr(e, n, "service", null, 0)), o = nl(e, n, "__md_stats__", null, Pn.KW_EXTRACT);
|
|
3242
3276
|
return o || (o = {}), Dl(e, n, "stats_stack", {
|
|
3243
3277
|
stats: t,
|
|
3244
3278
|
kw: o
|
|
@@ -3247,7 +3281,7 @@ var Ti = {
|
|
|
3247
3281
|
mt_command_parser: function(e, t, n, r) {
|
|
3248
3282
|
if ("ST_SESSION" !== cn(e)) return rr("Not in session"), null;
|
|
3249
3283
|
n || (n = {});
|
|
3250
|
-
let l = ui(e,
|
|
3284
|
+
let l = ui(e, jt(r), Zr(e, n, "service", "", 0)), o = nl(e, n, "__md_command__", null, Pn.KW_EXTRACT);
|
|
3251
3285
|
return o || (o = {}), Dl(e, n, "command_stack", {
|
|
3252
3286
|
command: t,
|
|
3253
3287
|
kw: o
|
|
@@ -3257,7 +3291,7 @@ var Ti = {
|
|
|
3257
3291
|
if ("ST_SESSION" !== cn(e)) return window.console.error("Not in session"), -1;
|
|
3258
3292
|
if (n || (n = {}), $l(e, n, Xo));
|
|
3259
3293
|
else {
|
|
3260
|
-
let l = ui(e,
|
|
3294
|
+
let l = ui(e, jt(r), Zr(e, n, "__service__", 0, 0));
|
|
3261
3295
|
pr(n, "__service__"), Dl(e, n, "__message__", t), Dl(e, n, Xo, l);
|
|
3262
3296
|
}
|
|
3263
3297
|
return Al(e, n, "__message__"), ai(e, t, n, r);
|
|
@@ -3273,7 +3307,7 @@ var Ti = {
|
|
|
3273
3307
|
if (Pr(t.event)) return 0;
|
|
3274
3308
|
let r = {}, l = t.__global__, o = t.__config__, i = t.__filter__, s = t.__service__, a = t.subscriber;
|
|
3275
3309
|
o && (r.__config__ = o), l && (r.__global__ = l), i && (r.__filter__ = i);
|
|
3276
|
-
return Dl(e, r, Xo, ui(e,
|
|
3310
|
+
return Dl(e, r, Xo, ui(e, jt(a), s)), Al(e, r, "__unsubscribing__"), ai(e, t.event, r, e);
|
|
3277
3311
|
}
|
|
3278
3312
|
};
|
|
3279
3313
|
function yi() {
|
|
@@ -3372,6 +3406,6 @@ function yi() {
|
|
|
3372
3406
|
], t, Ti, 0, Zo, ni, 0, 0, ei, C.gcflag_no_check_output_events)) ? 0 : -1;
|
|
3373
3407
|
}("C_IEVENT_CLI");
|
|
3374
3408
|
}
|
|
3375
|
-
export { k as GObj, N as SDATA, D as SDATAAUTHZ, R as SDATACM,
|
|
3409
|
+
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 };
|
|
3376
3410
|
|
|
3377
3411
|
//# sourceMappingURL=gobj-js.es.min.js.map
|