@yuneta/gobj-js 7.26.13 → 7.26.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gobj-js.cjs.js +32 -9
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +191 -184
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +32 -9
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +215 -208
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +32 -9
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +191 -184
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +32 -9
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +191 -184
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.umd.min.js
CHANGED
|
@@ -666,7 +666,7 @@
|
|
|
666
666
|
t.parent && hn(`_add_child() ALREADY HAS PARENT: ${t.gobj_name}`), e.dl_children.push(t), t.parent = e;
|
|
667
667
|
}
|
|
668
668
|
function Re(e, t) {
|
|
669
|
-
let n =
|
|
669
|
+
let n = nl(e.dl_children, t);
|
|
670
670
|
n >= 0 && (Hn(e.dl_children, n), t.parent = null);
|
|
671
671
|
}
|
|
672
672
|
function De(e, t) {
|
|
@@ -1098,7 +1098,7 @@
|
|
|
1098
1098
|
if (1 === C) L(n("🔄 %s %s%s %s from %s%s", t || "", e.running ? "" : "!!", et(e), o.state_name, l && !l.running ? "!!" : "", et(l)));
|
|
1099
1099
|
else {
|
|
1100
1100
|
let r = "";
|
|
1101
|
-
i.action && (r =
|
|
1101
|
+
i.action && (r = ll(i.action)), L(n("🔄 mach(%s%s^%s), st: %s, ev: %s%s%s, ac: %s, from(%s%s^%s)", e.running ? "" : "!!", Ze(e), Xe(e), o.state_name, "", t || "", "", r, l && !l.running ? "!!" : "", Ze(l), Xe(l)));
|
|
1102
1102
|
}
|
|
1103
1103
|
r && q(e) && zn(r) && Un(r);
|
|
1104
1104
|
}
|
|
@@ -1404,23 +1404,23 @@
|
|
|
1404
1404
|
return n;
|
|
1405
1405
|
}
|
|
1406
1406
|
function hn(e, ...t) {
|
|
1407
|
-
let n = mn(e, ...t), r =
|
|
1407
|
+
let n = mn(e, ...t), r = tl();
|
|
1408
1408
|
tn && (tn === en.error ? cn("error", n) && tn("%c" + r + " ERROR: " + String(n), "color:red") : (cn("error", n) && en.error("%c" + r + " ERROR: " + String(n), "color:red"), tn(`${r} ERROR: ${String(n)}`))), gn("error", n, r);
|
|
1409
1409
|
}
|
|
1410
1410
|
function yn(e, ...t) {
|
|
1411
|
-
let n = mn(e, ...t), r =
|
|
1411
|
+
let n = mn(e, ...t), r = tl();
|
|
1412
1412
|
nn && (nn === en.warn ? cn("warning", n) && nn("%c" + r + " WARNING: " + String(n), "color:yellow") : (cn("warning", n) && en.warn("%c" + r + " WARNING: " + String(n), "color:yellow"), nn(`${r} WARNING: ${String(n)}`))), gn("warning", n, r);
|
|
1413
1413
|
}
|
|
1414
1414
|
function En(e, ...t) {
|
|
1415
|
-
let n = mn(e, ...t), r =
|
|
1415
|
+
let n = mn(e, ...t), r = tl();
|
|
1416
1416
|
ln && cn("debug", n) && ln("%c" + r + " DEBUG: " + String(n), "color:silver"), gn("debug", n, r);
|
|
1417
1417
|
}
|
|
1418
1418
|
function Tn(e, ...t) {
|
|
1419
|
-
let n = mn(e, ...t), r =
|
|
1419
|
+
let n = mn(e, ...t), r = tl();
|
|
1420
1420
|
ln && cn("msg", n) && ln("%c" + r + " MSG: " + String(n), "color:cyan"), gn("msg", n, r);
|
|
1421
1421
|
}
|
|
1422
1422
|
function vn(e, t) {
|
|
1423
|
-
cn("json", t) && (t && en.warn("=====> " + t), en.dir(e)), gn("json", e,
|
|
1423
|
+
cn("json", t) && (t && en.warn("=====> " + t), en.dir(e)), gn("json", e, tl());
|
|
1424
1424
|
}
|
|
1425
1425
|
var jn = [
|
|
1426
1426
|
"passw",
|
|
@@ -1846,7 +1846,7 @@
|
|
|
1846
1846
|
e && !sr(e) && hn("GObj bad instanceof");
|
|
1847
1847
|
let o = mr(e, t, n, !1);
|
|
1848
1848
|
const s = l && l & Zt.KW_REQUIRED, i = l && l & Zt.KW_CREATE, _ = l && l & Zt.KW_EXTRACT;
|
|
1849
|
-
return void 0 === o ? i && Zn(r) && t ? (Sr(e, t, n, r), r) : (s && (hn(`path not found: '${n}'`), Un(t)), r) : Zn(o) ? (_ && hr(e, t, n), o) : (s && (hn(`${e ? et(e) + ": " : ""}path MUST BE a json dict: '${n}'`), Un(t)), r);
|
|
1849
|
+
return void 0 === o ? i && Zn(r) && t ? (Sr(e, t, n, r), r) : (s && (hn(`path not found: '${n}'`), Un(t)), r) : Zn(o) ? (_ && hr(e, t, n), o) : i && null === o && Zn(r) ? (Sr(e, t, n, r), r) : ((s || i) && (hn(`${e ? et(e) + ": " : ""}path MUST BE a json dict: '${n}'` + (i ? ", cannot create" : "")), Un(t)), r);
|
|
1850
1850
|
}
|
|
1851
1851
|
function Or(e, t, n, r, l) {
|
|
1852
1852
|
e && !sr(e) && hn("GObj bad instanceof");
|
|
@@ -2093,7 +2093,14 @@
|
|
|
2093
2093
|
]), Zn(e[r]) && Kr(e[r], t, n), n = n.slice(0, -l.length);
|
|
2094
2094
|
}
|
|
2095
2095
|
}
|
|
2096
|
-
function Yr(e
|
|
2096
|
+
function Yr(e) {
|
|
2097
|
+
try {
|
|
2098
|
+
return JSON.stringify(e);
|
|
2099
|
+
} catch (t) {
|
|
2100
|
+
return `<${typeof e}: not json (${t.message})>`;
|
|
2101
|
+
}
|
|
2102
|
+
}
|
|
2103
|
+
function Br(e, t, n, r) {
|
|
2097
2104
|
if (!e) return null;
|
|
2098
2105
|
let l, o = e.length;
|
|
2099
2106
|
for (l = 0; l < o; l++) {
|
|
@@ -2102,14 +2109,14 @@
|
|
|
2102
2109
|
let e = o.id;
|
|
2103
2110
|
if (e && e === n) return o;
|
|
2104
2111
|
if (r && gr(o, t)) {
|
|
2105
|
-
let e =
|
|
2112
|
+
let e = Br(o[t], t, n, r);
|
|
2106
2113
|
if (e) return e;
|
|
2107
2114
|
}
|
|
2108
2115
|
}
|
|
2109
2116
|
}
|
|
2110
2117
|
return null;
|
|
2111
2118
|
}
|
|
2112
|
-
function
|
|
2119
|
+
function Jr(e) {
|
|
2113
2120
|
function t(e) {
|
|
2114
2121
|
let t = e.replace(/-/g, "+").replace(/_/g, "/");
|
|
2115
2122
|
switch (t.length % 4) {
|
|
@@ -2140,10 +2147,10 @@
|
|
|
2140
2147
|
signature: t(n[2])
|
|
2141
2148
|
};
|
|
2142
2149
|
}
|
|
2143
|
-
function
|
|
2150
|
+
function qr(e) {
|
|
2144
2151
|
return null == e ? "" : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2145
2152
|
}
|
|
2146
|
-
var
|
|
2153
|
+
var Hr = class {
|
|
2147
2154
|
constructor(e) {
|
|
2148
2155
|
this.html = e, Object.freeze(this);
|
|
2149
2156
|
}
|
|
@@ -2151,41 +2158,41 @@
|
|
|
2151
2158
|
return this.html;
|
|
2152
2159
|
}
|
|
2153
2160
|
};
|
|
2154
|
-
function Hr(e) {
|
|
2155
|
-
return e instanceof qr;
|
|
2156
|
-
}
|
|
2157
2161
|
function zr(e) {
|
|
2162
|
+
return e instanceof Hr;
|
|
2163
|
+
}
|
|
2164
|
+
function Qr(e) {
|
|
2158
2165
|
const t = document.createElement("template");
|
|
2159
2166
|
return t.innerHTML = e.html.trim(), t.content;
|
|
2160
2167
|
}
|
|
2161
|
-
var
|
|
2162
|
-
function
|
|
2168
|
+
var Xr = !1, Zr = /* @__PURE__ */ new Set();
|
|
2169
|
+
function el(e) {
|
|
2163
2170
|
const t = document.createElement("template");
|
|
2164
2171
|
return t.innerHTML = e.trim(), t.content.firstChild;
|
|
2165
2172
|
}
|
|
2166
|
-
function
|
|
2173
|
+
function tl(e) {
|
|
2167
2174
|
const t = (e, t) => String(e).padStart(t, "0"), n = `${(e = e || /* @__PURE__ */ new Date()).getFullYear()}-${t(e.getMonth() + 1, 2)}-${t(e.getDate(), 2)}T${t(e.getHours(), 2)}:${t(e.getMinutes(), 2)}:${t(e.getSeconds(), 2)}`, r = t(e.getMilliseconds(), 3), l = e.getTimezoneOffset();
|
|
2168
2175
|
return `${n}.${r}${l > 0 ? "-" : "+"}${t(Math.floor(Math.abs(l) / 60), 2)}${t(Math.abs(l) % 60, 2)}`;
|
|
2169
2176
|
}
|
|
2170
|
-
function
|
|
2177
|
+
function nl(e, t) {
|
|
2171
2178
|
if (!e) throw "ERROR: index_in_list() list empty";
|
|
2172
2179
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return n;
|
|
2173
2180
|
return -1;
|
|
2174
2181
|
}
|
|
2175
|
-
function
|
|
2182
|
+
function rl() {
|
|
2176
2183
|
let e = "";
|
|
2177
2184
|
return "undefined" != typeof window && window.localStorage ? (e = window.localStorage.getItem("host_uuid"), !e && window.crypto?.randomUUID && (e = window.crypto.randomUUID(), window.localStorage.setItem("host_uuid", e))) : e = "undefined" != typeof globalThis && globalThis.crypto?.randomUUID ? globalThis.crypto.randomUUID() : "00000000-0000-0000-0000-000000000000", e;
|
|
2178
2185
|
}
|
|
2179
|
-
function
|
|
2186
|
+
function ll(e) {
|
|
2180
2187
|
let t = null;
|
|
2181
2188
|
return "function" != typeof e && "object" != typeof e || (t = ("" + e).match(/function\s*([\w\$]*)\s*\(/)), null !== t ? t[1] + "()" : "";
|
|
2182
2189
|
}
|
|
2183
|
-
var
|
|
2184
|
-
function
|
|
2190
|
+
var ol = 256, sl = 1e5;
|
|
2191
|
+
function il(e) {
|
|
2185
2192
|
const t = String(e).replace(/`/g, "``");
|
|
2186
2193
|
return "[" === t[0] ? "[" + t : t;
|
|
2187
2194
|
}
|
|
2188
|
-
function
|
|
2195
|
+
function _l(e) {
|
|
2189
2196
|
if ("string" != typeof e) return null;
|
|
2190
2197
|
let t = [], n = "";
|
|
2191
2198
|
for (let r = 0; r < e.length; r++) if ("`" !== e[r]) n += e[r];
|
|
@@ -2206,13 +2213,13 @@
|
|
|
2206
2213
|
return null !== t ? t : "[" === e[0] && "[" === e[1] ? e.slice(1) : e;
|
|
2207
2214
|
});
|
|
2208
2215
|
}
|
|
2209
|
-
function
|
|
2216
|
+
function al(e, t) {
|
|
2210
2217
|
return e === t || null !== e && null !== t && "object" == typeof e && "object" == typeof t && JSON.stringify(e) === JSON.stringify(t);
|
|
2211
2218
|
}
|
|
2212
|
-
function
|
|
2219
|
+
function ul(e) {
|
|
2213
2220
|
return "persistent-attrs-" + et(e);
|
|
2214
2221
|
}
|
|
2215
|
-
function
|
|
2222
|
+
function cl(e, t) {
|
|
2216
2223
|
if (tr(t)) {
|
|
2217
2224
|
if (-1 === t.indexOf("^")) {
|
|
2218
2225
|
let n, r, l = e.fkey;
|
|
@@ -2242,7 +2249,7 @@
|
|
|
2242
2249
|
hook_name: t.hook_name
|
|
2243
2250
|
} : (hn("bad fkey 3"), hn(e), hn(t), null);
|
|
2244
2251
|
}
|
|
2245
|
-
var
|
|
2252
|
+
var fl = [
|
|
2246
2253
|
"string",
|
|
2247
2254
|
"integer",
|
|
2248
2255
|
"object",
|
|
@@ -2252,7 +2259,7 @@
|
|
|
2252
2259
|
"real",
|
|
2253
2260
|
"boolean",
|
|
2254
2261
|
"blob"
|
|
2255
|
-
],
|
|
2262
|
+
], gl = [
|
|
2256
2263
|
"persistent",
|
|
2257
2264
|
"required",
|
|
2258
2265
|
"notnull",
|
|
@@ -2264,7 +2271,7 @@
|
|
|
2264
2271
|
"stats",
|
|
2265
2272
|
"rstats",
|
|
2266
2273
|
"pstats"
|
|
2267
|
-
],
|
|
2274
|
+
], dl = [
|
|
2268
2275
|
"hook",
|
|
2269
2276
|
"fkey",
|
|
2270
2277
|
"enum",
|
|
@@ -2293,7 +2300,7 @@
|
|
|
2293
2300
|
"coordinates",
|
|
2294
2301
|
"gbuffer"
|
|
2295
2302
|
];
|
|
2296
|
-
function
|
|
2303
|
+
function bl(e) {
|
|
2297
2304
|
let t = {
|
|
2298
2305
|
name: e.id,
|
|
2299
2306
|
header: e.header,
|
|
@@ -2312,7 +2319,7 @@
|
|
|
2312
2319
|
if (!e.flag) return t;
|
|
2313
2320
|
for (let n = 0; n < e.flag.length; n++) {
|
|
2314
2321
|
let r = e.flag[n];
|
|
2315
|
-
if (Ur(
|
|
2322
|
+
if (Ur(dl, r)) {
|
|
2316
2323
|
switch (r) {
|
|
2317
2324
|
case "enum":
|
|
2318
2325
|
t.enum_list = e.enum;
|
|
@@ -2326,7 +2333,7 @@
|
|
|
2326
2333
|
case "file": t.is_file = !0;
|
|
2327
2334
|
}
|
|
2328
2335
|
t.type = r;
|
|
2329
|
-
} else if (Ur(
|
|
2336
|
+
} else if (Ur(gl, r)) switch (r) {
|
|
2330
2337
|
case "writable":
|
|
2331
2338
|
t.is_writable = !0;
|
|
2332
2339
|
break;
|
|
@@ -2339,23 +2346,23 @@
|
|
|
2339
2346
|
}
|
|
2340
2347
|
return t.is_file && (t.type = "file"), t;
|
|
2341
2348
|
}
|
|
2342
|
-
var
|
|
2349
|
+
var pl = [
|
|
2343
2350
|
j(y.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
2344
2351
|
j(y.DTP_BOOLEAN, "periodic", 0, 0, "True for periodic timeouts"),
|
|
2345
2352
|
j(y.DTP_INTEGER, "msec", 0, 0, "Timeout in milliseconds"),
|
|
2346
2353
|
v()
|
|
2347
|
-
],
|
|
2354
|
+
], ml = {
|
|
2348
2355
|
periodic: !1,
|
|
2349
2356
|
msec: 0,
|
|
2350
2357
|
timer_id: -1
|
|
2351
|
-
},
|
|
2352
|
-
function
|
|
2358
|
+
}, hl = null;
|
|
2359
|
+
function yl(e, t, n, r) {
|
|
2353
2360
|
let l = e.priv, o = l.periodic ? "EV_TIMEOUT_PERIODIC" : "EV_TIMEOUT";
|
|
2354
2361
|
return l.periodic && l.msec > 0 ? l.timer_id = setTimeout(function() {
|
|
2355
2362
|
Vt(e, "EV_TIMEOUT", {}, e);
|
|
2356
2363
|
}, l.msec) : l.timer_id = -1, lt(e) ? Vt(nt(e), o, {}, e) : Xt(e, o, {}), l.periodic || -1 !== l.timer_id || Ke(e) && Ve(e), 0;
|
|
2357
2364
|
}
|
|
2358
|
-
var
|
|
2365
|
+
var El = {
|
|
2359
2366
|
mt_create: function(e) {
|
|
2360
2367
|
let t = e.priv;
|
|
2361
2368
|
const n = Ot(e, "subscriber");
|
|
@@ -2380,16 +2387,16 @@
|
|
|
2380
2387
|
},
|
|
2381
2388
|
mt_destroy: function(e) {}
|
|
2382
2389
|
};
|
|
2383
|
-
function
|
|
2390
|
+
function Tl(e, t) {
|
|
2384
2391
|
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : (Nt(e, "periodic", !1), void $t(e, "msec", t)) : (hn("not GObj TYPE"), -1);
|
|
2385
2392
|
}
|
|
2386
|
-
function
|
|
2393
|
+
function vl(e, t) {
|
|
2387
2394
|
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : (Nt(e, "periodic", !0), void $t(e, "msec", t)) : (hn("not GObj TYPE"), -1);
|
|
2388
2395
|
}
|
|
2389
|
-
function
|
|
2396
|
+
function jl(e) {
|
|
2390
2397
|
return e instanceof S ? "C_TIMER" !== Ze(e) ? (hn("not C_TIMER GObj"), -1) : void $t(e, "msec", -1) : (hn("not GObj TYPE"), -1);
|
|
2391
2398
|
}
|
|
2392
|
-
var
|
|
2399
|
+
var Ol = [
|
|
2393
2400
|
j(y.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
2394
2401
|
j(y.DTP_BOOLEAN, "browser_beforeunload", 0, !1, "Set true to refreshing browser"),
|
|
2395
2402
|
j(y.DTP_STRING, "__username__", 0, "", "Username"),
|
|
@@ -2409,26 +2416,26 @@
|
|
|
2409
2416
|
j(y.DTP_BOOLEAN, "developer", 0, !1, "Developer mode enabled"),
|
|
2410
2417
|
j(y.DTP_INTEGER, "periodic_timeout", 0, "1000", "Timeout periodic, in miliseconds."),
|
|
2411
2418
|
v()
|
|
2412
|
-
],
|
|
2413
|
-
function
|
|
2419
|
+
], Sl = { gobj_timer: null }, wl = null;
|
|
2420
|
+
function Nl(e, t, n, r) {
|
|
2414
2421
|
let l = yt(e, t);
|
|
2415
2422
|
return Zn(l) || (l = {}), l[n] = r, St(e, t, l), De(e, t);
|
|
2416
2423
|
}
|
|
2417
|
-
function
|
|
2424
|
+
function $l(e) {
|
|
2418
2425
|
if (!0 === e || !1 === e) return e;
|
|
2419
2426
|
let t = String(null == e ? "" : e).toLowerCase();
|
|
2420
2427
|
return "true" === t || "set" === t || "false" !== t && "reset" !== t && ("" === t || isNaN(Number(t)) ? null : !!Number(t));
|
|
2421
2428
|
}
|
|
2422
|
-
function
|
|
2429
|
+
function Rl() {
|
|
2423
2430
|
return `${ze()}^${He()}`;
|
|
2424
2431
|
}
|
|
2425
|
-
function
|
|
2432
|
+
function Dl(e, t, n, r) {
|
|
2426
2433
|
return Xt(e, t, n), 0;
|
|
2427
2434
|
}
|
|
2428
|
-
var
|
|
2435
|
+
var kl = {
|
|
2429
2436
|
mt_create: function(e) {
|
|
2430
2437
|
let t = e.priv;
|
|
2431
|
-
Rt(e, "start_date",
|
|
2438
|
+
Rt(e, "start_date", tl()), Rt(e, "node_uuid", rl()), e.priv.gobj_timer = Ce(Xe(e), "C_TIMER", {}, e), t.periodic_timeout = yt(e, "periodic_timeout"), function(e) {
|
|
2432
2439
|
let t = yt(e, "trace_levels");
|
|
2433
2440
|
if (!Zn(t)) return 0;
|
|
2434
2441
|
let n = t.__global_trace__;
|
|
@@ -2462,10 +2469,10 @@
|
|
|
2462
2469
|
},
|
|
2463
2470
|
mt_writing: function(e, t) {},
|
|
2464
2471
|
mt_start: function(e) {
|
|
2465
|
-
return
|
|
2472
|
+
return vl(e.priv.gobj_timer, e.priv.periodic_timeout), 0;
|
|
2466
2473
|
},
|
|
2467
2474
|
mt_stop: function(e) {
|
|
2468
|
-
return
|
|
2475
|
+
return jl(e.priv.gobj_timer), Me(e), 0;
|
|
2469
2476
|
},
|
|
2470
2477
|
mt_destroy: function(e) {},
|
|
2471
2478
|
mt_play: function(e) {
|
|
@@ -2482,24 +2489,24 @@
|
|
|
2482
2489
|
case "get-global-no-trace": return l(0, 0, null, null, ne());
|
|
2483
2490
|
case "set-global-trace":
|
|
2484
2491
|
case "set-global-no-trace": {
|
|
2485
|
-
let r = "set-global-no-trace" === t, o = n.level, s =
|
|
2486
|
-
return o ? null === s ? l(0, -1, `${
|
|
2492
|
+
let r = "set-global-no-trace" === t, o = n.level, s = $l(n.set);
|
|
2493
|
+
return o ? null === s ? l(0, -1, `${Rl()}: bitmask set or re-set?`, null, null) : (r ? X(o, s) : Q(o, s)) < 0 ? l(0, -1, `${Rl()}: global trace level not found: ${o}`, null, null) : r ? (Nl(e, "no_trace_levels", "__global_no_trace__", ne()), l(0, 0, null, null, ne())) : (Nl(e, "trace_levels", "__global_trace__", te()), l(0, 0, null, null, te())) : l(0, -1, `${Rl()}: what level?`, null, null);
|
|
2487
2494
|
}
|
|
2488
2495
|
case "get-gclass-trace":
|
|
2489
2496
|
case "get-gclass-no-trace":
|
|
2490
2497
|
case "set-gclass-trace":
|
|
2491
2498
|
case "set-gclass-no-trace": {
|
|
2492
2499
|
let r = t.indexOf("no-trace") >= 0, o = n.gclass_name || n.gclass || "", s = Oe(o);
|
|
2493
|
-
if (!s) return l(0, -1, `${
|
|
2500
|
+
if (!s) return l(0, -1, `${Rl()}: what gclass is '${o}'?`, null, null);
|
|
2494
2501
|
if (0 === t.indexOf("get-")) return l(0, 0, null, null, r ? oe(s) : re(s));
|
|
2495
|
-
let i = n.level, _ =
|
|
2496
|
-
return i ? null === _ ? l(0, -1, `${
|
|
2502
|
+
let i = n.level, _ = $l(n.set);
|
|
2503
|
+
return i ? null === _ ? l(0, -1, `${Rl()}: bitmask set or re-set?`, null, null) : (r ? ie(s, i, _) : se(s, i, _)) < 0 ? l(0, -1, `${Rl()}: trace level of ${o} not found: ${i}`, null, null) : r ? (Nl(e, "no_trace_levels", o, oe(s)), l(0, 0, null, null, oe(s))) : (Nl(e, "trace_levels", o, le(s)), l(0, 0, null, null, re(s))) : l(0, -1, `${Rl()}: what level?`, null, null);
|
|
2497
2504
|
}
|
|
2498
|
-
default: return l(0, -1, `${
|
|
2505
|
+
default: return l(0, -1, `${Rl()}: command not available: ${t}`, null, null);
|
|
2499
2506
|
}
|
|
2500
2507
|
}
|
|
2501
2508
|
};
|
|
2502
|
-
var
|
|
2509
|
+
var Al = "ievent_gate_stack", Il = [
|
|
2503
2510
|
j(y.DTP_STRING, "wanted_yuno_role", E.SDF_RD, "", "wanted yuno role"),
|
|
2504
2511
|
j(y.DTP_STRING, "wanted_yuno_name", E.SDF_RD, "", "wanted yuno name"),
|
|
2505
2512
|
j(y.DTP_STRING, "wanted_yuno_service", E.SDF_RD, "", "wanted yuno service"),
|
|
@@ -2516,15 +2523,15 @@
|
|
|
2516
2523
|
j(y.DTP_INTEGER, "timeout_idack", E.SDF_RD, "5000", "timeout waiting idAck"),
|
|
2517
2524
|
j(y.DTP_POINTER, "subscriber", 0, 0, "subscriber of output-events. If null then subscriber is the parent"),
|
|
2518
2525
|
v()
|
|
2519
|
-
],
|
|
2526
|
+
], Cl = [
|
|
2520
2527
|
["ievents", "Trace inter-events with metadata of kw"],
|
|
2521
2528
|
["ievents2", "Trace inter-events with full kw"],
|
|
2522
2529
|
["identity-card", "Trace identity_card messages"]
|
|
2523
2530
|
];
|
|
2524
|
-
function
|
|
2531
|
+
function Ll(e) {
|
|
2525
2532
|
return !!(3 & x(e));
|
|
2526
2533
|
}
|
|
2527
|
-
var
|
|
2534
|
+
var Pl = {
|
|
2528
2535
|
url: null,
|
|
2529
2536
|
remote_yuno_name: null,
|
|
2530
2537
|
remote_yuno_role: null,
|
|
@@ -2534,8 +2541,8 @@
|
|
|
2534
2541
|
websocket: null,
|
|
2535
2542
|
inside_on_open: !1,
|
|
2536
2543
|
retry_ms: 0
|
|
2537
|
-
},
|
|
2538
|
-
function
|
|
2544
|
+
}, Ul = null;
|
|
2545
|
+
function Fl(e) {
|
|
2539
2546
|
e.priv.websocket && hn("Websocket ALREADY setup");
|
|
2540
2547
|
const t = jt(e, "url");
|
|
2541
2548
|
En(`====> Starting WebSocket to '${t}' (${et(e)})`);
|
|
@@ -2550,7 +2557,7 @@
|
|
|
2550
2557
|
code: 1006,
|
|
2551
2558
|
reason: r.message,
|
|
2552
2559
|
was_clean: !1
|
|
2553
|
-
}, e) < 0 &&
|
|
2560
|
+
}, e) < 0 && Tl(e.priv.gobj_timer, Hl(e)), null;
|
|
2554
2561
|
}
|
|
2555
2562
|
return r ? (r.onopen = () => {
|
|
2556
2563
|
n !== e.priv.ws_seq || ot(e) || Vt(e, "EV_ON_OPEN", {
|
|
@@ -2572,7 +2579,7 @@
|
|
|
2572
2579
|
}, e));
|
|
2573
2580
|
}, r) : (hn(`${et(e)}: Failed to initialize WebSocket.`), null);
|
|
2574
2581
|
}
|
|
2575
|
-
function
|
|
2582
|
+
function Vl(e, t = 1e3, n = "") {
|
|
2576
2583
|
let r = e.priv, l = r.websocket;
|
|
2577
2584
|
if (r.websocket = null, l && l.readyState !== WebSocket.CLOSED && l.readyState !== WebSocket.CLOSING) {
|
|
2578
2585
|
En(`Closing WebSocket (Code: ${t}, Reason: "${n}")`);
|
|
@@ -2583,25 +2590,25 @@
|
|
|
2583
2590
|
}
|
|
2584
2591
|
} else yn("WebSocket is already closed or in the process of closing.");
|
|
2585
2592
|
}
|
|
2586
|
-
function
|
|
2587
|
-
let r =
|
|
2593
|
+
function Gl(e, t, n) {
|
|
2594
|
+
let r = tl();
|
|
2588
2595
|
try {
|
|
2589
2596
|
En("\n" + r + " " + t + "\n"), Un(n);
|
|
2590
2597
|
} catch (e) {
|
|
2591
2598
|
En("ERROR in trace_inter_event: " + e);
|
|
2592
2599
|
}
|
|
2593
2600
|
}
|
|
2594
|
-
var
|
|
2601
|
+
var Ml = class {
|
|
2595
2602
|
constructor(e, t) {
|
|
2596
2603
|
this.event = e, this.kw = t || {};
|
|
2597
2604
|
}
|
|
2598
2605
|
};
|
|
2599
|
-
function
|
|
2606
|
+
function Wl(e, t, n, r) {
|
|
2600
2607
|
return function(e, t) {
|
|
2601
2608
|
let n = e.priv, r = JSON.stringify(t);
|
|
2602
|
-
if (
|
|
2609
|
+
if (Ll(e)) {
|
|
2603
2610
|
let n = jt(e, "url"), l = Xe(qe()) + " ==> " + n, o = yt(qe(), "trace_ievent_callback");
|
|
2604
|
-
o ? o(l, t, 1, r.length) :
|
|
2611
|
+
o ? o(l, t, 1, r.length) : Gl(0, l, t);
|
|
2605
2612
|
}
|
|
2606
2613
|
if (!n.websocket || n.websocket.readyState !== WebSocket.OPEN) return yn(`${et(e)}: send_iev(): websocket not open, message lost`), -1;
|
|
2607
2614
|
try {
|
|
@@ -2611,10 +2618,10 @@
|
|
|
2611
2618
|
}
|
|
2612
2619
|
return 0;
|
|
2613
2620
|
}(e, function(e, t) {
|
|
2614
|
-
return ir(e) ? (hn("iev_create() event NULL"), null) : new
|
|
2621
|
+
return ir(e) ? (hn("iev_create() event NULL"), null) : new Ml(e, t);
|
|
2615
2622
|
}(t, n));
|
|
2616
2623
|
}
|
|
2617
|
-
function
|
|
2624
|
+
function xl(e, t, n) {
|
|
2618
2625
|
return ir(n) && (n = jt(e, "wanted_yuno_service")), {
|
|
2619
2626
|
dst_yuno: jt(e, "wanted_yuno_name"),
|
|
2620
2627
|
dst_role: jt(e, "wanted_yuno_role"),
|
|
@@ -2622,10 +2629,10 @@
|
|
|
2622
2629
|
src_yuno: He(),
|
|
2623
2630
|
src_role: ze(),
|
|
2624
2631
|
src_service: t,
|
|
2625
|
-
host:
|
|
2632
|
+
host: rl()
|
|
2626
2633
|
};
|
|
2627
2634
|
}
|
|
2628
|
-
function
|
|
2635
|
+
function Kl(e) {
|
|
2629
2636
|
let t = e.priv, n = Je(qe()), r = jt(qe(), "yuno_version"), l = jt(qe(), "yuno_release"), o = jt(qe(), "yuno_tag"), i = yt(e, "required_services");
|
|
2630
2637
|
i && i.length || (i = yt(qe(), "required_services"));
|
|
2631
2638
|
let _ = {
|
|
@@ -2643,27 +2650,27 @@
|
|
|
2643
2650
|
username: jt(qe(), "__username__"),
|
|
2644
2651
|
launch_id: 0,
|
|
2645
2652
|
yuno_startdate: jt(qe(), "start_date"),
|
|
2646
|
-
id:
|
|
2653
|
+
id: rl(),
|
|
2647
2654
|
user_agent: "undefined" != typeof window ? window.navigator.userAgent : "",
|
|
2648
2655
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
2649
2656
|
required_services: i
|
|
2650
2657
|
};
|
|
2651
|
-
return Gr(e, _,
|
|
2658
|
+
return Gr(e, _, Al, xl(e, Xe(nt(e)), null)), Wr(e, _, "__identity__"), Tl(t.gobj_timer, vt(e, "timeout_idack")), Wl(e, "EV_IDENTITY_CARD", _);
|
|
2652
2659
|
}
|
|
2653
|
-
function
|
|
2660
|
+
function Yl(e, t) {
|
|
2654
2661
|
if (ir(t.event)) return -1;
|
|
2655
2662
|
let n = {}, r = t.__global__, l = t.__config__, o = t.__filter__, s = t.__service__, i = t.subscriber;
|
|
2656
2663
|
l && (n.__config__ = l), r && (n.__global__ = r), o && (n.__filter__ = o);
|
|
2657
|
-
return Gr(e, n,
|
|
2658
|
-
}
|
|
2659
|
-
function Yl(e, t, n, r) {
|
|
2660
|
-
let l = e.priv;
|
|
2661
|
-
return Ke(e) && (l.websocket = Ul(e)), 0;
|
|
2664
|
+
return Gr(e, n, Al, xl(e, Xe(i), s)), Wr(e, n, "__subscribing__"), Wl(e, t.event, n);
|
|
2662
2665
|
}
|
|
2663
2666
|
function Bl(e, t, n, r) {
|
|
2664
|
-
|
|
2667
|
+
let l = e.priv;
|
|
2668
|
+
return Ke(e) && (l.websocket = Fl(e)), 0;
|
|
2665
2669
|
}
|
|
2666
2670
|
function Jl(e, t, n, r) {
|
|
2671
|
+
return En("Websocket opened: " + e.priv.url), Kl(e), 0;
|
|
2672
|
+
}
|
|
2673
|
+
function ql(e, t, n, r) {
|
|
2667
2674
|
let l = e.priv, o = n.url;
|
|
2668
2675
|
return void 0 !== n.ws_seq && n.ws_seq !== l.ws_seq || (bn(), yn(`${et(e)}: WebSocket closed ${o} (Code: ${n.code}, Reason: "${n.reason}", 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, Xt(e, "EV_ON_CLOSE", {
|
|
2669
2676
|
url: o,
|
|
@@ -2678,25 +2685,25 @@
|
|
|
2678
2685
|
code: n.code,
|
|
2679
2686
|
reason: n.reason,
|
|
2680
2687
|
was_clean: n.was_clean
|
|
2681
|
-
})), Ke(e) &&
|
|
2688
|
+
})), Ke(e) && Tl(l.gobj_timer, Hl(e))), 0;
|
|
2682
2689
|
}
|
|
2683
|
-
function
|
|
2690
|
+
function Hl(e) {
|
|
2684
2691
|
let t = e.priv, n = vt(e, "timeout_retry"), r = vt(e, "timeout_retry_max");
|
|
2685
2692
|
r < n && (r = n), t.retry_ms = t.retry_ms ? Math.min(2 * t.retry_ms, r) : n;
|
|
2686
2693
|
let l = .2 * t.retry_ms, o = t.retry_ms - l + 2 * Math.random() * l;
|
|
2687
2694
|
return Math.max(1, Math.round(o));
|
|
2688
2695
|
}
|
|
2689
|
-
function Hl(e, t, n, r) {
|
|
2690
|
-
return xl(e), 0;
|
|
2691
|
-
}
|
|
2692
2696
|
function zl(e, t, n, r) {
|
|
2697
|
+
return Kl(e), 0;
|
|
2698
|
+
}
|
|
2699
|
+
function Ql(e, t, n, r) {
|
|
2693
2700
|
let l = e.priv;
|
|
2694
|
-
|
|
2695
|
-
let o = Mr(e, n,
|
|
2701
|
+
jl(l.gobj_timer);
|
|
2702
|
+
let o = Mr(e, n, Al, !0), s = Tr(e, o, "src_yuno", ""), i = Tr(e, o, "src_role", ""), _ = Tr(e, o, "src_service", "");
|
|
2696
2703
|
Rt(e, "remote_yuno_name", s), Rt(e, "remote_yuno_role", i), Rt(e, "remote_yuno_service", _);
|
|
2697
2704
|
let a = Er(e, n, "result", -1, 0), u = Tr(e, n, "comment", "", 0), c = Tr(e, n, "username", "", 0), f = Or(e, n, "services_roles", {});
|
|
2698
2705
|
if (a < 0) {
|
|
2699
|
-
|
|
2706
|
+
Vl(e);
|
|
2700
2707
|
let t = {
|
|
2701
2708
|
url: jt(e, "url"),
|
|
2702
2709
|
result: a,
|
|
@@ -2721,12 +2728,12 @@
|
|
|
2721
2728
|
}
|
|
2722
2729
|
l.inside_on_open = !1, function(e) {
|
|
2723
2730
|
let t = zt(e, null, null, null);
|
|
2724
|
-
for (let n = 0; n < t.length; n++)
|
|
2731
|
+
for (let n = 0; n < t.length; n++) Yl(e, t[n]);
|
|
2725
2732
|
}(e);
|
|
2726
2733
|
}
|
|
2727
2734
|
return 0;
|
|
2728
2735
|
}
|
|
2729
|
-
function
|
|
2736
|
+
function Xl(e, t, n, r) {
|
|
2730
2737
|
let l = e.priv.url, o = function(e, t) {
|
|
2731
2738
|
let n;
|
|
2732
2739
|
try {
|
|
@@ -2745,19 +2752,19 @@
|
|
|
2745
2752
|
} : (yn(`${et(e)}: parsing inter_event: kw not a json object`), null) : (yn(`${et(e)}: parsing inter_kw: no kw`), null);
|
|
2746
2753
|
}(e, n.data);
|
|
2747
2754
|
if (!o) return yn(`${et(e)}: frame dropped from ${l}: ${String(n.data).substring(0, 256)}`), -1;
|
|
2748
|
-
if (
|
|
2755
|
+
if (Ll(e)) {
|
|
2749
2756
|
let e = Xe(qe()) + " <== " + l, t = n.data.length, r = yt(qe(), "trace_ievent_callback");
|
|
2750
|
-
r ? r(e, o, 2, t) :
|
|
2757
|
+
r ? r(e, o, 2, t) : Gl(0, e, o);
|
|
2751
2758
|
}
|
|
2752
2759
|
let s = o.event, i = o.kw;
|
|
2753
2760
|
if ("ST_SESSION" !== kt(e)) {
|
|
2754
2761
|
if (It(e, s, R.EVF_PUBLIC_EVENT)) {
|
|
2755
2762
|
if (!(Vt(e, s, i, e) < 0)) return 0;
|
|
2756
2763
|
} else hn(`${et(e)}: event UNKNOWN in not-session state ${s}`);
|
|
2757
|
-
return
|
|
2764
|
+
return Vl(e), -1;
|
|
2758
2765
|
}
|
|
2759
2766
|
o = null;
|
|
2760
|
-
let _ = xr(e, i), a = Mr(e, i,
|
|
2767
|
+
let _ = xr(e, i), a = Mr(e, i, Al), u = Tr(e, a, "dst_role", "");
|
|
2761
2768
|
if (u.toLowerCase() !== ze().toLowerCase()) return hn(`"It's not my role, dst_role: ${u}, my_role: ${ze()}`), 0;
|
|
2762
2769
|
let c = Tr(e, a, "dst_service", "");
|
|
2763
2770
|
if ("__subscribing__" === _) return yn(`${et(e)}: subscription event ignored, I'm client (service: ${c}, event: ${s})`), -1;
|
|
@@ -2769,13 +2776,13 @@
|
|
|
2769
2776
|
}
|
|
2770
2777
|
return lt(e) ? Vt(nt(e), s, i, e) : Xt(e, s, i), 0;
|
|
2771
2778
|
}
|
|
2772
|
-
function
|
|
2779
|
+
function Zl(e, t, n, r) {
|
|
2773
2780
|
return 0;
|
|
2774
2781
|
}
|
|
2775
|
-
function
|
|
2782
|
+
function eo(e, t, n, r) {
|
|
2776
2783
|
return 0;
|
|
2777
2784
|
}
|
|
2778
|
-
var
|
|
2785
|
+
var to = {
|
|
2779
2786
|
mt_create: function(e) {
|
|
2780
2787
|
let t = e.priv;
|
|
2781
2788
|
t.gobj_timer = Ce(Xe(e), "C_TIMER", {}, e), t.ws_seq = 0, t.url = jt(e, "url"), t.remote_yuno_name = jt(e, "remote_yuno_name"), t.remote_yuno_role = jt(e, "remote_yuno_role"), t.remote_yuno_service = jt(e, "remote_yuno_service"), Rt(e, "wanted_yuno_name", t.remote_yuno_name), Rt(e, "wanted_yuno_role", t.remote_yuno_role), Rt(e, "wanted_yuno_service", t.remote_yuno_service);
|
|
@@ -2805,43 +2812,43 @@
|
|
|
2805
2812
|
code: 1e3,
|
|
2806
2813
|
reason: "restarted",
|
|
2807
2814
|
was_clean: !0
|
|
2808
|
-
}, e),
|
|
2815
|
+
}, e), jl(t.gobj_timer)), t.websocket = Fl(e), 0;
|
|
2809
2816
|
},
|
|
2810
2817
|
mt_stop: function(e) {
|
|
2811
2818
|
let t = e.priv;
|
|
2812
|
-
return
|
|
2819
|
+
return jl(t.gobj_timer), t.websocket && Vl(e), 0;
|
|
2813
2820
|
},
|
|
2814
2821
|
mt_destroy: function(e) {},
|
|
2815
2822
|
mt_stats: function(e, t, n, r) {
|
|
2816
2823
|
if ("ST_SESSION" !== kt(e)) return hn("Not in session"), null;
|
|
2817
2824
|
n || (n = {});
|
|
2818
|
-
let l =
|
|
2825
|
+
let l = xl(e, Xe(r), Tr(e, n, "service", null, 0)), o = Or(e, n, "__md_stats__", null, Zt.KW_EXTRACT);
|
|
2819
2826
|
return o || (o = {}), Gr(e, n, "stats_stack", {
|
|
2820
2827
|
stats: t,
|
|
2821
2828
|
kw: o
|
|
2822
|
-
}), Gr(e, n,
|
|
2829
|
+
}), Gr(e, n, Al, l), n.__stats__ = t, Wr(e, n, "__stats__"), Wl(e, "EV_MT_STATS", n, r), null;
|
|
2823
2830
|
},
|
|
2824
2831
|
mt_command_parser: function(e, t, n, r) {
|
|
2825
2832
|
if ("ST_SESSION" !== kt(e)) return hn("Not in session"), null;
|
|
2826
2833
|
n || (n = {});
|
|
2827
|
-
let l =
|
|
2834
|
+
let l = xl(e, Xe(r), Tr(e, n, "service", "", 0)), o = Or(e, n, "__md_command__", null, Zt.KW_EXTRACT);
|
|
2828
2835
|
return o || (o = {}), Gr(e, n, "command_stack", {
|
|
2829
2836
|
command: t,
|
|
2830
2837
|
kw: o
|
|
2831
|
-
}), Gr(e, n,
|
|
2838
|
+
}), Gr(e, n, Al, l), n.__command__ = t, Wr(e, n, "__command__"), Wl(e, "EV_MT_COMMAND", n, r), null;
|
|
2832
2839
|
},
|
|
2833
2840
|
mt_inject_event: function(e, t, n, r) {
|
|
2834
2841
|
if ("ST_SESSION" !== kt(e)) return window.console.error("Not in session"), -1;
|
|
2835
|
-
if (n = Gn({}, Zn(n) ? n : {}), Zn(n.__md_iev__) && (n.__md_iev__ = Fn(n.__md_iev__)), Mr(e, n,
|
|
2842
|
+
if (n = Gn({}, Zn(n) ? n : {}), Zn(n.__md_iev__) && (n.__md_iev__ = Fn(n.__md_iev__)), Mr(e, n, Al));
|
|
2836
2843
|
else {
|
|
2837
|
-
let l =
|
|
2838
|
-
Kn(n, "__service__"), Gr(e, n, "__message__", t), Gr(e, n,
|
|
2844
|
+
let l = xl(e, Xe(r), Tr(e, n, "__service__", 0, 0));
|
|
2845
|
+
Kn(n, "__service__"), Gr(e, n, "__message__", t), Gr(e, n, Al, l);
|
|
2839
2846
|
}
|
|
2840
|
-
return Wr(e, n, "__message__"),
|
|
2847
|
+
return Wr(e, n, "__message__"), Wl(e, t, n, r);
|
|
2841
2848
|
},
|
|
2842
2849
|
mt_subscription_added: function(e, t) {
|
|
2843
2850
|
let n = e.priv;
|
|
2844
|
-
return "ST_SESSION" === kt(e) && n.websocket ? n.inside_on_open ? 0 :
|
|
2851
|
+
return "ST_SESSION" === kt(e) && n.websocket ? n.inside_on_open ? 0 : Yl(e, t) : 0;
|
|
2845
2852
|
},
|
|
2846
2853
|
mt_subscription_deleted: function(e, t) {
|
|
2847
2854
|
let n = e.priv;
|
|
@@ -2850,7 +2857,7 @@
|
|
|
2850
2857
|
if (ir(t.event)) return 0;
|
|
2851
2858
|
let r = {}, l = t.__global__, o = t.__config__, s = t.__filter__, i = t.__service__, _ = t.subscriber;
|
|
2852
2859
|
o && (r.__config__ = o), l && (r.__global__ = l), s && (r.__filter__ = s);
|
|
2853
|
-
return Gr(e, r,
|
|
2860
|
+
return Gr(e, r, Al, xl(e, Xe(_), i)), Wr(e, r, "__unsubscribing__"), Wl(e, t.event, r, e);
|
|
2854
2861
|
}
|
|
2855
2862
|
};
|
|
2856
2863
|
e.GObj = S, e.SDATA = j, e.SDATAAUTHZ = (e, t, n, r, l, o) => new T(e, t, n, null, o, r, null, 0, null, l, null), e.SDATACM = (e, t, n, r, l, o) => new T(e, t, 0, null, o, n, null, 0, l, r, null), e.SDATACM2 = (e, t, n, r, l, o, s) => new T(e, t, n, null, s, r, null, 0, o, l, null), e.SDATADF = (e, t, n, r, l, o) => new T(e, t, n, null, o, null, r, l), e.SDATAPM = (e, t, n, r, l) => new T(e, t, n, r, l), e.SDATAPM0 = (e, t, n, r, l) => new T(e, t, n, null, l, null, null, 0, null, null, r), e.SDATA_END = v, e.SDataDesc = T, e.YUNETA_VERSION = s, Object.defineProperty(e, "__yuno__", {
|
|
@@ -2864,7 +2871,7 @@
|
|
|
2864
2871
|
return t;
|
|
2865
2872
|
}, e.build_stats_response = o, e.clean_name = function(e) {
|
|
2866
2873
|
return e.replace(/[?# ^:]/g, "_");
|
|
2867
|
-
}, e.clear_timeout =
|
|
2874
|
+
}, e.clear_timeout = jl, e.cmp_two_simple_json = cr, e.command_parser = function(e, t, n, r) {}, e.createElement2 = function e(t, n) {
|
|
2868
2875
|
let [r, l, o, s] = t;
|
|
2869
2876
|
if (!r) return void hn("Tag must be a valid HTML element.");
|
|
2870
2877
|
let i = document.createElement(r), _ = "";
|
|
@@ -2873,21 +2880,21 @@
|
|
|
2873
2880
|
for (const n of Object.keys(l[e])) t += `${n}: ${l[e][n]};`;
|
|
2874
2881
|
i.style.cssText = t;
|
|
2875
2882
|
} else "style" === e ? i.style.cssText = l[e] : "i18n" === e || "data-i18n" === e || "data_i18next" === e || "data-i18next" === e ? null !== l[e] && void 0 !== l[e] && (_ = l[e], i.setAttribute("data-i18n", _)) : i.setAttribute(e, l[e]);
|
|
2876
|
-
if (
|
|
2877
|
-
else if (tr(o)) if (o = o.trim(), o.length > 0 && "<" === o[0] && !
|
|
2883
|
+
if (zr(o)) i.appendChild(Qr(o));
|
|
2884
|
+
else if (tr(o)) if (o = o.trim(), o.length > 0 && "<" === o[0] && !Xr) i.appendChild(el(o));
|
|
2878
2885
|
else if (o.length > 0 && "<" === o[0] && function(e) {
|
|
2879
|
-
if (
|
|
2886
|
+
if (Zr.size >= 100) return;
|
|
2880
2887
|
const t = e.slice(0, 80);
|
|
2881
|
-
|
|
2888
|
+
Zr.has(t) || (Zr.add(t), yn(`createElement2: a string that starts with '<' is TEXT (set_strings_are_text): use html_markup() if it is markup: ${JSON.stringify(t)}`));
|
|
2882
2889
|
}(o), n && _) i.textContent = n(_) || o;
|
|
2883
2890
|
else i.textContent = o;
|
|
2884
2891
|
else if (er(o)) {
|
|
2885
2892
|
if (o.length > 0) if (tr(o[0])) i.appendChild(e(o, n));
|
|
2886
|
-
else for (let t of o) Array.isArray(t) ? t.length > 0 && i.appendChild(e(t, n)) : t instanceof Node ? i.appendChild(t) :
|
|
2893
|
+
else for (let t of o) Array.isArray(t) ? t.length > 0 && i.appendChild(e(t, n)) : t instanceof Node ? i.appendChild(t) : zr(t) ? i.appendChild(Qr(t)) : tr(t) ? i.appendChild(document.createTextNode(t)) : null != t && !1 !== t && hn("createElement2: child ignored, type " + typeof t);
|
|
2887
2894
|
} else o instanceof HTMLElement || o instanceof Text || o instanceof SVGElement ? i.appendChild(o) : null != o && (hn("content ignored"), vn(o));
|
|
2888
2895
|
if (s && "object" == typeof s) for (const e of Object.keys(s)) i.addEventListener(e, s[e]);
|
|
2889
2896
|
return i;
|
|
2890
|
-
}, e.createOneHtml =
|
|
2897
|
+
}, e.createOneHtml = el, e.create_json_record = function(e, t) {
|
|
2891
2898
|
let n = Fn(e);
|
|
2892
2899
|
return Mn(n, t), n;
|
|
2893
2900
|
}, e.create_template_record = function(e, t) {
|
|
@@ -2898,21 +2905,21 @@
|
|
|
2898
2905
|
let o = Or(null, t, e, l);
|
|
2899
2906
|
Yn(n, e, o);
|
|
2900
2907
|
}), n;
|
|
2901
|
-
}, e.current_timestamp =
|
|
2902
|
-
let n = kr(
|
|
2908
|
+
}, e.current_timestamp = tl, e.data_type_t = y, e.db_list_persistent_attrs = function(e, t) {
|
|
2909
|
+
let n = kr(ul(e), null, !1), r = {};
|
|
2903
2910
|
return n && Zn(n) && (r = Rr(e, n, t, !1)), r;
|
|
2904
2911
|
}, e.db_load_persistent_attrs = function(e, t) {
|
|
2905
|
-
let n = Et(e, E.SDF_PERSIST), r = kr(
|
|
2912
|
+
let n = Et(e, E.SDF_PERSIST), r = kr(ul(e), null, !1);
|
|
2906
2913
|
if (r && Zn(r)) {
|
|
2907
2914
|
let l = Rr(e, r, t, !1);
|
|
2908
2915
|
l = Rr(e, l, n, !1), wt(e, l, E.SDF_PERSIST);
|
|
2909
2916
|
}
|
|
2910
2917
|
}, e.db_remove_persistent_attrs = function(e, t) {
|
|
2911
|
-
let n = Dr(e, kr(
|
|
2912
|
-
0 === zn(n) ? Ir(
|
|
2918
|
+
let n = Dr(e, kr(ul(e), null, !1), t, !1);
|
|
2919
|
+
0 === zn(n) ? Ir(ul(e)) : Ar(ul(e), n);
|
|
2913
2920
|
}, e.db_save_persistent_attrs = function(e, t) {
|
|
2914
|
-
let n = Rr(e, Et(e, E.SDF_PERSIST), t, !1), r = kr(
|
|
2915
|
-
return r && Zn(r) && Wn(n, r), Ar(
|
|
2921
|
+
let n = Rr(e, Et(e, E.SDF_PERSIST), t, !1), r = kr(ul(e), null, !1);
|
|
2922
|
+
return r && Zn(r) && Wn(n, r), Ar(ul(e), n);
|
|
2916
2923
|
}, e.debounce = function(e, t = 0, n = !1) {
|
|
2917
2924
|
let r = null, l = null, o = null;
|
|
2918
2925
|
const s = (...s) => {
|
|
@@ -2936,20 +2943,20 @@
|
|
|
2936
2943
|
return t;
|
|
2937
2944
|
}, e.empty_json = function(e) {
|
|
2938
2945
|
return 0 === Xn(e);
|
|
2939
|
-
}, e.empty_string = ir, e.escapeHtml =
|
|
2946
|
+
}, e.empty_string = ir, e.escapeHtml = qr, e.event_flag_t = R, e.flat2json = function(e) {
|
|
2940
2947
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat2json: a flat json is an object of id -> value");
|
|
2941
2948
|
let t = null;
|
|
2942
2949
|
for (const n of Object.keys(e)) {
|
|
2943
|
-
const r =
|
|
2950
|
+
const r = _l(n);
|
|
2944
2951
|
if (!r || 0 === r.length) throw new Error(`flat2json: malformed flat id: '${n}'`);
|
|
2945
|
-
if (r.length >
|
|
2952
|
+
if (r.length > ol) throw new Error(`flat2json: '${n}' deeper than 256`);
|
|
2946
2953
|
const l = "number" == typeof r[0];
|
|
2947
2954
|
if (null === t) t = l ? [] : {};
|
|
2948
2955
|
else if (l !== Array.isArray(t)) throw new Error(`flat2json: '${n}' does not fit a ${Array.isArray(t) ? "array" : "object"} root`);
|
|
2949
2956
|
let o = t;
|
|
2950
2957
|
for (let t = 0; t < r.length; t++) {
|
|
2951
2958
|
const l = r[t], s = "number" == typeof l, i = t === r.length - 1, _ = !i && "number" == typeof r[t + 1];
|
|
2952
|
-
if (s && l >
|
|
2959
|
+
if (s && l > sl) throw new Error(`flat2json: array index ${l} over the limit (100000) in '${n}'`);
|
|
2953
2960
|
if (s !== Array.isArray(o)) throw new Error(`flat2json: '${n}' uses a ${s ? "array index" : "key"} where the tree already has a ${Array.isArray(o) ? "array" : "object"}`);
|
|
2954
2961
|
if (i) {
|
|
2955
2962
|
if (Array.isArray(o)) {
|
|
@@ -2989,15 +2996,15 @@
|
|
|
2989
2996
|
removed: {},
|
|
2990
2997
|
changed: {}
|
|
2991
2998
|
};
|
|
2992
|
-
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ?
|
|
2999
|
+
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ? al(n[e], r[e]) || br(l.changed, e, {
|
|
2993
3000
|
from: n[e],
|
|
2994
3001
|
to: r[e]
|
|
2995
3002
|
}) : br(l.removed, e, n[e]);
|
|
2996
3003
|
for (const e of Object.keys(r)) Object.prototype.hasOwnProperty.call(n, e) || br(l.added, e, r[e]);
|
|
2997
3004
|
return l;
|
|
2998
3005
|
}, e.flat_key_join = function(e) {
|
|
2999
|
-
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` :
|
|
3000
|
-
}, e.flat_key_split =
|
|
3006
|
+
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` : il(e)).join("`") : "";
|
|
3007
|
+
}, e.flat_key_split = _l, e.gclass_add_ev_action = ye, e.gclass_add_event_type = Te, e.gclass_add_state = he, e.gclass_check_fsm = je, e.gclass_create = de, e.gclass_event_type = ve, e.gclass_find_by_name = Oe, e.gclass_flag_t = w, e.gclass_unregister = be, e.getPositionRelativeToBody = function(e) {
|
|
3001
3008
|
if (!e) return {
|
|
3002
3009
|
top: 0,
|
|
3003
3010
|
left: 0,
|
|
@@ -3016,7 +3023,7 @@
|
|
|
3016
3023
|
right: n + i + r,
|
|
3017
3024
|
bottom: t + s + l
|
|
3018
3025
|
};
|
|
3019
|
-
}, e.get_function_name =
|
|
3026
|
+
}, e.get_function_name = ll, e.get_now = function() {
|
|
3020
3027
|
return Math.floor(Date.now() / 1e3);
|
|
3021
3028
|
}, e.gobj_bottom_gobj = st, e.gobj_change_parent = function(e, t) {
|
|
3022
3029
|
return ot(e) ? (hn("gobj NULL or DESTROYED"), null) : t instanceof S ? (e.parent && e.parent.gclass.gmt.mt_child_removed && e.parent.gclass.gmt.mt_child_removed(e.parent, e), e.parent && (Re(e.parent, e), e.parent = null), $e(t, e), t.gclass.gmt.mt_child_added && (Y(e) && En(n("👦👦🔵 child_added(%s): %s", tt(t), et(e))), t.gclass.gmt.mt_child_added(t, e)), 0) : (hn(`${et(e)}: gobj_change_parent() BAD TYPE of parent`), -1);
|
|
@@ -3164,10 +3171,10 @@
|
|
|
3164
3171
|
}
|
|
3165
3172
|
return _ ? yn(`${et(e)}: Hard subscription not removed, only gobj_unsubscribe_list() with force removes it (event: ${t}, hard: ${_})`) : i || a || (yn(`${et(e)}: No subscription found`), Un(n, "No subscription found")), 0;
|
|
3166
3173
|
}, e.gobj_unsubscribe_list = Ht, e.gobj_walk_gobj_children = at, e.gobj_walk_gobj_children_tree = ut, e.gobj_write_attr = St, e.gobj_write_attrs = wt, e.gobj_write_bool_attr = Nt, e.gobj_write_integer_attr = $t, e.gobj_write_str_attr = Rt, e.gobj_yuno = qe, e.gobj_yuno_id = Qe, e.gobj_yuno_name = He, e.gobj_yuno_role = ze, e.html_markup = function(e) {
|
|
3167
|
-
return "string" != typeof e ? (hn("html_markup: not a string, type " + typeof e), new
|
|
3168
|
-
}, e.id_index_in_obj_list = Pr, e.index_in_list =
|
|
3174
|
+
return "string" != typeof e ? (hn("html_markup: not a string, type " + typeof e), new Hr("")) : new Hr(e);
|
|
3175
|
+
}, e.id_index_in_obj_list = Pr, e.index_in_list = nl, e.is_array = er, e.is_boolean = rr, e.is_date = function(e) {
|
|
3169
3176
|
return e instanceof Date && !isNaN(e);
|
|
3170
|
-
}, e.is_function = or, e.is_gobj = sr, e.is_html_markup =
|
|
3177
|
+
}, e.is_function = or, e.is_gobj = sr, e.is_html_markup = zr, e.is_metadata_key = function(e) {
|
|
3171
3178
|
if (!tr(e)) return !1;
|
|
3172
3179
|
let t = 0;
|
|
3173
3180
|
for (; t < e.length && "_" === e[t] && !(t > 2); t++);
|
|
@@ -3185,17 +3192,17 @@
|
|
|
3185
3192
|
}, e.is_secret_name = wn, e.is_string = tr, e.jdb_delete = function(e, t, n, r) {
|
|
3186
3193
|
let l = Or(null, Or(null, e, "topics", null, 0), t, null, 0);
|
|
3187
3194
|
if (!l) return hn("jdb_delete: topic not found: " + t), null;
|
|
3188
|
-
if (!Zn(r) || ir(r.id)) return hn(`jdb_delete: record without id: ${
|
|
3195
|
+
if (!Zn(r) || ir(r.id)) return hn(`jdb_delete: record without id: ${Yr(r)}`), null;
|
|
3189
3196
|
if (!tr(n)) return hn(`jdb_delete: path must be a string: ${String(n)}`), null;
|
|
3190
3197
|
if ("" !== n && n.split("`").includes("")) return hn(`jdb_delete: empty segment in path: '${n}'`), null;
|
|
3191
3198
|
let o, s = n.split("`"), i = l;
|
|
3192
|
-
for (; (o = s.shift()) && !ir(o) && i;) Zn(i) && (i = Or(null, i, e.hook, null, 0)), i =
|
|
3199
|
+
for (; (o = s.shift()) && !ir(o) && i;) Zn(i) && (i = Or(null, i, e.hook, null, 0)), i = Br(i, null, o, !1);
|
|
3193
3200
|
if (!i || 0 !== s.length) return hn(`jdb_delete: path not found in topic '${t}': '${n}'`), null;
|
|
3194
3201
|
let _ = er(i) ? i : Or(null, i, e.hook, null, 0), a = Pr(_, r.id);
|
|
3195
3202
|
return a < 0 ? (hn(`jdb_delete: record not found in topic '${t}': '${n}' '${r.id}'`), null) : (_.splice(a, 1), l);
|
|
3196
3203
|
}, e.jdb_get = function(e, t, n, r) {
|
|
3197
3204
|
let l = Or(null, Or(null, e, "topics", null, 0), t, null, 0);
|
|
3198
|
-
return l ? (void 0 === r && (r = !0),
|
|
3205
|
+
return l ? (void 0 === r && (r = !0), Br(l, e.hook, n, r)) : (hn("jdb_get: topic not found: " + t), null);
|
|
3199
3206
|
}, e.jdb_get_by_idx = function(e, t, n) {
|
|
3200
3207
|
let r = Or(null, Or(null, e, "topics", null, 0), t, null, 0);
|
|
3201
3208
|
return r ? n < r.length ? r[n] : {} : (hn("jdb_get_by_idx: topic not found: " + t), null);
|
|
@@ -3214,11 +3221,11 @@
|
|
|
3214
3221
|
}, e.jdb_update = function(e, t, n, r) {
|
|
3215
3222
|
let l = Or(null, Or(null, e, "topics", null, 0), t, null, 0);
|
|
3216
3223
|
if (!l) return hn("jdb_update: topic not found: " + t), null;
|
|
3217
|
-
if (!Zn(r) || ir(r.id)) return hn(`jdb_update: record without id: ${
|
|
3224
|
+
if (!Zn(r) || ir(r.id)) return hn(`jdb_update: record without id: ${Yr(r)}`), null;
|
|
3218
3225
|
if (!tr(n)) return hn(`jdb_update: path must be a string: ${String(n)}`), null;
|
|
3219
3226
|
if ("" !== n && n.split("`").includes("")) return hn(`jdb_update: empty segment in path: '${n}'`), null;
|
|
3220
3227
|
let o, s, i = n.split("`"), _ = l;
|
|
3221
|
-
for (; (o = i.shift()) && !ir(o) && _;) Zn(_) && (_ = Or(null, _, e.hook, null, 0)), _ =
|
|
3228
|
+
for (; (o = i.shift()) && !ir(o) && _;) Zn(_) && (_ = Or(null, _, e.hook, null, 0)), _ = Br(_, null, o, !1);
|
|
3222
3229
|
if (!_ || 0 !== i.length) return hn(`jdb_update: path not found in topic '${t}': '${n}'`), null;
|
|
3223
3230
|
if (er(_)) s = _;
|
|
3224
3231
|
else {
|
|
@@ -3226,11 +3233,11 @@
|
|
|
3226
3233
|
if (s = Or(null, _, e.hook, null, 0), null == s) s = [], Yn(_, e.hook, s);
|
|
3227
3234
|
else if (!er(s)) return hn(`jdb_update: the hook '${e.hook}' of '${n}' is not a list in topic '${t}'`), null;
|
|
3228
3235
|
}
|
|
3229
|
-
let a =
|
|
3236
|
+
let a = Br(s, e.hook, r.id, !1);
|
|
3230
3237
|
return a ? Gn(a, r) : s.push(r), l;
|
|
3231
3238
|
}, e.json2flat = function(e) {
|
|
3232
3239
|
const t = {}, n = (e, r, l) => {
|
|
3233
|
-
if (l >
|
|
3240
|
+
if (l > ol) throw new Error("json2flat: deeper than 256");
|
|
3234
3241
|
if (null === e || "object" != typeof e || Array.isArray(e)) {
|
|
3235
3242
|
if (Array.isArray(e) && e.length > 0) return void e.forEach((e, t) => {
|
|
3236
3243
|
const o = `[${t}]`;
|
|
@@ -3240,7 +3247,7 @@
|
|
|
3240
3247
|
const t = Object.keys(e);
|
|
3241
3248
|
if (t.length > 0) {
|
|
3242
3249
|
for (const o of t) {
|
|
3243
|
-
const t =
|
|
3250
|
+
const t = il(o);
|
|
3244
3251
|
n(e[o], 0 === l ? t : r + "`" + t, l + 1);
|
|
3245
3252
|
}
|
|
3246
3253
|
return;
|
|
@@ -3253,7 +3260,7 @@
|
|
|
3253
3260
|
return t ? (Array.prototype.push.apply(e, t), e) : e;
|
|
3254
3261
|
}, e.json_array_remove = Hn, e.json_array_size = Qn, e.json_deep_copy = Fn, e.json_is_identical = Vn, e.json_mask_secrets = Pn, e.json_object_del = Kn, e.json_object_get = xn, e.json_object_set = Yn, e.json_object_set_new = Bn, e.json_object_size = zn, e.json_object_update = Gn, e.json_object_update_existing = Mn, e.json_object_update_missing = Wn, e.json_size = Xn, e.jwt2json = function(e, t) {
|
|
3255
3262
|
try {
|
|
3256
|
-
let n =
|
|
3263
|
+
let n = Jr(e);
|
|
3257
3264
|
switch (t) {
|
|
3258
3265
|
case "header": return JSON.parse(n.header);
|
|
3259
3266
|
case "signature": return JSON.parse(n.signature);
|
|
@@ -3262,7 +3269,7 @@
|
|
|
3262
3269
|
} catch (e) {
|
|
3263
3270
|
return null;
|
|
3264
3271
|
}
|
|
3265
|
-
}, e.jwtDecode =
|
|
3272
|
+
}, e.jwtDecode = Jr, e.kw_clone_by_keys = Rr, e.kw_clone_by_not_keys = Dr, e.kw_collect = function(e, t, n, r) {
|
|
3266
3273
|
if (e && !sr(e) && hn("GObj bad instanceof"), !t) return null;
|
|
3267
3274
|
r || (r = $r);
|
|
3268
3275
|
let l = [];
|
|
@@ -3283,7 +3290,7 @@
|
|
|
3283
3290
|
e && !sr(e) && hn("GObj bad instanceof");
|
|
3284
3291
|
let o = mr(e, t, n, !1);
|
|
3285
3292
|
const s = l && l & Zt.KW_REQUIRED, i = l && l & Zt.KW_CREATE, _ = l && l & Zt.KW_EXTRACT;
|
|
3286
|
-
return void 0 === o ? i && er(r) && t ? (Sr(e, t, n, r), r) : (s && (hn(`path not found: '${n}'`), Un(t)), r) : er(o) ? (_ && hr(e, t, n), o) : (s && (hn(`${e ? et(e) + ": " : ""}path MUST BE a json list: '${n}'`), Un(t)), r);
|
|
3293
|
+
return void 0 === o ? i && er(r) && t ? (Sr(e, t, n, r), r) : (s && (hn(`path not found: '${n}'`), Un(t)), r) : er(o) ? (_ && hr(e, t, n), o) : i && null === o && er(r) ? (Sr(e, t, n, r), r) : ((s || i) && (hn(`${e ? et(e) + ": " : ""}path MUST BE a json list: '${n}'` + (i ? ", cannot create" : "")), Un(t)), r);
|
|
3287
3294
|
}, e.kw_get_local_storage_value = kr, e.kw_get_pointer = vr, e.kw_get_real = function(e, t, n, r, l) {
|
|
3288
3295
|
e && !sr(e) && hn("GObj bad instanceof");
|
|
3289
3296
|
let o = mr(e, t, n, !1);
|
|
@@ -3406,9 +3413,9 @@
|
|
|
3406
3413
|
var e;
|
|
3407
3414
|
}, r.send();
|
|
3408
3415
|
}, e.log_debug = En, e.log_error = hn, e.log_info = function(e, ...t) {
|
|
3409
|
-
let n = mn(e, ...t), r =
|
|
3416
|
+
let n = mn(e, ...t), r = tl();
|
|
3410
3417
|
rn && cn("info", n) && rn("%c" + r + " INFO: " + String(n), "color:cyan"), gn("info", n, r);
|
|
3411
|
-
}, e.log_warning = yn, e.mask_secrets_inline = kn, e.msg_iev_get_msg_type = xr, e.msg_iev_get_stack = Mr, e.msg_iev_push_stack = Gr, e.msg_iev_read_key = Fr, e.msg_iev_set_msg_type = Wr, e.msg_iev_write_key = Vr, e.node_uuid =
|
|
3418
|
+
}, e.log_warning = yn, e.mask_secrets_inline = kn, e.msg_iev_get_msg_type = xr, e.msg_iev_get_stack = Mr, e.msg_iev_push_stack = Gr, e.msg_iev_read_key = Fr, e.msg_iev_set_msg_type = Wr, e.msg_iev_write_key = Vr, e.node_uuid = rl, e.parseBoolean = _r, e.parseSVG = function(e) {
|
|
3412
3419
|
return new DOMParser().parseFromString(e, "image/svg+xml").firstChild;
|
|
3413
3420
|
}, e.refresh_language = function(e, t) {
|
|
3414
3421
|
if (!or(t)) return void hn("You must supply a translation function");
|
|
@@ -3435,22 +3442,22 @@
|
|
|
3435
3442
|
});
|
|
3436
3443
|
}, e.register_c_ievent_cli = function() {
|
|
3437
3444
|
return function(e) {
|
|
3438
|
-
if (
|
|
3445
|
+
if (Ul) return hn(`GClass ALREADY created: ${e}`), -1;
|
|
3439
3446
|
const t = [
|
|
3440
3447
|
["ST_DISCONNECTED", [
|
|
3441
3448
|
[
|
|
3442
3449
|
"EV_ON_OPEN",
|
|
3443
|
-
|
|
3450
|
+
Jl,
|
|
3444
3451
|
"ST_WAIT_IDENTITY_CARD_ACK"
|
|
3445
3452
|
],
|
|
3446
3453
|
[
|
|
3447
3454
|
"EV_ON_CLOSE",
|
|
3448
|
-
|
|
3455
|
+
ql,
|
|
3449
3456
|
null
|
|
3450
3457
|
],
|
|
3451
3458
|
[
|
|
3452
3459
|
"EV_TIMEOUT",
|
|
3453
|
-
|
|
3460
|
+
Bl,
|
|
3454
3461
|
null
|
|
3455
3462
|
],
|
|
3456
3463
|
[
|
|
@@ -3462,22 +3469,22 @@
|
|
|
3462
3469
|
["ST_WAIT_IDENTITY_CARD_ACK", [
|
|
3463
3470
|
[
|
|
3464
3471
|
"EV_ON_MESSAGE",
|
|
3465
|
-
|
|
3472
|
+
Xl,
|
|
3466
3473
|
null
|
|
3467
3474
|
],
|
|
3468
3475
|
[
|
|
3469
3476
|
"EV_IDENTITY_CARD_ACK",
|
|
3470
|
-
|
|
3477
|
+
Ql,
|
|
3471
3478
|
null
|
|
3472
3479
|
],
|
|
3473
3480
|
[
|
|
3474
3481
|
"EV_ON_CLOSE",
|
|
3475
|
-
|
|
3482
|
+
ql,
|
|
3476
3483
|
"ST_DISCONNECTED"
|
|
3477
3484
|
],
|
|
3478
3485
|
[
|
|
3479
3486
|
"EV_TIMEOUT",
|
|
3480
|
-
|
|
3487
|
+
zl,
|
|
3481
3488
|
null
|
|
3482
3489
|
],
|
|
3483
3490
|
[
|
|
@@ -3489,22 +3496,22 @@
|
|
|
3489
3496
|
["ST_SESSION", [
|
|
3490
3497
|
[
|
|
3491
3498
|
"EV_ON_MESSAGE",
|
|
3492
|
-
|
|
3499
|
+
Xl,
|
|
3493
3500
|
null
|
|
3494
3501
|
],
|
|
3495
3502
|
[
|
|
3496
3503
|
"EV_MT_STATS",
|
|
3497
|
-
|
|
3504
|
+
Zl,
|
|
3498
3505
|
null
|
|
3499
3506
|
],
|
|
3500
3507
|
[
|
|
3501
3508
|
"EV_MT_COMMAND",
|
|
3502
|
-
|
|
3509
|
+
eo,
|
|
3503
3510
|
null
|
|
3504
3511
|
],
|
|
3505
3512
|
[
|
|
3506
3513
|
"EV_ON_CLOSE",
|
|
3507
|
-
|
|
3514
|
+
ql,
|
|
3508
3515
|
"ST_DISCONNECTED"
|
|
3509
3516
|
],
|
|
3510
3517
|
[
|
|
@@ -3515,7 +3522,7 @@
|
|
|
3515
3522
|
]],
|
|
3516
3523
|
[null, null]
|
|
3517
3524
|
];
|
|
3518
|
-
return (
|
|
3525
|
+
return (Ul = de(e, [
|
|
3519
3526
|
["EV_ON_MESSAGE", R.EVF_OUTPUT_EVENT],
|
|
3520
3527
|
["EV_IDENTITY_CARD_ACK", R.EVF_PUBLIC_EVENT],
|
|
3521
3528
|
["EV_ON_ID_NAK", R.EVF_PUBLIC_EVENT | R.EVF_OUTPUT_EVENT],
|
|
@@ -3526,36 +3533,36 @@
|
|
|
3526
3533
|
["EV_ON_OPEN_ERROR", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS],
|
|
3527
3534
|
["EV_TIMEOUT", 0],
|
|
3528
3535
|
[null, 0]
|
|
3529
|
-
], t,
|
|
3536
|
+
], t, to, 0, Il, Pl, 0, 0, Cl, w.gcflag_no_check_output_events)) ? 0 : -1;
|
|
3530
3537
|
}("C_IEVENT_CLI");
|
|
3531
3538
|
}, e.register_c_timer = function() {
|
|
3532
3539
|
return function(e) {
|
|
3533
|
-
if (
|
|
3540
|
+
if (hl) return hn(`GClass ALREADY created: ${e}`), -1;
|
|
3534
3541
|
const t = [["ST_IDLE", [[
|
|
3535
3542
|
"EV_TIMEOUT",
|
|
3536
|
-
|
|
3543
|
+
yl,
|
|
3537
3544
|
null
|
|
3538
3545
|
]]]];
|
|
3539
|
-
return (
|
|
3546
|
+
return (hl = de(e, [
|
|
3540
3547
|
["EV_TIMEOUT", R.EVF_OUTPUT_EVENT],
|
|
3541
3548
|
["EV_TIMEOUT_PERIODIC", R.EVF_OUTPUT_EVENT],
|
|
3542
3549
|
[0, 0]
|
|
3543
|
-
], t,
|
|
3550
|
+
], t, El, 0, pl, ml, 0, 0, 0, w.gcflag_manual_start)) ? 0 : -1;
|
|
3544
3551
|
}("C_TIMER");
|
|
3545
3552
|
}, e.register_c_yuno = function() {
|
|
3546
3553
|
return function(e) {
|
|
3547
|
-
if (
|
|
3554
|
+
if (wl) return hn(`GClass ALREADY created: ${e}`), -1;
|
|
3548
3555
|
const t = [["ST_IDLE", [[
|
|
3549
3556
|
"EV_TIMEOUT_PERIODIC",
|
|
3550
|
-
|
|
3557
|
+
Dl,
|
|
3551
3558
|
null
|
|
3552
3559
|
]]]];
|
|
3553
|
-
return (
|
|
3560
|
+
return (wl = de(e, [["EV_TIMEOUT_PERIODIC", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS], [0, 0]], t, kl, 0, Ol, Sl, 0, 0, 0, 0)) ? 0 : -1;
|
|
3554
3561
|
}("C_YUNO");
|
|
3555
3562
|
}, e.safeSrc = function(e) {
|
|
3556
3563
|
if (!e) return "";
|
|
3557
3564
|
const t = String(e).trim();
|
|
3558
|
-
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" :
|
|
3565
|
+
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" : qr(t);
|
|
3559
3566
|
}, e.sdata_flag_t = E, e.send_http_json_post = function(e, t, n) {
|
|
3560
3567
|
let r = new XMLHttpRequest();
|
|
3561
3568
|
r.open("POST", e), r.setRequestHeader("Accept", "application/json"), r.setRequestHeader("Content-Type", "application/json"), r.onreadystatechange = function() {
|
|
@@ -3579,9 +3586,9 @@
|
|
|
3579
3586
|
}
|
|
3580
3587
|
} else on = e;
|
|
3581
3588
|
}, e.set_remote_log_functions = bn, e.set_strings_are_text = function(e) {
|
|
3582
|
-
|
|
3583
|
-
}, e.set_timeout =
|
|
3584
|
-
return
|
|
3589
|
+
Xr = !!e;
|
|
3590
|
+
}, e.set_timeout = Tl, e.set_timeout_periodic = vl, e.sprintf = n, e.stats_parser = function(e, t, n, r) {}, e.str_in_list = Ur, e.strcasecmp = ur, e.strcmp = ar, e.strings_are_text = function() {
|
|
3591
|
+
return Xr;
|
|
3585
3592
|
}, e.strncmp = function(e, t, n) {
|
|
3586
3593
|
var r = (e + "").substring(0, n), l = (t + "").substring(0, n);
|
|
3587
3594
|
return r === l ? 0 : r > l ? 1 : -1;
|
|
@@ -3611,9 +3618,9 @@
|
|
|
3611
3618
|
let e = t.split(".");
|
|
3612
3619
|
for (let t = 0; t < e.length; t++) {
|
|
3613
3620
|
let r = e[t];
|
|
3614
|
-
if (Ur(
|
|
3615
|
-
else if (Ur(
|
|
3616
|
-
else if (Ur(
|
|
3621
|
+
if (Ur(fl, r)) n.real_type || (n.real_type = r);
|
|
3622
|
+
else if (Ur(dl, r)) n.type || (n.type = r);
|
|
3623
|
+
else if (Ur(gl, r)) switch (r) {
|
|
3617
3624
|
case "writable":
|
|
3618
3625
|
n.is_writable = !0;
|
|
3619
3626
|
break;
|
|
@@ -3625,7 +3632,7 @@
|
|
|
3625
3632
|
}
|
|
3626
3633
|
}
|
|
3627
3634
|
n.real_type || (n.real_type = "string");
|
|
3628
|
-
} else Zn(t) ? (n =
|
|
3635
|
+
} else Zn(t) ? (n = bl(t), n.name || (n.name = e), n.header || (n.header = e)) : er(t) && (n.real_type = "array", n.enum_list = t);
|
|
3629
3636
|
return n.type || (n.type = n.real_type), n;
|
|
3630
3637
|
}, e.timeTracker = function(e = "Time Tracker", t = !1) {
|
|
3631
3638
|
const n = e, r = performance.now();
|
|
@@ -3637,7 +3644,7 @@
|
|
|
3637
3644
|
total: _
|
|
3638
3645
|
};
|
|
3639
3646
|
} };
|
|
3640
|
-
}, e.trace_json = vn, e.trace_json_masked = Un, e.trace_level_t = P, e.trace_msg = Tn, e.treedb_decoder_fkey =
|
|
3647
|
+
}, e.trace_json = vn, e.trace_json_masked = Un, e.trace_level_t = P, e.trace_msg = Tn, e.treedb_decoder_fkey = cl, e.treedb_decoder_hook = function(e, t) {
|
|
3641
3648
|
if (tr(t)) {
|
|
3642
3649
|
if (-1 === t.indexOf("^")) {
|
|
3643
3650
|
let n, r = e.hook;
|
|
@@ -3664,9 +3671,9 @@
|
|
|
3664
3671
|
id: t.id
|
|
3665
3672
|
} : (hn("bad hook 3"), hn(e), hn(t), null);
|
|
3666
3673
|
}, e.treedb_encoder_fkey = function(e, t) {
|
|
3667
|
-
let n =
|
|
3674
|
+
let n = cl(e, t);
|
|
3668
3675
|
return n ? n.topic_name + "^" + n.id + "^" + n.hook_name : null;
|
|
3669
|
-
}, e.treedb_get_field_desc =
|
|
3676
|
+
}, e.treedb_get_field_desc = bl, e.treedb_hook_data_size = function(e) {
|
|
3670
3677
|
if (er(e) && 1 === Xn(e)) {
|
|
3671
3678
|
let t = e[0];
|
|
3672
3679
|
return gr(t, "size") ? t.size : 1;
|