@yuneta/gobj-js 7.22.1 → 7.22.2
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 +40 -5
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +781 -755
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +40 -5
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +846 -820
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +40 -5
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +781 -755
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +40 -5
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +813 -787
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.es.min.js
CHANGED
|
@@ -169,17 +169,17 @@ var v = Object.freeze({
|
|
|
169
169
|
SDF_AUTHZ_RS: 1048576
|
|
170
170
|
});
|
|
171
171
|
v.SDF_RD, v.SDF_WR, v.SDF_STATS, v.SDF_PERSIST, v.SDF_VOLATIL, v.SDF_RSTATS, v.SDF_PSTATS, v.SDF_WR, v.SDF_PERSIST;
|
|
172
|
-
var
|
|
172
|
+
var S = class {
|
|
173
173
|
constructor(e, t, n = 0, r = null, l = "", o = null, i = null, s = 0, a = null, u = null, _ = null) {
|
|
174
174
|
this.type = e, this.name = t, this.alias = o, this.flag = n, this.default_value = r, this.header = i, this.fillspace = s, this.description = l, this.json_fn = a, this.schema = u, this.authpth = _;
|
|
175
175
|
}
|
|
176
|
-
},
|
|
176
|
+
}, O = () => new S(0, null), N = (e, t, n, r, l) => new S(e, t, n, r, l), R = (e, t, n, r, l, o) => new S(e, t, 0, null, o, n, null, 0, l, r, null), w = (e, t, n, r, l, o, i) => new S(e, t, n, null, i, r, null, 0, o, l, null), j = (e, t, n, r, l) => new S(e, t, n, r, l), D = (e, t, n, r, l, o) => new S(e, t, n, null, o, r, null, 0, null, l, null), A = (e, t, n, r, l) => new S(e, t, n, null, l, null, null, 0, null, null, r), $ = (e, t, n, r, l, o) => new S(e, t, n, null, o, null, r, l), I = class {
|
|
177
177
|
constructor(e, t, n, r, l, o, i, s, a) {
|
|
178
178
|
this.gclass_name = e, this.dl_states = [], this.dl_events = [], this.gmt = t, this.lmt = n, this.attrs_table = r, this.priv = l, this.authz_table = o, this.command_table = i, this.s_user_trace_level = s, this.gclass_flag = Number(a) || 0, this.instances = 0, this.trace_level = 0, this.no_trace_level = 0, this.jn_trace_filter = null, this.fsm_checked = !1;
|
|
179
179
|
}
|
|
180
180
|
}, k = class {
|
|
181
181
|
constructor(e, t, n, r, l) {
|
|
182
|
-
this.__refs__ = 0, this.gclass = t, this.parent = null, this.dl_children = [], this.dl_subscriptions = [], this.dl_subscribings = [], this.current_state = t.dl_states[0], this.last_state = null, this.obflag = 0, this.gobj_flag = Number(l) || 0, this.gobj_name = e, this.jn_attrs = null, this.jn_stats = {}, this.jn_user_data = {}, this.full_name = null, this.short_name = null, this.priv =
|
|
182
|
+
this.__refs__ = 0, this.gclass = t, this.parent = null, this.dl_children = [], this.dl_subscriptions = [], this.dl_subscribings = [], this.current_state = t.dl_states[0], this.last_state = null, this.obflag = 0, this.gobj_flag = Number(l) || 0, this.gobj_name = e, this.jn_attrs = null, this.jn_stats = {}, this.jn_user_data = {}, this.full_name = null, this.short_name = null, this.priv = ur(t.priv), this.running = !1, this.playing = !1, this.disabled = !1, this.bottom_gobj = null, this.trace_level = 0, this.no_trace_level = 0;
|
|
183
183
|
}
|
|
184
184
|
}, C = Object.freeze({
|
|
185
185
|
gcflag_manual_start: 1,
|
|
@@ -231,7 +231,7 @@ function x() {
|
|
|
231
231
|
return W;
|
|
232
232
|
}
|
|
233
233
|
function Y(e) {
|
|
234
|
-
|
|
234
|
+
wr(e) && (e = JSON.stringify(e)), ir(" ".repeat(Math.max(1, 2 * T)) + String(e));
|
|
235
235
|
}
|
|
236
236
|
var B = Object.freeze({
|
|
237
237
|
TRACE_MACHINE: 65536,
|
|
@@ -333,7 +333,7 @@ function z(e, t) {
|
|
|
333
333
|
return n;
|
|
334
334
|
}
|
|
335
335
|
function X(e, t, n) {
|
|
336
|
-
if (
|
|
336
|
+
if (Ur(e)) return void 0 === n ? 268369920 : 65535;
|
|
337
337
|
if (/^[0-9]+$/.test(String(e))) {
|
|
338
338
|
const t = Number(e);
|
|
339
339
|
if (t) return t;
|
|
@@ -344,7 +344,7 @@ function X(e, t, n) {
|
|
|
344
344
|
for (let n = 0; n < t.length && n < 16; n++) if (t[n] && t[n][0] === e) return 1 << n;
|
|
345
345
|
}
|
|
346
346
|
return 0;
|
|
347
|
-
}(String(e), n) || (
|
|
347
|
+
}(String(e), n) || (rr(`${t}: trace level NOT FOUND: ${e}`), 0);
|
|
348
348
|
}
|
|
349
349
|
function Z(e) {
|
|
350
350
|
if (Q) return 4294967295;
|
|
@@ -406,43 +406,43 @@ function de() {
|
|
|
406
406
|
return z(H, null);
|
|
407
407
|
}
|
|
408
408
|
function be(e) {
|
|
409
|
-
const t =
|
|
410
|
-
return t ? z(t.trace_level | q, t.s_user_trace_level) : (
|
|
409
|
+
const t = Dr(e) ? Me(e) : e;
|
|
410
|
+
return t ? z(t.trace_level | q, t.s_user_trace_level) : (rr(`gobj_get_gclass_trace_level: gclass NOT FOUND: ${e}`), []);
|
|
411
411
|
}
|
|
412
412
|
function pe(e) {
|
|
413
|
-
const t =
|
|
414
|
-
return t ? z(t.trace_level, t.s_user_trace_level) : (
|
|
413
|
+
const t = Dr(e) ? Me(e) : e;
|
|
414
|
+
return t ? z(t.trace_level, t.s_user_trace_level) : (rr(`gobj_get_gclass_trace_level2: gclass NOT FOUND: ${e}`), []);
|
|
415
415
|
}
|
|
416
416
|
function me(e) {
|
|
417
|
-
const t =
|
|
418
|
-
return t ? z(t.no_trace_level, t.s_user_trace_level) : (
|
|
417
|
+
const t = Dr(e) ? Me(e) : e;
|
|
418
|
+
return t ? z(t.no_trace_level, t.s_user_trace_level) : (rr(`gobj_get_gclass_trace_no_level: gclass NOT FOUND: ${e}`), []);
|
|
419
419
|
}
|
|
420
420
|
function Ee(e) {
|
|
421
421
|
return Q = Number(e) || 0, 0;
|
|
422
422
|
}
|
|
423
423
|
function he(e, t, n) {
|
|
424
|
-
const r =
|
|
425
|
-
if (!r) return
|
|
424
|
+
const r = Dr(e) ? Me(e) : e;
|
|
425
|
+
if (!r) return rr(`gobj_set_gclass_trace: gclass NOT FOUND: ${e}`), -1;
|
|
426
426
|
const l = null === t ? 4294967295 : X(t, "gobj_set_gclass_trace", r.s_user_trace_level || null);
|
|
427
427
|
return l ? (n ? r.trace_level |= l : r.trace_level &= ~l, 0) : -1;
|
|
428
428
|
}
|
|
429
429
|
function Te(e, t, n) {
|
|
430
|
-
if (!e) return
|
|
430
|
+
if (!e) return rr("gobj_set_gobj_trace: gobj NULL"), -1;
|
|
431
431
|
const r = X(t, "gobj_set_gobj_trace", e.gclass && e.gclass.s_user_trace_level || null);
|
|
432
432
|
return r ? (n ? e.trace_level |= r : e.trace_level &= ~r, 0) : -1;
|
|
433
433
|
}
|
|
434
434
|
function ye(e, t, n) {
|
|
435
|
-
const r =
|
|
436
|
-
if (!r) return
|
|
435
|
+
const r = Dr(e) ? Me(e) : e;
|
|
436
|
+
if (!r) return rr(`gobj_set_gclass_no_trace: gclass NOT FOUND: ${e}`), -1;
|
|
437
437
|
const l = null === t ? 4294967295 : X(t, "gobj_set_gclass_no_trace", r.s_user_trace_level || null);
|
|
438
438
|
return l ? (n ? r.no_trace_level |= l : r.no_trace_level &= ~l, 0) : -1;
|
|
439
439
|
}
|
|
440
440
|
function ve(e, t, n) {
|
|
441
|
-
if (!e) return
|
|
441
|
+
if (!e) return rr("gobj_set_gobj_no_trace: gobj NULL"), -1;
|
|
442
442
|
const r = X(t, "gobj_set_gobj_no_trace", e.gclass && e.gclass.s_user_trace_level || null);
|
|
443
443
|
return r ? (n ? e.no_trace_level |= r : e.no_trace_level &= ~r, 0) : -1;
|
|
444
444
|
}
|
|
445
|
-
function
|
|
445
|
+
function Se() {
|
|
446
446
|
return J.map(([e, t, n]) => ({
|
|
447
447
|
name: e,
|
|
448
448
|
bit: t,
|
|
@@ -450,7 +450,7 @@ function Oe() {
|
|
|
450
450
|
set: !!(q & t)
|
|
451
451
|
}));
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function Oe(e, t, n, r, l, o, i) {
|
|
454
454
|
u = t, _ = n, c = r, f = l, g = o, d = i;
|
|
455
455
|
const s = [["EV_STATE_CHANGED", U.EVF_SYSTEM_EVENT | U.EVF_OUTPUT_EVENT | U.EVF_NO_WARN_SUBS], [0, 0]];
|
|
456
456
|
for (let e = 0; e < s.length; e++) {
|
|
@@ -461,7 +461,7 @@ function Se(e, t, n, r, l, o, i) {
|
|
|
461
461
|
}
|
|
462
462
|
function Ne(e, t) {
|
|
463
463
|
let n = {};
|
|
464
|
-
if (!
|
|
464
|
+
if (!jr(t)) return rr("sdata_desc MUST be an array"), ar(t), n;
|
|
465
465
|
for (let r = 0; r < t.length; r++) {
|
|
466
466
|
const l = t[r];
|
|
467
467
|
l.name && Re(e, n, l);
|
|
@@ -475,133 +475,133 @@ function Re(e, t, n) {
|
|
|
475
475
|
r = String(l);
|
|
476
476
|
break;
|
|
477
477
|
case y.DTP_BOOLEAN:
|
|
478
|
-
r =
|
|
478
|
+
r = Fr(l);
|
|
479
479
|
break;
|
|
480
480
|
case y.DTP_INTEGER:
|
|
481
|
-
r = parseInt(l), isNaN(r) &&
|
|
481
|
+
r = parseInt(l), isNaN(r) && rr(`${Dt(e)}: attr NaN: ${n.name}`);
|
|
482
482
|
break;
|
|
483
483
|
case y.DTP_REAL:
|
|
484
|
-
r = Number(l), isNaN(r) &&
|
|
484
|
+
r = Number(l), isNaN(r) && rr(`${Dt(e)}: attr NaN: ${n.name}`);
|
|
485
485
|
break;
|
|
486
486
|
case y.DTP_LIST:
|
|
487
|
-
if (
|
|
487
|
+
if (Dr(l)) try {
|
|
488
488
|
r = JSON.parse(l);
|
|
489
489
|
} catch (e) {
|
|
490
|
-
|
|
490
|
+
rr(`JSON parse error: ${e.message}`);
|
|
491
491
|
}
|
|
492
492
|
else r = l;
|
|
493
|
-
|
|
493
|
+
jr(r) || (r = []);
|
|
494
494
|
break;
|
|
495
495
|
case y.DTP_DICT:
|
|
496
|
-
if (
|
|
496
|
+
if (Dr(l)) try {
|
|
497
497
|
r = JSON.parse(l);
|
|
498
498
|
} catch (e) {
|
|
499
|
-
|
|
499
|
+
rr(`JSON parse error: ${e.message}`);
|
|
500
500
|
}
|
|
501
501
|
else r = l;
|
|
502
|
-
|
|
502
|
+
wr(r) || (r = {});
|
|
503
503
|
break;
|
|
504
504
|
case y.DTP_JSON:
|
|
505
|
-
if (
|
|
505
|
+
if (Dr(l)) try {
|
|
506
506
|
r = JSON.parse(l);
|
|
507
507
|
} catch (e) {
|
|
508
|
-
|
|
508
|
+
rr(`JSON parse error: ${e.message}`);
|
|
509
509
|
}
|
|
510
510
|
else r = l;
|
|
511
511
|
break;
|
|
512
512
|
case y.DTP_POINTER: r = l;
|
|
513
513
|
}
|
|
514
|
-
return void 0 === r && (
|
|
514
|
+
return void 0 === r && (rr(`default_value WRONG, it: ${n.name}, value: ${n.default_value}`), r = null), t[n.name] = r, 0;
|
|
515
515
|
}
|
|
516
516
|
function we(e, t, n, r) {
|
|
517
517
|
let l;
|
|
518
518
|
switch (n.type) {
|
|
519
519
|
case y.DTP_STRING:
|
|
520
520
|
if (null == r) l = "";
|
|
521
|
-
else if (
|
|
521
|
+
else if (Dr(r)) l = String(r);
|
|
522
522
|
else {
|
|
523
523
|
let e = JSON.stringify(r);
|
|
524
524
|
e && (l = String(e));
|
|
525
525
|
}
|
|
526
526
|
break;
|
|
527
527
|
case y.DTP_BOOLEAN:
|
|
528
|
-
l =
|
|
528
|
+
l = Fr(r);
|
|
529
529
|
break;
|
|
530
530
|
case y.DTP_INTEGER:
|
|
531
|
-
l = parseInt(r), isNaN(l) &&
|
|
531
|
+
l = parseInt(r), isNaN(l) && rr(`${Dt(e)}: attr NaN: ${n.name}`);
|
|
532
532
|
break;
|
|
533
533
|
case y.DTP_REAL:
|
|
534
|
-
l = Number(r), isNaN(l) &&
|
|
534
|
+
l = Number(r), isNaN(l) && rr(`${Dt(e)}: attr NaN: ${n.name}`);
|
|
535
535
|
break;
|
|
536
536
|
case y.DTP_LIST:
|
|
537
|
-
if (
|
|
537
|
+
if (Dr(r)) try {
|
|
538
538
|
l = JSON.parse(r);
|
|
539
539
|
} catch (e) {
|
|
540
|
-
|
|
540
|
+
rr(`JSON parse error: ${e.message}`);
|
|
541
541
|
}
|
|
542
542
|
else l = r;
|
|
543
|
-
if (!
|
|
543
|
+
if (!jr(l)) return rr(`attr must be an array: ${n.name}`), -1;
|
|
544
544
|
break;
|
|
545
545
|
case y.DTP_DICT:
|
|
546
|
-
if (
|
|
546
|
+
if (Dr(r)) try {
|
|
547
547
|
l = JSON.parse(r);
|
|
548
548
|
} catch (e) {
|
|
549
|
-
|
|
549
|
+
rr(`JSON parse error: ${e.message}`);
|
|
550
550
|
}
|
|
551
551
|
else l = r;
|
|
552
|
-
if (!
|
|
552
|
+
if (!wr(l)) return rr(`attr must be an object: ${n.name}`), -1;
|
|
553
553
|
break;
|
|
554
554
|
case y.DTP_JSON:
|
|
555
|
-
if (
|
|
555
|
+
if (Dr(r)) try {
|
|
556
556
|
l = JSON.parse(r);
|
|
557
557
|
} catch (e) {
|
|
558
|
-
|
|
558
|
+
rr(`JSON parse error: ${e.message}`);
|
|
559
559
|
}
|
|
560
560
|
else l = r;
|
|
561
|
-
if (!
|
|
561
|
+
if (!jr(l) && !wr(l)) return rr(`attr must be a json dict/list: ${n.name}`), -1;
|
|
562
562
|
break;
|
|
563
563
|
case y.DTP_POINTER: l = r;
|
|
564
564
|
}
|
|
565
|
-
return void 0 === l &&
|
|
565
|
+
return void 0 === l && rr(`${Dt(e)}: attr undefined: ${n.name}`), t[n.name] = l, wr(e.priv) && e.priv.hasOwnProperty(n.name) && (e.priv[n.name] = l), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, n.name), 0;
|
|
566
566
|
}
|
|
567
567
|
function je(e) {
|
|
568
568
|
return e.jn_attrs;
|
|
569
569
|
}
|
|
570
570
|
function De(e, t, n) {
|
|
571
|
-
return Qt(e, t) ? je(e) : e && e.bottom_gobj ? De(e.bottom_gobj, t, n) : (n &&
|
|
571
|
+
return Qt(e, t) ? je(e) : e && e.bottom_gobj ? De(e.bottom_gobj, t, n) : (n && rr(`GClass Attribute NOT FOUND: ${Dt(e)}, attr ${t}`), null);
|
|
572
572
|
}
|
|
573
573
|
function Ae(e, t, n) {
|
|
574
|
-
if (!(e && e instanceof I)) return n &&
|
|
574
|
+
if (!(e && e instanceof I)) return n && rr("gclass NULL"), null;
|
|
575
575
|
if (!t) return e.attrs_table;
|
|
576
576
|
for (let n = 0; n < e.attrs_table.length; n++) {
|
|
577
577
|
const r = e.attrs_table[n];
|
|
578
578
|
if (r.name && r.name === t) return r;
|
|
579
579
|
}
|
|
580
|
-
return n &&
|
|
580
|
+
return n && rr(`${e.gclass_name}: GClass Attribute NOT FOUND: ${t}`), null;
|
|
581
581
|
}
|
|
582
582
|
function $e(e, t, n, r, l, o, i, s, a, u, _) {
|
|
583
|
-
if (
|
|
584
|
-
if (e.includes("`") || e.includes("^") || e.includes(".")) return
|
|
585
|
-
if (Me(e)) return
|
|
583
|
+
if (Ur(e)) return rr("gclass_name EMPTY"), null;
|
|
584
|
+
if (e.includes("`") || e.includes("^") || e.includes(".")) return rr(`GClass name CANNOT have '.' or '^' or '\`' char: ${e}`), null;
|
|
585
|
+
if (Me(e)) return rr(`GClass ALREADY exists: ${e}`), null;
|
|
586
586
|
let c = new I(e, r, l, o, i, s, a, u, _);
|
|
587
587
|
(function(e, t) {
|
|
588
|
-
e && e instanceof I ? t ? p[t] ?
|
|
588
|
+
e && e instanceof I ? t ? p[t] ? rr(`gclass ALREADY REGISTERED: ${t}`) : p[t] = e : rr("gclass_name undefined") : rr("gclass undefined");
|
|
589
589
|
})(c, e);
|
|
590
590
|
const f = n.length;
|
|
591
591
|
for (let e = 0; e < f; e++) {
|
|
592
592
|
let t = n[e][0], r = n[e][1];
|
|
593
|
-
if (
|
|
593
|
+
if (Ur(t)) continue;
|
|
594
594
|
if (Le(c, t) < 0) return Ie(c), null;
|
|
595
595
|
const l = r.length;
|
|
596
596
|
for (let e = 0; e < l; e++) {
|
|
597
597
|
let n = r[e][0], l = r[e][1], o = r[e][2];
|
|
598
|
-
|
|
598
|
+
Ur(n) || Pe(c, t, n, l, o);
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
601
|
for (let e = 0; e < t.length; e++) {
|
|
602
602
|
let n = t[e][0], r = t[e][1];
|
|
603
|
-
if (!
|
|
604
|
-
if (Ge(c, n)) return
|
|
603
|
+
if (!Ur(n)) {
|
|
604
|
+
if (Ge(c, n)) return rr(`SMachine: event repeated in input_events: ${n}`), Ie(c), null;
|
|
605
605
|
Fe(c, n, r);
|
|
606
606
|
}
|
|
607
607
|
}
|
|
@@ -613,13 +613,13 @@ function $e(e, t, n, r, l, o, i, s, a, u, _) {
|
|
|
613
613
|
}
|
|
614
614
|
function Ie(e) {
|
|
615
615
|
let t;
|
|
616
|
-
if (
|
|
616
|
+
if (Dr(e)) t = e;
|
|
617
617
|
else {
|
|
618
|
-
if (!(e instanceof I)) return
|
|
618
|
+
if (!(e instanceof I)) return rr("Cannot unregister gclass, type unknown"), -1;
|
|
619
619
|
t = e.gclass_name;
|
|
620
620
|
}
|
|
621
621
|
let n = p[t];
|
|
622
|
-
return n ? n.instances > 0 ? (
|
|
622
|
+
return n ? n.instances > 0 ? (rr(`Cannot unregister gclass, instances in use: ${t}`), -1) : (delete p[t], 0) : (rr(`Cannot unregister gclass, not found: ${t}`), -1);
|
|
623
623
|
}
|
|
624
624
|
function ke(e, t) {
|
|
625
625
|
const n = e.dl_states.length, r = e.dl_states;
|
|
@@ -638,22 +638,22 @@ function Ce(e, t) {
|
|
|
638
638
|
return null;
|
|
639
639
|
}
|
|
640
640
|
function Le(e, t) {
|
|
641
|
-
return e instanceof I ? ke(e, t) ? (
|
|
641
|
+
return e instanceof I ? ke(e, t) ? (rr(`state already exists: ${t}`), -1) : (e.dl_states.push(new V(t)), 0) : (rr("Cannot add state, typeof not GClass"), -1);
|
|
642
642
|
}
|
|
643
643
|
function Pe(e, t, n, r, l) {
|
|
644
|
-
if (!(e instanceof I)) return
|
|
645
|
-
if (
|
|
644
|
+
if (!(e instanceof I)) return rr("Cannot add state, typeof not GClass"), -1;
|
|
645
|
+
if (Ur(t)) return rr("state_name EMPTY"), -1;
|
|
646
646
|
let o = ke(e, t);
|
|
647
|
-
return o ? Ce(o, n) ? (
|
|
647
|
+
return o ? Ce(o, n) ? (rr(`event already exists: gclass ${e.gclass_name}, state ${t}, event ${n}`), -1) : (o.dl_actions.push(new G(n, r, l)), 0) : (rr(`state not found: ${t}`), -1);
|
|
648
648
|
}
|
|
649
649
|
function Ue(e, t, n) {
|
|
650
|
-
|
|
650
|
+
Ur(t) || e.push(new M(t, n));
|
|
651
651
|
}
|
|
652
652
|
function Fe(e, t, n) {
|
|
653
|
-
return e instanceof I ? Ue(e.dl_events, t, n) : (
|
|
653
|
+
return e instanceof I ? Ue(e.dl_events, t, n) : (rr("Cannot add state, typeof not GClass"), -1);
|
|
654
654
|
}
|
|
655
655
|
function Ge(e, t) {
|
|
656
|
-
if (!(e instanceof I)) return
|
|
656
|
+
if (!(e instanceof I)) return rr("Cannot add state, typeof not GClass"), 0;
|
|
657
657
|
const n = e.dl_events.length, r = e.dl_events;
|
|
658
658
|
for (let e = 0; e < n; e++) {
|
|
659
659
|
let n = r[e];
|
|
@@ -662,25 +662,25 @@ function Ge(e, t) {
|
|
|
662
662
|
return null;
|
|
663
663
|
}
|
|
664
664
|
function Ve(e) {
|
|
665
|
-
if (!(e instanceof I)) return
|
|
665
|
+
if (!(e instanceof I)) return rr("Cannot add state, typeof not GClass"), -1;
|
|
666
666
|
let t = 0;
|
|
667
|
-
|
|
667
|
+
Or(e.dl_states) || (rr(`GClass without states: ${e.gclass_name}`), t += -1);
|
|
668
668
|
for (let n = 0; n < e.dl_states.length; n++) {
|
|
669
669
|
let r = e.dl_states[n];
|
|
670
|
-
if (!
|
|
670
|
+
if (!Ur(r.state_name)) for (let n = 0; n < r.dl_actions.length; n++) {
|
|
671
671
|
let l = r.dl_actions[n];
|
|
672
|
-
|
|
672
|
+
Ur(l.event_name) || (Ge(e, l.event_name) || (rr(`SMachine: state's event NOT in input_events: gclass ${e.gclass_name}, state ${r.state_name}, event ${l.event_name}`), t += -1), l.next_state && (ke(e, l.next_state) || (rr(`SMachine: next state NOT in state names: gclass ${e.gclass_name}, state ${r.state_name}, next_state ${l.next_state}`), t += -1)));
|
|
673
673
|
}
|
|
674
674
|
}
|
|
675
675
|
for (let n = 0; n < e.dl_events.length; n++) {
|
|
676
676
|
let r = e.dl_events[n];
|
|
677
|
-
if (!
|
|
677
|
+
if (!Ur(r.event_name) && (Ar(r.event_flag) || (rr(`SMachine: event flag is NOT number: gclass ${e.gclass_name}, event ${r.event_name}`), t += -1), !(r.event_flag & U.EVF_OUTPUT_EVENT))) {
|
|
678
678
|
let n = !1;
|
|
679
679
|
for (let t = 0; t < e.dl_states.length; t++) {
|
|
680
680
|
let l = e.dl_states[t];
|
|
681
|
-
|
|
681
|
+
Ur(l.state_name) || Ce(l, r.event_name) && (n = !0);
|
|
682
682
|
}
|
|
683
|
-
n || (
|
|
683
|
+
n || (rr(`SMachine: input_list's event NOT in state: gclass ${e.gclass_name}, event ${r.event_name}`), t += -1);
|
|
684
684
|
}
|
|
685
685
|
}
|
|
686
686
|
return t;
|
|
@@ -690,11 +690,11 @@ function Me(e, t) {
|
|
|
690
690
|
try {
|
|
691
691
|
n = p[e];
|
|
692
692
|
} catch (e) {}
|
|
693
|
-
return n || (t &&
|
|
693
|
+
return n || (t && rr(`gclass not found: ${e}`), null);
|
|
694
694
|
}
|
|
695
695
|
function We() {
|
|
696
696
|
let e = [];
|
|
697
|
-
for (const t of Object.keys(m))
|
|
697
|
+
for (const t of Object.keys(m)) Tr(e, t);
|
|
698
698
|
return e;
|
|
699
699
|
}
|
|
700
700
|
function Ke() {
|
|
@@ -702,67 +702,67 @@ function Ke() {
|
|
|
702
702
|
}
|
|
703
703
|
function xe(e, t) {
|
|
704
704
|
e = e.toLowerCase();
|
|
705
|
-
return m[e] || (t &&
|
|
705
|
+
return m[e] || (t && rr(`gobj service not found: ${e}`), null);
|
|
706
706
|
}
|
|
707
707
|
function Ye(e) {
|
|
708
708
|
let t = wt(e);
|
|
709
|
-
return t = t.toLowerCase(), m[t] &&
|
|
709
|
+
return t = t.toLowerCase(), m[t] && rr(`service ALREADY REGISTERED: ${t}. Will be UPDATED`), m[t] = e, 0;
|
|
710
710
|
}
|
|
711
711
|
function Be(e, t) {
|
|
712
|
-
t.parent &&
|
|
712
|
+
t.parent && rr(`_add_child() ALREADY HAS PARENT: ${t.gobj_name}`), e.dl_children.push(t), t.parent = e;
|
|
713
713
|
}
|
|
714
714
|
function Je(e, t) {
|
|
715
|
-
let n =
|
|
716
|
-
n >= 0 && (
|
|
715
|
+
let n = no(e.dl_children, t);
|
|
716
|
+
n >= 0 && (yr(e.dl_children, n), t.parent = null);
|
|
717
717
|
}
|
|
718
718
|
function qe(e, t) {
|
|
719
|
-
return yt(e) ? u ? u(e, t) : -1 : (
|
|
719
|
+
return yt(e) ? u ? u(e, t) : -1 : (rr(`${Dt(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
720
720
|
}
|
|
721
721
|
function He(e, t) {
|
|
722
|
-
return yt(e) ? _ ? _(e, t) : -1 : (
|
|
722
|
+
return yt(e) ? _ ? _(e, t) : -1 : (rr(`${Dt(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
723
723
|
}
|
|
724
724
|
function Qe(e, t) {
|
|
725
|
-
return yt(e) ? c ? c(e, t) : -1 : (
|
|
725
|
+
return yt(e) ? c ? c(e, t) : -1 : (rr(`${Dt(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
726
726
|
}
|
|
727
727
|
function ze(e, t) {
|
|
728
728
|
return f ? f(e, t) : null;
|
|
729
729
|
}
|
|
730
730
|
function Xe(e, t) {
|
|
731
|
-
"__json_config_variables__" !== t &&
|
|
731
|
+
"__json_config_variables__" !== t && rr(`GClass Attribute NOT FOUND: ${Dt(e)}, attr ${t}`);
|
|
732
732
|
}
|
|
733
733
|
function Ze(e, t, n) {
|
|
734
734
|
let r = t;
|
|
735
735
|
(function(e, t, n, r, l) {
|
|
736
|
-
if (!e || !t) return
|
|
736
|
+
if (!e || !t) return rr("hsdata or kw NULL"), -1;
|
|
737
737
|
let o = 0;
|
|
738
738
|
for (const [i, s] of Object.entries(t)) {
|
|
739
739
|
const t = Ae(l.gclass, i, !1);
|
|
740
|
-
t ? (-1 === n || t.flag & n) && (t.flag & v.SDF_DEPRECATED &&
|
|
740
|
+
t ? (-1 === n || t.flag & n) && (t.flag & v.SDF_DEPRECATED && lr(`${Dt(l)}: Deprecated attribute used in gobj creation: ${i}`), o += we(l, e, t, s)) : r && (r(l, i), o--);
|
|
741
741
|
}
|
|
742
742
|
return o;
|
|
743
|
-
})(je(e), r, -1, e.gclass.gclass_flag & C.gcflag_ignore_unknown_attrs ? 0 : Xe, e) < 0 && (
|
|
743
|
+
})(je(e), r, -1, e.gclass.gclass_flag & C.gcflag_ignore_unknown_attrs ? 0 : Xe, e) < 0 && (rr(`${Dt(e)} json2data() FAILED`), ar(r));
|
|
744
744
|
}
|
|
745
745
|
function et(e, n, r, l, o) {
|
|
746
746
|
if (o & L.gobj_flag_yuno) {
|
|
747
|
-
if (E) return
|
|
747
|
+
if (E) return rr("__yuno__ already created"), null;
|
|
748
748
|
o |= L.gobj_flag_service;
|
|
749
749
|
} else {
|
|
750
|
-
if (!l) return
|
|
751
|
-
if (!("string" == typeof l || l instanceof k)) return
|
|
752
|
-
if (
|
|
750
|
+
if (!l) return rr("gobj NEEDS a parent!"), null;
|
|
751
|
+
if (!("string" == typeof l || l instanceof k)) return rr(`BAD TYPE of parent: ${l}`), null;
|
|
752
|
+
if (Dr(l) && !(l = xe(l))) return lr(`parent service not found: ${l}`), null;
|
|
753
753
|
}
|
|
754
|
-
if (o & L.gobj_flag_service && xe(e, !1)) return
|
|
754
|
+
if (o & L.gobj_flag_service && xe(e, !1)) return rr(`service ALREADY registered: ${n}^${e}`), null;
|
|
755
755
|
if (o & L.gobj_flag_default_service) {
|
|
756
|
-
if (h) return
|
|
756
|
+
if (h) return rr(`default service ALREADY registered: ${n}^${e}`), null;
|
|
757
757
|
o |= L.gobj_flag_service;
|
|
758
758
|
}
|
|
759
|
-
if (
|
|
759
|
+
if (Ur(n)) return rr("gclass_name must be a string"), null;
|
|
760
760
|
let i = Me(n, !1);
|
|
761
|
-
if (!i) return
|
|
762
|
-
if (!
|
|
763
|
-
if (!
|
|
764
|
-
if (e.includes("`")) return
|
|
765
|
-
if (e.includes("^")) return
|
|
761
|
+
if (!i) return rr(`GClass not registered: ${n}^${e}`), null;
|
|
762
|
+
if (!Dr(e)) return rr(`gobj_name must be a string: ${n}`), null;
|
|
763
|
+
if (!Ur(e)) {
|
|
764
|
+
if (e.includes("`")) return rr(`gobj_name cannot contain char ': ${n}^${e}`), null;
|
|
765
|
+
if (e.includes("^")) return rr(`gobj_name cannot contain char ^: ${n}^${e}`), null;
|
|
766
766
|
}
|
|
767
767
|
let s = new k(e, i, r, l, o);
|
|
768
768
|
s.jn_attrs = Ne(s, i.attrs_table);
|
|
@@ -789,8 +789,8 @@ function it(e, t, n, r) {
|
|
|
789
789
|
return et(e, t, n, r, 0);
|
|
790
790
|
}
|
|
791
791
|
function st(e) {
|
|
792
|
-
if (Ct(e)) return void
|
|
793
|
-
e.__refs__ > 0 &&
|
|
792
|
+
if (Ct(e)) return void rr("gobj NULL or DESTROYED");
|
|
793
|
+
e.__refs__ > 0 && rr(`${Dt(e)}: gobj DESTROYING with references: ${e.__refs__}`), e.playing && (rr(`Destroying a PLAYING gobj: ${At(e)}`), Et(e)), e.running && (rr(`Destroying a RUNNING gobj: ${At(e)}`), gt(e)), e.obflag |= P.obflag_destroying, function(e) {
|
|
794
794
|
if (0 === pn.length) return;
|
|
795
795
|
for (let t of pn) t.src === e && (t.src = null);
|
|
796
796
|
pn = pn.filter((t) => t.dst !== e);
|
|
@@ -800,7 +800,7 @@ function st(e) {
|
|
|
800
800
|
let r = $t(e);
|
|
801
801
|
r && r.gclass.gmt.mt_child_removed && (n && Y(t("👦👦🔴 child_removed(%s): %s", At(r), Dt(e))), r.gclass.gmt.mt_child_removed(r, e)), e.gobj_flag & L.gobj_flag_service && function(e) {
|
|
802
802
|
let t = wt(e);
|
|
803
|
-
t = t.toLowerCase(), m[t] ? delete m[t] :
|
|
803
|
+
t = t.toLowerCase(), m[t] ? delete m[t] : rr(`"service NOT found in register": ${t}`);
|
|
804
804
|
}(e), An(e, e.dl_subscriptions, !0), An(e, e.dl_subscribings, !0), r && (Je(r, e), It(e) && (Lt(r) !== e || Ct(r) || Pt(r, null))), function(e) {
|
|
805
805
|
let t = e.dl_children.slice();
|
|
806
806
|
for (let e = 0; e < t.length; e++) {
|
|
@@ -810,9 +810,9 @@ function st(e) {
|
|
|
810
810
|
}(e), e.obflag & P.obflag_created && e.gclass.gmt.mt_destroy && e.gclass.gmt.mt_destroy(e), n && Y(t("💔💔⏪ destroyed: %s", At(e))), e.obflag |= P.obflag_destroyed, e.obflag & P.obflag_created && e.gclass.instances--;
|
|
811
811
|
}
|
|
812
812
|
function at(e) {
|
|
813
|
-
if (Ct(e)) return
|
|
814
|
-
if (e.running) return
|
|
815
|
-
if (e.disabled) return
|
|
813
|
+
if (Ct(e)) return rr("gobj NULL or DESTROYED"), -1;
|
|
814
|
+
if (e.running) return rr(`${Dt(e)}: GObj ALREADY RUNNING`), -1;
|
|
815
|
+
if (e.disabled) return rr(`${Dt(e)}: GObj DISABLED`), -1;
|
|
816
816
|
re(e) && Y(t("⏺ ⏺ start: %s", At(e))), e.running = !0;
|
|
817
817
|
let n = 0;
|
|
818
818
|
return e.gclass.gmt.mt_start && (n = e.gclass.gmt.mt_start(e)), n;
|
|
@@ -821,18 +821,18 @@ function ut(e, t, n) {
|
|
|
821
821
|
return e.gclass.gclass_flag & C.gcflag_manual_start || Ct(e) || ht(e) || Tt(e) || at(e), 0;
|
|
822
822
|
}
|
|
823
823
|
function _t(e) {
|
|
824
|
-
return Ct(e) ? (
|
|
824
|
+
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : Ft(e, F.WALK_FIRST2LAST, ut, 0, 0);
|
|
825
825
|
}
|
|
826
826
|
function ct(e, t, n) {
|
|
827
827
|
return e.gclass.gclass_flag & C.gcflag_manual_start || Tt(e) ? 1 : (ht(e) || at(e), 0);
|
|
828
828
|
}
|
|
829
829
|
function ft(e) {
|
|
830
|
-
return Ct(e) ? (
|
|
830
|
+
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : (re(e) && Y(t("⏺ ⏺ ⏺ ⏺ start_tree: %s", At(e))), e.gclass.gclass_flag & C.gcflag_manual_start || e.disabled ? 0 : (e.running || at(e), Gt(e, F.WALK_TOP2BOTTOM, ct, 0, 0)));
|
|
831
831
|
}
|
|
832
832
|
function gt(e) {
|
|
833
|
-
if (Ct(e)) return
|
|
834
|
-
if (!e.running) return
|
|
835
|
-
e.playing && (
|
|
833
|
+
if (Ct(e)) return rr("gobj NULL or DESTROYED"), -1;
|
|
834
|
+
if (!e.running) return rr(`${Dt(e)}: GObj NOT RUNNING`), -1;
|
|
835
|
+
e.playing && (lr(`${Dt(e)}: GObj stopping without previous pause`), Et(e)), re(e) && Y(t("⏹ ⏹ stop: %s", At(e))), e.running = !1;
|
|
836
836
|
let n = 0;
|
|
837
837
|
return e.gclass.gmt.mt_stop && (n = e.gclass.gmt.mt_stop(e)), n;
|
|
838
838
|
}
|
|
@@ -840,25 +840,25 @@ function dt(e, t, n) {
|
|
|
840
840
|
return ht(e) && gt(e), 0;
|
|
841
841
|
}
|
|
842
842
|
function bt(e) {
|
|
843
|
-
return Ct(e) ? (
|
|
843
|
+
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : Ft(e, F.WALK_FIRST2LAST, dt, 0, 0);
|
|
844
844
|
}
|
|
845
845
|
function pt(e) {
|
|
846
|
-
return Ct(e) ? (
|
|
846
|
+
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : (re(e) && Y(t("⏹ ⏹ ⏹ ⏹ stop_tree: %s", At(e))), ht(e) && gt(e), Gt(e, F.WALK_TOP2BOTTOM, dt, 0, 0));
|
|
847
847
|
}
|
|
848
848
|
function mt(e) {
|
|
849
|
-
if (Ct(e)) return
|
|
850
|
-
if (e.playing) return
|
|
851
|
-
if (e.disabled) return
|
|
849
|
+
if (Ct(e)) return rr(`gobj NULL or DESTROYED: ${Dt(e)}`), -1;
|
|
850
|
+
if (e.playing) return rr(`${Dt(e)}: GObj ALREADY PLAYING`), -1;
|
|
851
|
+
if (e.disabled) return rr(`${Dt(e)}: GObj DISABLED`), -1;
|
|
852
852
|
if (!ht(e)) {
|
|
853
|
-
if (e.gclass.gclass_flag & C.gcflag_required_start_to_play) return
|
|
854
|
-
|
|
853
|
+
if (e.gclass.gclass_flag & C.gcflag_required_start_to_play) return rr(`${Dt(e)}: Cannot play, start not done`), -1;
|
|
854
|
+
lr(`${Dt(e)}: GObj playing without previous start`), at(e);
|
|
855
855
|
}
|
|
856
856
|
re(e) && Y(t("⏯ ⏯ play: %s", At(e))), e.playing = !0;
|
|
857
857
|
let n = 0;
|
|
858
858
|
return e.gclass.gmt.mt_play && (n = e.gclass.gmt.mt_play(e), (n < 0 || !1 === n) && (e.playing = !1)), n;
|
|
859
859
|
}
|
|
860
860
|
function Et(e) {
|
|
861
|
-
return Ct(e) ? (
|
|
861
|
+
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : e.playing ? (re(e) && Y(t("⏸ ⏸ pause: %s", At(e))), e.playing = !1, e.gclass.gmt.mt_pause ? e.gclass.gmt.mt_pause(e) : 0) : (rr(`${Dt(e)}: GObj NOT PLAYING`), -1);
|
|
862
862
|
}
|
|
863
863
|
function ht(e) {
|
|
864
864
|
return !Ct(e) && e.running;
|
|
@@ -872,66 +872,66 @@ function yt(e) {
|
|
|
872
872
|
function vt(e) {
|
|
873
873
|
return !Ct(e) && e.playing;
|
|
874
874
|
}
|
|
875
|
-
function
|
|
875
|
+
function St() {
|
|
876
876
|
return !E || E.obflag & P.obflag_destroyed ? null : E;
|
|
877
877
|
}
|
|
878
|
-
function
|
|
879
|
-
let e =
|
|
878
|
+
function Ot() {
|
|
879
|
+
let e = St();
|
|
880
880
|
return e ? wt(e) : "";
|
|
881
881
|
}
|
|
882
882
|
function Nt() {
|
|
883
|
-
let e =
|
|
883
|
+
let e = St();
|
|
884
884
|
return e ? tn(e, "yuno_role") : "";
|
|
885
885
|
}
|
|
886
886
|
function Rt() {
|
|
887
|
-
let e =
|
|
887
|
+
let e = St();
|
|
888
888
|
return e ? tn(e, "yuno_id") : "";
|
|
889
889
|
}
|
|
890
890
|
function wt(e) {
|
|
891
|
-
return
|
|
891
|
+
return Pr(e) ? e.gobj_name : (rr("gobj bad type"), null);
|
|
892
892
|
}
|
|
893
893
|
function jt(e) {
|
|
894
|
-
return
|
|
894
|
+
return Pr(e) ? e.gclass.gclass_name : (rr("gobj NULL of bad type"), null);
|
|
895
895
|
}
|
|
896
896
|
function Dt(e) {
|
|
897
|
-
return
|
|
897
|
+
return Pr(e) ? e.gclass.gclass_name + "^" + wt(e) : (rr("gobj bad type"), null);
|
|
898
898
|
}
|
|
899
899
|
function At(e) {
|
|
900
|
-
if (!
|
|
900
|
+
if (!Pr(e)) return rr("gobj NULL of bad type"), null;
|
|
901
901
|
let t = Dt(e), n = $t(e);
|
|
902
902
|
for (; n;) t = Dt(n) + "`" + t, n = $t(n);
|
|
903
903
|
return t;
|
|
904
904
|
}
|
|
905
905
|
function $t(e) {
|
|
906
|
-
return
|
|
906
|
+
return Pr(e) ? e.parent : (rr("gobj NULL of bad type"), null);
|
|
907
907
|
}
|
|
908
908
|
function It(e) {
|
|
909
|
-
return
|
|
909
|
+
return Pr(e) ? !!(e.gobj_flag & L.gobj_flag_volatil) : (rr("gobj NULL of bad type"), null);
|
|
910
910
|
}
|
|
911
911
|
function kt(e) {
|
|
912
|
-
return
|
|
912
|
+
return Pr(e) ? !!(e.gobj_flag & L.gobj_flag_pure_child) : (rr("gobj NULL of bad type"), null);
|
|
913
913
|
}
|
|
914
914
|
function Ct(e) {
|
|
915
|
-
return !
|
|
915
|
+
return !Pr(e) || !!(e.obflag & (P.obflag_destroyed | P.obflag_destroying));
|
|
916
916
|
}
|
|
917
917
|
function Lt(e) {
|
|
918
|
-
return
|
|
918
|
+
return Pr(e) ? e.bottom_gobj : (rr("gobj NULL of bad type"), null);
|
|
919
919
|
}
|
|
920
920
|
function Pt(e, t) {
|
|
921
|
-
if (!
|
|
922
|
-
e.bottom_gobj &&
|
|
921
|
+
if (!Pr(e)) return rr("gobj NULL of bad type"), null;
|
|
922
|
+
e.bottom_gobj && lr(`${Dt(e)}: bottom_gobj already set`), e.bottom_gobj = t;
|
|
923
923
|
}
|
|
924
924
|
function Ut(e, t, n) {
|
|
925
|
-
return
|
|
925
|
+
return Pr(e) ? t ? Ae(e.gclass, t, n) : e.gclass.attrs_table : (rr("gobj NULL of bad type"), null);
|
|
926
926
|
}
|
|
927
927
|
function Ft(e, t, n, r, l) {
|
|
928
|
-
return Ct(e) ? (
|
|
928
|
+
return Ct(e) ? (rr("gobj NULL, destroying, or bad type"), 0) : Mt(e.dl_children, t, n, r, l);
|
|
929
929
|
}
|
|
930
930
|
function Gt(e, t, n, r, l) {
|
|
931
|
-
return Ct(e) ? (
|
|
931
|
+
return Ct(e) ? (rr("gobj NULL, destroying, or bad type"), 0) : Kt(e.dl_children, t, n, r, l);
|
|
932
932
|
}
|
|
933
933
|
function Vt(e) {
|
|
934
|
-
return "number" == typeof e && isFinite(e) ? e : (null == e ||
|
|
934
|
+
return "number" == typeof e && isFinite(e) ? e : (null == e || rr(`walk callback must return a NUMBER (-1 stop, 0 descend, >0 skip children), got ${typeof e}: taken as 0`), 0);
|
|
935
935
|
}
|
|
936
936
|
function Mt(e, t, n, r, l) {
|
|
937
937
|
let o, i = [...e];
|
|
@@ -969,12 +969,12 @@ function Kt(e, t, n, r, l) {
|
|
|
969
969
|
return 0;
|
|
970
970
|
}
|
|
971
971
|
function xt(e, t) {
|
|
972
|
-
if (
|
|
972
|
+
if (Ur(t)) return null;
|
|
973
973
|
const n = t.toLowerCase();
|
|
974
974
|
return "__default_service__" === n ? h : "__yuno__" === n || "__root__" === n ? E : Ht(E, t);
|
|
975
975
|
}
|
|
976
976
|
function Yt(e, t) {
|
|
977
|
-
if (!
|
|
977
|
+
if (!Pr(e)) return rr("gobj NULL of bad type"), !1;
|
|
978
978
|
let n = t.__gclass_name__, r = t.__gobj_name__, l = t.__prefix_gobj_name__;
|
|
979
979
|
t.__disabled__;
|
|
980
980
|
let o = t.__state__;
|
|
@@ -990,7 +990,7 @@ function Yt(e, t) {
|
|
|
990
990
|
return !0;
|
|
991
991
|
}
|
|
992
992
|
function Bt(e, t) {
|
|
993
|
-
if (Ct(e)) return
|
|
993
|
+
if (Ct(e)) return rr("gobj NULL or DESTROYED"), null;
|
|
994
994
|
const n = e.dl_children;
|
|
995
995
|
for (let e = 0; e < n.length; e++) {
|
|
996
996
|
const r = n[e];
|
|
@@ -999,7 +999,7 @@ function Bt(e, t) {
|
|
|
999
999
|
return null;
|
|
1000
1000
|
}
|
|
1001
1001
|
function Jt(e, t) {
|
|
1002
|
-
if (Ct(e)) return
|
|
1002
|
+
if (Ct(e)) return rr("gobj NULL or DESTROYED"), null;
|
|
1003
1003
|
t = t || {};
|
|
1004
1004
|
let n = [];
|
|
1005
1005
|
const r = e.dl_children;
|
|
@@ -1040,7 +1040,7 @@ function Ht(e, t) {
|
|
|
1040
1040
|
return o ? (n.splice(0, 1), n = n.join("`"), Ht(o, n)) : null;
|
|
1041
1041
|
}
|
|
1042
1042
|
function Qt(e, t) {
|
|
1043
|
-
return !
|
|
1043
|
+
return !Ur(t) && !!Ae(e.gclass, t, !1);
|
|
1044
1044
|
}
|
|
1045
1045
|
function zt(e, t, n) {
|
|
1046
1046
|
let r = e.jn_attrs;
|
|
@@ -1048,7 +1048,7 @@ function zt(e, t, n) {
|
|
|
1048
1048
|
let n = r[t];
|
|
1049
1049
|
return e.gclass.gmt.mt_reading ? e.gclass.gmt.mt_reading(e, t, n) : n;
|
|
1050
1050
|
}
|
|
1051
|
-
return
|
|
1051
|
+
return rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), null;
|
|
1052
1052
|
}
|
|
1053
1053
|
function Xt(e, t, n) {
|
|
1054
1054
|
let r = {}, l = e.gclass.attrs_table;
|
|
@@ -1056,41 +1056,41 @@ function Xt(e, t, n) {
|
|
|
1056
1056
|
const o = l[n];
|
|
1057
1057
|
if (o.name && (-1 === t || o.flag & t)) {
|
|
1058
1058
|
let t;
|
|
1059
|
-
!e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ? t =
|
|
1059
|
+
!e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ? t = br(e.jn_attrs, o.name) : (t = e.gclass.gmt.mt_reading(e, o.name), void 0 === t && (t = br(e.jn_attrs, o.name))), mr(r, o.name, t);
|
|
1060
1060
|
}
|
|
1061
1061
|
}
|
|
1062
1062
|
return r;
|
|
1063
1063
|
}
|
|
1064
1064
|
function Zt(e, t) {
|
|
1065
1065
|
if (t) {
|
|
1066
|
-
if (0 ===
|
|
1067
|
-
if (0 ===
|
|
1068
|
-
if (0 ===
|
|
1069
|
-
if (0 ===
|
|
1066
|
+
if (0 === Mr(t, "__disabled__")) return Tt(e);
|
|
1067
|
+
if (0 === Mr(t, "__running__")) return ht(e);
|
|
1068
|
+
if (0 === Mr(t, "__playing__")) return vt(e);
|
|
1069
|
+
if (0 === Mr(t, "__service__")) return yt(e);
|
|
1070
1070
|
}
|
|
1071
1071
|
let n = De(e, t, !1);
|
|
1072
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ?
|
|
1072
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ? br(n, t) : e.gclass.gmt.mt_reading(e, t) : (rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1073
1073
|
}
|
|
1074
1074
|
function en(e, t) {
|
|
1075
|
-
t &&
|
|
1075
|
+
t && Mr(t, "__trace_level__");
|
|
1076
1076
|
let n = De(e, t, !1);
|
|
1077
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ?
|
|
1077
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ? br(n, t) : e.gclass.gmt.mt_reading(e, t) : (rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1078
1078
|
}
|
|
1079
1079
|
function tn(e, t) {
|
|
1080
|
-
if (t && 0 ===
|
|
1080
|
+
if (t && 0 === Mr(t, "__state__")) return cn(e);
|
|
1081
1081
|
let n = De(e, t, !1);
|
|
1082
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ?
|
|
1082
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ? br(n, t) : e.gclass.gmt.mt_reading(e, t) : (rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1083
1083
|
}
|
|
1084
1084
|
function nn(e, t) {
|
|
1085
1085
|
let n = De(e, t, !1);
|
|
1086
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ?
|
|
1086
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ? br(n, t) : e.gclass.gmt.mt_reading(e, t) : (rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1087
1087
|
}
|
|
1088
1088
|
function rn(e, n, r, l) {
|
|
1089
|
-
if (!
|
|
1089
|
+
if (!Dr(n)) return rr(t("gobj_write_attr(%s): path must be a string", Dt(e))), -1;
|
|
1090
1090
|
let o, i = e.jn_attrs, s = n.split("`");
|
|
1091
1091
|
if (s.length <= 1) {
|
|
1092
1092
|
let l = n;
|
|
1093
|
-
return l in i && i.hasOwnProperty(l) ? (i[l] = r,
|
|
1093
|
+
return l in i && i.hasOwnProperty(l) ? (i[l] = r, wr(e.priv) && e.priv.hasOwnProperty(l) && (e.priv[l] = r), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, l), 0) : (rr(t("gobj_write_attr(%s): attr not found '%s'", Dt(e), l)), -1);
|
|
1094
1094
|
}
|
|
1095
1095
|
let a = s.length;
|
|
1096
1096
|
for (let t = 0; t < a; t++) {
|
|
@@ -1101,20 +1101,20 @@ function rn(e, n, r, l) {
|
|
|
1101
1101
|
continue;
|
|
1102
1102
|
}
|
|
1103
1103
|
let l = e.jn_attrs;
|
|
1104
|
-
if (o in l && l.hasOwnProperty(o)) return l[o] = r,
|
|
1104
|
+
if (o in l && l.hasOwnProperty(o)) return l[o] = r, wr(e.priv) && e.priv.hasOwnProperty(o) && (e.priv[o] = r), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.mt_writing && e.mt_writing(e, o), 0;
|
|
1105
1105
|
break;
|
|
1106
1106
|
}
|
|
1107
|
-
return
|
|
1107
|
+
return rr(t("gobj_write_attr(%s): attr not found '%s'", Dt(e), o)), -1;
|
|
1108
1108
|
}
|
|
1109
1109
|
function ln(e) {
|
|
1110
1110
|
return function(e, t, n) {
|
|
1111
|
-
if (Ct(e)) return
|
|
1111
|
+
if (Ct(e)) return rr("gobj NULL or DESTROYED"), -1;
|
|
1112
1112
|
let r = e.gclass.attrs_table;
|
|
1113
1113
|
for (let l = 0; l < r.length; l++) {
|
|
1114
1114
|
const o = r[l];
|
|
1115
1115
|
if (o.name && !(n && o.flag & n) && (-1 === t || o.flag & t)) {
|
|
1116
1116
|
const t = Re(e, e.jn_attrs, o);
|
|
1117
|
-
|
|
1117
|
+
wr(e.priv) && e.priv.hasOwnProperty(o.name) && (e.priv[o.name] = t), e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, o.name);
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
1120
|
return 0;
|
|
@@ -1130,21 +1130,21 @@ function on(e, t, n, r) {
|
|
|
1130
1130
|
}
|
|
1131
1131
|
function sn(e, t, n) {
|
|
1132
1132
|
let r = De(e, t, !1);
|
|
1133
|
-
return r ? (r[t] =
|
|
1133
|
+
return r ? (r[t] = Fr(n), wr(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1134
1134
|
}
|
|
1135
1135
|
function an(e, t, n) {
|
|
1136
1136
|
let r = De(e, t, !1);
|
|
1137
|
-
return r ? (r[t] = parseInt(n),
|
|
1137
|
+
return r ? (r[t] = parseInt(n), wr(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1138
1138
|
}
|
|
1139
1139
|
function un(e, t, n) {
|
|
1140
1140
|
let r = De(e, t, !1);
|
|
1141
|
-
return r ? (r[t] = String(n),
|
|
1141
|
+
return r ? (r[t] = String(n), wr(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (rr(`${Dt(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1142
1142
|
}
|
|
1143
1143
|
function _n(e, n) {
|
|
1144
|
-
if (Ct(e)) return
|
|
1144
|
+
if (Ct(e)) return rr("gobj NULL or DESTROYED"), null;
|
|
1145
1145
|
if (e.current_state.state_name === n) return !1;
|
|
1146
1146
|
let r = ke(e.gclass, n);
|
|
1147
|
-
if (!r) return
|
|
1147
|
+
if (!r) return rr(`${Dt(e)}: state unknown, state ${n}`), !1;
|
|
1148
1148
|
e.last_state = e.current_state, e.current_state = r;
|
|
1149
1149
|
let l = oe(e, "EV_STATE_CHANGED"), o = !!function(e) {
|
|
1150
1150
|
return Z(e) & B.TRACE_STATES;
|
|
@@ -1152,13 +1152,13 @@ function _n(e, n) {
|
|
|
1152
1152
|
return (l || o) && (1 === W || Y(t("🔀🔀 mach(%s%s^%s), new st(%s), prev st(%s)", e.running ? "" : "!!", jt(e), wt(e), cn(e), e.last_state.state_name))), !0;
|
|
1153
1153
|
}
|
|
1154
1154
|
function cn(e) {
|
|
1155
|
-
return
|
|
1155
|
+
return Pr(e) ? e.current_state.state_name : (rr("hgobj NULL"), "");
|
|
1156
1156
|
}
|
|
1157
1157
|
function fn(e, n) {
|
|
1158
|
-
return Ct(e) ? (
|
|
1158
|
+
return Ct(e) ? (rr("gobj NULL or DESTROYED"), null) : n instanceof k ? (e.parent && e.parent.mt_child_removed && e.parent.mt_child_removed(e.parent, e), e.parent && (Je(e.parent, e), e.parent = null), Be(n, e), n.mt_child_added && (te(e) && ir(t("👦👦🔵 child_added(%s): %s", At(n), Dt(e))), n.mt_child_added(n, e)), 0) : (rr(`${Dt(e)}: gobj_change_parent() BAD TYPE of parent`), -1);
|
|
1159
1159
|
}
|
|
1160
1160
|
function gn(e, t, n) {
|
|
1161
|
-
if (!
|
|
1161
|
+
if (!Pr(e)) return rr("gobj NULL of bad type"), null;
|
|
1162
1162
|
let r = Ge(e.gclass, t);
|
|
1163
1163
|
if (r) return r;
|
|
1164
1164
|
if (n) {
|
|
@@ -1180,12 +1180,12 @@ function bn(e, t, n) {
|
|
|
1180
1180
|
}
|
|
1181
1181
|
var pn = [], mn = !1;
|
|
1182
1182
|
function En(e, n, r, l) {
|
|
1183
|
-
return e && e instanceof k ? e.obflag & (P.obflag_destroyed | P.obflag_destroying) ? (
|
|
1183
|
+
return e && e instanceof k ? e.obflag & (P.obflag_destroyed | P.obflag_destroying) ? (rr(`gobj_post_event(): gobj dst DESTROYING, event ${n}`), -1) : Ur(n) ? (rr("gobj_post_event(): event EMPTY"), -1) : dn(e, n, 0) ? pn.length >= 1e4 ? (rr(`gobj_post_event(): too many posted events, this is NOT a work queue, event ${n}, pending ${pn.length}`), -1) : (pn.push({
|
|
1184
1184
|
dst: e,
|
|
1185
1185
|
event: n,
|
|
1186
1186
|
kw: r,
|
|
1187
1187
|
src: l
|
|
1188
|
-
}), oe(e, n) && !ie(l, n) && Y(t("📬 posted(%s%s), ev: %s, pending: %d", e.running ? "" : "!!", Dt(e), n, pn.length)), mn || (mn = !0, setTimeout(Tn, 0)), 0) : (
|
|
1188
|
+
}), oe(e, n) && !ie(l, n) && Y(t("📬 posted(%s%s), ev: %s, pending: %d", e.running ? "" : "!!", Dt(e), n, pn.length)), mn || (mn = !0, setTimeout(Tn, 0)), 0) : (rr(`gobj_post_event(): event NOT DEFINED in gclass ${jt(e)}, event ${n}`), -1) : (rr(`gobj_post_event(): gobj dst NULL, event ${n}`), -1);
|
|
1189
1189
|
}
|
|
1190
1190
|
function hn() {
|
|
1191
1191
|
return pn.length;
|
|
@@ -1199,33 +1199,33 @@ function Tn() {
|
|
|
1199
1199
|
return pn.length > 0 && !mn && (mn = !0, setTimeout(Tn, 0)), t;
|
|
1200
1200
|
}
|
|
1201
1201
|
function yn(e, n, r, l) {
|
|
1202
|
-
if (!(e && e instanceof k)) return
|
|
1203
|
-
if (e.obflag & (P.obflag_destroyed | P.obflag_destroying)) return
|
|
1202
|
+
if (!(e && e instanceof k)) return rr("gobj dst NULL"), -1;
|
|
1203
|
+
if (e.obflag & (P.obflag_destroyed | P.obflag_destroying)) return rr("gobj dst DESTROYED"), -1;
|
|
1204
1204
|
let o = e.current_state;
|
|
1205
|
-
if (!o) return
|
|
1205
|
+
if (!o) return rr(`${Dt(e)}: current_state NULL`), -1;
|
|
1206
1206
|
let i = oe(e, n) && !ie(l, n);
|
|
1207
1207
|
T++;
|
|
1208
1208
|
let s = Ce(o, n);
|
|
1209
|
-
if (!s) return e.gclass.gmt.mt_inject_event ? (T--, i && (Y(1 === W ? t("🔜 %s %s%s %s", n || "", e.running ? "" : "!!", Dt(e), o.state_name) : t("🔃 mach(%s%s), st: %s, ev: %s, from(%s%s)", e.running ? "" : "!!", Dt(e), o.state_name, n || "", l && !l.running ? "!!" : "", Dt(l))), r &&
|
|
1209
|
+
if (!s) return e.gclass.gmt.mt_inject_event ? (T--, i && (Y(1 === W ? t("🔜 %s %s%s %s", n || "", e.running ? "" : "!!", Dt(e), o.state_name) : t("🔃 mach(%s%s), st: %s, ev: %s, from(%s%s)", e.running ? "" : "!!", Dt(e), o.state_name, n || "", l && !l.running ? "!!" : "", Dt(l))), r && le(e) && Sr(r) && ar(r)), e.gclass.gmt.mt_inject_event(e, n, r, l)) : (i && Y(t("📛 mach(%s%s^%s), st: %s, ev: %s, 📛📛ERROR Event NOT DEFINED in state📛📛, from(%s%s^%s)", e.running ? "" : "!!", jt(e), wt(e), o.state_name, n || "", l && !l.running ? "!!" : "", jt(l), wt(l))), rr(`📛📛 Event NOT DEFINED in state 📛📛: ${Dt(e)}, ${o.state_name}, ${n}`), T--, -1);
|
|
1210
1210
|
if (i) {
|
|
1211
1211
|
if (1 === W) Y(t("🔄 %s %s%s %s from %s%s", n || "", e.running ? "" : "!!", Dt(e), o.state_name, l && !l.running ? "!!" : "", Dt(l)));
|
|
1212
1212
|
else {
|
|
1213
1213
|
let r = "";
|
|
1214
|
-
s.action && (r =
|
|
1214
|
+
s.action && (r = oo(s.action)), Y(t("🔄 mach(%s%s^%s), st: %s, ev: %s%s%s, ac: %s, from(%s%s^%s)", e.running ? "" : "!!", jt(e), wt(e), o.state_name, "", n || "", "", r, l && !l.running ? "!!" : "", jt(l), wt(l)));
|
|
1215
1215
|
}
|
|
1216
|
-
r && le(e) &&
|
|
1216
|
+
r && le(e) && Sr(r) && ar(r);
|
|
1217
1217
|
}
|
|
1218
1218
|
s.next_state && _n(e, s.next_state);
|
|
1219
1219
|
let a = -1;
|
|
1220
1220
|
try {
|
|
1221
1221
|
s.action && (a = s.action(e, n, r, l));
|
|
1222
1222
|
} finally {}
|
|
1223
|
-
return !i || 1 === W || e.obflag & P.obflag_destroyed || Y(t("<- mach(%s%s^%s), st: %s, ev: %s, ret: %d", e.running ? "" : "!!", jt(e), wt(e), e.current_state.state_name, n || "",
|
|
1223
|
+
return !i || 1 === W || e.obflag & P.obflag_destroyed || Y(t("<- mach(%s%s^%s), st: %s, ev: %s, ret: %d", e.running ? "" : "!!", jt(e), wt(e), e.current_state.state_name, n || "", Ar(a) ? a : 0)), T--, a;
|
|
1224
1224
|
}
|
|
1225
1225
|
var vn = Object.freeze({
|
|
1226
1226
|
__hard_subscription__: 1,
|
|
1227
1227
|
__own_event__: 2
|
|
1228
|
-
}),
|
|
1228
|
+
}), Sn = [
|
|
1229
1229
|
N(y.DTP_POINTER, "publisher", 0, null, "publisher gobj"),
|
|
1230
1230
|
N(y.DTP_POINTER, "subscriber", 0, null, "subscriber gobj"),
|
|
1231
1231
|
N(y.DTP_STRING, "event", 0, "", "event name subscribed"),
|
|
@@ -1236,25 +1236,25 @@ var vn = Object.freeze({
|
|
|
1236
1236
|
N(y.DTP_JSON, "__local__", 0, null, "local kw, remove in publishing"),
|
|
1237
1237
|
N(y.DTP_JSON, "__filter__", 0, null, "filter kw, filter in publishing"),
|
|
1238
1238
|
N(y.DTP_STRING, "__service__", 0, "", "subscription service"),
|
|
1239
|
-
|
|
1239
|
+
O()
|
|
1240
1240
|
];
|
|
1241
|
-
function
|
|
1242
|
-
let o =
|
|
1243
|
-
if (t && t !==
|
|
1244
|
-
let t =
|
|
1245
|
-
|
|
1241
|
+
function On(e, t, n, r, l) {
|
|
1242
|
+
let o = tl(t, r, "__config__", null), i = tl(t, r, "__global__", null), s = tl(t, r, "__local__", null), a = nl(t, r, "__filter__", null), u = !0;
|
|
1243
|
+
if (t && t !== el(null, e, "publisher", null) && (u = !1), l && l !== el(null, e, "subscriber", null) && (u = !1), n && n !== Zr(null, e, "event", "") && (u = !1), Nr(o) > 0) {
|
|
1244
|
+
let t = tl(null, e, "__config__", null);
|
|
1245
|
+
Nr(t) > 0 && cr(t, o) || (u = !1);
|
|
1246
1246
|
}
|
|
1247
|
-
if (
|
|
1248
|
-
let t =
|
|
1249
|
-
|
|
1247
|
+
if (Nr(i) > 0) {
|
|
1248
|
+
let t = tl(null, e, "__global__", null);
|
|
1249
|
+
Nr(t) > 0 && cr(t, i) || (u = !1);
|
|
1250
1250
|
}
|
|
1251
|
-
if (
|
|
1252
|
-
let t =
|
|
1253
|
-
|
|
1251
|
+
if (Nr(s) > 0) {
|
|
1252
|
+
let t = tl(null, e, "__local__", null);
|
|
1253
|
+
Nr(t) > 0 && cr(t, s) || (u = !1);
|
|
1254
1254
|
}
|
|
1255
|
-
if (
|
|
1256
|
-
let t =
|
|
1257
|
-
|
|
1255
|
+
if (Nr(a) > 0) {
|
|
1256
|
+
let t = nl(null, e, "__filter__", null);
|
|
1257
|
+
Nr(t) > 0 && cr(t, a) || (u = !1);
|
|
1258
1258
|
}
|
|
1259
1259
|
return u;
|
|
1260
1260
|
}
|
|
@@ -1262,24 +1262,24 @@ function Nn(e, t, n, r, l) {
|
|
|
1262
1262
|
let o = [];
|
|
1263
1263
|
for (let i = 0; i < e.length; i++) {
|
|
1264
1264
|
let s = e[i];
|
|
1265
|
-
|
|
1265
|
+
On(s, t, n, r, l) && hr(o, s);
|
|
1266
1266
|
}
|
|
1267
1267
|
return o;
|
|
1268
1268
|
}
|
|
1269
1269
|
function Rn(e, t, n, r, l) {
|
|
1270
|
-
for (let o = 0; o < e.length; o++) if (
|
|
1270
|
+
for (let o = 0; o < e.length; o++) if (On(e[o], t, n, r, l)) return o;
|
|
1271
1271
|
return -1;
|
|
1272
1272
|
}
|
|
1273
1273
|
function wn(e, n, r, l) {
|
|
1274
|
-
let o =
|
|
1275
|
-
if (!!(
|
|
1276
|
-
(ne(i) || ne(o)) && (Y(t("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s'", s || "", Dt(o), Dt(i))),
|
|
1274
|
+
let o = el(e, n, "publisher", null, Un.KW_REQUIRED), i = el(e, n, "subscriber", null, Un.KW_REQUIRED), s = Zr(e, n, "event", "", Un.KW_REQUIRED);
|
|
1275
|
+
if (!!(zr(e, n, "subs_flag", null, Un.KW_REQUIRED) & vn.__hard_subscription__) && !r) return -1;
|
|
1276
|
+
(ne(i) || ne(o)) && (Y(t("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s'", s || "", Dt(o), Dt(i))), ar(n)), o.obflag & P.obflag_destroyed || l || o.gclass.gmt.mt_subscription_deleted && o.gclass.gmt.mt_subscription_deleted(o, n);
|
|
1277
1277
|
let a = Rn(o.dl_subscriptions, o, s, n, i);
|
|
1278
|
-
return a >= 0 ?
|
|
1278
|
+
return a >= 0 ? yr(o.dl_subscriptions, a) : (rr(`${Dt(e)}: subscription in publisher not found`), ar(n)), a = Rn(i.dl_subscribings, o, s, n, i), a >= 0 ? yr(i.dl_subscribings, a) : (rr(`${Dt(e)}: subscription in subscriber not found`), ar(n)), 0;
|
|
1279
1279
|
}
|
|
1280
1280
|
function jn(e, n, r, l) {
|
|
1281
|
-
if (null == r && (r = {}), !e) return
|
|
1282
|
-
if (!l) return
|
|
1281
|
+
if (null == r && (r = {}), !e) return rr(`publisher NULL: ev ${n}`), 0;
|
|
1282
|
+
if (!l) return rr(`subscriber NULL: ev ${n}`), 0;
|
|
1283
1283
|
const o = /* @__PURE__ */ new Set([
|
|
1284
1284
|
"__config__",
|
|
1285
1285
|
"__global__",
|
|
@@ -1288,42 +1288,42 @@ function jn(e, n, r, l) {
|
|
|
1288
1288
|
"__service__"
|
|
1289
1289
|
]);
|
|
1290
1290
|
if (Object.keys(r).forEach((t) => {
|
|
1291
|
-
o.has(t) ||
|
|
1292
|
-
}),
|
|
1293
|
-
else if (!(bn(e, n, U.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return
|
|
1291
|
+
o.has(t) || rr(`${Dt(e)}: key ignored in subscription (key: ${t}, event: ${n})`);
|
|
1292
|
+
}), Ur(n)) n = "";
|
|
1293
|
+
else if (!(bn(e, n, U.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return rr(`event NOT in output event list: ${Dt(e)}, ${n}`), 0;
|
|
1294
1294
|
let i = Nn(e.dl_subscriptions, e, n, r, l);
|
|
1295
|
-
|
|
1295
|
+
Or(i) > 0 && (rr(`${Dt(e)}: ${Or(i)} subscription(s) REPEATED, will be deleted and override`), ar(i, "subscription REPEATED"), An(e, i, !1));
|
|
1296
1296
|
let s = function(e, t, n, r) {
|
|
1297
|
-
let l = Ne(e,
|
|
1298
|
-
|
|
1297
|
+
let l = Ne(e, Sn);
|
|
1298
|
+
Er(l, "event", t), Er(l, "subscriber", r), Er(l, "publisher", e);
|
|
1299
1299
|
let o = 0;
|
|
1300
1300
|
if (n) {
|
|
1301
|
-
let t =
|
|
1302
|
-
if (
|
|
1303
|
-
let n =
|
|
1304
|
-
if (
|
|
1305
|
-
let t =
|
|
1306
|
-
|
|
1301
|
+
let t = tl(e, n, "__config__", null), r = tl(e, n, "__global__", null), i = tl(e, n, "__local__", null), s = nl(e, n, "__filter__", null), a = Zr(e, n, "__service__", "");
|
|
1302
|
+
if (Nr(r) > 0 && Er(l, "__global__", ur(r)), Nr(t) > 0) {
|
|
1303
|
+
let n = ur(t);
|
|
1304
|
+
if (Er(l, "__config__", n), Jr(n, "__hard_subscription__")) {
|
|
1305
|
+
let t = Qr(e, n, "__hard_subscription__", !1);
|
|
1306
|
+
pr(n, "__hard_subscription__"), t && (o |= vn.__hard_subscription__);
|
|
1307
1307
|
}
|
|
1308
|
-
if (
|
|
1309
|
-
let t =
|
|
1310
|
-
|
|
1308
|
+
if (Jr(n, "__own_event__")) {
|
|
1309
|
+
let t = Qr(e, n, "__own_event__", !1);
|
|
1310
|
+
pr(n, "__own_event__"), t && (o |= vn.__own_event__);
|
|
1311
1311
|
}
|
|
1312
1312
|
}
|
|
1313
|
-
|
|
1313
|
+
Nr(i) > 0 && Er(l, "__local__", ur(i)), Nr(s) > 0 && Er(l, "__filter__", ur(s)), Ur(a) || Er(l, "__service__", a);
|
|
1314
1314
|
}
|
|
1315
|
-
return
|
|
1315
|
+
return Er(l, "subs_flag", o), l;
|
|
1316
1316
|
}(e, n, r, l);
|
|
1317
|
-
if (!s) return
|
|
1318
|
-
if (
|
|
1317
|
+
if (!s) return rr(`${Dt(e)}: _create_subscription() FAILED`), 0;
|
|
1318
|
+
if (hr(e.dl_subscriptions, s), hr(l.dl_subscribings, s), (ne(l) || ne(e)) && (Y(t("💜💜👍 subscribing event '%s', publisher '%s', subscriber %s", n || "", Dt(e), Dt(l))), r && (le(l) || le(e)) && ar(r)), e.gclass.gmt.mt_subscription_added) {
|
|
1319
1319
|
let t = e.gclass.gmt.mt_subscription_added(e, s);
|
|
1320
1320
|
(t < 0 || !1 === t) && (wn(e, s, !0, !0), s = 0);
|
|
1321
1321
|
}
|
|
1322
1322
|
return s;
|
|
1323
1323
|
}
|
|
1324
1324
|
function Dn(e, t, n, r) {
|
|
1325
|
-
if (null == n && (n = {}), !e) return
|
|
1326
|
-
if (!r) return
|
|
1325
|
+
if (null == n && (n = {}), !e) return rr(`publisher NULL: ev ${t}`), 0;
|
|
1326
|
+
if (!r) return rr(`subscriber NULL: ev ${t}`), 0;
|
|
1327
1327
|
const l = /* @__PURE__ */ new Set([
|
|
1328
1328
|
"__config__",
|
|
1329
1329
|
"__global__",
|
|
@@ -1332,15 +1332,15 @@ function Dn(e, t, n, r) {
|
|
|
1332
1332
|
"__service__"
|
|
1333
1333
|
]);
|
|
1334
1334
|
if (Object.keys(n).forEach((n) => {
|
|
1335
|
-
l.has(n) ||
|
|
1336
|
-
}),
|
|
1337
|
-
else if (!(bn(e, t, U.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return
|
|
1335
|
+
l.has(n) || rr(`${Dt(e)}: key ignored in subscription (key: ${n}, event: ${t})`);
|
|
1336
|
+
}), Ur(t)) t = "";
|
|
1337
|
+
else if (!(bn(e, t, U.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return rr(`event NOT in output event list: ${Dt(e)}, ev ${t}`), 0;
|
|
1338
1338
|
let o = Nn(e.dl_subscriptions, e, t, n, r), i = 0;
|
|
1339
1339
|
for (let t = 0; t < o.length; t++) {
|
|
1340
1340
|
let n = o[t];
|
|
1341
1341
|
wn(e, n, !1, !1), i++;
|
|
1342
1342
|
}
|
|
1343
|
-
return i || (
|
|
1343
|
+
return i || (lr(`${Dt(e)}: No subscription found`), ar(n, "No subscription found")), 0;
|
|
1344
1344
|
}
|
|
1345
1345
|
function An(e, t, n) {
|
|
1346
1346
|
let r = [...t];
|
|
@@ -1353,31 +1353,31 @@ function $n(e, t, n, r) {
|
|
|
1353
1353
|
function In(e) {
|
|
1354
1354
|
let t = $n(e, null, null, null);
|
|
1355
1355
|
for (let n = 0; n < t.length; n++) {
|
|
1356
|
-
let r = t[n], l =
|
|
1357
|
-
|
|
1356
|
+
let r = t[n], l = el(e, r, "publisher", null, Un.KW_REQUIRED), o = el(e, r, "subscriber", null, Un.KW_REQUIRED);
|
|
1357
|
+
Er(r, "s_event", Zr(e, r, "event", "", Un.KW_REQUIRED)), Er(r, "s_publisher", Dt(l)), Er(r, "s_subscriber", Dt(o));
|
|
1358
1358
|
}
|
|
1359
1359
|
let n = kn(e, 0, null, 0);
|
|
1360
1360
|
for (let t = 0; t < n.length; t++) {
|
|
1361
|
-
let r = n[t], l =
|
|
1362
|
-
|
|
1361
|
+
let r = n[t], l = el(e, r, "publisher", null, Un.KW_REQUIRED), o = el(e, r, "subscriber", null, Un.KW_REQUIRED);
|
|
1362
|
+
Er(r, "s_event", Zr(e, r, "event", "", Un.KW_REQUIRED)), Er(r, "s_publisher", Dt(l)), Er(r, "s_subscriber", Dt(o));
|
|
1363
1363
|
}
|
|
1364
1364
|
return {
|
|
1365
1365
|
subscriptions: t,
|
|
1366
1366
|
subscribings: n,
|
|
1367
|
-
"total subscriptions":
|
|
1368
|
-
total_subscribings:
|
|
1367
|
+
"total subscriptions": Or(t),
|
|
1368
|
+
total_subscribings: Or(n)
|
|
1369
1369
|
};
|
|
1370
1370
|
}
|
|
1371
1371
|
function kn(e, t, n, r) {
|
|
1372
1372
|
return Nn(e.dl_subscribings, r, t, n, e);
|
|
1373
1373
|
}
|
|
1374
1374
|
function Cn(e, n, r) {
|
|
1375
|
-
if (
|
|
1376
|
-
if (
|
|
1375
|
+
if (wr(r) || (r = {}), !e || e.obflag & (P.obflag_destroyed | P.obflag_destroying)) return rr("gobj NULL or DESTROYED"), -1;
|
|
1376
|
+
if (Ur(n)) return rr(`${Dt(e)}: event EMPTY`), -1;
|
|
1377
1377
|
let l = gn(e, n, !0);
|
|
1378
|
-
if (!(l && l.event_flag & (U.EVF_SYSTEM_EVENT | U.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return
|
|
1378
|
+
if (!(l && l.event_flag & (U.EVF_SYSTEM_EVENT | U.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return rr(`event NOT in output event list: ${Dt(e)}, ev ${n}`), -1;
|
|
1379
1379
|
let o = (ne(e) || oe(e, n)) && !ie(e, n);
|
|
1380
|
-
if (o && (Y(1 === W ? t("🔝🔝 %s %s%s %s", n || "", e.running ? "" : "!!", Dt(e), e.current_state.state_name) : t("🔝🔝 mach(%s%s^%s), st: %s, ev: %s%s%s", e.running ? "" : "!!", jt(e), wt(e), e.current_state.state_name, "", n || "", "")),
|
|
1380
|
+
if (o && (Y(1 === W ? t("🔝🔝 %s %s%s %s", n || "", e.running ? "" : "!!", Dt(e), e.current_state.state_name) : t("🔝🔝 mach(%s%s^%s), st: %s, ev: %s%s%s", e.running ? "" : "!!", jt(e), wt(e), e.current_state.state_name, "", n || "", "")), le(e) && Sr(r) && ar(r)), e.gclass.gmt.mt_publish_event) {
|
|
1381
1381
|
let t = e.gclass.gmt.mt_publish_event(e, n, r);
|
|
1382
1382
|
if (t <= 0) return t;
|
|
1383
1383
|
}
|
|
@@ -1389,17 +1389,17 @@ function Cn(e, n, r) {
|
|
|
1389
1389
|
if (t < 0) break;
|
|
1390
1390
|
if (!t) continue;
|
|
1391
1391
|
}
|
|
1392
|
-
let _ =
|
|
1392
|
+
let _ = el(e, u, "subscriber", null, Un.KW_REQUIRED);
|
|
1393
1393
|
if (!_ || Ct(_)) continue;
|
|
1394
|
-
let c =
|
|
1395
|
-
if (
|
|
1396
|
-
|
|
1397
|
-
let l =
|
|
1398
|
-
if (e.gclass.gmt.mt_publication_filter ? d = e.gclass.gmt.mt_publication_filter(e, n, g, _) :
|
|
1394
|
+
let c = zr(e, u, "subs_flag", 0, Un.KW_REQUIRED), f = Zr(e, u, "event", "", Un.KW_REQUIRED);
|
|
1395
|
+
if (Ur(f) || 0 === Mr(f, n)) {
|
|
1396
|
+
tl(e, u, "__config__", null, 0);
|
|
1397
|
+
let l = tl(e, u, "__global__", null, 0), i = tl(e, u, "__local__", null, 0), f = nl(e, u, "__filter__", null, 0), g = r, d = 1;
|
|
1398
|
+
if (e.gclass.gmt.mt_publication_filter ? d = e.gclass.gmt.mt_publication_filter(e, n, g, _) : Nr(f) > 0 && (d = sl(g, f) ? 1 : 0, o && (Y(t("💜💜🔄%s publishing with filter, event '%s', subscriber'%s', publisher %s", d ? "👍" : "👎", n || "", Dt(_), Dt(e))), ar(f))), d < 0) break;
|
|
1399
1399
|
if (!d) continue;
|
|
1400
1400
|
let b = gn(_, n, !0);
|
|
1401
1401
|
if (b && b.event_flag & U.EVF_SYSTEM_EVENT && !dn(_, b.event_name, 0)) continue;
|
|
1402
|
-
i &&
|
|
1402
|
+
i && Br(g, i), l && fr(g, l), o && (Y(1 === W ? t("🔝🔄 %s (%s) %s%s", n || "", n || "", _.running ? "" : "!!", Dt(_)) : t("🔝🔄 mach(%s%s), st: %s, ev: %s, from(%s%s)", _.running ? "" : "!!", Dt(_), cn(_), n || "", e && !e.running ? "!!" : "", Dt(e))), le(e) && Sr(g) && ar(g));
|
|
1403
1403
|
let p = yn(_, n, g, e);
|
|
1404
1404
|
if (p < 0 && c & vn.__own_event__) {
|
|
1405
1405
|
s = -1;
|
|
@@ -1408,15 +1408,15 @@ function Cn(e, n, r) {
|
|
|
1408
1408
|
if (a += p, s++, Ct(e)) break;
|
|
1409
1409
|
}
|
|
1410
1410
|
}
|
|
1411
|
-
return s || l && l.event_flag & U.EVF_NO_WARN_SUBS ||
|
|
1411
|
+
return s || l && l.event_flag & U.EVF_NO_WARN_SUBS || lr(`${Dt(e)}: Publish event WITHOUT subscribers, ev ${n}`), a;
|
|
1412
1412
|
}
|
|
1413
1413
|
function Ln(e, n, r, l) {
|
|
1414
|
-
return Ct(e) ? (
|
|
1414
|
+
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : ((function(e) {
|
|
1415
1415
|
return Q > 1 || !!e && !!(Z(e) & B.TRACE_COMMANDS);
|
|
1416
|
-
}(e) || oe(e, null) && !ie(l, null)) && (Y(t("🌀🌀 mach(%s%s), cmd: %s, src: %s", ht(e) ? "" : "!!", Dt(e), n, Dt(l))), le(e) &&
|
|
1416
|
+
}(e) || oe(e, null) && !ie(l, null)) && (Y(t("🌀🌀 mach(%s%s), cmd: %s, src: %s", ht(e) ? "" : "!!", Dt(e), n, Dt(l))), le(e) && ar(r)), e.gclass.gmt.mt_command_parser ? e.gclass.gmt.mt_command_parser(e, n, r, l) : e.gclass.command_table ? g ? g(e, n, r, l) : o(0, -1, t("%s: global command parser not available", Dt(e)), 0, 0) : o(0, -1, t("%s: command table not available", Dt(e)), 0, 0));
|
|
1417
1417
|
}
|
|
1418
1418
|
function Pn(e, n, r, l) {
|
|
1419
|
-
return Ct(e) ? (
|
|
1419
|
+
return Ct(e) ? (rr("gobj NULL or DESTROYED"), -1) : e.gclass.gmt.mt_stats ? e.gclass.gmt.mt_stats(e, n, r, l) : d ? d(e, n, r, l) : s(0, -1, t("%s, stats parser not available", Dt(e)), 0, 0);
|
|
1420
1420
|
}
|
|
1421
1421
|
var Un = Object.freeze({
|
|
1422
1422
|
KW_REQUIRED: 1,
|
|
@@ -1438,42 +1438,68 @@ Object.freeze({
|
|
|
1438
1438
|
JSON_FALSE: 7,
|
|
1439
1439
|
JSON_NULL: 8
|
|
1440
1440
|
});
|
|
1441
|
-
var Fn = "undefined" != typeof window ? window.console : console, Gn = Fn.error, Vn = Fn.warn, Mn = Fn.info, Wn = Fn.debug, Kn = null;
|
|
1442
|
-
function xn(e) {
|
|
1443
|
-
Kn = "function" == typeof e ? e : null;
|
|
1444
|
-
}
|
|
1445
|
-
var Yn = !0;
|
|
1441
|
+
var Fn = "undefined" != typeof window ? window.console : console, Gn = Fn.error, Vn = Fn.warn, Mn = Fn.info, Wn = Fn.debug, Kn = null, xn = 600, Yn = [];
|
|
1446
1442
|
function Bn(e) {
|
|
1447
|
-
|
|
1443
|
+
if ((e = "function" == typeof e ? e : null) && e !== Kn) {
|
|
1444
|
+
Kn = e;
|
|
1445
|
+
for (const [e, t, n] of Yn.slice()) {
|
|
1446
|
+
let r = t;
|
|
1447
|
+
if ("json" === e) try {
|
|
1448
|
+
r = JSON.parse(t);
|
|
1449
|
+
} catch (e) {
|
|
1450
|
+
r = t;
|
|
1451
|
+
}
|
|
1452
|
+
er(e, r, n);
|
|
1453
|
+
}
|
|
1454
|
+
} else Kn = e;
|
|
1448
1455
|
}
|
|
1449
|
-
var Jn =
|
|
1456
|
+
var Jn = !0;
|
|
1450
1457
|
function qn(e) {
|
|
1451
|
-
Jn =
|
|
1458
|
+
Jn = !!e;
|
|
1452
1459
|
}
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1460
|
+
var Hn = null;
|
|
1461
|
+
function Qn(e) {
|
|
1462
|
+
Hn = "function" == typeof e ? e : null;
|
|
1463
|
+
}
|
|
1464
|
+
function zn(e, t) {
|
|
1465
|
+
if (!Jn) return !1;
|
|
1466
|
+
if (!Hn) return !0;
|
|
1456
1467
|
try {
|
|
1457
|
-
return !!
|
|
1468
|
+
return !!Hn(e, t);
|
|
1458
1469
|
} catch (e) {
|
|
1459
1470
|
return !0;
|
|
1460
1471
|
}
|
|
1461
1472
|
}
|
|
1462
|
-
var
|
|
1463
|
-
function
|
|
1464
|
-
|
|
1465
|
-
|
|
1473
|
+
var Xn = !1;
|
|
1474
|
+
function Zn(e, t, n) {
|
|
1475
|
+
Xn || (function(e, t, n) {
|
|
1476
|
+
let r = t;
|
|
1477
|
+
if ("json" === e) try {
|
|
1478
|
+
r = JSON.stringify(t);
|
|
1479
|
+
} catch (e) {
|
|
1480
|
+
r = String(t);
|
|
1481
|
+
}
|
|
1482
|
+
Yn.push([
|
|
1483
|
+
e,
|
|
1484
|
+
r,
|
|
1485
|
+
n
|
|
1486
|
+
]), Yn.length > xn && Yn.shift();
|
|
1487
|
+
}(e, t, n), er(e, t, n));
|
|
1488
|
+
}
|
|
1489
|
+
function er(e, t, n) {
|
|
1490
|
+
if (Kn && !Xn) {
|
|
1491
|
+
Xn = !0;
|
|
1466
1492
|
try {
|
|
1467
1493
|
Kn(e, t, n);
|
|
1468
1494
|
} catch (e) {} finally {
|
|
1469
|
-
|
|
1495
|
+
Xn = !1;
|
|
1470
1496
|
}
|
|
1471
1497
|
}
|
|
1472
1498
|
}
|
|
1473
|
-
function
|
|
1499
|
+
function tr(e) {
|
|
1474
1500
|
e ? (Gn = e, Vn = e) : (Gn = Fn.error, Vn = Fn.warn);
|
|
1475
1501
|
}
|
|
1476
|
-
function
|
|
1502
|
+
function nr(e) {
|
|
1477
1503
|
const t = Array.prototype.slice.call(arguments);
|
|
1478
1504
|
let n = "";
|
|
1479
1505
|
if ("string" == typeof e) {
|
|
@@ -1495,33 +1521,33 @@ function Zn(e) {
|
|
|
1495
1521
|
} else n = t.map((e) => "object" == typeof e ? JSON.stringify(e) : String(e)).join(" ");
|
|
1496
1522
|
return n;
|
|
1497
1523
|
}
|
|
1498
|
-
function er(e) {
|
|
1499
|
-
let t = Zn(e), n = zl();
|
|
1500
|
-
Gn && (Gn === Fn.error ? Hn("error", t) && Gn("%c" + n + " ERROR: " + String(t), "color:red") : (Hn("error", t) && Fn.error("%c" + n + " ERROR: " + String(t), "color:red"), Gn(`${n} ERROR: ${String(t)}`))), zn("error", t, n);
|
|
1501
|
-
}
|
|
1502
|
-
function tr(e) {
|
|
1503
|
-
let t = Zn(e), n = zl();
|
|
1504
|
-
Vn && (Vn === Fn.warn ? Hn("warning", t) && Vn("%c" + n + " WARNING: " + String(t), "color:yellow") : (Hn("warning", t) && Fn.warn("%c" + n + " WARNING: " + String(t), "color:yellow"), Vn(`${n} WARNING: ${String(t)}`))), zn("warning", t, n);
|
|
1505
|
-
}
|
|
1506
|
-
function nr(e) {
|
|
1507
|
-
let t = Zn(e), n = zl();
|
|
1508
|
-
Mn && Hn("info", t) && Mn("%c" + n + " INFO: " + String(t), "color:cyan"), zn("info", t, n);
|
|
1509
|
-
}
|
|
1510
1524
|
function rr(e) {
|
|
1511
|
-
let t =
|
|
1512
|
-
|
|
1525
|
+
let t = nr(e), n = eo();
|
|
1526
|
+
Gn && (Gn === Fn.error ? zn("error", t) && Gn("%c" + n + " ERROR: " + String(t), "color:red") : (zn("error", t) && Fn.error("%c" + n + " ERROR: " + String(t), "color:red"), Gn(`${n} ERROR: ${String(t)}`))), Zn("error", t, n);
|
|
1513
1527
|
}
|
|
1514
1528
|
function lr(e) {
|
|
1515
|
-
let t =
|
|
1516
|
-
|
|
1529
|
+
let t = nr(e), n = eo();
|
|
1530
|
+
Vn && (Vn === Fn.warn ? zn("warning", t) && Vn("%c" + n + " WARNING: " + String(t), "color:yellow") : (zn("warning", t) && Fn.warn("%c" + n + " WARNING: " + String(t), "color:yellow"), Vn(`${n} WARNING: ${String(t)}`))), Zn("warning", t, n);
|
|
1517
1531
|
}
|
|
1518
|
-
function or(e
|
|
1519
|
-
|
|
1532
|
+
function or(e) {
|
|
1533
|
+
let t = nr(e), n = eo();
|
|
1534
|
+
Mn && zn("info", t) && Mn("%c" + n + " INFO: " + String(t), "color:cyan"), Zn("info", t, n);
|
|
1520
1535
|
}
|
|
1521
1536
|
function ir(e) {
|
|
1537
|
+
let t = nr(e), n = eo();
|
|
1538
|
+
Wn && zn("debug", t) && Wn("%c" + n + " DEBUG: " + String(t), "color:silver"), Zn("debug", t, n);
|
|
1539
|
+
}
|
|
1540
|
+
function sr(e) {
|
|
1541
|
+
let t = nr(e), n = eo();
|
|
1542
|
+
Wn && zn("msg", t) && Wn("%c" + n + " MSG: " + String(t), "color:cyan"), Zn("msg", t, n);
|
|
1543
|
+
}
|
|
1544
|
+
function ar(e, t) {
|
|
1545
|
+
zn("json", t) && (t && window.console.warn("=====> " + t), window.console.dir(e)), Zn("json", e, eo());
|
|
1546
|
+
}
|
|
1547
|
+
function ur(e) {
|
|
1522
1548
|
return structuredClone(e);
|
|
1523
1549
|
}
|
|
1524
|
-
function
|
|
1550
|
+
function _r(...e) {
|
|
1525
1551
|
const t = {};
|
|
1526
1552
|
for (const n of e) {
|
|
1527
1553
|
const e = structuredClone(n);
|
|
@@ -1529,14 +1555,14 @@ function sr(...e) {
|
|
|
1529
1555
|
}
|
|
1530
1556
|
return t;
|
|
1531
1557
|
}
|
|
1532
|
-
function
|
|
1558
|
+
function cr(e, t) {
|
|
1533
1559
|
if (e === t) return !0;
|
|
1534
1560
|
if (null === e || null === t) return e === t;
|
|
1535
1561
|
if (typeof e != typeof t) return !1;
|
|
1536
1562
|
if (Array.isArray(e) !== Array.isArray(t)) return !1;
|
|
1537
1563
|
if (Array.isArray(e)) {
|
|
1538
1564
|
if (e.length !== t.length) return !1;
|
|
1539
|
-
for (let n = 0; n < e.length; n++) if (!
|
|
1565
|
+
for (let n = 0; n < e.length; n++) if (!cr(e[n], t[n])) return !1;
|
|
1540
1566
|
return !0;
|
|
1541
1567
|
}
|
|
1542
1568
|
if ("object" == typeof e) {
|
|
@@ -1544,272 +1570,272 @@ function ar(e, t) {
|
|
|
1544
1570
|
if (n.length !== r.length) return !1;
|
|
1545
1571
|
for (let l = 0; l < n.length; l++) {
|
|
1546
1572
|
if (n[l] !== r[l]) return !1;
|
|
1547
|
-
if (!
|
|
1573
|
+
if (!cr(e[n[l]], t[r[l]])) return !1;
|
|
1548
1574
|
}
|
|
1549
1575
|
return !0;
|
|
1550
1576
|
}
|
|
1551
1577
|
return e === t;
|
|
1552
1578
|
}
|
|
1553
|
-
function
|
|
1579
|
+
function fr(e, t) {
|
|
1554
1580
|
if (!t) return e;
|
|
1555
1581
|
for (let n of Object.keys(t)) e[n] = t[n];
|
|
1556
1582
|
return e;
|
|
1557
1583
|
}
|
|
1558
|
-
function
|
|
1584
|
+
function gr(e, t) {
|
|
1559
1585
|
if (!t) return e;
|
|
1560
1586
|
for (let n in t) t.hasOwnProperty(n) && e.hasOwnProperty(n) && (e[n] = t[n]);
|
|
1561
1587
|
return e;
|
|
1562
1588
|
}
|
|
1563
|
-
function
|
|
1589
|
+
function dr(e, t) {
|
|
1564
1590
|
if (!t) return e;
|
|
1565
1591
|
for (let n in t) t.hasOwnProperty(n) && !e.hasOwnProperty(n) && (e[n] = t[n]);
|
|
1566
1592
|
return e;
|
|
1567
1593
|
}
|
|
1568
|
-
function
|
|
1594
|
+
function br(e, t) {
|
|
1569
1595
|
if (e && e.hasOwnProperty(t)) return e[t];
|
|
1570
1596
|
}
|
|
1571
|
-
function
|
|
1597
|
+
function pr(e, t) {
|
|
1572
1598
|
e && e.hasOwnProperty(t) && delete e[t];
|
|
1573
1599
|
}
|
|
1574
|
-
function
|
|
1600
|
+
function mr(e, t, n) {
|
|
1575
1601
|
e[t] = n;
|
|
1576
1602
|
}
|
|
1577
|
-
function
|
|
1603
|
+
function Er(e, t, n) {
|
|
1578
1604
|
e[t] = n;
|
|
1579
1605
|
}
|
|
1580
|
-
function
|
|
1606
|
+
function hr(e, t) {
|
|
1581
1607
|
e.push(t);
|
|
1582
1608
|
}
|
|
1583
|
-
function
|
|
1609
|
+
function Tr(e, t) {
|
|
1584
1610
|
e.push(t);
|
|
1585
1611
|
}
|
|
1586
|
-
function
|
|
1612
|
+
function yr(e, t) {
|
|
1587
1613
|
e.splice(t, 1);
|
|
1588
1614
|
}
|
|
1589
|
-
function
|
|
1615
|
+
function vr(e, t) {
|
|
1590
1616
|
return t ? (Array.prototype.push.apply(e, t), e) : e;
|
|
1591
1617
|
}
|
|
1592
|
-
function
|
|
1593
|
-
return
|
|
1618
|
+
function Sr(e) {
|
|
1619
|
+
return wr(e) ? Object.keys(e).length : 0;
|
|
1594
1620
|
}
|
|
1595
|
-
function
|
|
1596
|
-
return
|
|
1621
|
+
function Or(e) {
|
|
1622
|
+
return jr(e) ? e.length : 0;
|
|
1597
1623
|
}
|
|
1598
|
-
function
|
|
1599
|
-
return
|
|
1624
|
+
function Nr(e) {
|
|
1625
|
+
return wr(e) ? Object.keys(e).length : jr(e) ? e.length : Dr(e) && e.length > 0 ? 1 : 0;
|
|
1600
1626
|
}
|
|
1601
|
-
function
|
|
1602
|
-
return 0 ===
|
|
1627
|
+
function Rr(e) {
|
|
1628
|
+
return 0 === Nr(e);
|
|
1603
1629
|
}
|
|
1604
|
-
function
|
|
1630
|
+
function wr(e) {
|
|
1605
1631
|
return null !== e && "object" == typeof e && !Array.isArray(e);
|
|
1606
1632
|
}
|
|
1607
|
-
function
|
|
1633
|
+
function jr(e) {
|
|
1608
1634
|
return Array.isArray(e);
|
|
1609
1635
|
}
|
|
1610
|
-
function
|
|
1636
|
+
function Dr(e) {
|
|
1611
1637
|
return "string" == typeof e;
|
|
1612
1638
|
}
|
|
1613
|
-
function
|
|
1639
|
+
function Ar(e) {
|
|
1614
1640
|
return "number" == typeof e && Number.isFinite(e);
|
|
1615
1641
|
}
|
|
1616
|
-
function
|
|
1642
|
+
function $r(e) {
|
|
1617
1643
|
return "boolean" == typeof e;
|
|
1618
1644
|
}
|
|
1619
|
-
function
|
|
1645
|
+
function Ir(e) {
|
|
1620
1646
|
return null == e;
|
|
1621
1647
|
}
|
|
1622
|
-
function
|
|
1623
|
-
if (
|
|
1624
|
-
if (!
|
|
1648
|
+
function kr(e) {
|
|
1649
|
+
if (Ar(e)) return !0;
|
|
1650
|
+
if (!Dr(e)) return !1;
|
|
1625
1651
|
const t = Number(e);
|
|
1626
1652
|
return !isNaN(t) && "" !== e.trim() && !isNaN(t);
|
|
1627
1653
|
}
|
|
1628
|
-
function
|
|
1654
|
+
function Cr(e) {
|
|
1629
1655
|
return e instanceof Date && !isNaN(e);
|
|
1630
1656
|
}
|
|
1631
|
-
function
|
|
1657
|
+
function Lr(e) {
|
|
1632
1658
|
return "function" == typeof e;
|
|
1633
1659
|
}
|
|
1634
|
-
function
|
|
1660
|
+
function Pr(e) {
|
|
1635
1661
|
return e instanceof k;
|
|
1636
1662
|
}
|
|
1637
|
-
function
|
|
1638
|
-
return !
|
|
1663
|
+
function Ur(e) {
|
|
1664
|
+
return !Dr(e) || 0 === e.length;
|
|
1639
1665
|
}
|
|
1640
|
-
function
|
|
1641
|
-
return
|
|
1666
|
+
function Fr(e) {
|
|
1667
|
+
return Ar(e) ? Boolean(e) : /^\s*(true|1|on)\s*$/i.test(e);
|
|
1642
1668
|
}
|
|
1643
|
-
function
|
|
1669
|
+
function Gr(e, t, n) {
|
|
1644
1670
|
var r = (e + "").substring(0, n), l = (t + "").substring(0, n);
|
|
1645
1671
|
return r === l ? 0 : r > l ? 1 : -1;
|
|
1646
1672
|
}
|
|
1647
|
-
function
|
|
1673
|
+
function Vr(e, t) {
|
|
1648
1674
|
return e === t ? 0 : e > t ? 1 : -1;
|
|
1649
1675
|
}
|
|
1650
|
-
function
|
|
1676
|
+
function Mr(e, t) {
|
|
1651
1677
|
let n = e.toLowerCase(), r = t.toLowerCase();
|
|
1652
1678
|
return n === r ? 0 : n > r ? 1 : -1;
|
|
1653
1679
|
}
|
|
1654
|
-
function
|
|
1655
|
-
if (
|
|
1656
|
-
if (
|
|
1680
|
+
function Wr(e, t) {
|
|
1681
|
+
if (wr(e) || wr(t) || jr(e) || jr(t)) return 0;
|
|
1682
|
+
if (Ar(e) || Ar(t)) {
|
|
1657
1683
|
let n = Number(e), r = Number(t);
|
|
1658
1684
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
1659
1685
|
}
|
|
1660
|
-
if (
|
|
1686
|
+
if ($r(e) || $r(t)) {
|
|
1661
1687
|
let n = Number(e), r = Number(t);
|
|
1662
1688
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
1663
1689
|
}
|
|
1664
|
-
return
|
|
1690
|
+
return Vr(String(e), String(t));
|
|
1665
1691
|
}
|
|
1666
|
-
function
|
|
1692
|
+
function Kr(e, t, n) {
|
|
1667
1693
|
var r;
|
|
1668
1694
|
return -1 !== (r = (e += "").indexOf(t)) && (n ? e.substring(0, r) : e.slice(r));
|
|
1669
1695
|
}
|
|
1670
|
-
function
|
|
1671
|
-
if (!
|
|
1696
|
+
function xr(e) {
|
|
1697
|
+
if (!Dr(e)) return !1;
|
|
1672
1698
|
let t;
|
|
1673
1699
|
for (t = 0; t < e.length && "_" === e[t] && !(t > 2); t++);
|
|
1674
1700
|
return 2 === t;
|
|
1675
1701
|
}
|
|
1676
|
-
function
|
|
1677
|
-
if (!
|
|
1702
|
+
function Yr(e) {
|
|
1703
|
+
if (!Dr(e)) return !1;
|
|
1678
1704
|
let t;
|
|
1679
1705
|
for (t = 0; t < e.length && "_" === e[t] && !(t > 2); t++);
|
|
1680
1706
|
return 1 === t;
|
|
1681
1707
|
}
|
|
1682
|
-
function
|
|
1683
|
-
if ("object" != typeof t || Array.isArray(t)) if (Array.isArray(t)) for (const n of t)
|
|
1708
|
+
function Br(e, t) {
|
|
1709
|
+
if ("object" != typeof t || Array.isArray(t)) if (Array.isArray(t)) for (const n of t) Br(e, n);
|
|
1684
1710
|
else "string" == typeof t && delete e[t];
|
|
1685
1711
|
else for (const n of Object.keys(t)) delete e[n];
|
|
1686
1712
|
}
|
|
1687
|
-
function
|
|
1713
|
+
function Jr(e, t) {
|
|
1688
1714
|
return !(!(t in e) || !e.hasOwnProperty(t));
|
|
1689
1715
|
}
|
|
1690
|
-
function
|
|
1691
|
-
if (e && !
|
|
1692
|
-
if (!
|
|
1716
|
+
function qr(e, t, n, r) {
|
|
1717
|
+
if (e && !Pr(e) && rr("GObj bad instanceof"), !wr(t) && !jr(t)) return rr(`${Dt(e)}: kw must be list or dict`), 0;
|
|
1718
|
+
if (!Dr(n)) return rr(`${Dt(e)}: path must be a string: ${String(n)}`), 0;
|
|
1693
1719
|
let l = n.split("`");
|
|
1694
1720
|
if (l.length <= 1) return t[n];
|
|
1695
1721
|
let o = l.length;
|
|
1696
|
-
for (let i = 0; i < o; i++) if (void 0 === (t = t[l[i]])) return void (r &&
|
|
1722
|
+
for (let i = 0; i < o; i++) if (void 0 === (t = t[l[i]])) return void (r && rr(`${Dt(e)}: path not found: ${String(n)}`));
|
|
1697
1723
|
return t;
|
|
1698
1724
|
}
|
|
1699
|
-
function
|
|
1700
|
-
e && !
|
|
1725
|
+
function Hr(e, t, n) {
|
|
1726
|
+
e && !Pr(e) && rr("GObj bad instanceof");
|
|
1701
1727
|
let [r, l] = function(e, t) {
|
|
1702
1728
|
let n = e.lastIndexOf(t);
|
|
1703
1729
|
return -1 === n ? [e, ""] : [e.substring(0, n), e.substring(n + 1)];
|
|
1704
1730
|
}(n, "`");
|
|
1705
|
-
return
|
|
1731
|
+
return Ur(l) ? pr(t, n) : pr(qr(e, t, r, !0), l), 0;
|
|
1706
1732
|
}
|
|
1707
|
-
function
|
|
1708
|
-
e && !
|
|
1709
|
-
let o =
|
|
1733
|
+
function Qr(e, t, n, r, l) {
|
|
1734
|
+
e && !Pr(e) && rr("GObj bad instanceof");
|
|
1735
|
+
let o = qr(e, t, n, !1);
|
|
1710
1736
|
const i = l && l & Un.KW_REQUIRED, s = l && l & Un.KW_CREATE, a = l && l & Un.KW_EXTRACT;
|
|
1711
1737
|
if (void 0 === o) {
|
|
1712
1738
|
if (s) {
|
|
1713
1739
|
let l = Boolean(r);
|
|
1714
|
-
return
|
|
1740
|
+
return ll(e, t, n, l), l;
|
|
1715
1741
|
}
|
|
1716
|
-
return i && (
|
|
1742
|
+
return i && (rr(`path not found: '${n}'`), ar(t)), Boolean(r);
|
|
1717
1743
|
}
|
|
1718
|
-
return a &&
|
|
1744
|
+
return a && Hr(e, t, n), Boolean(o);
|
|
1719
1745
|
}
|
|
1720
|
-
function
|
|
1721
|
-
e && !
|
|
1722
|
-
let o =
|
|
1746
|
+
function zr(e, t, n, r, l) {
|
|
1747
|
+
e && !Pr(e) && rr("GObj bad instanceof");
|
|
1748
|
+
let o = qr(e, t, n, !1);
|
|
1723
1749
|
const i = l && l & Un.KW_REQUIRED, s = l && l & Un.KW_CREATE, a = l && l & Un.KW_EXTRACT;
|
|
1724
1750
|
if (void 0 === o) {
|
|
1725
1751
|
if (s) {
|
|
1726
1752
|
let l = parseInt(r);
|
|
1727
|
-
return
|
|
1753
|
+
return ll(e, t, n, l), l;
|
|
1728
1754
|
}
|
|
1729
|
-
return i && (
|
|
1755
|
+
return i && (rr(`path not found: '${n}'`), ar(t)), parseInt(r);
|
|
1730
1756
|
}
|
|
1731
|
-
return a &&
|
|
1757
|
+
return a && Hr(e, t, n), Ar(o) ? parseInt(o) : (i && (rr(`path value MUST BE a number: ${n}`), sr(t)), parseInt(r));
|
|
1732
1758
|
}
|
|
1733
|
-
function
|
|
1734
|
-
e && !
|
|
1735
|
-
let o =
|
|
1759
|
+
function Xr(e, t, n, r, l) {
|
|
1760
|
+
e && !Pr(e) && rr("GObj bad instanceof");
|
|
1761
|
+
let o = qr(e, t, n, !1);
|
|
1736
1762
|
const i = l && l & Un.KW_REQUIRED, s = l && l & Un.KW_CREATE, a = l && l & Un.KW_EXTRACT;
|
|
1737
1763
|
if (void 0 === o) {
|
|
1738
1764
|
if (s) {
|
|
1739
1765
|
let l = Number(r);
|
|
1740
|
-
return
|
|
1766
|
+
return ll(e, t, n, l), l;
|
|
1741
1767
|
}
|
|
1742
|
-
return i && (
|
|
1768
|
+
return i && (rr(`path not found: '${n}'`), ar(t)), Number(r);
|
|
1743
1769
|
}
|
|
1744
|
-
return a &&
|
|
1770
|
+
return a && Hr(e, t, n), Ar(o) ? Number(o) : (i && (rr(`path value MUST BE a number: ${n}`), sr(t)), Number(r));
|
|
1745
1771
|
}
|
|
1746
|
-
function
|
|
1747
|
-
e && !
|
|
1748
|
-
let o =
|
|
1772
|
+
function Zr(e, t, n, r, l) {
|
|
1773
|
+
e && !Pr(e) && rr("GObj bad instanceof");
|
|
1774
|
+
let o = qr(e, t, n, !1);
|
|
1749
1775
|
const i = l && l & Un.KW_REQUIRED, s = l && l & Un.KW_CREATE, a = l && l & Un.KW_EXTRACT;
|
|
1750
1776
|
if (void 0 === o) {
|
|
1751
1777
|
if (s) {
|
|
1752
1778
|
let l = String(r);
|
|
1753
|
-
return
|
|
1779
|
+
return ll(e, t, n, l), l;
|
|
1754
1780
|
}
|
|
1755
|
-
return i && (
|
|
1781
|
+
return i && (rr(`path not found: '${n}'`), ar(t)), String(r);
|
|
1756
1782
|
}
|
|
1757
|
-
return a &&
|
|
1783
|
+
return a && Hr(e, t, n), Dr(o) ? String(o) : (i && (rr(`${Dt(e)}: path value MUST BE a string: ${n}`), sr(t)), String(r));
|
|
1758
1784
|
}
|
|
1759
|
-
function
|
|
1760
|
-
e && !
|
|
1761
|
-
let o =
|
|
1785
|
+
function el(e, t, n, r, l) {
|
|
1786
|
+
e && !Pr(e) && rr("GObj bad instanceof");
|
|
1787
|
+
let o = qr(e, t, n, !1);
|
|
1762
1788
|
const i = l && l & Un.KW_REQUIRED, s = l && l & Un.KW_CREATE, a = l && l & Un.KW_EXTRACT;
|
|
1763
1789
|
if (void 0 === o) {
|
|
1764
1790
|
if (s) {
|
|
1765
1791
|
let l = r;
|
|
1766
|
-
return
|
|
1792
|
+
return ll(e, t, n, l), l;
|
|
1767
1793
|
}
|
|
1768
|
-
return i && (
|
|
1794
|
+
return i && (rr(`path not found: '${n}'`), ar(t)), r;
|
|
1769
1795
|
}
|
|
1770
|
-
return a &&
|
|
1796
|
+
return a && Hr(e, t, n), o;
|
|
1771
1797
|
}
|
|
1772
|
-
function
|
|
1773
|
-
e && !
|
|
1774
|
-
let o =
|
|
1798
|
+
function tl(e, t, n, r, l) {
|
|
1799
|
+
e && !Pr(e) && rr("GObj bad instanceof");
|
|
1800
|
+
let o = qr(e, t, n, !1);
|
|
1775
1801
|
const i = l && l & Un.KW_REQUIRED, s = l && l & Un.KW_CREATE, a = l && l & Un.KW_EXTRACT;
|
|
1776
1802
|
if (void 0 === o) {
|
|
1777
1803
|
if (s) {
|
|
1778
1804
|
let l = Object(r);
|
|
1779
|
-
return
|
|
1805
|
+
return ll(e, t, n, l), l;
|
|
1780
1806
|
}
|
|
1781
|
-
return i && (
|
|
1807
|
+
return i && (rr(`path not found: '${n}'`), ar(t)), Object(r);
|
|
1782
1808
|
}
|
|
1783
|
-
return a &&
|
|
1809
|
+
return a && Hr(e, t, n), wr(o) ? Object(o) : (i && (rr(`path value MUST BE a dict: ${n}`), sr(t)), Object(r));
|
|
1784
1810
|
}
|
|
1785
|
-
function
|
|
1786
|
-
e && !
|
|
1787
|
-
let o =
|
|
1811
|
+
function nl(e, t, n, r, l) {
|
|
1812
|
+
e && !Pr(e) && rr("GObj bad instanceof");
|
|
1813
|
+
let o = qr(e, t, n, !1);
|
|
1788
1814
|
const i = l && l & Un.KW_REQUIRED, s = l && l & Un.KW_CREATE, a = l && l & Un.KW_EXTRACT;
|
|
1789
1815
|
if (void 0 === o) {
|
|
1790
1816
|
if (s) {
|
|
1791
1817
|
let l = r;
|
|
1792
|
-
return
|
|
1818
|
+
return ll(e, t, n, l), l;
|
|
1793
1819
|
}
|
|
1794
|
-
return i && (
|
|
1820
|
+
return i && (rr(`path not found: '${n}'`), ar(t)), r;
|
|
1795
1821
|
}
|
|
1796
|
-
return a &&
|
|
1822
|
+
return a && Hr(e, t, n), o;
|
|
1797
1823
|
}
|
|
1798
|
-
function
|
|
1799
|
-
e && !
|
|
1800
|
-
let o =
|
|
1824
|
+
function rl(e, t, n, r, l) {
|
|
1825
|
+
e && !Pr(e) && rr("GObj bad instanceof");
|
|
1826
|
+
let o = qr(e, t, n, !1);
|
|
1801
1827
|
const i = l && l & Un.KW_REQUIRED, s = l && l & Un.KW_CREATE, a = l && l & Un.KW_EXTRACT;
|
|
1802
1828
|
if (void 0 === o) {
|
|
1803
1829
|
if (s) {
|
|
1804
1830
|
let l = Array(r);
|
|
1805
|
-
return
|
|
1831
|
+
return ll(e, t, n, l), l;
|
|
1806
1832
|
}
|
|
1807
|
-
return i && (
|
|
1833
|
+
return i && (rr(`path not found: '${n}'`), ar(t)), Array(r);
|
|
1808
1834
|
}
|
|
1809
|
-
return a &&
|
|
1835
|
+
return a && Hr(e, t, n), jr(o) ? Array(o) : (i && (rr(`path value MUST BE an array: ${n}`), sr(t)), Array(r));
|
|
1810
1836
|
}
|
|
1811
|
-
function
|
|
1812
|
-
if (e && !
|
|
1837
|
+
function ll(e, t, n, r) {
|
|
1838
|
+
if (e && !Pr(e) && rr("GObj bad instanceof"), !wr(t)) return rr("kw is not an object"), -1;
|
|
1813
1839
|
let l = n.split("`");
|
|
1814
1840
|
if (l.length <= 1) return t[n] = r, 0;
|
|
1815
1841
|
let o = l.length;
|
|
@@ -1819,34 +1845,34 @@ function tl(e, t, n, r) {
|
|
|
1819
1845
|
}
|
|
1820
1846
|
return 0;
|
|
1821
1847
|
}
|
|
1822
|
-
function
|
|
1823
|
-
if (e && !
|
|
1824
|
-
let o =
|
|
1825
|
-
return
|
|
1848
|
+
function ol(e, t, n, r, l) {
|
|
1849
|
+
if (e && !Pr(e) && rr("GObj bad instanceof"), !wr(t)) return rr("kw is not an object"), -1;
|
|
1850
|
+
let o = tl(e, t, n, {}, !0);
|
|
1851
|
+
return wr(o) ? (o[r] = l, 0) : (rr("subdict is not an object"), -1);
|
|
1826
1852
|
}
|
|
1827
|
-
function
|
|
1853
|
+
function il(e, n, r) {
|
|
1828
1854
|
let l = "", o = !1;
|
|
1829
|
-
if (
|
|
1855
|
+
if (jr(n)) {
|
|
1830
1856
|
o = !1;
|
|
1831
1857
|
for (let i = 0; i < n.length; i++) {
|
|
1832
1858
|
let s = n[i];
|
|
1833
|
-
if (l =
|
|
1859
|
+
if (l = Ur(r) ? t("%s", r) : t("%s`%d", r, i), o = il(e, s, l), o) break;
|
|
1834
1860
|
}
|
|
1835
|
-
} else if (
|
|
1861
|
+
} else if (wr(n)) {
|
|
1836
1862
|
o = !0;
|
|
1837
1863
|
let i = Object.keys(n);
|
|
1838
1864
|
for (let s = 0; s < i.length; s++) {
|
|
1839
1865
|
let a = i[s], u = n[a];
|
|
1840
|
-
if (l =
|
|
1841
|
-
if (o =
|
|
1866
|
+
if (l = Ur(r) ? t("%s", a) : t("%s`%s", r, a), jr(u) || wr(u)) {
|
|
1867
|
+
if (o = il(e, u, l), !o) break;
|
|
1842
1868
|
continue;
|
|
1843
1869
|
}
|
|
1844
|
-
let _ =
|
|
1845
|
-
if (_ || (_ =
|
|
1870
|
+
let _ = nl(0, e, l, 0, 0);
|
|
1871
|
+
if (_ || (_ = br(e, l)), !_) {
|
|
1846
1872
|
o = !1;
|
|
1847
1873
|
break;
|
|
1848
1874
|
}
|
|
1849
|
-
if (0 !==
|
|
1875
|
+
if (0 !== Wr(_, u)) {
|
|
1850
1876
|
o = !1;
|
|
1851
1877
|
break;
|
|
1852
1878
|
}
|
|
@@ -1854,91 +1880,91 @@ function rl(e, n, r) {
|
|
|
1854
1880
|
}
|
|
1855
1881
|
return o;
|
|
1856
1882
|
}
|
|
1857
|
-
function
|
|
1858
|
-
return 0 ===
|
|
1883
|
+
function sl(e, t) {
|
|
1884
|
+
return 0 === Nr(t) || il(e, t, "");
|
|
1859
1885
|
}
|
|
1860
|
-
function
|
|
1861
|
-
if (!n || !
|
|
1862
|
-
for (let e = 0; e < t.length; e++) if (
|
|
1863
|
-
return r &&
|
|
1886
|
+
function al(e, t, n, r) {
|
|
1887
|
+
if (!n || !jr(t)) return r && rr("item NULL or kw_list is not a list"), -1;
|
|
1888
|
+
for (let e = 0; e < t.length; e++) if (cr(n, t[e])) return e;
|
|
1889
|
+
return r && rr("item not found in this list"), -1;
|
|
1864
1890
|
}
|
|
1865
|
-
function
|
|
1866
|
-
if (e && !
|
|
1867
|
-
r || (r =
|
|
1891
|
+
function ul(e, t, n, r) {
|
|
1892
|
+
if (e && !Pr(e) && rr("GObj bad instanceof"), !t) return null;
|
|
1893
|
+
r || (r = sl);
|
|
1868
1894
|
let l = [];
|
|
1869
|
-
if (
|
|
1895
|
+
if (jr(t)) for (let e = 0; e < t.length; e++) {
|
|
1870
1896
|
let o = t[e];
|
|
1871
|
-
r(o, n) && l.push(
|
|
1897
|
+
r(o, n) && l.push(ur(o));
|
|
1872
1898
|
}
|
|
1873
1899
|
else {
|
|
1874
|
-
if (!
|
|
1875
|
-
r(t, n) && l.push(
|
|
1900
|
+
if (!wr(t)) return rr("kw_select() BAD kw parameter"), null;
|
|
1901
|
+
r(t, n) && l.push(ur(t));
|
|
1876
1902
|
}
|
|
1877
1903
|
return l;
|
|
1878
1904
|
}
|
|
1879
|
-
function
|
|
1880
|
-
if (e && !
|
|
1881
|
-
r || (r =
|
|
1905
|
+
function _l(e, t, n, r) {
|
|
1906
|
+
if (e && !Pr(e) && rr("GObj bad instanceof"), !t) return null;
|
|
1907
|
+
r || (r = sl);
|
|
1882
1908
|
let l = [];
|
|
1883
|
-
if (
|
|
1909
|
+
if (jr(t)) for (let e = 0; e < t.length; e++) {
|
|
1884
1910
|
let o = t[e];
|
|
1885
1911
|
r(o, n) && l.push(o);
|
|
1886
1912
|
}
|
|
1887
1913
|
else {
|
|
1888
|
-
if (!
|
|
1914
|
+
if (!wr(t)) return rr("kw_select() BAD kw parameter"), null;
|
|
1889
1915
|
r(t, n) && l.push(t);
|
|
1890
1916
|
}
|
|
1891
1917
|
return l;
|
|
1892
1918
|
}
|
|
1893
|
-
function
|
|
1894
|
-
e && !
|
|
1919
|
+
function cl(e, t, n, r) {
|
|
1920
|
+
e && !Pr(e) && rr("GObj bad instanceof");
|
|
1895
1921
|
let l = {};
|
|
1896
|
-
if (
|
|
1922
|
+
if (Dr(n) && !Ur(n)) {
|
|
1897
1923
|
let o = n;
|
|
1898
|
-
t.hasOwnProperty(o) ? l[o] = t[o] : r &&
|
|
1899
|
-
} else if (
|
|
1924
|
+
t.hasOwnProperty(o) ? l[o] = t[o] : r && rr(`${Dt(e)}: key not found: ${o}`);
|
|
1925
|
+
} else if (wr(n) && Sr(n) > 0) for (let o of Object.keys(n)) t.hasOwnProperty(o) ? l[o] = t[o] : r && rr(`${Dt(e)}: key not found: ${o}`);
|
|
1900
1926
|
else {
|
|
1901
|
-
if (!(
|
|
1927
|
+
if (!(jr(n) && Or(n) > 0)) return t;
|
|
1902
1928
|
for (let o = 0; o < n.length; o++) {
|
|
1903
1929
|
let i = n[o];
|
|
1904
|
-
t.hasOwnProperty(i) ? l[i] = t[i] : r &&
|
|
1930
|
+
t.hasOwnProperty(i) ? l[i] = t[i] : r && rr(`${Dt(e)}: key not found: ${i}`);
|
|
1905
1931
|
}
|
|
1906
1932
|
}
|
|
1907
1933
|
return l;
|
|
1908
1934
|
}
|
|
1909
|
-
function
|
|
1935
|
+
function fl(e, t, n, r) {
|
|
1910
1936
|
let l = {};
|
|
1911
|
-
if (
|
|
1937
|
+
if (fr(l, t), Dr(n) && !Ur(n)) {
|
|
1912
1938
|
let o = n;
|
|
1913
|
-
|
|
1914
|
-
} else if (
|
|
1939
|
+
nl(e, t, o, 0, 0) ? pr(l, o) : r && rr(`${Dt(e)}: key not found: ${o}`);
|
|
1940
|
+
} else if (wr(n) && Sr(n) > 0) for (let o of Object.keys(n)) t.hasOwnProperty(o) ? pr(l, o) : r && rr(`${Dt(e)}: key not found: ${o}`);
|
|
1915
1941
|
else {
|
|
1916
|
-
if (!(
|
|
1942
|
+
if (!(jr(n) && Or(n) > 0)) return {};
|
|
1917
1943
|
for (let o = 0; o < n.length; o++) {
|
|
1918
1944
|
let i = n[o];
|
|
1919
|
-
t.hasOwnProperty(i) ?
|
|
1945
|
+
t.hasOwnProperty(i) ? pr(l, i) : r && rr(`${Dt(e)}: key not found: ${i}`);
|
|
1920
1946
|
}
|
|
1921
1947
|
}
|
|
1922
1948
|
return l;
|
|
1923
1949
|
}
|
|
1924
|
-
function
|
|
1950
|
+
function gl(e, t, n = !1) {
|
|
1925
1951
|
if ("undefined" != typeof window && window.localStorage) try {
|
|
1926
1952
|
let r = window.localStorage.getItem(e);
|
|
1927
|
-
return null === r ? (n &&
|
|
1953
|
+
return null === r ? (n && dl(e, t), t) : JSON.parse(r);
|
|
1928
1954
|
} catch (n) {
|
|
1929
1955
|
return window.console.warn(`Error reading localStorage key "${e}":`, n), t;
|
|
1930
1956
|
}
|
|
1931
1957
|
}
|
|
1932
|
-
function
|
|
1958
|
+
function dl(e, t) {
|
|
1933
1959
|
if ("undefined" == typeof window || !window.localStorage) return 0;
|
|
1934
|
-
if (!e || void 0 === t) return
|
|
1960
|
+
if (!e || void 0 === t) return rr(`kw_set_local_storage_value(): invalid key or value: key=${e}`), -1;
|
|
1935
1961
|
try {
|
|
1936
1962
|
return window.localStorage.setItem(e, JSON.stringify(t)), 0;
|
|
1937
1963
|
} catch (t) {
|
|
1938
|
-
return
|
|
1964
|
+
return rr(`kw_set_local_storage_value(): cannot save "${e}" (storage full or blocked?): ${t && t.message ? t.message : t}`), -1;
|
|
1939
1965
|
}
|
|
1940
1966
|
}
|
|
1941
|
-
function
|
|
1967
|
+
function bl(e) {
|
|
1942
1968
|
if ("undefined" != typeof window && window.localStorage) if (e) try {
|
|
1943
1969
|
window.localStorage.removeItem(e);
|
|
1944
1970
|
} catch (t) {
|
|
@@ -1946,125 +1972,125 @@ function fl(e) {
|
|
|
1946
1972
|
}
|
|
1947
1973
|
else window.console.warn(`Invalid key for localStorage removal: ${e}`);
|
|
1948
1974
|
}
|
|
1949
|
-
function
|
|
1950
|
-
if (
|
|
1951
|
-
if (
|
|
1975
|
+
function pl(e, t) {
|
|
1976
|
+
if (Ir(e) || Ir(t)) return !0;
|
|
1977
|
+
if (jr(e)) {
|
|
1952
1978
|
if (0 === e.length) return !0;
|
|
1953
1979
|
for (let n = 0; n < e.length; n++) if (e[n] === t) return !0;
|
|
1954
|
-
} else if (
|
|
1980
|
+
} else if (wr(e)) {
|
|
1955
1981
|
if (0 === Object.keys(e).length) return !0;
|
|
1956
1982
|
for (let n in e) if (n === t) return !0;
|
|
1957
|
-
} else if (
|
|
1983
|
+
} else if (Dr(e) && e === t) return !0;
|
|
1958
1984
|
return !1;
|
|
1959
1985
|
}
|
|
1960
|
-
function
|
|
1961
|
-
if (e && !
|
|
1962
|
-
l || (l =
|
|
1986
|
+
function ml(e, t, n, r, l) {
|
|
1987
|
+
if (e && !Pr(e) && rr("GObj bad instanceof"), !t) return null;
|
|
1988
|
+
l || (l = sl);
|
|
1963
1989
|
let o = [];
|
|
1964
|
-
if (
|
|
1990
|
+
if (jr(t)) for (let i = 0; i < t.length; i++) {
|
|
1965
1991
|
let s, a = t[i];
|
|
1966
|
-
if (
|
|
1992
|
+
if (wr(a)) s = Zr(e, a, "id", "", 0);
|
|
1967
1993
|
else {
|
|
1968
|
-
if (!
|
|
1994
|
+
if (!Dr(a)) continue;
|
|
1969
1995
|
s = a;
|
|
1970
1996
|
}
|
|
1971
|
-
|
|
1997
|
+
pl(n, s) && l(a, r) && o.push(a);
|
|
1972
1998
|
}
|
|
1973
1999
|
else {
|
|
1974
|
-
if (!
|
|
2000
|
+
if (!wr(t)) return rr("kw_collect() BAD kw parameter"), null;
|
|
1975
2001
|
for (let e of Object.keys(t)) {
|
|
1976
2002
|
let i = t[e];
|
|
1977
|
-
|
|
2003
|
+
pl(n, e) && l(i, r) && o.push(i);
|
|
1978
2004
|
}
|
|
1979
2005
|
}
|
|
1980
2006
|
return o;
|
|
1981
2007
|
}
|
|
1982
|
-
function
|
|
1983
|
-
e && !
|
|
2008
|
+
function El(e, t, n) {
|
|
2009
|
+
e && !Pr(e) && rr("GObj bad instanceof");
|
|
1984
2010
|
let r = {};
|
|
1985
|
-
if (
|
|
1986
|
-
else if (
|
|
1987
|
-
let l = t[n], o =
|
|
1988
|
-
|
|
2011
|
+
if (Ur(n) || (t = qr(e, t, n)), wr(t)) r = t;
|
|
2012
|
+
else if (jr(t)) for (let n = 0; n < t.length; n++) {
|
|
2013
|
+
let l = t[n], o = Zr(e, l, "id", "", Un.KW_REQUIRED);
|
|
2014
|
+
Ur(o) || (r[o] = l);
|
|
1989
2015
|
}
|
|
1990
|
-
else
|
|
2016
|
+
else rr(`${Dt(e)} kwid_new_dict: data type unknown`);
|
|
1991
2017
|
return r;
|
|
1992
2018
|
}
|
|
1993
|
-
function
|
|
1994
|
-
if (e && !
|
|
1995
|
-
if (
|
|
2019
|
+
function hl(e, t, n) {
|
|
2020
|
+
if (e && !Pr(e) && rr("GObj bad instanceof"), Ur(n) || (t = qr(e, t, n)), jr(t)) return t;
|
|
2021
|
+
if (wr(t)) {
|
|
1996
2022
|
let n = [];
|
|
1997
2023
|
for (let r of Object.keys(t)) {
|
|
1998
2024
|
let l = t[r];
|
|
1999
|
-
|
|
2025
|
+
wr(l) ? (l.id = r, n.push(l)) : rr(`${Dt(e)} kwid_new_list: not a record: '${r}'`);
|
|
2000
2026
|
}
|
|
2001
2027
|
return n;
|
|
2002
2028
|
}
|
|
2003
|
-
return
|
|
2029
|
+
return rr(`${Dt(e)} kwid_new_list: wrong type for list`), [];
|
|
2004
2030
|
}
|
|
2005
|
-
function
|
|
2006
|
-
e && !
|
|
2007
|
-
let o =
|
|
2031
|
+
function Tl(e, t, n, r, l) {
|
|
2032
|
+
e && !Pr(e) && rr("GObj bad instanceof");
|
|
2033
|
+
let o = ml(e, t, n, r, l);
|
|
2008
2034
|
return o && 0 !== o.length ? o[0] : null;
|
|
2009
2035
|
}
|
|
2010
|
-
function
|
|
2011
|
-
if (e && !
|
|
2036
|
+
function yl(e, t) {
|
|
2037
|
+
if (e && !Pr(e) && rr("GObj bad instanceof"), !t) return [];
|
|
2012
2038
|
let n = [];
|
|
2013
|
-
if (
|
|
2014
|
-
else if (
|
|
2015
|
-
else
|
|
2016
|
-
if (
|
|
2017
|
-
else if (
|
|
2018
|
-
let r =
|
|
2039
|
+
if (Dr(t)) n.push(t);
|
|
2040
|
+
else if (wr(t)) for (let e in t) t.hasOwnProperty(e) && n.push(e);
|
|
2041
|
+
else jr(t) && t.forEach(function(t) {
|
|
2042
|
+
if (Dr(t)) Ur(t) || n.push(t);
|
|
2043
|
+
else if (wr(t)) {
|
|
2044
|
+
let r = Zr(e, t, "id", 0, 0);
|
|
2019
2045
|
r && n.push(r);
|
|
2020
2046
|
}
|
|
2021
2047
|
});
|
|
2022
2048
|
return n;
|
|
2023
2049
|
}
|
|
2024
|
-
function
|
|
2050
|
+
function vl(e, t, n) {
|
|
2025
2051
|
t = t || "id", n = n || "value";
|
|
2026
2052
|
let r = [];
|
|
2027
|
-
if (
|
|
2053
|
+
if (jr(e)) for (let l = 0; l < e.length; l++) {
|
|
2028
2054
|
let o = e[l];
|
|
2029
|
-
if (
|
|
2055
|
+
if (Dr(o)) r.push({
|
|
2030
2056
|
id: e[l],
|
|
2031
2057
|
value: e[l]
|
|
2032
2058
|
});
|
|
2033
|
-
else if (
|
|
2059
|
+
else if (wr(o)) {
|
|
2034
2060
|
let e = {};
|
|
2035
|
-
if (
|
|
2036
|
-
if (!
|
|
2037
|
-
if (!(
|
|
2038
|
-
|
|
2061
|
+
if (Jr(o, t)) {
|
|
2062
|
+
if (!Jr(o, n)) {
|
|
2063
|
+
if (!(Nr(o) > 0)) {
|
|
2064
|
+
rr("list2options(): object without field value: " + n);
|
|
2039
2065
|
continue;
|
|
2040
2066
|
}
|
|
2041
2067
|
n = Object.keys(o)[0];
|
|
2042
2068
|
}
|
|
2043
2069
|
e.id = o[t], e.value = o[n];
|
|
2044
2070
|
} else {
|
|
2045
|
-
if (!(
|
|
2046
|
-
|
|
2071
|
+
if (!(Nr(o) > 0)) {
|
|
2072
|
+
rr("list2options(): object without field id: " + t);
|
|
2047
2073
|
continue;
|
|
2048
2074
|
}
|
|
2049
2075
|
t = Object.keys(o)[0], e.id = t, e.value = o[t];
|
|
2050
2076
|
}
|
|
2051
2077
|
r.push(e);
|
|
2052
|
-
} else
|
|
2078
|
+
} else rr("list2options(): case1 not implemented");
|
|
2053
2079
|
}
|
|
2054
|
-
else if (
|
|
2080
|
+
else if (wr(e)) for (let t of Object.keys(e)) r.push({
|
|
2055
2081
|
id: t,
|
|
2056
2082
|
value: t
|
|
2057
2083
|
});
|
|
2058
|
-
else
|
|
2084
|
+
else rr("list2options(): case2 not implemented");
|
|
2059
2085
|
return r;
|
|
2060
2086
|
}
|
|
2061
|
-
function
|
|
2087
|
+
function Sl(e, t) {
|
|
2062
2088
|
if (!e) return -1;
|
|
2063
2089
|
for (let n = 0; n < e.length; n++) if (e[n] && e[n].id === t) return n;
|
|
2064
2090
|
return -1;
|
|
2065
2091
|
}
|
|
2066
|
-
function
|
|
2067
|
-
if (!e || !t) return
|
|
2092
|
+
function Ol(e, t, n) {
|
|
2093
|
+
if (!e || !t) return rr("ERROR: str_in_list() list or str empty"), !1;
|
|
2068
2094
|
let r = e.length;
|
|
2069
2095
|
if (n) {
|
|
2070
2096
|
t = t.toLowerCase();
|
|
@@ -2075,17 +2101,17 @@ function yl(e, t, n) {
|
|
|
2075
2101
|
} else for (let n = 0; n < r; n++) if (e[n] === t) return !0;
|
|
2076
2102
|
return !1;
|
|
2077
2103
|
}
|
|
2078
|
-
function
|
|
2079
|
-
if (!e) return
|
|
2080
|
-
if (!t) return
|
|
2081
|
-
for (let r = 0; r < t.length; r++) if (
|
|
2104
|
+
function Nl(e, t, n) {
|
|
2105
|
+
if (!e) return rr("ERROR: strs_in_list() list empty"), !1;
|
|
2106
|
+
if (!t) return rr("ERROR: strs_in_list() str empty"), !1;
|
|
2107
|
+
for (let r = 0; r < t.length; r++) if (Ol(e, t[r], n)) return !0;
|
|
2082
2108
|
return !1;
|
|
2083
2109
|
}
|
|
2084
|
-
function
|
|
2110
|
+
function Rl(e, t) {
|
|
2085
2111
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return e.splice(n, 1), !0;
|
|
2086
2112
|
return !1;
|
|
2087
2113
|
}
|
|
2088
|
-
function
|
|
2114
|
+
function wl(e, t) {
|
|
2089
2115
|
try {
|
|
2090
2116
|
let n = e.__md_iev__;
|
|
2091
2117
|
if (n) return n[t];
|
|
@@ -2093,53 +2119,53 @@ function Sl(e, t) {
|
|
|
2093
2119
|
return;
|
|
2094
2120
|
}
|
|
2095
2121
|
}
|
|
2096
|
-
function
|
|
2122
|
+
function jl(e, t, n) {
|
|
2097
2123
|
let r = e.__md_iev__;
|
|
2098
2124
|
r || (r = {}, e.__md_iev__ = r), r[t] = n;
|
|
2099
2125
|
}
|
|
2100
|
-
function
|
|
2101
|
-
if (!
|
|
2126
|
+
function Dl(e, t, n, r) {
|
|
2127
|
+
if (!Pr(e)) return rr("gobj is not a GObj"), null;
|
|
2102
2128
|
if (!t) return;
|
|
2103
|
-
let l =
|
|
2104
|
-
l || (l = [],
|
|
2129
|
+
let l = wl(t, n);
|
|
2130
|
+
l || (l = [], jl(t, n, l));
|
|
2105
2131
|
try {
|
|
2106
|
-
|
|
2132
|
+
jr(l) && l.unshift(r);
|
|
2107
2133
|
} catch (e) {
|
|
2108
|
-
|
|
2134
|
+
rr(e);
|
|
2109
2135
|
}
|
|
2110
2136
|
}
|
|
2111
|
-
function
|
|
2112
|
-
if (!
|
|
2113
|
-
if (!
|
|
2114
|
-
let l =
|
|
2115
|
-
return l ? 0 === l.length ? (r &&
|
|
2137
|
+
function Al(e, t, n, r) {
|
|
2138
|
+
if (!Pr(e)) return rr("gobj is not a GObj"), null;
|
|
2139
|
+
if (!wr(t)) return rr("kw is not a dict"), null;
|
|
2140
|
+
let l = wl(t, n);
|
|
2141
|
+
return l ? 0 === l.length ? (r && rr(`stack empty: ${n}`), null) : l[0] : (r && rr(`stack NOT FOUND: ${n}`), null);
|
|
2116
2142
|
}
|
|
2117
|
-
function
|
|
2118
|
-
return
|
|
2143
|
+
function $l(e, t, n) {
|
|
2144
|
+
return Ur(n) ? Hr(e, t, "__md_iev__`__msg_type__") : ol(e, t, "__md_iev__", "__msg_type__", n), 0;
|
|
2119
2145
|
}
|
|
2120
|
-
function
|
|
2121
|
-
return
|
|
2146
|
+
function Il(e, t) {
|
|
2147
|
+
return Zr(e, t, "__md_iev__`__msg_type__", "", 0);
|
|
2122
2148
|
}
|
|
2123
|
-
function
|
|
2149
|
+
function kl(e, t, n) {
|
|
2124
2150
|
let r = new XMLHttpRequest();
|
|
2125
2151
|
r.open("GET", e, !0), r.setRequestHeader("Accept", "application/json"), r.onreadystatechange = function() {
|
|
2126
2152
|
if (4 === r.readyState) if (200 === r.status || 0 === (e = r).status && e.responseText && e.responseURL.startsWith("file:")) try {
|
|
2127
2153
|
t(JSON.parse(r.responseText));
|
|
2128
2154
|
} catch (e) {
|
|
2129
|
-
n && (
|
|
2155
|
+
n && (rr(`JSON parse status ${r.status}, error: ${e.message}`), n(r.status));
|
|
2130
2156
|
}
|
|
2131
2157
|
else n && n(r.status);
|
|
2132
2158
|
var e;
|
|
2133
2159
|
}, r.send();
|
|
2134
2160
|
}
|
|
2135
|
-
function
|
|
2161
|
+
function Cl(e, t, n) {
|
|
2136
2162
|
let r = new XMLHttpRequest();
|
|
2137
2163
|
r.open("POST", e), r.setRequestHeader("Accept", "application/json"), r.setRequestHeader("Content-Type", "application/json"), r.onreadystatechange = function() {
|
|
2138
2164
|
4 === r.readyState && n(r.status, r.responseText);
|
|
2139
2165
|
}, r.send(t);
|
|
2140
2166
|
}
|
|
2141
|
-
function
|
|
2142
|
-
void 0 !== n &&
|
|
2167
|
+
function Ll(e, t, n) {
|
|
2168
|
+
void 0 !== n && Dr(n) || (n = "");
|
|
2143
2169
|
for (let r of Object.keys(e)) {
|
|
2144
2170
|
if (!e.hasOwnProperty(r)) continue;
|
|
2145
2171
|
let l = (n.length ? "`" : "") + r;
|
|
@@ -2148,61 +2174,61 @@ function Il(e, t, n) {
|
|
|
2148
2174
|
r,
|
|
2149
2175
|
e[r],
|
|
2150
2176
|
n
|
|
2151
|
-
]),
|
|
2177
|
+
]), wr(e[r]) && Ll(e[r], t, n), n = n.slice(0, -l.length);
|
|
2152
2178
|
}
|
|
2153
2179
|
}
|
|
2154
|
-
function
|
|
2155
|
-
n && (e =
|
|
2156
|
-
let r =
|
|
2157
|
-
|
|
2158
|
-
let l =
|
|
2159
|
-
return
|
|
2160
|
-
"__" !== t.substring(0, 2) &&
|
|
2180
|
+
function Pl(e, t, n) {
|
|
2181
|
+
n && (e = ur(e));
|
|
2182
|
+
let r = nl(null, e, "type", [], 1);
|
|
2183
|
+
Zr(null, e, "hook", "data", 1);
|
|
2184
|
+
let l = nl(null, e, "schema", {}, 1), o = nl(null, e, "topics", {}, 1);
|
|
2185
|
+
return Ll(l, function(e, t, n, l) {
|
|
2186
|
+
"__" !== t.substring(0, 2) && nl(null, o, l, ur(r), 1);
|
|
2161
2187
|
}, t), e;
|
|
2162
2188
|
}
|
|
2163
|
-
function
|
|
2164
|
-
let l =
|
|
2165
|
-
if (!l) return
|
|
2166
|
-
if (
|
|
2189
|
+
function Ul(e, t, n, r) {
|
|
2190
|
+
let l = nl(null, nl(null, e, "topics", null, 0), t, null, 0);
|
|
2191
|
+
if (!l) return rr("jdb_update: topic not found: " + t), null;
|
|
2192
|
+
if (Ur(r.id)) return rr("jdb_update: record without id: " + r), sr(r), null;
|
|
2167
2193
|
let o, i = n.split("`"), s = l;
|
|
2168
|
-
for (; (o = i.shift()) && !
|
|
2169
|
-
if (0 === i.length && s) if (
|
|
2194
|
+
for (; (o = i.shift()) && !Ur(o) && s;) wr(s) && (s = nl(null, s, e.hook, [], 1)), s = Wl(s, null, o, !1);
|
|
2195
|
+
if (0 === i.length && s) if (jr(s)) s.push(r);
|
|
2170
2196
|
else if (s.id === r.id) Object.assign(s, r);
|
|
2171
2197
|
else {
|
|
2172
|
-
let t =
|
|
2198
|
+
let t = nl(null, s, e.hook, [], 1), n = Wl(t, e.hook, r.id, !1);
|
|
2173
2199
|
n ? Object.assign(n, r) : t.push(r);
|
|
2174
2200
|
}
|
|
2175
2201
|
return l;
|
|
2176
2202
|
}
|
|
2177
|
-
function
|
|
2178
|
-
let l =
|
|
2179
|
-
if (!l) return
|
|
2180
|
-
if (
|
|
2203
|
+
function Fl(e, t, n, r) {
|
|
2204
|
+
let l = nl(null, nl(null, e, "topics", null, 0), t, null, 0);
|
|
2205
|
+
if (!l) return rr("jdb_delete: topic not found: " + t), null;
|
|
2206
|
+
if (Ur(r.id)) return rr("jdb_delete: record without id: " + r), sr(r), null;
|
|
2181
2207
|
let o, i = n.split("`"), s = l;
|
|
2182
|
-
for (; (o = i.shift()) && !
|
|
2183
|
-
if (0 === i.length && s) if (
|
|
2184
|
-
let e =
|
|
2208
|
+
for (; (o = i.shift()) && !Ur(o) && s;) wr(s) && (s = nl(null, s, e.hook, null, 0)), s = Wl(s, null, o, !1);
|
|
2209
|
+
if (0 === i.length && s) if (jr(s)) {
|
|
2210
|
+
let e = Sl(s, r.id);
|
|
2185
2211
|
e >= 0 && s.splice(e, 1);
|
|
2186
2212
|
} else {
|
|
2187
|
-
let t =
|
|
2213
|
+
let t = nl(null, s, e.hook, null, 0), n = Sl(t, r.id);
|
|
2188
2214
|
n >= 0 && t.splice(n, 1);
|
|
2189
2215
|
}
|
|
2190
2216
|
return l;
|
|
2191
2217
|
}
|
|
2192
|
-
function
|
|
2193
|
-
let n =
|
|
2194
|
-
if (!n) return
|
|
2195
|
-
return
|
|
2218
|
+
function Gl(e, t) {
|
|
2219
|
+
let n = nl(null, e, "topics", null, 0);
|
|
2220
|
+
if (!n) return rr("jdb topics section not found"), sr(e), null;
|
|
2221
|
+
return nl(null, n, t, null, 0) || (rr("jdb topic not found: " + t), sr(n), null);
|
|
2196
2222
|
}
|
|
2197
|
-
function
|
|
2198
|
-
let l =
|
|
2199
|
-
return l ? (void 0 === r && (r = !0),
|
|
2223
|
+
function Vl(e, t, n, r) {
|
|
2224
|
+
let l = nl(null, nl(null, e, "topics", null, 0), t, null, 0);
|
|
2225
|
+
return l ? (void 0 === r && (r = !0), Wl(l, e.hook, n, r)) : (rr("jdb_get: topic not found: " + t), null);
|
|
2200
2226
|
}
|
|
2201
|
-
function
|
|
2202
|
-
let r =
|
|
2203
|
-
return r ? n < r.length ? r[n] : {} : (
|
|
2227
|
+
function Ml(e, t, n) {
|
|
2228
|
+
let r = nl(null, nl(null, e, "topics", null, 0), t, null, 0);
|
|
2229
|
+
return r ? n < r.length ? r[n] : {} : (rr("jdb_get_by_idx: topic not found: " + t), null);
|
|
2204
2230
|
}
|
|
2205
|
-
function
|
|
2231
|
+
function Wl(e, t, n, r) {
|
|
2206
2232
|
if (!e) return null;
|
|
2207
2233
|
let l, o = e.length;
|
|
2208
2234
|
for (l = 0; l < o; l++) {
|
|
@@ -2210,19 +2236,19 @@ function Gl(e, t, n, r) {
|
|
|
2210
2236
|
if (o) {
|
|
2211
2237
|
let e = o.id;
|
|
2212
2238
|
if (e && e === n) return o;
|
|
2213
|
-
if (r &&
|
|
2214
|
-
let e =
|
|
2239
|
+
if (r && Jr(o, t)) {
|
|
2240
|
+
let e = Wl(o[t], t, n, r);
|
|
2215
2241
|
if (e) return e;
|
|
2216
2242
|
}
|
|
2217
2243
|
}
|
|
2218
2244
|
}
|
|
2219
2245
|
return null;
|
|
2220
2246
|
}
|
|
2221
|
-
function
|
|
2222
|
-
let n =
|
|
2223
|
-
return
|
|
2247
|
+
function Kl(e, t) {
|
|
2248
|
+
let n = ur(e);
|
|
2249
|
+
return gr(n, t), n;
|
|
2224
2250
|
}
|
|
2225
|
-
function
|
|
2251
|
+
function xl(e) {
|
|
2226
2252
|
function t(e) {
|
|
2227
2253
|
let t = e.replace(/-/g, "+").replace(/_/g, "/");
|
|
2228
2254
|
switch (t.length % 4) {
|
|
@@ -2253,9 +2279,9 @@ function Ml(e) {
|
|
|
2253
2279
|
signature: t(n[2])
|
|
2254
2280
|
};
|
|
2255
2281
|
}
|
|
2256
|
-
function
|
|
2282
|
+
function Yl(e, t) {
|
|
2257
2283
|
try {
|
|
2258
|
-
let n =
|
|
2284
|
+
let n = xl(e);
|
|
2259
2285
|
switch (t) {
|
|
2260
2286
|
case "header": return JSON.parse(n.header);
|
|
2261
2287
|
case "signature": return JSON.parse(n.signature);
|
|
@@ -2265,38 +2291,38 @@ function Wl(e, t) {
|
|
|
2265
2291
|
return null;
|
|
2266
2292
|
}
|
|
2267
2293
|
}
|
|
2268
|
-
function
|
|
2294
|
+
function Bl(e) {
|
|
2269
2295
|
return null == e ? "" : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2270
2296
|
}
|
|
2271
|
-
function
|
|
2297
|
+
function Jl(e) {
|
|
2272
2298
|
if (!e) return "";
|
|
2273
2299
|
const t = String(e).trim();
|
|
2274
|
-
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" :
|
|
2300
|
+
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" : Bl(t);
|
|
2275
2301
|
}
|
|
2276
|
-
function
|
|
2302
|
+
function ql(e) {
|
|
2277
2303
|
const t = document.createElement("template");
|
|
2278
2304
|
return t.innerHTML = e.trim(), t.content.firstChild;
|
|
2279
2305
|
}
|
|
2280
|
-
function
|
|
2306
|
+
function Hl(e, t) {
|
|
2281
2307
|
let [n, r, l, o] = e;
|
|
2282
|
-
if (!n) return void
|
|
2308
|
+
if (!n) return void rr("Tag must be a valid HTML element.");
|
|
2283
2309
|
let i = document.createElement(n), s = "";
|
|
2284
2310
|
if (r && "object" == typeof r) for (let e of Object.keys(r)) if ("style" === e && "object" == typeof r[e]) {
|
|
2285
2311
|
let t = "";
|
|
2286
2312
|
for (const n of Object.keys(r[e])) t += `${n}: ${r[e][n]};`;
|
|
2287
2313
|
i.style.cssText = t;
|
|
2288
2314
|
} else "style" === e ? i.style.cssText = r[e] : "i18n" === e || "data-i18n" === e || "data_i18next" === e || "data-i18next" === e ? null !== r[e] && void 0 !== r[e] && (s = r[e], i.setAttribute("data-i18n", s)) : i.setAttribute(e, r[e]);
|
|
2289
|
-
if (
|
|
2315
|
+
if (Dr(l)) if (l = l.trim(), l.length > 0 && "<" === l[0]) i.appendChild(ql(l));
|
|
2290
2316
|
else if (t && s) i.textContent = t(s) || l;
|
|
2291
2317
|
else i.textContent = l;
|
|
2292
|
-
else if (
|
|
2293
|
-
if (l.length > 0) if (
|
|
2294
|
-
else for (let e of l) Array.isArray(e) && e.length > 0 ? i.appendChild(
|
|
2295
|
-
} else l instanceof HTMLElement || l instanceof Text || l instanceof SVGElement ? i.appendChild(l) : null != l && (
|
|
2318
|
+
else if (jr(l)) {
|
|
2319
|
+
if (l.length > 0) if (Dr(l[0])) i.appendChild(Hl(l, t));
|
|
2320
|
+
else for (let e of l) Array.isArray(e) && e.length > 0 ? i.appendChild(Hl(e, t)) : e instanceof HTMLElement && i.appendChild(e);
|
|
2321
|
+
} else l instanceof HTMLElement || l instanceof Text || l instanceof SVGElement ? i.appendChild(l) : null != l && (rr("content ignored"), ar(l));
|
|
2296
2322
|
if (o && "object" == typeof o) for (const e of Object.keys(o)) i.addEventListener(e, o[e]);
|
|
2297
2323
|
return i;
|
|
2298
2324
|
}
|
|
2299
|
-
function
|
|
2325
|
+
function Ql(e) {
|
|
2300
2326
|
if (!e) return {
|
|
2301
2327
|
top: 0,
|
|
2302
2328
|
left: 0,
|
|
@@ -2316,11 +2342,11 @@ function Jl(e) {
|
|
|
2316
2342
|
bottom: t + i + l
|
|
2317
2343
|
};
|
|
2318
2344
|
}
|
|
2319
|
-
function
|
|
2345
|
+
function zl(e) {
|
|
2320
2346
|
return new DOMParser().parseFromString(e, "image/svg+xml").firstChild;
|
|
2321
2347
|
}
|
|
2322
|
-
function
|
|
2323
|
-
if (!
|
|
2348
|
+
function Xl(e, t) {
|
|
2349
|
+
if (!Lr(t)) return void rr("You must supply a translation function");
|
|
2324
2350
|
e || (e = document);
|
|
2325
2351
|
const n = (t) => {
|
|
2326
2352
|
let n = [];
|
|
@@ -2343,41 +2369,41 @@ function Hl(e, t) {
|
|
|
2343
2369
|
n && e.setAttribute("placeholder", t(n));
|
|
2344
2370
|
});
|
|
2345
2371
|
}
|
|
2346
|
-
function
|
|
2372
|
+
function Zl(e = "Time Tracker", t = !1) {
|
|
2347
2373
|
const n = e, r = performance.now();
|
|
2348
2374
|
let l = r;
|
|
2349
|
-
return t &&
|
|
2375
|
+
return t && lr(`--\x3e ${n} - starting`), { mark: (e = "Intermediate", o = "") => {
|
|
2350
2376
|
const i = performance.now(), s = (i - l) / 1e3, a = (i - r) / 1e3;
|
|
2351
|
-
return t &&
|
|
2377
|
+
return t && lr(`--\x3e ${n} ${e} - partial: ${s} sec, total: ${a} sec, ${o}`), l = i, {
|
|
2352
2378
|
partial: s,
|
|
2353
2379
|
total: a
|
|
2354
2380
|
};
|
|
2355
2381
|
} };
|
|
2356
2382
|
}
|
|
2357
|
-
function
|
|
2383
|
+
function eo(e) {
|
|
2358
2384
|
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();
|
|
2359
2385
|
return `${n}.${r}${l > 0 ? "-" : "+"}${t(Math.floor(Math.abs(l) / 60), 2)}${t(Math.abs(l) % 60, 2)}`;
|
|
2360
2386
|
}
|
|
2361
|
-
function
|
|
2387
|
+
function to() {
|
|
2362
2388
|
return Math.floor(Date.now() / 1e3);
|
|
2363
2389
|
}
|
|
2364
|
-
function
|
|
2390
|
+
function no(e, t) {
|
|
2365
2391
|
if (!e) throw "ERROR: index_in_list() list empty";
|
|
2366
2392
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return n;
|
|
2367
2393
|
return -1;
|
|
2368
2394
|
}
|
|
2369
|
-
function
|
|
2395
|
+
function ro() {
|
|
2370
2396
|
let e = "";
|
|
2371
2397
|
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;
|
|
2372
2398
|
}
|
|
2373
|
-
function
|
|
2399
|
+
function lo(e) {
|
|
2374
2400
|
return e.replace(/[?# ^:]/g, "_");
|
|
2375
2401
|
}
|
|
2376
|
-
function
|
|
2402
|
+
function oo(e) {
|
|
2377
2403
|
let t = null;
|
|
2378
2404
|
return "function" != typeof e && "object" != typeof e || (t = ("" + e).match(/function\s*([\w\$]*)\s*\(/)), null !== t ? t[1] + "()" : "";
|
|
2379
2405
|
}
|
|
2380
|
-
function
|
|
2406
|
+
function io(e, t = 0, n = !1) {
|
|
2381
2407
|
let r = null, l = null, o = null;
|
|
2382
2408
|
const i = (...i) => {
|
|
2383
2409
|
o = this, l = i;
|
|
@@ -2392,20 +2418,20 @@ function ro(e, t = 0, n = !1) {
|
|
|
2392
2418
|
clearTimeout(r), r = null, l = null, o = null;
|
|
2393
2419
|
}, i;
|
|
2394
2420
|
}
|
|
2395
|
-
function
|
|
2421
|
+
function so(...e) {
|
|
2396
2422
|
let t = "", n = 0;
|
|
2397
2423
|
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++));
|
|
2398
2424
|
return t;
|
|
2399
2425
|
}
|
|
2400
|
-
var
|
|
2401
|
-
function
|
|
2426
|
+
var ao = 256, uo = 1e5;
|
|
2427
|
+
function _o(e) {
|
|
2402
2428
|
const t = String(e).replace(/`/g, "``");
|
|
2403
2429
|
return "[" === t[0] ? "[" + t : t;
|
|
2404
2430
|
}
|
|
2405
|
-
function
|
|
2406
|
-
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` :
|
|
2431
|
+
function co(e) {
|
|
2432
|
+
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` : _o(e)).join("`") : "";
|
|
2407
2433
|
}
|
|
2408
|
-
function
|
|
2434
|
+
function fo(e) {
|
|
2409
2435
|
if ("string" != typeof e) return null;
|
|
2410
2436
|
let t = [], n = "";
|
|
2411
2437
|
for (let r = 0; r < e.length; r++) if ("`" !== e[r]) n += e[r];
|
|
@@ -2426,9 +2452,9 @@ function uo(e) {
|
|
|
2426
2452
|
return null !== t ? t : "[" === e[0] && "[" === e[1] ? e.slice(1) : e;
|
|
2427
2453
|
});
|
|
2428
2454
|
}
|
|
2429
|
-
function
|
|
2455
|
+
function go(e) {
|
|
2430
2456
|
const t = {}, n = (e, r, l) => {
|
|
2431
|
-
if (l >
|
|
2457
|
+
if (l > ao) throw new Error("json2flat: deeper than 256");
|
|
2432
2458
|
if (null === e || "object" != typeof e || Array.isArray(e)) {
|
|
2433
2459
|
if (Array.isArray(e) && e.length > 0) return void e.forEach((e, t) => {
|
|
2434
2460
|
const o = `[${t}]`;
|
|
@@ -2438,7 +2464,7 @@ function _o(e) {
|
|
|
2438
2464
|
const t = Object.keys(e);
|
|
2439
2465
|
if (t.length > 0) {
|
|
2440
2466
|
for (const o of t) {
|
|
2441
|
-
const t =
|
|
2467
|
+
const t = _o(o);
|
|
2442
2468
|
n(e[o], 0 === l ? t : r + "`" + t, l + 1);
|
|
2443
2469
|
}
|
|
2444
2470
|
return;
|
|
@@ -2448,20 +2474,20 @@ function _o(e) {
|
|
|
2448
2474
|
};
|
|
2449
2475
|
return null == e || n(e, "", 0), t;
|
|
2450
2476
|
}
|
|
2451
|
-
function
|
|
2477
|
+
function bo(e) {
|
|
2452
2478
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat2json: a flat json is an object of id -> value");
|
|
2453
2479
|
let t = null;
|
|
2454
2480
|
for (const n of Object.keys(e)) {
|
|
2455
|
-
const r =
|
|
2481
|
+
const r = fo(n);
|
|
2456
2482
|
if (!r || 0 === r.length) throw new Error(`flat2json: malformed flat id: '${n}'`);
|
|
2457
|
-
if (r.length >
|
|
2483
|
+
if (r.length > ao) throw new Error(`flat2json: '${n}' deeper than 256`);
|
|
2458
2484
|
const l = "number" == typeof r[0];
|
|
2459
2485
|
if (null === t) t = l ? [] : {};
|
|
2460
2486
|
else if (l !== Array.isArray(t)) throw new Error(`flat2json: '${n}' does not fit a ${Array.isArray(t) ? "array" : "object"} root`);
|
|
2461
2487
|
let o = t;
|
|
2462
2488
|
for (let t = 0; t < r.length; t++) {
|
|
2463
2489
|
const l = r[t], i = "number" == typeof l, s = t === r.length - 1, a = !s && "number" == typeof r[t + 1];
|
|
2464
|
-
if (i && l >
|
|
2490
|
+
if (i && l > uo) throw new Error(`flat2json: array index ${l} over the limit (100000) in '${n}'`);
|
|
2465
2491
|
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"}`);
|
|
2466
2492
|
if (s) {
|
|
2467
2493
|
if (Array.isArray(o)) {
|
|
@@ -2485,23 +2511,23 @@ function co(e) {
|
|
|
2485
2511
|
}
|
|
2486
2512
|
return null === t ? {} : t;
|
|
2487
2513
|
}
|
|
2488
|
-
function
|
|
2514
|
+
function po(e, t) {
|
|
2489
2515
|
return e === t || null !== e && null !== t && "object" == typeof e && "object" == typeof t && JSON.stringify(e) === JSON.stringify(t);
|
|
2490
2516
|
}
|
|
2491
|
-
function
|
|
2517
|
+
function mo(e, t) {
|
|
2492
2518
|
const n = e && "object" == typeof e ? e : {}, r = t && "object" == typeof t ? t : {}, l = {
|
|
2493
2519
|
added: {},
|
|
2494
2520
|
removed: {},
|
|
2495
2521
|
changed: {}
|
|
2496
2522
|
};
|
|
2497
|
-
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ?
|
|
2523
|
+
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ? po(n[e], r[e]) || (l.changed[e] = {
|
|
2498
2524
|
from: n[e],
|
|
2499
2525
|
to: r[e]
|
|
2500
2526
|
}) : l.removed[e] = n[e];
|
|
2501
2527
|
for (const e of Object.keys(r)) Object.prototype.hasOwnProperty.call(n, e) || (l.added[e] = r[e]);
|
|
2502
2528
|
return l;
|
|
2503
2529
|
}
|
|
2504
|
-
function
|
|
2530
|
+
function Eo(e, t) {
|
|
2505
2531
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat_apply: a flat json is an object of id -> value");
|
|
2506
2532
|
if (null === t || "object" != typeof t) throw new Error("flat_apply: a diff is the object flat_diff() answers");
|
|
2507
2533
|
for (const n of Object.keys(t.removed || {})) delete e[n];
|
|
@@ -2513,40 +2539,40 @@ function bo(e, t) {
|
|
|
2513
2539
|
}
|
|
2514
2540
|
return e;
|
|
2515
2541
|
}
|
|
2516
|
-
function
|
|
2542
|
+
function ho(e) {
|
|
2517
2543
|
return "persistent-attrs-" + Dt(e);
|
|
2518
2544
|
}
|
|
2519
|
-
function
|
|
2520
|
-
let n = Xt(e, v.SDF_PERSIST), r =
|
|
2521
|
-
if (r &&
|
|
2522
|
-
let l =
|
|
2523
|
-
l =
|
|
2545
|
+
function To(e, t) {
|
|
2546
|
+
let n = Xt(e, v.SDF_PERSIST), r = gl(ho(e), null, !1);
|
|
2547
|
+
if (r && wr(r)) {
|
|
2548
|
+
let l = cl(e, r, t, !1);
|
|
2549
|
+
l = cl(e, l, n, !1), on(e, l, v.SDF_PERSIST);
|
|
2524
2550
|
}
|
|
2525
2551
|
}
|
|
2526
|
-
function
|
|
2527
|
-
let n =
|
|
2528
|
-
return r &&
|
|
2552
|
+
function yo(e, t) {
|
|
2553
|
+
let n = cl(e, Xt(e, v.SDF_PERSIST), t, !1), r = gl(ho(e), null, !1);
|
|
2554
|
+
return r && wr(r) && dr(n, r), dl(ho(e), n);
|
|
2529
2555
|
}
|
|
2530
|
-
function
|
|
2531
|
-
let n =
|
|
2532
|
-
0 ===
|
|
2556
|
+
function vo(e, t) {
|
|
2557
|
+
let n = fl(e, gl(ho(e), null, !1), t, !1);
|
|
2558
|
+
0 === Sr(n) ? bl(ho(e)) : dl(ho(e), n);
|
|
2533
2559
|
}
|
|
2534
|
-
function
|
|
2535
|
-
let n =
|
|
2536
|
-
return n &&
|
|
2560
|
+
function So(e, t) {
|
|
2561
|
+
let n = gl(ho(e), null, !1), r = {};
|
|
2562
|
+
return n && wr(n) && (r = cl(e, n, t, !1)), r;
|
|
2537
2563
|
}
|
|
2538
|
-
function
|
|
2539
|
-
if (
|
|
2564
|
+
function Oo(e) {
|
|
2565
|
+
if (jr(e) && 1 === Nr(e)) {
|
|
2540
2566
|
let t = e[0];
|
|
2541
|
-
return
|
|
2567
|
+
return Jr(t, "size") ? t.size : 1;
|
|
2542
2568
|
}
|
|
2543
|
-
return
|
|
2569
|
+
return Nr(e);
|
|
2544
2570
|
}
|
|
2545
|
-
function
|
|
2546
|
-
if (
|
|
2571
|
+
function No(e, t) {
|
|
2572
|
+
if (Dr(t)) {
|
|
2547
2573
|
if (-1 === t.indexOf("^")) {
|
|
2548
2574
|
let n, r, l = e.fkey;
|
|
2549
|
-
if (1 !==
|
|
2575
|
+
if (1 !== Sr(l)) return rr("bad fkey 1"), rr(e), rr(t), null;
|
|
2550
2576
|
for (const e of Object.keys(l)) {
|
|
2551
2577
|
n = e, r = l[e];
|
|
2552
2578
|
break;
|
|
@@ -2559,28 +2585,28 @@ function vo(e, t) {
|
|
|
2559
2585
|
}
|
|
2560
2586
|
{
|
|
2561
2587
|
let n = t.split("^");
|
|
2562
|
-
return 3 !== n.length ? (
|
|
2588
|
+
return 3 !== n.length ? (rr("bad fkey 2"), rr(e), rr(t), null) : {
|
|
2563
2589
|
topic_name: n[0],
|
|
2564
2590
|
id: n[1],
|
|
2565
2591
|
hook_name: n[2]
|
|
2566
2592
|
};
|
|
2567
2593
|
}
|
|
2568
2594
|
}
|
|
2569
|
-
return
|
|
2595
|
+
return wr(t) ? {
|
|
2570
2596
|
topic_name: t.topic_name,
|
|
2571
2597
|
id: t.id,
|
|
2572
2598
|
hook_name: t.hook_name
|
|
2573
|
-
} : (
|
|
2599
|
+
} : (rr("bad fkey 3"), rr(e), rr(t), null);
|
|
2574
2600
|
}
|
|
2575
|
-
function
|
|
2576
|
-
let n =
|
|
2601
|
+
function Ro(e, t) {
|
|
2602
|
+
let n = No(e, t);
|
|
2577
2603
|
return n ? n.topic_name + "^" + n.id + "^" + n.hook_name : null;
|
|
2578
2604
|
}
|
|
2579
|
-
function
|
|
2580
|
-
if (
|
|
2605
|
+
function wo(e, t) {
|
|
2606
|
+
if (Dr(t)) {
|
|
2581
2607
|
if (-1 === t.indexOf("^")) {
|
|
2582
2608
|
let n, r = e.hook;
|
|
2583
|
-
if (1 !==
|
|
2609
|
+
if (1 !== Sr(r)) return rr("bad hook 1"), rr(e), rr(t), null;
|
|
2584
2610
|
for (let e of Object.keys(r)) {
|
|
2585
2611
|
n = e, r[e];
|
|
2586
2612
|
break;
|
|
@@ -2592,18 +2618,18 @@ function So(e, t) {
|
|
|
2592
2618
|
}
|
|
2593
2619
|
{
|
|
2594
2620
|
let n = t.split("^");
|
|
2595
|
-
return 2 !== n.length ? (
|
|
2621
|
+
return 2 !== n.length ? (rr("bad hook 2"), rr(e), rr(t), null) : {
|
|
2596
2622
|
topic_name: n[0],
|
|
2597
2623
|
id: n[1]
|
|
2598
2624
|
};
|
|
2599
2625
|
}
|
|
2600
2626
|
}
|
|
2601
|
-
return
|
|
2627
|
+
return wr(t) ? {
|
|
2602
2628
|
topic_name: t.topic_name,
|
|
2603
2629
|
id: t.id
|
|
2604
|
-
} : (
|
|
2630
|
+
} : (rr("bad hook 3"), rr(e), rr(t), null);
|
|
2605
2631
|
}
|
|
2606
|
-
var
|
|
2632
|
+
var jo = [
|
|
2607
2633
|
"string",
|
|
2608
2634
|
"integer",
|
|
2609
2635
|
"object",
|
|
@@ -2613,7 +2639,7 @@ var No = [
|
|
|
2613
2639
|
"real",
|
|
2614
2640
|
"boolean",
|
|
2615
2641
|
"blob"
|
|
2616
|
-
],
|
|
2642
|
+
], Do = [
|
|
2617
2643
|
"persistent",
|
|
2618
2644
|
"required",
|
|
2619
2645
|
"notnull",
|
|
@@ -2625,7 +2651,7 @@ var No = [
|
|
|
2625
2651
|
"stats",
|
|
2626
2652
|
"rstats",
|
|
2627
2653
|
"pstats"
|
|
2628
|
-
],
|
|
2654
|
+
], Ao = [
|
|
2629
2655
|
"hook",
|
|
2630
2656
|
"fkey",
|
|
2631
2657
|
"enum",
|
|
@@ -2654,7 +2680,7 @@ var No = [
|
|
|
2654
2680
|
"coordinates",
|
|
2655
2681
|
"gbuffer"
|
|
2656
2682
|
];
|
|
2657
|
-
function
|
|
2683
|
+
function $o(e) {
|
|
2658
2684
|
let t = {
|
|
2659
2685
|
name: e.id,
|
|
2660
2686
|
header: e.header,
|
|
@@ -2673,7 +2699,7 @@ function jo(e) {
|
|
|
2673
2699
|
if (!e.flag) return t;
|
|
2674
2700
|
for (let n = 0; n < e.flag.length; n++) {
|
|
2675
2701
|
let r = e.flag[n];
|
|
2676
|
-
if (
|
|
2702
|
+
if (Ol(Ao, r)) {
|
|
2677
2703
|
switch (r) {
|
|
2678
2704
|
case "enum":
|
|
2679
2705
|
t.enum_list = e.enum;
|
|
@@ -2687,7 +2713,7 @@ function jo(e) {
|
|
|
2687
2713
|
case "file": t.is_file = !0;
|
|
2688
2714
|
}
|
|
2689
2715
|
t.type = r;
|
|
2690
|
-
} else if (
|
|
2716
|
+
} else if (Ol(Do, r)) switch (r) {
|
|
2691
2717
|
case "writable":
|
|
2692
2718
|
t.is_writable = !0;
|
|
2693
2719
|
break;
|
|
@@ -2700,7 +2726,7 @@ function jo(e) {
|
|
|
2700
2726
|
}
|
|
2701
2727
|
return t.is_file && (t.type = "file"), t;
|
|
2702
2728
|
}
|
|
2703
|
-
function
|
|
2729
|
+
function Io(e, t) {
|
|
2704
2730
|
let n = {
|
|
2705
2731
|
name: e,
|
|
2706
2732
|
header: e,
|
|
@@ -2714,13 +2740,13 @@ function Do(e, t) {
|
|
|
2714
2740
|
placeholder: void 0,
|
|
2715
2741
|
fkey: null
|
|
2716
2742
|
};
|
|
2717
|
-
if (
|
|
2743
|
+
if (Dr(t)) {
|
|
2718
2744
|
let e = t.split(".");
|
|
2719
2745
|
for (let t = 0; t < e.length; t++) {
|
|
2720
2746
|
let r = e[t];
|
|
2721
|
-
if (
|
|
2722
|
-
else if (
|
|
2723
|
-
else if (
|
|
2747
|
+
if (Ol(jo, r)) n.real_type || (n.real_type = r);
|
|
2748
|
+
else if (Ol(Ao, r)) n.type || (n.type = r);
|
|
2749
|
+
else if (Ol(Do, r)) switch (r) {
|
|
2724
2750
|
case "writable":
|
|
2725
2751
|
n.is_writable = !0;
|
|
2726
2752
|
break;
|
|
@@ -2732,35 +2758,35 @@ function Do(e, t) {
|
|
|
2732
2758
|
}
|
|
2733
2759
|
}
|
|
2734
2760
|
n.real_type || (n.real_type = "string");
|
|
2735
|
-
} else
|
|
2761
|
+
} else wr(t) ? (n = $o(t), n.name || (n.name = e), n.header || (n.header = e)) : jr(t) && (n.real_type = "array", n.enum_list = t);
|
|
2736
2762
|
return n.type || (n.type = n.real_type), n;
|
|
2737
2763
|
}
|
|
2738
|
-
function
|
|
2764
|
+
function ko(e, t) {
|
|
2739
2765
|
let n = {};
|
|
2740
2766
|
return t || (t = {}), Object.entries(e).forEach(([e, r]) => {
|
|
2741
2767
|
let l;
|
|
2742
|
-
|
|
2743
|
-
let o =
|
|
2768
|
+
wr(r) && (l = r.default);
|
|
2769
|
+
let o = nl(null, t, e, l);
|
|
2744
2770
|
n[e] = o;
|
|
2745
2771
|
}), n;
|
|
2746
2772
|
}
|
|
2747
|
-
var
|
|
2773
|
+
var Co = [
|
|
2748
2774
|
N(y.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
2749
2775
|
N(y.DTP_BOOLEAN, "periodic", 0, 0, "True for periodic timeouts"),
|
|
2750
2776
|
N(y.DTP_INTEGER, "msec", 0, 0, "Timeout in milliseconds"),
|
|
2751
|
-
|
|
2752
|
-
],
|
|
2777
|
+
O()
|
|
2778
|
+
], Lo = {
|
|
2753
2779
|
periodic: !1,
|
|
2754
2780
|
msec: 0,
|
|
2755
2781
|
timer_id: -1
|
|
2756
|
-
},
|
|
2757
|
-
function
|
|
2782
|
+
}, Po = null;
|
|
2783
|
+
function Uo(e, t, n, r) {
|
|
2758
2784
|
let l = e.priv, o = l.periodic ? "EV_TIMEOUT_PERIODIC" : "EV_TIMEOUT";
|
|
2759
2785
|
return l.periodic && l.msec > 0 ? l.timer_id = setTimeout(function() {
|
|
2760
2786
|
yn(e, "EV_TIMEOUT", {}, e);
|
|
2761
2787
|
}, l.msec) : l.timer_id = -1, kt(e) ? yn($t(e), o, {}, e) : Cn(e, o, {}), l.periodic || -1 !== l.timer_id || ht(e) && gt(e), 0;
|
|
2762
2788
|
}
|
|
2763
|
-
var
|
|
2789
|
+
var Fo = {
|
|
2764
2790
|
mt_create: function(e) {
|
|
2765
2791
|
let t = e.priv;
|
|
2766
2792
|
const n = nn(e, "subscriber");
|
|
@@ -2785,31 +2811,31 @@ var Lo = {
|
|
|
2785
2811
|
},
|
|
2786
2812
|
mt_destroy: function(e) {}
|
|
2787
2813
|
};
|
|
2788
|
-
function
|
|
2814
|
+
function Go() {
|
|
2789
2815
|
return function(e) {
|
|
2790
|
-
if (
|
|
2816
|
+
if (Po) return rr(`GClass ALREADY created: ${e}`), -1;
|
|
2791
2817
|
const t = [["ST_IDLE", [[
|
|
2792
2818
|
"EV_TIMEOUT",
|
|
2793
|
-
|
|
2819
|
+
Uo,
|
|
2794
2820
|
null
|
|
2795
2821
|
]]]];
|
|
2796
|
-
return (
|
|
2822
|
+
return (Po = $e(e, [
|
|
2797
2823
|
["EV_TIMEOUT", U.EVF_OUTPUT_EVENT],
|
|
2798
2824
|
["EV_TIMEOUT_PERIODIC", U.EVF_OUTPUT_EVENT],
|
|
2799
2825
|
[0, 0]
|
|
2800
|
-
], t,
|
|
2826
|
+
], t, Fo, 0, Co, Lo, 0, 0, 0, C.gcflag_manual_start)) ? 0 : -1;
|
|
2801
2827
|
}("C_TIMER");
|
|
2802
2828
|
}
|
|
2803
|
-
function
|
|
2804
|
-
return e instanceof k ? "C_TIMER" !== jt(e) ? (
|
|
2829
|
+
function Vo(e, t) {
|
|
2830
|
+
return e instanceof k ? "C_TIMER" !== jt(e) ? (rr("not C_TIMER GObj"), -1) : (sn(e, "periodic", !1), void an(e, "msec", t)) : (rr("not GObj TYPE"), -1);
|
|
2805
2831
|
}
|
|
2806
|
-
function
|
|
2807
|
-
return e instanceof k ? "C_TIMER" !== jt(e) ? (
|
|
2832
|
+
function Mo(e, t) {
|
|
2833
|
+
return e instanceof k ? "C_TIMER" !== jt(e) ? (rr("not C_TIMER GObj"), -1) : (sn(e, "periodic", !0), void an(e, "msec", t)) : (rr("not GObj TYPE"), -1);
|
|
2808
2834
|
}
|
|
2809
|
-
function
|
|
2810
|
-
return e instanceof k ? "C_TIMER" !== jt(e) ? (
|
|
2835
|
+
function Wo(e) {
|
|
2836
|
+
return e instanceof k ? "C_TIMER" !== jt(e) ? (rr("not C_TIMER GObj"), -1) : void an(e, "msec", -1) : (rr("not GObj TYPE"), -1);
|
|
2811
2837
|
}
|
|
2812
|
-
var
|
|
2838
|
+
var Ko = [
|
|
2813
2839
|
N(y.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
2814
2840
|
N(y.DTP_BOOLEAN, "browser_beforeunload", 0, !1, "Set true to refreshing browser"),
|
|
2815
2841
|
N(y.DTP_STRING, "__username__", 0, "", "Username"),
|
|
@@ -2828,64 +2854,64 @@ var Vo = [
|
|
|
2828
2854
|
N(y.DTP_POINTER, "trace_ievent_callback", 0, null, "Where the traffic trace goes (C_IEVENT_CLI levels ievents/ievents2); console when null"),
|
|
2829
2855
|
N(y.DTP_BOOLEAN, "developer", 0, !1, "Developer mode enabled"),
|
|
2830
2856
|
N(y.DTP_INTEGER, "periodic_timeout", 0, "1000", "Timeout periodic, in miliseconds."),
|
|
2831
|
-
|
|
2832
|
-
],
|
|
2833
|
-
function
|
|
2857
|
+
O()
|
|
2858
|
+
], xo = { gobj_timer: null }, Yo = null;
|
|
2859
|
+
function Bo(e, t, n, r) {
|
|
2834
2860
|
let l = zt(e, t);
|
|
2835
|
-
return
|
|
2861
|
+
return wr(l) || (l = {}), l[n] = r, rn(e, t, l), He(e, t);
|
|
2836
2862
|
}
|
|
2837
|
-
function
|
|
2863
|
+
function Jo(e) {
|
|
2838
2864
|
if (!0 === e || !1 === e) return e;
|
|
2839
2865
|
let t = String(null == e ? "" : e).toLowerCase();
|
|
2840
2866
|
return "true" === t || "set" === t || "false" !== t && "reset" !== t && ("" === t || isNaN(Number(t)) ? null : !!Number(t));
|
|
2841
2867
|
}
|
|
2842
|
-
function
|
|
2843
|
-
return `${Nt()}^${
|
|
2868
|
+
function qo() {
|
|
2869
|
+
return `${Nt()}^${Ot()}`;
|
|
2844
2870
|
}
|
|
2845
|
-
function
|
|
2871
|
+
function Ho(e, t, n, r) {
|
|
2846
2872
|
return Cn(e, t, n), 0;
|
|
2847
2873
|
}
|
|
2848
|
-
var
|
|
2874
|
+
var Qo = {
|
|
2849
2875
|
mt_create: function(e) {
|
|
2850
2876
|
let t = e.priv;
|
|
2851
|
-
un(e, "start_date",
|
|
2877
|
+
un(e, "start_date", eo()), un(e, "node_uuid", ro()), e.priv.gobj_timer = ot(wt(e), "C_TIMER", {}, e), t.periodic_timeout = zt(e, "periodic_timeout"), function(e) {
|
|
2852
2878
|
let t = zt(e, "trace_levels");
|
|
2853
|
-
if (!
|
|
2879
|
+
if (!wr(t)) return 0;
|
|
2854
2880
|
let n = t.__global_trace__;
|
|
2855
|
-
if (
|
|
2881
|
+
if (jr(n)) {
|
|
2856
2882
|
ce(4294967295, !1);
|
|
2857
2883
|
for (let e of n) se(e, !0);
|
|
2858
2884
|
}
|
|
2859
2885
|
for (const [n, r] of Object.entries(t)) {
|
|
2860
2886
|
let t = Me(n);
|
|
2861
|
-
if (t) if (
|
|
2887
|
+
if (t) if (jr(r)) {
|
|
2862
2888
|
he(t, null, !1);
|
|
2863
2889
|
for (let e of r) he(t, e, !0);
|
|
2864
|
-
} else
|
|
2890
|
+
} else rr(`${wt(e)}: trace_levels of ${n} MUST be a list`);
|
|
2865
2891
|
}
|
|
2866
2892
|
}(e), function(e) {
|
|
2867
2893
|
let t = zt(e, "no_trace_levels");
|
|
2868
|
-
if (!
|
|
2894
|
+
if (!wr(t)) return 0;
|
|
2869
2895
|
let n = t.__global_no_trace__;
|
|
2870
|
-
if (
|
|
2896
|
+
if (jr(n)) {
|
|
2871
2897
|
fe(4294967295, !1);
|
|
2872
2898
|
for (let e of n) ae(e, !0);
|
|
2873
2899
|
}
|
|
2874
2900
|
for (const [n, r] of Object.entries(t)) {
|
|
2875
2901
|
let t = Me(n);
|
|
2876
|
-
if (t) if (
|
|
2902
|
+
if (t) if (jr(r)) {
|
|
2877
2903
|
ye(t, null, !1);
|
|
2878
2904
|
for (let e of r) ye(t, e, !0);
|
|
2879
|
-
} else
|
|
2905
|
+
} else rr(`${wt(e)}: no_trace_levels of ${n} MUST be a list`);
|
|
2880
2906
|
}
|
|
2881
2907
|
}(e);
|
|
2882
2908
|
},
|
|
2883
2909
|
mt_writing: function(e, t) {},
|
|
2884
2910
|
mt_start: function(e) {
|
|
2885
|
-
return
|
|
2911
|
+
return Mo(e.priv.gobj_timer, e.priv.periodic_timeout), 0;
|
|
2886
2912
|
},
|
|
2887
2913
|
mt_stop: function(e) {
|
|
2888
|
-
return
|
|
2914
|
+
return Wo(e.priv.gobj_timer), bt(e), 0;
|
|
2889
2915
|
},
|
|
2890
2916
|
mt_destroy: function(e) {},
|
|
2891
2917
|
mt_play: function(e) {
|
|
@@ -2901,35 +2927,35 @@ var Jo = {
|
|
|
2901
2927
|
case "get-global-no-trace": return o(0, 0, null, null, de());
|
|
2902
2928
|
case "set-global-trace":
|
|
2903
2929
|
case "set-global-no-trace": {
|
|
2904
|
-
let r = "set-global-no-trace" === t, l = n.level, i =
|
|
2905
|
-
return l ? null === i ? o(0, -1, `${
|
|
2930
|
+
let r = "set-global-no-trace" === t, l = n.level, i = Jo(n.set);
|
|
2931
|
+
return l ? null === i ? o(0, -1, `${qo()}: bitmask set or re-set?`, null, null) : (r ? ae(l, i) : se(l, i)) < 0 ? o(0, -1, `${qo()}: global trace level not found: ${l}`, null, null) : r ? (Bo(e, "no_trace_levels", "__global_no_trace__", de()), o(0, 0, null, null, de())) : (Bo(e, "trace_levels", "__global_trace__", ge()), o(0, 0, null, null, ge())) : o(0, -1, `${qo()}: what level?`, null, null);
|
|
2906
2932
|
}
|
|
2907
2933
|
case "get-gclass-trace":
|
|
2908
2934
|
case "get-gclass-no-trace":
|
|
2909
2935
|
case "set-gclass-trace":
|
|
2910
2936
|
case "set-gclass-no-trace": {
|
|
2911
2937
|
let r = t.indexOf("no-trace") >= 0, l = n.gclass_name || n.gclass || "", i = Me(l);
|
|
2912
|
-
if (!i) return o(0, -1, `${
|
|
2938
|
+
if (!i) return o(0, -1, `${qo()}: what gclass is '${l}'?`, null, null);
|
|
2913
2939
|
if (0 === t.indexOf("get-")) return o(0, 0, null, null, r ? me(i) : be(i));
|
|
2914
|
-
let s = n.level, a =
|
|
2915
|
-
return s ? null === a ? o(0, -1, `${
|
|
2940
|
+
let s = n.level, a = Jo(n.set);
|
|
2941
|
+
return s ? null === a ? o(0, -1, `${qo()}: bitmask set or re-set?`, null, null) : (r ? ye(i, s, a) : he(i, s, a)) < 0 ? o(0, -1, `${qo()}: trace level of ${l} not found: ${s}`, null, null) : r ? (Bo(e, "no_trace_levels", l, me(i)), o(0, 0, null, null, me(i))) : (Bo(e, "trace_levels", l, pe(i)), o(0, 0, null, null, be(i))) : o(0, -1, `${qo()}: what level?`, null, null);
|
|
2916
2942
|
}
|
|
2917
|
-
default: return o(0, -1, `${
|
|
2943
|
+
default: return o(0, -1, `${qo()}: command not available: ${t}`, null, null);
|
|
2918
2944
|
}
|
|
2919
2945
|
}
|
|
2920
2946
|
};
|
|
2921
|
-
function
|
|
2947
|
+
function zo() {
|
|
2922
2948
|
return function(e) {
|
|
2923
|
-
if (
|
|
2949
|
+
if (Yo) return rr(`GClass ALREADY created: ${e}`), -1;
|
|
2924
2950
|
const t = [["ST_IDLE", [[
|
|
2925
2951
|
"EV_TIMEOUT_PERIODIC",
|
|
2926
|
-
|
|
2952
|
+
Ho,
|
|
2927
2953
|
null
|
|
2928
2954
|
]]]];
|
|
2929
|
-
return (
|
|
2955
|
+
return (Yo = $e(e, [["EV_TIMEOUT_PERIODIC", U.EVF_OUTPUT_EVENT | U.EVF_NO_WARN_SUBS], [0, 0]], t, Qo, 0, Ko, xo, 0, 0, 0, 0)) ? 0 : -1;
|
|
2930
2956
|
}("C_YUNO");
|
|
2931
2957
|
}
|
|
2932
|
-
var
|
|
2958
|
+
var Xo = "ievent_gate_stack", Zo = [
|
|
2933
2959
|
N(y.DTP_STRING, "wanted_yuno_role", v.SDF_RD, "", "wanted yuno role"),
|
|
2934
2960
|
N(y.DTP_STRING, "wanted_yuno_name", v.SDF_RD, "", "wanted yuno name"),
|
|
2935
2961
|
N(y.DTP_STRING, "wanted_yuno_service", v.SDF_RD, "", "wanted yuno service"),
|
|
@@ -2945,16 +2971,16 @@ var Ho = "ievent_gate_stack", Qo = [
|
|
|
2945
2971
|
N(y.DTP_INTEGER, "timeout_retry_max", v.SDF_RD, "60000", "Cap of the reconnect backoff (ms). Set it equal to timeout_retry for the old fixed-interval behaviour"),
|
|
2946
2972
|
N(y.DTP_INTEGER, "timeout_idack", v.SDF_RD, "5000", "timeout waiting idAck"),
|
|
2947
2973
|
N(y.DTP_POINTER, "subscriber", 0, 0, "subscriber of output-events. If null then subscriber is the parent"),
|
|
2948
|
-
|
|
2949
|
-
],
|
|
2974
|
+
O()
|
|
2975
|
+
], ei = [
|
|
2950
2976
|
["ievents", "Trace inter-events with metadata of kw"],
|
|
2951
2977
|
["ievents2", "Trace inter-events with full kw"],
|
|
2952
2978
|
["identity-card", "Trace identity_card messages"]
|
|
2953
2979
|
];
|
|
2954
|
-
function
|
|
2980
|
+
function ti(e) {
|
|
2955
2981
|
return !!(3 & Z(e));
|
|
2956
2982
|
}
|
|
2957
|
-
var
|
|
2983
|
+
var ni = {
|
|
2958
2984
|
url: null,
|
|
2959
2985
|
remote_yuno_name: null,
|
|
2960
2986
|
remote_yuno_role: null,
|
|
@@ -2964,16 +2990,16 @@ var Zo = {
|
|
|
2964
2990
|
websocket: null,
|
|
2965
2991
|
inside_on_open: !1,
|
|
2966
2992
|
retry_ms: 0
|
|
2967
|
-
},
|
|
2968
|
-
function
|
|
2969
|
-
e.priv.websocket &&
|
|
2993
|
+
}, ri = null;
|
|
2994
|
+
function li(e) {
|
|
2995
|
+
e.priv.websocket && rr("Websocket ALREADY setup");
|
|
2970
2996
|
const t = tn(e, "url");
|
|
2971
2997
|
let n;
|
|
2972
|
-
|
|
2998
|
+
ir(`====> Starting WebSocket to '${t}' (${Dt(e)})`);
|
|
2973
2999
|
try {
|
|
2974
3000
|
n = new WebSocket(t);
|
|
2975
3001
|
} catch (n) {
|
|
2976
|
-
return
|
|
3002
|
+
return rr(`${Dt(e)}: Cannot open WebSocket to '${t}', Error: ${n.message}`), null;
|
|
2977
3003
|
}
|
|
2978
3004
|
return n ? (n.onopen = () => {
|
|
2979
3005
|
yn(e, "EV_ON_OPEN", { url: t }, e);
|
|
@@ -2983,72 +3009,72 @@ function ti(e) {
|
|
|
2983
3009
|
data: n.data
|
|
2984
3010
|
}, e);
|
|
2985
3011
|
}, n.onclose = (n) => {
|
|
2986
|
-
Ct(e) || (Zt(
|
|
3012
|
+
Ct(e) || (Zt(St(), "browser_beforeunload") ? lr("Close websocket by unload page") : yn(e, "EV_ON_CLOSE", {
|
|
2987
3013
|
url: t,
|
|
2988
3014
|
e: n
|
|
2989
3015
|
}, e));
|
|
2990
|
-
}, n) : (
|
|
3016
|
+
}, n) : (rr(`${Dt(e)}: Failed to initialize WebSocket.`), null);
|
|
2991
3017
|
}
|
|
2992
|
-
function
|
|
3018
|
+
function oi(e, t = 1e3, n = "") {
|
|
2993
3019
|
let r = e.priv, l = r.websocket;
|
|
2994
3020
|
if (r.websocket = null, l && l.readyState !== WebSocket.CLOSED && l.readyState !== WebSocket.CLOSING) {
|
|
2995
|
-
|
|
3021
|
+
ir(`Closing WebSocket (Code: ${t}, Reason: "${n}")`);
|
|
2996
3022
|
try {
|
|
2997
3023
|
l.close(t, n);
|
|
2998
3024
|
} catch (e) {
|
|
2999
|
-
|
|
3025
|
+
rr("Error closing WebSocket:", e.message);
|
|
3000
3026
|
}
|
|
3001
|
-
} else
|
|
3027
|
+
} else lr("WebSocket is already closed or in the process of closing.");
|
|
3002
3028
|
}
|
|
3003
|
-
function
|
|
3004
|
-
let r =
|
|
3029
|
+
function ii(e, t, n) {
|
|
3030
|
+
let r = eo();
|
|
3005
3031
|
try {
|
|
3006
|
-
|
|
3032
|
+
ir("\n" + r + " " + t + "\n"), ar(n);
|
|
3007
3033
|
} catch (e) {
|
|
3008
|
-
|
|
3034
|
+
ir("ERROR in trace_inter_event: " + e);
|
|
3009
3035
|
}
|
|
3010
3036
|
}
|
|
3011
|
-
var
|
|
3037
|
+
var si = class {
|
|
3012
3038
|
constructor(e, t) {
|
|
3013
3039
|
this.event = e, this.kw = t || {};
|
|
3014
3040
|
}
|
|
3015
3041
|
};
|
|
3016
|
-
function
|
|
3042
|
+
function ai(e, t, n, r) {
|
|
3017
3043
|
return function(e, t) {
|
|
3018
3044
|
let n = e.priv, r = JSON.stringify(t);
|
|
3019
|
-
if (
|
|
3020
|
-
let n = tn(e, "url"), l = wt(
|
|
3021
|
-
o ? o(l, t, 1, r.length) :
|
|
3045
|
+
if (ti(e)) {
|
|
3046
|
+
let n = tn(e, "url"), l = wt(St()) + " ==> " + n, o = zt(St(), "trace_ievent_callback");
|
|
3047
|
+
o ? o(l, t, 1, r.length) : ii(0, l, t);
|
|
3022
3048
|
}
|
|
3023
|
-
if (!n.websocket || n.websocket.readyState !== WebSocket.OPEN) return
|
|
3049
|
+
if (!n.websocket || n.websocket.readyState !== WebSocket.OPEN) return lr(`${Dt(e)}: send_iev(): websocket not open, message lost`), -1;
|
|
3024
3050
|
try {
|
|
3025
3051
|
n.websocket.send(r);
|
|
3026
3052
|
} catch (t) {
|
|
3027
|
-
|
|
3053
|
+
rr(`${Dt(e)}: send_iev(): ${t}`);
|
|
3028
3054
|
}
|
|
3029
3055
|
return 0;
|
|
3030
3056
|
}(e, function(e, t) {
|
|
3031
|
-
return
|
|
3057
|
+
return Ur(e) ? (rr("iev_create() event NULL"), null) : new si(e, t);
|
|
3032
3058
|
}(t, n));
|
|
3033
3059
|
}
|
|
3034
|
-
function
|
|
3035
|
-
return
|
|
3060
|
+
function ui(e, t, n) {
|
|
3061
|
+
return Ur(n) && (n = tn(e, "wanted_yuno_service")), {
|
|
3036
3062
|
dst_yuno: tn(e, "wanted_yuno_name"),
|
|
3037
3063
|
dst_role: tn(e, "wanted_yuno_role"),
|
|
3038
3064
|
dst_service: n,
|
|
3039
|
-
src_yuno:
|
|
3065
|
+
src_yuno: Ot(),
|
|
3040
3066
|
src_role: Nt(),
|
|
3041
3067
|
src_service: t,
|
|
3042
|
-
host:
|
|
3068
|
+
host: ro()
|
|
3043
3069
|
};
|
|
3044
3070
|
}
|
|
3045
|
-
function
|
|
3046
|
-
let t = e.priv, n = vt(
|
|
3047
|
-
i && i.length || (i = zt(
|
|
3071
|
+
function _i(e) {
|
|
3072
|
+
let t = e.priv, n = vt(St()), r = tn(St(), "yuno_version"), l = tn(St(), "yuno_release"), o = tn(St(), "yuno_tag"), i = zt(e, "required_services");
|
|
3073
|
+
i && i.length || (i = zt(St(), "required_services"));
|
|
3048
3074
|
let s = {
|
|
3049
3075
|
yuno_role: Nt(),
|
|
3050
3076
|
yuno_id: Rt(),
|
|
3051
|
-
yuno_name:
|
|
3077
|
+
yuno_name: Ot(),
|
|
3052
3078
|
yuno_tag: o,
|
|
3053
3079
|
yuno_version: r,
|
|
3054
3080
|
yuno_release: l,
|
|
@@ -3057,37 +3083,37 @@ function si(e) {
|
|
|
3057
3083
|
pid: 0,
|
|
3058
3084
|
watcher_pid: 0,
|
|
3059
3085
|
jwt: tn(e, "jwt"),
|
|
3060
|
-
username: tn(
|
|
3086
|
+
username: tn(St(), "__username__"),
|
|
3061
3087
|
launch_id: 0,
|
|
3062
|
-
yuno_startdate: tn(
|
|
3063
|
-
id:
|
|
3088
|
+
yuno_startdate: tn(St(), "start_date"),
|
|
3089
|
+
id: ro(),
|
|
3064
3090
|
user_agent: "undefined" != typeof window ? window.navigator.userAgent : "",
|
|
3065
3091
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
3066
3092
|
required_services: i
|
|
3067
3093
|
};
|
|
3068
|
-
return
|
|
3094
|
+
return Dl(e, s, Xo, ui(e, wt($t(e)), null)), $l(e, s, "__identity__"), Vo(t.gobj_timer, en(e, "timeout_idack")), ai(e, "EV_IDENTITY_CARD", s);
|
|
3069
3095
|
}
|
|
3070
|
-
function
|
|
3071
|
-
if (
|
|
3096
|
+
function ci(e, t) {
|
|
3097
|
+
if (Ur(t.event)) return -1;
|
|
3072
3098
|
let n = {}, r = t.__global__, l = t.__config__, o = t.__filter__, i = t.__service__, s = t.subscriber;
|
|
3073
3099
|
l && (n.__config__ = l), r && (n.__global__ = r), o && (n.__filter__ = o);
|
|
3074
|
-
return
|
|
3100
|
+
return Dl(e, n, Xo, ui(e, wt(s), i)), $l(e, n, "__subscribing__"), ai(e, t.event, n);
|
|
3075
3101
|
}
|
|
3076
|
-
function
|
|
3102
|
+
function fi(e, t, n, r) {
|
|
3077
3103
|
let l = e.priv;
|
|
3078
|
-
return ht(e) && (l.websocket =
|
|
3104
|
+
return ht(e) && (l.websocket = li(e)), 0;
|
|
3079
3105
|
}
|
|
3080
|
-
function
|
|
3081
|
-
return
|
|
3106
|
+
function gi(e, t, n, r) {
|
|
3107
|
+
return ir("Websocket opened: " + e.priv.url), _i(e), 0;
|
|
3082
3108
|
}
|
|
3083
|
-
function
|
|
3109
|
+
function di(e, t, n, r) {
|
|
3084
3110
|
let l = e.priv, o = n.e, i = n.url;
|
|
3085
|
-
return
|
|
3111
|
+
return tr(), lr(`${Dt(e)}: WebSocket closed ${i} (Code: ${o.code}, Reason: "${o.reason}", Clean: ${o.wasClean})`), 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, Cn(e, "EV_ON_CLOSE", {
|
|
3086
3112
|
url: i,
|
|
3087
3113
|
remote_yuno_name: l.remote_yuno_name,
|
|
3088
3114
|
remote_yuno_role: l.remote_yuno_role,
|
|
3089
3115
|
remote_yuno_service: l.remote_yuno_service
|
|
3090
|
-
})) : (
|
|
3116
|
+
})) : (lr(`${Dt(e)}: EV_ON_OPEN_ERROR cannot open ${i} (Code: ${o.code}, Reason: "${o.reason}", Clean: ${o.wasClean})`), Cn(e, "EV_ON_OPEN_ERROR", {
|
|
3091
3117
|
url: i,
|
|
3092
3118
|
remote_yuno_name: l.remote_yuno_name,
|
|
3093
3119
|
remote_yuno_role: l.remote_yuno_role,
|
|
@@ -3095,7 +3121,7 @@ function ci(e, t, n, r) {
|
|
|
3095
3121
|
code: o.code,
|
|
3096
3122
|
reason: o.reason,
|
|
3097
3123
|
was_clean: o.wasClean
|
|
3098
|
-
})), ht(e) &&
|
|
3124
|
+
})), ht(e) && Vo(l.gobj_timer, function(e) {
|
|
3099
3125
|
let t = e.priv, n = en(e, "timeout_retry"), r = en(e, "timeout_retry_max");
|
|
3100
3126
|
r < n && (r = n);
|
|
3101
3127
|
t.retry_ms = t.retry_ms ? Math.min(2 * t.retry_ms, r) : n;
|
|
@@ -3103,17 +3129,17 @@ function ci(e, t, n, r) {
|
|
|
3103
3129
|
return Math.max(1, Math.round(o));
|
|
3104
3130
|
}(e)), 0;
|
|
3105
3131
|
}
|
|
3106
|
-
function
|
|
3107
|
-
return
|
|
3132
|
+
function bi(e, t, n, r) {
|
|
3133
|
+
return _i(e), 0;
|
|
3108
3134
|
}
|
|
3109
|
-
function
|
|
3135
|
+
function pi(e, t, n, r) {
|
|
3110
3136
|
let l = e.priv;
|
|
3111
|
-
|
|
3112
|
-
let o =
|
|
3137
|
+
Wo(l.gobj_timer);
|
|
3138
|
+
let o = Al(e, n, Xo, !0), i = Zr(e, o, "src_yuno", ""), s = Zr(e, o, "src_role", ""), a = Zr(e, o, "src_service", "");
|
|
3113
3139
|
un(e, "remote_yuno_name", i), un(e, "remote_yuno_role", s), un(e, "remote_yuno_service", a);
|
|
3114
|
-
let u =
|
|
3140
|
+
let u = zr(e, n, "result", -1, 0), _ = Zr(e, n, "comment", "", 0), c = Zr(e, n, "username", "", 0), f = nl(e, n, "services_roles", {});
|
|
3115
3141
|
if (u < 0) {
|
|
3116
|
-
|
|
3142
|
+
oi(e);
|
|
3117
3143
|
let t = {
|
|
3118
3144
|
url: tn(e, "url"),
|
|
3119
3145
|
result: u,
|
|
@@ -3138,60 +3164,60 @@ function gi(e, t, n, r) {
|
|
|
3138
3164
|
}
|
|
3139
3165
|
l.inside_on_open = !1, function(e) {
|
|
3140
3166
|
let t = $n(e, null, null, null);
|
|
3141
|
-
for (let n = 0; n < t.length; n++)
|
|
3167
|
+
for (let n = 0; n < t.length; n++) ci(e, t[n]);
|
|
3142
3168
|
}(e);
|
|
3143
3169
|
}
|
|
3144
3170
|
return 0;
|
|
3145
3171
|
}
|
|
3146
|
-
function
|
|
3172
|
+
function mi(e, t, n, r) {
|
|
3147
3173
|
let l = e.priv.url, o = function(e, t) {
|
|
3148
3174
|
let n;
|
|
3149
3175
|
try {
|
|
3150
3176
|
n = JSON.parse(t);
|
|
3151
3177
|
} catch (e) {
|
|
3152
|
-
return
|
|
3178
|
+
return rr("parsing inter_event json: " + e), null;
|
|
3153
3179
|
}
|
|
3154
|
-
if (!(n instanceof Object)) return
|
|
3180
|
+
if (!(n instanceof Object)) return rr("parsing inter_event: websocket data not a json object"), null;
|
|
3155
3181
|
let r = n.event;
|
|
3156
|
-
if (!r) return
|
|
3157
|
-
if ("string" != typeof r) return
|
|
3182
|
+
if (!r) return rr("parsing inter_event: no event"), null;
|
|
3183
|
+
if ("string" != typeof r) return rr("parsing inter_event: event not a string"), null;
|
|
3158
3184
|
let l = n.kw;
|
|
3159
3185
|
return l ? l instanceof Object ? {
|
|
3160
3186
|
event: r,
|
|
3161
3187
|
kw: l || {}
|
|
3162
|
-
} : (
|
|
3188
|
+
} : (rr("parsing inter_event: kw not a json object"), null) : (rr("parsing inter_kw: no kw"), null);
|
|
3163
3189
|
}(0, n.data);
|
|
3164
|
-
if (
|
|
3165
|
-
let e = wt(
|
|
3166
|
-
r ? r(e, o, 2, t) :
|
|
3190
|
+
if (ti(e)) {
|
|
3191
|
+
let e = wt(St()) + " <== " + l, t = n.data.length, r = zt(St(), "trace_ievent_callback");
|
|
3192
|
+
r ? r(e, o, 2, t) : ii(0, e, o);
|
|
3167
3193
|
}
|
|
3168
3194
|
let i = o.event, s = o.kw;
|
|
3169
3195
|
if ("ST_SESSION" !== cn(e)) {
|
|
3170
3196
|
if (dn(e, i, U.EVF_PUBLIC_EVENT)) {
|
|
3171
3197
|
if (!(yn(e, i, s, e) < 0)) return 0;
|
|
3172
|
-
} else
|
|
3173
|
-
return
|
|
3198
|
+
} else rr(`${Dt(e)}: event UNKNOWN in not-session state ${i}`);
|
|
3199
|
+
return oi(e), -1;
|
|
3174
3200
|
}
|
|
3175
3201
|
o = null;
|
|
3176
|
-
let a =
|
|
3177
|
-
if (_.toLowerCase() !== Nt().toLowerCase()) return
|
|
3178
|
-
let c =
|
|
3202
|
+
let a = Il(e, s), u = Al(e, s, Xo), _ = Zr(e, u, "dst_role", "");
|
|
3203
|
+
if (_.toLowerCase() !== Nt().toLowerCase()) return rr(`"It's not my role, dst_role: ${_}, my_role: ${Nt()}`), 0;
|
|
3204
|
+
let c = Zr(e, u, "dst_service", "");
|
|
3179
3205
|
if ("__subscribing__" === a) return -1;
|
|
3180
3206
|
if ("__unsubscribing__" === a) return -1;
|
|
3181
3207
|
if (dn(e, i, U.EVF_PUBLIC_EVENT)) return yn(e, i, s, e), 0;
|
|
3182
|
-
if (!
|
|
3208
|
+
if (!Ur(c)) {
|
|
3183
3209
|
let t = xe(c, !1);
|
|
3184
|
-
return t ? dn(t, i, U.EVF_PUBLIC_EVENT) ? (yn(t, i, s, e), 0) : (
|
|
3210
|
+
return t ? dn(t, i, U.EVF_PUBLIC_EVENT) ? (yn(t, i, s, e), 0) : (rr(`${Dt(e)}: Service found but no event or not public, service '${Dt(t)}', ev '${i}'`), -1) : (lr(`${Dt(e)}: event for a service that is gone, DROPPED: service '${c}', ev '${i}'`), 0);
|
|
3185
3211
|
}
|
|
3186
3212
|
return kt(e) ? yn($t(e), i, s, e) : Cn(e, i, s), 0;
|
|
3187
3213
|
}
|
|
3188
|
-
function
|
|
3214
|
+
function Ei(e, t, n, r) {
|
|
3189
3215
|
return 0;
|
|
3190
3216
|
}
|
|
3191
|
-
function
|
|
3217
|
+
function hi(e, t, n, r) {
|
|
3192
3218
|
return 0;
|
|
3193
3219
|
}
|
|
3194
|
-
var
|
|
3220
|
+
var Ti = {
|
|
3195
3221
|
mt_create: function(e) {
|
|
3196
3222
|
let t = e.priv;
|
|
3197
3223
|
t.gobj_timer = ot(wt(e), "C_TIMER", {}, e), t.url = tn(e, "url"), t.remote_yuno_name = tn(e, "remote_yuno_name"), t.remote_yuno_role = tn(e, "remote_yuno_role"), t.remote_yuno_service = tn(e, "remote_yuno_service"), un(e, "wanted_yuno_name", t.remote_yuno_name), un(e, "wanted_yuno_role", t.remote_yuno_role), un(e, "wanted_yuno_service", t.remote_yuno_service);
|
|
@@ -3215,72 +3241,72 @@ var mi = {
|
|
|
3215
3241
|
},
|
|
3216
3242
|
mt_start: function(e) {
|
|
3217
3243
|
let t = e.priv;
|
|
3218
|
-
return t.retry_ms = 0, t.websocket =
|
|
3244
|
+
return t.retry_ms = 0, t.websocket = li(e), 0;
|
|
3219
3245
|
},
|
|
3220
3246
|
mt_stop: function(e) {
|
|
3221
3247
|
let t = e.priv;
|
|
3222
|
-
return
|
|
3248
|
+
return Wo(t.gobj_timer), t.websocket && oi(e), 0;
|
|
3223
3249
|
},
|
|
3224
3250
|
mt_destroy: function(e) {},
|
|
3225
3251
|
mt_stats: function(e, t, n, r) {
|
|
3226
|
-
if ("ST_SESSION" !== cn(e)) return
|
|
3252
|
+
if ("ST_SESSION" !== cn(e)) return rr("Not in session"), null;
|
|
3227
3253
|
n || (n = {});
|
|
3228
|
-
let l =
|
|
3229
|
-
return o || (o = {}),
|
|
3254
|
+
let l = ui(e, wt(r), Zr(e, n, "service", null, 0)), o = nl(e, n, "__md_stats__", null, Un.KW_EXTRACT);
|
|
3255
|
+
return o || (o = {}), Dl(e, n, "stats_stack", {
|
|
3230
3256
|
stats: t,
|
|
3231
3257
|
kw: o
|
|
3232
|
-
}),
|
|
3258
|
+
}), Dl(e, n, Xo, l), n.__stats__ = t, $l(e, n, "__stats__"), ai(e, "EV_MT_STATS", n, r), null;
|
|
3233
3259
|
},
|
|
3234
3260
|
mt_command_parser: function(e, t, n, r) {
|
|
3235
|
-
if ("ST_SESSION" !== cn(e)) return
|
|
3261
|
+
if ("ST_SESSION" !== cn(e)) return rr("Not in session"), null;
|
|
3236
3262
|
n || (n = {});
|
|
3237
|
-
let l =
|
|
3238
|
-
return o || (o = {}),
|
|
3263
|
+
let l = ui(e, wt(r), Zr(e, n, "service", "", 0)), o = nl(e, n, "__md_command__", null, Un.KW_EXTRACT);
|
|
3264
|
+
return o || (o = {}), Dl(e, n, "command_stack", {
|
|
3239
3265
|
command: t,
|
|
3240
3266
|
kw: o
|
|
3241
|
-
}),
|
|
3267
|
+
}), Dl(e, n, Xo, l), n.__command__ = t, $l(e, n, "__command__"), ai(e, "EV_MT_COMMAND", n, r), null;
|
|
3242
3268
|
},
|
|
3243
3269
|
mt_inject_event: function(e, t, n, r) {
|
|
3244
3270
|
if ("ST_SESSION" !== cn(e)) return window.console.error("Not in session"), -1;
|
|
3245
|
-
if (n || (n = {}),
|
|
3271
|
+
if (n || (n = {}), Al(e, n, Xo));
|
|
3246
3272
|
else {
|
|
3247
|
-
let l =
|
|
3248
|
-
|
|
3273
|
+
let l = ui(e, wt(r), Zr(e, n, "__service__", 0, 0));
|
|
3274
|
+
pr(n, "__service__"), Dl(e, n, "__message__", t), Dl(e, n, Xo, l);
|
|
3249
3275
|
}
|
|
3250
|
-
return
|
|
3276
|
+
return $l(e, n, "__message__"), ai(e, t, n, r);
|
|
3251
3277
|
},
|
|
3252
3278
|
mt_subscription_added: function(e, t) {
|
|
3253
3279
|
let n = e.priv;
|
|
3254
|
-
return "ST_SESSION" === cn(e) && n.websocket ? n.inside_on_open ? 0 :
|
|
3280
|
+
return "ST_SESSION" === cn(e) && n.websocket ? n.inside_on_open ? 0 : ci(e, t) : 0;
|
|
3255
3281
|
},
|
|
3256
3282
|
mt_subscription_deleted: function(e, t) {
|
|
3257
3283
|
let n = e.priv;
|
|
3258
3284
|
if ("ST_SESSION" !== cn(e) || !n.websocket) return 0;
|
|
3259
3285
|
if (n.inside_on_open) return 0;
|
|
3260
|
-
if (
|
|
3286
|
+
if (Ur(t.event)) return 0;
|
|
3261
3287
|
let r = {}, l = t.__global__, o = t.__config__, i = t.__filter__, s = t.__service__, a = t.subscriber;
|
|
3262
3288
|
o && (r.__config__ = o), l && (r.__global__ = l), i && (r.__filter__ = i);
|
|
3263
|
-
return
|
|
3289
|
+
return Dl(e, r, Xo, ui(e, wt(a), s)), $l(e, r, "__unsubscribing__"), ai(e, t.event, r, e);
|
|
3264
3290
|
}
|
|
3265
3291
|
};
|
|
3266
|
-
function
|
|
3292
|
+
function yi() {
|
|
3267
3293
|
return function(e) {
|
|
3268
|
-
if (
|
|
3294
|
+
if (ri) return rr(`GClass ALREADY created: ${e}`), -1;
|
|
3269
3295
|
const t = [
|
|
3270
3296
|
["ST_DISCONNECTED", [
|
|
3271
3297
|
[
|
|
3272
3298
|
"EV_ON_OPEN",
|
|
3273
|
-
|
|
3299
|
+
gi,
|
|
3274
3300
|
"ST_WAIT_IDENTITY_CARD_ACK"
|
|
3275
3301
|
],
|
|
3276
3302
|
[
|
|
3277
3303
|
"EV_ON_CLOSE",
|
|
3278
|
-
|
|
3304
|
+
di,
|
|
3279
3305
|
null
|
|
3280
3306
|
],
|
|
3281
3307
|
[
|
|
3282
3308
|
"EV_TIMEOUT",
|
|
3283
|
-
|
|
3309
|
+
fi,
|
|
3284
3310
|
null
|
|
3285
3311
|
],
|
|
3286
3312
|
[
|
|
@@ -3292,22 +3318,22 @@ function Ei() {
|
|
|
3292
3318
|
["ST_WAIT_IDENTITY_CARD_ACK", [
|
|
3293
3319
|
[
|
|
3294
3320
|
"EV_ON_MESSAGE",
|
|
3295
|
-
|
|
3321
|
+
mi,
|
|
3296
3322
|
null
|
|
3297
3323
|
],
|
|
3298
3324
|
[
|
|
3299
3325
|
"EV_IDENTITY_CARD_ACK",
|
|
3300
|
-
|
|
3326
|
+
pi,
|
|
3301
3327
|
null
|
|
3302
3328
|
],
|
|
3303
3329
|
[
|
|
3304
3330
|
"EV_ON_CLOSE",
|
|
3305
|
-
|
|
3331
|
+
di,
|
|
3306
3332
|
"ST_DISCONNECTED"
|
|
3307
3333
|
],
|
|
3308
3334
|
[
|
|
3309
3335
|
"EV_TIMEOUT",
|
|
3310
|
-
|
|
3336
|
+
bi,
|
|
3311
3337
|
null
|
|
3312
3338
|
],
|
|
3313
3339
|
[
|
|
@@ -3319,22 +3345,22 @@ function Ei() {
|
|
|
3319
3345
|
["ST_SESSION", [
|
|
3320
3346
|
[
|
|
3321
3347
|
"EV_ON_MESSAGE",
|
|
3322
|
-
|
|
3348
|
+
mi,
|
|
3323
3349
|
null
|
|
3324
3350
|
],
|
|
3325
3351
|
[
|
|
3326
3352
|
"EV_MT_STATS",
|
|
3327
|
-
|
|
3353
|
+
Ei,
|
|
3328
3354
|
null
|
|
3329
3355
|
],
|
|
3330
3356
|
[
|
|
3331
3357
|
"EV_MT_COMMAND",
|
|
3332
|
-
|
|
3358
|
+
hi,
|
|
3333
3359
|
null
|
|
3334
3360
|
],
|
|
3335
3361
|
[
|
|
3336
3362
|
"EV_ON_CLOSE",
|
|
3337
|
-
|
|
3363
|
+
di,
|
|
3338
3364
|
"ST_DISCONNECTED"
|
|
3339
3365
|
],
|
|
3340
3366
|
[
|
|
@@ -3345,7 +3371,7 @@ function Ei() {
|
|
|
3345
3371
|
]],
|
|
3346
3372
|
[null, null]
|
|
3347
3373
|
];
|
|
3348
|
-
return (
|
|
3374
|
+
return (ri = $e(e, [
|
|
3349
3375
|
["EV_ON_MESSAGE", U.EVF_OUTPUT_EVENT],
|
|
3350
3376
|
["EV_IDENTITY_CARD_ACK", U.EVF_PUBLIC_EVENT],
|
|
3351
3377
|
["EV_ON_ID_NAK", U.EVF_PUBLIC_EVENT | U.EVF_OUTPUT_EVENT],
|
|
@@ -3356,9 +3382,9 @@ function Ei() {
|
|
|
3356
3382
|
["EV_ON_OPEN_ERROR", U.EVF_OUTPUT_EVENT | U.EVF_NO_WARN_SUBS],
|
|
3357
3383
|
["EV_TIMEOUT", 0],
|
|
3358
3384
|
[null, 0]
|
|
3359
|
-
], t,
|
|
3385
|
+
], t, Ti, 0, Zo, ni, 0, 0, ei, C.gcflag_no_check_output_events)) ? 0 : -1;
|
|
3360
3386
|
}("C_IEVENT_CLI");
|
|
3361
3387
|
}
|
|
3362
|
-
export { k as GObj, N as SDATA, D as SDATAAUTHZ, R as SDATACM, w as SDATACM2, $ as SDATADF, j as SDATAPM, A as SDATAPM0,
|
|
3388
|
+
export { k as GObj, N as SDATA, D as SDATAAUTHZ, R as SDATACM, w as SDATACM2, $ as SDATADF, j as SDATAPM, A as SDATAPM0, O as SDATA_END, S as SDataDesc, a as YUNETA_VERSION, E as __yuno__, o as build_command_response, so as build_path, s as build_stats_response, lo as clean_name, Wo as clear_timeout, Wr as cmp_two_simple_json, l as command_parser, Hl as createElement2, ql as createOneHtml, Kl as create_json_record, ko as create_template_record, eo as current_timestamp, y as data_type_t, So as db_list_persistent_attrs, To as db_load_persistent_attrs, vo as db_remove_persistent_attrs, yo as db_save_persistent_attrs, io as debounce, Rl as delete_from_list, _r as duplicate_objects, Rr as empty_json, Ur as empty_string, Bl as escapeHtml, U as event_flag_t, bo as flat2json, Eo as flat_apply, mo as flat_diff, co as flat_key_join, fo as flat_key_split, Pe as gclass_add_ev_action, Fe as gclass_add_event_type, Le as gclass_add_state, Ve as gclass_check_fsm, $e as gclass_create, Ge as gclass_event_type, Me as gclass_find_by_name, C as gclass_flag_t, Ie as gclass_unregister, Ql as getPositionRelativeToBody, oo as get_function_name, to as get_now, Lt as gobj_bottom_gobj, fn as gobj_change_parent, _n as gobj_change_state, Ln as gobj_command, it as gobj_create, et as gobj_create2, rt as gobj_create_default_service, ot as gobj_create_pure_child, nt as gobj_create_service, lt as gobj_create_volatil, tt as gobj_create_yuno, cn as gobj_current_state, Ke as gobj_default_service, Tn as gobj_deliver_posted_events, st as gobj_destroy, Bt as gobj_find_child, xt as gobj_find_gobj, xe as gobj_find_service, kn as gobj_find_subscribings, $n as gobj_find_subscriptions, L as gobj_flag_t, At as gobj_full_name, jt as gobj_gclass_name, be as gobj_get_gclass_trace_level, pe as gobj_get_gclass_trace_level2, me as gobj_get_gclass_trace_no_level, ge as gobj_get_global_trace_level, de as gobj_get_global_trace_no_level, ue as gobj_global_trace_level, _e as gobj_global_trace_no_level, Qt as gobj_has_attr, dn as gobj_has_event, bn as gobj_has_output_event, je as gobj_hsdata, Ct as gobj_is_destroying, vt as gobj_is_playing, kt as gobj_is_pure_child, ht as gobj_is_running, yt as gobj_is_service, It as gobj_is_volatil, ze as gobj_list_persistent_attrs, In as gobj_list_subscriptions, qe as gobj_load_persistent_attrs, Jt as gobj_match_children, qt as gobj_match_children_tree, Yt as gobj_match_gobj, wt as gobj_name, $t as gobj_parent, Et as gobj_pause, mt as gobj_play, En as gobj_post_event, hn as gobj_posted_events_size, Cn as gobj_publish_event, zt as gobj_read_attr, Xt as gobj_read_attrs, Zt as gobj_read_bool_attr, en as gobj_read_integer_attr, nn as gobj_read_pointer_attr, tn as gobj_read_str_attr, Qe as gobj_remove_persistent_attrs, Se as gobj_repr_global_trace_levels, ln as gobj_reset_volatil_attrs, He as gobj_save_persistent_attrs, Ht as gobj_search_path, yn as gobj_send_event, We as gobj_services, Pt as gobj_set_bottom_gobj, Ee as gobj_set_deep_trace, ye as gobj_set_gclass_no_trace, he as gobj_set_gclass_trace, ae as gobj_set_global_no_trace, fe as gobj_set_global_no_trace2, se as gobj_set_global_trace, ce as gobj_set_global_trace2, ve as gobj_set_gobj_no_trace, Te as gobj_set_gobj_trace, K as gobj_set_trace_machine_format, Dt as gobj_short_name, at as gobj_start, _t as gobj_start_children, ft as gobj_start_tree, Oe as gobj_start_up, Pn as gobj_stats, gt as gobj_stop, bt as gobj_stop_children, pt as gobj_stop_tree, jn as gobj_subscribe_event, Z as gobj_trace_level, x as gobj_trace_machine_format, ee as gobj_trace_no_level, Dn as gobj_unsubscribe_event, An as gobj_unsubscribe_list, Ft as gobj_walk_gobj_children, Gt as gobj_walk_gobj_children_tree, rn as gobj_write_attr, on as gobj_write_attrs, sn as gobj_write_bool_attr, an as gobj_write_integer_attr, un as gobj_write_str_attr, St as gobj_yuno, Rt as gobj_yuno_id, Ot as gobj_yuno_name, Nt as gobj_yuno_role, Sl as id_index_in_obj_list, no as index_in_list, jr as is_array, $r as is_boolean, Cr as is_date, Lr as is_function, Pr as is_gobj, xr as is_metadata_key, Ir as is_null, Ar as is_number, wr as is_object, Yr as is_private_key, kr as is_pure_number, Dr as is_string, Fl as jdb_delete, Vl as jdb_get, Ml as jdb_get_by_idx, Gl as jdb_get_topic, Pl as jdb_init, Ul as jdb_update, go as json2flat, hr as json_array_append, Tr as json_array_append_new, vr as json_array_extend, yr as json_array_remove, Or as json_array_size, ur as json_deep_copy, cr as json_is_identical, pr as json_object_del, br as json_object_get, mr as json_object_set, Er as json_object_set_new, Sr as json_object_size, fr as json_object_update, gr as json_object_update_existing, dr as json_object_update_missing, Nr as json_size, Yl as jwt2json, xl as jwtDecode, cl as kw_clone_by_keys, fl as kw_clone_by_not_keys, _l as kw_collect, Hr as kw_delete, al as kw_find_json_in_list, qr as kw_find_path, Un as kw_flag_t, Qr as kw_get_bool, tl as kw_get_dict, nl as kw_get_dict_value, zr as kw_get_int, rl as kw_get_list, gl as kw_get_local_storage_value, el as kw_get_pointer, Xr as kw_get_real, Zr as kw_get_str, Jr as kw_has_key, sl as kw_match_simple, Br as kw_pop, bl as kw_remove_local_storage_value, ul as kw_select, ll as kw_set_dict_value, dl as kw_set_local_storage_value, ol as kw_set_subdict_value, ml as kwid_collect, Tl as kwid_find_one_record, yl as kwid_get_ids, pl as kwid_match_id, El as kwid_new_dict, hl as kwid_new_list, vl as list2options, kl as load_json_file, ir as log_debug, rr as log_error, or as log_info, lr as log_warning, Il as msg_iev_get_msg_type, Al as msg_iev_get_stack, Dl as msg_iev_push_stack, wl as msg_iev_read_key, $l as msg_iev_set_msg_type, jl as msg_iev_write_key, ro as node_uuid, Fr as parseBoolean, zl as parseSVG, Xl as refresh_language, yi as register_c_ievent_cli, Go as register_c_timer, zo as register_c_yuno, Jl as safeSrc, v as sdata_flag_t, Cl as send_http_json_post, qn as set_console_log_enabled, Qn as set_console_log_filter, Bn as set_log_callback, tr as set_remote_log_functions, Vo as set_timeout, Mo as set_timeout_periodic, t as sprintf, i as stats_parser, Ol as str_in_list, Mr as strcasecmp, Vr as strcmp, Gr as strncmp, Nl as strs_in_list, Kr as strstr, Io as template_get_field_desc, Zl as timeTracker, ar as trace_json, B as trace_level_t, sr as trace_msg, No as treedb_decoder_fkey, wo as treedb_decoder_hook, Ro as treedb_encoder_fkey, $o as treedb_get_field_desc, Oo as treedb_hook_data_size, n as vsprintf, F as walk_type_t };
|
|
3363
3389
|
|
|
3364
3390
|
//# sourceMappingURL=gobj-js.es.min.js.map
|