x-block-lib 0.8.32 → 0.8.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -7,37 +7,37 @@
7
7
  License: see project LICENSE
8
8
  Touched: 2021
9
9
  */pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{background:#f3f3f3;color:#444}.hljs-comment{color:#697070}.hljs-punctuation,.hljs-tag{color:#444a}.hljs-tag .hljs-attr,.hljs-tag .hljs-name{color:#444}.hljs-attribute,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-selector-tag{font-weight:700}.hljs-deletion,.hljs-number,.hljs-quote,.hljs-selector-class,.hljs-selector-id,.hljs-string,.hljs-template-tag,.hljs-type{color:#800}.hljs-section,.hljs-title{color:#800;font-weight:700}.hljs-link,.hljs-operator,.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#ab5656}.hljs-literal{color:#695}.hljs-addition,.hljs-built_in,.hljs-bullet,.hljs-code{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta .hljs-string{color:#38a}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.ghost[data-v-6cb62cd6]{opacity:.4;pointer-events:none}.blocklyToolbox{overflow-x:hidden;width:56px}.blocklyMainBackground{stroke-width:0}.blocklyToolboxCategory{margin-bottom:12px!important}.blocklyToolboxCategoryIcon{display:none!important}.blocklyTreeRowContentContainer{height:28px;display:flex;align-items:center;justify-items:center;overflow:hidden}.blocklyFlyout{z-index:21}`)),document.head.appendChild(l)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
10
- import { E as I, r as Tn, M as Rn, s as vo, a as Co, X as Dn, u as C, B as g, j as s, O as r, F as O, b as $e, i as v, c as Tt, d as ko, e as M, f as T, g as No, h as $, k as ht, p as Yt, l as ot, m as En, n as B, C as Mn, N as it, o as Lo, P as He, q as Me, V as Nt, t as Un, W as So, v as Bo, w as bo, S as Po, x as Ro, y as Do, z as Wt, T as Ae, A as Vn, D as Mo, G as Uo, H as xn, I as Vo, J as xo, K as Yo, L as Fo, Q as wo, R as Ko, U as $o, Y as Ho } from "./vendor.txua272r.js";
11
- import { globalState as E } from "x-state-lib";
12
- import { globalObjects as vt, openConfirmDlg as Go, openPromptDlg as Wo, messageWarning as Yn, useColor as jt, useSystem as Fn, useViewStack as tn, eventBus as kt } from "x-essential-lib";
13
- import { pkgs as ie, parsePixelStr as jo, parsePercentStr as Xo, getPropertyTag as Mt, unwrapEventId as en, elements as tt, makeEventId as z, toEventName as Ie, unwrapMethodId as nn, makeMethodId as ee, toMethodName as on, unwrapPropertyId as Jo, makePropertyId as Zt, toPropertyName as wn, isLocaleOfMethodKind as Kn, makeTriggerId as Ot } from "x-runtime-lib";
14
- import { provide as qo, inject as Qo, defineComponent as ct, resolveComponent as D, createBlock as st, openBlock as S, unref as R, withCtx as at, createVNode as L, mergeProps as sn, useModel as Kt, ref as Lt, computed as F, resolveDirective as zo, withDirectives as Zo, createElementBlock as Z, normalizeStyle as W, createElementVNode as w, createCommentVNode as rt, toDisplayString as $t, withModifiers as Ft, mergeModels as Ge, Fragment as $n, renderList as ti, useId as We, onUnmounted as ei, useTemplateRef as wt, withKeys as Hn, isRef as ne, onMounted as gn, nextTick as ni, onBeforeUnmount as An, watch as Vt, renderSlot as oi } from "vue";
10
+ import { E as I, r as Tn, M as vo, s as yo, a as Co, X as Rn, u as C, B as E, j as s, O as r, F as O, b as He, i as y, c as Tt, d as ko, e as M, f as T, g as No, h as $, k as ht, p as Yt, l as ot, m as En, n as B, C as Dn, N as it, o as Lo, P as Ge, q as Ue, V as Nt, t as Mn, W as So, v as Bo, w as bo, S as Po, x as Ro, y as Do, z as Wt, T as Ae, A as Un, D as Mo, G as Uo, H as Vn, I as Vo, J as xo, K as Yo, L as Fo, Q as wo, R as Ko, U as $o, Y as Ho } from "./vendor.txua272r.js";
11
+ import { globalState as g } from "x-state-lib";
12
+ import { globalObjects as yt, openConfirmDlg as Go, openPromptDlg as Wo, messageWarning as xn, useColor as jt, useSystem as Yn, useViewStack as en, eventBus as kt } from "x-essential-lib";
13
+ import { pkgs as ie, parsePixelStr as jo, parsePercentStr as Xo, getPropertyTag as Mt, unwrapEventId as nn, elements as tt, makeEventId as z, toEventName as Ie, unwrapMethodId as Oe, makeMethodId as ee, toMethodName as on, unwrapPropertyId as Jo, makePropertyId as Zt, toPropertyName as Fn, isLocaleOfMethodKind as wn, makeTriggerId as Ot } from "x-runtime-lib";
14
+ import { provide as qo, inject as Qo, defineComponent as ct, resolveComponent as D, createBlock as st, openBlock as S, unref as R, withCtx as at, createVNode as L, mergeProps as sn, useModel as Kt, ref as Lt, computed as F, resolveDirective as zo, withDirectives as Zo, createElementBlock as Z, normalizeStyle as W, createElementVNode as w, createCommentVNode as rt, toDisplayString as $t, withModifiers as Ft, mergeModels as We, Fragment as Kn, renderList as ti, useId as je, onUnmounted as ei, useTemplateRef as wt, withKeys as $n, isRef as ne, onMounted as gn, nextTick as ni, onBeforeUnmount as An, watch as Vt, renderSlot as oi } from "vue";
15
15
  import { useI18n as Xt } from "vue-i18n";
16
16
  import { useDisplay as ii } from "vuetify";
17
17
  var b = /* @__PURE__ */ ((t) => (t.STATE_CHANGE = "state_change", t))(b || {});
18
- class Gn extends I.Abstract {
18
+ class Hn extends I.Abstract {
19
19
  isBlank = !0;
20
20
  }
21
21
  Tn.register(
22
22
  Tn.Type.EVENT,
23
23
  "state_change",
24
- Gn
24
+ Hn
25
25
  );
26
- const Wn = (t, e, n) => {
26
+ const Gn = (t, e, n) => {
27
27
  const o = t[e];
28
28
  return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((i, a) => {
29
29
  (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(a.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + e + (e.split("/").length !== n ? ". Note that variables only represent file names one level deep." : ""))));
30
30
  });
31
31
  };
32
32
  async function In(t) {
33
- const e = await Wn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.n1dap9o0.js"), "./msg/zhHans.ts": () => import("./msg-zhHans.m1pmgr3r.js") }), `./msg/${t}.ts`, 3);
34
- vo(e.default);
33
+ const e = await Gn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en.gmqsbfuw.js"), "./msg/zhHans.ts": () => import("./msg-zhHans.f0e8559c.js") }), `./msg/${t}.ts`, 3);
34
+ yo(e.default);
35
35
  }
36
36
  function f(t) {
37
- return Rn[t] ?? t;
37
+ return vo[t] ?? t;
38
38
  }
39
39
  const St = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", se = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
40
- function Oe(t) {
40
+ function ve(t) {
41
41
  const e = t.lastIndexOf("V");
42
42
  if (e <= 0 || e >= t.length - 1)
43
43
  return console.assert(!1, `invalid key=${t}`), "";
@@ -60,7 +60,7 @@ function si(t) {
60
60
  e++, t = t.getParent();
61
61
  return e;
62
62
  }
63
- function jn(t) {
63
+ function Wn(t) {
64
64
  return t.ui === "strInput" ? "string" : t.ui === "numInput" ? "number" : t.ui === "switch" ? "boolean" : "string";
65
65
  }
66
66
  function ye(t, e) {
@@ -75,7 +75,7 @@ function q(t) {
75
75
  function Q(t) {
76
76
  return t.startsWith("multiple_ref_v");
77
77
  }
78
- function Ue(t) {
78
+ function Ve(t) {
79
79
  const e = `<block type="text_v1"><field name="TEXT">${t}</field></block>`;
80
80
  return C.xml.textToDom(e);
81
81
  }
@@ -86,9 +86,9 @@ function On(t) {
86
86
  function ai(t) {
87
87
  return C.xml.textToDom('<block type="logic_boolean_v1"><field name="BOOL">FALSE</field></block>');
88
88
  }
89
- function je(t, e) {
89
+ function Xe(t, e) {
90
90
  let n = null;
91
- return e === "string" ? n = Ue("") : e === "integer" || e === "decimal" ? n = On(0) : e === "boolean" ? n = ai() : e === "enum" || e === "dateTime" ? n = Ue("") : console.assert(!1), n ? Dn.domToBlock(n, t) : null;
91
+ return e === "string" ? n = Ve("") : e === "integer" || e === "decimal" ? n = On(0) : e === "boolean" ? n = ai() : e === "enum" || e === "dateTime" ? n = Ve("") : console.assert(!1), n ? Rn.domToBlock(n, t) : null;
92
92
  }
93
93
  function Et(t) {
94
94
  return t === "string" ? "String" : t === "number" ? "Number" : t === "boolean" ? "Boolean" : t === "array" ? "Array" : t === "object" ? "Object" : (console.assert(!1), null);
@@ -96,7 +96,7 @@ function Et(t) {
96
96
  function ci(t) {
97
97
  return t.ui === "dummy" ? null : t.ui === "strInput" ? "String" : t.ui === "numInput" ? "Number" : t.ui === "switch" ? "Boolean" : t.ui === "select" ? ae(t.items) : t.ui === "multiTypes" ? ae(t.types) : t.ui === "compSelect" ? "Comp" : t.ui === "colorPicker" ? "Color" : (console.assert(!1), null);
98
98
  }
99
- function Xn(t) {
99
+ function jn(t) {
100
100
  return t === "string" ? "String" : t === "integer" || t === "decimal" ? "Number" : t === "boolean" ? "Boolean" : t === "enum" || t === "dateTime" ? "String" : (console.assert(!1), null);
101
101
  }
102
102
  function an(t, e, n, o) {
@@ -105,7 +105,7 @@ function an(t, e, n, o) {
105
105
  <mutation key="${e}" name="${n}" locale="${o ? "TRUE" : "FALSE"}"/>
106
106
  </block>
107
107
  `, a = C.xml.textToDom(i);
108
- return Dn.domToBlock(a, t);
108
+ return Rn.domToBlock(a, t);
109
109
  }
110
110
  function Y(t, e) {
111
111
  try {
@@ -150,11 +150,11 @@ function ui() {
150
150
  return C.xml.textToDom('<shadow type="object_create_v1"></shadow>');
151
151
  }
152
152
  function li(t) {
153
- const e = `<shadow type="${Oe(t)}"></shadow>`;
153
+ const e = `<shadow type="${ve(t)}"></shadow>`;
154
154
  return C.xml.textToDom(e);
155
155
  }
156
156
  function _i(t) {
157
- const e = `<shadow type="${Oe(t)}"></shadow>`;
157
+ const e = `<shadow type="${ve(t)}"></shadow>`;
158
158
  return C.xml.textToDom(e);
159
159
  }
160
160
  function pi(t) {
@@ -173,14 +173,14 @@ function hi(t) {
173
173
  return t.ui === "dummy" ? console.assert(!0) : t.ui === "strInput" ? e = pt(t.default) : t.ui === "numInput" ? e = ce(t.default) : t.ui === "switch" ? e = re(t.default) : t.ui === "select" ? e = li(t.items) : t.ui === "multiTypes" ? e = _i(t.types) : t.ui === "compSelect" ? e = di() : t.ui === "colorPicker" ? e = pi(t.default ?? "#ff0000") : console.assert(!1), e;
174
174
  }
175
175
  function fi() {
176
- const { activeObject: t, activePage: e } = E.app, n = [];
176
+ const { activeObject: t, activePage: e } = g.app, n = [];
177
177
  if (t.type === "page")
178
178
  for (const { id: o, name: i, type: a } of e.meta.arguments)
179
179
  n.push({ key: o, name: i, type: a });
180
180
  return n;
181
181
  }
182
- function yn(t) {
183
- const { activeObject: e, activePage: n } = E.app;
182
+ function vn(t) {
183
+ const { activeObject: e, activePage: n } = g.app;
184
184
  if (e.type === "page") {
185
185
  const o = n.meta.arguments.find((i) => i.id === t);
186
186
  if (o)
@@ -232,7 +232,7 @@ const Ti = {
232
232
  }
233
233
  },
234
234
  onArgumentChange_: function(t) {
235
- const e = yn(t);
235
+ const e = vn(t);
236
236
  if (!e) {
237
237
  console.assert(!1);
238
238
  return;
@@ -243,7 +243,7 @@ const Ti = {
243
243
  this.setOutput(!0, Et(this.argument.type));
244
244
  },
245
245
  checkWarning_: function() {
246
- const t = yn(this.argument.key);
246
+ const t = vn(this.argument.key);
247
247
  if (!t) {
248
248
  this.setWarningText(f("WARN_ARGUMENT_NOT_FOUND"));
249
249
  return;
@@ -255,14 +255,14 @@ const Ti = {
255
255
  this.setWarningText(null);
256
256
  }
257
257
  };
258
- g.get_page_argument_v1 = Ti;
258
+ E.get_page_argument_v1 = Ti;
259
259
  s.forBlock.get_page_argument_v1 = function(t) {
260
260
  const e = t;
261
261
  return [`__getPageArgumentV1__(${s.quote_(e.argument.key)})`, r.FUNCTION_CALL];
262
262
  };
263
263
  const Ei = (t, e) => {
264
- const n = Oe(t), o = ae(t);
265
- g[n] = {
264
+ const n = ve(t), o = ae(t);
265
+ E[n] = {
266
266
  init: function() {
267
267
  this.appendDummyInput().appendField(
268
268
  new O(() => this.genOpts_()),
@@ -270,7 +270,7 @@ const Ei = (t, e) => {
270
270
  ), this.setOutput(!0, o), this.setStyle("property_blocks"), this.setTooltip(""), this.setHelpUrl("");
271
271
  },
272
272
  genOpts_: function() {
273
- const { i18n: i } = vt, a = [];
273
+ const { i18n: i } = yt, a = [];
274
274
  for (const { title: c, value: u } of e)
275
275
  a.push([i.global.t(c), u]);
276
276
  return k(a);
@@ -286,8 +286,8 @@ for (const t in ie) {
286
286
  Ei(n, e.items[n]);
287
287
  }
288
288
  const gi = (t, e) => {
289
- const n = Oe(t), o = ae(t);
290
- g[n] = {
289
+ const n = ve(t), o = ae(t);
290
+ E[n] = {
291
291
  init: function() {
292
292
  this.value = e[0].default ?? "", this.appendDummyInput("DUMMY").appendField(
293
293
  new O(() => this.genOpts_()),
@@ -303,7 +303,7 @@ const gi = (t, e) => {
303
303
  }, 0);
304
304
  },
305
305
  genOpts_: function() {
306
- const { i18n: i } = vt, a = [];
306
+ const { i18n: i } = yt, a = [];
307
307
  for (const { title: c, value: u } of e)
308
308
  a.push([i.global.t(c), u]);
309
309
  return k(a);
@@ -339,7 +339,7 @@ const gi = (t, e) => {
339
339
  let u, l;
340
340
  if (c.ui === "pixelInput") {
341
341
  const _ = jo(this.value) ?? 0;
342
- u = new $e(
342
+ u = new He(
343
343
  _,
344
344
  c.min,
345
345
  c.max,
@@ -350,7 +350,7 @@ const gi = (t, e) => {
350
350
  ), l = "px";
351
351
  } else if (c.ui === "percentInput") {
352
352
  const _ = Xo(this.value) ?? 0;
353
- u = new $e(
353
+ u = new He(
354
354
  _,
355
355
  c.min,
356
356
  c.max,
@@ -387,14 +387,14 @@ const Ai = C.xml, Ii = {
387
387
  ), this.appendStatementInput("STACK"), this.setStyle("event_blocks"), this.contextMenu = !1;
388
388
  }
389
389
  };
390
- g.app_bind_container_v1 = Ii;
390
+ E.app_bind_container_v1 = Ii;
391
391
  const Oi = {
392
392
  init: function() {
393
393
  this.appendDummyInput().appendField("%{BKY_APP_V1_APP_BIND_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("event_blocks"), this.contextMenu = !1;
394
394
  }
395
395
  };
396
- g.app_bind_item_v1 = Oi;
397
- const yi = {
396
+ E.app_bind_item_v1 = Oi;
397
+ const vi = {
398
398
  init: function() {
399
399
  this.itemCount_ = 0, this.setMutator(
400
400
  new Tt.MutatorIcon(
@@ -482,7 +482,7 @@ const yi = {
482
482
  "Boolean",
483
483
  "Array",
484
484
  "Object"
485
- ]), t === 0 && this.getInput("ADD" + t).setAlign(v.Align.RIGHT).appendField("%{BKY_APP_V1_APP_BIND_TITLE}"));
485
+ ]), t === 0 && this.getInput("ADD" + t).setAlign(y.Align.RIGHT).appendField("%{BKY_APP_V1_APP_BIND_TITLE}"));
486
486
  for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
487
487
  this.removeInput("ADD" + t);
488
488
  },
@@ -512,53 +512,53 @@ const yi = {
512
512
  this.setWarningText(null);
513
513
  }
514
514
  };
515
- g.app_bind_v1 = yi;
515
+ E.app_bind_v1 = vi;
516
516
  s.forBlock.app_bind_v1 = function() {
517
517
  return "";
518
518
  };
519
- function Jn() {
520
- return E.app.appList;
519
+ function Xn() {
520
+ return g.app.appList;
521
521
  }
522
- function vn(t) {
523
- return E.app.appList.find((e) => e.id === t);
522
+ function yn(t) {
523
+ return g.app.appList.find((e) => e.id === t);
524
524
  }
525
- function vi() {
525
+ function yi() {
526
526
  const t = [];
527
- return Jn().forEach(({ id: n, name: o }) => {
527
+ return Xn().forEach(({ id: n, name: o }) => {
528
528
  t.push([o, n]);
529
529
  }), k(t);
530
530
  }
531
- function Xe(t) {
532
- const e = E.app.appList.find((n) => n.id === t);
531
+ function Je(t) {
532
+ const e = g.app.appList.find((n) => n.id === t);
533
533
  return e ? e.pages : [];
534
534
  }
535
- function Ve(t, e) {
536
- const n = E.app.appList.find((o) => o.id === t);
535
+ function xe(t, e) {
536
+ const n = g.app.appList.find((o) => o.id === t);
537
537
  if (n)
538
538
  return n.pages.find((o) => o.id === e);
539
539
  }
540
540
  function Ci(t) {
541
541
  const e = [];
542
- return Xe(t).forEach(({ id: o, name: i }) => {
542
+ return Je(t).forEach(({ id: o, name: i }) => {
543
543
  e.push([i, o]);
544
544
  }), k(e);
545
545
  }
546
- const qn = {
546
+ const Jn = {
547
547
  id: "",
548
548
  groupId: "",
549
549
  name: "",
550
550
  position: 0
551
551
  };
552
- function Qn() {
553
- const { comps: t } = E.app.activeApp;
554
- return [qn, ...t];
552
+ function qn() {
553
+ const { comps: t } = g.app.activeApp;
554
+ return [Jn, ...t];
555
555
  }
556
556
  function Cn(t) {
557
- return t === "" ? qn : E.app.activeApp.comps.find((e) => e.id === t);
557
+ return t === "" ? Jn : g.app.activeApp.comps.find((e) => e.id === t);
558
558
  }
559
559
  function ki() {
560
- const { i18n: t } = vt, e = [];
561
- return Qn().forEach(({ id: o, name: i }) => {
560
+ const { i18n: t } = yt, e = [];
561
+ return qn().forEach(({ id: o, name: i }) => {
562
562
  let a = i;
563
563
  o === "" && (a = t.global.t("x-runtime-lib.notSet")), e.push([a, o]);
564
564
  }), k(e);
@@ -575,8 +575,8 @@ function X(t) {
575
575
  { key: "oldValue", name: "x-runtime-lib.oldValue", type: t }
576
576
  ];
577
577
  }
578
- function Je(t) {
579
- const { properties: e } = E.runtime, { activeObject: n, activePage: o, activeComp: i, depends: a } = E.app, c = [], u = Mt(n.type, n.subtype);
578
+ function qe(t) {
579
+ const { properties: e } = g.runtime, { activeObject: n, activePage: o, activeComp: i, depends: a } = g.app, c = [], u = Mt(n.type, n.subtype);
580
580
  if (!u)
581
581
  return c;
582
582
  const l = n.nodes.find((d) => d.id === t);
@@ -628,7 +628,7 @@ function Je(t) {
628
628
  id: z("elementPropertyChangeEvent", t, d),
629
629
  kind: "elementPropertyChangeEvent",
630
630
  names: h,
631
- params: X(jn(p))
631
+ params: X(Wn(p))
632
632
  });
633
633
  if (q(_.key) && l.reference && l.reference.comp) {
634
634
  const d = a[l.reference.comp];
@@ -680,11 +680,13 @@ function Je(t) {
680
680
  }
681
681
  return c;
682
682
  }
683
- function xe(t) {
684
- const { properties: e } = E.runtime, { activeObject: n, activePage: o, activeComp: i, depends: a } = E.app, c = Mt(n.type, n.subtype);
683
+ function Ye(t) {
684
+ if (!t)
685
+ return;
686
+ const { properties: e } = g.runtime, { activeObject: n, activePage: o, activeComp: i, depends: a } = g.app, c = Mt(n.type, n.subtype);
685
687
  if (!c)
686
688
  return;
687
- const { kind: u, nodeId: l, eventKey: _ } = en(t), d = n.nodes.find((p) => p.id === l);
689
+ const { kind: u, nodeId: l, eventKey: _ } = nn(t), d = n.nodes.find((p) => p.id === l);
688
690
  if (!d)
689
691
  return;
690
692
  const h = tt[d.key];
@@ -750,7 +752,7 @@ function xe(t) {
750
752
  id: t,
751
753
  kind: u,
752
754
  names: p.names,
753
- params: X(jn(p.raw))
755
+ params: X(Wn(p.raw))
754
756
  };
755
757
  }
756
758
  } else if (u === "referencePropertyChangeEvent") {
@@ -825,13 +827,13 @@ function xe(t) {
825
827
  }
826
828
  }
827
829
  function Ni(t) {
828
- const e = [], n = Je(t);
830
+ const e = [], n = qe(t);
829
831
  for (const { id: o, kind: i, names: a } of n)
830
832
  e.push([Ie(i, a), o]);
831
833
  return k(e);
832
834
  }
833
- function zn() {
834
- const { activeObject: t, activeComp: e } = E.app, n = [];
835
+ function Qn() {
836
+ const { activeObject: t, activeComp: e } = g.app, n = [];
835
837
  if (t.type === "comp")
836
838
  for (const { id: o, name: i, params: a } of e.meta.events)
837
839
  n.push({
@@ -843,7 +845,9 @@ function zn() {
843
845
  return n;
844
846
  }
845
847
  function kn(t) {
846
- const { activeObject: e, activeComp: n } = E.app, { kind: o, nodeId: i, eventKey: a } = en(t);
848
+ if (!t)
849
+ return;
850
+ const { activeObject: e, activeComp: n } = g.app, { kind: o, nodeId: i, eventKey: a } = nn(t);
847
851
  if (o === "customEvent" && i === "globality" && e.type === "comp") {
848
852
  const c = n.meta.events.find(
849
853
  (u) => u.id === a
@@ -858,7 +862,7 @@ function kn(t) {
858
862
  }
859
863
  }
860
864
  function Li() {
861
- const t = [], e = zn();
865
+ const t = [], e = Qn();
862
866
  for (const { id: n, kind: o, names: i } of e)
863
867
  t.push([Ie(o, i), n]);
864
868
  return k(t);
@@ -875,8 +879,8 @@ function Rt(t) {
875
879
  e.push({ key: n, name: o, type: i });
876
880
  return e;
877
881
  }
878
- function qe(t) {
879
- const { activeObject: e, depends: n } = E.app, o = [], i = e.nodes.find((c) => c.id === t);
882
+ function Qe(t) {
883
+ const { activeObject: e, depends: n } = g.app, o = [], i = e.nodes.find((c) => c.id === t);
880
884
  if (!i)
881
885
  return o;
882
886
  const a = tt[i.key];
@@ -916,8 +920,10 @@ function qe(t) {
916
920
  }
917
921
  return K(a.key) && e.type, o;
918
922
  }
919
- function Ye(t) {
920
- const { activeObject: e, depends: n } = E.app, { kind: o, nodeId: i, methodKey: a } = nn(t), c = e.nodes.find((l) => l.id === i);
923
+ function Fe(t) {
924
+ if (!t)
925
+ return;
926
+ const { activeObject: e, depends: n } = g.app, { kind: o, nodeId: i, methodKey: a } = Oe(t), c = e.nodes.find((l) => l.id === i);
921
927
  if (!c)
922
928
  return;
923
929
  const u = tt[c.key];
@@ -970,13 +976,13 @@ function Ye(t) {
970
976
  }
971
977
  }
972
978
  function Si(t) {
973
- const e = [], n = qe(t);
979
+ const e = [], n = Qe(t);
974
980
  for (const { id: o, kind: i, names: a } of n)
975
981
  e.push([on(i, a), o]);
976
982
  return k(e);
977
983
  }
978
984
  function cn() {
979
- const { activeObject: t, activeComp: e } = E.app, n = [];
985
+ const { activeObject: t, activeComp: e } = g.app, n = [];
980
986
  if (t.type === "comp")
981
987
  for (const { id: o, name: i, inputs: a, outputs: c } of e.meta.methods)
982
988
  n.push({
@@ -989,7 +995,9 @@ function cn() {
989
995
  return n;
990
996
  }
991
997
  function Dt(t) {
992
- const { activeObject: e, activeComp: n } = E.app, { kind: o, nodeId: i, methodKey: a } = nn(t);
998
+ if (!t)
999
+ return;
1000
+ const { activeObject: e, activeComp: n } = g.app, { kind: o, nodeId: i, methodKey: a } = Oe(t);
993
1001
  if (o === "customMethod" && i === "globality" && e.type === "comp") {
994
1002
  const c = n.meta.methods.find(
995
1003
  (u) => u.id === a
@@ -1004,29 +1012,29 @@ function Dt(t) {
1004
1012
  };
1005
1013
  }
1006
1014
  }
1007
- function Zn() {
1015
+ function zn() {
1008
1016
  const t = [], e = cn();
1009
1017
  for (const { id: n, kind: o, names: i } of e)
1010
1018
  t.push([on(o, i), n]);
1011
1019
  return k(t);
1012
1020
  }
1013
- function Qe(t) {
1021
+ function ze(t) {
1014
1022
  const e = Dt(t);
1015
1023
  return e ? e.outputs : [];
1016
1024
  }
1017
- function Fe(t, e) {
1025
+ function we(t, e) {
1018
1026
  const n = Dt(t);
1019
1027
  if (n)
1020
1028
  return n.outputs.find((o) => o.key === e);
1021
1029
  }
1022
1030
  function Bi(t) {
1023
- const e = [], n = Qe(t);
1031
+ const e = [], n = ze(t);
1024
1032
  for (const { name: o, key: i } of n)
1025
1033
  e.push([o, i]);
1026
1034
  return k(e);
1027
1035
  }
1028
1036
  function bi(t, e, n) {
1029
- const { properties: o } = E.runtime, { activeObject: i, activePage: a, activeComp: c, depends: u } = E.app;
1037
+ const { properties: o } = g.runtime, { activeObject: i, activePage: a, activeComp: c, depends: u } = g.app;
1030
1038
  if (t.events.length > 0)
1031
1039
  return !1;
1032
1040
  if (q(t.key) && n) {
@@ -1056,7 +1064,7 @@ function bi(t, e, n) {
1056
1064
  return !0;
1057
1065
  }
1058
1066
  function Pi(t, e) {
1059
- const { activeObject: n, depends: o } = E.app;
1067
+ const { activeObject: n, depends: o } = g.app;
1060
1068
  if (t.methods.length > 0)
1061
1069
  return !1;
1062
1070
  if (q(t.key) && e) {
@@ -1072,7 +1080,7 @@ function Pi(t, e) {
1072
1080
  return K(t.key) && n.type, !0;
1073
1081
  }
1074
1082
  function Ri(t, e, n) {
1075
- const { properties: o } = E.runtime, { activeObject: i, activeComp: a, depends: c } = E.app;
1083
+ const { properties: o } = g.runtime, { activeObject: i, activeComp: a, depends: c } = g.app;
1076
1084
  if (o[t.key] && o[t.key][e] && o[t.key][e].length > 0)
1077
1085
  return !1;
1078
1086
  if (q(t.key) && n) {
@@ -1088,7 +1096,7 @@ function Ri(t, e, n) {
1088
1096
  return !(K(t.key) && i.type === "comp" && a.meta.properties.length > 0);
1089
1097
  }
1090
1098
  function Di(t, e, n) {
1091
- const { properties: o } = E.runtime, { activeObject: i, activeComp: a, depends: c } = E.app;
1099
+ const { properties: o } = g.runtime, { activeObject: i, activeComp: a, depends: c } = g.app;
1092
1100
  if (o[t.key] && o[t.key][e]) {
1093
1101
  for (const { keys: u, raw: l } of o[t.key][e])
1094
1102
  if (!ye(u, l))
@@ -1106,11 +1114,11 @@ function Di(t, e, n) {
1106
1114
  }
1107
1115
  return !(K(t.key) && i.type === "comp" && a.meta.properties.length > 0);
1108
1116
  }
1109
- function to(t, e, n, o) {
1117
+ function Zn(t, e, n, o) {
1110
1118
  return t ? t === "onEvent" ? bi(e, n, o) : t === "callMethod" ? Pi(e, o) : t === "getProperty" ? Ri(e, n, o) : t === "setProperty" ? Di(e, n, o) : !1 : !1;
1111
1119
  }
1112
1120
  function j(t) {
1113
- const { activeObject: e } = E.app, n = Mt(e.type, e.subtype);
1121
+ const { activeObject: e } = g.app, n = Mt(e.type, e.subtype);
1114
1122
  if (!n)
1115
1123
  return !1;
1116
1124
  for (const o of e.nodes) {
@@ -1119,13 +1127,13 @@ function j(t) {
1119
1127
  console.assert(!1, "invalid element", o.key);
1120
1128
  continue;
1121
1129
  }
1122
- if (!to(t, i, n, o.reference?.comp))
1130
+ if (!Zn(t, i, n, o.reference?.comp))
1123
1131
  return !0;
1124
1132
  }
1125
1133
  return !1;
1126
1134
  }
1127
1135
  function Jt(t) {
1128
- const { activeObject: e } = E.app, n = [], o = Mt(e.type, e.subtype);
1136
+ const { activeObject: e } = g.app, n = [], o = Mt(e.type, e.subtype);
1129
1137
  if (!o)
1130
1138
  return n;
1131
1139
  for (const i of e.nodes) {
@@ -1134,7 +1142,7 @@ function Jt(t) {
1134
1142
  console.assert(!1, "invalid element", i.key);
1135
1143
  continue;
1136
1144
  }
1137
- to(t, a, o, i.reference?.comp) || n.push({
1145
+ Zn(t, a, o, i.reference?.comp) || n.push({
1138
1146
  id: i.id,
1139
1147
  key: i.key,
1140
1148
  name: a.name,
@@ -1144,7 +1152,7 @@ function Jt(t) {
1144
1152
  return n;
1145
1153
  }
1146
1154
  function ft(t) {
1147
- const { activeObject: e } = E.app, n = e.nodes.find((i) => i.id === t);
1155
+ const { activeObject: e } = g.app, n = e.nodes.find((i) => i.id === t);
1148
1156
  if (!n)
1149
1157
  return;
1150
1158
  const o = tt[n.key];
@@ -1159,8 +1167,8 @@ function ft(t) {
1159
1167
  alias: n.alias
1160
1168
  };
1161
1169
  }
1162
- function ve(t) {
1163
- const { i18n: e } = vt, n = [], o = Jt(t);
1170
+ function Ce(t) {
1171
+ const { i18n: e } = yt, n = [], o = Jt(t);
1164
1172
  for (const { id: i, name: a, alias: c } of o) {
1165
1173
  let u = e.global.t(a);
1166
1174
  c && (u += " / " + c), n.push([u, i]);
@@ -1168,7 +1176,7 @@ function ve(t) {
1168
1176
  return k(n);
1169
1177
  }
1170
1178
  function Ht(t, e) {
1171
- const { properties: n } = E.runtime, { activeObject: o, activeComp: i, depends: a } = E.app, c = [], u = Mt(o.type, o.subtype);
1179
+ const { properties: n } = g.runtime, { activeObject: o, activeComp: i, depends: a } = g.app, c = [], u = Mt(o.type, o.subtype);
1172
1180
  if (!u)
1173
1181
  return c;
1174
1182
  const l = o.nodes.find((d) => d.id === t);
@@ -1226,8 +1234,10 @@ function Ht(t, e) {
1226
1234
  });
1227
1235
  return c;
1228
1236
  }
1229
- function yt(t) {
1230
- const { properties: e } = E.runtime, { activeObject: n, activeComp: o, depends: i } = E.app, a = Mt(n.type, n.subtype);
1237
+ function vt(t) {
1238
+ if (!t)
1239
+ return;
1240
+ const { properties: e } = g.runtime, { activeObject: n, activeComp: o, depends: i } = g.app, a = Mt(n.type, n.subtype);
1231
1241
  if (!a)
1232
1242
  return;
1233
1243
  const { kind: c, nodeId: u, propertyKey: l } = Jo(t), _ = n.nodes.find((h) => h.id === u);
@@ -1305,24 +1315,24 @@ function yt(t) {
1305
1315
  };
1306
1316
  }
1307
1317
  }
1308
- function eo(t, e) {
1318
+ function to(t, e) {
1309
1319
  const n = [], o = Ht(t, e);
1310
1320
  for (const { id: i, kind: a, names: c } of o)
1311
- n.push([wn(a, c), i]);
1321
+ n.push([Fn(a, c), i]);
1312
1322
  return k(n);
1313
1323
  }
1314
1324
  function rn() {
1315
- const { activeObject: t, activePage: e, activeComp: n } = E.app;
1325
+ const { activeObject: t, activePage: e, activeComp: n } = g.app;
1316
1326
  return t.type === "page" ? e.meta.states : t.type === "comp" ? n.meta.states : [];
1317
1327
  }
1318
1328
  function ue(t) {
1319
- const { activeObject: e, activePage: n, activeComp: o } = E.app;
1329
+ const { activeObject: e, activePage: n, activeComp: o } = g.app;
1320
1330
  if (e.type === "page")
1321
1331
  return n.meta.states.find((i) => i.id === t);
1322
1332
  if (e.type === "comp")
1323
1333
  return o.meta.states.find((i) => i.id === t);
1324
1334
  }
1325
- function no() {
1335
+ function eo() {
1326
1336
  const t = [], e = rn();
1327
1337
  for (const { id: n, name: o } of e)
1328
1338
  t.push([o, n]);
@@ -1353,7 +1363,7 @@ const Mi = {
1353
1363
  this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
1354
1364
  const e = this.getField("NODE");
1355
1365
  e.getOptions(!1), e.setValue(this.node.id);
1356
- const n = Je(this.node.id)?.[0];
1366
+ const n = qe(this.node.id)?.[0];
1357
1367
  if (!n)
1358
1368
  return;
1359
1369
  this.event.id = n.id, this.event.kind = n.kind, this.event.names = n.names, this.event.params = n.params;
@@ -1372,7 +1382,7 @@ const Mi = {
1372
1382
  }, 0);
1373
1383
  },
1374
1384
  genNodeOpts_: function() {
1375
- return ve("onEvent");
1385
+ return Ce("onEvent");
1376
1386
  },
1377
1387
  genEventOpts_: function() {
1378
1388
  return Ni(this.node.id);
@@ -1396,14 +1406,14 @@ const Mi = {
1396
1406
  const n = this.node.key !== e.key;
1397
1407
  this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
1398
1408
  const o = this.getField("EVENT");
1399
- if (o.getOptions(!1), n || !xe(this.event.id)) {
1400
- const i = Je(this.node.id)?.[0];
1409
+ if (o.getOptions(!1), n || !Ye(this.event.id)) {
1410
+ const i = qe(this.node.id)?.[0];
1401
1411
  o.setValue(i?.id ?? "");
1402
1412
  }
1403
1413
  this.onEventChange_(o.getValue());
1404
1414
  },
1405
1415
  onEventChange_: function(t) {
1406
- const e = xe(t);
1416
+ const e = Ye(t);
1407
1417
  e ? (this.event.id = e.id, this.event.kind = e.kind, this.event.names = e.names, this.event.params = e.params) : (this.event.id = "", this.event.kind = "", this.event.names = [], this.event.params = []), this.updateShape_(), setTimeout(() => {
1408
1418
  this.ensureBlocks_();
1409
1419
  }, 0);
@@ -1415,7 +1425,7 @@ const Mi = {
1415
1425
  }
1416
1426
  for (let e = 0; e < this.event.params.length; e++)
1417
1427
  this.getInput("PARAM" + e) || (this.appendValueInput("PARAM" + e), this.moveInputBefore("PARAM" + e, "HANDLE"));
1418
- const { kind: t } = en(this.event.id);
1428
+ const { kind: t } = nn(this.event.id);
1419
1429
  if (t === "multipleRefEvent")
1420
1430
  this.getInput("REF_KEY") || this.appendValueInput("REF_KEY"), this.event.params.length > 0 ? this.moveInputBefore("REF_KEY", "PARAM0") : this.moveInputBefore("REF_KEY", "HANDLE");
1421
1431
  else if (this.getInput("REF_KEY")) {
@@ -1444,7 +1454,7 @@ const Mi = {
1444
1454
  return;
1445
1455
  }
1446
1456
  t.alias !== this.node.alias && (this.node.alias = t.alias);
1447
- const e = xe(this.event.id);
1457
+ const e = Ye(this.event.id);
1448
1458
  if (!e) {
1449
1459
  this.setWarningText(f("WARN_EVENT_NOT_FOUND"));
1450
1460
  return;
@@ -1460,7 +1470,7 @@ const Mi = {
1460
1470
  this.setWarningText(null);
1461
1471
  }
1462
1472
  };
1463
- g.on_app_event_v1 = Mi;
1473
+ E.on_app_event_v1 = Mi;
1464
1474
  s.forBlock.on_app_event_v1 = function(t) {
1465
1475
  const e = s.quote_, n = t, o = n.event.id;
1466
1476
  let i = "";
@@ -1487,7 +1497,7 @@ const Ui = {
1487
1497
  initData_: function() {
1488
1498
  if (this.event.id)
1489
1499
  return;
1490
- const t = zn()?.[0];
1500
+ const t = Qn()?.[0];
1491
1501
  if (!t)
1492
1502
  return;
1493
1503
  this.event.id = t.id, this.event.kind = t.kind, this.event.names = t.names, this.event.params = t.params;
@@ -1561,7 +1571,7 @@ const Ui = {
1561
1571
  this.setWarningText(null);
1562
1572
  }
1563
1573
  };
1564
- g.trigger_app_event_v1 = Ui;
1574
+ E.trigger_app_event_v1 = Ui;
1565
1575
  s.forBlock.trigger_app_event_v1 = function(t) {
1566
1576
  const e = s.quote_, n = t;
1567
1577
  let o = "";
@@ -1634,7 +1644,7 @@ const Vi = {
1634
1644
  }, 0);
1635
1645
  },
1636
1646
  updateShape_: function() {
1637
- this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}"), this.getInput("RESULT") || (this.appendValueInput("RESULT").appendField("%{BKY_APP_RETURN}"), this.moveInputBefore("RESULT", "HANDLE")), this.getInput("TEXT") || (this.appendValueInput("TEXT").setCheck("String").setAlign(v.Align.RIGHT).appendField("%{BKY_APP_TEXT}"), this.moveInputBefore("TEXT", "RESULT")), this.getInput("TITLE") || (this.appendValueInput("TITLE").setCheck("String").setAlign(v.Align.RIGHT).appendField("%{BKY_APP_TITLE}"), this.moveInputBefore("TITLE", "TEXT"));
1647
+ this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}"), this.getInput("RESULT") || (this.appendValueInput("RESULT").appendField("%{BKY_APP_RETURN}"), this.moveInputBefore("RESULT", "HANDLE")), this.getInput("TEXT") || (this.appendValueInput("TEXT").setCheck("String").setAlign(y.Align.RIGHT).appendField("%{BKY_APP_TEXT}"), this.moveInputBefore("TEXT", "RESULT")), this.getInput("TITLE") || (this.appendValueInput("TITLE").setCheck("String").setAlign(y.Align.RIGHT).appendField("%{BKY_APP_TITLE}"), this.moveInputBefore("TITLE", "TEXT"));
1638
1648
  },
1639
1649
  updateShadow_: function() {
1640
1650
  if (this.isInsertionMarker())
@@ -1650,7 +1660,7 @@ const Vi = {
1650
1660
  ]);
1651
1661
  }
1652
1662
  };
1653
- g.open_confirm_dlg_v1 = Vi;
1663
+ E.open_confirm_dlg_v1 = Vi;
1654
1664
  s.forBlock.open_confirm_dlg_v1 = function(t) {
1655
1665
  const e = s.valueToCode(t, "TITLE", r.ATOMIC), n = s.valueToCode(t, "TEXT", r.ATOMIC), o = s.statementToCode(t, "HANDLE");
1656
1666
  return `{
@@ -1671,7 +1681,7 @@ const xi = {
1671
1681
  }, 0);
1672
1682
  },
1673
1683
  updateShape_: function() {
1674
- this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}"), this.getInput("RESULT") || (this.appendValueInput("RESULT").appendField("%{BKY_APP_RETURN}"), this.moveInputBefore("RESULT", "HANDLE")), this.getInput("VALUE") || (this.appendValueInput("VALUE").setCheck("String").setAlign(v.Align.RIGHT).appendField("%{BKY_APP_VALUE}"), this.moveInputBefore("VALUE", "RESULT")), this.getInput("LABEL") || (this.appendValueInput("LABEL").setCheck("String").setAlign(v.Align.RIGHT).appendField("%{BKY_APP_LABEL}"), this.moveInputBefore("LABEL", "VALUE")), this.getInput("TITLE") || (this.appendValueInput("TITLE").setCheck("String").setAlign(v.Align.RIGHT).appendField("%{BKY_APP_TITLE}"), this.moveInputBefore("TITLE", "LABEL"));
1684
+ this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_APP_DO}"), this.getInput("RESULT") || (this.appendValueInput("RESULT").appendField("%{BKY_APP_RETURN}"), this.moveInputBefore("RESULT", "HANDLE")), this.getInput("VALUE") || (this.appendValueInput("VALUE").setCheck("String").setAlign(y.Align.RIGHT).appendField("%{BKY_APP_VALUE}"), this.moveInputBefore("VALUE", "RESULT")), this.getInput("LABEL") || (this.appendValueInput("LABEL").setCheck("String").setAlign(y.Align.RIGHT).appendField("%{BKY_APP_LABEL}"), this.moveInputBefore("LABEL", "VALUE")), this.getInput("TITLE") || (this.appendValueInput("TITLE").setCheck("String").setAlign(y.Align.RIGHT).appendField("%{BKY_APP_TITLE}"), this.moveInputBefore("TITLE", "LABEL"));
1675
1685
  },
1676
1686
  updateShadow_: function() {
1677
1687
  if (this.isInsertionMarker())
@@ -1689,7 +1699,7 @@ const xi = {
1689
1699
  ]);
1690
1700
  }
1691
1701
  };
1692
- g.open_prompt_dlg_v1 = xi;
1702
+ E.open_prompt_dlg_v1 = xi;
1693
1703
  s.forBlock.open_prompt_dlg_v1 = function(t) {
1694
1704
  const e = s.valueToCode(t, "TITLE", r.ATOMIC), n = s.valueToCode(t, "LABEL", r.ATOMIC), o = s.valueToCode(t, "VALUE", r.ATOMIC), i = s.statementToCode(t, "HANDLE");
1695
1705
  return `{
@@ -1755,7 +1765,7 @@ const Yi = {
1755
1765
  this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
1756
1766
  const e = this.getField("NODE");
1757
1767
  e.getOptions(!1), e.setValue(this.node.id);
1758
- const n = qe(this.node.id)?.[0];
1768
+ const n = Qe(this.node.id)?.[0];
1759
1769
  if (!n)
1760
1770
  return;
1761
1771
  this.method.id = n.id, this.method.kind = n.kind, this.method.names = n.names, this.method.inputs = n.inputs, this.method.outputs = n.outputs;
@@ -1774,7 +1784,7 @@ const Yi = {
1774
1784
  }, 0);
1775
1785
  },
1776
1786
  genNodeOpts_: function() {
1777
- return ve("callMethod");
1787
+ return Ce("callMethod");
1778
1788
  },
1779
1789
  genMethodOpts_: function() {
1780
1790
  return Si(this.node.id);
@@ -1798,14 +1808,14 @@ const Yi = {
1798
1808
  const n = this.node.key !== e.key;
1799
1809
  this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
1800
1810
  const o = this.getField("METHOD");
1801
- if (o.getOptions(!1), n || !Ye(this.method.id)) {
1802
- const i = qe(this.node.id)?.[0];
1811
+ if (o.getOptions(!1), n || !Fe(this.method.id)) {
1812
+ const i = Qe(this.node.id)?.[0];
1803
1813
  o.setValue(i?.id ?? "");
1804
1814
  }
1805
1815
  this.onMethodChange_(o.getValue());
1806
1816
  },
1807
1817
  onMethodChange_: function(t) {
1808
- const e = Ye(t);
1818
+ const e = Fe(t);
1809
1819
  e ? (this.method.id = e.id, this.method.kind = e.kind, this.method.names = e.names, this.method.inputs = e.inputs, this.method.outputs = e.outputs) : (this.method.id = "", this.method.kind = "", this.method.names = [], this.method.inputs = [], this.method.outputs = []), this.updateShape_(), this.updateShadow_(), setTimeout(() => {
1810
1820
  this.ensureBlocks_();
1811
1821
  }, 0);
@@ -1826,10 +1836,10 @@ const Yi = {
1826
1836
  this.removeInput("INPUT" + t);
1827
1837
  for (let t = 0; t < this.method.inputs.length; t++) {
1828
1838
  const e = this.method.inputs[t];
1829
- this.getInput("INPUT" + t) || (this.appendValueInput("INPUT" + t).setAlign(v.Align.RIGHT).appendField(Rn[e.name]), this.method.outputs.length > 0 && this.moveInputBefore("INPUT" + t, "OUTPUT0"));
1839
+ this.getInput("INPUT" + t) || (this.appendValueInput("INPUT" + t).setAlign(y.Align.RIGHT).appendField(f(e.name)), this.method.outputs.length > 0 && this.moveInputBefore("INPUT" + t, "OUTPUT0"));
1830
1840
  }
1831
- if (this.method.kind === "referenceMethod")
1832
- this.getInput("REF_KEY") || this.appendValueInput("REF_KEY"), this.method.inputs.length > 0 ? this.moveInputBefore("REF_KEY", "INPUT0") : this.method.outputs.length > 0 && this.moveInputBefore("REF_KEY", "OUTPUT0");
1841
+ if (this.method.kind === "multipleRefMethod")
1842
+ this.getInput("REF_KEY") || this.appendValueInput("REF_KEY").setAlign(y.Align.RIGHT).appendField(f("BKY_APP_REF_KEY")), this.method.inputs.length > 0 ? this.moveInputBefore("REF_KEY", "INPUT0") : this.method.outputs.length > 0 && this.moveInputBefore("REF_KEY", "OUTPUT0");
1833
1843
  else if (this.getInput("REF_KEY")) {
1834
1844
  const t = this.getInput("REF_KEY").connection.targetBlock();
1835
1845
  t && t.dispose(), this.removeInput("REF_KEY");
@@ -1848,7 +1858,7 @@ const Yi = {
1848
1858
  ensureBlocks_: function() {
1849
1859
  if (this.isInsertionMarker())
1850
1860
  return;
1851
- const { kind: t } = nn(this.method.id), e = Kn(t), n = [];
1861
+ const { kind: t } = Oe(this.method.id), e = wn(t), n = [];
1852
1862
  for (let o = 0; o < this.method.outputs.length; o++) {
1853
1863
  const { key: i, name: a } = this.method.outputs[o];
1854
1864
  n.push(["OUTPUT" + o, `__output$${i}__`, a, e]);
@@ -1866,7 +1876,7 @@ const Yi = {
1866
1876
  return;
1867
1877
  }
1868
1878
  t.alias !== this.node.alias && (this.node.alias = t.alias);
1869
- const e = Ye(this.method.id);
1879
+ const e = Fe(this.method.id);
1870
1880
  if (!e) {
1871
1881
  this.setWarningText(f("WARN_METHOD_NOT_FOUND"));
1872
1882
  return;
@@ -1886,17 +1896,44 @@ const Yi = {
1886
1896
  this.setWarningText(null);
1887
1897
  }
1888
1898
  };
1889
- g.call_app_method_v1 = Yi;
1899
+ E.call_app_method_v1 = Yi;
1890
1900
  s.forBlock.call_app_method_v1 = function(t) {
1891
1901
  const e = s.quote_, n = t;
1892
- if (n.method.outputs.length > 0) {
1893
- const o = s.statementToCode(n, "HANDLE");
1894
- return `{
1895
- __callMethodV1__(${e(n.method.id)});
1896
- ${o}}
1897
- `;
1898
- } else
1899
- return `__callMethodV1__(${e(n.method.id)});
1902
+ let o;
1903
+ n.method.kind === "multipleRefMethod" && (o = s.valueToCode(n, "REF_KEY", r.NONE) || "''");
1904
+ let i = "{";
1905
+ n.method.inputs.forEach(({ key: u, type: l }, _) => {
1906
+ let d = s.valueToCode(
1907
+ n,
1908
+ "INPUT" + _,
1909
+ r.ATOMIC
1910
+ );
1911
+ if (d === void 0)
1912
+ switch (l) {
1913
+ case "string":
1914
+ d = "''";
1915
+ break;
1916
+ case "number":
1917
+ d = "0";
1918
+ break;
1919
+ case "boolean":
1920
+ d = "false";
1921
+ break;
1922
+ case "array":
1923
+ d = "[]";
1924
+ break;
1925
+ case "object":
1926
+ d = "{}";
1927
+ break;
1928
+ default:
1929
+ d = "null";
1930
+ }
1931
+ _ > 0 && (i += ","), i += `${e(u)}:${d}`;
1932
+ }), i += "}";
1933
+ const a = s.statementToCode(n, "HANDLE");
1934
+ return `{
1935
+ var __outputs__ = __callMethodV1__(${e(n.method.id)}, ${o}, ${i});
1936
+ ${a}}
1900
1937
  `;
1901
1938
  };
1902
1939
  const Fi = {
@@ -1930,7 +1967,7 @@ const Fi = {
1930
1967
  }, 0);
1931
1968
  },
1932
1969
  genMethodOpts_: function() {
1933
- return Zn();
1970
+ return zn();
1934
1971
  },
1935
1972
  onchange: function(t) {
1936
1973
  if (t.type === b.STATE_CHANGE)
@@ -1959,7 +1996,7 @@ const Fi = {
1959
1996
  ensureBlocks_: function() {
1960
1997
  if (this.isInsertionMarker() || !this.method.id)
1961
1998
  return;
1962
- const t = Kn(this.method.kind), e = [];
1999
+ const t = wn(this.method.kind), e = [];
1963
2000
  for (let n = 0; n < this.method.inputs.length; n++) {
1964
2001
  const { key: o, name: i } = this.method.inputs[n];
1965
2002
  e.push(["INPUT" + n, `__input$${o}__`, i, t]);
@@ -1983,11 +2020,12 @@ const Fi = {
1983
2020
  this.setWarningText(null);
1984
2021
  }
1985
2022
  };
1986
- g.impl_app_method_v1 = Fi;
2023
+ E.impl_app_method_v1 = Fi;
1987
2024
  s.forBlock.impl_app_method_v1 = function(t) {
1988
- const e = t;
1989
- return `{
1990
- ${s.statementToCode(e, "HANDLE")}}
2025
+ const e = t, { methodKey: n } = Oe(e.method.id), o = s.statementToCode(e, "HANDLE");
2026
+ return `function __implMethod$${n}__() {
2027
+ var __outputs__ = {};
2028
+ ${o}}
1991
2029
  `;
1992
2030
  };
1993
2031
  const wi = {
@@ -2006,7 +2044,7 @@ const wi = {
2006
2044
  ).appendField(
2007
2045
  new O(() => this.genOutputOpts_()),
2008
2046
  "OUTPUT"
2009
- ), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_APP_V1_SET_APP_METHOD_OUTPUT_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_SET_APP_METHOD_OUTPUT_HELPURL}"), this.initData_();
2047
+ ), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_APP_V1_SET_APP_METHOD_OUTPUT_TOOLTIP}"), this.setHelpUrl("%{BKY_APP_V1_SET_APP_METHOD_OUTPUT_HELPURL}"), this.initData_(), this.updateShape_(), this.updateShadows_();
2010
2048
  },
2011
2049
  initData_: function() {
2012
2050
  if (this.method.id)
@@ -2017,7 +2055,7 @@ const wi = {
2017
2055
  this.method.id = t.id, this.method.kind = t.kind, this.method.names = t.names;
2018
2056
  const e = this.getField("METHOD");
2019
2057
  e.getOptions(!1), e.setValue(this.method.id);
2020
- const n = Qe(this.method.id)?.[0];
2058
+ const n = ze(this.method.id)?.[0];
2021
2059
  if (!n)
2022
2060
  return;
2023
2061
  this.output.key = n.key, this.output.name = n.name, this.output.type = n.type;
@@ -2026,16 +2064,17 @@ const wi = {
2026
2064
  },
2027
2065
  saveExtraState: function() {
2028
2066
  return {
2067
+ method: this.method,
2029
2068
  output: this.output
2030
2069
  };
2031
2070
  },
2032
2071
  loadExtraState: function(t) {
2033
- this.method.id = t.method?.key ?? "", this.method.kind = t.method?.kind ?? "", this.method.names = t.method?.names ?? [], this.output.key = t.output?.key ?? "", this.output.name = t.output?.name ?? "", this.output.type = t.output?.type ?? "", this.updateShape_(), this.updateShadows_(), setTimeout(() => {
2072
+ this.method.id = t.method?.id ?? "", this.method.kind = t.method?.kind ?? "", this.method.names = t.method?.names ?? [], this.output.key = t.output?.key ?? "", this.output.name = t.output?.name ?? "", this.output.type = t.output?.type ?? "", this.updateShape_(), this.updateShadows_(), setTimeout(() => {
2034
2073
  this.checkWarning_();
2035
2074
  }, 0);
2036
2075
  },
2037
2076
  genMethodOpts_: function() {
2038
- return Zn();
2077
+ return zn();
2039
2078
  },
2040
2079
  genOutputOpts_: function() {
2041
2080
  return Bi(this.method.id);
@@ -2059,14 +2098,14 @@ const wi = {
2059
2098
  const n = this.method.id !== e.id;
2060
2099
  this.method.id = e.id, this.method.kind = e.kind, this.method.names = e.names;
2061
2100
  const o = this.getField("OUTPUT");
2062
- if (o.getOptions(!1), n || !Fe(this.method.id, this.output.key)) {
2063
- const i = Qe(this.method.id)?.[0];
2101
+ if (o.getOptions(!1), n || !we(this.method.id, this.output.key)) {
2102
+ const i = ze(this.method.id)?.[0];
2064
2103
  o.setValue(i?.key ?? "");
2065
2104
  }
2066
2105
  this.onOutputChange_(o.getValue());
2067
2106
  },
2068
2107
  onOutputChange_: function(t) {
2069
- const e = Fe(this.method.id, t);
2108
+ const e = we(this.method.id, t);
2070
2109
  e ? (this.output.key = e.key, this.output.name = e.name, this.output.type = e.type) : (this.output.key = "", this.output.name = "", this.output.type = "string");
2071
2110
  },
2072
2111
  updateShape_: function() {
@@ -2094,7 +2133,7 @@ const wi = {
2094
2133
  return;
2095
2134
  }
2096
2135
  t.names !== this.method.names && (this.method.names = t.names);
2097
- const e = Fe(this.method.id, this.output.key);
2136
+ const e = we(this.method.id, this.output.key);
2098
2137
  if (!e) {
2099
2138
  this.setWarningText(f("WARN_OUTPUT_NOT_FOUND"));
2100
2139
  return;
@@ -2106,7 +2145,7 @@ const wi = {
2106
2145
  this.setWarningText(null);
2107
2146
  }
2108
2147
  };
2109
- g.set_app_method_output_v1 = wi;
2148
+ E.set_app_method_output_v1 = wi;
2110
2149
  s.forBlock.set_app_method_output_v1 = function(t) {
2111
2150
  const e = s.quote_, n = t;
2112
2151
  let o = s.valueToCode(n, "VALUE", r.ATOMIC);
@@ -2130,7 +2169,7 @@ s.forBlock.set_app_method_output_v1 = function(t) {
2130
2169
  default:
2131
2170
  o = "null";
2132
2171
  }
2133
- return `__setMethodOutputV1__(${e(n.method.id)}, ${e(n.output.key)}, ${o});
2172
+ return `__outputs__[${e(n.output.key)}] = ${o};
2134
2173
  `;
2135
2174
  };
2136
2175
  T([
@@ -2169,13 +2208,13 @@ const Ki = {
2169
2208
  initData_: function() {
2170
2209
  if (this.app.id)
2171
2210
  return;
2172
- const t = Jn()?.[0];
2211
+ const t = Xn()?.[0];
2173
2212
  if (!t)
2174
2213
  return;
2175
2214
  this.app.id = t.id, this.app.name = t.name;
2176
2215
  const e = this.getField("APP");
2177
2216
  e.getOptions(!1), e.setValue(this.app.id);
2178
- const n = Xe(this.app.id)?.[0];
2217
+ const n = Je(this.app.id)?.[0];
2179
2218
  if (!n)
2180
2219
  return;
2181
2220
  this.page.id = n.id, this.page.name = n.name;
@@ -2194,7 +2233,7 @@ const Ki = {
2194
2233
  }, 0);
2195
2234
  },
2196
2235
  genAppOpts_: function() {
2197
- return vi();
2236
+ return yi();
2198
2237
  },
2199
2238
  genPageOpts_: function() {
2200
2239
  return Ci(this.app.id);
@@ -2210,7 +2249,7 @@ const Ki = {
2210
2249
  }
2211
2250
  },
2212
2251
  onAppChange_: function(t) {
2213
- const e = vn(t);
2252
+ const e = yn(t);
2214
2253
  if (!e) {
2215
2254
  console.assert(!1);
2216
2255
  return;
@@ -2218,23 +2257,23 @@ const Ki = {
2218
2257
  const n = this.app.id !== e.id;
2219
2258
  this.app.id = e.id, this.app.name = e.name;
2220
2259
  const o = this.getField("PAGE");
2221
- if (o.getOptions(!1), n || !Ve(this.app.id, this.page.id)) {
2222
- const a = Xe(this.app.id)?.[0]?.id ?? "";
2260
+ if (o.getOptions(!1), n || !xe(this.app.id, this.page.id)) {
2261
+ const a = Je(this.app.id)?.[0]?.id ?? "";
2223
2262
  o.setValue(a), this.page.id === a && this.onPageChange_(a);
2224
2263
  }
2225
2264
  },
2226
2265
  onPageChange_: function(t) {
2227
- const e = Ve(this.app.id, t);
2266
+ const e = xe(this.app.id, t);
2228
2267
  e ? (this.page.id = e.id, this.page.name = e.name) : (this.page.id = "", this.page.name = "");
2229
2268
  },
2230
2269
  checkWarning_: function() {
2231
- const t = vn(this.app.id);
2270
+ const t = yn(this.app.id);
2232
2271
  if (!t) {
2233
2272
  this.setWarningText(f("WARN_APP_NOT_FOUND"));
2234
2273
  return;
2235
2274
  }
2236
2275
  t.name !== this.app.name && (this.app.name = t.name);
2237
- const e = Ve(this.app.id, this.page.id);
2276
+ const e = xe(this.app.id, this.page.id);
2238
2277
  if (!e) {
2239
2278
  this.setWarningText(f("WARN_PAGE_NOT_FOUND"));
2240
2279
  return;
@@ -2242,7 +2281,7 @@ const Ki = {
2242
2281
  e.name !== this.page.name && (this.page.name = e.name), this.setWarningText(null);
2243
2282
  }
2244
2283
  };
2245
- g.navigate_to_v1 = Ki;
2284
+ E.navigate_to_v1 = Ki;
2246
2285
  s.forBlock.navigate_to_v1 = function(t) {
2247
2286
  const e = t, n = s.quote_(e.app.id), o = s.quote_(e.page.id);
2248
2287
  return `__navigateToV1__(${n}, ${o});
@@ -2258,7 +2297,7 @@ const $i = {
2258
2297
  initData_: function() {
2259
2298
  if (this.comp.id !== void 0)
2260
2299
  return;
2261
- const t = Qn()?.[0];
2300
+ const t = qn()?.[0];
2262
2301
  if (!t)
2263
2302
  return;
2264
2303
  this.comp.id = t.id, this.comp.name = t.name;
@@ -2308,7 +2347,7 @@ const $i = {
2308
2347
  this.setWarningText(null);
2309
2348
  }
2310
2349
  };
2311
- g.select_comp_v1 = $i;
2350
+ E.select_comp_v1 = $i;
2312
2351
  s.forBlock.select_comp_v1 = function(t) {
2313
2352
  const e = s.quote_, o = t.comp.id ?? "";
2314
2353
  return [e(o), r.ATOMIC];
@@ -2356,10 +2395,10 @@ const Hi = {
2356
2395
  }, 0);
2357
2396
  },
2358
2397
  genNodeOpts_: function() {
2359
- return ve("getProperty");
2398
+ return Ce("getProperty");
2360
2399
  },
2361
2400
  genPropertyOpts_: function() {
2362
- return eo(this.node.id, "read");
2401
+ return to(this.node.id, "read");
2363
2402
  },
2364
2403
  onchange: function(t) {
2365
2404
  if (t.type === b.STATE_CHANGE)
@@ -2380,14 +2419,14 @@ const Hi = {
2380
2419
  const n = this.node.key !== e.key;
2381
2420
  this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
2382
2421
  const o = this.getField("PROPERTY");
2383
- if (o.getOptions(!1), n || !yt(this.property.id)) {
2422
+ if (o.getOptions(!1), n || !vt(this.property.id)) {
2384
2423
  const i = Ht(this.node.id, "read")?.[0];
2385
2424
  o.setValue(i?.id ?? "");
2386
2425
  }
2387
2426
  this.onPropChange_(o.getValue());
2388
2427
  },
2389
2428
  onPropChange_: function(t) {
2390
- const e = yt(t);
2429
+ const e = vt(t);
2391
2430
  e ? (this.property.id = e.id, this.property.kind = e.kind, this.property.names = e.names) : (this.property.id = "", this.property.kind = "", this.property.names = []);
2392
2431
  },
2393
2432
  checkWarning_: function() {
@@ -2401,7 +2440,7 @@ const Hi = {
2401
2440
  return;
2402
2441
  }
2403
2442
  t.alias !== this.node.alias && (this.node.alias = t.alias);
2404
- const e = yt(this.property.id);
2443
+ const e = vt(this.property.id);
2405
2444
  if (!e) {
2406
2445
  this.setWarningText(f("WARN_PROPERTY_NOT_FOUND"));
2407
2446
  return;
@@ -2413,7 +2452,7 @@ const Hi = {
2413
2452
  M(e.names, this.property.names) || (this.property.names = e.names), this.setWarningText(null);
2414
2453
  }
2415
2454
  };
2416
- g.get_app_property_v1 = Hi;
2455
+ E.get_app_property_v1 = Hi;
2417
2456
  s.forBlock.get_app_property_v1 = function(t) {
2418
2457
  const e = s.quote_;
2419
2458
  return [`__getPropertyV1__(${e(t.property.id)}, ${e("")})`, r.ATOMIC];
@@ -2461,10 +2500,10 @@ const Gi = {
2461
2500
  }, 0);
2462
2501
  },
2463
2502
  genNodeOpts_: function() {
2464
- return ve("setProperty");
2503
+ return Ce("setProperty");
2465
2504
  },
2466
2505
  genPropertyOpts_: function() {
2467
- return eo(this.node.id, "write");
2506
+ return to(this.node.id, "write");
2468
2507
  },
2469
2508
  onchange: function(t) {
2470
2509
  if (t.type === b.STATE_CHANGE)
@@ -2485,20 +2524,20 @@ const Gi = {
2485
2524
  const n = this.node.key !== e.key;
2486
2525
  this.node.id = e.id, this.node.key = e.key, this.node.alias = e.alias;
2487
2526
  const o = this.getField("PROPERTY");
2488
- if (o.getOptions(!1), n || !yt(this.property.id)) {
2527
+ if (o.getOptions(!1), n || !vt(this.property.id)) {
2489
2528
  const i = Ht(this.node.id, "write")?.[0];
2490
2529
  o.setValue(i?.id ?? "");
2491
2530
  }
2492
2531
  this.onPropChange_(o.getValue());
2493
2532
  },
2494
2533
  onPropChange_: function(t) {
2495
- const e = yt(t);
2534
+ const e = vt(t);
2496
2535
  e ? (this.property.id = e.id, this.property.kind = e.kind, this.property.names = e.names) : (this.property.id = "", this.property.kind = "", this.property.names = []), this.updateShadow_();
2497
2536
  },
2498
2537
  updateShadow_: function() {
2499
2538
  if (this.isInsertionMarker())
2500
2539
  return;
2501
- const t = yt(this.property.id);
2540
+ const t = vt(this.property.id);
2502
2541
  if (!t)
2503
2542
  return;
2504
2543
  this.getInput("VALUE").setShadowDom(null);
@@ -2522,7 +2561,7 @@ const Gi = {
2522
2561
  return;
2523
2562
  }
2524
2563
  t.alias !== this.node.alias && (this.node.alias = t.alias);
2525
- const e = yt(this.property.id);
2564
+ const e = vt(this.property.id);
2526
2565
  if (!e) {
2527
2566
  this.setWarningText(f("WARN_PROPERTY_NOT_FOUND"));
2528
2567
  return;
@@ -2534,7 +2573,7 @@ const Gi = {
2534
2573
  M(e.names, this.property.names) || (this.property.names = e.names), this.setWarningText(null);
2535
2574
  }
2536
2575
  };
2537
- g.set_app_property_v1 = Gi;
2576
+ E.set_app_property_v1 = Gi;
2538
2577
  s.forBlock.set_app_property_v1 = function(t) {
2539
2578
  const e = s.quote_, n = t, o = "", i = s.valueToCode(n, "VALUE", r.NONE);
2540
2579
  return `__setPropertyV1__(${e(n.property.id)}, ${e(o)}, ${i});
@@ -2572,7 +2611,7 @@ const Wi = {
2572
2611
  }, 0);
2573
2612
  },
2574
2613
  genStateOpts_: function() {
2575
- return no();
2614
+ return eo();
2576
2615
  },
2577
2616
  onchange: function(t) {
2578
2617
  if (t.type === b.STATE_CHANGE)
@@ -2599,7 +2638,7 @@ const Wi = {
2599
2638
  this.setWarningText(null);
2600
2639
  }
2601
2640
  };
2602
- g.get_app_state_v1 = Wi;
2641
+ E.get_app_state_v1 = Wi;
2603
2642
  s.forBlock.get_app_state_v1 = function(t) {
2604
2643
  const e = s.quote_;
2605
2644
  return [`__getStateV1__(${e(t.state.id)})`, r.ATOMIC];
@@ -2634,7 +2673,7 @@ const ji = {
2634
2673
  this.state.id = t.state?.id ?? "", this.state.name = t.state?.name ?? "", this.state.type = t.state?.type ?? "string";
2635
2674
  },
2636
2675
  genStateOpts_: function() {
2637
- return no();
2676
+ return eo();
2638
2677
  },
2639
2678
  onchange: function(t) {
2640
2679
  if (t.type === I.BLOCK_CHANGE) {
@@ -2668,7 +2707,7 @@ const ji = {
2668
2707
  this.setWarningText(null);
2669
2708
  }
2670
2709
  };
2671
- g.set_app_state_v1 = ji;
2710
+ E.set_app_state_v1 = ji;
2672
2711
  s.forBlock.set_app_state_v1 = function(t) {
2673
2712
  const e = s.quote_, n = t, o = s.valueToCode(n, "VALUE", r.NONE);
2674
2713
  return `__setStateV1__(${e(n.state.id)}, ${o});
@@ -3383,25 +3422,17 @@ const Xi = C.xml, Ji = [
3383
3422
  inputs: ["SUCCESS", "MESSAGE", "DATA"]
3384
3423
  },
3385
3424
  {
3386
- type: "call_func_v1",
3425
+ type: "call_app_method_v1",
3387
3426
  prefixInputs: ["OUTPUT"]
3388
3427
  },
3389
3428
  {
3390
- type: "call_func_internal_v1",
3391
- prefixInputs: ["OUTPUT"]
3392
- },
3393
- {
3394
- type: "call_method_as_v1",
3429
+ type: "call_func_v1",
3395
3430
  prefixInputs: ["OUTPUT"]
3396
3431
  },
3397
3432
  {
3398
- type: "call_method_v1",
3433
+ type: "call_func_internal_v1",
3399
3434
  prefixInputs: ["OUTPUT"]
3400
3435
  },
3401
- {
3402
- type: "method_impl_v1",
3403
- prefixInputs: ["INPUT"]
3404
- },
3405
3436
  {
3406
3437
  type: "delete_data_v1",
3407
3438
  inputs: ["SUCCESS", "MESSAGE"]
@@ -3410,6 +3441,10 @@ const Xi = C.xml, Ji = [
3410
3441
  type: "func_entry_v1",
3411
3442
  prefixInputs: ["INPUT"]
3412
3443
  },
3444
+ {
3445
+ type: "impl_app_method_v1",
3446
+ prefixInputs: ["INPUT"]
3447
+ },
3413
3448
  {
3414
3449
  type: "open_confirm_dlg_v1",
3415
3450
  inputs: ["RESULT"]
@@ -3500,13 +3535,13 @@ const Qi = {
3500
3535
  },
3501
3536
  updateShape_: function() {
3502
3537
  if (this.locale) {
3503
- const { i18n: t } = vt;
3538
+ const { i18n: t } = yt;
3504
3539
  this.setFieldValue(t.global.t(this.name), "LABEL");
3505
3540
  } else
3506
3541
  this.setFieldValue(this.name, "LABEL");
3507
3542
  }
3508
3543
  };
3509
- g.parameter_v1 = Qi;
3544
+ E.parameter_v1 = Qi;
3510
3545
  s.forBlock.parameter_v1 = function(t) {
3511
3546
  return [t.key, r.ATOMIC];
3512
3547
  };
@@ -3514,49 +3549,49 @@ const zi = {
3514
3549
  init: function() {
3515
3550
  }
3516
3551
  };
3517
- g.on_flow_state_event_v1 = zi;
3552
+ E.on_flow_state_event_v1 = zi;
3518
3553
  s.forBlock.on_flow_state_event_v1 = function() {
3519
3554
  return `__onFlowStateEventV1__();
3520
3555
  `;
3521
3556
  };
3522
3557
  function Gt(t) {
3523
- const e = E.compute.spaces.find((n) => n.id === t);
3558
+ const e = g.compute.spaces.find((n) => n.id === t);
3524
3559
  return e ? e.funcs : [];
3525
3560
  }
3526
3561
  function Bt(t, e) {
3527
- const n = E.compute.spaces.find((o) => o.id === t);
3562
+ const n = g.compute.spaces.find((o) => o.id === t);
3528
3563
  if (n)
3529
3564
  return n.funcs.find((o) => o.id === e);
3530
3565
  }
3531
- function oo(t) {
3566
+ function no(t) {
3532
3567
  const e = [];
3533
3568
  return Gt(t).forEach(({ id: o, name: i }) => {
3534
3569
  e.push([i, o]);
3535
3570
  }), k(e);
3536
3571
  }
3537
- function ze() {
3538
- return E.compute.activeFunc;
3572
+ function Ze() {
3573
+ return g.compute.activeFunc;
3539
3574
  }
3540
3575
  function Nn(t) {
3541
- const { outputs: e } = E.compute.activeFunc;
3576
+ const { outputs: e } = g.compute.activeFunc;
3542
3577
  return e.find((n) => n.id === t);
3543
3578
  }
3544
3579
  function Zi() {
3545
- const t = [], { outputs: e } = E.compute.activeFunc;
3580
+ const t = [], { outputs: e } = g.compute.activeFunc;
3546
3581
  return e.forEach(({ id: n, name: o }) => {
3547
3582
  t.push([o, n]);
3548
3583
  }), k(t);
3549
3584
  }
3550
3585
  function qt(t) {
3551
3586
  const e = [];
3552
- return E.compute.spaces.forEach((n) => {
3587
+ return g.compute.spaces.forEach((n) => {
3553
3588
  t === "func" && n.funcs.length > 0 && e.push(n), t === "flow" && n.flows.length > 0 && e.push(n);
3554
3589
  }), e;
3555
3590
  }
3556
3591
  function le(t) {
3557
- return E.compute.spaces.find((e) => e.id === t);
3592
+ return g.compute.spaces.find((e) => e.id === t);
3558
3593
  }
3559
- function io(t) {
3594
+ function oo(t) {
3560
3595
  const e = [];
3561
3596
  return qt(t).forEach(({ id: o, name: i }) => {
3562
3597
  e.push([i, o]);
@@ -3605,10 +3640,10 @@ const ts = {
3605
3640
  }, 0);
3606
3641
  },
3607
3642
  genSpaceOpts_: function() {
3608
- return io("func");
3643
+ return oo("func");
3609
3644
  },
3610
3645
  genFuncOpts_: function() {
3611
- return oo(this.space.id);
3646
+ return no(this.space.id);
3612
3647
  },
3613
3648
  onchange: function(t) {
3614
3649
  if (t.type === b.STATE_CHANGE)
@@ -3660,7 +3695,7 @@ const ts = {
3660
3695
  }
3661
3696
  for (let t = 0; t < this.func.inputs.length; t++) {
3662
3697
  const { name: e } = this.func.inputs[t], n = this.getInput("INPUT" + t);
3663
- n ? (this.setFieldValue(e, "NAME" + t), n.setCheck(null)) : (this.appendValueInput("INPUT" + t).setAlign(v.Align.RIGHT).appendField(e, "NAME" + t).setCheck(null), this.getInput("OUTPUT0") ? this.moveInputBefore("INPUT" + t, "OUTPUT0") : this.moveInputBefore("INPUT" + t, "CALLBACK"));
3698
+ n ? (this.setFieldValue(e, "NAME" + t), n.setCheck(null)) : (this.appendValueInput("INPUT" + t).setAlign(y.Align.RIGHT).appendField(e, "NAME" + t).setCheck(null), this.getInput("OUTPUT0") ? this.moveInputBefore("INPUT" + t, "OUTPUT0") : this.moveInputBefore("INPUT" + t, "CALLBACK"));
3664
3699
  }
3665
3700
  },
3666
3701
  updateCheck_: function() {
@@ -3709,7 +3744,7 @@ const ts = {
3709
3744
  this.setWarningText(null);
3710
3745
  }
3711
3746
  };
3712
- g.call_func_v1 = ts;
3747
+ E.call_func_v1 = ts;
3713
3748
  s.forBlock.call_func_v1 = function(t) {
3714
3749
  const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
3715
3750
  let c = "";
@@ -3779,10 +3814,10 @@ const es = {
3779
3814
  }, 0);
3780
3815
  },
3781
3816
  genSpaceOpts_: function() {
3782
- return io("func");
3817
+ return oo("func");
3783
3818
  },
3784
3819
  genFuncOpts_: function() {
3785
- return oo(this.space.id);
3820
+ return no(this.space.id);
3786
3821
  },
3787
3822
  onchange: function(t) {
3788
3823
  if (t.type === b.STATE_CHANGE)
@@ -3834,7 +3869,7 @@ const es = {
3834
3869
  }
3835
3870
  for (let t = 0; t < this.func.inputs.length; t++) {
3836
3871
  const { name: e } = this.func.inputs[t], n = this.getInput("INPUT" + t);
3837
- n ? (this.setFieldValue(e, "NAME" + t), n.setCheck(null)) : (this.appendValueInput("INPUT" + t).setAlign(v.Align.RIGHT).appendField(e, "NAME" + t).setCheck(null), this.getInput("OUTPUT0") ? this.moveInputBefore("INPUT" + t, "OUTPUT0") : this.moveInputBefore("INPUT" + t, "CALLBACK"));
3872
+ n ? (this.setFieldValue(e, "NAME" + t), n.setCheck(null)) : (this.appendValueInput("INPUT" + t).setAlign(y.Align.RIGHT).appendField(e, "NAME" + t).setCheck(null), this.getInput("OUTPUT0") ? this.moveInputBefore("INPUT" + t, "OUTPUT0") : this.moveInputBefore("INPUT" + t, "CALLBACK"));
3838
3873
  }
3839
3874
  },
3840
3875
  updateCheck_: function() {
@@ -3883,7 +3918,7 @@ const es = {
3883
3918
  this.setWarningText(null);
3884
3919
  }
3885
3920
  };
3886
- g.call_func_internal_v1 = es;
3921
+ E.call_func_internal_v1 = es;
3887
3922
  s.forBlock.call_func_internal_v1 = function(t) {
3888
3923
  const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
3889
3924
  let c = `${e}var __inputs__ = {
@@ -3923,7 +3958,7 @@ const ns = {
3923
3958
  initData_: function() {
3924
3959
  if (this.func.id)
3925
3960
  return;
3926
- const { id: t, inputs: e } = ze();
3961
+ const { id: t, inputs: e } = Ze();
3927
3962
  this.func.id = t, this.func.inputs = e;
3928
3963
  },
3929
3964
  saveExtraState: function() {
@@ -3960,7 +3995,7 @@ const ns = {
3960
3995
  Y(this, t);
3961
3996
  },
3962
3997
  checkWarning_: function() {
3963
- const { id: t, inputs: e } = ze();
3998
+ const { id: t, inputs: e } = Ze();
3964
3999
  if (this.func.id !== t && (this.func.id = t), !M(e, this.func.inputs)) {
3965
4000
  this.setWarningText(f("WARN_FUNC_HAS_CHANGED"));
3966
4001
  return;
@@ -3968,7 +4003,7 @@ const ns = {
3968
4003
  this.setWarningText(null);
3969
4004
  }
3970
4005
  };
3971
- g.func_entry_v1 = ns;
4006
+ E.func_entry_v1 = ns;
3972
4007
  s.forBlock.func_entry_v1 = function(t) {
3973
4008
  const e = t, n = s.statementToCode(e, "HANDLE"), o = [];
3974
4009
  for (let a = 0; a < e.func.inputs.length; a++) {
@@ -3992,7 +4027,7 @@ const os = {
3992
4027
  initData_: function() {
3993
4028
  if (this.output.id)
3994
4029
  return;
3995
- const t = ze().outputs?.[0];
4030
+ const t = Ze().outputs?.[0];
3996
4031
  t && (this.output.id = t.id, this.output.name = t.name, this.output.type = t.type);
3997
4032
  },
3998
4033
  saveExtraState: function() {
@@ -4053,7 +4088,7 @@ const os = {
4053
4088
  this.setWarningText(null);
4054
4089
  }
4055
4090
  };
4056
- g.set_func_output_v1 = os;
4091
+ E.set_func_output_v1 = os;
4057
4092
  s.forBlock.set_func_output_v1 = function(t) {
4058
4093
  const e = s.quote_, n = t, { id: o, type: i } = n.output;
4059
4094
  let a = s.valueToCode(n, "VALUE", r.ATOMIC);
@@ -4127,44 +4162,44 @@ s.forBlock.compute_env_is_v1 = function(t) {
4127
4162
  };
4128
4163
  function et() {
4129
4164
  const t = [];
4130
- return E.data.spaces.forEach((e) => {
4165
+ return g.data.spaces.forEach((e) => {
4131
4166
  e.tables.length > 0 && t.push(e);
4132
4167
  }), t;
4133
4168
  }
4134
4169
  function mt(t) {
4135
- const { spaces: e } = E.data;
4170
+ const { spaces: e } = g.data;
4136
4171
  return e.find((n) => n.id === t);
4137
4172
  }
4138
- function Ce() {
4173
+ function ke() {
4139
4174
  const t = [];
4140
4175
  return et().forEach(({ id: n, name: o }) => {
4141
4176
  t.push([o, n]);
4142
4177
  }), k(t);
4143
4178
  }
4144
4179
  function H(t) {
4145
- const { spaces: e } = E.data, n = e.find((o) => o.id === t);
4180
+ const { spaces: e } = g.data, n = e.find((o) => o.id === t);
4146
4181
  return n ? n.tables : [];
4147
4182
  }
4148
4183
  function J(t, e) {
4149
- const { spaces: n } = E.data, o = n.find((i) => i.id === t);
4184
+ const { spaces: n } = g.data, o = n.find((i) => i.id === t);
4150
4185
  if (o)
4151
4186
  return o.tables.find((i) => i.id === e);
4152
4187
  }
4153
- function ke(t) {
4188
+ function Ne(t) {
4154
4189
  const e = [];
4155
4190
  return H(t).forEach(({ id: o, name: i }) => {
4156
4191
  e.push([i, o]);
4157
4192
  }), k(e);
4158
4193
  }
4159
4194
  function _e(t, e) {
4160
- const { spaces: n } = E.data, o = n.find((a) => a.id === t);
4195
+ const { spaces: n } = g.data, o = n.find((a) => a.id === t);
4161
4196
  if (!o)
4162
4197
  return [];
4163
4198
  const i = o.tables.find((a) => a.id === e);
4164
4199
  return i ? i.columns : [];
4165
4200
  }
4166
- function we(t, e, n) {
4167
- const { spaces: o } = E.data, i = o.find((c) => c.id === t);
4201
+ function Ke(t, e, n) {
4202
+ const { spaces: o } = g.data, i = o.find((c) => c.id === t);
4168
4203
  if (!i)
4169
4204
  return;
4170
4205
  const a = i.tables.find((c) => c.id === e);
@@ -4248,7 +4283,7 @@ const cs = {
4248
4283
  }, 0);
4249
4284
  },
4250
4285
  updateShape_: function() {
4251
- this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("DATA") || (this.appendValueInput("DATA"), this.moveInputBefore("DATA", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(v.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "SUCCESS"));
4286
+ this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("DATA") || (this.appendValueInput("DATA"), this.moveInputBefore("DATA", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(y.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "SUCCESS"));
4252
4287
  },
4253
4288
  ensureBlocks_: function() {
4254
4289
  this.isInsertionMarker() || (ss(this), Y(this, [
@@ -4258,7 +4293,7 @@ const cs = {
4258
4293
  ]), as(this));
4259
4294
  }
4260
4295
  };
4261
- g.add_data_v1 = cs;
4296
+ E.add_data_v1 = cs;
4262
4297
  s.forBlock.add_data_v1 = function(t) {
4263
4298
  const e = s.INDENT, n = s.valueToCode(t, "TABLE", r.ATOMIC) || "null", o = s.statementToCode(t, "HANDLE");
4264
4299
  return `{
@@ -4337,10 +4372,10 @@ const rs = {
4337
4372
  }, 0);
4338
4373
  },
4339
4374
  genSpaceOpts_: function() {
4340
- return Ce();
4375
+ return ke();
4341
4376
  },
4342
4377
  genTableOpts_: function() {
4343
- return ke(this.space.id);
4378
+ return Ne(this.space.id);
4344
4379
  },
4345
4380
  genColumnOpts_: function() {
4346
4381
  return is(this.space.id, this.table.id);
@@ -4374,13 +4409,13 @@ const rs = {
4374
4409
  return;
4375
4410
  }
4376
4411
  const n = e.id !== this.table.id;
4377
- if (this.table.id = e.id, this.table.name = e.name, n || !we(this.space.id, this.table.id, this.column.id)) {
4412
+ if (this.table.id = e.id, this.table.name = e.name, n || !Ke(this.space.id, this.table.id, this.column.id)) {
4378
4413
  const o = _e(this.space.id, this.table.id)?.[0]?.id ?? "", i = this.getField("COLUMN");
4379
4414
  i.getOptions(!1), i.setValue(o, !1), this.onColumnChange_(o);
4380
4415
  }
4381
4416
  },
4382
4417
  onColumnChange_: function(t) {
4383
- const e = we(this.space.id, this.table.id, t);
4418
+ const e = Ke(this.space.id, this.table.id, t);
4384
4419
  e ? (this.column.id = e.id, this.column.name = e.name, this.column.type = e.type, this.column.extend = e.extend) : (this.column.id = "", this.column.name = "", this.column.type = "", this.column.extend = ""), this.updateShape_(), this.updateBlocks_(!0), this.updateCheck_();
4385
4420
  },
4386
4421
  updateShape_: function() {
@@ -4399,11 +4434,11 @@ const rs = {
4399
4434
  n && n.dispose();
4400
4435
  else if (n)
4401
4436
  return;
4402
- const o = je(this.workspace, this.column.type);
4437
+ const o = Xe(this.workspace, this.column.type);
4403
4438
  o && (e.setCheck(null), e.connect(o.outputConnection));
4404
4439
  },
4405
4440
  updateCheck_: function() {
4406
- const t = Xn(this.column.type);
4441
+ const t = jn(this.column.type);
4407
4442
  this.getInput("VALUE").connection.setCheck(t);
4408
4443
  },
4409
4444
  checkWarning_: function() {
@@ -4419,7 +4454,7 @@ const rs = {
4419
4454
  return;
4420
4455
  }
4421
4456
  e.name !== this.table.name && (this.table.name = e.name);
4422
- const n = we(
4457
+ const n = Ke(
4423
4458
  this.space.id,
4424
4459
  this.table.id,
4425
4460
  this.column.id
@@ -4435,7 +4470,7 @@ const rs = {
4435
4470
  this.setWarningText(null);
4436
4471
  }
4437
4472
  };
4438
- g.cond_atomic_v1 = rs;
4473
+ E.cond_atomic_v1 = rs;
4439
4474
  s.forBlock.cond_atomic_v1 = function(t) {
4440
4475
  const e = s.quote_, n = t, o = n.column.name, i = s.valueToCode(n, "VALUE", r.ATOMIC) || null, c = {
4441
4476
  EQ: "=",
@@ -4452,13 +4487,13 @@ const us = {
4452
4487
  this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("logic_blocks"), this.contextMenu = !1;
4453
4488
  }
4454
4489
  };
4455
- g.cond_logic_container_v1 = us;
4490
+ E.cond_logic_container_v1 = us;
4456
4491
  const ls = {
4457
4492
  init: function() {
4458
4493
  this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("logic_blocks"), this.contextMenu = !1;
4459
4494
  }
4460
4495
  };
4461
- g.cond_logic_item_v1 = ls;
4496
+ E.cond_logic_item_v1 = ls;
4462
4497
  const _s = {
4463
4498
  init: function() {
4464
4499
  this.itemCount_ = 1, this.appendValueInput("VALUE").setCheck("Condition").appendField(
@@ -4533,7 +4568,7 @@ const _s = {
4533
4568
  this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setCheck("Condition");
4534
4569
  }
4535
4570
  };
4536
- g.cond_logic_v1 = _s;
4571
+ E.cond_logic_v1 = _s;
4537
4572
  s.forBlock.cond_logic_v1 = function(t) {
4538
4573
  const e = s.quote_, n = t, o = n.getFieldValue("TYPE"), i = [], a = s.valueToCode(n, "VALUE", r.ATOMIC) || null;
4539
4574
  i.push(a);
@@ -4624,7 +4659,7 @@ const fs = {
4624
4659
  }, 0);
4625
4660
  },
4626
4661
  updateShape_: function() {
4627
- this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "HANDLE")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(v.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("SelectTable").setAlign(v.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
4662
+ this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "HANDLE")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(y.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("SelectTable").setAlign(y.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
4628
4663
  },
4629
4664
  ensureBlocks_: function() {
4630
4665
  this.isInsertionMarker() || (ps(this), ds(this), Y(this, [
@@ -4633,7 +4668,7 @@ const fs = {
4633
4668
  ]), hs(this));
4634
4669
  }
4635
4670
  };
4636
- g.delete_data_v1 = fs;
4671
+ E.delete_data_v1 = fs;
4637
4672
  s.forBlock.delete_data_v1 = function(t) {
4638
4673
  const e = s.INDENT, n = s.valueToCode(t, "TABLE", r.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", r.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
4639
4674
  return `{
@@ -4802,7 +4837,7 @@ const As = {
4802
4837
  }, 0);
4803
4838
  },
4804
4839
  updateShape_: function() {
4805
- this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("EXTRA_DATA") || (this.appendValueInput("EXTRA_DATA"), this.moveInputBefore("EXTRA_DATA", "HANDLE")), this.getInput("MAIN_DATA") || (this.appendValueInput("MAIN_DATA"), this.moveInputBefore("MAIN_DATA", "EXTRA_DATA")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "MAIN_DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("EXTRA") || (this.appendValueInput("EXTRA").setCheck(["QueryExtra", "Array"]).setAlign(v.Align.RIGHT).appendField("%{BKY_DATA_EXTRA}"), this.moveInputBefore("EXTRA", "SUCCESS")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(v.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "EXTRA")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck(["SelectColumn", "Array"]).setAlign(v.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
4840
+ this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("EXTRA_DATA") || (this.appendValueInput("EXTRA_DATA"), this.moveInputBefore("EXTRA_DATA", "HANDLE")), this.getInput("MAIN_DATA") || (this.appendValueInput("MAIN_DATA"), this.moveInputBefore("MAIN_DATA", "EXTRA_DATA")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "MAIN_DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("EXTRA") || (this.appendValueInput("EXTRA").setCheck(["QueryExtra", "Array"]).setAlign(y.Align.RIGHT).appendField("%{BKY_DATA_EXTRA}"), this.moveInputBefore("EXTRA", "SUCCESS")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(y.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "EXTRA")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck(["SelectColumn", "Array"]).setAlign(y.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
4806
4841
  },
4807
4842
  ensureBlocks_: function() {
4808
4843
  this.isInsertionMarker() || (ms(this), Ts(this), Es(this), Y(this, [
@@ -4813,7 +4848,7 @@ const As = {
4813
4848
  ]), gs(this));
4814
4849
  }
4815
4850
  };
4816
- g.query_data_v1 = As;
4851
+ E.query_data_v1 = As;
4817
4852
  s.forBlock.query_data_v1 = function(t) {
4818
4853
  const e = s.INDENT, n = s.valueToCode(t, "TABLE", r.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", r.ATOMIC) || "null", i = s.valueToCode(t, "EXTRA", r.ATOMIC) || "null", a = s.statementToCode(t, "HANDLE");
4819
4854
  return `{
@@ -4891,14 +4926,14 @@ const Is = {
4891
4926
  this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
4892
4927
  }
4893
4928
  };
4894
- g.select_column_container_v1 = Is;
4929
+ E.select_column_container_v1 = Is;
4895
4930
  const Os = {
4896
4931
  init: function() {
4897
4932
  this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
4898
4933
  }
4899
4934
  };
4900
- g.select_column_item_v1 = Os;
4901
- const ys = {
4935
+ E.select_column_item_v1 = Os;
4936
+ const vs = {
4902
4937
  init: function() {
4903
4938
  this.space = {
4904
4939
  id: "",
@@ -4949,10 +4984,10 @@ const ys = {
4949
4984
  }, 0);
4950
4985
  },
4951
4986
  genSpaceOpts_: function() {
4952
- return Ce();
4987
+ return ke();
4953
4988
  },
4954
4989
  genTableOpts_: function() {
4955
- return ke(this.space.id);
4990
+ return Ne(this.space.id);
4956
4991
  },
4957
4992
  genColumnOpts_: function() {
4958
4993
  const t = [];
@@ -5071,7 +5106,7 @@ const ys = {
5071
5106
  const e = this.table.columns[t], n = new O(
5072
5107
  () => this.genColumnOpts_()
5073
5108
  ), o = new ht("");
5074
- this.appendDummyInput("ADD" + t).setAlign(v.Align.RIGHT).appendField(n, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(o, "ALIAS" + t), n.setValue(e.id, !1), o.setValue(e.name, !1);
5109
+ this.appendDummyInput("ADD" + t).setAlign(y.Align.RIGHT).appendField(n, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(o, "ALIAS" + t), n.setValue(e.id, !1), o.setValue(e.name, !1);
5075
5110
  }
5076
5111
  },
5077
5112
  updateShape_: function() {
@@ -5083,7 +5118,7 @@ const ys = {
5083
5118
  const e = new O(
5084
5119
  () => this.genColumnOpts_()
5085
5120
  ), n = new ht("");
5086
- this.appendDummyInput("ADD" + t).setAlign(v.Align.RIGHT).appendField(e, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(n, "ALIAS" + t);
5121
+ this.appendDummyInput("ADD" + t).setAlign(y.Align.RIGHT).appendField(e, "COLUMN" + t).appendField("%{BKY_DATA_AS}").appendField(n, "ALIAS" + t);
5087
5122
  const o = this.table.columns[0];
5088
5123
  e.setValue(o.id ?? "", !1), n.setValue(o.name ?? "", !1);
5089
5124
  }
@@ -5107,7 +5142,7 @@ const ys = {
5107
5142
  this.setWarningText(null);
5108
5143
  }
5109
5144
  };
5110
- g.select_column_v1 = ys;
5145
+ E.select_column_v1 = vs;
5111
5146
  s.forBlock.select_column_v1 = function(t) {
5112
5147
  const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
5113
5148
  for (let l = 0; l < n.itemCount_; l++) {
@@ -5119,7 +5154,7 @@ s.forBlock.select_column_v1 = function(t) {
5119
5154
  d !== 0 && (c += ","), c += `{name:${e(l)},alias:${e(_)}}`;
5120
5155
  }), c += "]", [`{spaceId:${e(o)},tableId:${e(i)},columns:${c}}`, r.ATOMIC];
5121
5156
  };
5122
- const vs = {
5157
+ const ys = {
5123
5158
  init: function() {
5124
5159
  this.space = {
5125
5160
  id: "",
@@ -5161,10 +5196,10 @@ const vs = {
5161
5196
  this.space.id = t.space?.id ?? "", this.space.name = t.space?.name ?? "", this.table.id = t.table?.id ?? "", this.table.name = t.table?.name ?? "", this.checkWarning_();
5162
5197
  },
5163
5198
  genSpaceOpts_: function() {
5164
- return Ce();
5199
+ return ke();
5165
5200
  },
5166
5201
  genTableOpts_: function() {
5167
- return ke(this.space.id);
5202
+ return Ne(this.space.id);
5168
5203
  },
5169
5204
  onchange: function(t) {
5170
5205
  if (t.type === b.STATE_CHANGE)
@@ -5211,7 +5246,7 @@ const vs = {
5211
5246
  e.name !== this.table.name && (this.table.name = e.name), this.setWarningText(null);
5212
5247
  }
5213
5248
  };
5214
- g.select_table_v1 = vs;
5249
+ E.select_table_v1 = ys;
5215
5250
  s.forBlock.select_table_v1 = function(t) {
5216
5251
  const e = s.quote_, n = t, o = n.space.id, i = n.table.id;
5217
5252
  return [`{spaceId:${e(o)},tableId:${e(i)}}`, r.ATOMIC];
@@ -5238,7 +5273,7 @@ const Cs = {
5238
5273
  ]);
5239
5274
  }
5240
5275
  };
5241
- g.transaction_v1 = Cs;
5276
+ E.transaction_v1 = Cs;
5242
5277
  s.forBlock.transaction_v1 = function(t) {
5243
5278
  const e = s.INDENT, n = t, o = si(n), i = s.statementToCode(n, "HANDLE"), a = s.statementToCode(n, "FINALLY");
5244
5279
  return `{
@@ -5287,13 +5322,13 @@ const ks = {
5287
5322
  this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
5288
5323
  }
5289
5324
  };
5290
- g.update_column_container_v1 = ks;
5325
+ E.update_column_container_v1 = ks;
5291
5326
  const Ns = {
5292
5327
  init: function() {
5293
5328
  this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
5294
5329
  }
5295
5330
  };
5296
- g.update_column_item_v1 = Ns;
5331
+ E.update_column_item_v1 = Ns;
5297
5332
  const Ls = {
5298
5333
  init: function() {
5299
5334
  this.space = {
@@ -5345,10 +5380,10 @@ const Ls = {
5345
5380
  }, 0);
5346
5381
  },
5347
5382
  genSpaceOpts_: function() {
5348
- return Ce();
5383
+ return ke();
5349
5384
  },
5350
5385
  genTableOpts_: function() {
5351
- return ke(this.space.id);
5386
+ return Ne(this.space.id);
5352
5387
  },
5353
5388
  genColumnOpts_: function() {
5354
5389
  const t = [];
@@ -5415,7 +5450,7 @@ const Ls = {
5415
5450
  }
5416
5451
  const o = this.getInput("ADD" + t).connection, i = o.targetBlock();
5417
5452
  i && i.dispose();
5418
- const a = je(this.workspace, n.type);
5453
+ const a = Xe(this.workspace, n.type);
5419
5454
  a && (o.setCheck(null), o.connect(a.outputConnection)), this.updateCheck_();
5420
5455
  },
5421
5456
  decompose: function(t) {
@@ -5477,7 +5512,7 @@ const Ls = {
5477
5512
  const e = this.table.columns[t], n = new O(
5478
5513
  () => this.genColumnOpts_()
5479
5514
  );
5480
- this.appendValueInput("ADD" + t).setAlign(v.Align.RIGHT).appendField(n, "COLUMN" + t), n.setValue(e.id, !1);
5515
+ this.appendValueInput("ADD" + t).setAlign(y.Align.RIGHT).appendField(n, "COLUMN" + t), n.setValue(e.id, !1);
5481
5516
  }
5482
5517
  },
5483
5518
  updateShape_: function() {
@@ -5491,7 +5526,7 @@ const Ls = {
5491
5526
  const e = new O(
5492
5527
  () => this.genColumnOpts_()
5493
5528
  );
5494
- this.appendValueInput("ADD" + t).setAlign(v.Align.RIGHT).appendField(e, "COLUMN" + t);
5529
+ this.appendValueInput("ADD" + t).setAlign(y.Align.RIGHT).appendField(e, "COLUMN" + t);
5495
5530
  }
5496
5531
  },
5497
5532
  updateBlocks_: function(t) {
@@ -5506,7 +5541,7 @@ const Ls = {
5506
5541
  if (!c)
5507
5542
  continue;
5508
5543
  n.setCheck(null);
5509
- const u = je(this.workspace, c.type);
5544
+ const u = Xe(this.workspace, c.type);
5510
5545
  u && o.connect(u.outputConnection);
5511
5546
  }
5512
5547
  },
@@ -5515,7 +5550,7 @@ const Ls = {
5515
5550
  const e = this.getFieldValue("COLUMN" + t), n = this.table.columns.find((i) => i.id === e);
5516
5551
  if (!n)
5517
5552
  continue;
5518
- const o = Xn(n.type);
5553
+ const o = jn(n.type);
5519
5554
  this.getInput("ADD" + t).setCheck(o);
5520
5555
  }
5521
5556
  },
@@ -5538,7 +5573,7 @@ const Ls = {
5538
5573
  this.setWarningText(null);
5539
5574
  }
5540
5575
  };
5541
- g.update_column_v1 = Ls;
5576
+ E.update_column_v1 = Ls;
5542
5577
  s.forBlock.update_column_v1 = function(t) {
5543
5578
  const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
5544
5579
  for (let l = 0; l < n.itemCount_; l++) {
@@ -5630,7 +5665,7 @@ const Ps = {
5630
5665
  }, 0);
5631
5666
  },
5632
5667
  updateShape_: function() {
5633
- this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("DATA") || (this.appendValueInput("DATA"), this.moveInputBefore("DATA", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(v.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(v.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
5668
+ this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_DATA_DO}"), this.getInput("DATA") || (this.appendValueInput("DATA"), this.moveInputBefore("DATA", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_DATA_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("CONDITION") || (this.appendValueInput("CONDITION").setCheck("Condition").setAlign(y.Align.RIGHT).appendField("%{BKY_DATA_CONDITION}"), this.moveInputBefore("CONDITION", "SUCCESS")), this.getInput("TABLE") || (this.appendValueInput("TABLE").setCheck("UpdateColumn").setAlign(y.Align.RIGHT).appendField("%{BKY_DATA_TABLE}"), this.moveInputBefore("TABLE", "CONDITION"));
5634
5669
  },
5635
5670
  ensureBlocks: function() {
5636
5671
  this.isInsertionMarker() || (Ss(this), Bs(this), Y(this, [
@@ -5640,7 +5675,7 @@ const Ps = {
5640
5675
  ]), bs(this));
5641
5676
  }
5642
5677
  };
5643
- g.update_data_v1 = Ps;
5678
+ E.update_data_v1 = Ps;
5644
5679
  s.forBlock.update_data_v1 = function(t) {
5645
5680
  const e = s.INDENT, n = s.valueToCode(t, "TABLE", r.ATOMIC) || "null", o = s.valueToCode(t, "CONDITION", r.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
5646
5681
  return `{
@@ -5659,7 +5694,7 @@ ${i}}
5659
5694
  };
5660
5695
  const Rs = C.xml, Ds = {
5661
5696
  init: function() {
5662
- this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(v.Align.CENTRE).appendField(
5697
+ this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" [ "), this.appendDummyInput("ADD").setAlign(y.Align.CENTRE).appendField(
5663
5698
  new ot(St, 20, 20, void 0, () => {
5664
5699
  this.isInFlyout || this.addEntry_();
5665
5700
  })
@@ -5718,7 +5753,7 @@ const Rs = C.xml, Ds = {
5718
5753
  this.length--;
5719
5754
  }
5720
5755
  };
5721
- g.json_array_v1 = Ds;
5756
+ E.json_array_v1 = Ds;
5722
5757
  const Ms = {
5723
5758
  init: function() {
5724
5759
  this.appendDummyInput().appendField(
@@ -5730,10 +5765,10 @@ const Ms = {
5730
5765
  ), this.setOutput(!0, "JsonBoolean"), this.setColour(210);
5731
5766
  }
5732
5767
  };
5733
- g.json_boolean_v1 = Ms;
5768
+ E.json_boolean_v1 = Ms;
5734
5769
  const Ln = C.xml, Us = {
5735
5770
  init: function() {
5736
- this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(v.Align.CENTRE).appendField(
5771
+ this.length = 0, this.appendDummyInput("OPEN_BRACKET").appendField(" { "), this.appendDummyInput("ADD").setAlign(y.Align.CENTRE).appendField(
5737
5772
  new ot(St, 20, 20, void 0, () => {
5738
5773
  this.isInFlyout || this.addEntry_();
5739
5774
  })
@@ -5797,37 +5832,37 @@ const Ln = C.xml, Us = {
5797
5832
  this.length--;
5798
5833
  }
5799
5834
  };
5800
- g.json_map_v1 = Us;
5835
+ E.json_map_v1 = Us;
5801
5836
  const Vs = {
5802
5837
  init: function() {
5803
- this.appendDummyInput().appendField(new $e(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
5838
+ this.appendDummyInput().appendField(new He(0), "VALUE"), this.setOutput(!0, "JsonNumber"), this.setColour(230);
5804
5839
  }
5805
5840
  };
5806
- g.json_number_v1 = Vs;
5841
+ E.json_number_v1 = Vs;
5807
5842
  const xs = {
5808
5843
  init: function() {
5809
- this.appendDummyInput().setAlign(v.Align.CENTRE).appendField("JSON"), this.appendValueInput("JSON").setCheck(["JsonMap", "JsonArray"]), this.setDeletable(!1), this.setColour(250), this.setTooltip(""), this.setHelpUrl("");
5844
+ this.appendDummyInput().setAlign(y.Align.CENTRE).appendField("JSON"), this.appendValueInput("JSON").setCheck(["JsonMap", "JsonArray"]), this.setDeletable(!1), this.setColour(250), this.setTooltip(""), this.setHelpUrl("");
5810
5845
  }
5811
5846
  };
5812
- g.json_root_v1 = xs;
5847
+ E.json_root_v1 = xs;
5813
5848
  const Ys = {
5814
5849
  init: function() {
5815
5850
  this.appendDummyInput().appendField('"').appendField(new ht(""), "VALUE").appendField('"'), this.setOutput(!0, "JsonString"), this.setColour(160);
5816
5851
  }
5817
5852
  };
5818
- g.json_string_v1 = Ys;
5853
+ E.json_string_v1 = Ys;
5819
5854
  const Fs = C.xml, ws = {
5820
5855
  init: function() {
5821
5856
  this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
5822
5857
  }
5823
5858
  };
5824
- g.list_create_container_v1 = ws;
5859
+ E.list_create_container_v1 = ws;
5825
5860
  const Ks = {
5826
5861
  init: function() {
5827
5862
  this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("list_blocks"), this.contextMenu = !1;
5828
5863
  }
5829
5864
  };
5830
- g.list_create_item_v1 = Ks;
5865
+ E.list_create_item_v1 = Ks;
5831
5866
  const $s = {
5832
5867
  init: function() {
5833
5868
  this.itemCount_ = 0, this.setMutator(
@@ -5905,12 +5940,12 @@ const $s = {
5905
5940
  "Boolean",
5906
5941
  "Array",
5907
5942
  "Object"
5908
- ]), t === 0 && this.getInput("ADD" + t).setAlign(v.Align.RIGHT).appendField("%{BKY_LIST_V1_CREATE_TITLE}"));
5943
+ ]), t === 0 && this.getInput("ADD" + t).setAlign(y.Align.RIGHT).appendField("%{BKY_LIST_V1_CREATE_TITLE}"));
5909
5944
  for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
5910
5945
  this.removeInput("ADD" + t);
5911
5946
  }
5912
5947
  };
5913
- g.list_create_v1 = $s;
5948
+ E.list_create_v1 = $s;
5914
5949
  s.forBlock.list_create_v1 = function(t) {
5915
5950
  const e = t, n = new Array(e.itemCount_);
5916
5951
  for (let i = 0; i < e.itemCount_; i++)
@@ -6575,7 +6610,7 @@ const Xs = {
6575
6610
  t.push({
6576
6611
  enabled: !0,
6577
6612
  text: f("VARIABLE_SET_CREATE_GET").replace("%1", o),
6578
- callback: Mn.callbackFactory(this, i)
6613
+ callback: Dn.callbackFactory(this, i)
6579
6614
  });
6580
6615
  }
6581
6616
  }
@@ -7567,13 +7602,13 @@ const zs = C.xml, Zs = {
7567
7602
  ), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
7568
7603
  }
7569
7604
  };
7570
- g.object_create_container_v1 = Zs;
7605
+ E.object_create_container_v1 = Zs;
7571
7606
  const ta = {
7572
7607
  init: function() {
7573
7608
  this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
7574
7609
  }
7575
7610
  };
7576
- g.object_create_item_v1 = ta;
7611
+ E.object_create_item_v1 = ta;
7577
7612
  const ea = {
7578
7613
  init: function() {
7579
7614
  this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
@@ -7643,12 +7678,12 @@ const ea = {
7643
7678
  },
7644
7679
  updateShape_: function() {
7645
7680
  for (let t = 0; t < this.itemCount_; t++)
7646
- this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setAlign(v.Align.RIGHT).appendField(new ht("key"), "KEY" + t);
7681
+ this.getInput("ADD" + t) || this.appendValueInput("ADD" + t).setAlign(y.Align.RIGHT).appendField(new ht("key"), "KEY" + t);
7647
7682
  for (let t = this.itemCount_; this.getInput("ADD" + t); t++)
7648
7683
  this.removeInput("ADD" + t);
7649
7684
  }
7650
7685
  };
7651
- g.object_create_v1 = ea;
7686
+ E.object_create_v1 = ea;
7652
7687
  s.forBlock.object_create_v1 = function(t) {
7653
7688
  const e = t;
7654
7689
  let n = "{";
@@ -7895,10 +7930,10 @@ const Sn = C.xml, na = {
7895
7930
  this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new Lo(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
7896
7931
  }
7897
7932
  };
7898
- g.procedure_def_container_v1 = na;
7933
+ E.procedure_def_container_v1 = na;
7899
7934
  const oa = {
7900
7935
  init: function() {
7901
- const t = new ht(He.DEFAULT_ARG);
7936
+ const t = new ht(Ge.DEFAULT_ARG);
7902
7937
  t.setValidator(this.validator_), this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_ITEM_TITLE}").appendField(t, "NAME"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("procedure_blocks"), this.contextMenu = !1;
7903
7938
  },
7904
7939
  validator_: function(t) {
@@ -7918,14 +7953,14 @@ const oa = {
7918
7953
  return t;
7919
7954
  }
7920
7955
  };
7921
- g.procedure_def_item_v1 = oa;
7956
+ E.procedure_def_item_v1 = oa;
7922
7957
  const ia = {
7923
7958
  init: function() {
7924
7959
  this.withReturn = !1, this.args = [];
7925
7960
  const t = new ht(
7926
- He.findLegalName("", this)
7961
+ Ge.findLegalName("", this)
7927
7962
  );
7928
- t.setValidator(He.rename), t.setSpellcheck(!1), this.appendDummyInput("DUMMY").appendField(t, "NAME"), this.appendStatementInput("HANDLE"), this.setMutator(
7963
+ t.setValidator(Ge.rename), t.setSpellcheck(!1), this.appendDummyInput("DUMMY").appendField(t, "NAME"), this.appendStatementInput("HANDLE"), this.setMutator(
7929
7964
  new Tt.MutatorIcon(
7930
7965
  ["procedure_def_item_v1"],
7931
7966
  this
@@ -8023,7 +8058,7 @@ const ia = {
8023
8058
  }
8024
8059
  }
8025
8060
  };
8026
- g.procedure_def_v1 = ia;
8061
+ E.procedure_def_v1 = ia;
8027
8062
  const sa = C.xml, aa = {
8028
8063
  init: function() {
8029
8064
  this.withReturn = !1, this.appendDummyInput("DUMMY").appendField("%{BKY_PROCEDURE_RETURN}"), this.appendValueInput("VALUE").appendField("%{BKY_PROCEDURE_RETURN}").setVisible(!1), this.setPreviousStatement(!0), this.setStyle("procedure_blocks"), this.setTooltip("%{BKY_PROCEDURE_V1_RETURN_TOOLTIP}"), this.setHelpUrl("%{BKY_PROCEDURE_V1_RETURN_HELPURL}");
@@ -8080,7 +8115,7 @@ const sa = C.xml, aa = {
8080
8115
  t.type === "procedure_def_v1" || t.type === "func_entry_v1" ? this.setWarningText(null) : this.setWarningText("the block can only be used in procedure block");
8081
8116
  }
8082
8117
  };
8083
- g.procedure_return_v1 = aa;
8118
+ E.procedure_return_v1 = aa;
8084
8119
  s.forBlock.procedure_return_v1 = function(t) {
8085
8120
  const e = t;
8086
8121
  return e.withReturn ? `return ${s.valueToCode(e, "VALUE", r.NONE) || "null"};
@@ -8100,7 +8135,7 @@ const ca = {
8100
8135
  }, 0);
8101
8136
  },
8102
8137
  updateShape_: function() {
8103
- this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_ASSET_DO}"), this.getInput("DATA") || (this.appendValueInput("DATA"), this.moveInputBefore("DATA", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_ASSET_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("ASSET") || (this.appendValueInput("ASSET").setCheck("Resource").setAlign(v.Align.RIGHT).appendField("%{BKY_ASSET_ASSET}"), this.moveInputBefore("ASSET", "SUCCESS"));
8138
+ this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_ASSET_DO}"), this.getInput("DATA") || (this.appendValueInput("DATA"), this.moveInputBefore("DATA", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "DATA")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_ASSET_RETURN}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("ASSET") || (this.appendValueInput("ASSET").setCheck("Resource").setAlign(y.Align.RIGHT).appendField("%{BKY_ASSET_ASSET}"), this.moveInputBefore("ASSET", "SUCCESS"));
8104
8139
  },
8105
8140
  ensureBlocks_: function() {
8106
8141
  this.isInsertionMarker() || Y(this, [
@@ -8110,7 +8145,7 @@ const ca = {
8110
8145
  ]);
8111
8146
  }
8112
8147
  };
8113
- g.download_resource_v1 = ca;
8148
+ E.download_resource_v1 = ca;
8114
8149
  s.forBlock.download_resource_v1 = function(t) {
8115
8150
  const e = s.valueToCode(t, "ASSET", r.ATOMIC) || null, n = s.statementToCode(t, "HANDLE");
8116
8151
  return `{
@@ -8122,8 +8157,8 @@ ${n}
8122
8157
  }
8123
8158
  `;
8124
8159
  };
8125
- function so(t) {
8126
- const e = E.resource.spaces.find((i) => i.id === t);
8160
+ function io(t) {
8161
+ const e = g.resource.spaces.find((i) => i.id === t);
8127
8162
  if (!e)
8128
8163
  return [];
8129
8164
  const n = [];
@@ -8140,12 +8175,12 @@ function so(t) {
8140
8175
  }
8141
8176
  function ra(t) {
8142
8177
  const e = [];
8143
- return so(t).forEach(({ id: o, name: i }) => {
8178
+ return io(t).forEach(({ id: o, name: i }) => {
8144
8179
  e.push([i, o]);
8145
8180
  }), k(e);
8146
8181
  }
8147
- function ao(t, e) {
8148
- const n = E.resource.spaces.find((i) => i.id === t);
8182
+ function so(t, e) {
8183
+ const n = g.resource.spaces.find((i) => i.id === t);
8149
8184
  if (!n)
8150
8185
  return [];
8151
8186
  const o = [];
@@ -8155,19 +8190,19 @@ function ao(t, e) {
8155
8190
  }
8156
8191
  function ua(t, e) {
8157
8192
  const n = [];
8158
- return ao(t, e).forEach(({ id: i, name: a }) => {
8193
+ return so(t, e).forEach(({ id: i, name: a }) => {
8159
8194
  n.push([a, i]);
8160
8195
  }), k(n);
8161
8196
  }
8162
- function co() {
8197
+ function ao() {
8163
8198
  const t = [];
8164
- return E.resource.spaces.forEach((e) => {
8199
+ return g.resource.spaces.forEach((e) => {
8165
8200
  e.resources.length > 0 && t.push(e);
8166
8201
  }), t;
8167
8202
  }
8168
8203
  function la() {
8169
8204
  const t = [];
8170
- return co().forEach(({ id: n, name: o }) => {
8205
+ return ao().forEach(({ id: n, name: o }) => {
8171
8206
  t.push([o, n]);
8172
8207
  }), k(t);
8173
8208
  }
@@ -8193,19 +8228,19 @@ const _a = {
8193
8228
  initData_: function() {
8194
8229
  if (this.space.id)
8195
8230
  return;
8196
- const t = co()?.[0];
8231
+ const t = ao()?.[0];
8197
8232
  if (!t)
8198
8233
  return;
8199
8234
  this.space.id = t.id, this.space.name = t.name;
8200
8235
  const e = this.getField("SPACE");
8201
8236
  e.getOptions(!1), e.setValue(this.space.id);
8202
- const n = so(this.space.id)?.[0];
8237
+ const n = io(this.space.id)?.[0];
8203
8238
  if (!n)
8204
8239
  return;
8205
8240
  this.dir.id = n.id, this.dir.name = n.name;
8206
8241
  const o = this.getField("DIR");
8207
8242
  o.getOptions(!1), o.setValue(this.dir.id);
8208
- const i = ao(this.space.id, this.dir.id)?.[0];
8243
+ const i = so(this.space.id, this.dir.id)?.[0];
8209
8244
  if (!i)
8210
8245
  return;
8211
8246
  this.resource.id = i.id, this.resource.name = i.name;
@@ -8220,7 +8255,7 @@ const _a = {
8220
8255
  };
8221
8256
  },
8222
8257
  loadExtraState: function(t) {
8223
- this.space = Me(t.space), this.dir = Me(t.dir), this.resource = Me(t.resource);
8258
+ this.space = Ue(t.space), this.dir = Ue(t.dir), this.resource = Ue(t.resource);
8224
8259
  },
8225
8260
  genSpaceOpts_: function() {
8226
8261
  return la();
@@ -8232,7 +8267,7 @@ const _a = {
8232
8267
  return ua(this.space.id, this.dir.id);
8233
8268
  }
8234
8269
  };
8235
- g.select_resource_v1 = _a;
8270
+ E.select_resource_v1 = _a;
8236
8271
  s.forBlock.select_resource_v1 = function() {
8237
8272
  return "";
8238
8273
  };
@@ -8251,7 +8286,7 @@ const pa = {
8251
8286
  }, 0);
8252
8287
  },
8253
8288
  updateShape_: function() {
8254
- this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_RESOURCE_DO}"), this.getInput("RESULT") || (this.appendValueInput("RESULT"), this.moveInputBefore("RESULT", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "RESULT")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_RESOURCE_RESULT}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("DATA") || (this.appendValueInput("DATA").setAlign(v.Align.RIGHT).appendField("%{BKY_RESOURCE_DATA}"), this.moveInputBefore("DATA", "SUCCESS")), this.getInput("DIR") || (this.appendValueInput("DIR").setCheck("SelectDir").setAlign(v.Align.RIGHT).appendField("%{BKY_RESOURCE_DIR}"), this.moveInputBefore("DIR", "DATA")), this.getInput("NAME") || (this.appendValueInput("NAME").setCheck("String").setAlign(v.Align.RIGHT).appendField("%{BKY_RESOURCE_NAME}"), this.moveInputBefore("NAME", "DIR"));
8289
+ this.getInput("HANDLE") || this.appendStatementInput("HANDLE").appendField("%{BKY_RESOURCE_DO}"), this.getInput("RESULT") || (this.appendValueInput("RESULT"), this.moveInputBefore("RESULT", "HANDLE")), this.getInput("MESSAGE") || (this.appendValueInput("MESSAGE"), this.moveInputBefore("MESSAGE", "RESULT")), this.getInput("SUCCESS") || (this.appendValueInput("SUCCESS").appendField("%{BKY_RESOURCE_RESULT}"), this.moveInputBefore("SUCCESS", "MESSAGE")), this.getInput("DATA") || (this.appendValueInput("DATA").setAlign(y.Align.RIGHT).appendField("%{BKY_RESOURCE_DATA}"), this.moveInputBefore("DATA", "SUCCESS")), this.getInput("DIR") || (this.appendValueInput("DIR").setCheck("SelectDir").setAlign(y.Align.RIGHT).appendField("%{BKY_RESOURCE_DIR}"), this.moveInputBefore("DIR", "DATA")), this.getInput("NAME") || (this.appendValueInput("NAME").setCheck("String").setAlign(y.Align.RIGHT).appendField("%{BKY_RESOURCE_NAME}"), this.moveInputBefore("NAME", "DIR"));
8255
8290
  },
8256
8291
  updateShadow_: function() {
8257
8292
  if (this.isInsertionMarker())
@@ -8267,7 +8302,7 @@ const pa = {
8267
8302
  ]);
8268
8303
  }
8269
8304
  };
8270
- g.upload_resource_v1 = pa;
8305
+ E.upload_resource_v1 = pa;
8271
8306
  s.forBlock.upload_resource_v1 = function(t) {
8272
8307
  const e = s.valueToCode(t, "NAME", r.ATOMIC) || "''", n = s.valueToCode(t, "DIR", r.ATOMIC) || "null", o = s.valueToCode(t, "DATA", r.ATOMIC) || "null", i = s.statementToCode(t, "HANDLE");
8273
8308
  return `{
@@ -8573,7 +8608,7 @@ const ha = C.xml, fa = {
8573
8608
  for (let t = 0; t < this.itemCount_; t++)
8574
8609
  if (!this.getInput("ADD" + t)) {
8575
8610
  const e = this.appendValueInput("ADD" + t).setAlign(
8576
- v.Align.RIGHT
8611
+ y.Align.RIGHT
8577
8612
  );
8578
8613
  t === 0 && e.appendField("%{BKY_TEXT_V1_JOIN_TITLE}");
8579
8614
  }
@@ -8829,7 +8864,7 @@ const Ta = {
8829
8864
  this.updateShape_(), this.updateShadow_();
8830
8865
  },
8831
8866
  updateShape_: function() {
8832
- this.getInput("CALLBACK") || this.appendStatementInput("CALLBACK").appendField("%{BKY_TIME_DO}"), this.getInput("IMMEDIATE") || (this.appendValueInput("IMMEDIATE").setCheck("Boolean").setAlign(v.Align.RIGHT).appendField("%{BKY_TIME_IMMEDIATE}"), this.moveInputBefore("IMMEDIATE", "CALLBACK")), this.getInput("COUNT") || (this.appendValueInput("COUNT").setCheck("Number").setAlign(v.Align.RIGHT).appendField("%{BKY_TIME_COUNT}"), this.moveInputBefore("COUNT", "IMMEDIATE")), this.getInput("LOOP") || (this.appendValueInput("LOOP").setCheck("Boolean").setAlign(v.Align.RIGHT).appendField("%{BKY_TIME_LOOP}"), this.moveInputBefore("LOOP", "COUNT")), this.getInput("INTERVAL") || (this.appendValueInput("INTERVAL").setCheck("Number").setAlign(v.Align.RIGHT).appendField("%{BKY_TIME_INTERVAL_MS}"), this.moveInputBefore("INTERVAL", "LOOP"));
8867
+ this.getInput("CALLBACK") || this.appendStatementInput("CALLBACK").appendField("%{BKY_TIME_DO}"), this.getInput("IMMEDIATE") || (this.appendValueInput("IMMEDIATE").setCheck("Boolean").setAlign(y.Align.RIGHT).appendField("%{BKY_TIME_IMMEDIATE}"), this.moveInputBefore("IMMEDIATE", "CALLBACK")), this.getInput("COUNT") || (this.appendValueInput("COUNT").setCheck("Number").setAlign(y.Align.RIGHT).appendField("%{BKY_TIME_COUNT}"), this.moveInputBefore("COUNT", "IMMEDIATE")), this.getInput("LOOP") || (this.appendValueInput("LOOP").setCheck("Boolean").setAlign(y.Align.RIGHT).appendField("%{BKY_TIME_LOOP}"), this.moveInputBefore("LOOP", "COUNT")), this.getInput("INTERVAL") || (this.appendValueInput("INTERVAL").setCheck("Number").setAlign(y.Align.RIGHT).appendField("%{BKY_TIME_INTERVAL_MS}"), this.moveInputBefore("INTERVAL", "LOOP"));
8833
8868
  },
8834
8869
  updateShadow_: function() {
8835
8870
  if (this.isInsertionMarker())
@@ -8844,7 +8879,7 @@ const Ta = {
8844
8879
  this.getInput("IMMEDIATE")?.setShadowDom(o);
8845
8880
  }
8846
8881
  };
8847
- g.create_timer_v1 = Ta;
8882
+ E.create_timer_v1 = Ta;
8848
8883
  s.forBlock.create_timer_v1 = function(t) {
8849
8884
  const e = s.valueToCode(t, "INTERVAL", r.ATOMIC) || "1000", n = s.valueToCode(t, "LOOP", r.ATOMIC) || "false", o = s.valueToCode(t, "COUNT", r.ATOMIC) || "1", i = s.valueToCode(t, "IMMEDIATE", r.ATOMIC) || "false", a = s.statementToCode(t, "CALLBACK");
8850
8885
  return `__createTimerV1__(${e}, ${n}, ${o}, ${i}, function() {
@@ -8898,7 +8933,7 @@ const Ea = {
8898
8933
  t.push({
8899
8934
  enabled: this.workspace.remainingCapacity() > 0,
8900
8935
  text: n.replace("%1", o.getText()),
8901
- callback: Mn.callbackFactory(this, i)
8936
+ callback: Dn.callbackFactory(this, i)
8902
8937
  });
8903
8938
  }
8904
8939
  }
@@ -8971,14 +9006,14 @@ s.forBlock.variable_set_v1 = function(t) {
8971
9006
  return `${e} = ${n};
8972
9007
  `;
8973
9008
  };
8974
- Un.setConfirm(async (t, e) => {
9009
+ Mn.setConfirm(async (t, e) => {
8975
9010
  const n = await Go({
8976
9011
  title: "",
8977
9012
  text: t
8978
9013
  });
8979
9014
  e(!!n);
8980
9015
  });
8981
- Un.setPrompt(async (t, e, n) => {
9016
+ Mn.setPrompt(async (t, e, n) => {
8982
9017
  const o = await Wo({
8983
9018
  title: "",
8984
9019
  value: e
@@ -8997,7 +9032,7 @@ const Oa = Qt.getText_;
8997
9032
  Qt.getText_ = function() {
8998
9033
  if (this.selectedOption)
8999
9034
  return Oa.call(this);
9000
- const { i18n: t } = vt, e = this.getSourceBlock();
9035
+ const { i18n: t } = yt, e = this.getSourceBlock();
9001
9036
  if (this.name === "APP")
9002
9037
  return e.app.name;
9003
9038
  if (this.name === "PAGE")
@@ -9012,7 +9047,7 @@ Qt.getText_ = function() {
9012
9047
  }
9013
9048
  } else if (this.name === "PROPERTY") {
9014
9049
  const { kind: n, names: o } = e.property;
9015
- return wn(n, o);
9050
+ return Fn(n, o);
9016
9051
  } else if (this.name === "EVENT") {
9017
9052
  const { kind: n, names: o } = e.event;
9018
9053
  return console.log(e.event), Ie(n, o);
@@ -9061,24 +9096,24 @@ So.prototype.cleanUp = function() {
9061
9096
  }
9062
9097
  I.setGroup(t), this.setResizesEnabled(!0);
9063
9098
  };
9064
- function ro(t) {
9099
+ function co(t) {
9065
9100
  const e = t.getParent();
9066
- return e && ro(e) ? !0 : !e && !!(t.outputConnection || t.previousConnection);
9101
+ return e && co(e) ? !0 : !e && !!(t.outputConnection || t.previousConnection);
9067
9102
  }
9068
- class ya {
9103
+ class va {
9069
9104
  init() {
9070
9105
  const e = Bo.registry.getItem("blockDisable");
9071
9106
  e && (e.preconditionFn = function(n) {
9072
9107
  const o = n.block;
9073
- return o && !o.isInFlyout && o.workspace.options.disable && o.isEditable() ? o.getInheritedDisabled() || ro(o) ? "disabled" : "enabled" : "hidden";
9108
+ return o && !o.isInFlyout && o.workspace.options.disable && o.isEditable() ? o.getInheritedDisabled() || co(o) ? "disabled" : "enabled" : "hidden";
9074
9109
  });
9075
9110
  }
9076
9111
  }
9077
9112
  bo.registerFieldColour();
9078
9113
  Po.registry.unregister(Ro.names.ESCAPE);
9079
- const va = new Do.CrossTabCopyPaste();
9080
- va.init({ contextMenu: !0, shortcut: !0 });
9081
- const Ca = new ya();
9114
+ const ya = new Do.CrossTabCopyPaste();
9115
+ ya.init({ contextMenu: !0, shortcut: !0 });
9116
+ const Ca = new va();
9082
9117
  Ca.init();
9083
9118
  function un(t) {
9084
9119
  const e = Wt();
@@ -9093,7 +9128,7 @@ function un(t) {
9093
9128
  const i = o.getRelativeToSurfaceXY(), a = i.x * e.scale, c = i.y * e.scale;
9094
9129
  e.scroll(-a, -c);
9095
9130
  }
9096
- function uo() {
9131
+ function ro() {
9097
9132
  const t = Wt();
9098
9133
  if (!t)
9099
9134
  return;
@@ -9251,7 +9286,7 @@ Ae.Classic.categoryStyles = {
9251
9286
  colour: "#a55b80"
9252
9287
  }
9253
9288
  };
9254
- const ka = Vn.defineTheme("light", {
9289
+ const ka = Un.defineTheme("light", {
9255
9290
  name: "light",
9256
9291
  base: Ae.Classic,
9257
9292
  componentStyles: {
@@ -9267,7 +9302,7 @@ const ka = Vn.defineTheme("light", {
9267
9302
  scrollbarOpacity: 0.4,
9268
9303
  cursorColour: ""
9269
9304
  }
9270
- }), Na = Vn.defineTheme("dark", {
9305
+ }), Na = Un.defineTheme("dark", {
9271
9306
  name: "dark",
9272
9307
  base: Ae.Classic,
9273
9308
  componentStyles: {
@@ -9295,7 +9330,7 @@ function La(t) {
9295
9330
  break;
9296
9331
  }
9297
9332
  }
9298
- const Ze = ["get_app_property_v1", "get_app_state_v1"];
9333
+ const tn = ["get_app_property_v1", "get_app_state_v1"];
9299
9334
  function ut(t, e) {
9300
9335
  return t.find((o) => o === e) !== void 0 ? !1 : (t.push(e), !0);
9301
9336
  }
@@ -9303,7 +9338,7 @@ function Sa(t) {
9303
9338
  const e = [];
9304
9339
  function n(o) {
9305
9340
  for (const i of o.getChildren(!0))
9306
- Ze.includes(i.type) && e.push(i), n(i);
9341
+ tn.includes(i.type) && e.push(i), n(i);
9307
9342
  }
9308
9343
  return n(t), e;
9309
9344
  }
@@ -9326,11 +9361,11 @@ function Ba(t) {
9326
9361
  function ba(t) {
9327
9362
  const e = [];
9328
9363
  for (const n of t.getChildren(!0))
9329
- if (Ze.includes(n.type))
9364
+ if (tn.includes(n.type))
9330
9365
  e.push(n);
9331
9366
  else if (n.type === "object_get_v1") {
9332
9367
  const o = n.getInputTargetBlock("OBJECT");
9333
- o && Ze.includes(o.type) && e.push(n);
9368
+ o && tn.includes(o.type) && e.push(n);
9334
9369
  }
9335
9370
  return e;
9336
9371
  }
@@ -9423,12 +9458,12 @@ function Ra(t) {
9423
9458
  }
9424
9459
  return e;
9425
9460
  }
9426
- const lo = Symbol();
9461
+ const uo = Symbol();
9427
9462
  function Da(t) {
9428
- qo(lo, t);
9463
+ qo(uo, t);
9429
9464
  }
9430
9465
  function ln() {
9431
- return Qo(lo);
9466
+ return Qo(uo);
9432
9467
  }
9433
9468
  const Ma = /* @__PURE__ */ ct({
9434
9469
  __name: "index",
@@ -9442,7 +9477,7 @@ const Ma = /* @__PURE__ */ ct({
9442
9477
  return;
9443
9478
  }
9444
9479
  if (o.lock) {
9445
- Yn(n("x-block-lib.msg.cannotOperateInLockedState"));
9480
+ xn(n("x-block-lib.msg.cannotOperateInLockedState"));
9446
9481
  return;
9447
9482
  }
9448
9483
  i.workspace.cleanUp();
@@ -9556,7 +9591,7 @@ const Ma = /* @__PURE__ */ ct({
9556
9591
  class: "text-caption text-grey"
9557
9592
  }, Ka = /* @__PURE__ */ ct({
9558
9593
  __name: "index",
9559
- props: /* @__PURE__ */ Ge({
9594
+ props: /* @__PURE__ */ We({
9560
9595
  lock: { type: Boolean }
9561
9596
  }, {
9562
9597
  modelValue: { type: Boolean, required: !0 },
@@ -9590,7 +9625,7 @@ const Ma = /* @__PURE__ */ ct({
9590
9625
  let u = [];
9591
9626
  const l = () => {
9592
9627
  if (t.lock) {
9593
- Yn(n("x-block-lib.msg.cannotOperateInLockedState"));
9628
+ xn(n("x-block-lib.msg.cannotOperateInLockedState"));
9594
9629
  return;
9595
9630
  }
9596
9631
  const p = [];
@@ -9622,14 +9657,14 @@ const Ma = /* @__PURE__ */ ct({
9622
9657
  P
9623
9658
  ).getRelativeToSurfaceXY().y + 10);
9624
9659
  const At = A.getRelativeToSurfaceXY();
9625
- A.moveTo(new C.Coordinate(At.x, U)), i.workspace.cleanUp(), uo();
9660
+ A.moveTo(new C.Coordinate(At.x, U)), i.workspace.cleanUp(), ro();
9626
9661
  }, h = async (p) => {
9627
9662
  if (!i.workspace) {
9628
9663
  console.assert(!1);
9629
9664
  return;
9630
9665
  }
9631
9666
  const m = i.workspace.getBlockById(p);
9632
- xn.setSelected(m), un(p), o.value = !1;
9667
+ Vn.setSelected(m), un(p), o.value = !1;
9633
9668
  };
9634
9669
  return (p, m) => a.value.length > 0 ? (S(), st(R(Mo), {
9635
9670
  key: 0,
@@ -9643,7 +9678,7 @@ const Ma = /* @__PURE__ */ ct({
9643
9678
  onStart: l
9644
9679
  }, {
9645
9680
  default: at(() => [
9646
- (S(!0), Z($n, null, ti(a.value, (A) => (S(), st(Fa, {
9681
+ (S(!0), Z(Kn, null, ti(a.value, (A) => (S(), st(Fa, {
9647
9682
  id: A.id,
9648
9683
  key: A.id,
9649
9684
  desc: A.desc,
@@ -9682,7 +9717,7 @@ const Ma = /* @__PURE__ */ ct({
9682
9717
  return;
9683
9718
  }
9684
9719
  const l = u.getBlockById(c);
9685
- xn.setSelected(l), un(c), n.value = !1;
9720
+ Vn.setSelected(l), un(c), n.value = !1;
9686
9721
  };
9687
9722
  return (c, u) => (S(), Z("div", {
9688
9723
  onClick: u[0] || (u[0] = (l) => a(""))
@@ -9695,7 +9730,7 @@ const Ma = /* @__PURE__ */ ct({
9695
9730
  lock: { type: Boolean }
9696
9731
  },
9697
9732
  setup(t, { expose: e }) {
9698
- const { t: n } = Xt(), o = ii(), { sysBarAvail: i } = Fn(), { backgroundColor1: a } = jt(), c = F(() => {
9733
+ const { t: n } = Xt(), o = ii(), { sysBarAvail: i } = Yn(), { backgroundColor1: a } = jt(), c = F(() => {
9699
9734
  let m = "100%";
9700
9735
  return o.mdAndUp.value && (m = "400px"), {
9701
9736
  background: a.value,
@@ -9710,7 +9745,7 @@ const Ma = /* @__PURE__ */ ct({
9710
9745
  };
9711
9746
  }), l = F(() => ({
9712
9747
  height: "60px"
9713
- })), { open: _ } = tn(`blocklyNavigatorDlg${We()}`);
9748
+ })), { open: _ } = en(`blocklyNavigatorDlg${je()}`);
9714
9749
  ei(() => {
9715
9750
  _.value = !1;
9716
9751
  });
@@ -9719,7 +9754,7 @@ const Ma = /* @__PURE__ */ ct({
9719
9754
  t.type === "list" ? d.value?.update() : t.type === "tree" && h.value?.update();
9720
9755
  } }), (m, A) => {
9721
9756
  const P = D("v-sheet"), U = D("v-btn"), At = D("v-spacer"), nt = D("v-dialog"), Ct = D("v-tooltip");
9722
- return S(), Z($n, null, [
9757
+ return S(), Z(Kn, null, [
9723
9758
  L(nt, {
9724
9759
  modelValue: R(_),
9725
9760
  "onUpdate:modelValue": A[5] || (A[5] = (G) => ne(_) ? _.value = G : null),
@@ -9728,7 +9763,7 @@ const Ma = /* @__PURE__ */ ct({
9728
9763
  "no-click-animation": "",
9729
9764
  persistent: "",
9730
9765
  transition: "scroll-x-reverse-transition",
9731
- onKeydown: A[6] || (A[6] = Hn(Ft((G) => _.value = !1, ["stop", "prevent"]), ["esc"]))
9766
+ onKeydown: A[6] || (A[6] = $n(Ft((G) => _.value = !1, ["stop", "prevent"]), ["esc"]))
9732
9767
  }, {
9733
9768
  default: at(() => [
9734
9769
  w("div", {
@@ -9810,14 +9845,14 @@ function V(t) {
9810
9845
  const e = x.createElement("label");
9811
9846
  return e.setAttribute("text", t), e;
9812
9847
  }
9813
- function y(t, e) {
9848
+ function v(t, e) {
9814
9849
  const n = x.createElement("block");
9815
9850
  if (n.setAttribute("type", t), e)
9816
9851
  for (const o of e)
9817
9852
  n.appendChild(o);
9818
9853
  return n;
9819
9854
  }
9820
- function _o(t) {
9855
+ function lo(t) {
9821
9856
  const e = x.createElement("mutation");
9822
9857
  for (const { key: n, value: o } of t)
9823
9858
  e.setAttribute(n, o);
@@ -9857,61 +9892,75 @@ function Xa(t, e) {
9857
9892
  return i.appendChild(a), o.appendChild(i), n.appendChild(o), n;
9858
9893
  }
9859
9894
  function Ja() {
9860
- return E.app.activeObject.type === "comp" && E.app.activeComp.meta.events.length > 0;
9895
+ const { activeObject: t, activeComp: e } = g.app;
9896
+ return !(t.type !== "comp" || e.meta.events.length <= 0);
9861
9897
  }
9862
9898
  function qa() {
9863
- return E.app.activeObject.type === "comp" && E.app.activeComp.meta.states.length > 0;
9899
+ const { activeObject: t, activeComp: e } = g.app;
9900
+ return !(t.type !== "comp" || e.meta.states.length <= 0);
9864
9901
  }
9865
9902
  function Pn() {
9866
- return E.app.activeObject.type === "comp" && E.app.activeComp.meta.methods.length > 0;
9903
+ const { activeObject: t, activeComp: e } = g.app;
9904
+ return !(t.type !== "comp" || e.meta.methods.length <= 0);
9867
9905
  }
9868
9906
  function Qa() {
9869
- const t = [];
9870
- return t.push(V(f("LABEL_EVENT"))), j("onEvent") && t.push(y("on_app_event_v1")), Ja() && t.push(y("trigger_app_event_v1")), t.push(
9871
- y("app_bind_v1", [_o([{ key: "items", value: "2" }])])
9872
- ), t.push(y("watch_effect_v1")), (j("getProperty") || j("setProperty")) && t.push(V(f("LABEL_PROPERTY"))), j("getProperty") && t.push(y("get_app_property_v1")), j("setProperty") && t.push(y("set_app_property_v1")), qa() && (t.push(V(f("LABEL_STATE"))), t.push(y("get_app_state_v1")), t.push(y("set_app_state_v1"))), (j("callMethod") || Pn()) && t.push(V(f("LABEL_METHOD"))), j("callMethod") && t.push(y("call_app_method_v1")), Pn() && (t.push(y("impl_app_method_v1")), t.push(y("set_app_method_output_v1")), t.push(y("procedure_return_v1"))), t;
9907
+ const { activeObject: t, activeComp: e } = g.app;
9908
+ if (t.type !== "comp")
9909
+ return !1;
9910
+ for (const { outputs: n } of e.meta.methods)
9911
+ if (n.length > 0)
9912
+ return !0;
9913
+ return !1;
9873
9914
  }
9874
- const po = { name: "APP_COMP_CATEGORY", callback: Qa };
9875
9915
  function za() {
9876
9916
  const t = [];
9877
- return t.push(V(f("LABEL_FUNC"))), t.push(V(f("LABEL_FLOW"))), t;
9917
+ return t.push(V(f("LABEL_EVENT"))), j("onEvent") && t.push(v("on_app_event_v1")), Ja() && t.push(v("trigger_app_event_v1")), t.push(
9918
+ v("app_bind_v1", [lo([{ key: "items", value: "2" }])])
9919
+ ), t.push(v("watch_effect_v1")), (j("getProperty") || j("setProperty")) && t.push(V(f("LABEL_PROPERTY"))), j("getProperty") && t.push(v("get_app_property_v1")), j("setProperty") && t.push(v("set_app_property_v1")), qa() && (t.push(V(f("LABEL_STATE"))), t.push(v("get_app_state_v1")), t.push(v("set_app_state_v1"))), (j("callMethod") || Pn()) && t.push(V(f("LABEL_METHOD"))), j("callMethod") && t.push(v("call_app_method_v1")), Pn() && (t.push(v("impl_app_method_v1")), Qa() && t.push(v("set_app_method_output_v1")), t.push(v("procedure_return_v1"))), t;
9878
9920
  }
9879
- const pe = { name: "APP_COMPUTE_CATEGORY", callback: za };
9921
+ const _o = { name: "APP_COMP_CATEGORY", callback: za };
9880
9922
  function Za() {
9881
9923
  const t = [];
9882
- return t.push(y("app_debug_trace_v1", [bt("OBJECT")])), t.push(y("popup_message_v1", [bt("TEXT")])), t.push(y("open_confirm_dlg_v1")), t.push(y("open_prompt_dlg_v1")), t;
9924
+ return t.push(V(f("LABEL_FUNC"))), t.push(V(f("LABEL_FLOW"))), t;
9883
9925
  }
9884
- const de = { name: "APP_MESSAGE_CATEGORY", callback: Za };
9926
+ const pe = { name: "APP_COMPUTE_CATEGORY", callback: Za };
9885
9927
  function tc() {
9886
- for (const t of E.app.appList)
9928
+ const t = [];
9929
+ return t.push(v("app_debug_trace_v1", [bt("OBJECT")])), t.push(v("popup_message_v1", [bt("TEXT")])), t.push(v("open_confirm_dlg_v1")), t.push(v("open_prompt_dlg_v1")), t;
9930
+ }
9931
+ const de = { name: "APP_MESSAGE_CATEGORY", callback: tc };
9932
+ function ec() {
9933
+ for (const t of g.app.appList)
9887
9934
  if (t.pages.length > 0)
9888
9935
  return !0;
9889
9936
  return !1;
9890
9937
  }
9891
- function ec() {
9892
- const t = [];
9893
- return t.push(y("app_env_is_v1")), tc() && t.push(y("navigate_to_v1")), t;
9894
- }
9895
- const he = { name: "APP_MISC_CATEGORY", callback: ec };
9896
9938
  function nc() {
9897
- return E.app.activeObject.type === "page" && E.app.activePage.meta.states.length > 0;
9939
+ const t = [];
9940
+ return t.push(v("app_env_is_v1")), ec() && t.push(v("navigate_to_v1")), t;
9898
9941
  }
9942
+ const he = { name: "APP_MISC_CATEGORY", callback: nc };
9899
9943
  function oc() {
9900
- return E.app.activeObject.type === "page" && E.app.activePage.meta.arguments.length > 0;
9944
+ const { activeObject: t, activePage: e } = g.app;
9945
+ return !(t.type !== "page" || e.meta.states.length <= 0);
9901
9946
  }
9902
9947
  function ic() {
9903
- const t = [];
9904
- return t.push(V(f("LABEL_EVENT"))), j("onEvent") && t.push(y("on_app_event_v1")), t.push(
9905
- y("app_bind_v1", [_o([{ key: "items", value: "2" }])])
9906
- ), t.push(y("watch_effect_v1")), (j("getProperty") || j("setProperty")) && t.push(V(f("LABEL_PROPERTY"))), j("getProperty") && t.push(y("get_app_property_v1")), j("setProperty") && t.push(y("set_app_property_v1")), nc() && (t.push(V(f("LABEL_STATE"))), t.push(y("get_app_state_v1")), t.push(y("set_app_state_v1"))), j("callMethod") && (t.push(V(f("LABEL_METHOD"))), t.push(y("call_app_method_v1"))), oc() && (t.push(V(f("LABEL_ARGUMENT"))), t.push(y("get_page_argument_v1"))), t;
9948
+ const { activeObject: t, activePage: e } = g.app;
9949
+ return !(t.type !== "page" || e.meta.arguments.length <= 0);
9907
9950
  }
9908
- const ho = { name: "APP_PAGE_CATEGORY", callback: ic };
9909
9951
  function sc() {
9910
9952
  const t = [];
9911
- return t.push(V(f("LABEL_RESOURCE"))), t.push(y("upload_resource_v1")), t;
9953
+ return t.push(V(f("LABEL_EVENT"))), j("onEvent") && t.push(v("on_app_event_v1")), t.push(
9954
+ v("app_bind_v1", [lo([{ key: "items", value: "2" }])])
9955
+ ), t.push(v("watch_effect_v1")), (j("getProperty") || j("setProperty")) && t.push(V(f("LABEL_PROPERTY"))), j("getProperty") && t.push(v("get_app_property_v1")), j("setProperty") && t.push(v("set_app_property_v1")), oc() && (t.push(V(f("LABEL_STATE"))), t.push(v("get_app_state_v1")), t.push(v("set_app_state_v1"))), j("callMethod") && (t.push(V(f("LABEL_METHOD"))), t.push(v("call_app_method_v1"))), ic() && (t.push(V(f("LABEL_ARGUMENT"))), t.push(v("get_page_argument_v1"))), t;
9912
9956
  }
9913
- const fe = { name: "APP_RESOURCE_CATEGORY", callback: sc }, xt = C.xml;
9957
+ const po = { name: "APP_PAGE_CATEGORY", callback: sc };
9914
9958
  function ac() {
9959
+ const t = [];
9960
+ return t.push(V(f("LABEL_RESOURCE"))), t.push(v("upload_resource_v1")), t;
9961
+ }
9962
+ const fe = { name: "APP_RESOURCE_CATEGORY", callback: ac }, xt = C.xml;
9963
+ function cc() {
9915
9964
  const t = [];
9916
9965
  {
9917
9966
  const e = xt.createElement("label");
@@ -9936,9 +9985,9 @@ function ac() {
9936
9985
  }
9937
9986
  const lt = {
9938
9987
  name: "PROCEDURE_CATEGORY",
9939
- callback: ac
9988
+ callback: cc
9940
9989
  }, te = C.xml;
9941
- function cc() {
9990
+ function rc() {
9942
9991
  const t = Wt(), e = [];
9943
9992
  {
9944
9993
  const o = te.createElement("label");
@@ -9976,20 +10025,20 @@ function cc() {
9976
10025
  }
9977
10026
  const _t = {
9978
10027
  name: "VARIABLE_CATEGORY",
9979
- callback: cc
10028
+ callback: rc
9980
10029
  };
9981
- function rc() {
10030
+ function uc() {
9982
10031
  const t = [];
9983
10032
  if (et().length > 0)
9984
- t.push(V(f("LABEL_OPERATION"))), t.push(y("add_data_v1")), t.push(y("delete_data_v1")), t.push(y("update_data_v1")), t.push(y("query_data_v1")), t.push(y("transaction_v1")), t.push(
9985
- y("interrupt_transaction_v1", [bt("VALUE")])
9986
- ), t.push(V(f("LABEL_CONDITION"))), t.push(y("cond_logic_v1")), t.push(y("cond_atomic_v1", [bt("VALUE")])), t.push(V(f("LABEL_QUERY_EXTRA"))), t.push(
9987
- y("query_extra_limit_v1", [
10033
+ t.push(V(f("LABEL_OPERATION"))), t.push(v("add_data_v1")), t.push(v("delete_data_v1")), t.push(v("update_data_v1")), t.push(v("query_data_v1")), t.push(v("transaction_v1")), t.push(
10034
+ v("interrupt_transaction_v1", [bt("VALUE")])
10035
+ ), t.push(V(f("LABEL_CONDITION"))), t.push(v("cond_logic_v1")), t.push(v("cond_atomic_v1", [bt("VALUE")])), t.push(V(f("LABEL_QUERY_EXTRA"))), t.push(
10036
+ v("query_extra_limit_v1", [
9988
10037
  bn("OFFSET", 0),
9989
10038
  bn("LIMIT", 1)
9990
10039
  ])
9991
10040
  ), t.push(
9992
- y("query_extra_sortby_v1", [
10041
+ v("query_extra_sortby_v1", [
9993
10042
  bt("COLUMN"),
9994
10043
  Xa("DESC")
9995
10044
  ])
@@ -10000,30 +10049,30 @@ function rc() {
10000
10049
  }
10001
10050
  return t;
10002
10051
  }
10003
- const me = { name: "COMPUTE_DATA_CATEGORY", callback: rc };
10004
- function uc() {
10052
+ const me = { name: "COMPUTE_DATA_CATEGORY", callback: uc };
10053
+ function lc() {
10005
10054
  return qt("flow").length > 0;
10006
10055
  }
10007
- function lc() {
10056
+ function _c() {
10008
10057
  const t = [];
10009
- return E.compute.activeObject.type === "flow" && t.push(y("on_flow_state_event_v1")), uc() && console.assert(!0), t;
10058
+ return g.compute.activeObject.type === "flow" && t.push(v("on_flow_state_event_v1")), lc() && console.assert(!0), t;
10010
10059
  }
10011
- const Te = { name: "COMPUTE_FLOW_CATEGORY", callback: lc };
10012
- function _c() {
10060
+ const Te = { name: "COMPUTE_FLOW_CATEGORY", callback: _c };
10061
+ function pc() {
10013
10062
  return qt("func").length > 0;
10014
10063
  }
10015
- function pc() {
10064
+ function dc() {
10016
10065
  const t = [];
10017
- return E.compute.activeObject.type === "func" && (t.push(y("func_entry_v1")), E.compute.activeFunc.outputs.length > 0 && t.push(y("set_func_output_v1")), t.push(y("procedure_return_v1"))), _c() && t.push(y("call_func_internal_v1")), t;
10066
+ return g.compute.activeObject.type === "func" && (t.push(v("func_entry_v1")), g.compute.activeFunc.outputs.length > 0 && t.push(v("set_func_output_v1")), t.push(v("procedure_return_v1"))), pc() && t.push(v("call_func_internal_v1")), t;
10018
10067
  }
10019
- const Ee = { name: "COMPUTE_FUNC_CATEGORY", callback: pc };
10020
- function dc() {
10068
+ const Ee = { name: "COMPUTE_FUNC_CATEGORY", callback: dc };
10069
+ function hc() {
10021
10070
  const t = [];
10022
10071
  return t.push(
10023
- y("compute_debug_trace_v1", [bt("OBJECT")])
10072
+ v("compute_debug_trace_v1", [bt("OBJECT")])
10024
10073
  ), t;
10025
10074
  }
10026
- const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
10075
+ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Le = {
10027
10076
  kind: "category",
10028
10077
  name: "%{BKY_CATEGORY_COLOR}",
10029
10078
  categorystyle: "color_category",
@@ -10097,7 +10146,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
10097
10146
  }
10098
10147
  }
10099
10148
  ]
10100
- }, Le = {
10149
+ }, Se = {
10101
10150
  kind: "category",
10102
10151
  name: "%{BKY_CATEGORY_LIST}",
10103
10152
  categorystyle: "list_category",
@@ -10212,7 +10261,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
10212
10261
  type: "list_reverse_v1"
10213
10262
  }
10214
10263
  ]
10215
- }, Se = {
10264
+ }, Be = {
10216
10265
  kind: "category",
10217
10266
  name: "%{BKY_CATEGORY_LOGIC}",
10218
10267
  categorystyle: "logic_category",
@@ -10254,7 +10303,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
10254
10303
  type: "logic_ternary_v1"
10255
10304
  }
10256
10305
  ]
10257
- }, Be = {
10306
+ }, be = {
10258
10307
  kind: "category",
10259
10308
  name: "%{BKY_CATEGORY_LOOP}",
10260
10309
  categorystyle: "loop_category",
@@ -10316,7 +10365,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
10316
10365
  type: "flow_control_v1"
10317
10366
  }
10318
10367
  ]
10319
- }, be = {
10368
+ }, Pe = {
10320
10369
  kind: "category",
10321
10370
  name: "%{BKY_CATEGORY_MATH}",
10322
10371
  categorystyle: "math_category",
@@ -10471,7 +10520,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
10471
10520
  type: "math_on_list_v1"
10472
10521
  }
10473
10522
  ]
10474
- }, Pe = {
10523
+ }, Re = {
10475
10524
  kind: "category",
10476
10525
  name: "%{BKY_CATEGORY_OBJECT}",
10477
10526
  categorystyle: "object_category",
@@ -10539,7 +10588,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
10539
10588
  }
10540
10589
  }
10541
10590
  ]
10542
- }, Re = {
10591
+ }, De = {
10543
10592
  kind: "category",
10544
10593
  name: "%{BKY_CATEGORY_TEXT}",
10545
10594
  categorystyle: "text_category",
@@ -10702,7 +10751,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
10702
10751
  type: "text_reverse_v1"
10703
10752
  }
10704
10753
  ]
10705
- }, fo = {
10754
+ }, ho = {
10706
10755
  kind: "category",
10707
10756
  name: "%{BKY_CATEGORY_TIME}",
10708
10757
  categorystyle: "time_category",
@@ -10726,14 +10775,14 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
10726
10775
  }
10727
10776
  }
10728
10777
  ]
10729
- }, hc = {
10778
+ }, fc = {
10730
10779
  kind: "categoryToolbox",
10731
10780
  contents: [
10732
10781
  {
10733
10782
  kind: "category",
10734
10783
  name: "%{BKY_CATEGORY_COMP}",
10735
10784
  categorystyle: "misc_category",
10736
- custom: po.name
10785
+ custom: _o.name
10737
10786
  },
10738
10787
  {
10739
10788
  kind: "category",
@@ -10747,14 +10796,14 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
10747
10796
  categorystyle: "misc_category",
10748
10797
  custom: he.name
10749
10798
  },
10799
+ be,
10750
10800
  Be,
10801
+ Pe,
10802
+ De,
10751
10803
  Se,
10752
- be,
10753
10804
  Re,
10754
10805
  Le,
10755
- Pe,
10756
- Ne,
10757
- fo,
10806
+ ho,
10758
10807
  {
10759
10808
  kind: "category",
10760
10809
  name: "%{BKY_CATEGORY_VARIABLE}",
@@ -10780,7 +10829,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
10780
10829
  custom: pe.name
10781
10830
  }
10782
10831
  ]
10783
- }, fc = {
10832
+ }, mc = {
10784
10833
  kind: "categoryToolbox",
10785
10834
  contents: [
10786
10835
  {
@@ -10807,13 +10856,13 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
10807
10856
  categorystyle: "misc_category",
10808
10857
  custom: ge.name
10809
10858
  },
10859
+ be,
10810
10860
  Be,
10861
+ Pe,
10862
+ De,
10811
10863
  Se,
10812
- be,
10813
10864
  Re,
10814
10865
  Le,
10815
- Pe,
10816
- Ne,
10817
10866
  {
10818
10867
  kind: "category",
10819
10868
  name: "%{BKY_CATEGORY_VARIABLE}",
@@ -10827,7 +10876,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
10827
10876
  custom: lt.name
10828
10877
  }
10829
10878
  ]
10830
- }, mc = {
10879
+ }, Tc = {
10831
10880
  kind: "categoryToolbox",
10832
10881
  contents: [
10833
10882
  {
@@ -10854,13 +10903,13 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
10854
10903
  categorystyle: "misc_category",
10855
10904
  custom: ge.name
10856
10905
  },
10906
+ be,
10857
10907
  Be,
10908
+ Pe,
10909
+ De,
10858
10910
  Se,
10859
- be,
10860
10911
  Re,
10861
10912
  Le,
10862
- Pe,
10863
- Ne,
10864
10913
  {
10865
10914
  kind: "category",
10866
10915
  name: "%{BKY_CATEGORY_VARIABLE}",
@@ -10874,7 +10923,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
10874
10923
  custom: lt.name
10875
10924
  }
10876
10925
  ]
10877
- }, Tc = {
10926
+ }, Ec = {
10878
10927
  kind: "categoryToolbox",
10879
10928
  contents: [
10880
10929
  {
@@ -10905,14 +10954,14 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
10905
10954
  ]
10906
10955
  }
10907
10956
  ]
10908
- }, Ec = {
10957
+ }, gc = {
10909
10958
  kind: "categoryToolbox",
10910
10959
  contents: [
10911
10960
  {
10912
10961
  kind: "category",
10913
10962
  name: "%{BKY_CATEGORY_PAGE}",
10914
10963
  categorystyle: "misc_category",
10915
- custom: ho.name
10964
+ custom: po.name
10916
10965
  },
10917
10966
  {
10918
10967
  kind: "category",
@@ -10926,14 +10975,14 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
10926
10975
  categorystyle: "misc_category",
10927
10976
  custom: he.name
10928
10977
  },
10978
+ be,
10929
10979
  Be,
10980
+ Pe,
10981
+ De,
10930
10982
  Se,
10931
- be,
10932
10983
  Re,
10933
10984
  Le,
10934
- Pe,
10935
- Ne,
10936
- fo,
10985
+ ho,
10937
10986
  {
10938
10987
  kind: "category",
10939
10988
  name: "%{BKY_CATEGORY_VARIABLE}",
@@ -10959,7 +11008,7 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
10959
11008
  custom: pe.name
10960
11009
  }
10961
11010
  ]
10962
- }, Ke = {
11011
+ }, $e = {
10963
11012
  grid: {
10964
11013
  length: 2,
10965
11014
  snap: !0,
@@ -10985,23 +11034,23 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: dc }, Ne = {
10985
11034
  wheel: !0
10986
11035
  }
10987
11036
  };
10988
- function gc(t, e, n, o) {
10989
- Ke.theme = o ? "dark" : "light", Ke.toolbox = Ac(e, n);
10990
- const i = Vo(t, Ke);
10991
- return i.addChangeListener(xo.shadowBlockConversionChangeListener), Ic(i, e, n), Oc(i), i;
11037
+ function Ac(t, e, n, o) {
11038
+ $e.theme = o ? "dark" : "light", $e.toolbox = Ic(e, n);
11039
+ const i = Vo(t, $e);
11040
+ return i.addChangeListener(xo.shadowBlockConversionChangeListener), Oc(i, e, n), vc(i), i;
10992
11041
  }
10993
- function Ac(t, e) {
11042
+ function Ic(t, e) {
10994
11043
  let n;
10995
- return t === "page" ? e === "v1" && (n = Ec) : t === "comp" ? e === "v1" && (n = hc) : t === "func" ? e === "v1" && (n = mc) : t === "flow" ? e === "v1" && (n = fc) : t === "json" && e === "v1" && (n = Tc), console.assert(!!n, `invalid toolbox type=${t} version=${e}`), n;
11044
+ return t === "page" ? e === "v1" && (n = gc) : t === "comp" ? e === "v1" && (n = fc) : t === "func" ? e === "v1" && (n = Tc) : t === "flow" ? e === "v1" && (n = mc) : t === "json" && e === "v1" && (n = Ec), console.assert(!!n, `invalid toolbox type=${t} version=${e}`), n;
10996
11045
  }
10997
- function Ic(t, e, n) {
11046
+ function Oc(t, e, n) {
10998
11047
  function o({ name: i, callback: a }) {
10999
11048
  t.registerToolboxCategoryCallback(i, () => a(e));
11000
11049
  }
11001
- e === "page" ? n === "v1" && (o(ho), o(de), o(he), o(_t), o(lt), o(fe), o(pe)) : e === "comp" ? n === "v1" && (o(po), o(de), o(he), o(_t), o(lt), o(fe), o(pe)) : e === "func" ? n === "v1" && (o(Ee), o(Te), o(me), o(ge), o(_t), o(lt)) : e === "flow" && n === "v1" && (o(Ee), o(Te), o(me), o(ge), o(_t), o(lt));
11050
+ e === "page" ? n === "v1" && (o(po), o(de), o(he), o(_t), o(lt), o(fe), o(pe)) : e === "comp" ? n === "v1" && (o(_o), o(de), o(he), o(_t), o(lt), o(fe), o(pe)) : e === "func" ? n === "v1" && (o(Ee), o(Te), o(me), o(ge), o(_t), o(lt)) : e === "flow" && n === "v1" && (o(Ee), o(Te), o(me), o(ge), o(_t), o(lt));
11002
11051
  }
11003
- function Oc(t) {
11004
- const { router: e } = vt;
11052
+ function vc(t) {
11053
+ const { router: e } = yt;
11005
11054
  t.registerButtonCallback("NO_COMPUTE", () => {
11006
11055
  const n = e.resolve({
11007
11056
  path: "/compute/" + Date.now()
@@ -11060,7 +11109,7 @@ function yc(t, e) {
11060
11109
  new (I.get(I.FINISHED_LOADING))(e)
11061
11110
  );
11062
11111
  }
11063
- function vc(t) {
11112
+ function Cc(t) {
11064
11113
  const e = (o) => {
11065
11114
  if (!o)
11066
11115
  return null;
@@ -11092,9 +11141,9 @@ function vc(t) {
11092
11141
  if (o.type === "json_root_v1")
11093
11142
  return e(o);
11094
11143
  }
11095
- const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
11144
+ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ ct({
11096
11145
  __name: "index",
11097
- props: /* @__PURE__ */ Ge({
11146
+ props: /* @__PURE__ */ We({
11098
11147
  type: {},
11099
11148
  version: {},
11100
11149
  locale: {},
@@ -11105,9 +11154,9 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
11105
11154
  scale: { required: !0 },
11106
11155
  scaleModifiers: {}
11107
11156
  }),
11108
- emits: /* @__PURE__ */ Ge(["ready"], ["update:lock", "update:scale"]),
11157
+ emits: /* @__PURE__ */ We(["ready"], ["update:lock", "update:scale"]),
11109
11158
  setup(t, { expose: e, emit: n }) {
11110
- const { backgroundColor2: o } = jt(), i = Kt(t, "lock"), a = Kt(t, "scale"), c = n, u = `blocklyEditor${We()}`, l = Lt(), _ = wt("parentContainer"), d = wt("clean"), h = wt("navigator"), p = {};
11159
+ const { backgroundColor2: o } = jt(), i = Kt(t, "lock"), a = Kt(t, "scale"), c = n, u = `blocklyEditor${je()}`, l = Lt(), _ = wt("parentContainer"), d = wt("clean"), h = wt("navigator"), p = {};
11111
11160
  Da(p);
11112
11161
  const m = Lt(!0), A = Lt(!1), P = F(() => t.type === "json" ? "tree" : "list"), U = F(() => ({
11113
11162
  width: "100%",
@@ -11147,21 +11196,21 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
11147
11196
  width: "56px",
11148
11197
  height: "calc(100% - 49px)",
11149
11198
  zIndex: 999
11150
- })), mo = F(() => ({
11199
+ })), fo = F(() => ({
11151
11200
  position: "fixed",
11152
11201
  top: 0,
11153
11202
  left: 0,
11154
11203
  zIndex: 3e3
11155
- })), { open: Ut } = tn(`blocklyEditorFlyout${We()}`);
11204
+ })), { open: Ut } = en(`blocklyEditorFlyout${je()}`);
11156
11205
  gn(async () => {
11157
11206
  if (!l.value || !_.value) {
11158
11207
  console.assert(!1);
11159
11208
  return;
11160
11209
  }
11161
- Yo(_.value), await In(t.locale), p.workspace = gc(l.value, t.type, t.version, t.dark), p.workspace.addChangeListener(I.disableOrphans), p.workspace.addChangeListener(To);
11210
+ Yo(_.value), await In(t.locale), p.workspace = Ac(l.value, t.type, t.version, t.dark), p.workspace.addChangeListener(I.disableOrphans), p.workspace.addChangeListener(mo);
11162
11211
  const N = document.querySelector(`#${u} .blocklyFlyout`);
11163
- new MutationObserver((De) => {
11164
- De.forEach((zt) => {
11212
+ new MutationObserver((Me) => {
11213
+ Me.forEach((zt) => {
11165
11214
  zt.type === "attributes" && zt.attributeName === "style" && (Ut.value = p.workspace.getFlyout().isVisible());
11166
11215
  });
11167
11216
  }).observe(N, { attributes: !0 }), Ut.value = p.workspace.getFlyout().isVisible(), pn(), dn(), await ni(), c("ready");
@@ -11170,9 +11219,9 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
11170
11219
  }), Fo(l, () => {
11171
11220
  p.workspace && wo(p.workspace);
11172
11221
  });
11173
- async function To(N) {
11222
+ async function mo(N) {
11174
11223
  if (N.type === I.FINISHED_LOADING) {
11175
- uo(), setTimeout(() => {
11224
+ ro(), setTimeout(() => {
11176
11225
  h.value?.update();
11177
11226
  }, 0), m.value = !1;
11178
11227
  return;
@@ -11187,19 +11236,19 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
11187
11236
  }, 0);
11188
11237
  }
11189
11238
  }
11190
- const Eo = (N) => {
11239
+ const To = (N) => {
11191
11240
  m.value = !0, t.type === "json" ? yc(N, p.workspace) : $.workspaces.load(N, p.workspace);
11192
- }, go = () => t.type === "json" ? vc(p.workspace) : $.workspaces.save(p.workspace), Ao = () => {
11241
+ }, Eo = () => t.type === "json" ? Cc(p.workspace) : $.workspaces.save(p.workspace), go = () => {
11193
11242
  if (t.type === "json")
11194
11243
  console.assert(!1);
11195
11244
  else
11196
11245
  return s.workspaceToCode(p.workspace);
11197
- }, Io = () => Ra(p.workspace), pn = () => {
11246
+ }, Ao = () => Ra(p.workspace), pn = () => {
11198
11247
  p.workspace.setIsReadOnly(i.value), p.workspace.isReadOnly() && (Ut.value = !1);
11199
11248
  }, dn = () => {
11200
11249
  p.workspace.setScale(a.value);
11201
- }, Oo = () => {
11202
- p.workspace.fireChangeListener(new Gn());
11250
+ }, Io = () => {
11251
+ p.workspace.fireChangeListener(new Hn());
11203
11252
  }, hn = () => {
11204
11253
  d.value?.cleanWorkspace();
11205
11254
  }, fn = () => {
@@ -11229,14 +11278,14 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
11229
11278
  dn();
11230
11279
  }), e({
11231
11280
  loading: m,
11232
- load: Eo,
11233
- save: go,
11234
- generateCode: Ao,
11235
- generateReactivity: Io,
11236
- fireStateChange: Oo
11281
+ load: To,
11282
+ save: Eo,
11283
+ generateCode: go,
11284
+ generateReactivity: Ao,
11285
+ fireStateChange: Io
11237
11286
  }), (N, It) => {
11238
- const De = D("v-icon"), zt = D("x-loading");
11239
- return S(), Z("div", Cc, [
11287
+ const Me = D("v-icon"), zt = D("x-loading");
11288
+ return S(), Z("div", kc, [
11240
11289
  w("div", {
11241
11290
  id: u,
11242
11291
  ref_key: "blocklyDiv",
@@ -11253,7 +11302,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
11253
11302
  class: "d-flex flex-column justify-center align-center",
11254
11303
  style: W(nt.value)
11255
11304
  }, [
11256
- L(De, {
11305
+ L(Me, {
11257
11306
  icon: "mdi-delete",
11258
11307
  size: "x-large"
11259
11308
  })
@@ -11270,7 +11319,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
11270
11319
  }, null, 8, ["lock"]),
11271
11320
  L(Ua, {
11272
11321
  modelValue: i.value,
11273
- "onUpdate:modelValue": It[0] || (It[0] = (yo) => i.value = yo)
11322
+ "onUpdate:modelValue": It[0] || (It[0] = (Oo) => i.value = Oo)
11274
11323
  }, null, 8, ["modelValue"]),
11275
11324
  L(ja, {
11276
11325
  ref_key: "navigator",
@@ -11290,7 +11339,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
11290
11339
  w("div", {
11291
11340
  ref_key: "parentContainer",
11292
11341
  ref: _,
11293
- style: W(mo.value)
11342
+ style: W(fo.value)
11294
11343
  }, null, 4),
11295
11344
  L(zt, {
11296
11345
  open: m.value,
@@ -11299,7 +11348,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
11299
11348
  ]);
11300
11349
  };
11301
11350
  }
11302
- }), Nc = /* @__PURE__ */ ct({
11351
+ }), Lc = /* @__PURE__ */ ct({
11303
11352
  __name: "index",
11304
11353
  props: {
11305
11354
  code: {}
@@ -11325,10 +11374,10 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
11325
11374
  }, 8, ["color"]);
11326
11375
  };
11327
11376
  }
11328
- }), Lc = { class: "text-subtitle-1" }, Sc = { class: "w-100 h-100 overflow-auto" }, Bc = /* @__PURE__ */ ct({
11377
+ }), Sc = { class: "text-subtitle-1" }, Bc = { class: "w-100 h-100 overflow-auto" }, bc = /* @__PURE__ */ ct({
11329
11378
  __name: "index",
11330
11379
  setup(t) {
11331
- const { t: e } = Xt(), { sysBarAvail: n } = Fn(), { backgroundColor0: o, backgroundColor2: i } = jt(), a = Lt(""), c = F(() => {
11380
+ const { t: e } = Xt(), { sysBarAvail: n } = Yn(), { backgroundColor0: o, backgroundColor2: i } = jt(), a = Lt(""), c = F(() => {
11332
11381
  let _ = 48;
11333
11382
  return n.value && (_ += 24), {
11334
11383
  position: "relative",
@@ -11336,7 +11385,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
11336
11385
  };
11337
11386
  }), u = (_) => {
11338
11387
  a.value = _.code;
11339
- }, { open: l } = tn("sourceDlg", u);
11388
+ }, { open: l } = en("sourceDlg", u);
11340
11389
  return (_, d) => {
11341
11390
  const h = D("v-sheet"), p = D("v-btn"), m = D("v-spacer"), A = D("v-dialog");
11342
11391
  return S(), st(A, {
@@ -11346,7 +11395,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
11346
11395
  "no-click-animation": "",
11347
11396
  persistent: "",
11348
11397
  transition: "dialog-bottom-transition",
11349
- onKeydown: d[2] || (d[2] = Hn(Ft((P) => l.value = !1, ["stop", "prevent"]), ["esc"]))
11398
+ onKeydown: d[2] || (d[2] = $n(Ft((P) => l.value = !1, ["stop", "prevent"]), ["esc"]))
11350
11399
  }, {
11351
11400
  default: at(() => [
11352
11401
  L(h, {
@@ -11372,7 +11421,7 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
11372
11421
  variant: "text",
11373
11422
  onClick: d[0] || (d[0] = (P) => l.value = !1)
11374
11423
  }),
11375
- w("span", Lc, $t(R(e)("x-block-lib.dlg.source.title")), 1),
11424
+ w("span", Sc, $t(R(e)("x-block-lib.dlg.source.title")), 1),
11376
11425
  L(m)
11377
11426
  ]),
11378
11427
  _: 1
@@ -11380,8 +11429,8 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
11380
11429
  w("div", {
11381
11430
  style: W(c.value)
11382
11431
  }, [
11383
- w("div", Sc, [
11384
- L(Nc, { code: a.value }, null, 8, ["code"])
11432
+ w("div", Bc, [
11433
+ L(Lc, { code: a.value }, null, 8, ["code"])
11385
11434
  ])
11386
11435
  ], 4)
11387
11436
  ]),
@@ -11392,16 +11441,16 @@ const Cc = { class: "position-relative w-100 h-100" }, kc = /* @__PURE__ */ ct({
11392
11441
  }, 8, ["modelValue"]);
11393
11442
  };
11394
11443
  }
11395
- }), bc = (t) => {
11396
- t.component("XBlockly", kc), t.component("XSourceDlg", Bc);
11444
+ }), Pc = (t) => {
11445
+ t.component("XBlockly", Nc), t.component("XSourceDlg", bc);
11397
11446
  };
11398
- async function Yc(t) {
11399
- return (await Wn(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.h3b844ct.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans.mk5971y3.js") }), `./locales/${t}/index.ts`, 4)).default;
11447
+ async function Fc(t) {
11448
+ return (await Gn(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.h3b844ct.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans.mk5971y3.js") }), `./locales/${t}/index.ts`, 4)).default;
11400
11449
  }
11401
- const Fc = { install: bc };
11450
+ const wc = { install: Pc };
11402
11451
  export {
11403
- kc as XBlockly,
11404
- Fc as default,
11405
- bc as install,
11406
- Yc as loadLocaleMessageBlock
11452
+ Nc as XBlockly,
11453
+ wc as default,
11454
+ Pc as install,
11455
+ Fc as loadLocaleMessageBlock
11407
11456
  };