@yuneta/gobj-js 7.26.23 → 7.26.25

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.
@@ -865,6 +865,112 @@ var JSON_NUMBER_TEXT = /^-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?$/;
865
865
  var INT64_MIN = -(2n ** 63n);
866
866
  var INT64_MAX = 2n ** 63n - 1n;
867
867
  var REFUSED_TEXT = "a text that does not read as one";
868
+ var JSON_NUMBER_TOKEN = /-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?/y;
869
+ function is_surrogate_pair(high, low) {
870
+ return high >= 55296 && high <= 56319 && low >= 56320 && low <= 57343;
871
+ }
872
+ var JSON_MAX_DEPTH = 2048;
873
+ function json_text_refused_by_c(s) {
874
+ const n = s.length;
875
+ let i = 0;
876
+ let depth = 0;
877
+ const in_object = [];
878
+ let key_next = false;
879
+ while (i < n) {
880
+ const c = s.charCodeAt(i);
881
+ if (c === 123 || c === 91) {
882
+ depth++;
883
+ if (depth > JSON_MAX_DEPTH) return true;
884
+ in_object.push(c === 123);
885
+ key_next = c === 123;
886
+ i++;
887
+ continue;
888
+ }
889
+ if (c === 125 || c === 93) {
890
+ depth--;
891
+ in_object.pop();
892
+ key_next = false;
893
+ i++;
894
+ continue;
895
+ }
896
+ if (c === 44) {
897
+ key_next = in_object.length > 0 && in_object[in_object.length - 1];
898
+ i++;
899
+ continue;
900
+ }
901
+ if (c === 58) {
902
+ key_next = false;
903
+ i++;
904
+ continue;
905
+ }
906
+ if (c === 116 || c === 102 || c === 110) {
907
+ if (depth + 1 > JSON_MAX_DEPTH) return true;
908
+ i += c === 102 ? 5 : 4;
909
+ continue;
910
+ }
911
+ if (c === 34) {
912
+ if (!key_next && depth + 1 > JSON_MAX_DEPTH) return true;
913
+ key_next = false;
914
+ i++;
915
+ while (i < n) {
916
+ const d = s.charCodeAt(i);
917
+ if (d === 34) {
918
+ i++;
919
+ break;
920
+ }
921
+ if (d === 92 && s[i + 1] === "u") {
922
+ const u = parseInt(s.substring(i + 2, i + 6), 16);
923
+ if (u === 0) return true;
924
+ if (u >= 55296 && u <= 57343) {
925
+ if (!is_surrogate_pair(u, s[i + 6] === "\\" && s[i + 7] === "u" ? parseInt(s.substring(i + 8, i + 12), 16) : -1)) return true;
926
+ i += 12;
927
+ continue;
928
+ }
929
+ i += 6;
930
+ continue;
931
+ }
932
+ if (d === 92) {
933
+ i += 2;
934
+ continue;
935
+ }
936
+ if (d >= 55296 && d <= 57343) {
937
+ if (!is_surrogate_pair(d, s.charCodeAt(i + 1))) return true;
938
+ i += 2;
939
+ continue;
940
+ }
941
+ i++;
942
+ }
943
+ continue;
944
+ }
945
+ if (c === 45 || c >= 48 && c <= 57) {
946
+ if (depth + 1 > JSON_MAX_DEPTH) return true;
947
+ JSON_NUMBER_TOKEN.lastIndex = i;
948
+ const m = JSON_NUMBER_TOKEN.exec(s);
949
+ if (!m) return true;
950
+ const token = m[0];
951
+ if (/[.eE]/.test(token)) {
952
+ if (!Number.isFinite(Number(token))) return true;
953
+ } else {
954
+ const big = BigInt(token);
955
+ if (big < INT64_MIN || big > INT64_MAX) return true;
956
+ }
957
+ i += token.length;
958
+ continue;
959
+ }
960
+ i++;
961
+ }
962
+ return false;
963
+ }
964
+ function parse_json_text_as_c(s) {
965
+ let jn;
966
+ try {
967
+ jn = JSON.parse(s);
968
+ } catch (e) {
969
+ return;
970
+ }
971
+ if (json_text_refused_by_c(s)) return;
972
+ return jn;
973
+ }
868
974
  function value_has_shape(type, value) {
869
975
  if (DTP_IS_STRING(type)) return is_string(value);
870
976
  if (DTP_IS_DICT(type)) return is_object(value);
@@ -876,7 +982,7 @@ function shape_of_value(value) {
876
982
  if (is_array(value)) return "an array";
877
983
  if (is_object(value)) return "an object";
878
984
  if (is_string(value)) return REFUSED_TEXT;
879
- if (typeof value === "number") return Number.isInteger(value) ? "an integer" : "a real";
985
+ if (typeof value === "number") return Number.isInteger(value) && Math.abs(value) <= 0x8000000000000000 ? "an integer" : "a real";
880
986
  if (typeof value === "boolean") return "a boolean";
881
987
  return "null";
882
988
  }
@@ -897,7 +1003,7 @@ function number_as_type(type, value) {
897
1003
  value: value ? 1 : 0,
898
1004
  refused: null
899
1005
  };
900
- if (!(value >= -0x8000000000000000 && value < 0x8000000000000000)) return {
1006
+ if (!(value >= -0x8000000000000000 && value <= 0x8000000000000000)) return {
901
1007
  value: void 0,
902
1008
  refused: "a number out of its range"
903
1009
  };
@@ -968,16 +1074,8 @@ function text2parameter(type, s, from_kw) {
968
1074
  };
969
1075
  }
970
1076
  if (DTP_IS_DICT(type) || DTP_IS_LIST(type)) {
971
- let jn;
972
- try {
973
- jn = JSON.parse(s);
974
- } catch (e) {
975
- return {
976
- value: void 0,
977
- refused: REFUSED_TEXT
978
- };
979
- }
980
- if (!value_has_shape(type, jn)) return {
1077
+ const jn = parse_json_text_as_c(s);
1078
+ if (jn === void 0 || !value_has_shape(type, jn)) return {
981
1079
  value: void 0,
982
1080
  refused: REFUSED_TEXT
983
1081
  };
@@ -986,12 +1084,12 @@ function text2parameter(type, s, from_kw) {
986
1084
  refused: null
987
1085
  };
988
1086
  }
989
- if (DTP_IS_JSON(type)) try {
990
- return {
991
- value: JSON.parse(s),
1087
+ if (DTP_IS_JSON(type)) {
1088
+ const jn = parse_json_text_as_c(s);
1089
+ if (jn !== void 0) return {
1090
+ value: jn,
992
1091
  refused: null
993
1092
  };
994
- } catch (e) {
995
1093
  const t = s.replace(/^[ \t]+/, "");
996
1094
  if (t.startsWith("{") || t.startsWith("[") || t.startsWith("\"")) return {
997
1095
  value: void 0,
@@ -1066,6 +1164,10 @@ function command_parameter_from_json(type, value) {
1066
1164
  refused: shape_of_value(value)
1067
1165
  };
1068
1166
  if (DTP_IS_NUMBER(type)) return number_as_type(type, value);
1167
+ if (!is_json_value(value)) return {
1168
+ value: void 0,
1169
+ refused: NO_JSON_TEXT
1170
+ };
1069
1171
  return {
1070
1172
  value,
1071
1173
  refused: null
@@ -1084,8 +1186,44 @@ var TYPES_READ = [
1084
1186
  data_type_t.DTP_LIST,
1085
1187
  data_type_t.DTP_DICT
1086
1188
  ];
1189
+ var LEAVE_NODE = Symbol("leave");
1190
+ function is_json_value(value) {
1191
+ const on_path = /* @__PURE__ */ new Set();
1192
+ const stack = [value];
1193
+ while (stack.length) {
1194
+ const v = stack.pop();
1195
+ if (v === LEAVE_NODE) {
1196
+ on_path.delete(stack.pop());
1197
+ continue;
1198
+ }
1199
+ if (typeof v === "bigint") return false;
1200
+ if (v === null || typeof v !== "object") continue;
1201
+ if (on_path.has(v)) return false;
1202
+ const array = Array.isArray(v);
1203
+ if (!array) {
1204
+ const proto = Object.getPrototypeOf(v);
1205
+ if (proto !== Object.prototype && proto !== null) return false;
1206
+ }
1207
+ on_path.add(v);
1208
+ stack.push(v, LEAVE_NODE);
1209
+ if (array) for (let i = 0; i < v.length; i++) stack.push(v[i]);
1210
+ else for (const key of Object.keys(v)) stack.push(v[key]);
1211
+ }
1212
+ return true;
1213
+ }
1214
+ var NO_JSON_TEXT = "a value with no json text";
1215
+ function json_text_of(value) {
1216
+ if (!is_json_value(value)) return;
1217
+ try {
1218
+ const s = JSON.stringify(value);
1219
+ return is_string(s) ? s : void 0;
1220
+ } catch (e) {
1221
+ return;
1222
+ }
1223
+ }
1087
1224
  function log_attr_value_refused(gobj, it, value, refused) {
1088
1225
  const types = {
1226
+ [data_type_t.DTP_STRING]: "a string",
1089
1227
  [data_type_t.DTP_BOOLEAN]: "a boolean",
1090
1228
  [data_type_t.DTP_INTEGER]: "an integer",
1091
1229
  [data_type_t.DTP_REAL]: "a real",
@@ -1095,7 +1233,8 @@ function log_attr_value_refused(gobj, it, value, refused) {
1095
1233
  let shown;
1096
1234
  if (it.flag & sdata_flag_t.SDF_SECRET) shown = "********";
1097
1235
  else {
1098
- shown = is_string(value) ? value : String(JSON.stringify(value === void 0 ? null : value));
1236
+ shown = is_string(value) ? value : json_text_of(value === void 0 ? null : value);
1237
+ if (shown === void 0) shown = `<${NO_JSON_TEXT}>`;
1099
1238
  const masked = mask_secrets_inline(shown);
1100
1239
  if (masked !== null) shown = masked;
1101
1240
  if (shown.length > ATTR_VALUE_SHOWN) {
@@ -1117,8 +1256,11 @@ function json2item(gobj, sdata, it, jn_value_) {
1117
1256
  if (jn_value_ === null || jn_value_ === void 0) jn_value2 = "";
1118
1257
  else if (is_string(jn_value_)) jn_value2 = String(jn_value_);
1119
1258
  else {
1120
- let s = JSON.stringify(jn_value_);
1121
- if (s) jn_value2 = String(s);
1259
+ jn_value2 = json_text_of(jn_value_);
1260
+ if (jn_value2 === void 0) {
1261
+ log_attr_value_refused(gobj, it, jn_value_, NO_JSON_TEXT);
1262
+ return -1;
1263
+ }
1122
1264
  }
1123
1265
  break;
1124
1266
  case data_type_t.DTP_BOOLEAN:
@@ -2566,15 +2708,20 @@ function write_attr_value(gobj, key, value) {
2566
2708
  * The value a typed writer writes, read as ITS type by the grammar of
2567
2709
  * json2item() (a C writer takes its C type: a string is never read as a
2568
2710
  * number there). Return {value} or {refused} (logged): the attr keeps its
2569
- * value. A string writer never refuses: null and undefined are "", any
2570
- * other json its text, as a DTP_STRING attr reads them.
2711
+ * value. A string writer takes null and undefined as "", any other json
2712
+ * as its text, as a DTP_STRING attr reads them; it refuses only a value
2713
+ * with no json text (circular, a BigInt).
2571
2714
  ***************************************************************************/
2572
2715
  function typed_writer_value(gobj, name, type, value) {
2716
+ let r;
2573
2717
  if (DTP_IS_STRING(type)) {
2574
2718
  if (value === null || value === void 0) return { value: "" };
2575
- return { value: is_string(value) ? value : String(JSON.stringify(value)) };
2576
- }
2577
- const r = command_parameter_from_json(type, value);
2719
+ if (is_string(value)) return { value };
2720
+ r = {
2721
+ value: json_text_of(value),
2722
+ refused: NO_JSON_TEXT
2723
+ };
2724
+ } else r = command_parameter_from_json(type, value);
2578
2725
  if (r.value === void 0) {
2579
2726
  let holder = gobj;
2580
2727
  while (holder && !gobj_has_attr(holder, name)) holder = holder.bottom_gobj;
@@ -3019,9 +3166,9 @@ function gobj_send_event(dst, event, kw, src) {
3019
3166
  }
3020
3167
  }
3021
3168
  const frame = push_dispatch_frame(dst, event, frame_kind_t.FRAME_ACTION);
3022
- if (event_action.next_state) gobj_change_state(dst, event_action.next_state);
3023
3169
  let ret = -1;
3024
3170
  try {
3171
+ if (event_action.next_state) gobj_change_state(dst, event_action.next_state);
3025
3172
  if (event_action.action) ret = event_action.action(dst, event, kw, src);
3026
3173
  } catch (e) {
3027
3174
  __inside__--;
@@ -3045,18 +3192,23 @@ var subs_flag_t = Object.freeze({
3045
3192
  __own_event__: 4
3046
3193
  });
3047
3194
  /***************************************************************************
3048
- * The event type of `event_name` in any registered gclass, null if none.
3049
- * The C kernel's gobj_find_event_type(): any case, gclasses only.
3195
+ * The event type of `event_name` in any registered gclass whose flags
3196
+ * hold one of `event_flag` (0: any), null if none. The C kernel's
3197
+ * gobj_find_event_type(): any case, gclasses only. With `verbose` a miss
3198
+ * is logged, with the name as it was given: never verbose for a name
3199
+ * that came from a peer.
3050
3200
  ***************************************************************************/
3051
- function _find_event_type_in_gclasses(event_name) {
3201
+ function gobj_find_event_type(event_name, event_flag, verbose) {
3052
3202
  let lower = String(event_name).toLowerCase();
3053
3203
  for (let gclass_name in _gclass_register) {
3054
3204
  let dl = _gclass_register[gclass_name].dl_events;
3055
3205
  for (let i = 0; i < dl.length; i++) {
3056
3206
  let event_type = dl[i];
3207
+ if (event_flag && !(event_type.event_flag & event_flag)) continue;
3057
3208
  if (event_type.event_name && event_type.event_name.toLowerCase() === lower) return event_type;
3058
3209
  }
3059
3210
  }
3211
+ if (verbose) log_error(`EVENT NOT FOUND: ${event_name}`);
3060
3212
  return null;
3061
3213
  }
3062
3214
  var subscription_desc = [
@@ -3093,7 +3245,7 @@ function _create_subscription(publisher, event, kw, subscriber) {
3093
3245
  json_object_set_new(subs, "__config__", kw_clone);
3094
3246
  let renamed_event = kw_get_str(publisher, kw_clone, "__rename_event_name__", "");
3095
3247
  if (!empty_string(renamed_event)) {
3096
- let event_type = _find_event_type_in_gclasses(renamed_event);
3248
+ let event_type = gobj_find_event_type(renamed_event, 0, false);
3097
3249
  if (event_type) {
3098
3250
  json_object_set_new(subs, "renamed_event", event_type.event_name);
3099
3251
  delete kw_clone.__rename_event_name__;
@@ -3154,7 +3306,7 @@ function _subscription_match_kw(kw, event) {
3154
3306
  kw_match.__config__ = config_match;
3155
3307
  let renamed_event = "";
3156
3308
  let rename = config_match.__rename_event_name__;
3157
- let event_type = typeof rename === "string" && !empty_string(rename) ? _find_event_type_in_gclasses(rename) : null;
3309
+ let event_type = typeof rename === "string" && !empty_string(rename) ? gobj_find_event_type(rename, 0, false) : null;
3158
3310
  if (event_type) {
3159
3311
  renamed_event = event_type.event_name;
3160
3312
  delete config_match.__rename_event_name__;
@@ -4020,6 +4172,35 @@ function is_secret_name_tail(str, from, to, names) {
4020
4172
  }
4021
4173
  return secret_name_check(str, i, to, true, by_segments);
4022
4174
  }
4175
+ function param_name_tail_from(str, from, to) {
4176
+ let bytes = 0;
4177
+ let i = to;
4178
+ while (i > from) {
4179
+ const code = str.charCodeAt(i - 1);
4180
+ let n = 3;
4181
+ let units = 1;
4182
+ if (code < 128) n = 1;
4183
+ else if (code < 2048) n = 2;
4184
+ else if (code >= 56320 && code <= 57343 && i - 2 >= from) {
4185
+ const high = str.charCodeAt(i - 2);
4186
+ if (high >= 55296 && high <= 56319) {
4187
+ n = 4;
4188
+ units = 2;
4189
+ }
4190
+ }
4191
+ if (bytes + n > MASK_MAX_NAME) return -1;
4192
+ if (code === 38 || code === 63 || code === 59) return i;
4193
+ bytes += n;
4194
+ i -= units;
4195
+ }
4196
+ return -1;
4197
+ }
4198
+ function is_param_name_secret(str, from, to, names) {
4199
+ const tail = names === NAMES_NOW ? param_name_tail_from(str, from, to) : -1;
4200
+ if (tail < 0) return is_secret_name_tail(str, from, to, names);
4201
+ if (is_secret_name_tail(str, from, to, NAMES_7_26_9)) return true;
4202
+ return is_secret_name_tail(str, from, to, NAMES_NOW) && secret_name_check(str, tail, to, false, true);
4203
+ }
4023
4204
  /************************************************************
4024
4205
  * Where an unquoted secret value that begins at `p` ends: at
4025
4206
  * the end, at the quote that closes an outer quoted value, or
@@ -4317,13 +4498,14 @@ function mark_params(str, value_is_secret, reading, marks, judged) {
4317
4498
  }
4318
4499
  const name_from = word;
4319
4500
  word = p + 1;
4320
- const secret = is_secret_name_tail(str, name_from, p, names);
4321
- if (secret && names === NAMES_NOW && !is_secret_name_tail(str, name_from, p, NAMES_7_26_9)) not_7_26_9 = true;
4501
+ const secret = is_param_name_secret(str, name_from, p, names);
4502
+ if (secret && names === NAMES_NOW && !not_7_26_9 && !is_secret_name_tail(str, name_from, p, NAMES_7_26_9)) not_7_26_9 = true;
4322
4503
  if (!(secret || value_is_secret && p - name_from === 5 && ascii_case_equal(str, name_from, "value"))) {
4323
- if (judged && query_name_from(str, p) === name_from) judged[p] = 1;
4504
+ if (judged && query_name_from(str, p) === name_from) judged[p] = JUDGED_NOT_SECRET;
4324
4505
  p++;
4325
4506
  continue;
4326
4507
  }
4508
+ if (judged && secret && query_name_from(str, p) === name_from) judged[p] = JUDGED_SECRET;
4327
4509
  p++;
4328
4510
  let end;
4329
4511
  const quote = p < str.length && (str[p] === "\"" || str[p] === "'") ? str[p] : "";
@@ -4386,23 +4568,99 @@ function query_name_from(str, eq) {
4386
4568
  while (n > 0 && eq - n < MASK_MAX_NAME && is_name_char_code(str.charCodeAt(n - 1))) n--;
4387
4569
  return n;
4388
4570
  }
4571
+ var JUDGED_NOT_SECRET = 1;
4572
+ var JUDGED_SECRET = 2;
4573
+ function hex_digit_value(code) {
4574
+ if (code >= 48 && code <= 57) return code - 48;
4575
+ if (code >= 97 && code <= 102) return code - 87;
4576
+ if (code >= 65 && code <= 70) return code - 55;
4577
+ return -1;
4578
+ }
4579
+ function is_written_name_bracket_code(code) {
4580
+ return code === 91 || code === 93 || code === 39 || code === 34;
4581
+ }
4582
+ function is_written_name_code(code) {
4583
+ return is_name_char_code(code) || code === 37 || is_written_name_bracket_code(code);
4584
+ }
4585
+ function written_name_is_secret(str, eq) {
4586
+ let n = eq;
4587
+ let plain = -1;
4588
+ while (n > 0 && eq - n < MASK_MAX_NAME && is_written_name_code(str.charCodeAt(n - 1))) {
4589
+ n--;
4590
+ if (plain < 0 && !is_name_char_code(str.charCodeAt(n))) plain = n + 1;
4591
+ }
4592
+ if (plain < 0) return false;
4593
+ const to = str.charCodeAt(plain - 1) === 37 ? eq : plain - 1;
4594
+ let encoded = false;
4595
+ for (let s = n; s < to && !encoded; s++) encoded = str.charCodeAt(s) === 37;
4596
+ let name = str;
4597
+ let from = n;
4598
+ let end = to;
4599
+ if (encoded) {
4600
+ name = "";
4601
+ for (let s = n; s < to; s++) {
4602
+ const hi = str.charCodeAt(s) === 37 && to - s > 2 ? hex_digit_value(str.charCodeAt(s + 1)) : -1;
4603
+ const lo = hi >= 0 ? hex_digit_value(str.charCodeAt(s + 2)) : -1;
4604
+ if (lo >= 0) {
4605
+ name += String.fromCharCode(hi * 16 + lo);
4606
+ s += 2;
4607
+ } else name += str[s];
4608
+ }
4609
+ from = 0;
4610
+ end = name.length;
4611
+ }
4612
+ let seg = from;
4613
+ for (let i = from; i <= end; i++) {
4614
+ if (i < end && !is_written_name_bracket_code(name.charCodeAt(i))) continue;
4615
+ if (i - seg >= 3 && secret_name_check(name, seg, i, true, true)) return true;
4616
+ seg = i + 1;
4617
+ }
4618
+ return false;
4619
+ }
4620
+ function mark_query_value(str, eq, marks) {
4621
+ const v = eq + 1;
4622
+ if (v < str.length && (str[v] === "\"" || str[v] === "'")) return mark_run(str, v + 1, QUOTE_STOPS[str[v]], marks);
4623
+ mark_scheme_value(str, v, PARAM_VALUE_STOPS, marks);
4624
+ return mark_run(str, v, PARAM_VALUE_STOPS, marks);
4625
+ }
4626
+ var WRITTEN_NAME_MARKS = /[[\]%'"]/;
4389
4627
  function mark_query_params(str, marks, judged) {
4390
4628
  let frontier = 0;
4391
- for (let p = 1; p < str.length; p++) {
4392
- if (p < frontier) {
4393
- p = frontier - 1;
4394
- continue;
4395
- }
4396
- if (str.charCodeAt(p) !== 61) continue;
4397
- if (judged[p]) continue;
4398
- const n = query_name_from(str, p);
4399
- if (n === p || !secret_name_check(str, n, p, true, true)) continue;
4400
- const v = p + 1;
4401
- if (v < str.length && (str[v] === "\"" || str[v] === "'")) frontier = mark_run(str, v + 1, QUOTE_STOPS[str[v]], marks);
4402
- else {
4403
- mark_scheme_value(str, v, PARAM_VALUE_STOPS, marks);
4404
- frontier = mark_run(str, v, PARAM_VALUE_STOPS, marks);
4629
+ let frontier_written = WRITTEN_NAME_MARKS.test(str) ? 0 : str.length;
4630
+ let p = str.indexOf("=", 1);
4631
+ while (p > 0) {
4632
+ if (p >= frontier) {
4633
+ let secret = judged[p] === JUDGED_SECRET;
4634
+ if (!judged[p]) {
4635
+ const n = query_name_from(str, p);
4636
+ secret = n < p && secret_name_check(str, n, p, true, true);
4637
+ }
4638
+ if (secret) frontier = mark_query_value(str, p, marks);
4639
+ }
4640
+ if (p >= frontier_written && written_name_is_secret(str, p)) frontier_written = mark_query_value(str, p, marks);
4641
+ p = str.indexOf("=", p + 1);
4642
+ }
4643
+ }
4644
+ var URL_AUTHORITY_STOPS = stop_table("/?#\"'<> ");
4645
+ function mark_url_passwords(str, marks) {
4646
+ let p = str.indexOf("://", 1);
4647
+ while (p > 0) {
4648
+ let next = p + 1;
4649
+ if (is_ascii_alnum_code(str.charCodeAt(p - 1))) {
4650
+ let colon = -1;
4651
+ let at = -1;
4652
+ let e = p + 3;
4653
+ while (e < str.length) {
4654
+ const code = str.charCodeAt(e);
4655
+ if (code < 128 && URL_AUTHORITY_STOPS[code]) break;
4656
+ if (code === 64) at = e;
4657
+ else if (code === 58 && colon < 0) colon = e;
4658
+ e++;
4659
+ }
4660
+ if (colon >= 0 && at > colon) mark_range(marks, colon + 1, at);
4661
+ next = e - 1;
4405
4662
  }
4663
+ p = str.indexOf("://", next);
4406
4664
  }
4407
4665
  }
4408
4666
  function mark_shapes(str, marks) {
@@ -4427,7 +4685,7 @@ function mark_labels(str, marks) {
4427
4685
  p++;
4428
4686
  continue;
4429
4687
  }
4430
- if (!is_secret_name_tail(str, word, p, NAMES_NOW)) {
4688
+ if (!is_param_name_secret(str, word, p, NAMES_NOW)) {
4431
4689
  p++;
4432
4690
  word = p;
4433
4691
  continue;
@@ -4456,6 +4714,50 @@ function inline_value_is_secret(str, names) {
4456
4714
  }
4457
4715
  return false;
4458
4716
  }
4717
+ function mark_inline_rules_of_now(str, marks) {
4718
+ const value_is_secret = inline_value_is_secret(str, NAMES_NOW);
4719
+ const judged = new Uint8Array(str.length);
4720
+ mark_params(str, value_is_secret, READ_NOW, marks, judged);
4721
+ mark_query_params(str, marks, judged);
4722
+ mark_url_passwords(str, marks);
4723
+ mark_shapes(str, marks);
4724
+ mark_labels(str, marks);
4725
+ }
4726
+ var MASK_MAX_DECODINGS = 2;
4727
+ function encoded_ascii_at(str, p) {
4728
+ if (p + 3 > str.length || str.charCodeAt(p) !== 37) return -1;
4729
+ const hi = hex_digit_value(str.charCodeAt(p + 1));
4730
+ const lo = hi >= 0 ? hex_digit_value(str.charCodeAt(p + 2)) : -1;
4731
+ if (lo < 0) return -1;
4732
+ const c = hi * 16 + lo;
4733
+ return c > 0 && c < 128 ? c : -1;
4734
+ }
4735
+ function mark_decoded_view(str, marks, decodings) {
4736
+ if (decodings >= MASK_MAX_DECODINGS) return;
4737
+ const pieces = [];
4738
+ let last = 0;
4739
+ let p = str.indexOf("%");
4740
+ while (p >= 0) {
4741
+ const c = encoded_ascii_at(str, p);
4742
+ if (c >= 0) {
4743
+ pieces.push(str.substring(last, p), String.fromCharCode(c));
4744
+ last = p + 3;
4745
+ p = str.indexOf("%", last);
4746
+ } else p = str.indexOf("%", p + 1);
4747
+ }
4748
+ if (pieces.length === 0) return;
4749
+ pieces.push(str.substring(last));
4750
+ const view = pieces.join("");
4751
+ const view_marks = new Uint8Array(view.length);
4752
+ mark_inline_rules_of_now(view, view_marks);
4753
+ mark_decoded_view(view, view_marks, decodings + 1);
4754
+ let q = 0;
4755
+ for (let i = 0; i < view.length; i++) {
4756
+ const n = encoded_ascii_at(str, q) >= 0 ? 3 : 1;
4757
+ if (view_marks[i]) mark_range(marks, q, q + n);
4758
+ q += n;
4759
+ }
4760
+ }
4459
4761
  function mark_inline_secrets(str, marks) {
4460
4762
  const value_is_secret = inline_value_is_secret(str, NAMES_NOW);
4461
4763
  const value_is_secret_7_26_9 = inline_value_is_secret(str, NAMES_7_26_9);
@@ -4463,8 +4765,10 @@ function mark_inline_secrets(str, marks) {
4463
4765
  if (mark_params(str, value_is_secret, READ_NOW, marks, judged) || value_is_secret !== value_is_secret_7_26_9) mark_params(str, value_is_secret_7_26_9, READ_AS_7_26_9, marks, null);
4464
4766
  if (has_shape_js_7_26_20(str)) mark_params(str, value_is_secret, READ_AS_GOBJ_JS_7_26_20, marks, null);
4465
4767
  mark_query_params(str, marks, judged);
4768
+ mark_url_passwords(str, marks);
4466
4769
  mark_shapes(str, marks);
4467
4770
  mark_labels(str, marks);
4771
+ mark_decoded_view(str, marks, 0);
4468
4772
  }
4469
4773
  /************************************************************
4470
4774
  * A text (a command line) with the secrets that can be told
@@ -4476,13 +4780,14 @@ function mark_inline_secrets(str, marks) {
4476
4780
  * same for a "name: value", its name in quotes or not (a json, a
4477
4781
  * header, a label: "password": x, Authorization: Basic x, bearer:
4478
4782
  * tok); and a JWT or the credential after "Bearer " or "Basic ",
4479
- * wherever they are, whatever names them. Each rule judges the text
4480
- * as it came. Return null when there was nothing to mask. As the C
4481
- * kernel's mask_secrets_inline().
4783
+ * wherever they are, whatever names them; in a URL or a query
4784
+ * %-encoded inside a value, the same read decoded (mark_decoded_view()).
4785
+ * Each rule judges the text as it came. Return null when there was
4786
+ * nothing to mask. As the C kernel's mask_secrets_inline().
4482
4787
  ************************************************************/
4483
4788
  function mask_secrets_inline(str) {
4484
4789
  if (typeof str !== "string") return null;
4485
- if (str.indexOf("=") < 0 && str.indexOf(":") < 0 && str.indexOf("eyJ") < 0 && !/bearer|basic/i.test(str)) return null;
4790
+ if (str.indexOf("=") < 0 && str.indexOf(":") < 0 && str.indexOf("%") < 0 && str.indexOf("eyJ") < 0 && !/bearer|basic/i.test(str)) return null;
4486
4791
  if (str.length > MASK_MAX_BYTES) return MASK_TOO_LARGE;
4487
4792
  const marks = new Uint8Array(str.length);
4488
4793
  mark_inline_secrets(str, marks);
@@ -8245,7 +8550,8 @@ var PRIVATE_DATA = {
8245
8550
  inform_on_close: false,
8246
8551
  websocket: null,
8247
8552
  inside_on_open: false,
8248
- retry_ms: 0
8553
+ retry_ms: 0,
8554
+ retry_ms_before_session: 0
8249
8555
  };
8250
8556
  var __gclass__ = null;
8251
8557
  /******************************
@@ -8296,6 +8602,7 @@ function mt_writing(gobj, path) {
8296
8602
  function mt_start(gobj) {
8297
8603
  let priv = gobj.priv;
8298
8604
  priv.retry_ms = 0;
8605
+ priv.retry_ms_before_session = 0;
8299
8606
  if (gobj_current_state(gobj) !== "ST_DISCONNECTED") {
8300
8607
  gobj_send_event(gobj, "EV_ON_CLOSE", {
8301
8608
  url: priv.url,
@@ -8495,13 +8802,33 @@ function close_websocket(gobj, code = 1e3, reason = "") {
8495
8802
  }
8496
8803
  }
8497
8804
  /***************************************************************
8805
+ * Close the channel for a fault of the server: a message for a role
8806
+ * or a yuno that is not this one, an event out of its place.
8807
+ *
8808
+ * Not with 1000: EV_ON_CLOSE would say the session ended well. A
8809
+ * browser closes a WebSocket only with 1000 or 3000-4999 (1002, the
8810
+ * protocol error, throws there), so it is 4002 -- and the server
8811
+ * echoes it, so EV_ON_CLOSE carries it.
8812
+ *
8813
+ * And a session the server broke was not a session reached: the
8814
+ * backoff the ack reset is put back, or a server that breaks every
8815
+ * session is reconnected at the first delay for ever, with an
8816
+ * EV_ON_OPEN and an EV_ON_CLOSE in the app per round.
8817
+ ***************************************************************/
8818
+ var CLOSE_PEER_FAULT = 4002;
8819
+ function close_for_peer_fault(gobj, reason) {
8820
+ let priv = gobj.priv;
8821
+ if (gobj_current_state(gobj) === "ST_SESSION") priv.retry_ms = priv.retry_ms_before_session;
8822
+ close_websocket(gobj, CLOSE_PEER_FAULT, reason);
8823
+ }
8824
+ /***************************************************************
8498
8825
  * A text of the server -- a frame, the name of an event, of a
8499
8826
  * service, of a role -- as a log shows it: masked, then capped on a
8500
8827
  * whole character (capped first, a credential the cap cut would
8501
8828
  * show its first characters). As the C kernel shows the name of an
8502
8829
  * event that is not public (mask_secrets_inline_capped()).
8503
8830
  ***************************************************************/
8504
- var PEER_NAME_SHOWN = 64;
8831
+ var PEER_NAME_SHOWN = 128;
8505
8832
  var PEER_FRAME_SHOWN = 256;
8506
8833
  function peer_text_shown(text, max) {
8507
8834
  let s = String(text);
@@ -8724,7 +9051,8 @@ function ac_on_close(gobj, event, kw, src) {
8724
9051
  let url = kw.url;
8725
9052
  if (kw.ws_seq !== void 0 && kw.ws_seq !== priv.ws_seq) return 0;
8726
9053
  set_remote_log_functions();
8727
- if (is_traffic_tracing(gobj)) trace_msg(`${gobj_short_name(gobj)}: WebSocket closed ${url} (Code: ${kw.code}, Reason: "${peer_text_shown(kw.reason, PEER_FRAME_SHOWN)}", Clean: ${kw.was_clean})`);
9054
+ const reason_shown = peer_text_shown(kw.reason === void 0 ? "" : kw.reason, PEER_FRAME_SHOWN);
9055
+ if (is_traffic_tracing(gobj)) trace_msg(`${gobj_short_name(gobj)}: WebSocket closed ${url} (Code: ${kw.code}, Reason: "${reason_shown}", Clean: ${kw.was_clean})`);
8728
9056
  if (priv.websocket) {
8729
9057
  priv.websocket.onopen = null;
8730
9058
  priv.websocket.onmessage = null;
@@ -8734,21 +9062,25 @@ function ac_on_close(gobj, event, kw, src) {
8734
9062
  }
8735
9063
  if (priv.inform_on_close) {
8736
9064
  priv.inform_on_close = false;
9065
+ if ((!kw.was_clean || kw.code !== 1e3 && kw.code !== 1001) && gobj_is_running(gobj)) log_warning(`${gobj_short_name(gobj)}: session closed ${url} (Code: ${kw.code}, Reason: "${reason_shown}", Clean: ${kw.was_clean})`);
8737
9066
  gobj_publish_event(gobj, "EV_ON_CLOSE", {
8738
9067
  url,
8739
9068
  remote_yuno_name: priv.remote_yuno_name,
8740
9069
  remote_yuno_role: priv.remote_yuno_role,
8741
- remote_yuno_service: priv.remote_yuno_service
9070
+ remote_yuno_service: priv.remote_yuno_service,
9071
+ code: kw.code,
9072
+ reason: reason_shown,
9073
+ was_clean: kw.was_clean
8742
9074
  });
8743
9075
  } else if (!gobj_is_running(gobj)) {} else {
8744
- log_warning(`${gobj_short_name(gobj)}: EV_ON_OPEN_ERROR cannot open ${url} (Code: ${kw.code}, Reason: "${peer_text_shown(kw.reason, PEER_FRAME_SHOWN)}", Clean: ${kw.was_clean})`);
9076
+ log_warning(`${gobj_short_name(gobj)}: EV_ON_OPEN_ERROR cannot open ${url} (Code: ${kw.code}, Reason: "${reason_shown}", Clean: ${kw.was_clean})`);
8745
9077
  gobj_publish_event(gobj, "EV_ON_OPEN_ERROR", {
8746
9078
  url,
8747
9079
  remote_yuno_name: priv.remote_yuno_name,
8748
9080
  remote_yuno_role: priv.remote_yuno_role,
8749
9081
  remote_yuno_service: priv.remote_yuno_service,
8750
9082
  code: kw.code,
8751
- reason: kw.reason,
9083
+ reason: reason_shown,
8752
9084
  was_clean: kw.was_clean
8753
9085
  });
8754
9086
  }
@@ -8771,7 +9103,8 @@ function ac_on_close(gobj, event, kw, src) {
8771
9103
  *
8772
9104
  * Reset to zero when a session is actually reached
8773
9105
  * (ac_identity_card_ack), so a link that flaps once does not carry a
8774
- * minute-long penalty into its next real drop.
9106
+ * minute-long penalty into its next real drop -- and put back when the
9107
+ * server breaks that session (close_for_peer_fault()).
8775
9108
  ***************************************************************/
8776
9109
  function next_retry(gobj) {
8777
9110
  let priv = gobj.priv;
@@ -8821,6 +9154,7 @@ function ac_identity_card_ack(gobj, event, kw, src) {
8821
9154
  } else {
8822
9155
  gobj_change_state(gobj, "ST_SESSION");
8823
9156
  priv.inside_on_open = true;
9157
+ priv.retry_ms_before_session = priv.retry_ms;
8824
9158
  priv.retry_ms = 0;
8825
9159
  if (!priv.inform_on_close) {
8826
9160
  priv.inform_on_close = true;
@@ -8857,19 +9191,26 @@ function ac_on_message(gobj, event, kw, src) {
8857
9191
  let iev_event = iev_msg.event;
8858
9192
  let iev_kw = iev_msg.kw;
8859
9193
  if (gobj_current_state(gobj) !== "ST_SESSION") {
8860
- if (gobj_has_event(gobj, iev_event, event_flag_t.EVF_PUBLIC_EVENT)) {
8861
- if (!(gobj_send_event(gobj, iev_event, iev_kw, gobj) < 0)) return 0;
8862
- } else log_error(`${gobj_short_name(gobj)}: event UNKNOWN in not-session state ${peer_text_shown(iev_event, PEER_NAME_SHOWN)}`);
8863
- close_websocket(gobj);
9194
+ if (String(iev_event).toLowerCase() === "ev_identity_card_ack") {
9195
+ if (!(gobj_send_event(gobj, "EV_IDENTITY_CARD_ACK", iev_kw, gobj) < 0)) return 0;
9196
+ } else log_warning(`${gobj_short_name(gobj)}: event UNKNOWN in not-session state ${peer_text_shown(iev_event, PEER_NAME_SHOWN)}`);
9197
+ close_for_peer_fault(gobj, "event out of session");
8864
9198
  return -1;
8865
9199
  }
8866
9200
  iev_msg = null;
8867
9201
  let msg_type = msg_iev_get_msg_type(gobj, iev_kw);
8868
9202
  let event_id = msg_iev_get_stack(gobj, iev_kw, IEVENT_STACK_ID);
8869
9203
  let iev_dst_role = kw_get_str(gobj, event_id, "dst_role", "");
8870
- if (iev_dst_role.toLowerCase() !== gobj_yuno_role().toLowerCase()) {
8871
- log_error(`"It's not my role, dst_role: ${peer_text_shown(iev_dst_role, PEER_NAME_SHOWN)}, my_role: ${gobj_yuno_role()}`);
8872
- return 0;
9204
+ if (!empty_string(iev_dst_role) && iev_dst_role.toLowerCase() !== String(gobj_yuno_role()).toLowerCase()) {
9205
+ log_warning(`${gobj_short_name(gobj)}: It's not my role, dst_role: ${peer_text_shown(iev_dst_role, PEER_NAME_SHOWN)}, my_role: ${gobj_yuno_role()}, event: ${peer_text_shown(iev_event, PEER_NAME_SHOWN)}`);
9206
+ close_for_peer_fault(gobj, "not my role");
9207
+ return -1;
9208
+ }
9209
+ let iev_dst_yuno = kw_get_str(gobj, event_id, "dst_yuno", "");
9210
+ if (!empty_string(iev_dst_yuno) && iev_dst_yuno.toLowerCase() !== String(gobj_yuno_name()).toLowerCase()) {
9211
+ log_warning(`${gobj_short_name(gobj)}: It's not my name, dst_yuno: ${peer_text_shown(iev_dst_yuno, PEER_NAME_SHOWN)}, my_name: ${gobj_yuno_name()}, event: ${peer_text_shown(iev_event, PEER_NAME_SHOWN)}`);
9212
+ close_for_peer_fault(gobj, "not my name");
9213
+ return -1;
8873
9214
  }
8874
9215
  let iev_dst_service = kw_get_str(gobj, event_id, "dst_service", "");
8875
9216
  if (msg_type === "__subscribing__") {
@@ -8880,8 +9221,14 @@ function ac_on_message(gobj, event, kw, src) {
8880
9221
  log_warning(`${gobj_short_name(gobj)}: unsubscription event ignored, I'm client (service: ${peer_text_shown(iev_dst_service, PEER_NAME_SHOWN)}, event: ${peer_text_shown(iev_event, PEER_NAME_SHOWN)})`);
8881
9222
  return -1;
8882
9223
  }
8883
- if (gobj_has_event(gobj, iev_event, event_flag_t.EVF_PUBLIC_EVENT)) {
8884
- gobj_send_event(gobj, iev_event, iev_kw, gobj);
9224
+ const declared = gobj_find_event_type(iev_event, 0, false);
9225
+ if (declared && gobj_has_event(gobj, declared.event_name, 0)) {
9226
+ const own_event = declared.event_name;
9227
+ if (!gobj_has_event(gobj, own_event, event_flag_t.EVF_PUBLIC_EVENT) || own_event === "EV_IDENTITY_CARD_ACK") {
9228
+ log_warning(`${gobj_short_name(gobj)}: event of the transport itself, or out of its place, DROPPED: ev '${peer_text_shown(iev_event, PEER_NAME_SHOWN)}'`);
9229
+ return -1;
9230
+ }
9231
+ gobj_send_event(gobj, own_event, iev_kw, gobj);
8885
9232
  return 0;
8886
9233
  }
8887
9234
  if (!empty_string(iev_dst_service)) {
@@ -8891,13 +9238,18 @@ function ac_on_message(gobj, event, kw, src) {
8891
9238
  return 0;
8892
9239
  }
8893
9240
  if (!gobj_has_event(gobj_service, iev_event, event_flag_t.EVF_PUBLIC_EVENT)) {
8894
- log_error(`${gobj_short_name(gobj)}: Service found but no event or not public, service '${gobj_short_name(gobj_service)}', ev '${peer_text_shown(iev_event, PEER_NAME_SHOWN)}'`);
9241
+ log_warning(`${gobj_short_name(gobj)}: Service found but no event or not public, DROPPED: service '${gobj_short_name(gobj_service)}', ev '${peer_text_shown(iev_event, PEER_NAME_SHOWN)}'`);
8895
9242
  return -1;
8896
9243
  }
8897
9244
  gobj_send_event(gobj_service, iev_event, iev_kw, gobj);
8898
9245
  return 0;
8899
9246
  }
8900
- gobj_publish_event(gobj, iev_event, iev_kw);
9247
+ let event_type = gobj_find_event_type(iev_event, event_flag_t.EVF_PUBLIC_EVENT, false);
9248
+ if (!event_type) {
9249
+ log_warning(`${gobj_short_name(gobj)}: event that no gclass declares public, DROPPED: ev '${peer_text_shown(iev_event, PEER_NAME_SHOWN)}'`);
9250
+ return -1;
9251
+ }
9252
+ gobj_publish_event(gobj, event_type.event_name, iev_kw);
8901
9253
  return 0;
8902
9254
  }
8903
9255
  /***************************************************************************
@@ -9017,7 +9369,7 @@ function create_gclass(gclass_name) {
9017
9369
  __gclass__ = gclass_create(gclass_name, [
9018
9370
  ["EV_ON_MESSAGE", event_flag_t.EVF_OUTPUT_EVENT],
9019
9371
  ["EV_IDENTITY_CARD_ACK", event_flag_t.EVF_PUBLIC_EVENT],
9020
- ["EV_ON_ID_NAK", event_flag_t.EVF_PUBLIC_EVENT | event_flag_t.EVF_OUTPUT_EVENT],
9372
+ ["EV_ON_ID_NAK", event_flag_t.EVF_OUTPUT_EVENT],
9021
9373
  ["EV_MT_STATS", event_flag_t.EVF_PUBLIC_EVENT],
9022
9374
  ["EV_MT_COMMAND", event_flag_t.EVF_PUBLIC_EVENT],
9023
9375
  ["EV_ON_OPEN", event_flag_t.EVF_OUTPUT_EVENT | event_flag_t.EVF_NO_WARN_SUBS],
@@ -9036,6 +9388,6 @@ function register_c_ievent_cli() {
9036
9388
  return create_gclass(GCLASS_NAME);
9037
9389
  }
9038
9390
  //#endregion
9039
- export { GObj, SDATA, SDATAAUTHZ, SDATACM, SDATACM2, SDATADF, SDATAPM, SDATAPM0, SDATA_END, SDataDesc, YUNETA_VERSION, __yuno__, build_command_response, build_path, build_stats_response, clean_name, clear_timeout, cmp_two_simple_json, command_parameter_from_json, command_parameter_from_text, command_parser, createElement2, createOneHtml, create_json_record, create_template_record, current_timestamp, data_type_t, db_list_persistent_attrs, db_load_persistent_attrs, db_remove_persistent_attrs, db_save_persistent_attrs, debounce, delete_from_list, duplicate_objects, empty_json, empty_string, escapeHtml, event_flag_t, flat2json, flat_apply, flat_diff, flat_key_join, flat_key_split, gclass_add_ev_action, gclass_add_event_type, gclass_add_state, gclass_check_fsm, gclass_create, gclass_event_type, gclass_find_by_name, gclass_flag_t, gclass_unregister, getPositionRelativeToBody, get_function_name, get_now, gobj_bottom_gobj, gobj_change_parent, gobj_change_state, gobj_command, gobj_create, gobj_create2, gobj_create_default_service, gobj_create_pure_child, gobj_create_service, gobj_create_volatil, gobj_create_yuno, gobj_current_state, gobj_default_service, gobj_deliver_posted_events, gobj_destroy, gobj_find_child, gobj_find_gobj, gobj_find_service, gobj_find_subscribings, gobj_find_subscriptions, gobj_flag_t, gobj_full_name, gobj_gclass_name, gobj_get_gclass_trace_level, gobj_get_gclass_trace_level2, gobj_get_gclass_trace_no_level, gobj_get_global_trace_level, gobj_get_global_trace_no_level, gobj_global_trace_level, gobj_global_trace_no_level, gobj_has_attr, gobj_has_event, gobj_has_output_event, gobj_hsdata, gobj_is_destroying, gobj_is_playing, gobj_is_pure_child, gobj_is_running, gobj_is_service, gobj_is_volatil, gobj_list_persistent_attrs, gobj_list_subscriptions, gobj_load_persistent_attrs, gobj_match_children, gobj_match_children_tree, gobj_match_gobj, gobj_name, gobj_parent, gobj_pause, gobj_play, gobj_post_event, gobj_posted_events_size, gobj_publish_event, gobj_read_attr, gobj_read_attrs, gobj_read_bool_attr, gobj_read_integer_attr, gobj_read_pointer_attr, gobj_read_str_attr, gobj_remove_persistent_attrs, gobj_repr_global_trace_levels, gobj_reset_volatil_attrs, gobj_save_persistent_attrs, gobj_search_path, gobj_send_event, gobj_services, gobj_set_bottom_gobj, gobj_set_deep_trace, gobj_set_gclass_no_trace, gobj_set_gclass_trace, gobj_set_global_no_trace, gobj_set_global_no_trace2, gobj_set_global_trace, gobj_set_global_trace2, gobj_set_gobj_no_trace, gobj_set_gobj_trace, gobj_set_trace_machine_format, gobj_short_name, gobj_start, gobj_start_children, gobj_start_tree, gobj_start_up, gobj_stats, gobj_stop, gobj_stop_children, gobj_stop_tree, gobj_subscribe_event, gobj_trace_level, gobj_trace_machine_format, gobj_trace_no_level, gobj_unsubscribe_event, gobj_unsubscribe_list, gobj_walk_gobj_children, gobj_walk_gobj_children_tree, gobj_write_attr, gobj_write_attrs, gobj_write_bool_attr, gobj_write_integer_attr, gobj_write_str_attr, gobj_yuno, gobj_yuno_id, gobj_yuno_name, gobj_yuno_role, html_markup, id_index_in_obj_list, index_in_list, is_array, is_boolean, is_date, is_function, is_gobj, is_html_markup, is_metadata_key, is_null, is_number, is_object, is_private_key, is_pure_number, is_secret_name, is_string, jdb_delete, jdb_get, jdb_get_by_idx, jdb_get_topic, jdb_init, jdb_update, json2flat, json_array_append, json_array_append_new, json_array_extend, json_array_remove, json_array_size, json_deep_copy, json_is_identical, json_mask_secrets, json_object_del, json_object_get, json_object_set, json_object_set_new, json_object_size, json_object_update, json_object_update_existing, json_object_update_missing, json_size, jwt2json, jwtDecode, kw_clone_by_keys, kw_clone_by_not_keys, kw_collect, kw_delete, kw_find_json_in_list, kw_find_path, kw_flag_t, kw_get_bool, kw_get_dict, kw_get_dict_value, kw_get_int, kw_get_list, kw_get_local_storage_value, kw_get_pointer, kw_get_real, kw_get_str, kw_has_key, kw_match_simple, kw_pop, kw_remove_local_storage_value, kw_select, kw_set_dict_value, kw_set_local_storage_value, kw_set_subdict_value, kwid_collect, kwid_find_one_record, kwid_get_ids, kwid_match_id, kwid_new_dict, kwid_new_list, list2options, load_json_file, log_debug, log_error, log_info, log_warning, mask_secrets_inline, msg_iev_get_msg_type, msg_iev_get_stack, msg_iev_push_stack, msg_iev_read_key, msg_iev_set_msg_type, msg_iev_write_key, node_uuid, parseBoolean, parseSVG, refresh_language, register_c_ievent_cli, register_c_timer, register_c_yuno, safeSrc, sdata_flag_t, send_http_json_post, set_console_log_enabled, set_console_log_filter, set_log_callback, set_remote_log_functions, set_strings_are_text, set_timeout, set_timeout_periodic, sprintf, stats_parser, str_in_list, strcasecmp, strcmp, strings_are_text, strncmp, strs_in_list, strstr, template_get_field_desc, timeTracker, trace_json, trace_json_masked, trace_level_t, trace_msg, treedb_decoder_fkey, treedb_decoder_hook, treedb_encoder_fkey, treedb_get_field_desc, treedb_hook_data_size, vsprintf, walk_type_t };
9391
+ export { GObj, SDATA, SDATAAUTHZ, SDATACM, SDATACM2, SDATADF, SDATAPM, SDATAPM0, SDATA_END, SDataDesc, YUNETA_VERSION, __yuno__, build_command_response, build_path, build_stats_response, clean_name, clear_timeout, cmp_two_simple_json, command_parameter_from_json, command_parameter_from_text, command_parser, createElement2, createOneHtml, create_json_record, create_template_record, current_timestamp, data_type_t, db_list_persistent_attrs, db_load_persistent_attrs, db_remove_persistent_attrs, db_save_persistent_attrs, debounce, delete_from_list, duplicate_objects, empty_json, empty_string, escapeHtml, event_flag_t, flat2json, flat_apply, flat_diff, flat_key_join, flat_key_split, gclass_add_ev_action, gclass_add_event_type, gclass_add_state, gclass_check_fsm, gclass_create, gclass_event_type, gclass_find_by_name, gclass_flag_t, gclass_unregister, getPositionRelativeToBody, get_function_name, get_now, gobj_bottom_gobj, gobj_change_parent, gobj_change_state, gobj_command, gobj_create, gobj_create2, gobj_create_default_service, gobj_create_pure_child, gobj_create_service, gobj_create_volatil, gobj_create_yuno, gobj_current_state, gobj_default_service, gobj_deliver_posted_events, gobj_destroy, gobj_find_child, gobj_find_event_type, gobj_find_gobj, gobj_find_service, gobj_find_subscribings, gobj_find_subscriptions, gobj_flag_t, gobj_full_name, gobj_gclass_name, gobj_get_gclass_trace_level, gobj_get_gclass_trace_level2, gobj_get_gclass_trace_no_level, gobj_get_global_trace_level, gobj_get_global_trace_no_level, gobj_global_trace_level, gobj_global_trace_no_level, gobj_has_attr, gobj_has_event, gobj_has_output_event, gobj_hsdata, gobj_is_destroying, gobj_is_playing, gobj_is_pure_child, gobj_is_running, gobj_is_service, gobj_is_volatil, gobj_list_persistent_attrs, gobj_list_subscriptions, gobj_load_persistent_attrs, gobj_match_children, gobj_match_children_tree, gobj_match_gobj, gobj_name, gobj_parent, gobj_pause, gobj_play, gobj_post_event, gobj_posted_events_size, gobj_publish_event, gobj_read_attr, gobj_read_attrs, gobj_read_bool_attr, gobj_read_integer_attr, gobj_read_pointer_attr, gobj_read_str_attr, gobj_remove_persistent_attrs, gobj_repr_global_trace_levels, gobj_reset_volatil_attrs, gobj_save_persistent_attrs, gobj_search_path, gobj_send_event, gobj_services, gobj_set_bottom_gobj, gobj_set_deep_trace, gobj_set_gclass_no_trace, gobj_set_gclass_trace, gobj_set_global_no_trace, gobj_set_global_no_trace2, gobj_set_global_trace, gobj_set_global_trace2, gobj_set_gobj_no_trace, gobj_set_gobj_trace, gobj_set_trace_machine_format, gobj_short_name, gobj_start, gobj_start_children, gobj_start_tree, gobj_start_up, gobj_stats, gobj_stop, gobj_stop_children, gobj_stop_tree, gobj_subscribe_event, gobj_trace_level, gobj_trace_machine_format, gobj_trace_no_level, gobj_unsubscribe_event, gobj_unsubscribe_list, gobj_walk_gobj_children, gobj_walk_gobj_children_tree, gobj_write_attr, gobj_write_attrs, gobj_write_bool_attr, gobj_write_integer_attr, gobj_write_str_attr, gobj_yuno, gobj_yuno_id, gobj_yuno_name, gobj_yuno_role, html_markup, id_index_in_obj_list, index_in_list, is_array, is_boolean, is_date, is_function, is_gobj, is_html_markup, is_metadata_key, is_null, is_number, is_object, is_private_key, is_pure_number, is_secret_name, is_string, jdb_delete, jdb_get, jdb_get_by_idx, jdb_get_topic, jdb_init, jdb_update, json2flat, json_array_append, json_array_append_new, json_array_extend, json_array_remove, json_array_size, json_deep_copy, json_is_identical, json_mask_secrets, json_object_del, json_object_get, json_object_set, json_object_set_new, json_object_size, json_object_update, json_object_update_existing, json_object_update_missing, json_size, jwt2json, jwtDecode, kw_clone_by_keys, kw_clone_by_not_keys, kw_collect, kw_delete, kw_find_json_in_list, kw_find_path, kw_flag_t, kw_get_bool, kw_get_dict, kw_get_dict_value, kw_get_int, kw_get_list, kw_get_local_storage_value, kw_get_pointer, kw_get_real, kw_get_str, kw_has_key, kw_match_simple, kw_pop, kw_remove_local_storage_value, kw_select, kw_set_dict_value, kw_set_local_storage_value, kw_set_subdict_value, kwid_collect, kwid_find_one_record, kwid_get_ids, kwid_match_id, kwid_new_dict, kwid_new_list, list2options, load_json_file, log_debug, log_error, log_info, log_warning, mask_secrets_inline, msg_iev_get_msg_type, msg_iev_get_stack, msg_iev_push_stack, msg_iev_read_key, msg_iev_set_msg_type, msg_iev_write_key, node_uuid, parseBoolean, parseSVG, refresh_language, register_c_ievent_cli, register_c_timer, register_c_yuno, safeSrc, sdata_flag_t, send_http_json_post, set_console_log_enabled, set_console_log_filter, set_log_callback, set_remote_log_functions, set_strings_are_text, set_timeout, set_timeout_periodic, sprintf, stats_parser, str_in_list, strcasecmp, strcmp, strings_are_text, strncmp, strs_in_list, strstr, template_get_field_desc, timeTracker, trace_json, trace_json_masked, trace_level_t, trace_msg, treedb_decoder_fkey, treedb_decoder_hook, treedb_encoder_fkey, treedb_get_field_desc, treedb_hook_data_size, vsprintf, walk_type_t };
9040
9392
 
9041
9393
  //# sourceMappingURL=gobj-js.es.js.map