@yuneta/gobj-js 7.3.1 → 7.3.4
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 +26 -3
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +152 -136
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +26 -3
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +265 -249
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +26 -3
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +112 -96
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +26 -3
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +218 -202
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.umd.min.js
CHANGED
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
data: i || []
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
var l = "7.0.0a", s = null, _ = null, a = null, u = null, c = null, f = null, g = [], d = Object.create(null), b = {}, p = null, m = null, h = 0,
|
|
136
|
+
var l = "7.0.0a", s = null, _ = null, a = null, u = null, c = null, f = null, g = [], d = Object.create(null), b = {}, p = null, m = null, h = 0, E = Object.freeze({
|
|
137
137
|
DTP_STRING: 1,
|
|
138
138
|
DTP_BOOLEAN: 2,
|
|
139
139
|
DTP_INTEGER: 3,
|
|
@@ -143,8 +143,8 @@
|
|
|
143
143
|
DTP_JSON: 7,
|
|
144
144
|
DTP_POINTER: 8
|
|
145
145
|
});
|
|
146
|
-
|
|
147
|
-
var
|
|
146
|
+
E.DTP_POINTER;
|
|
147
|
+
var T = Object.freeze({
|
|
148
148
|
SDF_NOTACCESS: 1,
|
|
149
149
|
SDF_RD: 2,
|
|
150
150
|
SDF_WR: 4,
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
SDF_AUTHZ_S: 524288,
|
|
168
168
|
SDF_AUTHZ_RS: 1048576
|
|
169
169
|
});
|
|
170
|
-
|
|
170
|
+
T.SDF_RD, T.SDF_WR, T.SDF_STATS, T.SDF_PERSIST, T.SDF_VOLATIL, T.SDF_RSTATS, T.SDF_PSTATS, T.SDF_WR, T.SDF_PERSIST;
|
|
171
171
|
var y = class {
|
|
172
172
|
constructor(e, t, n = 0, r = null, i = "", o = null, l = null, s = 0, _ = null, a = null, u = null) {
|
|
173
173
|
this.type = e, this.name = t, this.alias = o, this.flag = n, this.default_value = r, this.header = l, this.fillspace = s, this.description = i, this.json_fn = _, this.schema = a, this.authpth = u;
|
|
@@ -213,11 +213,11 @@
|
|
|
213
213
|
constructor(e, t, n) {
|
|
214
214
|
this.event_name = e, this.action = t, this.next_state = n;
|
|
215
215
|
}
|
|
216
|
-
},
|
|
216
|
+
}, A = class {
|
|
217
217
|
constructor(e) {
|
|
218
218
|
this.state_name = e, this.dl_actions = [];
|
|
219
219
|
}
|
|
220
|
-
},
|
|
220
|
+
}, I = class {
|
|
221
221
|
constructor(e, t) {
|
|
222
222
|
this.event_name = e, this.event_flag = Number(t) || 0;
|
|
223
223
|
}
|
|
@@ -237,19 +237,19 @@
|
|
|
237
237
|
function U(e, t, n) {
|
|
238
238
|
let r, i = n.default_value;
|
|
239
239
|
switch (n.type) {
|
|
240
|
-
case
|
|
240
|
+
case E.DTP_STRING:
|
|
241
241
|
r = String(i);
|
|
242
242
|
break;
|
|
243
|
-
case
|
|
243
|
+
case E.DTP_BOOLEAN:
|
|
244
244
|
r = en(i);
|
|
245
245
|
break;
|
|
246
|
-
case
|
|
246
|
+
case E.DTP_INTEGER:
|
|
247
247
|
r = parseInt(i), isNaN(r) && Ot(`${Ne(e)}: attr NaN: ${n.name}`);
|
|
248
248
|
break;
|
|
249
|
-
case
|
|
249
|
+
case E.DTP_REAL:
|
|
250
250
|
r = Number(i), isNaN(r) && Ot(`${Ne(e)}: attr NaN: ${n.name}`);
|
|
251
251
|
break;
|
|
252
|
-
case
|
|
252
|
+
case E.DTP_LIST:
|
|
253
253
|
if (Jt(i)) try {
|
|
254
254
|
r = JSON.parse(i);
|
|
255
255
|
} catch (e) {
|
|
@@ -258,7 +258,7 @@
|
|
|
258
258
|
else r = i;
|
|
259
259
|
Bt(r) || (r = []);
|
|
260
260
|
break;
|
|
261
|
-
case
|
|
261
|
+
case E.DTP_DICT:
|
|
262
262
|
if (Jt(i)) try {
|
|
263
263
|
r = JSON.parse(i);
|
|
264
264
|
} catch (e) {
|
|
@@ -267,7 +267,7 @@
|
|
|
267
267
|
else r = i;
|
|
268
268
|
Yt(r) || (r = {});
|
|
269
269
|
break;
|
|
270
|
-
case
|
|
270
|
+
case E.DTP_JSON:
|
|
271
271
|
if (Jt(i)) try {
|
|
272
272
|
r = JSON.parse(i);
|
|
273
273
|
} catch (e) {
|
|
@@ -275,30 +275,31 @@
|
|
|
275
275
|
}
|
|
276
276
|
else r = i;
|
|
277
277
|
break;
|
|
278
|
-
case
|
|
278
|
+
case E.DTP_POINTER: r = i;
|
|
279
279
|
}
|
|
280
280
|
return void 0 === r && (Ot(`default_value WRONG, it: ${n.name}, value: ${n.default_value}`), r = null), t[n.name] = r, 0;
|
|
281
281
|
}
|
|
282
282
|
function C(e, t, n, r) {
|
|
283
283
|
let i;
|
|
284
284
|
switch (n.type) {
|
|
285
|
-
case
|
|
286
|
-
if (
|
|
285
|
+
case E.DTP_STRING:
|
|
286
|
+
if (null == r) i = "";
|
|
287
|
+
else if (Jt(r)) i = String(r);
|
|
287
288
|
else {
|
|
288
289
|
let e = JSON.stringify(r);
|
|
289
290
|
e && (i = String(e));
|
|
290
291
|
}
|
|
291
292
|
break;
|
|
292
|
-
case
|
|
293
|
+
case E.DTP_BOOLEAN:
|
|
293
294
|
i = en(r);
|
|
294
295
|
break;
|
|
295
|
-
case
|
|
296
|
+
case E.DTP_INTEGER:
|
|
296
297
|
i = parseInt(r), isNaN(i) && Ot(`${Ne(e)}: attr NaN: ${n.name}`);
|
|
297
298
|
break;
|
|
298
|
-
case
|
|
299
|
+
case E.DTP_REAL:
|
|
299
300
|
i = Number(r), isNaN(i) && Ot(`${Ne(e)}: attr NaN: ${n.name}`);
|
|
300
301
|
break;
|
|
301
|
-
case
|
|
302
|
+
case E.DTP_LIST:
|
|
302
303
|
if (Jt(r)) try {
|
|
303
304
|
i = JSON.parse(r);
|
|
304
305
|
} catch (e) {
|
|
@@ -307,7 +308,7 @@
|
|
|
307
308
|
else i = r;
|
|
308
309
|
if (!Bt(i)) return Ot(`attr must be an array: ${n.name}`), -1;
|
|
309
310
|
break;
|
|
310
|
-
case
|
|
311
|
+
case E.DTP_DICT:
|
|
311
312
|
if (Jt(r)) try {
|
|
312
313
|
i = JSON.parse(r);
|
|
313
314
|
} catch (e) {
|
|
@@ -316,7 +317,7 @@
|
|
|
316
317
|
else i = r;
|
|
317
318
|
if (!Yt(i)) return Ot(`attr must be an object: ${n.name}`), -1;
|
|
318
319
|
break;
|
|
319
|
-
case
|
|
320
|
+
case E.DTP_JSON:
|
|
320
321
|
if (Jt(r)) try {
|
|
321
322
|
i = JSON.parse(r);
|
|
322
323
|
} catch (e) {
|
|
@@ -325,15 +326,15 @@
|
|
|
325
326
|
else i = r;
|
|
326
327
|
if (!Bt(i) && !Yt(i)) return Ot(`attr must be a json dict/list: ${n.name}`), -1;
|
|
327
328
|
break;
|
|
328
|
-
case
|
|
329
|
+
case E.DTP_POINTER: i = r;
|
|
329
330
|
}
|
|
330
331
|
return void 0 === i && Ot(`${Ne(e)}: attr undefined: ${n.name}`), t[n.name] = i, Yt(e.priv) && e.priv.hasOwnProperty(n.name) && (e.priv[n.name] = i), e.obflag & D.obflag_created && !(e.obflag & D.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, n.name), 0;
|
|
331
332
|
}
|
|
332
|
-
function
|
|
333
|
+
function F(e) {
|
|
333
334
|
return e.jn_attrs;
|
|
334
335
|
}
|
|
335
|
-
function
|
|
336
|
-
return Ke(e, t) ?
|
|
336
|
+
function G(e, t, n) {
|
|
337
|
+
return Ke(e, t) ? F(e) : e && e.bottom_gobj ? G(e.bottom_gobj, t, n) : (n && Ot(`GClass Attribute NOT FOUND: ${Ne(e)}, attr ${t}`), null);
|
|
337
338
|
}
|
|
338
339
|
function V(e, t, n) {
|
|
339
340
|
if (!(e && e instanceof S)) return n && Ot("gclass NULL"), null;
|
|
@@ -347,7 +348,7 @@
|
|
|
347
348
|
function W(e, t, n, r, i, o, l, s, _, a, u) {
|
|
348
349
|
if (Zt(e)) return Ot("gclass_name EMPTY"), null;
|
|
349
350
|
if (e.includes("`") || e.includes("^") || e.includes(".")) return Ot(`GClass name CANNOT have '.' or '^' or '\`' char: ${e}`), null;
|
|
350
|
-
if (
|
|
351
|
+
if (H(e)) return Ot(`GClass ALREADY exists: ${e}`), null;
|
|
351
352
|
let c = new S(e, r, i, o, l, s, _, a, u);
|
|
352
353
|
(function(e, t) {
|
|
353
354
|
e && e instanceof S ? t ? d[t] ? Ot(`gclass ALREADY REGISTERED: ${t}`) : d[t] = e : Ot("gclass_name undefined") : Ot("gclass undefined");
|
|
@@ -371,7 +372,7 @@
|
|
|
371
372
|
}
|
|
372
373
|
}
|
|
373
374
|
if (!c.fsm_checked) {
|
|
374
|
-
if (
|
|
375
|
+
if (q(c) < 0) return M(c), null;
|
|
375
376
|
c.fsm_checked = !0;
|
|
376
377
|
}
|
|
377
378
|
return c;
|
|
@@ -403,7 +404,7 @@
|
|
|
403
404
|
return null;
|
|
404
405
|
}
|
|
405
406
|
function Y(e, t) {
|
|
406
|
-
return e instanceof S ? K(e, t) ? (Ot(`state already exists: ${t}`), -1) : (e.dl_states.push(new
|
|
407
|
+
return e instanceof S ? K(e, t) ? (Ot(`state already exists: ${t}`), -1) : (e.dl_states.push(new A(t)), 0) : (Ot("Cannot add state, typeof not GClass"), -1);
|
|
407
408
|
}
|
|
408
409
|
function B(e, t, n, r, i) {
|
|
409
410
|
if (!(e instanceof S)) return Ot("Cannot add state, typeof not GClass"), -1;
|
|
@@ -412,7 +413,7 @@
|
|
|
412
413
|
return o ? x(o, n) ? (Ot(`event already exists: gclass ${e.gclass_name}, state ${t}, event ${n}`), -1) : (o.dl_actions.push(new $(n, r, i)), 0) : (Ot(`state not found: ${t}`), -1);
|
|
413
414
|
}
|
|
414
415
|
function J(e, t, n) {
|
|
415
|
-
Zt(t) || e.push(new
|
|
416
|
+
Zt(t) || e.push(new I(t, n));
|
|
416
417
|
}
|
|
417
418
|
function z(e, t, n) {
|
|
418
419
|
return e instanceof S ? J(e.dl_events, t, n) : (Ot("Cannot add state, typeof not GClass"), -1);
|
|
@@ -426,7 +427,7 @@
|
|
|
426
427
|
}
|
|
427
428
|
return null;
|
|
428
429
|
}
|
|
429
|
-
function
|
|
430
|
+
function q(e) {
|
|
430
431
|
if (!(e instanceof S)) return Ot("Cannot add state, typeof not GClass"), -1;
|
|
431
432
|
let t = 0;
|
|
432
433
|
Kt(e.dl_states) || (Ot(`GClass without states: ${e.gclass_name}`), t += -1);
|
|
@@ -450,7 +451,7 @@
|
|
|
450
451
|
}
|
|
451
452
|
return t;
|
|
452
453
|
}
|
|
453
|
-
function
|
|
454
|
+
function H(e, t) {
|
|
454
455
|
let n = null;
|
|
455
456
|
try {
|
|
456
457
|
n = d[e];
|
|
@@ -486,10 +487,10 @@
|
|
|
486
487
|
let o = 0;
|
|
487
488
|
for (const [l, s] of Object.entries(t)) {
|
|
488
489
|
const t = V(i.gclass, l, !1);
|
|
489
|
-
t ? (-1 === n || t.flag & n) && (t.flag &
|
|
490
|
+
t ? (-1 === n || t.flag & n) && (t.flag & T.SDF_DEPRECATED && Nt(`${Ne(i)}: Deprecated attribute used in gobj creation: ${l}`), o += C(i, e, t, s)) : r && (r(i, l), o--);
|
|
490
491
|
}
|
|
491
492
|
return o;
|
|
492
|
-
})(
|
|
493
|
+
})(F(e), r, -1, e.gclass.gclass_flag & N.gcflag_ignore_unknown_attrs ? 0 : re, e) < 0 && (Ot(`${Ne(e)} json2data() FAILED`), Rt(r));
|
|
493
494
|
}
|
|
494
495
|
function oe(e, t, r, i, o) {
|
|
495
496
|
if (o & w.gobj_flag_yuno) {
|
|
@@ -506,7 +507,7 @@
|
|
|
506
507
|
o |= w.gobj_flag_service;
|
|
507
508
|
}
|
|
508
509
|
if (Zt(t)) return Ot("gclass_name must be a string"), null;
|
|
509
|
-
let l =
|
|
510
|
+
let l = H(t, !1);
|
|
510
511
|
if (!l) return Ot(`GClass not registered: ${t}^${e}`), null;
|
|
511
512
|
if (!Jt(e)) return Ot(`gobj_name must be a string: ${t}`), null;
|
|
512
513
|
if (!Zt(e)) {
|
|
@@ -531,7 +532,7 @@
|
|
|
531
532
|
r && r.gclass.gmt.mt_child_removed && (t && L(n("👦👦🔴 child_removed(%s): %s", we(r), Ne(e))), r.gclass.gmt.mt_child_removed(r, e)), e.gobj_flag & w.gobj_flag_service && function(e) {
|
|
532
533
|
let t = Se(e);
|
|
533
534
|
t = t.toLowerCase(), b[t] ? delete b[t] : Ot(`"service NOT found in register": ${t}`);
|
|
534
|
-
}(e), e.playing && (Ot(`Destroying a PLAYING gobj: ${we(e)}`), be(e)), e.running && (Ot(`Destroying a RUNNING gobj: ${we(e)}`), ce(e)), gt(e, e.dl_subscriptions, !0), gt(e, e.dl_subscribings, !0), r && (ne(r, e), Re(e) && (
|
|
535
|
+
}(e), e.playing && (Ot(`Destroying a PLAYING gobj: ${we(e)}`), be(e)), e.running && (Ot(`Destroying a RUNNING gobj: ${we(e)}`), ce(e)), gt(e, e.dl_subscriptions, !0), gt(e, e.dl_subscribings, !0), r && (ne(r, e), Re(e) && (Ae(r) !== e || $e(r) || Ie(r, null))), function(e) {
|
|
535
536
|
let t = e.dl_children.slice();
|
|
536
537
|
for (let e = 0; e < t.length; e++) {
|
|
537
538
|
let n = t[e];
|
|
@@ -590,22 +591,22 @@
|
|
|
590
591
|
function he(e) {
|
|
591
592
|
return !!(e && e.gobj_flag & w.gobj_flag_service);
|
|
592
593
|
}
|
|
593
|
-
function
|
|
594
|
+
function Ee(e) {
|
|
594
595
|
return !$e(e) && e.playing;
|
|
595
596
|
}
|
|
596
|
-
function
|
|
597
|
+
function Te() {
|
|
597
598
|
return !p || p.obflag & D.obflag_destroyed ? null : p;
|
|
598
599
|
}
|
|
599
600
|
function ye() {
|
|
600
|
-
let e =
|
|
601
|
+
let e = Te();
|
|
601
602
|
return e ? Se(e) : "";
|
|
602
603
|
}
|
|
603
604
|
function ve() {
|
|
604
|
-
let e =
|
|
605
|
+
let e = Te();
|
|
605
606
|
return e ? ze(e, "yuno_role") : "";
|
|
606
607
|
}
|
|
607
608
|
function je() {
|
|
608
|
-
let e =
|
|
609
|
+
let e = Te();
|
|
609
610
|
return e ? ze(e, "yuno_id") : "";
|
|
610
611
|
}
|
|
611
612
|
function Se(e) {
|
|
@@ -635,10 +636,10 @@
|
|
|
635
636
|
function $e(e) {
|
|
636
637
|
return !Xt(e) || !!(e.obflag & (D.obflag_destroyed | D.obflag_destroying));
|
|
637
638
|
}
|
|
638
|
-
function
|
|
639
|
+
function Ae(e) {
|
|
639
640
|
return Xt(e) ? e.bottom_gobj : (Ot("gobj NULL of bad type"), null);
|
|
640
641
|
}
|
|
641
|
-
function
|
|
642
|
+
function Ie(e, t) {
|
|
642
643
|
if (!Xt(e)) return Ot("gobj NULL of bad type"), null;
|
|
643
644
|
e.bottom_gobj && Nt(`${Ne(e)}: bottom_gobj already set`), e.bottom_gobj = t;
|
|
644
645
|
}
|
|
@@ -649,7 +650,7 @@
|
|
|
649
650
|
return $e(e) ? (Ot("gobj NULL, destroying, or bad type"), 0) : Ce(e.dl_children, t, n, r, i);
|
|
650
651
|
}
|
|
651
652
|
function Ue(e, t, n, r, i) {
|
|
652
|
-
return $e(e) ? (Ot("gobj NULL, destroying, or bad type"), 0) :
|
|
653
|
+
return $e(e) ? (Ot("gobj NULL, destroying, or bad type"), 0) : Ge(e.dl_children, t, n, r, i);
|
|
653
654
|
}
|
|
654
655
|
function Ce(e, t, n, r, i) {
|
|
655
656
|
let o, l = [...e];
|
|
@@ -665,24 +666,24 @@
|
|
|
665
666
|
}
|
|
666
667
|
return 0;
|
|
667
668
|
}
|
|
668
|
-
function
|
|
669
|
+
function Fe(e, t, n, r, i) {
|
|
669
670
|
let o, l = Ce(e, t, n, r, i);
|
|
670
671
|
if (l < 0) return l;
|
|
671
672
|
if (t & k.WALK_LAST2FIRST) {
|
|
672
|
-
for (let s = e.length; s > 0; s--) if (o = e[s - 1], l =
|
|
673
|
-
} else for (let s = 0; s < e.length; s++) if (o = e[s], l =
|
|
673
|
+
for (let s = e.length; s > 0; s--) if (o = e[s - 1], l = Fe([...o.dl_children], t, n, r, i), l < 0) return l;
|
|
674
|
+
} else for (let s = 0; s < e.length; s++) if (o = e[s], l = Fe([...o.dl_children], t, n, r, i), l < 0) return l;
|
|
674
675
|
return l;
|
|
675
676
|
}
|
|
676
|
-
function
|
|
677
|
-
if (t & k.WALK_BYLEVEL) return
|
|
677
|
+
function Ge(e, t, n, r, i) {
|
|
678
|
+
if (t & k.WALK_BYLEVEL) return Fe(e, t, n, r, i);
|
|
678
679
|
let o, l;
|
|
679
680
|
if (t & k.WALK_BOTTOM2TOP) for (let s = e.length; s > 0; s--) {
|
|
680
|
-
if (l = e[s - 1], o =
|
|
681
|
+
if (l = e[s - 1], o = Ge([...l.dl_children], t, n, r, i), o < 0) return o;
|
|
681
682
|
if (o = n(l, r, i), o < 0) return o;
|
|
682
683
|
}
|
|
683
684
|
else for (let s = 0; s < e.length; s++) {
|
|
684
685
|
if (l = e[s], o = n(l, r, i), o < 0) return o;
|
|
685
|
-
if (0 === o && (o =
|
|
686
|
+
if (0 === o && (o = Ge([...l.dl_children], t, n, r, i), o < 0)) return o;
|
|
686
687
|
}
|
|
687
688
|
return 0;
|
|
688
689
|
}
|
|
@@ -756,44 +757,44 @@
|
|
|
756
757
|
if (t) {
|
|
757
758
|
if (0 === nn(t, "__disabled__")) return me(e);
|
|
758
759
|
if (0 === nn(t, "__running__")) return pe(e);
|
|
759
|
-
if (0 === nn(t, "__playing__")) return
|
|
760
|
+
if (0 === nn(t, "__playing__")) return Ee(e);
|
|
760
761
|
if (0 === nn(t, "__service__")) return he(e);
|
|
761
762
|
}
|
|
762
|
-
let n =
|
|
763
|
+
let n = G(e, t, !1);
|
|
763
764
|
return n ? !e.gclass.gmt.mt_reading || e.obflag & D.obflag_destroyed ? Pt(n, t) : e.gclass.gmt.mt_reading(e, t) : (Ot(`${Ne(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
764
765
|
}
|
|
765
766
|
function Je(e, t) {
|
|
766
767
|
t && nn(t, "__trace_level__");
|
|
767
|
-
let n =
|
|
768
|
+
let n = G(e, t, !1);
|
|
768
769
|
return n ? !e.gclass.gmt.mt_reading || e.obflag & D.obflag_destroyed ? Pt(n, t) : e.gclass.gmt.mt_reading(e, t) : (Ot(`${Ne(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
769
770
|
}
|
|
770
771
|
function ze(e, t) {
|
|
771
772
|
if (t && 0 === nn(t, "__state__")) return tt(e);
|
|
772
|
-
let n =
|
|
773
|
+
let n = G(e, t, !1);
|
|
773
774
|
return n ? !e.gclass.gmt.mt_reading || e.obflag & D.obflag_destroyed ? Pt(n, t) : e.gclass.gmt.mt_reading(e, t) : (Ot(`${Ne(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
774
775
|
}
|
|
775
776
|
function Qe(e, t) {
|
|
776
|
-
let n =
|
|
777
|
+
let n = G(e, t, !1);
|
|
777
778
|
return n ? !e.gclass.gmt.mt_reading || e.obflag & D.obflag_destroyed ? Pt(n, t) : e.gclass.gmt.mt_reading(e, t) : (Ot(`${Ne(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
778
779
|
}
|
|
779
|
-
function
|
|
780
|
-
let i =
|
|
780
|
+
function qe(e, t, n, r) {
|
|
781
|
+
let i = F(e), o = 0;
|
|
781
782
|
for (const [r, l] of Object.entries(t)) {
|
|
782
783
|
let t = Le(e, r, !0);
|
|
783
784
|
t && (-1 === n || t.flag & n) && (o += C(e, i, t, l));
|
|
784
785
|
}
|
|
785
786
|
return o;
|
|
786
787
|
}
|
|
787
|
-
function
|
|
788
|
-
let r =
|
|
788
|
+
function He(e, t, n) {
|
|
789
|
+
let r = G(e, t, !1);
|
|
789
790
|
return r ? (r[t] = en(n), Yt(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag & D.obflag_created && !(e.obflag & D.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (Ot(`${Ne(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
790
791
|
}
|
|
791
792
|
function Xe(e, t, n) {
|
|
792
|
-
let r =
|
|
793
|
+
let r = G(e, t, !1);
|
|
793
794
|
return r ? (r[t] = parseInt(n), Yt(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag & D.obflag_created && !(e.obflag & D.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (Ot(`${Ne(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
794
795
|
}
|
|
795
796
|
function Ze(e, t, n) {
|
|
796
|
-
let r =
|
|
797
|
+
let r = G(e, t, !1);
|
|
797
798
|
return r ? (r[t] = String(n), Yt(e.priv) && e.priv.hasOwnProperty(t) && (e.priv[t] = n), e.obflag & D.obflag_created && !(e.obflag & D.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, t), 0) : (Ot(`${Ne(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
798
799
|
}
|
|
799
800
|
function et(e, t) {
|
|
@@ -850,16 +851,16 @@
|
|
|
850
851
|
__hard_subscription__: 1,
|
|
851
852
|
__own_event__: 2
|
|
852
853
|
}), st = [
|
|
853
|
-
j(
|
|
854
|
-
j(
|
|
855
|
-
j(
|
|
856
|
-
j(
|
|
857
|
-
j(
|
|
858
|
-
j(
|
|
859
|
-
j(
|
|
860
|
-
j(
|
|
861
|
-
j(
|
|
862
|
-
j(
|
|
854
|
+
j(E.DTP_POINTER, "publisher", 0, null, "publisher gobj"),
|
|
855
|
+
j(E.DTP_POINTER, "subscriber", 0, null, "subscriber gobj"),
|
|
856
|
+
j(E.DTP_STRING, "event", 0, "", "event name subscribed"),
|
|
857
|
+
j(E.DTP_STRING, "renamed_event", 0, "", "rename event name"),
|
|
858
|
+
j(E.DTP_INTEGER, "subs_flag", 0, 0, "subscription flag"),
|
|
859
|
+
j(E.DTP_JSON, "__config__", 0, null, "subscription config"),
|
|
860
|
+
j(E.DTP_JSON, "__global__", 0, null, "global kw, merge in publishing"),
|
|
861
|
+
j(E.DTP_JSON, "__local__", 0, null, "local kw, remove in publishing"),
|
|
862
|
+
j(E.DTP_JSON, "__filter__", 0, null, "filter kw, filter in publishing"),
|
|
863
|
+
j(E.DTP_STRING, "__service__", 0, "", "subscription service"),
|
|
863
864
|
v()
|
|
864
865
|
];
|
|
865
866
|
function _t(e, t, n, r, i) {
|
|
@@ -886,7 +887,7 @@
|
|
|
886
887
|
let o = [];
|
|
887
888
|
for (let l = 0; l < e.length; l++) {
|
|
888
889
|
let s = e[l];
|
|
889
|
-
_t(s, t, n, r, i) &&
|
|
890
|
+
_t(s, t, n, r, i) && Gt(o, s);
|
|
890
891
|
}
|
|
891
892
|
return o;
|
|
892
893
|
}
|
|
@@ -919,13 +920,13 @@
|
|
|
919
920
|
Kt(l) > 0 && (Ot(`${Ne(e)}: ${Kt(l)} subscription(s) REPEATED, will be deleted and override`), Rt(l, "subscription REPEATED"), gt(e, l, !1));
|
|
920
921
|
let s = function(e, t, n, r) {
|
|
921
922
|
let i = P(e, st);
|
|
922
|
-
|
|
923
|
+
Ft(i, "event", t), Ft(i, "subscriber", r), Ft(i, "publisher", e);
|
|
923
924
|
let o = 0;
|
|
924
925
|
if (n) {
|
|
925
926
|
let t = gn(e, n, "__config__", null), r = gn(e, n, "__global__", null), l = gn(e, n, "__local__", null), s = dn(e, n, "__filter__", null), _ = cn(e, n, "__service__", "");
|
|
926
|
-
if (xt(r) > 0 &&
|
|
927
|
+
if (xt(r) > 0 && Ft(i, "__global__", kt(r)), xt(t) > 0) {
|
|
927
928
|
let n = kt(t);
|
|
928
|
-
if (
|
|
929
|
+
if (Ft(i, "__config__", n), ln(n, "__hard_subscription__")) {
|
|
929
930
|
let t = an(e, n, "__hard_subscription__", !1);
|
|
930
931
|
Ut(n, "__hard_subscription__"), t && (o |= lt.__hard_subscription__);
|
|
931
932
|
}
|
|
@@ -934,11 +935,11 @@
|
|
|
934
935
|
Ut(n, "__own_event__"), t && (o |= lt.__own_event__);
|
|
935
936
|
}
|
|
936
937
|
}
|
|
937
|
-
xt(l) > 0 &&
|
|
938
|
+
xt(l) > 0 && Ft(i, "__local__", kt(l)), xt(s) > 0 && Ft(i, "__filter__", kt(s)), Zt(_) || Ft(i, "__service__", _);
|
|
938
939
|
}
|
|
939
|
-
return
|
|
940
|
+
return Ft(i, "subs_flag", o), i;
|
|
940
941
|
}(e, t, r, i);
|
|
941
|
-
return s ? (
|
|
942
|
+
return s ? (Gt(e.dl_subscriptions, s), Gt(i.dl_subscribings, s), p && Be(p, "trace_subscriptions") && (L(n("💜💜👍 subscribing event '%s', publisher '%s', subscriber %s", t || "", Ne(e), Ne(i))), r && Rt(r)), e.gclass.gmt.mt_subscription_added && e.gclass.gmt.mt_subscription_added(e, s) < 0 && (ct(e, s, !0, !0), s = 0), s) : (Ot(`${Ne(e)}: _create_subscription() FAILED`), 0);
|
|
942
943
|
}
|
|
943
944
|
function gt(e, t, n) {
|
|
944
945
|
let r = [...t];
|
|
@@ -979,7 +980,7 @@
|
|
|
979
980
|
if (0 === d) continue;
|
|
980
981
|
let b = nt(u, t, !0);
|
|
981
982
|
if (b && b.event_flag & R.EVF_SYSTEM_EVENT && !rt(u, b.event_name, 0)) continue;
|
|
982
|
-
l && on(g, l), i &&
|
|
983
|
+
l && on(g, l), i && At(g, i), o && (L(n("🔝🔄 mach(%s%s), st: %s, ev: %s, from(%s%s)", u.running ? "" : "!!", Ne(u), tt(u), t || "", e && !e.running ? "!!" : "", Ne(e))), Rt(g));
|
|
983
984
|
let p = ot(u, t, g, e);
|
|
984
985
|
if (p < 0 && c & lt.__own_event__) {
|
|
985
986
|
s = -1;
|
|
@@ -1008,9 +1009,9 @@
|
|
|
1008
1009
|
JSON_TRUE: 6,
|
|
1009
1010
|
JSON_FALSE: 7,
|
|
1010
1011
|
JSON_NULL: 8
|
|
1011
|
-
}), "undefined" != typeof window ? window.console : console),
|
|
1012
|
+
}), "undefined" != typeof window ? window.console : console), Et = ht.error, Tt = ht.warn, yt = ht.info, vt = ht.debug;
|
|
1012
1013
|
function jt(e) {
|
|
1013
|
-
e ? (
|
|
1014
|
+
e ? (Et = e, Tt = e) : (Et = ht.error, Tt = ht.warn);
|
|
1014
1015
|
}
|
|
1015
1016
|
function St(e) {
|
|
1016
1017
|
const t = Array.prototype.slice.call(arguments);
|
|
@@ -1035,19 +1036,19 @@
|
|
|
1035
1036
|
return n;
|
|
1036
1037
|
}
|
|
1037
1038
|
function Ot(e) {
|
|
1038
|
-
let t = St(e), n =
|
|
1039
|
-
|
|
1039
|
+
let t = St(e), n = Gn();
|
|
1040
|
+
Et && (Et === window.console.error ? Et("%c" + n + " ERROR: " + String(t), "color:red") : (window.console.error("%c" + n + " ERROR: " + String(t), "color:red"), Et(`${n} ERROR: ${String(t)}`)));
|
|
1040
1041
|
}
|
|
1041
1042
|
function Nt(e) {
|
|
1042
|
-
let t = St(e), n =
|
|
1043
|
-
|
|
1043
|
+
let t = St(e), n = Gn();
|
|
1044
|
+
Tt && (Tt === window.console.warn ? Tt("%c" + n + " WARNING: " + String(t), "color:yellow") : (window.console.warn("%c" + n + " WARNING: " + String(t), "color:yellow"), Tt(`${n} WARNING: ${String(t)}`)));
|
|
1044
1045
|
}
|
|
1045
1046
|
function wt(e) {
|
|
1046
|
-
let t = St(e), n =
|
|
1047
|
+
let t = St(e), n = Gn();
|
|
1047
1048
|
vt && vt("%c" + n + " DEBUG: " + String(t), "color:silver");
|
|
1048
1049
|
}
|
|
1049
1050
|
function Dt(e) {
|
|
1050
|
-
let t = St(e), n =
|
|
1051
|
+
let t = St(e), n = Gn();
|
|
1051
1052
|
vt && vt("%c" + n + " MSG: " + String(t), "color:cyan");
|
|
1052
1053
|
}
|
|
1053
1054
|
function Rt(e, t) {
|
|
@@ -1077,12 +1078,12 @@
|
|
|
1077
1078
|
}
|
|
1078
1079
|
return e === t;
|
|
1079
1080
|
}
|
|
1080
|
-
function
|
|
1081
|
+
function At(e, t) {
|
|
1081
1082
|
if (!t) return e;
|
|
1082
1083
|
for (let n of Object.keys(t)) e[n] = t[n];
|
|
1083
1084
|
return e;
|
|
1084
1085
|
}
|
|
1085
|
-
function
|
|
1086
|
+
function It(e, t) {
|
|
1086
1087
|
if (!t) return e;
|
|
1087
1088
|
for (let n in t) t.hasOwnProperty(n) && e.hasOwnProperty(n) && (e[n] = t[n]);
|
|
1088
1089
|
return e;
|
|
@@ -1101,10 +1102,10 @@
|
|
|
1101
1102
|
function Ct(e, t, n) {
|
|
1102
1103
|
e[t] = n;
|
|
1103
1104
|
}
|
|
1104
|
-
function
|
|
1105
|
+
function Ft(e, t, n) {
|
|
1105
1106
|
e[t] = n;
|
|
1106
1107
|
}
|
|
1107
|
-
function
|
|
1108
|
+
function Gt(e, t) {
|
|
1108
1109
|
e.push(t);
|
|
1109
1110
|
}
|
|
1110
1111
|
function Vt(e, t) {
|
|
@@ -1137,10 +1138,10 @@
|
|
|
1137
1138
|
function Qt(e) {
|
|
1138
1139
|
return "boolean" == typeof e;
|
|
1139
1140
|
}
|
|
1140
|
-
function
|
|
1141
|
+
function qt(e) {
|
|
1141
1142
|
return null == e;
|
|
1142
1143
|
}
|
|
1143
|
-
function
|
|
1144
|
+
function Ht(e) {
|
|
1144
1145
|
return "function" == typeof e;
|
|
1145
1146
|
}
|
|
1146
1147
|
function Xt(e) {
|
|
@@ -1323,7 +1324,7 @@
|
|
|
1323
1324
|
function hn(e, t) {
|
|
1324
1325
|
return 0 === xt(t) || mn(e, t, "");
|
|
1325
1326
|
}
|
|
1326
|
-
function
|
|
1327
|
+
function En(e, t, n, r) {
|
|
1327
1328
|
e && !Xt(e) && Ot("GObj bad instanceof");
|
|
1328
1329
|
let i = {};
|
|
1329
1330
|
if (Jt(n) && !Zt(n)) {
|
|
@@ -1339,9 +1340,9 @@
|
|
|
1339
1340
|
}
|
|
1340
1341
|
return i;
|
|
1341
1342
|
}
|
|
1342
|
-
function
|
|
1343
|
+
function Tn(e, t, n, r) {
|
|
1343
1344
|
let i = {};
|
|
1344
|
-
if (
|
|
1345
|
+
if (At(i, t), Jt(n) && !Zt(n)) {
|
|
1345
1346
|
let o = n;
|
|
1346
1347
|
dn(e, t, o, 0, 0) ? Ut(i, o) : r && Ot(`${Ne(e)}: key not found: ${o}`);
|
|
1347
1348
|
} else if (Yt(n) && Mt(n) > 0) for (let o of Object.keys(n)) t.hasOwnProperty(o) ? Ut(i, o) : r && Ot(`${Ne(e)}: key not found: ${o}`);
|
|
@@ -1379,7 +1380,7 @@
|
|
|
1379
1380
|
else window.console.warn(`Invalid key for localStorage removal: ${e}`);
|
|
1380
1381
|
}
|
|
1381
1382
|
function Sn(e, t) {
|
|
1382
|
-
if (
|
|
1383
|
+
if (qt(e) || qt(t)) return !0;
|
|
1383
1384
|
if (Bt(e)) {
|
|
1384
1385
|
if (0 === e.length) return !0;
|
|
1385
1386
|
for (let n = 0; n < e.length; n++) if (e[n] === t) return !0;
|
|
@@ -1457,10 +1458,10 @@
|
|
|
1457
1458
|
let i = Dn(t, n);
|
|
1458
1459
|
return i ? 0 === i.length ? (r && Ot(`stack empty: ${n}`), null) : i[0] : (r && Ot(`stack NOT FOUND: ${n}`), null);
|
|
1459
1460
|
}
|
|
1460
|
-
function
|
|
1461
|
+
function An(e, t, n) {
|
|
1461
1462
|
return Zt(n) ? _n(e, t, "__md_iev__`__msg_type__") : pn(e, t, "__md_iev__", "__msg_type__", n), 0;
|
|
1462
1463
|
}
|
|
1463
|
-
function
|
|
1464
|
+
function In(e, t) {
|
|
1464
1465
|
return cn(e, t, "__md_iev__`__msg_type__", "", 0);
|
|
1465
1466
|
}
|
|
1466
1467
|
function Ln(e, t, n) {
|
|
@@ -1526,11 +1527,11 @@
|
|
|
1526
1527
|
function Cn(e) {
|
|
1527
1528
|
return null == e ? "" : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1528
1529
|
}
|
|
1529
|
-
function
|
|
1530
|
+
function Fn(e) {
|
|
1530
1531
|
const t = document.createElement("template");
|
|
1531
1532
|
return t.innerHTML = e.trim(), t.content.firstChild;
|
|
1532
1533
|
}
|
|
1533
|
-
function
|
|
1534
|
+
function Gn() {
|
|
1534
1535
|
const e = /* @__PURE__ */ new Date(), t = e.toISOString().slice(0, 19), n = String(e.getMilliseconds()).padStart(3, "0"), r = e.getTimezoneOffset();
|
|
1535
1536
|
return `${t}.${n}${r > 0 ? "-" : "+"}${String(Math.abs(r) / 60).padStart(2, "0")}${String(Math.abs(r) % 60).padStart(2, "0")}`;
|
|
1536
1537
|
}
|
|
@@ -1670,15 +1671,15 @@
|
|
|
1670
1671
|
return t;
|
|
1671
1672
|
}
|
|
1672
1673
|
var Qn = [
|
|
1673
|
-
j(
|
|
1674
|
-
j(
|
|
1675
|
-
j(
|
|
1674
|
+
j(E.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
1675
|
+
j(E.DTP_BOOLEAN, "periodic", 0, 0, "True for periodic timeouts"),
|
|
1676
|
+
j(E.DTP_INTEGER, "msec", 0, 0, "Timeout in milliseconds"),
|
|
1676
1677
|
v()
|
|
1677
|
-
],
|
|
1678
|
+
], qn = {
|
|
1678
1679
|
periodic: !1,
|
|
1679
1680
|
msec: 0,
|
|
1680
1681
|
timer_id: -1
|
|
1681
|
-
},
|
|
1682
|
+
}, Hn = null;
|
|
1682
1683
|
function Xn(e, t, n, r) {
|
|
1683
1684
|
let i = e.priv, o = i.periodic ? "EV_TIMEOUT_PERIODIC" : "EV_TIMEOUT";
|
|
1684
1685
|
return ke(e) ? ot(De(e), o, {}, e) : pt(e, o, {}), i.periodic && (i.timer_id = setTimeout(function() {
|
|
@@ -1711,39 +1712,39 @@
|
|
|
1711
1712
|
mt_destroy: function(e) {}
|
|
1712
1713
|
};
|
|
1713
1714
|
function er(e, t) {
|
|
1714
|
-
return e instanceof O ? "C_TIMER" !== Oe(e) ? (Ot("not C_TIMER GObj"), -1) : (
|
|
1715
|
+
return e instanceof O ? "C_TIMER" !== Oe(e) ? (Ot("not C_TIMER GObj"), -1) : (He(e, "periodic", !1), void Xe(e, "msec", t)) : (Ot("not GObj TYPE"), -1);
|
|
1715
1716
|
}
|
|
1716
1717
|
function tr(e, t) {
|
|
1717
|
-
return e instanceof O ? "C_TIMER" !== Oe(e) ? (Ot("not C_TIMER GObj"), -1) : (
|
|
1718
|
+
return e instanceof O ? "C_TIMER" !== Oe(e) ? (Ot("not C_TIMER GObj"), -1) : (He(e, "periodic", !0), void Xe(e, "msec", t)) : (Ot("not GObj TYPE"), -1);
|
|
1718
1719
|
}
|
|
1719
1720
|
function nr(e) {
|
|
1720
1721
|
return e instanceof O ? "C_TIMER" !== Oe(e) ? (Ot("not C_TIMER GObj"), -1) : void Xe(e, "msec", -1) : (Ot("not GObj TYPE"), -1);
|
|
1721
1722
|
}
|
|
1722
1723
|
var rr = [
|
|
1723
|
-
j(
|
|
1724
|
-
j(
|
|
1725
|
-
j(
|
|
1726
|
-
j(
|
|
1727
|
-
j(
|
|
1728
|
-
j(
|
|
1729
|
-
j(
|
|
1730
|
-
j(
|
|
1731
|
-
j(
|
|
1732
|
-
j(
|
|
1733
|
-
j(
|
|
1734
|
-
j(
|
|
1735
|
-
j(
|
|
1736
|
-
j(
|
|
1737
|
-
j(
|
|
1738
|
-
j(
|
|
1739
|
-
j(
|
|
1740
|
-
j(
|
|
1741
|
-
j(
|
|
1742
|
-
j(
|
|
1743
|
-
j(
|
|
1744
|
-
j(
|
|
1745
|
-
j(
|
|
1746
|
-
j(
|
|
1724
|
+
j(E.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
1725
|
+
j(E.DTP_BOOLEAN, "browser_beforeunload", 0, !1, "Set true to refreshing browser"),
|
|
1726
|
+
j(E.DTP_STRING, "__username__", 0, "", "Username"),
|
|
1727
|
+
j(E.DTP_STRING, "start_date", 0, "", "Yuno starting date"),
|
|
1728
|
+
j(E.DTP_STRING, "node_uuid", 0, "", "uuid of node"),
|
|
1729
|
+
j(E.DTP_STRING, "yuno_role", 0, "", "Yuno role"),
|
|
1730
|
+
j(E.DTP_STRING, "yuno_id", 0, "", "Yuno Id. Set by agent"),
|
|
1731
|
+
j(E.DTP_STRING, "yuno_name", 0, "", "Yuno name. Set by agent"),
|
|
1732
|
+
j(E.DTP_STRING, "yuno_tag", 0, "", "Tags of yuno. Set by agent"),
|
|
1733
|
+
j(E.DTP_STRING, "yuno_release", 0, "", "Yuno Release. Set by agent"),
|
|
1734
|
+
j(E.DTP_STRING, "yuno_version", 0, "", "Yuno version (APP_VERSION)"),
|
|
1735
|
+
j(E.DTP_STRING, "yuneta_version", 0, l, "Yuneta version"),
|
|
1736
|
+
j(E.DTP_LIST, "required_services", 0, "[]", "Required services"),
|
|
1737
|
+
j(E.DTP_INTEGER, "tracing", 0, 0, "Tracing level"),
|
|
1738
|
+
j(E.DTP_BOOLEAN, "trace_timer", 0, 0, "Trace timers"),
|
|
1739
|
+
j(E.DTP_BOOLEAN, "trace_inter_event", 0, 0, "Trace traffic"),
|
|
1740
|
+
j(E.DTP_POINTER, "trace_ievent_callback", 0, null, "Trace traffic callback"),
|
|
1741
|
+
j(E.DTP_BOOLEAN, "trace_creation", 0, 0, "Trace creation"),
|
|
1742
|
+
j(E.DTP_BOOLEAN, "trace_start_stop", 0, 0, "Trace start/stop"),
|
|
1743
|
+
j(E.DTP_BOOLEAN, "trace_subscriptions", 0, 0, "Trace subscription"),
|
|
1744
|
+
j(E.DTP_BOOLEAN, "trace_i18n", 0, 0, "Trace i18n"),
|
|
1745
|
+
j(E.DTP_BOOLEAN, "no_poll", 0, 0, "no poll"),
|
|
1746
|
+
j(E.DTP_BOOLEAN, "developer", 0, !1, "Developer mode enabled"),
|
|
1747
|
+
j(E.DTP_INTEGER, "periodic_timeout", 0, "1000", "Timeout periodic, in miliseconds."),
|
|
1747
1748
|
v()
|
|
1748
1749
|
], ir = { gobj_timer: null }, or = null;
|
|
1749
1750
|
function lr(e, t, n, r) {
|
|
@@ -1752,7 +1753,7 @@
|
|
|
1752
1753
|
var sr = {
|
|
1753
1754
|
mt_create: function(e) {
|
|
1754
1755
|
let t = e.priv;
|
|
1755
|
-
Ze(e, "start_date",
|
|
1756
|
+
Ze(e, "start_date", Gn()), Ze(e, "node_uuid", Wn()), e.priv.gobj_timer = le(Se(e), "C_TIMER", {}, e), t.periodic_timeout = xe(e, "periodic_timeout");
|
|
1756
1757
|
},
|
|
1757
1758
|
mt_writing: function(e, t) {},
|
|
1758
1759
|
mt_start: function(e) {
|
|
@@ -1764,26 +1765,26 @@
|
|
|
1764
1765
|
mt_destroy: function(e) {},
|
|
1765
1766
|
mt_play: function(e) {
|
|
1766
1767
|
let t = X();
|
|
1767
|
-
return pe(t) || _e(t),
|
|
1768
|
+
return pe(t) || _e(t), Ee(t) || de(t), 0;
|
|
1768
1769
|
},
|
|
1769
1770
|
mt_pause: function(e) {
|
|
1770
1771
|
return be(X()), 0;
|
|
1771
1772
|
}
|
|
1772
1773
|
};
|
|
1773
1774
|
var _r = "ievent_gate_stack", ar = [
|
|
1774
|
-
j(
|
|
1775
|
-
j(
|
|
1776
|
-
j(
|
|
1777
|
-
j(
|
|
1778
|
-
j(
|
|
1779
|
-
j(
|
|
1780
|
-
j(
|
|
1781
|
-
j(
|
|
1782
|
-
j(
|
|
1783
|
-
j(
|
|
1784
|
-
j(
|
|
1785
|
-
j(
|
|
1786
|
-
j(
|
|
1775
|
+
j(E.DTP_STRING, "wanted_yuno_role", T.SDF_RD, "", "wanted yuno role"),
|
|
1776
|
+
j(E.DTP_STRING, "wanted_yuno_name", T.SDF_RD, "", "wanted yuno name"),
|
|
1777
|
+
j(E.DTP_STRING, "wanted_yuno_service", T.SDF_RD, "", "wanted yuno service"),
|
|
1778
|
+
j(E.DTP_STRING, "remote_yuno_role", T.SDF_RD, "", "confirmed remote yuno role"),
|
|
1779
|
+
j(E.DTP_STRING, "remote_yuno_name", T.SDF_RD, "", "confirmed remote yuno name"),
|
|
1780
|
+
j(E.DTP_STRING, "remote_yuno_service", T.SDF_RD, "", "confirmed remote yuno service"),
|
|
1781
|
+
j(E.DTP_STRING, "url", T.SDF_RD, "", "Url to connect"),
|
|
1782
|
+
j(E.DTP_STRING, "jwt", T.SDF_PERSIST, "", "JWT"),
|
|
1783
|
+
j(E.DTP_STRING, "cert_pem", T.SDF_PERSIST, "", "SSL server certification, PEM str format"),
|
|
1784
|
+
j(E.DTP_JSON, "extra_info", T.SDF_RD, "{}", "dict data set by user, added to the identity card msg."),
|
|
1785
|
+
j(E.DTP_INTEGER, "timeout_retry", T.SDF_RD, "5000", "timeout waiting idAck"),
|
|
1786
|
+
j(E.DTP_INTEGER, "timeout_idack", T.SDF_RD, "5000", "timeout waiting idAck"),
|
|
1787
|
+
j(E.DTP_POINTER, "subscriber", 0, 0, "subscriber of output-events. If null then subscriber is the parent"),
|
|
1787
1788
|
v()
|
|
1788
1789
|
], ur = {
|
|
1789
1790
|
url: null,
|
|
@@ -1813,7 +1814,7 @@
|
|
|
1813
1814
|
data: n.data
|
|
1814
1815
|
}, e);
|
|
1815
1816
|
}, n.onclose = (n) => {
|
|
1816
|
-
Be(
|
|
1817
|
+
Be(Te(), "browser_beforeunload") ? Nt("Close websocket by unload page") : ot(e, "EV_ON_CLOSE", {
|
|
1817
1818
|
url: t,
|
|
1818
1819
|
e: n
|
|
1819
1820
|
}, e);
|
|
@@ -1831,7 +1832,7 @@
|
|
|
1831
1832
|
} else Nt("WebSocket is already closed or in the process of closing.");
|
|
1832
1833
|
}
|
|
1833
1834
|
function dr(e, t, n) {
|
|
1834
|
-
let r =
|
|
1835
|
+
let r = Gn();
|
|
1835
1836
|
try {
|
|
1836
1837
|
wt("\n" + r + " " + t + "\n"), Rt(n);
|
|
1837
1838
|
} catch (e) {
|
|
@@ -1846,8 +1847,8 @@
|
|
|
1846
1847
|
function pr(e, t, n, r) {
|
|
1847
1848
|
return function(e, t) {
|
|
1848
1849
|
let n = e.priv, r = JSON.stringify(t);
|
|
1849
|
-
if (Be(
|
|
1850
|
-
let n = ze(e, "url"), i = Se(
|
|
1850
|
+
if (Be(Te(), "trace_inter_event")) {
|
|
1851
|
+
let n = ze(e, "url"), i = Se(Te()) + " ==> " + n, o = xe(Te(), "trace_ievent_callback");
|
|
1851
1852
|
o ? o(i, t, 1, r.length) : dr(0, i, t);
|
|
1852
1853
|
}
|
|
1853
1854
|
try {
|
|
@@ -1872,7 +1873,7 @@
|
|
|
1872
1873
|
};
|
|
1873
1874
|
}
|
|
1874
1875
|
function hr(e) {
|
|
1875
|
-
let t = e.priv, n = Te(
|
|
1876
|
+
let t = e.priv, n = Ee(Te()), r = ze(Te(), "yuno_version"), i = ze(Te(), "yuno_release"), o = ze(Te(), "yuno_tag"), s = {
|
|
1876
1877
|
yuno_role: ve(),
|
|
1877
1878
|
yuno_id: je(),
|
|
1878
1879
|
yuno_name: ye(),
|
|
@@ -1884,22 +1885,22 @@
|
|
|
1884
1885
|
pid: 0,
|
|
1885
1886
|
watcher_pid: 0,
|
|
1886
1887
|
jwt: ze(e, "jwt"),
|
|
1887
|
-
username: ze(
|
|
1888
|
+
username: ze(Te(), "__username__"),
|
|
1888
1889
|
launch_id: 0,
|
|
1889
|
-
yuno_startdate: ze(
|
|
1890
|
+
yuno_startdate: ze(Te(), "start_date"),
|
|
1890
1891
|
id: Wn(),
|
|
1891
1892
|
user_agent: "undefined" != typeof window ? window.navigator.userAgent : "",
|
|
1892
1893
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
1893
|
-
required_services: xe(
|
|
1894
|
+
required_services: xe(Te(), "required_services")
|
|
1894
1895
|
};
|
|
1895
|
-
return kn(e, s, _r, mr(e, Se(De(e)), null)),
|
|
1896
|
+
return kn(e, s, _r, mr(e, Se(De(e)), null)), An(e, s, "__identity__"), er(t.gobj_timer, Je(e, "timeout_idack")), pr(e, "EV_IDENTITY_CARD", s);
|
|
1896
1897
|
}
|
|
1897
|
-
function
|
|
1898
|
+
function Er(e, t) {
|
|
1898
1899
|
if (Zt(t.event)) return -1;
|
|
1899
1900
|
let n = {}, r = t.__global__, i = t.__config__, o = t.__filter__, l = t.__service__, s = t.subscriber;
|
|
1900
|
-
return i && (n.__config__ = i), r && (n.__global__ = r), o && (n.__filter__ = o), kn(e, n, _r, mr(e, Se(s), l)),
|
|
1901
|
+
return i && (n.__config__ = i), r && (n.__global__ = r), o && (n.__filter__ = o), kn(e, n, _r, mr(e, Se(s), l)), An(e, n, "__subscribing__"), pr(e, t.event, n);
|
|
1901
1902
|
}
|
|
1902
|
-
function
|
|
1903
|
+
function Tr(e, t, n, r) {
|
|
1903
1904
|
let i = e.priv;
|
|
1904
1905
|
return pe(e) && (i.websocket = fr(e)), 0;
|
|
1905
1906
|
}
|
|
@@ -1908,11 +1909,19 @@
|
|
|
1908
1909
|
}
|
|
1909
1910
|
function vr(e, t, n, r) {
|
|
1910
1911
|
let i = e.priv, o = n.e, l = n.url;
|
|
1911
|
-
return jt(), Nt(`${Ne(e)}: WebSocket closed ${l} (Code: ${o.code}, Reason: "${o.reason}", Clean: ${o.wasClean})`), i.websocket && (i.websocket.onopen = null, i.websocket.onmessage = null, i.websocket.onerror = null, i.websocket.onclose = null, i.websocket = null), i.inform_on_close
|
|
1912
|
+
return jt(), Nt(`${Ne(e)}: WebSocket closed ${l} (Code: ${o.code}, Reason: "${o.reason}", Clean: ${o.wasClean})`), i.websocket && (i.websocket.onopen = null, i.websocket.onmessage = null, i.websocket.onerror = null, i.websocket.onclose = null, i.websocket = null), i.inform_on_close ? (i.inform_on_close = !1, pt(e, "EV_ON_CLOSE", {
|
|
1912
1913
|
url: l,
|
|
1913
1914
|
remote_yuno_name: i.remote_yuno_name,
|
|
1914
1915
|
remote_yuno_role: i.remote_yuno_role,
|
|
1915
1916
|
remote_yuno_service: i.remote_yuno_service
|
|
1917
|
+
})) : (Nt(`${Ne(e)}: EV_ON_OPEN_ERROR cannot open ${l} (Code: ${o.code}, Reason: "${o.reason}", Clean: ${o.wasClean})`), pt(e, "EV_ON_OPEN_ERROR", {
|
|
1918
|
+
url: l,
|
|
1919
|
+
remote_yuno_name: i.remote_yuno_name,
|
|
1920
|
+
remote_yuno_role: i.remote_yuno_role,
|
|
1921
|
+
remote_yuno_service: i.remote_yuno_service,
|
|
1922
|
+
code: o.code,
|
|
1923
|
+
reason: o.reason,
|
|
1924
|
+
was_clean: o.wasClean
|
|
1916
1925
|
})), pe(e) && er(i.gobj_timer, Je(e, "timeout_retry")), 0;
|
|
1917
1926
|
}
|
|
1918
1927
|
function jr(e, t, n, r) {
|
|
@@ -1950,7 +1959,7 @@
|
|
|
1950
1959
|
}
|
|
1951
1960
|
i.inside_on_open = !1, function(e) {
|
|
1952
1961
|
let t = dt(e, null, null, null);
|
|
1953
|
-
for (let n = 0; n < t.length; n++)
|
|
1962
|
+
for (let n = 0; n < t.length; n++) Er(e, t[n]);
|
|
1954
1963
|
}(e);
|
|
1955
1964
|
}
|
|
1956
1965
|
return 0;
|
|
@@ -1973,8 +1982,8 @@
|
|
|
1973
1982
|
kw: i || {}
|
|
1974
1983
|
} : (Ot("parsing inter_event: kw not a json object"), null) : (Ot("parsing inter_kw: no kw"), null);
|
|
1975
1984
|
}(0, n.data);
|
|
1976
|
-
if (Be(
|
|
1977
|
-
let e = Se(
|
|
1985
|
+
if (Be(Te(), "trace_inter_event")) {
|
|
1986
|
+
let e = Se(Te()) + " <== " + i, t = n.data.length, r = xe(Te(), "trace_ievent_callback");
|
|
1978
1987
|
r ? r(e, o, 2, t) : dr(0, e, o);
|
|
1979
1988
|
}
|
|
1980
1989
|
let l = o.event, s = o.kw;
|
|
@@ -1985,7 +1994,7 @@
|
|
|
1985
1994
|
return gr(e), -1;
|
|
1986
1995
|
}
|
|
1987
1996
|
o = null;
|
|
1988
|
-
let _ =
|
|
1997
|
+
let _ = In(e, s), a = $n(e, s, _r), u = cn(e, a, "dst_role", "");
|
|
1989
1998
|
if (u !== ve()) return Ot(`"It's not my role, dst_role: ${u}, my_role: ${ve()}`), 0;
|
|
1990
1999
|
let c = cn(e, a, "dst_service", "");
|
|
1991
2000
|
if ("__subscribing__" === _) return -1;
|
|
@@ -2042,7 +2051,7 @@
|
|
|
2042
2051
|
return o || (o = {}), kn(e, n, "stats_stack", {
|
|
2043
2052
|
stats: t,
|
|
2044
2053
|
kw: o
|
|
2045
|
-
}), kn(e, n, _r, i), n.__stats__ = t,
|
|
2054
|
+
}), kn(e, n, _r, i), n.__stats__ = t, An(e, n, "__stats__"), pr(e, "EV_MT_STATS", n, r), null;
|
|
2046
2055
|
},
|
|
2047
2056
|
mt_command_parser: function(e, t, n, r) {
|
|
2048
2057
|
if ("ST_SESSION" !== tt(e)) return Ot("Not in session"), null;
|
|
@@ -2051,7 +2060,7 @@
|
|
|
2051
2060
|
return o || (o = {}), kn(e, n, "command_stack", {
|
|
2052
2061
|
command: t,
|
|
2053
2062
|
kw: o
|
|
2054
|
-
}), kn(e, n, _r, i), n.__command__ = t,
|
|
2063
|
+
}), kn(e, n, _r, i), n.__command__ = t, An(e, n, "__command__"), pr(e, "EV_MT_COMMAND", n, r), null;
|
|
2055
2064
|
},
|
|
2056
2065
|
mt_inject_event: function(e, t, n, r) {
|
|
2057
2066
|
if ("ST_SESSION" !== tt(e)) return window.console.error("Not in session"), -1;
|
|
@@ -2060,11 +2069,11 @@
|
|
|
2060
2069
|
let i = mr(e, Se(r), cn(e, n, "__service__", 0, 0));
|
|
2061
2070
|
Ut(n, "__service__"), kn(e, n, "__message__", t), kn(e, n, _r, i);
|
|
2062
2071
|
}
|
|
2063
|
-
return
|
|
2072
|
+
return An(e, n, "__message__"), pr(e, t, n, r);
|
|
2064
2073
|
},
|
|
2065
2074
|
mt_subscription_added: function(e, t) {
|
|
2066
2075
|
let n = e.priv;
|
|
2067
|
-
return "ST_SESSION" !== tt(e) || n.inside_on_open ? 0 :
|
|
2076
|
+
return "ST_SESSION" !== tt(e) || n.inside_on_open ? 0 : Er(e, t);
|
|
2068
2077
|
},
|
|
2069
2078
|
mt_subscription_deleted: function(e, t) {
|
|
2070
2079
|
let n = e.priv;
|
|
@@ -2072,7 +2081,7 @@
|
|
|
2072
2081
|
if (n.inside_on_open) return 0;
|
|
2073
2082
|
if (Zt(t.event)) return 0;
|
|
2074
2083
|
let r = {}, i = t.__global__, o = t.__config__, l = t.__filter__, s = t.__service__, _ = t.subscriber;
|
|
2075
|
-
return o && (r.__config__ = o), i && (r.__global__ = i), l && (r.__filter__ = l), kn(e, r, _r, mr(e, Se(_), s)),
|
|
2084
|
+
return o && (r.__config__ = o), i && (r.__global__ = i), l && (r.__filter__ = l), kn(e, r, _r, mr(e, Se(_), s)), An(e, r, "__unsubscribing__"), pr(e, t.event, r, e);
|
|
2076
2085
|
}
|
|
2077
2086
|
};
|
|
2078
2087
|
e.GObj = O, e.SDATA = j, e.SDATAAUTHZ = (e, t, n, r, i, o) => new y(e, t, n, null, o, r, null, 0, null, i, null), e.SDATACM = (e, t, n, r, i, o) => new y(e, t, 0, null, o, n, null, 0, i, r, null), e.SDATACM2 = (e, t, n, r, i, o, l) => new y(e, t, n, null, l, r, null, 0, o, i, null), e.SDATADF = (e, t, n, r, i, o) => new y(e, t, n, null, o, null, r, i), e.SDATAPM = (e, t, n, r, i) => new y(e, t, n, r, i), e.SDATAPM0 = (e, t, n, r, i) => new y(e, t, n, null, i, null, null, 0, null, null, r), e.SDATA_END = v, e.SDataDesc = y, e.YUNETA_VERSION = l, Object.defineProperty(e, "__yuno__", {
|
|
@@ -2094,8 +2103,8 @@
|
|
|
2094
2103
|
let t = "";
|
|
2095
2104
|
for (const n of Object.keys(i[e])) t += `${n}: ${i[e][n]};`;
|
|
2096
2105
|
s.style.cssText = t;
|
|
2097
|
-
} else "style" === e ? s.style.cssText = i[e] : "i18n" === e || "data-i18n" === e || "data_i18next" === e || "data-i18next" === e ? (_ = i[e], s.setAttribute("data-i18n", _)) : s.setAttribute(e, i[e]);
|
|
2098
|
-
if (Jt(o)) if (o = o.trim(), o.length > 0 && "<" === o[0]) s.appendChild(
|
|
2106
|
+
} else "style" === e ? s.style.cssText = i[e] : "i18n" === e || "data-i18n" === e || "data_i18next" === e || "data-i18next" === e ? null !== i[e] && void 0 !== i[e] && (_ = i[e], s.setAttribute("data-i18n", _)) : s.setAttribute(e, i[e]);
|
|
2107
|
+
if (Jt(o)) if (o = o.trim(), o.length > 0 && "<" === o[0]) s.appendChild(Fn(o));
|
|
2099
2108
|
else if (n && _) s.textContent = n(_) || o;
|
|
2100
2109
|
else s.textContent = o;
|
|
2101
2110
|
else if (Bt(o)) {
|
|
@@ -2104,28 +2113,28 @@
|
|
|
2104
2113
|
} else o instanceof HTMLElement || o instanceof Text || o instanceof SVGElement ? s.appendChild(o) : null != o && (Ot("content ignored"), Rt(o));
|
|
2105
2114
|
if (l && "object" == typeof l) for (const e of Object.keys(l)) s.addEventListener(e, l[e]);
|
|
2106
2115
|
return s;
|
|
2107
|
-
}, e.createOneHtml =
|
|
2116
|
+
}, e.createOneHtml = Fn, e.create_json_record = function(e, t) {
|
|
2108
2117
|
let n = kt(e);
|
|
2109
|
-
return
|
|
2118
|
+
return It(n, t), n;
|
|
2110
2119
|
}, e.create_template_record = function(e, t) {
|
|
2111
2120
|
let n = {};
|
|
2112
2121
|
return t || (t = {}), Object.entries(e).forEach(([e, r]) => {
|
|
2113
2122
|
n[e] = dn(null, t, e, dn(r, "default"));
|
|
2114
2123
|
}), n;
|
|
2115
|
-
}, e.current_timestamp =
|
|
2124
|
+
}, e.current_timestamp = Gn, e.data_type_t = E, e.db_list_persistent_attrs = function(e, t) {
|
|
2116
2125
|
let n = yn(Kn(e), null, !1), r = {};
|
|
2117
|
-
return n && Yt(n) && (r =
|
|
2126
|
+
return n && Yt(n) && (r = En(e, n, t, !1)), r;
|
|
2118
2127
|
}, e.db_load_persistent_attrs = function(e, t) {
|
|
2119
|
-
let n = Ye(e,
|
|
2128
|
+
let n = Ye(e, T.SDF_PERSIST), r = yn(Kn(e), null, !1);
|
|
2120
2129
|
if (r && Yt(r)) {
|
|
2121
|
-
let i =
|
|
2122
|
-
i =
|
|
2130
|
+
let i = En(e, r, t, !1);
|
|
2131
|
+
i = En(e, i, n, !1), qe(e, i, T.SDF_PERSIST);
|
|
2123
2132
|
}
|
|
2124
2133
|
}, e.db_remove_persistent_attrs = function(e, t) {
|
|
2125
|
-
let n =
|
|
2134
|
+
let n = Tn(e, yn(Kn(e), null, !1), t, !1);
|
|
2126
2135
|
0 === Mt(n) ? jn(Kn(e)) : vn(Kn(e), n);
|
|
2127
2136
|
}, e.db_save_persistent_attrs = function(e, t) {
|
|
2128
|
-
let n =
|
|
2137
|
+
let n = En(e, Ye(e, T.SDF_PERSIST), t, !1), r = yn(Kn(e), null, !1);
|
|
2129
2138
|
r && Yt(r) && Lt(n, r), vn(Kn(e), n);
|
|
2130
2139
|
}, e.debounce = function(e, t = 0, n = !1) {
|
|
2131
2140
|
let r = null, i = null, o = null;
|
|
@@ -2151,7 +2160,7 @@
|
|
|
2151
2160
|
Object.assign(t, e);
|
|
2152
2161
|
}
|
|
2153
2162
|
return t;
|
|
2154
|
-
}, e.empty_string = Zt, e.escapeHtml = Cn, e.event_flag_t = R, e.gclass_add_ev_action = B, e.gclass_add_event_type = z, e.gclass_add_state = Y, e.gclass_check_fsm =
|
|
2163
|
+
}, e.empty_string = Zt, e.escapeHtml = Cn, e.event_flag_t = R, e.gclass_add_ev_action = B, e.gclass_add_event_type = z, e.gclass_add_state = Y, e.gclass_check_fsm = q, e.gclass_create = W, e.gclass_event_type = Q, e.gclass_find_by_name = H, e.gclass_flag_t = N, e.gclass_unregister = M, e.getPositionRelativeToBody = function(e) {
|
|
2155
2164
|
if (!e) return {
|
|
2156
2165
|
top: 0,
|
|
2157
2166
|
left: 0,
|
|
@@ -2172,7 +2181,7 @@
|
|
|
2172
2181
|
};
|
|
2173
2182
|
}, e.get_function_name = Mn, e.get_now = function() {
|
|
2174
2183
|
return Math.floor(Date.now() / 1e3);
|
|
2175
|
-
}, e.gobj_bottom_gobj =
|
|
2184
|
+
}, e.gobj_bottom_gobj = Ae, e.gobj_change_parent = function(e, t) {
|
|
2176
2185
|
return $e(e) ? (Ot("gobj NULL or DESTROYED"), null) : t instanceof O ? (e.parent && e.parent.mt_child_removed && e.parent.mt_child_removed(e.parent, e), e.parent && (ne(e.parent, e), e.parent = null), te(t, e), t.mt_child_added && (p && Be(p, "trace_creation") && wt(n("👦👦🔵 child_added(%s): %s", we(t), Ne(e))), t.mt_child_added(t, e)), 0) : (Ot(`${Ne(e)}: gobj_change_parent() BAD TYPE of parent`), -1);
|
|
2177
2186
|
}, e.gobj_change_state = et, e.gobj_command = function(e, t, r, o) {
|
|
2178
2187
|
if ($e(e)) return Ot("gobj NULL or DESTROYED"), -1;
|
|
@@ -2192,18 +2201,18 @@
|
|
|
2192
2201
|
if (Zt(t)) return null;
|
|
2193
2202
|
const n = t.toLowerCase();
|
|
2194
2203
|
return "__default_service__" === n ? m : "__yuno__" === n || "__root__" === n ? p : Me(p, t);
|
|
2195
|
-
}, e.gobj_find_service = Z, e.gobj_find_subscribings = bt, e.gobj_find_subscriptions = dt, e.gobj_flag_t = w, e.gobj_full_name = we, e.gobj_gclass_name = Oe, e.gobj_has_attr = Ke, e.gobj_has_event = rt, e.gobj_has_output_event = it, e.gobj_hsdata =
|
|
2204
|
+
}, e.gobj_find_service = Z, e.gobj_find_subscribings = bt, e.gobj_find_subscriptions = dt, e.gobj_flag_t = w, e.gobj_full_name = we, e.gobj_gclass_name = Oe, e.gobj_has_attr = Ke, e.gobj_has_event = rt, e.gobj_has_output_event = it, e.gobj_hsdata = F, e.gobj_is_destroying = $e, e.gobj_is_playing = Ee, e.gobj_is_pure_child = ke, e.gobj_is_running = pe, e.gobj_is_service = he, e.gobj_is_volatil = Re, e.gobj_list_persistent_attrs = function(e, t) {
|
|
2196
2205
|
return u ? u(e, t) : null;
|
|
2197
2206
|
}, e.gobj_list_subscriptions = function(e) {
|
|
2198
2207
|
let t = dt(e, null, null, null);
|
|
2199
2208
|
for (let n = 0; n < t.length; n++) {
|
|
2200
2209
|
let r = t[n], i = fn(e, r, "publisher", null, mt.KW_REQUIRED), o = fn(e, r, "subscriber", null, mt.KW_REQUIRED);
|
|
2201
|
-
|
|
2210
|
+
Ft(r, "s_event", cn(e, r, "event", "", mt.KW_REQUIRED)), Ft(r, "s_publisher", Ne(i)), Ft(r, "s_subscriber", Ne(o));
|
|
2202
2211
|
}
|
|
2203
2212
|
let n = bt(e, 0, null, 0);
|
|
2204
2213
|
for (let t = 0; t < n.length; t++) {
|
|
2205
2214
|
let r = n[t], i = fn(e, r, "publisher", null, mt.KW_REQUIRED), o = fn(e, r, "subscriber", null, mt.KW_REQUIRED);
|
|
2206
|
-
|
|
2215
|
+
Ft(r, "s_event", cn(e, r, "event", "", mt.KW_REQUIRED)), Ft(r, "s_publisher", Ne(i)), Ft(r, "s_subscriber", Ne(o));
|
|
2207
2216
|
}
|
|
2208
2217
|
return {
|
|
2209
2218
|
subscriptions: t,
|
|
@@ -2251,14 +2260,14 @@
|
|
|
2251
2260
|
}
|
|
2252
2261
|
}
|
|
2253
2262
|
return 0;
|
|
2254
|
-
}(e,
|
|
2263
|
+
}(e, T.SDF_VOLATIL, 0);
|
|
2255
2264
|
}, e.gobj_save_persistent_attrs = function(e, t) {
|
|
2256
2265
|
return he(e) ? _ ? _(e, t) : -1 : (Ot(`${Ne(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
2257
2266
|
}, e.gobj_search_path = Me, e.gobj_send_event = ot, e.gobj_services = function() {
|
|
2258
2267
|
let e = [];
|
|
2259
2268
|
for (const t of Object.keys(b)) Vt(e, t);
|
|
2260
2269
|
return e;
|
|
2261
|
-
}, e.gobj_set_bottom_gobj =
|
|
2270
|
+
}, e.gobj_set_bottom_gobj = Ie, e.gobj_short_name = Ne, e.gobj_start = _e, e.gobj_start_children = function(e) {
|
|
2262
2271
|
return $e(e) ? (Ot("gobj NULL or DESTROYED"), -1) : Pe(e, k.WALK_FIRST2LAST, ae, 0, 0);
|
|
2263
2272
|
}, e.gobj_start_tree = function(e) {
|
|
2264
2273
|
return $e(e) ? (Ot("gobj NULL or DESTROYED"), -1) : (p && Be(p, "trace_start_stop") && L(n("⏺ ⏺ ⏺ ⏺ start_tree: %s", we(e))), e.gclass.gclass_flag & N.gcflag_manual_start || e.disabled ? 0 : (e.running || _e(e), Ue(e, k.WALK_TOP2BOTTOM, ue, 0, 0)));
|
|
@@ -2314,14 +2323,14 @@
|
|
|
2314
2323
|
break;
|
|
2315
2324
|
}
|
|
2316
2325
|
return Ot(n("gobj_write_attr(%s): attr not found '%s'", Ne(e), o)), -1;
|
|
2317
|
-
}, e.gobj_write_attrs =
|
|
2326
|
+
}, e.gobj_write_attrs = qe, e.gobj_write_bool_attr = He, e.gobj_write_integer_attr = Xe, e.gobj_write_str_attr = Ze, e.gobj_yuno = Te, e.gobj_yuno_id = je, e.gobj_yuno_name = ye, e.gobj_yuno_role = ve, e.id_index_in_obj_list = Nn, e.index_in_list = Vn, e.is_array = Bt, e.is_boolean = Qt, e.is_date = function(e) {
|
|
2318
2327
|
return e instanceof Date && !isNaN(e);
|
|
2319
|
-
}, e.is_function =
|
|
2328
|
+
}, e.is_function = Ht, e.is_gobj = Xt, e.is_metadata_key = function(e) {
|
|
2320
2329
|
if (!Jt(e)) return !1;
|
|
2321
2330
|
let t;
|
|
2322
2331
|
for (t = 0; t < e.length && "_" === e[t] && !(t > 2); t++);
|
|
2323
2332
|
return 2 === t;
|
|
2324
|
-
}, e.is_null =
|
|
2333
|
+
}, e.is_null = qt, e.is_number = zt, e.is_object = Yt, e.is_private_key = function(e) {
|
|
2325
2334
|
if (!Jt(e)) return !1;
|
|
2326
2335
|
let t;
|
|
2327
2336
|
for (t = 0; t < e.length && "_" === e[t] && !(t > 2); t++);
|
|
@@ -2376,9 +2385,9 @@
|
|
|
2376
2385
|
n ? Object.assign(n, r) : t.push(r);
|
|
2377
2386
|
}
|
|
2378
2387
|
return i;
|
|
2379
|
-
}, e.json_array_append =
|
|
2388
|
+
}, e.json_array_append = Gt, e.json_array_append_new = Vt, e.json_array_extend = function(e, t) {
|
|
2380
2389
|
return t ? (Array.prototype.push.apply(e, t), e) : e;
|
|
2381
|
-
}, e.json_array_remove = Wt, e.json_array_size = Kt, e.json_deep_copy = kt, e.json_is_identical = $t, e.json_object_del = Ut, e.json_object_get = Pt, e.json_object_set = Ct, e.json_object_set_new =
|
|
2390
|
+
}, e.json_array_remove = Wt, e.json_array_size = Kt, e.json_deep_copy = kt, e.json_is_identical = $t, e.json_object_del = Ut, e.json_object_get = Pt, e.json_object_set = Ct, e.json_object_set_new = Ft, e.json_object_size = Mt, e.json_object_update = At, e.json_object_update_existing = It, e.json_object_update_missing = Lt, e.json_size = xt, e.jwt2json = function(e, t) {
|
|
2382
2391
|
try {
|
|
2383
2392
|
let n = Un(e);
|
|
2384
2393
|
switch (t) {
|
|
@@ -2389,7 +2398,7 @@
|
|
|
2389
2398
|
} catch (e) {
|
|
2390
2399
|
return null;
|
|
2391
2400
|
}
|
|
2392
|
-
}, e.jwtDecode = Un, e.kw_clone_by_keys =
|
|
2401
|
+
}, e.jwtDecode = Un, e.kw_clone_by_keys = En, e.kw_clone_by_not_keys = Tn, e.kw_collect = function(e, t, n, r) {
|
|
2393
2402
|
if (e && !Xt(e) && Ot("GObj bad instanceof"), !t) return null;
|
|
2394
2403
|
r || (r = hn);
|
|
2395
2404
|
let i = [];
|
|
@@ -2518,17 +2527,23 @@
|
|
|
2518
2527
|
var e;
|
|
2519
2528
|
}, r.send();
|
|
2520
2529
|
}, e.log_debug = wt, e.log_error = Ot, e.log_info = function(e) {
|
|
2521
|
-
let t = St(e), n =
|
|
2530
|
+
let t = St(e), n = Gn();
|
|
2522
2531
|
yt && yt("%c" + n + " INFO: " + String(t), "color:cyan");
|
|
2523
|
-
}, e.log_warning = Nt, e.msg_iev_get_msg_type =
|
|
2532
|
+
}, e.log_warning = Nt, e.msg_iev_get_msg_type = In, e.msg_iev_get_stack = $n, e.msg_iev_push_stack = kn, e.msg_iev_read_key = Dn, e.msg_iev_set_msg_type = An, e.msg_iev_write_key = Rn, e.node_uuid = Wn, e.parseBoolean = en, e.parseSVG = function(e) {
|
|
2524
2533
|
return new DOMParser().parseFromString(e, "image/svg+xml").firstChild;
|
|
2525
2534
|
}, e.refresh_language = function(e, t) {
|
|
2526
|
-
|
|
2535
|
+
Ht(t) ? (e || (e = document), e.querySelectorAll("[data-i18n]").forEach(function(e) {
|
|
2527
2536
|
let n = e.getAttribute("data-i18n");
|
|
2528
2537
|
for (let r of e.childNodes) if (r.nodeType === Node.TEXT_NODE) {
|
|
2529
2538
|
n || (n = r.nodeValue), r.nodeValue = t(n);
|
|
2530
2539
|
break;
|
|
2531
2540
|
}
|
|
2541
|
+
}), e.querySelectorAll("[data-i18n-title]").forEach(function(e) {
|
|
2542
|
+
let n = e.getAttribute("data-i18n-title");
|
|
2543
|
+
n && e.setAttribute("title", t(n));
|
|
2544
|
+
}), e.querySelectorAll("[data-i18n-aria-label]").forEach(function(e) {
|
|
2545
|
+
let n = e.getAttribute("data-i18n-aria-label");
|
|
2546
|
+
n && e.setAttribute("aria-label", t(n));
|
|
2532
2547
|
})) : Ot("You must supply a translation function");
|
|
2533
2548
|
}, e.register_c_ievent_cli = function() {
|
|
2534
2549
|
return function(e) {
|
|
@@ -2547,7 +2562,7 @@
|
|
|
2547
2562
|
],
|
|
2548
2563
|
[
|
|
2549
2564
|
"EV_TIMEOUT",
|
|
2550
|
-
|
|
2565
|
+
Tr,
|
|
2551
2566
|
null
|
|
2552
2567
|
],
|
|
2553
2568
|
[
|
|
@@ -2620,23 +2635,24 @@
|
|
|
2620
2635
|
["EV_MT_COMMAND", R.EVF_PUBLIC_EVENT],
|
|
2621
2636
|
["EV_ON_OPEN", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS],
|
|
2622
2637
|
["EV_ON_CLOSE", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS],
|
|
2638
|
+
["EV_ON_OPEN_ERROR", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS],
|
|
2623
2639
|
["EV_TIMEOUT", 0],
|
|
2624
2640
|
[null, 0]
|
|
2625
2641
|
], t, Dr, 0, ar, ur, 0, 0, 0, N.gcflag_no_check_output_events)) ? 0 : -1;
|
|
2626
2642
|
}("C_IEVENT_CLI");
|
|
2627
2643
|
}, e.register_c_timer = function() {
|
|
2628
2644
|
return function(e) {
|
|
2629
|
-
if (
|
|
2645
|
+
if (Hn) return Ot(`GClass ALREADY created: ${e}`), -1;
|
|
2630
2646
|
const t = [["ST_IDLE", [[
|
|
2631
2647
|
"EV_TIMEOUT",
|
|
2632
2648
|
Xn,
|
|
2633
2649
|
null
|
|
2634
2650
|
]]]];
|
|
2635
|
-
return (
|
|
2651
|
+
return (Hn = W(e, [
|
|
2636
2652
|
["EV_TIMEOUT", R.EVF_OUTPUT_EVENT],
|
|
2637
2653
|
["EV_TIMEOUT_PERIODIC", R.EVF_OUTPUT_EVENT],
|
|
2638
2654
|
[0, 0]
|
|
2639
|
-
], t, Zn, 0, Qn,
|
|
2655
|
+
], t, Zn, 0, Qn, qn, 0, 0, 0, N.gcflag_manual_start)) ? 0 : -1;
|
|
2640
2656
|
}("C_TIMER");
|
|
2641
2657
|
}, e.register_c_yuno = function() {
|
|
2642
2658
|
return function(e) {
|
|
@@ -2652,7 +2668,7 @@
|
|
|
2652
2668
|
if (!e) return "";
|
|
2653
2669
|
const t = String(e).trim();
|
|
2654
2670
|
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" : Cn(t);
|
|
2655
|
-
}, e.sdata_flag_t =
|
|
2671
|
+
}, e.sdata_flag_t = T, e.send_http_json_post = function(e, t, n) {
|
|
2656
2672
|
let r = new XMLHttpRequest();
|
|
2657
2673
|
r.open("POST", e), r.setRequestHeader("Accept", "application/json"), r.setRequestHeader("Content-Type", "application/json"), r.onreadystatechange = function() {
|
|
2658
2674
|
4 === r.readyState && n(r.status, r.responseText);
|