@yuneta/gobj-js 7.27.0 → 7.28.0
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/LICENSE +24 -0
- package/README.md +0 -2
- package/THIRD-PARTY-NOTICES +37 -0
- package/dist/gobj-js.cjs.js +29 -55
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +237 -250
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +30 -54
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +305 -319
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +29 -55
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +237 -250
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +29 -55
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +237 -250
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +8 -7
package/dist/gobj-js.es.min.js
CHANGED
|
@@ -1,3 +1,32 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
Adapted from https://github.com/alexei/sprintf.js/blob/master/src/sprintf.js
|
|
3
|
+
under its BSD-3-Clause License:
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2007-present, Alexandru Mărășteanu <hello@alexei.ro>
|
|
6
|
+
All rights reserved.
|
|
7
|
+
|
|
8
|
+
Redistribution and use in source and binary forms, with or without
|
|
9
|
+
modification, are permitted provided that the following conditions are met:
|
|
10
|
+
* Redistributions of source code must retain the above copyright
|
|
11
|
+
notice, this list of conditions and the following disclaimer.
|
|
12
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
13
|
+
notice, this list of conditions and the following disclaimer in the
|
|
14
|
+
documentation and/or other materials provided with the distribution.
|
|
15
|
+
* Neither the name of this software nor the names of its contributors may be
|
|
16
|
+
used to endorse or promote products derived from this software without
|
|
17
|
+
specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
20
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
21
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
|
|
23
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
24
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
25
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
26
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
27
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
28
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
29
|
+
*/
|
|
1
30
|
var e = {
|
|
2
31
|
not_string: /[^s]/,
|
|
3
32
|
not_bool: /[^t]/,
|
|
@@ -147,9 +176,9 @@ var u = "7.0.0a", a = null, c = null, _ = null, f = null, g = null, d = null, b
|
|
|
147
176
|
DTP_DICT: 6,
|
|
148
177
|
DTP_JSON: 7,
|
|
149
178
|
DTP_POINTER: 8
|
|
150
|
-
}), S = (e) => e === O.DTP_STRING, j = (e) => e === O.DTP_BOOLEAN,
|
|
179
|
+
}), S = (e) => e === O.DTP_STRING, j = (e) => e === O.DTP_BOOLEAN, $ = (e) => e === O.DTP_REAL, N = (e) => e === O.DTP_LIST, w = (e) => e === O.DTP_DICT, R = (e) => e === O.DTP_JSON;
|
|
151
180
|
O.DTP_POINTER;
|
|
152
|
-
var A = (e) => ((e) => e === O.DTP_INTEGER)(e) ||
|
|
181
|
+
var A = (e) => ((e) => e === O.DTP_INTEGER)(e) || $(e) || j(e), D = Object.freeze({
|
|
153
182
|
SDF_NOTACCESS: 1,
|
|
154
183
|
SDF_RD: 2,
|
|
155
184
|
SDF_WR: 4,
|
|
@@ -418,11 +447,11 @@ function je(e) {
|
|
|
418
447
|
const t = Gl(e) ? mt(e) : e;
|
|
419
448
|
return t ? ie(t.trace_level, t.s_user_trace_level) : (Hr(`gobj_get_gclass_trace_level2: gclass NOT FOUND: ${e}`), []);
|
|
420
449
|
}
|
|
421
|
-
function
|
|
450
|
+
function $e(e) {
|
|
422
451
|
const t = Gl(e) ? mt(e) : e;
|
|
423
452
|
return t ? ie(t.no_trace_level, t.s_user_trace_level) : (Hr(`gobj_get_gclass_trace_no_level: gclass NOT FOUND: ${e}`), []);
|
|
424
453
|
}
|
|
425
|
-
function
|
|
454
|
+
function Ne(e) {
|
|
426
455
|
return le = Number(e) || 0, 0;
|
|
427
456
|
}
|
|
428
457
|
function we(e, t, n) {
|
|
@@ -597,7 +626,7 @@ function Ke(e) {
|
|
|
597
626
|
}(e)) return t;
|
|
598
627
|
}
|
|
599
628
|
function Be(e, t) {
|
|
600
|
-
return S(e) ? Gl(t) : w(e) ? Fl(t) :
|
|
629
|
+
return S(e) ? Gl(t) : w(e) ? Fl(t) : N(e) ? Ml(t) : !A(e) || "number" == typeof t || "boolean" == typeof t;
|
|
601
630
|
}
|
|
602
631
|
function Ye(e) {
|
|
603
632
|
return e >= -0x8000000000000000 && e < 0x8000000000000000;
|
|
@@ -629,11 +658,11 @@ function qe(e, t, n) {
|
|
|
629
658
|
refused: null
|
|
630
659
|
};
|
|
631
660
|
}
|
|
632
|
-
if (!(
|
|
661
|
+
if (!($(e) ? Ue : Le).test(t)) return {
|
|
633
662
|
value: void 0,
|
|
634
663
|
refused: Ge
|
|
635
664
|
};
|
|
636
|
-
if (
|
|
665
|
+
if ($(e)) {
|
|
637
666
|
const e = Number(t);
|
|
638
667
|
return Number.isFinite(e) ? {
|
|
639
668
|
value: e,
|
|
@@ -661,7 +690,7 @@ function qe(e, t, n) {
|
|
|
661
690
|
refused: "a number out of its range"
|
|
662
691
|
};
|
|
663
692
|
}
|
|
664
|
-
if (w(e) ||
|
|
693
|
+
if (w(e) || N(e)) {
|
|
665
694
|
const n = Ke(t);
|
|
666
695
|
return void 0 !== n && Be(e, n) ? {
|
|
667
696
|
value: n,
|
|
@@ -717,14 +746,14 @@ function ze(e, t) {
|
|
|
717
746
|
refused: null
|
|
718
747
|
} : r;
|
|
719
748
|
}
|
|
720
|
-
return S(e) || w(e) ||
|
|
749
|
+
return S(e) || w(e) || N(e) || A(e) ? n ? {
|
|
721
750
|
value: void 0,
|
|
722
751
|
refused: "a text with a NUL in it"
|
|
723
752
|
} : Gl(t) && !S(e) ? qe(e, t, !0) : Be(e, t) ? A(e) ? function(e, t) {
|
|
724
753
|
return "number" != typeof t || Number.isFinite(t) ? j(e) ? {
|
|
725
754
|
value: "boolean" == typeof t ? t : 0 !== t,
|
|
726
755
|
refused: null
|
|
727
|
-
} :
|
|
756
|
+
} : $(e) ? {
|
|
728
757
|
value: "boolean" == typeof t ? t ? 1 : 0 : t,
|
|
729
758
|
refused: null
|
|
730
759
|
} : "boolean" == typeof t ? {
|
|
@@ -1034,16 +1063,16 @@ function Ot(e, t) {
|
|
|
1034
1063
|
t.parent && Hr(`_add_child() ALREADY HAS PARENT: ${t.gobj_name}`), e.dl_children.push(t), t.parent = e;
|
|
1035
1064
|
}
|
|
1036
1065
|
function St(e, t) {
|
|
1037
|
-
let n =
|
|
1066
|
+
let n = js(e.dl_children, t);
|
|
1038
1067
|
n >= 0 && (Cl(e.dl_children, n), t.parent = null);
|
|
1039
1068
|
}
|
|
1040
1069
|
function jt(e, t) {
|
|
1041
1070
|
return en(e) ? a ? a(e, t) : -1 : (Hr(`${an(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
1042
1071
|
}
|
|
1043
|
-
function
|
|
1072
|
+
function $t(e, t) {
|
|
1044
1073
|
return en(e) ? c ? c(e, t) : -1 : (Hr(`${an(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
1045
1074
|
}
|
|
1046
|
-
function
|
|
1075
|
+
function Nt(e, t) {
|
|
1047
1076
|
return en(e) ? _ ? _(e, t) : -1 : (Hr(`${an(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
1048
1077
|
}
|
|
1049
1078
|
function wt(e, t) {
|
|
@@ -1421,7 +1450,7 @@ function jn(e, t) {
|
|
|
1421
1450
|
for (const n of Object.keys(t)) if ("__gclass_name__" !== n && "__gobj_name__" !== n && "__prefix_gobj_name__" !== n && "__disabled__" !== n && "__state__" !== n && An(e, n) && i[n] !== t[n]) return !1;
|
|
1422
1451
|
return !0;
|
|
1423
1452
|
}
|
|
1424
|
-
function
|
|
1453
|
+
function $n(e, t) {
|
|
1425
1454
|
if (dn(e)) return Hr("gobj NULL or DESTROYED"), null;
|
|
1426
1455
|
const n = e.dl_children;
|
|
1427
1456
|
for (let e = 0; e < n.length; e++) {
|
|
@@ -1430,7 +1459,7 @@ function Nn(e, t) {
|
|
|
1430
1459
|
}
|
|
1431
1460
|
return null;
|
|
1432
1461
|
}
|
|
1433
|
-
function
|
|
1462
|
+
function Nn(e, t) {
|
|
1434
1463
|
if (dn(e)) return Hr("gobj NULL or DESTROYED"), null;
|
|
1435
1464
|
t = t || {};
|
|
1436
1465
|
let n = [];
|
|
@@ -1468,7 +1497,7 @@ function Rn(e, t) {
|
|
|
1468
1497
|
if (1 === n.length) return e;
|
|
1469
1498
|
let r = n[1].split("^"), o = {};
|
|
1470
1499
|
1 === r.length ? o.__gobj_name__ = r : (o.__gclass_name__ = r[0], o.__gobj_name__ = r[1]);
|
|
1471
|
-
let l =
|
|
1500
|
+
let l = $n(e, o);
|
|
1472
1501
|
return l ? (n.splice(0, 1), n = n.join("`"), Rn(l, n)) : null;
|
|
1473
1502
|
}
|
|
1474
1503
|
function An(e, t) {
|
|
@@ -1488,7 +1517,7 @@ function Cn(e, t, n) {
|
|
|
1488
1517
|
const l = o[n];
|
|
1489
1518
|
if (l.name && (-1 === t || l.flag & t)) {
|
|
1490
1519
|
let t;
|
|
1491
|
-
!e.gclass.gmt.mt_reading || e.obflag & B.obflag_destroyed ? t =
|
|
1520
|
+
!e.gclass.gmt.mt_reading || e.obflag & B.obflag_destroyed ? t = $l(e.jn_attrs, l.name) : (t = e.gclass.gmt.mt_reading(e, l.name), void 0 === t && (t = $l(e.jn_attrs, l.name))), wl(r, l.name, t);
|
|
1492
1521
|
}
|
|
1493
1522
|
}
|
|
1494
1523
|
return r;
|
|
@@ -1501,21 +1530,21 @@ function In(e, t) {
|
|
|
1501
1530
|
if (0 === Xl(t, "__service__")) return en(e);
|
|
1502
1531
|
}
|
|
1503
1532
|
let n = it(e, t, !1);
|
|
1504
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag & B.obflag_destroyed ?
|
|
1533
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & B.obflag_destroyed ? $l(n, t) : e.gclass.gmt.mt_reading(e, t) : (Hr(`${an(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1505
1534
|
}
|
|
1506
1535
|
function kn(e, t) {
|
|
1507
1536
|
t && Xl(t, "__trace_level__");
|
|
1508
1537
|
let n = it(e, t, !1);
|
|
1509
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag & B.obflag_destroyed ?
|
|
1538
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & B.obflag_destroyed ? $l(n, t) : e.gclass.gmt.mt_reading(e, t) : (Hr(`${an(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1510
1539
|
}
|
|
1511
1540
|
function Pn(e, t) {
|
|
1512
1541
|
if (t && 0 === Xl(t, "__state__")) return Yn(e);
|
|
1513
1542
|
let n = it(e, t, !1);
|
|
1514
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag & B.obflag_destroyed ?
|
|
1543
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & B.obflag_destroyed ? $l(n, t) : e.gclass.gmt.mt_reading(e, t) : (Hr(`${an(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1515
1544
|
}
|
|
1516
1545
|
function Ln(e, t) {
|
|
1517
1546
|
let n = it(e, t, !1);
|
|
1518
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag & B.obflag_destroyed ?
|
|
1547
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & B.obflag_destroyed ? $l(n, t) : e.gclass.gmt.mt_reading(e, t) : (Hr(`${an(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
1519
1548
|
}
|
|
1520
1549
|
function Un(e, n, r, o) {
|
|
1521
1550
|
if (!Gl(n)) return Hr(t("gobj_write_attr(%s): path must be a string", an(e))), -1;
|
|
@@ -1527,7 +1556,7 @@ function Un(e, n, r, o) {
|
|
|
1527
1556
|
let u = s.length;
|
|
1528
1557
|
for (let t = 0; t < u; t++) {
|
|
1529
1558
|
l = s[t];
|
|
1530
|
-
let n =
|
|
1559
|
+
let n = $n(e, { __gobj_name__: l });
|
|
1531
1560
|
if (n && t < u - 1) {
|
|
1532
1561
|
e = n;
|
|
1533
1562
|
continue;
|
|
@@ -1720,7 +1749,7 @@ function lr(e, n, r, o) {
|
|
|
1720
1749
|
if (1 === Q) ee(t("🔄 %s %s%s %s from %s%s", n || "", e.running ? "" : "!!", an(e), l.state_name, o && !o.running ? "!!" : "", an(o)));
|
|
1721
1750
|
else {
|
|
1722
1751
|
let r = "";
|
|
1723
|
-
s.action && (r =
|
|
1752
|
+
s.action && (r = Ds(s.action)), ee(t("🔄 mach(%s%s^%s), st: %s, ev: %s%s%s, ac: %s, from(%s%s^%s)", e.running ? "" : "!!", un(e), sn(e), l.state_name, "", n || "", "", r, o && !o.running ? "!!" : "", un(o), sn(o)));
|
|
1724
1753
|
}
|
|
1725
1754
|
r && ge(e) && kl(r) && yl(r);
|
|
1726
1755
|
}
|
|
@@ -1865,11 +1894,11 @@ function dr(e, n, r, o) {
|
|
|
1865
1894
|
}
|
|
1866
1895
|
if (oi(n, "__hard_subscription__")) {
|
|
1867
1896
|
let t = ci(e, n, "__hard_subscription__", !1);
|
|
1868
|
-
|
|
1897
|
+
Nl(n, "__hard_subscription__"), t && (l |= ir.__hard_subscription__);
|
|
1869
1898
|
}
|
|
1870
1899
|
if (oi(n, "__own_event__")) {
|
|
1871
1900
|
let t = ci(e, n, "__own_event__", !1);
|
|
1872
|
-
|
|
1901
|
+
Nl(n, "__own_event__"), t && (l |= ir.__own_event__);
|
|
1873
1902
|
}
|
|
1874
1903
|
}
|
|
1875
1904
|
Ll(s) > 0 && Rl(o, "__local__", El(s)), Ll(u) > 0 && Rl(o, "__filter__", El(u)), ql(a) || Rl(o, "__service__", a);
|
|
@@ -2013,7 +2042,7 @@ Object.freeze({
|
|
|
2013
2042
|
JSON_FALSE: 7,
|
|
2014
2043
|
JSON_NULL: 8
|
|
2015
2044
|
});
|
|
2016
|
-
var Sr = "undefined" != typeof window ? window.console : console, jr = Sr.error,
|
|
2045
|
+
var Sr = "undefined" != typeof window ? window.console : console, jr = Sr.error, $r = Sr.warn, Nr = Sr.info, wr = Sr.debug, Rr = null, Ar = 600, Dr = [];
|
|
2017
2046
|
function Cr(e) {
|
|
2018
2047
|
if ((e = "function" == typeof e ? e : null) && e !== Rr) {
|
|
2019
2048
|
Rr = e;
|
|
@@ -2067,7 +2096,7 @@ function Gr(e, t, n) {
|
|
|
2067
2096
|
}
|
|
2068
2097
|
}
|
|
2069
2098
|
function Vr(e) {
|
|
2070
|
-
e ? (jr = e,
|
|
2099
|
+
e ? (jr = e, $r = e) : (jr = Sr.error, $r = Sr.warn);
|
|
2071
2100
|
}
|
|
2072
2101
|
function Wr(e) {
|
|
2073
2102
|
try {
|
|
@@ -2140,27 +2169,27 @@ function qr(e, ...t) {
|
|
|
2140
2169
|
}
|
|
2141
2170
|
}
|
|
2142
2171
|
function Hr(e, ...t) {
|
|
2143
|
-
let n = Br(e, ...t), r =
|
|
2172
|
+
let n = Br(e, ...t), r = Os();
|
|
2144
2173
|
jr && (jr === Sr.error ? Ur("error", n) && Yr(jr, "%c" + r + " ERROR: " + String(n), "color:red") : (Ur("error", n) && Sr.error("%c" + r + " ERROR: " + String(n), "color:red"), qr(jr, `${r} ERROR: ${String(n)}`))), Mr("error", n, r);
|
|
2145
2174
|
}
|
|
2146
2175
|
function zr(e, ...t) {
|
|
2147
|
-
let n = Br(e, ...t), r =
|
|
2148
|
-
|
|
2176
|
+
let n = Br(e, ...t), r = Os();
|
|
2177
|
+
$r && ($r === Sr.warn ? Ur("warning", n) && Yr($r, "%c" + r + " WARNING: " + String(n), "color:yellow") : (Ur("warning", n) && Sr.warn("%c" + r + " WARNING: " + String(n), "color:yellow"), qr($r, `${r} WARNING: ${String(n)}`))), Mr("warning", n, r);
|
|
2149
2178
|
}
|
|
2150
2179
|
function Qr(e, ...t) {
|
|
2151
|
-
let n = Br(e, ...t), r =
|
|
2152
|
-
|
|
2180
|
+
let n = Br(e, ...t), r = Os();
|
|
2181
|
+
Nr && Ur("info", n) && Yr(Nr, "%c" + r + " INFO: " + String(n), "color:cyan"), Mr("info", n, r);
|
|
2153
2182
|
}
|
|
2154
2183
|
function Xr(e, ...t) {
|
|
2155
|
-
let n = Br(e, ...t), r =
|
|
2184
|
+
let n = Br(e, ...t), r = Os();
|
|
2156
2185
|
wr && Ur("debug", n) && Yr(wr, "%c" + r + " DEBUG: " + String(n), "color:silver"), Mr("debug", n, r);
|
|
2157
2186
|
}
|
|
2158
2187
|
function Zr(e, ...t) {
|
|
2159
|
-
let n = Br(e, ...t), r =
|
|
2188
|
+
let n = Br(e, ...t), r = Os();
|
|
2160
2189
|
wr && Ur("msg", n) && Yr(wr, "%c" + r + " MSG: " + String(n), "color:cyan"), Mr("msg", n, r);
|
|
2161
2190
|
}
|
|
2162
2191
|
function eo(e, t) {
|
|
2163
|
-
Ur("json", t) && (t && Yr(Sr.warn, "=====> " + xr(t)), Yr(Sr.dir, e)), Mr("json", e,
|
|
2192
|
+
Ur("json", t) && (t && Yr(Sr.warn, "=====> " + xr(t)), Yr(Sr.dir, e)), Mr("json", e, Os());
|
|
2164
2193
|
}
|
|
2165
2194
|
function to(e) {
|
|
2166
2195
|
const t = new Array(128).fill(null);
|
|
@@ -2371,7 +2400,7 @@ function jo(e, t) {
|
|
|
2371
2400
|
for (; "." === e[n - 1];) n--;
|
|
2372
2401
|
return n - t;
|
|
2373
2402
|
}
|
|
2374
|
-
function
|
|
2403
|
+
function $o(e, t) {
|
|
2375
2404
|
if (t > 0 && Eo(e.charCodeAt(t - 1))) return 0;
|
|
2376
2405
|
for (const n of ["bearer", "basic"]) {
|
|
2377
2406
|
const r = n.length;
|
|
@@ -2379,17 +2408,17 @@ function No(e, t) {
|
|
|
2379
2408
|
}
|
|
2380
2409
|
return 0;
|
|
2381
2410
|
}
|
|
2382
|
-
function
|
|
2411
|
+
function No(e) {
|
|
2383
2412
|
return e >= 65 && e <= 90 ? e - 65 : e >= 97 && e <= 122 ? e - 97 + 26 : e >= 48 && e <= 57 ? e - 48 + 52 : 43 === e ? 62 : 47 === e ? 63 : -1;
|
|
2384
2413
|
}
|
|
2385
2414
|
var wo = " \r\n\"',;}]\0";
|
|
2386
2415
|
function Ro(e, t) {
|
|
2387
|
-
const n =
|
|
2416
|
+
const n = $o(e, t);
|
|
2388
2417
|
if (!n) return [0, 0];
|
|
2389
2418
|
const r = 5 === n ? "basic" : "bearer";
|
|
2390
2419
|
let o = !1, l = t + n;
|
|
2391
2420
|
for (; l < e.length && (" " === e[l] || " " === e[l]);) l++;
|
|
2392
|
-
if (l < e.length &&
|
|
2421
|
+
if (l < e.length && $o(e, l) === n && So(e, l, r)) for (l += n, o = !0; l < e.length && (" " === e[l] || " " === e[l]);) l++;
|
|
2393
2422
|
if (l >= e.length) return [0, 0];
|
|
2394
2423
|
if ("\"" === e[l] || "'" === e[l]) {
|
|
2395
2424
|
let n = l + 1;
|
|
@@ -2421,7 +2450,7 @@ function Ro(e, t) {
|
|
|
2421
2450
|
if (!function(e, t, n) {
|
|
2422
2451
|
let r = 0, o = 0;
|
|
2423
2452
|
for (let l = 0; l < n; l++) {
|
|
2424
|
-
const n =
|
|
2453
|
+
const n = No(e.charCodeAt(t + l));
|
|
2425
2454
|
if (n < 0) return !1;
|
|
2426
2455
|
if (r = 16383 & (r << 6 | n), o += 6, o >= 8 && (o -= 8, 58 == (r >> o & 255))) return !0;
|
|
2427
2456
|
}
|
|
@@ -2495,7 +2524,7 @@ function Io(e, t) {
|
|
|
2495
2524
|
}
|
|
2496
2525
|
}
|
|
2497
2526
|
let r = t;
|
|
2498
|
-
const o =
|
|
2527
|
+
const o = $o(e, t);
|
|
2499
2528
|
if (o) {
|
|
2500
2529
|
for (r = t + o; r < e.length && (" " === e[r] || " " === e[r]);) r++;
|
|
2501
2530
|
if (r < e.length && ("\"" === e[r] || "'" === e[r])) return Io(e, r);
|
|
@@ -2610,7 +2639,7 @@ function Zo(e, t) {
|
|
|
2610
2639
|
function el(e, t, n) {
|
|
2611
2640
|
const r = t + 1;
|
|
2612
2641
|
return r < e.length && ("\"" === e[r] || "'" === e[r]) ? Bo(e, r + 1, Ko[e[r]], n) : (function(e, t, n, r) {
|
|
2613
|
-
const o =
|
|
2642
|
+
const o = $o(e, t);
|
|
2614
2643
|
if (!o) return -1;
|
|
2615
2644
|
let l = t + o;
|
|
2616
2645
|
for (; l < e.length && (" " === e[l] || " " === e[l]);) l++;
|
|
@@ -2681,7 +2710,7 @@ function il(e, t) {
|
|
|
2681
2710
|
for (; l < e.length && (" " === e[l] || " " === e[l]);) l++;
|
|
2682
2711
|
const i = Io(e, l);
|
|
2683
2712
|
Uo(t, l, i);
|
|
2684
|
-
const s =
|
|
2713
|
+
const s = $o(e, l);
|
|
2685
2714
|
r = s ? l + s : i > l ? i : r + 1, n = r;
|
|
2686
2715
|
}
|
|
2687
2716
|
}
|
|
@@ -2871,10 +2900,10 @@ function jl(e, t) {
|
|
|
2871
2900
|
for (let n in t) Object.prototype.hasOwnProperty.call(t, n) && !Object.prototype.hasOwnProperty.call(e, n) && ii(e, n, t[n]);
|
|
2872
2901
|
return e;
|
|
2873
2902
|
}
|
|
2874
|
-
function
|
|
2903
|
+
function $l(e, t) {
|
|
2875
2904
|
if (e && Object.prototype.hasOwnProperty.call(e, t)) return e[t];
|
|
2876
2905
|
}
|
|
2877
|
-
function
|
|
2906
|
+
function Nl(e, t) {
|
|
2878
2907
|
e && Object.prototype.hasOwnProperty.call(e, t) && delete e[t];
|
|
2879
2908
|
}
|
|
2880
2909
|
function wl(e, t, n) {
|
|
@@ -3228,7 +3257,7 @@ function Ei(e, n, r) {
|
|
|
3228
3257
|
continue;
|
|
3229
3258
|
}
|
|
3230
3259
|
let c = pi(0, e, o, void 0, 0);
|
|
3231
|
-
if (void 0 === c && (c =
|
|
3260
|
+
if (void 0 === c && (c = $l(e, o)), void 0 === c) {
|
|
3232
3261
|
l = !1;
|
|
3233
3262
|
break;
|
|
3234
3263
|
}
|
|
@@ -3292,23 +3321,23 @@ function ji(e, t, n, r) {
|
|
|
3292
3321
|
}
|
|
3293
3322
|
return o;
|
|
3294
3323
|
}
|
|
3295
|
-
function
|
|
3324
|
+
function $i(e, t, n, r) {
|
|
3296
3325
|
let o = {};
|
|
3297
3326
|
if (!Fl(t)) return o;
|
|
3298
3327
|
if (Ol(o, t), Gl(n) && !ql(n)) {
|
|
3299
3328
|
let l = n;
|
|
3300
|
-
Object.prototype.hasOwnProperty.call(t, l) ?
|
|
3301
|
-
} else if (Fl(n) && kl(n) > 0) for (let l of Object.keys(n)) Object.prototype.hasOwnProperty.call(t, l) ?
|
|
3329
|
+
Object.prototype.hasOwnProperty.call(t, l) ? Nl(o, l) : r && Hr(`${an(e)}: key not found: ${l}`);
|
|
3330
|
+
} else if (Fl(n) && kl(n) > 0) for (let l of Object.keys(n)) Object.prototype.hasOwnProperty.call(t, l) ? Nl(o, l) : r && Hr(`${an(e)}: key not found: ${l}`);
|
|
3302
3331
|
else {
|
|
3303
3332
|
if (!(Ml(n) && Pl(n) > 0)) return {};
|
|
3304
3333
|
for (let l = 0; l < n.length; l++) {
|
|
3305
3334
|
let i = n[l];
|
|
3306
|
-
Object.prototype.hasOwnProperty.call(t, i) ?
|
|
3335
|
+
Object.prototype.hasOwnProperty.call(t, i) ? Nl(o, i) : r && Hr(`${an(e)}: key not found: ${i}`);
|
|
3307
3336
|
}
|
|
3308
3337
|
}
|
|
3309
3338
|
return o;
|
|
3310
3339
|
}
|
|
3311
|
-
function
|
|
3340
|
+
function Ni() {
|
|
3312
3341
|
if ("undefined" == typeof window) return null;
|
|
3313
3342
|
let e;
|
|
3314
3343
|
try {
|
|
@@ -3330,7 +3359,7 @@ function Ri(e, t) {
|
|
|
3330
3359
|
wi.has(e) || (wi.add(e), zr(t));
|
|
3331
3360
|
}
|
|
3332
3361
|
function Ai(e, t, n = !1) {
|
|
3333
|
-
const r =
|
|
3362
|
+
const r = Ni();
|
|
3334
3363
|
if (!r) return t;
|
|
3335
3364
|
const o = `kw_get_local_storage_value(): localStorage key "${e}"`;
|
|
3336
3365
|
let l;
|
|
@@ -3365,7 +3394,7 @@ function Di(e, t) {
|
|
|
3365
3394
|
if (!e) return Hr(`kw_set_local_storage_value(): invalid key: key=${e}`), -1;
|
|
3366
3395
|
const n = nt(t);
|
|
3367
3396
|
if (void 0 === n) return Hr(`kw_set_local_storage_value(): cannot save "${e}": a value with no json text`), -1;
|
|
3368
|
-
const r =
|
|
3397
|
+
const r = Ni();
|
|
3369
3398
|
if (!r) return 0;
|
|
3370
3399
|
try {
|
|
3371
3400
|
return r.setItem(e, n), 0;
|
|
@@ -3374,7 +3403,7 @@ function Di(e, t) {
|
|
|
3374
3403
|
}
|
|
3375
3404
|
}
|
|
3376
3405
|
function Ci(e) {
|
|
3377
|
-
const t =
|
|
3406
|
+
const t = Ni();
|
|
3378
3407
|
if (t) if (e) try {
|
|
3379
3408
|
t.removeItem(e);
|
|
3380
3409
|
} catch (t) {
|
|
@@ -3660,57 +3689,14 @@ function is(e, t) {
|
|
|
3660
3689
|
return Sl(n, t), n;
|
|
3661
3690
|
}
|
|
3662
3691
|
function ss(e) {
|
|
3663
|
-
function t(e) {
|
|
3664
|
-
let t = e.replace(/-/g, "+").replace(/_/g, "/");
|
|
3665
|
-
switch (t.length % 4) {
|
|
3666
|
-
case 0: break;
|
|
3667
|
-
case 2:
|
|
3668
|
-
t += "==";
|
|
3669
|
-
break;
|
|
3670
|
-
case 3:
|
|
3671
|
-
t += "=";
|
|
3672
|
-
break;
|
|
3673
|
-
default: throw "Illegal base64url string!";
|
|
3674
|
-
}
|
|
3675
|
-
try {
|
|
3676
|
-
return function(e) {
|
|
3677
|
-
return decodeURIComponent(atob(e).replace(/(.)/g, function(e, t) {
|
|
3678
|
-
let n = t.charCodeAt(0).toString(16).toUpperCase();
|
|
3679
|
-
return n.length < 2 && (n = "0" + n), "%" + n;
|
|
3680
|
-
}));
|
|
3681
|
-
}(t);
|
|
3682
|
-
} catch (e) {
|
|
3683
|
-
return atob(t);
|
|
3684
|
-
}
|
|
3685
|
-
}
|
|
3686
|
-
let n = e.split(".");
|
|
3687
|
-
return {
|
|
3688
|
-
header: t(n[0]),
|
|
3689
|
-
payload: t(n[1]),
|
|
3690
|
-
signature: t(n[2])
|
|
3691
|
-
};
|
|
3692
|
-
}
|
|
3693
|
-
function us(e, t) {
|
|
3694
|
-
try {
|
|
3695
|
-
let n = ss(e);
|
|
3696
|
-
switch (t) {
|
|
3697
|
-
case "header": return JSON.parse(n.header);
|
|
3698
|
-
case "signature": return JSON.parse(n.signature);
|
|
3699
|
-
default: return JSON.parse(n.payload);
|
|
3700
|
-
}
|
|
3701
|
-
} catch (e) {
|
|
3702
|
-
return null;
|
|
3703
|
-
}
|
|
3704
|
-
}
|
|
3705
|
-
function as(e) {
|
|
3706
3692
|
return null == e ? "" : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
3707
3693
|
}
|
|
3708
|
-
function
|
|
3694
|
+
function us(e) {
|
|
3709
3695
|
if (!e) return "";
|
|
3710
3696
|
const t = String(e).trim();
|
|
3711
|
-
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" :
|
|
3697
|
+
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" : ss(t);
|
|
3712
3698
|
}
|
|
3713
|
-
var
|
|
3699
|
+
var as = class {
|
|
3714
3700
|
constructor(e) {
|
|
3715
3701
|
this.html = e, Object.freeze(this);
|
|
3716
3702
|
}
|
|
@@ -3718,28 +3704,28 @@ var _s = class {
|
|
|
3718
3704
|
return this.html;
|
|
3719
3705
|
}
|
|
3720
3706
|
};
|
|
3721
|
-
function
|
|
3722
|
-
return "string" != typeof e ? (Hr("html_markup: not a string, type " + typeof e), new
|
|
3707
|
+
function cs(e) {
|
|
3708
|
+
return "string" != typeof e ? (Hr("html_markup: not a string, type " + typeof e), new as("")) : new as(e);
|
|
3723
3709
|
}
|
|
3724
|
-
function
|
|
3725
|
-
return e instanceof
|
|
3710
|
+
function _s(e) {
|
|
3711
|
+
return e instanceof as;
|
|
3726
3712
|
}
|
|
3727
|
-
function
|
|
3713
|
+
function fs(e) {
|
|
3728
3714
|
const t = document.createElement("template");
|
|
3729
3715
|
return t.innerHTML = e.html.trim(), t.content;
|
|
3730
3716
|
}
|
|
3731
|
-
var
|
|
3732
|
-
function
|
|
3733
|
-
|
|
3717
|
+
var gs = !1, ds = /* @__PURE__ */ new Set();
|
|
3718
|
+
function bs(e) {
|
|
3719
|
+
gs = !!e;
|
|
3734
3720
|
}
|
|
3735
|
-
function
|
|
3736
|
-
return
|
|
3721
|
+
function ps() {
|
|
3722
|
+
return gs;
|
|
3737
3723
|
}
|
|
3738
|
-
function
|
|
3724
|
+
function hs(e) {
|
|
3739
3725
|
const t = document.createElement("template");
|
|
3740
3726
|
return t.innerHTML = e.trim(), t.content.firstChild;
|
|
3741
3727
|
}
|
|
3742
|
-
function
|
|
3728
|
+
function ms(e, t) {
|
|
3743
3729
|
let [n, r, o, l] = e;
|
|
3744
3730
|
if (!n) return void Hr("Tag must be a valid HTML element.");
|
|
3745
3731
|
let i = document.createElement(n), s = "";
|
|
@@ -3748,22 +3734,22 @@ function Es(e, t) {
|
|
|
3748
3734
|
for (const n of Object.keys(r[e])) t += `${n}: ${r[e][n]};`;
|
|
3749
3735
|
i.style.cssText = t;
|
|
3750
3736
|
} 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]);
|
|
3751
|
-
if (
|
|
3752
|
-
else if (Gl(o)) if (o = o.trim(), o.length > 0 && "<" === o[0] && !
|
|
3737
|
+
if (_s(o)) i.appendChild(fs(o));
|
|
3738
|
+
else if (Gl(o)) if (o = o.trim(), o.length > 0 && "<" === o[0] && !gs) i.appendChild(hs(o));
|
|
3753
3739
|
else if (o.length > 0 && "<" === o[0] && function(e) {
|
|
3754
|
-
if (
|
|
3740
|
+
if (ds.size >= 100) return;
|
|
3755
3741
|
const t = e.slice(0, 80);
|
|
3756
|
-
|
|
3742
|
+
ds.has(t) || (ds.add(t), zr(`createElement2: a string that starts with '<' is TEXT (set_strings_are_text): use html_markup() if it is markup: ${JSON.stringify(t)}`));
|
|
3757
3743
|
}(o), t && s) i.textContent = t(s) || o;
|
|
3758
3744
|
else i.textContent = o;
|
|
3759
3745
|
else if (Ml(o)) {
|
|
3760
|
-
if (o.length > 0) if (Gl(o[0])) i.appendChild(
|
|
3761
|
-
else for (let e of o) Array.isArray(e) ? e.length > 0 && i.appendChild(
|
|
3746
|
+
if (o.length > 0) if (Gl(o[0])) i.appendChild(ms(o, t));
|
|
3747
|
+
else for (let e of o) Array.isArray(e) ? e.length > 0 && i.appendChild(ms(e, t)) : e instanceof Node ? i.appendChild(e) : _s(e) ? i.appendChild(fs(e)) : Gl(e) ? i.appendChild(document.createTextNode(e)) : null != e && !1 !== e && Hr("createElement2: child ignored, type " + typeof e);
|
|
3762
3748
|
} else o instanceof HTMLElement || o instanceof Text || o instanceof SVGElement ? i.appendChild(o) : null != o && (Hr("content ignored"), eo(o));
|
|
3763
3749
|
if (l && "object" == typeof l) for (const e of Object.keys(l)) i.addEventListener(e, l[e]);
|
|
3764
3750
|
return i;
|
|
3765
3751
|
}
|
|
3766
|
-
function
|
|
3752
|
+
function ys(e) {
|
|
3767
3753
|
if (!e) return {
|
|
3768
3754
|
top: 0,
|
|
3769
3755
|
left: 0,
|
|
@@ -3783,10 +3769,10 @@ function vs(e) {
|
|
|
3783
3769
|
bottom: t + i + o
|
|
3784
3770
|
};
|
|
3785
3771
|
}
|
|
3786
|
-
function
|
|
3772
|
+
function Es(e) {
|
|
3787
3773
|
return new DOMParser().parseFromString(e, "image/svg+xml").firstChild;
|
|
3788
3774
|
}
|
|
3789
|
-
function
|
|
3775
|
+
function vs(e, t) {
|
|
3790
3776
|
if (!Yl(t)) return void Hr("You must supply a translation function");
|
|
3791
3777
|
e || (e = document);
|
|
3792
3778
|
const n = (t) => {
|
|
@@ -3810,7 +3796,7 @@ function Os(e, t) {
|
|
|
3810
3796
|
n && e.setAttribute("placeholder", t(n));
|
|
3811
3797
|
});
|
|
3812
3798
|
}
|
|
3813
|
-
function
|
|
3799
|
+
function Ts(e = "Time Tracker", t = !1) {
|
|
3814
3800
|
const n = e, r = performance.now();
|
|
3815
3801
|
let o = r;
|
|
3816
3802
|
return t && zr(`--\x3e ${n} - starting`), { mark: (e = "Intermediate", l = "") => {
|
|
@@ -3821,19 +3807,19 @@ function Ss(e = "Time Tracker", t = !1) {
|
|
|
3821
3807
|
};
|
|
3822
3808
|
} };
|
|
3823
3809
|
}
|
|
3824
|
-
function
|
|
3810
|
+
function Os(e) {
|
|
3825
3811
|
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), o = e.getTimezoneOffset();
|
|
3826
3812
|
return `${n}.${r}${o > 0 ? "-" : "+"}${t(Math.floor(Math.abs(o) / 60), 2)}${t(Math.abs(o) % 60, 2)}`;
|
|
3827
3813
|
}
|
|
3828
|
-
function
|
|
3814
|
+
function Ss() {
|
|
3829
3815
|
return Math.floor(Date.now() / 1e3);
|
|
3830
3816
|
}
|
|
3831
|
-
function
|
|
3817
|
+
function js(e, t) {
|
|
3832
3818
|
if (!e) throw "ERROR: index_in_list() list empty";
|
|
3833
3819
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return n;
|
|
3834
3820
|
return -1;
|
|
3835
3821
|
}
|
|
3836
|
-
function
|
|
3822
|
+
function $s() {
|
|
3837
3823
|
const e = "undefined" != typeof window && window.crypto || globalThis.crypto;
|
|
3838
3824
|
if (e && "function" == typeof e.randomUUID) return e.randomUUID();
|
|
3839
3825
|
const t = /* @__PURE__ */ new Uint8Array(16);
|
|
@@ -3843,35 +3829,35 @@ function ws() {
|
|
|
3843
3829
|
const n = Array.from(t, (e) => e.toString(16).padStart(2, "0")).join("");
|
|
3844
3830
|
return `${n.slice(0, 8)}-${n.slice(8, 12)}-${n.slice(12, 16)}-${n.slice(16, 20)}-${n.slice(20)}`;
|
|
3845
3831
|
}
|
|
3846
|
-
var
|
|
3847
|
-
function
|
|
3848
|
-
if (
|
|
3849
|
-
const e =
|
|
3850
|
-
if (!e) return
|
|
3832
|
+
var Ns = null, ws = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
3833
|
+
function Rs() {
|
|
3834
|
+
if (Ns) return Ns;
|
|
3835
|
+
const e = Ni();
|
|
3836
|
+
if (!e) return Ns = $s();
|
|
3851
3837
|
let t = null;
|
|
3852
3838
|
try {
|
|
3853
3839
|
t = e.getItem("host_uuid");
|
|
3854
3840
|
} catch (e) {
|
|
3855
|
-
return Ri("host_uuid", "node_uuid(): localStorage cannot be read (storage blocked?): a uuid of this page only"),
|
|
3841
|
+
return Ri("host_uuid", "node_uuid(): localStorage cannot be read (storage blocked?): a uuid of this page only"), Ns = $s();
|
|
3856
3842
|
}
|
|
3857
|
-
if (t && !
|
|
3858
|
-
t =
|
|
3843
|
+
if (t && !ws.test(t) && (zr("node_uuid(): the stored host_uuid is not a uuid: a new one replaces it"), t = null), !t) {
|
|
3844
|
+
t = $s();
|
|
3859
3845
|
try {
|
|
3860
3846
|
e.setItem("host_uuid", t);
|
|
3861
3847
|
} catch (e) {
|
|
3862
3848
|
Ri("host_uuid", "node_uuid(): localStorage cannot be written (storage full or blocked?): a uuid of this page only");
|
|
3863
3849
|
}
|
|
3864
3850
|
}
|
|
3865
|
-
return
|
|
3851
|
+
return Ns = t;
|
|
3866
3852
|
}
|
|
3867
|
-
function
|
|
3853
|
+
function As(e) {
|
|
3868
3854
|
return e.replace(/[?# ^:]/g, "_");
|
|
3869
3855
|
}
|
|
3870
|
-
function
|
|
3856
|
+
function Ds(e) {
|
|
3871
3857
|
let t = null;
|
|
3872
3858
|
return "function" != typeof e && "object" != typeof e || (t = ("" + e).match(/function\s*([\w\$]*)\s*\(/)), null !== t ? t[1] + "()" : "";
|
|
3873
3859
|
}
|
|
3874
|
-
function
|
|
3860
|
+
function Cs(e, t = 0, n = !1) {
|
|
3875
3861
|
let r = null, o = null, l = null;
|
|
3876
3862
|
const i = (...i) => {
|
|
3877
3863
|
l = this, o = i;
|
|
@@ -3886,20 +3872,20 @@ function ks(e, t = 0, n = !1) {
|
|
|
3886
3872
|
clearTimeout(r), r = null, o = null, l = null;
|
|
3887
3873
|
}, i;
|
|
3888
3874
|
}
|
|
3889
|
-
function
|
|
3875
|
+
function Is(...e) {
|
|
3890
3876
|
let t = "", n = 0;
|
|
3891
3877
|
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++));
|
|
3892
3878
|
return t;
|
|
3893
3879
|
}
|
|
3894
|
-
var
|
|
3895
|
-
function
|
|
3880
|
+
var ks = 256, Ps = 1e5;
|
|
3881
|
+
function Ls(e) {
|
|
3896
3882
|
const t = String(e).replace(/`/g, "``");
|
|
3897
3883
|
return "[" === t[0] ? "[" + t : t;
|
|
3898
3884
|
}
|
|
3899
|
-
function
|
|
3900
|
-
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` :
|
|
3885
|
+
function Us(e) {
|
|
3886
|
+
return Array.isArray(e) && 0 !== e.length ? e.map((e) => "number" == typeof e ? `[${e}]` : Ls(e)).join("`") : "";
|
|
3901
3887
|
}
|
|
3902
|
-
function
|
|
3888
|
+
function Fs(e) {
|
|
3903
3889
|
if ("string" != typeof e) return null;
|
|
3904
3890
|
let t = [], n = "";
|
|
3905
3891
|
for (let r = 0; r < e.length; r++) if ("`" !== e[r]) n += e[r];
|
|
@@ -3920,9 +3906,9 @@ function Gs(e) {
|
|
|
3920
3906
|
return null !== t ? t : "[" === e[0] && "[" === e[1] ? e.slice(1) : e;
|
|
3921
3907
|
});
|
|
3922
3908
|
}
|
|
3923
|
-
function
|
|
3909
|
+
function Ms(e) {
|
|
3924
3910
|
const t = {}, n = (e, r, o) => {
|
|
3925
|
-
if (o >
|
|
3911
|
+
if (o > ks) throw new Error("json2flat: deeper than 256");
|
|
3926
3912
|
if (null === e || "object" != typeof e || Array.isArray(e)) {
|
|
3927
3913
|
if (Array.isArray(e) && e.length > 0) return void e.forEach((e, t) => {
|
|
3928
3914
|
const l = `[${t}]`;
|
|
@@ -3932,7 +3918,7 @@ function Vs(e) {
|
|
|
3932
3918
|
const t = Object.keys(e);
|
|
3933
3919
|
if (t.length > 0) {
|
|
3934
3920
|
for (const l of t) {
|
|
3935
|
-
const t =
|
|
3921
|
+
const t = Ls(l);
|
|
3936
3922
|
n(e[l], 0 === o ? t : r + "`" + t, o + 1);
|
|
3937
3923
|
}
|
|
3938
3924
|
return;
|
|
@@ -3942,20 +3928,20 @@ function Vs(e) {
|
|
|
3942
3928
|
};
|
|
3943
3929
|
return null == e || n(e, "", 0), t;
|
|
3944
3930
|
}
|
|
3945
|
-
function
|
|
3931
|
+
function Gs(e) {
|
|
3946
3932
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat2json: a flat json is an object of id -> value");
|
|
3947
3933
|
let t = null;
|
|
3948
3934
|
for (const n of Object.keys(e)) {
|
|
3949
|
-
const r =
|
|
3935
|
+
const r = Fs(n);
|
|
3950
3936
|
if (!r || 0 === r.length) throw new Error(`flat2json: malformed flat id: '${n}'`);
|
|
3951
|
-
if (r.length >
|
|
3937
|
+
if (r.length > ks) throw new Error(`flat2json: '${n}' deeper than 256`);
|
|
3952
3938
|
const o = "number" == typeof r[0];
|
|
3953
3939
|
if (null === t) t = o ? [] : {};
|
|
3954
3940
|
else if (o !== Array.isArray(t)) throw new Error(`flat2json: '${n}' does not fit a ${Array.isArray(t) ? "array" : "object"} root`);
|
|
3955
3941
|
let l = t;
|
|
3956
3942
|
for (let t = 0; t < r.length; t++) {
|
|
3957
3943
|
const o = r[t], i = "number" == typeof o, s = t === r.length - 1, u = !s && "number" == typeof r[t + 1];
|
|
3958
|
-
if (i && o >
|
|
3944
|
+
if (i && o > Ps) throw new Error(`flat2json: array index ${o} over the limit (100000) in '${n}'`);
|
|
3959
3945
|
if (i !== Array.isArray(l)) throw new Error(`flat2json: '${n}' uses a ${i ? "array index" : "key"} where the tree already has a ${Array.isArray(l) ? "array" : "object"}`);
|
|
3960
3946
|
if (s) {
|
|
3961
3947
|
if (Array.isArray(l)) {
|
|
@@ -3979,23 +3965,23 @@ function Ws(e) {
|
|
|
3979
3965
|
}
|
|
3980
3966
|
return null === t ? {} : t;
|
|
3981
3967
|
}
|
|
3982
|
-
function
|
|
3968
|
+
function Vs(e, t) {
|
|
3983
3969
|
return e === t || null !== e && null !== t && "object" == typeof e && "object" == typeof t && JSON.stringify(e) === JSON.stringify(t);
|
|
3984
3970
|
}
|
|
3985
|
-
function
|
|
3971
|
+
function Ws(e, t) {
|
|
3986
3972
|
const n = e && "object" == typeof e ? e : {}, r = t && "object" == typeof t ? t : {}, o = {
|
|
3987
3973
|
added: {},
|
|
3988
3974
|
removed: {},
|
|
3989
3975
|
changed: {}
|
|
3990
3976
|
};
|
|
3991
|
-
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ?
|
|
3977
|
+
for (const e of Object.keys(n)) Object.prototype.hasOwnProperty.call(r, e) ? Vs(n[e], r[e]) || ii(o.changed, e, {
|
|
3992
3978
|
from: n[e],
|
|
3993
3979
|
to: r[e]
|
|
3994
3980
|
}) : ii(o.removed, e, n[e]);
|
|
3995
3981
|
for (const e of Object.keys(r)) Object.prototype.hasOwnProperty.call(n, e) || ii(o.added, e, r[e]);
|
|
3996
3982
|
return o;
|
|
3997
3983
|
}
|
|
3998
|
-
function
|
|
3984
|
+
function xs(e, t) {
|
|
3999
3985
|
if (null === e || "object" != typeof e || Array.isArray(e)) throw new Error("flat_apply: a flat json is an object of id -> value");
|
|
4000
3986
|
if (null === t || "object" != typeof t) throw new Error("flat_apply: a diff is the object flat_diff() answers");
|
|
4001
3987
|
for (const n of Object.keys(t.removed || {})) delete e[n];
|
|
@@ -4007,36 +3993,36 @@ function Bs(e, t) {
|
|
|
4007
3993
|
}
|
|
4008
3994
|
return e;
|
|
4009
3995
|
}
|
|
4010
|
-
function
|
|
3996
|
+
function Ks(e) {
|
|
4011
3997
|
return "persistent-attrs-" + an(e);
|
|
4012
3998
|
}
|
|
4013
|
-
function
|
|
4014
|
-
let n = Cn(e, D.SDF_PERSIST), r = Ai(
|
|
3999
|
+
function Bs(e, t) {
|
|
4000
|
+
let n = Cn(e, D.SDF_PERSIST), r = Ai(Ks(e), null, !1);
|
|
4015
4001
|
if (r && Fl(r)) {
|
|
4016
4002
|
let o = ji(e, r, t, !1);
|
|
4017
4003
|
o = ji(e, o, n, !1), Vn(e, o, D.SDF_PERSIST);
|
|
4018
4004
|
}
|
|
4019
4005
|
}
|
|
4020
|
-
function
|
|
4021
|
-
let n = ji(e, Cn(e, D.SDF_PERSIST), t, !1), r = Ai(
|
|
4022
|
-
return r && Fl(r) && jl(n, r), Di(
|
|
4006
|
+
function Ys(e, t) {
|
|
4007
|
+
let n = ji(e, Cn(e, D.SDF_PERSIST), t, !1), r = Ai(Ks(e), null, !1);
|
|
4008
|
+
return r && Fl(r) && jl(n, r), Di(Ks(e), n);
|
|
4023
4009
|
}
|
|
4024
|
-
function
|
|
4025
|
-
let n =
|
|
4026
|
-
0 === kl(n) ? Ci(
|
|
4010
|
+
function Js(e, t) {
|
|
4011
|
+
let n = $i(e, Ai(Ks(e), null, !1), t, !1);
|
|
4012
|
+
0 === kl(n) ? Ci(Ks(e)) : Di(Ks(e), n);
|
|
4027
4013
|
}
|
|
4028
|
-
function
|
|
4029
|
-
let n = Ai(
|
|
4014
|
+
function qs(e, t) {
|
|
4015
|
+
let n = Ai(Ks(e), null, !1), r = {};
|
|
4030
4016
|
return n && Fl(n) && (r = ji(e, n, t, !1)), r;
|
|
4031
4017
|
}
|
|
4032
|
-
function
|
|
4018
|
+
function Hs(e) {
|
|
4033
4019
|
if (Ml(e) && 1 === Ll(e)) {
|
|
4034
4020
|
let t = e[0];
|
|
4035
4021
|
return oi(t, "size") ? t.size : 1;
|
|
4036
4022
|
}
|
|
4037
4023
|
return Ll(e);
|
|
4038
4024
|
}
|
|
4039
|
-
function
|
|
4025
|
+
function zs(e, t) {
|
|
4040
4026
|
if (Gl(t)) {
|
|
4041
4027
|
if (-1 === t.indexOf("^")) {
|
|
4042
4028
|
let n, r, o = e.fkey;
|
|
@@ -4066,11 +4052,11 @@ function Xs(e, t) {
|
|
|
4066
4052
|
hook_name: t.hook_name
|
|
4067
4053
|
} : (Hr("bad fkey 3"), Hr(e), Hr(t), null);
|
|
4068
4054
|
}
|
|
4069
|
-
function
|
|
4070
|
-
let n =
|
|
4055
|
+
function Qs(e, t) {
|
|
4056
|
+
let n = zs(e, t);
|
|
4071
4057
|
return n ? n.topic_name + "^" + n.id + "^" + n.hook_name : null;
|
|
4072
4058
|
}
|
|
4073
|
-
function
|
|
4059
|
+
function Xs(e, t) {
|
|
4074
4060
|
if (Gl(t)) {
|
|
4075
4061
|
if (-1 === t.indexOf("^")) {
|
|
4076
4062
|
let n, r = e.hook;
|
|
@@ -4097,7 +4083,7 @@ function eu(e, t) {
|
|
|
4097
4083
|
id: t.id
|
|
4098
4084
|
} : (Hr("bad hook 3"), Hr(e), Hr(t), null);
|
|
4099
4085
|
}
|
|
4100
|
-
var
|
|
4086
|
+
var Zs = [
|
|
4101
4087
|
"string",
|
|
4102
4088
|
"integer",
|
|
4103
4089
|
"object",
|
|
@@ -4107,7 +4093,7 @@ var tu = [
|
|
|
4107
4093
|
"real",
|
|
4108
4094
|
"boolean",
|
|
4109
4095
|
"blob"
|
|
4110
|
-
],
|
|
4096
|
+
], eu = [
|
|
4111
4097
|
"persistent",
|
|
4112
4098
|
"required",
|
|
4113
4099
|
"notnull",
|
|
@@ -4119,7 +4105,7 @@ var tu = [
|
|
|
4119
4105
|
"stats",
|
|
4120
4106
|
"rstats",
|
|
4121
4107
|
"pstats"
|
|
4122
|
-
],
|
|
4108
|
+
], tu = [
|
|
4123
4109
|
"hook",
|
|
4124
4110
|
"fkey",
|
|
4125
4111
|
"enum",
|
|
@@ -4148,7 +4134,7 @@ var tu = [
|
|
|
4148
4134
|
"coordinates",
|
|
4149
4135
|
"gbuffer"
|
|
4150
4136
|
];
|
|
4151
|
-
function
|
|
4137
|
+
function nu(e) {
|
|
4152
4138
|
let t = {
|
|
4153
4139
|
name: e.id,
|
|
4154
4140
|
header: e.header,
|
|
@@ -4167,7 +4153,7 @@ function ou(e) {
|
|
|
4167
4153
|
if (!e.flag) return t;
|
|
4168
4154
|
for (let n = 0; n < e.flag.length; n++) {
|
|
4169
4155
|
let r = e.flag[n];
|
|
4170
|
-
if (Vi(
|
|
4156
|
+
if (Vi(tu, r)) {
|
|
4171
4157
|
switch (r) {
|
|
4172
4158
|
case "enum":
|
|
4173
4159
|
t.enum_list = e.enum;
|
|
@@ -4181,7 +4167,7 @@ function ou(e) {
|
|
|
4181
4167
|
case "file": t.is_file = !0;
|
|
4182
4168
|
}
|
|
4183
4169
|
t.type = r;
|
|
4184
|
-
} else if (Vi(
|
|
4170
|
+
} else if (Vi(eu, r)) switch (r) {
|
|
4185
4171
|
case "writable":
|
|
4186
4172
|
t.is_writable = !0;
|
|
4187
4173
|
break;
|
|
@@ -4194,7 +4180,7 @@ function ou(e) {
|
|
|
4194
4180
|
}
|
|
4195
4181
|
return t.is_file && (t.type = "file"), t;
|
|
4196
4182
|
}
|
|
4197
|
-
function
|
|
4183
|
+
function ru(e, t) {
|
|
4198
4184
|
let n = {
|
|
4199
4185
|
name: e,
|
|
4200
4186
|
header: e,
|
|
@@ -4212,9 +4198,9 @@ function lu(e, t) {
|
|
|
4212
4198
|
let e = t.split(".");
|
|
4213
4199
|
for (let t = 0; t < e.length; t++) {
|
|
4214
4200
|
let r = e[t];
|
|
4215
|
-
if (Vi(
|
|
4216
|
-
else if (Vi(
|
|
4217
|
-
else if (Vi(
|
|
4201
|
+
if (Vi(Zs, r)) n.real_type || (n.real_type = r);
|
|
4202
|
+
else if (Vi(tu, r)) n.type || (n.type = r);
|
|
4203
|
+
else if (Vi(eu, r)) switch (r) {
|
|
4218
4204
|
case "writable":
|
|
4219
4205
|
n.is_writable = !0;
|
|
4220
4206
|
break;
|
|
@@ -4226,10 +4212,10 @@ function lu(e, t) {
|
|
|
4226
4212
|
}
|
|
4227
4213
|
}
|
|
4228
4214
|
n.real_type || (n.real_type = "string");
|
|
4229
|
-
} else Fl(t) ? (n =
|
|
4215
|
+
} else Fl(t) ? (n = nu(t), n.name || (n.name = e), n.header || (n.header = e)) : Ml(t) && (n.real_type = "array", n.enum_list = t);
|
|
4230
4216
|
return n.type || (n.type = n.real_type), n;
|
|
4231
4217
|
}
|
|
4232
|
-
function
|
|
4218
|
+
function ou(e, t) {
|
|
4233
4219
|
let n = {};
|
|
4234
4220
|
return t || (t = {}), Object.entries(e).forEach(([e, r]) => {
|
|
4235
4221
|
let o;
|
|
@@ -4238,23 +4224,23 @@ function iu(e, t) {
|
|
|
4238
4224
|
wl(n, e, l);
|
|
4239
4225
|
}), n;
|
|
4240
4226
|
}
|
|
4241
|
-
var
|
|
4227
|
+
var lu = [
|
|
4242
4228
|
k(O.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
4243
4229
|
k(O.DTP_BOOLEAN, "periodic", 0, 0, "True for periodic timeouts"),
|
|
4244
4230
|
k(O.DTP_INTEGER, "msec", 0, 0, "Timeout in milliseconds"),
|
|
4245
4231
|
I()
|
|
4246
|
-
],
|
|
4232
|
+
], iu = {
|
|
4247
4233
|
periodic: !1,
|
|
4248
4234
|
msec: 0,
|
|
4249
4235
|
timer_id: -1
|
|
4250
|
-
},
|
|
4251
|
-
function
|
|
4236
|
+
}, su = null;
|
|
4237
|
+
function uu(e, t, n, r) {
|
|
4252
4238
|
let o = e.priv, l = o.periodic ? "EV_TIMEOUT_PERIODIC" : "EV_TIMEOUT";
|
|
4253
4239
|
return o.periodic && o.msec > 0 ? o.timer_id = setTimeout(function() {
|
|
4254
4240
|
lr(e, "EV_TIMEOUT", {}, e);
|
|
4255
4241
|
}, o.msec) : o.timer_id = -1, Er(e, l, {}), o.periodic || -1 !== o.timer_id || Xt(e) && Yt(e), 0;
|
|
4256
4242
|
}
|
|
4257
|
-
var
|
|
4243
|
+
var au = {
|
|
4258
4244
|
mt_create: function(e) {
|
|
4259
4245
|
let t = e.priv, n = Ln(e, "subscriber");
|
|
4260
4246
|
n ? dr(e, null, {}, n) : gn(e) && (n = _n(e), dr(e, null, {}, n)), t.periodic = In(e, "periodic"), t.msec = kn(e, "msec");
|
|
@@ -4278,34 +4264,34 @@ var _u = {
|
|
|
4278
4264
|
},
|
|
4279
4265
|
mt_destroy: function(e) {}
|
|
4280
4266
|
};
|
|
4281
|
-
function
|
|
4267
|
+
function cu() {
|
|
4282
4268
|
return function(e) {
|
|
4283
|
-
if (
|
|
4269
|
+
if (su) return Hr(`GClass ALREADY created: ${e}`), -1;
|
|
4284
4270
|
const t = [["ST_IDLE", [[
|
|
4285
4271
|
"EV_TIMEOUT",
|
|
4286
|
-
|
|
4272
|
+
uu,
|
|
4287
4273
|
null
|
|
4288
4274
|
]]]];
|
|
4289
|
-
return (
|
|
4275
|
+
return (su = ut(e, [
|
|
4290
4276
|
["EV_TIMEOUT", Y.EVF_OUTPUT_EVENT],
|
|
4291
4277
|
["EV_TIMEOUT_PERIODIC", Y.EVF_OUTPUT_EVENT],
|
|
4292
4278
|
[0, 0]
|
|
4293
|
-
], t,
|
|
4279
|
+
], t, au, 0, lu, iu, 0, 0, 0, x.gcflag_manual_start)) ? 0 : -1;
|
|
4294
4280
|
}("C_TIMER");
|
|
4295
4281
|
}
|
|
4296
|
-
function
|
|
4282
|
+
function _u(e) {
|
|
4297
4283
|
return "number" == typeof e && Number.isFinite(e) ? Math.round(e) : e;
|
|
4298
4284
|
}
|
|
4299
|
-
function
|
|
4300
|
-
return e instanceof W ? "C_TIMER" !== un(e) ? (Hr("not C_TIMER GObj"), -1) : (Wn(e, "periodic", !1), void xn(e, "msec",
|
|
4285
|
+
function fu(e, t) {
|
|
4286
|
+
return e instanceof W ? "C_TIMER" !== un(e) ? (Hr("not C_TIMER GObj"), -1) : (Wn(e, "periodic", !1), void xn(e, "msec", _u(t))) : (Hr("not GObj TYPE"), -1);
|
|
4301
4287
|
}
|
|
4302
|
-
function
|
|
4303
|
-
return e instanceof W ? "C_TIMER" !== un(e) ? (Hr("not C_TIMER GObj"), -1) : (Wn(e, "periodic", !0), void xn(e, "msec",
|
|
4288
|
+
function gu(e, t) {
|
|
4289
|
+
return e instanceof W ? "C_TIMER" !== un(e) ? (Hr("not C_TIMER GObj"), -1) : (Wn(e, "periodic", !0), void xn(e, "msec", _u(t))) : (Hr("not GObj TYPE"), -1);
|
|
4304
4290
|
}
|
|
4305
|
-
function
|
|
4291
|
+
function du(e) {
|
|
4306
4292
|
return e instanceof W ? "C_TIMER" !== un(e) ? (Hr("not C_TIMER GObj"), -1) : void xn(e, "msec", -1) : (Hr("not GObj TYPE"), -1);
|
|
4307
4293
|
}
|
|
4308
|
-
var
|
|
4294
|
+
var bu = [
|
|
4309
4295
|
k(O.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
4310
4296
|
k(O.DTP_BOOLEAN, "browser_beforeunload", 0, !1, "Set true to refreshing browser"),
|
|
4311
4297
|
k(O.DTP_STRING, "__username__", 0, "", "Username"),
|
|
@@ -4325,35 +4311,35 @@ var hu = [
|
|
|
4325
4311
|
k(O.DTP_BOOLEAN, "developer", 0, !1, "Developer mode enabled"),
|
|
4326
4312
|
k(O.DTP_INTEGER, "periodic_timeout", 0, "1000", "Timeout periodic, in miliseconds."),
|
|
4327
4313
|
I()
|
|
4328
|
-
],
|
|
4329
|
-
function
|
|
4314
|
+
], pu = { gobj_timer: null }, hu = null;
|
|
4315
|
+
function mu(e, t, n, r) {
|
|
4330
4316
|
let o = Dn(e, t);
|
|
4331
|
-
return Fl(o) || (o = {}), o[n] = r, Un(e, t, o),
|
|
4317
|
+
return Fl(o) || (o = {}), o[n] = r, Un(e, t, o), $t(e, t);
|
|
4332
4318
|
}
|
|
4333
|
-
var
|
|
4334
|
-
function
|
|
4319
|
+
var yu = -2147483648, Eu = 2147483647;
|
|
4320
|
+
function vu(e) {
|
|
4335
4321
|
if (!0 === e || !1 === e) return e;
|
|
4336
|
-
if ("number" == typeof e) return !Number.isInteger(e) || e <
|
|
4322
|
+
if ("number" == typeof e) return !Number.isInteger(e) || e < yu || e > Eu ? null : 0 !== e;
|
|
4337
4323
|
if ("string" != typeof e || "" === e) return null;
|
|
4338
4324
|
let t = e.toLowerCase();
|
|
4339
4325
|
if ("set" === t) return !0;
|
|
4340
4326
|
if ("reset" === t) return !1;
|
|
4341
4327
|
if (/^-?(0|[1-9][0-9]*)$/.test(e)) {
|
|
4342
4328
|
let t = Number(e);
|
|
4343
|
-
return t <
|
|
4329
|
+
return t < yu || t > Eu ? null : 0 !== t;
|
|
4344
4330
|
}
|
|
4345
4331
|
return "true" === t || "yes" === t || "on" === t || "false" !== t && "no" !== t && "off" !== t && null;
|
|
4346
4332
|
}
|
|
4347
|
-
function
|
|
4333
|
+
function Tu() {
|
|
4348
4334
|
return `${on()}^${rn()}`;
|
|
4349
4335
|
}
|
|
4350
|
-
function
|
|
4336
|
+
function Ou(e, t, n, r) {
|
|
4351
4337
|
return Er(e, t, n), 0;
|
|
4352
4338
|
}
|
|
4353
|
-
var
|
|
4339
|
+
var Su = {
|
|
4354
4340
|
mt_create: function(e) {
|
|
4355
4341
|
let t = e.priv;
|
|
4356
|
-
Kn(e, "start_date",
|
|
4342
|
+
Kn(e, "start_date", Os()), Kn(e, "node_uuid", Rs()), e.priv.gobj_timer = Lt(sn(e), "C_TIMER", {}, e), t.periodic_timeout = Dn(e, "periodic_timeout"), function(e) {
|
|
4357
4343
|
let t = Dn(e, "trace_levels");
|
|
4358
4344
|
if (!Fl(t)) return 0;
|
|
4359
4345
|
let n = t.__global_trace__;
|
|
@@ -4387,10 +4373,10 @@ var Nu = {
|
|
|
4387
4373
|
},
|
|
4388
4374
|
mt_writing: function(e, t) {},
|
|
4389
4375
|
mt_start: function(e) {
|
|
4390
|
-
return
|
|
4376
|
+
return gu(e.priv.gobj_timer, e.priv.periodic_timeout), 0;
|
|
4391
4377
|
},
|
|
4392
4378
|
mt_stop: function(e) {
|
|
4393
|
-
return
|
|
4379
|
+
return du(e.priv.gobj_timer), qt(e), 0;
|
|
4394
4380
|
},
|
|
4395
4381
|
mt_destroy: function(e) {},
|
|
4396
4382
|
mt_play: function(e) {
|
|
@@ -4407,35 +4393,35 @@ var Nu = {
|
|
|
4407
4393
|
case "get-global-no-trace": return l(0, 0, null, null, Oe());
|
|
4408
4394
|
case "set-global-trace":
|
|
4409
4395
|
case "set-global-no-trace": {
|
|
4410
|
-
let r = "set-global-no-trace" === t, o = n.level, i =
|
|
4411
|
-
return o ? null === i ? l(0, -1, `${
|
|
4396
|
+
let r = "set-global-no-trace" === t, o = n.level, i = vu(n.set);
|
|
4397
|
+
return o ? null === i ? l(0, -1, `${Tu()}: bitmask set or re-set?`, null, null) : (r ? he(o, i) : pe(o, i)) < 0 ? l(0, -1, `${Tu()}: global trace level not found: ${o}`, null, null) : r ? (mu(e, "no_trace_levels", "__global_no_trace__", Oe()), l(0, 0, null, null, Oe())) : (mu(e, "trace_levels", "__global_trace__", Te()), l(0, 0, null, null, Te())) : l(0, -1, `${Tu()}: what level?`, null, null);
|
|
4412
4398
|
}
|
|
4413
4399
|
case "get-gclass-trace":
|
|
4414
4400
|
case "get-gclass-no-trace":
|
|
4415
4401
|
case "set-gclass-trace":
|
|
4416
4402
|
case "set-gclass-no-trace": {
|
|
4417
4403
|
let r = t.indexOf("no-trace") >= 0, o = n.gclass_name || n.gclass || "", i = mt(o);
|
|
4418
|
-
if (!i) return l(0, -1, `${
|
|
4419
|
-
if (0 === t.indexOf("get-")) return l(0, 0, null, null, r ?
|
|
4420
|
-
let s = n.level, u =
|
|
4421
|
-
return s ? null === u ? l(0, -1, `${
|
|
4404
|
+
if (!i) return l(0, -1, `${Tu()}: what gclass is '${o}'?`, null, null);
|
|
4405
|
+
if (0 === t.indexOf("get-")) return l(0, 0, null, null, r ? $e(i) : Se(i));
|
|
4406
|
+
let s = n.level, u = vu(n.set);
|
|
4407
|
+
return s ? null === u ? l(0, -1, `${Tu()}: bitmask set or re-set?`, null, null) : (r ? Ae(i, s, u) : we(i, s, u)) < 0 ? l(0, -1, `${Tu()}: trace level of ${o} not found: ${s}`, null, null) : r ? (mu(e, "no_trace_levels", o, $e(i)), l(0, 0, null, null, $e(i))) : (mu(e, "trace_levels", o, je(i)), l(0, 0, null, null, Se(i))) : l(0, -1, `${Tu()}: what level?`, null, null);
|
|
4422
4408
|
}
|
|
4423
|
-
default: return l(0, -1, `${
|
|
4409
|
+
default: return l(0, -1, `${Tu()}: command not available: ${t}`, null, null);
|
|
4424
4410
|
}
|
|
4425
4411
|
}
|
|
4426
4412
|
};
|
|
4427
|
-
function
|
|
4413
|
+
function ju() {
|
|
4428
4414
|
return function(e) {
|
|
4429
|
-
if (
|
|
4415
|
+
if (hu) return Hr(`GClass ALREADY created: ${e}`), -1;
|
|
4430
4416
|
const t = [["ST_IDLE", [[
|
|
4431
4417
|
"EV_TIMEOUT_PERIODIC",
|
|
4432
|
-
|
|
4418
|
+
Ou,
|
|
4433
4419
|
null
|
|
4434
4420
|
]]]];
|
|
4435
|
-
return (
|
|
4421
|
+
return (hu = ut(e, [["EV_TIMEOUT_PERIODIC", Y.EVF_OUTPUT_EVENT | Y.EVF_NO_WARN_SUBS], [0, 0]], t, Su, 0, bu, pu, 0, 0, 0, 0)) ? 0 : -1;
|
|
4436
4422
|
}("C_YUNO");
|
|
4437
4423
|
}
|
|
4438
|
-
var
|
|
4424
|
+
var $u = "ievent_gate_stack", Nu = [
|
|
4439
4425
|
k(O.DTP_STRING, "wanted_yuno_role", D.SDF_RD, "", "wanted yuno role"),
|
|
4440
4426
|
k(O.DTP_STRING, "wanted_yuno_name", D.SDF_RD, "", "wanted yuno name"),
|
|
4441
4427
|
k(O.DTP_STRING, "wanted_yuno_service", D.SDF_RD, "", "wanted yuno service"),
|
|
@@ -4452,15 +4438,15 @@ var wu = "ievent_gate_stack", Ru = [
|
|
|
4452
4438
|
k(O.DTP_INTEGER, "timeout_idack", D.SDF_RD, "5000", "timeout waiting idAck"),
|
|
4453
4439
|
k(O.DTP_POINTER, "subscriber", 0, 0, "subscriber of output-events. If null then subscriber is the parent"),
|
|
4454
4440
|
I()
|
|
4455
|
-
],
|
|
4441
|
+
], wu = [
|
|
4456
4442
|
["ievents", "Trace inter-events with metadata of kw"],
|
|
4457
4443
|
["ievents2", "Trace inter-events with full kw"],
|
|
4458
4444
|
["identity-card", "Trace identity_card messages"]
|
|
4459
4445
|
];
|
|
4460
|
-
function
|
|
4446
|
+
function Ru(e) {
|
|
4461
4447
|
return !!(3 & ue(e));
|
|
4462
4448
|
}
|
|
4463
|
-
var
|
|
4449
|
+
var Au = {
|
|
4464
4450
|
url: null,
|
|
4465
4451
|
remote_yuno_name: null,
|
|
4466
4452
|
remote_yuno_role: null,
|
|
@@ -4473,8 +4459,8 @@ var Cu = {
|
|
|
4473
4459
|
retry_ms_before_session: 0,
|
|
4474
4460
|
session_since: 0,
|
|
4475
4461
|
retry_floor_warned: !1
|
|
4476
|
-
},
|
|
4477
|
-
function
|
|
4462
|
+
}, Du = null;
|
|
4463
|
+
function Cu(e) {
|
|
4478
4464
|
e.priv.websocket && Hr("Websocket ALREADY setup");
|
|
4479
4465
|
const t = Pn(e, "url");
|
|
4480
4466
|
Xr(`====> Starting WebSocket to '${t}' (${an(e)})`);
|
|
@@ -4489,7 +4475,7 @@ function ku(e) {
|
|
|
4489
4475
|
code: 1006,
|
|
4490
4476
|
reason: r.message,
|
|
4491
4477
|
was_clean: !1
|
|
4492
|
-
}, e) < 0 &&
|
|
4478
|
+
}, e) < 0 && fu(e.priv.gobj_timer, qu(e)), null;
|
|
4493
4479
|
}
|
|
4494
4480
|
return r ? (r.onopen = () => {
|
|
4495
4481
|
n !== e.priv.ws_seq || dn(e) || lr(e, "EV_ON_OPEN", {
|
|
@@ -4511,7 +4497,7 @@ function ku(e) {
|
|
|
4511
4497
|
}, e));
|
|
4512
4498
|
}, r) : (Hr(`${an(e)}: Failed to initialize WebSocket.`), null);
|
|
4513
4499
|
}
|
|
4514
|
-
function
|
|
4500
|
+
function Iu(e, t = 1e3, n = "") {
|
|
4515
4501
|
let r = e.priv, o = r.websocket;
|
|
4516
4502
|
if (r.websocket = null, o && o.readyState !== WebSocket.CLOSED && o.readyState !== WebSocket.CLOSING) {
|
|
4517
4503
|
Xr(`Closing WebSocket (Code: ${t}, Reason: "${n}")`);
|
|
@@ -4522,12 +4508,12 @@ function Pu(e, t = 1e3, n = "") {
|
|
|
4522
4508
|
}
|
|
4523
4509
|
} else zr("WebSocket is already closed or in the process of closing.");
|
|
4524
4510
|
}
|
|
4525
|
-
function
|
|
4511
|
+
function ku(e, t) {
|
|
4526
4512
|
let n = e.priv;
|
|
4527
|
-
"ST_SESSION" === Yn(e) && (performance.now() - n.session_since <
|
|
4513
|
+
"ST_SESSION" === Yn(e) && (performance.now() - n.session_since < Ju(e).max && (n.retry_ms = n.retry_ms_before_session), n.retry_ms_before_session = 0), Iu(e, 4002, t);
|
|
4528
4514
|
}
|
|
4529
|
-
var
|
|
4530
|
-
function
|
|
4515
|
+
var Pu = 128;
|
|
4516
|
+
function Lu(e, t) {
|
|
4531
4517
|
let n = String(e), r = gl(n);
|
|
4532
4518
|
if (null !== r && (n = r), n.length > t) {
|
|
4533
4519
|
let e = t, r = n.charCodeAt(e);
|
|
@@ -4535,25 +4521,25 @@ function Fu(e, t) {
|
|
|
4535
4521
|
}
|
|
4536
4522
|
return n;
|
|
4537
4523
|
}
|
|
4538
|
-
function
|
|
4539
|
-
let r =
|
|
4524
|
+
function Uu(e, t, n) {
|
|
4525
|
+
let r = Os();
|
|
4540
4526
|
try {
|
|
4541
4527
|
Xr("\n" + r + " " + t + "\n"), yl(n);
|
|
4542
4528
|
} catch (e) {
|
|
4543
4529
|
Xr("ERROR in trace_inter_event: " + e);
|
|
4544
4530
|
}
|
|
4545
4531
|
}
|
|
4546
|
-
var
|
|
4532
|
+
var Fu = class {
|
|
4547
4533
|
constructor(e, t) {
|
|
4548
4534
|
this.event = e, this.kw = t || {};
|
|
4549
4535
|
}
|
|
4550
4536
|
};
|
|
4551
|
-
function
|
|
4537
|
+
function Mu(e, t, n, r) {
|
|
4552
4538
|
return function(e, t) {
|
|
4553
4539
|
let n = e.priv, r = JSON.stringify(t);
|
|
4554
|
-
if (
|
|
4540
|
+
if (Ru(e)) {
|
|
4555
4541
|
let n = Pn(e, "url"), o = sn(nn()) + " ==> " + n, l = Dn(nn(), "trace_ievent_callback");
|
|
4556
|
-
l ? l(o, t, 1, r.length) :
|
|
4542
|
+
l ? l(o, t, 1, r.length) : Uu(0, o, t);
|
|
4557
4543
|
}
|
|
4558
4544
|
if (!n.websocket || n.websocket.readyState !== WebSocket.OPEN) return zr(`${an(e)}: send_iev(): websocket not open, message lost`), -1;
|
|
4559
4545
|
try {
|
|
@@ -4563,10 +4549,10 @@ function Vu(e, t, n, r) {
|
|
|
4563
4549
|
}
|
|
4564
4550
|
return 0;
|
|
4565
4551
|
}(e, function(e, t) {
|
|
4566
|
-
return ql(e) ? (Hr("iev_create() event NULL"), null) : new
|
|
4552
|
+
return ql(e) ? (Hr("iev_create() event NULL"), null) : new Fu(e, t);
|
|
4567
4553
|
}(t, n));
|
|
4568
4554
|
}
|
|
4569
|
-
function
|
|
4555
|
+
function Gu(e, t, n) {
|
|
4570
4556
|
return ql(n) && (n = Pn(e, "wanted_yuno_service")), {
|
|
4571
4557
|
dst_yuno: Pn(e, "wanted_yuno_name"),
|
|
4572
4558
|
dst_role: Pn(e, "wanted_yuno_role"),
|
|
@@ -4574,10 +4560,10 @@ function Wu(e, t, n) {
|
|
|
4574
4560
|
src_yuno: rn(),
|
|
4575
4561
|
src_role: on(),
|
|
4576
4562
|
src_service: t,
|
|
4577
|
-
host:
|
|
4563
|
+
host: Rs()
|
|
4578
4564
|
};
|
|
4579
4565
|
}
|
|
4580
|
-
function
|
|
4566
|
+
function Vu(e) {
|
|
4581
4567
|
let t = e.priv, n = tn(nn()), r = Pn(nn(), "yuno_version"), o = Pn(nn(), "yuno_release"), l = Pn(nn(), "yuno_tag"), i = Dn(e, "required_services");
|
|
4582
4568
|
i && i.length || (i = Dn(nn(), "required_services"));
|
|
4583
4569
|
let s = {
|
|
@@ -4595,32 +4581,32 @@ function xu(e) {
|
|
|
4595
4581
|
username: Pn(nn(), "__username__"),
|
|
4596
4582
|
launch_id: 0,
|
|
4597
4583
|
yuno_startdate: Pn(nn(), "start_date"),
|
|
4598
|
-
id:
|
|
4584
|
+
id: Rs(),
|
|
4599
4585
|
user_agent: "undefined" != typeof window ? window.navigator.userAgent : "",
|
|
4600
4586
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
4601
4587
|
required_services: i
|
|
4602
4588
|
};
|
|
4603
|
-
return Yi(e, s,
|
|
4589
|
+
return Yi(e, s, $u, Gu(e, sn(_n(e)), null)), qi(e, s, "__identity__"), fu(t.gobj_timer, kn(e, "timeout_idack")), Mu(e, "EV_IDENTITY_CARD", s);
|
|
4604
4590
|
}
|
|
4605
|
-
function
|
|
4591
|
+
function Wu(e, t) {
|
|
4606
4592
|
if (ql(t.event)) return -1;
|
|
4607
4593
|
let n = {}, r = t.__global__, o = t.__config__, l = t.__filter__, i = t.__service__, s = t.subscriber;
|
|
4608
4594
|
o && (n.__config__ = o), r && (n.__global__ = r), l && (n.__filter__ = l);
|
|
4609
|
-
return Yi(e, n,
|
|
4595
|
+
return Yi(e, n, $u, Gu(e, sn(s), i)), qi(e, n, "__subscribing__"), Mu(e, t.event, n);
|
|
4610
4596
|
}
|
|
4611
|
-
function
|
|
4597
|
+
function xu(e, t, n, r) {
|
|
4612
4598
|
let o = e.priv;
|
|
4613
|
-
return Xt(e) && (o.websocket =
|
|
4599
|
+
return Xt(e) && (o.websocket = Cu(e)), 0;
|
|
4614
4600
|
}
|
|
4615
|
-
function
|
|
4616
|
-
return Xr("Websocket opened: " + e.priv.url),
|
|
4601
|
+
function Ku(e, t, n, r) {
|
|
4602
|
+
return Xr("Websocket opened: " + e.priv.url), Vu(e), 0;
|
|
4617
4603
|
}
|
|
4618
|
-
function
|
|
4604
|
+
function Bu(e, t, n, r) {
|
|
4619
4605
|
let o = e.priv, l = n.url;
|
|
4620
4606
|
if (void 0 !== n.ws_seq && n.ws_seq !== o.ws_seq) return 0;
|
|
4621
4607
|
Vr();
|
|
4622
|
-
const i =
|
|
4623
|
-
return
|
|
4608
|
+
const i = Lu(void 0 === n.reason ? "" : n.reason, 256);
|
|
4609
|
+
return Ru(e) && Zr(`${an(e)}: WebSocket closed ${l} (Code: ${n.code}, Reason: "${i}", Clean: ${n.was_clean})`), o.websocket && (o.websocket.onopen = null, o.websocket.onmessage = null, o.websocket.onerror = null, o.websocket.onclose = null, o.websocket = null), o.inform_on_close ? (o.inform_on_close = !1, (!n.was_clean || 1e3 !== n.code && 1001 !== n.code) && Xt(e) && zr(`${an(e)}: session closed ${l} (Code: ${n.code}, Reason: "${i}", Clean: ${n.was_clean})`), Er(e, "EV_ON_CLOSE", {
|
|
4624
4610
|
url: l,
|
|
4625
4611
|
remote_yuno_name: o.remote_yuno_name,
|
|
4626
4612
|
remote_yuno_role: o.remote_yuno_role,
|
|
@@ -4636,33 +4622,33 @@ function Ju(e, t, n, r) {
|
|
|
4636
4622
|
code: n.code,
|
|
4637
4623
|
reason: i,
|
|
4638
4624
|
was_clean: n.was_clean
|
|
4639
|
-
})), Xt(e) &&
|
|
4625
|
+
})), Xt(e) && fu(o.gobj_timer, qu(e)), 0;
|
|
4640
4626
|
}
|
|
4641
|
-
var
|
|
4642
|
-
function
|
|
4627
|
+
var Yu = 1e3;
|
|
4628
|
+
function Ju(e) {
|
|
4643
4629
|
let t = e.priv, n = kn(e, "timeout_retry"), r = kn(e, "timeout_retry_max");
|
|
4644
|
-
return n >=
|
|
4630
|
+
return n >= Yu || (t.retry_floor_warned || (t.retry_floor_warned = !0, zr(`${an(e)}: timeout_retry ${n} ms is below ${Yu} ms: ${Yu} ms is used`)), n = Yu), r >= n || (r = n), {
|
|
4645
4631
|
base: n,
|
|
4646
4632
|
max: r
|
|
4647
4633
|
};
|
|
4648
4634
|
}
|
|
4649
|
-
function
|
|
4635
|
+
function qu(e) {
|
|
4650
4636
|
let t = e.priv;
|
|
4651
|
-
const { base: n, max: r } =
|
|
4637
|
+
const { base: n, max: r } = Ju(e);
|
|
4652
4638
|
t.retry_ms = t.retry_ms ? Math.min(2 * t.retry_ms, r) : n;
|
|
4653
4639
|
let o = .2 * t.retry_ms, l = t.retry_ms - o + 2 * Math.random() * o;
|
|
4654
4640
|
return Math.max(1, Math.round(l));
|
|
4655
4641
|
}
|
|
4656
|
-
function
|
|
4657
|
-
return
|
|
4642
|
+
function Hu(e, t, n, r) {
|
|
4643
|
+
return Vu(e), 0;
|
|
4658
4644
|
}
|
|
4659
|
-
function
|
|
4645
|
+
function zu(e, t, n, r) {
|
|
4660
4646
|
let o = e.priv;
|
|
4661
|
-
|
|
4662
|
-
let l = Ji(e, n,
|
|
4647
|
+
du(o.gobj_timer);
|
|
4648
|
+
let l = Ji(e, n, $u, !0), i = gi(e, l, "src_yuno", ""), s = gi(e, l, "src_role", ""), u = gi(e, l, "src_service", "");
|
|
4663
4649
|
Kn(e, "remote_yuno_name", i), Kn(e, "remote_yuno_role", s), Kn(e, "remote_yuno_service", u);
|
|
4664
4650
|
let a = _i(e, n, "result", -1, 0), c = gi(e, n, "comment", "", 0), _ = gi(e, n, "username", "", 0), f = pi(e, n, "services_roles", {});
|
|
4665
|
-
if (a < 0)
|
|
4651
|
+
if (a < 0) Iu(e), Er(e, "EV_ON_ID_NAK", {
|
|
4666
4652
|
url: Pn(e, "url"),
|
|
4667
4653
|
result: a,
|
|
4668
4654
|
comment: c,
|
|
@@ -4679,11 +4665,11 @@ function Xu(e, t, n, r) {
|
|
|
4679
4665
|
services_roles: f
|
|
4680
4666
|
})), o.inside_on_open = !1, function(e) {
|
|
4681
4667
|
let t = hr(e, null, null, null);
|
|
4682
|
-
for (let n = 0; n < t.length; n++)
|
|
4668
|
+
for (let n = 0; n < t.length; n++) Wu(e, t[n]);
|
|
4683
4669
|
}(e);
|
|
4684
4670
|
return 0;
|
|
4685
4671
|
}
|
|
4686
|
-
function
|
|
4672
|
+
function Qu(e, t, n, r) {
|
|
4687
4673
|
let o = e.priv.url, l = function(e, t) {
|
|
4688
4674
|
let n;
|
|
4689
4675
|
try {
|
|
@@ -4702,49 +4688,49 @@ function Zu(e, t, n, r) {
|
|
|
4702
4688
|
kw: o || {}
|
|
4703
4689
|
} : (zr(`${an(e)}: parsing inter_event: kw not a json object`), null) : (zr(`${an(e)}: parsing inter_kw: no kw`), null);
|
|
4704
4690
|
}(e, n.data);
|
|
4705
|
-
if (!l) return zr(`${an(e)}: frame dropped from ${o}: ${
|
|
4706
|
-
if (
|
|
4691
|
+
if (!l) return zr(`${an(e)}: frame dropped from ${o}: ${Lu(n.data, 256)}`), -1;
|
|
4692
|
+
if (Ru(e)) {
|
|
4707
4693
|
let e = sn(nn()) + " <== " + o, t = n.data.length, r = Dn(nn(), "trace_ievent_callback");
|
|
4708
|
-
r ? r(e, l, 2, t) :
|
|
4694
|
+
r ? r(e, l, 2, t) : Uu(0, e, l);
|
|
4709
4695
|
}
|
|
4710
4696
|
let i = l.event, s = l.kw;
|
|
4711
4697
|
if ("ST_SESSION" !== Yn(e)) {
|
|
4712
4698
|
if ("ev_identity_card_ack" === String(i).toLowerCase()) {
|
|
4713
4699
|
if (!(lr(e, "EV_IDENTITY_CARD_ACK", s, e) < 0)) return 0;
|
|
4714
|
-
} else zr(`${an(e)}: event UNKNOWN in not-session state ${
|
|
4715
|
-
return
|
|
4700
|
+
} else zr(`${an(e)}: event UNKNOWN in not-session state ${Lu(i, Pu)}`);
|
|
4701
|
+
return ku(e, "event out of session"), -1;
|
|
4716
4702
|
}
|
|
4717
4703
|
l = null;
|
|
4718
|
-
let u = Hi(e, s), a = Ji(e, s,
|
|
4719
|
-
if (!ql(c) && c.toLowerCase() !== String(on()).toLowerCase()) return zr(`${an(e)}: It's not my role, dst_role: ${
|
|
4704
|
+
let u = Hi(e, s), a = Ji(e, s, $u), c = gi(e, a, "dst_role", "");
|
|
4705
|
+
if (!ql(c) && c.toLowerCase() !== String(on()).toLowerCase()) return zr(`${an(e)}: It's not my role, dst_role: ${Lu(c, Pu)}, my_role: ${on()}, event: ${Lu(i, Pu)}`), ku(e, "not my role"), -1;
|
|
4720
4706
|
let _ = gi(e, a, "dst_yuno", "");
|
|
4721
|
-
if (!ql(_) && _.toLowerCase() !== String(rn()).toLowerCase()) return zr(`${an(e)}: It's not my name, dst_yuno: ${
|
|
4707
|
+
if (!ql(_) && _.toLowerCase() !== String(rn()).toLowerCase()) return zr(`${an(e)}: It's not my name, dst_yuno: ${Lu(_, Pu)}, my_name: ${rn()}, event: ${Lu(i, Pu)}`), ku(e, "not my name"), -1;
|
|
4722
4708
|
let f = gi(e, a, "dst_service", "");
|
|
4723
|
-
if ("__subscribing__" === u) return zr(`${an(e)}: subscription event ignored, I'm client (service: ${
|
|
4724
|
-
if ("__unsubscribing__" === u) return zr(`${an(e)}: unsubscription event ignored, I'm client (service: ${
|
|
4709
|
+
if ("__subscribing__" === u) return zr(`${an(e)}: subscription event ignored, I'm client (service: ${Lu(f, Pu)}, event: ${Lu(i, Pu)})`), -1;
|
|
4710
|
+
if ("__unsubscribing__" === u) return zr(`${an(e)}: unsubscription event ignored, I'm client (service: ${Lu(f, Pu)}, event: ${Lu(i, Pu)})`), -1;
|
|
4725
4711
|
const g = sr(i, 0, !1);
|
|
4726
4712
|
if (g && Hn(e, g.event_name, 0)) {
|
|
4727
4713
|
const t = g.event_name;
|
|
4728
|
-
return Hn(e, t, Y.EVF_PUBLIC_EVENT) && "EV_IDENTITY_CARD_ACK" !== t ? (lr(e, t, s, e), 0) : (zr(`${an(e)}: event of the transport itself, or out of its place, DROPPED: ev '${
|
|
4714
|
+
return Hn(e, t, Y.EVF_PUBLIC_EVENT) && "EV_IDENTITY_CARD_ACK" !== t ? (lr(e, t, s, e), 0) : (zr(`${an(e)}: event of the transport itself, or out of its place, DROPPED: ev '${Lu(i, Pu)}'`), -1);
|
|
4729
4715
|
}
|
|
4730
4716
|
if (!ql(f)) {
|
|
4731
4717
|
let t = vt(f, !1);
|
|
4732
|
-
return t ? Hn(t, i, Y.EVF_PUBLIC_EVENT) ? (lr(t, i, s, e), 0) : (zr(`${an(e)}: Service found but no event or not public, DROPPED: service '${an(t)}', ev '${
|
|
4718
|
+
return t ? Hn(t, i, Y.EVF_PUBLIC_EVENT) ? (lr(t, i, s, e), 0) : (zr(`${an(e)}: Service found but no event or not public, DROPPED: service '${an(t)}', ev '${Lu(i, Pu)}'`), -1) : (zr(`${an(e)}: event for a service that is gone, DROPPED: service '${Lu(f, Pu)}', ev '${Lu(i, Pu)}'`), 0);
|
|
4733
4719
|
}
|
|
4734
4720
|
let d = sr(i, Y.EVF_PUBLIC_EVENT, !1);
|
|
4735
|
-
return d ? (Er(e, d.event_name, s), 0) : (zr(`${an(e)}: event that no gclass declares public, DROPPED: ev '${
|
|
4721
|
+
return d ? (Er(e, d.event_name, s), 0) : (zr(`${an(e)}: event that no gclass declares public, DROPPED: ev '${Lu(i, Pu)}'`), -1);
|
|
4736
4722
|
}
|
|
4737
|
-
function
|
|
4723
|
+
function Xu(e, t, n, r) {
|
|
4738
4724
|
const o = n && "string" == typeof n[r] ? n[r] : "", l = n && "string" == typeof n.service ? n.service : "";
|
|
4739
|
-
return zr(`${an(e)}: ${t} not served by this client, DROPPED: ${r.replace(/_/g, "")} '${
|
|
4725
|
+
return zr(`${an(e)}: ${t} not served by this client, DROPPED: ${r.replace(/_/g, "")} '${Lu(o, Pu)}', service '${Lu(l, Pu)}'`), -1;
|
|
4740
4726
|
}
|
|
4741
|
-
function
|
|
4742
|
-
return
|
|
4727
|
+
function Zu(e, t, n, r) {
|
|
4728
|
+
return Xu(e, t, n, "__stats__");
|
|
4743
4729
|
}
|
|
4744
|
-
function
|
|
4745
|
-
return
|
|
4730
|
+
function ea(e, t, n, r) {
|
|
4731
|
+
return Xu(e, t, n, "__command__");
|
|
4746
4732
|
}
|
|
4747
|
-
var
|
|
4733
|
+
var ta = {
|
|
4748
4734
|
mt_create: function(e) {
|
|
4749
4735
|
let t = e.priv;
|
|
4750
4736
|
t.gobj_timer = Lt(sn(e), "C_TIMER", {}, e), t.ws_seq = 0, t.url = Pn(e, "url"), t.remote_yuno_name = Pn(e, "remote_yuno_name"), t.remote_yuno_role = Pn(e, "remote_yuno_role"), t.remote_yuno_service = Pn(e, "remote_yuno_service"), Kn(e, "wanted_yuno_name", t.remote_yuno_name), Kn(e, "wanted_yuno_role", t.remote_yuno_role), Kn(e, "wanted_yuno_service", t.remote_yuno_service);
|
|
@@ -4774,43 +4760,43 @@ var ra = {
|
|
|
4774
4760
|
code: 1e3,
|
|
4775
4761
|
reason: "restarted",
|
|
4776
4762
|
was_clean: !0
|
|
4777
|
-
}, e),
|
|
4763
|
+
}, e), du(t.gobj_timer)), t.websocket = Cu(e), 0;
|
|
4778
4764
|
},
|
|
4779
4765
|
mt_stop: function(e) {
|
|
4780
4766
|
let t = e.priv;
|
|
4781
|
-
return
|
|
4767
|
+
return du(t.gobj_timer), t.websocket && Iu(e), 0;
|
|
4782
4768
|
},
|
|
4783
4769
|
mt_destroy: function(e) {},
|
|
4784
4770
|
mt_stats: function(e, t, n, r) {
|
|
4785
4771
|
if ("ST_SESSION" !== Yn(e)) return Hr("Not in session"), null;
|
|
4786
4772
|
n || (n = {});
|
|
4787
|
-
let o =
|
|
4773
|
+
let o = Gu(e, sn(r), gi(e, n, "service", null, 0)), l = pi(e, n, "__md_stats__", null, Or.KW_EXTRACT);
|
|
4788
4774
|
return l || (l = {}), Yi(e, n, "stats_stack", {
|
|
4789
4775
|
stats: t,
|
|
4790
4776
|
kw: l
|
|
4791
|
-
}), Yi(e, n,
|
|
4777
|
+
}), Yi(e, n, $u, o), n.__stats__ = t, qi(e, n, "__stats__"), Mu(e, "EV_MT_STATS", n, r), null;
|
|
4792
4778
|
},
|
|
4793
4779
|
mt_command_parser: function(e, t, n, r) {
|
|
4794
4780
|
if ("ST_SESSION" !== Yn(e)) return Hr("Not in session"), null;
|
|
4795
4781
|
n || (n = {});
|
|
4796
|
-
let o =
|
|
4782
|
+
let o = Gu(e, sn(r), gi(e, n, "service", "", 0)), l = pi(e, n, "__md_command__", null, Or.KW_EXTRACT);
|
|
4797
4783
|
return l || (l = {}), Yi(e, n, "command_stack", {
|
|
4798
4784
|
command: t,
|
|
4799
4785
|
kw: l
|
|
4800
|
-
}), Yi(e, n,
|
|
4786
|
+
}), Yi(e, n, $u, o), n.__command__ = t, qi(e, n, "__command__"), Mu(e, "EV_MT_COMMAND", n, r), null;
|
|
4801
4787
|
},
|
|
4802
4788
|
mt_inject_event: function(e, t, n, r) {
|
|
4803
4789
|
if ("ST_SESSION" !== Yn(e)) return window.console.error("Not in session"), -1;
|
|
4804
|
-
if (n = Ol({}, Fl(n) ? n : {}), Fl(n.__md_iev__) && (n.__md_iev__ = El(n.__md_iev__)), Ji(e, n,
|
|
4790
|
+
if (n = Ol({}, Fl(n) ? n : {}), Fl(n.__md_iev__) && (n.__md_iev__ = El(n.__md_iev__)), Ji(e, n, $u));
|
|
4805
4791
|
else {
|
|
4806
|
-
let o =
|
|
4807
|
-
|
|
4792
|
+
let o = Gu(e, sn(r), gi(e, n, "__service__", 0, 0));
|
|
4793
|
+
Nl(n, "__service__"), Yi(e, n, "__message__", t), Yi(e, n, $u, o);
|
|
4808
4794
|
}
|
|
4809
|
-
return qi(e, n, "__message__"),
|
|
4795
|
+
return qi(e, n, "__message__"), Mu(e, t, n, r);
|
|
4810
4796
|
},
|
|
4811
4797
|
mt_subscription_added: function(e, t) {
|
|
4812
4798
|
let n = e.priv;
|
|
4813
|
-
return "ST_SESSION" === Yn(e) && n.websocket ? n.inside_on_open ? 0 :
|
|
4799
|
+
return "ST_SESSION" === Yn(e) && n.websocket ? n.inside_on_open ? 0 : Wu(e, t) : 0;
|
|
4814
4800
|
},
|
|
4815
4801
|
mt_subscription_deleted: function(e, t) {
|
|
4816
4802
|
let n = e.priv;
|
|
@@ -4819,27 +4805,27 @@ var ra = {
|
|
|
4819
4805
|
if (ql(t.event)) return 0;
|
|
4820
4806
|
let r = {}, o = t.__global__, l = t.__config__, i = t.__filter__, s = t.__service__, u = t.subscriber;
|
|
4821
4807
|
l && (r.__config__ = l), o && (r.__global__ = o), i && (r.__filter__ = i);
|
|
4822
|
-
return Yi(e, r,
|
|
4808
|
+
return Yi(e, r, $u, Gu(e, sn(u), s)), qi(e, r, "__unsubscribing__"), Mu(e, t.event, r, e);
|
|
4823
4809
|
}
|
|
4824
4810
|
};
|
|
4825
|
-
function
|
|
4811
|
+
function na() {
|
|
4826
4812
|
return function(e) {
|
|
4827
|
-
if (
|
|
4813
|
+
if (Du) return Hr(`GClass ALREADY created: ${e}`), -1;
|
|
4828
4814
|
const t = [
|
|
4829
4815
|
["ST_DISCONNECTED", [
|
|
4830
4816
|
[
|
|
4831
4817
|
"EV_ON_OPEN",
|
|
4832
|
-
|
|
4818
|
+
Ku,
|
|
4833
4819
|
"ST_WAIT_IDENTITY_CARD_ACK"
|
|
4834
4820
|
],
|
|
4835
4821
|
[
|
|
4836
4822
|
"EV_ON_CLOSE",
|
|
4837
|
-
|
|
4823
|
+
Bu,
|
|
4838
4824
|
null
|
|
4839
4825
|
],
|
|
4840
4826
|
[
|
|
4841
4827
|
"EV_TIMEOUT",
|
|
4842
|
-
|
|
4828
|
+
xu,
|
|
4843
4829
|
null
|
|
4844
4830
|
],
|
|
4845
4831
|
[
|
|
@@ -4851,22 +4837,22 @@ function oa() {
|
|
|
4851
4837
|
["ST_WAIT_IDENTITY_CARD_ACK", [
|
|
4852
4838
|
[
|
|
4853
4839
|
"EV_ON_MESSAGE",
|
|
4854
|
-
|
|
4840
|
+
Qu,
|
|
4855
4841
|
null
|
|
4856
4842
|
],
|
|
4857
4843
|
[
|
|
4858
4844
|
"EV_IDENTITY_CARD_ACK",
|
|
4859
|
-
|
|
4845
|
+
zu,
|
|
4860
4846
|
null
|
|
4861
4847
|
],
|
|
4862
4848
|
[
|
|
4863
4849
|
"EV_ON_CLOSE",
|
|
4864
|
-
|
|
4850
|
+
Bu,
|
|
4865
4851
|
"ST_DISCONNECTED"
|
|
4866
4852
|
],
|
|
4867
4853
|
[
|
|
4868
4854
|
"EV_TIMEOUT",
|
|
4869
|
-
|
|
4855
|
+
Hu,
|
|
4870
4856
|
null
|
|
4871
4857
|
],
|
|
4872
4858
|
[
|
|
@@ -4878,22 +4864,22 @@ function oa() {
|
|
|
4878
4864
|
["ST_SESSION", [
|
|
4879
4865
|
[
|
|
4880
4866
|
"EV_ON_MESSAGE",
|
|
4881
|
-
|
|
4867
|
+
Qu,
|
|
4882
4868
|
null
|
|
4883
4869
|
],
|
|
4884
4870
|
[
|
|
4885
4871
|
"EV_MT_STATS",
|
|
4886
|
-
|
|
4872
|
+
Zu,
|
|
4887
4873
|
null
|
|
4888
4874
|
],
|
|
4889
4875
|
[
|
|
4890
4876
|
"EV_MT_COMMAND",
|
|
4891
|
-
|
|
4877
|
+
ea,
|
|
4892
4878
|
null
|
|
4893
4879
|
],
|
|
4894
4880
|
[
|
|
4895
4881
|
"EV_ON_CLOSE",
|
|
4896
|
-
|
|
4882
|
+
Bu,
|
|
4897
4883
|
"ST_DISCONNECTED"
|
|
4898
4884
|
],
|
|
4899
4885
|
[
|
|
@@ -4904,7 +4890,7 @@ function oa() {
|
|
|
4904
4890
|
]],
|
|
4905
4891
|
[null, null]
|
|
4906
4892
|
];
|
|
4907
|
-
return (
|
|
4893
|
+
return (Du = ut(e, [
|
|
4908
4894
|
["EV_ON_MESSAGE", Y.EVF_OUTPUT_EVENT],
|
|
4909
4895
|
["EV_IDENTITY_CARD_ACK", Y.EVF_PUBLIC_EVENT],
|
|
4910
4896
|
["EV_ON_ID_NAK", Y.EVF_OUTPUT_EVENT],
|
|
@@ -4915,9 +4901,9 @@ function oa() {
|
|
|
4915
4901
|
["EV_ON_OPEN_ERROR", Y.EVF_OUTPUT_EVENT | Y.EVF_NO_WARN_SUBS],
|
|
4916
4902
|
["EV_TIMEOUT", 0],
|
|
4917
4903
|
[null, 0]
|
|
4918
|
-
], t,
|
|
4904
|
+
], t, ta, 0, Nu, Au, 0, 0, wu, x.gcflag_no_check_output_events)) ? 0 : -1;
|
|
4919
4905
|
}("C_IEVENT_CLI");
|
|
4920
4906
|
}
|
|
4921
|
-
export { W as GObj, k as SDATA, F as SDATAAUTHZ, P as SDATACM, L as SDATACM2, G as SDATADF, U as SDATAPM, M as SDATAPM0, I as SDATA_END, C as SDataDesc, u as YUNETA_VERSION, m as __yuno__, l as build_command_response,
|
|
4907
|
+
export { W as GObj, k as SDATA, F as SDATAAUTHZ, P as SDATACM, L as SDATACM2, G as SDATADF, U as SDATAPM, M as SDATAPM0, I as SDATA_END, C as SDataDesc, u as YUNETA_VERSION, m as __yuno__, l as build_command_response, Is as build_path, s as build_stats_response, As as clean_name, du as clear_timeout, Zl as cmp_two_simple_json, ze as command_parameter_from_json, He as command_parameter_from_text, o as command_parser, ms as createElement2, hs as createOneHtml, is as create_json_record, ou as create_template_record, Os as current_timestamp, O as data_type_t, qs as db_list_persistent_attrs, Bs as db_load_persistent_attrs, Js as db_remove_persistent_attrs, Ys as db_save_persistent_attrs, Cs as debounce, xi as delete_from_list, vl as duplicate_objects, Ul as empty_json, ql as empty_string, ss as escapeHtml, Y as event_flag_t, Gs as flat2json, xs as flat_apply, Ws as flat_diff, Us as flat_key_join, Fs as flat_key_split, gt as gclass_add_ev_action, bt as gclass_add_event_type, ft as gclass_add_state, ht as gclass_check_fsm, ut as gclass_create, pt as gclass_event_type, mt as gclass_find_by_name, x as gclass_flag_t, at as gclass_unregister, ys as getPositionRelativeToBody, Ds as get_function_name, Ss as get_now, bn as gobj_bottom_gobj, Jn as gobj_change_parent, Bn as gobj_change_state, vr as gobj_command, Ut as gobj_create, Dt as gobj_create2, kt as gobj_create_default_service, Lt as gobj_create_pure_child, It as gobj_create_service, Pt as gobj_create_volatil, Ct as gobj_create_yuno, Yn as gobj_current_state, Et as gobj_default_service, tr as gobj_deliver_posted_events, Ft as gobj_destroy, $n as gobj_find_child, sr as gobj_find_event_type, Sn as gobj_find_gobj, vt as gobj_find_service, yr as gobj_find_subscribings, hr as gobj_find_subscriptions, K as gobj_flag_t, cn as gobj_full_name, un as gobj_gclass_name, Se as gobj_get_gclass_trace_level, je as gobj_get_gclass_trace_level2, $e as gobj_get_gclass_trace_no_level, Te as gobj_get_global_trace_level, Oe as gobj_get_global_trace_no_level, me as gobj_global_trace_level, ye as gobj_global_trace_no_level, An as gobj_has_attr, Hn as gobj_has_event, zn as gobj_has_output_event, lt as gobj_hsdata, dn as gobj_is_destroying, tn as gobj_is_playing, gn as gobj_is_pure_child, Xt as gobj_is_running, en as gobj_is_service, fn as gobj_is_volatil, wt as gobj_list_persistent_attrs, mr as gobj_list_subscriptions, jt as gobj_load_persistent_attrs, Nn as gobj_match_children, wn as gobj_match_children_tree, jn as gobj_match_gobj, sn as gobj_name, _n as gobj_parent, Qt as gobj_pause, zt as gobj_play, Zn as gobj_post_event, er as gobj_posted_events_size, Er as gobj_publish_event, Dn as gobj_read_attr, Cn as gobj_read_attrs, In as gobj_read_bool_attr, kn as gobj_read_integer_attr, Ln as gobj_read_pointer_attr, Pn as gobj_read_str_attr, Nt as gobj_remove_persistent_attrs, Ce as gobj_repr_global_trace_levels, Gn as gobj_reset_volatil_attrs, $t as gobj_save_persistent_attrs, Rn as gobj_search_path, lr as gobj_send_event, yt as gobj_services, pn as gobj_set_bottom_gobj, Ne as gobj_set_deep_trace, Ae as gobj_set_gclass_no_trace, we as gobj_set_gclass_trace, he as gobj_set_global_no_trace, ve as gobj_set_global_no_trace2, pe as gobj_set_global_trace, Ee as gobj_set_global_trace2, De as gobj_set_gobj_no_trace, Re as gobj_set_gobj_trace, X as gobj_set_trace_machine_format, an as gobj_short_name, Mt as gobj_start, xt as gobj_start_children, Bt as gobj_start_tree, Ie as gobj_start_up, Tr as gobj_stats, Yt as gobj_stop, qt as gobj_stop_children, Ht as gobj_stop_tree, dr as gobj_subscribe_event, ue as gobj_trace_level, Z as gobj_trace_machine_format, ae as gobj_trace_no_level, br as gobj_unsubscribe_event, pr as gobj_unsubscribe_list, mn as gobj_walk_gobj_children, yn as gobj_walk_gobj_children_tree, Un as gobj_write_attr, Vn as gobj_write_attrs, Wn as gobj_write_bool_attr, xn as gobj_write_integer_attr, Kn as gobj_write_str_attr, nn as gobj_yuno, ln as gobj_yuno_id, rn as gobj_yuno_name, on as gobj_yuno_role, cs as html_markup, Gi as id_index_in_obj_list, js as index_in_list, Ml as is_array, Wl as is_boolean, Bl as is_date, Yl as is_function, Jl as is_gobj, _s as is_html_markup, ti as is_metadata_key, xl as is_null, Vl as is_number, Fl as is_object, ni as is_private_key, Kl as is_pure_number, _o as is_secret_name, Gl as is_string, ts as jdb_delete, rs as jdb_get, os as jdb_get_by_idx, ns as jdb_get_topic, Zi as jdb_init, es as jdb_update, Ms as json2flat, Al as json_array_append, Dl as json_array_append_new, Il as json_array_extend, Cl as json_array_remove, Pl as json_array_size, El as json_deep_copy, Tl as json_is_identical, ml as json_mask_secrets, Nl as json_object_del, $l as json_object_get, wl as json_object_set, Rl as json_object_set_new, kl as json_object_size, Ol as json_object_update, Sl as json_object_update_existing, jl as json_object_update_missing, Ll as json_size, nt as json_text_of, ji as kw_clone_by_keys, $i as kw_clone_by_not_keys, Si as kw_collect, ai as kw_delete, Ti as kw_find_json_in_list, ui as kw_find_path, Or as kw_flag_t, ci as kw_get_bool, bi as kw_get_dict, pi as kw_get_dict_value, _i as kw_get_int, hi as kw_get_list, Ai as kw_get_local_storage_value, di as kw_get_pointer, fi as kw_get_real, gi as kw_get_str, oi as kw_has_key, vi as kw_match_simple, ri as kw_pop, Ci as kw_remove_local_storage_value, Oi as kw_select, mi as kw_set_dict_value, Di as kw_set_local_storage_value, yi as kw_set_subdict_value, ki as kwid_collect, Ui as kwid_find_one_record, Fi as kwid_get_ids, Ii as kwid_match_id, Pi as kwid_new_dict, Li as kwid_new_list, Mi as list2options, zi as load_json_file, Xr as log_debug, Hr as log_error, Qr as log_info, zr as log_warning, gl as mask_secrets_inline, Hi as msg_iev_get_msg_type, Ji as msg_iev_get_stack, Yi as msg_iev_push_stack, Ki as msg_iev_read_key, qi as msg_iev_set_msg_type, Bi as msg_iev_write_key, Rs as node_uuid, Hl as parseBoolean, Es as parseSVG, vs as refresh_language, na as register_c_ievent_cli, cu as register_c_timer, ju as register_c_yuno, us as safeSrc, D as sdata_flag_t, Qi as send_http_json_post, kr as set_console_log_enabled, Lr as set_console_log_filter, Cr as set_log_callback, Vr as set_remote_log_functions, bs as set_strings_are_text, fu as set_timeout, gu as set_timeout_periodic, t as sprintf, i as stats_parser, Vi as str_in_list, Xl as strcasecmp, Ql as strcmp, ps as strings_are_text, zl as strncmp, Wi as strs_in_list, ei as strstr, ru as template_get_field_desc, Ts as timeTracker, eo as trace_json, yl as trace_json_masked, te as trace_level_t, Zr as trace_msg, zs as treedb_decoder_fkey, Xs as treedb_decoder_hook, Qs as treedb_encoder_fkey, nu as treedb_get_field_desc, Hs as treedb_hook_data_size, n as vsprintf, J as walk_type_t };
|
|
4922
4908
|
|
|
4923
4909
|
//# sourceMappingURL=gobj-js.es.min.js.map
|