@yuneta/gobj-js 7.6.7 → 7.7.1
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 +38 -4
- package/dist/gobj-js.cjs.js.map +1 -1
- package/dist/gobj-js.cjs.min.js +961 -939
- package/dist/gobj-js.cjs.min.js.map +1 -1
- package/dist/gobj-js.es.js +36 -5
- package/dist/gobj-js.es.js.map +1 -1
- package/dist/gobj-js.es.min.js +1020 -995
- package/dist/gobj-js.es.min.js.map +1 -1
- package/dist/gobj-js.iife.js +38 -4
- package/dist/gobj-js.iife.js.map +1 -1
- package/dist/gobj-js.iife.min.js +1113 -1091
- package/dist/gobj-js.iife.min.js.map +1 -1
- package/dist/gobj-js.umd.js +38 -4
- package/dist/gobj-js.umd.js.map +1 -1
- package/dist/gobj-js.umd.min.js +978 -956
- package/dist/gobj-js.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/gobj-js.umd.min.js
CHANGED
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
DTP_POINTER: 8
|
|
145
145
|
});
|
|
146
146
|
E.DTP_POINTER;
|
|
147
|
-
var
|
|
147
|
+
var y = Object.freeze({
|
|
148
148
|
SDF_NOTACCESS: 1,
|
|
149
149
|
SDF_RD: 2,
|
|
150
150
|
SDF_WR: 4,
|
|
@@ -167,18 +167,18 @@
|
|
|
167
167
|
SDF_AUTHZ_S: 524288,
|
|
168
168
|
SDF_AUTHZ_RS: 1048576
|
|
169
169
|
});
|
|
170
|
-
|
|
171
|
-
var
|
|
170
|
+
y.SDF_RD, y.SDF_WR, y.SDF_STATS, y.SDF_PERSIST, y.SDF_VOLATIL, y.SDF_RSTATS, y.SDF_PSTATS, y.SDF_WR, y.SDF_PERSIST;
|
|
171
|
+
var T = 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;
|
|
174
174
|
}
|
|
175
|
-
}, v = () => new
|
|
175
|
+
}, v = () => new T(0, null), j = (e, t, n, r, i) => new T(e, t, n, r, i), S = class {
|
|
176
176
|
constructor(e, t, n, r, i, o, l, s, _) {
|
|
177
177
|
this.gclass_name = e, this.dl_states = [], this.dl_events = [], this.gmt = t, this.lmt = n, this.attrs_table = r, this.priv = i, this.authz_table = o, this.command_table = l, this.s_user_trace_level = s, this.gclass_flag = Number(_) || 0, this.instances = 0, this.trace_level = 0, this.no_trace_level = 0, this.jn_trace_filter = null, this.fsm_checked = !1;
|
|
178
178
|
}
|
|
179
179
|
}, O = class {
|
|
180
180
|
constructor(e, t, n, r, i) {
|
|
181
|
-
this.__refs__ = 0, this.gclass = t, this.parent = null, this.dl_children = [], this.dl_subscriptions = [], this.dl_subscribings = [], this.current_state = t.dl_states[0], this.last_state = null, this.obflag = 0, this.gobj_flag = Number(i) || 0, this.gobj_name = e, this.jn_attrs = null, this.jn_stats = {}, this.jn_user_data = {}, this.full_name = null, this.short_name = null, this.priv =
|
|
181
|
+
this.__refs__ = 0, this.gclass = t, this.parent = null, this.dl_children = [], this.dl_subscriptions = [], this.dl_subscribings = [], this.current_state = t.dl_states[0], this.last_state = null, this.obflag = 0, this.gobj_flag = Number(i) || 0, this.gobj_name = e, this.jn_attrs = null, this.jn_stats = {}, this.jn_user_data = {}, this.full_name = null, this.short_name = null, this.priv = Lt(t.priv), this.running = !1, this.playing = !1, this.disabled = !1, this.bottom_gobj = null, this.trace_level = 0, this.no_trace_level = 0;
|
|
182
182
|
}
|
|
183
183
|
}, N = Object.freeze({
|
|
184
184
|
gcflag_manual_start: 1,
|
|
@@ -222,172 +222,173 @@
|
|
|
222
222
|
this.event_name = e, this.event_flag = Number(t) || 0;
|
|
223
223
|
}
|
|
224
224
|
};
|
|
225
|
-
|
|
226
|
-
|
|
225
|
+
var L = 0;
|
|
226
|
+
function P(e) {
|
|
227
|
+
Qt(e) && (e = JSON.stringify(e)), $t(" ".repeat(Math.max(0, 2 * h - 1)) + String(e));
|
|
227
228
|
}
|
|
228
|
-
function
|
|
229
|
+
function U(e, t) {
|
|
229
230
|
let n = {};
|
|
230
|
-
if (!
|
|
231
|
+
if (!qt(t)) return Rt("sdata_desc MUST be an array"), It(t), n;
|
|
231
232
|
for (let r = 0; r < t.length; r++) {
|
|
232
233
|
const i = t[r];
|
|
233
|
-
i.name &&
|
|
234
|
+
i.name && C(e, n, i);
|
|
234
235
|
}
|
|
235
236
|
return n;
|
|
236
237
|
}
|
|
237
|
-
function
|
|
238
|
+
function C(e, t, n) {
|
|
238
239
|
let r, i = n.default_value;
|
|
239
240
|
switch (n.type) {
|
|
240
241
|
case E.DTP_STRING:
|
|
241
242
|
r = String(i);
|
|
242
243
|
break;
|
|
243
244
|
case E.DTP_BOOLEAN:
|
|
244
|
-
r =
|
|
245
|
+
r = on(i);
|
|
245
246
|
break;
|
|
246
247
|
case E.DTP_INTEGER:
|
|
247
|
-
r = parseInt(i), isNaN(r) &&
|
|
248
|
+
r = parseInt(i), isNaN(r) && Rt(`${we(e)}: attr NaN: ${n.name}`);
|
|
248
249
|
break;
|
|
249
250
|
case E.DTP_REAL:
|
|
250
|
-
r = Number(i), isNaN(r) &&
|
|
251
|
+
r = Number(i), isNaN(r) && Rt(`${we(e)}: attr NaN: ${n.name}`);
|
|
251
252
|
break;
|
|
252
253
|
case E.DTP_LIST:
|
|
253
|
-
if (
|
|
254
|
+
if (Ht(i)) try {
|
|
254
255
|
r = JSON.parse(i);
|
|
255
256
|
} catch (e) {
|
|
256
|
-
|
|
257
|
+
Rt(`JSON parse error: ${e.message}`);
|
|
257
258
|
}
|
|
258
259
|
else r = i;
|
|
259
|
-
|
|
260
|
+
qt(r) || (r = []);
|
|
260
261
|
break;
|
|
261
262
|
case E.DTP_DICT:
|
|
262
|
-
if (
|
|
263
|
+
if (Ht(i)) try {
|
|
263
264
|
r = JSON.parse(i);
|
|
264
265
|
} catch (e) {
|
|
265
|
-
|
|
266
|
+
Rt(`JSON parse error: ${e.message}`);
|
|
266
267
|
}
|
|
267
268
|
else r = i;
|
|
268
|
-
|
|
269
|
+
Qt(r) || (r = {});
|
|
269
270
|
break;
|
|
270
271
|
case E.DTP_JSON:
|
|
271
|
-
if (
|
|
272
|
+
if (Ht(i)) try {
|
|
272
273
|
r = JSON.parse(i);
|
|
273
274
|
} catch (e) {
|
|
274
|
-
|
|
275
|
+
Rt(`JSON parse error: ${e.message}`);
|
|
275
276
|
}
|
|
276
277
|
else r = i;
|
|
277
278
|
break;
|
|
278
279
|
case E.DTP_POINTER: r = i;
|
|
279
280
|
}
|
|
280
|
-
return void 0 === r && (
|
|
281
|
+
return void 0 === r && (Rt(`default_value WRONG, it: ${n.name}, value: ${n.default_value}`), r = null), t[n.name] = r, 0;
|
|
281
282
|
}
|
|
282
|
-
function
|
|
283
|
+
function F(e, t, n, r) {
|
|
283
284
|
let i;
|
|
284
285
|
switch (n.type) {
|
|
285
286
|
case E.DTP_STRING:
|
|
286
287
|
if (null == r) i = "";
|
|
287
|
-
else if (
|
|
288
|
+
else if (Ht(r)) i = String(r);
|
|
288
289
|
else {
|
|
289
290
|
let e = JSON.stringify(r);
|
|
290
291
|
e && (i = String(e));
|
|
291
292
|
}
|
|
292
293
|
break;
|
|
293
294
|
case E.DTP_BOOLEAN:
|
|
294
|
-
i =
|
|
295
|
+
i = on(r);
|
|
295
296
|
break;
|
|
296
297
|
case E.DTP_INTEGER:
|
|
297
|
-
i = parseInt(r), isNaN(i) &&
|
|
298
|
+
i = parseInt(r), isNaN(i) && Rt(`${we(e)}: attr NaN: ${n.name}`);
|
|
298
299
|
break;
|
|
299
300
|
case E.DTP_REAL:
|
|
300
|
-
i = Number(r), isNaN(i) &&
|
|
301
|
+
i = Number(r), isNaN(i) && Rt(`${we(e)}: attr NaN: ${n.name}`);
|
|
301
302
|
break;
|
|
302
303
|
case E.DTP_LIST:
|
|
303
|
-
if (
|
|
304
|
+
if (Ht(r)) try {
|
|
304
305
|
i = JSON.parse(r);
|
|
305
306
|
} catch (e) {
|
|
306
|
-
|
|
307
|
+
Rt(`JSON parse error: ${e.message}`);
|
|
307
308
|
}
|
|
308
309
|
else i = r;
|
|
309
|
-
if (!
|
|
310
|
+
if (!qt(i)) return Rt(`attr must be an array: ${n.name}`), -1;
|
|
310
311
|
break;
|
|
311
312
|
case E.DTP_DICT:
|
|
312
|
-
if (
|
|
313
|
+
if (Ht(r)) try {
|
|
313
314
|
i = JSON.parse(r);
|
|
314
315
|
} catch (e) {
|
|
315
|
-
|
|
316
|
+
Rt(`JSON parse error: ${e.message}`);
|
|
316
317
|
}
|
|
317
318
|
else i = r;
|
|
318
|
-
if (!
|
|
319
|
+
if (!Qt(i)) return Rt(`attr must be an object: ${n.name}`), -1;
|
|
319
320
|
break;
|
|
320
321
|
case E.DTP_JSON:
|
|
321
|
-
if (
|
|
322
|
+
if (Ht(r)) try {
|
|
322
323
|
i = JSON.parse(r);
|
|
323
324
|
} catch (e) {
|
|
324
|
-
|
|
325
|
+
Rt(`JSON parse error: ${e.message}`);
|
|
325
326
|
}
|
|
326
327
|
else i = r;
|
|
327
|
-
if (!
|
|
328
|
+
if (!qt(i) && !Qt(i)) return Rt(`attr must be a json dict/list: ${n.name}`), -1;
|
|
328
329
|
break;
|
|
329
330
|
case E.DTP_POINTER: i = r;
|
|
330
331
|
}
|
|
331
|
-
return void 0 === i &&
|
|
332
|
+
return void 0 === i && Rt(`${we(e)}: attr undefined: ${n.name}`), t[n.name] = i, Qt(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;
|
|
332
333
|
}
|
|
333
|
-
function
|
|
334
|
+
function G(e) {
|
|
334
335
|
return e.jn_attrs;
|
|
335
336
|
}
|
|
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);
|
|
338
|
-
}
|
|
339
337
|
function V(e, t, n) {
|
|
340
|
-
|
|
338
|
+
return xe(e, t) ? G(e) : e && e.bottom_gobj ? V(e.bottom_gobj, t, n) : (n && Rt(`GClass Attribute NOT FOUND: ${we(e)}, attr ${t}`), null);
|
|
339
|
+
}
|
|
340
|
+
function W(e, t, n) {
|
|
341
|
+
if (!(e && e instanceof S)) return n && Rt("gclass NULL"), null;
|
|
341
342
|
if (!t) return e.attrs_table;
|
|
342
343
|
for (let n = 0; n < e.attrs_table.length; n++) {
|
|
343
344
|
const r = e.attrs_table[n];
|
|
344
345
|
if (r.name && r.name === t) return r;
|
|
345
346
|
}
|
|
346
|
-
return n &&
|
|
347
|
+
return n && Rt(`${e.gclass_name}: GClass Attribute NOT FOUND: ${t}`), null;
|
|
347
348
|
}
|
|
348
|
-
function
|
|
349
|
-
if (
|
|
350
|
-
if (e.includes("`") || e.includes("^") || e.includes(".")) return
|
|
351
|
-
if (
|
|
349
|
+
function M(e, t, n, r, i, o, l, s, _, a, u) {
|
|
350
|
+
if (rn(e)) return Rt("gclass_name EMPTY"), null;
|
|
351
|
+
if (e.includes("`") || e.includes("^") || e.includes(".")) return Rt(`GClass name CANNOT have '.' or '^' or '\`' char: ${e}`), null;
|
|
352
|
+
if (X(e)) return Rt(`GClass ALREADY exists: ${e}`), null;
|
|
352
353
|
let c = new S(e, r, i, o, l, s, _, a, u);
|
|
353
354
|
(function(e, t) {
|
|
354
|
-
e && e instanceof S ? t ? d[t] ?
|
|
355
|
+
e && e instanceof S ? t ? d[t] ? Rt(`gclass ALREADY REGISTERED: ${t}`) : d[t] = e : Rt("gclass_name undefined") : Rt("gclass undefined");
|
|
355
356
|
})(c, e);
|
|
356
357
|
const f = n.length;
|
|
357
358
|
for (let e = 0; e < f; e++) {
|
|
358
359
|
let t = n[e][0], r = n[e][1];
|
|
359
|
-
if (
|
|
360
|
-
if (
|
|
360
|
+
if (rn(t)) continue;
|
|
361
|
+
if (B(c, t) < 0) return K(c), null;
|
|
361
362
|
const i = r.length;
|
|
362
363
|
for (let e = 0; e < i; e++) {
|
|
363
364
|
let n = r[e][0], i = r[e][1], o = r[e][2];
|
|
364
|
-
|
|
365
|
+
rn(n) || J(c, t, n, i, o);
|
|
365
366
|
}
|
|
366
367
|
}
|
|
367
368
|
for (let e = 0; e < t.length; e++) {
|
|
368
369
|
let n = t[e][0], r = t[e][1];
|
|
369
|
-
if (!
|
|
370
|
-
if (
|
|
371
|
-
|
|
370
|
+
if (!rn(n)) {
|
|
371
|
+
if (q(c, n)) return Rt(`SMachine: event repeated in input_events: ${n}`), K(c), null;
|
|
372
|
+
Q(c, n, r);
|
|
372
373
|
}
|
|
373
374
|
}
|
|
374
375
|
if (!c.fsm_checked) {
|
|
375
|
-
if (
|
|
376
|
+
if (H(c) < 0) return K(c), null;
|
|
376
377
|
c.fsm_checked = !0;
|
|
377
378
|
}
|
|
378
379
|
return c;
|
|
379
380
|
}
|
|
380
|
-
function
|
|
381
|
+
function K(e) {
|
|
381
382
|
let t;
|
|
382
|
-
if (
|
|
383
|
+
if (Ht(e)) t = e;
|
|
383
384
|
else {
|
|
384
|
-
if (!(e instanceof S)) return
|
|
385
|
+
if (!(e instanceof S)) return Rt("Cannot unregister gclass, type unknown"), -1;
|
|
385
386
|
t = e.gclass_name;
|
|
386
387
|
}
|
|
387
388
|
let n = d[t];
|
|
388
|
-
return n ? n.instances > 0 ? (
|
|
389
|
+
return n ? n.instances > 0 ? (Rt(`Cannot unregister gclass, instances in use: ${t}`), -1) : (delete d[t], 0) : (Rt(`Cannot unregister gclass, not found: ${t}`), -1);
|
|
389
390
|
}
|
|
390
|
-
function
|
|
391
|
+
function x(e, t) {
|
|
391
392
|
const n = e.dl_states.length, r = e.dl_states;
|
|
392
393
|
for (let e = 0; e < n; e++) {
|
|
393
394
|
let n = r[e];
|
|
@@ -395,7 +396,7 @@
|
|
|
395
396
|
}
|
|
396
397
|
return null;
|
|
397
398
|
}
|
|
398
|
-
function
|
|
399
|
+
function Y(e, t) {
|
|
399
400
|
const n = e.dl_actions.length, r = e.dl_actions;
|
|
400
401
|
for (let e = 0; e < n; e++) {
|
|
401
402
|
let n = r[e];
|
|
@@ -403,23 +404,23 @@
|
|
|
403
404
|
}
|
|
404
405
|
return null;
|
|
405
406
|
}
|
|
406
|
-
function
|
|
407
|
-
return e instanceof S ?
|
|
408
|
-
}
|
|
409
|
-
function B(e, t, n, r, i) {
|
|
410
|
-
if (!(e instanceof S)) return Ot("Cannot add state, typeof not GClass"), -1;
|
|
411
|
-
if (Zt(t)) return Ot("state_name EMPTY"), -1;
|
|
412
|
-
let o = K(e, t);
|
|
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);
|
|
407
|
+
function B(e, t) {
|
|
408
|
+
return e instanceof S ? x(e, t) ? (Rt(`state already exists: ${t}`), -1) : (e.dl_states.push(new A(t)), 0) : (Rt("Cannot add state, typeof not GClass"), -1);
|
|
414
409
|
}
|
|
415
|
-
function J(e, t, n) {
|
|
416
|
-
|
|
410
|
+
function J(e, t, n, r, i) {
|
|
411
|
+
if (!(e instanceof S)) return Rt("Cannot add state, typeof not GClass"), -1;
|
|
412
|
+
if (rn(t)) return Rt("state_name EMPTY"), -1;
|
|
413
|
+
let o = x(e, t);
|
|
414
|
+
return o ? Y(o, n) ? (Rt(`event already exists: gclass ${e.gclass_name}, state ${t}, event ${n}`), -1) : (o.dl_actions.push(new $(n, r, i)), 0) : (Rt(`state not found: ${t}`), -1);
|
|
417
415
|
}
|
|
418
416
|
function z(e, t, n) {
|
|
419
|
-
|
|
417
|
+
rn(t) || e.push(new I(t, n));
|
|
420
418
|
}
|
|
421
|
-
function Q(e, t) {
|
|
422
|
-
|
|
419
|
+
function Q(e, t, n) {
|
|
420
|
+
return e instanceof S ? z(e.dl_events, t, n) : (Rt("Cannot add state, typeof not GClass"), -1);
|
|
421
|
+
}
|
|
422
|
+
function q(e, t) {
|
|
423
|
+
if (!(e instanceof S)) return Rt("Cannot add state, typeof not GClass"), 0;
|
|
423
424
|
const n = e.dl_events.length, r = e.dl_events;
|
|
424
425
|
for (let e = 0; e < n; e++) {
|
|
425
426
|
let n = r[e];
|
|
@@ -427,232 +428,232 @@
|
|
|
427
428
|
}
|
|
428
429
|
return null;
|
|
429
430
|
}
|
|
430
|
-
function
|
|
431
|
-
if (!(e instanceof S)) return
|
|
431
|
+
function H(e) {
|
|
432
|
+
if (!(e instanceof S)) return Rt("Cannot add state, typeof not GClass"), -1;
|
|
432
433
|
let t = 0;
|
|
433
|
-
|
|
434
|
+
Jt(e.dl_states) || (Rt(`GClass without states: ${e.gclass_name}`), t += -1);
|
|
434
435
|
for (let n = 0; n < e.dl_states.length; n++) {
|
|
435
436
|
let r = e.dl_states[n];
|
|
436
|
-
if (!
|
|
437
|
+
if (!rn(r.state_name)) for (let n = 0; n < r.dl_actions.length; n++) {
|
|
437
438
|
let i = r.dl_actions[n];
|
|
438
|
-
|
|
439
|
+
rn(i.event_name) || (q(e, i.event_name) || (Rt(`SMachine: state's event NOT in input_events: gclass ${e.gclass_name}, state ${r.state_name}, event ${i.event_name}`), t += -1), i.next_state && (x(e, i.next_state) || (Rt(`SMachine: next state NOT in state names: gclass ${e.gclass_name}, state ${r.state_name}, next_state ${i.next_state}`), t += -1)));
|
|
439
440
|
}
|
|
440
441
|
}
|
|
441
442
|
for (let n = 0; n < e.dl_events.length; n++) {
|
|
442
443
|
let r = e.dl_events[n];
|
|
443
|
-
if (!
|
|
444
|
+
if (!rn(r.event_name) && (Xt(r.event_flag) || (Rt(`SMachine: event flag is NOT number: gclass ${e.gclass_name}, event ${r.event_name}`), t += -1), !(r.event_flag & R.EVF_OUTPUT_EVENT))) {
|
|
444
445
|
let n = !1;
|
|
445
446
|
for (let t = 0; t < e.dl_states.length; t++) {
|
|
446
447
|
let i = e.dl_states[t];
|
|
447
|
-
|
|
448
|
+
rn(i.state_name) || Y(i, r.event_name) && (n = !0);
|
|
448
449
|
}
|
|
449
|
-
n || (
|
|
450
|
+
n || (Rt(`SMachine: input_list's event NOT in state: gclass ${e.gclass_name}, event ${r.event_name}`), t += -1);
|
|
450
451
|
}
|
|
451
452
|
}
|
|
452
453
|
return t;
|
|
453
454
|
}
|
|
454
|
-
function
|
|
455
|
+
function X(e, t) {
|
|
455
456
|
let n = null;
|
|
456
457
|
try {
|
|
457
458
|
n = d[e];
|
|
458
459
|
} catch (e) {}
|
|
459
|
-
return n || t &&
|
|
460
|
+
return n || t && Rt(`gclass not found: ${e}`), n;
|
|
460
461
|
}
|
|
461
|
-
function
|
|
462
|
+
function Z() {
|
|
462
463
|
return !m || m.obflag & D.obflag_destroyed ? null : m;
|
|
463
464
|
}
|
|
464
|
-
function
|
|
465
|
+
function ee(e, t) {
|
|
465
466
|
e = e.toLowerCase();
|
|
466
467
|
let n = b[e];
|
|
467
|
-
return !n && t ? (
|
|
468
|
-
}
|
|
469
|
-
function ee(e) {
|
|
470
|
-
let t = Se(e);
|
|
471
|
-
return t = t.toLowerCase(), b[t] && Ot(`service ALREADY REGISTERED: ${t}. Will be UPDATED`), b[t] = e, 0;
|
|
468
|
+
return !n && t ? (Rt(`gobj service not found: ${e}`), null) : n;
|
|
472
469
|
}
|
|
473
|
-
function te(e
|
|
474
|
-
t
|
|
470
|
+
function te(e) {
|
|
471
|
+
let t = Oe(e);
|
|
472
|
+
return t = t.toLowerCase(), b[t] && Rt(`service ALREADY REGISTERED: ${t}. Will be UPDATED`), b[t] = e, 0;
|
|
475
473
|
}
|
|
476
474
|
function ne(e, t) {
|
|
477
|
-
|
|
478
|
-
n >= 0 && (Wt(e.dl_children, n), t.parent = null);
|
|
475
|
+
t.parent && Rt(`_add_child() ALREADY HAS PARENT: ${t.gobj_name}`), e.dl_children.push(t), t.parent = e;
|
|
479
476
|
}
|
|
480
477
|
function re(e, t) {
|
|
481
|
-
|
|
478
|
+
let n = xn(e.dl_children, t);
|
|
479
|
+
n >= 0 && (Yt(e.dl_children, n), t.parent = null);
|
|
482
480
|
}
|
|
483
|
-
function ie(e, t
|
|
481
|
+
function ie(e, t) {
|
|
482
|
+
"__json_config_variables__" !== t && Rt(`GClass Attribute NOT FOUND: ${we(e)}, attr ${t}`);
|
|
483
|
+
}
|
|
484
|
+
function oe(e, t, n) {
|
|
484
485
|
let r = t;
|
|
485
486
|
(function(e, t, n, r, i) {
|
|
486
|
-
if (!e || !t) return
|
|
487
|
+
if (!e || !t) return Rt("hsdata or kw NULL"), -1;
|
|
487
488
|
let o = 0;
|
|
488
489
|
for (const [l, s] of Object.entries(t)) {
|
|
489
|
-
const t =
|
|
490
|
-
t ? (-1 === n || t.flag & n) && (t.flag &
|
|
490
|
+
const t = W(i.gclass, l, !1);
|
|
491
|
+
t ? (-1 === n || t.flag & n) && (t.flag & y.SDF_DEPRECATED && kt(`${we(i)}: Deprecated attribute used in gobj creation: ${l}`), o += F(i, e, t, s)) : r && (r(i, l), o--);
|
|
491
492
|
}
|
|
492
493
|
return o;
|
|
493
|
-
})(
|
|
494
|
+
})(G(e), r, -1, e.gclass.gclass_flag & N.gcflag_ignore_unknown_attrs ? 0 : ie, e) < 0 && (Rt(`${we(e)} json2data() FAILED`), It(r));
|
|
494
495
|
}
|
|
495
|
-
function
|
|
496
|
+
function le(e, t, r, i, o) {
|
|
496
497
|
if (o & w.gobj_flag_yuno) {
|
|
497
|
-
if (p) return
|
|
498
|
+
if (p) return Rt("__yuno__ already created"), null;
|
|
498
499
|
o |= w.gobj_flag_service;
|
|
499
500
|
} else {
|
|
500
|
-
if (!i) return
|
|
501
|
-
if (!("string" == typeof i || i instanceof O)) return
|
|
502
|
-
if (
|
|
501
|
+
if (!i) return Rt("gobj NEEDS a parent!"), null;
|
|
502
|
+
if (!("string" == typeof i || i instanceof O)) return Rt(`BAD TYPE of parent: ${i}`), null;
|
|
503
|
+
if (Ht(i) && !(i = ee(i))) return kt(`parent service not found: ${i}`), null;
|
|
503
504
|
}
|
|
504
|
-
if (o & w.gobj_flag_service &&
|
|
505
|
+
if (o & w.gobj_flag_service && ee(e, !1)) return Rt(`service ALREADY registered: ${t}^${e}`), null;
|
|
505
506
|
if (o & w.gobj_flag_default_service) {
|
|
506
|
-
if (m) return
|
|
507
|
+
if (m) return Rt(`default service ALREADY registered: ${t}^${e}`), null;
|
|
507
508
|
o |= w.gobj_flag_service;
|
|
508
509
|
}
|
|
509
|
-
if (
|
|
510
|
-
let l =
|
|
511
|
-
if (!l) return
|
|
512
|
-
if (!
|
|
513
|
-
if (!
|
|
514
|
-
if (e.includes("`")) return
|
|
515
|
-
if (e.includes("^")) return
|
|
510
|
+
if (rn(t)) return Rt("gclass_name must be a string"), null;
|
|
511
|
+
let l = X(t, !1);
|
|
512
|
+
if (!l) return Rt(`GClass not registered: ${t}^${e}`), null;
|
|
513
|
+
if (!Ht(e)) return Rt(`gobj_name must be a string: ${t}`), null;
|
|
514
|
+
if (!rn(e)) {
|
|
515
|
+
if (e.includes("`")) return Rt(`gobj_name cannot contain char ': ${t}^${e}`), null;
|
|
516
|
+
if (e.includes("^")) return Rt(`gobj_name cannot contain char ^: ${t}^${e}`), null;
|
|
516
517
|
}
|
|
517
518
|
let _ = new O(e, l, r, i, o);
|
|
518
|
-
_.jn_attrs =
|
|
519
|
+
_.jn_attrs = U(_, l.attrs_table);
|
|
519
520
|
for (const [e, t] of Object.entries(_.jn_attrs)) e in _.priv && (_.priv[e] = t);
|
|
520
|
-
let a = p &&
|
|
521
|
-
return a &&
|
|
522
|
-
}
|
|
523
|
-
function
|
|
524
|
-
return
|
|
525
|
-
}
|
|
526
|
-
function
|
|
527
|
-
if (
|
|
528
|
-
e.__refs__ > 0 &&
|
|
529
|
-
let t = p &&
|
|
530
|
-
t &&
|
|
531
|
-
let r =
|
|
532
|
-
r && r.gclass.gmt.mt_child_removed && (t &&
|
|
533
|
-
let t =
|
|
534
|
-
t = t.toLowerCase(), b[t] ? delete b[t] :
|
|
535
|
-
}(e), e.playing && (
|
|
521
|
+
let a = p && Je(p, "trace_creation");
|
|
522
|
+
return a && P(n("💙💙⏩ creating: %s^%s", l.gclass_name, e)), _.gobj_flag & w.gobj_flag_service && te(_), _.gobj_flag & w.gobj_flag_yuno && (p = _), _.gobj_flag & w.gobj_flag_default_service && (m = _), _.gobj_flag & w.gobj_flag_yuno || ne(i, _), _.obflag |= D.obflag_created, _.gclass.instances++, oe(_, r), _.gobj_flag & w.gobj_flag_service && s && s(_, null), _.gclass.gmt.mt_create2 ? _.gclass.gmt.mt_create2(_, r) : _.gclass.gmt.mt_create && _.gclass.gmt.mt_create(_), i && i.gclass.gmt.mt_child_added && (a && P(n("👦👦🔵 child_added(%s): %s", De(i), we(_))), i.gclass.gmt.mt_child_added(i, _)), a && P(n("💙💙⏪ created: %s", De(_))), _;
|
|
523
|
+
}
|
|
524
|
+
function se(e, t, n, r) {
|
|
525
|
+
return le(e, t, n, r, w.gobj_flag_pure_child);
|
|
526
|
+
}
|
|
527
|
+
function _e(e) {
|
|
528
|
+
if (Ae(e)) return void Rt("gobj NULL or DESTROYED");
|
|
529
|
+
e.__refs__ > 0 && Rt(`${we(e)}: gobj DESTROYING with references: ${e.__refs__}`), e.obflag |= D.obflag_destroying;
|
|
530
|
+
let t = p && Je(p, "trace_creation");
|
|
531
|
+
t && P(n("💔💔⏩ destroying: %s", De(e)));
|
|
532
|
+
let r = Re(e);
|
|
533
|
+
r && r.gclass.gmt.mt_child_removed && (t && P(n("👦👦🔴 child_removed(%s): %s", De(r), we(e))), r.gclass.gmt.mt_child_removed(r, e)), e.gobj_flag & w.gobj_flag_service && function(e) {
|
|
534
|
+
let t = Oe(e);
|
|
535
|
+
t = t.toLowerCase(), b[t] ? delete b[t] : Rt(`"service NOT found in register": ${t}`);
|
|
536
|
+
}(e), e.playing && (Rt(`Destroying a PLAYING gobj: ${De(e)}`), pe(e)), e.running && (Rt(`Destroying a RUNNING gobj: ${De(e)}`), fe(e)), dt(e, e.dl_subscriptions, !0), dt(e, e.dl_subscribings, !0), r && (re(r, e), ke(e) && (Ie(r) !== e || Ae(r) || Le(r, null))), function(e) {
|
|
536
537
|
let t = e.dl_children.slice();
|
|
537
538
|
for (let e = 0; e < t.length; e++) {
|
|
538
539
|
let n = t[e];
|
|
539
|
-
|
|
540
|
+
Ae(n) || _e(n);
|
|
540
541
|
}
|
|
541
|
-
}(e), e.obflag & D.obflag_created && e.gclass.gmt.mt_destroy && e.gclass.gmt.mt_destroy(e), t &&
|
|
542
|
+
}(e), e.obflag & D.obflag_created && e.gclass.gmt.mt_destroy && e.gclass.gmt.mt_destroy(e), t && P(n("💔💔⏪ destroyed: %s", De(e))), e.obflag |= D.obflag_destroyed, e.obflag & D.obflag_created && e.gclass.instances--;
|
|
542
543
|
}
|
|
543
|
-
function
|
|
544
|
-
if (
|
|
545
|
-
if (e.running) return
|
|
546
|
-
if (e.disabled) return
|
|
547
|
-
p &&
|
|
544
|
+
function ae(e) {
|
|
545
|
+
if (Ae(e)) return Rt("gobj NULL or DESTROYED"), -1;
|
|
546
|
+
if (e.running) return Rt(`${we(e)}: GObj ALREADY RUNNING`), -1;
|
|
547
|
+
if (e.disabled) return Rt(`${we(e)}: GObj DISABLED`), -1;
|
|
548
|
+
p && Je(p, "trace_start_stop") && P(n("⏺ ⏺ start: %s", De(e))), e.running = !0;
|
|
548
549
|
let t = 0;
|
|
549
550
|
return e.gclass.gmt.mt_start && (t = e.gclass.gmt.mt_start(e)), t;
|
|
550
551
|
}
|
|
551
|
-
function ae(e, t, n) {
|
|
552
|
-
return e.gclass.gclass_flag & N.gcflag_manual_start || $e(e) || pe(e) || me(e) || _e(e), 0;
|
|
553
|
-
}
|
|
554
552
|
function ue(e, t, n) {
|
|
555
|
-
return e.gclass.gclass_flag & N.gcflag_manual_start ||
|
|
553
|
+
return e.gclass.gclass_flag & N.gcflag_manual_start || Ae(e) || me(e) || he(e) || ae(e), 0;
|
|
554
|
+
}
|
|
555
|
+
function ce(e, t, n) {
|
|
556
|
+
return e.gclass.gclass_flag & N.gcflag_manual_start || he(e) ? 1 : (me(e) || ae(e), 0);
|
|
556
557
|
}
|
|
557
|
-
function
|
|
558
|
-
if (
|
|
559
|
-
if (!e.running) return
|
|
560
|
-
e.playing && (
|
|
558
|
+
function fe(e) {
|
|
559
|
+
if (Ae(e)) return Rt("gobj NULL or DESTROYED"), -1;
|
|
560
|
+
if (!e.running) return Rt(`${we(e)}: GObj NOT RUNNING`), -1;
|
|
561
|
+
e.playing && (kt(`${we(e)}: GObj stopping without previous pause`), pe(e)), p && Je(p, "trace_start_stop") && P(n("⏹ ⏹ stop: %s", De(e))), e.running = !1;
|
|
561
562
|
let t = 0;
|
|
562
563
|
return e.gclass.gmt.mt_stop && (t = e.gclass.gmt.mt_stop(e)), t;
|
|
563
564
|
}
|
|
564
|
-
function
|
|
565
|
-
return
|
|
566
|
-
}
|
|
567
|
-
function ge(e) {
|
|
568
|
-
return $e(e) ? (Ot("gobj NULL or DESTROYED"), -1) : Pe(e, k.WALK_FIRST2LAST, fe, 0, 0);
|
|
565
|
+
function ge(e, t, n) {
|
|
566
|
+
return me(e) && fe(e), 0;
|
|
569
567
|
}
|
|
570
568
|
function de(e) {
|
|
571
|
-
|
|
572
|
-
if (e.playing) return Ot(`${Ne(e)}: GObj ALREADY PLAYING`), -1;
|
|
573
|
-
if (e.disabled) return Ot(`${Ne(e)}: GObj DISABLED`), -1;
|
|
574
|
-
if (!pe(e)) {
|
|
575
|
-
if (e.gclass.gclass_flag & N.gcflag_required_start_to_play) return Ot(`${Ne(e)}: Cannot play, start not done`), -1;
|
|
576
|
-
Nt(`${Ne(e)}: GObj playing without previous start`), _e(e);
|
|
577
|
-
}
|
|
578
|
-
p && Be(p, "trace_start_stop") && L(n("⏯ ⏯ play: %s", we(e))), e.playing = !0;
|
|
579
|
-
let t = 0;
|
|
580
|
-
return e.gclass.gmt.mt_play && (t = e.gclass.gmt.mt_play(e), t < 0 && (e.playing = !1)), t;
|
|
569
|
+
return Ae(e) ? (Rt("gobj NULL or DESTROYED"), -1) : Ue(e, k.WALK_FIRST2LAST, ge, 0, 0);
|
|
581
570
|
}
|
|
582
571
|
function be(e) {
|
|
583
|
-
|
|
572
|
+
if (Ae(e)) return Rt(`gobj NULL or DESTROYED: ${we(e)}`), -1;
|
|
573
|
+
if (e.playing) return Rt(`${we(e)}: GObj ALREADY PLAYING`), -1;
|
|
574
|
+
if (e.disabled) return Rt(`${we(e)}: GObj DISABLED`), -1;
|
|
575
|
+
if (!me(e)) {
|
|
576
|
+
if (e.gclass.gclass_flag & N.gcflag_required_start_to_play) return Rt(`${we(e)}: Cannot play, start not done`), -1;
|
|
577
|
+
kt(`${we(e)}: GObj playing without previous start`), ae(e);
|
|
578
|
+
}
|
|
579
|
+
p && Je(p, "trace_start_stop") && P(n("⏯ ⏯ play: %s", De(e))), e.playing = !0;
|
|
580
|
+
let t = 0;
|
|
581
|
+
return e.gclass.gmt.mt_play && (t = e.gclass.gmt.mt_play(e), t < 0 && (e.playing = !1)), t;
|
|
584
582
|
}
|
|
585
583
|
function pe(e) {
|
|
586
|
-
return
|
|
584
|
+
return Ae(e) ? (Rt("gobj NULL or DESTROYED"), -1) : e.playing ? (p && Je(p, "trace_start_stop") && P(n("⏸ ⏸ pause: %s", De(e))), e.playing = !1, e.gclass.gmt.mt_pause ? e.gclass.gmt.mt_pause(e) : 0) : (Rt(`${we(e)}: GObj NOT PLAYING`), -1);
|
|
587
585
|
}
|
|
588
586
|
function me(e) {
|
|
589
|
-
return
|
|
587
|
+
return !Ae(e) && e.running;
|
|
590
588
|
}
|
|
591
589
|
function he(e) {
|
|
592
|
-
return !!(e
|
|
590
|
+
return !!Ae(e) || e.disabled;
|
|
593
591
|
}
|
|
594
592
|
function Ee(e) {
|
|
595
|
-
return
|
|
593
|
+
return !!(e && e.gobj_flag & w.gobj_flag_service);
|
|
594
|
+
}
|
|
595
|
+
function ye(e) {
|
|
596
|
+
return !Ae(e) && e.playing;
|
|
596
597
|
}
|
|
597
598
|
function Te() {
|
|
598
599
|
return !p || p.obflag & D.obflag_destroyed ? null : p;
|
|
599
600
|
}
|
|
600
|
-
function ye() {
|
|
601
|
-
let e = Te();
|
|
602
|
-
return e ? Se(e) : "";
|
|
603
|
-
}
|
|
604
601
|
function ve() {
|
|
605
602
|
let e = Te();
|
|
606
|
-
return e ?
|
|
603
|
+
return e ? Oe(e) : "";
|
|
607
604
|
}
|
|
608
605
|
function je() {
|
|
609
606
|
let e = Te();
|
|
610
|
-
return e ?
|
|
607
|
+
return e ? Qe(e, "yuno_role") : "";
|
|
611
608
|
}
|
|
612
|
-
function Se(
|
|
613
|
-
|
|
609
|
+
function Se() {
|
|
610
|
+
let e = Te();
|
|
611
|
+
return e ? Qe(e, "yuno_id") : "";
|
|
614
612
|
}
|
|
615
613
|
function Oe(e) {
|
|
616
|
-
return
|
|
614
|
+
return nn(e) ? e.gobj_name : (Rt("gobj bad type"), null);
|
|
617
615
|
}
|
|
618
616
|
function Ne(e) {
|
|
619
|
-
return
|
|
617
|
+
return nn(e) ? e.gclass.gclass_name : (Rt("gobj NULL of bad type"), null);
|
|
620
618
|
}
|
|
621
619
|
function we(e) {
|
|
622
|
-
|
|
623
|
-
let t = Ne(e), n = De(e);
|
|
624
|
-
for (; n;) t = Ne(n) + "`" + t, n = De(n);
|
|
625
|
-
return t;
|
|
620
|
+
return nn(e) ? e.gclass.gclass_name + "^" + Oe(e) : (Rt("gobj bad type"), null);
|
|
626
621
|
}
|
|
627
622
|
function De(e) {
|
|
628
|
-
|
|
623
|
+
if (!nn(e)) return Rt("gobj NULL of bad type"), null;
|
|
624
|
+
let t = we(e), n = Re(e);
|
|
625
|
+
for (; n;) t = we(n) + "`" + t, n = Re(n);
|
|
626
|
+
return t;
|
|
629
627
|
}
|
|
630
628
|
function Re(e) {
|
|
631
|
-
return
|
|
629
|
+
return nn(e) ? e.parent : (Rt("gobj NULL of bad type"), null);
|
|
632
630
|
}
|
|
633
631
|
function ke(e) {
|
|
634
|
-
return
|
|
632
|
+
return nn(e) ? !!(e.gobj_flag & w.gobj_flag_volatil) : (Rt("gobj NULL of bad type"), null);
|
|
635
633
|
}
|
|
636
634
|
function $e(e) {
|
|
637
|
-
return
|
|
635
|
+
return nn(e) ? !!(e.gobj_flag & w.gobj_flag_pure_child) : (Rt("gobj NULL of bad type"), null);
|
|
638
636
|
}
|
|
639
637
|
function Ae(e) {
|
|
640
|
-
return
|
|
638
|
+
return !nn(e) || !!(e.obflag & (D.obflag_destroyed | D.obflag_destroying));
|
|
641
639
|
}
|
|
642
|
-
function Ie(e
|
|
643
|
-
|
|
644
|
-
e.bottom_gobj && Nt(`${Ne(e)}: bottom_gobj already set`), e.bottom_gobj = t;
|
|
640
|
+
function Ie(e) {
|
|
641
|
+
return nn(e) ? e.bottom_gobj : (Rt("gobj NULL of bad type"), null);
|
|
645
642
|
}
|
|
646
|
-
function Le(e, t
|
|
647
|
-
|
|
643
|
+
function Le(e, t) {
|
|
644
|
+
if (!nn(e)) return Rt("gobj NULL of bad type"), null;
|
|
645
|
+
e.bottom_gobj && kt(`${we(e)}: bottom_gobj already set`), e.bottom_gobj = t;
|
|
648
646
|
}
|
|
649
|
-
function Pe(e, t, n
|
|
650
|
-
return
|
|
647
|
+
function Pe(e, t, n) {
|
|
648
|
+
return nn(e) ? t ? W(e.gclass, t, n) : e.gclass.attrs_table : (Rt("gobj NULL of bad type"), null);
|
|
651
649
|
}
|
|
652
650
|
function Ue(e, t, n, r, i) {
|
|
653
|
-
return
|
|
651
|
+
return Ae(e) ? (Rt("gobj NULL, destroying, or bad type"), 0) : Fe(e.dl_children, t, n, r, i);
|
|
654
652
|
}
|
|
655
653
|
function Ce(e, t, n, r, i) {
|
|
654
|
+
return Ae(e) ? (Rt("gobj NULL, destroying, or bad type"), 0) : Ve(e.dl_children, t, n, r, i);
|
|
655
|
+
}
|
|
656
|
+
function Fe(e, t, n, r, i) {
|
|
656
657
|
let o, l = [...e];
|
|
657
658
|
if (t & k.WALK_LAST2FIRST) for (let e = l.length; e > 0; e--) {
|
|
658
659
|
o = l[e - 1];
|
|
@@ -666,149 +667,149 @@
|
|
|
666
667
|
}
|
|
667
668
|
return 0;
|
|
668
669
|
}
|
|
669
|
-
function
|
|
670
|
-
let o, l =
|
|
670
|
+
function Ge(e, t, n, r, i) {
|
|
671
|
+
let o, l = Fe(e, t, n, r, i);
|
|
671
672
|
if (l < 0) return l;
|
|
672
673
|
if (t & k.WALK_LAST2FIRST) {
|
|
673
|
-
for (let s = e.length; s > 0; s--) if (o = e[s - 1], l =
|
|
674
|
-
} else for (let s = 0; s < e.length; s++) if (o = e[s], l =
|
|
674
|
+
for (let s = e.length; s > 0; s--) if (o = e[s - 1], l = Ge([...o.dl_children], t, n, r, i), l < 0) return l;
|
|
675
|
+
} else for (let s = 0; s < e.length; s++) if (o = e[s], l = Ge([...o.dl_children], t, n, r, i), l < 0) return l;
|
|
675
676
|
return l;
|
|
676
677
|
}
|
|
677
|
-
function
|
|
678
|
-
if (t & k.WALK_BYLEVEL) return
|
|
678
|
+
function Ve(e, t, n, r, i) {
|
|
679
|
+
if (t & k.WALK_BYLEVEL) return Ge(e, t, n, r, i);
|
|
679
680
|
let o, l;
|
|
680
681
|
if (t & k.WALK_BOTTOM2TOP) for (let s = e.length; s > 0; s--) {
|
|
681
|
-
if (l = e[s - 1], o =
|
|
682
|
+
if (l = e[s - 1], o = Ve([...l.dl_children], t, n, r, i), o < 0) return o;
|
|
682
683
|
if (o = n(l, r, i), o < 0) return o;
|
|
683
684
|
}
|
|
684
685
|
else for (let s = 0; s < e.length; s++) {
|
|
685
686
|
if (l = e[s], o = n(l, r, i), o < 0) return o;
|
|
686
|
-
if (0 === o && (o =
|
|
687
|
+
if (0 === o && (o = Ve([...l.dl_children], t, n, r, i), o < 0)) return o;
|
|
687
688
|
}
|
|
688
689
|
return 0;
|
|
689
690
|
}
|
|
690
|
-
function
|
|
691
|
-
if (!
|
|
691
|
+
function We(e, t) {
|
|
692
|
+
if (!nn(e)) return Rt("gobj NULL of bad type"), !1;
|
|
692
693
|
let n = t.__gclass_name__, r = t.__gobj_name__, i = t.__prefix_gobj_name__;
|
|
693
694
|
t.__disabled__;
|
|
694
695
|
let o = t.__state__;
|
|
695
|
-
if (n && n !==
|
|
696
|
-
if (r && r !==
|
|
696
|
+
if (n && n !== Ne(e)) return !1;
|
|
697
|
+
if (r && r !== Oe(e)) return !1;
|
|
697
698
|
if (i) {
|
|
698
699
|
let t = i.length;
|
|
699
|
-
if (i !==
|
|
700
|
+
if (i !== Oe(e).substring(0, t)) return !1;
|
|
700
701
|
}
|
|
701
|
-
if (o && o !==
|
|
702
|
+
if (o && o !== nt(e)) return !1;
|
|
702
703
|
let l = e.jn_attrs;
|
|
703
|
-
for (const n of Object.keys(t)) if ("__gclass_name__" !== n && "__gobj_name__" !== n && "__prefix_gobj_name__" !== n && "__disabled__" !== n && "__state__" !== n &&
|
|
704
|
+
for (const n of Object.keys(t)) if ("__gclass_name__" !== n && "__gobj_name__" !== n && "__prefix_gobj_name__" !== n && "__disabled__" !== n && "__state__" !== n && xe(e, n) && l[n] !== t[n]) return !1;
|
|
704
705
|
return !0;
|
|
705
706
|
}
|
|
706
|
-
function
|
|
707
|
-
if (
|
|
707
|
+
function Me(e, t) {
|
|
708
|
+
if (Ae(e)) return Rt("gobj NULL or DESTROYED"), null;
|
|
708
709
|
const n = e.dl_children;
|
|
709
710
|
for (let e = 0; e < n.length; e++) {
|
|
710
711
|
const r = n[e];
|
|
711
|
-
if (
|
|
712
|
+
if (We(r, t)) return r;
|
|
712
713
|
}
|
|
713
714
|
return null;
|
|
714
715
|
}
|
|
715
|
-
function
|
|
716
|
+
function Ke(e, t) {
|
|
716
717
|
if (!t) return null;
|
|
717
718
|
let n = t.split("`");
|
|
718
719
|
if (!function(e, t) {
|
|
719
720
|
let n = t.split("^"), r = null, i = null;
|
|
720
721
|
if (2 === n.length) {
|
|
721
|
-
if (i = n[0], r = n[1], i !==
|
|
722
|
+
if (i = n[0], r = n[1], i !== Ne(e)) return !1;
|
|
722
723
|
} else {
|
|
723
724
|
if (1 !== n.length) return !1;
|
|
724
725
|
r = n[0];
|
|
725
726
|
}
|
|
726
|
-
return r ===
|
|
727
|
+
return r === Oe(e);
|
|
727
728
|
}(e, n[0])) return null;
|
|
728
729
|
if (1 === n.length) return e;
|
|
729
730
|
let r = n[1].split("^"), i = {};
|
|
730
731
|
1 === r.length ? i.__gobj_name__ = r : (i.__gclass_name__ = r[0], i.__gobj_name__ = r[1]);
|
|
731
|
-
let o =
|
|
732
|
-
return o ? (n.splice(0, 1), n = n.join("`"),
|
|
732
|
+
let o = Me(e, i);
|
|
733
|
+
return o ? (n.splice(0, 1), n = n.join("`"), Ke(o, n)) : null;
|
|
733
734
|
}
|
|
734
|
-
function
|
|
735
|
-
return !
|
|
735
|
+
function xe(e, t) {
|
|
736
|
+
return !rn(t) && !!W(e.gclass, t, !1);
|
|
736
737
|
}
|
|
737
|
-
function
|
|
738
|
+
function Ye(e, t, n) {
|
|
738
739
|
let r = e.jn_attrs;
|
|
739
740
|
if (t in r && r.hasOwnProperty(t)) {
|
|
740
741
|
let n = r[t];
|
|
741
742
|
return e.gclass.gmt.mt_reading ? e.gclass.gmt.mt_reading(e, t, n) : n;
|
|
742
743
|
}
|
|
743
|
-
return
|
|
744
|
+
return Rt(`${we(e)}: GClass Attribute NOT FOUND, attr ${t}`), null;
|
|
744
745
|
}
|
|
745
|
-
function
|
|
746
|
+
function Be(e, t, n) {
|
|
746
747
|
let r = {}, i = e.gclass.attrs_table;
|
|
747
748
|
for (let n = 0; n < i.length; n++) {
|
|
748
749
|
const o = i[n];
|
|
749
750
|
if (o.name && (-1 === t || o.flag & t)) {
|
|
750
751
|
let t;
|
|
751
|
-
!e.gclass.gmt.mt_reading || e.obflag & D.obflag_destroyed ? t =
|
|
752
|
+
!e.gclass.gmt.mt_reading || e.obflag & D.obflag_destroyed ? t = Gt(e.jn_attrs, o.name) : (t = e.gclass.gmt.mt_reading(e, o.name), void 0 === t && (t = Gt(e.jn_attrs, o.name))), Wt(r, o.name, t);
|
|
752
753
|
}
|
|
753
754
|
}
|
|
754
755
|
return r;
|
|
755
756
|
}
|
|
756
|
-
function
|
|
757
|
+
function Je(e, t) {
|
|
757
758
|
if (t) {
|
|
758
|
-
if (0 ===
|
|
759
|
-
if (0 ===
|
|
760
|
-
if (0 ===
|
|
761
|
-
if (0 ===
|
|
759
|
+
if (0 === sn(t, "__disabled__")) return he(e);
|
|
760
|
+
if (0 === sn(t, "__running__")) return me(e);
|
|
761
|
+
if (0 === sn(t, "__playing__")) return ye(e);
|
|
762
|
+
if (0 === sn(t, "__service__")) return Ee(e);
|
|
762
763
|
}
|
|
763
|
-
let n =
|
|
764
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag & D.obflag_destroyed ?
|
|
765
|
-
}
|
|
766
|
-
function Je(e, t) {
|
|
767
|
-
t && nn(t, "__trace_level__");
|
|
768
|
-
let n = G(e, t, !1);
|
|
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);
|
|
764
|
+
let n = V(e, t, !1);
|
|
765
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & D.obflag_destroyed ? Gt(n, t) : e.gclass.gmt.mt_reading(e, t) : (Rt(`${we(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
770
766
|
}
|
|
771
767
|
function ze(e, t) {
|
|
772
|
-
|
|
773
|
-
let n =
|
|
774
|
-
return n ? !e.gclass.gmt.mt_reading || e.obflag & D.obflag_destroyed ?
|
|
768
|
+
t && sn(t, "__trace_level__");
|
|
769
|
+
let n = V(e, t, !1);
|
|
770
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & D.obflag_destroyed ? Gt(n, t) : e.gclass.gmt.mt_reading(e, t) : (Rt(`${we(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
775
771
|
}
|
|
776
772
|
function Qe(e, t) {
|
|
777
|
-
|
|
778
|
-
|
|
773
|
+
if (t && 0 === sn(t, "__state__")) return nt(e);
|
|
774
|
+
let n = V(e, t, !1);
|
|
775
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & D.obflag_destroyed ? Gt(n, t) : e.gclass.gmt.mt_reading(e, t) : (Rt(`${we(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
779
776
|
}
|
|
780
|
-
function qe(e, t
|
|
781
|
-
let
|
|
777
|
+
function qe(e, t) {
|
|
778
|
+
let n = V(e, t, !1);
|
|
779
|
+
return n ? !e.gclass.gmt.mt_reading || e.obflag & D.obflag_destroyed ? Gt(n, t) : e.gclass.gmt.mt_reading(e, t) : (Rt(`${we(e)}: GClass Attribute NOT FOUND, attr ${t}`), 0);
|
|
780
|
+
}
|
|
781
|
+
function He(e, t, n, r) {
|
|
782
|
+
let i = G(e), o = 0;
|
|
782
783
|
for (const [r, l] of Object.entries(t)) {
|
|
783
|
-
let t =
|
|
784
|
-
t && (-1 === n || t.flag & n) && (o +=
|
|
784
|
+
let t = Pe(e, r, !0);
|
|
785
|
+
t && (-1 === n || t.flag & n) && (o += F(e, i, t, l));
|
|
785
786
|
}
|
|
786
787
|
return o;
|
|
787
788
|
}
|
|
788
|
-
function He(e, t, n) {
|
|
789
|
-
let r = G(e, t, !1);
|
|
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);
|
|
791
|
-
}
|
|
792
789
|
function Xe(e, t, n) {
|
|
793
|
-
let r =
|
|
794
|
-
return r ? (r[t] =
|
|
790
|
+
let r = V(e, t, !1);
|
|
791
|
+
return r ? (r[t] = on(n), Qt(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) : (Rt(`${we(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
795
792
|
}
|
|
796
793
|
function Ze(e, t, n) {
|
|
797
|
-
let r =
|
|
798
|
-
return r ? (r[t] =
|
|
794
|
+
let r = V(e, t, !1);
|
|
795
|
+
return r ? (r[t] = parseInt(n), Qt(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) : (Rt(`${we(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
796
|
+
}
|
|
797
|
+
function et(e, t, n) {
|
|
798
|
+
let r = V(e, t, !1);
|
|
799
|
+
return r ? (r[t] = String(n), Qt(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) : (Rt(`${we(e)}: GClass Attribute NOT FOUND, attr ${t}`), -1);
|
|
799
800
|
}
|
|
800
|
-
function
|
|
801
|
-
if (
|
|
801
|
+
function tt(e, t) {
|
|
802
|
+
if (Ae(e)) return Rt("gobj NULL or DESTROYED"), null;
|
|
802
803
|
if (e.current_state.state_name === t) return !1;
|
|
803
|
-
let n =
|
|
804
|
-
return n ? (e.last_state = e.current_state, e.current_state = n, !0) : (
|
|
804
|
+
let n = x(e.gclass, t);
|
|
805
|
+
return n ? (e.last_state = e.current_state, e.current_state = n, !0) : (Rt(`${we(e)}: state unknown, state ${t}`), !1);
|
|
805
806
|
}
|
|
806
|
-
function
|
|
807
|
-
return
|
|
807
|
+
function nt(e) {
|
|
808
|
+
return nn(e) ? e.current_state.state_name : (Rt("hgobj NULL"), "");
|
|
808
809
|
}
|
|
809
|
-
function
|
|
810
|
-
if (!
|
|
811
|
-
let r =
|
|
810
|
+
function rt(e, t, n) {
|
|
811
|
+
if (!nn(e)) return Rt("gobj NULL of bad type"), null;
|
|
812
|
+
let r = q(e.gclass, t);
|
|
812
813
|
if (r) return r;
|
|
813
814
|
if (n) {
|
|
814
815
|
const e = g.length, n = g;
|
|
@@ -819,38 +820,42 @@
|
|
|
819
820
|
}
|
|
820
821
|
return null;
|
|
821
822
|
}
|
|
822
|
-
function
|
|
823
|
-
let r =
|
|
823
|
+
function it(e, t, n) {
|
|
824
|
+
let r = rt(e, t, !1);
|
|
824
825
|
return !!r && !(n && !(r.event_flag & n));
|
|
825
826
|
}
|
|
826
|
-
function
|
|
827
|
-
let r =
|
|
827
|
+
function ot(e, t, n) {
|
|
828
|
+
let r = rt(e, t, !1);
|
|
828
829
|
return !!r && !(n && !(r.event_flag & n)) && !!(r.event_flag & R.EVF_OUTPUT_EVENT);
|
|
829
830
|
}
|
|
830
|
-
function
|
|
831
|
-
if (!(e && e instanceof O)) return
|
|
832
|
-
if (e.obflag & (D.obflag_destroyed | D.obflag_destroying)) return
|
|
831
|
+
function lt(e, t, r, i) {
|
|
832
|
+
if (!(e && e instanceof O)) return Rt("gobj dst NULL"), -1;
|
|
833
|
+
if (e.obflag & (D.obflag_destroyed | D.obflag_destroying)) return Rt("gobj dst DESTROYED"), -1;
|
|
833
834
|
let o = e.current_state;
|
|
834
|
-
if (!o) return
|
|
835
|
+
if (!o) return Rt(`${we(e)}: current_state NULL`), -1;
|
|
835
836
|
let l = 0;
|
|
836
|
-
l = p &&
|
|
837
|
-
let s =
|
|
838
|
-
if (!s) return e.gclass.gmt.mt_inject_event ? (h--, l && (
|
|
837
|
+
l = p && ze(p, "tracing"), "C_TIMER" === Ne(i) && (l = p && ze(p, "trace_timer")), h++;
|
|
838
|
+
let s = Y(o, t);
|
|
839
|
+
if (!s) return e.gclass.gmt.mt_inject_event ? (h--, l && (P(n("🔃 mach(%s%s), st: %s, ev: %s, from(%s%s)", e.running ? "" : "!!", we(e), o.state_name, t || "", i && !i.running ? "!!" : "", we(i))), r && l > 1 && Bt(r) && It(r)), e.gclass.gmt.mt_inject_event(e, t, r, i)) : (l && P(n("📛 mach(%s%s^%s), st: %s, ev: %s, 📛📛ERROR Event NOT DEFINED in state📛📛, from(%s%s^%s)", e.running ? "" : "!!", Ne(e), Oe(e), o.state_name, t || "", i && !i.running ? "!!" : "", Ne(i), Oe(i))), Rt(`📛📛 Event NOT DEFINED in state 📛📛: ${we(e)}, ${o.state_name}, ${t}`), h--, -1);
|
|
839
840
|
if (l) {
|
|
840
|
-
|
|
841
|
-
|
|
841
|
+
if (1 === L) P(n("🔄 %s %s%s %s from %s%s", t || "", e.running ? "" : "!!", we(e), o.state_name, i && !i.running ? "!!" : "", we(i)));
|
|
842
|
+
else {
|
|
843
|
+
let r = "";
|
|
844
|
+
s.action && (r = Bn(s.action)), P(n("🔄 mach(%s%s^%s), st: %s, ev: %s%s%s, ac: %s, from(%s%s^%s)", e.running ? "" : "!!", Ne(e), Oe(e), o.state_name, "", t || "", "", r, i && !i.running ? "!!" : "", Ne(i), Oe(i)));
|
|
845
|
+
}
|
|
846
|
+
r && l > 1 && Bt(r) && It(r);
|
|
842
847
|
}
|
|
843
|
-
s.next_state &&
|
|
848
|
+
s.next_state && tt(e, s.next_state);
|
|
844
849
|
let _ = -1;
|
|
845
850
|
try {
|
|
846
851
|
s.action && (_ = s.action(e, t, r, i));
|
|
847
852
|
} finally {}
|
|
848
|
-
return !l || e.obflag & D.obflag_destroyed ||
|
|
853
|
+
return !l || 1 === L || e.obflag & D.obflag_destroyed || P(n("<- mach(%s%s^%s), st: %s, ev: %s, ret: %d", e.running ? "" : "!!", Ne(e), Oe(e), e.current_state.state_name, t || "", Xt(_) ? _ : 0)), h--, _;
|
|
849
854
|
}
|
|
850
|
-
var
|
|
855
|
+
var st = Object.freeze({
|
|
851
856
|
__hard_subscription__: 1,
|
|
852
857
|
__own_event__: 2
|
|
853
|
-
}),
|
|
858
|
+
}), _t = [
|
|
854
859
|
j(E.DTP_POINTER, "publisher", 0, null, "publisher gobj"),
|
|
855
860
|
j(E.DTP_POINTER, "subscriber", 0, null, "subscriber gobj"),
|
|
856
861
|
j(E.DTP_STRING, "event", 0, "", "event name subscribed"),
|
|
@@ -863,48 +868,48 @@
|
|
|
863
868
|
j(E.DTP_STRING, "__service__", 0, "", "subscription service"),
|
|
864
869
|
v()
|
|
865
870
|
];
|
|
866
|
-
function
|
|
867
|
-
let o =
|
|
868
|
-
if (t && t !==
|
|
869
|
-
let t =
|
|
870
|
-
|
|
871
|
+
function at(e, t, n, r, i) {
|
|
872
|
+
let o = mn(t, r, "__config__", null), l = mn(t, r, "__global__", null), s = mn(t, r, "__local__", null), _ = hn(t, r, "__filter__", null), a = !0;
|
|
873
|
+
if (t && t !== pn(null, e, "publisher", null) && (a = !1), i && i !== pn(null, e, "subscriber", null) && (a = !1), n && n !== bn(null, e, "event", "") && (a = !1), zt(o) > 0) {
|
|
874
|
+
let t = mn(null, e, "__config__", null);
|
|
875
|
+
zt(t) > 0 && Pt(t, o) || (a = !1);
|
|
871
876
|
}
|
|
872
|
-
if (
|
|
873
|
-
let t =
|
|
874
|
-
|
|
877
|
+
if (zt(l) > 0) {
|
|
878
|
+
let t = mn(null, e, "__global__", null);
|
|
879
|
+
zt(t) > 0 && Pt(t, l) || (a = !1);
|
|
875
880
|
}
|
|
876
|
-
if (
|
|
877
|
-
let t =
|
|
878
|
-
|
|
881
|
+
if (zt(s) > 0) {
|
|
882
|
+
let t = mn(null, e, "__local__", null);
|
|
883
|
+
zt(t) > 0 && Pt(t, s) || (a = !1);
|
|
879
884
|
}
|
|
880
|
-
if (
|
|
881
|
-
let t =
|
|
882
|
-
|
|
885
|
+
if (zt(_) > 0) {
|
|
886
|
+
let t = hn(null, e, "__filter__", null);
|
|
887
|
+
zt(t) > 0 && Pt(t, _) || (a = !1);
|
|
883
888
|
}
|
|
884
889
|
return a;
|
|
885
890
|
}
|
|
886
|
-
function
|
|
891
|
+
function ut(e, t, n, r, i) {
|
|
887
892
|
let o = [];
|
|
888
893
|
for (let l = 0; l < e.length; l++) {
|
|
889
894
|
let s = e[l];
|
|
890
|
-
|
|
895
|
+
at(s, t, n, r, i) && Kt(o, s);
|
|
891
896
|
}
|
|
892
897
|
return o;
|
|
893
898
|
}
|
|
894
|
-
function
|
|
895
|
-
for (let o = 0; o < e.length; o++) if (
|
|
899
|
+
function ct(e, t, n, r, i) {
|
|
900
|
+
for (let o = 0; o < e.length; o++) if (at(e[o], t, n, r, i)) return o;
|
|
896
901
|
return -1;
|
|
897
902
|
}
|
|
898
|
-
function ct(e, t, r, i) {
|
|
899
|
-
let o = fn(e, t, "publisher", null, mt.KW_REQUIRED), l = fn(e, t, "subscriber", null, mt.KW_REQUIRED), s = cn(e, t, "event", "", mt.KW_REQUIRED);
|
|
900
|
-
if (!!(un(e, t, "subs_flag", null, mt.KW_REQUIRED) & lt.__hard_subscription__) && !r) return -1;
|
|
901
|
-
p && Be(p, "trace_subscriptions") && (L(n("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s'", s || "", Ne(o), Ne(l))), Rt(t)), o.obflag & D.obflag_destroyed || i || o.gclass.gmt.mt_subscription_deleted && o.gclass.gmt.mt_subscription_deleted(o, t);
|
|
902
|
-
let _ = ut(o.dl_subscriptions, o, s, t, l);
|
|
903
|
-
return _ >= 0 ? Wt(o.dl_subscriptions, _) : (Ot(`${Ne(e)}: subscription in publisher not found`), Rt(t)), _ = ut(l.dl_subscribings, o, s, t, l), _ >= 0 ? Wt(l.dl_subscribings, _) : (Ot(`${Ne(e)}: subscription in subscriber not found`), Rt(t)), 0;
|
|
904
|
-
}
|
|
905
903
|
function ft(e, t, r, i) {
|
|
906
|
-
|
|
907
|
-
if (
|
|
904
|
+
let o = pn(e, t, "publisher", null, ht.KW_REQUIRED), l = pn(e, t, "subscriber", null, ht.KW_REQUIRED), s = bn(e, t, "event", "", ht.KW_REQUIRED);
|
|
905
|
+
if (!!(dn(e, t, "subs_flag", null, ht.KW_REQUIRED) & st.__hard_subscription__) && !r) return -1;
|
|
906
|
+
p && Je(p, "trace_subscriptions") && (P(n("💜💜👎 unsubscribing event '%s': publisher %s, subscriber'%s'", s || "", we(o), we(l))), It(t)), o.obflag & D.obflag_destroyed || i || o.gclass.gmt.mt_subscription_deleted && o.gclass.gmt.mt_subscription_deleted(o, t);
|
|
907
|
+
let _ = ct(o.dl_subscriptions, o, s, t, l);
|
|
908
|
+
return _ >= 0 ? Yt(o.dl_subscriptions, _) : (Rt(`${we(e)}: subscription in publisher not found`), It(t)), _ = ct(l.dl_subscribings, o, s, t, l), _ >= 0 ? Yt(l.dl_subscribings, _) : (Rt(`${we(e)}: subscription in subscriber not found`), It(t)), 0;
|
|
909
|
+
}
|
|
910
|
+
function gt(e, t, r, i) {
|
|
911
|
+
if (null == r && (r = {}), !e) return Rt(`publisher NULL: ev ${t}`), 0;
|
|
912
|
+
if (!i) return Rt(`subscriber NULL: ev ${t}`), 0;
|
|
908
913
|
const o = new Set([
|
|
909
914
|
"__config__",
|
|
910
915
|
"__global__",
|
|
@@ -913,52 +918,52 @@
|
|
|
913
918
|
"__service__"
|
|
914
919
|
]);
|
|
915
920
|
if (Object.keys(r).forEach((n) => {
|
|
916
|
-
o.has(n) ||
|
|
917
|
-
}),
|
|
918
|
-
else if (!(
|
|
919
|
-
let l =
|
|
920
|
-
|
|
921
|
+
o.has(n) || Rt(`${we(e)}: key ignored in subscription (key: ${n}, event: ${t})`);
|
|
922
|
+
}), rn(t)) t = "";
|
|
923
|
+
else if (!(ot(e, t, R.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & N.gcflag_no_check_output_events)) return Rt(`event NOT in output event list: ${we(e)}, ${t}`), 0;
|
|
924
|
+
let l = ut(e.dl_subscriptions, e, t, r, i);
|
|
925
|
+
Jt(l) > 0 && (Rt(`${we(e)}: ${Jt(l)} subscription(s) REPEATED, will be deleted and override`), It(l, "subscription REPEATED"), dt(e, l, !1));
|
|
921
926
|
let s = function(e, t, n, r) {
|
|
922
|
-
let i =
|
|
923
|
-
|
|
927
|
+
let i = U(e, _t);
|
|
928
|
+
Mt(i, "event", t), Mt(i, "subscriber", r), Mt(i, "publisher", e);
|
|
924
929
|
let o = 0;
|
|
925
930
|
if (n) {
|
|
926
|
-
let t =
|
|
927
|
-
if (
|
|
928
|
-
let n =
|
|
929
|
-
if (
|
|
930
|
-
let t =
|
|
931
|
-
|
|
931
|
+
let t = mn(e, n, "__config__", null), r = mn(e, n, "__global__", null), l = mn(e, n, "__local__", null), s = hn(e, n, "__filter__", null), _ = bn(e, n, "__service__", "");
|
|
932
|
+
if (zt(r) > 0 && Mt(i, "__global__", Lt(r)), zt(t) > 0) {
|
|
933
|
+
let n = Lt(t);
|
|
934
|
+
if (Mt(i, "__config__", n), un(n, "__hard_subscription__")) {
|
|
935
|
+
let t = gn(e, n, "__hard_subscription__", !1);
|
|
936
|
+
Vt(n, "__hard_subscription__"), t && (o |= st.__hard_subscription__);
|
|
932
937
|
}
|
|
933
|
-
if (
|
|
934
|
-
let t =
|
|
935
|
-
|
|
938
|
+
if (un(n, "__own_event__")) {
|
|
939
|
+
let t = gn(e, n, "__own_event__", !1);
|
|
940
|
+
Vt(n, "__own_event__"), t && (o |= st.__own_event__);
|
|
936
941
|
}
|
|
937
942
|
}
|
|
938
|
-
|
|
943
|
+
zt(l) > 0 && Mt(i, "__local__", Lt(l)), zt(s) > 0 && Mt(i, "__filter__", Lt(s)), rn(_) || Mt(i, "__service__", _);
|
|
939
944
|
}
|
|
940
|
-
return
|
|
945
|
+
return Mt(i, "subs_flag", o), i;
|
|
941
946
|
}(e, t, r, i);
|
|
942
|
-
return s ? (
|
|
947
|
+
return s ? (Kt(e.dl_subscriptions, s), Kt(i.dl_subscribings, s), p && Je(p, "trace_subscriptions") && (P(n("💜💜👍 subscribing event '%s', publisher '%s', subscriber %s", t || "", we(e), we(i))), r && It(r)), e.gclass.gmt.mt_subscription_added && e.gclass.gmt.mt_subscription_added(e, s) < 0 && (ft(e, s, !0, !0), s = 0), s) : (Rt(`${we(e)}: _create_subscription() FAILED`), 0);
|
|
943
948
|
}
|
|
944
|
-
function
|
|
949
|
+
function dt(e, t, n) {
|
|
945
950
|
let r = [...t];
|
|
946
|
-
for (let t = 0; t < r.length; t++)
|
|
951
|
+
for (let t = 0; t < r.length; t++) ft(e, r[t], n, !1);
|
|
947
952
|
return 0;
|
|
948
953
|
}
|
|
949
|
-
function dt(e, t, n, r) {
|
|
950
|
-
return null == n && (n = {}), at(e.dl_subscriptions, e, t, n, r);
|
|
951
|
-
}
|
|
952
954
|
function bt(e, t, n, r) {
|
|
953
|
-
return
|
|
954
|
-
}
|
|
955
|
-
function pt(e, t, r) {
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
if (
|
|
960
|
-
|
|
961
|
-
|
|
955
|
+
return null == n && (n = {}), ut(e.dl_subscriptions, e, t, n, r);
|
|
956
|
+
}
|
|
957
|
+
function pt(e, t, n, r) {
|
|
958
|
+
return ut(e.dl_subscribings, r, t, n, e);
|
|
959
|
+
}
|
|
960
|
+
function mt(e, t, r) {
|
|
961
|
+
if (Qt(r) || (r = {}), !e || e.obflag & (D.obflag_destroyed | D.obflag_destroying)) return Rt("gobj NULL or DESTROYED"), -1;
|
|
962
|
+
if (rn(t)) return Rt(`${we(e)}: event EMPTY`), -1;
|
|
963
|
+
let i = rt(e, t, !0);
|
|
964
|
+
if (!(i && i.event_flag & (R.EVF_SYSTEM_EVENT | R.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & N.gcflag_no_check_output_events)) return Rt(`event NOT in output event list: ${we(e)}, ev ${t}`), -1;
|
|
965
|
+
let o = p && Je(p, "trace_subscriptions");
|
|
966
|
+
if (o && (P(n("🔝🔝 mach(%s%s^%s), st: %s, ev: %s%s%s", e.running ? "" : "!!", Ne(e), Oe(e), e.current_state.state_name, "", t || "", "")), It(r)), e.gclass.gmt.mt_publish_event) {
|
|
962
967
|
let n = e.gclass.gmt.mt_publish_event(e, t, r);
|
|
963
968
|
if (n <= 0) return n;
|
|
964
969
|
}
|
|
@@ -970,28 +975,28 @@
|
|
|
970
975
|
if (n < 0) break;
|
|
971
976
|
if (0 === n) continue;
|
|
972
977
|
}
|
|
973
|
-
let u =
|
|
974
|
-
if (!u ||
|
|
975
|
-
let c =
|
|
976
|
-
if (
|
|
977
|
-
|
|
978
|
-
let i =
|
|
979
|
-
if (e.gclass.gmt.mt_publication_filter ? d = e.gclass.gmt.mt_publication_filter(e, t, g, u) :
|
|
978
|
+
let u = pn(e, a, "subscriber", null, ht.KW_REQUIRED);
|
|
979
|
+
if (!u || Ae(u)) continue;
|
|
980
|
+
let c = dn(e, a, "subs_flag", 0, ht.KW_REQUIRED), f = bn(e, a, "event", "", ht.KW_REQUIRED);
|
|
981
|
+
if (rn(f) || 0 === sn(f, t)) {
|
|
982
|
+
mn(e, a, "__config__", null, 0);
|
|
983
|
+
let i = mn(e, a, "__global__", null, 0), l = mn(e, a, "__local__", null, 0), f = hn(e, a, "__filter__", null, 0), g = r, d = 1;
|
|
984
|
+
if (e.gclass.gmt.mt_publication_filter ? d = e.gclass.gmt.mt_publication_filter(e, t, g, u) : zt(f) > 0 && (d = vn(g, f), o && (P(n("💜💜🔄%s publishing with filter, event '%s', subscriber'%s', publisher %s", d ? "👍" : "👎", t || "", we(u), we(e))), It(f))), d < 0) break;
|
|
980
985
|
if (0 === d) continue;
|
|
981
|
-
let b =
|
|
982
|
-
if (b && b.event_flag & R.EVF_SYSTEM_EVENT && !
|
|
983
|
-
l &&
|
|
984
|
-
let p =
|
|
985
|
-
if (p < 0 && c &
|
|
986
|
+
let b = rt(u, t, !0);
|
|
987
|
+
if (b && b.event_flag & R.EVF_SYSTEM_EVENT && !it(u, b.event_name, 0)) continue;
|
|
988
|
+
l && an(g, l), i && Ut(g, i), o && (P(n("🔝🔄 mach(%s%s), st: %s, ev: %s, from(%s%s)", u.running ? "" : "!!", we(u), nt(u), t || "", e && !e.running ? "!!" : "", we(e))), It(g));
|
|
989
|
+
let p = lt(u, t, g, e);
|
|
990
|
+
if (p < 0 && c & st.__own_event__) {
|
|
986
991
|
s = -1;
|
|
987
992
|
break;
|
|
988
993
|
}
|
|
989
|
-
if (_ += p, s++,
|
|
994
|
+
if (_ += p, s++, Ae(e)) break;
|
|
990
995
|
}
|
|
991
996
|
}
|
|
992
|
-
return s || i && i.event_flag & R.EVF_NO_WARN_SUBS ||
|
|
997
|
+
return s || i && i.event_flag & R.EVF_NO_WARN_SUBS || kt(`${we(e)}: Publish event WITHOUT subscribers, ev ${t}`), _;
|
|
993
998
|
}
|
|
994
|
-
var
|
|
999
|
+
var ht = Object.freeze({
|
|
995
1000
|
KW_REQUIRED: 1,
|
|
996
1001
|
KW_CREATE: 2,
|
|
997
1002
|
KW_WILD_NUMBER: 4,
|
|
@@ -1000,7 +1005,7 @@
|
|
|
1000
1005
|
KW_VERBOSE: 32,
|
|
1001
1006
|
KW_LOWER: 64,
|
|
1002
1007
|
KW_RECURSIVE: 128
|
|
1003
|
-
}),
|
|
1008
|
+
}), Et = (Object.freeze({
|
|
1004
1009
|
JSON_OBJECT: 1,
|
|
1005
1010
|
JSON_ARRAY: 2,
|
|
1006
1011
|
JSON_STRING: 3,
|
|
@@ -1009,11 +1014,22 @@
|
|
|
1009
1014
|
JSON_TRUE: 6,
|
|
1010
1015
|
JSON_FALSE: 7,
|
|
1011
1016
|
JSON_NULL: 8
|
|
1012
|
-
}), "undefined" != typeof window ? window.console : console),
|
|
1013
|
-
|
|
1014
|
-
|
|
1017
|
+
}), "undefined" != typeof window ? window.console : console), yt = Et.error, Tt = Et.warn, vt = Et.info, jt = Et.debug, St = null;
|
|
1018
|
+
var Ot = !1;
|
|
1019
|
+
function Nt(e, t, n) {
|
|
1020
|
+
if (St && !Ot) {
|
|
1021
|
+
Ot = !0;
|
|
1022
|
+
try {
|
|
1023
|
+
St(e, t, n);
|
|
1024
|
+
} catch (e) {} finally {
|
|
1025
|
+
Ot = !1;
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1015
1028
|
}
|
|
1016
|
-
function
|
|
1029
|
+
function wt(e) {
|
|
1030
|
+
e ? (yt = e, Tt = e) : (yt = Et.error, Tt = Et.warn);
|
|
1031
|
+
}
|
|
1032
|
+
function Dt(e) {
|
|
1017
1033
|
const t = Array.prototype.slice.call(arguments);
|
|
1018
1034
|
let n = "";
|
|
1019
1035
|
if ("string" == typeof e) {
|
|
@@ -1035,36 +1051,36 @@
|
|
|
1035
1051
|
} else n = t.map((e) => "object" == typeof e ? JSON.stringify(e) : String(e)).join(" ");
|
|
1036
1052
|
return n;
|
|
1037
1053
|
}
|
|
1038
|
-
function
|
|
1039
|
-
let t =
|
|
1040
|
-
|
|
1054
|
+
function Rt(e) {
|
|
1055
|
+
let t = Dt(e), n = Kn();
|
|
1056
|
+
yt && (yt === window.console.error ? yt("%c" + n + " ERROR: " + String(t), "color:red") : (window.console.error("%c" + n + " ERROR: " + String(t), "color:red"), yt(`${n} ERROR: ${String(t)}`))), Nt("error", t, n);
|
|
1041
1057
|
}
|
|
1042
|
-
function
|
|
1043
|
-
let t =
|
|
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)}`)));
|
|
1058
|
+
function kt(e) {
|
|
1059
|
+
let t = Dt(e), n = Kn();
|
|
1060
|
+
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)}`))), Nt("warning", t, n);
|
|
1045
1061
|
}
|
|
1046
|
-
function
|
|
1047
|
-
let t =
|
|
1048
|
-
|
|
1062
|
+
function $t(e) {
|
|
1063
|
+
let t = Dt(e), n = Kn();
|
|
1064
|
+
jt && jt("%c" + n + " DEBUG: " + String(t), "color:silver"), Nt("debug", t, n);
|
|
1049
1065
|
}
|
|
1050
|
-
function
|
|
1051
|
-
let t =
|
|
1052
|
-
|
|
1066
|
+
function At(e) {
|
|
1067
|
+
let t = Dt(e), n = Kn();
|
|
1068
|
+
jt && jt("%c" + n + " MSG: " + String(t), "color:cyan"), Nt("msg", t, n);
|
|
1053
1069
|
}
|
|
1054
|
-
function
|
|
1055
|
-
t && window.console.warn("=====> " + t), window.console.dir(e);
|
|
1070
|
+
function It(e, t) {
|
|
1071
|
+
t && window.console.warn("=====> " + t), window.console.dir(e), Nt("json", e, Kn());
|
|
1056
1072
|
}
|
|
1057
|
-
function
|
|
1073
|
+
function Lt(e) {
|
|
1058
1074
|
return structuredClone(e);
|
|
1059
1075
|
}
|
|
1060
|
-
function
|
|
1076
|
+
function Pt(e, t) {
|
|
1061
1077
|
if (e === t) return !0;
|
|
1062
1078
|
if (null === e || null === t) return e === t;
|
|
1063
1079
|
if (typeof e != typeof t) return !1;
|
|
1064
1080
|
if (Array.isArray(e) !== Array.isArray(t)) return !1;
|
|
1065
1081
|
if (Array.isArray(e)) {
|
|
1066
1082
|
if (e.length !== t.length) return !1;
|
|
1067
|
-
for (let n = 0; n < e.length; n++) if (
|
|
1083
|
+
for (let n = 0; n < e.length; n++) if (!Pt(e[n], t[n])) return !1;
|
|
1068
1084
|
return !0;
|
|
1069
1085
|
}
|
|
1070
1086
|
if ("object" == typeof e) {
|
|
@@ -1072,211 +1088,211 @@
|
|
|
1072
1088
|
if (n.length !== r.length) return !1;
|
|
1073
1089
|
for (let i = 0; i < n.length; i++) {
|
|
1074
1090
|
if (n[i] !== r[i]) return !1;
|
|
1075
|
-
if (
|
|
1091
|
+
if (!Pt(e[n[i]], t[r[i]])) return !1;
|
|
1076
1092
|
}
|
|
1077
1093
|
return !0;
|
|
1078
1094
|
}
|
|
1079
1095
|
return e === t;
|
|
1080
1096
|
}
|
|
1081
|
-
function
|
|
1097
|
+
function Ut(e, t) {
|
|
1082
1098
|
if (!t) return e;
|
|
1083
1099
|
for (let n of Object.keys(t)) e[n] = t[n];
|
|
1084
1100
|
return e;
|
|
1085
1101
|
}
|
|
1086
|
-
function
|
|
1102
|
+
function Ct(e, t) {
|
|
1087
1103
|
if (!t) return e;
|
|
1088
1104
|
for (let n in t) t.hasOwnProperty(n) && e.hasOwnProperty(n) && (e[n] = t[n]);
|
|
1089
1105
|
return e;
|
|
1090
1106
|
}
|
|
1091
|
-
function
|
|
1107
|
+
function Ft(e, t) {
|
|
1092
1108
|
if (!t) return e;
|
|
1093
1109
|
for (let n in t) t.hasOwnProperty(n) && !e.hasOwnProperty(n) && (e[n] = t[n]);
|
|
1094
1110
|
return e;
|
|
1095
1111
|
}
|
|
1096
|
-
function
|
|
1112
|
+
function Gt(e, t) {
|
|
1097
1113
|
if (e && e.hasOwnProperty(t)) return e[t];
|
|
1098
1114
|
}
|
|
1099
|
-
function
|
|
1115
|
+
function Vt(e, t) {
|
|
1100
1116
|
e && e.hasOwnProperty(t) && delete e[t];
|
|
1101
1117
|
}
|
|
1102
|
-
function
|
|
1118
|
+
function Wt(e, t, n) {
|
|
1103
1119
|
e[t] = n;
|
|
1104
1120
|
}
|
|
1105
|
-
function
|
|
1121
|
+
function Mt(e, t, n) {
|
|
1106
1122
|
e[t] = n;
|
|
1107
1123
|
}
|
|
1108
|
-
function
|
|
1124
|
+
function Kt(e, t) {
|
|
1109
1125
|
e.push(t);
|
|
1110
1126
|
}
|
|
1111
|
-
function
|
|
1127
|
+
function xt(e, t) {
|
|
1112
1128
|
e.push(t);
|
|
1113
1129
|
}
|
|
1114
|
-
function
|
|
1130
|
+
function Yt(e, t) {
|
|
1115
1131
|
e.splice(t, 1);
|
|
1116
1132
|
}
|
|
1117
|
-
function
|
|
1118
|
-
return
|
|
1133
|
+
function Bt(e) {
|
|
1134
|
+
return Qt(e) ? Object.keys(e).length : 0;
|
|
1119
1135
|
}
|
|
1120
|
-
function
|
|
1121
|
-
return
|
|
1136
|
+
function Jt(e) {
|
|
1137
|
+
return qt(e) ? e.length : 0;
|
|
1122
1138
|
}
|
|
1123
|
-
function
|
|
1124
|
-
return
|
|
1139
|
+
function zt(e) {
|
|
1140
|
+
return Qt(e) ? Object.keys(e).length : qt(e) ? e.length : Ht(e) && e.length > 0 ? 1 : 0;
|
|
1125
1141
|
}
|
|
1126
|
-
function
|
|
1142
|
+
function Qt(e) {
|
|
1127
1143
|
return null !== e && "object" == typeof e && !Array.isArray(e);
|
|
1128
1144
|
}
|
|
1129
|
-
function
|
|
1145
|
+
function qt(e) {
|
|
1130
1146
|
return Array.isArray(e);
|
|
1131
1147
|
}
|
|
1132
|
-
function
|
|
1148
|
+
function Ht(e) {
|
|
1133
1149
|
return "string" == typeof e;
|
|
1134
1150
|
}
|
|
1135
|
-
function
|
|
1151
|
+
function Xt(e) {
|
|
1136
1152
|
return "number" == typeof e && Number.isFinite(e);
|
|
1137
1153
|
}
|
|
1138
|
-
function
|
|
1154
|
+
function Zt(e) {
|
|
1139
1155
|
return "boolean" == typeof e;
|
|
1140
1156
|
}
|
|
1141
|
-
function
|
|
1157
|
+
function en(e) {
|
|
1142
1158
|
return null == e;
|
|
1143
1159
|
}
|
|
1144
|
-
function
|
|
1160
|
+
function tn(e) {
|
|
1145
1161
|
return "function" == typeof e;
|
|
1146
1162
|
}
|
|
1147
|
-
function
|
|
1163
|
+
function nn(e) {
|
|
1148
1164
|
return e instanceof O;
|
|
1149
1165
|
}
|
|
1150
|
-
function
|
|
1151
|
-
return !
|
|
1166
|
+
function rn(e) {
|
|
1167
|
+
return !Ht(e) || 0 === e.length;
|
|
1152
1168
|
}
|
|
1153
|
-
function
|
|
1154
|
-
return
|
|
1169
|
+
function on(e) {
|
|
1170
|
+
return Xt(e) ? Boolean(e) : /^\s*(true|1|on)\s*$/i.test(e);
|
|
1155
1171
|
}
|
|
1156
|
-
function
|
|
1172
|
+
function ln(e, t) {
|
|
1157
1173
|
return e === t ? 0 : e > t ? 1 : -1;
|
|
1158
1174
|
}
|
|
1159
|
-
function
|
|
1175
|
+
function sn(e, t) {
|
|
1160
1176
|
let n = e.toLowerCase(), r = t.toLowerCase();
|
|
1161
1177
|
return n === r ? 0 : n > r ? 1 : -1;
|
|
1162
1178
|
}
|
|
1163
|
-
function
|
|
1164
|
-
if (
|
|
1165
|
-
if (
|
|
1179
|
+
function _n(e, t) {
|
|
1180
|
+
if (Qt(e) || Qt(t) || qt(e) || qt(t)) return 0;
|
|
1181
|
+
if (Xt(e) || Xt(t)) {
|
|
1166
1182
|
let n = Number(e), r = Number(t);
|
|
1167
1183
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
1168
1184
|
}
|
|
1169
|
-
if (
|
|
1185
|
+
if (Zt(e) || Zt(t)) {
|
|
1170
1186
|
let n = Number(e), r = Number(t);
|
|
1171
1187
|
return n > r ? 1 : n < r ? -1 : 0;
|
|
1172
1188
|
}
|
|
1173
|
-
return
|
|
1189
|
+
return ln(String(e), String(t));
|
|
1174
1190
|
}
|
|
1175
|
-
function
|
|
1176
|
-
if ("object" != typeof t || Array.isArray(t)) if (Array.isArray(t)) for (const n of t)
|
|
1191
|
+
function an(e, t) {
|
|
1192
|
+
if ("object" != typeof t || Array.isArray(t)) if (Array.isArray(t)) for (const n of t) an(e, n);
|
|
1177
1193
|
else "string" == typeof t && delete e[t];
|
|
1178
1194
|
else for (const n of Object.keys(t)) delete e[n];
|
|
1179
1195
|
}
|
|
1180
|
-
function
|
|
1196
|
+
function un(e, t) {
|
|
1181
1197
|
return !(!(t in e) || !e.hasOwnProperty(t));
|
|
1182
1198
|
}
|
|
1183
|
-
function
|
|
1184
|
-
if (e && !
|
|
1185
|
-
if (!
|
|
1199
|
+
function cn(e, t, n, r) {
|
|
1200
|
+
if (e && !nn(e) && Rt("GObj bad instanceof"), !Qt(t) && !qt(t)) return Rt(`${we(e)}: kw must be list or dict`), 0;
|
|
1201
|
+
if (!Ht(n)) return Rt(`${we(e)}: path must be a string: ${String(n)}`), 0;
|
|
1186
1202
|
let i = n.split("`");
|
|
1187
1203
|
if (i.length <= 1) return t[n];
|
|
1188
1204
|
let o = i.length;
|
|
1189
|
-
for (let l = 0; l < o; l++) if (void 0 === (t = t[i[l]])) return void (r &&
|
|
1205
|
+
for (let l = 0; l < o; l++) if (void 0 === (t = t[i[l]])) return void (r && Rt(`${we(e)}: path not found: ${String(n)}`));
|
|
1190
1206
|
return t;
|
|
1191
1207
|
}
|
|
1192
|
-
function
|
|
1193
|
-
e && !
|
|
1208
|
+
function fn(e, t, n) {
|
|
1209
|
+
e && !nn(e) && Rt("GObj bad instanceof");
|
|
1194
1210
|
let [r, i] = function(e, t) {
|
|
1195
1211
|
let n = e.lastIndexOf(t);
|
|
1196
1212
|
return -1 === n ? [e, ""] : [e.substring(0, n), e.substring(n + 1)];
|
|
1197
1213
|
}(n, "`");
|
|
1198
|
-
return
|
|
1214
|
+
return rn(i) ? Vt(t, n) : Vt(cn(e, t, r, !0), i), 0;
|
|
1199
1215
|
}
|
|
1200
|
-
function
|
|
1201
|
-
e && !
|
|
1202
|
-
let o =
|
|
1203
|
-
const l = i && i &
|
|
1216
|
+
function gn(e, t, n, r, i) {
|
|
1217
|
+
e && !nn(e) && Rt("GObj bad instanceof");
|
|
1218
|
+
let o = cn(e, t, n, !1);
|
|
1219
|
+
const l = i && i & ht.KW_REQUIRED, s = i && i & ht.KW_CREATE, _ = i && i & ht.KW_EXTRACT;
|
|
1204
1220
|
if (void 0 === o) {
|
|
1205
1221
|
if (s) {
|
|
1206
1222
|
let i = Boolean(r);
|
|
1207
|
-
return
|
|
1223
|
+
return En(e, t, n, i), i;
|
|
1208
1224
|
}
|
|
1209
|
-
return l && (
|
|
1225
|
+
return l && (Rt(`path not found: '${n}'`), It(t)), Boolean(r);
|
|
1210
1226
|
}
|
|
1211
|
-
return _ &&
|
|
1227
|
+
return _ && fn(e, t, n), Boolean(o);
|
|
1212
1228
|
}
|
|
1213
|
-
function
|
|
1214
|
-
e && !
|
|
1215
|
-
let o =
|
|
1216
|
-
const l = i && i &
|
|
1229
|
+
function dn(e, t, n, r, i) {
|
|
1230
|
+
e && !nn(e) && Rt("GObj bad instanceof");
|
|
1231
|
+
let o = cn(e, t, n, !1);
|
|
1232
|
+
const l = i && i & ht.KW_REQUIRED, s = i && i & ht.KW_CREATE, _ = i && i & ht.KW_EXTRACT;
|
|
1217
1233
|
if (void 0 === o) {
|
|
1218
1234
|
if (s) {
|
|
1219
1235
|
let i = parseInt(r);
|
|
1220
|
-
return
|
|
1236
|
+
return En(e, t, n, i), i;
|
|
1221
1237
|
}
|
|
1222
|
-
return l && (
|
|
1238
|
+
return l && (Rt(`path not found: '${n}'`), It(t)), parseInt(r);
|
|
1223
1239
|
}
|
|
1224
|
-
return _ &&
|
|
1240
|
+
return _ && fn(e, t, n), Xt(o) ? parseInt(o) : (l && (Rt(`path value MUST BE a number: ${n}`), At(t)), parseInt(r));
|
|
1225
1241
|
}
|
|
1226
|
-
function
|
|
1227
|
-
e && !
|
|
1228
|
-
let o =
|
|
1229
|
-
const l = i && i &
|
|
1242
|
+
function bn(e, t, n, r, i) {
|
|
1243
|
+
e && !nn(e) && Rt("GObj bad instanceof");
|
|
1244
|
+
let o = cn(e, t, n, !1);
|
|
1245
|
+
const l = i && i & ht.KW_REQUIRED, s = i && i & ht.KW_CREATE, _ = i && i & ht.KW_EXTRACT;
|
|
1230
1246
|
if (void 0 === o) {
|
|
1231
1247
|
if (s) {
|
|
1232
1248
|
let i = String(r);
|
|
1233
|
-
return
|
|
1249
|
+
return En(e, t, n, i), i;
|
|
1234
1250
|
}
|
|
1235
|
-
return l && (
|
|
1251
|
+
return l && (Rt(`path not found: '${n}'`), It(t)), String(r);
|
|
1236
1252
|
}
|
|
1237
|
-
return _ &&
|
|
1253
|
+
return _ && fn(e, t, n), Ht(o) ? String(o) : (l && (Rt(`${we(e)}: path value MUST BE a string: ${n}`), At(t)), String(r));
|
|
1238
1254
|
}
|
|
1239
|
-
function
|
|
1240
|
-
e && !
|
|
1241
|
-
let o =
|
|
1242
|
-
const l = i && i &
|
|
1255
|
+
function pn(e, t, n, r, i) {
|
|
1256
|
+
e && !nn(e) && Rt("GObj bad instanceof");
|
|
1257
|
+
let o = cn(e, t, n, !1);
|
|
1258
|
+
const l = i && i & ht.KW_REQUIRED, s = i && i & ht.KW_CREATE, _ = i && i & ht.KW_EXTRACT;
|
|
1243
1259
|
if (void 0 === o) {
|
|
1244
1260
|
if (s) {
|
|
1245
1261
|
let i = r;
|
|
1246
|
-
return
|
|
1262
|
+
return En(e, t, n, i), i;
|
|
1247
1263
|
}
|
|
1248
|
-
return l && (
|
|
1264
|
+
return l && (Rt(`path not found: '${n}'`), It(t)), r;
|
|
1249
1265
|
}
|
|
1250
|
-
return _ &&
|
|
1266
|
+
return _ && fn(e, t, n), o;
|
|
1251
1267
|
}
|
|
1252
|
-
function
|
|
1253
|
-
e && !
|
|
1254
|
-
let o =
|
|
1255
|
-
const l = i && i &
|
|
1268
|
+
function mn(e, t, n, r, i) {
|
|
1269
|
+
e && !nn(e) && Rt("GObj bad instanceof");
|
|
1270
|
+
let o = cn(e, t, n, !1);
|
|
1271
|
+
const l = i && i & ht.KW_REQUIRED, s = i && i & ht.KW_CREATE, _ = i && i & ht.KW_EXTRACT;
|
|
1256
1272
|
if (void 0 === o) {
|
|
1257
1273
|
if (s) {
|
|
1258
1274
|
let i = Object(r);
|
|
1259
|
-
return
|
|
1275
|
+
return En(e, t, n, i), i;
|
|
1260
1276
|
}
|
|
1261
|
-
return l && (
|
|
1277
|
+
return l && (Rt(`path not found: '${n}'`), It(t)), Object(r);
|
|
1262
1278
|
}
|
|
1263
|
-
return _ &&
|
|
1279
|
+
return _ && fn(e, t, n), Qt(o) ? Object(o) : (l && (Rt(`path value MUST BE a dict: ${n}`), At(t)), Object(r));
|
|
1264
1280
|
}
|
|
1265
|
-
function
|
|
1266
|
-
e && !
|
|
1267
|
-
let o =
|
|
1268
|
-
const l = i && i &
|
|
1281
|
+
function hn(e, t, n, r, i) {
|
|
1282
|
+
e && !nn(e) && Rt("GObj bad instanceof");
|
|
1283
|
+
let o = cn(e, t, n, !1);
|
|
1284
|
+
const l = i && i & ht.KW_REQUIRED, s = i && i & ht.KW_CREATE, _ = i && i & ht.KW_EXTRACT;
|
|
1269
1285
|
if (void 0 === o) {
|
|
1270
1286
|
if (s) {
|
|
1271
1287
|
let i = r;
|
|
1272
|
-
return
|
|
1288
|
+
return En(e, t, n, i), i;
|
|
1273
1289
|
}
|
|
1274
|
-
return l && (
|
|
1290
|
+
return l && (Rt(`path not found: '${n}'`), It(t)), r;
|
|
1275
1291
|
}
|
|
1276
|
-
return _ &&
|
|
1292
|
+
return _ && fn(e, t, n), o;
|
|
1277
1293
|
}
|
|
1278
|
-
function
|
|
1279
|
-
if (e && !
|
|
1294
|
+
function En(e, t, n, r) {
|
|
1295
|
+
if (e && !nn(e) && Rt("GObj bad instanceof"), !Qt(t)) return Rt("kw is not an object"), -1;
|
|
1280
1296
|
let i = n.split("`");
|
|
1281
1297
|
if (i.length <= 1) return t[n] = r, 0;
|
|
1282
1298
|
let o = i.length;
|
|
@@ -1286,34 +1302,34 @@
|
|
|
1286
1302
|
}
|
|
1287
1303
|
return 0;
|
|
1288
1304
|
}
|
|
1289
|
-
function
|
|
1290
|
-
if (e && !
|
|
1291
|
-
let o =
|
|
1292
|
-
return
|
|
1305
|
+
function yn(e, t, n, r, i) {
|
|
1306
|
+
if (e && !nn(e) && Rt("GObj bad instanceof"), !Qt(t)) return Rt("kw is not an object"), -1;
|
|
1307
|
+
let o = mn(e, t, n, {}, !0);
|
|
1308
|
+
return Qt(o) ? (o[r] = i, 0) : (Rt("subdict is not an object"), -1);
|
|
1293
1309
|
}
|
|
1294
|
-
function
|
|
1310
|
+
function Tn(e, t, r) {
|
|
1295
1311
|
let i = "", o = !1;
|
|
1296
|
-
if (
|
|
1312
|
+
if (qt(t)) {
|
|
1297
1313
|
o = !1;
|
|
1298
1314
|
for (let l = 0; l < t.length; l++) {
|
|
1299
1315
|
let s = t[l];
|
|
1300
|
-
if (i =
|
|
1316
|
+
if (i = rn(r) ? n("%s", r) : n("%s`%d", r, l), o = Tn(e, s, i), o) break;
|
|
1301
1317
|
}
|
|
1302
|
-
} else if (
|
|
1318
|
+
} else if (Qt(t)) {
|
|
1303
1319
|
o = !0;
|
|
1304
1320
|
let l = Object.keys(t);
|
|
1305
1321
|
for (let s = 0; s < l.length; s++) {
|
|
1306
1322
|
let _ = l[s], a = t[_];
|
|
1307
|
-
if (i =
|
|
1308
|
-
if (o =
|
|
1323
|
+
if (i = rn(r) ? n("%s", _) : n("%s`%s", r, _), qt(a) || Qt(a)) {
|
|
1324
|
+
if (o = Tn(e, a, i), !o) break;
|
|
1309
1325
|
continue;
|
|
1310
1326
|
}
|
|
1311
|
-
let u =
|
|
1312
|
-
if (u || (u =
|
|
1327
|
+
let u = hn(0, e, i, 0, 0);
|
|
1328
|
+
if (u || (u = Gt(e, i)), !u) {
|
|
1313
1329
|
o = !1;
|
|
1314
1330
|
break;
|
|
1315
1331
|
}
|
|
1316
|
-
if (0 !==
|
|
1332
|
+
if (0 !== _n(u, a)) {
|
|
1317
1333
|
o = !1;
|
|
1318
1334
|
break;
|
|
1319
1335
|
}
|
|
@@ -1321,49 +1337,49 @@
|
|
|
1321
1337
|
}
|
|
1322
1338
|
return o;
|
|
1323
1339
|
}
|
|
1324
|
-
function
|
|
1325
|
-
return 0 ===
|
|
1340
|
+
function vn(e, t) {
|
|
1341
|
+
return 0 === zt(t) || Tn(e, t, "");
|
|
1326
1342
|
}
|
|
1327
|
-
function
|
|
1328
|
-
e && !
|
|
1343
|
+
function jn(e, t, n, r) {
|
|
1344
|
+
e && !nn(e) && Rt("GObj bad instanceof");
|
|
1329
1345
|
let i = {};
|
|
1330
|
-
if (
|
|
1346
|
+
if (Ht(n) && !rn(n)) {
|
|
1331
1347
|
let o = n;
|
|
1332
|
-
t.hasOwnProperty(o) ? i[o] = t[o] : r &&
|
|
1333
|
-
} else if (
|
|
1348
|
+
t.hasOwnProperty(o) ? i[o] = t[o] : r && Rt(`${we(e)}: key not found: ${o}`);
|
|
1349
|
+
} else if (Qt(n) && Bt(n) > 0) for (let o of Object.keys(n)) t.hasOwnProperty(o) ? i[o] = t[o] : r && Rt(`${we(e)}: key not found: ${o}`);
|
|
1334
1350
|
else {
|
|
1335
|
-
if (!(
|
|
1351
|
+
if (!(qt(n) && Jt(n) > 0)) return t;
|
|
1336
1352
|
for (let o = 0; o < n.length; o++) {
|
|
1337
1353
|
let l = n[o];
|
|
1338
|
-
t.hasOwnProperty(l) ? i[l] = t[l] : r &&
|
|
1354
|
+
t.hasOwnProperty(l) ? i[l] = t[l] : r && Rt(`${we(e)}: key not found: ${l}`);
|
|
1339
1355
|
}
|
|
1340
1356
|
}
|
|
1341
1357
|
return i;
|
|
1342
1358
|
}
|
|
1343
|
-
function
|
|
1359
|
+
function Sn(e, t, n, r) {
|
|
1344
1360
|
let i = {};
|
|
1345
|
-
if (
|
|
1361
|
+
if (Ut(i, t), Ht(n) && !rn(n)) {
|
|
1346
1362
|
let o = n;
|
|
1347
|
-
|
|
1348
|
-
} else if (
|
|
1363
|
+
hn(e, t, o, 0, 0) ? Vt(i, o) : r && Rt(`${we(e)}: key not found: ${o}`);
|
|
1364
|
+
} else if (Qt(n) && Bt(n) > 0) for (let o of Object.keys(n)) t.hasOwnProperty(o) ? Vt(i, o) : r && Rt(`${we(e)}: key not found: ${o}`);
|
|
1349
1365
|
else {
|
|
1350
|
-
if (!(
|
|
1366
|
+
if (!(qt(n) && Jt(n) > 0)) return {};
|
|
1351
1367
|
for (let o = 0; o < n.length; o++) {
|
|
1352
1368
|
let l = n[o];
|
|
1353
|
-
t.hasOwnProperty(l) ?
|
|
1369
|
+
t.hasOwnProperty(l) ? Vt(i, l) : r && Rt(`${we(e)}: key not found: ${l}`);
|
|
1354
1370
|
}
|
|
1355
1371
|
}
|
|
1356
1372
|
return i;
|
|
1357
1373
|
}
|
|
1358
|
-
function
|
|
1374
|
+
function On(e, t, n = !1) {
|
|
1359
1375
|
if ("undefined" != typeof window && window.localStorage) try {
|
|
1360
1376
|
let r = window.localStorage.getItem(e);
|
|
1361
|
-
return null === r ? (n &&
|
|
1377
|
+
return null === r ? (n && Nn(e, t), t) : JSON.parse(r);
|
|
1362
1378
|
} catch (n) {
|
|
1363
1379
|
return window.console.warn(`Error reading localStorage key "${e}":`, n), t;
|
|
1364
1380
|
}
|
|
1365
1381
|
}
|
|
1366
|
-
function
|
|
1382
|
+
function Nn(e, t) {
|
|
1367
1383
|
if ("undefined" != typeof window && window.localStorage) if (e && void 0 !== t) try {
|
|
1368
1384
|
window.localStorage.setItem(e, JSON.stringify(t));
|
|
1369
1385
|
} catch (t) {
|
|
@@ -1371,7 +1387,7 @@
|
|
|
1371
1387
|
}
|
|
1372
1388
|
else window.console.warn(`Invalid key or value for localStorage: key=${e}, value=${t}`);
|
|
1373
1389
|
}
|
|
1374
|
-
function
|
|
1390
|
+
function wn(e) {
|
|
1375
1391
|
if ("undefined" != typeof window && window.localStorage) if (e) try {
|
|
1376
1392
|
window.localStorage.removeItem(e);
|
|
1377
1393
|
} catch (t) {
|
|
@@ -1379,46 +1395,46 @@
|
|
|
1379
1395
|
}
|
|
1380
1396
|
else window.console.warn(`Invalid key for localStorage removal: ${e}`);
|
|
1381
1397
|
}
|
|
1382
|
-
function
|
|
1383
|
-
if (
|
|
1384
|
-
if (
|
|
1398
|
+
function Dn(e, t) {
|
|
1399
|
+
if (en(e) || en(t)) return !0;
|
|
1400
|
+
if (qt(e)) {
|
|
1385
1401
|
if (0 === e.length) return !0;
|
|
1386
1402
|
for (let n = 0; n < e.length; n++) if (e[n] === t) return !0;
|
|
1387
|
-
} else if (
|
|
1403
|
+
} else if (Qt(e)) {
|
|
1388
1404
|
if (0 === Object.keys(e).length) return !0;
|
|
1389
1405
|
for (let n in e) if (n === t) return !0;
|
|
1390
|
-
} else if (
|
|
1406
|
+
} else if (Ht(e) && e === t) return !0;
|
|
1391
1407
|
return !1;
|
|
1392
1408
|
}
|
|
1393
|
-
function
|
|
1394
|
-
if (e && !
|
|
1395
|
-
i || (i =
|
|
1409
|
+
function Rn(e, t, n, r, i) {
|
|
1410
|
+
if (e && !nn(e) && Rt("GObj bad instanceof"), !t) return null;
|
|
1411
|
+
i || (i = vn);
|
|
1396
1412
|
let o = [];
|
|
1397
|
-
if (
|
|
1413
|
+
if (qt(t)) for (let l = 0; l < t.length; l++) {
|
|
1398
1414
|
let s, _ = t[l];
|
|
1399
|
-
if (
|
|
1415
|
+
if (Qt(_)) s = bn(e, _, "id", "", 0);
|
|
1400
1416
|
else {
|
|
1401
|
-
if (!
|
|
1417
|
+
if (!Ht(_)) continue;
|
|
1402
1418
|
s = _;
|
|
1403
1419
|
}
|
|
1404
|
-
|
|
1420
|
+
Dn(n, s) && i(_, r) && o.push(_);
|
|
1405
1421
|
}
|
|
1406
1422
|
else {
|
|
1407
|
-
if (!
|
|
1423
|
+
if (!Qt(t)) return Rt("kw_collect() BAD kw parameter"), null;
|
|
1408
1424
|
for (let e of Object.keys(t)) {
|
|
1409
1425
|
let l = t[e];
|
|
1410
|
-
|
|
1426
|
+
Dn(n, e) && i(l, r) && o.push(l);
|
|
1411
1427
|
}
|
|
1412
1428
|
}
|
|
1413
1429
|
return o;
|
|
1414
1430
|
}
|
|
1415
|
-
function
|
|
1431
|
+
function kn(e, t) {
|
|
1416
1432
|
if (!e) return -1;
|
|
1417
1433
|
for (let n = 0; n < e.length; n++) if (e[n] && e[n].id === t) return n;
|
|
1418
1434
|
return -1;
|
|
1419
1435
|
}
|
|
1420
|
-
function
|
|
1421
|
-
if (!e || !t) return
|
|
1436
|
+
function $n(e, t, n) {
|
|
1437
|
+
if (!e || !t) return Rt("ERROR: str_in_list() list or str empty"), !1;
|
|
1422
1438
|
let r = e.length;
|
|
1423
1439
|
if (n) {
|
|
1424
1440
|
t = t.toLowerCase();
|
|
@@ -1429,7 +1445,7 @@
|
|
|
1429
1445
|
} else for (let n = 0; n < r; n++) if (e[n] === t) return !0;
|
|
1430
1446
|
return !1;
|
|
1431
1447
|
}
|
|
1432
|
-
function
|
|
1448
|
+
function An(e, t) {
|
|
1433
1449
|
try {
|
|
1434
1450
|
let n = e.__md_iev__;
|
|
1435
1451
|
if (n) return n[t];
|
|
@@ -1437,35 +1453,35 @@
|
|
|
1437
1453
|
return;
|
|
1438
1454
|
}
|
|
1439
1455
|
}
|
|
1440
|
-
function
|
|
1456
|
+
function In(e, t, n) {
|
|
1441
1457
|
let r = e.__md_iev__;
|
|
1442
1458
|
r || (r = {}, e.__md_iev__ = r), r[t] = n;
|
|
1443
1459
|
}
|
|
1444
|
-
function
|
|
1445
|
-
if (!
|
|
1460
|
+
function Ln(e, t, n, r) {
|
|
1461
|
+
if (!nn(e)) return Rt("gobj is not a GObj"), null;
|
|
1446
1462
|
if (!t) return;
|
|
1447
|
-
let i =
|
|
1448
|
-
i || (i = [],
|
|
1463
|
+
let i = An(t, n);
|
|
1464
|
+
i || (i = [], In(t, n, i));
|
|
1449
1465
|
try {
|
|
1450
|
-
|
|
1466
|
+
qt(i) && i.unshift(r);
|
|
1451
1467
|
} catch (e) {
|
|
1452
|
-
|
|
1468
|
+
Rt(e);
|
|
1453
1469
|
}
|
|
1454
1470
|
}
|
|
1455
|
-
function
|
|
1456
|
-
if (!
|
|
1457
|
-
if (!
|
|
1458
|
-
let i =
|
|
1459
|
-
return i ? 0 === i.length ? (r &&
|
|
1471
|
+
function Pn(e, t, n, r) {
|
|
1472
|
+
if (!nn(e)) return Rt("gobj is not a GObj"), null;
|
|
1473
|
+
if (!Qt(t)) return Rt("kw is not a dict"), null;
|
|
1474
|
+
let i = An(t, n);
|
|
1475
|
+
return i ? 0 === i.length ? (r && Rt(`stack empty: ${n}`), null) : i[0] : (r && Rt(`stack NOT FOUND: ${n}`), null);
|
|
1460
1476
|
}
|
|
1461
|
-
function
|
|
1462
|
-
return
|
|
1477
|
+
function Un(e, t, n) {
|
|
1478
|
+
return rn(n) ? fn(e, t, "__md_iev__`__msg_type__") : yn(e, t, "__md_iev__", "__msg_type__", n), 0;
|
|
1463
1479
|
}
|
|
1464
|
-
function
|
|
1465
|
-
return
|
|
1480
|
+
function Cn(e, t) {
|
|
1481
|
+
return bn(e, t, "__md_iev__`__msg_type__", "", 0);
|
|
1466
1482
|
}
|
|
1467
|
-
function
|
|
1468
|
-
void 0 !== n &&
|
|
1483
|
+
function Fn(e, t, n) {
|
|
1484
|
+
void 0 !== n && Ht(n) || (n = "");
|
|
1469
1485
|
for (let r of Object.keys(e)) {
|
|
1470
1486
|
if (!e.hasOwnProperty(r)) continue;
|
|
1471
1487
|
let i = (n.length ? "`" : "") + r;
|
|
@@ -1474,10 +1490,10 @@
|
|
|
1474
1490
|
r,
|
|
1475
1491
|
e[r],
|
|
1476
1492
|
n
|
|
1477
|
-
]),
|
|
1493
|
+
]), Qt(e[r]) && Fn(e[r], t, n), n = n.slice(0, -i.length);
|
|
1478
1494
|
}
|
|
1479
1495
|
}
|
|
1480
|
-
function
|
|
1496
|
+
function Gn(e, t, n, r) {
|
|
1481
1497
|
if (!e) return null;
|
|
1482
1498
|
let i, o = e.length;
|
|
1483
1499
|
for (i = 0; i < o; i++) {
|
|
@@ -1485,15 +1501,15 @@
|
|
|
1485
1501
|
if (o) {
|
|
1486
1502
|
let e = o.id;
|
|
1487
1503
|
if (e && e === n) return o;
|
|
1488
|
-
if (r &&
|
|
1489
|
-
let e =
|
|
1504
|
+
if (r && un(o, t)) {
|
|
1505
|
+
let e = Gn(o[t], t, n, r);
|
|
1490
1506
|
if (e) return e;
|
|
1491
1507
|
}
|
|
1492
1508
|
}
|
|
1493
1509
|
}
|
|
1494
1510
|
return null;
|
|
1495
1511
|
}
|
|
1496
|
-
function
|
|
1512
|
+
function Vn(e) {
|
|
1497
1513
|
function t(e) {
|
|
1498
1514
|
let t = e.replace(/-/g, "+").replace(/_/g, "/");
|
|
1499
1515
|
switch (t.length % 4) {
|
|
@@ -1524,38 +1540,38 @@
|
|
|
1524
1540
|
signature: t(n[2])
|
|
1525
1541
|
};
|
|
1526
1542
|
}
|
|
1527
|
-
function
|
|
1543
|
+
function Wn(e) {
|
|
1528
1544
|
return null == e ? "" : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1529
1545
|
}
|
|
1530
|
-
function
|
|
1546
|
+
function Mn(e) {
|
|
1531
1547
|
const t = document.createElement("template");
|
|
1532
1548
|
return t.innerHTML = e.trim(), t.content.firstChild;
|
|
1533
1549
|
}
|
|
1534
|
-
function
|
|
1550
|
+
function Kn() {
|
|
1535
1551
|
const e = /* @__PURE__ */ new Date(), t = e.toISOString().slice(0, 19), n = String(e.getMilliseconds()).padStart(3, "0"), r = e.getTimezoneOffset();
|
|
1536
1552
|
return `${t}.${n}${r > 0 ? "-" : "+"}${String(Math.abs(r) / 60).padStart(2, "0")}${String(Math.abs(r) % 60).padStart(2, "0")}`;
|
|
1537
1553
|
}
|
|
1538
|
-
function
|
|
1554
|
+
function xn(e, t) {
|
|
1539
1555
|
if (!e) throw "ERROR: index_in_list() list empty";
|
|
1540
1556
|
for (let n = 0; n < e.length; n++) if (t === e[n]) return n;
|
|
1541
1557
|
return -1;
|
|
1542
1558
|
}
|
|
1543
|
-
function
|
|
1559
|
+
function Yn() {
|
|
1544
1560
|
let e = "";
|
|
1545
1561
|
return "undefined" != typeof window && window.localStorage ? (e = window.localStorage.getItem("host_uuid"), !e && window.crypto?.randomUUID && (e = window.crypto.randomUUID(), window.localStorage.setItem("host_uuid", e))) : e = "undefined" != typeof globalThis && globalThis.crypto?.randomUUID ? globalThis.crypto.randomUUID() : "00000000-0000-0000-0000-000000000000", e;
|
|
1546
1562
|
}
|
|
1547
|
-
function
|
|
1563
|
+
function Bn(e) {
|
|
1548
1564
|
let t = null;
|
|
1549
1565
|
return "function" != typeof e && "object" != typeof e || (t = ("" + e).match(/function\s*([\w\$]*)\s*\(/)), null !== t ? t[1] + "()" : "";
|
|
1550
1566
|
}
|
|
1551
|
-
function
|
|
1552
|
-
return "persistent-attrs-" +
|
|
1567
|
+
function Jn(e) {
|
|
1568
|
+
return "persistent-attrs-" + we(e);
|
|
1553
1569
|
}
|
|
1554
|
-
function
|
|
1555
|
-
if (
|
|
1570
|
+
function zn(e, t) {
|
|
1571
|
+
if (Ht(t)) {
|
|
1556
1572
|
if (-1 === t.indexOf("^")) {
|
|
1557
1573
|
let n, r, i = e.fkey;
|
|
1558
|
-
if (1 !==
|
|
1574
|
+
if (1 !== Bt(i)) return Rt("bad fkey 1"), Rt(e), Rt(t), null;
|
|
1559
1575
|
for (const e of Object.keys(i)) {
|
|
1560
1576
|
n = e, r = i[e];
|
|
1561
1577
|
break;
|
|
@@ -1568,20 +1584,20 @@
|
|
|
1568
1584
|
}
|
|
1569
1585
|
{
|
|
1570
1586
|
let n = t.split("^");
|
|
1571
|
-
return 3 !== n.length ? (
|
|
1587
|
+
return 3 !== n.length ? (Rt("bad fkey 2"), Rt(e), Rt(t), null) : {
|
|
1572
1588
|
topic_name: n[0],
|
|
1573
1589
|
id: n[1],
|
|
1574
1590
|
hook_name: n[2]
|
|
1575
1591
|
};
|
|
1576
1592
|
}
|
|
1577
1593
|
}
|
|
1578
|
-
return
|
|
1594
|
+
return Qt(t) ? {
|
|
1579
1595
|
topic_name: t.topic_name,
|
|
1580
1596
|
id: t.id,
|
|
1581
1597
|
hook_name: t.hook_name
|
|
1582
|
-
} : (
|
|
1598
|
+
} : (Rt("bad fkey 3"), Rt(e), Rt(t), null);
|
|
1583
1599
|
}
|
|
1584
|
-
var
|
|
1600
|
+
var Qn = [
|
|
1585
1601
|
"string",
|
|
1586
1602
|
"integer",
|
|
1587
1603
|
"object",
|
|
@@ -1591,7 +1607,7 @@
|
|
|
1591
1607
|
"real",
|
|
1592
1608
|
"boolean",
|
|
1593
1609
|
"blob"
|
|
1594
|
-
],
|
|
1610
|
+
], qn = [
|
|
1595
1611
|
"persistent",
|
|
1596
1612
|
"required",
|
|
1597
1613
|
"notnull",
|
|
@@ -1603,7 +1619,7 @@
|
|
|
1603
1619
|
"stats",
|
|
1604
1620
|
"rstats",
|
|
1605
1621
|
"pstats"
|
|
1606
|
-
],
|
|
1622
|
+
], Hn = [
|
|
1607
1623
|
"hook",
|
|
1608
1624
|
"fkey",
|
|
1609
1625
|
"enum",
|
|
@@ -1629,7 +1645,7 @@
|
|
|
1629
1645
|
"coordinates",
|
|
1630
1646
|
"gbuffer"
|
|
1631
1647
|
];
|
|
1632
|
-
function
|
|
1648
|
+
function Xn(e) {
|
|
1633
1649
|
let t = {
|
|
1634
1650
|
name: e.id,
|
|
1635
1651
|
header: e.header,
|
|
@@ -1646,7 +1662,7 @@
|
|
|
1646
1662
|
if (!e.flag) return t;
|
|
1647
1663
|
for (let n = 0; n < e.flag.length; n++) {
|
|
1648
1664
|
let r = e.flag[n];
|
|
1649
|
-
if (
|
|
1665
|
+
if ($n(Hn, r)) {
|
|
1650
1666
|
switch (r) {
|
|
1651
1667
|
case "enum":
|
|
1652
1668
|
t.enum_list = e.enum;
|
|
@@ -1657,7 +1673,7 @@
|
|
|
1657
1673
|
case "table": t.enum_list = e.table;
|
|
1658
1674
|
}
|
|
1659
1675
|
t.type = r;
|
|
1660
|
-
} else if (
|
|
1676
|
+
} else if ($n(qn, r)) switch (r) {
|
|
1661
1677
|
case "writable":
|
|
1662
1678
|
t.is_writable = !0;
|
|
1663
1679
|
break;
|
|
@@ -1670,36 +1686,36 @@
|
|
|
1670
1686
|
}
|
|
1671
1687
|
return t;
|
|
1672
1688
|
}
|
|
1673
|
-
var
|
|
1689
|
+
var Zn = [
|
|
1674
1690
|
j(E.DTP_POINTER, "subscriber", 0, null, "Subscriber of output events"),
|
|
1675
1691
|
j(E.DTP_BOOLEAN, "periodic", 0, 0, "True for periodic timeouts"),
|
|
1676
1692
|
j(E.DTP_INTEGER, "msec", 0, 0, "Timeout in milliseconds"),
|
|
1677
1693
|
v()
|
|
1678
|
-
],
|
|
1694
|
+
], er = {
|
|
1679
1695
|
periodic: !1,
|
|
1680
1696
|
msec: 0,
|
|
1681
1697
|
timer_id: -1
|
|
1682
|
-
},
|
|
1683
|
-
function
|
|
1698
|
+
}, tr = null;
|
|
1699
|
+
function nr(e, t, n, r) {
|
|
1684
1700
|
let i = e.priv, o = i.periodic ? "EV_TIMEOUT_PERIODIC" : "EV_TIMEOUT";
|
|
1685
|
-
return
|
|
1686
|
-
|
|
1701
|
+
return $e(e) ? lt(Re(e), o, {}, e) : mt(e, o, {}), i.periodic && (i.timer_id = setTimeout(function() {
|
|
1702
|
+
lt(e, "EV_TIMEOUT", {}, e);
|
|
1687
1703
|
}, i.msec)), 0;
|
|
1688
1704
|
}
|
|
1689
|
-
var
|
|
1705
|
+
var rr = {
|
|
1690
1706
|
mt_create: function(e) {
|
|
1691
1707
|
let t = e.priv;
|
|
1692
|
-
const n =
|
|
1693
|
-
n &&
|
|
1708
|
+
const n = qe(e, "subscriber");
|
|
1709
|
+
n && gt(e, null, {}, n), t.periodic = Je(e, "periodic"), t.msec = ze(e, "msec");
|
|
1694
1710
|
},
|
|
1695
1711
|
mt_writing: function(e, t) {
|
|
1696
1712
|
let n = e.priv;
|
|
1697
1713
|
switch (t) {
|
|
1698
1714
|
case "periodic":
|
|
1699
|
-
n.periodic =
|
|
1715
|
+
n.periodic = Je(e, "periodic");
|
|
1700
1716
|
break;
|
|
1701
|
-
case "msec": n.msec =
|
|
1702
|
-
|
|
1717
|
+
case "msec": n.msec = ze(e, "msec"), -1 !== n.timer_id && (clearTimeout(n.timer_id), n.timer_id = -1), n.msec > 0 && (n.timer_id = setTimeout(function() {
|
|
1718
|
+
lt(e, "EV_TIMEOUT", {}, e);
|
|
1703
1719
|
}, n.msec));
|
|
1704
1720
|
}
|
|
1705
1721
|
},
|
|
@@ -1707,20 +1723,20 @@
|
|
|
1707
1723
|
return 0;
|
|
1708
1724
|
},
|
|
1709
1725
|
mt_stop: function(e) {
|
|
1710
|
-
return
|
|
1726
|
+
return Ze(e, "msec", -1), 0;
|
|
1711
1727
|
},
|
|
1712
1728
|
mt_destroy: function(e) {}
|
|
1713
1729
|
};
|
|
1714
|
-
function
|
|
1715
|
-
return e instanceof O ? "C_TIMER" !==
|
|
1730
|
+
function ir(e, t) {
|
|
1731
|
+
return e instanceof O ? "C_TIMER" !== Ne(e) ? (Rt("not C_TIMER GObj"), -1) : (Xe(e, "periodic", !1), void Ze(e, "msec", t)) : (Rt("not GObj TYPE"), -1);
|
|
1716
1732
|
}
|
|
1717
|
-
function
|
|
1718
|
-
return e instanceof O ? "C_TIMER" !==
|
|
1733
|
+
function or(e, t) {
|
|
1734
|
+
return e instanceof O ? "C_TIMER" !== Ne(e) ? (Rt("not C_TIMER GObj"), -1) : (Xe(e, "periodic", !0), void Ze(e, "msec", t)) : (Rt("not GObj TYPE"), -1);
|
|
1719
1735
|
}
|
|
1720
|
-
function
|
|
1721
|
-
return e instanceof O ? "C_TIMER" !==
|
|
1736
|
+
function lr(e) {
|
|
1737
|
+
return e instanceof O ? "C_TIMER" !== Ne(e) ? (Rt("not C_TIMER GObj"), -1) : void Ze(e, "msec", -1) : (Rt("not GObj TYPE"), -1);
|
|
1722
1738
|
}
|
|
1723
|
-
var
|
|
1739
|
+
var sr = [
|
|
1724
1740
|
j(E.DTP_BOOLEAN, "changesLost", 0, !1, "Set true to warn about leaving page"),
|
|
1725
1741
|
j(E.DTP_BOOLEAN, "browser_beforeunload", 0, !1, "Set true to refreshing browser"),
|
|
1726
1742
|
j(E.DTP_STRING, "__username__", 0, "", "Username"),
|
|
@@ -1746,47 +1762,47 @@
|
|
|
1746
1762
|
j(E.DTP_BOOLEAN, "developer", 0, !1, "Developer mode enabled"),
|
|
1747
1763
|
j(E.DTP_INTEGER, "periodic_timeout", 0, "1000", "Timeout periodic, in miliseconds."),
|
|
1748
1764
|
v()
|
|
1749
|
-
],
|
|
1750
|
-
function
|
|
1751
|
-
return
|
|
1765
|
+
], _r = { gobj_timer: null }, ar = null;
|
|
1766
|
+
function ur(e, t, n, r) {
|
|
1767
|
+
return mt(e, t, n), 0;
|
|
1752
1768
|
}
|
|
1753
|
-
var
|
|
1769
|
+
var cr = {
|
|
1754
1770
|
mt_create: function(e) {
|
|
1755
1771
|
let t = e.priv;
|
|
1756
|
-
|
|
1772
|
+
et(e, "start_date", Kn()), et(e, "node_uuid", Yn()), e.priv.gobj_timer = se(Oe(e), "C_TIMER", {}, e), t.periodic_timeout = Ye(e, "periodic_timeout");
|
|
1757
1773
|
},
|
|
1758
1774
|
mt_writing: function(e, t) {},
|
|
1759
1775
|
mt_start: function(e) {
|
|
1760
|
-
return
|
|
1776
|
+
return ae(e.priv.gobj_timer), or(e.priv.gobj_timer, e.priv.periodic_timeout), 0;
|
|
1761
1777
|
},
|
|
1762
1778
|
mt_stop: function(e) {
|
|
1763
|
-
return
|
|
1779
|
+
return fe(e.priv.gobj_timer), de(e), 0;
|
|
1764
1780
|
},
|
|
1765
1781
|
mt_destroy: function(e) {},
|
|
1766
1782
|
mt_play: function(e) {
|
|
1767
|
-
let t =
|
|
1768
|
-
return
|
|
1783
|
+
let t = Z();
|
|
1784
|
+
return me(t) || ae(t), ye(t) || be(t), 0;
|
|
1769
1785
|
},
|
|
1770
1786
|
mt_pause: function(e) {
|
|
1771
|
-
return
|
|
1787
|
+
return pe(Z()), 0;
|
|
1772
1788
|
}
|
|
1773
1789
|
};
|
|
1774
|
-
var
|
|
1775
|
-
j(E.DTP_STRING, "wanted_yuno_role",
|
|
1776
|
-
j(E.DTP_STRING, "wanted_yuno_name",
|
|
1777
|
-
j(E.DTP_STRING, "wanted_yuno_service",
|
|
1778
|
-
j(E.DTP_STRING, "remote_yuno_role",
|
|
1779
|
-
j(E.DTP_STRING, "remote_yuno_name",
|
|
1780
|
-
j(E.DTP_STRING, "remote_yuno_service",
|
|
1781
|
-
j(E.DTP_STRING, "url",
|
|
1782
|
-
j(E.DTP_STRING, "jwt",
|
|
1783
|
-
j(E.DTP_STRING, "cert_pem",
|
|
1784
|
-
j(E.DTP_JSON, "extra_info",
|
|
1785
|
-
j(E.DTP_INTEGER, "timeout_retry",
|
|
1786
|
-
j(E.DTP_INTEGER, "timeout_idack",
|
|
1790
|
+
var fr = "ievent_gate_stack", gr = [
|
|
1791
|
+
j(E.DTP_STRING, "wanted_yuno_role", y.SDF_RD, "", "wanted yuno role"),
|
|
1792
|
+
j(E.DTP_STRING, "wanted_yuno_name", y.SDF_RD, "", "wanted yuno name"),
|
|
1793
|
+
j(E.DTP_STRING, "wanted_yuno_service", y.SDF_RD, "", "wanted yuno service"),
|
|
1794
|
+
j(E.DTP_STRING, "remote_yuno_role", y.SDF_RD, "", "confirmed remote yuno role"),
|
|
1795
|
+
j(E.DTP_STRING, "remote_yuno_name", y.SDF_RD, "", "confirmed remote yuno name"),
|
|
1796
|
+
j(E.DTP_STRING, "remote_yuno_service", y.SDF_RD, "", "confirmed remote yuno service"),
|
|
1797
|
+
j(E.DTP_STRING, "url", y.SDF_RD, "", "Url to connect"),
|
|
1798
|
+
j(E.DTP_STRING, "jwt", y.SDF_PERSIST, "", "JWT"),
|
|
1799
|
+
j(E.DTP_STRING, "cert_pem", y.SDF_PERSIST, "", "SSL server certification, PEM str format"),
|
|
1800
|
+
j(E.DTP_JSON, "extra_info", y.SDF_RD, "{}", "dict data set by user, added to the identity card msg."),
|
|
1801
|
+
j(E.DTP_INTEGER, "timeout_retry", y.SDF_RD, "5000", "timeout waiting idAck"),
|
|
1802
|
+
j(E.DTP_INTEGER, "timeout_idack", y.SDF_RD, "5000", "timeout waiting idAck"),
|
|
1787
1803
|
j(E.DTP_POINTER, "subscriber", 0, 0, "subscriber of output-events. If null then subscriber is the parent"),
|
|
1788
1804
|
v()
|
|
1789
|
-
],
|
|
1805
|
+
], dr = {
|
|
1790
1806
|
url: null,
|
|
1791
1807
|
remote_yuno_name: null,
|
|
1792
1808
|
remote_yuno_role: null,
|
|
@@ -1795,88 +1811,88 @@
|
|
|
1795
1811
|
inform_on_close: !1,
|
|
1796
1812
|
websocket: null,
|
|
1797
1813
|
inside_on_open: !1
|
|
1798
|
-
},
|
|
1799
|
-
function
|
|
1800
|
-
e.priv.websocket &&
|
|
1801
|
-
const t =
|
|
1814
|
+
}, br = null;
|
|
1815
|
+
function pr(e) {
|
|
1816
|
+
e.priv.websocket && Rt("Websocket ALREADY setup");
|
|
1817
|
+
const t = Qe(e, "url");
|
|
1802
1818
|
let n;
|
|
1803
|
-
|
|
1819
|
+
$t(`====> Starting WebSocket to '${t}' (${we(e)})`);
|
|
1804
1820
|
try {
|
|
1805
1821
|
n = new WebSocket(t);
|
|
1806
1822
|
} catch (n) {
|
|
1807
|
-
return
|
|
1823
|
+
return Rt(`${we(e)}: Cannot open WebSocket to '${t}', Error: ${n.message}`), null;
|
|
1808
1824
|
}
|
|
1809
1825
|
return n ? (n.onopen = () => {
|
|
1810
|
-
|
|
1826
|
+
lt(e, "EV_ON_OPEN", { url: t }, e);
|
|
1811
1827
|
}, n.onmessage = (n) => {
|
|
1812
|
-
|
|
1828
|
+
lt(e, "EV_ON_MESSAGE", {
|
|
1813
1829
|
url: t,
|
|
1814
1830
|
data: n.data
|
|
1815
1831
|
}, e);
|
|
1816
1832
|
}, n.onclose = (n) => {
|
|
1817
|
-
|
|
1833
|
+
Ae(e) || (Je(Te(), "browser_beforeunload") ? kt("Close websocket by unload page") : lt(e, "EV_ON_CLOSE", {
|
|
1818
1834
|
url: t,
|
|
1819
1835
|
e: n
|
|
1820
1836
|
}, e));
|
|
1821
|
-
}, n) : (
|
|
1837
|
+
}, n) : (Rt(`${we(e)}: Failed to initialize WebSocket.`), null);
|
|
1822
1838
|
}
|
|
1823
|
-
function
|
|
1839
|
+
function mr(e, t = 1e3, n = "") {
|
|
1824
1840
|
let r = e.priv, i = r.websocket;
|
|
1825
1841
|
if (r.websocket = null, i && i.readyState !== WebSocket.CLOSED && i.readyState !== WebSocket.CLOSING) {
|
|
1826
|
-
|
|
1842
|
+
$t(`Closing WebSocket (Code: ${t}, Reason: "${n}")`);
|
|
1827
1843
|
try {
|
|
1828
1844
|
i.close(t, n);
|
|
1829
1845
|
} catch (e) {
|
|
1830
|
-
|
|
1846
|
+
Rt("Error closing WebSocket:", e.message);
|
|
1831
1847
|
}
|
|
1832
|
-
} else
|
|
1848
|
+
} else kt("WebSocket is already closed or in the process of closing.");
|
|
1833
1849
|
}
|
|
1834
|
-
function
|
|
1835
|
-
let r =
|
|
1850
|
+
function hr(e, t, n) {
|
|
1851
|
+
let r = Kn();
|
|
1836
1852
|
try {
|
|
1837
|
-
|
|
1853
|
+
$t("\n" + r + " " + t + "\n"), It(n);
|
|
1838
1854
|
} catch (e) {
|
|
1839
|
-
|
|
1855
|
+
$t("ERROR in trace_inter_event: " + e);
|
|
1840
1856
|
}
|
|
1841
1857
|
}
|
|
1842
|
-
var
|
|
1858
|
+
var Er = class {
|
|
1843
1859
|
constructor(e, t) {
|
|
1844
1860
|
this.event = e, this.kw = t || {};
|
|
1845
1861
|
}
|
|
1846
1862
|
};
|
|
1847
|
-
function
|
|
1863
|
+
function yr(e, t, n, r) {
|
|
1848
1864
|
return function(e, t) {
|
|
1849
1865
|
let n = e.priv, r = JSON.stringify(t);
|
|
1850
|
-
if (
|
|
1851
|
-
let n =
|
|
1852
|
-
o ? o(i, t, 1, r.length) :
|
|
1866
|
+
if (Je(Te(), "trace_inter_event")) {
|
|
1867
|
+
let n = Qe(e, "url"), i = Oe(Te()) + " ==> " + n, o = Ye(Te(), "trace_ievent_callback");
|
|
1868
|
+
o ? o(i, t, 1, r.length) : hr(0, i, t);
|
|
1853
1869
|
}
|
|
1854
1870
|
try {
|
|
1855
1871
|
n.websocket.send(r);
|
|
1856
1872
|
} catch (t) {
|
|
1857
|
-
|
|
1873
|
+
Rt(`${we(e)}: send_iev(): ${t}`);
|
|
1858
1874
|
}
|
|
1859
1875
|
return 0;
|
|
1860
1876
|
}(e, function(e, t) {
|
|
1861
|
-
return
|
|
1877
|
+
return rn(e) ? (Rt("iev_create() event NULL"), null) : new Er(e, t);
|
|
1862
1878
|
}(t, n));
|
|
1863
1879
|
}
|
|
1864
|
-
function
|
|
1865
|
-
return
|
|
1866
|
-
dst_yuno:
|
|
1867
|
-
dst_role:
|
|
1880
|
+
function Tr(e, t, n) {
|
|
1881
|
+
return rn(n) && (n = Qe(e, "wanted_yuno_service")), {
|
|
1882
|
+
dst_yuno: Qe(e, "wanted_yuno_name"),
|
|
1883
|
+
dst_role: Qe(e, "wanted_yuno_role"),
|
|
1868
1884
|
dst_service: n,
|
|
1869
|
-
src_yuno:
|
|
1870
|
-
src_role:
|
|
1885
|
+
src_yuno: ve(),
|
|
1886
|
+
src_role: je(),
|
|
1871
1887
|
src_service: t,
|
|
1872
|
-
host:
|
|
1888
|
+
host: Yn()
|
|
1873
1889
|
};
|
|
1874
1890
|
}
|
|
1875
|
-
function
|
|
1876
|
-
let t = e.priv, n =
|
|
1877
|
-
yuno_role:
|
|
1878
|
-
yuno_id:
|
|
1879
|
-
yuno_name:
|
|
1891
|
+
function vr(e) {
|
|
1892
|
+
let t = e.priv, n = ye(Te()), r = Qe(Te(), "yuno_version"), i = Qe(Te(), "yuno_release"), o = Qe(Te(), "yuno_tag"), s = {
|
|
1893
|
+
yuno_role: je(),
|
|
1894
|
+
yuno_id: Se(),
|
|
1895
|
+
yuno_name: ve(),
|
|
1880
1896
|
yuno_tag: o,
|
|
1881
1897
|
yuno_version: r,
|
|
1882
1898
|
yuno_release: i,
|
|
@@ -1884,37 +1900,37 @@
|
|
|
1884
1900
|
playing: n,
|
|
1885
1901
|
pid: 0,
|
|
1886
1902
|
watcher_pid: 0,
|
|
1887
|
-
jwt:
|
|
1888
|
-
username:
|
|
1903
|
+
jwt: Qe(e, "jwt"),
|
|
1904
|
+
username: Qe(Te(), "__username__"),
|
|
1889
1905
|
launch_id: 0,
|
|
1890
|
-
yuno_startdate:
|
|
1891
|
-
id:
|
|
1906
|
+
yuno_startdate: Qe(Te(), "start_date"),
|
|
1907
|
+
id: Yn(),
|
|
1892
1908
|
user_agent: "undefined" != typeof window ? window.navigator.userAgent : "",
|
|
1893
1909
|
language: "undefined" != typeof window ? window.navigator.language : "",
|
|
1894
|
-
required_services:
|
|
1910
|
+
required_services: Ye(Te(), "required_services")
|
|
1895
1911
|
};
|
|
1896
|
-
return
|
|
1912
|
+
return Ln(e, s, fr, Tr(e, Oe(Re(e)), null)), Un(e, s, "__identity__"), ir(t.gobj_timer, ze(e, "timeout_idack")), yr(e, "EV_IDENTITY_CARD", s);
|
|
1897
1913
|
}
|
|
1898
|
-
function
|
|
1899
|
-
if (
|
|
1914
|
+
function jr(e, t) {
|
|
1915
|
+
if (rn(t.event)) return -1;
|
|
1900
1916
|
let n = {}, r = t.__global__, i = t.__config__, o = t.__filter__, l = t.__service__, s = t.subscriber;
|
|
1901
|
-
return i && (n.__config__ = i), r && (n.__global__ = r), o && (n.__filter__ = o),
|
|
1917
|
+
return i && (n.__config__ = i), r && (n.__global__ = r), o && (n.__filter__ = o), Ln(e, n, fr, Tr(e, Oe(s), l)), Un(e, n, "__subscribing__"), yr(e, t.event, n);
|
|
1902
1918
|
}
|
|
1903
|
-
function
|
|
1919
|
+
function Sr(e, t, n, r) {
|
|
1904
1920
|
let i = e.priv;
|
|
1905
|
-
return
|
|
1921
|
+
return me(e) && (i.websocket = pr(e)), 0;
|
|
1906
1922
|
}
|
|
1907
|
-
function
|
|
1908
|
-
return
|
|
1923
|
+
function Or(e, t, n, r) {
|
|
1924
|
+
return $t("Websocket opened: " + e.priv.url), vr(e), 0;
|
|
1909
1925
|
}
|
|
1910
|
-
function
|
|
1926
|
+
function Nr(e, t, n, r) {
|
|
1911
1927
|
let i = e.priv, o = n.e, l = n.url;
|
|
1912
|
-
return
|
|
1928
|
+
return wt(), kt(`${we(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, mt(e, "EV_ON_CLOSE", {
|
|
1913
1929
|
url: l,
|
|
1914
1930
|
remote_yuno_name: i.remote_yuno_name,
|
|
1915
1931
|
remote_yuno_role: i.remote_yuno_role,
|
|
1916
1932
|
remote_yuno_service: i.remote_yuno_service
|
|
1917
|
-
})) : (
|
|
1933
|
+
})) : (kt(`${we(e)}: EV_ON_OPEN_ERROR cannot open ${l} (Code: ${o.code}, Reason: "${o.reason}", Clean: ${o.wasClean})`), mt(e, "EV_ON_OPEN_ERROR", {
|
|
1918
1934
|
url: l,
|
|
1919
1935
|
remote_yuno_name: i.remote_yuno_name,
|
|
1920
1936
|
remote_yuno_role: i.remote_yuno_role,
|
|
@@ -1922,21 +1938,21 @@
|
|
|
1922
1938
|
code: o.code,
|
|
1923
1939
|
reason: o.reason,
|
|
1924
1940
|
was_clean: o.wasClean
|
|
1925
|
-
})),
|
|
1941
|
+
})), me(e) && ir(i.gobj_timer, ze(e, "timeout_retry")), 0;
|
|
1926
1942
|
}
|
|
1927
|
-
function
|
|
1928
|
-
return
|
|
1943
|
+
function wr(e, t, n, r) {
|
|
1944
|
+
return vr(e), 0;
|
|
1929
1945
|
}
|
|
1930
|
-
function
|
|
1946
|
+
function Dr(e, t, n, r) {
|
|
1931
1947
|
let i = e.priv;
|
|
1932
|
-
|
|
1933
|
-
let o =
|
|
1934
|
-
|
|
1935
|
-
let a =
|
|
1948
|
+
lr(i.gobj_timer);
|
|
1949
|
+
let o = Pn(e, n, fr, !0), l = bn(e, o, "src_yuno", ""), s = bn(e, o, "src_role", ""), _ = bn(e, o, "src_service", "");
|
|
1950
|
+
et(e, "remote_yuno_name", l), et(e, "remote_yuno_role", s), et(e, "remote_yuno_service", _);
|
|
1951
|
+
let a = dn(e, n, "result", -1, 0), u = bn(e, n, "comment", "", 0), c = bn(e, n, "username", "", 0), f = hn(e, n, "services_roles", {});
|
|
1936
1952
|
if (a < 0) {
|
|
1937
|
-
|
|
1953
|
+
mr(e);
|
|
1938
1954
|
let t = {
|
|
1939
|
-
url:
|
|
1955
|
+
url: Qe(e, "url"),
|
|
1940
1956
|
result: a,
|
|
1941
1957
|
comment: u,
|
|
1942
1958
|
username: c,
|
|
@@ -1944,9 +1960,9 @@
|
|
|
1944
1960
|
remote_yuno_role: s,
|
|
1945
1961
|
remote_yuno_service: _
|
|
1946
1962
|
};
|
|
1947
|
-
|
|
1963
|
+
$e(e) ? lt(Re(e), "EV_ON_ID_NAK", t, e) : mt(e, "EV_ON_ID_NAK", t);
|
|
1948
1964
|
} else {
|
|
1949
|
-
if (
|
|
1965
|
+
if (tt(e, "ST_SESSION"), i.inside_on_open = !0, !i.inform_on_close) {
|
|
1950
1966
|
i.inform_on_close = !0;
|
|
1951
1967
|
let t = {
|
|
1952
1968
|
username: c,
|
|
@@ -1955,136 +1971,136 @@
|
|
|
1955
1971
|
remote_yuno_service: _,
|
|
1956
1972
|
services_roles: f
|
|
1957
1973
|
};
|
|
1958
|
-
|
|
1974
|
+
$e(e) ? lt(Re(e), "EV_ON_OPEN", t, e) : mt(e, "EV_ON_OPEN", t);
|
|
1959
1975
|
}
|
|
1960
1976
|
i.inside_on_open = !1, function(e) {
|
|
1961
|
-
let t =
|
|
1962
|
-
for (let n = 0; n < t.length; n++)
|
|
1977
|
+
let t = bt(e, null, null, null);
|
|
1978
|
+
for (let n = 0; n < t.length; n++) jr(e, t[n]);
|
|
1963
1979
|
}(e);
|
|
1964
1980
|
}
|
|
1965
1981
|
return 0;
|
|
1966
1982
|
}
|
|
1967
|
-
function
|
|
1983
|
+
function Rr(e, t, n, r) {
|
|
1968
1984
|
let i = e.priv.url, o = function(e, t) {
|
|
1969
1985
|
let n;
|
|
1970
1986
|
try {
|
|
1971
1987
|
n = JSON.parse(t);
|
|
1972
1988
|
} catch (e) {
|
|
1973
|
-
return
|
|
1989
|
+
return Rt("parsing inter_event json: " + e), null;
|
|
1974
1990
|
}
|
|
1975
|
-
if (!(n instanceof Object)) return
|
|
1991
|
+
if (!(n instanceof Object)) return Rt("parsing inter_event: websocket data not a json object"), null;
|
|
1976
1992
|
let r = n.event;
|
|
1977
|
-
if (!r) return
|
|
1978
|
-
if ("string" != typeof r) return
|
|
1993
|
+
if (!r) return Rt("parsing inter_event: no event"), null;
|
|
1994
|
+
if ("string" != typeof r) return Rt("parsing inter_event: event not a string"), null;
|
|
1979
1995
|
let i = n.kw;
|
|
1980
1996
|
return i ? i instanceof Object ? {
|
|
1981
1997
|
event: r,
|
|
1982
1998
|
kw: i || {}
|
|
1983
|
-
} : (
|
|
1999
|
+
} : (Rt("parsing inter_event: kw not a json object"), null) : (Rt("parsing inter_kw: no kw"), null);
|
|
1984
2000
|
}(0, n.data);
|
|
1985
|
-
if (
|
|
1986
|
-
let e =
|
|
1987
|
-
r ? r(e, o, 2, t) :
|
|
2001
|
+
if (Je(Te(), "trace_inter_event")) {
|
|
2002
|
+
let e = Oe(Te()) + " <== " + i, t = n.data.length, r = Ye(Te(), "trace_ievent_callback");
|
|
2003
|
+
r ? r(e, o, 2, t) : hr(0, e, o);
|
|
1988
2004
|
}
|
|
1989
2005
|
let l = o.event, s = o.kw;
|
|
1990
|
-
if ("ST_SESSION" !==
|
|
1991
|
-
if (
|
|
1992
|
-
if (0 ===
|
|
1993
|
-
} else
|
|
1994
|
-
return
|
|
2006
|
+
if ("ST_SESSION" !== nt(e)) {
|
|
2007
|
+
if (it(e, l, R.EVF_PUBLIC_EVENT)) {
|
|
2008
|
+
if (0 === lt(e, l, s, e)) return 0;
|
|
2009
|
+
} else Rt(`${we(e)}: event UNKNOWN in not-session state ${l}`);
|
|
2010
|
+
return mr(e), -1;
|
|
1995
2011
|
}
|
|
1996
2012
|
o = null;
|
|
1997
|
-
let _ =
|
|
1998
|
-
if (u !==
|
|
1999
|
-
let c =
|
|
2013
|
+
let _ = Cn(e, s), a = Pn(e, s, fr), u = bn(e, a, "dst_role", "");
|
|
2014
|
+
if (u !== je()) return Rt(`"It's not my role, dst_role: ${u}, my_role: ${je()}`), 0;
|
|
2015
|
+
let c = bn(e, a, "dst_service", "");
|
|
2000
2016
|
if ("__subscribing__" === _) return -1;
|
|
2001
2017
|
if ("__unsubscribing__" === _) return -1;
|
|
2002
|
-
if (
|
|
2003
|
-
let f =
|
|
2018
|
+
if (it(e, l, R.EVF_PUBLIC_EVENT)) return lt(e, l, s, e), 0;
|
|
2019
|
+
let f = ee(c, !0);
|
|
2004
2020
|
if (f) {
|
|
2005
|
-
if (!
|
|
2006
|
-
|
|
2007
|
-
} else
|
|
2021
|
+
if (!it(f, l, R.EVF_PUBLIC_EVENT)) return Rt(`${we(e)}: Service found but no event or not public, service '${we(f)}', ev '${l}'`), -1;
|
|
2022
|
+
lt(f, l, s, e);
|
|
2023
|
+
} else $e(e) ? lt(Re(e), l, s, e) : mt(e, l, s);
|
|
2008
2024
|
return 0;
|
|
2009
2025
|
}
|
|
2010
|
-
function
|
|
2026
|
+
function kr(e, t, n, r) {
|
|
2011
2027
|
return 0;
|
|
2012
2028
|
}
|
|
2013
|
-
function
|
|
2029
|
+
function $r(e, t, n, r) {
|
|
2014
2030
|
return 0;
|
|
2015
2031
|
}
|
|
2016
|
-
var
|
|
2032
|
+
var Ar = {
|
|
2017
2033
|
mt_create: function(e) {
|
|
2018
2034
|
let t = e.priv;
|
|
2019
|
-
t.gobj_timer =
|
|
2020
|
-
const n =
|
|
2021
|
-
n &&
|
|
2035
|
+
t.gobj_timer = se(Oe(e), "C_TIMER", {}, e), t.url = Qe(e, "url"), t.remote_yuno_name = Qe(e, "remote_yuno_name"), t.remote_yuno_role = Qe(e, "remote_yuno_role"), t.remote_yuno_service = Qe(e, "remote_yuno_service"), et(e, "wanted_yuno_name", t.remote_yuno_name), et(e, "wanted_yuno_role", t.remote_yuno_role), et(e, "wanted_yuno_service", t.remote_yuno_service);
|
|
2036
|
+
const n = qe(e, "subscriber");
|
|
2037
|
+
n && gt(e, null, {}, n);
|
|
2022
2038
|
},
|
|
2023
2039
|
mt_writing: function(e, t) {
|
|
2024
2040
|
let n = e.priv;
|
|
2025
2041
|
switch (t) {
|
|
2026
2042
|
case "url":
|
|
2027
|
-
n.url =
|
|
2043
|
+
n.url = Qe(e, "url");
|
|
2028
2044
|
break;
|
|
2029
2045
|
case "remote_yuno_name":
|
|
2030
|
-
n.remote_yuno_name =
|
|
2046
|
+
n.remote_yuno_name = Qe(e, "remote_yuno_name");
|
|
2031
2047
|
break;
|
|
2032
2048
|
case "remote_yuno_role":
|
|
2033
|
-
n.remote_yuno_role =
|
|
2049
|
+
n.remote_yuno_role = Qe(e, "remote_yuno_role");
|
|
2034
2050
|
break;
|
|
2035
|
-
case "remote_yuno_service": n.remote_yuno_service =
|
|
2051
|
+
case "remote_yuno_service": n.remote_yuno_service = Qe(e, "remote_yuno_service");
|
|
2036
2052
|
}
|
|
2037
2053
|
},
|
|
2038
2054
|
mt_start: function(e) {
|
|
2039
2055
|
let t = e.priv;
|
|
2040
|
-
return
|
|
2056
|
+
return ae(t.gobj_timer), t.websocket = pr(e), 0;
|
|
2041
2057
|
},
|
|
2042
2058
|
mt_stop: function(e) {
|
|
2043
2059
|
let t = e.priv;
|
|
2044
|
-
return
|
|
2060
|
+
return lr(t.gobj_timer), fe(t.gobj_timer), t.websocket && mr(e), 0;
|
|
2045
2061
|
},
|
|
2046
2062
|
mt_destroy: function(e) {},
|
|
2047
2063
|
mt_stats: function(e, t, n, r) {
|
|
2048
|
-
if ("ST_SESSION" !==
|
|
2064
|
+
if ("ST_SESSION" !== nt(e)) return Rt("Not in session"), null;
|
|
2049
2065
|
n || (n = {});
|
|
2050
|
-
let i =
|
|
2051
|
-
return o || (o = {}),
|
|
2066
|
+
let i = Tr(e, Oe(r), bn(e, n, "service", null, 0)), o = hn(e, n, "__md_stats__", null, ht.KW_EXTRACT);
|
|
2067
|
+
return o || (o = {}), Ln(e, n, "stats_stack", {
|
|
2052
2068
|
stats: t,
|
|
2053
2069
|
kw: o
|
|
2054
|
-
}),
|
|
2070
|
+
}), Ln(e, n, fr, i), n.__stats__ = t, Un(e, n, "__stats__"), yr(e, "EV_MT_STATS", n, r), null;
|
|
2055
2071
|
},
|
|
2056
2072
|
mt_command_parser: function(e, t, n, r) {
|
|
2057
|
-
if ("ST_SESSION" !==
|
|
2073
|
+
if ("ST_SESSION" !== nt(e)) return Rt("Not in session"), null;
|
|
2058
2074
|
n || (n = {});
|
|
2059
|
-
let i =
|
|
2060
|
-
return o || (o = {}),
|
|
2075
|
+
let i = Tr(e, Oe(r), bn(e, n, "service", "", 0)), o = hn(e, n, "__md_command__", null, ht.KW_EXTRACT);
|
|
2076
|
+
return o || (o = {}), Ln(e, n, "command_stack", {
|
|
2061
2077
|
command: t,
|
|
2062
2078
|
kw: o
|
|
2063
|
-
}),
|
|
2079
|
+
}), Ln(e, n, fr, i), n.__command__ = t, Un(e, n, "__command__"), yr(e, "EV_MT_COMMAND", n, r), null;
|
|
2064
2080
|
},
|
|
2065
2081
|
mt_inject_event: function(e, t, n, r) {
|
|
2066
|
-
if ("ST_SESSION" !==
|
|
2067
|
-
if (n || (n = {}),
|
|
2082
|
+
if ("ST_SESSION" !== nt(e)) return window.console.error("Not in session"), -1;
|
|
2083
|
+
if (n || (n = {}), Pn(e, n, fr));
|
|
2068
2084
|
else {
|
|
2069
|
-
let i =
|
|
2070
|
-
|
|
2085
|
+
let i = Tr(e, Oe(r), bn(e, n, "__service__", 0, 0));
|
|
2086
|
+
Vt(n, "__service__"), Ln(e, n, "__message__", t), Ln(e, n, fr, i);
|
|
2071
2087
|
}
|
|
2072
|
-
return
|
|
2088
|
+
return Un(e, n, "__message__"), yr(e, t, n, r);
|
|
2073
2089
|
},
|
|
2074
2090
|
mt_subscription_added: function(e, t) {
|
|
2075
2091
|
let n = e.priv;
|
|
2076
|
-
return "ST_SESSION" !==
|
|
2092
|
+
return "ST_SESSION" !== nt(e) || n.inside_on_open ? 0 : jr(e, t);
|
|
2077
2093
|
},
|
|
2078
2094
|
mt_subscription_deleted: function(e, t) {
|
|
2079
2095
|
let n = e.priv;
|
|
2080
|
-
if ("ST_SESSION" !==
|
|
2096
|
+
if ("ST_SESSION" !== nt(e)) return 0;
|
|
2081
2097
|
if (n.inside_on_open) return 0;
|
|
2082
|
-
if (
|
|
2098
|
+
if (rn(t.event)) return 0;
|
|
2083
2099
|
let r = {}, i = t.__global__, o = t.__config__, l = t.__filter__, s = t.__service__, _ = t.subscriber;
|
|
2084
|
-
return o && (r.__config__ = o), i && (r.__global__ = i), l && (r.__filter__ = l),
|
|
2100
|
+
return o && (r.__config__ = o), i && (r.__global__ = i), l && (r.__filter__ = l), Ln(e, r, fr, Tr(e, Oe(_), s)), Un(e, r, "__unsubscribing__"), yr(e, t.event, r, e);
|
|
2085
2101
|
}
|
|
2086
2102
|
};
|
|
2087
|
-
e.GObj = O, e.SDATA = j, e.SDATAAUTHZ = (e, t, n, r, i, o) => new
|
|
2103
|
+
e.GObj = O, e.SDATA = j, e.SDATAAUTHZ = (e, t, n, r, i, o) => new T(e, t, n, null, o, r, null, 0, null, i, null), e.SDATACM = (e, t, n, r, i, o) => new T(e, t, 0, null, o, n, null, 0, i, r, null), e.SDATACM2 = (e, t, n, r, i, o, l) => new T(e, t, n, null, l, r, null, 0, o, i, null), e.SDATADF = (e, t, n, r, i, o) => new T(e, t, n, null, o, null, r, i), e.SDATAPM = (e, t, n, r, i) => new T(e, t, n, r, i), e.SDATAPM0 = (e, t, n, r, i) => new T(e, t, n, null, i, null, null, 0, null, null, r), e.SDATA_END = v, e.SDataDesc = T, e.YUNETA_VERSION = l, Object.defineProperty(e, "__yuno__", {
|
|
2088
2104
|
enumerable: !0,
|
|
2089
2105
|
get: function() {
|
|
2090
2106
|
return p;
|
|
@@ -2095,47 +2111,47 @@
|
|
|
2095
2111
|
return t;
|
|
2096
2112
|
}, e.build_stats_response = o, e.clean_name = function(e) {
|
|
2097
2113
|
return e.replace(/[?# ^:]/g, "_");
|
|
2098
|
-
}, e.clear_timeout =
|
|
2114
|
+
}, e.clear_timeout = lr, e.cmp_two_simple_json = _n, e.command_parser = function(e, t, n, r) {}, e.createElement2 = function e(t, n) {
|
|
2099
2115
|
let [r, i, o, l] = t;
|
|
2100
|
-
if (!r) return void
|
|
2116
|
+
if (!r) return void Rt("Tag must be a valid HTML element.");
|
|
2101
2117
|
let s = document.createElement(r), _ = "";
|
|
2102
2118
|
if (i && "object" == typeof i) for (let e of Object.keys(i)) if ("style" === e && "object" == typeof i[e]) {
|
|
2103
2119
|
let t = "";
|
|
2104
2120
|
for (const n of Object.keys(i[e])) t += `${n}: ${i[e][n]};`;
|
|
2105
2121
|
s.style.cssText = t;
|
|
2106
2122
|
} 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 (
|
|
2123
|
+
if (Ht(o)) if (o = o.trim(), o.length > 0 && "<" === o[0]) s.appendChild(Mn(o));
|
|
2108
2124
|
else if (n && _) s.textContent = n(_) || o;
|
|
2109
2125
|
else s.textContent = o;
|
|
2110
|
-
else if (
|
|
2111
|
-
if (o.length > 0) if (
|
|
2126
|
+
else if (qt(o)) {
|
|
2127
|
+
if (o.length > 0) if (Ht(o[0])) s.appendChild(e(o, n));
|
|
2112
2128
|
else for (let t of o) Array.isArray(t) && t.length > 0 ? s.appendChild(e(t, n)) : t instanceof HTMLElement && s.appendChild(t);
|
|
2113
|
-
} else o instanceof HTMLElement || o instanceof Text || o instanceof SVGElement ? s.appendChild(o) : null != o && (
|
|
2129
|
+
} else o instanceof HTMLElement || o instanceof Text || o instanceof SVGElement ? s.appendChild(o) : null != o && (Rt("content ignored"), It(o));
|
|
2114
2130
|
if (l && "object" == typeof l) for (const e of Object.keys(l)) s.addEventListener(e, l[e]);
|
|
2115
2131
|
return s;
|
|
2116
|
-
}, e.createOneHtml =
|
|
2117
|
-
let n =
|
|
2118
|
-
return
|
|
2132
|
+
}, e.createOneHtml = Mn, e.create_json_record = function(e, t) {
|
|
2133
|
+
let n = Lt(e);
|
|
2134
|
+
return Ct(n, t), n;
|
|
2119
2135
|
}, e.create_template_record = function(e, t) {
|
|
2120
2136
|
let n = {};
|
|
2121
2137
|
return t || (t = {}), Object.entries(e).forEach(([e, r]) => {
|
|
2122
|
-
n[e] =
|
|
2138
|
+
n[e] = hn(null, t, e, hn(r, "default"));
|
|
2123
2139
|
}), n;
|
|
2124
|
-
}, e.current_timestamp =
|
|
2125
|
-
let n =
|
|
2126
|
-
return n &&
|
|
2140
|
+
}, e.current_timestamp = Kn, e.data_type_t = E, e.db_list_persistent_attrs = function(e, t) {
|
|
2141
|
+
let n = On(Jn(e), null, !1), r = {};
|
|
2142
|
+
return n && Qt(n) && (r = jn(e, n, t, !1)), r;
|
|
2127
2143
|
}, e.db_load_persistent_attrs = function(e, t) {
|
|
2128
|
-
let n =
|
|
2129
|
-
if (r &&
|
|
2130
|
-
let i =
|
|
2131
|
-
i =
|
|
2144
|
+
let n = Be(e, y.SDF_PERSIST), r = On(Jn(e), null, !1);
|
|
2145
|
+
if (r && Qt(r)) {
|
|
2146
|
+
let i = jn(e, r, t, !1);
|
|
2147
|
+
i = jn(e, i, n, !1), He(e, i, y.SDF_PERSIST);
|
|
2132
2148
|
}
|
|
2133
2149
|
}, e.db_remove_persistent_attrs = function(e, t) {
|
|
2134
|
-
let n =
|
|
2135
|
-
0 ===
|
|
2150
|
+
let n = Sn(e, On(Jn(e), null, !1), t, !1);
|
|
2151
|
+
0 === Bt(n) ? wn(Jn(e)) : Nn(Jn(e), n);
|
|
2136
2152
|
}, e.db_save_persistent_attrs = function(e, t) {
|
|
2137
|
-
let n =
|
|
2138
|
-
r &&
|
|
2153
|
+
let n = jn(e, Be(e, y.SDF_PERSIST), t, !1), r = On(Jn(e), null, !1);
|
|
2154
|
+
r && Qt(r) && Ft(n, r), Nn(Jn(e), n);
|
|
2139
2155
|
}, e.debounce = function(e, t = 0, n = !1) {
|
|
2140
2156
|
let r = null, i = null, o = null;
|
|
2141
2157
|
const l = (...l) => {
|
|
@@ -2160,7 +2176,7 @@
|
|
|
2160
2176
|
Object.assign(t, e);
|
|
2161
2177
|
}
|
|
2162
2178
|
return t;
|
|
2163
|
-
}, e.empty_string =
|
|
2179
|
+
}, e.empty_string = rn, e.escapeHtml = Wn, e.event_flag_t = R, e.gclass_add_ev_action = J, e.gclass_add_event_type = Q, e.gclass_add_state = B, e.gclass_check_fsm = H, e.gclass_create = M, e.gclass_event_type = q, e.gclass_find_by_name = X, e.gclass_flag_t = N, e.gclass_unregister = K, e.getPositionRelativeToBody = function(e) {
|
|
2164
2180
|
if (!e) return {
|
|
2165
2181
|
top: 0,
|
|
2166
2182
|
left: 0,
|
|
@@ -2179,57 +2195,57 @@
|
|
|
2179
2195
|
right: n + s + r,
|
|
2180
2196
|
bottom: t + l + i
|
|
2181
2197
|
};
|
|
2182
|
-
}, e.get_function_name =
|
|
2198
|
+
}, e.get_function_name = Bn, e.get_now = function() {
|
|
2183
2199
|
return Math.floor(Date.now() / 1e3);
|
|
2184
|
-
}, e.gobj_bottom_gobj =
|
|
2185
|
-
return
|
|
2186
|
-
}, e.gobj_change_state =
|
|
2187
|
-
if (
|
|
2188
|
-
let l = p &&
|
|
2189
|
-
return l && (
|
|
2200
|
+
}, e.gobj_bottom_gobj = Ie, e.gobj_change_parent = function(e, t) {
|
|
2201
|
+
return Ae(e) ? (Rt("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 && (re(e.parent, e), e.parent = null), ne(t, e), t.mt_child_added && (p && Je(p, "trace_creation") && $t(n("👦👦🔵 child_added(%s): %s", De(t), we(e))), t.mt_child_added(t, e)), 0) : (Rt(`${we(e)}: gobj_change_parent() BAD TYPE of parent`), -1);
|
|
2202
|
+
}, e.gobj_change_state = tt, e.gobj_command = function(e, t, r, o) {
|
|
2203
|
+
if (Ae(e)) return Rt("gobj NULL or DESTROYED"), -1;
|
|
2204
|
+
let l = p && ze(p, "tracing");
|
|
2205
|
+
return l && (P(n("🌀🌀 mach(%s%s), cmd: %s, src: %s", me(e) ? "" : "!!", we(e), t, we(o))), l > 1 && It(r)), e.gclass.gmt.mt_command_parser ? e.gclass.gmt.mt_command_parser(e, t, r, o) : e.gclass.command_table ? c ? c(e, t, r, o) : i(0, -1, n("%s: global command parser not available", we(e)), 0, 0) : i(0, -1, n("%s: command table not available", we(e)), 0, 0);
|
|
2190
2206
|
}, e.gobj_create = function(e, t, n, r) {
|
|
2191
|
-
return
|
|
2192
|
-
}, e.gobj_create2 =
|
|
2193
|
-
return
|
|
2194
|
-
}, e.gobj_create_pure_child =
|
|
2195
|
-
return
|
|
2207
|
+
return le(e, t, n, r, 0);
|
|
2208
|
+
}, e.gobj_create2 = le, e.gobj_create_default_service = function(e, t, n, r) {
|
|
2209
|
+
return le(e, t, n, r, w.gobj_flag_default_service | w.gobj_flag_autostart);
|
|
2210
|
+
}, e.gobj_create_pure_child = se, e.gobj_create_service = function(e, t, n, r) {
|
|
2211
|
+
return le(e, t, n, r, w.gobj_flag_service);
|
|
2196
2212
|
}, e.gobj_create_volatil = function(e, t, n, r) {
|
|
2197
|
-
return
|
|
2213
|
+
return le(e, t, n, r, w.gobj_flag_volatil);
|
|
2198
2214
|
}, e.gobj_create_yuno = function(e, t, n) {
|
|
2199
|
-
return
|
|
2200
|
-
}, e.gobj_current_state =
|
|
2201
|
-
if (
|
|
2215
|
+
return le(e, t, n, null, w.gobj_flag_yuno);
|
|
2216
|
+
}, e.gobj_current_state = nt, e.gobj_default_service = Z, e.gobj_destroy = _e, e.gobj_find_child = Me, e.gobj_find_gobj = function(e, t) {
|
|
2217
|
+
if (rn(t)) return null;
|
|
2202
2218
|
const n = t.toLowerCase();
|
|
2203
|
-
return "__default_service__" === n ? m : "__yuno__" === n || "__root__" === n ? p :
|
|
2204
|
-
}, e.gobj_find_service =
|
|
2219
|
+
return "__default_service__" === n ? m : "__yuno__" === n || "__root__" === n ? p : Ke(p, t);
|
|
2220
|
+
}, e.gobj_find_service = ee, e.gobj_find_subscribings = pt, e.gobj_find_subscriptions = bt, e.gobj_flag_t = w, e.gobj_full_name = De, e.gobj_gclass_name = Ne, e.gobj_has_attr = xe, e.gobj_has_event = it, e.gobj_has_output_event = ot, e.gobj_hsdata = G, e.gobj_is_destroying = Ae, e.gobj_is_playing = ye, e.gobj_is_pure_child = $e, e.gobj_is_running = me, e.gobj_is_service = Ee, e.gobj_is_volatil = ke, e.gobj_list_persistent_attrs = function(e, t) {
|
|
2205
2221
|
return u ? u(e, t) : null;
|
|
2206
2222
|
}, e.gobj_list_subscriptions = function(e) {
|
|
2207
|
-
let t =
|
|
2223
|
+
let t = bt(e, null, null, null);
|
|
2208
2224
|
for (let n = 0; n < t.length; n++) {
|
|
2209
|
-
let r = t[n], i =
|
|
2210
|
-
|
|
2225
|
+
let r = t[n], i = pn(e, r, "publisher", null, ht.KW_REQUIRED), o = pn(e, r, "subscriber", null, ht.KW_REQUIRED);
|
|
2226
|
+
Mt(r, "s_event", bn(e, r, "event", "", ht.KW_REQUIRED)), Mt(r, "s_publisher", we(i)), Mt(r, "s_subscriber", we(o));
|
|
2211
2227
|
}
|
|
2212
|
-
let n =
|
|
2228
|
+
let n = pt(e, 0, null, 0);
|
|
2213
2229
|
for (let t = 0; t < n.length; t++) {
|
|
2214
|
-
let r = n[t], i =
|
|
2215
|
-
|
|
2230
|
+
let r = n[t], i = pn(e, r, "publisher", null, ht.KW_REQUIRED), o = pn(e, r, "subscriber", null, ht.KW_REQUIRED);
|
|
2231
|
+
Mt(r, "s_event", bn(e, r, "event", "", ht.KW_REQUIRED)), Mt(r, "s_publisher", we(i)), Mt(r, "s_subscriber", we(o));
|
|
2216
2232
|
}
|
|
2217
2233
|
return {
|
|
2218
2234
|
subscriptions: t,
|
|
2219
2235
|
subscribings: n,
|
|
2220
|
-
"total subscriptions":
|
|
2221
|
-
total_subscribings:
|
|
2236
|
+
"total subscriptions": Jt(t),
|
|
2237
|
+
total_subscribings: Jt(n)
|
|
2222
2238
|
};
|
|
2223
2239
|
}, e.gobj_load_persistent_attrs = function(e, t) {
|
|
2224
|
-
return
|
|
2240
|
+
return Ee(e) ? s ? s(e, t) : -1 : (Rt(`${we(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
2225
2241
|
}, e.gobj_match_children = function(e, t) {
|
|
2226
|
-
if (
|
|
2242
|
+
if (Ae(e)) return Rt("gobj NULL or DESTROYED"), null;
|
|
2227
2243
|
t = t || {};
|
|
2228
2244
|
let n = [];
|
|
2229
2245
|
const r = e.dl_children;
|
|
2230
2246
|
for (let e = 0; e < r.length; e++) {
|
|
2231
2247
|
const i = r[e];
|
|
2232
|
-
|
|
2248
|
+
We(i, t) && n.push(i);
|
|
2233
2249
|
}
|
|
2234
2250
|
return n;
|
|
2235
2251
|
}, e.gobj_match_children_tree = function(e, t) {
|
|
@@ -2239,53 +2255,57 @@
|
|
|
2239
2255
|
let i = r.dl_children;
|
|
2240
2256
|
for (let r = 0; r < i.length; r++) {
|
|
2241
2257
|
let o = i[r];
|
|
2242
|
-
|
|
2258
|
+
We(o, t) && n.push(o), e(n, o);
|
|
2243
2259
|
}
|
|
2244
2260
|
}(n, e), n;
|
|
2245
|
-
}, e.gobj_match_gobj =
|
|
2261
|
+
}, e.gobj_match_gobj = We, e.gobj_name = Oe, e.gobj_parent = Re, e.gobj_pause = pe, e.gobj_play = be, e.gobj_post_event = function(e, t, n, r) {
|
|
2246
2262
|
setTimeout(() => {
|
|
2247
|
-
|
|
2263
|
+
Ae(e) || lt(e, t, n, r);
|
|
2248
2264
|
}, 10);
|
|
2249
|
-
}, e.gobj_publish_event =
|
|
2250
|
-
return
|
|
2265
|
+
}, e.gobj_publish_event = mt, e.gobj_read_attr = Ye, e.gobj_read_attrs = Be, e.gobj_read_bool_attr = Je, e.gobj_read_integer_attr = ze, e.gobj_read_pointer_attr = qe, e.gobj_read_str_attr = Qe, e.gobj_remove_persistent_attrs = function(e, t) {
|
|
2266
|
+
return Ee(e) ? a ? a(e, t) : -1 : (Rt(`${we(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
2251
2267
|
}, e.gobj_reset_volatil_attrs = function(e) {
|
|
2252
2268
|
return function(e, t, n) {
|
|
2253
|
-
if (
|
|
2269
|
+
if (Ae(e)) return Rt("gobj NULL or DESTROYED"), -1;
|
|
2254
2270
|
let r = e.gclass.attrs_table;
|
|
2255
2271
|
for (let i = 0; i < r.length; i++) {
|
|
2256
2272
|
const o = r[i];
|
|
2257
2273
|
if (o.name && !(n && o.flag & n) && (-1 === t || o.flag & t)) {
|
|
2258
|
-
const t =
|
|
2259
|
-
|
|
2274
|
+
const t = C(e, e.jn_attrs, o);
|
|
2275
|
+
Qt(e.priv) && e.priv.hasOwnProperty(o.name) && (e.priv[o.name] = t), e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, o.name);
|
|
2260
2276
|
}
|
|
2261
2277
|
}
|
|
2262
2278
|
return 0;
|
|
2263
|
-
}(e,
|
|
2279
|
+
}(e, y.SDF_VOLATIL, 0);
|
|
2264
2280
|
}, e.gobj_save_persistent_attrs = function(e, t) {
|
|
2265
|
-
return
|
|
2266
|
-
}, e.gobj_search_path =
|
|
2281
|
+
return Ee(e) ? _ ? _(e, t) : -1 : (Rt(`${we(e)}: Only gobj services can load/save writable-persistent`), -1);
|
|
2282
|
+
}, e.gobj_search_path = Ke, e.gobj_send_event = lt, e.gobj_services = function() {
|
|
2267
2283
|
let e = [];
|
|
2268
|
-
for (const t of Object.keys(b))
|
|
2284
|
+
for (const t of Object.keys(b)) xt(e, t);
|
|
2269
2285
|
return e;
|
|
2270
|
-
}, e.gobj_set_bottom_gobj =
|
|
2271
|
-
|
|
2286
|
+
}, e.gobj_set_bottom_gobj = Le, e.gobj_set_trace_machine_format = function(e) {
|
|
2287
|
+
L = 1 === Number(e) ? 1 : 0;
|
|
2288
|
+
}, e.gobj_short_name = we, e.gobj_start = ae, e.gobj_start_children = function(e) {
|
|
2289
|
+
return Ae(e) ? (Rt("gobj NULL or DESTROYED"), -1) : Ue(e, k.WALK_FIRST2LAST, ue, 0, 0);
|
|
2272
2290
|
}, e.gobj_start_tree = function(e) {
|
|
2273
|
-
return
|
|
2291
|
+
return Ae(e) ? (Rt("gobj NULL or DESTROYED"), -1) : (p && Je(p, "trace_start_stop") && P(n("⏺ ⏺ ⏺ ⏺ start_tree: %s", De(e))), e.gclass.gclass_flag & N.gcflag_manual_start || e.disabled ? 0 : (e.running || ae(e), Ce(e, k.WALK_TOP2BOTTOM, ce, 0, 0)));
|
|
2274
2292
|
}, e.gobj_start_up = function(e, t, n, r, i, o, l) {
|
|
2275
2293
|
s = t, _ = n, a = r, u = i, c = o, f = l;
|
|
2276
2294
|
const d = [["EV_STATE_CHANGED", R.EVF_SYSTEM_EVENT | R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS], [0, 0]];
|
|
2277
2295
|
for (let e = 0; e < d.length; e++) {
|
|
2278
2296
|
let t = d[e][0], n = d[e][1];
|
|
2279
|
-
|
|
2297
|
+
z(g, t, n);
|
|
2280
2298
|
}
|
|
2281
2299
|
return 0;
|
|
2282
2300
|
}, e.gobj_stats = function(e, t, r, i) {
|
|
2283
|
-
return
|
|
2284
|
-
}, e.gobj_stop =
|
|
2285
|
-
return
|
|
2286
|
-
}, e.gobj_subscribe_event =
|
|
2287
|
-
|
|
2288
|
-
|
|
2301
|
+
return Ae(e) ? (Rt("gobj NULL or DESTROYED"), -1) : e.gclass.gmt.mt_stats ? e.gclass.gmt.mt_stats(e, t, r, i) : f ? f(e, t, r, i) : o(0, -1, n("%s, stats parser not available", we(e)), 0, 0);
|
|
2302
|
+
}, e.gobj_stop = fe, e.gobj_stop_children = de, e.gobj_stop_tree = function(e) {
|
|
2303
|
+
return Ae(e) ? (Rt("gobj NULL or DESTROYED"), -1) : (p && Je(p, "trace_start_stop") && P(n("⏹ ⏹ ⏹ ⏹ stop_tree: %s", De(e))), me(e) && fe(e), Ce(e, k.WALK_TOP2BOTTOM, ge, 0, 0));
|
|
2304
|
+
}, e.gobj_subscribe_event = gt, e.gobj_trace_machine_format = function() {
|
|
2305
|
+
return L;
|
|
2306
|
+
}, e.gobj_unsubscribe_event = function(e, t, n, r) {
|
|
2307
|
+
if (null == n && (n = {}), !e) return Rt(`publisher NULL: ev ${t}`), 0;
|
|
2308
|
+
if (!r) return Rt(`subscriber NULL: ev ${t}`), 0;
|
|
2289
2309
|
const i = new Set([
|
|
2290
2310
|
"__config__",
|
|
2291
2311
|
"__global__",
|
|
@@ -2294,102 +2314,102 @@
|
|
|
2294
2314
|
"__service__"
|
|
2295
2315
|
]);
|
|
2296
2316
|
if (Object.keys(n).forEach((n) => {
|
|
2297
|
-
i.has(n) ||
|
|
2298
|
-
}),
|
|
2299
|
-
else if (!(
|
|
2300
|
-
let o =
|
|
2317
|
+
i.has(n) || Rt(`${we(e)}: key ignored in subscription (key: ${n}, event: ${t})`);
|
|
2318
|
+
}), rn(t)) t = "";
|
|
2319
|
+
else if (!(ot(e, t, R.EVF_OUTPUT_EVENT) || e.gclass.gclass_flag & N.gcflag_no_check_output_events)) return Rt(`event NOT in output event list: ${we(e)}, ev ${t}`), 0;
|
|
2320
|
+
let o = ut(e.dl_subscriptions, e, t, n, r), l = 0;
|
|
2301
2321
|
for (let t = 0; t < o.length; t++) {
|
|
2302
2322
|
let n = o[t];
|
|
2303
|
-
|
|
2323
|
+
ft(e, n, !1, !1), l++;
|
|
2304
2324
|
}
|
|
2305
|
-
return l || (
|
|
2306
|
-
}, e.gobj_unsubscribe_list =
|
|
2307
|
-
if (!
|
|
2325
|
+
return l || (kt(`${we(e)}: No subscription found`), It(n, "No subscription found")), 0;
|
|
2326
|
+
}, e.gobj_unsubscribe_list = dt, e.gobj_walk_gobj_children = Ue, e.gobj_walk_gobj_children_tree = Ce, e.gobj_write_attr = function(e, t, r, i) {
|
|
2327
|
+
if (!Ht(t)) return Rt(n("gobj_write_attr(%s): path must be a string", we(e))), -1;
|
|
2308
2328
|
let o, l = e.jn_attrs, s = t.split("`");
|
|
2309
2329
|
if (s.length <= 1) {
|
|
2310
2330
|
let i = t;
|
|
2311
|
-
return i in l && l.hasOwnProperty(i) ? (l[i] = r,
|
|
2331
|
+
return i in l && l.hasOwnProperty(i) ? (l[i] = r, Qt(e.priv) && e.priv.hasOwnProperty(i) && (e.priv[i] = r), e.obflag & D.obflag_created && !(e.obflag & D.obflag_destroyed) && e.gclass.gmt.mt_writing && e.gclass.gmt.mt_writing(e, i), 0) : (Rt(n("gobj_write_attr(%s): attr not found '%s'", we(e), i)), -1);
|
|
2312
2332
|
}
|
|
2313
2333
|
let _ = s.length;
|
|
2314
2334
|
for (let t = 0; t < _; t++) {
|
|
2315
2335
|
o = s[t];
|
|
2316
|
-
let n =
|
|
2336
|
+
let n = Me(e, { __gobj_name__: o });
|
|
2317
2337
|
if (n && t < _ - 1) {
|
|
2318
2338
|
e = n;
|
|
2319
2339
|
continue;
|
|
2320
2340
|
}
|
|
2321
2341
|
let i = e.jn_attrs;
|
|
2322
|
-
if (o in i && i.hasOwnProperty(o)) return i[o] = r,
|
|
2342
|
+
if (o in i && i.hasOwnProperty(o)) return i[o] = r, Qt(e.priv) && e.priv.hasOwnProperty(o) && (e.priv[o] = r), e.obflag & D.obflag_created && !(e.obflag & D.obflag_destroyed) && e.mt_writing && e.mt_writing(e, o), 0;
|
|
2323
2343
|
break;
|
|
2324
2344
|
}
|
|
2325
|
-
return
|
|
2326
|
-
}, e.gobj_write_attrs =
|
|
2345
|
+
return Rt(n("gobj_write_attr(%s): attr not found '%s'", we(e), o)), -1;
|
|
2346
|
+
}, e.gobj_write_attrs = He, e.gobj_write_bool_attr = Xe, e.gobj_write_integer_attr = Ze, e.gobj_write_str_attr = et, e.gobj_yuno = Te, e.gobj_yuno_id = Se, e.gobj_yuno_name = ve, e.gobj_yuno_role = je, e.id_index_in_obj_list = kn, e.index_in_list = xn, e.is_array = qt, e.is_boolean = Zt, e.is_date = function(e) {
|
|
2327
2347
|
return e instanceof Date && !isNaN(e);
|
|
2328
|
-
}, e.is_function =
|
|
2329
|
-
if (!
|
|
2348
|
+
}, e.is_function = tn, e.is_gobj = nn, e.is_metadata_key = function(e) {
|
|
2349
|
+
if (!Ht(e)) return !1;
|
|
2330
2350
|
let t;
|
|
2331
2351
|
for (t = 0; t < e.length && "_" === e[t] && !(t > 2); t++);
|
|
2332
2352
|
return 2 === t;
|
|
2333
|
-
}, e.is_null =
|
|
2334
|
-
if (!
|
|
2353
|
+
}, e.is_null = en, e.is_number = Xt, e.is_object = Qt, e.is_private_key = function(e) {
|
|
2354
|
+
if (!Ht(e)) return !1;
|
|
2335
2355
|
let t;
|
|
2336
2356
|
for (t = 0; t < e.length && "_" === e[t] && !(t > 2); t++);
|
|
2337
2357
|
return 1 === t;
|
|
2338
2358
|
}, e.is_pure_number = function(e) {
|
|
2339
|
-
if (
|
|
2340
|
-
if (!
|
|
2359
|
+
if (Xt(e)) return !0;
|
|
2360
|
+
if (!Ht(e)) return !1;
|
|
2341
2361
|
const t = Number(e);
|
|
2342
2362
|
return !isNaN(t) && "" !== e.trim() && !isNaN(t);
|
|
2343
|
-
}, e.is_string =
|
|
2344
|
-
let i =
|
|
2345
|
-
if (!i) return
|
|
2346
|
-
if (
|
|
2363
|
+
}, e.is_string = Ht, e.jdb_delete = function(e, t, n, r) {
|
|
2364
|
+
let i = hn(null, hn(null, e, "topics", null, 0), t, null, 0);
|
|
2365
|
+
if (!i) return Rt("jdb_delete: topic not found: " + t), null;
|
|
2366
|
+
if (rn(r.id)) return Rt("jdb_delete: record without id: " + r), At(r), null;
|
|
2347
2367
|
let o, l = n.split("`"), s = i;
|
|
2348
|
-
for (; (o = l.shift()) && !
|
|
2349
|
-
if (0 === l.length && s) if (
|
|
2350
|
-
let e =
|
|
2368
|
+
for (; (o = l.shift()) && !rn(o) && s;) Qt(s) && (s = hn(null, s, e.hook, null, 0)), s = Gn(s, null, o, !1);
|
|
2369
|
+
if (0 === l.length && s) if (qt(s)) {
|
|
2370
|
+
let e = kn(s, r.id);
|
|
2351
2371
|
e >= 0 && s.splice(e, 1);
|
|
2352
2372
|
} else {
|
|
2353
|
-
let t =
|
|
2373
|
+
let t = hn(null, s, e.hook, null, 0), n = kn(t, r.id);
|
|
2354
2374
|
n >= 0 && t.splice(n, 1);
|
|
2355
2375
|
}
|
|
2356
2376
|
return i;
|
|
2357
2377
|
}, e.jdb_get = function(e, t, n, r) {
|
|
2358
|
-
let i =
|
|
2359
|
-
return i ? (void 0 === r && (r = !0),
|
|
2378
|
+
let i = hn(null, hn(null, e, "topics", null, 0), t, null, 0);
|
|
2379
|
+
return i ? (void 0 === r && (r = !0), Gn(i, e.hook, n, r)) : (Rt("jdb_get: topic not found: " + t), null);
|
|
2360
2380
|
}, e.jdb_get_by_idx = function(e, t, n) {
|
|
2361
|
-
let r =
|
|
2362
|
-
return r ? n < r.length ? r[n] : {} : (
|
|
2381
|
+
let r = hn(null, hn(null, e, "topics", null, 0), t, null, 0);
|
|
2382
|
+
return r ? n < r.length ? r[n] : {} : (Rt("jdb_get_by_idx: topic not found: " + t), null);
|
|
2363
2383
|
}, e.jdb_get_topic = function(e, t) {
|
|
2364
|
-
let n =
|
|
2365
|
-
if (!n) return
|
|
2366
|
-
return
|
|
2384
|
+
let n = hn(null, e, "topics", null, 0);
|
|
2385
|
+
if (!n) return Rt("jdb topics section not found"), At(e), null;
|
|
2386
|
+
return hn(null, n, t, null, 0) || (Rt("jdb topic not found: " + t), At(n), null);
|
|
2367
2387
|
}, e.jdb_init = function(e, t, n) {
|
|
2368
|
-
n && (e =
|
|
2369
|
-
let r =
|
|
2370
|
-
|
|
2371
|
-
let i =
|
|
2372
|
-
return
|
|
2373
|
-
"__" !== t.substring(0, 2) &&
|
|
2388
|
+
n && (e = Lt(e));
|
|
2389
|
+
let r = hn(null, e, "type", [], 1);
|
|
2390
|
+
bn(null, e, "hook", "data", 1);
|
|
2391
|
+
let i = hn(null, e, "schema", {}, 1), o = hn(null, e, "topics", {}, 1);
|
|
2392
|
+
return Fn(i, function(e, t, n, i) {
|
|
2393
|
+
"__" !== t.substring(0, 2) && hn(null, o, i, Lt(r), 1);
|
|
2374
2394
|
}, t), e;
|
|
2375
2395
|
}, e.jdb_update = function(e, t, n, r) {
|
|
2376
|
-
let i =
|
|
2377
|
-
if (!i) return
|
|
2378
|
-
if (
|
|
2396
|
+
let i = hn(null, hn(null, e, "topics", null, 0), t, null, 0);
|
|
2397
|
+
if (!i) return Rt("jdb_update: topic not found: " + t), null;
|
|
2398
|
+
if (rn(r.id)) return Rt("jdb_update: record without id: " + r), At(r), null;
|
|
2379
2399
|
let o, l = n.split("`"), s = i;
|
|
2380
|
-
for (; (o = l.shift()) && !
|
|
2381
|
-
if (0 === l.length && s) if (
|
|
2400
|
+
for (; (o = l.shift()) && !rn(o) && s;) Qt(s) && (s = hn(null, s, e.hook, [], 1)), s = Gn(s, null, o, !1);
|
|
2401
|
+
if (0 === l.length && s) if (qt(s)) s.push(r);
|
|
2382
2402
|
else if (s.id === r.id) Object.assign(s, r);
|
|
2383
2403
|
else {
|
|
2384
|
-
let t =
|
|
2404
|
+
let t = hn(null, s, e.hook, [], 1), n = Gn(t, e.hook, r.id, !1);
|
|
2385
2405
|
n ? Object.assign(n, r) : t.push(r);
|
|
2386
2406
|
}
|
|
2387
2407
|
return i;
|
|
2388
|
-
}, e.json_array_append =
|
|
2408
|
+
}, e.json_array_append = Kt, e.json_array_append_new = xt, e.json_array_extend = function(e, t) {
|
|
2389
2409
|
return t ? (Array.prototype.push.apply(e, t), e) : e;
|
|
2390
|
-
}, e.json_array_remove =
|
|
2410
|
+
}, e.json_array_remove = Yt, e.json_array_size = Jt, e.json_deep_copy = Lt, e.json_is_identical = Pt, e.json_object_del = Vt, e.json_object_get = Gt, e.json_object_set = Wt, e.json_object_set_new = Mt, e.json_object_size = Bt, e.json_object_update = Ut, e.json_object_update_existing = Ct, e.json_object_update_missing = Ft, e.json_size = zt, e.jwt2json = function(e, t) {
|
|
2391
2411
|
try {
|
|
2392
|
-
let n =
|
|
2412
|
+
let n = Vn(e);
|
|
2393
2413
|
switch (t) {
|
|
2394
2414
|
case "header": return JSON.parse(n.header);
|
|
2395
2415
|
case "signature": return JSON.parse(n.signature);
|
|
@@ -2398,122 +2418,122 @@
|
|
|
2398
2418
|
} catch (e) {
|
|
2399
2419
|
return null;
|
|
2400
2420
|
}
|
|
2401
|
-
}, e.jwtDecode =
|
|
2402
|
-
if (e && !
|
|
2403
|
-
r || (r =
|
|
2421
|
+
}, e.jwtDecode = Vn, e.kw_clone_by_keys = jn, e.kw_clone_by_not_keys = Sn, e.kw_collect = function(e, t, n, r) {
|
|
2422
|
+
if (e && !nn(e) && Rt("GObj bad instanceof"), !t) return null;
|
|
2423
|
+
r || (r = vn);
|
|
2404
2424
|
let i = [];
|
|
2405
|
-
if (
|
|
2425
|
+
if (qt(t)) for (let e = 0; e < t.length; e++) {
|
|
2406
2426
|
let o = t[e];
|
|
2407
2427
|
r(o, n) && i.push(o);
|
|
2408
2428
|
}
|
|
2409
2429
|
else {
|
|
2410
|
-
if (!
|
|
2430
|
+
if (!Qt(t)) return Rt("kw_select() BAD kw parameter"), null;
|
|
2411
2431
|
r(t, n) && i.push(t);
|
|
2412
2432
|
}
|
|
2413
2433
|
return i;
|
|
2414
|
-
}, e.kw_delete =
|
|
2415
|
-
if (!n || !
|
|
2416
|
-
for (let e = 0; e < t.length; e++) if (
|
|
2417
|
-
return r &&
|
|
2418
|
-
}, e.kw_find_path =
|
|
2419
|
-
e && !
|
|
2420
|
-
let o =
|
|
2421
|
-
const l = i && i &
|
|
2434
|
+
}, e.kw_delete = fn, e.kw_find_json_in_list = function(e, t, n, r) {
|
|
2435
|
+
if (!n || !qt(t)) return r && Rt("item NULL or kw_list is not a list"), -1;
|
|
2436
|
+
for (let e = 0; e < t.length; e++) if (Pt(n, t[e])) return e;
|
|
2437
|
+
return r && Rt("item not found in this list"), -1;
|
|
2438
|
+
}, e.kw_find_path = cn, e.kw_flag_t = ht, e.kw_get_bool = gn, e.kw_get_dict = mn, e.kw_get_dict_value = hn, e.kw_get_int = dn, e.kw_get_list = function(e, t, n, r, i) {
|
|
2439
|
+
e && !nn(e) && Rt("GObj bad instanceof");
|
|
2440
|
+
let o = cn(e, t, n, !1);
|
|
2441
|
+
const l = i && i & ht.KW_REQUIRED, s = i && i & ht.KW_CREATE, _ = i && i & ht.KW_EXTRACT;
|
|
2422
2442
|
if (void 0 === o) {
|
|
2423
2443
|
if (s) {
|
|
2424
2444
|
let i = Array(r);
|
|
2425
|
-
return
|
|
2445
|
+
return En(e, t, n, i), i;
|
|
2426
2446
|
}
|
|
2427
|
-
return l && (
|
|
2447
|
+
return l && (Rt(`path not found: '${n}'`), It(t)), Array(r);
|
|
2428
2448
|
}
|
|
2429
|
-
return _ &&
|
|
2430
|
-
}, e.kw_get_local_storage_value =
|
|
2431
|
-
e && !
|
|
2432
|
-
let o =
|
|
2433
|
-
const l = i && i &
|
|
2449
|
+
return _ && fn(e, t, n), qt(o) ? Array(o) : (l && (Rt(`path value MUST BE an array: ${n}`), At(t)), Array(r));
|
|
2450
|
+
}, e.kw_get_local_storage_value = On, e.kw_get_pointer = pn, e.kw_get_real = function(e, t, n, r, i) {
|
|
2451
|
+
e && !nn(e) && Rt("GObj bad instanceof");
|
|
2452
|
+
let o = cn(e, t, n, !1);
|
|
2453
|
+
const l = i && i & ht.KW_REQUIRED, s = i && i & ht.KW_CREATE, _ = i && i & ht.KW_EXTRACT;
|
|
2434
2454
|
if (void 0 === o) {
|
|
2435
2455
|
if (s) {
|
|
2436
2456
|
let i = Number(r);
|
|
2437
|
-
return
|
|
2457
|
+
return En(e, t, n, i), i;
|
|
2438
2458
|
}
|
|
2439
|
-
return l && (
|
|
2459
|
+
return l && (Rt(`path not found: '${n}'`), It(t)), Number(r);
|
|
2440
2460
|
}
|
|
2441
|
-
return _ &&
|
|
2442
|
-
}, e.kw_get_str =
|
|
2443
|
-
if (e && !
|
|
2444
|
-
r || (r =
|
|
2461
|
+
return _ && fn(e, t, n), Xt(o) ? Number(o) : (l && (Rt(`path value MUST BE a number: ${n}`), At(t)), Number(r));
|
|
2462
|
+
}, e.kw_get_str = bn, e.kw_has_key = un, e.kw_match_simple = vn, e.kw_pop = an, e.kw_remove_local_storage_value = wn, e.kw_select = function(e, t, n, r) {
|
|
2463
|
+
if (e && !nn(e) && Rt("GObj bad instanceof"), !t) return null;
|
|
2464
|
+
r || (r = vn);
|
|
2445
2465
|
let i = [];
|
|
2446
|
-
if (
|
|
2466
|
+
if (qt(t)) for (let e = 0; e < t.length; e++) {
|
|
2447
2467
|
let o = t[e];
|
|
2448
|
-
r(o, n) && i.push(
|
|
2468
|
+
r(o, n) && i.push(Lt(o));
|
|
2449
2469
|
}
|
|
2450
2470
|
else {
|
|
2451
|
-
if (!
|
|
2452
|
-
r(t, n) && i.push(
|
|
2471
|
+
if (!Qt(t)) return Rt("kw_select() BAD kw parameter"), null;
|
|
2472
|
+
r(t, n) && i.push(Lt(t));
|
|
2453
2473
|
}
|
|
2454
2474
|
return i;
|
|
2455
|
-
}, e.kw_set_dict_value =
|
|
2456
|
-
e && !
|
|
2457
|
-
let o =
|
|
2475
|
+
}, e.kw_set_dict_value = En, e.kw_set_local_storage_value = Nn, e.kw_set_subdict_value = yn, e.kwid_collect = Rn, e.kwid_find_one_record = function(e, t, n, r, i) {
|
|
2476
|
+
e && !nn(e) && Rt("GObj bad instanceof");
|
|
2477
|
+
let o = Rn(e, t, n, r, i);
|
|
2458
2478
|
return o.length > 0 ? o[0] : null;
|
|
2459
2479
|
}, e.kwid_get_ids = function(e, t) {
|
|
2460
|
-
if (e && !
|
|
2480
|
+
if (e && !nn(e) && Rt("GObj bad instanceof"), !t) return [];
|
|
2461
2481
|
let n = [];
|
|
2462
|
-
if (
|
|
2463
|
-
else if (
|
|
2464
|
-
else
|
|
2465
|
-
if (
|
|
2466
|
-
else if (
|
|
2467
|
-
let r =
|
|
2482
|
+
if (Ht(t)) n.push(t);
|
|
2483
|
+
else if (Qt(t)) for (let e in t) t.hasOwnProperty(e) && n.push(e);
|
|
2484
|
+
else qt(t) && t.forEach(function(t) {
|
|
2485
|
+
if (Ht(t)) rn(t) || n.push(t);
|
|
2486
|
+
else if (Qt(t)) {
|
|
2487
|
+
let r = bn(e, t, "id", 0, 0);
|
|
2468
2488
|
r && n.push(r);
|
|
2469
2489
|
}
|
|
2470
2490
|
});
|
|
2471
2491
|
return n;
|
|
2472
|
-
}, e.kwid_match_id =
|
|
2473
|
-
e && !
|
|
2492
|
+
}, e.kwid_match_id = Dn, e.kwid_new_dict = function(e, t, n) {
|
|
2493
|
+
e && !nn(e) && Rt("GObj bad instanceof");
|
|
2474
2494
|
let r = {};
|
|
2475
|
-
if (
|
|
2476
|
-
else if (
|
|
2477
|
-
let n = t[e], i =
|
|
2478
|
-
|
|
2495
|
+
if (rn(n) || (t = cn(e, t, n)), Qt(t)) r = t;
|
|
2496
|
+
else if (qt(t)) for (let e = 0; e < t.length; e++) {
|
|
2497
|
+
let n = t[e], i = bn(n, "id", null, !1);
|
|
2498
|
+
rn(i) || (r[i] = n);
|
|
2479
2499
|
}
|
|
2480
|
-
else
|
|
2500
|
+
else Rt(`${we(e)} kwid_new_dict: data type unknown`);
|
|
2481
2501
|
return r;
|
|
2482
2502
|
}, e.list2options = function(e, t, n) {
|
|
2483
2503
|
t = t || "id", n = n || "value";
|
|
2484
2504
|
let r = [];
|
|
2485
|
-
if (
|
|
2505
|
+
if (qt(e)) for (let i = 0; i < e.length; i++) {
|
|
2486
2506
|
let o = e[i];
|
|
2487
|
-
if (
|
|
2507
|
+
if (Ht(o)) r.push({
|
|
2488
2508
|
id: e[i],
|
|
2489
2509
|
value: e[i]
|
|
2490
2510
|
});
|
|
2491
|
-
else if (
|
|
2511
|
+
else if (Qt(o)) {
|
|
2492
2512
|
let e = {};
|
|
2493
|
-
if (
|
|
2494
|
-
if (!
|
|
2495
|
-
if (!(
|
|
2496
|
-
|
|
2513
|
+
if (un(o, t)) {
|
|
2514
|
+
if (!un(o, n)) {
|
|
2515
|
+
if (!(zt(o) > 0)) {
|
|
2516
|
+
Rt("list2options(): object without field value: " + n);
|
|
2497
2517
|
continue;
|
|
2498
2518
|
}
|
|
2499
2519
|
n = Object.keys(o)[0];
|
|
2500
2520
|
}
|
|
2501
2521
|
e.id = o[t], e.value = o[n];
|
|
2502
2522
|
} else {
|
|
2503
|
-
if (!(
|
|
2504
|
-
|
|
2523
|
+
if (!(zt(o) > 0)) {
|
|
2524
|
+
Rt("list2options(): object without field id: " + t);
|
|
2505
2525
|
continue;
|
|
2506
2526
|
}
|
|
2507
2527
|
t = Object.keys(o)[0], e.id = t, e.value = o[t];
|
|
2508
2528
|
}
|
|
2509
2529
|
r.push(e);
|
|
2510
|
-
} else
|
|
2530
|
+
} else Rt("list2options(): case1 not implemented");
|
|
2511
2531
|
}
|
|
2512
|
-
else if (
|
|
2532
|
+
else if (Qt(e)) for (let t of Object.keys(e)) r.push({
|
|
2513
2533
|
id: t,
|
|
2514
2534
|
value: t
|
|
2515
2535
|
});
|
|
2516
|
-
else
|
|
2536
|
+
else Rt("list2options(): case2 not implemented");
|
|
2517
2537
|
return r;
|
|
2518
2538
|
}, e.load_json_file = function(e, t, n) {
|
|
2519
2539
|
let r = new XMLHttpRequest();
|
|
@@ -2521,18 +2541,18 @@
|
|
|
2521
2541
|
if (4 === r.readyState) if (200 === r.status || 0 === (e = r).status && e.responseText && e.responseURL.startsWith("file:")) try {
|
|
2522
2542
|
t(JSON.parse(r.responseText));
|
|
2523
2543
|
} catch (e) {
|
|
2524
|
-
n && (
|
|
2544
|
+
n && (Rt(`JSON parse status ${r.status}, error: ${e.message}`), n(r.status));
|
|
2525
2545
|
}
|
|
2526
2546
|
else n && n(r.status);
|
|
2527
2547
|
var e;
|
|
2528
2548
|
}, r.send();
|
|
2529
|
-
}, e.log_debug =
|
|
2530
|
-
let t =
|
|
2531
|
-
|
|
2532
|
-
}, e.log_warning =
|
|
2549
|
+
}, e.log_debug = $t, e.log_error = Rt, e.log_info = function(e) {
|
|
2550
|
+
let t = Dt(e), n = Kn();
|
|
2551
|
+
vt && vt("%c" + n + " INFO: " + String(t), "color:cyan"), Nt("info", t, n);
|
|
2552
|
+
}, e.log_warning = kt, e.msg_iev_get_msg_type = Cn, e.msg_iev_get_stack = Pn, e.msg_iev_push_stack = Ln, e.msg_iev_read_key = An, e.msg_iev_set_msg_type = Un, e.msg_iev_write_key = In, e.node_uuid = Yn, e.parseBoolean = on, e.parseSVG = function(e) {
|
|
2533
2553
|
return new DOMParser().parseFromString(e, "image/svg+xml").firstChild;
|
|
2534
2554
|
}, e.refresh_language = function(e, t) {
|
|
2535
|
-
|
|
2555
|
+
tn(t) ? (e || (e = document), e.querySelectorAll("[data-i18n]").forEach(function(e) {
|
|
2536
2556
|
let n = e.getAttribute("data-i18n");
|
|
2537
2557
|
for (let r of e.childNodes) if (r.nodeType === Node.TEXT_NODE) {
|
|
2538
2558
|
n || (n = r.nodeValue), r.nodeValue = t(n);
|
|
@@ -2544,25 +2564,25 @@
|
|
|
2544
2564
|
}), e.querySelectorAll("[data-i18n-aria-label]").forEach(function(e) {
|
|
2545
2565
|
let n = e.getAttribute("data-i18n-aria-label");
|
|
2546
2566
|
n && e.setAttribute("aria-label", t(n));
|
|
2547
|
-
})) :
|
|
2567
|
+
})) : Rt("You must supply a translation function");
|
|
2548
2568
|
}, e.register_c_ievent_cli = function() {
|
|
2549
2569
|
return function(e) {
|
|
2550
|
-
if (
|
|
2570
|
+
if (br) return Rt(`GClass ALREADY created: ${e}`), -1;
|
|
2551
2571
|
const t = [
|
|
2552
2572
|
["ST_DISCONNECTED", [
|
|
2553
2573
|
[
|
|
2554
2574
|
"EV_ON_OPEN",
|
|
2555
|
-
|
|
2575
|
+
Or,
|
|
2556
2576
|
"ST_WAIT_IDENTITY_CARD_ACK"
|
|
2557
2577
|
],
|
|
2558
2578
|
[
|
|
2559
2579
|
"EV_ON_CLOSE",
|
|
2560
|
-
|
|
2580
|
+
Nr,
|
|
2561
2581
|
null
|
|
2562
2582
|
],
|
|
2563
2583
|
[
|
|
2564
2584
|
"EV_TIMEOUT",
|
|
2565
|
-
|
|
2585
|
+
Sr,
|
|
2566
2586
|
null
|
|
2567
2587
|
],
|
|
2568
2588
|
[
|
|
@@ -2574,22 +2594,22 @@
|
|
|
2574
2594
|
["ST_WAIT_IDENTITY_CARD_ACK", [
|
|
2575
2595
|
[
|
|
2576
2596
|
"EV_ON_MESSAGE",
|
|
2577
|
-
|
|
2597
|
+
Rr,
|
|
2578
2598
|
null
|
|
2579
2599
|
],
|
|
2580
2600
|
[
|
|
2581
2601
|
"EV_IDENTITY_CARD_ACK",
|
|
2582
|
-
|
|
2602
|
+
Dr,
|
|
2583
2603
|
null
|
|
2584
2604
|
],
|
|
2585
2605
|
[
|
|
2586
2606
|
"EV_ON_CLOSE",
|
|
2587
|
-
|
|
2607
|
+
Nr,
|
|
2588
2608
|
"ST_DISCONNECTED"
|
|
2589
2609
|
],
|
|
2590
2610
|
[
|
|
2591
2611
|
"EV_TIMEOUT",
|
|
2592
|
-
|
|
2612
|
+
wr,
|
|
2593
2613
|
null
|
|
2594
2614
|
],
|
|
2595
2615
|
[
|
|
@@ -2601,22 +2621,22 @@
|
|
|
2601
2621
|
["ST_SESSION", [
|
|
2602
2622
|
[
|
|
2603
2623
|
"EV_ON_MESSAGE",
|
|
2604
|
-
|
|
2624
|
+
Rr,
|
|
2605
2625
|
null
|
|
2606
2626
|
],
|
|
2607
2627
|
[
|
|
2608
2628
|
"EV_MT_STATS",
|
|
2609
|
-
|
|
2629
|
+
kr,
|
|
2610
2630
|
null
|
|
2611
2631
|
],
|
|
2612
2632
|
[
|
|
2613
2633
|
"EV_MT_COMMAND",
|
|
2614
|
-
|
|
2634
|
+
$r,
|
|
2615
2635
|
null
|
|
2616
2636
|
],
|
|
2617
2637
|
[
|
|
2618
2638
|
"EV_ON_CLOSE",
|
|
2619
|
-
|
|
2639
|
+
Nr,
|
|
2620
2640
|
"ST_DISCONNECTED"
|
|
2621
2641
|
],
|
|
2622
2642
|
[
|
|
@@ -2627,7 +2647,7 @@
|
|
|
2627
2647
|
]],
|
|
2628
2648
|
[null, null]
|
|
2629
2649
|
];
|
|
2630
|
-
return (
|
|
2650
|
+
return (br = M(e, [
|
|
2631
2651
|
["EV_ON_MESSAGE", R.EVF_OUTPUT_EVENT],
|
|
2632
2652
|
["EV_IDENTITY_CARD_ACK", R.EVF_PUBLIC_EVENT],
|
|
2633
2653
|
["EV_ON_ID_NAK", R.EVF_PUBLIC_EVENT | R.EVF_OUTPUT_EVENT],
|
|
@@ -2638,48 +2658,50 @@
|
|
|
2638
2658
|
["EV_ON_OPEN_ERROR", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS],
|
|
2639
2659
|
["EV_TIMEOUT", 0],
|
|
2640
2660
|
[null, 0]
|
|
2641
|
-
], t,
|
|
2661
|
+
], t, Ar, 0, gr, dr, 0, 0, 0, N.gcflag_no_check_output_events)) ? 0 : -1;
|
|
2642
2662
|
}("C_IEVENT_CLI");
|
|
2643
2663
|
}, e.register_c_timer = function() {
|
|
2644
2664
|
return function(e) {
|
|
2645
|
-
if (
|
|
2665
|
+
if (tr) return Rt(`GClass ALREADY created: ${e}`), -1;
|
|
2646
2666
|
const t = [["ST_IDLE", [[
|
|
2647
2667
|
"EV_TIMEOUT",
|
|
2648
|
-
|
|
2668
|
+
nr,
|
|
2649
2669
|
null
|
|
2650
2670
|
]]]];
|
|
2651
|
-
return (
|
|
2671
|
+
return (tr = M(e, [
|
|
2652
2672
|
["EV_TIMEOUT", R.EVF_OUTPUT_EVENT],
|
|
2653
2673
|
["EV_TIMEOUT_PERIODIC", R.EVF_OUTPUT_EVENT],
|
|
2654
2674
|
[0, 0]
|
|
2655
|
-
], t,
|
|
2675
|
+
], t, rr, 0, Zn, er, 0, 0, 0, N.gcflag_manual_start)) ? 0 : -1;
|
|
2656
2676
|
}("C_TIMER");
|
|
2657
2677
|
}, e.register_c_yuno = function() {
|
|
2658
2678
|
return function(e) {
|
|
2659
|
-
if (
|
|
2679
|
+
if (ar) return Rt(`GClass ALREADY created: ${e}`), -1;
|
|
2660
2680
|
const t = [["ST_IDLE", [[
|
|
2661
2681
|
"EV_TIMEOUT_PERIODIC",
|
|
2662
|
-
|
|
2682
|
+
ur,
|
|
2663
2683
|
null
|
|
2664
2684
|
]]]];
|
|
2665
|
-
return (
|
|
2685
|
+
return (ar = M(e, [["EV_TIMEOUT_PERIODIC", R.EVF_OUTPUT_EVENT | R.EVF_NO_WARN_SUBS], [0, 0]], t, cr, 0, sr, _r, 0, 0, 0, 0)) ? 0 : -1;
|
|
2666
2686
|
}("C_YUNO");
|
|
2667
2687
|
}, e.safeSrc = function(e) {
|
|
2668
2688
|
if (!e) return "";
|
|
2669
2689
|
const t = String(e).trim();
|
|
2670
|
-
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" :
|
|
2671
|
-
}, e.sdata_flag_t =
|
|
2690
|
+
return /^javascript:/i.test(t) || /^data:/i.test(t) ? "" : Wn(t);
|
|
2691
|
+
}, e.sdata_flag_t = y, e.send_http_json_post = function(e, t, n) {
|
|
2672
2692
|
let r = new XMLHttpRequest();
|
|
2673
2693
|
r.open("POST", e), r.setRequestHeader("Accept", "application/json"), r.setRequestHeader("Content-Type", "application/json"), r.onreadystatechange = function() {
|
|
2674
2694
|
4 === r.readyState && n(r.status, r.responseText);
|
|
2675
2695
|
}, r.send(t);
|
|
2676
|
-
}, e.
|
|
2696
|
+
}, e.set_log_callback = function(e) {
|
|
2697
|
+
St = "function" == typeof e ? e : null;
|
|
2698
|
+
}, e.set_remote_log_functions = wt, e.set_timeout = ir, e.set_timeout_periodic = or, e.sprintf = n, e.stats_parser = function(e, t, n, r) {}, e.str_in_list = $n, e.strcasecmp = sn, e.strcmp = ln, e.strncmp = function(e, t, n) {
|
|
2677
2699
|
var r = (e + "").substring(0, n), i = (t + "").substring(0, n);
|
|
2678
2700
|
return r === i ? 0 : r > i ? 1 : -1;
|
|
2679
2701
|
}, e.strs_in_list = function(e, t, n) {
|
|
2680
|
-
if (!e) return
|
|
2681
|
-
if (!t) return
|
|
2682
|
-
for (let r = 0; r < t.length; r++) if (
|
|
2702
|
+
if (!e) return Rt("ERROR: strs_in_list() list empty"), !1;
|
|
2703
|
+
if (!t) return Rt("ERROR: strs_in_list() str empty"), !1;
|
|
2704
|
+
for (let r = 0; r < t.length; r++) if ($n(e, t[r], n)) return !0;
|
|
2683
2705
|
return !1;
|
|
2684
2706
|
}, e.strstr = function(e, t, n) {
|
|
2685
2707
|
var r;
|
|
@@ -2697,13 +2719,13 @@
|
|
|
2697
2719
|
default_value: void 0,
|
|
2698
2720
|
placeholder: void 0
|
|
2699
2721
|
};
|
|
2700
|
-
if (
|
|
2722
|
+
if (Ht(t)) {
|
|
2701
2723
|
let e = t.split(".");
|
|
2702
2724
|
for (let t = 0; t < e.length; t++) {
|
|
2703
2725
|
let r = e[t];
|
|
2704
|
-
if (
|
|
2705
|
-
else if (
|
|
2706
|
-
else if (
|
|
2726
|
+
if ($n(Qn, r)) n.real_type || (n.real_type = r);
|
|
2727
|
+
else if ($n(Hn, r)) n.type || (n.type = r);
|
|
2728
|
+
else if ($n(qn, r)) switch (r) {
|
|
2707
2729
|
case "writable":
|
|
2708
2730
|
n.is_writable = !0;
|
|
2709
2731
|
break;
|
|
@@ -2715,23 +2737,23 @@
|
|
|
2715
2737
|
}
|
|
2716
2738
|
}
|
|
2717
2739
|
n.real_type || (n.real_type = "string");
|
|
2718
|
-
} else
|
|
2740
|
+
} else Qt(t) ? (n = Xn(t), n.name || (n.name = e), n.header || (n.header = e)) : qt(t) && (n.real_type = "array", n.enum_list = t);
|
|
2719
2741
|
return n.type || (n.type = n.real_type), n;
|
|
2720
2742
|
}, e.timeTracker = function(e = "Time Tracker", t = !1) {
|
|
2721
2743
|
const n = e, r = performance.now();
|
|
2722
2744
|
let i = r;
|
|
2723
|
-
return t &&
|
|
2745
|
+
return t && kt(`--\x3e ${n} - starting`), { mark: (e = "Intermediate", o = "") => {
|
|
2724
2746
|
const l = performance.now(), s = (l - i) / 1e3, _ = (l - r) / 1e3;
|
|
2725
|
-
return t &&
|
|
2747
|
+
return t && kt(`--\x3e ${n} ${e} - partial: ${s} sec, total: ${_} sec, ${o}`), i = l, {
|
|
2726
2748
|
partial: s,
|
|
2727
2749
|
total: _
|
|
2728
2750
|
};
|
|
2729
2751
|
} };
|
|
2730
|
-
}, e.trace_json =
|
|
2731
|
-
if (
|
|
2752
|
+
}, e.trace_json = It, e.trace_msg = At, e.treedb_decoder_fkey = zn, e.treedb_decoder_hook = function(e, t) {
|
|
2753
|
+
if (Ht(t)) {
|
|
2732
2754
|
if (-1 === t.indexOf("^")) {
|
|
2733
2755
|
let n, r = e.hook;
|
|
2734
|
-
if (1 !==
|
|
2756
|
+
if (1 !== Bt(r)) return Rt("bad hook 1"), Rt(e), Rt(t), null;
|
|
2735
2757
|
for (let e of Object.keys(r)) {
|
|
2736
2758
|
n = e, r[e];
|
|
2737
2759
|
break;
|
|
@@ -2743,25 +2765,25 @@
|
|
|
2743
2765
|
}
|
|
2744
2766
|
{
|
|
2745
2767
|
let n = t.split("^");
|
|
2746
|
-
return 2 !== n.length ? (
|
|
2768
|
+
return 2 !== n.length ? (Rt("bad hook 2"), Rt(e), Rt(t), null) : {
|
|
2747
2769
|
topic_name: n[0],
|
|
2748
2770
|
id: n[1]
|
|
2749
2771
|
};
|
|
2750
2772
|
}
|
|
2751
2773
|
}
|
|
2752
|
-
return
|
|
2774
|
+
return Qt(t) ? {
|
|
2753
2775
|
topic_name: t.topic_name,
|
|
2754
2776
|
id: t.id
|
|
2755
|
-
} : (
|
|
2777
|
+
} : (Rt("bad hook 3"), Rt(e), Rt(t), null);
|
|
2756
2778
|
}, e.treedb_encoder_fkey = function(e, t) {
|
|
2757
|
-
let n =
|
|
2779
|
+
let n = zn(e, t);
|
|
2758
2780
|
return n ? n.topic_name + "^" + n.id + "^" + n.hook_name : null;
|
|
2759
|
-
}, e.treedb_get_field_desc =
|
|
2760
|
-
if (
|
|
2781
|
+
}, e.treedb_get_field_desc = Xn, e.treedb_hook_data_size = function(e) {
|
|
2782
|
+
if (qt(e) && 1 === zt(e)) {
|
|
2761
2783
|
let t = e[0];
|
|
2762
|
-
return
|
|
2784
|
+
return un(t, "size") ? t.size : 1;
|
|
2763
2785
|
}
|
|
2764
|
-
return
|
|
2786
|
+
return zt(e);
|
|
2765
2787
|
}, e.vsprintf = function(e, t) {
|
|
2766
2788
|
return n.apply(null, [e].concat(t || []));
|
|
2767
2789
|
};
|