x-block-lib 0.6.41 → 0.6.43

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.
Files changed (2) hide show
  1. package/dist/index.js +118 -112
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ var yc = Object.defineProperty;
11
11
  var bc = (e, t, n) => t in e ? yc(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
12
12
  var Fs = (e, t, n) => bc(e, typeof t != "symbol" ? t + "" : t, n);
13
13
  import { getCurrentScope as Cc, onScopeDispose as Sc, computed as Ne, toValue as Ja, watch as Bt, shallowRef as kc, getCurrentInstance as Wo, onMounted as Jt, defineComponent as lt, onBeforeUnmount as qa, resolveComponent as Pe, createBlock as ht, openBlock as Le, unref as j, withCtx as ft, createVNode as ye, mergeProps as us, useModel as jn, toRefs as Nc, ref as wt, reactive as Lc, h as Ki, nextTick as ps, onUnmounted as Qn, isRef as zt, provide as Bc, inject as Rc, resolveDirective as Dc, withDirectives as Mc, createElementBlock as _t, normalizeStyle as at, createElementVNode as rt, toDisplayString as Xo, withModifiers as Un, mergeModels as Hi, Fragment as Za, renderList as Pc, useId as $i, withKeys as Qa, createCommentVNode as Xt, useTemplateRef as xc } from "vue";
14
- import { d as C, j as r, O as u, f as Uc, F as er, M as g, E as M, r as Ks, u as G, X as Qt, B as k, i as te, a as Gi, b as en, c as qt, e as dt, g as Hs, h as be, C as tr, k as wc, P as ji, N as _s, V as Dn, l as Vt, m as nr, s as Vc, S as He, n as Io, o as hn, p as pn, q as ho, t as Ei, v as Ln, w as $s, G as Ai, x as Yc, T as zo, y as or, z as ir, A as Fc, D as Kc, H as Gs, I as Hc, J as $c } from "./blockly-oznbag5p.js";
14
+ import { d as C, j as r, O as u, f as Uc, F as er, M as g, E as P, r as Ks, u as G, X as Qt, B as k, i as te, a as Gi, b as en, c as qt, e as dt, g as Hs, h as be, C as tr, k as wc, P as ji, N as _s, V as Dn, l as Vt, m as nr, s as Vc, S as He, n as Io, o as hn, p as pn, q as ho, t as Ei, v as Ln, w as $s, G as Ai, x as Yc, T as zo, y as or, z as ir, A as Fc, D as Kc, H as Gs, I as Hc, J as $c } from "./blockly-oznbag5p.js";
15
15
  import { openConfirmDlg as Gc, openPromptDlg as jc, eventBus as Ze, messageWarning as sr, useColor as Jo, useSystem as ar, useViewStack as ds } from "x-essential-lib";
16
16
  import { elements as Ve, pkgs as Wn, getPropTag as qo, parsePixelStr as Wc, parsePercentStr as Xc } from "x-runtime-lib";
17
17
  import { globalState as B } from "x-state-lib";
@@ -1048,7 +1048,7 @@ function Yn(e, t, n) {
1048
1048
  var tf = J_(function(e, t, n) {
1049
1049
  return e + (n ? "_" : "") + t.toLowerCase();
1050
1050
  });
1051
- class P extends er {
1051
+ class M extends er {
1052
1052
  constructor(t, n, o) {
1053
1053
  super(t, n, o);
1054
1054
  }
@@ -1105,9 +1105,9 @@ class P extends er {
1105
1105
  return "<n/a>";
1106
1106
  }
1107
1107
  }
1108
- Uc.register("field_dropdown2", P);
1108
+ Uc.register("field_dropdown2", M);
1109
1109
  var me = /* @__PURE__ */ ((e) => (e.STATE_CHANGE = "state_change", e))(me || {});
1110
- class wr extends M.Abstract {
1110
+ class wr extends P.Abstract {
1111
1111
  constructor() {
1112
1112
  super(...arguments);
1113
1113
  Fs(this, "isBlank", !0);
@@ -1184,7 +1184,7 @@ function Ts(e, t, n, o) {
1184
1184
  }
1185
1185
  function Ge(e, t) {
1186
1186
  try {
1187
- M.disable(), t.forEach((n) => {
1187
+ P.disable(), t.forEach((n) => {
1188
1188
  var _;
1189
1189
  const [o, i, s, a] = n, c = (_ = e.getInput(o)) == null ? void 0 : _.connection;
1190
1190
  if (!c)
@@ -1204,7 +1204,7 @@ function Ge(e, t) {
1204
1204
  ), l.outputConnection.connect(c);
1205
1205
  });
1206
1206
  } finally {
1207
- M.enable();
1207
+ P.enable();
1208
1208
  }
1209
1209
  }
1210
1210
  function to(e) {
@@ -1410,7 +1410,7 @@ const rf = {
1410
1410
  name: "",
1411
1411
  inputs: [],
1412
1412
  outputs: []
1413
- }, this.appendDummyInput("DUMMY").appendField("%{BKY_UI_V1_CALL_NODE_METHOD_TITLE}").appendField(new P(() => this.genNodeOpts_()), "NODE").appendField(new P(() => this.genMethodOpts_()), "METHOD"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_UI_V1_CALL_NODE_METHOD_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_CALL_NODE_METHOD_HELPURL}"), this.initData_();
1413
+ }, this.appendDummyInput("DUMMY").appendField("%{BKY_UI_V1_CALL_NODE_METHOD_TITLE}").appendField(new M(() => this.genNodeOpts_()), "NODE").appendField(new M(() => this.genMethodOpts_()), "METHOD"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_UI_V1_CALL_NODE_METHOD_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_CALL_NODE_METHOD_HELPURL}"), this.initData_();
1414
1414
  },
1415
1415
  initData_: function() {
1416
1416
  var i, s;
@@ -1453,7 +1453,7 @@ const rf = {
1453
1453
  onchange: function(e) {
1454
1454
  if (e.type === me.STATE_CHANGE)
1455
1455
  this.checkWarning_();
1456
- else if (e.type === M.BLOCK_CHANGE) {
1456
+ else if (e.type === P.BLOCK_CHANGE) {
1457
1457
  const t = e;
1458
1458
  if (t.blockId !== this.id)
1459
1459
  return;
@@ -1490,7 +1490,7 @@ const rf = {
1490
1490
  return;
1491
1491
  }
1492
1492
  e.removeField("EXTRA1", !0), this.method.key === "add" && e.appendField(
1493
- new P(() => this.genElementOpts_()),
1493
+ new M(() => this.genElementOpts_()),
1494
1494
  "EXTRA1"
1495
1495
  );
1496
1496
  },
@@ -1593,7 +1593,7 @@ const lf = {
1593
1593
  name: "",
1594
1594
  inputs: [],
1595
1595
  outputs: []
1596
- }, this.appendValueInput("NODE").setCheck("String").appendField("%{BKY_UI_V1_CALL_NODE_METHOD_AS_TITLE}").appendField(new P(() => this.genElementOpts_()), "ELEMENT").appendField(new P(() => this.genMethodOpts_()), "METHOD"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_UI_V1_CALL_NODE_METHOD_AS_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_CALL_NODE_METHOD_AS_HELPURL}"), this.initData_(), this.updateShape_();
1596
+ }, this.appendValueInput("NODE").setCheck("String").appendField("%{BKY_UI_V1_CALL_NODE_METHOD_AS_TITLE}").appendField(new M(() => this.genElementOpts_()), "ELEMENT").appendField(new M(() => this.genMethodOpts_()), "METHOD"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_UI_V1_CALL_NODE_METHOD_AS_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_CALL_NODE_METHOD_AS_HELPURL}"), this.initData_(), this.updateShape_();
1597
1597
  },
1598
1598
  initData_: function() {
1599
1599
  var i, s;
@@ -1633,7 +1633,7 @@ const lf = {
1633
1633
  onchange: function(e) {
1634
1634
  if (e.type === me.STATE_CHANGE)
1635
1635
  this.checkWarning_();
1636
- else if (e.type === M.BLOCK_CHANGE) {
1636
+ else if (e.type === P.BLOCK_CHANGE) {
1637
1637
  const t = e;
1638
1638
  if (t.blockId !== this.id)
1639
1639
  return;
@@ -1669,7 +1669,7 @@ const lf = {
1669
1669
  console.assert(!1);
1670
1670
  return;
1671
1671
  }
1672
- e.removeField("EXTRA1", !0), this.method.key === "add" && e.appendField(new P(() => In()), "EXTRA1");
1672
+ e.removeField("EXTRA1", !0), this.method.key === "add" && e.appendField(new M(() => In()), "EXTRA1");
1673
1673
  },
1674
1674
  updateShape2_: function() {
1675
1675
  var e, t;
@@ -1809,7 +1809,7 @@ const _f = {
1809
1809
  id: "",
1810
1810
  name: "",
1811
1811
  inputs: []
1812
- }, this.appendDummyInput().appendField("%{BKY_UI_V1_COMP_METHOD_IMPL_TITLE}").appendField(new P(() => this.genMethodOpts_()), "METHOD"), this.appendStatementInput("HANDLE").appendField("%{BKY_UI_DO}"), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_UI_V1_COMP_METHOD_IMPL_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_COMP_METHOD_IMPL_HELPURL}"), this.initData_();
1812
+ }, this.appendDummyInput().appendField("%{BKY_UI_V1_COMP_METHOD_IMPL_TITLE}").appendField(new M(() => this.genMethodOpts_()), "METHOD"), this.appendStatementInput("HANDLE").appendField("%{BKY_UI_DO}"), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_UI_V1_COMP_METHOD_IMPL_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_COMP_METHOD_IMPL_HELPURL}"), this.initData_();
1813
1813
  },
1814
1814
  initData_: function() {
1815
1815
  var n;
@@ -1839,7 +1839,7 @@ const _f = {
1839
1839
  onchange: function(e) {
1840
1840
  if (e.type === me.STATE_CHANGE)
1841
1841
  this.checkWarning_();
1842
- else if (e.type === M.BLOCK_CHANGE) {
1842
+ else if (e.type === P.BLOCK_CHANGE) {
1843
1843
  const t = e;
1844
1844
  if (t.blockId !== this.id)
1845
1845
  return;
@@ -1896,7 +1896,7 @@ const df = (e, t) => {
1896
1896
  k[n] = {
1897
1897
  init: function() {
1898
1898
  this.appendDummyInput().appendField(
1899
- new P(() => this.genOpts_()),
1899
+ new M(() => this.genOpts_()),
1900
1900
  "ITEM"
1901
1901
  ), this.setOutput(!0, o), this.setStyle("prop_blocks"), this.setTooltip(""), this.setHelpUrl("");
1902
1902
  },
@@ -1921,7 +1921,7 @@ const hf = (e, t) => {
1921
1921
  k[n] = {
1922
1922
  init: function() {
1923
1923
  this.value = t[0].default ?? "", this.appendDummyInput("DUMMY").appendField(
1924
- new P(() => this.genOpts_()),
1924
+ new M(() => this.genOpts_()),
1925
1925
  "TYPE"
1926
1926
  ), this.setOutput(!0, o), this.setStyle("prop_blocks"), this.setTooltip(""), this.setHelpUrl(""), this.updateShape_();
1927
1927
  },
@@ -1942,7 +1942,7 @@ const hf = (e, t) => {
1942
1942
  onchange: function(i) {
1943
1943
  if (i.type === me.STATE_CHANGE)
1944
1944
  this.checkWarning_();
1945
- else if (i.type === M.BLOCK_CHANGE) {
1945
+ else if (i.type === P.BLOCK_CHANGE) {
1946
1946
  const s = i;
1947
1947
  if (s.blockId !== this.id)
1948
1948
  return;
@@ -2019,7 +2019,7 @@ const ff = {
2019
2019
  id: "",
2020
2020
  key: "",
2021
2021
  alias: ""
2022
- }, this.appendDummyInput().appendField("%{BKY_UI_V1_GET_NODE_TITLE}").appendField(new P(() => this.genNodeOpts_()), "NODE"), this.setOutput(!0, "String"), this.setStyle("variable_blocks"), this.setTooltip("%{BKY_UI_V1_GET_NODE_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_GET_NODE_HELPURL}");
2022
+ }, this.appendDummyInput().appendField("%{BKY_UI_V1_GET_NODE_TITLE}").appendField(new M(() => this.genNodeOpts_()), "NODE"), this.setOutput(!0, "String"), this.setStyle("variable_blocks"), this.setTooltip("%{BKY_UI_V1_GET_NODE_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_GET_NODE_HELPURL}");
2023
2023
  },
2024
2024
  initData_: function() {
2025
2025
  var n;
@@ -2049,7 +2049,7 @@ const ff = {
2049
2049
  onchange: function(e) {
2050
2050
  if (e.type === me.STATE_CHANGE)
2051
2051
  this.checkWarning_();
2052
- else if (e.type === M.BLOCK_CHANGE) {
2052
+ else if (e.type === P.BLOCK_CHANGE) {
2053
2053
  const t = e;
2054
2054
  if (t.blockId !== this.id)
2055
2055
  return;
@@ -2093,7 +2093,7 @@ const mf = {
2093
2093
  }, this.prop = {
2094
2094
  keys: "",
2095
2095
  names: []
2096
- }, this.appendDummyInput().appendField("%{BKY_UI_V1_GET_NODE_PROP_TITLE}").appendField(new P(() => this.genNodeOpts_()), "NODE").appendField(new P(() => this.genPropOpts_()), "PROP"), this.setOutput(!0, null), this.setStyle("prop_blocks"), this.setTooltip("%{BKY_UI_V1_GET_NODE_PROP_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_GET_NODE_PROP_HELPURL}"), this.initData_();
2096
+ }, this.appendDummyInput().appendField("%{BKY_UI_V1_GET_NODE_PROP_TITLE}").appendField(new M(() => this.genNodeOpts_()), "NODE").appendField(new M(() => this.genPropOpts_()), "PROP"), this.setOutput(!0, null), this.setStyle("prop_blocks"), this.setTooltip("%{BKY_UI_V1_GET_NODE_PROP_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_GET_NODE_PROP_HELPURL}"), this.initData_();
2097
2097
  },
2098
2098
  initData_: function() {
2099
2099
  var i, s;
@@ -2133,7 +2133,7 @@ const mf = {
2133
2133
  onchange: function(e) {
2134
2134
  if (e.type === me.STATE_CHANGE)
2135
2135
  this.checkWarning_();
2136
- else if (e.type === M.BLOCK_CHANGE) {
2136
+ else if (e.type === P.BLOCK_CHANGE) {
2137
2137
  const t = e;
2138
2138
  if (t.blockId !== this.id)
2139
2139
  return;
@@ -2193,7 +2193,7 @@ const gf = {
2193
2193
  }, this.prop = {
2194
2194
  keys: "",
2195
2195
  names: []
2196
- }, this.appendValueInput("NODE").setCheck("String").appendField("%{BKY_UI_V1_GET_NODE_PROP_AS_TITLE}"), this.appendDummyInput().appendField(new P(() => this.genElementOpts_()), "ELEMENT").appendField(new P(() => this.genPropOpts_()), "PROP"), this.setOutput(!0, null), this.setStyle("prop_blocks"), this.setTooltip("%{BKY_UI_V1_GET_NODE_PROP_AS_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_GET_NODE_PROP_AS_HELPURL}"), this.initData_();
2196
+ }, this.appendValueInput("NODE").setCheck("String").appendField("%{BKY_UI_V1_GET_NODE_PROP_AS_TITLE}"), this.appendDummyInput().appendField(new M(() => this.genElementOpts_()), "ELEMENT").appendField(new M(() => this.genPropOpts_()), "PROP"), this.setOutput(!0, null), this.setStyle("prop_blocks"), this.setTooltip("%{BKY_UI_V1_GET_NODE_PROP_AS_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_GET_NODE_PROP_AS_HELPURL}"), this.initData_();
2197
2197
  },
2198
2198
  initData_: function() {
2199
2199
  var i, s;
@@ -2233,7 +2233,7 @@ const gf = {
2233
2233
  onchange: function(e) {
2234
2234
  if (e.type === me.STATE_CHANGE)
2235
2235
  this.checkWarning_();
2236
- else if (e.type === M.BLOCK_CHANGE) {
2236
+ else if (e.type === P.BLOCK_CHANGE) {
2237
2237
  const t = e;
2238
2238
  if (t.blockId !== this.id)
2239
2239
  return;
@@ -2305,7 +2305,7 @@ const Af = {
2305
2305
  name: "",
2306
2306
  type: ""
2307
2307
  }, this.appendDummyInput().appendField("%{BKY_UI_V1_GET_PAGE_ARGUMENT_TITLE}").appendField(
2308
- new P(() => this.genArgumentOpts_()),
2308
+ new M(() => this.genArgumentOpts_()),
2309
2309
  "ARGUMENT"
2310
2310
  ), this.setOutput(!0, null), this.setStyle("variable_blocks"), this.setTooltip("%{BKY_UI_V1_GET_PAGE_ARGUMENT_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_GET_PAGE_ARGUMENT_HELPURL}");
2311
2311
  },
@@ -2326,7 +2326,7 @@ const Af = {
2326
2326
  onchange: function(e) {
2327
2327
  if (e.type === me.STATE_CHANGE)
2328
2328
  this.checkWarning_();
2329
- else if (e.type === M.BLOCK_CHANGE) {
2329
+ else if (e.type === P.BLOCK_CHANGE) {
2330
2330
  const t = e;
2331
2331
  if (t.blockId !== this.id)
2332
2332
  return;
@@ -2419,8 +2419,8 @@ const yf = {
2419
2419
  }, this.page = {
2420
2420
  id: "",
2421
2421
  name: ""
2422
- }, this.appendDummyInput().appendField("%{BKY_UI_V1_NAVIGATE_TO_TITLE}").appendField(new P(() => this.genAppOpts_()), "APP").appendField(new P(() => this.genPageOpts_()), "PAGE").appendField("%{BKY_UI_MODE}").appendField(
2423
- new P([
2422
+ }, this.appendDummyInput().appendField("%{BKY_UI_V1_NAVIGATE_TO_TITLE}").appendField(new M(() => this.genAppOpts_()), "APP").appendField(new M(() => this.genPageOpts_()), "PAGE").appendField("%{BKY_UI_MODE}").appendField(
2423
+ new M([
2424
2424
  ["%{BKY_UI_NAVIGATE_MODE_PUSH}", "push"],
2425
2425
  ["%{BKY_UI_NAVIGATE_MODE_REPLACE}", "replace"]
2426
2426
  ]),
@@ -2465,7 +2465,7 @@ const yf = {
2465
2465
  onchange: function(e) {
2466
2466
  if (e.type === me.STATE_CHANGE)
2467
2467
  this.checkWarning_();
2468
- else if (e.type === M.BLOCK_CHANGE) {
2468
+ else if (e.type === P.BLOCK_CHANGE) {
2469
2469
  const t = e;
2470
2470
  if (t.blockId !== this.id)
2471
2471
  return;
@@ -2524,7 +2524,7 @@ const bf = {
2524
2524
  key: "",
2525
2525
  name: "",
2526
2526
  params: []
2527
- }, this.appendDummyInput().appendField("%{BKY_UI_V1_ON_NODE_EVENT_TITLE}").appendField(new P(() => this.genNodeOpts_()), "NODE").appendField(new P(() => this.genEventOpts_()), "EVENT"), this.appendStatementInput("HANDLE").appendField("%{BKY_UI_DO}"), this.setStyle("event_blocks"), this.setTooltip("%{BKY_UI_V1_ON_NODE_EVENT_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_ON_NODE_EVENT_HELPURL}"), this.initData_();
2527
+ }, this.appendDummyInput().appendField("%{BKY_UI_V1_ON_NODE_EVENT_TITLE}").appendField(new M(() => this.genNodeOpts_()), "NODE").appendField(new M(() => this.genEventOpts_()), "EVENT"), this.appendStatementInput("HANDLE").appendField("%{BKY_UI_DO}"), this.setStyle("event_blocks"), this.setTooltip("%{BKY_UI_V1_ON_NODE_EVENT_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_ON_NODE_EVENT_HELPURL}"), this.initData_();
2528
2528
  },
2529
2529
  initData_: function() {
2530
2530
  var i, s;
@@ -2564,7 +2564,7 @@ const bf = {
2564
2564
  onchange: function(e) {
2565
2565
  if (e.type === me.STATE_CHANGE)
2566
2566
  this.checkWarning_();
2567
- else if (e.type === M.BLOCK_CHANGE) {
2567
+ else if (e.type === P.BLOCK_CHANGE) {
2568
2568
  const t = e;
2569
2569
  if (t.blockId !== this.id)
2570
2570
  return;
@@ -2654,7 +2654,7 @@ const Cf = {
2654
2654
  key: "",
2655
2655
  name: "",
2656
2656
  params: []
2657
- }, this.appendValueInput("NODE").appendField("%{BKY_UI_V1_ON_NODE_EVENT_AS_TITLE}").appendField(new P(() => this.genElementOpts_()), "ELEMENT").appendField(new P(() => this.genEventOpts_()), "EVENT"), this.appendStatementInput("HANDLE").appendField("%{BKY_UI_DO}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("event_blocks"), this.setTooltip("%{BKY_UI_V1_ON_NODE_EVENT_AS_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_ON_NODE_EVENT_AS_HELPURL}"), this.initData_();
2657
+ }, this.appendValueInput("NODE").appendField("%{BKY_UI_V1_ON_NODE_EVENT_AS_TITLE}").appendField(new M(() => this.genElementOpts_()), "ELEMENT").appendField(new M(() => this.genEventOpts_()), "EVENT"), this.appendStatementInput("HANDLE").appendField("%{BKY_UI_DO}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("event_blocks"), this.setTooltip("%{BKY_UI_V1_ON_NODE_EVENT_AS_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_ON_NODE_EVENT_AS_HELPURL}"), this.initData_();
2658
2658
  },
2659
2659
  initData_: function() {
2660
2660
  var i, s;
@@ -2694,7 +2694,7 @@ const Cf = {
2694
2694
  onchange: function(e) {
2695
2695
  if (e.type === me.STATE_CHANGE)
2696
2696
  this.checkWarning_();
2697
- else if (e.type === M.BLOCK_CHANGE) {
2697
+ else if (e.type === P.BLOCK_CHANGE) {
2698
2698
  const t = e;
2699
2699
  if (t.blockId !== this.id)
2700
2700
  return;
@@ -2884,7 +2884,7 @@ const Nf = {
2884
2884
  this.comp = {
2885
2885
  id: void 0,
2886
2886
  name: ""
2887
- }, this.appendDummyInput().appendField("%{BKY_UI_V1_SELECT_COMP_TITLE}").appendField(new P(() => this.genCompOpts_()), "COMP"), this.setOutput(!0, "Comp"), this.setStyle("prop_blocks"), this.setTooltip("%{BKY_UI_V1_SELECT_COMP_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_SELECT_COMP_HELPURL}"), this.initData_();
2887
+ }, this.appendDummyInput().appendField("%{BKY_UI_V1_SELECT_COMP_TITLE}").appendField(new M(() => this.genCompOpts_()), "COMP"), this.setOutput(!0, "Comp"), this.setStyle("prop_blocks"), this.setTooltip("%{BKY_UI_V1_SELECT_COMP_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_SELECT_COMP_HELPURL}"), this.initData_();
2888
2888
  },
2889
2889
  initData_: function() {
2890
2890
  var n;
@@ -2914,7 +2914,7 @@ const Nf = {
2914
2914
  onchange: function(e) {
2915
2915
  if (e.type === me.STATE_CHANGE)
2916
2916
  this.checkWarning_();
2917
- else if (e.type === M.BLOCK_CHANGE) {
2917
+ else if (e.type === P.BLOCK_CHANGE) {
2918
2918
  const t = e;
2919
2919
  if (t.blockId !== this.id)
2920
2920
  return;
@@ -2957,7 +2957,7 @@ const Lf = {
2957
2957
  id: "",
2958
2958
  name: "",
2959
2959
  type: ""
2960
- }, this.appendValueInput("VALUE").appendField("%{BKY_UI_V1_SET_COMP_METHOD_OUTPUT_TITLE}").appendField(new P(() => this.genMethodOpts_()), "METHOD").appendField(new P(() => this.genOutputOpts_()), "OUTPUT"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_UI_V1_SET_COMP_METHOD_OUTPUT_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_SET_COMP_METHOD_OUTPUT_HELPURL}"), this.initData_();
2960
+ }, this.appendValueInput("VALUE").appendField("%{BKY_UI_V1_SET_COMP_METHOD_OUTPUT_TITLE}").appendField(new M(() => this.genMethodOpts_()), "METHOD").appendField(new M(() => this.genOutputOpts_()), "OUTPUT"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_UI_V1_SET_COMP_METHOD_OUTPUT_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_SET_COMP_METHOD_OUTPUT_HELPURL}"), this.initData_();
2961
2961
  },
2962
2962
  initData_: function() {
2963
2963
  var i, s;
@@ -2996,7 +2996,7 @@ const Lf = {
2996
2996
  onchange: function(e) {
2997
2997
  if (e.type === me.STATE_CHANGE)
2998
2998
  this.checkWarning_();
2999
- else if (e.type === M.BLOCK_CHANGE) {
2999
+ else if (e.type === P.BLOCK_CHANGE) {
3000
3000
  const t = e;
3001
3001
  if (t.blockId !== this.id)
3002
3002
  return;
@@ -3095,7 +3095,7 @@ const Bf = {
3095
3095
  }, this.prop = {
3096
3096
  keys: "",
3097
3097
  names: []
3098
- }, this.appendValueInput("VALUE").appendField("%{BKY_UI_V1_SET_NODE_PROP_TITLE}").appendField(new P(() => this.genNodeOpts_()), "NODE").appendField(new P(() => this.genPropOpts_()), "PROP"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("prop_blocks"), this.setTooltip("%{BKY_UI_V1_SET_NODE_PROP_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_SET_NODE_PROP_HELPURL}"), this.initData_(), this.isInFlyout && (this.rebuildBlocks_(), this.updateCheck_());
3098
+ }, this.appendValueInput("VALUE").appendField("%{BKY_UI_V1_SET_NODE_PROP_TITLE}").appendField(new M(() => this.genNodeOpts_()), "NODE").appendField(new M(() => this.genPropOpts_()), "PROP"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("prop_blocks"), this.setTooltip("%{BKY_UI_V1_SET_NODE_PROP_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_SET_NODE_PROP_HELPURL}"), this.initData_(), this.isInFlyout && (this.rebuildBlocks_(), this.updateCheck_());
3099
3099
  },
3100
3100
  initData_: function() {
3101
3101
  var i, s;
@@ -3135,7 +3135,7 @@ const Bf = {
3135
3135
  onchange: function(e) {
3136
3136
  if (e.type === me.STATE_CHANGE)
3137
3137
  this.checkWarning_();
3138
- else if (e.type === M.BLOCK_CHANGE) {
3138
+ else if (e.type === P.BLOCK_CHANGE) {
3139
3139
  const t = e;
3140
3140
  if (t.blockId !== this.id)
3141
3141
  return;
@@ -3215,7 +3215,7 @@ const Rf = {
3215
3215
  }, this.prop = {
3216
3216
  keys: "",
3217
3217
  names: []
3218
- }, this.appendValueInput("NODE").setCheck("String").appendField("%{BKY_UI_V1_SET_NODE_PROP_AS_TITLE}"), this.appendValueInput("VALUE").appendField(new P(() => this.genElementOpts_()), "ELEMENT").appendField(new P(() => this.genPropOpts_()), "PROP"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setInputsInline(!0), this.setStyle("prop_blocks"), this.setTooltip("%{BKY_UI_V1_SET_NODE_PROP_AS_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_SET_NODE_PROP_AS_HELPURL}"), this.initData_(), this.isInFlyout && (this.rebuildBlocks_(), this.updateCheck_());
3218
+ }, this.appendValueInput("NODE").setCheck("String").appendField("%{BKY_UI_V1_SET_NODE_PROP_AS_TITLE}"), this.appendValueInput("VALUE").appendField(new M(() => this.genElementOpts_()), "ELEMENT").appendField(new M(() => this.genPropOpts_()), "PROP"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setInputsInline(!0), this.setStyle("prop_blocks"), this.setTooltip("%{BKY_UI_V1_SET_NODE_PROP_AS_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_SET_NODE_PROP_AS_HELPURL}"), this.initData_(), this.isInFlyout && (this.rebuildBlocks_(), this.updateCheck_());
3219
3219
  },
3220
3220
  initData_: function() {
3221
3221
  var i, s;
@@ -3255,7 +3255,7 @@ const Rf = {
3255
3255
  onchange: function(e) {
3256
3256
  if (e.type === me.STATE_CHANGE)
3257
3257
  this.checkWarning_();
3258
- else if (e.type === M.BLOCK_CHANGE) {
3258
+ else if (e.type === P.BLOCK_CHANGE) {
3259
3259
  const t = e;
3260
3260
  if (t.blockId !== this.id)
3261
3261
  return;
@@ -3333,7 +3333,7 @@ const Df = {
3333
3333
  id: "",
3334
3334
  name: "",
3335
3335
  params: []
3336
- }, this.appendDummyInput().appendField("%{BKY_UI_V1_TRIGGER_COMP_EVENT_TITLE}").appendField(new P(() => this.genEventOpts_()), "EVENT"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("event_blocks"), this.setTooltip("%{BKY_UI_V1_TRIGGER_COMP_EVENT_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_TRIGGER_COMP_EVENT_HELPURL}"), this.initData_();
3336
+ }, this.appendDummyInput().appendField("%{BKY_UI_V1_TRIGGER_COMP_EVENT_TITLE}").appendField(new M(() => this.genEventOpts_()), "EVENT"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("event_blocks"), this.setTooltip("%{BKY_UI_V1_TRIGGER_COMP_EVENT_TOOLTIP}"), this.setHelpUrl("%{BKY_UI_V1_TRIGGER_COMP_EVENT_HELPURL}"), this.initData_();
3337
3337
  },
3338
3338
  initData_: function() {
3339
3339
  var n;
@@ -3363,7 +3363,7 @@ const Df = {
3363
3363
  onchange: function(e) {
3364
3364
  if (e.type === me.STATE_CHANGE)
3365
3365
  this.checkWarning_();
3366
- else if (e.type === M.BLOCK_CHANGE) {
3366
+ else if (e.type === P.BLOCK_CHANGE) {
3367
3367
  const t = e;
3368
3368
  if (t.blockId !== this.id)
3369
3369
  return;
@@ -3649,7 +3649,7 @@ const Uf = {
3649
3649
  this.key = e, this.name = t, this.locale = n, this.updateShape_();
3650
3650
  },
3651
3651
  onchange: function(e) {
3652
- if (e.type === M.BLOCK_MOVE) {
3652
+ if (e.type === P.BLOCK_MOVE) {
3653
3653
  const t = e;
3654
3654
  if (t.blockId !== this.id)
3655
3655
  return;
@@ -3661,7 +3661,7 @@ const Uf = {
3661
3661
  const t = this.workspace.getBlockById(e.oldParentId);
3662
3662
  if (t && xf(t.type, e.oldInputName))
3663
3663
  try {
3664
- M.disable();
3664
+ P.disable();
3665
3665
  const o = (n = t.getInput(e.oldInputName)) == null ? void 0 : n.connection;
3666
3666
  if (o) {
3667
3667
  const i = Ts(
@@ -3673,7 +3673,7 @@ const Uf = {
3673
3673
  o.connect(i.outputConnection);
3674
3674
  }
3675
3675
  } finally {
3676
- M.enable();
3676
+ P.enable();
3677
3677
  }
3678
3678
  },
3679
3679
  updateShape_: function() {
@@ -3737,7 +3737,7 @@ const Vf = {
3737
3737
  name: "",
3738
3738
  inputs: [],
3739
3739
  outputs: []
3740
- }, this.appendDummyInput().appendField("%{BKY_COMPUTE_CALL}").appendField(new P(() => this.genSpaceOpts_()), "SPACE").appendField(new P(() => this.genFuncOpts_()), "FUNC"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_COMPUTE_V1_CALL_FUNC_TOOLTIP}"), this.setHelpUrl("%{BKY_COMPUTE_V1_CALL_FUNC_HELPURL}"), this.initData_();
3740
+ }, this.appendDummyInput().appendField("%{BKY_COMPUTE_CALL}").appendField(new M(() => this.genSpaceOpts_()), "SPACE").appendField(new M(() => this.genFuncOpts_()), "FUNC"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_COMPUTE_V1_CALL_FUNC_TOOLTIP}"), this.setHelpUrl("%{BKY_COMPUTE_V1_CALL_FUNC_HELPURL}"), this.initData_();
3741
3741
  },
3742
3742
  initData_: function() {
3743
3743
  var i, s;
@@ -3860,17 +3860,14 @@ k.call_func_v1 = Vf;
3860
3860
  r.forBlock.call_func_v1 = function(e) {
3861
3861
  const t = r.INDENT, n = r.quote_, o = e, i = n(o.space.id), s = n(o.func.id);
3862
3862
  let a = "";
3863
- o.func.inputs.forEach(({ id: h }, T) => {
3863
+ a += `${t}var __inputs__ = {
3864
+ `, o.func.inputs.forEach(({ id: h }, T) => {
3864
3865
  const m = r.valueToCode(
3865
3866
  o,
3866
3867
  "INPUT" + T,
3867
3868
  u.ATOMIC
3868
3869
  );
3869
- a += `${t}var __input_${h}__ = ${m};
3870
- `;
3871
- }), a += `${t}var __inputs__ = {
3872
- `, o.func.inputs.forEach(({ id: h }) => {
3873
- a += `${t}${t}${n(h)}: __input_${h}__,
3870
+ a += `${t}${t}${n(h)}: ${m},
3874
3871
  `;
3875
3872
  }), a += `${t}};`;
3876
3873
  const c = n(o.space.name + "/" + o.func.name);
@@ -3896,7 +3893,7 @@ const Yf = {
3896
3893
  name: "",
3897
3894
  inputs: [],
3898
3895
  outputs: []
3899
- }, this.appendDummyInput().appendField("%{BKY_COMPUTE_CALL}");
3896
+ }, this.appendDummyInput().appendField("%{BKY_COMPUTE_CALL}").appendField(new M(() => this.genSpaceOpts_()), "SPACE").appendField(new M(() => this.genFuncOpts_()), "FUNC"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_COMPUTE_V1_CALL_FUNC_INTERNAL_TOOLTIP}"), this.setHelpUrl("%{BKY_COMPUTE_V1_CALL_FUNC_INTERNAL_HELPURL}"), this.initData_();
3900
3897
  },
3901
3898
  initData_: function() {
3902
3899
  var i, s;
@@ -3911,7 +3908,7 @@ const Yf = {
3911
3908
  const n = (s = As(this.space.id)) == null ? void 0 : s[0];
3912
3909
  if (!n)
3913
3910
  return;
3914
- this.func.id = n.id, this.func.name = n.name;
3911
+ this.func.id = n.id, this.func.name = n.name, this.func.inputs = n.inputs, this.func.outputs = n.outputs;
3915
3912
  const o = this.getField("FUNC");
3916
3913
  o.getOptions(!1), o.setValue(this.func.id);
3917
3914
  },
@@ -3923,8 +3920,8 @@ const Yf = {
3923
3920
  },
3924
3921
  loadExtraState: function(e) {
3925
3922
  var t, n, o, i, s, a;
3926
- this.space.id = ((t = e.space) == null ? void 0 : t.id) ?? "", this.space.name = ((n = e.space) == null ? void 0 : n.name) ?? "", this.func.id = ((o = e.func) == null ? void 0 : o.id) ?? "", this.func.name = ((i = e.func) == null ? void 0 : i.name) ?? "", this.func.inputs = ((s = e.func) == null ? void 0 : s.inputs) ?? [], this.func.outputs = ((a = e.func) == null ? void 0 : a.outputs) ?? [], this.updateShape_(), setTimeout(() => {
3927
- this.updateShadow_(), this.rebuildBlocks_(), this.checkWarning_();
3923
+ this.space.id = ((t = e.space) == null ? void 0 : t.id) ?? "", this.space.name = ((n = e.space) == null ? void 0 : n.name) ?? "", this.func.id = ((o = e.func) == null ? void 0 : o.id) ?? "", this.func.name = ((i = e.func) == null ? void 0 : i.name) ?? "", this.func.inputs = ((s = e.func) == null ? void 0 : s.inputs) ?? [], this.func.outputs = ((a = e.func) == null ? void 0 : a.outputs) ?? [], this.updateShape_(), this.updateCheck_(), this.updateShadow_(), setTimeout(() => {
3924
+ this.rebuildBlocks_(), this.checkWarning_();
3928
3925
  }, 0);
3929
3926
  },
3930
3927
  genSpaceOpts_: function() {
@@ -3960,6 +3957,12 @@ const Yf = {
3960
3957
  this.getInput("INPUT" + i) || (this.appendValueInput("INPUT" + i).setAlign(te.Align.RIGHT).appendField(s), this.getInput("OUTPUT0") ? this.moveInputBefore("INPUT" + i, "OUTPUT0") : this.moveInputBefore("INPUT" + i, "CALLBACK"));
3961
3958
  }
3962
3959
  },
3960
+ updateCheck_: function() {
3961
+ for (let e = 0; e < this.func.inputs.length; e++) {
3962
+ const { type: t } = this.func.inputs[e], n = this.getInput("INPUT" + e);
3963
+ t === "string" ? n.setCheck("String") : t === "number" ? n.setCheck("Number") : t === "boolean" ? n.setCheck("Boolean") : t === "list" ? n.setCheck("Array") : t === "object" && n.setCheck("Object");
3964
+ }
3965
+ },
3963
3966
  updateShadow_: function() {
3964
3967
  if (!this.isInsertionMarker())
3965
3968
  for (let e = 0; e < this.func.inputs.length; e++) {
@@ -3982,7 +3985,7 @@ const Yf = {
3982
3985
  const e = [];
3983
3986
  for (let t = 0; t < this.func.outputs.length; t++) {
3984
3987
  const { id: n, name: o } = this.func.outputs[t];
3985
- e.push(["OUTPUT" + t, `__param@${n}__`, o, !1]);
3988
+ e.push(["OUTPUT" + t, `__output_${n}__`, o, !1]);
3986
3989
  }
3987
3990
  Ge(this, e);
3988
3991
  },
@@ -4011,29 +4014,32 @@ const Yf = {
4011
4014
  };
4012
4015
  k.call_func_internal_v1 = Yf;
4013
4016
  r.forBlock.call_func_internal_v1 = function(e) {
4014
- const t = r.INDENT, n = r.quote_, o = e, i = n(o.space.id), s = n(o.func.id), a = [];
4015
- for (let T = 0; T < o.func.inputs.length; T++)
4016
- a.push(
4017
- r.valueToCode(o, "INPUT" + T, u.ATOMIC)
4017
+ const t = r.INDENT, n = r.quote_, o = e, i = n(o.space.id), s = n(o.func.id);
4018
+ let a = `${t}var __inputs__ = {
4019
+ `;
4020
+ o.func.inputs.forEach(({ id: h }, T) => {
4021
+ const m = r.valueToCode(
4022
+ o,
4023
+ "INPUT" + T,
4024
+ u.ATOMIC
4018
4025
  );
4019
- const c = `[${a.join(", ")}]`, l = o.space.name + "/" + o.func.name;
4020
- let _ = "";
4021
- o.func.outputs.forEach(({ name: T }, m) => {
4022
- _ += `${t}${T} = result[${m}];
4026
+ a += `${t}${t}${n(h)}: ${m},
4027
+ `;
4028
+ }), a += `${t}};`;
4029
+ const c = o.space.name + "/" + o.func.name;
4030
+ let l = "";
4031
+ o.func.outputs.forEach(({ id: h }) => {
4032
+ l += `${t}var __output_${h}__ = __result__.outputs[${n(h)}];
4023
4033
  `;
4024
4034
  });
4025
- const d = r.statementToCode(o, "CALLBACK");
4035
+ const _ = r.statementToCode(o, "CALLBACK");
4026
4036
  return `{
4027
- var result = __callFuncInternalV1__(${i}, ${s}, ${c});
4028
- var success = result.success;
4029
- var message = result.message;
4030
- var outputs = result.outputs;
4031
- if (!success) {
4032
- throw 'call func<${l}> failed, reason: ' + message;
4037
+ ${a}
4038
+ var __result__ = __callFuncInternalV1__(${i}, ${s}, __inputs__);
4039
+ if (!__result__.success) {
4040
+ throw 'call func<${c}> failed, reason: ' + __result__.message;
4033
4041
  }
4034
- ${_}
4035
- ${d}
4036
- }
4042
+ ${l}${_}}
4037
4043
  `;
4038
4044
  };
4039
4045
  C([
@@ -4140,7 +4146,7 @@ const Hf = {
4140
4146
  id: "",
4141
4147
  name: "",
4142
4148
  type: ""
4143
- }, this.appendValueInput("VALUE").appendField("%{BKY_COMPUTE_V1_SET_FUNC_OUTPUT_TITLE}").appendField(new P(() => this.genOutputOpts_()), "OUTPUT"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_COMPUTE_V1_SET_FUNC_OUTPUT_TOOLTIP}"), this.setHelpUrl("%{BKY_COMPUTE_V1_SET_FUNC_OUTPUT_HELPURL}"), this.initData_();
4149
+ }, this.appendValueInput("VALUE").appendField("%{BKY_COMPUTE_V1_SET_FUNC_OUTPUT_TITLE}").appendField(new M(() => this.genOutputOpts_()), "OUTPUT"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_COMPUTE_V1_SET_FUNC_OUTPUT_TOOLTIP}"), this.setHelpUrl("%{BKY_COMPUTE_V1_SET_FUNC_OUTPUT_HELPURL}"), this.initData_();
4144
4150
  },
4145
4151
  initData_: function() {
4146
4152
  var t;
@@ -4166,7 +4172,7 @@ const Hf = {
4166
4172
  onchange: function(e) {
4167
4173
  if (e.type === me.STATE_CHANGE)
4168
4174
  this.checkWarning_();
4169
- else if (e.type === M.BLOCK_CHANGE) {
4175
+ else if (e.type === P.BLOCK_CHANGE) {
4170
4176
  const t = e;
4171
4177
  if (t.blockId !== this.id)
4172
4178
  return;
@@ -4314,8 +4320,8 @@ const Gf = {
4314
4320
  name: ""
4315
4321
  }, this.column = {
4316
4322
  name: ""
4317
- }, this.appendValueInput("VALUE").appendField(new P(() => this.genSpaceOpts_()), "SPACE").appendField(new P(() => this.genTableOpts_()), "TABLE").appendField(new P(() => this.genColumnOpts_()), "COLUMN").appendField(
4318
- new P([
4323
+ }, this.appendValueInput("VALUE").appendField(new M(() => this.genSpaceOpts_()), "SPACE").appendField(new M(() => this.genTableOpts_()), "TABLE").appendField(new M(() => this.genColumnOpts_()), "COLUMN").appendField(
4324
+ new M([
4319
4325
  ["=", "EQ"],
4320
4326
  ["≠", "NEQ"],
4321
4327
  ["‏<", "LT"],
@@ -4377,7 +4383,7 @@ const Gf = {
4377
4383
  onchange: function(e) {
4378
4384
  if (e.type === me.STATE_CHANGE)
4379
4385
  this.checkWarning_();
4380
- else if (e.type === M.BLOCK_CHANGE) {
4386
+ else if (e.type === P.BLOCK_CHANGE) {
4381
4387
  const t = e;
4382
4388
  t.blockId === this.id && t.element === "field" && (t.name === "SPACE" ? this.onSpaceChange_(t.newValue) : t.name === "TABLE" ? this.onTableChange_(t.newValue) : t.name === "COLUMN" && this.onColumnChange_(t.newValue));
4383
4389
  }
@@ -4469,7 +4475,7 @@ k.cond_logic_item_v1 = Wf;
4469
4475
  const Xf = {
4470
4476
  init: function() {
4471
4477
  this.itemCount_ = 1, this.appendValueInput("VALUE").setCheck("Condition").appendField(
4472
- new P([
4478
+ new M([
4473
4479
  ["%{BKY_DATA_COND_LOGIC_TYPE_AND}", "AND"],
4474
4480
  ["%{BKY_DATA_COND_LOGIC_TYPE_OR}", "OR"]
4475
4481
  ]),
@@ -4725,7 +4731,7 @@ const Qf = {
4725
4731
  }, this.table = {
4726
4732
  id: "",
4727
4733
  name: ""
4728
- }, this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_DATA_V1_SELECT_COLUMN_TITLE}").appendField(new P(() => this.genSpaceOpts_()), "SPACE").appendField(new P(() => this.genTableOpts_()), "TABLE"), this.setMutator(
4734
+ }, this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_DATA_V1_SELECT_COLUMN_TITLE}").appendField(new M(() => this.genSpaceOpts_()), "SPACE").appendField(new M(() => this.genTableOpts_()), "TABLE"), this.setMutator(
4729
4735
  new en.MutatorIcon(
4730
4736
  ["select_column_item_v1"],
4731
4737
  this
@@ -4778,7 +4784,7 @@ const Qf = {
4778
4784
  var t;
4779
4785
  if (e.type === me.STATE_CHANGE)
4780
4786
  this.checkWarning_();
4781
- else if (e.type === M.BLOCK_CHANGE) {
4787
+ else if (e.type === P.BLOCK_CHANGE) {
4782
4788
  const n = e;
4783
4789
  if (n.blockId !== this.id)
4784
4790
  return;
@@ -4845,11 +4851,11 @@ const Qf = {
4845
4851
  }
4846
4852
  this.itemCount_ = n.length, this.updateShape_();
4847
4853
  try {
4848
- M.disable();
4854
+ P.disable();
4849
4855
  for (let i = 0; i < this.itemCount_; i++)
4850
4856
  n[i] && this.setFieldValue(n[i], "COLUMN" + i), o[i] && this.setFieldValue(o[i], "ALIAS" + i);
4851
4857
  } finally {
4852
- M.enable();
4858
+ P.enable();
4853
4859
  }
4854
4860
  setTimeout(() => {
4855
4861
  this.checkWarning_();
@@ -4872,7 +4878,7 @@ const Qf = {
4872
4878
  this.removeInput("ADD" + e);
4873
4879
  for (let e = 0; e < this.itemCount_; e++)
4874
4880
  this.getInput("ADD" + e) || this.appendDummyInput("ADD" + e).setAlign(te.Align.RIGHT).appendField(
4875
- new P(() => this.genColumnOpts_()),
4881
+ new M(() => this.genColumnOpts_()),
4876
4882
  "COLUMN" + e
4877
4883
  ).appendField("%{BKY_DATA_AS}").appendField(
4878
4884
  new qt(this.getFieldValue("COLUMN" + e)),
@@ -4920,7 +4926,7 @@ const em = {
4920
4926
  }, this.table = {
4921
4927
  id: "",
4922
4928
  name: ""
4923
- }, this.appendDummyInput().appendField("%{BKY_DATA_V1_SELECT_TABLE_TITLE}").appendField(new P(() => this.genSpaceOpts_()), "SPACE").appendField(new P(() => this.genTableOpts_()), "TABLE"), this.setOutput(!0, "SelectTable"), this.setStyle("object_blocks"), this.setTooltip("%{BKY_DATA_V1_SELECT_TABLE_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_SELECT_TABLE_HELPURL}"), this.initData_();
4929
+ }, this.appendDummyInput().appendField("%{BKY_DATA_V1_SELECT_TABLE_TITLE}").appendField(new M(() => this.genSpaceOpts_()), "SPACE").appendField(new M(() => this.genTableOpts_()), "TABLE"), this.setOutput(!0, "SelectTable"), this.setStyle("object_blocks"), this.setTooltip("%{BKY_DATA_V1_SELECT_TABLE_TOOLTIP}"), this.setHelpUrl("%{BKY_DATA_V1_SELECT_TABLE_HELPURL}"), this.initData_();
4924
4930
  },
4925
4931
  initData_: function() {
4926
4932
  var i, s;
@@ -4958,7 +4964,7 @@ const em = {
4958
4964
  onchange: function(e) {
4959
4965
  if (e.type === me.STATE_CHANGE)
4960
4966
  this.checkWarning_();
4961
- else if (e.type === M.BLOCK_CHANGE) {
4967
+ else if (e.type === P.BLOCK_CHANGE) {
4962
4968
  const t = e;
4963
4969
  if (t.blockId !== this.id)
4964
4970
  return;
@@ -5028,7 +5034,7 @@ const om = {
5028
5034
  }, this.table = {
5029
5035
  id: "",
5030
5036
  name: ""
5031
- }, this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_DATA_V1_UPDATE_COLUMN_TITLE}").appendField(new P(() => this.genSpaceOpts_()), "SPACE").appendField(new P(() => this.genTableOpts_()), "TABLE"), this.setMutator(
5037
+ }, this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_DATA_V1_UPDATE_COLUMN_TITLE}").appendField(new M(() => this.genSpaceOpts_()), "SPACE").appendField(new M(() => this.genTableOpts_()), "TABLE"), this.setMutator(
5032
5038
  new en.MutatorIcon(
5033
5039
  ["update_column_item_v1"],
5034
5040
  this
@@ -5080,7 +5086,7 @@ const om = {
5080
5086
  onchange: function(e) {
5081
5087
  if (e.type === me.STATE_CHANGE)
5082
5088
  this.checkWarning_();
5083
- else if (e.type === M.BLOCK_CHANGE) {
5089
+ else if (e.type === P.BLOCK_CHANGE) {
5084
5090
  const t = e;
5085
5091
  if (t.blockId !== this.id)
5086
5092
  return;
@@ -5140,11 +5146,11 @@ const om = {
5140
5146
  }
5141
5147
  this.itemCount_ = n.length, this.updateShape_();
5142
5148
  try {
5143
- M.disable();
5149
+ P.disable();
5144
5150
  for (let i = 0; i < this.itemCount_; i++)
5145
5151
  this.setFieldValue(n[i], "COLUMN" + i);
5146
5152
  } finally {
5147
- M.enable();
5153
+ P.enable();
5148
5154
  }
5149
5155
  setTimeout(() => {
5150
5156
  var i;
@@ -5173,7 +5179,7 @@ const om = {
5173
5179
  this.removeInput("ADD" + e);
5174
5180
  for (let e = 0; e < this.itemCount_; e++)
5175
5181
  this.getInput("ADD" + e) || this.appendValueInput("ADD" + e).setAlign(te.Align.RIGHT).appendField(
5176
- new P(() => this.genColumnOpts_()),
5182
+ new M(() => this.genColumnOpts_()),
5177
5183
  "COLUMN" + e
5178
5184
  );
5179
5185
  },
@@ -5786,11 +5792,11 @@ const gm = {
5786
5792
  t.outputConnection,
5787
5793
  n.outputConnection
5788
5794
  )) {
5789
- M.setGroup(e.group);
5795
+ P.setGroup(e.group);
5790
5796
  const o = this.prevBlocks_[0];
5791
5797
  o !== t && (t.unplug(), o && !o.isDisposed() && !o.isShadow() && this.getInput("A").connection.connect(o.outputConnection));
5792
5798
  const i = this.prevBlocks_[1];
5793
- i !== n && (n.unplug(), i && !i.isDisposed() && !i.isShadow() && this.getInput("B").connection.connect(i.outputConnection)), this.bumpNeighbours(), M.setGroup(!1);
5799
+ i !== n && (n.unplug(), i && !i.isDisposed() && !i.isShadow() && this.getInput("B").connection.connect(i.outputConnection)), this.bumpNeighbours(), P.setGroup(!1);
5794
5800
  }
5795
5801
  this.prevBlocks_[0] = this.getInputTargetBlock("A"), this.prevBlocks_[1] = this.getInputTargetBlock("B");
5796
5802
  }
@@ -6132,7 +6138,7 @@ const Em = {
6132
6138
  s && !s.workspace.connectionChecker.doTypeChecks(
6133
6139
  s.outputConnection,
6134
6140
  o
6135
- ) && (M.setGroup(e.group), o === this.prevParentConnection_ ? (this.unplug(), o.getSourceBlock().bumpNeighbours()) : (s.unplug(), s.bumpNeighbours()), M.setGroup(!1));
6141
+ ) && (P.setGroup(e.group), o === this.prevParentConnection_ ? (this.unplug(), o.getSourceBlock().bumpNeighbours()) : (s.unplug(), s.bumpNeighbours()), P.setGroup(!1));
6136
6142
  }
6137
6143
  this.prevParentConnection_ = o;
6138
6144
  }
@@ -6222,16 +6228,16 @@ const vm = /* @__PURE__ */ new Set([
6222
6228
  },
6223
6229
  onchange: function(e) {
6224
6230
  const t = this.workspace;
6225
- if (!t.isDragging || t.isDragging() || e.type !== M.BLOCK_MOVE && e.type !== M.BLOCK_CREATE)
6231
+ if (!t.isDragging || t.isDragging() || e.type !== P.BLOCK_MOVE && e.type !== P.BLOCK_CREATE)
6226
6232
  return;
6227
6233
  const n = this.getSurroundLoop();
6228
6234
  if (this.setWarningText(
6229
6235
  n ? null : g.LOOP_FLOW_CONTROL_WARNING
6230
6236
  ), !this.isInFlyout)
6231
6237
  try {
6232
- M.setRecordUndo(!1), this.setDisabledReason(!n, "FLOW_CONTROL_NOT_IN_LOOP");
6238
+ P.setRecordUndo(!1), this.setDisabledReason(!n, "FLOW_CONTROL_NOT_IN_LOOP");
6233
6239
  } finally {
6234
- M.setRecordUndo(!0);
6240
+ P.setRecordUndo(!0);
6235
6241
  }
6236
6242
  }
6237
6243
  };
@@ -7509,14 +7515,14 @@ const Lm = {
7509
7515
  o.setKeyName(`__param@${t.id}__`, t.name, !1);
7510
7516
  else
7511
7517
  try {
7512
- M.disable(), o = Ts(
7518
+ P.disable(), o = Ts(
7513
7519
  this.workspace,
7514
7520
  `__param@${t.id}__`,
7515
7521
  t.name,
7516
7522
  !1
7517
7523
  ), o.outputConnection.connect(n);
7518
7524
  } finally {
7519
- M.enable();
7525
+ P.enable();
7520
7526
  }
7521
7527
  }
7522
7528
  }
@@ -7549,7 +7555,7 @@ const Bm = G.xml, Rm = {
7549
7555
  var t;
7550
7556
  if (e.type === me.STATE_CHANGE)
7551
7557
  this.checkWarning_();
7552
- else if (e.type === M.BLOCK_DRAG) {
7558
+ else if (e.type === P.BLOCK_DRAG) {
7553
7559
  const n = e;
7554
7560
  if (n.isStart || !((t = n.blocks) != null && t.find((o) => o.id === this.id)))
7555
7561
  return;
@@ -7682,8 +7688,8 @@ const Um = {
7682
7688
  }, this.resource = {
7683
7689
  id: "",
7684
7690
  name: ""
7685
- }, this.appendDummyInput().appendField("%{BKY_RESOURCE_V1_SELECT_RESOURCE_TITLE").appendField(new P(() => this.genSpaceOpts_()), "SPACE").appendField(new P(() => this.genDirOpts_()), "DIR").appendField(
7686
- new P(() => this.genResourceOpts_()),
7691
+ }, this.appendDummyInput().appendField("%{BKY_RESOURCE_V1_SELECT_RESOURCE_TITLE").appendField(new M(() => this.genSpaceOpts_()), "SPACE").appendField(new M(() => this.genDirOpts_()), "DIR").appendField(
7692
+ new M(() => this.genResourceOpts_()),
7687
7693
  "RESOURCE"
7688
7694
  ), this.setOutput(!0, "Resource"), this.setStyle("resource_blocks"), this.setTooltip("%{BKY_RESOURCE_V1_SELECT_RESOURCE_TOOLTIP}"), this.setHelpUrl("%{BKY_RESOURCE_V1_SELECT_RESOURCE_HELPURL}"), this.initData_();
7689
7695
  },
@@ -9122,7 +9128,7 @@ class tg {
9122
9128
  const o = n.workspace;
9123
9129
  if (!o)
9124
9130
  return;
9125
- o.setResizesEnabled(!1), M.setGroup(!0);
9131
+ o.setResizesEnabled(!1), P.setGroup(!0);
9126
9132
  const i = o.getTopBlocks(!0);
9127
9133
  let s = 0;
9128
9134
  for (let a = 0, c; c = i[a]; a++) {
@@ -9131,7 +9137,7 @@ class tg {
9131
9137
  const l = c.getRelativeToSurfaceXY();
9132
9138
  c.moveBy(-l.x, s - l.y, ["cleanup"]), c.snapToGrid(), s = c.getRelativeToSurfaceXY().y + c.getHeightWidth().height + 100;
9133
9139
  }
9134
- M.setGroup(!1), o.setResizesEnabled(!0);
9140
+ P.setGroup(!1), o.setResizesEnabled(!0);
9135
9141
  });
9136
9142
  }
9137
9143
  }
@@ -12271,8 +12277,8 @@ function IT(e, t) {
12271
12277
  o(i[l], c.getInput("ENTRY" + l).connection);
12272
12278
  } else a === "json_string_v1" || a === "json_number_v1" ? c.setFieldValue(i, "VALUE") : a === "json_boolean_v1" && c.setFieldValue(i ? "true" : "false", "VALUE");
12273
12279
  };
12274
- o(e, n.getInput("JSON").connection), M.fire(
12275
- new (M.get(M.FINISHED_LOADING))(t)
12280
+ o(e, n.getInput("JSON").connection), P.fire(
12281
+ new (P.get(P.FINISHED_LOADING))(t)
12276
12282
  );
12277
12283
  }
12278
12284
  function OT(e) {
@@ -12364,7 +12370,7 @@ const yT = { class: "position-relative w-100 h-100" }, bT = /* @__PURE__ */ lt({
12364
12370
  console.assert(!1);
12365
12371
  return;
12366
12372
  }
12367
- Kc(l.value), await La(e.locale), _.workspace = TT(c.value, e.type, e.version, e.dark), _.workspace.addChangeListener(M.disableOrphans), _.workspace.addChangeListener(oe);
12373
+ Kc(l.value), await La(e.locale), _.workspace = TT(c.value, e.type, e.version, e.dark), _.workspace.addChangeListener(P.disableOrphans), _.workspace.addChangeListener(oe);
12368
12374
  const L = document.querySelector(`#${a} .blocklyFlyout`);
12369
12375
  new MutationObserver((Ae) => {
12370
12376
  Ae.forEach((De) => {
@@ -12377,16 +12383,16 @@ const yT = { class: "position-relative w-100 h-100" }, bT = /* @__PURE__ */ lt({
12377
12383
  _.workspace && Hc(_.workspace);
12378
12384
  });
12379
12385
  async function oe(L) {
12380
- if (L.type === M.FINISHED_LOADING) {
12386
+ if (L.type === P.FINISHED_LOADING) {
12381
12387
  al(), e.type !== "json" && Ze.emit("codeUpdate"), d.value = !1;
12382
12388
  return;
12383
12389
  }
12384
12390
  if (!d.value) {
12385
- if (L.type === M.VIEWPORT_CHANGE) {
12391
+ if (L.type === P.VIEWPORT_CHANGE) {
12386
12392
  i.value = _.workspace.getScale();
12387
12393
  return;
12388
12394
  }
12389
- L.type === M.BLOCK_DRAG && (L.isStart ? h.value = !0 : h.value = !1), e.type !== "json" && Ze.emit("codeUpdate");
12395
+ L.type === P.BLOCK_DRAG && (L.isStart ? h.value = !0 : h.value = !1), e.type !== "json" && Ze.emit("codeUpdate");
12390
12396
  }
12391
12397
  }
12392
12398
  const ge = (L) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-block-lib",
3
3
  "private": false,
4
- "version": "0.6.41",
4
+ "version": "0.6.43",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",