@yuneta/gobj-js 7.26.17 → 7.26.19
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 +13 -3
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +877 -866
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +13 -3
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +918 -907
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +13 -3
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +877 -866
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +13 -3
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +877 -866
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.es.min.js
CHANGED
|
@@ -178,7 +178,7 @@ var O = class {
|
|
|
178
178
|
}
|
|
179
179
|
}, I = class {
|
|
180
180
|
constructor(e, t, n, r, l) {
|
|
181
|
-
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 =
|
|
181
|
+
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 = kr(t.priv), this.running = !1, this.playing = !1, this.disabled = !1, this.bottom_gobj = null, this.trace_level = 0, this.no_trace_level = 0;
|
|
182
182
|
}
|
|
183
183
|
}, C = Object.freeze({
|
|
184
184
|
gcflag_manual_start: 1,
|
|
@@ -230,7 +230,7 @@ function K() {
|
|
|
230
230
|
return W;
|
|
231
231
|
}
|
|
232
232
|
function Y(e) {
|
|
233
|
-
|
|
233
|
+
zr(e) && (e = JSON.stringify(e)), dr(" ".repeat(Math.max(1, 2 * y)) + String(e));
|
|
234
234
|
}
|
|
235
235
|
var B = Object.freeze({
|
|
236
236
|
TRACE_MACHINE: 65536,
|
|
@@ -332,7 +332,7 @@ function Q(e, t) {
|
|
|
332
332
|
return n;
|
|
333
333
|
}
|
|
334
334
|
function X(e, t, n) {
|
|
335
|
-
if (
|
|
335
|
+
if (il(e)) return void 0 === n ? 268369920 : 65535;
|
|
336
336
|
if (/^[0-9]+$/.test(String(e))) {
|
|
337
337
|
const t = Number(e);
|
|
338
338
|
if (t) return t;
|
|
@@ -343,7 +343,7 @@ function X(e, t, n) {
|
|
|
343
343
|
for (let n = 0; n < t.length && n < 16; n++) if (t[n] && t[n][0] === e) return 1 << n;
|
|
344
344
|
}
|
|
345
345
|
return 0;
|
|
346
|
-
}(String(e), n) || (
|
|
346
|
+
}(String(e), n) || (cr(`${t}: trace level NOT FOUND: ${e}`), 0);
|
|
347
347
|
}
|
|
348
348
|
function Z(e) {
|
|
349
349
|
if (z) return 4294967295;
|
|
@@ -405,39 +405,39 @@ function de() {
|
|
|
405
405
|
return Q(H, null);
|
|
406
406
|
}
|
|
407
407
|
function be(e) {
|
|
408
|
-
const t =
|
|
409
|
-
return t ? Q(t.trace_level | q, t.s_user_trace_level) : (
|
|
408
|
+
const t = Xr(e) ? Me(e) : e;
|
|
409
|
+
return t ? Q(t.trace_level | q, t.s_user_trace_level) : (cr(`gobj_get_gclass_trace_level: gclass NOT FOUND: ${e}`), []);
|
|
410
410
|
}
|
|
411
411
|
function pe(e) {
|
|
412
|
-
const t =
|
|
413
|
-
return t ? Q(t.trace_level, t.s_user_trace_level) : (
|
|
412
|
+
const t = Xr(e) ? Me(e) : e;
|
|
413
|
+
return t ? Q(t.trace_level, t.s_user_trace_level) : (cr(`gobj_get_gclass_trace_level2: gclass NOT FOUND: ${e}`), []);
|
|
414
414
|
}
|
|
415
415
|
function me(e) {
|
|
416
|
-
const t =
|
|
417
|
-
return t ? Q(t.no_trace_level, t.s_user_trace_level) : (
|
|
416
|
+
const t = Xr(e) ? Me(e) : e;
|
|
417
|
+
return t ? Q(t.no_trace_level, t.s_user_trace_level) : (cr(`gobj_get_gclass_trace_no_level: gclass NOT FOUND: ${e}`), []);
|
|
418
418
|
}
|
|
419
419
|
function he(e) {
|
|
420
420
|
return z = Number(e) || 0, 0;
|
|
421
421
|
}
|
|
422
422
|
function Ee(e, t, n) {
|
|
423
|
-
const r =
|
|
424
|
-
if (!r) return
|
|
423
|
+
const r = Xr(e) ? Me(e) : e;
|
|
424
|
+
if (!r) return cr(`gobj_set_gclass_trace: gclass NOT FOUND: ${e}`), -1;
|
|
425
425
|
const l = null === t ? 4294967295 : X(t, "gobj_set_gclass_trace", r.s_user_trace_level || null);
|
|
426
426
|
return l ? (n ? r.trace_level |= l : r.trace_level &= ~l, 0) : -1;
|
|
427
427
|
}
|
|
428
428
|
function ye(e, t, n) {
|
|
429
|
-
if (!e) return
|
|
429
|
+
if (!e) return cr("gobj_set_gobj_trace: gobj NULL"), -1;
|
|
430
430
|
const r = X(t, "gobj_set_gobj_trace", e.gclass && e.gclass.s_user_trace_level || null);
|
|
431
431
|
return r ? (n ? e.trace_level |= r : e.trace_level &= ~r, 0) : -1;
|
|
432
432
|
}
|
|
433
433
|
function Te(e, t, n) {
|
|
434
|
-
const r =
|
|
435
|
-
if (!r) return
|
|
434
|
+
const r = Xr(e) ? Me(e) : e;
|
|
435
|
+
if (!r) return cr(`gobj_set_gclass_no_trace: gclass NOT FOUND: ${e}`), -1;
|
|
436
436
|
const l = null === t ? 4294967295 : X(t, "gobj_set_gclass_no_trace", r.s_user_trace_level || null);
|
|
437
437
|
return l ? (n ? r.no_trace_level |= l : r.no_trace_level &= ~l, 0) : -1;
|
|
438
438
|
}
|
|
439
439
|
function ve(e, t, n) {
|
|
440
|
-
if (!e) return
|
|
440
|
+
if (!e) return cr("gobj_set_gobj_no_trace: gobj NULL"), -1;
|
|
441
441
|
const r = X(t, "gobj_set_gobj_no_trace", e.gclass && e.gclass.s_user_trace_level || null);
|
|
442
442
|
return r ? (n ? e.no_trace_level |= r : e.no_trace_level &= ~r, 0) : -1;
|
|
443
443
|
}
|
|
@@ -460,7 +460,7 @@ function Se(e, t, n, r, l, o, i) {
|
|
|
460
460
|
}
|
|
461
461
|
function Ne(e, t) {
|
|
462
462
|
let n = {};
|
|
463
|
-
if (!
|
|
463
|
+
if (!Qr(t)) return cr("sdata_desc MUST be an array"), pr(t), n;
|
|
464
464
|
for (let r = 0; r < t.length; r++) {
|
|
465
465
|
const l = t[r];
|
|
466
466
|
l.name && we(e, n, l);
|
|
@@ -474,85 +474,85 @@ function we(e, t, n) {
|
|
|
474
474
|
r = String(l);
|
|
475
475
|
break;
|
|
476
476
|
case T.DTP_BOOLEAN:
|
|
477
|
-
r =
|
|
477
|
+
r = sl(l);
|
|
478
478
|
break;
|
|
479
479
|
case T.DTP_INTEGER:
|
|
480
|
-
r = parseInt(l), isNaN(r) &&
|
|
480
|
+
r = parseInt(l), isNaN(r) && cr(`${Rt(e)}: attr NaN: ${n.name}`);
|
|
481
481
|
break;
|
|
482
482
|
case T.DTP_REAL:
|
|
483
|
-
r = Number(l), isNaN(r) &&
|
|
483
|
+
r = Number(l), isNaN(r) && cr(`${Rt(e)}: attr NaN: ${n.name}`);
|
|
484
484
|
break;
|
|
485
485
|
case T.DTP_LIST:
|
|
486
|
-
if (
|
|
486
|
+
if (Xr(l)) try {
|
|
487
487
|
r = JSON.parse(l);
|
|
488
488
|
} catch (e) {
|
|
489
|
-
|
|
489
|
+
cr(`JSON parse error: ${e.message}`);
|
|
490
490
|
}
|
|
491
491
|
else r = l;
|
|
492
|
-
|
|
492
|
+
Qr(r) || (r = []);
|
|
493
493
|
break;
|
|
494
494
|
case T.DTP_DICT:
|
|
495
|
-
if (
|
|
495
|
+
if (Xr(l)) try {
|
|
496
496
|
r = JSON.parse(l);
|
|
497
497
|
} catch (e) {
|
|
498
|
-
|
|
498
|
+
cr(`JSON parse error: ${e.message}`);
|
|
499
499
|
}
|
|
500
500
|
else r = l;
|
|
501
|
-
|
|
501
|
+
zr(r) || (r = {});
|
|
502
502
|
break;
|
|
503
503
|
case T.DTP_JSON:
|
|
504
504
|
if ("" === l || void 0 === l) r = null;
|
|
505
|
-
else if (
|
|
505
|
+
else if (Xr(l)) try {
|
|
506
506
|
r = JSON.parse(l);
|
|
507
507
|
} catch (e) {
|
|
508
|
-
|
|
508
|
+
cr(`JSON parse error: ${e.message}`);
|
|
509
509
|
}
|
|
510
510
|
else r = l;
|
|
511
511
|
break;
|
|
512
512
|
case T.DTP_POINTER: r = l;
|
|
513
513
|
}
|
|
514
|
-
return void 0 === r && (
|
|
514
|
+
return void 0 === r && (cr(`default_value WRONG, it: ${n.name}, value: ${n.default_value}`), r = null), t[n.name] = r, 0;
|
|
515
515
|
}
|
|
516
516
|
function je(e, t, n, r) {
|
|
517
517
|
let l;
|
|
518
518
|
switch (n.type) {
|
|
519
519
|
case T.DTP_STRING:
|
|
520
520
|
if (null == r) l = "";
|
|
521
|
-
else if (
|
|
521
|
+
else if (Xr(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 T.DTP_BOOLEAN:
|
|
528
|
-
l =
|
|
528
|
+
l = sl(r);
|
|
529
529
|
break;
|
|
530
530
|
case T.DTP_INTEGER:
|
|
531
|
-
if (l = parseInt(r), isNaN(l)) return
|
|
531
|
+
if (l = parseInt(r), isNaN(l)) return cr(`${Rt(e)}: attr NaN: ${n.name}`), -1;
|
|
532
532
|
break;
|
|
533
533
|
case T.DTP_REAL:
|
|
534
|
-
if (l = Number(r), isNaN(l)) return
|
|
534
|
+
if (l = Number(r), isNaN(l)) return cr(`${Rt(e)}: attr NaN: ${n.name}`), -1;
|
|
535
535
|
break;
|
|
536
536
|
case T.DTP_LIST:
|
|
537
|
-
if (
|
|
537
|
+
if (Xr(r)) try {
|
|
538
538
|
l = JSON.parse(r);
|
|
539
539
|
} catch (e) {
|
|
540
|
-
|
|
540
|
+
cr(`JSON parse error: ${e.message}`);
|
|
541
541
|
}
|
|
542
542
|
else l = r;
|
|
543
|
-
if (!
|
|
543
|
+
if (!Qr(l)) return cr(`attr must be an array: ${n.name}`), -1;
|
|
544
544
|
break;
|
|
545
545
|
case T.DTP_DICT:
|
|
546
|
-
if (
|
|
546
|
+
if (Xr(r)) try {
|
|
547
547
|
l = JSON.parse(r);
|
|
548
548
|
} catch (e) {
|
|
549
|
-
|
|
549
|
+
cr(`JSON parse error: ${e.message}`);
|
|
550
550
|
}
|
|
551
551
|
else l = r;
|
|
552
|
-
if (!
|
|
552
|
+
if (!zr(l)) return cr(`attr must be an object: ${n.name}`), -1;
|
|
553
553
|
break;
|
|
554
554
|
case T.DTP_JSON:
|
|
555
|
-
if (l = r,
|
|
555
|
+
if (l = r, Xr(r)) {
|
|
556
556
|
const e = r.trim();
|
|
557
557
|
if (e.startsWith("{") || e.startsWith("[")) try {
|
|
558
558
|
l = JSON.parse(e);
|
|
@@ -563,46 +563,46 @@ function je(e, t, n, r) {
|
|
|
563
563
|
break;
|
|
564
564
|
case T.DTP_POINTER: l = r;
|
|
565
565
|
}
|
|
566
|
-
return void 0 === l &&
|
|
566
|
+
return void 0 === l && cr(`${Rt(e)}: attr undefined: ${n.name}`), t[n.name] = l, zr(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, 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;
|
|
567
567
|
}
|
|
568
568
|
function $e(e) {
|
|
569
569
|
return e.jn_attrs;
|
|
570
570
|
}
|
|
571
571
|
function Re(e, t, n) {
|
|
572
|
-
return zt(e, t) ? $e(e) : e && e.bottom_gobj ? Re(e.bottom_gobj, t, n) : (n &&
|
|
572
|
+
return zt(e, t) ? $e(e) : e && e.bottom_gobj ? Re(e.bottom_gobj, t, n) : (n && cr(`GClass Attribute NOT FOUND: ${Rt(e)}, attr ${t}`), null);
|
|
573
573
|
}
|
|
574
574
|
function De(e, t, n) {
|
|
575
|
-
if (!(e && e instanceof k)) return n &&
|
|
575
|
+
if (!(e && e instanceof k)) return n && cr("gclass NULL"), null;
|
|
576
576
|
if (!t) return e.attrs_table;
|
|
577
577
|
for (let n = 0; n < e.attrs_table.length; n++) {
|
|
578
578
|
const r = e.attrs_table[n];
|
|
579
579
|
if (r.name && r.name === t) return r;
|
|
580
580
|
}
|
|
581
|
-
return n &&
|
|
581
|
+
return n && cr(`${e.gclass_name}: GClass Attribute NOT FOUND: ${t}`), null;
|
|
582
582
|
}
|
|
583
583
|
function Ae(e, t, n, r, l, o, i, s, a, u, _) {
|
|
584
|
-
if (
|
|
585
|
-
if (e.includes("`") || e.includes("^") || e.includes(".")) return
|
|
586
|
-
if (Me(e)) return
|
|
584
|
+
if (il(e)) return cr("gclass_name EMPTY"), null;
|
|
585
|
+
if (e.includes("`") || e.includes("^") || e.includes(".")) return cr(`GClass name CANNOT have '.' or '^' or '\`' char: ${e}`), null;
|
|
586
|
+
if (Me(e)) return cr(`GClass ALREADY exists: ${e}`), null;
|
|
587
587
|
let c = new k(e, r, l, o, i, s, a, u, _);
|
|
588
588
|
(function(e, t) {
|
|
589
|
-
e && e instanceof k ? t ? p[t] ?
|
|
589
|
+
e && e instanceof k ? t ? p[t] ? cr(`gclass ALREADY REGISTERED: ${t}`) : p[t] = e : cr("gclass_name undefined") : cr("gclass undefined");
|
|
590
590
|
})(c, e);
|
|
591
591
|
const f = n.length;
|
|
592
592
|
for (let e = 0; e < f; e++) {
|
|
593
593
|
let t = n[e][0], r = n[e][1];
|
|
594
|
-
if (
|
|
594
|
+
if (il(t)) continue;
|
|
595
595
|
if (Le(c, t) < 0) return ke(c), null;
|
|
596
596
|
const l = r.length;
|
|
597
597
|
for (let e = 0; e < l; e++) {
|
|
598
598
|
let n = r[e][0], l = r[e][1], o = r[e][2];
|
|
599
|
-
|
|
599
|
+
il(n) || Pe(c, t, n, l, o);
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
602
|
for (let e = 0; e < t.length; e++) {
|
|
603
603
|
let n = t[e][0], r = t[e][1];
|
|
604
|
-
if (!
|
|
605
|
-
if (Ve(c, n)) return
|
|
604
|
+
if (!il(n)) {
|
|
605
|
+
if (Ve(c, n)) return cr(`SMachine: event repeated in input_events: ${n}`), ke(c), null;
|
|
606
606
|
Fe(c, n, r);
|
|
607
607
|
}
|
|
608
608
|
}
|
|
@@ -614,13 +614,13 @@ function Ae(e, t, n, r, l, o, i, s, a, u, _) {
|
|
|
614
614
|
}
|
|
615
615
|
function ke(e) {
|
|
616
616
|
let t;
|
|
617
|
-
if (
|
|
617
|
+
if (Xr(e)) t = e;
|
|
618
618
|
else {
|
|
619
|
-
if (!(e instanceof k)) return
|
|
619
|
+
if (!(e instanceof k)) return cr("Cannot unregister gclass, type unknown"), -1;
|
|
620
620
|
t = e.gclass_name;
|
|
621
621
|
}
|
|
622
622
|
let n = p[t];
|
|
623
|
-
return n ? n.instances > 0 ? (
|
|
623
|
+
return n ? n.instances > 0 ? (cr(`Cannot unregister gclass, instances in use: ${t}`), -1) : (delete p[t], 0) : (cr(`Cannot unregister gclass, not found: ${t}`), -1);
|
|
624
624
|
}
|
|
625
625
|
function Ie(e, t) {
|
|
626
626
|
const n = e.dl_states.length, r = e.dl_states;
|
|
@@ -639,22 +639,22 @@ function Ce(e, t) {
|
|
|
639
639
|
return null;
|
|
640
640
|
}
|
|
641
641
|
function Le(e, t) {
|
|
642
|
-
return e instanceof k ? Ie(e, t) ? (
|
|
642
|
+
return e instanceof k ? Ie(e, t) ? (cr(`state already exists: ${t}`), -1) : (e.dl_states.push(new G(t)), 0) : (cr("Cannot add state, typeof not GClass"), -1);
|
|
643
643
|
}
|
|
644
644
|
function Pe(e, t, n, r, l) {
|
|
645
|
-
if (!(e instanceof k)) return
|
|
646
|
-
if (
|
|
645
|
+
if (!(e instanceof k)) return cr("Cannot add state, typeof not GClass"), -1;
|
|
646
|
+
if (il(t)) return cr("state_name EMPTY"), -1;
|
|
647
647
|
let o = Ie(e, t);
|
|
648
|
-
return o ? Ce(o, n) ? (
|
|
648
|
+
return o ? Ce(o, n) ? (cr(`event already exists: gclass ${e.gclass_name}, state ${t}, event ${n}`), -1) : (o.dl_actions.push(new V(n, r, l)), 0) : (cr(`state not found: ${t}`), -1);
|
|
649
649
|
}
|
|
650
650
|
function Ue(e, t, n) {
|
|
651
|
-
|
|
651
|
+
il(t) || e.push(new M(t, n));
|
|
652
652
|
}
|
|
653
653
|
function Fe(e, t, n) {
|
|
654
|
-
return e instanceof k ? Ue(e.dl_events, t, n) : (
|
|
654
|
+
return e instanceof k ? Ue(e.dl_events, t, n) : (cr("Cannot add state, typeof not GClass"), -1);
|
|
655
655
|
}
|
|
656
656
|
function Ve(e, t) {
|
|
657
|
-
if (!(e instanceof k)) return
|
|
657
|
+
if (!(e instanceof k)) return cr("Cannot add state, typeof not GClass"), 0;
|
|
658
658
|
const n = e.dl_events.length, r = e.dl_events;
|
|
659
659
|
for (let e = 0; e < n; e++) {
|
|
660
660
|
let n = r[e];
|
|
@@ -663,25 +663,25 @@ function Ve(e, t) {
|
|
|
663
663
|
return null;
|
|
664
664
|
}
|
|
665
665
|
function Ge(e) {
|
|
666
|
-
if (!(e instanceof k)) return
|
|
666
|
+
if (!(e instanceof k)) return cr("Cannot add state, typeof not GClass"), -1;
|
|
667
667
|
let t = 0;
|
|
668
|
-
|
|
668
|
+
Jr(e.dl_states) || (cr(`GClass without states: ${e.gclass_name}`), t += -1);
|
|
669
669
|
for (let n = 0; n < e.dl_states.length; n++) {
|
|
670
670
|
let r = e.dl_states[n];
|
|
671
|
-
if (!
|
|
671
|
+
if (!il(r.state_name)) for (let n = 0; n < r.dl_actions.length; n++) {
|
|
672
672
|
let l = r.dl_actions[n];
|
|
673
|
-
|
|
673
|
+
il(l.event_name) || (Ve(e, l.event_name) || (cr(`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 && (Ie(e, l.next_state) || (cr(`SMachine: next state NOT in state names: gclass ${e.gclass_name}, state ${r.state_name}, next_state ${l.next_state}`), t += -1)));
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
676
|
for (let n = 0; n < e.dl_events.length; n++) {
|
|
677
677
|
let r = e.dl_events[n];
|
|
678
|
-
if (!
|
|
678
|
+
if (!il(r.event_name) && (Zr(r.event_flag) || (cr(`SMachine: event flag is NOT number: gclass ${e.gclass_name}, event ${r.event_name}`), t += -1), !(r.event_flag & U.EVF_OUTPUT_EVENT))) {
|
|
679
679
|
let n = !1;
|
|
680
680
|
for (let t = 0; t < e.dl_states.length; t++) {
|
|
681
681
|
let l = e.dl_states[t];
|
|
682
|
-
|
|
682
|
+
il(l.state_name) || Ce(l, r.event_name) && (n = !0);
|
|
683
683
|
}
|
|
684
|
-
n || (
|
|
684
|
+
n || (cr(`SMachine: input_list's event NOT in state: gclass ${e.gclass_name}, event ${r.event_name}`), t += -1);
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
687
|
return t;
|
|
@@ -691,83 +691,83 @@ function Me(e, t) {
|
|
|
691
691
|
try {
|
|
692
692
|
n = p[e];
|
|
693
693
|
} catch (e) {}
|
|
694
|
-
return n || (t &&
|
|
694
|
+
return n || (t && cr(`gclass not found: ${e}`), null);
|
|
695
695
|
}
|
|
696
696
|
function We() {
|
|
697
697
|
let e = [];
|
|
698
|
-
for (const t of Object.keys(m))
|
|
698
|
+
for (const t of Object.keys(m)) xr(e, t);
|
|
699
699
|
return e;
|
|
700
700
|
}
|
|
701
701
|
function xe() {
|
|
702
702
|
return !E || E.obflag & P.obflag_destroyed ? null : E;
|
|
703
703
|
}
|
|
704
704
|
function Ke(e, t) {
|
|
705
|
-
if (!
|
|
705
|
+
if (!Xr(e)) return cr(`gobj_find_service(): service name must be a string: ${e}`), null;
|
|
706
706
|
e = e.toLowerCase();
|
|
707
|
-
return m[e] || (t &&
|
|
707
|
+
return m[e] || (t && cr(`gobj service not found: ${e}`), null);
|
|
708
708
|
}
|
|
709
709
|
function Ye(e) {
|
|
710
710
|
let t = jt(e);
|
|
711
|
-
return t = t.toLowerCase(), m[t] &&
|
|
711
|
+
return t = t.toLowerCase(), m[t] && cr(`service ALREADY REGISTERED: ${t}. Will be UPDATED`), m[t] = e, 0;
|
|
712
712
|
}
|
|
713
713
|
function Be(e, t) {
|
|
714
|
-
t.parent &&
|
|
714
|
+
t.parent && cr(`_add_child() ALREADY HAS PARENT: ${t.gobj_name}`), e.dl_children.push(t), t.parent = e;
|
|
715
715
|
}
|
|
716
716
|
function Je(e, t) {
|
|
717
|
-
let n =
|
|
718
|
-
n >= 0 && (
|
|
717
|
+
let n = Uo(e.dl_children, t);
|
|
718
|
+
n >= 0 && (Kr(e.dl_children, n), t.parent = null);
|
|
719
719
|
}
|
|
720
720
|
function qe(e, t) {
|
|
721
|
-
return Tt(e) ? u ? u(e, t) : -1 : (
|
|
721
|
+
return Tt(e) ? u ? u(e, t) : -1 : (cr(`${Rt(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
722
722
|
}
|
|
723
723
|
function He(e, t) {
|
|
724
|
-
return Tt(e) ? _ ? _(e, t) : -1 : (
|
|
724
|
+
return Tt(e) ? _ ? _(e, t) : -1 : (cr(`${Rt(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
725
725
|
}
|
|
726
726
|
function ze(e, t) {
|
|
727
|
-
return Tt(e) ? c ? c(e, t) : -1 : (
|
|
727
|
+
return Tt(e) ? c ? c(e, t) : -1 : (cr(`${Rt(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
728
728
|
}
|
|
729
729
|
function Qe(e, t) {
|
|
730
730
|
return f ? f(e, t) : null;
|
|
731
731
|
}
|
|
732
732
|
function Xe(e, t) {
|
|
733
|
-
"__json_config_variables__" !== t &&
|
|
733
|
+
"__json_config_variables__" !== t && cr(`GClass Attribute NOT FOUND: ${Rt(e)}, attr ${t}`);
|
|
734
734
|
}
|
|
735
735
|
function Ze(e, t, n) {
|
|
736
736
|
let r = t;
|
|
737
737
|
(function(e, t, n, r, l) {
|
|
738
|
-
if (!e || !t) return
|
|
738
|
+
if (!e || !t) return cr("hsdata or kw NULL"), -1;
|
|
739
739
|
let o = 0;
|
|
740
740
|
for (const [i, s] of Object.entries(t)) {
|
|
741
741
|
const t = De(l.gclass, i, !1);
|
|
742
|
-
t ? (-1 === n || t.flag & n) && (t.flag & v.SDF_DEPRECATED &&
|
|
742
|
+
t ? (-1 === n || t.flag & n) && (t.flag & v.SDF_DEPRECATED && fr(`${Rt(l)}: Deprecated attribute used in gobj creation: ${i}`), o += je(l, e, t, s)) : r && (r(l, i), o--);
|
|
743
743
|
}
|
|
744
744
|
return o;
|
|
745
|
-
})($e(e), r, -1, e.gclass.gclass_flag & C.gcflag_ignore_unknown_attrs ? 0 : Xe, e) < 0 && (
|
|
745
|
+
})($e(e), r, -1, e.gclass.gclass_flag & C.gcflag_ignore_unknown_attrs ? 0 : Xe, e) < 0 && (cr(`${Rt(e)} json2data() FAILED`), Ar(r));
|
|
746
746
|
}
|
|
747
747
|
function et(e, n, r, l, o) {
|
|
748
748
|
if (o & L.gobj_flag_yuno) {
|
|
749
|
-
if (h) return
|
|
749
|
+
if (h) return cr("__yuno__ already created"), null;
|
|
750
750
|
o |= L.gobj_flag_service;
|
|
751
751
|
} else {
|
|
752
|
-
if (!l) return
|
|
753
|
-
if (!("string" == typeof l || l instanceof I)) return
|
|
754
|
-
if (
|
|
752
|
+
if (!l) return cr("gobj NEEDS a parent!"), null;
|
|
753
|
+
if (!("string" == typeof l || l instanceof I)) return cr(`BAD TYPE of parent: ${l}`), null;
|
|
754
|
+
if (Xr(l)) {
|
|
755
755
|
const e = l;
|
|
756
|
-
if (!(l = Ke(e))) return
|
|
756
|
+
if (!(l = Ke(e))) return fr(`parent service not found: ${e}`), null;
|
|
757
757
|
}
|
|
758
758
|
}
|
|
759
|
-
if (o & L.gobj_flag_service && Ke(e, !1)) return
|
|
759
|
+
if (o & L.gobj_flag_service && Ke(e, !1)) return cr(`service ALREADY registered: ${n}^${e}`), null;
|
|
760
760
|
if (o & L.gobj_flag_default_service) {
|
|
761
|
-
if (E) return
|
|
761
|
+
if (E) return cr(`default service ALREADY registered: ${n}^${e}`), null;
|
|
762
762
|
o |= L.gobj_flag_service;
|
|
763
763
|
}
|
|
764
|
-
if (
|
|
764
|
+
if (il(n)) return cr("gclass_name must be a string"), null;
|
|
765
765
|
let i = Me(n, !1);
|
|
766
|
-
if (!i) return
|
|
767
|
-
if (!
|
|
768
|
-
if (!
|
|
769
|
-
if (e.includes("`")) return
|
|
770
|
-
if (e.includes("^")) return
|
|
766
|
+
if (!i) return cr(`GClass not registered: ${n}^${e}`), null;
|
|
767
|
+
if (!Xr(e)) return cr(`gobj_name must be a string: ${n}`), null;
|
|
768
|
+
if (!il(e)) {
|
|
769
|
+
if (e.includes("`")) return cr(`gobj_name cannot contain char ': ${n}^${e}`), null;
|
|
770
|
+
if (e.includes("^")) return cr(`gobj_name cannot contain char ^: ${n}^${e}`), null;
|
|
771
771
|
}
|
|
772
772
|
let s = new I(e, i, r, l, o);
|
|
773
773
|
s.jn_attrs = Ne(s, i.attrs_table);
|
|
@@ -794,8 +794,8 @@ function it(e, t, n, r) {
|
|
|
794
794
|
return et(e, t, n, r, 0);
|
|
795
795
|
}
|
|
796
796
|
function st(e) {
|
|
797
|
-
if (Ct(e)) return void
|
|
798
|
-
e.__refs__ > 0 &&
|
|
797
|
+
if (Ct(e)) return void cr("gobj NULL or DESTROYED");
|
|
798
|
+
e.__refs__ > 0 && cr(`${Rt(e)}: gobj DESTROYING with references: ${e.__refs__}`), e.playing && (cr(`Destroying a PLAYING gobj: ${Dt(e)}`), ht(e)), e.running && (cr(`Destroying a RUNNING gobj: ${Dt(e)}`), gt(e)), e.obflag |= P.obflag_destroying, function(e) {
|
|
799
799
|
if (0 === pn.length) return;
|
|
800
800
|
for (let t of pn) t.src === e && (t.src = null);
|
|
801
801
|
pn = pn.filter((t) => t.dst !== e);
|
|
@@ -805,7 +805,7 @@ function st(e) {
|
|
|
805
805
|
let r = At(e);
|
|
806
806
|
r && r.gclass.gmt.mt_child_removed && (n && Y(t("👦👦🔴 child_removed(%s): %s", Dt(r), Rt(e))), r.gclass.gmt.mt_child_removed(r, e)), e.gobj_flag & L.gobj_flag_service && function(e) {
|
|
807
807
|
let t = jt(e);
|
|
808
|
-
t = t.toLowerCase(), m[t] ? delete m[t] :
|
|
808
|
+
t = t.toLowerCase(), m[t] ? delete m[t] : cr(`"service NOT found in register": ${t}`);
|
|
809
809
|
}(e), e === E && (E = null), kn(e, e.dl_subscriptions, !0), kn(e, e.dl_subscribings, !0), r && (Je(r, e), kt(e) && (Lt(r) !== e || Ct(r) || Pt(r, null))), function(e) {
|
|
810
810
|
let t = e.dl_children.slice();
|
|
811
811
|
for (let e = 0; e < t.length; e++) {
|
|
@@ -815,9 +815,9 @@ function st(e) {
|
|
|
815
815
|
}(e), e.obflag & P.obflag_created && e.gclass.gmt.mt_destroy && e.gclass.gmt.mt_destroy(e), n && Y(t("💔💔⏪ destroyed: %s", Dt(e))), e.obflag |= P.obflag_destroyed, e.obflag & P.obflag_created && e.gclass.instances--;
|
|
816
816
|
}
|
|
817
817
|
function at(e) {
|
|
818
|
-
if (Ct(e)) return
|
|
819
|
-
if (e.running) return
|
|
820
|
-
if (e.disabled) return
|
|
818
|
+
if (Ct(e)) return cr("gobj NULL or DESTROYED"), -1;
|
|
819
|
+
if (e.running) return cr(`${Rt(e)}: GObj ALREADY RUNNING`), -1;
|
|
820
|
+
if (e.disabled) return cr(`${Rt(e)}: GObj DISABLED`), -1;
|
|
821
821
|
re(e) && Y(t("⏺ ⏺ start: %s", Dt(e))), e.running = !0;
|
|
822
822
|
let n = 0;
|
|
823
823
|
return e.gclass.gmt.mt_start && (n = e.gclass.gmt.mt_start(e)), n;
|
|
@@ -826,18 +826,18 @@ function ut(e, t, n) {
|
|
|
826
826
|
return e.gclass.gclass_flag & C.gcflag_manual_start || Ct(e) || Et(e) || yt(e) || at(e), 0;
|
|
827
827
|
}
|
|
828
828
|
function _t(e) {
|
|
829
|
-
return Ct(e) ? (
|
|
829
|
+
return Ct(e) ? (cr("gobj NULL or DESTROYED"), -1) : Ft(e, F.WALK_FIRST2LAST, ut, 0, 0);
|
|
830
830
|
}
|
|
831
831
|
function ct(e, t, n) {
|
|
832
832
|
return e.gclass.gclass_flag & C.gcflag_manual_start || yt(e) ? 1 : (Et(e) || at(e), 0);
|
|
833
833
|
}
|
|
834
834
|
function ft(e) {
|
|
835
|
-
return Ct(e) ? (
|
|
835
|
+
return Ct(e) ? (cr("gobj NULL or DESTROYED"), -1) : (re(e) && Y(t("⏺ ⏺ ⏺ ⏺ start_tree: %s", Dt(e))), e.gclass.gclass_flag & C.gcflag_manual_start || e.disabled ? 0 : (e.running || at(e), Vt(e, F.WALK_TOP2BOTTOM, ct, 0, 0)));
|
|
836
836
|
}
|
|
837
837
|
function gt(e) {
|
|
838
|
-
if (Ct(e)) return
|
|
839
|
-
if (!e.running) return
|
|
840
|
-
e.playing && (
|
|
838
|
+
if (Ct(e)) return cr("gobj NULL or DESTROYED"), -1;
|
|
839
|
+
if (!e.running) return cr(`${Rt(e)}: GObj NOT RUNNING`), -1;
|
|
840
|
+
e.playing && (fr(`${Rt(e)}: GObj stopping without previous pause`), ht(e)), re(e) && Y(t("⏹ ⏹ stop: %s", Dt(e))), e.running = !1;
|
|
841
841
|
let n = 0;
|
|
842
842
|
return e.gclass.gmt.mt_stop && (n = e.gclass.gmt.mt_stop(e)), n;
|
|
843
843
|
}
|
|
@@ -845,25 +845,25 @@ function dt(e, t, n) {
|
|
|
845
845
|
return Et(e) && gt(e), 0;
|
|
846
846
|
}
|
|
847
847
|
function bt(e) {
|
|
848
|
-
return Ct(e) ? (
|
|
848
|
+
return Ct(e) ? (cr("gobj NULL or DESTROYED"), -1) : Ft(e, F.WALK_FIRST2LAST, dt, 0, 0);
|
|
849
849
|
}
|
|
850
850
|
function pt(e) {
|
|
851
|
-
return Ct(e) ? (
|
|
851
|
+
return Ct(e) ? (cr("gobj NULL or DESTROYED"), -1) : (re(e) && Y(t("⏹ ⏹ ⏹ ⏹ stop_tree: %s", Dt(e))), Et(e) && gt(e), Vt(e, F.WALK_TOP2BOTTOM, dt, 0, 0));
|
|
852
852
|
}
|
|
853
853
|
function mt(e) {
|
|
854
|
-
if (Ct(e)) return
|
|
855
|
-
if (e.playing) return
|
|
856
|
-
if (e.disabled) return
|
|
854
|
+
if (Ct(e)) return cr(`gobj NULL or DESTROYED: ${Rt(e)}`), -1;
|
|
855
|
+
if (e.playing) return cr(`${Rt(e)}: GObj ALREADY PLAYING`), -1;
|
|
856
|
+
if (e.disabled) return cr(`${Rt(e)}: GObj DISABLED`), -1;
|
|
857
857
|
if (!Et(e)) {
|
|
858
|
-
if (e.gclass.gclass_flag & C.gcflag_required_start_to_play) return
|
|
859
|
-
|
|
858
|
+
if (e.gclass.gclass_flag & C.gcflag_required_start_to_play) return cr(`${Rt(e)}: Cannot play, start not done`), -1;
|
|
859
|
+
fr(`${Rt(e)}: GObj playing without previous start`), at(e);
|
|
860
860
|
}
|
|
861
861
|
re(e) && Y(t("⏯ ⏯ play: %s", Dt(e))), e.playing = !0;
|
|
862
862
|
let n = 0;
|
|
863
863
|
return e.gclass.gmt.mt_play && (n = e.gclass.gmt.mt_play(e), (n < 0 || !1 === n) && (e.playing = !1)), n;
|
|
864
864
|
}
|
|
865
865
|
function ht(e) {
|
|
866
|
-
return Ct(e) ? (
|
|
866
|
+
return Ct(e) ? (cr("gobj NULL or DESTROYED"), -1) : e.playing ? (re(e) && Y(t("⏸ ⏸ pause: %s", Dt(e))), e.playing = !1, e.gclass.gmt.mt_pause ? e.gclass.gmt.mt_pause(e) : 0) : (cr(`${Rt(e)}: GObj NOT PLAYING`), -1);
|
|
867
867
|
}
|
|
868
868
|
function Et(e) {
|
|
869
869
|
return !Ct(e) && e.running;
|
|
@@ -893,50 +893,50 @@ function wt() {
|
|
|
893
893
|
return e ? tn(e, "yuno_id") : "";
|
|
894
894
|
}
|
|
895
895
|
function jt(e) {
|
|
896
|
-
return
|
|
896
|
+
return ol(e) ? e.gobj_name : (cr("gobj bad type"), null);
|
|
897
897
|
}
|
|
898
898
|
function $t(e) {
|
|
899
|
-
return
|
|
899
|
+
return ol(e) ? e.gclass.gclass_name : (cr("gobj NULL of bad type"), null);
|
|
900
900
|
}
|
|
901
901
|
function Rt(e) {
|
|
902
|
-
return
|
|
902
|
+
return ol(e) ? e.gclass.gclass_name + "^" + jt(e) : (cr("gobj bad type"), null);
|
|
903
903
|
}
|
|
904
904
|
function Dt(e) {
|
|
905
|
-
if (!
|
|
905
|
+
if (!ol(e)) return cr("gobj NULL of bad type"), null;
|
|
906
906
|
let t = Rt(e), n = At(e);
|
|
907
907
|
for (; n;) t = Rt(n) + "`" + t, n = At(n);
|
|
908
908
|
return t;
|
|
909
909
|
}
|
|
910
910
|
function At(e) {
|
|
911
|
-
return
|
|
911
|
+
return ol(e) ? e.parent : (cr("gobj NULL of bad type"), null);
|
|
912
912
|
}
|
|
913
913
|
function kt(e) {
|
|
914
|
-
return
|
|
914
|
+
return ol(e) ? !!(e.gobj_flag & L.gobj_flag_volatil) : (cr("gobj NULL of bad type"), null);
|
|
915
915
|
}
|
|
916
916
|
function It(e) {
|
|
917
|
-
return
|
|
917
|
+
return ol(e) ? !!(e.gobj_flag & L.gobj_flag_pure_child) : (cr("gobj NULL of bad type"), null);
|
|
918
918
|
}
|
|
919
919
|
function Ct(e) {
|
|
920
|
-
return !
|
|
920
|
+
return !ol(e) || !!(e.obflag & (P.obflag_destroyed | P.obflag_destroying));
|
|
921
921
|
}
|
|
922
922
|
function Lt(e) {
|
|
923
|
-
return
|
|
923
|
+
return ol(e) ? e.bottom_gobj : (cr("gobj NULL of bad type"), null);
|
|
924
924
|
}
|
|
925
925
|
function Pt(e, t) {
|
|
926
|
-
if (!
|
|
927
|
-
e.bottom_gobj && t &&
|
|
926
|
+
if (!ol(e)) return cr("gobj NULL of bad type"), null;
|
|
927
|
+
e.bottom_gobj && t && fr(`${Rt(e)}: bottom_gobj already set`), e.bottom_gobj = t;
|
|
928
928
|
}
|
|
929
929
|
function Ut(e, t, n) {
|
|
930
|
-
return
|
|
930
|
+
return ol(e) ? t ? De(e.gclass, t, n) : e.gclass.attrs_table : (cr("gobj NULL of bad type"), null);
|
|
931
931
|
}
|
|
932
932
|
function Ft(e, t, n, r, l) {
|
|
933
|
-
return Ct(e) ? (
|
|
933
|
+
return Ct(e) ? (cr("gobj NULL, destroying, or bad type"), 0) : Mt(e.dl_children, t, n, r, l);
|
|
934
934
|
}
|
|
935
935
|
function Vt(e, t, n, r, l) {
|
|
936
|
-
return Ct(e) ? (
|
|
936
|
+
return Ct(e) ? (cr("gobj NULL, destroying, or bad type"), 0) : xt(e.dl_children, t, n, r, l);
|
|
937
937
|
}
|
|
938
938
|
function Gt(e) {
|
|
939
|
-
return "number" == typeof e && isFinite(e) ? e : (null == e ||
|
|
939
|
+
return "number" == typeof e && isFinite(e) ? e : (null == e || cr(`walk callback must return a NUMBER (-1 stop, 0 descend, >0 skip children), got ${typeof e}: taken as 0`), 0);
|
|
940
940
|
}
|
|
941
941
|
function Mt(e, t, n, r, l) {
|
|
942
942
|
let o, i = [...e];
|
|
@@ -974,12 +974,12 @@ function xt(e, t, n, r, l) {
|
|
|
974
974
|
return 0;
|
|
975
975
|
}
|
|
976
976
|
function Kt(e, t) {
|
|
977
|
-
if (
|
|
977
|
+
if (il(t)) return null;
|
|
978
978
|
const n = t.toLowerCase();
|
|
979
979
|
return "__default_service__" === n ? E : "__yuno__" === n || "__root__" === n ? h : Ht(h, t);
|
|
980
980
|
}
|
|
981
981
|
function Yt(e, t) {
|
|
982
|
-
if (!
|
|
982
|
+
if (!ol(e)) return cr("gobj NULL of bad type"), !1;
|
|
983
983
|
let n = t.__gclass_name__, r = t.__gobj_name__, l = t.__prefix_gobj_name__;
|
|
984
984
|
t.__disabled__;
|
|
985
985
|
let o = t.__state__;
|
|
@@ -995,7 +995,7 @@ function Yt(e, t) {
|
|
|
995
995
|
return !0;
|
|
996
996
|
}
|
|
997
997
|
function Bt(e, t) {
|
|
998
|
-
if (Ct(e)) return
|
|
998
|
+
if (Ct(e)) return cr("gobj NULL or DESTROYED"), null;
|
|
999
999
|
const n = e.dl_children;
|
|
1000
1000
|
for (let e = 0; e < n.length; e++) {
|
|
1001
1001
|
const r = n[e];
|
|
@@ -1004,7 +1004,7 @@ function Bt(e, t) {
|
|
|
1004
1004
|
return null;
|
|
1005
1005
|
}
|
|
1006
1006
|
function Jt(e, t) {
|
|
1007
|
-
if (Ct(e)) return
|
|
1007
|
+
if (Ct(e)) return cr("gobj NULL or DESTROYED"), null;
|
|
1008
1008
|
t = t || {};
|
|
1009
1009
|
let n = [];
|
|
1010
1010
|
const r = e.dl_children;
|
|
@@ -1045,7 +1045,7 @@ function Ht(e, t) {
|
|
|
1045
1045
|
return o ? (n.splice(0, 1), n = n.join("`"), Ht(o, n)) : null;
|
|
1046
1046
|
}
|
|
1047
1047
|
function zt(e, t) {
|
|
1048
|
-
return !
|
|
1048
|
+
return !il(t) && !!De(e.gclass, t, !1);
|
|
1049
1049
|
}
|
|
1050
1050
|
function Qt(e, t, n) {
|
|
1051
1051
|
let r = e.jn_attrs;
|
|
@@ -1053,7 +1053,7 @@ function Qt(e, t, n) {
|
|
|
1053
1053
|
let n = r[t];
|
|
1054
1054
|
return e.gclass.gmt.mt_reading ? e.gclass.gmt.mt_reading(e, t, n) : n;
|
|
1055
1055
|
}
|
|
1056
|
-
return
|
|
1056
|
+
return cr(`${Rt(e)}: GClass Attribute NOT FOUND, attr ${t}`), null;
|
|
1057
1057
|
}
|
|
1058
1058
|
function Xt(e, t, n) {
|
|
1059
1059
|
let r = {}, l = e.gclass.attrs_table;
|
|
@@ -1061,41 +1061,41 @@ function Xt(e, t, n) {
|
|
|
1061
1061
|
const o = l[n];
|
|
1062
1062
|
if (o.name && (-1 === t || o.flag & t)) {
|
|
1063
1063
|
let t;
|
|
1064
|
-
!e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ? t =
|
|
1064
|
+
!e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ? t = Fr(e.jn_attrs, o.name) : (t = e.gclass.gmt.mt_reading(e, o.name), void 0 === t && (t = Fr(e.jn_attrs, o.name))), Gr(r, o.name, t);
|
|
1065
1065
|
}
|
|
1066
1066
|
}
|
|
1067
1067
|
return r;
|
|
1068
1068
|
}
|
|
1069
1069
|
function Zt(e, t) {
|
|
1070
1070
|
if (t) {
|
|
1071
|
-
if (0 ===
|
|
1072
|
-
if (0 ===
|
|
1073
|
-
if (0 ===
|
|
1074
|
-
if (0 ===
|
|
1071
|
+
if (0 === _l(t, "__disabled__")) return yt(e);
|
|
1072
|
+
if (0 === _l(t, "__running__")) return Et(e);
|
|
1073
|
+
if (0 === _l(t, "__playing__")) return vt(e);
|
|
1074
|
+
if (0 === _l(t, "__service__")) return Tt(e);
|
|
1075
1075
|
}
|
|
1076
1076
|
let n = Re(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 ? Fr(n, t) : e.gclass.gmt.mt_reading(e, t) : (cr(`${Rt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1078
1078
|
}
|
|
1079
1079
|
function en(e, t) {
|
|
1080
|
-
t &&
|
|
1080
|
+
t && _l(t, "__trace_level__");
|
|
1081
1081
|
let n = Re(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 ? Fr(n, t) : e.gclass.gmt.mt_reading(e, t) : (cr(`${Rt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1083
1083
|
}
|
|
1084
1084
|
function tn(e, t) {
|
|
1085
|
-
if (t && 0 ===
|
|
1085
|
+
if (t && 0 === _l(t, "__state__")) return cn(e);
|
|
1086
1086
|
let n = Re(e, t, !1);
|
|
1087
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ?
|
|
1087
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ? Fr(n, t) : e.gclass.gmt.mt_reading(e, t) : (cr(`${Rt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1088
1088
|
}
|
|
1089
1089
|
function nn(e, t) {
|
|
1090
1090
|
let n = Re(e, t, !1);
|
|
1091
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ?
|
|
1091
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & P.obflag_destroyed ? Fr(n, t) : e.gclass.gmt.mt_reading(e, t) : (cr(`${Rt(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1092
1092
|
}
|
|
1093
1093
|
function rn(e, n, r, l) {
|
|
1094
|
-
if (!
|
|
1094
|
+
if (!Xr(n)) return cr(t("gobj_write_attr(%s): path must be a string", Rt(e))), -1;
|
|
1095
1095
|
let o, i = e.jn_attrs, s = n.split("`");
|
|
1096
1096
|
if (s.length <= 1) {
|
|
1097
1097
|
let l = n;
|
|
1098
|
-
return l in i && Object.prototype.hasOwnProperty.call(i, l) ? (i[l] = r,
|
|
1098
|
+
return l in i && Object.prototype.hasOwnProperty.call(i, l) ? (i[l] = r, zr(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, 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) : (cr(t("gobj_write_attr(%s): attr not found '%s'", Rt(e), l)), -1);
|
|
1099
1099
|
}
|
|
1100
1100
|
let a = s.length;
|
|
1101
1101
|
for (let t = 0; t < a; t++) {
|
|
@@ -1106,18 +1106,18 @@ function rn(e, n, r, l) {
|
|
|
1106
1106
|
continue;
|
|
1107
1107
|
}
|
|
1108
1108
|
let l = e.jn_attrs;
|
|
1109
|
-
if (o in l && Object.prototype.hasOwnProperty.call(l, o)) return l[o] = r,
|
|
1109
|
+
if (o in l && Object.prototype.hasOwnProperty.call(l, o)) return l[o] = r, zr(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, o) && (e.priv[o] = r), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, o), 0;
|
|
1110
1110
|
break;
|
|
1111
1111
|
}
|
|
1112
|
-
return
|
|
1112
|
+
return cr(t("gobj_write_attr(%s): attr not found '%s'", Rt(e), o)), -1;
|
|
1113
1113
|
}
|
|
1114
1114
|
function ln(e) {
|
|
1115
1115
|
return function(e, t, n) {
|
|
1116
|
-
if (Ct(e)) return
|
|
1116
|
+
if (Ct(e)) return cr("gobj NULL or DESTROYED"), -1;
|
|
1117
1117
|
let r = e.gclass.attrs_table;
|
|
1118
1118
|
for (let l = 0; l < r.length; l++) {
|
|
1119
1119
|
const o = r[l];
|
|
1120
|
-
o.name && (n && o.flag & n || (-1 === t || o.flag & t) && (we(e, e.jn_attrs, o),
|
|
1120
|
+
o.name && (n && o.flag & n || (-1 === t || o.flag & t) && (we(e, e.jn_attrs, o), zr(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, o.name) && (e.priv[o.name] = e.jn_attrs[o.name]), e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, o.name)));
|
|
1121
1121
|
}
|
|
1122
1122
|
return 0;
|
|
1123
1123
|
}(e, v.SDF_VOLATIL, 0);
|
|
@@ -1132,21 +1132,21 @@ function on(e, t, n, r) {
|
|
|
1132
1132
|
}
|
|
1133
1133
|
function sn(e, t, n) {
|
|
1134
1134
|
let r = Re(e, t, !1);
|
|
1135
|
-
return r ? (r[t] =
|
|
1135
|
+
return r ? (r[t] = sl(n), zr(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (cr(`${Rt(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1136
1136
|
}
|
|
1137
1137
|
function an(e, t, n) {
|
|
1138
1138
|
let r = Re(e, t, !1);
|
|
1139
|
-
return r ? (r[t] = parseInt(n),
|
|
1139
|
+
return r ? (r[t] = parseInt(n), zr(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (cr(`${Rt(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1140
1140
|
}
|
|
1141
1141
|
function un(e, t, n) {
|
|
1142
1142
|
let r = Re(e, t, !1);
|
|
1143
|
-
return r ? (r[t] = String(n),
|
|
1143
|
+
return r ? (r[t] = String(n), zr(e.priv) && Object.prototype.hasOwnProperty.call(e.priv, t) && (e.priv[t] = r[t]), e.obflag & P.obflag_created && !(e.obflag & P.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (cr(`${Rt(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
1144
1144
|
}
|
|
1145
1145
|
function _n(e, n) {
|
|
1146
|
-
if (Ct(e)) return
|
|
1146
|
+
if (Ct(e)) return cr("gobj NULL or DESTROYED"), null;
|
|
1147
1147
|
if (e.current_state.state_name === n) return !1;
|
|
1148
1148
|
let r = Ie(e.gclass, n);
|
|
1149
|
-
if (!r) return
|
|
1149
|
+
if (!r) return cr(`${Rt(e)}: state unknown, state ${n}`), !1;
|
|
1150
1150
|
e.last_state = e.current_state, e.current_state = r;
|
|
1151
1151
|
let l = oe(e, "EV_STATE_CHANGED"), o = !!function(e) {
|
|
1152
1152
|
return Z(e) & B.TRACE_STATES;
|
|
@@ -1154,13 +1154,13 @@ function _n(e, n) {
|
|
|
1154
1154
|
return (l || o) && (1 === W || Y(t("🔀🔀 mach(%s%s^%s), new st(%s), prev st(%s)", e.running ? "" : "!!", $t(e), jt(e), cn(e), e.last_state.state_name))), !0;
|
|
1155
1155
|
}
|
|
1156
1156
|
function cn(e) {
|
|
1157
|
-
return
|
|
1157
|
+
return ol(e) ? e.current_state.state_name : (cr("hgobj NULL"), "");
|
|
1158
1158
|
}
|
|
1159
1159
|
function fn(e, n) {
|
|
1160
|
-
return Ct(e) ? (
|
|
1160
|
+
return Ct(e) ? (cr("gobj NULL or DESTROYED"), null) : n instanceof I ? (e.parent && e.parent.gclass.gmt.mt_child_removed && e.parent.gclass.gmt.mt_child_removed(e.parent, e), e.parent && (Je(e.parent, e), e.parent = null), Be(n, e), n.gclass.gmt.mt_child_added && (te(e) && dr(t("👦👦🔵 child_added(%s): %s", Dt(n), Rt(e))), n.gclass.gmt.mt_child_added(n, e)), 0) : (cr(`${Rt(e)}: gobj_change_parent() BAD TYPE of parent`), -1);
|
|
1161
1161
|
}
|
|
1162
1162
|
function gn(e, t, n) {
|
|
1163
|
-
if (!
|
|
1163
|
+
if (!ol(e)) return cr("gobj NULL of bad type"), null;
|
|
1164
1164
|
let r = Ve(e.gclass, t);
|
|
1165
1165
|
if (r) return r;
|
|
1166
1166
|
if (n) {
|
|
@@ -1182,12 +1182,12 @@ function bn(e, t, n) {
|
|
|
1182
1182
|
}
|
|
1183
1183
|
var pn = [], mn = !1;
|
|
1184
1184
|
function hn(e, n, r, l) {
|
|
1185
|
-
return e && e instanceof I ? e.obflag & (P.obflag_destroyed | P.obflag_destroying) ? (
|
|
1185
|
+
return e && e instanceof I ? e.obflag & (P.obflag_destroyed | P.obflag_destroying) ? (cr(`gobj_post_event(): gobj dst DESTROYING, event ${n}`), -1) : il(n) ? (cr("gobj_post_event(): event EMPTY"), -1) : dn(e, n, 0) ? pn.length >= 1e4 ? (cr(`gobj_post_event(): too many posted events, this is NOT a work queue, event ${n}, pending ${pn.length}`), -1) : (pn.push({
|
|
1186
1186
|
dst: e,
|
|
1187
1187
|
event: n,
|
|
1188
1188
|
kw: r,
|
|
1189
1189
|
src: l
|
|
1190
|
-
}), oe(e, n) && !ie(l, n) && Y(t("📬 posted(%s%s), ev: %s, pending: %d", e.running ? "" : "!!", Rt(e), n, pn.length)), mn || (mn = !0, setTimeout(yn, 0)), 0) : (
|
|
1190
|
+
}), oe(e, n) && !ie(l, n) && Y(t("📬 posted(%s%s), ev: %s, pending: %d", e.running ? "" : "!!", Rt(e), n, pn.length)), mn || (mn = !0, setTimeout(yn, 0)), 0) : (cr(`gobj_post_event(): event NOT DEFINED in gclass ${$t(e)}, event ${n}`), -1) : (cr(`gobj_post_event(): gobj dst NULL, event ${n}`), -1);
|
|
1191
1191
|
}
|
|
1192
1192
|
function En() {
|
|
1193
1193
|
return pn.length;
|
|
@@ -1211,21 +1211,21 @@ function yn() {
|
|
|
1211
1211
|
return pn.length > 0 && !mn && (mn = !0, setTimeout(yn, 0)), t;
|
|
1212
1212
|
}
|
|
1213
1213
|
function Tn(e, n, r, l) {
|
|
1214
|
-
if (!(e && e instanceof I)) return
|
|
1215
|
-
if (e.obflag & (P.obflag_destroyed | P.obflag_destroying)) return
|
|
1214
|
+
if (!(e && e instanceof I)) return cr("gobj dst NULL"), -1;
|
|
1215
|
+
if (e.obflag & (P.obflag_destroyed | P.obflag_destroying)) return cr("gobj dst DESTROYED"), -1;
|
|
1216
1216
|
let o = e.current_state;
|
|
1217
|
-
if (!o) return
|
|
1217
|
+
if (!o) return cr(`${Rt(e)}: current_state NULL`), -1;
|
|
1218
1218
|
let i = oe(e, n) && !ie(l, n);
|
|
1219
1219
|
y++;
|
|
1220
1220
|
let s = Ce(o, n);
|
|
1221
|
-
if (!s) return e.gclass.gmt.mt_inject_event ? (y--, i && (Y(1 === W ? t("🔜 %s %s%s %s", n || "", e.running ? "" : "!!", Rt(e), o.state_name) : t("🔃 mach(%s%s), st: %s, ev: %s, from(%s%s)", e.running ? "" : "!!", Rt(e), o.state_name, n || "", l && !l.running ? "!!" : "", Rt(l))), r && le(e) &&
|
|
1221
|
+
if (!s) return e.gclass.gmt.mt_inject_event ? (y--, i && (Y(1 === W ? t("🔜 %s %s%s %s", n || "", e.running ? "" : "!!", Rt(e), o.state_name) : t("🔃 mach(%s%s), st: %s, ev: %s, from(%s%s)", e.running ? "" : "!!", Rt(e), o.state_name, n || "", l && !l.running ? "!!" : "", Rt(l))), r && le(e) && Br(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 ? "" : "!!", $t(e), jt(e), o.state_name, n || "", l && !l.running ? "!!" : "", $t(l), jt(l))), cr(`📛📛 Event NOT DEFINED in state 📛📛: ${Rt(e)}, ${o.state_name}, ${n}`), y--, -1);
|
|
1222
1222
|
if (i) {
|
|
1223
1223
|
if (1 === W) Y(t("🔄 %s %s%s %s from %s%s", n || "", e.running ? "" : "!!", Rt(e), o.state_name, l && !l.running ? "!!" : "", Rt(l)));
|
|
1224
1224
|
else {
|
|
1225
1225
|
let r = "";
|
|
1226
|
-
s.action && (r =
|
|
1226
|
+
s.action && (r = Go(s.action)), Y(t("🔄 mach(%s%s^%s), st: %s, ev: %s%s%s, ac: %s, from(%s%s^%s)", e.running ? "" : "!!", $t(e), jt(e), o.state_name, "", n || "", "", r, l && !l.running ? "!!" : "", $t(l), jt(l)));
|
|
1227
1227
|
}
|
|
1228
|
-
r && le(e) &&
|
|
1228
|
+
r && le(e) && Br(r) && Ar(r);
|
|
1229
1229
|
}
|
|
1230
1230
|
s.next_state && _n(e, s.next_state);
|
|
1231
1231
|
let a = -1;
|
|
@@ -1233,14 +1233,14 @@ function Tn(e, n, r, l) {
|
|
|
1233
1233
|
s.action && (a = s.action(e, n, r, l));
|
|
1234
1234
|
} catch (t) {
|
|
1235
1235
|
if (y--, !t || !t.__gobj_logged__) {
|
|
1236
|
-
|
|
1236
|
+
cr(`${Rt(e)}: action of ${n} in ${o.state_name} THREW: ${t && t.stack ? t.stack : t}`);
|
|
1237
1237
|
try {
|
|
1238
1238
|
t.__gobj_logged__ = !0;
|
|
1239
1239
|
} catch (e) {}
|
|
1240
1240
|
}
|
|
1241
1241
|
throw t;
|
|
1242
1242
|
}
|
|
1243
|
-
return !i || 1 === W || e.obflag & P.obflag_destroyed || Y(t("<- mach(%s%s^%s), st: %s, ev: %s, ret: %d", e.running ? "" : "!!", $t(e), jt(e), e.current_state.state_name, n || "",
|
|
1243
|
+
return !i || 1 === W || e.obflag & P.obflag_destroyed || Y(t("<- mach(%s%s^%s), st: %s, ev: %s, ret: %d", e.running ? "" : "!!", $t(e), jt(e), e.current_state.state_name, n || "", Zr(a) ? a : 0)), y--, a;
|
|
1244
1244
|
}
|
|
1245
1245
|
var vn = Object.freeze({
|
|
1246
1246
|
__rename_event_name__: 1,
|
|
@@ -1273,35 +1273,35 @@ var Sn = [
|
|
|
1273
1273
|
];
|
|
1274
1274
|
function Nn(e, t) {
|
|
1275
1275
|
let n = e ? e.__config__ : null;
|
|
1276
|
-
if (!
|
|
1276
|
+
if (!zr(n) || !pl(n, "__hard_subscription__") && !pl(n, "__own_event__") && !pl(n, "__rename_event_name__")) return {
|
|
1277
1277
|
kw: e,
|
|
1278
1278
|
renamed_event: ""
|
|
1279
1279
|
};
|
|
1280
|
-
let r =
|
|
1280
|
+
let r = Lr({}, e), l = Lr({}, n);
|
|
1281
1281
|
r.__config__ = l;
|
|
1282
|
-
let o = "", i = l.__rename_event_name__, s = "string" != typeof i ||
|
|
1283
|
-
return s && (o = s.event_name, delete l.__rename_event_name__, t &&
|
|
1282
|
+
let o = "", i = l.__rename_event_name__, s = "string" != typeof i || il(i) ? null : On(i);
|
|
1283
|
+
return s && (o = s.event_name, delete l.__rename_event_name__, t && qr(r.__global__) > 0 && (r.__global__ = Lr(Lr({}, r.__global__), { __original_event_name__: t }))), delete l.__hard_subscription__, delete l.__own_event__, {
|
|
1284
1284
|
kw: r,
|
|
1285
1285
|
renamed_event: o
|
|
1286
1286
|
};
|
|
1287
1287
|
}
|
|
1288
1288
|
function wn(e, t, n, r, l, o) {
|
|
1289
|
-
let i =
|
|
1290
|
-
if (t && t !==
|
|
1291
|
-
let t =
|
|
1292
|
-
|
|
1289
|
+
let i = jl(t, l, "__config__", null), s = jl(t, l, "__global__", null), a = jl(t, l, "__local__", null), u = $l(t, l, "__filter__", null), _ = !0;
|
|
1290
|
+
if (t && t !== wl(null, e, "publisher", null) && (_ = !1), o && o !== wl(null, e, "subscriber", null) && (_ = !1), n && n !== Nl(null, e, "event", "") && (_ = !1), r && r !== Nl(null, e, "renamed_event", "") && (_ = !1), qr(i) > 0) {
|
|
1291
|
+
let t = jl(null, e, "__config__", null);
|
|
1292
|
+
qr(t) > 0 && Cr(t, i) || (_ = !1);
|
|
1293
1293
|
}
|
|
1294
|
-
if (
|
|
1295
|
-
let t =
|
|
1296
|
-
|
|
1294
|
+
if (qr(s) > 0) {
|
|
1295
|
+
let t = jl(null, e, "__global__", null);
|
|
1296
|
+
qr(t) > 0 && Cr(t, s) || (_ = !1);
|
|
1297
1297
|
}
|
|
1298
|
-
if (
|
|
1299
|
-
let t =
|
|
1300
|
-
|
|
1298
|
+
if (qr(a) > 0) {
|
|
1299
|
+
let t = jl(null, e, "__local__", null);
|
|
1300
|
+
qr(t) > 0 && Cr(t, a) || (_ = !1);
|
|
1301
1301
|
}
|
|
1302
|
-
if (
|
|
1303
|
-
let t =
|
|
1304
|
-
|
|
1302
|
+
if (qr(u) > 0) {
|
|
1303
|
+
let t = $l(null, e, "__filter__", null);
|
|
1304
|
+
qr(t) > 0 && Cr(t, u) || (_ = !1);
|
|
1305
1305
|
}
|
|
1306
1306
|
return _;
|
|
1307
1307
|
}
|
|
@@ -1309,7 +1309,7 @@ function jn(e, t, n, r, l, o) {
|
|
|
1309
1309
|
let i = [];
|
|
1310
1310
|
for (let s = 0; s < e.length; s++) {
|
|
1311
1311
|
let a = e[s];
|
|
1312
|
-
wn(a, t, n, r, l, o) &&
|
|
1312
|
+
wn(a, t, n, r, l, o) && Wr(i, a);
|
|
1313
1313
|
}
|
|
1314
1314
|
return i;
|
|
1315
1315
|
}
|
|
@@ -1317,17 +1317,17 @@ function $n(e, t) {
|
|
|
1317
1317
|
return e.indexOf(t);
|
|
1318
1318
|
}
|
|
1319
1319
|
function Rn(e, n, r, l) {
|
|
1320
|
-
let o =
|
|
1321
|
-
if (!!(
|
|
1320
|
+
let o = wl(e, n, "publisher", null, Vn.KW_REQUIRED), i = wl(e, n, "subscriber", null, Vn.KW_REQUIRED), s = Nl(e, n, "event", "", Vn.KW_REQUIRED);
|
|
1321
|
+
if (!!(Ol(e, n, "subs_flag", null, Vn.KW_REQUIRED) & vn.__hard_subscription__) && !r) return -1;
|
|
1322
1322
|
let a = ne(i) || ne(o);
|
|
1323
1323
|
if ($n(o.dl_subscriptions, n) < 0) return a && Y(t("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s', ALREADY REMOVED", s || "", Rt(o), Rt(i))), 1;
|
|
1324
|
-
a && (Y(t("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s'", s || "", Rt(o), Rt(i))),
|
|
1324
|
+
a && (Y(t("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s'", s || "", Rt(o), Rt(i))), pr(n)), o.obflag & P.obflag_destroyed || l || o.gclass.gmt.mt_subscription_deleted && o.gclass.gmt.mt_subscription_deleted(o, n);
|
|
1325
1325
|
let u = $n(o.dl_subscriptions, n);
|
|
1326
|
-
return u >= 0 ?
|
|
1326
|
+
return u >= 0 ? Kr(o.dl_subscriptions, u) : (cr(`${Rt(e)}: subscription in publisher not found`), pr(n)), u = $n(i.dl_subscribings, n), u >= 0 ? Kr(i.dl_subscribings, u) : (cr(`${Rt(e)}: subscription in subscriber not found`), pr(n)), 0;
|
|
1327
1327
|
}
|
|
1328
1328
|
function Dn(e, n, r, l) {
|
|
1329
|
-
if (null == r && (r = {}), !e) return
|
|
1330
|
-
if (!l) return
|
|
1329
|
+
if (null == r && (r = {}), !e) return cr(`publisher NULL: ev ${n}`), 0;
|
|
1330
|
+
if (!l) return cr(`subscriber NULL: ev ${n}`), 0;
|
|
1331
1331
|
const o = /* @__PURE__ */ new Set([
|
|
1332
1332
|
"__config__",
|
|
1333
1333
|
"__global__",
|
|
@@ -1336,57 +1336,57 @@ function Dn(e, n, r, l) {
|
|
|
1336
1336
|
"__service__"
|
|
1337
1337
|
]);
|
|
1338
1338
|
if (Object.keys(r).forEach((t) => {
|
|
1339
|
-
o.has(t) ||
|
|
1340
|
-
}),
|
|
1341
|
-
else if (!(bn(e, n, U.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return
|
|
1339
|
+
o.has(t) || cr(`${Rt(e)}: key ignored in subscription (key: ${t}, event: ${n})`);
|
|
1340
|
+
}), il(n)) n = "";
|
|
1341
|
+
else if (!(bn(e, n, U.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return cr(`event NOT in output event list: ${Rt(e)}, ${n}`), 0;
|
|
1342
1342
|
let i = Nn(r, n), s = jn(e.dl_subscriptions, e, n, i.renamed_event, i.kw, l), a = null;
|
|
1343
|
-
for (let t = 0; t < s.length; t++) if (
|
|
1343
|
+
for (let t = 0; t < s.length; t++) if (Ol(e, s[t], "subs_flag", 0, Vn.KW_REQUIRED) & vn.__hard_subscription__) {
|
|
1344
1344
|
a = s[t];
|
|
1345
1345
|
break;
|
|
1346
1346
|
}
|
|
1347
|
-
if (a) return
|
|
1348
|
-
|
|
1347
|
+
if (a) return fr(`${Rt(e)}: Hard subscription REPEATED, the one there is kept and returned (event: ${n}, subscriber: ${Rt(l)})`), a;
|
|
1348
|
+
Jr(s) > 0 && (cr(`${Rt(e)}: ${Jr(s)} subscription(s) REPEATED, will be deleted and override`), pr(s, "subscription REPEATED"), kn(e, s, !1));
|
|
1349
1349
|
let u = function(e, t, n, r) {
|
|
1350
1350
|
let l = Ne(e, Sn);
|
|
1351
|
-
|
|
1351
|
+
Mr(l, "event", t), Mr(l, "subscriber", r), Mr(l, "publisher", e);
|
|
1352
1352
|
let o = 0;
|
|
1353
1353
|
if (n) {
|
|
1354
|
-
let r =
|
|
1355
|
-
if (
|
|
1356
|
-
let n =
|
|
1357
|
-
|
|
1358
|
-
let i =
|
|
1359
|
-
if (!
|
|
1354
|
+
let r = jl(e, n, "__config__", null), i = jl(e, n, "__global__", null), s = jl(e, n, "__local__", null), a = $l(e, n, "__filter__", null), u = Nl(e, n, "__service__", "");
|
|
1355
|
+
if (qr(i) > 0 && Mr(l, "__global__", kr(i)), qr(r) > 0) {
|
|
1356
|
+
let n = kr(r);
|
|
1357
|
+
Mr(l, "__config__", n);
|
|
1358
|
+
let i = Nl(e, n, "__rename_event_name__", "");
|
|
1359
|
+
if (!il(i)) {
|
|
1360
1360
|
let r = On(i);
|
|
1361
1361
|
if (r) {
|
|
1362
|
-
|
|
1363
|
-
let i =
|
|
1364
|
-
|
|
1365
|
-
} else
|
|
1362
|
+
Mr(l, "renamed_event", r.event_name), delete n.__rename_event_name__, o |= vn.__rename_event_name__;
|
|
1363
|
+
let i = jl(e, l, "__global__", null);
|
|
1364
|
+
zr(i) || (i = {}, Mr(l, "__global__", i)), i.__original_event_name__ = t;
|
|
1365
|
+
} else cr(`${Rt(e)}: EVENT NOT FOUND (__rename_event_name__: ${i})`);
|
|
1366
1366
|
}
|
|
1367
|
-
if (
|
|
1368
|
-
let t =
|
|
1369
|
-
|
|
1367
|
+
if (pl(n, "__hard_subscription__")) {
|
|
1368
|
+
let t = vl(e, n, "__hard_subscription__", !1);
|
|
1369
|
+
Vr(n, "__hard_subscription__"), t && (o |= vn.__hard_subscription__);
|
|
1370
1370
|
}
|
|
1371
|
-
if (
|
|
1372
|
-
let t =
|
|
1373
|
-
|
|
1371
|
+
if (pl(n, "__own_event__")) {
|
|
1372
|
+
let t = vl(e, n, "__own_event__", !1);
|
|
1373
|
+
Vr(n, "__own_event__"), t && (o |= vn.__own_event__);
|
|
1374
1374
|
}
|
|
1375
1375
|
}
|
|
1376
|
-
|
|
1376
|
+
qr(s) > 0 && Mr(l, "__local__", kr(s)), qr(a) > 0 && Mr(l, "__filter__", kr(a)), il(u) || Mr(l, "__service__", u);
|
|
1377
1377
|
}
|
|
1378
|
-
return
|
|
1378
|
+
return Mr(l, "subs_flag", o), l;
|
|
1379
1379
|
}(e, n, r, l);
|
|
1380
|
-
if (!u) return
|
|
1381
|
-
if (
|
|
1380
|
+
if (!u) return cr(`${Rt(e)}: _create_subscription() FAILED`), 0;
|
|
1381
|
+
if (Wr(e.dl_subscriptions, u), Wr(l.dl_subscribings, u), (ne(l) || ne(e)) && (Y(t("💜💜👍 subscribing event '%s', publisher '%s', subscriber %s", n || "", Rt(e), Rt(l))), r && (le(l) || le(e)) && Ar(r)), e.gclass.gmt.mt_subscription_added) {
|
|
1382
1382
|
let t = e.gclass.gmt.mt_subscription_added(e, u);
|
|
1383
1383
|
(t < 0 || !1 === t) && (Rn(e, u, !0, !0), u = 0);
|
|
1384
1384
|
}
|
|
1385
1385
|
return u;
|
|
1386
1386
|
}
|
|
1387
1387
|
function An(e, t, n, r) {
|
|
1388
|
-
if (null == n && (n = {}), !e) return
|
|
1389
|
-
if (!r) return
|
|
1388
|
+
if (null == n && (n = {}), !e) return cr(`publisher NULL: ev ${t}`), 0;
|
|
1389
|
+
if (!r) return cr(`subscriber NULL: ev ${t}`), 0;
|
|
1390
1390
|
const l = /* @__PURE__ */ new Set([
|
|
1391
1391
|
"__config__",
|
|
1392
1392
|
"__global__",
|
|
@@ -1395,20 +1395,20 @@ function An(e, t, n, r) {
|
|
|
1395
1395
|
"__service__"
|
|
1396
1396
|
]);
|
|
1397
1397
|
if (Object.keys(n).forEach((n) => {
|
|
1398
|
-
l.has(n) ||
|
|
1399
|
-
}),
|
|
1400
|
-
else if (!(bn(e, t, U.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return
|
|
1398
|
+
l.has(n) || cr(`${Rt(e)}: key ignored in subscription (key: ${n}, event: ${t})`);
|
|
1399
|
+
}), il(t)) t = "";
|
|
1400
|
+
else if (!(bn(e, t, U.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return cr(`event NOT in output event list: ${Rt(e)}, ev ${t}`), 0;
|
|
1401
1401
|
let o = Nn(n, t), i = jn(e.dl_subscriptions, e, t, o.renamed_event, o.kw, r), s = 0, a = 0, u = 0;
|
|
1402
1402
|
for (let t = 0; t < i.length; t++) {
|
|
1403
1403
|
let n = i[t], r = Rn(e, n, !1, !1);
|
|
1404
1404
|
0 === r ? s++ : r < 0 ? a++ : u++;
|
|
1405
1405
|
}
|
|
1406
|
-
return a ?
|
|
1406
|
+
return a ? fr(`${Rt(e)}: Hard subscription not removed, only gobj_unsubscribe_list() with force removes it (event: ${t}, hard: ${a})`) : s || u || (fr(`${Rt(e)}: No subscription found`), Ar(n, "No subscription found")), 0;
|
|
1407
1407
|
}
|
|
1408
1408
|
function kn(e, t, n) {
|
|
1409
1409
|
let r = [...t], l = 0;
|
|
1410
1410
|
for (let t = 0; t < r.length; t++) Rn(e, r[t], n, !1) > 0 && l++;
|
|
1411
|
-
return l &&
|
|
1411
|
+
return l && fr(`${Rt(e)}: Subscription(s) already removed, nothing to remove (count: ${l})`), 0;
|
|
1412
1412
|
}
|
|
1413
1413
|
function In(e, t, n, r) {
|
|
1414
1414
|
return null == n && (n = {}), jn(e.dl_subscriptions, e, t, null, n, r);
|
|
@@ -1416,31 +1416,31 @@ function In(e, t, n, r) {
|
|
|
1416
1416
|
function Cn(e) {
|
|
1417
1417
|
let t = In(e, null, null, null);
|
|
1418
1418
|
for (let n = 0; n < t.length; n++) {
|
|
1419
|
-
let r = t[n], l =
|
|
1420
|
-
|
|
1419
|
+
let r = t[n], l = wl(e, r, "publisher", null, Vn.KW_REQUIRED), o = wl(e, r, "subscriber", null, Vn.KW_REQUIRED);
|
|
1420
|
+
Mr(r, "s_event", Nl(e, r, "event", "", Vn.KW_REQUIRED)), Mr(r, "s_publisher", Rt(l)), Mr(r, "s_subscriber", Rt(o));
|
|
1421
1421
|
}
|
|
1422
1422
|
let n = Ln(e, 0, null, 0);
|
|
1423
1423
|
for (let t = 0; t < n.length; t++) {
|
|
1424
|
-
let r = n[t], l =
|
|
1425
|
-
|
|
1424
|
+
let r = n[t], l = wl(e, r, "publisher", null, Vn.KW_REQUIRED), o = wl(e, r, "subscriber", null, Vn.KW_REQUIRED);
|
|
1425
|
+
Mr(r, "s_event", Nl(e, r, "event", "", Vn.KW_REQUIRED)), Mr(r, "s_publisher", Rt(l)), Mr(r, "s_subscriber", Rt(o));
|
|
1426
1426
|
}
|
|
1427
1427
|
return {
|
|
1428
1428
|
subscriptions: t,
|
|
1429
1429
|
subscribings: n,
|
|
1430
|
-
"total subscriptions":
|
|
1431
|
-
total_subscribings:
|
|
1430
|
+
"total subscriptions": Jr(t),
|
|
1431
|
+
total_subscribings: Jr(n)
|
|
1432
1432
|
};
|
|
1433
1433
|
}
|
|
1434
1434
|
function Ln(e, t, n, r) {
|
|
1435
1435
|
return jn(e.dl_subscribings, r, t, null, n, e);
|
|
1436
1436
|
}
|
|
1437
1437
|
function Pn(e, n, r) {
|
|
1438
|
-
if (
|
|
1439
|
-
if (
|
|
1438
|
+
if (zr(r) || (r = {}), !e || e.obflag & (P.obflag_destroyed | P.obflag_destroying)) return cr("gobj NULL or DESTROYED"), -1;
|
|
1439
|
+
if (il(n)) return cr(`${Rt(e)}: event EMPTY`), -1;
|
|
1440
1440
|
let l = gn(e, n, !0);
|
|
1441
|
-
if (!(l && l.event_flag & (U.EVF_SYSTEM_EVENT | U.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return
|
|
1441
|
+
if (!(l && l.event_flag & (U.EVF_SYSTEM_EVENT | U.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & C.gcflag_no_check_output_events)) return cr(`event NOT in output event list: ${Rt(e)}, ev ${n}`), -1;
|
|
1442
1442
|
let o = (ne(e) || oe(e, n)) && !ie(e, n);
|
|
1443
|
-
if (o && (Y(1 === W ? t("🔝🔝 %s %s%s %s", n || "", e.running ? "" : "!!", Rt(e), e.current_state.state_name) : t("🔝🔝 mach(%s%s^%s), st: %s, ev: %s%s%s", e.running ? "" : "!!", $t(e), jt(e), e.current_state.state_name, "", n || "", "")), le(e) &&
|
|
1443
|
+
if (o && (Y(1 === W ? t("🔝🔝 %s %s%s %s", n || "", e.running ? "" : "!!", Rt(e), e.current_state.state_name) : t("🔝🔝 mach(%s%s^%s), st: %s, ev: %s%s%s", e.running ? "" : "!!", $t(e), jt(e), e.current_state.state_name, "", n || "", "")), le(e) && Br(r) && Ar(r)), e.gclass.gmt.mt_publish_event) {
|
|
1444
1444
|
let t = e.gclass.gmt.mt_publish_event(e, n, r);
|
|
1445
1445
|
if (t <= 0) return t;
|
|
1446
1446
|
}
|
|
@@ -1452,20 +1452,20 @@ function Pn(e, n, r) {
|
|
|
1452
1452
|
if (t < 0) break;
|
|
1453
1453
|
if (!t) continue;
|
|
1454
1454
|
}
|
|
1455
|
-
let _ =
|
|
1455
|
+
let _ = wl(e, u, "subscriber", null, Vn.KW_REQUIRED);
|
|
1456
1456
|
if (!_ || Ct(_)) continue;
|
|
1457
|
-
let c =
|
|
1458
|
-
if (
|
|
1459
|
-
|
|
1460
|
-
let l =
|
|
1461
|
-
|
|
1457
|
+
let c = Ol(e, u, "subs_flag", 0, Vn.KW_REQUIRED), f = Nl(e, u, "event", "", Vn.KW_REQUIRED);
|
|
1458
|
+
if (il(f) || 0 === _l(f, n)) {
|
|
1459
|
+
jl(e, u, "__config__", null, 0);
|
|
1460
|
+
let l = jl(e, u, "__global__", null, 0), i = jl(e, u, "__local__", null, 0), f = $l(e, u, "__filter__", null, 0), g = u.renamed_event;
|
|
1461
|
+
il(g) && (g = n);
|
|
1462
1462
|
let d = 1;
|
|
1463
|
-
if (e.gclass.gmt.mt_publication_filter ? d = e.gclass.gmt.mt_publication_filter(e, n, r, _) :
|
|
1463
|
+
if (e.gclass.gmt.mt_publication_filter ? d = e.gclass.gmt.mt_publication_filter(e, n, r, _) : qr(f) > 0 && (d = Il(r, f) ? 1 : 0, o && (Y(t("💜💜🔄%s publishing with filter, event '%s', subscriber'%s', publisher %s", d ? "👍" : "👎", n || "", Rt(_), Rt(e))), pr(f))), d < 0) break;
|
|
1464
1464
|
if (!d) continue;
|
|
1465
1465
|
let b = gn(_, n, !0);
|
|
1466
1466
|
if (b && b.event_flag & U.EVF_SYSTEM_EVENT && !dn(_, b.event_name, 0)) continue;
|
|
1467
1467
|
let p = r;
|
|
1468
|
-
(
|
|
1468
|
+
(qr(i) > 0 || qr(l) > 0) && (p = Lr({}, r)), qr(i) > 0 && bl(p, i), qr(l) > 0 && Lr(p, kr(l)), o && (Y(1 === W ? t("🔝🔄 %s (%s) %s%s", n || "", g || "", _.running ? "" : "!!", Rt(_)) : t("🔝🔄 mach(%s%s), st: %s, ev: %s (%s), from(%s%s)", _.running ? "" : "!!", Rt(_), cn(_), n || "", g || "", e && !e.running ? "!!" : "", Rt(e))), le(e) && Br(p) && Ar(p));
|
|
1469
1469
|
let m = Tn(_, g, p, e);
|
|
1470
1470
|
if (m < 0 && c & vn.__own_event__) {
|
|
1471
1471
|
s = -1;
|
|
@@ -1474,20 +1474,20 @@ function Pn(e, n, r) {
|
|
|
1474
1474
|
if (a += m, s++, Ct(e)) break;
|
|
1475
1475
|
}
|
|
1476
1476
|
}
|
|
1477
|
-
return s || l && l.event_flag & U.EVF_NO_WARN_SUBS ||
|
|
1477
|
+
return s || l && l.event_flag & U.EVF_NO_WARN_SUBS || fr(`${Rt(e)}: Publish event WITHOUT subscribers, ev ${n}`), a;
|
|
1478
1478
|
}
|
|
1479
1479
|
function Un(e, n, r, l) {
|
|
1480
|
-
if (Ct(e)) return
|
|
1480
|
+
if (Ct(e)) return cr("gobj NULL or DESTROYED"), -1;
|
|
1481
1481
|
if (function(e) {
|
|
1482
1482
|
return z > 1 || !!e && !!(Z(e) & B.TRACE_COMMANDS);
|
|
1483
1483
|
}(e) || oe(e, null) && !ie(l, null)) {
|
|
1484
|
-
let o =
|
|
1485
|
-
Y(t("🌀🌀 mach(%s%s), cmd: %s, src: %s", Et(e) ? "" : "!!", Rt(e), null !== o ? o : n, Rt(l))), le(e) &&
|
|
1484
|
+
let o = Nr(n);
|
|
1485
|
+
Y(t("🌀🌀 mach(%s%s), cmd: %s, src: %s", Et(e) ? "" : "!!", Rt(e), null !== o ? o : n, Rt(l))), le(e) && Ar(r);
|
|
1486
1486
|
}
|
|
1487
1487
|
return 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", Rt(e)), 0, 0) : o(0, -1, t("%s: command table not available", Rt(e)), 0, 0);
|
|
1488
1488
|
}
|
|
1489
1489
|
function Fn(e, n, r, l) {
|
|
1490
|
-
return Ct(e) ? (
|
|
1490
|
+
return Ct(e) ? (cr("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", Rt(e)), 0, 0);
|
|
1491
1491
|
}
|
|
1492
1492
|
var Vn = Object.freeze({
|
|
1493
1493
|
KW_REQUIRED: 1,
|
|
@@ -1567,7 +1567,7 @@ function rr(e) {
|
|
|
1567
1567
|
}
|
|
1568
1568
|
function lr(e) {
|
|
1569
1569
|
try {
|
|
1570
|
-
return JSON.stringify(e);
|
|
1570
|
+
return JSON.stringify(e, (e, t) => "bigint" == typeof t ? t.toString() : t);
|
|
1571
1571
|
} catch (t) {
|
|
1572
1572
|
try {
|
|
1573
1573
|
return String(e);
|
|
@@ -1624,30 +1624,41 @@ function ar(e, ...t) {
|
|
|
1624
1624
|
} catch (e) {}
|
|
1625
1625
|
}
|
|
1626
1626
|
}
|
|
1627
|
-
|
|
1628
|
-
let n = sr(e, ...t), r = Io();
|
|
1629
|
-
Mn && (Mn === Gn.error ? Zn("error", n) && ar(Mn, "%c" + r + " ERROR: " + String(n), "color:red") : (Zn("error", n) && Gn.error("%c" + r + " ERROR: " + String(n), "color:red"), ar(Mn, `${r} ERROR: ${String(n)}`))), tr("error", n, r);
|
|
1630
|
-
}
|
|
1627
|
+
var ur = !1;
|
|
1631
1628
|
function _r(e, ...t) {
|
|
1632
|
-
|
|
1633
|
-
|
|
1629
|
+
if (!ur) {
|
|
1630
|
+
ur = !0;
|
|
1631
|
+
try {
|
|
1632
|
+
ar(e, ...t);
|
|
1633
|
+
} finally {
|
|
1634
|
+
ur = !1;
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1634
1637
|
}
|
|
1635
1638
|
function cr(e, ...t) {
|
|
1636
|
-
let n = sr(e, ...t), r =
|
|
1637
|
-
|
|
1639
|
+
let n = sr(e, ...t), r = Lo();
|
|
1640
|
+
Mn && (Mn === Gn.error ? Zn("error", n) && ar(Mn, "%c" + r + " ERROR: " + String(n), "color:red") : (Zn("error", n) && Gn.error("%c" + r + " ERROR: " + String(n), "color:red"), _r(Mn, `${r} ERROR: ${String(n)}`))), tr("error", n, r);
|
|
1638
1641
|
}
|
|
1639
1642
|
function fr(e, ...t) {
|
|
1640
|
-
let n = sr(e, ...t), r =
|
|
1641
|
-
|
|
1643
|
+
let n = sr(e, ...t), r = Lo();
|
|
1644
|
+
Wn && (Wn === Gn.warn ? Zn("warning", n) && ar(Wn, "%c" + r + " WARNING: " + String(n), "color:yellow") : (Zn("warning", n) && Gn.warn("%c" + r + " WARNING: " + String(n), "color:yellow"), _r(Wn, `${r} WARNING: ${String(n)}`))), tr("warning", n, r);
|
|
1642
1645
|
}
|
|
1643
1646
|
function gr(e, ...t) {
|
|
1644
|
-
let n = sr(e, ...t), r =
|
|
1647
|
+
let n = sr(e, ...t), r = Lo();
|
|
1648
|
+
xn && Zn("info", n) && ar(xn, "%c" + r + " INFO: " + String(n), "color:cyan"), tr("info", n, r);
|
|
1649
|
+
}
|
|
1650
|
+
function dr(e, ...t) {
|
|
1651
|
+
let n = sr(e, ...t), r = Lo();
|
|
1652
|
+
Kn && Zn("debug", n) && ar(Kn, "%c" + r + " DEBUG: " + String(n), "color:silver"), tr("debug", n, r);
|
|
1653
|
+
}
|
|
1654
|
+
function br(e, ...t) {
|
|
1655
|
+
let n = sr(e, ...t), r = Lo();
|
|
1645
1656
|
Kn && Zn("msg", n) && ar(Kn, "%c" + r + " MSG: " + String(n), "color:cyan"), tr("msg", n, r);
|
|
1646
1657
|
}
|
|
1647
|
-
function
|
|
1648
|
-
Zn("json", t) && (t && ar(Gn.warn, "=====> " + or(t)), ar(Gn.dir, e)), tr("json", e,
|
|
1658
|
+
function pr(e, t) {
|
|
1659
|
+
Zn("json", t) && (t && ar(Gn.warn, "=====> " + or(t)), ar(Gn.dir, e)), tr("json", e, Lo());
|
|
1649
1660
|
}
|
|
1650
|
-
var
|
|
1661
|
+
var mr = [
|
|
1651
1662
|
"passw",
|
|
1652
1663
|
"pwd",
|
|
1653
1664
|
"passphrase",
|
|
@@ -1659,12 +1670,12 @@ var br = [
|
|
|
1659
1670
|
"cookie",
|
|
1660
1671
|
"credential",
|
|
1661
1672
|
"salt"
|
|
1662
|
-
],
|
|
1673
|
+
], hr = [
|
|
1663
1674
|
"apikey",
|
|
1664
1675
|
"sessionid",
|
|
1665
1676
|
"sessionkey",
|
|
1666
1677
|
"authdata"
|
|
1667
|
-
],
|
|
1678
|
+
], Er = /* @__PURE__ */ new Set([
|
|
1668
1679
|
"endpoint",
|
|
1669
1680
|
"url",
|
|
1670
1681
|
"uri",
|
|
@@ -1688,25 +1699,25 @@ var br = [
|
|
|
1688
1699
|
"expires",
|
|
1689
1700
|
"mode"
|
|
1690
1701
|
]);
|
|
1691
|
-
function
|
|
1702
|
+
function yr(e) {
|
|
1692
1703
|
if ("string" != typeof e || e.length < 3) return !1;
|
|
1693
1704
|
let t = e.toLowerCase(), n = !1;
|
|
1694
|
-
for (const e of
|
|
1705
|
+
for (const e of mr) if (t.indexOf(e) >= 0) {
|
|
1695
1706
|
n = !0;
|
|
1696
1707
|
break;
|
|
1697
1708
|
}
|
|
1698
1709
|
if (!n) {
|
|
1699
1710
|
let e = t.replace(/[_\-. \t]/g, "");
|
|
1700
|
-
for (const t of
|
|
1711
|
+
for (const t of hr) if (e.indexOf(t) >= 0) {
|
|
1701
1712
|
n = !0;
|
|
1702
1713
|
break;
|
|
1703
1714
|
}
|
|
1704
1715
|
}
|
|
1705
1716
|
if (n || (n = t.indexOf("priv") >= 0 && t.indexOf("key") >= 0), !n) return !1;
|
|
1706
|
-
for (const e of t.split(/[_\-. \t]/)) if (
|
|
1717
|
+
for (const e of t.split(/[_\-. \t]/)) if (Er.has(e)) return !1;
|
|
1707
1718
|
return !0;
|
|
1708
1719
|
}
|
|
1709
|
-
function
|
|
1720
|
+
function Tr(e, t, n) {
|
|
1710
1721
|
const r = (e) => " " === e || " " === e, l = (t) => n && e[t] === n && (t + 1 >= e.length || r(e[t + 1]));
|
|
1711
1722
|
let o = t;
|
|
1712
1723
|
for (;;) {
|
|
@@ -1722,12 +1733,12 @@ function Er(e, t, n) {
|
|
|
1722
1733
|
o = t;
|
|
1723
1734
|
}
|
|
1724
1735
|
}
|
|
1725
|
-
var
|
|
1726
|
-
function
|
|
1736
|
+
var vr = 128, Or = 4194304, Sr = "<not shown: too large to mask>";
|
|
1737
|
+
function Nr(e) {
|
|
1727
1738
|
if ("string" != typeof e || e.indexOf("=") < 0) return null;
|
|
1728
|
-
if (e.length >
|
|
1739
|
+
if (e.length > Or) return Sr;
|
|
1729
1740
|
let t, n = !1, r = /(^|[ \t])attribute=["']?([^ \t"']*)/g;
|
|
1730
|
-
for (; null !== (t = r.exec(e));)
|
|
1741
|
+
for (; null !== (t = r.exec(e));) yr(t[2].slice(-128)) && (n = !0);
|
|
1731
1742
|
let l = [], o = 0, i = !1, s = "", a = 0, u = 0;
|
|
1732
1743
|
const _ = (t) => t >= e.length || " " === e[t] || " " === e[t];
|
|
1733
1744
|
for (; u < e.length;) {
|
|
@@ -1740,8 +1751,8 @@ function Or(e) {
|
|
|
1740
1751
|
u++;
|
|
1741
1752
|
continue;
|
|
1742
1753
|
}
|
|
1743
|
-
let r = e.substring(Math.max(a, u -
|
|
1744
|
-
if (a = u + 1, !(
|
|
1754
|
+
let r = e.substring(Math.max(a, u - vr), u);
|
|
1755
|
+
if (a = u + 1, !(yr(r) || n && "value" === r.toLowerCase())) {
|
|
1745
1756
|
u++;
|
|
1746
1757
|
continue;
|
|
1747
1758
|
}
|
|
@@ -1750,18 +1761,18 @@ function Or(e) {
|
|
|
1750
1761
|
if (f) {
|
|
1751
1762
|
for (c = u + 1; c < e.length && e[c] !== f;) c++;
|
|
1752
1763
|
e[c] === f && c++;
|
|
1753
|
-
} else c =
|
|
1764
|
+
} else c = Tr(e, u, s);
|
|
1754
1765
|
c > u && (l.push(e.substring(o, u)), l.push("********"), o = c, i = !0), u = c, a = u;
|
|
1755
1766
|
}
|
|
1756
1767
|
return i ? (l.push(e.substring(o)), l.join("")) : null;
|
|
1757
1768
|
}
|
|
1758
|
-
var
|
|
1759
|
-
var
|
|
1760
|
-
function
|
|
1769
|
+
var wr = 64, jr = "<not shown: the masking failed>";
|
|
1770
|
+
var $r = Symbol("mask-in-progress");
|
|
1771
|
+
function Rr(e, t, n, r) {
|
|
1761
1772
|
if ("string" == typeof e) {
|
|
1762
|
-
if (e.length > r.left) return r.left = 0,
|
|
1773
|
+
if (e.length > r.left) return r.left = 0, Sr;
|
|
1763
1774
|
r.left -= e.length;
|
|
1764
|
-
let t =
|
|
1775
|
+
let t = Nr(e);
|
|
1765
1776
|
return null !== t ? t : e;
|
|
1766
1777
|
}
|
|
1767
1778
|
let l = Array.isArray(e);
|
|
@@ -1770,13 +1781,13 @@ function jr(e, t, n, r) {
|
|
|
1770
1781
|
let t = Object.getPrototypeOf(e);
|
|
1771
1782
|
return t === Object.prototype || null === t;
|
|
1772
1783
|
}(e)) return e;
|
|
1773
|
-
if (r.left <= 0) return
|
|
1784
|
+
if (r.left <= 0) return Sr;
|
|
1774
1785
|
if (t.has(e)) {
|
|
1775
1786
|
let n = t.get(e);
|
|
1776
|
-
return n ===
|
|
1787
|
+
return n === $r ? "<cycle>" : n;
|
|
1777
1788
|
}
|
|
1778
|
-
if (n >=
|
|
1779
|
-
r.left -= 1, t.set(e,
|
|
1789
|
+
if (n >= wr) return "<deeper not shown>";
|
|
1790
|
+
r.left -= 1, t.set(e, $r);
|
|
1780
1791
|
let o, i = !1, s = !1;
|
|
1781
1792
|
if (l) {
|
|
1782
1793
|
o = [];
|
|
@@ -1786,13 +1797,13 @@ function jr(e, t, n, r) {
|
|
|
1786
1797
|
break;
|
|
1787
1798
|
}
|
|
1788
1799
|
r.left -= 1;
|
|
1789
|
-
let a =
|
|
1800
|
+
let a = Rr(e[l], t, n + 1, r);
|
|
1790
1801
|
a !== e[l] && (i = !0), o.push(a);
|
|
1791
1802
|
}
|
|
1792
|
-
s && o.push(
|
|
1803
|
+
s && o.push(Sr);
|
|
1793
1804
|
} else {
|
|
1794
1805
|
o = Object.create(Object.getPrototypeOf(e));
|
|
1795
|
-
let l = "string" == typeof e.attribute &&
|
|
1806
|
+
let l = "string" == typeof e.attribute && yr(e.attribute.slice(-128));
|
|
1796
1807
|
for (const a in e) {
|
|
1797
1808
|
if (!Object.prototype.hasOwnProperty.call(e, a)) continue;
|
|
1798
1809
|
if (r.left <= 0) {
|
|
@@ -1801,38 +1812,38 @@ function jr(e, t, n, r) {
|
|
|
1801
1812
|
}
|
|
1802
1813
|
r.left -= 1 + a.length;
|
|
1803
1814
|
let u, _ = e[a];
|
|
1804
|
-
u = (
|
|
1815
|
+
u = (yr(a.slice(-128)) || l && "value" === a) && null != _ && "" !== _ ? "********" : Rr(_, t, n + 1, r), u !== _ && (i = !0), hl(o, a, u);
|
|
1805
1816
|
}
|
|
1806
|
-
s && (o["<more>"] =
|
|
1817
|
+
s && (o["<more>"] = Sr);
|
|
1807
1818
|
}
|
|
1808
1819
|
return i || s || (o = e), t.set(e, o), o;
|
|
1809
1820
|
}
|
|
1810
|
-
function
|
|
1821
|
+
function Dr(e) {
|
|
1811
1822
|
try {
|
|
1812
|
-
return
|
|
1823
|
+
return Rr(e, /* @__PURE__ */ new WeakMap(), 0, { left: Or });
|
|
1813
1824
|
} catch (e) {
|
|
1814
|
-
return
|
|
1825
|
+
return jr;
|
|
1815
1826
|
}
|
|
1816
1827
|
}
|
|
1817
|
-
function
|
|
1818
|
-
|
|
1828
|
+
function Ar(e, t) {
|
|
1829
|
+
pr(Dr(e), t);
|
|
1819
1830
|
}
|
|
1820
|
-
function
|
|
1831
|
+
function kr(e) {
|
|
1821
1832
|
return structuredClone(e);
|
|
1822
1833
|
}
|
|
1823
|
-
function
|
|
1834
|
+
function Ir(...e) {
|
|
1824
1835
|
const t = {};
|
|
1825
|
-
for (const n of e)
|
|
1836
|
+
for (const n of e) Lr(t, structuredClone(n));
|
|
1826
1837
|
return t;
|
|
1827
1838
|
}
|
|
1828
|
-
function
|
|
1839
|
+
function Cr(e, t) {
|
|
1829
1840
|
if (e === t) return !0;
|
|
1830
1841
|
if (null === e || null === t) return e === t;
|
|
1831
1842
|
if (typeof e != typeof t) return !1;
|
|
1832
1843
|
if (Array.isArray(e) !== Array.isArray(t)) return !1;
|
|
1833
1844
|
if (Array.isArray(e)) {
|
|
1834
1845
|
if (e.length !== t.length) return !1;
|
|
1835
|
-
for (let n = 0; n < e.length; n++) if (!
|
|
1846
|
+
for (let n = 0; n < e.length; n++) if (!Cr(e[n], t[n])) return !1;
|
|
1836
1847
|
return !0;
|
|
1837
1848
|
}
|
|
1838
1849
|
if ("object" == typeof e) {
|
|
@@ -1840,153 +1851,153 @@ function kr(e, t) {
|
|
|
1840
1851
|
if (n.length !== r.length) return !1;
|
|
1841
1852
|
for (let l = 0; l < n.length; l++) {
|
|
1842
1853
|
if (n[l] !== r[l]) return !1;
|
|
1843
|
-
if (!
|
|
1854
|
+
if (!Cr(e[n[l]], t[r[l]])) return !1;
|
|
1844
1855
|
}
|
|
1845
1856
|
return !0;
|
|
1846
1857
|
}
|
|
1847
1858
|
return e === t;
|
|
1848
1859
|
}
|
|
1849
|
-
function
|
|
1860
|
+
function Lr(e, t) {
|
|
1850
1861
|
if (!t) return e;
|
|
1851
|
-
for (let n of Object.keys(t))
|
|
1862
|
+
for (let n of Object.keys(t)) hl(e, n, t[n]);
|
|
1852
1863
|
return e;
|
|
1853
1864
|
}
|
|
1854
|
-
function
|
|
1865
|
+
function Pr(e, t) {
|
|
1855
1866
|
if (!t) return e;
|
|
1856
|
-
for (let n in t) Object.prototype.hasOwnProperty.call(t, n) && Object.prototype.hasOwnProperty.call(e, n) &&
|
|
1867
|
+
for (let n in t) Object.prototype.hasOwnProperty.call(t, n) && Object.prototype.hasOwnProperty.call(e, n) && hl(e, n, t[n]);
|
|
1857
1868
|
return e;
|
|
1858
1869
|
}
|
|
1859
|
-
function
|
|
1870
|
+
function Ur(e, t) {
|
|
1860
1871
|
if (!t) return e;
|
|
1861
|
-
for (let n in t) Object.prototype.hasOwnProperty.call(t, n) && !Object.prototype.hasOwnProperty.call(e, n) &&
|
|
1872
|
+
for (let n in t) Object.prototype.hasOwnProperty.call(t, n) && !Object.prototype.hasOwnProperty.call(e, n) && hl(e, n, t[n]);
|
|
1862
1873
|
return e;
|
|
1863
1874
|
}
|
|
1864
|
-
function
|
|
1875
|
+
function Fr(e, t) {
|
|
1865
1876
|
if (e && Object.prototype.hasOwnProperty.call(e, t)) return e[t];
|
|
1866
1877
|
}
|
|
1867
|
-
function
|
|
1878
|
+
function Vr(e, t) {
|
|
1868
1879
|
e && Object.prototype.hasOwnProperty.call(e, t) && delete e[t];
|
|
1869
1880
|
}
|
|
1870
|
-
function
|
|
1871
|
-
|
|
1881
|
+
function Gr(e, t, n) {
|
|
1882
|
+
hl(e, t, n);
|
|
1872
1883
|
}
|
|
1873
|
-
function
|
|
1874
|
-
|
|
1884
|
+
function Mr(e, t, n) {
|
|
1885
|
+
hl(e, t, n);
|
|
1875
1886
|
}
|
|
1876
|
-
function
|
|
1887
|
+
function Wr(e, t) {
|
|
1877
1888
|
e.push(t);
|
|
1878
1889
|
}
|
|
1879
|
-
function
|
|
1890
|
+
function xr(e, t) {
|
|
1880
1891
|
e.push(t);
|
|
1881
1892
|
}
|
|
1882
|
-
function
|
|
1893
|
+
function Kr(e, t) {
|
|
1883
1894
|
e.splice(t, 1);
|
|
1884
1895
|
}
|
|
1885
|
-
function
|
|
1896
|
+
function Yr(e, t) {
|
|
1886
1897
|
return t ? (Array.prototype.push.apply(e, t), e) : e;
|
|
1887
1898
|
}
|
|
1888
|
-
function Kr(e) {
|
|
1889
|
-
return qr(e) ? Object.keys(e).length : 0;
|
|
1890
|
-
}
|
|
1891
|
-
function Yr(e) {
|
|
1892
|
-
return Hr(e) ? e.length : 0;
|
|
1893
|
-
}
|
|
1894
1899
|
function Br(e) {
|
|
1895
|
-
return
|
|
1900
|
+
return zr(e) ? Object.keys(e).length : 0;
|
|
1896
1901
|
}
|
|
1897
1902
|
function Jr(e) {
|
|
1898
|
-
return
|
|
1903
|
+
return Qr(e) ? e.length : 0;
|
|
1899
1904
|
}
|
|
1900
1905
|
function qr(e) {
|
|
1901
|
-
return
|
|
1906
|
+
return zr(e) ? Object.keys(e).length : Qr(e) ? e.length : Xr(e) && e.length > 0 ? 1 : 0;
|
|
1902
1907
|
}
|
|
1903
1908
|
function Hr(e) {
|
|
1904
|
-
return
|
|
1909
|
+
return 0 === qr(e);
|
|
1905
1910
|
}
|
|
1906
1911
|
function zr(e) {
|
|
1907
|
-
return "
|
|
1912
|
+
return null !== e && "object" == typeof e && !Array.isArray(e);
|
|
1908
1913
|
}
|
|
1909
1914
|
function Qr(e) {
|
|
1910
|
-
return
|
|
1915
|
+
return Array.isArray(e);
|
|
1911
1916
|
}
|
|
1912
1917
|
function Xr(e) {
|
|
1913
|
-
return "
|
|
1918
|
+
return "string" == typeof e;
|
|
1914
1919
|
}
|
|
1915
1920
|
function Zr(e) {
|
|
1916
|
-
return
|
|
1921
|
+
return "number" == typeof e && Number.isFinite(e);
|
|
1917
1922
|
}
|
|
1918
1923
|
function el(e) {
|
|
1919
|
-
|
|
1920
|
-
if (!zr(e)) return !1;
|
|
1921
|
-
const t = Number(e);
|
|
1922
|
-
return !isNaN(t) && "" !== e.trim() && !isNaN(t);
|
|
1924
|
+
return "boolean" == typeof e;
|
|
1923
1925
|
}
|
|
1924
1926
|
function tl(e) {
|
|
1925
|
-
return
|
|
1927
|
+
return null == e;
|
|
1926
1928
|
}
|
|
1927
1929
|
function nl(e) {
|
|
1928
|
-
|
|
1930
|
+
if (Zr(e)) return !0;
|
|
1931
|
+
if (!Xr(e)) return !1;
|
|
1932
|
+
const t = Number(e);
|
|
1933
|
+
return !isNaN(t) && "" !== e.trim() && !isNaN(t);
|
|
1929
1934
|
}
|
|
1930
1935
|
function rl(e) {
|
|
1931
|
-
return e instanceof
|
|
1936
|
+
return e instanceof Date && !isNaN(e);
|
|
1932
1937
|
}
|
|
1933
1938
|
function ll(e) {
|
|
1934
|
-
return
|
|
1939
|
+
return "function" == typeof e;
|
|
1935
1940
|
}
|
|
1936
1941
|
function ol(e) {
|
|
1937
|
-
return
|
|
1942
|
+
return e instanceof I;
|
|
1943
|
+
}
|
|
1944
|
+
function il(e) {
|
|
1945
|
+
return !Xr(e) || 0 === e.length;
|
|
1938
1946
|
}
|
|
1939
|
-
function
|
|
1947
|
+
function sl(e) {
|
|
1948
|
+
return Zr(e) ? Boolean(e) : /^\s*(true|1|on)\s*$/i.test(e);
|
|
1949
|
+
}
|
|
1950
|
+
function al(e, t, n) {
|
|
1940
1951
|
var r = (e + "").substring(0, n), l = (t + "").substring(0, n);
|
|
1941
1952
|
return r === l ? 0 : r > l ? 1 : -1;
|
|
1942
1953
|
}
|
|
1943
|
-
function
|
|
1954
|
+
function ul(e, t) {
|
|
1944
1955
|
return e === t ? 0 : e > t ? 1 : -1;
|
|
1945
1956
|
}
|
|
1946
|
-
function
|
|
1957
|
+
function _l(e, t) {
|
|
1947
1958
|
let n = e.toLowerCase(), r = t.toLowerCase();
|
|
1948
1959
|
return n === r ? 0 : n > r ? 1 : -1;
|
|
1949
1960
|
}
|
|
1950
|
-
function
|
|
1951
|
-
if (
|
|
1952
|
-
if (
|
|
1961
|
+
function cl(e, t) {
|
|
1962
|
+
if (zr(e) || zr(t) || Qr(e) || Qr(t)) return 0;
|
|
1963
|
+
if (Zr(e) || Zr(t)) {
|
|
1953
1964
|
let n = Number(e), r = Number(t);
|
|
1954
1965
|
return Number.isNaN(n) && (n = 0), Number.isNaN(r) && (r = 0), n > r ? 1 : n < r ? -1 : 0;
|
|
1955
1966
|
}
|
|
1956
|
-
if (
|
|
1967
|
+
if (el(e) || el(t)) {
|
|
1957
1968
|
let n = Number(e), r = Number(t);
|
|
1958
1969
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
1959
1970
|
}
|
|
1960
|
-
return
|
|
1971
|
+
return ul(String(e), String(t));
|
|
1961
1972
|
}
|
|
1962
|
-
function
|
|
1973
|
+
function fl(e, t, n) {
|
|
1963
1974
|
var r;
|
|
1964
1975
|
return -1 !== (r = (e += "").indexOf(t)) && (n ? e.substring(0, r) : e.slice(r));
|
|
1965
1976
|
}
|
|
1966
|
-
function
|
|
1967
|
-
if (!
|
|
1977
|
+
function gl(e) {
|
|
1978
|
+
if (!Xr(e)) return !1;
|
|
1968
1979
|
let t = 0;
|
|
1969
1980
|
for (; t < e.length && "_" === e[t] && !(t > 2); t++);
|
|
1970
1981
|
return 2 === t;
|
|
1971
1982
|
}
|
|
1972
|
-
function
|
|
1973
|
-
if (!
|
|
1983
|
+
function dl(e) {
|
|
1984
|
+
if (!Xr(e)) return !1;
|
|
1974
1985
|
let t = 0;
|
|
1975
1986
|
for (; t < e.length && "_" === e[t] && !(t > 2); t++);
|
|
1976
1987
|
return 1 === t;
|
|
1977
1988
|
}
|
|
1978
|
-
function
|
|
1979
|
-
if ("object" != typeof t || Array.isArray(t)) if (Array.isArray(t)) for (const n of t)
|
|
1989
|
+
function bl(e, t) {
|
|
1990
|
+
if ("object" != typeof t || Array.isArray(t)) if (Array.isArray(t)) for (const n of t) bl(e, n);
|
|
1980
1991
|
else "string" == typeof t && delete e[t];
|
|
1981
1992
|
else for (const n of Object.keys(t)) delete e[n];
|
|
1982
1993
|
}
|
|
1983
|
-
function
|
|
1994
|
+
function pl(e, t) {
|
|
1984
1995
|
return !(!(t in e) || !Object.prototype.hasOwnProperty.call(e, t));
|
|
1985
1996
|
}
|
|
1986
|
-
function
|
|
1997
|
+
function ml(e, t) {
|
|
1987
1998
|
return !Object.prototype.hasOwnProperty.call(e, t);
|
|
1988
1999
|
}
|
|
1989
|
-
function
|
|
2000
|
+
function hl(e, t, n) {
|
|
1990
2001
|
"__proto__" === t ? Object.defineProperty(e, t, {
|
|
1991
2002
|
value: n,
|
|
1992
2003
|
writable: !0,
|
|
@@ -1994,235 +2005,235 @@ function pl(e, t, n) {
|
|
|
1994
2005
|
configurable: !0
|
|
1995
2006
|
}) : e[t] = n;
|
|
1996
2007
|
}
|
|
1997
|
-
function
|
|
2008
|
+
function El(e, t) {
|
|
1998
2009
|
if (!/^[0-9]+$/.test(t)) return -1;
|
|
1999
2010
|
const n = Number(t);
|
|
2000
2011
|
return n >= e.length ? -1 : n;
|
|
2001
2012
|
}
|
|
2002
|
-
function
|
|
2003
|
-
e && !
|
|
2013
|
+
function yl(e, t, n, r) {
|
|
2014
|
+
e && !ol(e) && cr("GObj bad instanceof");
|
|
2004
2015
|
const l = e ? `${Rt(e)}: ` : "";
|
|
2005
|
-
if (!
|
|
2006
|
-
if (!
|
|
2016
|
+
if (!zr(t) && !Qr(t)) return void cr(`${l}kw must be list or dict: '${String(n)}'`);
|
|
2017
|
+
if (!Xr(n)) return void cr(`${l}path must be a string: ${String(n)}`);
|
|
2007
2018
|
let o = n.split("`"), i = o.length;
|
|
2008
2019
|
for (let e = 0; e < i; e++) {
|
|
2009
|
-
if (
|
|
2010
|
-
const i =
|
|
2011
|
-
if (i < 0) return void (r &&
|
|
2020
|
+
if (Qr(t)) {
|
|
2021
|
+
const i = El(t, o[e]);
|
|
2022
|
+
if (i < 0) return void (r && cr(`${l}path not found: '${n}'`));
|
|
2012
2023
|
o[e] = String(i);
|
|
2013
2024
|
}
|
|
2014
|
-
if (
|
|
2025
|
+
if (ml(t, o[e])) return void (r && cr(`${l}path not found: '${n}'`));
|
|
2015
2026
|
if (e === i - 1) break;
|
|
2016
|
-
if (null == (t = t[o[e]])) return void (r &&
|
|
2017
|
-
if (!
|
|
2027
|
+
if (null == (t = t[o[e]])) return void (r && cr(`${l}path not found: '${n}'`));
|
|
2028
|
+
if (!zr(t) && !Qr(t)) return void cr(`${l}kw must be list or dict: '${n}'`);
|
|
2018
2029
|
}
|
|
2019
2030
|
let s = t[o[i - 1]];
|
|
2020
|
-
return void 0 === s && r &&
|
|
2031
|
+
return void 0 === s && r && cr(`${l}path not found: '${n}'`), s;
|
|
2021
2032
|
}
|
|
2022
|
-
function
|
|
2023
|
-
e && !
|
|
2033
|
+
function Tl(e, t, n) {
|
|
2034
|
+
e && !ol(e) && cr("GObj bad instanceof");
|
|
2024
2035
|
const r = e ? Rt(e) + ": " : "";
|
|
2025
|
-
if (!
|
|
2036
|
+
if (!Xr(n)) return cr(`${r}kw_delete(): path must be a string: ${String(n)}`), -1;
|
|
2026
2037
|
let [l, o] = function(e, t) {
|
|
2027
2038
|
let n = e.lastIndexOf(t);
|
|
2028
2039
|
return -1 === n ? [e, ""] : [e.substring(0, n), e.substring(n + 1)];
|
|
2029
2040
|
}(n, "`"), i = t;
|
|
2030
|
-
if (
|
|
2031
|
-
else if (i =
|
|
2032
|
-
return
|
|
2041
|
+
if (il(o)) o = n;
|
|
2042
|
+
else if (i = yl(e, t, l, !0), void 0 === i) return -1;
|
|
2043
|
+
return Qr(i) ? (cr(`${r}kw_delete(): cannot delete an item of a list: '${n}'`), -1) : zr(i) && Object.prototype.hasOwnProperty.call(i, o) ? (delete i[o], 0) : (cr(`${r}kw_delete(): path not found: '${n}'`), -1);
|
|
2033
2044
|
}
|
|
2034
|
-
function
|
|
2035
|
-
e && !
|
|
2036
|
-
let o =
|
|
2045
|
+
function vl(e, t, n, r, l) {
|
|
2046
|
+
e && !ol(e) && cr("GObj bad instanceof");
|
|
2047
|
+
let o = yl(e, t, n, !1);
|
|
2037
2048
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT, u = l && l & Vn.KW_WILD_NUMBER;
|
|
2038
2049
|
if (void 0 === o) {
|
|
2039
2050
|
if (s && t) {
|
|
2040
2051
|
let l = Boolean(r);
|
|
2041
|
-
return
|
|
2052
|
+
return Dl(e, t, n, l), l;
|
|
2042
2053
|
}
|
|
2043
|
-
return i && (
|
|
2054
|
+
return i && (cr(`path not found: '${n}'`), Ar(t)), Boolean(r);
|
|
2044
2055
|
}
|
|
2045
2056
|
let _;
|
|
2046
|
-
if (
|
|
2047
|
-
else if (u &&
|
|
2048
|
-
else if (u &&
|
|
2057
|
+
if (el(o)) _ = o;
|
|
2058
|
+
else if (u && Zr(o)) _ = 0 !== o;
|
|
2059
|
+
else if (u && Xr(o)) _ = "true" === o.toLowerCase() || "false" !== o.toLowerCase() && 0 !== (parseInt(o, 10) || 0);
|
|
2049
2060
|
else {
|
|
2050
|
-
if (!u || null !== o) return u ? (
|
|
2061
|
+
if (!u || null !== o) return u ? (cr(`${e ? Rt(e) + ": " : ""}path MUST BE a simple json element: '${n}'`), Ar(t), !1) : (cr(`${e ? Rt(e) + ": " : ""}path MUST BE a json boolean: '${n}'`), Ar(t), Boolean(r));
|
|
2051
2062
|
_ = !1;
|
|
2052
2063
|
}
|
|
2053
|
-
return a &&
|
|
2064
|
+
return a && Tl(e, t, n), _;
|
|
2054
2065
|
}
|
|
2055
|
-
function
|
|
2056
|
-
e && !
|
|
2057
|
-
let o =
|
|
2066
|
+
function Ol(e, t, n, r, l) {
|
|
2067
|
+
e && !ol(e) && cr("GObj bad instanceof");
|
|
2068
|
+
let o = yl(e, t, n, !1);
|
|
2058
2069
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT, u = l && l & Vn.KW_WILD_NUMBER;
|
|
2059
2070
|
if (void 0 === o) {
|
|
2060
2071
|
if (s && t) {
|
|
2061
2072
|
let l = parseInt(r);
|
|
2062
|
-
return
|
|
2073
|
+
return Dl(e, t, n, l), l;
|
|
2063
2074
|
}
|
|
2064
|
-
return i && (
|
|
2075
|
+
return i && (cr(`path not found: '${n}'`), Ar(t)), parseInt(r);
|
|
2065
2076
|
}
|
|
2066
2077
|
let _;
|
|
2067
|
-
if (
|
|
2078
|
+
if (Zr(o)) _ = Math.trunc(o);
|
|
2068
2079
|
else {
|
|
2069
|
-
if (!u) return
|
|
2070
|
-
if (
|
|
2071
|
-
else if (
|
|
2080
|
+
if (!u) return cr(`${e ? Rt(e) + ": " : ""}path MUST BE a json integer: '${n}'`), Ar(t), parseInt(r);
|
|
2081
|
+
if (el(o)) _ = o ? 1 : 0;
|
|
2082
|
+
else if (Xr(o)) _ = function(e) {
|
|
2072
2083
|
const t = /^\s*([+-]?)(0[xX][0-9a-fA-F]+|0[0-7]*|[1-9][0-9]*)/.exec(e);
|
|
2073
2084
|
if (!t) return 0;
|
|
2074
2085
|
let n, r = t[2];
|
|
2075
2086
|
return n = r.length > 1 && ("x" === r[1] || "X" === r[1]) ? parseInt(r.substring(2), 16) : "0" === r[0] ? parseInt(r, 8) : parseInt(r, 10), "-" === t[1] ? -n : n;
|
|
2076
2087
|
}(o);
|
|
2077
2088
|
else {
|
|
2078
|
-
if (null !== o) return
|
|
2089
|
+
if (null !== o) return cr(`${e ? Rt(e) + ": " : ""}path MUST BE a simple json element: '${n}'`), Ar(t), 0;
|
|
2079
2090
|
_ = 0;
|
|
2080
2091
|
}
|
|
2081
2092
|
}
|
|
2082
|
-
return a &&
|
|
2093
|
+
return a && Tl(e, t, n), _;
|
|
2083
2094
|
}
|
|
2084
|
-
function
|
|
2085
|
-
e && !
|
|
2086
|
-
let o =
|
|
2095
|
+
function Sl(e, t, n, r, l) {
|
|
2096
|
+
e && !ol(e) && cr("GObj bad instanceof");
|
|
2097
|
+
let o = yl(e, t, n, !1);
|
|
2087
2098
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT, u = l && l & Vn.KW_WILD_NUMBER;
|
|
2088
2099
|
if (void 0 === o) {
|
|
2089
2100
|
if (s && t) {
|
|
2090
2101
|
let l = Number(r);
|
|
2091
|
-
return
|
|
2102
|
+
return Dl(e, t, n, l), l;
|
|
2092
2103
|
}
|
|
2093
|
-
return i && (
|
|
2104
|
+
return i && (cr(`path not found: '${n}'`), Ar(t)), Number(r);
|
|
2094
2105
|
}
|
|
2095
2106
|
let _;
|
|
2096
|
-
if (
|
|
2107
|
+
if (Zr(o)) _ = o;
|
|
2097
2108
|
else {
|
|
2098
|
-
if (!u) return
|
|
2099
|
-
if (
|
|
2100
|
-
else if (
|
|
2109
|
+
if (!u) return cr(`${e ? Rt(e) + ": " : ""}path MUST BE a json real: '${n}'`), Ar(t), Number(r);
|
|
2110
|
+
if (el(o)) _ = o ? 1 : 0;
|
|
2111
|
+
else if (Xr(o)) _ = parseFloat(o), Number.isNaN(_) && (_ = 0);
|
|
2101
2112
|
else {
|
|
2102
|
-
if (null !== o) return
|
|
2113
|
+
if (null !== o) return cr(`${e ? Rt(e) + ": " : ""}path MUST BE a simple json element: '${n}'`), Ar(t), 0;
|
|
2103
2114
|
_ = 0;
|
|
2104
2115
|
}
|
|
2105
2116
|
}
|
|
2106
|
-
return a &&
|
|
2117
|
+
return a && Tl(e, t, n), _;
|
|
2107
2118
|
}
|
|
2108
|
-
function
|
|
2109
|
-
e && !
|
|
2110
|
-
let o =
|
|
2119
|
+
function Nl(e, t, n, r, l) {
|
|
2120
|
+
e && !ol(e) && cr("GObj bad instanceof");
|
|
2121
|
+
let o = yl(e, t, n, !1);
|
|
2111
2122
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
2112
|
-
return void 0 === o ? s && t ? (
|
|
2113
|
-
let n =
|
|
2123
|
+
return void 0 === o ? s && t ? (Dl(e, t, n, Xr(r) ? r : null), r) : (i && !function(e, t) {
|
|
2124
|
+
let n = Xr(t) ? t.split("`") : [], r = e;
|
|
2114
2125
|
for (let e = 0; e < n.length - 1; e++) {
|
|
2115
|
-
if (!
|
|
2126
|
+
if (!zr(r) && !Qr(r)) return !1;
|
|
2116
2127
|
r = r[n[e]];
|
|
2117
2128
|
}
|
|
2118
|
-
return !(!
|
|
2119
|
-
}(t, n) && (
|
|
2129
|
+
return !(!zr(r) && !Qr(r) || 0 === n.length) && Object.prototype.hasOwnProperty.call(r, n[n.length - 1]);
|
|
2130
|
+
}(t, n) && (cr(`path not found: '${n}'`), Ar(t)), r) : Xr(o) ? (a && Tl(e, t, n), o) : (null !== o && (cr(`${e ? Rt(e) + ": " : ""}path MUST BE a json str: '${n}'`), Ar(t)), r);
|
|
2120
2131
|
}
|
|
2121
|
-
function
|
|
2122
|
-
e && !
|
|
2123
|
-
let o =
|
|
2132
|
+
function wl(e, t, n, r, l) {
|
|
2133
|
+
e && !ol(e) && cr("GObj bad instanceof");
|
|
2134
|
+
let o = yl(e, t, n, !1);
|
|
2124
2135
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
2125
2136
|
if (void 0 === o) {
|
|
2126
2137
|
if (s) {
|
|
2127
2138
|
let l = r;
|
|
2128
|
-
return
|
|
2139
|
+
return Dl(e, t, n, l), l;
|
|
2129
2140
|
}
|
|
2130
|
-
return i && (
|
|
2141
|
+
return i && (cr(`path not found: '${n}'`), Ar(t)), r;
|
|
2131
2142
|
}
|
|
2132
|
-
return a &&
|
|
2143
|
+
return a && Tl(e, t, n), o;
|
|
2133
2144
|
}
|
|
2134
|
-
function
|
|
2135
|
-
e && !
|
|
2136
|
-
let o =
|
|
2145
|
+
function jl(e, t, n, r, l) {
|
|
2146
|
+
e && !ol(e) && cr("GObj bad instanceof");
|
|
2147
|
+
let o = yl(e, t, n, !1);
|
|
2137
2148
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
2138
|
-
return void 0 === o ? s &&
|
|
2149
|
+
return void 0 === o ? s && zr(r) && t ? (Dl(e, t, n, r), r) : (i && (cr(`path not found: '${n}'`), Ar(t)), r) : zr(o) ? (a && Tl(e, t, n), o) : s && null === o && zr(r) ? (Dl(e, t, n, r), r) : s && null === o ? (i && (cr(`path not found: '${n}'`), Ar(t)), r) : ((i || s) && (cr(`${e ? Rt(e) + ": " : ""}path MUST BE a json dict: '${n}'` + (s ? ", cannot create" : "")), Ar(t)), r);
|
|
2139
2150
|
}
|
|
2140
|
-
function
|
|
2141
|
-
e && !
|
|
2142
|
-
let o =
|
|
2151
|
+
function $l(e, t, n, r, l) {
|
|
2152
|
+
e && !ol(e) && cr("GObj bad instanceof");
|
|
2153
|
+
let o = yl(e, t, n, !1);
|
|
2143
2154
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
2144
2155
|
if (void 0 === o) {
|
|
2145
2156
|
if (s) {
|
|
2146
2157
|
let l = r;
|
|
2147
|
-
return
|
|
2158
|
+
return Dl(e, t, n, l), l;
|
|
2148
2159
|
}
|
|
2149
|
-
return i && (
|
|
2160
|
+
return i && (cr(`path not found: '${n}'`), Ar(t)), r;
|
|
2150
2161
|
}
|
|
2151
|
-
return a &&
|
|
2162
|
+
return a && Tl(e, t, n), o;
|
|
2152
2163
|
}
|
|
2153
|
-
function
|
|
2154
|
-
e && !
|
|
2155
|
-
let o =
|
|
2164
|
+
function Rl(e, t, n, r, l) {
|
|
2165
|
+
e && !ol(e) && cr("GObj bad instanceof");
|
|
2166
|
+
let o = yl(e, t, n, !1);
|
|
2156
2167
|
const i = l && l & Vn.KW_REQUIRED, s = l && l & Vn.KW_CREATE, a = l && l & Vn.KW_EXTRACT;
|
|
2157
|
-
return void 0 === o ? s &&
|
|
2168
|
+
return void 0 === o ? s && Qr(r) && t ? (Dl(e, t, n, r), r) : (i && (cr(`path not found: '${n}'`), Ar(t)), r) : Qr(o) ? (a && Tl(e, t, n), o) : s && null === o && Qr(r) ? (Dl(e, t, n, r), r) : s && null === o ? (i && (cr(`path not found: '${n}'`), Ar(t)), r) : ((i || s) && (cr(`${e ? Rt(e) + ": " : ""}path MUST BE a json list: '${n}'` + (s ? ", cannot create" : "")), Ar(t)), r);
|
|
2158
2169
|
}
|
|
2159
|
-
function
|
|
2160
|
-
if (e && !
|
|
2161
|
-
if (!
|
|
2162
|
-
if ("" === n) return
|
|
2163
|
-
if (n.split("`").includes("")) return
|
|
2170
|
+
function Dl(e, t, n, r) {
|
|
2171
|
+
if (e && !ol(e) && cr("GObj bad instanceof"), !zr(t)) return cr("kw is not an object"), -1;
|
|
2172
|
+
if (!Xr(n)) return cr(`${e ? Rt(e) + ": " : ""}kw_set_dict_value(): path must be a string: ${String(n)}`), -1;
|
|
2173
|
+
if ("" === n) return cr((e ? Rt(e) + ": " : "") + "kw_set_dict_value(): path empty"), -1;
|
|
2174
|
+
if (n.split("`").includes("")) return cr(`${e ? Rt(e) + ": " : ""}kw_set_dict_value(): empty segment in path: '${n}'`), -1;
|
|
2164
2175
|
let l = n.split("`"), o = l.length;
|
|
2165
2176
|
for (let i = 0; i < o; i++) {
|
|
2166
2177
|
let s = l[i];
|
|
2167
|
-
if (
|
|
2168
|
-
const r =
|
|
2169
|
-
if (r < 0) return
|
|
2178
|
+
if (Qr(t)) {
|
|
2179
|
+
const r = El(t, s);
|
|
2180
|
+
if (r < 0) return cr(`${e ? Rt(e) + ": " : ""}kw_set_dict_value(): segment '${s}' is not an index of its list: '${n}'`), -1;
|
|
2170
2181
|
s = String(r);
|
|
2171
2182
|
}
|
|
2172
|
-
if (i === o - 1)
|
|
2183
|
+
if (i === o - 1) hl(t, s, r);
|
|
2173
2184
|
else {
|
|
2174
|
-
let r =
|
|
2175
|
-
if (void 0 === r)
|
|
2176
|
-
else if (!
|
|
2185
|
+
let r = ml(t, s) ? void 0 : t[s];
|
|
2186
|
+
if (void 0 === r) hl(t, s, {});
|
|
2187
|
+
else if (!zr(r) && !Qr(r)) return cr(`${e ? Rt(e) + ": " : ""}kw_set_dict_value(): segment '${s}' is not a dict or a list: '${n}'`), -1;
|
|
2177
2188
|
t = t[s];
|
|
2178
2189
|
}
|
|
2179
2190
|
}
|
|
2180
2191
|
return 0;
|
|
2181
2192
|
}
|
|
2182
|
-
function
|
|
2183
|
-
if (e && !
|
|
2184
|
-
let o =
|
|
2193
|
+
function Al(e, t, n, r, l) {
|
|
2194
|
+
if (e && !ol(e) && cr("GObj bad instanceof"), !zr(t)) return cr("kw is not an object"), -1;
|
|
2195
|
+
let o = yl(e, t, n, !1);
|
|
2185
2196
|
if (void 0 === o) {
|
|
2186
|
-
if (!
|
|
2197
|
+
if (!Xr(n) || function(e, t) {
|
|
2187
2198
|
let n = t.split("`"), r = e;
|
|
2188
2199
|
for (let e = 0; e < n.length - 1; e++) {
|
|
2189
|
-
if (
|
|
2190
|
-
const t =
|
|
2200
|
+
if (Qr(r)) {
|
|
2201
|
+
const t = El(r, n[e]);
|
|
2191
2202
|
if (t < 0) return !1;
|
|
2192
2203
|
r = r[t];
|
|
2193
2204
|
} else r = Object.prototype.hasOwnProperty.call(r, n[e]) ? r[n[e]] : void 0;
|
|
2194
2205
|
if (null == r) return !1;
|
|
2195
|
-
if (!
|
|
2206
|
+
if (!zr(r) && !Qr(r)) return !0;
|
|
2196
2207
|
}
|
|
2197
2208
|
return !1;
|
|
2198
2209
|
}(t, n)) return -1;
|
|
2199
|
-
if (o = {},
|
|
2210
|
+
if (o = {}, Dl(e, t, n, o) < 0) return -1;
|
|
2200
2211
|
}
|
|
2201
|
-
return
|
|
2212
|
+
return zr(o) ? (hl(o, r, l), 0) : (cr(`subdict is not an object: '${n}'`), -1);
|
|
2202
2213
|
}
|
|
2203
|
-
function
|
|
2214
|
+
function kl(e, n, r) {
|
|
2204
2215
|
let l = "", o = !1;
|
|
2205
|
-
if (
|
|
2216
|
+
if (Qr(n)) {
|
|
2206
2217
|
o = !1;
|
|
2207
2218
|
for (let i = 0; i < n.length; i++) {
|
|
2208
2219
|
let s = n[i];
|
|
2209
|
-
if (l =
|
|
2220
|
+
if (l = il(r) ? t("%s", r) : t("%s`%d", r, i), o = kl(e, s, l), o) break;
|
|
2210
2221
|
}
|
|
2211
|
-
} else if (
|
|
2222
|
+
} else if (zr(n)) {
|
|
2212
2223
|
o = !0;
|
|
2213
2224
|
let i = Object.keys(n);
|
|
2214
2225
|
for (let s = 0; s < i.length; s++) {
|
|
2215
2226
|
let a = i[s], u = n[a];
|
|
2216
|
-
if (l =
|
|
2217
|
-
if (o =
|
|
2227
|
+
if (l = il(r) ? t("%s", a) : t("%s`%s", r, a), Qr(u) || zr(u)) {
|
|
2228
|
+
if (o = kl(e, u, l), !o) break;
|
|
2218
2229
|
continue;
|
|
2219
2230
|
}
|
|
2220
|
-
let _ =
|
|
2221
|
-
if (void 0 === _ && (_ =
|
|
2231
|
+
let _ = $l(0, e, l, void 0, 0);
|
|
2232
|
+
if (void 0 === _ && (_ = Fr(e, l)), void 0 === _) {
|
|
2222
2233
|
o = !1;
|
|
2223
2234
|
break;
|
|
2224
2235
|
}
|
|
2225
|
-
if (0 !==
|
|
2236
|
+
if (0 !== cl(_, u)) {
|
|
2226
2237
|
o = !1;
|
|
2227
2238
|
break;
|
|
2228
2239
|
}
|
|
@@ -2230,92 +2241,92 @@ function Dl(e, n, r) {
|
|
|
2230
2241
|
}
|
|
2231
2242
|
return o;
|
|
2232
2243
|
}
|
|
2233
|
-
function
|
|
2234
|
-
return 0 ===
|
|
2244
|
+
function Il(e, t) {
|
|
2245
|
+
return 0 === qr(t) || kl(e, t, "");
|
|
2235
2246
|
}
|
|
2236
|
-
function
|
|
2237
|
-
if (!n || !
|
|
2238
|
-
for (let e = 0; e < t.length; e++) if (
|
|
2239
|
-
return r &&
|
|
2247
|
+
function Cl(e, t, n, r) {
|
|
2248
|
+
if (!n || !Qr(t)) return r && cr("item NULL or kw_list is not a list"), -1;
|
|
2249
|
+
for (let e = 0; e < t.length; e++) if (Cr(n, t[e])) return e;
|
|
2250
|
+
return r && cr("item not found in this list"), -1;
|
|
2240
2251
|
}
|
|
2241
|
-
function
|
|
2242
|
-
if (e && !
|
|
2243
|
-
r || (r =
|
|
2252
|
+
function Ll(e, t, n, r) {
|
|
2253
|
+
if (e && !ol(e) && cr("GObj bad instanceof"), !t) return null;
|
|
2254
|
+
r || (r = Il);
|
|
2244
2255
|
let l = [];
|
|
2245
|
-
if (
|
|
2256
|
+
if (Qr(t)) for (let e = 0; e < t.length; e++) {
|
|
2246
2257
|
let o = t[e];
|
|
2247
|
-
r(o, n) && l.push(
|
|
2258
|
+
r(o, n) && l.push(kr(o));
|
|
2248
2259
|
}
|
|
2249
2260
|
else {
|
|
2250
|
-
if (!
|
|
2251
|
-
r(t, n) && l.push(
|
|
2261
|
+
if (!zr(t)) return cr("kw_select() BAD kw parameter"), null;
|
|
2262
|
+
r(t, n) && l.push(kr(t));
|
|
2252
2263
|
}
|
|
2253
2264
|
return l;
|
|
2254
2265
|
}
|
|
2255
|
-
function
|
|
2256
|
-
if (e && !
|
|
2257
|
-
r || (r =
|
|
2266
|
+
function Pl(e, t, n, r) {
|
|
2267
|
+
if (e && !ol(e) && cr("GObj bad instanceof"), !t) return null;
|
|
2268
|
+
r || (r = Il);
|
|
2258
2269
|
let l = [];
|
|
2259
|
-
if (
|
|
2270
|
+
if (Qr(t)) for (let e = 0; e < t.length; e++) {
|
|
2260
2271
|
let o = t[e];
|
|
2261
2272
|
r(o, n) && l.push(o);
|
|
2262
2273
|
}
|
|
2263
2274
|
else {
|
|
2264
|
-
if (!
|
|
2275
|
+
if (!zr(t)) return cr("kw_select() BAD kw parameter"), null;
|
|
2265
2276
|
r(t, n) && l.push(t);
|
|
2266
2277
|
}
|
|
2267
2278
|
return l;
|
|
2268
2279
|
}
|
|
2269
|
-
function
|
|
2270
|
-
e && !
|
|
2280
|
+
function Ul(e, t, n, r) {
|
|
2281
|
+
e && !ol(e) && cr("GObj bad instanceof");
|
|
2271
2282
|
let l = {};
|
|
2272
|
-
if (
|
|
2283
|
+
if (Xr(n) && !il(n)) {
|
|
2273
2284
|
let o = n;
|
|
2274
|
-
Object.prototype.hasOwnProperty.call(t, o) ?
|
|
2275
|
-
} else if (
|
|
2285
|
+
Object.prototype.hasOwnProperty.call(t, o) ? hl(l, o, t[o]) : r && cr(`${Rt(e)}: key not found: ${o}`);
|
|
2286
|
+
} else if (zr(n) && Br(n) > 0) for (let o of Object.keys(n)) Object.prototype.hasOwnProperty.call(t, o) ? hl(l, o, t[o]) : r && cr(`${Rt(e)}: key not found: ${o}`);
|
|
2276
2287
|
else {
|
|
2277
|
-
if (!(
|
|
2288
|
+
if (!(Qr(n) && Jr(n) > 0)) return t;
|
|
2278
2289
|
for (let o = 0; o < n.length; o++) {
|
|
2279
2290
|
let i = n[o];
|
|
2280
|
-
Object.prototype.hasOwnProperty.call(t, i) ?
|
|
2291
|
+
Object.prototype.hasOwnProperty.call(t, i) ? hl(l, i, t[i]) : r && cr(`${Rt(e)}: key not found: ${i}`);
|
|
2281
2292
|
}
|
|
2282
2293
|
}
|
|
2283
2294
|
return l;
|
|
2284
2295
|
}
|
|
2285
|
-
function
|
|
2296
|
+
function Fl(e, t, n, r) {
|
|
2286
2297
|
let l = {};
|
|
2287
|
-
if (!
|
|
2288
|
-
if (
|
|
2298
|
+
if (!zr(t)) return l;
|
|
2299
|
+
if (Lr(l, t), Xr(n) && !il(n)) {
|
|
2289
2300
|
let o = n;
|
|
2290
|
-
Object.prototype.hasOwnProperty.call(t, o) ?
|
|
2291
|
-
} else if (
|
|
2301
|
+
Object.prototype.hasOwnProperty.call(t, o) ? Vr(l, o) : r && cr(`${Rt(e)}: key not found: ${o}`);
|
|
2302
|
+
} else if (zr(n) && Br(n) > 0) for (let o of Object.keys(n)) Object.prototype.hasOwnProperty.call(t, o) ? Vr(l, o) : r && cr(`${Rt(e)}: key not found: ${o}`);
|
|
2292
2303
|
else {
|
|
2293
|
-
if (!(
|
|
2304
|
+
if (!(Qr(n) && Jr(n) > 0)) return {};
|
|
2294
2305
|
for (let o = 0; o < n.length; o++) {
|
|
2295
2306
|
let i = n[o];
|
|
2296
|
-
Object.prototype.hasOwnProperty.call(t, i) ?
|
|
2307
|
+
Object.prototype.hasOwnProperty.call(t, i) ? Vr(l, i) : r && cr(`${Rt(e)}: key not found: ${i}`);
|
|
2297
2308
|
}
|
|
2298
2309
|
}
|
|
2299
2310
|
return l;
|
|
2300
2311
|
}
|
|
2301
|
-
function
|
|
2312
|
+
function Vl(e, t, n = !1) {
|
|
2302
2313
|
if ("undefined" != typeof window && window.localStorage) try {
|
|
2303
2314
|
let r = window.localStorage.getItem(e);
|
|
2304
|
-
return null === r ? (n &&
|
|
2315
|
+
return null === r ? (n && Gl(e, t), t) : JSON.parse(r);
|
|
2305
2316
|
} catch (n) {
|
|
2306
2317
|
return window.console.warn(`Error reading localStorage key "${e}":`, n), t;
|
|
2307
2318
|
}
|
|
2308
2319
|
}
|
|
2309
|
-
function
|
|
2320
|
+
function Gl(e, t) {
|
|
2310
2321
|
if ("undefined" == typeof window || !window.localStorage) return 0;
|
|
2311
|
-
if (!e || void 0 === t) return
|
|
2322
|
+
if (!e || void 0 === t) return cr(`kw_set_local_storage_value(): invalid key or value: key=${e}`), -1;
|
|
2312
2323
|
try {
|
|
2313
2324
|
return window.localStorage.setItem(e, JSON.stringify(t)), 0;
|
|
2314
2325
|
} catch (t) {
|
|
2315
|
-
return
|
|
2326
|
+
return cr(`kw_set_local_storage_value(): cannot save "${e}" (storage full or blocked?): ${t && t.message ? t.message : t}`), -1;
|
|
2316
2327
|
}
|
|
2317
2328
|
}
|
|
2318
|
-
function
|
|
2329
|
+
function Ml(e) {
|
|
2319
2330
|
if ("undefined" != typeof window && window.localStorage) if (e) try {
|
|
2320
2331
|
window.localStorage.removeItem(e);
|
|
2321
2332
|
} catch (t) {
|
|
@@ -2323,125 +2334,125 @@ function Vl(e) {
|
|
|
2323
2334
|
}
|
|
2324
2335
|
else window.console.warn(`Invalid key for localStorage removal: ${e}`);
|
|
2325
2336
|
}
|
|
2326
|
-
function
|
|
2327
|
-
if (
|
|
2328
|
-
if (
|
|
2337
|
+
function Wl(e, t) {
|
|
2338
|
+
if (tl(e) || tl(t)) return !0;
|
|
2339
|
+
if (Qr(e)) {
|
|
2329
2340
|
if (0 === e.length) return !0;
|
|
2330
2341
|
for (let n = 0; n < e.length; n++) if (e[n] === t) return !0;
|
|
2331
|
-
} else if (
|
|
2342
|
+
} else if (zr(e)) {
|
|
2332
2343
|
if (0 === Object.keys(e).length) return !0;
|
|
2333
2344
|
for (let n in e) if (n === t) return !0;
|
|
2334
|
-
} else if (
|
|
2345
|
+
} else if (Xr(e) && e === t) return !0;
|
|
2335
2346
|
return !1;
|
|
2336
2347
|
}
|
|
2337
|
-
function
|
|
2338
|
-
if (e && !
|
|
2339
|
-
l || (l =
|
|
2348
|
+
function xl(e, t, n, r, l) {
|
|
2349
|
+
if (e && !ol(e) && cr("GObj bad instanceof"), !t) return null;
|
|
2350
|
+
l || (l = Il);
|
|
2340
2351
|
let o = [];
|
|
2341
|
-
if (
|
|
2352
|
+
if (Qr(t)) for (let i = 0; i < t.length; i++) {
|
|
2342
2353
|
let s, a = t[i];
|
|
2343
|
-
if (
|
|
2354
|
+
if (zr(a)) s = Nl(e, a, "id", "", 0);
|
|
2344
2355
|
else {
|
|
2345
|
-
if (!
|
|
2356
|
+
if (!Xr(a)) continue;
|
|
2346
2357
|
s = a;
|
|
2347
2358
|
}
|
|
2348
|
-
|
|
2359
|
+
Wl(n, s) && l(a, r) && o.push(a);
|
|
2349
2360
|
}
|
|
2350
2361
|
else {
|
|
2351
|
-
if (!
|
|
2362
|
+
if (!zr(t)) return cr("kw_collect() BAD kw parameter"), null;
|
|
2352
2363
|
for (let e of Object.keys(t)) {
|
|
2353
2364
|
let i = t[e];
|
|
2354
|
-
|
|
2365
|
+
Wl(n, e) && l(i, r) && o.push(i);
|
|
2355
2366
|
}
|
|
2356
2367
|
}
|
|
2357
2368
|
return o;
|
|
2358
2369
|
}
|
|
2359
|
-
function
|
|
2360
|
-
e && !
|
|
2370
|
+
function Kl(e, t, n) {
|
|
2371
|
+
e && !ol(e) && cr("GObj bad instanceof");
|
|
2361
2372
|
let r = {};
|
|
2362
|
-
if (
|
|
2363
|
-
else if (
|
|
2364
|
-
let l = t[n], o =
|
|
2365
|
-
|
|
2373
|
+
if (il(n) || (t = yl(e, t, n)), zr(t)) r = t;
|
|
2374
|
+
else if (Qr(t)) for (let n = 0; n < t.length; n++) {
|
|
2375
|
+
let l = t[n], o = Nl(e, l, "id", "", Vn.KW_REQUIRED);
|
|
2376
|
+
il(o) || hl(r, o, l);
|
|
2366
2377
|
}
|
|
2367
|
-
else
|
|
2378
|
+
else cr(`${Rt(e)} kwid_new_dict: data type unknown`);
|
|
2368
2379
|
return r;
|
|
2369
2380
|
}
|
|
2370
|
-
function
|
|
2371
|
-
if (e && !
|
|
2372
|
-
if (
|
|
2381
|
+
function Yl(e, t, n) {
|
|
2382
|
+
if (e && !ol(e) && cr("GObj bad instanceof"), il(n) || (t = yl(e, t, n)), Qr(t)) return t;
|
|
2383
|
+
if (zr(t)) {
|
|
2373
2384
|
let n = [];
|
|
2374
2385
|
for (let r of Object.keys(t)) {
|
|
2375
2386
|
let l = t[r];
|
|
2376
|
-
|
|
2387
|
+
zr(l) ? (l.id = r, n.push(l)) : cr(`${Rt(e)} kwid_new_list: not a record: '${r}'`);
|
|
2377
2388
|
}
|
|
2378
2389
|
return n;
|
|
2379
2390
|
}
|
|
2380
|
-
return
|
|
2391
|
+
return cr(`${Rt(e)} kwid_new_list: wrong type for list`), [];
|
|
2381
2392
|
}
|
|
2382
|
-
function
|
|
2383
|
-
e && !
|
|
2384
|
-
let o =
|
|
2393
|
+
function Bl(e, t, n, r, l) {
|
|
2394
|
+
e && !ol(e) && cr("GObj bad instanceof");
|
|
2395
|
+
let o = xl(e, t, n, r, l);
|
|
2385
2396
|
return o && 0 !== o.length ? o[0] : null;
|
|
2386
2397
|
}
|
|
2387
|
-
function
|
|
2388
|
-
if (e && !
|
|
2398
|
+
function Jl(e, t) {
|
|
2399
|
+
if (e && !ol(e) && cr("GObj bad instanceof"), !t) return [];
|
|
2389
2400
|
let n = [];
|
|
2390
|
-
if (
|
|
2391
|
-
else if (
|
|
2392
|
-
else
|
|
2393
|
-
if (
|
|
2394
|
-
else if (
|
|
2395
|
-
let r =
|
|
2401
|
+
if (Xr(t)) n.push(t);
|
|
2402
|
+
else if (zr(t)) for (let e in t) Object.prototype.hasOwnProperty.call(t, e) && n.push(e);
|
|
2403
|
+
else Qr(t) && t.forEach(function(t) {
|
|
2404
|
+
if (Xr(t)) il(t) || n.push(t);
|
|
2405
|
+
else if (zr(t)) {
|
|
2406
|
+
let r = Nl(e, t, "id", 0, 0);
|
|
2396
2407
|
r && n.push(r);
|
|
2397
2408
|
}
|
|
2398
2409
|
});
|
|
2399
2410
|
return n;
|
|
2400
2411
|
}
|
|
2401
|
-
function
|
|
2412
|
+
function ql(e, t, n) {
|
|
2402
2413
|
t = t || "id", n = n || "value";
|
|
2403
2414
|
let r = [];
|
|
2404
|
-
if (
|
|
2415
|
+
if (Qr(e)) for (let l = 0; l < e.length; l++) {
|
|
2405
2416
|
let o = e[l];
|
|
2406
|
-
if (
|
|
2417
|
+
if (Xr(o)) r.push({
|
|
2407
2418
|
id: e[l],
|
|
2408
2419
|
value: e[l]
|
|
2409
2420
|
});
|
|
2410
|
-
else if (
|
|
2421
|
+
else if (zr(o)) {
|
|
2411
2422
|
let e = {};
|
|
2412
|
-
if (
|
|
2413
|
-
if (!
|
|
2414
|
-
if (!(
|
|
2415
|
-
|
|
2423
|
+
if (pl(o, t)) {
|
|
2424
|
+
if (!pl(o, n)) {
|
|
2425
|
+
if (!(qr(o) > 0)) {
|
|
2426
|
+
cr("list2options(): object without field value: " + n);
|
|
2416
2427
|
continue;
|
|
2417
2428
|
}
|
|
2418
2429
|
n = Object.keys(o)[0];
|
|
2419
2430
|
}
|
|
2420
2431
|
e.id = o[t], e.value = o[n];
|
|
2421
2432
|
} else {
|
|
2422
|
-
if (!(
|
|
2423
|
-
|
|
2433
|
+
if (!(qr(o) > 0)) {
|
|
2434
|
+
cr("list2options(): object without field id: " + t);
|
|
2424
2435
|
continue;
|
|
2425
2436
|
}
|
|
2426
2437
|
t = Object.keys(o)[0], e.id = t, e.value = o[t];
|
|
2427
2438
|
}
|
|
2428
2439
|
r.push(e);
|
|
2429
|
-
} else
|
|
2440
|
+
} else cr("list2options(): case1 not implemented");
|
|
2430
2441
|
}
|
|
2431
|
-
else if (
|
|
2442
|
+
else if (zr(e)) for (let t of Object.keys(e)) r.push({
|
|
2432
2443
|
id: t,
|
|
2433
2444
|
value: t
|
|
2434
2445
|
});
|
|
2435
|
-
else
|
|
2446
|
+
else cr("list2options(): case2 not implemented");
|
|
2436
2447
|
return r;
|
|
2437
2448
|
}
|
|
2438
|
-
function
|
|
2449
|
+
function Hl(e, t) {
|
|
2439
2450
|
if (!e) return -1;
|
|
2440
2451
|
for (let n = 0; n < e.length; n++) if (e[n] && e[n].id === t) return n;
|
|
2441
2452
|
return -1;
|
|
2442
2453
|
}
|
|
2443
|
-
function
|
|
2444
|
-
if (!e || !t) return
|
|
2454
|
+
function zl(e, t, n) {
|
|
2455
|
+
if (!e || !t) return cr("ERROR: str_in_list() list or str empty"), !1;
|
|
2445
2456
|
let r = e.length;
|
|
2446
2457
|
if (n) {
|
|
2447
2458
|
t = t.toLowerCase();
|
|
@@ -2452,17 +2463,17 @@ function ql(e, t, n) {
|
|
|
2452
2463
|
} else for (let n = 0; n < r; n++) if (e[n] === t) return !0;
|
|
2453
2464
|
return !1;
|
|
2454
2465
|
}
|
|
2455
|
-
function
|
|
2456
|
-
if (!e) return
|
|
2457
|
-
if (!t) return
|
|
2458
|
-
for (let r = 0; r < t.length; r++) if (
|
|
2466
|
+
function Ql(e, t, n) {
|
|
2467
|
+
if (!e) return cr("ERROR: strs_in_list() list empty"), !1;
|
|
2468
|
+
if (!t) return cr("ERROR: strs_in_list() str empty"), !1;
|
|
2469
|
+
for (let r = 0; r < t.length; r++) if (zl(e, t[r], n)) return !0;
|
|
2459
2470
|
return !1;
|
|
2460
2471
|
}
|
|
2461
|
-
function
|
|
2472
|
+
function Xl(e, t) {
|
|
2462
2473
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return e.splice(n, 1), !0;
|
|
2463
2474
|
return !1;
|
|
2464
2475
|
}
|
|
2465
|
-
function
|
|
2476
|
+
function Zl(e, t) {
|
|
2466
2477
|
try {
|
|
2467
2478
|
let n = e.__md_iev__;
|
|
2468
2479
|
if (n) return n[t];
|
|
@@ -2470,53 +2481,53 @@ function Ql(e, t) {
|
|
|
2470
2481
|
return;
|
|
2471
2482
|
}
|
|
2472
2483
|
}
|
|
2473
|
-
function
|
|
2484
|
+
function eo(e, t, n) {
|
|
2474
2485
|
let r = e.__md_iev__;
|
|
2475
2486
|
r || (r = {}, e.__md_iev__ = r), r[t] = n;
|
|
2476
2487
|
}
|
|
2477
|
-
function
|
|
2478
|
-
if (!
|
|
2488
|
+
function to(e, t, n, r) {
|
|
2489
|
+
if (!ol(e)) return cr("gobj is not a GObj"), null;
|
|
2479
2490
|
if (!t) return;
|
|
2480
|
-
let l =
|
|
2481
|
-
l || (l = [],
|
|
2491
|
+
let l = Zl(t, n);
|
|
2492
|
+
l || (l = [], eo(t, n, l));
|
|
2482
2493
|
try {
|
|
2483
|
-
|
|
2494
|
+
Qr(l) && l.unshift(r);
|
|
2484
2495
|
} catch (e) {
|
|
2485
|
-
|
|
2496
|
+
cr(e);
|
|
2486
2497
|
}
|
|
2487
2498
|
}
|
|
2488
|
-
function
|
|
2489
|
-
if (!
|
|
2490
|
-
if (!
|
|
2491
|
-
let l =
|
|
2492
|
-
return l ? 0 === l.length ? (r &&
|
|
2499
|
+
function no(e, t, n, r) {
|
|
2500
|
+
if (!ol(e)) return cr("gobj is not a GObj"), null;
|
|
2501
|
+
if (!zr(t)) return cr("kw is not a dict"), null;
|
|
2502
|
+
let l = Zl(t, n);
|
|
2503
|
+
return l ? 0 === l.length ? (r && cr(`stack empty: ${n}`), null) : l[0] : (r && cr(`stack NOT FOUND: ${n}`), null);
|
|
2493
2504
|
}
|
|
2494
|
-
function
|
|
2495
|
-
return
|
|
2505
|
+
function ro(e, t, n) {
|
|
2506
|
+
return il(n) ? Tl(e, t, "__md_iev__`__msg_type__") : Al(e, t, "__md_iev__", "__msg_type__", n), 0;
|
|
2496
2507
|
}
|
|
2497
|
-
function
|
|
2498
|
-
return
|
|
2508
|
+
function lo(e, t) {
|
|
2509
|
+
return Nl(e, t, "__md_iev__`__msg_type__", "", 0);
|
|
2499
2510
|
}
|
|
2500
|
-
function
|
|
2511
|
+
function oo(e, t, n) {
|
|
2501
2512
|
let r = new XMLHttpRequest();
|
|
2502
2513
|
r.open("GET", e, !0), r.setRequestHeader("Accept", "application/json"), r.onreadystatechange = function() {
|
|
2503
2514
|
if (4 === r.readyState) if (200 === r.status || 0 === (e = r).status && e.responseText && e.responseURL.startsWith("file:")) try {
|
|
2504
2515
|
t(JSON.parse(r.responseText));
|
|
2505
2516
|
} catch (e) {
|
|
2506
|
-
n && (
|
|
2517
|
+
n && (cr(`JSON parse status ${r.status}, error: ${e.message}`), n(r.status));
|
|
2507
2518
|
}
|
|
2508
2519
|
else n && n(r.status);
|
|
2509
2520
|
var e;
|
|
2510
2521
|
}, r.send();
|
|
2511
2522
|
}
|
|
2512
|
-
function
|
|
2523
|
+
function io(e, t, n) {
|
|
2513
2524
|
let r = new XMLHttpRequest();
|
|
2514
2525
|
r.open("POST", e), r.setRequestHeader("Accept", "application/json"), r.setRequestHeader("Content-Type", "application/json"), r.onreadystatechange = function() {
|
|
2515
2526
|
4 === r.readyState && n(r.status, r.responseText);
|
|
2516
2527
|
}, r.send(t);
|
|
2517
2528
|
}
|
|
2518
|
-
function
|
|
2519
|
-
void 0 !== n &&
|
|
2529
|
+
function so(e, t, n) {
|
|
2530
|
+
void 0 !== n && Xr(n) || (n = "");
|
|
2520
2531
|
for (let r of Object.keys(e)) {
|
|
2521
2532
|
if (!Object.prototype.hasOwnProperty.call(e, r)) continue;
|
|
2522
2533
|
let l = (n.length ? "`" : "") + r;
|
|
@@ -2525,62 +2536,62 @@ function oo(e, t, n) {
|
|
|
2525
2536
|
r,
|
|
2526
2537
|
e[r],
|
|
2527
2538
|
n
|
|
2528
|
-
]),
|
|
2539
|
+
]), zr(e[r]) && so(e[r], t, n), n = n.slice(0, -l.length);
|
|
2529
2540
|
}
|
|
2530
2541
|
}
|
|
2531
|
-
function
|
|
2532
|
-
n && (e =
|
|
2533
|
-
let r =
|
|
2534
|
-
|
|
2535
|
-
let l =
|
|
2536
|
-
return
|
|
2537
|
-
"__" === t.substring(0, 2) ||
|
|
2542
|
+
function ao(e, t, n) {
|
|
2543
|
+
n && (e = kr(e));
|
|
2544
|
+
let r = $l(null, e, "type", [], Vn.KW_CREATE);
|
|
2545
|
+
Nl(null, e, "hook", "data", Vn.KW_CREATE);
|
|
2546
|
+
let l = $l(null, e, "schema", {}, Vn.KW_CREATE), o = $l(null, e, "topics", {}, Vn.KW_CREATE);
|
|
2547
|
+
return so(l, function(e, t, n, l) {
|
|
2548
|
+
"__" === t.substring(0, 2) || zr(n) || $l(null, o, l, kr(r), Vn.KW_CREATE);
|
|
2538
2549
|
}, t), e;
|
|
2539
2550
|
}
|
|
2540
|
-
function
|
|
2541
|
-
let l =
|
|
2542
|
-
if (!l) return
|
|
2543
|
-
if (!
|
|
2544
|
-
if (!
|
|
2545
|
-
if ("" !== n && n.split("`").includes("")) return
|
|
2551
|
+
function uo(e, t, n, r) {
|
|
2552
|
+
let l = $l(null, $l(null, e, "topics", null, 0), t, null, 0);
|
|
2553
|
+
if (!l) return cr("jdb_update: topic not found: " + t), null;
|
|
2554
|
+
if (!zr(r) || il(r.id)) return cr(`jdb_update: record without id: ${lr(r)}`), null;
|
|
2555
|
+
if (!Xr(n)) return cr(`jdb_update: path must be a string: ${String(n)}`), null;
|
|
2556
|
+
if ("" !== n && n.split("`").includes("")) return cr(`jdb_update: empty segment in path: '${n}'`), null;
|
|
2546
2557
|
let o, i, s = n.split("`"), a = l;
|
|
2547
|
-
for (; (o = s.shift()) && !
|
|
2548
|
-
if (!a || 0 !== s.length) return
|
|
2549
|
-
if (
|
|
2558
|
+
for (; (o = s.shift()) && !il(o) && a;) zr(a) && (a = $l(null, a, e.hook, null, 0)), a = bo(a, null, o, !1);
|
|
2559
|
+
if (!a || 0 !== s.length) return cr(`jdb_update: path not found in topic '${t}': '${n}'`), null;
|
|
2560
|
+
if (Qr(a)) i = a;
|
|
2550
2561
|
else {
|
|
2551
|
-
if (a.id === r.id) return
|
|
2552
|
-
if (i =
|
|
2553
|
-
else if (!
|
|
2554
|
-
}
|
|
2555
|
-
let u =
|
|
2556
|
-
return u ?
|
|
2557
|
-
}
|
|
2558
|
-
function ao(e, t, n, r) {
|
|
2559
|
-
let l = wl(null, wl(null, e, "topics", null, 0), t, null, 0);
|
|
2560
|
-
if (!l) return ur("jdb_delete: topic not found: " + t), null;
|
|
2561
|
-
if (!qr(r) || ll(r.id)) return ur(`jdb_delete: record without id: ${lr(r)}`), null;
|
|
2562
|
-
if (!zr(n)) return ur(`jdb_delete: path must be a string: ${String(n)}`), null;
|
|
2563
|
-
if ("" !== n && n.split("`").includes("")) return ur(`jdb_delete: empty segment in path: '${n}'`), null;
|
|
2564
|
-
let o, i = n.split("`"), s = l;
|
|
2565
|
-
for (; (o = i.shift()) && !ll(o) && s;) qr(s) && (s = wl(null, s, e.hook, null, 0)), s = fo(s, null, o, !1);
|
|
2566
|
-
if (!s || 0 !== i.length) return ur(`jdb_delete: path not found in topic '${t}': '${n}'`), null;
|
|
2567
|
-
let a = Hr(s) ? s : wl(null, s, e.hook, null, 0), u = Jl(a, r.id);
|
|
2568
|
-
return u < 0 ? (ur(`jdb_delete: record not found in topic '${t}': '${n}' '${r.id}'`), null) : (a.splice(u, 1), l);
|
|
2569
|
-
}
|
|
2570
|
-
function uo(e, t) {
|
|
2571
|
-
let n = wl(null, e, "topics", null, 0);
|
|
2572
|
-
if (!n) return ur("jdb topics section not found"), gr(e), null;
|
|
2573
|
-
return wl(null, n, t, null, 0) || (ur("jdb topic not found: " + t), gr(n), null);
|
|
2562
|
+
if (a.id === r.id) return Lr(a, r), l;
|
|
2563
|
+
if (i = $l(null, a, e.hook, null, 0), null == i) i = [], Gr(a, e.hook, i);
|
|
2564
|
+
else if (!Qr(i)) return cr(`jdb_update: the hook '${e.hook}' of '${n}' is not a list in topic '${t}'`), null;
|
|
2565
|
+
}
|
|
2566
|
+
let u = bo(i, e.hook, r.id, !1);
|
|
2567
|
+
return u ? Lr(u, r) : i.push(r), l;
|
|
2574
2568
|
}
|
|
2575
2569
|
function _o(e, t, n, r) {
|
|
2576
|
-
let l =
|
|
2577
|
-
|
|
2570
|
+
let l = $l(null, $l(null, e, "topics", null, 0), t, null, 0);
|
|
2571
|
+
if (!l) return cr("jdb_delete: topic not found: " + t), null;
|
|
2572
|
+
if (!zr(r) || il(r.id)) return cr(`jdb_delete: record without id: ${lr(r)}`), null;
|
|
2573
|
+
if (!Xr(n)) return cr(`jdb_delete: path must be a string: ${String(n)}`), null;
|
|
2574
|
+
if ("" !== n && n.split("`").includes("")) return cr(`jdb_delete: empty segment in path: '${n}'`), null;
|
|
2575
|
+
let o, i = n.split("`"), s = l;
|
|
2576
|
+
for (; (o = i.shift()) && !il(o) && s;) zr(s) && (s = $l(null, s, e.hook, null, 0)), s = bo(s, null, o, !1);
|
|
2577
|
+
if (!s || 0 !== i.length) return cr(`jdb_delete: path not found in topic '${t}': '${n}'`), null;
|
|
2578
|
+
let a = Qr(s) ? s : $l(null, s, e.hook, null, 0), u = Hl(a, r.id);
|
|
2579
|
+
return u < 0 ? (cr(`jdb_delete: record not found in topic '${t}': '${n}' '${r.id}'`), null) : (a.splice(u, 1), l);
|
|
2578
2580
|
}
|
|
2579
|
-
function co(e, t
|
|
2580
|
-
let
|
|
2581
|
-
|
|
2581
|
+
function co(e, t) {
|
|
2582
|
+
let n = $l(null, e, "topics", null, 0);
|
|
2583
|
+
if (!n) return cr("jdb topics section not found"), br(e), null;
|
|
2584
|
+
return $l(null, n, t, null, 0) || (cr("jdb topic not found: " + t), br(n), null);
|
|
2582
2585
|
}
|
|
2583
2586
|
function fo(e, t, n, r) {
|
|
2587
|
+
let l = $l(null, $l(null, e, "topics", null, 0), t, null, 0);
|
|
2588
|
+
return l ? (void 0 === r && (r = !0), bo(l, e.hook, n, r)) : (cr("jdb_get: topic not found: " + t), null);
|
|
2589
|
+
}
|
|
2590
|
+
function go(e, t, n) {
|
|
2591
|
+
let r = $l(null, $l(null, e, "topics", null, 0), t, null, 0);
|
|
2592
|
+
return r ? n < r.length ? r[n] : {} : (cr("jdb_get_by_idx: topic not found: " + t), null);
|
|
2593
|
+
}
|
|
2594
|
+
function bo(e, t, n, r) {
|
|
2584
2595
|
if (!e) return null;
|
|
2585
2596
|
let l, o = e.length;
|
|
2586
2597
|
for (l = 0; l < o; l++) {
|
|
@@ -2588,19 +2599,19 @@ function fo(e, t, n, r) {
|
|
|
2588
2599
|
if (o) {
|
|
2589
2600
|
let e = o.id;
|
|
2590
2601
|
if (e && e === n) return o;
|
|
2591
|
-
if (r &&
|
|
2592
|
-
let e =
|
|
2602
|
+
if (r && pl(o, t)) {
|
|
2603
|
+
let e = bo(o[t], t, n, r);
|
|
2593
2604
|
if (e) return e;
|
|
2594
2605
|
}
|
|
2595
2606
|
}
|
|
2596
2607
|
}
|
|
2597
2608
|
return null;
|
|
2598
2609
|
}
|
|
2599
|
-
function
|
|
2600
|
-
let n =
|
|
2601
|
-
return
|
|
2610
|
+
function po(e, t) {
|
|
2611
|
+
let n = kr(e);
|
|
2612
|
+
return Pr(n, t), n;
|
|
2602
2613
|
}
|
|
2603
|
-
function
|
|
2614
|
+
function mo(e) {
|
|
2604
2615
|
function t(e) {
|
|
2605
2616
|
let t = e.replace(/-/g, "+").replace(/_/g, "/");
|
|
2606
2617
|
switch (t.length % 4) {
|
|
@@ -2631,9 +2642,9 @@ function bo(e) {
|
|
|
2631
2642
|
signature: t(n[2])
|
|
2632
2643
|
};
|
|
2633
2644
|
}
|
|
2634
|
-
function
|
|
2645
|
+
function ho(e, t) {
|
|
2635
2646
|
try {
|
|
2636
|
-
let n =
|
|
2647
|
+
let n = mo(e);
|
|
2637
2648
|
switch (t) {
|
|
2638
2649
|
case "header": return JSON.parse(n.header);
|
|
2639
2650
|
case "signature": return JSON.parse(n.signature);
|
|
@@ -2643,15 +2654,15 @@ function po(e, t) {
|
|
|
2643
2654
|
return null;
|
|
2644
2655
|
}
|
|
2645
2656
|
}
|
|
2646
|
-
function
|
|
2657
|
+
function Eo(e) {
|
|
2647
2658
|
return null == e ? "" : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2648
2659
|
}
|
|
2649
|
-
function
|
|
2660
|
+
function yo(e) {
|
|
2650
2661
|
if (!e) return "";
|
|
2651
2662
|
const t = String(e).trim();
|
|
2652
|
-
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" :
|
|
2663
|
+
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" : Eo(t);
|
|
2653
2664
|
}
|
|
2654
|
-
var
|
|
2665
|
+
var To = class {
|
|
2655
2666
|
constructor(e) {
|
|
2656
2667
|
this.html = e, Object.freeze(this);
|
|
2657
2668
|
}
|
|
@@ -2659,52 +2670,52 @@ var Eo = class {
|
|
|
2659
2670
|
return this.html;
|
|
2660
2671
|
}
|
|
2661
2672
|
};
|
|
2662
|
-
function
|
|
2663
|
-
return "string" != typeof e ? (
|
|
2673
|
+
function vo(e) {
|
|
2674
|
+
return "string" != typeof e ? (cr("html_markup: not a string, type " + typeof e), new To("")) : new To(e);
|
|
2664
2675
|
}
|
|
2665
|
-
function
|
|
2666
|
-
return e instanceof
|
|
2676
|
+
function Oo(e) {
|
|
2677
|
+
return e instanceof To;
|
|
2667
2678
|
}
|
|
2668
|
-
function
|
|
2679
|
+
function So(e) {
|
|
2669
2680
|
const t = document.createElement("template");
|
|
2670
2681
|
return t.innerHTML = e.html.trim(), t.content;
|
|
2671
2682
|
}
|
|
2672
|
-
var
|
|
2673
|
-
function
|
|
2674
|
-
|
|
2683
|
+
var No = !1, wo = /* @__PURE__ */ new Set();
|
|
2684
|
+
function jo(e) {
|
|
2685
|
+
No = !!e;
|
|
2675
2686
|
}
|
|
2676
|
-
function
|
|
2677
|
-
return
|
|
2687
|
+
function $o() {
|
|
2688
|
+
return No;
|
|
2678
2689
|
}
|
|
2679
|
-
function
|
|
2690
|
+
function Ro(e) {
|
|
2680
2691
|
const t = document.createElement("template");
|
|
2681
2692
|
return t.innerHTML = e.trim(), t.content.firstChild;
|
|
2682
2693
|
}
|
|
2683
|
-
function
|
|
2694
|
+
function Do(e, t) {
|
|
2684
2695
|
let [n, r, l, o] = e;
|
|
2685
|
-
if (!n) return void
|
|
2696
|
+
if (!n) return void cr("Tag must be a valid HTML element.");
|
|
2686
2697
|
let i = document.createElement(n), s = "";
|
|
2687
2698
|
if (r && "object" == typeof r) for (let e of Object.keys(r)) if ("style" === e && "object" == typeof r[e]) {
|
|
2688
2699
|
let t = "";
|
|
2689
2700
|
for (const n of Object.keys(r[e])) t += `${n}: ${r[e][n]};`;
|
|
2690
2701
|
i.style.cssText = t;
|
|
2691
2702
|
} 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]);
|
|
2692
|
-
if (
|
|
2693
|
-
else if (
|
|
2703
|
+
if (Oo(l)) i.appendChild(So(l));
|
|
2704
|
+
else if (Xr(l)) if (l = l.trim(), l.length > 0 && "<" === l[0] && !No) i.appendChild(Ro(l));
|
|
2694
2705
|
else if (l.length > 0 && "<" === l[0] && function(e) {
|
|
2695
|
-
if (
|
|
2706
|
+
if (wo.size >= 100) return;
|
|
2696
2707
|
const t = e.slice(0, 80);
|
|
2697
|
-
|
|
2708
|
+
wo.has(t) || (wo.add(t), fr(`createElement2: a string that starts with '<' is TEXT (set_strings_are_text): use html_markup() if it is markup: ${JSON.stringify(t)}`));
|
|
2698
2709
|
}(l), t && s) i.textContent = t(s) || l;
|
|
2699
2710
|
else i.textContent = l;
|
|
2700
|
-
else if (
|
|
2701
|
-
if (l.length > 0) if (
|
|
2702
|
-
else for (let e of l) Array.isArray(e) ? e.length > 0 && i.appendChild(
|
|
2703
|
-
} else l instanceof HTMLElement || l instanceof Text || l instanceof SVGElement ? i.appendChild(l) : null != l && (
|
|
2711
|
+
else if (Qr(l)) {
|
|
2712
|
+
if (l.length > 0) if (Xr(l[0])) i.appendChild(Do(l, t));
|
|
2713
|
+
else for (let e of l) Array.isArray(e) ? e.length > 0 && i.appendChild(Do(e, t)) : e instanceof Node ? i.appendChild(e) : Oo(e) ? i.appendChild(So(e)) : Xr(e) ? i.appendChild(document.createTextNode(e)) : null != e && !1 !== e && cr("createElement2: child ignored, type " + typeof e);
|
|
2714
|
+
} else l instanceof HTMLElement || l instanceof Text || l instanceof SVGElement ? i.appendChild(l) : null != l && (cr("content ignored"), pr(l));
|
|
2704
2715
|
if (o && "object" == typeof o) for (const e of Object.keys(o)) i.addEventListener(e, o[e]);
|
|
2705
2716
|
return i;
|
|
2706
2717
|
}
|
|
2707
|
-
function
|
|
2718
|
+
function Ao(e) {
|
|
2708
2719
|
if (!e) return {
|
|
2709
2720
|
top: 0,
|
|
2710
2721
|
left: 0,
|
|
@@ -2724,11 +2735,11 @@ function Ro(e) {
|
|
|
2724
2735
|
bottom: t + i + l
|
|
2725
2736
|
};
|
|
2726
2737
|
}
|
|
2727
|
-
function
|
|
2738
|
+
function ko(e) {
|
|
2728
2739
|
return new DOMParser().parseFromString(e, "image/svg+xml").firstChild;
|
|
2729
2740
|
}
|
|
2730
|
-
function
|
|
2731
|
-
if (!
|
|
2741
|
+
function Io(e, t) {
|
|
2742
|
+
if (!ll(t)) return void cr("You must supply a translation function");
|
|
2732
2743
|
e || (e = document);
|
|
2733
2744
|
const n = (t) => {
|
|
2734
2745
|
let n = [];
|
|
@@ -2751,41 +2762,41 @@ function Ao(e, t) {
|
|
|
2751
2762
|
n && e.setAttribute("placeholder", t(n));
|
|
2752
2763
|
});
|
|
2753
2764
|
}
|
|
2754
|
-
function
|
|
2765
|
+
function Co(e = "Time Tracker", t = !1) {
|
|
2755
2766
|
const n = e, r = performance.now();
|
|
2756
2767
|
let l = r;
|
|
2757
|
-
return t &&
|
|
2768
|
+
return t && fr(`--\x3e ${n} - starting`), { mark: (e = "Intermediate", o = "") => {
|
|
2758
2769
|
const i = performance.now(), s = (i - l) / 1e3, a = (i - r) / 1e3;
|
|
2759
|
-
return t &&
|
|
2770
|
+
return t && fr(`--\x3e ${n} ${e} - partial: ${s} sec, total: ${a} sec, ${o}`), l = i, {
|
|
2760
2771
|
partial: s,
|
|
2761
2772
|
total: a
|
|
2762
2773
|
};
|
|
2763
2774
|
} };
|
|
2764
2775
|
}
|
|
2765
|
-
function
|
|
2776
|
+
function Lo(e) {
|
|
2766
2777
|
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();
|
|
2767
2778
|
return `${n}.${r}${l > 0 ? "-" : "+"}${t(Math.floor(Math.abs(l) / 60), 2)}${t(Math.abs(l) % 60, 2)}`;
|
|
2768
2779
|
}
|
|
2769
|
-
function
|
|
2780
|
+
function Po() {
|
|
2770
2781
|
return Math.floor(Date.now() / 1e3);
|
|
2771
2782
|
}
|
|
2772
|
-
function
|
|
2783
|
+
function Uo(e, t) {
|
|
2773
2784
|
if (!e) throw "ERROR: index_in_list() list empty";
|
|
2774
2785
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return n;
|
|
2775
2786
|
return -1;
|
|
2776
2787
|
}
|
|
2777
|
-
function
|
|
2788
|
+
function Fo() {
|
|
2778
2789
|
let e = "";
|
|
2779
2790
|
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;
|
|
2780
2791
|
}
|
|
2781
|
-
function
|
|
2792
|
+
function Vo(e) {
|
|
2782
2793
|
return e.replace(/[?# ^:]/g, "_");
|
|
2783
2794
|
}
|
|
2784
|
-
function
|
|
2795
|
+
function Go(e) {
|
|
2785
2796
|
let t = null;
|
|
2786
2797
|
return "function" != typeof e && "object" != typeof e || (t = ("" + e).match(/function\s*([\w\$]*)\s*\(/)), null !== t ? t[1] + "()" : "";
|
|
2787
2798
|
}
|
|
2788
|
-
function
|
|
2799
|
+
function Mo(e, t = 0, n = !1) {
|
|
2789
2800
|
let r = null, l = null, o = null;
|
|
2790
2801
|
const i = (...i) => {
|
|
2791
2802
|
o = this, l = i;
|
|
@@ -2800,20 +2811,20 @@ function Vo(e, t = 0, n = !1) {
|
|
|
2800
2811
|
clearTimeout(r), r = null, l = null, o = null;
|
|
2801
2812
|
}, i;
|
|
2802
2813
|
}
|
|
2803
|
-
function
|
|
2814
|
+
function Wo(...e) {
|
|
2804
2815
|
let t = "", n = 0;
|
|
2805
2816
|
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++));
|
|
2806
2817
|
return t;
|
|
2807
2818
|
}
|
|
2808
|
-
var
|
|
2809
|
-
function
|
|
2819
|
+
var xo = 256, Ko = 1e5;
|
|
2820
|
+
function Yo(e) {
|
|
2810
2821
|
const t = String(e).replace(/`/g, "``");
|
|
2811
2822
|
return "[" === t[0] ? "[" + t : t;
|
|
2812
2823
|
}
|
|
2813
|
-
function
|
|
2814
|
-
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` :
|
|
2824
|
+
function Bo(e) {
|
|
2825
|
+
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` : Yo(e)).join("`") : "";
|
|
2815
2826
|
}
|
|
2816
|
-
function
|
|
2827
|
+
function Jo(e) {
|
|
2817
2828
|
if ("string" != typeof e) return null;
|
|
2818
2829
|
let t = [], n = "";
|
|
2819
2830
|
for (let r = 0; r < e.length; r++) if ("`" !== e[r]) n += e[r];
|
|
@@ -2834,9 +2845,9 @@ function Yo(e) {
|
|
|
2834
2845
|
return null !== t ? t : "[" === e[0] && "[" === e[1] ? e.slice(1) : e;
|
|
2835
2846
|
});
|
|
2836
2847
|
}
|
|
2837
|
-
function
|
|
2848
|
+
function qo(e) {
|
|
2838
2849
|
const t = {}, n = (e, r, l) => {
|
|
2839
|
-
if (l >
|
|
2850
|
+
if (l > xo) throw new Error("json2flat: deeper than 256");
|
|
2840
2851
|
if (null === e || "object" != typeof e || Array.isArray(e)) {
|
|
2841
2852
|
if (Array.isArray(e) && e.length > 0) return void e.forEach((e, t) => {
|
|
2842
2853
|
const o = `[${t}]`;
|
|
@@ -2846,30 +2857,30 @@ function Bo(e) {
|
|
|
2846
2857
|
const t = Object.keys(e);
|
|
2847
2858
|
if (t.length > 0) {
|
|
2848
2859
|
for (const o of t) {
|
|
2849
|
-
const t =
|
|
2860
|
+
const t = Yo(o);
|
|
2850
2861
|
n(e[o], 0 === l ? t : r + "`" + t, l + 1);
|
|
2851
2862
|
}
|
|
2852
2863
|
return;
|
|
2853
2864
|
}
|
|
2854
2865
|
}
|
|
2855
|
-
0 !== l &&
|
|
2866
|
+
0 !== l && hl(t, r, e);
|
|
2856
2867
|
};
|
|
2857
2868
|
return null == e || n(e, "", 0), t;
|
|
2858
2869
|
}
|
|
2859
|
-
function
|
|
2870
|
+
function Ho(e) {
|
|
2860
2871
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat2json: a flat json is an object of id -> value");
|
|
2861
2872
|
let t = null;
|
|
2862
2873
|
for (const n of Object.keys(e)) {
|
|
2863
|
-
const r =
|
|
2874
|
+
const r = Jo(n);
|
|
2864
2875
|
if (!r || 0 === r.length) throw new Error(`flat2json: malformed flat id: '${n}'`);
|
|
2865
|
-
if (r.length >
|
|
2876
|
+
if (r.length > xo) throw new Error(`flat2json: '${n}' deeper than 256`);
|
|
2866
2877
|
const l = "number" == typeof r[0];
|
|
2867
2878
|
if (null === t) t = l ? [] : {};
|
|
2868
2879
|
else if (l !== Array.isArray(t)) throw new Error(`flat2json: '${n}' does not fit a ${Array.isArray(t) ? "array" : "object"} root`);
|
|
2869
2880
|
let o = t;
|
|
2870
2881
|
for (let t = 0; t < r.length; t++) {
|
|
2871
2882
|
const l = r[t], i = "number" == typeof l, s = t === r.length - 1, a = !s && "number" == typeof r[t + 1];
|
|
2872
|
-
if (i && l >
|
|
2883
|
+
if (i && l > Ko) throw new Error(`flat2json: array index ${l} over the limit (100000) in '${n}'`);
|
|
2873
2884
|
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"}`);
|
|
2874
2885
|
if (s) {
|
|
2875
2886
|
if (Array.isArray(o)) {
|
|
@@ -2877,7 +2888,7 @@ function Jo(e) {
|
|
|
2877
2888
|
o[l] = e[n];
|
|
2878
2889
|
} else {
|
|
2879
2890
|
if (Object.prototype.hasOwnProperty.call(o, l)) throw new Error(`flat2json: '${n}' is written twice, or once as a value and once as a container`);
|
|
2880
|
-
|
|
2891
|
+
hl(o, l, e[n]);
|
|
2881
2892
|
}
|
|
2882
2893
|
break;
|
|
2883
2894
|
}
|
|
@@ -2885,7 +2896,7 @@ function Jo(e) {
|
|
|
2885
2896
|
if (Array.isArray(o)) {
|
|
2886
2897
|
for (; o.length <= l;) o.push(null);
|
|
2887
2898
|
u = o[l], null == u && (u = a ? [] : {}, o[l] = u);
|
|
2888
|
-
} else u =
|
|
2899
|
+
} else u = ml(o, l) ? void 0 : o[l], void 0 === u && (u = a ? [] : {}, hl(o, l, u));
|
|
2889
2900
|
if (null === u || "object" != typeof u) throw new Error(`flat2json: '${n}' walks through a value: the same id is a leaf and a container at once`);
|
|
2890
2901
|
if (a !== Array.isArray(u)) throw new Error(`flat2json: '${n}' needs a ${a ? "array" : "object"} where the tree already has a ${Array.isArray(u) ? "array" : "object"}`);
|
|
2891
2902
|
o = u;
|
|
@@ -2893,68 +2904,68 @@ function Jo(e) {
|
|
|
2893
2904
|
}
|
|
2894
2905
|
return null === t ? {} : t;
|
|
2895
2906
|
}
|
|
2896
|
-
function
|
|
2907
|
+
function zo(e, t) {
|
|
2897
2908
|
return e === t || null !== e && null !== t && "object" == typeof e && "object" == typeof t && JSON.stringify(e) === JSON.stringify(t);
|
|
2898
2909
|
}
|
|
2899
|
-
function
|
|
2910
|
+
function Qo(e, t) {
|
|
2900
2911
|
const n = e && "object" == typeof e ? e : {}, r = t && "object" == typeof t ? t : {}, l = {
|
|
2901
2912
|
added: {},
|
|
2902
2913
|
removed: {},
|
|
2903
2914
|
changed: {}
|
|
2904
2915
|
};
|
|
2905
|
-
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ?
|
|
2916
|
+
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ? zo(n[e], r[e]) || hl(l.changed, e, {
|
|
2906
2917
|
from: n[e],
|
|
2907
2918
|
to: r[e]
|
|
2908
|
-
}) :
|
|
2909
|
-
for (const e of Object.keys(r)) Object.prototype.hasOwnProperty.call(n, e) ||
|
|
2919
|
+
}) : hl(l.removed, e, n[e]);
|
|
2920
|
+
for (const e of Object.keys(r)) Object.prototype.hasOwnProperty.call(n, e) || hl(l.added, e, r[e]);
|
|
2910
2921
|
return l;
|
|
2911
2922
|
}
|
|
2912
|
-
function
|
|
2923
|
+
function Xo(e, t) {
|
|
2913
2924
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat_apply: a flat json is an object of id -> value");
|
|
2914
2925
|
if (null === t || "object" != typeof t) throw new Error("flat_apply: a diff is the object flat_diff() answers");
|
|
2915
2926
|
for (const n of Object.keys(t.removed || {})) delete e[n];
|
|
2916
|
-
for (const n of Object.keys(t.added || {}))
|
|
2927
|
+
for (const n of Object.keys(t.added || {})) hl(e, n, t.added[n]);
|
|
2917
2928
|
for (const n of Object.keys(t.changed || {})) {
|
|
2918
2929
|
const r = t.changed[n];
|
|
2919
2930
|
if (!r || !Object.prototype.hasOwnProperty.call(r, "to")) throw new Error(`flat_apply: changed '${n}' without a 'to'`);
|
|
2920
|
-
|
|
2931
|
+
hl(e, n, r.to);
|
|
2921
2932
|
}
|
|
2922
2933
|
return e;
|
|
2923
2934
|
}
|
|
2924
|
-
function
|
|
2935
|
+
function Zo(e) {
|
|
2925
2936
|
return "persistent-attrs-" + Rt(e);
|
|
2926
2937
|
}
|
|
2927
|
-
function
|
|
2928
|
-
let n = Xt(e, v.SDF_PERSIST), r =
|
|
2929
|
-
if (r &&
|
|
2930
|
-
let l =
|
|
2931
|
-
l =
|
|
2938
|
+
function ei(e, t) {
|
|
2939
|
+
let n = Xt(e, v.SDF_PERSIST), r = Vl(Zo(e), null, !1);
|
|
2940
|
+
if (r && zr(r)) {
|
|
2941
|
+
let l = Ul(e, r, t, !1);
|
|
2942
|
+
l = Ul(e, l, n, !1), on(e, l, v.SDF_PERSIST);
|
|
2932
2943
|
}
|
|
2933
2944
|
}
|
|
2934
|
-
function
|
|
2935
|
-
let n =
|
|
2936
|
-
return r &&
|
|
2945
|
+
function ti(e, t) {
|
|
2946
|
+
let n = Ul(e, Xt(e, v.SDF_PERSIST), t, !1), r = Vl(Zo(e), null, !1);
|
|
2947
|
+
return r && zr(r) && Ur(n, r), Gl(Zo(e), n);
|
|
2937
2948
|
}
|
|
2938
|
-
function
|
|
2939
|
-
let n =
|
|
2940
|
-
0 ===
|
|
2949
|
+
function ni(e, t) {
|
|
2950
|
+
let n = Fl(e, Vl(Zo(e), null, !1), t, !1);
|
|
2951
|
+
0 === Br(n) ? Ml(Zo(e)) : Gl(Zo(e), n);
|
|
2941
2952
|
}
|
|
2942
|
-
function
|
|
2943
|
-
let n =
|
|
2944
|
-
return n &&
|
|
2953
|
+
function ri(e, t) {
|
|
2954
|
+
let n = Vl(Zo(e), null, !1), r = {};
|
|
2955
|
+
return n && zr(n) && (r = Ul(e, n, t, !1)), r;
|
|
2945
2956
|
}
|
|
2946
|
-
function
|
|
2947
|
-
if (
|
|
2957
|
+
function li(e) {
|
|
2958
|
+
if (Qr(e) && 1 === qr(e)) {
|
|
2948
2959
|
let t = e[0];
|
|
2949
|
-
return
|
|
2960
|
+
return pl(t, "size") ? t.size : 1;
|
|
2950
2961
|
}
|
|
2951
|
-
return
|
|
2962
|
+
return qr(e);
|
|
2952
2963
|
}
|
|
2953
|
-
function
|
|
2954
|
-
if (
|
|
2964
|
+
function oi(e, t) {
|
|
2965
|
+
if (Xr(t)) {
|
|
2955
2966
|
if (-1 === t.indexOf("^")) {
|
|
2956
2967
|
let n, r, l = e.fkey;
|
|
2957
|
-
if (1 !==
|
|
2968
|
+
if (1 !== Br(l)) return cr("bad fkey 1"), cr(e), cr(t), null;
|
|
2958
2969
|
for (const e of Object.keys(l)) {
|
|
2959
2970
|
n = e, r = l[e];
|
|
2960
2971
|
break;
|
|
@@ -2967,28 +2978,28 @@ function ri(e, t) {
|
|
|
2967
2978
|
}
|
|
2968
2979
|
{
|
|
2969
2980
|
let n = t.split("^");
|
|
2970
|
-
return 3 !== n.length ? (
|
|
2981
|
+
return 3 !== n.length ? (cr("bad fkey 2"), cr(e), cr(t), null) : {
|
|
2971
2982
|
topic_name: n[0],
|
|
2972
2983
|
id: n[1],
|
|
2973
2984
|
hook_name: n[2]
|
|
2974
2985
|
};
|
|
2975
2986
|
}
|
|
2976
2987
|
}
|
|
2977
|
-
return
|
|
2988
|
+
return zr(t) ? {
|
|
2978
2989
|
topic_name: t.topic_name,
|
|
2979
2990
|
id: t.id,
|
|
2980
2991
|
hook_name: t.hook_name
|
|
2981
|
-
} : (
|
|
2992
|
+
} : (cr("bad fkey 3"), cr(e), cr(t), null);
|
|
2982
2993
|
}
|
|
2983
|
-
function
|
|
2984
|
-
let n =
|
|
2994
|
+
function ii(e, t) {
|
|
2995
|
+
let n = oi(e, t);
|
|
2985
2996
|
return n ? n.topic_name + "^" + n.id + "^" + n.hook_name : null;
|
|
2986
2997
|
}
|
|
2987
|
-
function
|
|
2988
|
-
if (
|
|
2998
|
+
function si(e, t) {
|
|
2999
|
+
if (Xr(t)) {
|
|
2989
3000
|
if (-1 === t.indexOf("^")) {
|
|
2990
3001
|
let n, r = e.hook;
|
|
2991
|
-
if (1 !==
|
|
3002
|
+
if (1 !== Br(r)) return cr("bad hook 1"), cr(e), cr(t), null;
|
|
2992
3003
|
for (let e of Object.keys(r)) {
|
|
2993
3004
|
n = e, r[e];
|
|
2994
3005
|
break;
|
|
@@ -3000,18 +3011,18 @@ function oi(e, t) {
|
|
|
3000
3011
|
}
|
|
3001
3012
|
{
|
|
3002
3013
|
let n = t.split("^");
|
|
3003
|
-
return 2 !== n.length ? (
|
|
3014
|
+
return 2 !== n.length ? (cr("bad hook 2"), cr(e), cr(t), null) : {
|
|
3004
3015
|
topic_name: n[0],
|
|
3005
3016
|
id: n[1]
|
|
3006
3017
|
};
|
|
3007
3018
|
}
|
|
3008
3019
|
}
|
|
3009
|
-
return
|
|
3020
|
+
return zr(t) ? {
|
|
3010
3021
|
topic_name: t.topic_name,
|
|
3011
3022
|
id: t.id
|
|
3012
|
-
} : (
|
|
3023
|
+
} : (cr("bad hook 3"), cr(e), cr(t), null);
|
|
3013
3024
|
}
|
|
3014
|
-
var
|
|
3025
|
+
var ai = [
|
|
3015
3026
|
"string",
|
|
3016
3027
|
"integer",
|
|
3017
3028
|
"object",
|
|
@@ -3021,7 +3032,7 @@ var ii = [
|
|
|
3021
3032
|
"real",
|
|
3022
3033
|
"boolean",
|
|
3023
3034
|
"blob"
|
|
3024
|
-
],
|
|
3035
|
+
], ui = [
|
|
3025
3036
|
"persistent",
|
|
3026
3037
|
"required",
|
|
3027
3038
|
"notnull",
|
|
@@ -3033,7 +3044,7 @@ var ii = [
|
|
|
3033
3044
|
"stats",
|
|
3034
3045
|
"rstats",
|
|
3035
3046
|
"pstats"
|
|
3036
|
-
],
|
|
3047
|
+
], _i = [
|
|
3037
3048
|
"hook",
|
|
3038
3049
|
"fkey",
|
|
3039
3050
|
"enum",
|
|
@@ -3062,7 +3073,7 @@ var ii = [
|
|
|
3062
3073
|
"coordinates",
|
|
3063
3074
|
"gbuffer"
|
|
3064
3075
|
];
|
|
3065
|
-
function
|
|
3076
|
+
function ci(e) {
|
|
3066
3077
|
let t = {
|
|
3067
3078
|
name: e.id,
|
|
3068
3079
|
header: e.header,
|
|
@@ -3081,7 +3092,7 @@ function ui(e) {
|
|
|
3081
3092
|
if (!e.flag) return t;
|
|
3082
3093
|
for (let n = 0; n < e.flag.length; n++) {
|
|
3083
3094
|
let r = e.flag[n];
|
|
3084
|
-
if (
|
|
3095
|
+
if (zl(_i, r)) {
|
|
3085
3096
|
switch (r) {
|
|
3086
3097
|
case "enum":
|
|
3087
3098
|
t.enum_list = e.enum;
|
|
@@ -3095,7 +3106,7 @@ function ui(e) {
|
|
|
3095
3106
|
case "file": t.is_file = !0;
|
|
3096
3107
|
}
|
|
3097
3108
|
t.type = r;
|
|
3098
|
-
} else if (
|
|
3109
|
+
} else if (zl(ui, r)) switch (r) {
|
|
3099
3110
|
case "writable":
|
|
3100
3111
|
t.is_writable = !0;
|
|
3101
3112
|
break;
|
|
@@ -3108,7 +3119,7 @@ function ui(e) {
|
|
|
3108
3119
|
}
|
|
3109
3120
|
return t.is_file && (t.type = "file"), t;
|
|
3110
3121
|
}
|
|
3111
|
-
function
|
|
3122
|
+
function fi(e, t) {
|
|
3112
3123
|
let n = {
|
|
3113
3124
|
name: e,
|
|
3114
3125
|
header: e,
|
|
@@ -3122,13 +3133,13 @@ function _i(e, t) {
|
|
|
3122
3133
|
placeholder: void 0,
|
|
3123
3134
|
fkey: null
|
|
3124
3135
|
};
|
|
3125
|
-
if (
|
|
3136
|
+
if (Xr(t)) {
|
|
3126
3137
|
let e = t.split(".");
|
|
3127
3138
|
for (let t = 0; t < e.length; t++) {
|
|
3128
3139
|
let r = e[t];
|
|
3129
|
-
if (
|
|
3130
|
-
else if (
|
|
3131
|
-
else if (
|
|
3140
|
+
if (zl(ai, r)) n.real_type || (n.real_type = r);
|
|
3141
|
+
else if (zl(_i, r)) n.type || (n.type = r);
|
|
3142
|
+
else if (zl(ui, r)) switch (r) {
|
|
3132
3143
|
case "writable":
|
|
3133
3144
|
n.is_writable = !0;
|
|
3134
3145
|
break;
|
|
@@ -3140,35 +3151,35 @@ function _i(e, t) {
|
|
|
3140
3151
|
}
|
|
3141
3152
|
}
|
|
3142
3153
|
n.real_type || (n.real_type = "string");
|
|
3143
|
-
} else
|
|
3154
|
+
} else zr(t) ? (n = ci(t), n.name || (n.name = e), n.header || (n.header = e)) : Qr(t) && (n.real_type = "array", n.enum_list = t);
|
|
3144
3155
|
return n.type || (n.type = n.real_type), n;
|
|
3145
3156
|
}
|
|
3146
|
-
function
|
|
3157
|
+
function gi(e, t) {
|
|
3147
3158
|
let n = {};
|
|
3148
3159
|
return t || (t = {}), Object.entries(e).forEach(([e, r]) => {
|
|
3149
3160
|
let l;
|
|
3150
|
-
|
|
3151
|
-
let o =
|
|
3152
|
-
|
|
3161
|
+
zr(r) && (l = r.default);
|
|
3162
|
+
let o = $l(null, t, e, l);
|
|
3163
|
+
Gr(n, e, o);
|
|
3153
3164
|
}), n;
|
|
3154
3165
|
}
|
|
3155
|
-
var
|
|
3166
|
+
var di = [
|
|
3156
3167
|
N(T.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
3157
3168
|
N(T.DTP_BOOLEAN, "periodic", 0, 0, "True for periodic timeouts"),
|
|
3158
3169
|
N(T.DTP_INTEGER, "msec", 0, 0, "Timeout in milliseconds"),
|
|
3159
3170
|
S()
|
|
3160
|
-
],
|
|
3171
|
+
], bi = {
|
|
3161
3172
|
periodic: !1,
|
|
3162
3173
|
msec: 0,
|
|
3163
3174
|
timer_id: -1
|
|
3164
|
-
},
|
|
3165
|
-
function
|
|
3175
|
+
}, pi = null;
|
|
3176
|
+
function mi(e, t, n, r) {
|
|
3166
3177
|
let l = e.priv, o = l.periodic ? "EV_TIMEOUT_PERIODIC" : "EV_TIMEOUT";
|
|
3167
3178
|
return l.periodic && l.msec > 0 ? l.timer_id = setTimeout(function() {
|
|
3168
3179
|
Tn(e, "EV_TIMEOUT", {}, e);
|
|
3169
3180
|
}, l.msec) : l.timer_id = -1, It(e) ? Tn(At(e), o, {}, e) : Pn(e, o, {}), l.periodic || -1 !== l.timer_id || Et(e) && gt(e), 0;
|
|
3170
3181
|
}
|
|
3171
|
-
var
|
|
3182
|
+
var hi = {
|
|
3172
3183
|
mt_create: function(e) {
|
|
3173
3184
|
let t = e.priv;
|
|
3174
3185
|
const n = nn(e, "subscriber");
|
|
@@ -3193,31 +3204,31 @@ var pi = {
|
|
|
3193
3204
|
},
|
|
3194
3205
|
mt_destroy: function(e) {}
|
|
3195
3206
|
};
|
|
3196
|
-
function
|
|
3207
|
+
function Ei() {
|
|
3197
3208
|
return function(e) {
|
|
3198
|
-
if (
|
|
3209
|
+
if (pi) return cr(`GClass ALREADY created: ${e}`), -1;
|
|
3199
3210
|
const t = [["ST_IDLE", [[
|
|
3200
3211
|
"EV_TIMEOUT",
|
|
3201
|
-
|
|
3212
|
+
mi,
|
|
3202
3213
|
null
|
|
3203
3214
|
]]]];
|
|
3204
|
-
return (
|
|
3215
|
+
return (pi = Ae(e, [
|
|
3205
3216
|
["EV_TIMEOUT", U.EVF_OUTPUT_EVENT],
|
|
3206
3217
|
["EV_TIMEOUT_PERIODIC", U.EVF_OUTPUT_EVENT],
|
|
3207
3218
|
[0, 0]
|
|
3208
|
-
], t,
|
|
3219
|
+
], t, hi, 0, di, bi, 0, 0, 0, C.gcflag_manual_start)) ? 0 : -1;
|
|
3209
3220
|
}("C_TIMER");
|
|
3210
3221
|
}
|
|
3211
|
-
function
|
|
3212
|
-
return e instanceof I ? "C_TIMER" !== $t(e) ? (
|
|
3222
|
+
function yi(e, t) {
|
|
3223
|
+
return e instanceof I ? "C_TIMER" !== $t(e) ? (cr("not C_TIMER GObj"), -1) : (sn(e, "periodic", !1), void an(e, "msec", t)) : (cr("not GObj TYPE"), -1);
|
|
3213
3224
|
}
|
|
3214
|
-
function
|
|
3215
|
-
return e instanceof I ? "C_TIMER" !== $t(e) ? (
|
|
3225
|
+
function Ti(e, t) {
|
|
3226
|
+
return e instanceof I ? "C_TIMER" !== $t(e) ? (cr("not C_TIMER GObj"), -1) : (sn(e, "periodic", !0), void an(e, "msec", t)) : (cr("not GObj TYPE"), -1);
|
|
3216
3227
|
}
|
|
3217
|
-
function
|
|
3218
|
-
return e instanceof I ? "C_TIMER" !== $t(e) ? (
|
|
3228
|
+
function vi(e) {
|
|
3229
|
+
return e instanceof I ? "C_TIMER" !== $t(e) ? (cr("not C_TIMER GObj"), -1) : void an(e, "msec", -1) : (cr("not GObj TYPE"), -1);
|
|
3219
3230
|
}
|
|
3220
|
-
var
|
|
3231
|
+
var Oi = [
|
|
3221
3232
|
N(T.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
3222
3233
|
N(T.DTP_BOOLEAN, "browser_beforeunload", 0, !1, "Set true to refreshing browser"),
|
|
3223
3234
|
N(T.DTP_STRING, "__username__", 0, "", "Username"),
|
|
@@ -3237,63 +3248,63 @@ var Ti = [
|
|
|
3237
3248
|
N(T.DTP_BOOLEAN, "developer", 0, !1, "Developer mode enabled"),
|
|
3238
3249
|
N(T.DTP_INTEGER, "periodic_timeout", 0, "1000", "Timeout periodic, in miliseconds."),
|
|
3239
3250
|
S()
|
|
3240
|
-
],
|
|
3241
|
-
function
|
|
3251
|
+
], Si = { gobj_timer: null }, Ni = null;
|
|
3252
|
+
function wi(e, t, n, r) {
|
|
3242
3253
|
let l = Qt(e, t);
|
|
3243
|
-
return
|
|
3254
|
+
return zr(l) || (l = {}), l[n] = r, rn(e, t, l), He(e, t);
|
|
3244
3255
|
}
|
|
3245
|
-
function
|
|
3256
|
+
function ji(e) {
|
|
3246
3257
|
if (!0 === e || !1 === e) return e;
|
|
3247
3258
|
let t = String(null == e ? "" : e).toLowerCase();
|
|
3248
3259
|
return "true" === t || "set" === t || "false" !== t && "reset" !== t && ("" === t || isNaN(Number(t)) ? null : !!Number(t));
|
|
3249
3260
|
}
|
|
3250
|
-
function
|
|
3261
|
+
function $i() {
|
|
3251
3262
|
return `${Nt()}^${St()}`;
|
|
3252
3263
|
}
|
|
3253
|
-
function
|
|
3264
|
+
function Ri(e, t, n, r) {
|
|
3254
3265
|
return Pn(e, t, n), 0;
|
|
3255
3266
|
}
|
|
3256
|
-
var
|
|
3267
|
+
var Di = {
|
|
3257
3268
|
mt_create: function(e) {
|
|
3258
3269
|
let t = e.priv;
|
|
3259
|
-
un(e, "start_date",
|
|
3270
|
+
un(e, "start_date", Lo()), un(e, "node_uuid", Fo()), e.priv.gobj_timer = ot(jt(e), "C_TIMER", {}, e), t.periodic_timeout = Qt(e, "periodic_timeout"), function(e) {
|
|
3260
3271
|
let t = Qt(e, "trace_levels");
|
|
3261
|
-
if (!
|
|
3272
|
+
if (!zr(t)) return 0;
|
|
3262
3273
|
let n = t.__global_trace__;
|
|
3263
|
-
if (
|
|
3274
|
+
if (Qr(n)) {
|
|
3264
3275
|
ce(4294967295, !1);
|
|
3265
3276
|
for (let e of n) se(e, !0);
|
|
3266
3277
|
}
|
|
3267
3278
|
for (const [n, r] of Object.entries(t)) {
|
|
3268
3279
|
let t = Me(n);
|
|
3269
|
-
if (t) if (
|
|
3280
|
+
if (t) if (Qr(r)) {
|
|
3270
3281
|
Ee(t, null, !1);
|
|
3271
3282
|
for (let e of r) Ee(t, e, !0);
|
|
3272
|
-
} else
|
|
3283
|
+
} else cr(`${jt(e)}: trace_levels of ${n} MUST be a list`);
|
|
3273
3284
|
}
|
|
3274
3285
|
}(e), function(e) {
|
|
3275
3286
|
let t = Qt(e, "no_trace_levels");
|
|
3276
|
-
if (!
|
|
3287
|
+
if (!zr(t)) return 0;
|
|
3277
3288
|
let n = t.__global_no_trace__;
|
|
3278
|
-
if (
|
|
3289
|
+
if (Qr(n)) {
|
|
3279
3290
|
fe(4294967295, !1);
|
|
3280
3291
|
for (let e of n) ae(e, !0);
|
|
3281
3292
|
}
|
|
3282
3293
|
for (const [n, r] of Object.entries(t)) {
|
|
3283
3294
|
let t = Me(n);
|
|
3284
|
-
if (t) if (
|
|
3295
|
+
if (t) if (Qr(r)) {
|
|
3285
3296
|
Te(t, null, !1);
|
|
3286
3297
|
for (let e of r) Te(t, e, !0);
|
|
3287
|
-
} else
|
|
3298
|
+
} else cr(`${jt(e)}: no_trace_levels of ${n} MUST be a list`);
|
|
3288
3299
|
}
|
|
3289
3300
|
}(e);
|
|
3290
3301
|
},
|
|
3291
3302
|
mt_writing: function(e, t) {},
|
|
3292
3303
|
mt_start: function(e) {
|
|
3293
|
-
return
|
|
3304
|
+
return Ti(e.priv.gobj_timer, e.priv.periodic_timeout), 0;
|
|
3294
3305
|
},
|
|
3295
3306
|
mt_stop: function(e) {
|
|
3296
|
-
return
|
|
3307
|
+
return vi(e.priv.gobj_timer), bt(e), 0;
|
|
3297
3308
|
},
|
|
3298
3309
|
mt_destroy: function(e) {},
|
|
3299
3310
|
mt_play: function(e) {
|
|
@@ -3310,35 +3321,35 @@ var $i = {
|
|
|
3310
3321
|
case "get-global-no-trace": return o(0, 0, null, null, de());
|
|
3311
3322
|
case "set-global-trace":
|
|
3312
3323
|
case "set-global-no-trace": {
|
|
3313
|
-
let r = "set-global-no-trace" === t, l = n.level, i =
|
|
3314
|
-
return l ? null === i ? o(0, -1, `${
|
|
3324
|
+
let r = "set-global-no-trace" === t, l = n.level, i = ji(n.set);
|
|
3325
|
+
return l ? null === i ? o(0, -1, `${$i()}: bitmask set or re-set?`, null, null) : (r ? ae(l, i) : se(l, i)) < 0 ? o(0, -1, `${$i()}: global trace level not found: ${l}`, null, null) : r ? (wi(e, "no_trace_levels", "__global_no_trace__", de()), o(0, 0, null, null, de())) : (wi(e, "trace_levels", "__global_trace__", ge()), o(0, 0, null, null, ge())) : o(0, -1, `${$i()}: what level?`, null, null);
|
|
3315
3326
|
}
|
|
3316
3327
|
case "get-gclass-trace":
|
|
3317
3328
|
case "get-gclass-no-trace":
|
|
3318
3329
|
case "set-gclass-trace":
|
|
3319
3330
|
case "set-gclass-no-trace": {
|
|
3320
3331
|
let r = t.indexOf("no-trace") >= 0, l = n.gclass_name || n.gclass || "", i = Me(l);
|
|
3321
|
-
if (!i) return o(0, -1, `${
|
|
3332
|
+
if (!i) return o(0, -1, `${$i()}: what gclass is '${l}'?`, null, null);
|
|
3322
3333
|
if (0 === t.indexOf("get-")) return o(0, 0, null, null, r ? me(i) : be(i));
|
|
3323
|
-
let s = n.level, a =
|
|
3324
|
-
return s ? null === a ? o(0, -1, `${
|
|
3334
|
+
let s = n.level, a = ji(n.set);
|
|
3335
|
+
return s ? null === a ? o(0, -1, `${$i()}: bitmask set or re-set?`, null, null) : (r ? Te(i, s, a) : Ee(i, s, a)) < 0 ? o(0, -1, `${$i()}: trace level of ${l} not found: ${s}`, null, null) : r ? (wi(e, "no_trace_levels", l, me(i)), o(0, 0, null, null, me(i))) : (wi(e, "trace_levels", l, pe(i)), o(0, 0, null, null, be(i))) : o(0, -1, `${$i()}: what level?`, null, null);
|
|
3325
3336
|
}
|
|
3326
|
-
default: return o(0, -1, `${
|
|
3337
|
+
default: return o(0, -1, `${$i()}: command not available: ${t}`, null, null);
|
|
3327
3338
|
}
|
|
3328
3339
|
}
|
|
3329
3340
|
};
|
|
3330
|
-
function
|
|
3341
|
+
function Ai() {
|
|
3331
3342
|
return function(e) {
|
|
3332
|
-
if (
|
|
3343
|
+
if (Ni) return cr(`GClass ALREADY created: ${e}`), -1;
|
|
3333
3344
|
const t = [["ST_IDLE", [[
|
|
3334
3345
|
"EV_TIMEOUT_PERIODIC",
|
|
3335
|
-
|
|
3346
|
+
Ri,
|
|
3336
3347
|
null
|
|
3337
3348
|
]]]];
|
|
3338
|
-
return (
|
|
3349
|
+
return (Ni = Ae(e, [["EV_TIMEOUT_PERIODIC", U.EVF_OUTPUT_EVENT | U.EVF_NO_WARN_SUBS], [0, 0]], t, Di, 0, Oi, Si, 0, 0, 0, 0)) ? 0 : -1;
|
|
3339
3350
|
}("C_YUNO");
|
|
3340
3351
|
}
|
|
3341
|
-
var
|
|
3352
|
+
var ki = "ievent_gate_stack", Ii = [
|
|
3342
3353
|
N(T.DTP_STRING, "wanted_yuno_role", v.SDF_RD, "", "wanted yuno role"),
|
|
3343
3354
|
N(T.DTP_STRING, "wanted_yuno_name", v.SDF_RD, "", "wanted yuno name"),
|
|
3344
3355
|
N(T.DTP_STRING, "wanted_yuno_service", v.SDF_RD, "", "wanted yuno service"),
|
|
@@ -3355,15 +3366,15 @@ var Di = "ievent_gate_stack", Ai = [
|
|
|
3355
3366
|
N(T.DTP_INTEGER, "timeout_idack", v.SDF_RD, "5000", "timeout waiting idAck"),
|
|
3356
3367
|
N(T.DTP_POINTER, "subscriber", 0, 0, "subscriber of output-events. If null then subscriber is the parent"),
|
|
3357
3368
|
S()
|
|
3358
|
-
],
|
|
3369
|
+
], Ci = [
|
|
3359
3370
|
["ievents", "Trace inter-events with metadata of kw"],
|
|
3360
3371
|
["ievents2", "Trace inter-events with full kw"],
|
|
3361
3372
|
["identity-card", "Trace identity_card messages"]
|
|
3362
3373
|
];
|
|
3363
|
-
function
|
|
3374
|
+
function Li(e) {
|
|
3364
3375
|
return !!(3 & Z(e));
|
|
3365
3376
|
}
|
|
3366
|
-
var
|
|
3377
|
+
var Pi = {
|
|
3367
3378
|
url: null,
|
|
3368
3379
|
remote_yuno_name: null,
|
|
3369
3380
|
remote_yuno_role: null,
|
|
@@ -3373,23 +3384,23 @@ var Ci = {
|
|
|
3373
3384
|
websocket: null,
|
|
3374
3385
|
inside_on_open: !1,
|
|
3375
3386
|
retry_ms: 0
|
|
3376
|
-
},
|
|
3377
|
-
function
|
|
3378
|
-
e.priv.websocket &&
|
|
3387
|
+
}, Ui = null;
|
|
3388
|
+
function Fi(e) {
|
|
3389
|
+
e.priv.websocket && cr("Websocket ALREADY setup");
|
|
3379
3390
|
const t = tn(e, "url");
|
|
3380
|
-
|
|
3391
|
+
dr(`====> Starting WebSocket to '${t}' (${Rt(e)})`);
|
|
3381
3392
|
const n = ++e.priv.ws_seq;
|
|
3382
3393
|
let r;
|
|
3383
3394
|
try {
|
|
3384
3395
|
r = new WebSocket(t);
|
|
3385
3396
|
} catch (r) {
|
|
3386
|
-
return
|
|
3397
|
+
return cr(`${Rt(e)}: Cannot open WebSocket to '${t}', Error: ${r.message}`), hn(e, "EV_ON_CLOSE", {
|
|
3387
3398
|
url: t,
|
|
3388
3399
|
ws_seq: n,
|
|
3389
3400
|
code: 1006,
|
|
3390
3401
|
reason: r.message,
|
|
3391
3402
|
was_clean: !1
|
|
3392
|
-
}, e) < 0 &&
|
|
3403
|
+
}, e) < 0 && yi(e.priv.gobj_timer, Hi(e)), null;
|
|
3393
3404
|
}
|
|
3394
3405
|
return r ? (r.onopen = () => {
|
|
3395
3406
|
n !== e.priv.ws_seq || Ct(e) || Tn(e, "EV_ON_OPEN", {
|
|
@@ -3402,69 +3413,69 @@ function Pi(e) {
|
|
|
3402
3413
|
data: r.data
|
|
3403
3414
|
}, e);
|
|
3404
3415
|
}, r.onclose = (r) => {
|
|
3405
|
-
Ct(e) || n === e.priv.ws_seq && (Zt(Ot(), "browser_beforeunload") ?
|
|
3416
|
+
Ct(e) || n === e.priv.ws_seq && (Zt(Ot(), "browser_beforeunload") ? fr("Close websocket by unload page") : Tn(e, "EV_ON_CLOSE", {
|
|
3406
3417
|
url: t,
|
|
3407
3418
|
ws_seq: n,
|
|
3408
3419
|
code: r.code,
|
|
3409
3420
|
reason: r.reason,
|
|
3410
3421
|
was_clean: r.wasClean
|
|
3411
3422
|
}, e));
|
|
3412
|
-
}, r) : (
|
|
3423
|
+
}, r) : (cr(`${Rt(e)}: Failed to initialize WebSocket.`), null);
|
|
3413
3424
|
}
|
|
3414
|
-
function
|
|
3425
|
+
function Vi(e, t = 1e3, n = "") {
|
|
3415
3426
|
let r = e.priv, l = r.websocket;
|
|
3416
3427
|
if (r.websocket = null, l && l.readyState !== WebSocket.CLOSED && l.readyState !== WebSocket.CLOSING) {
|
|
3417
|
-
|
|
3428
|
+
dr(`Closing WebSocket (Code: ${t}, Reason: "${n}")`);
|
|
3418
3429
|
try {
|
|
3419
3430
|
l.close(t, n);
|
|
3420
3431
|
} catch (t) {
|
|
3421
|
-
|
|
3432
|
+
cr(`${Rt(e)}: Error closing WebSocket: ${t.message}`);
|
|
3422
3433
|
}
|
|
3423
|
-
} else
|
|
3434
|
+
} else fr("WebSocket is already closed or in the process of closing.");
|
|
3424
3435
|
}
|
|
3425
|
-
function
|
|
3426
|
-
let r =
|
|
3436
|
+
function Gi(e, t, n) {
|
|
3437
|
+
let r = Lo();
|
|
3427
3438
|
try {
|
|
3428
|
-
|
|
3439
|
+
dr("\n" + r + " " + t + "\n"), Ar(n);
|
|
3429
3440
|
} catch (e) {
|
|
3430
|
-
|
|
3441
|
+
dr("ERROR in trace_inter_event: " + e);
|
|
3431
3442
|
}
|
|
3432
3443
|
}
|
|
3433
|
-
var
|
|
3444
|
+
var Mi = class {
|
|
3434
3445
|
constructor(e, t) {
|
|
3435
3446
|
this.event = e, this.kw = t || {};
|
|
3436
3447
|
}
|
|
3437
3448
|
};
|
|
3438
|
-
function
|
|
3449
|
+
function Wi(e, t, n, r) {
|
|
3439
3450
|
return function(e, t) {
|
|
3440
3451
|
let n = e.priv, r = JSON.stringify(t);
|
|
3441
|
-
if (
|
|
3452
|
+
if (Li(e)) {
|
|
3442
3453
|
let n = tn(e, "url"), l = jt(Ot()) + " ==> " + n, o = Qt(Ot(), "trace_ievent_callback");
|
|
3443
|
-
o ? o(l, t, 1, r.length) :
|
|
3454
|
+
o ? o(l, t, 1, r.length) : Gi(0, l, t);
|
|
3444
3455
|
}
|
|
3445
|
-
if (!n.websocket || n.websocket.readyState !== WebSocket.OPEN) return
|
|
3456
|
+
if (!n.websocket || n.websocket.readyState !== WebSocket.OPEN) return fr(`${Rt(e)}: send_iev(): websocket not open, message lost`), -1;
|
|
3446
3457
|
try {
|
|
3447
3458
|
n.websocket.send(r);
|
|
3448
3459
|
} catch (t) {
|
|
3449
|
-
|
|
3460
|
+
cr(`${Rt(e)}: send_iev(): ${t}`);
|
|
3450
3461
|
}
|
|
3451
3462
|
return 0;
|
|
3452
3463
|
}(e, function(e, t) {
|
|
3453
|
-
return
|
|
3464
|
+
return il(e) ? (cr("iev_create() event NULL"), null) : new Mi(e, t);
|
|
3454
3465
|
}(t, n));
|
|
3455
3466
|
}
|
|
3456
|
-
function
|
|
3457
|
-
return
|
|
3467
|
+
function xi(e, t, n) {
|
|
3468
|
+
return il(n) && (n = tn(e, "wanted_yuno_service")), {
|
|
3458
3469
|
dst_yuno: tn(e, "wanted_yuno_name"),
|
|
3459
3470
|
dst_role: tn(e, "wanted_yuno_role"),
|
|
3460
3471
|
dst_service: n,
|
|
3461
3472
|
src_yuno: St(),
|
|
3462
3473
|
src_role: Nt(),
|
|
3463
3474
|
src_service: t,
|
|
3464
|
-
host:
|
|
3475
|
+
host: Fo()
|
|
3465
3476
|
};
|
|
3466
3477
|
}
|
|
3467
|
-
function
|
|
3478
|
+
function Ki(e) {
|
|
3468
3479
|
let t = e.priv, n = vt(Ot()), r = tn(Ot(), "yuno_version"), l = tn(Ot(), "yuno_release"), o = tn(Ot(), "yuno_tag"), i = Qt(e, "required_services");
|
|
3469
3480
|
i && i.length || (i = Qt(Ot(), "required_services"));
|
|
3470
3481
|
let s = {
|
|
@@ -3482,34 +3493,34 @@ function Wi(e) {
|
|
|
3482
3493
|
username: tn(Ot(), "__username__"),
|
|
3483
3494
|
launch_id: 0,
|
|
3484
3495
|
yuno_startdate: tn(Ot(), "start_date"),
|
|
3485
|
-
id:
|
|
3496
|
+
id: Fo(),
|
|
3486
3497
|
user_agent: "undefined" != typeof window ? window.navigator.userAgent : "",
|
|
3487
3498
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
3488
3499
|
required_services: i
|
|
3489
3500
|
};
|
|
3490
|
-
return
|
|
3501
|
+
return to(e, s, ki, xi(e, jt(At(e)), null)), ro(e, s, "__identity__"), yi(t.gobj_timer, en(e, "timeout_idack")), Wi(e, "EV_IDENTITY_CARD", s);
|
|
3491
3502
|
}
|
|
3492
|
-
function
|
|
3493
|
-
if (
|
|
3503
|
+
function Yi(e, t) {
|
|
3504
|
+
if (il(t.event)) return -1;
|
|
3494
3505
|
let n = {}, r = t.__global__, l = t.__config__, o = t.__filter__, i = t.__service__, s = t.subscriber;
|
|
3495
3506
|
l && (n.__config__ = l), r && (n.__global__ = r), o && (n.__filter__ = o);
|
|
3496
|
-
return
|
|
3507
|
+
return to(e, n, ki, xi(e, jt(s), i)), ro(e, n, "__subscribing__"), Wi(e, t.event, n);
|
|
3497
3508
|
}
|
|
3498
|
-
function
|
|
3509
|
+
function Bi(e, t, n, r) {
|
|
3499
3510
|
let l = e.priv;
|
|
3500
|
-
return Et(e) && (l.websocket =
|
|
3511
|
+
return Et(e) && (l.websocket = Fi(e)), 0;
|
|
3501
3512
|
}
|
|
3502
|
-
function
|
|
3503
|
-
return
|
|
3513
|
+
function Ji(e, t, n, r) {
|
|
3514
|
+
return dr("Websocket opened: " + e.priv.url), Ki(e), 0;
|
|
3504
3515
|
}
|
|
3505
|
-
function
|
|
3516
|
+
function qi(e, t, n, r) {
|
|
3506
3517
|
let l = e.priv, o = n.url;
|
|
3507
|
-
return void 0 !== n.ws_seq && n.ws_seq !== l.ws_seq || (rr(),
|
|
3518
|
+
return void 0 !== n.ws_seq && n.ws_seq !== l.ws_seq || (rr(), fr(`${Rt(e)}: WebSocket closed ${o} (Code: ${n.code}, Reason: "${n.reason}", Clean: ${n.was_clean})`), l.websocket && (l.websocket.onopen = null, l.websocket.onmessage = null, l.websocket.onerror = null, l.websocket.onclose = null, l.websocket = null), l.inform_on_close ? (l.inform_on_close = !1, Pn(e, "EV_ON_CLOSE", {
|
|
3508
3519
|
url: o,
|
|
3509
3520
|
remote_yuno_name: l.remote_yuno_name,
|
|
3510
3521
|
remote_yuno_role: l.remote_yuno_role,
|
|
3511
3522
|
remote_yuno_service: l.remote_yuno_service
|
|
3512
|
-
})) : Et(e) && (
|
|
3523
|
+
})) : Et(e) && (fr(`${Rt(e)}: EV_ON_OPEN_ERROR cannot open ${o} (Code: ${n.code}, Reason: "${n.reason}", Clean: ${n.was_clean})`), Pn(e, "EV_ON_OPEN_ERROR", {
|
|
3513
3524
|
url: o,
|
|
3514
3525
|
remote_yuno_name: l.remote_yuno_name,
|
|
3515
3526
|
remote_yuno_role: l.remote_yuno_role,
|
|
@@ -3517,25 +3528,25 @@ function Bi(e, t, n, r) {
|
|
|
3517
3528
|
code: n.code,
|
|
3518
3529
|
reason: n.reason,
|
|
3519
3530
|
was_clean: n.was_clean
|
|
3520
|
-
})), Et(e) &&
|
|
3531
|
+
})), Et(e) && yi(l.gobj_timer, Hi(e))), 0;
|
|
3521
3532
|
}
|
|
3522
|
-
function
|
|
3533
|
+
function Hi(e) {
|
|
3523
3534
|
let t = e.priv, n = en(e, "timeout_retry"), r = en(e, "timeout_retry_max");
|
|
3524
3535
|
r < n && (r = n), t.retry_ms = t.retry_ms ? Math.min(2 * t.retry_ms, r) : n;
|
|
3525
3536
|
let l = .2 * t.retry_ms, o = t.retry_ms - l + 2 * Math.random() * l;
|
|
3526
3537
|
return Math.max(1, Math.round(o));
|
|
3527
3538
|
}
|
|
3528
|
-
function
|
|
3529
|
-
return
|
|
3539
|
+
function zi(e, t, n, r) {
|
|
3540
|
+
return Ki(e), 0;
|
|
3530
3541
|
}
|
|
3531
|
-
function
|
|
3542
|
+
function Qi(e, t, n, r) {
|
|
3532
3543
|
let l = e.priv;
|
|
3533
|
-
|
|
3534
|
-
let o =
|
|
3544
|
+
vi(l.gobj_timer);
|
|
3545
|
+
let o = no(e, n, ki, !0), i = Nl(e, o, "src_yuno", ""), s = Nl(e, o, "src_role", ""), a = Nl(e, o, "src_service", "");
|
|
3535
3546
|
un(e, "remote_yuno_name", i), un(e, "remote_yuno_role", s), un(e, "remote_yuno_service", a);
|
|
3536
|
-
let u =
|
|
3547
|
+
let u = Ol(e, n, "result", -1, 0), _ = Nl(e, n, "comment", "", 0), c = Nl(e, n, "username", "", 0), f = $l(e, n, "services_roles", {});
|
|
3537
3548
|
if (u < 0) {
|
|
3538
|
-
|
|
3549
|
+
Vi(e);
|
|
3539
3550
|
let t = {
|
|
3540
3551
|
url: tn(e, "url"),
|
|
3541
3552
|
result: u,
|
|
@@ -3560,61 +3571,61 @@ function Hi(e, t, n, r) {
|
|
|
3560
3571
|
}
|
|
3561
3572
|
l.inside_on_open = !1, function(e) {
|
|
3562
3573
|
let t = In(e, null, null, null);
|
|
3563
|
-
for (let n = 0; n < t.length; n++)
|
|
3574
|
+
for (let n = 0; n < t.length; n++) Yi(e, t[n]);
|
|
3564
3575
|
}(e);
|
|
3565
3576
|
}
|
|
3566
3577
|
return 0;
|
|
3567
3578
|
}
|
|
3568
|
-
function
|
|
3579
|
+
function Xi(e, t, n, r) {
|
|
3569
3580
|
let l = e.priv.url, o = function(e, t) {
|
|
3570
3581
|
let n;
|
|
3571
3582
|
try {
|
|
3572
3583
|
n = JSON.parse(t);
|
|
3573
3584
|
} catch (t) {
|
|
3574
|
-
return
|
|
3585
|
+
return fr(`${Rt(e)}: parsing inter_event json: ${t}`), null;
|
|
3575
3586
|
}
|
|
3576
|
-
if (!(n instanceof Object)) return
|
|
3587
|
+
if (!(n instanceof Object)) return fr(`${Rt(e)}: parsing inter_event: websocket data not a json object`), null;
|
|
3577
3588
|
let r = n.event;
|
|
3578
|
-
if (!r) return
|
|
3579
|
-
if ("string" != typeof r) return
|
|
3589
|
+
if (!r) return fr(`${Rt(e)}: parsing inter_event: no event`), null;
|
|
3590
|
+
if ("string" != typeof r) return fr(`${Rt(e)}: parsing inter_event: event not a string`), null;
|
|
3580
3591
|
let l = n.kw;
|
|
3581
3592
|
return l ? l instanceof Object ? {
|
|
3582
3593
|
event: r,
|
|
3583
3594
|
kw: l || {}
|
|
3584
|
-
} : (
|
|
3595
|
+
} : (fr(`${Rt(e)}: parsing inter_event: kw not a json object`), null) : (fr(`${Rt(e)}: parsing inter_kw: no kw`), null);
|
|
3585
3596
|
}(e, n.data);
|
|
3586
|
-
if (!o) return
|
|
3587
|
-
if (
|
|
3597
|
+
if (!o) return fr(`${Rt(e)}: frame dropped from ${l}: ${String(n.data).substring(0, 256)}`), -1;
|
|
3598
|
+
if (Li(e)) {
|
|
3588
3599
|
let e = jt(Ot()) + " <== " + l, t = n.data.length, r = Qt(Ot(), "trace_ievent_callback");
|
|
3589
|
-
r ? r(e, o, 2, t) :
|
|
3600
|
+
r ? r(e, o, 2, t) : Gi(0, e, o);
|
|
3590
3601
|
}
|
|
3591
3602
|
let i = o.event, s = o.kw;
|
|
3592
3603
|
if ("ST_SESSION" !== cn(e)) {
|
|
3593
3604
|
if (dn(e, i, U.EVF_PUBLIC_EVENT)) {
|
|
3594
3605
|
if (!(Tn(e, i, s, e) < 0)) return 0;
|
|
3595
|
-
} else
|
|
3596
|
-
return
|
|
3606
|
+
} else cr(`${Rt(e)}: event UNKNOWN in not-session state ${i}`);
|
|
3607
|
+
return Vi(e), -1;
|
|
3597
3608
|
}
|
|
3598
3609
|
o = null;
|
|
3599
|
-
let a =
|
|
3600
|
-
if (_.toLowerCase() !== Nt().toLowerCase()) return
|
|
3601
|
-
let c =
|
|
3602
|
-
if ("__subscribing__" === a) return
|
|
3603
|
-
if ("__unsubscribing__" === a) return
|
|
3610
|
+
let a = lo(e, s), u = no(e, s, ki), _ = Nl(e, u, "dst_role", "");
|
|
3611
|
+
if (_.toLowerCase() !== Nt().toLowerCase()) return cr(`"It's not my role, dst_role: ${_}, my_role: ${Nt()}`), 0;
|
|
3612
|
+
let c = Nl(e, u, "dst_service", "");
|
|
3613
|
+
if ("__subscribing__" === a) return fr(`${Rt(e)}: subscription event ignored, I'm client (service: ${c}, event: ${i})`), -1;
|
|
3614
|
+
if ("__unsubscribing__" === a) return fr(`${Rt(e)}: unsubscription event ignored, I'm client (service: ${c}, event: ${i})`), -1;
|
|
3604
3615
|
if (dn(e, i, U.EVF_PUBLIC_EVENT)) return Tn(e, i, s, e), 0;
|
|
3605
|
-
if (!
|
|
3616
|
+
if (!il(c)) {
|
|
3606
3617
|
let t = Ke(c, !1);
|
|
3607
|
-
return t ? dn(t, i, U.EVF_PUBLIC_EVENT) ? (Tn(t, i, s, e), 0) : (
|
|
3618
|
+
return t ? dn(t, i, U.EVF_PUBLIC_EVENT) ? (Tn(t, i, s, e), 0) : (cr(`${Rt(e)}: Service found but no event or not public, service '${Rt(t)}', ev '${i}'`), -1) : (fr(`${Rt(e)}: event for a service that is gone, DROPPED: service '${c}', ev '${i}'`), 0);
|
|
3608
3619
|
}
|
|
3609
3620
|
return It(e) ? Tn(At(e), i, s, e) : Pn(e, i, s), 0;
|
|
3610
3621
|
}
|
|
3611
|
-
function
|
|
3622
|
+
function Zi(e, t, n, r) {
|
|
3612
3623
|
return 0;
|
|
3613
3624
|
}
|
|
3614
|
-
function
|
|
3625
|
+
function es(e, t, n, r) {
|
|
3615
3626
|
return 0;
|
|
3616
3627
|
}
|
|
3617
|
-
var
|
|
3628
|
+
var ts = {
|
|
3618
3629
|
mt_create: function(e) {
|
|
3619
3630
|
let t = e.priv;
|
|
3620
3631
|
t.gobj_timer = ot(jt(e), "C_TIMER", {}, e), t.ws_seq = 0, 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);
|
|
@@ -3644,72 +3655,72 @@ var Zi = {
|
|
|
3644
3655
|
code: 1e3,
|
|
3645
3656
|
reason: "restarted",
|
|
3646
3657
|
was_clean: !0
|
|
3647
|
-
}, e),
|
|
3658
|
+
}, e), vi(t.gobj_timer)), t.websocket = Fi(e), 0;
|
|
3648
3659
|
},
|
|
3649
3660
|
mt_stop: function(e) {
|
|
3650
3661
|
let t = e.priv;
|
|
3651
|
-
return
|
|
3662
|
+
return vi(t.gobj_timer), t.websocket && Vi(e), 0;
|
|
3652
3663
|
},
|
|
3653
3664
|
mt_destroy: function(e) {},
|
|
3654
3665
|
mt_stats: function(e, t, n, r) {
|
|
3655
|
-
if ("ST_SESSION" !== cn(e)) return
|
|
3666
|
+
if ("ST_SESSION" !== cn(e)) return cr("Not in session"), null;
|
|
3656
3667
|
n || (n = {});
|
|
3657
|
-
let l =
|
|
3658
|
-
return o || (o = {}),
|
|
3668
|
+
let l = xi(e, jt(r), Nl(e, n, "service", null, 0)), o = $l(e, n, "__md_stats__", null, Vn.KW_EXTRACT);
|
|
3669
|
+
return o || (o = {}), to(e, n, "stats_stack", {
|
|
3659
3670
|
stats: t,
|
|
3660
3671
|
kw: o
|
|
3661
|
-
}),
|
|
3672
|
+
}), to(e, n, ki, l), n.__stats__ = t, ro(e, n, "__stats__"), Wi(e, "EV_MT_STATS", n, r), null;
|
|
3662
3673
|
},
|
|
3663
3674
|
mt_command_parser: function(e, t, n, r) {
|
|
3664
|
-
if ("ST_SESSION" !== cn(e)) return
|
|
3675
|
+
if ("ST_SESSION" !== cn(e)) return cr("Not in session"), null;
|
|
3665
3676
|
n || (n = {});
|
|
3666
|
-
let l =
|
|
3667
|
-
return o || (o = {}),
|
|
3677
|
+
let l = xi(e, jt(r), Nl(e, n, "service", "", 0)), o = $l(e, n, "__md_command__", null, Vn.KW_EXTRACT);
|
|
3678
|
+
return o || (o = {}), to(e, n, "command_stack", {
|
|
3668
3679
|
command: t,
|
|
3669
3680
|
kw: o
|
|
3670
|
-
}),
|
|
3681
|
+
}), to(e, n, ki, l), n.__command__ = t, ro(e, n, "__command__"), Wi(e, "EV_MT_COMMAND", n, r), null;
|
|
3671
3682
|
},
|
|
3672
3683
|
mt_inject_event: function(e, t, n, r) {
|
|
3673
3684
|
if ("ST_SESSION" !== cn(e)) return window.console.error("Not in session"), -1;
|
|
3674
|
-
if (n =
|
|
3685
|
+
if (n = Lr({}, zr(n) ? n : {}), zr(n.__md_iev__) && (n.__md_iev__ = kr(n.__md_iev__)), no(e, n, ki));
|
|
3675
3686
|
else {
|
|
3676
|
-
let l =
|
|
3677
|
-
|
|
3687
|
+
let l = xi(e, jt(r), Nl(e, n, "__service__", 0, 0));
|
|
3688
|
+
Vr(n, "__service__"), to(e, n, "__message__", t), to(e, n, ki, l);
|
|
3678
3689
|
}
|
|
3679
|
-
return
|
|
3690
|
+
return ro(e, n, "__message__"), Wi(e, t, n, r);
|
|
3680
3691
|
},
|
|
3681
3692
|
mt_subscription_added: function(e, t) {
|
|
3682
3693
|
let n = e.priv;
|
|
3683
|
-
return "ST_SESSION" === cn(e) && n.websocket ? n.inside_on_open ? 0 :
|
|
3694
|
+
return "ST_SESSION" === cn(e) && n.websocket ? n.inside_on_open ? 0 : Yi(e, t) : 0;
|
|
3684
3695
|
},
|
|
3685
3696
|
mt_subscription_deleted: function(e, t) {
|
|
3686
3697
|
let n = e.priv;
|
|
3687
3698
|
if ("ST_SESSION" !== cn(e) || !n.websocket) return 0;
|
|
3688
3699
|
if (n.inside_on_open) return 0;
|
|
3689
|
-
if (
|
|
3700
|
+
if (il(t.event)) return 0;
|
|
3690
3701
|
let r = {}, l = t.__global__, o = t.__config__, i = t.__filter__, s = t.__service__, a = t.subscriber;
|
|
3691
3702
|
o && (r.__config__ = o), l && (r.__global__ = l), i && (r.__filter__ = i);
|
|
3692
|
-
return
|
|
3703
|
+
return to(e, r, ki, xi(e, jt(a), s)), ro(e, r, "__unsubscribing__"), Wi(e, t.event, r, e);
|
|
3693
3704
|
}
|
|
3694
3705
|
};
|
|
3695
|
-
function
|
|
3706
|
+
function ns() {
|
|
3696
3707
|
return function(e) {
|
|
3697
|
-
if (
|
|
3708
|
+
if (Ui) return cr(`GClass ALREADY created: ${e}`), -1;
|
|
3698
3709
|
const t = [
|
|
3699
3710
|
["ST_DISCONNECTED", [
|
|
3700
3711
|
[
|
|
3701
3712
|
"EV_ON_OPEN",
|
|
3702
|
-
|
|
3713
|
+
Ji,
|
|
3703
3714
|
"ST_WAIT_IDENTITY_CARD_ACK"
|
|
3704
3715
|
],
|
|
3705
3716
|
[
|
|
3706
3717
|
"EV_ON_CLOSE",
|
|
3707
|
-
|
|
3718
|
+
qi,
|
|
3708
3719
|
null
|
|
3709
3720
|
],
|
|
3710
3721
|
[
|
|
3711
3722
|
"EV_TIMEOUT",
|
|
3712
|
-
|
|
3723
|
+
Bi,
|
|
3713
3724
|
null
|
|
3714
3725
|
],
|
|
3715
3726
|
[
|
|
@@ -3721,22 +3732,22 @@ function es() {
|
|
|
3721
3732
|
["ST_WAIT_IDENTITY_CARD_ACK", [
|
|
3722
3733
|
[
|
|
3723
3734
|
"EV_ON_MESSAGE",
|
|
3724
|
-
|
|
3735
|
+
Xi,
|
|
3725
3736
|
null
|
|
3726
3737
|
],
|
|
3727
3738
|
[
|
|
3728
3739
|
"EV_IDENTITY_CARD_ACK",
|
|
3729
|
-
|
|
3740
|
+
Qi,
|
|
3730
3741
|
null
|
|
3731
3742
|
],
|
|
3732
3743
|
[
|
|
3733
3744
|
"EV_ON_CLOSE",
|
|
3734
|
-
|
|
3745
|
+
qi,
|
|
3735
3746
|
"ST_DISCONNECTED"
|
|
3736
3747
|
],
|
|
3737
3748
|
[
|
|
3738
3749
|
"EV_TIMEOUT",
|
|
3739
|
-
|
|
3750
|
+
zi,
|
|
3740
3751
|
null
|
|
3741
3752
|
],
|
|
3742
3753
|
[
|
|
@@ -3748,22 +3759,22 @@ function es() {
|
|
|
3748
3759
|
["ST_SESSION", [
|
|
3749
3760
|
[
|
|
3750
3761
|
"EV_ON_MESSAGE",
|
|
3751
|
-
|
|
3762
|
+
Xi,
|
|
3752
3763
|
null
|
|
3753
3764
|
],
|
|
3754
3765
|
[
|
|
3755
3766
|
"EV_MT_STATS",
|
|
3756
|
-
|
|
3767
|
+
Zi,
|
|
3757
3768
|
null
|
|
3758
3769
|
],
|
|
3759
3770
|
[
|
|
3760
3771
|
"EV_MT_COMMAND",
|
|
3761
|
-
|
|
3772
|
+
es,
|
|
3762
3773
|
null
|
|
3763
3774
|
],
|
|
3764
3775
|
[
|
|
3765
3776
|
"EV_ON_CLOSE",
|
|
3766
|
-
|
|
3777
|
+
qi,
|
|
3767
3778
|
"ST_DISCONNECTED"
|
|
3768
3779
|
],
|
|
3769
3780
|
[
|
|
@@ -3774,7 +3785,7 @@ function es() {
|
|
|
3774
3785
|
]],
|
|
3775
3786
|
[null, null]
|
|
3776
3787
|
];
|
|
3777
|
-
return (
|
|
3788
|
+
return (Ui = Ae(e, [
|
|
3778
3789
|
["EV_ON_MESSAGE", U.EVF_OUTPUT_EVENT],
|
|
3779
3790
|
["EV_IDENTITY_CARD_ACK", U.EVF_PUBLIC_EVENT],
|
|
3780
3791
|
["EV_ON_ID_NAK", U.EVF_PUBLIC_EVENT | U.EVF_OUTPUT_EVENT],
|
|
@@ -3785,9 +3796,9 @@ function es() {
|
|
|
3785
3796
|
["EV_ON_OPEN_ERROR", U.EVF_OUTPUT_EVENT | U.EVF_NO_WARN_SUBS],
|
|
3786
3797
|
["EV_TIMEOUT", 0],
|
|
3787
3798
|
[null, 0]
|
|
3788
|
-
], t,
|
|
3799
|
+
], t, ts, 0, Ii, Pi, 0, 0, Ci, C.gcflag_no_check_output_events)) ? 0 : -1;
|
|
3789
3800
|
}("C_IEVENT_CLI");
|
|
3790
3801
|
}
|
|
3791
|
-
export { I as GObj, N as SDATA, R as SDATAAUTHZ, w as SDATACM, j as SDATACM2, A as SDATADF, $ as SDATAPM, D as SDATAPM0, S as SDATA_END, O as SDataDesc, a as YUNETA_VERSION, h as __yuno__, o as build_command_response,
|
|
3802
|
+
export { I as GObj, N as SDATA, R as SDATAAUTHZ, w as SDATACM, j as SDATACM2, A as SDATADF, $ as SDATAPM, D as SDATAPM0, S as SDATA_END, O as SDataDesc, a as YUNETA_VERSION, h as __yuno__, o as build_command_response, Wo as build_path, s as build_stats_response, Vo as clean_name, vi as clear_timeout, cl as cmp_two_simple_json, l as command_parser, Do as createElement2, Ro as createOneHtml, po as create_json_record, gi as create_template_record, Lo as current_timestamp, T as data_type_t, ri as db_list_persistent_attrs, ei as db_load_persistent_attrs, ni as db_remove_persistent_attrs, ti as db_save_persistent_attrs, Mo as debounce, Xl as delete_from_list, Ir as duplicate_objects, Hr as empty_json, il as empty_string, Eo as escapeHtml, U as event_flag_t, Ho as flat2json, Xo as flat_apply, Qo as flat_diff, Bo as flat_key_join, Jo as flat_key_split, Pe as gclass_add_ev_action, Fe as gclass_add_event_type, Le as gclass_add_state, Ge as gclass_check_fsm, Ae as gclass_create, Ve as gclass_event_type, Me as gclass_find_by_name, C as gclass_flag_t, ke as gclass_unregister, Ao as getPositionRelativeToBody, Go as get_function_name, Po as get_now, Lt as gobj_bottom_gobj, fn as gobj_change_parent, _n as gobj_change_state, Un 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, xe as gobj_default_service, yn as gobj_deliver_posted_events, st as gobj_destroy, Bt as gobj_find_child, Kt as gobj_find_gobj, Ke as gobj_find_service, Ln as gobj_find_subscribings, In as gobj_find_subscriptions, L as gobj_flag_t, Dt as gobj_full_name, $t 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, zt as gobj_has_attr, dn as gobj_has_event, bn as gobj_has_output_event, $e as gobj_hsdata, Ct as gobj_is_destroying, vt as gobj_is_playing, It as gobj_is_pure_child, Et as gobj_is_running, Tt as gobj_is_service, kt as gobj_is_volatil, Qe as gobj_list_persistent_attrs, Cn as gobj_list_subscriptions, qe as gobj_load_persistent_attrs, Jt as gobj_match_children, qt as gobj_match_children_tree, Yt as gobj_match_gobj, jt as gobj_name, At as gobj_parent, ht as gobj_pause, mt as gobj_play, hn as gobj_post_event, En as gobj_posted_events_size, Pn as gobj_publish_event, Qt 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, ze as gobj_remove_persistent_attrs, Oe as gobj_repr_global_trace_levels, ln as gobj_reset_volatil_attrs, He as gobj_save_persistent_attrs, Ht as gobj_search_path, Tn as gobj_send_event, We as gobj_services, Pt as gobj_set_bottom_gobj, he as gobj_set_deep_trace, Te as gobj_set_gclass_no_trace, Ee 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, ye as gobj_set_gobj_trace, x as gobj_set_trace_machine_format, Rt as gobj_short_name, at as gobj_start, _t as gobj_start_children, ft as gobj_start_tree, Se as gobj_start_up, Fn as gobj_stats, gt as gobj_stop, bt as gobj_stop_children, pt as gobj_stop_tree, Dn as gobj_subscribe_event, Z as gobj_trace_level, K as gobj_trace_machine_format, ee as gobj_trace_no_level, An as gobj_unsubscribe_event, kn as gobj_unsubscribe_list, Ft as gobj_walk_gobj_children, Vt 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, Ot as gobj_yuno, wt as gobj_yuno_id, St as gobj_yuno_name, Nt as gobj_yuno_role, vo as html_markup, Hl as id_index_in_obj_list, Uo as index_in_list, Qr as is_array, el as is_boolean, rl as is_date, ll as is_function, ol as is_gobj, Oo as is_html_markup, gl as is_metadata_key, tl as is_null, Zr as is_number, zr as is_object, dl as is_private_key, nl as is_pure_number, yr as is_secret_name, Xr as is_string, _o as jdb_delete, fo as jdb_get, go as jdb_get_by_idx, co as jdb_get_topic, ao as jdb_init, uo as jdb_update, qo as json2flat, Wr as json_array_append, xr as json_array_append_new, Yr as json_array_extend, Kr as json_array_remove, Jr as json_array_size, kr as json_deep_copy, Cr as json_is_identical, Dr as json_mask_secrets, Vr as json_object_del, Fr as json_object_get, Gr as json_object_set, Mr as json_object_set_new, Br as json_object_size, Lr as json_object_update, Pr as json_object_update_existing, Ur as json_object_update_missing, qr as json_size, ho as jwt2json, mo as jwtDecode, Ul as kw_clone_by_keys, Fl as kw_clone_by_not_keys, Pl as kw_collect, Tl as kw_delete, Cl as kw_find_json_in_list, yl as kw_find_path, Vn as kw_flag_t, vl as kw_get_bool, jl as kw_get_dict, $l as kw_get_dict_value, Ol as kw_get_int, Rl as kw_get_list, Vl as kw_get_local_storage_value, wl as kw_get_pointer, Sl as kw_get_real, Nl as kw_get_str, pl as kw_has_key, Il as kw_match_simple, bl as kw_pop, Ml as kw_remove_local_storage_value, Ll as kw_select, Dl as kw_set_dict_value, Gl as kw_set_local_storage_value, Al as kw_set_subdict_value, xl as kwid_collect, Bl as kwid_find_one_record, Jl as kwid_get_ids, Wl as kwid_match_id, Kl as kwid_new_dict, Yl as kwid_new_list, ql as list2options, oo as load_json_file, dr as log_debug, cr as log_error, gr as log_info, fr as log_warning, Nr as mask_secrets_inline, lo as msg_iev_get_msg_type, no as msg_iev_get_stack, to as msg_iev_push_stack, Zl as msg_iev_read_key, ro as msg_iev_set_msg_type, eo as msg_iev_write_key, Fo as node_uuid, sl as parseBoolean, ko as parseSVG, Io as refresh_language, ns as register_c_ievent_cli, Ei as register_c_timer, Ai as register_c_yuno, yo as safeSrc, v as sdata_flag_t, io as send_http_json_post, zn as set_console_log_enabled, Xn as set_console_log_filter, qn as set_log_callback, rr as set_remote_log_functions, jo as set_strings_are_text, yi as set_timeout, Ti as set_timeout_periodic, t as sprintf, i as stats_parser, zl as str_in_list, _l as strcasecmp, ul as strcmp, $o as strings_are_text, al as strncmp, Ql as strs_in_list, fl as strstr, fi as template_get_field_desc, Co as timeTracker, pr as trace_json, Ar as trace_json_masked, B as trace_level_t, br as trace_msg, oi as treedb_decoder_fkey, si as treedb_decoder_hook, ii as treedb_encoder_fkey, ci as treedb_get_field_desc, li as treedb_hook_data_size, n as vsprintf, F as walk_type_t };
|
|
3792
3803
|
|
|
3793
3804
|
//# sourceMappingURL=gobj-js.es.min.js.map
|