@yuneta/gobj-js 7.26.27 → 7.26.28
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 +15 -3
- package/dist/gobj-js.cjs.js +140 -49
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +755 -701
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +140 -49
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +292 -239
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +140 -49
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +742 -688
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +140 -49
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +742 -688
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.es.min.js
CHANGED
|
@@ -1156,17 +1156,38 @@ function Mt(e) {
|
|
|
1156
1156
|
if (dn(e)) return Hr("gobj NULL or DESTROYED"), -1;
|
|
1157
1157
|
if (e.running) return Hr(`${an(e)}: GObj ALREADY RUNNING`), -1;
|
|
1158
1158
|
if (e.disabled) return Hr(`${an(e)}: GObj DISABLED`), -1;
|
|
1159
|
+
const n = function(e) {
|
|
1160
|
+
const t = ot(e), n = [];
|
|
1161
|
+
if (!Mo(e.gclass.attrs_table)) return null;
|
|
1162
|
+
for (const r of e.gclass.attrs_table) {
|
|
1163
|
+
if (!(r.name && r.flag & D.SDF_REQUIRED)) continue;
|
|
1164
|
+
const e = t[r.name];
|
|
1165
|
+
switch (r.type) {
|
|
1166
|
+
case O.DTP_STRING:
|
|
1167
|
+
Go(e) && !qo(e) || n.push(r.name);
|
|
1168
|
+
break;
|
|
1169
|
+
case O.DTP_LIST:
|
|
1170
|
+
case O.DTP_DICT:
|
|
1171
|
+
case O.DTP_JSON:
|
|
1172
|
+
Uo(e) && n.push(r.name);
|
|
1173
|
+
break;
|
|
1174
|
+
case O.DTP_POINTER: e || n.push(r.name);
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1177
|
+
return n.length ? n : null;
|
|
1178
|
+
}(e);
|
|
1179
|
+
if (n) return Hr(`${an(e)}: Cannot start without all required attributes: ` + JSON.stringify(n)), -1;
|
|
1159
1180
|
fe(e) && ee(t("⏺ ⏺ start: %s", cn(e))), e.running = !0;
|
|
1160
|
-
let
|
|
1181
|
+
let r = 0;
|
|
1161
1182
|
if (e.gclass.gmt.mt_start) {
|
|
1162
1183
|
const t = nr(e, "mt_start", v.FRAME_METHOD);
|
|
1163
1184
|
try {
|
|
1164
|
-
|
|
1185
|
+
r = e.gclass.gmt.mt_start(e);
|
|
1165
1186
|
} finally {
|
|
1166
1187
|
rr(t);
|
|
1167
1188
|
}
|
|
1168
1189
|
}
|
|
1169
|
-
return
|
|
1190
|
+
return r;
|
|
1170
1191
|
}
|
|
1171
1192
|
function Gt(e) {
|
|
1172
1193
|
const t = nr(e, "gobj_start", v.FRAME_WATCH);
|
|
@@ -1321,47 +1342,60 @@ function hn(e, t, n) {
|
|
|
1321
1342
|
return Jo(e) ? t ? st(e.gclass, t, n) : e.gclass.attrs_table : (Hr("gobj NULL of bad type"), null);
|
|
1322
1343
|
}
|
|
1323
1344
|
function mn(e, t, n, r, l) {
|
|
1324
|
-
return dn(e) ? (Hr("gobj NULL, destroying, or bad type"), 0) :
|
|
1345
|
+
return dn(e) ? (Hr("gobj NULL, destroying, or bad type"), 0) : function(e, t, n, r, l, o) {
|
|
1346
|
+
let i, s = [...e.dl_children];
|
|
1347
|
+
if (n & J.WALK_LAST2FIRST) for (let n = s.length; n > 0; n--) {
|
|
1348
|
+
if (i = s[n - 1], vn(i, e, t)) continue;
|
|
1349
|
+
t.add(i);
|
|
1350
|
+
let u = En(r(i, l, o));
|
|
1351
|
+
if (u < 0) return u;
|
|
1352
|
+
}
|
|
1353
|
+
else for (let n = 0; n < s.length; n++) {
|
|
1354
|
+
if (i = s[n], vn(i, e, t)) continue;
|
|
1355
|
+
t.add(i);
|
|
1356
|
+
let u = En(r(i, l, o));
|
|
1357
|
+
if (u < 0) return u;
|
|
1358
|
+
}
|
|
1359
|
+
return 0;
|
|
1360
|
+
}(e, /* @__PURE__ */ new Set(), t, n, r, l);
|
|
1325
1361
|
}
|
|
1326
1362
|
function yn(e, t, n, r, l) {
|
|
1327
|
-
return dn(e) ? (Hr("gobj NULL, destroying, or bad type"), 0) : On(e
|
|
1363
|
+
return dn(e) ? (Hr("gobj NULL, destroying, or bad type"), 0) : On(e, /* @__PURE__ */ new Set(), t, n, r, l);
|
|
1328
1364
|
}
|
|
1329
1365
|
function En(e) {
|
|
1330
1366
|
return "number" == typeof e && isFinite(e) ? e : (null == e || Hr(`walk callback must return a NUMBER (-1 stop, 0 descend, >0 skip children), got ${typeof e}: taken as 0`), 0);
|
|
1331
1367
|
}
|
|
1332
|
-
function vn(e, t, n
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1368
|
+
function vn(e, t, n) {
|
|
1369
|
+
return dn(e) || e.parent !== t || n.has(e);
|
|
1370
|
+
}
|
|
1371
|
+
function Tn(e, t, n, r, l, o) {
|
|
1372
|
+
let i = [...e.dl_children];
|
|
1373
|
+
n & J.WALK_LAST2FIRST && i.reverse();
|
|
1374
|
+
let s = [];
|
|
1375
|
+
for (const n of i) {
|
|
1376
|
+
if (vn(n, e, t)) continue;
|
|
1377
|
+
t.add(n), s.push(n);
|
|
1378
|
+
let i = En(r(n, l, o));
|
|
1379
|
+
if (i < 0) return i;
|
|
1338
1380
|
}
|
|
1339
|
-
|
|
1340
|
-
if (
|
|
1341
|
-
let
|
|
1342
|
-
if (
|
|
1381
|
+
for (const e of s) {
|
|
1382
|
+
if (dn(e)) continue;
|
|
1383
|
+
let i = Tn(e, t, n, r, l, o);
|
|
1384
|
+
if (i < 0) return i;
|
|
1343
1385
|
}
|
|
1344
1386
|
return 0;
|
|
1345
1387
|
}
|
|
1346
|
-
function
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
if (
|
|
1350
|
-
for (let
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
}
|
|
1354
|
-
function On(e, t, n, r, l) {
|
|
1355
|
-
if (t & J.WALK_BYLEVEL) return Tn(e, t, n, r, l);
|
|
1356
|
-
let o, i, s = [...e];
|
|
1357
|
-
if (t & J.WALK_BOTTOM2TOP) {
|
|
1358
|
-
for (let e = s.length; e > 0; e--) if (i = s[e - 1], !dn(i)) {
|
|
1359
|
-
if (o = On(i.dl_children, t, n, r, l), o < 0) return o;
|
|
1360
|
-
if (!dn(i) && (o = En(n(i, r, l)), o < 0)) return o;
|
|
1388
|
+
function On(e, t, n, r, l, o) {
|
|
1389
|
+
if (n & J.WALK_BYLEVEL) return Tn(e, t, n, r, l, o);
|
|
1390
|
+
let i, s, u = [...e.dl_children];
|
|
1391
|
+
if (n & J.WALK_BOTTOM2TOP) {
|
|
1392
|
+
for (let a = u.length; a > 0; a--) if (s = u[a - 1], !vn(s, e, t)) {
|
|
1393
|
+
if (i = On(s, t, n, r, l, o), i < 0) return i;
|
|
1394
|
+
if (!dn(s) && (t.add(s), i = En(r(s, l, o)), i < 0)) return i;
|
|
1361
1395
|
}
|
|
1362
|
-
} else for (let
|
|
1363
|
-
if (
|
|
1364
|
-
if (0 ===
|
|
1396
|
+
} else for (let a = 0; a < u.length; a++) if (s = u[a], !vn(s, e, t)) {
|
|
1397
|
+
if (t.add(s), i = En(r(s, l, o)), i < 0) return i;
|
|
1398
|
+
if (0 === i && !dn(s) && (i = On(s, t, n, r, l, o), i < 0)) return i;
|
|
1365
1399
|
}
|
|
1366
1400
|
return 0;
|
|
1367
1401
|
}
|
|
@@ -1681,7 +1715,7 @@ function or(e, n, r, l) {
|
|
|
1681
1715
|
if (1 === Q) ee(t("🔄 %s %s%s %s from %s%s", n || "", e.running ? "" : "!!", an(e), o.state_name, l && !l.running ? "!!" : "", an(l)));
|
|
1682
1716
|
else {
|
|
1683
1717
|
let r = "";
|
|
1684
|
-
s.action && (r =
|
|
1718
|
+
s.action && (r = Cs(s.action)), ee(t("🔄 mach(%s%s^%s), st: %s, ev: %s%s%s, ac: %s, from(%s%s^%s)", e.running ? "" : "!!", un(e), sn(e), o.state_name, "", n || "", "", r, l && !l.running ? "!!" : "", un(l), sn(l)));
|
|
1685
1719
|
}
|
|
1686
1720
|
r && ge(e) && ko(r) && yo(r);
|
|
1687
1721
|
}
|
|
@@ -3300,19 +3334,27 @@ function Ai(e, t, n = !1) {
|
|
|
3300
3334
|
} catch (n) {
|
|
3301
3335
|
return Ri(e, `${l} cannot be read (storage blocked?): the default is used`), t;
|
|
3302
3336
|
}
|
|
3303
|
-
let i = null;
|
|
3337
|
+
let i = !0, s = null;
|
|
3304
3338
|
if (null !== o) try {
|
|
3305
|
-
|
|
3339
|
+
s = JSON.parse(o);
|
|
3306
3340
|
} catch (t) {
|
|
3307
|
-
|
|
3341
|
+
s = null;
|
|
3308
3342
|
try {
|
|
3309
|
-
r.removeItem(e), zr(`${l} does not hold json: removed, the default is used`)
|
|
3343
|
+
r.removeItem(e), zr(`${l} does not hold json: removed, the default is used`);
|
|
3310
3344
|
} catch (t) {
|
|
3311
|
-
Ri(e, `${l} does not hold json and cannot be removed: the default is used`);
|
|
3345
|
+
i = !1, Ri(e, `${l} does not hold json and cannot be removed: the default is used`);
|
|
3312
3346
|
}
|
|
3313
|
-
o = void 0;
|
|
3314
3347
|
}
|
|
3315
|
-
|
|
3348
|
+
if (null === s && (s = t, n)) {
|
|
3349
|
+
const n = nt(t);
|
|
3350
|
+
if (void 0 === n) Hr(`${l}: cannot write the default: a value with no json text`);
|
|
3351
|
+
else try {
|
|
3352
|
+
r.setItem(e, n);
|
|
3353
|
+
} catch (t) {
|
|
3354
|
+
i = !1, Ri(e, `${l} cannot be written (storage full or blocked?): the default is used, not kept`);
|
|
3355
|
+
}
|
|
3356
|
+
}
|
|
3357
|
+
return i && wi.delete(e), s;
|
|
3316
3358
|
}
|
|
3317
3359
|
function Di(e, t) {
|
|
3318
3360
|
if (!e) return Hr(`kw_set_local_storage_value(): invalid key: key=${e}`), -1;
|
|
@@ -3787,33 +3829,44 @@ function $s(e, t) {
|
|
|
3787
3829
|
return -1;
|
|
3788
3830
|
}
|
|
3789
3831
|
function ws() {
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3832
|
+
const e = "undefined" != typeof window && window.crypto || globalThis.crypto;
|
|
3833
|
+
if (e && "function" == typeof e.randomUUID) return e.randomUUID();
|
|
3834
|
+
const t = /* @__PURE__ */ new Uint8Array(16);
|
|
3835
|
+
if (e && "function" == typeof e.getRandomValues) e.getRandomValues(t);
|
|
3836
|
+
else for (let e = 0; e < t.length; e++) t[e] = Math.floor(256 * Math.random());
|
|
3837
|
+
t[6] = 15 & t[6] | 64, t[8] = 63 & t[8] | 128;
|
|
3838
|
+
const n = Array.from(t, (e) => e.toString(16).padStart(2, "0")).join("");
|
|
3839
|
+
return `${n.slice(0, 8)}-${n.slice(8, 12)}-${n.slice(12, 16)}-${n.slice(16, 20)}-${n.slice(20)}`;
|
|
3840
|
+
}
|
|
3841
|
+
var Rs = null;
|
|
3842
|
+
function As() {
|
|
3843
|
+
if (Rs) return Rs;
|
|
3844
|
+
const e = $i();
|
|
3845
|
+
if (!e) return Rs = ws();
|
|
3846
|
+
let t = null;
|
|
3847
|
+
try {
|
|
3848
|
+
t = e.getItem("host_uuid");
|
|
3849
|
+
} catch (e) {
|
|
3850
|
+
return Ri("host_uuid", "node_uuid(): localStorage cannot be read (storage blocked?): a uuid of this page only"), Rs = ws();
|
|
3851
|
+
}
|
|
3852
|
+
if (!t) {
|
|
3853
|
+
t = ws();
|
|
3793
3854
|
try {
|
|
3794
|
-
e
|
|
3795
|
-
} catch (
|
|
3796
|
-
|
|
3797
|
-
}
|
|
3798
|
-
if (!e && window.crypto?.randomUUID) {
|
|
3799
|
-
e = window.crypto.randomUUID();
|
|
3800
|
-
try {
|
|
3801
|
-
t.setItem("host_uuid", e);
|
|
3802
|
-
} catch (e) {
|
|
3803
|
-
Ri("host_uuid", "node_uuid(): localStorage cannot be written (storage full or blocked?): a uuid of this page only");
|
|
3804
|
-
}
|
|
3855
|
+
e.setItem("host_uuid", t);
|
|
3856
|
+
} catch (e) {
|
|
3857
|
+
Ri("host_uuid", "node_uuid(): localStorage cannot be written (storage full or blocked?): a uuid of this page only");
|
|
3805
3858
|
}
|
|
3806
|
-
}
|
|
3807
|
-
return
|
|
3859
|
+
}
|
|
3860
|
+
return Rs = t;
|
|
3808
3861
|
}
|
|
3809
|
-
function
|
|
3862
|
+
function Ds(e) {
|
|
3810
3863
|
return e.replace(/[?# ^:]/g, "_");
|
|
3811
3864
|
}
|
|
3812
|
-
function
|
|
3865
|
+
function Cs(e) {
|
|
3813
3866
|
let t = null;
|
|
3814
3867
|
return "function" != typeof e && "object" != typeof e || (t = ("" + e).match(/function\s*([\w\$]*)\s*\(/)), null !== t ? t[1] + "()" : "";
|
|
3815
3868
|
}
|
|
3816
|
-
function
|
|
3869
|
+
function Is(e, t = 0, n = !1) {
|
|
3817
3870
|
let r = null, l = null, o = null;
|
|
3818
3871
|
const i = (...i) => {
|
|
3819
3872
|
o = this, l = i;
|
|
@@ -3828,20 +3881,20 @@ function Ds(e, t = 0, n = !1) {
|
|
|
3828
3881
|
clearTimeout(r), r = null, l = null, o = null;
|
|
3829
3882
|
}, i;
|
|
3830
3883
|
}
|
|
3831
|
-
function
|
|
3884
|
+
function ks(...e) {
|
|
3832
3885
|
let t = "", n = 0;
|
|
3833
3886
|
for (let r of e) null != r && "" !== r && (r = String(r), r = 0 === n ? r.replace(/\/+$/, "") : r.replace(/^\/+/, "").replace(/\/+$/, ""), "" !== r && (n > 0 && (t += "/"), t += r, n++));
|
|
3834
3887
|
return t;
|
|
3835
3888
|
}
|
|
3836
|
-
var
|
|
3837
|
-
function
|
|
3889
|
+
var Ps = 256, Ls = 1e5;
|
|
3890
|
+
function Us(e) {
|
|
3838
3891
|
const t = String(e).replace(/`/g, "``");
|
|
3839
3892
|
return "[" === t[0] ? "[" + t : t;
|
|
3840
3893
|
}
|
|
3841
|
-
function
|
|
3842
|
-
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` :
|
|
3894
|
+
function Fs(e) {
|
|
3895
|
+
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` : Us(e)).join("`") : "";
|
|
3843
3896
|
}
|
|
3844
|
-
function
|
|
3897
|
+
function Ms(e) {
|
|
3845
3898
|
if ("string" != typeof e) return null;
|
|
3846
3899
|
let t = [], n = "";
|
|
3847
3900
|
for (let r = 0; r < e.length; r++) if ("`" !== e[r]) n += e[r];
|
|
@@ -3862,9 +3915,9 @@ function Us(e) {
|
|
|
3862
3915
|
return null !== t ? t : "[" === e[0] && "[" === e[1] ? e.slice(1) : e;
|
|
3863
3916
|
});
|
|
3864
3917
|
}
|
|
3865
|
-
function
|
|
3918
|
+
function Gs(e) {
|
|
3866
3919
|
const t = {}, n = (e, r, l) => {
|
|
3867
|
-
if (l >
|
|
3920
|
+
if (l > Ps) throw new Error("json2flat: deeper than 256");
|
|
3868
3921
|
if (null === e || "object" != typeof e || Array.isArray(e)) {
|
|
3869
3922
|
if (Array.isArray(e) && e.length > 0) return void e.forEach((e, t) => {
|
|
3870
3923
|
const o = `[${t}]`;
|
|
@@ -3874,7 +3927,7 @@ function Fs(e) {
|
|
|
3874
3927
|
const t = Object.keys(e);
|
|
3875
3928
|
if (t.length > 0) {
|
|
3876
3929
|
for (const o of t) {
|
|
3877
|
-
const t =
|
|
3930
|
+
const t = Us(o);
|
|
3878
3931
|
n(e[o], 0 === l ? t : r + "`" + t, l + 1);
|
|
3879
3932
|
}
|
|
3880
3933
|
return;
|
|
@@ -3884,20 +3937,20 @@ function Fs(e) {
|
|
|
3884
3937
|
};
|
|
3885
3938
|
return null == e || n(e, "", 0), t;
|
|
3886
3939
|
}
|
|
3887
|
-
function
|
|
3940
|
+
function Vs(e) {
|
|
3888
3941
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat2json: a flat json is an object of id -> value");
|
|
3889
3942
|
let t = null;
|
|
3890
3943
|
for (const n of Object.keys(e)) {
|
|
3891
|
-
const r =
|
|
3944
|
+
const r = Ms(n);
|
|
3892
3945
|
if (!r || 0 === r.length) throw new Error(`flat2json: malformed flat id: '${n}'`);
|
|
3893
|
-
if (r.length >
|
|
3946
|
+
if (r.length > Ps) throw new Error(`flat2json: '${n}' deeper than 256`);
|
|
3894
3947
|
const l = "number" == typeof r[0];
|
|
3895
3948
|
if (null === t) t = l ? [] : {};
|
|
3896
3949
|
else if (l !== Array.isArray(t)) throw new Error(`flat2json: '${n}' does not fit a ${Array.isArray(t) ? "array" : "object"} root`);
|
|
3897
3950
|
let o = t;
|
|
3898
3951
|
for (let t = 0; t < r.length; t++) {
|
|
3899
3952
|
const l = r[t], i = "number" == typeof l, s = t === r.length - 1, u = !s && "number" == typeof r[t + 1];
|
|
3900
|
-
if (i && l >
|
|
3953
|
+
if (i && l > Ls) throw new Error(`flat2json: array index ${l} over the limit (100000) in '${n}'`);
|
|
3901
3954
|
if (i !== Array.isArray(o)) throw new Error(`flat2json: '${n}' uses a ${i ? "array index" : "key"} where the tree already has a ${Array.isArray(o) ? "array" : "object"}`);
|
|
3902
3955
|
if (s) {
|
|
3903
3956
|
if (Array.isArray(o)) {
|
|
@@ -3921,23 +3974,23 @@ function Ms(e) {
|
|
|
3921
3974
|
}
|
|
3922
3975
|
return null === t ? {} : t;
|
|
3923
3976
|
}
|
|
3924
|
-
function
|
|
3977
|
+
function Ws(e, t) {
|
|
3925
3978
|
return e === t || null !== e && null !== t && "object" == typeof e && "object" == typeof t && JSON.stringify(e) === JSON.stringify(t);
|
|
3926
3979
|
}
|
|
3927
|
-
function
|
|
3980
|
+
function xs(e, t) {
|
|
3928
3981
|
const n = e && "object" == typeof e ? e : {}, r = t && "object" == typeof t ? t : {}, l = {
|
|
3929
3982
|
added: {},
|
|
3930
3983
|
removed: {},
|
|
3931
3984
|
changed: {}
|
|
3932
3985
|
};
|
|
3933
|
-
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ?
|
|
3986
|
+
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ? Ws(n[e], r[e]) || ii(l.changed, e, {
|
|
3934
3987
|
from: n[e],
|
|
3935
3988
|
to: r[e]
|
|
3936
3989
|
}) : ii(l.removed, e, n[e]);
|
|
3937
3990
|
for (const e of Object.keys(r)) Object.prototype.hasOwnProperty.call(n, e) || ii(l.added, e, r[e]);
|
|
3938
3991
|
return l;
|
|
3939
3992
|
}
|
|
3940
|
-
function
|
|
3993
|
+
function Ks(e, t) {
|
|
3941
3994
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat_apply: a flat json is an object of id -> value");
|
|
3942
3995
|
if (null === t || "object" != typeof t) throw new Error("flat_apply: a diff is the object flat_diff() answers");
|
|
3943
3996
|
for (const n of Object.keys(t.removed || {})) delete e[n];
|
|
@@ -3949,36 +4002,36 @@ function Ws(e, t) {
|
|
|
3949
4002
|
}
|
|
3950
4003
|
return e;
|
|
3951
4004
|
}
|
|
3952
|
-
function
|
|
4005
|
+
function Bs(e) {
|
|
3953
4006
|
return "persistent-attrs-" + an(e);
|
|
3954
4007
|
}
|
|
3955
|
-
function
|
|
3956
|
-
let n = Cn(e, D.SDF_PERSIST), r = Ai(
|
|
4008
|
+
function Ys(e, t) {
|
|
4009
|
+
let n = Cn(e, D.SDF_PERSIST), r = Ai(Bs(e), null, !1);
|
|
3957
4010
|
if (r && Fo(r)) {
|
|
3958
4011
|
let l = ji(e, r, t, !1);
|
|
3959
4012
|
l = ji(e, l, n, !1), Vn(e, l, D.SDF_PERSIST);
|
|
3960
4013
|
}
|
|
3961
4014
|
}
|
|
3962
|
-
function
|
|
3963
|
-
let n = ji(e, Cn(e, D.SDF_PERSIST), t, !1), r = Ai(
|
|
3964
|
-
return r && Fo(r) && jo(n, r), Di(
|
|
4015
|
+
function Js(e, t) {
|
|
4016
|
+
let n = ji(e, Cn(e, D.SDF_PERSIST), t, !1), r = Ai(Bs(e), null, !1);
|
|
4017
|
+
return r && Fo(r) && jo(n, r), Di(Bs(e), n);
|
|
3965
4018
|
}
|
|
3966
|
-
function
|
|
3967
|
-
let n = Ni(e, Ai(
|
|
3968
|
-
0 === ko(n) ? Ci(
|
|
4019
|
+
function qs(e, t) {
|
|
4020
|
+
let n = Ni(e, Ai(Bs(e), null, !1), t, !1);
|
|
4021
|
+
0 === ko(n) ? Ci(Bs(e)) : Di(Bs(e), n);
|
|
3969
4022
|
}
|
|
3970
|
-
function
|
|
3971
|
-
let n = Ai(
|
|
4023
|
+
function Hs(e, t) {
|
|
4024
|
+
let n = Ai(Bs(e), null, !1), r = {};
|
|
3972
4025
|
return n && Fo(n) && (r = ji(e, n, t, !1)), r;
|
|
3973
4026
|
}
|
|
3974
|
-
function
|
|
4027
|
+
function zs(e) {
|
|
3975
4028
|
if (Mo(e) && 1 === Lo(e)) {
|
|
3976
4029
|
let t = e[0];
|
|
3977
4030
|
return li(t, "size") ? t.size : 1;
|
|
3978
4031
|
}
|
|
3979
4032
|
return Lo(e);
|
|
3980
4033
|
}
|
|
3981
|
-
function
|
|
4034
|
+
function Qs(e, t) {
|
|
3982
4035
|
if (Go(t)) {
|
|
3983
4036
|
if (-1 === t.indexOf("^")) {
|
|
3984
4037
|
let n, r, l = e.fkey;
|
|
@@ -4008,11 +4061,11 @@ function Hs(e, t) {
|
|
|
4008
4061
|
hook_name: t.hook_name
|
|
4009
4062
|
} : (Hr("bad fkey 3"), Hr(e), Hr(t), null);
|
|
4010
4063
|
}
|
|
4011
|
-
function
|
|
4012
|
-
let n =
|
|
4064
|
+
function Xs(e, t) {
|
|
4065
|
+
let n = Qs(e, t);
|
|
4013
4066
|
return n ? n.topic_name + "^" + n.id + "^" + n.hook_name : null;
|
|
4014
4067
|
}
|
|
4015
|
-
function
|
|
4068
|
+
function Zs(e, t) {
|
|
4016
4069
|
if (Go(t)) {
|
|
4017
4070
|
if (-1 === t.indexOf("^")) {
|
|
4018
4071
|
let n, r = e.hook;
|
|
@@ -4039,7 +4092,7 @@ function Qs(e, t) {
|
|
|
4039
4092
|
id: t.id
|
|
4040
4093
|
} : (Hr("bad hook 3"), Hr(e), Hr(t), null);
|
|
4041
4094
|
}
|
|
4042
|
-
var
|
|
4095
|
+
var eu = [
|
|
4043
4096
|
"string",
|
|
4044
4097
|
"integer",
|
|
4045
4098
|
"object",
|
|
@@ -4049,7 +4102,7 @@ var Xs = [
|
|
|
4049
4102
|
"real",
|
|
4050
4103
|
"boolean",
|
|
4051
4104
|
"blob"
|
|
4052
|
-
],
|
|
4105
|
+
], tu = [
|
|
4053
4106
|
"persistent",
|
|
4054
4107
|
"required",
|
|
4055
4108
|
"notnull",
|
|
@@ -4061,7 +4114,7 @@ var Xs = [
|
|
|
4061
4114
|
"stats",
|
|
4062
4115
|
"rstats",
|
|
4063
4116
|
"pstats"
|
|
4064
|
-
],
|
|
4117
|
+
], nu = [
|
|
4065
4118
|
"hook",
|
|
4066
4119
|
"fkey",
|
|
4067
4120
|
"enum",
|
|
@@ -4090,7 +4143,7 @@ var Xs = [
|
|
|
4090
4143
|
"coordinates",
|
|
4091
4144
|
"gbuffer"
|
|
4092
4145
|
];
|
|
4093
|
-
function
|
|
4146
|
+
function ru(e) {
|
|
4094
4147
|
let t = {
|
|
4095
4148
|
name: e.id,
|
|
4096
4149
|
header: e.header,
|
|
@@ -4109,7 +4162,7 @@ function tu(e) {
|
|
|
4109
4162
|
if (!e.flag) return t;
|
|
4110
4163
|
for (let n = 0; n < e.flag.length; n++) {
|
|
4111
4164
|
let r = e.flag[n];
|
|
4112
|
-
if (Vi(
|
|
4165
|
+
if (Vi(nu, r)) {
|
|
4113
4166
|
switch (r) {
|
|
4114
4167
|
case "enum":
|
|
4115
4168
|
t.enum_list = e.enum;
|
|
@@ -4123,7 +4176,7 @@ function tu(e) {
|
|
|
4123
4176
|
case "file": t.is_file = !0;
|
|
4124
4177
|
}
|
|
4125
4178
|
t.type = r;
|
|
4126
|
-
} else if (Vi(
|
|
4179
|
+
} else if (Vi(tu, r)) switch (r) {
|
|
4127
4180
|
case "writable":
|
|
4128
4181
|
t.is_writable = !0;
|
|
4129
4182
|
break;
|
|
@@ -4136,7 +4189,7 @@ function tu(e) {
|
|
|
4136
4189
|
}
|
|
4137
4190
|
return t.is_file && (t.type = "file"), t;
|
|
4138
4191
|
}
|
|
4139
|
-
function
|
|
4192
|
+
function lu(e, t) {
|
|
4140
4193
|
let n = {
|
|
4141
4194
|
name: e,
|
|
4142
4195
|
header: e,
|
|
@@ -4154,9 +4207,9 @@ function nu(e, t) {
|
|
|
4154
4207
|
let e = t.split(".");
|
|
4155
4208
|
for (let t = 0; t < e.length; t++) {
|
|
4156
4209
|
let r = e[t];
|
|
4157
|
-
if (Vi(
|
|
4158
|
-
else if (Vi(
|
|
4159
|
-
else if (Vi(
|
|
4210
|
+
if (Vi(eu, r)) n.real_type || (n.real_type = r);
|
|
4211
|
+
else if (Vi(nu, r)) n.type || (n.type = r);
|
|
4212
|
+
else if (Vi(tu, r)) switch (r) {
|
|
4160
4213
|
case "writable":
|
|
4161
4214
|
n.is_writable = !0;
|
|
4162
4215
|
break;
|
|
@@ -4168,10 +4221,10 @@ function nu(e, t) {
|
|
|
4168
4221
|
}
|
|
4169
4222
|
}
|
|
4170
4223
|
n.real_type || (n.real_type = "string");
|
|
4171
|
-
} else Fo(t) ? (n =
|
|
4224
|
+
} else Fo(t) ? (n = ru(t), n.name || (n.name = e), n.header || (n.header = e)) : Mo(t) && (n.real_type = "array", n.enum_list = t);
|
|
4172
4225
|
return n.type || (n.type = n.real_type), n;
|
|
4173
4226
|
}
|
|
4174
|
-
function
|
|
4227
|
+
function ou(e, t) {
|
|
4175
4228
|
let n = {};
|
|
4176
4229
|
return t || (t = {}), Object.entries(e).forEach(([e, r]) => {
|
|
4177
4230
|
let l;
|
|
@@ -4180,23 +4233,23 @@ function ru(e, t) {
|
|
|
4180
4233
|
wo(n, e, o);
|
|
4181
4234
|
}), n;
|
|
4182
4235
|
}
|
|
4183
|
-
var
|
|
4236
|
+
var iu = [
|
|
4184
4237
|
k(O.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
4185
4238
|
k(O.DTP_BOOLEAN, "periodic", 0, 0, "True for periodic timeouts"),
|
|
4186
4239
|
k(O.DTP_INTEGER, "msec", 0, 0, "Timeout in milliseconds"),
|
|
4187
4240
|
I()
|
|
4188
|
-
],
|
|
4241
|
+
], su = {
|
|
4189
4242
|
periodic: !1,
|
|
4190
4243
|
msec: 0,
|
|
4191
4244
|
timer_id: -1
|
|
4192
|
-
},
|
|
4193
|
-
function
|
|
4245
|
+
}, uu = null;
|
|
4246
|
+
function au(e, t, n, r) {
|
|
4194
4247
|
let l = e.priv, o = l.periodic ? "EV_TIMEOUT_PERIODIC" : "EV_TIMEOUT";
|
|
4195
4248
|
return l.periodic && l.msec > 0 ? l.timer_id = setTimeout(function() {
|
|
4196
4249
|
or(e, "EV_TIMEOUT", {}, e);
|
|
4197
4250
|
}, l.msec) : l.timer_id = -1, Er(e, o, {}), l.periodic || -1 !== l.timer_id || Xt(e) && Yt(e), 0;
|
|
4198
4251
|
}
|
|
4199
|
-
var
|
|
4252
|
+
var cu = {
|
|
4200
4253
|
mt_create: function(e) {
|
|
4201
4254
|
let t = e.priv, n = Ln(e, "subscriber");
|
|
4202
4255
|
n ? dr(e, null, {}, n) : gn(e) && (n = _n(e), dr(e, null, {}, n)), t.periodic = In(e, "periodic"), t.msec = kn(e, "msec");
|
|
@@ -4220,34 +4273,34 @@ var uu = {
|
|
|
4220
4273
|
},
|
|
4221
4274
|
mt_destroy: function(e) {}
|
|
4222
4275
|
};
|
|
4223
|
-
function
|
|
4276
|
+
function _u() {
|
|
4224
4277
|
return function(e) {
|
|
4225
|
-
if (
|
|
4278
|
+
if (uu) return Hr(`GClass ALREADY created: ${e}`), -1;
|
|
4226
4279
|
const t = [["ST_IDLE", [[
|
|
4227
4280
|
"EV_TIMEOUT",
|
|
4228
|
-
|
|
4281
|
+
au,
|
|
4229
4282
|
null
|
|
4230
4283
|
]]]];
|
|
4231
|
-
return (
|
|
4284
|
+
return (uu = ut(e, [
|
|
4232
4285
|
["EV_TIMEOUT", Y.EVF_OUTPUT_EVENT],
|
|
4233
4286
|
["EV_TIMEOUT_PERIODIC", Y.EVF_OUTPUT_EVENT],
|
|
4234
4287
|
[0, 0]
|
|
4235
|
-
], t,
|
|
4288
|
+
], t, cu, 0, iu, su, 0, 0, 0, x.gcflag_manual_start)) ? 0 : -1;
|
|
4236
4289
|
}("C_TIMER");
|
|
4237
4290
|
}
|
|
4238
|
-
function
|
|
4291
|
+
function fu(e) {
|
|
4239
4292
|
return "number" == typeof e && Number.isFinite(e) ? Math.round(e) : e;
|
|
4240
4293
|
}
|
|
4241
|
-
function
|
|
4242
|
-
return e instanceof W ? "C_TIMER" !== un(e) ? (Hr("not C_TIMER GObj"), -1) : (Wn(e, "periodic", !1), void xn(e, "msec",
|
|
4294
|
+
function gu(e, t) {
|
|
4295
|
+
return e instanceof W ? "C_TIMER" !== un(e) ? (Hr("not C_TIMER GObj"), -1) : (Wn(e, "periodic", !1), void xn(e, "msec", fu(t))) : (Hr("not GObj TYPE"), -1);
|
|
4243
4296
|
}
|
|
4244
|
-
function
|
|
4245
|
-
return e instanceof W ? "C_TIMER" !== un(e) ? (Hr("not C_TIMER GObj"), -1) : (Wn(e, "periodic", !0), void xn(e, "msec",
|
|
4297
|
+
function du(e, t) {
|
|
4298
|
+
return e instanceof W ? "C_TIMER" !== un(e) ? (Hr("not C_TIMER GObj"), -1) : (Wn(e, "periodic", !0), void xn(e, "msec", fu(t))) : (Hr("not GObj TYPE"), -1);
|
|
4246
4299
|
}
|
|
4247
|
-
function
|
|
4300
|
+
function bu(e) {
|
|
4248
4301
|
return e instanceof W ? "C_TIMER" !== un(e) ? (Hr("not C_TIMER GObj"), -1) : void xn(e, "msec", -1) : (Hr("not GObj TYPE"), -1);
|
|
4249
4302
|
}
|
|
4250
|
-
var
|
|
4303
|
+
var pu = [
|
|
4251
4304
|
k(O.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
4252
4305
|
k(O.DTP_BOOLEAN, "browser_beforeunload", 0, !1, "Set true to refreshing browser"),
|
|
4253
4306
|
k(O.DTP_STRING, "__username__", 0, "", "Username"),
|
|
@@ -4267,35 +4320,35 @@ var du = [
|
|
|
4267
4320
|
k(O.DTP_BOOLEAN, "developer", 0, !1, "Developer mode enabled"),
|
|
4268
4321
|
k(O.DTP_INTEGER, "periodic_timeout", 0, "1000", "Timeout periodic, in miliseconds."),
|
|
4269
4322
|
I()
|
|
4270
|
-
],
|
|
4271
|
-
function
|
|
4323
|
+
], hu = { gobj_timer: null }, mu = null;
|
|
4324
|
+
function yu(e, t, n, r) {
|
|
4272
4325
|
let l = Dn(e, t);
|
|
4273
4326
|
return Fo(l) || (l = {}), l[n] = r, Un(e, t, l), Nt(e, t);
|
|
4274
4327
|
}
|
|
4275
|
-
var
|
|
4276
|
-
function
|
|
4328
|
+
var Eu = -2147483648, vu = 2147483647;
|
|
4329
|
+
function Tu(e) {
|
|
4277
4330
|
if (!0 === e || !1 === e) return e;
|
|
4278
|
-
if ("number" == typeof e) return !Number.isInteger(e) || e <
|
|
4331
|
+
if ("number" == typeof e) return !Number.isInteger(e) || e < Eu || e > vu ? null : 0 !== e;
|
|
4279
4332
|
if ("string" != typeof e || "" === e) return null;
|
|
4280
4333
|
let t = e.toLowerCase();
|
|
4281
4334
|
if ("set" === t) return !0;
|
|
4282
4335
|
if ("reset" === t) return !1;
|
|
4283
4336
|
if (/^-?(0|[1-9][0-9]*)$/.test(e)) {
|
|
4284
4337
|
let t = Number(e);
|
|
4285
|
-
return t <
|
|
4338
|
+
return t < Eu || t > vu ? null : 0 !== t;
|
|
4286
4339
|
}
|
|
4287
4340
|
return "true" === t || "yes" === t || "on" === t || "false" !== t && "no" !== t && "off" !== t && null;
|
|
4288
4341
|
}
|
|
4289
|
-
function
|
|
4342
|
+
function Ou() {
|
|
4290
4343
|
return `${ln()}^${rn()}`;
|
|
4291
4344
|
}
|
|
4292
|
-
function
|
|
4345
|
+
function Su(e, t, n, r) {
|
|
4293
4346
|
return Er(e, t, n), 0;
|
|
4294
4347
|
}
|
|
4295
|
-
var
|
|
4348
|
+
var ju = {
|
|
4296
4349
|
mt_create: function(e) {
|
|
4297
4350
|
let t = e.priv;
|
|
4298
|
-
Kn(e, "start_date", js()), Kn(e, "node_uuid",
|
|
4351
|
+
Kn(e, "start_date", js()), Kn(e, "node_uuid", As()), e.priv.gobj_timer = Lt(sn(e), "C_TIMER", {}, e), t.periodic_timeout = Dn(e, "periodic_timeout"), function(e) {
|
|
4299
4352
|
let t = Dn(e, "trace_levels");
|
|
4300
4353
|
if (!Fo(t)) return 0;
|
|
4301
4354
|
let n = t.__global_trace__;
|
|
@@ -4329,10 +4382,10 @@ var Ou = {
|
|
|
4329
4382
|
},
|
|
4330
4383
|
mt_writing: function(e, t) {},
|
|
4331
4384
|
mt_start: function(e) {
|
|
4332
|
-
return
|
|
4385
|
+
return du(e.priv.gobj_timer, e.priv.periodic_timeout), 0;
|
|
4333
4386
|
},
|
|
4334
4387
|
mt_stop: function(e) {
|
|
4335
|
-
return
|
|
4388
|
+
return bu(e.priv.gobj_timer), qt(e), 0;
|
|
4336
4389
|
},
|
|
4337
4390
|
mt_destroy: function(e) {},
|
|
4338
4391
|
mt_play: function(e) {
|
|
@@ -4349,35 +4402,35 @@ var Ou = {
|
|
|
4349
4402
|
case "get-global-no-trace": return o(0, 0, null, null, Oe());
|
|
4350
4403
|
case "set-global-trace":
|
|
4351
4404
|
case "set-global-no-trace": {
|
|
4352
|
-
let r = "set-global-no-trace" === t, l = n.level, i =
|
|
4353
|
-
return l ? null === i ? o(0, -1, `${
|
|
4405
|
+
let r = "set-global-no-trace" === t, l = n.level, i = Tu(n.set);
|
|
4406
|
+
return l ? null === i ? o(0, -1, `${Ou()}: bitmask set or re-set?`, null, null) : (r ? he(l, i) : pe(l, i)) < 0 ? o(0, -1, `${Ou()}: global trace level not found: ${l}`, null, null) : r ? (yu(e, "no_trace_levels", "__global_no_trace__", Oe()), o(0, 0, null, null, Oe())) : (yu(e, "trace_levels", "__global_trace__", Te()), o(0, 0, null, null, Te())) : o(0, -1, `${Ou()}: what level?`, null, null);
|
|
4354
4407
|
}
|
|
4355
4408
|
case "get-gclass-trace":
|
|
4356
4409
|
case "get-gclass-no-trace":
|
|
4357
4410
|
case "set-gclass-trace":
|
|
4358
4411
|
case "set-gclass-no-trace": {
|
|
4359
4412
|
let r = t.indexOf("no-trace") >= 0, l = n.gclass_name || n.gclass || "", i = mt(l);
|
|
4360
|
-
if (!i) return o(0, -1, `${
|
|
4413
|
+
if (!i) return o(0, -1, `${Ou()}: what gclass is '${l}'?`, null, null);
|
|
4361
4414
|
if (0 === t.indexOf("get-")) return o(0, 0, null, null, r ? Ne(i) : Se(i));
|
|
4362
|
-
let s = n.level, u =
|
|
4363
|
-
return s ? null === u ? o(0, -1, `${
|
|
4415
|
+
let s = n.level, u = Tu(n.set);
|
|
4416
|
+
return s ? null === u ? o(0, -1, `${Ou()}: bitmask set or re-set?`, null, null) : (r ? Ae(i, s, u) : we(i, s, u)) < 0 ? o(0, -1, `${Ou()}: trace level of ${l} not found: ${s}`, null, null) : r ? (yu(e, "no_trace_levels", l, Ne(i)), o(0, 0, null, null, Ne(i))) : (yu(e, "trace_levels", l, je(i)), o(0, 0, null, null, Se(i))) : o(0, -1, `${Ou()}: what level?`, null, null);
|
|
4364
4417
|
}
|
|
4365
|
-
default: return o(0, -1, `${
|
|
4418
|
+
default: return o(0, -1, `${Ou()}: command not available: ${t}`, null, null);
|
|
4366
4419
|
}
|
|
4367
4420
|
}
|
|
4368
4421
|
};
|
|
4369
|
-
function
|
|
4422
|
+
function Nu() {
|
|
4370
4423
|
return function(e) {
|
|
4371
|
-
if (
|
|
4424
|
+
if (mu) return Hr(`GClass ALREADY created: ${e}`), -1;
|
|
4372
4425
|
const t = [["ST_IDLE", [[
|
|
4373
4426
|
"EV_TIMEOUT_PERIODIC",
|
|
4374
|
-
|
|
4427
|
+
Su,
|
|
4375
4428
|
null
|
|
4376
4429
|
]]]];
|
|
4377
|
-
return (
|
|
4430
|
+
return (mu = ut(e, [["EV_TIMEOUT_PERIODIC", Y.EVF_OUTPUT_EVENT | Y.EVF_NO_WARN_SUBS], [0, 0]], t, ju, 0, pu, hu, 0, 0, 0, 0)) ? 0 : -1;
|
|
4378
4431
|
}("C_YUNO");
|
|
4379
4432
|
}
|
|
4380
|
-
var
|
|
4433
|
+
var $u = "ievent_gate_stack", wu = [
|
|
4381
4434
|
k(O.DTP_STRING, "wanted_yuno_role", D.SDF_RD, "", "wanted yuno role"),
|
|
4382
4435
|
k(O.DTP_STRING, "wanted_yuno_name", D.SDF_RD, "", "wanted yuno name"),
|
|
4383
4436
|
k(O.DTP_STRING, "wanted_yuno_service", D.SDF_RD, "", "wanted yuno service"),
|
|
@@ -4389,20 +4442,20 @@ var ju = "ievent_gate_stack", Nu = [
|
|
|
4389
4442
|
k(O.DTP_STRING, "cert_pem", D.SDF_PERSIST, "", "SSL server certification, PEM str format"),
|
|
4390
4443
|
k(O.DTP_JSON, "extra_info", D.SDF_RD, "{}", "dict data set by user, added to the identity card msg."),
|
|
4391
4444
|
k(O.DTP_LIST, "required_services", D.SDF_RD, "[]", "Services this LINK requires (identity card). Empty = the yuno's `required_services`, as before. A yuno with several links to DIFFERENT backends must set it per link: the yuno-wide list is the union, so every backend is told the service names of all the others."),
|
|
4392
|
-
k(O.DTP_INTEGER, "timeout_retry", D.SDF_RD, "5000", "
|
|
4445
|
+
k(O.DTP_INTEGER, "timeout_retry", D.SDF_RD, "5000", "Base of the first reconnect delay (ms, ±20% jitter), at least 1000. It BACKS OFF from here, doubling up to timeout_retry_max, and resets when a session is reached"),
|
|
4393
4446
|
k(O.DTP_INTEGER, "timeout_retry_max", D.SDF_RD, "60000", "Cap of the reconnect backoff (ms). Set it equal to timeout_retry for the old fixed-interval behaviour"),
|
|
4394
4447
|
k(O.DTP_INTEGER, "timeout_idack", D.SDF_RD, "5000", "timeout waiting idAck"),
|
|
4395
4448
|
k(O.DTP_POINTER, "subscriber", 0, 0, "subscriber of output-events. If null then subscriber is the parent"),
|
|
4396
4449
|
I()
|
|
4397
|
-
],
|
|
4450
|
+
], Ru = [
|
|
4398
4451
|
["ievents", "Trace inter-events with metadata of kw"],
|
|
4399
4452
|
["ievents2", "Trace inter-events with full kw"],
|
|
4400
4453
|
["identity-card", "Trace identity_card messages"]
|
|
4401
4454
|
];
|
|
4402
|
-
function
|
|
4455
|
+
function Au(e) {
|
|
4403
4456
|
return !!(3 & ue(e));
|
|
4404
4457
|
}
|
|
4405
|
-
var
|
|
4458
|
+
var Du = {
|
|
4406
4459
|
url: null,
|
|
4407
4460
|
remote_yuno_name: null,
|
|
4408
4461
|
remote_yuno_role: null,
|
|
@@ -4415,8 +4468,8 @@ var Ru = {
|
|
|
4415
4468
|
retry_ms_before_session: 0,
|
|
4416
4469
|
session_since: 0,
|
|
4417
4470
|
retry_floor_warned: !1
|
|
4418
|
-
},
|
|
4419
|
-
function
|
|
4471
|
+
}, Cu = null;
|
|
4472
|
+
function Iu(e) {
|
|
4420
4473
|
e.priv.websocket && Hr("Websocket ALREADY setup");
|
|
4421
4474
|
const t = Pn(e, "url");
|
|
4422
4475
|
Xr(`====> Starting WebSocket to '${t}' (${an(e)})`);
|
|
@@ -4431,7 +4484,7 @@ function Du(e) {
|
|
|
4431
4484
|
code: 1006,
|
|
4432
4485
|
reason: r.message,
|
|
4433
4486
|
was_clean: !1
|
|
4434
|
-
}, e) < 0 &&
|
|
4487
|
+
}, e) < 0 && gu(e.priv.gobj_timer, Hu(e)), null;
|
|
4435
4488
|
}
|
|
4436
4489
|
return r ? (r.onopen = () => {
|
|
4437
4490
|
n !== e.priv.ws_seq || dn(e) || or(e, "EV_ON_OPEN", {
|
|
@@ -4453,7 +4506,7 @@ function Du(e) {
|
|
|
4453
4506
|
}, e));
|
|
4454
4507
|
}, r) : (Hr(`${an(e)}: Failed to initialize WebSocket.`), null);
|
|
4455
4508
|
}
|
|
4456
|
-
function
|
|
4509
|
+
function ku(e, t = 1e3, n = "") {
|
|
4457
4510
|
let r = e.priv, l = r.websocket;
|
|
4458
4511
|
if (r.websocket = null, l && l.readyState !== WebSocket.CLOSED && l.readyState !== WebSocket.CLOSING) {
|
|
4459
4512
|
Xr(`Closing WebSocket (Code: ${t}, Reason: "${n}")`);
|
|
@@ -4464,12 +4517,12 @@ function Cu(e, t = 1e3, n = "") {
|
|
|
4464
4517
|
}
|
|
4465
4518
|
} else zr("WebSocket is already closed or in the process of closing.");
|
|
4466
4519
|
}
|
|
4467
|
-
function
|
|
4520
|
+
function Pu(e, t) {
|
|
4468
4521
|
let n = e.priv;
|
|
4469
|
-
"ST_SESSION" === Yn(e) && (performance.now() - n.session_since <
|
|
4522
|
+
"ST_SESSION" === Yn(e) && (performance.now() - n.session_since < qu(e).max && (n.retry_ms = n.retry_ms_before_session), n.retry_ms_before_session = 0), ku(e, 4002, t);
|
|
4470
4523
|
}
|
|
4471
|
-
var
|
|
4472
|
-
function
|
|
4524
|
+
var Lu = 128;
|
|
4525
|
+
function Uu(e, t) {
|
|
4473
4526
|
let n = String(e), r = fo(n);
|
|
4474
4527
|
if (null !== r && (n = r), n.length > t) {
|
|
4475
4528
|
let e = t, r = n.charCodeAt(e);
|
|
@@ -4477,7 +4530,7 @@ function Pu(e, t) {
|
|
|
4477
4530
|
}
|
|
4478
4531
|
return n;
|
|
4479
4532
|
}
|
|
4480
|
-
function
|
|
4533
|
+
function Fu(e, t, n) {
|
|
4481
4534
|
let r = js();
|
|
4482
4535
|
try {
|
|
4483
4536
|
Xr("\n" + r + " " + t + "\n"), yo(n);
|
|
@@ -4485,17 +4538,17 @@ function Lu(e, t, n) {
|
|
|
4485
4538
|
Xr("ERROR in trace_inter_event: " + e);
|
|
4486
4539
|
}
|
|
4487
4540
|
}
|
|
4488
|
-
var
|
|
4541
|
+
var Mu = class {
|
|
4489
4542
|
constructor(e, t) {
|
|
4490
4543
|
this.event = e, this.kw = t || {};
|
|
4491
4544
|
}
|
|
4492
4545
|
};
|
|
4493
|
-
function
|
|
4546
|
+
function Gu(e, t, n, r) {
|
|
4494
4547
|
return function(e, t) {
|
|
4495
4548
|
let n = e.priv, r = JSON.stringify(t);
|
|
4496
|
-
if (
|
|
4549
|
+
if (Au(e)) {
|
|
4497
4550
|
let n = Pn(e, "url"), l = sn(nn()) + " ==> " + n, o = Dn(nn(), "trace_ievent_callback");
|
|
4498
|
-
o ? o(l, t, 1, r.length) :
|
|
4551
|
+
o ? o(l, t, 1, r.length) : Fu(0, l, t);
|
|
4499
4552
|
}
|
|
4500
4553
|
if (!n.websocket || n.websocket.readyState !== WebSocket.OPEN) return zr(`${an(e)}: send_iev(): websocket not open, message lost`), -1;
|
|
4501
4554
|
try {
|
|
@@ -4505,10 +4558,10 @@ function Fu(e, t, n, r) {
|
|
|
4505
4558
|
}
|
|
4506
4559
|
return 0;
|
|
4507
4560
|
}(e, function(e, t) {
|
|
4508
|
-
return qo(e) ? (Hr("iev_create() event NULL"), null) : new
|
|
4561
|
+
return qo(e) ? (Hr("iev_create() event NULL"), null) : new Mu(e, t);
|
|
4509
4562
|
}(t, n));
|
|
4510
4563
|
}
|
|
4511
|
-
function
|
|
4564
|
+
function Vu(e, t, n) {
|
|
4512
4565
|
return qo(n) && (n = Pn(e, "wanted_yuno_service")), {
|
|
4513
4566
|
dst_yuno: Pn(e, "wanted_yuno_name"),
|
|
4514
4567
|
dst_role: Pn(e, "wanted_yuno_role"),
|
|
@@ -4516,10 +4569,10 @@ function Mu(e, t, n) {
|
|
|
4516
4569
|
src_yuno: rn(),
|
|
4517
4570
|
src_role: ln(),
|
|
4518
4571
|
src_service: t,
|
|
4519
|
-
host:
|
|
4572
|
+
host: As()
|
|
4520
4573
|
};
|
|
4521
4574
|
}
|
|
4522
|
-
function
|
|
4575
|
+
function Wu(e) {
|
|
4523
4576
|
let t = e.priv, n = tn(nn()), r = Pn(nn(), "yuno_version"), l = Pn(nn(), "yuno_release"), o = Pn(nn(), "yuno_tag"), i = Dn(e, "required_services");
|
|
4524
4577
|
i && i.length || (i = Dn(nn(), "required_services"));
|
|
4525
4578
|
let s = {
|
|
@@ -4537,32 +4590,32 @@ function Gu(e) {
|
|
|
4537
4590
|
username: Pn(nn(), "__username__"),
|
|
4538
4591
|
launch_id: 0,
|
|
4539
4592
|
yuno_startdate: Pn(nn(), "start_date"),
|
|
4540
|
-
id:
|
|
4593
|
+
id: As(),
|
|
4541
4594
|
user_agent: "undefined" != typeof window ? window.navigator.userAgent : "",
|
|
4542
4595
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
4543
4596
|
required_services: i
|
|
4544
4597
|
};
|
|
4545
|
-
return Yi(e, s,
|
|
4598
|
+
return Yi(e, s, $u, Vu(e, sn(_n(e)), null)), qi(e, s, "__identity__"), gu(t.gobj_timer, kn(e, "timeout_idack")), Gu(e, "EV_IDENTITY_CARD", s);
|
|
4546
4599
|
}
|
|
4547
|
-
function
|
|
4600
|
+
function xu(e, t) {
|
|
4548
4601
|
if (qo(t.event)) return -1;
|
|
4549
4602
|
let n = {}, r = t.__global__, l = t.__config__, o = t.__filter__, i = t.__service__, s = t.subscriber;
|
|
4550
4603
|
l && (n.__config__ = l), r && (n.__global__ = r), o && (n.__filter__ = o);
|
|
4551
|
-
return Yi(e, n,
|
|
4604
|
+
return Yi(e, n, $u, Vu(e, sn(s), i)), qi(e, n, "__subscribing__"), Gu(e, t.event, n);
|
|
4552
4605
|
}
|
|
4553
|
-
function
|
|
4606
|
+
function Ku(e, t, n, r) {
|
|
4554
4607
|
let l = e.priv;
|
|
4555
|
-
return Xt(e) && (l.websocket =
|
|
4608
|
+
return Xt(e) && (l.websocket = Iu(e)), 0;
|
|
4556
4609
|
}
|
|
4557
|
-
function
|
|
4558
|
-
return Xr("Websocket opened: " + e.priv.url),
|
|
4610
|
+
function Bu(e, t, n, r) {
|
|
4611
|
+
return Xr("Websocket opened: " + e.priv.url), Wu(e), 0;
|
|
4559
4612
|
}
|
|
4560
|
-
function
|
|
4613
|
+
function Yu(e, t, n, r) {
|
|
4561
4614
|
let l = e.priv, o = n.url;
|
|
4562
4615
|
if (void 0 !== n.ws_seq && n.ws_seq !== l.ws_seq) return 0;
|
|
4563
4616
|
Vr();
|
|
4564
|
-
const i =
|
|
4565
|
-
return
|
|
4617
|
+
const i = Uu(void 0 === n.reason ? "" : n.reason, 256);
|
|
4618
|
+
return Au(e) && Zr(`${an(e)}: WebSocket closed ${o} (Code: ${n.code}, Reason: "${i}", Clean: ${n.was_clean})`), l.websocket && (l.websocket.onopen = null, l.websocket.onmessage = null, l.websocket.onerror = null, l.websocket.onclose = null, l.websocket = null), l.inform_on_close ? (l.inform_on_close = !1, (!n.was_clean || 1e3 !== n.code && 1001 !== n.code) && Xt(e) && zr(`${an(e)}: session closed ${o} (Code: ${n.code}, Reason: "${i}", Clean: ${n.was_clean})`), Er(e, "EV_ON_CLOSE", {
|
|
4566
4619
|
url: o,
|
|
4567
4620
|
remote_yuno_name: l.remote_yuno_name,
|
|
4568
4621
|
remote_yuno_role: l.remote_yuno_role,
|
|
@@ -4578,33 +4631,33 @@ function Ku(e, t, n, r) {
|
|
|
4578
4631
|
code: n.code,
|
|
4579
4632
|
reason: i,
|
|
4580
4633
|
was_clean: n.was_clean
|
|
4581
|
-
})), Xt(e) &&
|
|
4634
|
+
})), Xt(e) && gu(l.gobj_timer, Hu(e)), 0;
|
|
4582
4635
|
}
|
|
4583
|
-
var
|
|
4584
|
-
function
|
|
4636
|
+
var Ju = 1e3;
|
|
4637
|
+
function qu(e) {
|
|
4585
4638
|
let t = e.priv, n = kn(e, "timeout_retry"), r = kn(e, "timeout_retry_max");
|
|
4586
|
-
return n >=
|
|
4639
|
+
return n >= Ju || (t.retry_floor_warned || (t.retry_floor_warned = !0, zr(`${an(e)}: timeout_retry ${n} ms is below ${Ju} ms: ${Ju} ms is used`)), n = Ju), r >= n || (r = n), {
|
|
4587
4640
|
base: n,
|
|
4588
4641
|
max: r
|
|
4589
4642
|
};
|
|
4590
4643
|
}
|
|
4591
|
-
function
|
|
4644
|
+
function Hu(e) {
|
|
4592
4645
|
let t = e.priv;
|
|
4593
|
-
const { base: n, max: r } =
|
|
4646
|
+
const { base: n, max: r } = qu(e);
|
|
4594
4647
|
t.retry_ms = t.retry_ms ? Math.min(2 * t.retry_ms, r) : n;
|
|
4595
4648
|
let l = .2 * t.retry_ms, o = t.retry_ms - l + 2 * Math.random() * l;
|
|
4596
4649
|
return Math.max(1, Math.round(o));
|
|
4597
4650
|
}
|
|
4598
|
-
function
|
|
4599
|
-
return
|
|
4651
|
+
function zu(e, t, n, r) {
|
|
4652
|
+
return Wu(e), 0;
|
|
4600
4653
|
}
|
|
4601
|
-
function
|
|
4654
|
+
function Qu(e, t, n, r) {
|
|
4602
4655
|
let l = e.priv;
|
|
4603
|
-
|
|
4604
|
-
let o = Ji(e, n,
|
|
4656
|
+
bu(l.gobj_timer);
|
|
4657
|
+
let o = Ji(e, n, $u, !0), i = gi(e, o, "src_yuno", ""), s = gi(e, o, "src_role", ""), u = gi(e, o, "src_service", "");
|
|
4605
4658
|
Kn(e, "remote_yuno_name", i), Kn(e, "remote_yuno_role", s), Kn(e, "remote_yuno_service", u);
|
|
4606
4659
|
let a = _i(e, n, "result", -1, 0), c = gi(e, n, "comment", "", 0), _ = gi(e, n, "username", "", 0), f = pi(e, n, "services_roles", {});
|
|
4607
|
-
if (a < 0)
|
|
4660
|
+
if (a < 0) ku(e), Er(e, "EV_ON_ID_NAK", {
|
|
4608
4661
|
url: Pn(e, "url"),
|
|
4609
4662
|
result: a,
|
|
4610
4663
|
comment: c,
|
|
@@ -4621,11 +4674,11 @@ function Hu(e, t, n, r) {
|
|
|
4621
4674
|
services_roles: f
|
|
4622
4675
|
})), l.inside_on_open = !1, function(e) {
|
|
4623
4676
|
let t = hr(e, null, null, null);
|
|
4624
|
-
for (let n = 0; n < t.length; n++)
|
|
4677
|
+
for (let n = 0; n < t.length; n++) xu(e, t[n]);
|
|
4625
4678
|
}(e);
|
|
4626
4679
|
return 0;
|
|
4627
4680
|
}
|
|
4628
|
-
function
|
|
4681
|
+
function Xu(e, t, n, r) {
|
|
4629
4682
|
let l = e.priv.url, o = function(e, t) {
|
|
4630
4683
|
let n;
|
|
4631
4684
|
try {
|
|
@@ -4644,49 +4697,49 @@ function zu(e, t, n, r) {
|
|
|
4644
4697
|
kw: l || {}
|
|
4645
4698
|
} : (zr(`${an(e)}: parsing inter_event: kw not a json object`), null) : (zr(`${an(e)}: parsing inter_kw: no kw`), null);
|
|
4646
4699
|
}(e, n.data);
|
|
4647
|
-
if (!o) return zr(`${an(e)}: frame dropped from ${l}: ${
|
|
4648
|
-
if (
|
|
4700
|
+
if (!o) return zr(`${an(e)}: frame dropped from ${l}: ${Uu(n.data, 256)}`), -1;
|
|
4701
|
+
if (Au(e)) {
|
|
4649
4702
|
let e = sn(nn()) + " <== " + l, t = n.data.length, r = Dn(nn(), "trace_ievent_callback");
|
|
4650
|
-
r ? r(e, o, 2, t) :
|
|
4703
|
+
r ? r(e, o, 2, t) : Fu(0, e, o);
|
|
4651
4704
|
}
|
|
4652
4705
|
let i = o.event, s = o.kw;
|
|
4653
4706
|
if ("ST_SESSION" !== Yn(e)) {
|
|
4654
4707
|
if ("ev_identity_card_ack" === String(i).toLowerCase()) {
|
|
4655
4708
|
if (!(or(e, "EV_IDENTITY_CARD_ACK", s, e) < 0)) return 0;
|
|
4656
|
-
} else zr(`${an(e)}: event UNKNOWN in not-session state ${
|
|
4657
|
-
return
|
|
4709
|
+
} else zr(`${an(e)}: event UNKNOWN in not-session state ${Uu(i, Lu)}`);
|
|
4710
|
+
return Pu(e, "event out of session"), -1;
|
|
4658
4711
|
}
|
|
4659
4712
|
o = null;
|
|
4660
|
-
let u = Hi(e, s), a = Ji(e, s,
|
|
4661
|
-
if (!qo(c) && c.toLowerCase() !== String(ln()).toLowerCase()) return zr(`${an(e)}: It's not my role, dst_role: ${
|
|
4713
|
+
let u = Hi(e, s), a = Ji(e, s, $u), c = gi(e, a, "dst_role", "");
|
|
4714
|
+
if (!qo(c) && c.toLowerCase() !== String(ln()).toLowerCase()) return zr(`${an(e)}: It's not my role, dst_role: ${Uu(c, Lu)}, my_role: ${ln()}, event: ${Uu(i, Lu)}`), Pu(e, "not my role"), -1;
|
|
4662
4715
|
let _ = gi(e, a, "dst_yuno", "");
|
|
4663
|
-
if (!qo(_) && _.toLowerCase() !== String(rn()).toLowerCase()) return zr(`${an(e)}: It's not my name, dst_yuno: ${
|
|
4716
|
+
if (!qo(_) && _.toLowerCase() !== String(rn()).toLowerCase()) return zr(`${an(e)}: It's not my name, dst_yuno: ${Uu(_, Lu)}, my_name: ${rn()}, event: ${Uu(i, Lu)}`), Pu(e, "not my name"), -1;
|
|
4664
4717
|
let f = gi(e, a, "dst_service", "");
|
|
4665
|
-
if ("__subscribing__" === u) return zr(`${an(e)}: subscription event ignored, I'm client (service: ${
|
|
4666
|
-
if ("__unsubscribing__" === u) return zr(`${an(e)}: unsubscription event ignored, I'm client (service: ${
|
|
4718
|
+
if ("__subscribing__" === u) return zr(`${an(e)}: subscription event ignored, I'm client (service: ${Uu(f, Lu)}, event: ${Uu(i, Lu)})`), -1;
|
|
4719
|
+
if ("__unsubscribing__" === u) return zr(`${an(e)}: unsubscription event ignored, I'm client (service: ${Uu(f, Lu)}, event: ${Uu(i, Lu)})`), -1;
|
|
4667
4720
|
const g = sr(i, 0, !1);
|
|
4668
4721
|
if (g && Hn(e, g.event_name, 0)) {
|
|
4669
4722
|
const t = g.event_name;
|
|
4670
|
-
return Hn(e, t, Y.EVF_PUBLIC_EVENT) && "EV_IDENTITY_CARD_ACK" !== t ? (or(e, t, s, e), 0) : (zr(`${an(e)}: event of the transport itself, or out of its place, DROPPED: ev '${
|
|
4723
|
+
return Hn(e, t, Y.EVF_PUBLIC_EVENT) && "EV_IDENTITY_CARD_ACK" !== t ? (or(e, t, s, e), 0) : (zr(`${an(e)}: event of the transport itself, or out of its place, DROPPED: ev '${Uu(i, Lu)}'`), -1);
|
|
4671
4724
|
}
|
|
4672
4725
|
if (!qo(f)) {
|
|
4673
4726
|
let t = vt(f, !1);
|
|
4674
|
-
return t ? Hn(t, i, Y.EVF_PUBLIC_EVENT) ? (or(t, i, s, e), 0) : (zr(`${an(e)}: Service found but no event or not public, DROPPED: service '${an(t)}', ev '${
|
|
4727
|
+
return t ? Hn(t, i, Y.EVF_PUBLIC_EVENT) ? (or(t, i, s, e), 0) : (zr(`${an(e)}: Service found but no event or not public, DROPPED: service '${an(t)}', ev '${Uu(i, Lu)}'`), -1) : (zr(`${an(e)}: event for a service that is gone, DROPPED: service '${Uu(f, Lu)}', ev '${Uu(i, Lu)}'`), 0);
|
|
4675
4728
|
}
|
|
4676
4729
|
let d = sr(i, Y.EVF_PUBLIC_EVENT, !1);
|
|
4677
|
-
return d ? (Er(e, d.event_name, s), 0) : (zr(`${an(e)}: event that no gclass declares public, DROPPED: ev '${
|
|
4730
|
+
return d ? (Er(e, d.event_name, s), 0) : (zr(`${an(e)}: event that no gclass declares public, DROPPED: ev '${Uu(i, Lu)}'`), -1);
|
|
4678
4731
|
}
|
|
4679
|
-
function
|
|
4732
|
+
function Zu(e, t, n, r) {
|
|
4680
4733
|
const l = n && "string" == typeof n[r] ? n[r] : "", o = n && "string" == typeof n.service ? n.service : "";
|
|
4681
|
-
return zr(`${an(e)}: ${t} not served by this client, DROPPED: ${r.replace(/_/g, "")} '${
|
|
4734
|
+
return zr(`${an(e)}: ${t} not served by this client, DROPPED: ${r.replace(/_/g, "")} '${Uu(l, Lu)}', service '${Uu(o, Lu)}'`), -1;
|
|
4682
4735
|
}
|
|
4683
|
-
function
|
|
4684
|
-
return
|
|
4736
|
+
function ea(e, t, n, r) {
|
|
4737
|
+
return Zu(e, t, n, "__stats__");
|
|
4685
4738
|
}
|
|
4686
|
-
function
|
|
4687
|
-
return
|
|
4739
|
+
function ta(e, t, n, r) {
|
|
4740
|
+
return Zu(e, t, n, "__command__");
|
|
4688
4741
|
}
|
|
4689
|
-
var
|
|
4742
|
+
var na = {
|
|
4690
4743
|
mt_create: function(e) {
|
|
4691
4744
|
let t = e.priv;
|
|
4692
4745
|
t.gobj_timer = Lt(sn(e), "C_TIMER", {}, e), t.ws_seq = 0, t.url = Pn(e, "url"), t.remote_yuno_name = Pn(e, "remote_yuno_name"), t.remote_yuno_role = Pn(e, "remote_yuno_role"), t.remote_yuno_service = Pn(e, "remote_yuno_service"), Kn(e, "wanted_yuno_name", t.remote_yuno_name), Kn(e, "wanted_yuno_role", t.remote_yuno_role), Kn(e, "wanted_yuno_service", t.remote_yuno_service);
|
|
@@ -4716,43 +4769,43 @@ var ea = {
|
|
|
4716
4769
|
code: 1e3,
|
|
4717
4770
|
reason: "restarted",
|
|
4718
4771
|
was_clean: !0
|
|
4719
|
-
}, e),
|
|
4772
|
+
}, e), bu(t.gobj_timer)), t.websocket = Iu(e), 0;
|
|
4720
4773
|
},
|
|
4721
4774
|
mt_stop: function(e) {
|
|
4722
4775
|
let t = e.priv;
|
|
4723
|
-
return
|
|
4776
|
+
return bu(t.gobj_timer), t.websocket && ku(e), 0;
|
|
4724
4777
|
},
|
|
4725
4778
|
mt_destroy: function(e) {},
|
|
4726
4779
|
mt_stats: function(e, t, n, r) {
|
|
4727
4780
|
if ("ST_SESSION" !== Yn(e)) return Hr("Not in session"), null;
|
|
4728
4781
|
n || (n = {});
|
|
4729
|
-
let l =
|
|
4782
|
+
let l = Vu(e, sn(r), gi(e, n, "service", null, 0)), o = pi(e, n, "__md_stats__", null, Or.KW_EXTRACT);
|
|
4730
4783
|
return o || (o = {}), Yi(e, n, "stats_stack", {
|
|
4731
4784
|
stats: t,
|
|
4732
4785
|
kw: o
|
|
4733
|
-
}), Yi(e, n,
|
|
4786
|
+
}), Yi(e, n, $u, l), n.__stats__ = t, qi(e, n, "__stats__"), Gu(e, "EV_MT_STATS", n, r), null;
|
|
4734
4787
|
},
|
|
4735
4788
|
mt_command_parser: function(e, t, n, r) {
|
|
4736
4789
|
if ("ST_SESSION" !== Yn(e)) return Hr("Not in session"), null;
|
|
4737
4790
|
n || (n = {});
|
|
4738
|
-
let l =
|
|
4791
|
+
let l = Vu(e, sn(r), gi(e, n, "service", "", 0)), o = pi(e, n, "__md_command__", null, Or.KW_EXTRACT);
|
|
4739
4792
|
return o || (o = {}), Yi(e, n, "command_stack", {
|
|
4740
4793
|
command: t,
|
|
4741
4794
|
kw: o
|
|
4742
|
-
}), Yi(e, n,
|
|
4795
|
+
}), Yi(e, n, $u, l), n.__command__ = t, qi(e, n, "__command__"), Gu(e, "EV_MT_COMMAND", n, r), null;
|
|
4743
4796
|
},
|
|
4744
4797
|
mt_inject_event: function(e, t, n, r) {
|
|
4745
4798
|
if ("ST_SESSION" !== Yn(e)) return window.console.error("Not in session"), -1;
|
|
4746
|
-
if (n = Oo({}, Fo(n) ? n : {}), Fo(n.__md_iev__) && (n.__md_iev__ = Eo(n.__md_iev__)), Ji(e, n,
|
|
4799
|
+
if (n = Oo({}, Fo(n) ? n : {}), Fo(n.__md_iev__) && (n.__md_iev__ = Eo(n.__md_iev__)), Ji(e, n, $u));
|
|
4747
4800
|
else {
|
|
4748
|
-
let l =
|
|
4749
|
-
$o(n, "__service__"), Yi(e, n, "__message__", t), Yi(e, n,
|
|
4801
|
+
let l = Vu(e, sn(r), gi(e, n, "__service__", 0, 0));
|
|
4802
|
+
$o(n, "__service__"), Yi(e, n, "__message__", t), Yi(e, n, $u, l);
|
|
4750
4803
|
}
|
|
4751
|
-
return qi(e, n, "__message__"),
|
|
4804
|
+
return qi(e, n, "__message__"), Gu(e, t, n, r);
|
|
4752
4805
|
},
|
|
4753
4806
|
mt_subscription_added: function(e, t) {
|
|
4754
4807
|
let n = e.priv;
|
|
4755
|
-
return "ST_SESSION" === Yn(e) && n.websocket ? n.inside_on_open ? 0 :
|
|
4808
|
+
return "ST_SESSION" === Yn(e) && n.websocket ? n.inside_on_open ? 0 : xu(e, t) : 0;
|
|
4756
4809
|
},
|
|
4757
4810
|
mt_subscription_deleted: function(e, t) {
|
|
4758
4811
|
let n = e.priv;
|
|
@@ -4761,27 +4814,27 @@ var ea = {
|
|
|
4761
4814
|
if (qo(t.event)) return 0;
|
|
4762
4815
|
let r = {}, l = t.__global__, o = t.__config__, i = t.__filter__, s = t.__service__, u = t.subscriber;
|
|
4763
4816
|
o && (r.__config__ = o), l && (r.__global__ = l), i && (r.__filter__ = i);
|
|
4764
|
-
return Yi(e, r,
|
|
4817
|
+
return Yi(e, r, $u, Vu(e, sn(u), s)), qi(e, r, "__unsubscribing__"), Gu(e, t.event, r, e);
|
|
4765
4818
|
}
|
|
4766
4819
|
};
|
|
4767
|
-
function
|
|
4820
|
+
function ra() {
|
|
4768
4821
|
return function(e) {
|
|
4769
|
-
if (
|
|
4822
|
+
if (Cu) return Hr(`GClass ALREADY created: ${e}`), -1;
|
|
4770
4823
|
const t = [
|
|
4771
4824
|
["ST_DISCONNECTED", [
|
|
4772
4825
|
[
|
|
4773
4826
|
"EV_ON_OPEN",
|
|
4774
|
-
|
|
4827
|
+
Bu,
|
|
4775
4828
|
"ST_WAIT_IDENTITY_CARD_ACK"
|
|
4776
4829
|
],
|
|
4777
4830
|
[
|
|
4778
4831
|
"EV_ON_CLOSE",
|
|
4779
|
-
|
|
4832
|
+
Yu,
|
|
4780
4833
|
null
|
|
4781
4834
|
],
|
|
4782
4835
|
[
|
|
4783
4836
|
"EV_TIMEOUT",
|
|
4784
|
-
|
|
4837
|
+
Ku,
|
|
4785
4838
|
null
|
|
4786
4839
|
],
|
|
4787
4840
|
[
|
|
@@ -4793,22 +4846,22 @@ function ta() {
|
|
|
4793
4846
|
["ST_WAIT_IDENTITY_CARD_ACK", [
|
|
4794
4847
|
[
|
|
4795
4848
|
"EV_ON_MESSAGE",
|
|
4796
|
-
|
|
4849
|
+
Xu,
|
|
4797
4850
|
null
|
|
4798
4851
|
],
|
|
4799
4852
|
[
|
|
4800
4853
|
"EV_IDENTITY_CARD_ACK",
|
|
4801
|
-
|
|
4854
|
+
Qu,
|
|
4802
4855
|
null
|
|
4803
4856
|
],
|
|
4804
4857
|
[
|
|
4805
4858
|
"EV_ON_CLOSE",
|
|
4806
|
-
|
|
4859
|
+
Yu,
|
|
4807
4860
|
"ST_DISCONNECTED"
|
|
4808
4861
|
],
|
|
4809
4862
|
[
|
|
4810
4863
|
"EV_TIMEOUT",
|
|
4811
|
-
|
|
4864
|
+
zu,
|
|
4812
4865
|
null
|
|
4813
4866
|
],
|
|
4814
4867
|
[
|
|
@@ -4820,22 +4873,22 @@ function ta() {
|
|
|
4820
4873
|
["ST_SESSION", [
|
|
4821
4874
|
[
|
|
4822
4875
|
"EV_ON_MESSAGE",
|
|
4823
|
-
|
|
4876
|
+
Xu,
|
|
4824
4877
|
null
|
|
4825
4878
|
],
|
|
4826
4879
|
[
|
|
4827
4880
|
"EV_MT_STATS",
|
|
4828
|
-
|
|
4881
|
+
ea,
|
|
4829
4882
|
null
|
|
4830
4883
|
],
|
|
4831
4884
|
[
|
|
4832
4885
|
"EV_MT_COMMAND",
|
|
4833
|
-
|
|
4886
|
+
ta,
|
|
4834
4887
|
null
|
|
4835
4888
|
],
|
|
4836
4889
|
[
|
|
4837
4890
|
"EV_ON_CLOSE",
|
|
4838
|
-
|
|
4891
|
+
Yu,
|
|
4839
4892
|
"ST_DISCONNECTED"
|
|
4840
4893
|
],
|
|
4841
4894
|
[
|
|
@@ -4846,7 +4899,7 @@ function ta() {
|
|
|
4846
4899
|
]],
|
|
4847
4900
|
[null, null]
|
|
4848
4901
|
];
|
|
4849
|
-
return (
|
|
4902
|
+
return (Cu = ut(e, [
|
|
4850
4903
|
["EV_ON_MESSAGE", Y.EVF_OUTPUT_EVENT],
|
|
4851
4904
|
["EV_IDENTITY_CARD_ACK", Y.EVF_PUBLIC_EVENT],
|
|
4852
4905
|
["EV_ON_ID_NAK", Y.EVF_OUTPUT_EVENT],
|
|
@@ -4857,9 +4910,9 @@ function ta() {
|
|
|
4857
4910
|
["EV_ON_OPEN_ERROR", Y.EVF_OUTPUT_EVENT | Y.EVF_NO_WARN_SUBS],
|
|
4858
4911
|
["EV_TIMEOUT", 0],
|
|
4859
4912
|
[null, 0]
|
|
4860
|
-
], t,
|
|
4913
|
+
], t, na, 0, wu, Du, 0, 0, Ru, x.gcflag_no_check_output_events)) ? 0 : -1;
|
|
4861
4914
|
}("C_IEVENT_CLI");
|
|
4862
4915
|
}
|
|
4863
|
-
export { W as GObj, k as SDATA, F as SDATAAUTHZ, P as SDATACM, L as SDATACM2, G as SDATADF, U as SDATAPM, M as SDATAPM0, I as SDATA_END, C as SDataDesc, u as YUNETA_VERSION, m as __yuno__, o as build_command_response,
|
|
4916
|
+
export { W as GObj, k as SDATA, F as SDATAAUTHZ, P as SDATACM, L as SDATACM2, G as SDATADF, U as SDATAPM, M as SDATAPM0, I as SDATA_END, C as SDataDesc, u as YUNETA_VERSION, m as __yuno__, o as build_command_response, ks as build_path, s as build_stats_response, Ds as clean_name, bu as clear_timeout, Zo as cmp_two_simple_json, ze as command_parameter_from_json, He as command_parameter_from_text, l as command_parser, Es as createElement2, ys as createOneHtml, is as create_json_record, ou as create_template_record, js as current_timestamp, O as data_type_t, Hs as db_list_persistent_attrs, Ys as db_load_persistent_attrs, qs as db_remove_persistent_attrs, Js as db_save_persistent_attrs, Is as debounce, xi as delete_from_list, vo as duplicate_objects, Uo as empty_json, qo as empty_string, as as escapeHtml, Y as event_flag_t, Vs as flat2json, Ks as flat_apply, xs as flat_diff, Fs as flat_key_join, Ms as flat_key_split, gt as gclass_add_ev_action, bt as gclass_add_event_type, ft as gclass_add_state, ht as gclass_check_fsm, ut as gclass_create, pt as gclass_event_type, mt as gclass_find_by_name, x as gclass_flag_t, at as gclass_unregister, vs as getPositionRelativeToBody, Cs as get_function_name, Ns as get_now, bn as gobj_bottom_gobj, Jn as gobj_change_parent, Bn as gobj_change_state, vr as gobj_command, Ut as gobj_create, Dt as gobj_create2, kt as gobj_create_default_service, Lt as gobj_create_pure_child, It as gobj_create_service, Pt as gobj_create_volatil, Ct as gobj_create_yuno, Yn as gobj_current_state, Et as gobj_default_service, tr as gobj_deliver_posted_events, Ft as gobj_destroy, Nn as gobj_find_child, sr as gobj_find_event_type, Sn as gobj_find_gobj, vt as gobj_find_service, yr as gobj_find_subscribings, hr as gobj_find_subscriptions, K as gobj_flag_t, cn as gobj_full_name, un as gobj_gclass_name, Se as gobj_get_gclass_trace_level, je as gobj_get_gclass_trace_level2, Ne as gobj_get_gclass_trace_no_level, Te as gobj_get_global_trace_level, Oe as gobj_get_global_trace_no_level, me as gobj_global_trace_level, ye as gobj_global_trace_no_level, An as gobj_has_attr, Hn as gobj_has_event, zn as gobj_has_output_event, ot as gobj_hsdata, dn as gobj_is_destroying, tn as gobj_is_playing, gn as gobj_is_pure_child, Xt as gobj_is_running, en as gobj_is_service, fn as gobj_is_volatil, wt as gobj_list_persistent_attrs, mr as gobj_list_subscriptions, jt as gobj_load_persistent_attrs, $n as gobj_match_children, wn as gobj_match_children_tree, jn as gobj_match_gobj, sn as gobj_name, _n as gobj_parent, Qt as gobj_pause, zt as gobj_play, Zn as gobj_post_event, er as gobj_posted_events_size, Er as gobj_publish_event, Dn as gobj_read_attr, Cn as gobj_read_attrs, In as gobj_read_bool_attr, kn as gobj_read_integer_attr, Ln as gobj_read_pointer_attr, Pn as gobj_read_str_attr, $t as gobj_remove_persistent_attrs, Ce as gobj_repr_global_trace_levels, Gn as gobj_reset_volatil_attrs, Nt as gobj_save_persistent_attrs, Rn as gobj_search_path, or as gobj_send_event, yt as gobj_services, pn as gobj_set_bottom_gobj, $e as gobj_set_deep_trace, Ae as gobj_set_gclass_no_trace, we as gobj_set_gclass_trace, he as gobj_set_global_no_trace, ve as gobj_set_global_no_trace2, pe as gobj_set_global_trace, Ee as gobj_set_global_trace2, De as gobj_set_gobj_no_trace, Re as gobj_set_gobj_trace, X as gobj_set_trace_machine_format, an as gobj_short_name, Mt as gobj_start, xt as gobj_start_children, Bt as gobj_start_tree, Ie as gobj_start_up, Tr as gobj_stats, Yt as gobj_stop, qt as gobj_stop_children, Ht as gobj_stop_tree, dr as gobj_subscribe_event, ue as gobj_trace_level, Z as gobj_trace_machine_format, ae as gobj_trace_no_level, br as gobj_unsubscribe_event, pr as gobj_unsubscribe_list, mn as gobj_walk_gobj_children, yn as gobj_walk_gobj_children_tree, Un as gobj_write_attr, Vn as gobj_write_attrs, Wn as gobj_write_bool_attr, xn as gobj_write_integer_attr, Kn as gobj_write_str_attr, nn as gobj_yuno, on as gobj_yuno_id, rn as gobj_yuno_name, ln as gobj_yuno_role, fs as html_markup, Gi as id_index_in_obj_list, $s as index_in_list, Mo as is_array, Wo as is_boolean, Bo as is_date, Yo as is_function, Jo as is_gobj, gs as is_html_markup, ti as is_metadata_key, xo as is_null, Vo as is_number, Fo as is_object, ni as is_private_key, Ko as is_pure_number, _l as is_secret_name, Go as is_string, ts as jdb_delete, rs as jdb_get, ls as jdb_get_by_idx, ns as jdb_get_topic, Zi as jdb_init, es as jdb_update, Gs as json2flat, Ao as json_array_append, Do as json_array_append_new, Io as json_array_extend, Co as json_array_remove, Po as json_array_size, Eo as json_deep_copy, To as json_is_identical, mo as json_mask_secrets, $o as json_object_del, No as json_object_get, wo as json_object_set, Ro as json_object_set_new, ko as json_object_size, Oo as json_object_update, So as json_object_update_existing, jo as json_object_update_missing, Lo as json_size, nt as json_text_of, us as jwt2json, ss as jwtDecode, ji as kw_clone_by_keys, Ni as kw_clone_by_not_keys, Si as kw_collect, ai as kw_delete, Ti as kw_find_json_in_list, ui as kw_find_path, Or as kw_flag_t, ci as kw_get_bool, bi as kw_get_dict, pi as kw_get_dict_value, _i as kw_get_int, hi as kw_get_list, Ai as kw_get_local_storage_value, di as kw_get_pointer, fi as kw_get_real, gi as kw_get_str, li as kw_has_key, vi as kw_match_simple, ri as kw_pop, Ci as kw_remove_local_storage_value, Oi as kw_select, mi as kw_set_dict_value, Di as kw_set_local_storage_value, yi as kw_set_subdict_value, ki as kwid_collect, Ui as kwid_find_one_record, Fi as kwid_get_ids, Ii as kwid_match_id, Pi as kwid_new_dict, Li as kwid_new_list, Mi as list2options, zi as load_json_file, Xr as log_debug, Hr as log_error, Qr as log_info, zr as log_warning, fo as mask_secrets_inline, Hi as msg_iev_get_msg_type, Ji as msg_iev_get_stack, Yi as msg_iev_push_stack, Ki as msg_iev_read_key, qi as msg_iev_set_msg_type, Bi as msg_iev_write_key, As as node_uuid, Ho as parseBoolean, Ts as parseSVG, Os as refresh_language, ra as register_c_ievent_cli, _u as register_c_timer, Nu as register_c_yuno, cs as safeSrc, D as sdata_flag_t, Qi as send_http_json_post, kr as set_console_log_enabled, Lr as set_console_log_filter, Cr as set_log_callback, Vr as set_remote_log_functions, hs as set_strings_are_text, gu as set_timeout, du as set_timeout_periodic, t as sprintf, i as stats_parser, Vi as str_in_list, Xo as strcasecmp, Qo as strcmp, ms as strings_are_text, zo as strncmp, Wi as strs_in_list, ei as strstr, lu as template_get_field_desc, Ss as timeTracker, el as trace_json, yo as trace_json_masked, te as trace_level_t, Zr as trace_msg, Qs as treedb_decoder_fkey, Zs as treedb_decoder_hook, Xs as treedb_encoder_fkey, ru as treedb_get_field_desc, zs as treedb_hook_data_size, n as vsprintf, J as walk_type_t };
|
|
4864
4917
|
|
|
4865
4918
|
//# sourceMappingURL=gobj-js.es.min.js.map
|