x-block-lib 0.8.40 → 0.8.42

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
@@ -1,18 +1,10 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var l=document.createElement("style");l.id="x-block-lib",l.appendChild(document.createTextNode(`/*!
2
- Theme: Default
3
- Description: Original highlight.js style
4
- Author: (c) Ivan Sagalaev <maniac@softwaremaniacs.org>
5
- Maintainer: @highlightjs/core-team
6
- Website: https://highlightjs.org/
7
- License: see project LICENSE
8
- Touched: 2021
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-daa85471]{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 yo, s as vo, a as Co, X as Rn, u as C, B as E, j as s, O as u, F as O, b as Ge, i as v, c as Et, d as ko, e as U, f as T, g as No, h as $, k as ft, p as Ft, l as ot, m as En, n as B, C as Dn, N as it, o as Lo, P as We, q as Ve, V as St, t as Mn, W as So, v as Bo, w as bo, S as Po, x as Ro, y as Do, z as jt, 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";
1
+ (function(){"use strict";try{if(typeof document<"u"){var l=document.createElement("style");l.id="x-block-lib",l.appendChild(document.createTextNode("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-daa85471]{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(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ import { E as I, r as Tn, M as yo, s as vo, a as Co, X as Rn, u as C, B as E, j as s, O as u, F as O, b as Ge, i as v, c as Et, d as ko, e as U, f as T, g as No, h as $, k as ft, p as Ft, l as ot, m as En, n as B, C as Dn, N as it, o as Lo, P as We, q as Ve, V as St, t as Mn, W as So, v as Bo, w as bo, S as Po, x as Ro, y as Do, z as jt, T as Ie, 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.je7mkgas.js";
11
3
  import { globalState as g } from "x-state-lib";
12
4
  import { globalObjects as kt, openConfirmDlg as Go, openPromptDlg as Wo, messageWarning as xn, useColor as Xt, useSystem as Yn, useViewStack as nn, eventBus as Lt } from "x-essential-lib";
13
- import { pkgs as ie, parsePixelStr as jo, parsePercentStr as Xo, getPropertyTag as Mt, unwrapEventId as on, elements as et, makeEventId as Z, toEventName as Ie, unwrapMethodId as Oe, makeMethodId as Yt, toMethodName as ye, unwrapPropertyId as Jo, makePropertyId as te, toPropertyName as Fn, isLocaleOfMethodKind as wn, makeTriggerId as yt } from "x-runtime-lib";
14
- import { provide as qo, inject as Qo, defineComponent as rt, resolveComponent as M, createBlock as st, openBlock as S, unref as D, withCtx as at, createVNode as L, mergeProps as sn, useModel as $t, ref as Bt, computed as w, resolveDirective as zo, withDirectives as Zo, createElementBlock as tt, normalizeStyle as j, createElementVNode as K, createCommentVNode as ut, toDisplayString as Ht, withModifiers as wt, mergeModels as je, Fragment as Kn, renderList as ti, useId as Xe, onUnmounted as ei, useTemplateRef as Kt, withKeys as $n, isRef as ne, onMounted as gn, nextTick as ni, onBeforeUnmount as An, watch as Vt, renderSlot as oi } from "vue";
15
- import { useI18n as Jt } from "vue-i18n";
5
+ import { pkgs as se, parsePixelStr as jo, parsePercentStr as Xo, getPropertyTag as Mt, unwrapEventId as on, elements as et, makeEventId as Z, toEventName as Oe, unwrapMethodId as Jt, makeMethodId as Yt, toMethodName as ye, unwrapPropertyId as Jo, makePropertyId as ee, toPropertyName as Fn, isLocaleOfMethodKind as wn, makeTriggerId as yt } from "x-runtime-lib";
6
+ import { provide as qo, inject as Qo, defineComponent as rt, resolveComponent as M, createBlock as st, openBlock as S, unref as D, withCtx as at, createVNode as L, mergeProps as sn, useModel as $t, ref as Bt, computed as w, resolveDirective as zo, withDirectives as Zo, createElementBlock as tt, normalizeStyle as j, createElementVNode as K, createCommentVNode as ut, toDisplayString as Ht, withModifiers as wt, mergeModels as je, Fragment as Kn, renderList as ti, useId as Xe, onUnmounted as ei, useTemplateRef as Kt, withKeys as $n, isRef as oe, onMounted as gn, nextTick as ni, onBeforeUnmount as An, watch as Vt, renderSlot as oi } from "vue";
7
+ import { useI18n as qt } from "vue-i18n";
16
8
  import { useDisplay as ii } from "vuetify";
17
9
  var b = /* @__PURE__ */ ((t) => (t.STATE_CHANGE = "state_change", t))(b || {});
18
10
  class Hn extends I.Abstract {
@@ -36,7 +28,7 @@ async function In(t) {
36
28
  function f(t) {
37
29
  return yo[t] ?? t;
38
30
  }
39
- const bt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", se = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
31
+ const bt = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTBoLTR2LTRjMC0xLjEwNC0uODk2LTItMi0ycy0yIC44OTYtMiAybC4wNzEgNGgtNC4wNzFjLTEuMTA0IDAtMiAuODk2LTIgMnMuODk2IDIgMiAybDQuMDcxLS4wNzEtLjA3MSA0LjA3MWMwIDEuMTA0Ljg5NiAyIDIgMnMyLS44OTYgMi0ydi00LjA3MWw0IC4wNzFjMS4xMDQgMCAyLS44OTYgMi0ycy0uODk2LTItMi0yeiIgZmlsbD0id2hpdGUiIC8+PC9zdmc+Cg==", ae = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij48cGF0aCBkPSJNMTggMTFoLTEyYy0xLjEwNCAwLTIgLjg5Ni0yIDJzLjg5NiAyIDIgMmgxMmMxLjEwNCAwIDItLjg5NiAyLTJzLS44OTYtMi0yLTJ6IiBmaWxsPSJ3aGl0ZSIgLz48L3N2Zz4K";
40
32
  function ve(t) {
41
33
  const e = t.lastIndexOf("V");
42
34
  if (e <= 0 || e >= t.length - 1)
@@ -44,7 +36,7 @@ function ve(t) {
44
36
  const n = Co(t.substring(0, e - 1)), o = "v" + t.substring(e + 1);
45
37
  return `${n}_${o}`;
46
38
  }
47
- function ae(t) {
39
+ function ce(t) {
48
40
  const e = t.lastIndexOf("V");
49
41
  if (e <= 0 || e >= t.length - 1)
50
42
  return console.assert(!1, `invalid key=${t}`), "";
@@ -94,7 +86,7 @@ function gt(t) {
94
86
  return t === "string" ? "String" : t === "number" ? "Number" : t === "boolean" ? "Boolean" : t === "array" ? "Array" : t === "object" ? "Object" : (console.assert(!1), null);
95
87
  }
96
88
  function ci(t) {
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);
89
+ return t.ui === "dummy" ? null : t.ui === "strInput" ? "String" : t.ui === "numInput" ? "Number" : t.ui === "switch" ? "Boolean" : t.ui === "select" ? ce(t.items) : t.ui === "multiTypes" ? ce(t.types) : t.ui === "compSelect" ? "Comp" : t.ui === "colorPicker" ? "Color" : (console.assert(!1), null);
98
90
  }
99
91
  function jn(t) {
100
92
  return t === "string" ? "String" : t === "integer" || t === "decimal" ? "Number" : t === "boolean" ? "Boolean" : t === "enum" || t === "dateTime" ? "String" : (console.assert(!1), null);
@@ -135,11 +127,11 @@ function dt(t) {
135
127
  const e = `<shadow type="text_v1"><field name="TEXT">${t}</field></shadow>`;
136
128
  return C.xml.textToDom(e);
137
129
  }
138
- function ce(t) {
130
+ function re(t) {
139
131
  const e = `<shadow type="math_number_v1"><field name="NUM">${t}</field></shadow>`;
140
132
  return C.xml.textToDom(e);
141
133
  }
142
- function re(t) {
134
+ function ue(t) {
143
135
  const e = `<shadow type="logic_boolean_v1"><field name="BOOL">${t ? "TRUE" : "FALSE"}</field></shadow>`;
144
136
  return C.xml.textToDom(e);
145
137
  }
@@ -166,11 +158,11 @@ function di() {
166
158
  }
167
159
  function At(t) {
168
160
  let e = null;
169
- return t === "string" ? e = dt("") : t === "number" ? e = ce(0) : t === "boolean" ? e = re(!1) : t === "array" ? e = ri() : t === "object" ? e = ui() : console.assert(!1), e;
161
+ return t === "string" ? e = dt("") : t === "number" ? e = re(0) : t === "boolean" ? e = ue(!1) : t === "array" ? e = ri() : t === "object" ? e = ui() : console.assert(!1), e;
170
162
  }
171
163
  function hi(t) {
172
164
  let e = null;
173
- return t.ui === "dummy" ? console.assert(!0) : t.ui === "strInput" ? e = dt(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;
165
+ return t.ui === "dummy" ? console.assert(!0) : t.ui === "strInput" ? e = dt(t.default) : t.ui === "numInput" ? e = re(t.default) : t.ui === "switch" ? e = ue(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
166
  }
175
167
  function fi() {
176
168
  const { activeObject: t, activePage: e } = g.app, n = [];
@@ -261,7 +253,7 @@ s.forBlock.get_page_argument_v1 = function(t) {
261
253
  return [`__getPageArgumentV1__(${s.quote_(e.argument.key)})`, u.FUNCTION_CALL];
262
254
  };
263
255
  const Ei = (t, e) => {
264
- const n = ve(t), o = ae(t);
256
+ const n = ve(t), o = ce(t);
265
257
  E[n] = {
266
258
  init: function() {
267
259
  this.appendDummyInput().appendField(
@@ -280,13 +272,13 @@ const Ei = (t, e) => {
280
272
  return [a(c), u.ATOMIC];
281
273
  };
282
274
  };
283
- for (const t in ie) {
284
- const e = ie[t];
275
+ for (const t in se) {
276
+ const e = se[t];
285
277
  for (const n in e.items)
286
278
  Ei(n, e.items[n]);
287
279
  }
288
280
  const gi = (t, e) => {
289
- const n = ve(t), o = ae(t);
281
+ const n = ve(t), o = ce(t);
290
282
  E[n] = {
291
283
  init: function() {
292
284
  this.value = e[0].default ?? "", this.appendDummyInput("DUMMY").appendField(
@@ -344,8 +336,8 @@ const gi = (t, e) => {
344
336
  c.min,
345
337
  c.max,
346
338
  c.precision ? 1 / Math.pow(10, c.precision) : null,
347
- (d) => {
348
- this.value = d + "px";
339
+ (p) => {
340
+ this.value = p + "px";
349
341
  }
350
342
  ), l = "px";
351
343
  } else if (c.ui === "percentInput") {
@@ -355,8 +347,8 @@ const gi = (t, e) => {
355
347
  c.min,
356
348
  c.max,
357
349
  c.precision ? 1 / Math.pow(10, c.precision) : null,
358
- (d) => {
359
- this.value = d + "%";
350
+ (p) => {
351
+ this.value = p + "%";
360
352
  }
361
353
  ), l = "%";
362
354
  }
@@ -375,8 +367,8 @@ const gi = (t, e) => {
375
367
  return [a(i.value), u.ATOMIC];
376
368
  };
377
369
  };
378
- for (const t in ie) {
379
- const e = ie[t];
370
+ for (const t in se) {
371
+ const e = se[t];
380
372
  for (const n in e.types)
381
373
  gi(n, e.types[n]);
382
374
  }
@@ -579,103 +571,103 @@ function Qe(t) {
579
571
  const { properties: e } = g.runtime, { activeObject: n, activePage: o, activeComp: i, depends: a } = g.app, c = [], r = Mt(n.type, n.subtype);
580
572
  if (!r)
581
573
  return c;
582
- const l = n.nodes.find((d) => d.id === t);
574
+ const l = n.nodes.find((p) => p.id === t);
583
575
  if (!l)
584
576
  return c;
585
577
  const _ = et[l.key];
586
578
  if (!_)
587
579
  return console.assert(!1, "invalid element", l.key), c;
588
- for (const { key: d, name: h, params: p } of _.events)
580
+ for (const { key: p, name: h, params: d } of _.events)
589
581
  c.push({
590
- id: Z("elementEvent", t, d),
582
+ id: Z("elementEvent", t, p),
591
583
  kind: "elementEvent",
592
584
  names: [h],
593
- params: p
585
+ params: d
594
586
  });
595
587
  if (J(_.key) && l.reference && l.reference.comp) {
596
- const d = a[l.reference.comp];
597
- if (d)
598
- for (const { id: h, name: p, params: m } of d.meta.events)
588
+ const p = a[l.reference.comp];
589
+ if (p)
590
+ for (const { id: h, name: d, params: m } of p.meta.events)
599
591
  c.push({
600
592
  id: Z("referenceEvent", t, h),
601
593
  kind: "referenceEvent",
602
- names: [p],
594
+ names: [d],
603
595
  params: ht(m)
604
596
  });
605
597
  }
606
598
  if (q(_.key) && l.reference && l.reference.comp) {
607
- const d = a[l.reference.comp];
608
- if (d)
609
- for (const { id: h, name: p, params: m } of d.meta.events)
599
+ const p = a[l.reference.comp];
600
+ if (p)
601
+ for (const { id: h, name: d, params: m } of p.meta.events)
610
602
  c.push({
611
603
  id: Z("multipleRefEvent", t, h),
612
604
  kind: "multipleRefEvent",
613
- names: [p],
605
+ names: [d],
614
606
  params: ht(m)
615
607
  });
616
608
  }
617
609
  if (V(_.key) && n.type === "comp")
618
- for (const { id: d, name: h, params: p } of i.meta.events)
610
+ for (const { id: p, name: h, params: d } of i.meta.events)
619
611
  c.push({
620
- id: Z("customEvent", t, d),
612
+ id: Z("customEvent", t, p),
621
613
  kind: "customEvent",
622
614
  names: [h],
623
- params: ht(p)
615
+ params: ht(d)
624
616
  });
625
617
  if (e[_.key] && e[_.key][r])
626
- for (const { keys: d, names: h, raw: p } of e[_.key][r])
627
- Ce(d, p) || c.push({
628
- id: Z("elementPropertyChangeEvent", t, d),
618
+ for (const { keys: p, names: h, raw: d } of e[_.key][r])
619
+ Ce(p, d) || c.push({
620
+ id: Z("elementPropertyChangeEvent", t, p),
629
621
  kind: "elementPropertyChangeEvent",
630
622
  names: h,
631
- params: Q(Wn(p))
623
+ params: Q(Wn(d))
632
624
  });
633
625
  if (J(_.key) && l.reference && l.reference.comp) {
634
- const d = a[l.reference.comp];
635
- if (d)
636
- for (const { id: h, name: p, type: m } of d.meta.properties)
626
+ const p = a[l.reference.comp];
627
+ if (p)
628
+ for (const { id: h, name: d, type: m } of p.meta.properties)
637
629
  c.push({
638
630
  id: Z("referencePropertyChangeEvent", t, h),
639
631
  kind: "referencePropertyChangeEvent",
640
- names: [p],
632
+ names: [d],
641
633
  params: Q(m)
642
634
  });
643
635
  }
644
636
  if (q(_.key) && l.reference && l.reference.comp) {
645
- const d = a[l.reference.comp];
646
- if (d)
647
- for (const { id: h, name: p, type: m } of d.meta.properties)
637
+ const p = a[l.reference.comp];
638
+ if (p)
639
+ for (const { id: h, name: d, type: m } of p.meta.properties)
648
640
  c.push({
649
641
  id: Z("multipleRefPropertyChangeEvent", t, h),
650
642
  kind: "multipleRefPropertyChangeEvent",
651
- names: [p],
643
+ names: [d],
652
644
  params: Q(m)
653
645
  });
654
646
  }
655
647
  if (V(_.key) && n.type === "comp")
656
- for (const { id: d, name: h, type: p } of i.meta.properties)
648
+ for (const { id: p, name: h, type: d } of i.meta.properties)
657
649
  c.push({
658
- id: Z("customPropertyChangeEvent", t, d),
650
+ id: Z("customPropertyChangeEvent", t, p),
659
651
  kind: "customPropertyChangeEvent",
660
652
  names: [h],
661
- params: Q(p)
653
+ params: Q(d)
662
654
  });
663
655
  if (V(_.key)) {
664
656
  if (n.type === "page")
665
- for (const { id: d, name: h, type: p } of o.meta.states)
657
+ for (const { id: p, name: h, type: d } of o.meta.states)
666
658
  c.push({
667
- id: Z("stateChangeEvent", "globality", d),
659
+ id: Z("stateChangeEvent", "globality", p),
668
660
  kind: "stateChangeEvent",
669
661
  names: [h],
670
- params: Q(p)
662
+ params: Q(d)
671
663
  });
672
664
  else if (n.type === "comp")
673
- for (const { id: d, name: h, type: p } of i.meta.states)
665
+ for (const { id: p, name: h, type: d } of i.meta.states)
674
666
  c.push({
675
- id: Z("stateChangeEvent", "globality", d),
667
+ id: Z("stateChangeEvent", "globality", p),
676
668
  kind: "stateChangeEvent",
677
669
  names: [h],
678
- params: Q(p)
670
+ params: Q(d)
679
671
  });
680
672
  }
681
673
  return c;
@@ -686,28 +678,28 @@ function Fe(t) {
686
678
  const { properties: e } = g.runtime, { activeObject: n, activePage: o, activeComp: i, depends: a } = g.app, c = Mt(n.type, n.subtype);
687
679
  if (!c)
688
680
  return;
689
- const { kind: r, nodeId: l, eventKey: _ } = on(t), d = n.nodes.find((p) => p.id === l);
690
- if (!d)
681
+ const { kind: r, nodeId: l, eventKey: _ } = on(t), p = n.nodes.find((d) => d.id === l);
682
+ if (!p)
691
683
  return;
692
- const h = et[d.key];
684
+ const h = et[p.key];
693
685
  if (!h) {
694
- console.assert(!1, "invalid element", d.key);
686
+ console.assert(!1, "invalid element", p.key);
695
687
  return;
696
688
  }
697
689
  if (r === "elementEvent") {
698
- const p = h.events.find((m) => m.key === _);
699
- if (p)
690
+ const d = h.events.find((m) => m.key === _);
691
+ if (d)
700
692
  return {
701
693
  id: t,
702
694
  kind: r,
703
- names: [p.name],
704
- params: p.params
695
+ names: [d.name],
696
+ params: d.params
705
697
  };
706
698
  } else if (r === "referenceEvent") {
707
- if (J(h.key) && d.reference && d.reference.comp) {
708
- const p = a[d.reference.comp];
709
- if (p) {
710
- const m = p.meta.events.find((A) => A.id === _);
699
+ if (J(h.key) && p.reference && p.reference.comp) {
700
+ const d = a[p.reference.comp];
701
+ if (d) {
702
+ const m = d.meta.events.find((A) => A.id === _);
711
703
  if (m)
712
704
  return {
713
705
  id: t,
@@ -718,10 +710,10 @@ function Fe(t) {
718
710
  }
719
711
  }
720
712
  } else if (r === "multipleRefEvent") {
721
- if (q(h.key) && d.reference && d.reference.comp) {
722
- const p = a[d.reference.comp];
723
- if (p) {
724
- const m = p.meta.events.find((A) => A.id === _);
713
+ if (q(h.key) && p.reference && p.reference.comp) {
714
+ const d = a[p.reference.comp];
715
+ if (d) {
716
+ const m = d.meta.events.find((A) => A.id === _);
725
717
  if (m)
726
718
  return {
727
719
  id: t,
@@ -733,33 +725,33 @@ function Fe(t) {
733
725
  }
734
726
  } else if (r === "customEvent") {
735
727
  if (V(h.key) && n.type === "comp") {
736
- const p = i.meta.events.find((m) => m.id === _);
737
- if (p)
728
+ const d = i.meta.events.find((m) => m.id === _);
729
+ if (d)
738
730
  return {
739
731
  id: t,
740
732
  kind: r,
741
- names: [p.name],
742
- params: ht(p.params)
733
+ names: [d.name],
734
+ params: ht(d.params)
743
735
  };
744
736
  }
745
737
  } else if (r === "elementPropertyChangeEvent") {
746
738
  if (e[h.key] && e[h.key][c]) {
747
- const p = e[h.key][c].find(
739
+ const d = e[h.key][c].find(
748
740
  (m) => m.keys === _
749
741
  );
750
- if (p)
742
+ if (d)
751
743
  return {
752
744
  id: t,
753
745
  kind: r,
754
- names: p.names,
755
- params: Q(Wn(p.raw))
746
+ names: d.names,
747
+ params: Q(Wn(d.raw))
756
748
  };
757
749
  }
758
750
  } else if (r === "referencePropertyChangeEvent") {
759
- if (J(h.key) && d.reference && d.reference.comp) {
760
- const p = a[d.reference.comp];
761
- if (p) {
762
- const m = p.meta.properties.find(
751
+ if (J(h.key) && p.reference && p.reference.comp) {
752
+ const d = a[p.reference.comp];
753
+ if (d) {
754
+ const m = d.meta.properties.find(
763
755
  (A) => A.id === _
764
756
  );
765
757
  if (m)
@@ -772,10 +764,10 @@ function Fe(t) {
772
764
  }
773
765
  }
774
766
  } else if (r === "multipleRefPropertyChangeEvent") {
775
- if (q(h.key) && d.reference && d.reference.comp) {
776
- const p = a[d.reference.comp];
777
- if (p) {
778
- const m = p.meta.properties.find(
767
+ if (q(h.key) && p.reference && p.reference.comp) {
768
+ const d = a[p.reference.comp];
769
+ if (d) {
770
+ const m = d.meta.properties.find(
779
771
  (A) => A.id === _
780
772
  );
781
773
  if (m)
@@ -789,39 +781,39 @@ function Fe(t) {
789
781
  }
790
782
  } else if (r === "customPropertyChangeEvent") {
791
783
  if (V(h.key) && n.type === "comp") {
792
- const p = i.meta.properties.find(
784
+ const d = i.meta.properties.find(
793
785
  (m) => m.id === _
794
786
  );
795
- if (p)
787
+ if (d)
796
788
  return {
797
789
  id: t,
798
790
  kind: r,
799
- names: [p.name],
800
- params: Q(p.type)
791
+ names: [d.name],
792
+ params: Q(d.type)
801
793
  };
802
794
  }
803
795
  } else if (r === "stateChangeEvent" && V(h.key)) {
804
796
  if (n.type === "page") {
805
- const p = o.meta.states.find(
797
+ const d = o.meta.states.find(
806
798
  (m) => m.id === _
807
799
  );
808
- if (p)
800
+ if (d)
809
801
  return {
810
802
  id: t,
811
803
  kind: r,
812
- names: [p.name],
813
- params: Q(p.type)
804
+ names: [d.name],
805
+ params: Q(d.type)
814
806
  };
815
807
  } else if (n.type === "comp") {
816
- const p = i.meta.states.find(
808
+ const d = i.meta.states.find(
817
809
  (m) => m.id === _
818
810
  );
819
- if (p)
811
+ if (d)
820
812
  return {
821
813
  id: t,
822
814
  kind: r,
823
- names: [p.name],
824
- params: Q(p.type)
815
+ names: [d.name],
816
+ params: Q(d.type)
825
817
  };
826
818
  }
827
819
  }
@@ -829,7 +821,7 @@ function Fe(t) {
829
821
  function Ni(t) {
830
822
  const e = [], n = Qe(t);
831
823
  for (const { id: o, kind: i, names: a } of n)
832
- e.push([Ie(i, a), o]);
824
+ e.push([Oe(i, a), o]);
833
825
  return k(e);
834
826
  }
835
827
  function Qn() {
@@ -864,7 +856,7 @@ function kn(t) {
864
856
  function Li() {
865
857
  const t = [], e = Qn();
866
858
  for (const { id: n, kind: o, names: i } of e)
867
- t.push([Ie(o, i), n]);
859
+ t.push([Oe(o, i), n]);
868
860
  return k(t);
869
861
  }
870
862
  function ct(t) {
@@ -886,53 +878,53 @@ function ze(t) {
886
878
  const c = et[a.key];
887
879
  if (!c)
888
880
  return console.assert(!1, "inavlid element", a.key), i;
889
- for (const { key: r, name: l, inputs: _, outputs: d } of c.methods)
881
+ for (const { key: r, name: l, inputs: _, outputs: p } of c.methods)
890
882
  i.push({
891
883
  id: Yt("elementMethod", t, r),
892
884
  kind: "elementMethod",
893
885
  names: [l],
894
886
  inputs: _,
895
- outputs: d
887
+ outputs: p
896
888
  });
897
889
  if (J(c.key) && a.reference && a.reference.comp) {
898
890
  const r = o[a.reference.comp];
899
891
  if (r)
900
- for (const { id: l, name: _, inputs: d, outputs: h } of r.meta.methods)
892
+ for (const { id: l, name: _, inputs: p, outputs: h } of r.meta.methods)
901
893
  i.push({
902
894
  id: Yt("referenceMethod", t, l),
903
895
  kind: "referenceMethod",
904
896
  names: [_],
905
- inputs: ct(d),
897
+ inputs: ct(p),
906
898
  outputs: Ct(h)
907
899
  });
908
900
  }
909
901
  if (q(c.key) && a.reference && a.reference.comp) {
910
902
  const r = o[a.reference.comp];
911
903
  if (r)
912
- for (const { id: l, name: _, inputs: d, outputs: h } of r.meta.methods)
904
+ for (const { id: l, name: _, inputs: p, outputs: h } of r.meta.methods)
913
905
  i.push({
914
906
  id: Yt("multipleRefMethod", t, l),
915
907
  kind: "multipleRefMethod",
916
908
  names: [_],
917
- inputs: ct(d),
909
+ inputs: ct(p),
918
910
  outputs: Ct(h)
919
911
  });
920
912
  }
921
913
  if (V(c.key) && e.type === "comp")
922
- for (const { id: r, name: l, inputs: _, outputs: d } of n.meta.methods)
914
+ for (const { id: r, name: l, inputs: _, outputs: p } of n.meta.methods)
923
915
  i.push({
924
916
  id: Yt("customMethod", t, r),
925
917
  kind: "customMethod",
926
918
  names: [l],
927
919
  inputs: ct(_),
928
- outputs: Ct(d)
920
+ outputs: Ct(p)
929
921
  });
930
922
  return V(c.key) && e.type, i;
931
923
  }
932
924
  function we(t) {
933
925
  if (!t)
934
926
  return;
935
- const { activeObject: e, activeComp: n, depends: o } = g.app, { kind: i, nodeId: a, methodKey: c } = Oe(t), r = e.nodes.find((_) => _.id === a);
927
+ const { activeObject: e, activeComp: n, depends: o } = g.app, { kind: i, nodeId: a, methodKey: c } = Jt(t), r = e.nodes.find((_) => _.id === a);
936
928
  if (!r)
937
929
  return;
938
930
  const l = et[r.key];
@@ -941,7 +933,7 @@ function we(t) {
941
933
  return;
942
934
  }
943
935
  if (i === "elementMethod") {
944
- const _ = l.methods.find((d) => d.key === c);
936
+ const _ = l.methods.find((p) => p.key === c);
945
937
  if (_)
946
938
  return {
947
939
  id: t,
@@ -954,16 +946,16 @@ function we(t) {
954
946
  if (J(l.key) && r.reference && r.reference.comp) {
955
947
  const _ = o[r.reference.comp];
956
948
  if (_) {
957
- const d = _.meta.methods.find(
949
+ const p = _.meta.methods.find(
958
950
  (h) => h.id === c
959
951
  );
960
- if (d)
952
+ if (p)
961
953
  return {
962
954
  id: t,
963
955
  kind: i,
964
- names: [d.name],
965
- inputs: ct(d.inputs),
966
- outputs: Ct(d.outputs)
956
+ names: [p.name],
957
+ inputs: ct(p.inputs),
958
+ outputs: Ct(p.outputs)
967
959
  };
968
960
  }
969
961
  }
@@ -971,22 +963,22 @@ function we(t) {
971
963
  if (q(l.key) && r.reference && r.reference.comp) {
972
964
  const _ = o[r.reference.comp];
973
965
  if (_) {
974
- const d = _.meta.methods.find(
966
+ const p = _.meta.methods.find(
975
967
  (h) => h.id === c
976
968
  );
977
- if (d)
969
+ if (p)
978
970
  return {
979
971
  id: t,
980
972
  kind: i,
981
- names: [d.name],
982
- inputs: ct(d.inputs),
983
- outputs: Ct(d.outputs)
973
+ names: [p.name],
974
+ inputs: ct(p.inputs),
975
+ outputs: Ct(p.outputs)
984
976
  };
985
977
  }
986
978
  }
987
979
  } else if (i === "customMethod" && V(l.key) && e.type === "comp") {
988
980
  const _ = n.meta.methods.find(
989
- (d) => d.id === c
981
+ (p) => p.id === c
990
982
  );
991
983
  if (_)
992
984
  return {
@@ -1020,7 +1012,7 @@ function cn() {
1020
1012
  function Dt(t) {
1021
1013
  if (!t)
1022
1014
  return;
1023
- const { activeObject: e, activeComp: n } = g.app, { kind: o, nodeId: i, methodKey: a } = Oe(t);
1015
+ const { activeObject: e, activeComp: n } = g.app, { kind: o, nodeId: i, methodKey: a } = Jt(t);
1024
1016
  if (o === "customMethod" && i === "globality" && e.type === "comp") {
1025
1017
  const c = n.meta.methods.find(
1026
1018
  (r) => r.id === a
@@ -1167,7 +1159,7 @@ function X(t) {
1167
1159
  }
1168
1160
  return !1;
1169
1161
  }
1170
- function qt(t) {
1162
+ function Qt(t) {
1171
1163
  const { activeObject: e } = g.app, n = [], o = Mt(e.type, e.subtype);
1172
1164
  if (!o)
1173
1165
  return n;
@@ -1203,7 +1195,7 @@ function mt(t) {
1203
1195
  };
1204
1196
  }
1205
1197
  function ke(t) {
1206
- const { i18n: e } = kt, n = [], o = qt(t);
1198
+ const { i18n: e } = kt, n = [], o = Qt(t);
1207
1199
  for (const { id: i, name: a, alias: c } of o) {
1208
1200
  let r = e.global.t(a);
1209
1201
  c && (r += " / " + c), n.push([r, i]);
@@ -1214,57 +1206,57 @@ function Gt(t, e) {
1214
1206
  const { properties: n } = g.runtime, { activeObject: o, activeComp: i, depends: a } = g.app, c = [], r = Mt(o.type, o.subtype);
1215
1207
  if (!r)
1216
1208
  return c;
1217
- const l = o.nodes.find((d) => d.id === t);
1209
+ const l = o.nodes.find((p) => p.id === t);
1218
1210
  if (!l)
1219
1211
  return c;
1220
1212
  const _ = et[l.key];
1221
1213
  if (!_)
1222
1214
  return console.assert(!1, "invalid element", l.key), c;
1223
1215
  if (n[_.key] && n[_.key][r])
1224
- for (const { keys: d, names: h, raw: p } of n[_.key][r])
1225
- e === "write" && Ce(d, p) || c.push({
1226
- id: te("elementProperty", t, d),
1216
+ for (const { keys: p, names: h, raw: d } of n[_.key][r])
1217
+ e === "write" && Ce(p, d) || c.push({
1218
+ id: ee("elementProperty", t, p),
1227
1219
  kind: "elementProperty",
1228
1220
  names: h,
1229
1221
  meta: {
1230
1222
  element: !0,
1231
- raw: p
1223
+ raw: d
1232
1224
  }
1233
1225
  });
1234
1226
  if (J(_.key) && l.reference && l.reference.comp) {
1235
- const d = a[l.reference.comp];
1236
- if (d)
1237
- for (const { id: h, name: p, type: m } of d.meta.properties)
1227
+ const p = a[l.reference.comp];
1228
+ if (p)
1229
+ for (const { id: h, name: d, type: m } of p.meta.properties)
1238
1230
  c.push({
1239
- id: te("referenceProperty", t, h),
1231
+ id: ee("referenceProperty", t, h),
1240
1232
  kind: "referenceProperty",
1241
- names: [p],
1233
+ names: [d],
1242
1234
  meta: {
1243
1235
  raw: { type: m }
1244
1236
  }
1245
1237
  });
1246
1238
  }
1247
1239
  if (q(_.key) && l.reference && l.reference.comp) {
1248
- const d = a[l.reference.comp];
1249
- if (d)
1250
- for (const { id: h, name: p, type: m } of d.meta.properties)
1240
+ const p = a[l.reference.comp];
1241
+ if (p)
1242
+ for (const { id: h, name: d, type: m } of p.meta.properties)
1251
1243
  c.push({
1252
- id: te("multipleRefProperty", t, h),
1244
+ id: ee("multipleRefProperty", t, h),
1253
1245
  kind: "multipleRefProperty",
1254
- names: [p],
1246
+ names: [d],
1255
1247
  meta: {
1256
1248
  raw: { type: m }
1257
1249
  }
1258
1250
  });
1259
1251
  }
1260
1252
  if (V(_.key) && o.type === "comp")
1261
- for (const { id: d, name: h, type: p } of i.meta.properties)
1253
+ for (const { id: p, name: h, type: d } of i.meta.properties)
1262
1254
  c.push({
1263
- id: te("customProperty", t, d),
1255
+ id: ee("customProperty", t, p),
1264
1256
  kind: "customProperty",
1265
1257
  names: [h],
1266
1258
  meta: {
1267
- raw: { type: p }
1259
+ raw: { type: d }
1268
1260
  }
1269
1261
  });
1270
1262
  return c;
@@ -1278,15 +1270,15 @@ function vt(t) {
1278
1270
  const { kind: c, nodeId: r, propertyKey: l } = Jo(t), _ = n.nodes.find((h) => h.id === r);
1279
1271
  if (!_)
1280
1272
  return;
1281
- const d = et[_.key];
1282
- if (!d) {
1273
+ const p = et[_.key];
1274
+ if (!p) {
1283
1275
  console.assert(!1, "invalid element", _.key);
1284
1276
  return;
1285
1277
  }
1286
1278
  if (c === "elementProperty") {
1287
- if (e[d.key] && e[d.key][a]) {
1288
- const h = e[d.key][a].find(
1289
- (p) => p.keys === l
1279
+ if (e[p.key] && e[p.key][a]) {
1280
+ const h = e[p.key][a].find(
1281
+ (d) => d.keys === l
1290
1282
  );
1291
1283
  if (h)
1292
1284
  return {
@@ -1300,44 +1292,44 @@ function vt(t) {
1300
1292
  };
1301
1293
  }
1302
1294
  } else if (c === "referenceProperty") {
1303
- if (J(d.key) && _.reference && _.reference.comp) {
1295
+ if (J(p.key) && _.reference && _.reference.comp) {
1304
1296
  const h = i[_.reference.comp];
1305
1297
  if (h) {
1306
- const p = h.meta.properties.find(
1298
+ const d = h.meta.properties.find(
1307
1299
  (m) => m.id === l
1308
1300
  );
1309
- if (p)
1301
+ if (d)
1310
1302
  return {
1311
1303
  id: t,
1312
1304
  kind: c,
1313
- names: [p.name],
1305
+ names: [d.name],
1314
1306
  meta: {
1315
- raw: { type: p.type }
1307
+ raw: { type: d.type }
1316
1308
  }
1317
1309
  };
1318
1310
  }
1319
1311
  }
1320
1312
  } else if (c === "multipleRefProperty") {
1321
- if (q(d.key) && _.reference && _.reference.comp) {
1313
+ if (q(p.key) && _.reference && _.reference.comp) {
1322
1314
  const h = i[_.reference.comp];
1323
1315
  if (h) {
1324
- const p = h.meta.properties.find(
1316
+ const d = h.meta.properties.find(
1325
1317
  (m) => m.id === l
1326
1318
  );
1327
- if (p)
1319
+ if (d)
1328
1320
  return {
1329
1321
  id: t,
1330
1322
  kind: c,
1331
- names: [p.name],
1323
+ names: [d.name],
1332
1324
  meta: {
1333
- raw: { type: p.type }
1325
+ raw: { type: d.type }
1334
1326
  }
1335
1327
  };
1336
1328
  }
1337
1329
  }
1338
- } else if (c === "customProperty" && V(d.key) && n.type === "comp") {
1330
+ } else if (c === "customProperty" && V(p.key) && n.type === "comp") {
1339
1331
  const h = o.meta.properties.find(
1340
- (p) => p.id === l
1332
+ (d) => d.id === l
1341
1333
  );
1342
1334
  if (h)
1343
1335
  return {
@@ -1360,7 +1352,7 @@ function rn() {
1360
1352
  const { activeObject: t, activePage: e, activeComp: n } = g.app;
1361
1353
  return t.type === "page" ? e.meta.states : t.type === "comp" ? n.meta.states : [];
1362
1354
  }
1363
- function ue(t) {
1355
+ function le(t) {
1364
1356
  const { activeObject: e, activePage: n, activeComp: o } = g.app;
1365
1357
  if (e.type === "page")
1366
1358
  return n.meta.states.find((i) => i.id === t);
@@ -1392,7 +1384,7 @@ const Mi = {
1392
1384
  initData_: function() {
1393
1385
  if (this.node.id)
1394
1386
  return;
1395
- const t = qt("onEvent")?.[0];
1387
+ const t = Qt("onEvent")?.[0];
1396
1388
  if (!t)
1397
1389
  return;
1398
1390
  this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
@@ -1794,7 +1786,7 @@ const Yi = {
1794
1786
  initData_: function() {
1795
1787
  if (this.node.id)
1796
1788
  return;
1797
- const t = qt("callMethod")?.[0];
1789
+ const t = Qt("callMethod")?.[0];
1798
1790
  if (!t)
1799
1791
  return;
1800
1792
  this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
@@ -1893,7 +1885,7 @@ const Yi = {
1893
1885
  ensureBlocks_: function() {
1894
1886
  if (this.isInsertionMarker())
1895
1887
  return;
1896
- const { kind: t } = Oe(this.method.id), e = wn(t), n = [];
1888
+ const { kind: t } = Jt(this.method.id), e = wn(t), n = [];
1897
1889
  for (let o = 0; o < this.method.outputs.length; o++) {
1898
1890
  const { key: i, name: a } = this.method.outputs[o];
1899
1891
  n.push(["OUTPUT" + o, `__output$${i}__`, a, e]);
@@ -1937,39 +1929,50 @@ s.forBlock.call_app_method_v1 = function(t) {
1937
1929
  let i;
1938
1930
  o.method.kind === "multipleRefMethod" && (i = s.valueToCode(o, "REF_KEY", u.NONE) || "''");
1939
1931
  let a = "{";
1940
- if (o.method.inputs.forEach(({ key: c, type: r }, l) => {
1941
- let _ = s.valueToCode(
1932
+ o.method.inputs.forEach(({ key: r, type: l }, _) => {
1933
+ let p = s.valueToCode(
1942
1934
  o,
1943
- "INPUT" + l,
1935
+ "INPUT" + _,
1944
1936
  u.ATOMIC
1945
1937
  );
1946
- if (_ === void 0)
1947
- switch (r) {
1938
+ if (p === void 0)
1939
+ switch (l) {
1948
1940
  case "string":
1949
- _ = "''";
1941
+ p = "''";
1950
1942
  break;
1951
1943
  case "number":
1952
- _ = "0";
1944
+ p = "0";
1953
1945
  break;
1954
1946
  case "boolean":
1955
- _ = "false";
1947
+ p = "false";
1956
1948
  break;
1957
1949
  case "array":
1958
- _ = "[]";
1950
+ p = "[]";
1959
1951
  break;
1960
1952
  case "object":
1961
- _ = "{}";
1953
+ p = "{}";
1962
1954
  break;
1963
1955
  default:
1964
- _ = "null";
1956
+ p = "null";
1965
1957
  }
1966
- a !== "{" && (a += ", "), a += `${n(c)}: ${_}`;
1967
- }), a += "}", o.method.outputs.length > 0) {
1968
- let c = "";
1969
- o.method.outputs.forEach(({ key: _ }) => {
1970
- c += `${e}__output$${_}__ = __outputs__[${n(_)}];
1958
+ a !== "{" && (a += ", "), a += `${n(r)}: ${p}`;
1959
+ }), a += "}";
1960
+ let c = "";
1961
+ if (o.method.outputs.forEach(({ key: r }) => {
1962
+ c += `${e}__output$${r}__ = __outputs__[${n(r)}];
1971
1963
  `;
1972
- });
1964
+ }), o.method.kind === "customMethod") {
1965
+ const { methodKey: r } = Jt(o.method.id);
1966
+ if (o.method.outputs.length > 0) {
1967
+ const l = s.statementToCode(o, "HANDLE");
1968
+ return `{
1969
+ var __outputs__ = __implementMethod$${r}__(${a});
1970
+ ${c}${l}}
1971
+ `;
1972
+ } else
1973
+ return `__implementMethod$${r}__(${a});
1974
+ `;
1975
+ } else if (o.method.outputs.length > 0) {
1973
1976
  const r = s.statementToCode(o, "HANDLE");
1974
1977
  return `{
1975
1978
  var __outputs__ = __callMethodV1__(${n(o.method.id)}, ${i}, ${a});
@@ -2065,7 +2068,7 @@ const Fi = {
2065
2068
  };
2066
2069
  E.implement_app_method_v1 = Fi;
2067
2070
  s.forBlock.implement_app_method_v1 = function(t) {
2068
- const e = s.INDENT, n = s.quote_, o = t, { methodKey: i } = Oe(o.method.id);
2071
+ const e = s.INDENT, n = s.quote_, o = t, { methodKey: i } = Jt(o.method.id);
2069
2072
  let a = "";
2070
2073
  o.method.inputs.forEach(({ key: l }) => {
2071
2074
  a += `${e}var __input$${l}__ = __inputs__[${n(l)}];
@@ -2423,7 +2426,7 @@ const Hi = {
2423
2426
  initData_: function() {
2424
2427
  if (this.node.id)
2425
2428
  return;
2426
- const t = qt("getProperty")?.[0];
2429
+ const t = Qt("getProperty")?.[0];
2427
2430
  if (!t)
2428
2431
  return;
2429
2432
  this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
@@ -2528,7 +2531,7 @@ const Gi = {
2528
2531
  initData_: function() {
2529
2532
  if (this.node.id)
2530
2533
  return;
2531
- const t = qt("setProperty")?.[0];
2534
+ const t = Qt("setProperty")?.[0];
2532
2535
  if (!t)
2533
2536
  return;
2534
2537
  this.node.id = t.id, this.node.key = t.key, this.node.alias = t.alias;
@@ -2675,11 +2678,11 @@ const Wi = {
2675
2678
  }
2676
2679
  },
2677
2680
  onStateChange_: function(t) {
2678
- const e = ue(t);
2681
+ const e = le(t);
2679
2682
  e ? (this.state.id = e.id, this.state.name = e.name, this.state.type = e.type) : (this.state.id = "", this.state.name = "", this.state.type = "string");
2680
2683
  },
2681
2684
  checkWarning_: function() {
2682
- const t = ue(this.state.id);
2685
+ const t = le(this.state.id);
2683
2686
  if (!t) {
2684
2687
  this.setWarningText(f("WARN_STATE_NOT_FOUND"));
2685
2688
  return;
@@ -2735,7 +2738,7 @@ const ji = {
2735
2738
  }
2736
2739
  },
2737
2740
  onStateChange_: function(t) {
2738
- const e = ue(t);
2741
+ const e = le(t);
2739
2742
  e ? (this.state.id = e.id, this.state.name = e.name, this.state.type = e.type) : (this.state.id = "", this.state.name = "", this.state.type = "string"), this.updateShadow_();
2740
2743
  },
2741
2744
  updateShadow_: function() {
@@ -2748,7 +2751,7 @@ const ji = {
2748
2751
  this.getInput("VALUE").setCheck(e).setShadowDom(n);
2749
2752
  },
2750
2753
  checkWarning_: function() {
2751
- const t = ue(this.state.id);
2754
+ const t = le(this.state.id);
2752
2755
  if (!t) {
2753
2756
  this.setWarningText(f("WARN_STATE_NOT_FOUND"));
2754
2757
  return;
@@ -3635,18 +3638,18 @@ function Zi() {
3635
3638
  t.push([o, n]);
3636
3639
  }), k(t);
3637
3640
  }
3638
- function Qt(t) {
3641
+ function zt(t) {
3639
3642
  const e = [];
3640
3643
  return g.compute.spaces.forEach((n) => {
3641
3644
  t === "func" && n.funcs.length > 0 && e.push(n), t === "flow" && n.flows.length > 0 && e.push(n);
3642
3645
  }), e;
3643
3646
  }
3644
- function le(t) {
3647
+ function _e(t) {
3645
3648
  return g.compute.spaces.find((e) => e.id === t);
3646
3649
  }
3647
3650
  function oo(t) {
3648
3651
  const e = [];
3649
- return Qt(t).forEach(({ id: o, name: i }) => {
3652
+ return zt(t).forEach(({ id: o, name: i }) => {
3650
3653
  e.push([i, o]);
3651
3654
  }), k(e);
3652
3655
  }
@@ -3668,7 +3671,7 @@ const ts = {
3668
3671
  initData_: function() {
3669
3672
  if (this.space.id)
3670
3673
  return;
3671
- const t = Qt("func")?.[0];
3674
+ const t = zt("func")?.[0];
3672
3675
  if (!t)
3673
3676
  return;
3674
3677
  this.space.id = t.id, this.space.name = t.name;
@@ -3709,7 +3712,7 @@ const ts = {
3709
3712
  }
3710
3713
  },
3711
3714
  onSpaceChange_: function(t) {
3712
- const e = le(t);
3715
+ const e = _e(t);
3713
3716
  if (!e) {
3714
3717
  console.assert(!1);
3715
3718
  return;
@@ -3775,7 +3778,7 @@ const ts = {
3775
3778
  F(this, t);
3776
3779
  },
3777
3780
  checkWarning_: function() {
3778
- const t = le(this.space.id);
3781
+ const t = _e(this.space.id);
3779
3782
  if (!t) {
3780
3783
  this.setWarningText(f("WARN_SPACE_NOT_FOUND"));
3781
3784
  return;
@@ -3802,10 +3805,10 @@ s.forBlock.call_func_v1 = function(t) {
3802
3805
  const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
3803
3806
  let c = "";
3804
3807
  c += `${e}var __inputs__ = {
3805
- `, o.func.inputs.forEach(({ id: h }, p) => {
3808
+ `, o.func.inputs.forEach(({ id: h }, d) => {
3806
3809
  const m = s.valueToCode(
3807
3810
  o,
3808
- "INPUT" + p,
3811
+ "INPUT" + d,
3809
3812
  u.ATOMIC
3810
3813
  );
3811
3814
  c += `${e}${e}${n(h)}: ${m},
@@ -3842,7 +3845,7 @@ const es = {
3842
3845
  initData_: function() {
3843
3846
  if (this.space.id)
3844
3847
  return;
3845
- const t = Qt("func")?.[0];
3848
+ const t = zt("func")?.[0];
3846
3849
  if (!t)
3847
3850
  return;
3848
3851
  this.space.id = t.id, this.space.name = t.name;
@@ -3883,7 +3886,7 @@ const es = {
3883
3886
  }
3884
3887
  },
3885
3888
  onSpaceChange_: function(t) {
3886
- const e = le(t);
3889
+ const e = _e(t);
3887
3890
  if (!e) {
3888
3891
  console.assert(!1);
3889
3892
  return;
@@ -3949,7 +3952,7 @@ const es = {
3949
3952
  F(this, t);
3950
3953
  },
3951
3954
  checkWarning_: function() {
3952
- const t = le(this.space.id);
3955
+ const t = _e(this.space.id);
3953
3956
  if (!t) {
3954
3957
  this.setWarningText(f("WARN_SPACE_NOT_FOUND"));
3955
3958
  return;
@@ -3976,10 +3979,10 @@ s.forBlock.call_func_internal_v1 = function(t) {
3976
3979
  const e = s.INDENT, n = s.quote_, o = t, i = n(o.space.id), a = n(o.func.id);
3977
3980
  let c = `${e}var __inputs__ = {
3978
3981
  `;
3979
- o.func.inputs.forEach(({ id: h }, p) => {
3982
+ o.func.inputs.forEach(({ id: h }, d) => {
3980
3983
  const m = s.valueToCode(
3981
3984
  o,
3982
- "INPUT" + p,
3985
+ "INPUT" + d,
3983
3986
  u.ATOMIC
3984
3987
  );
3985
3988
  c += `${e}${e}${n(h)}: ${m},
@@ -4244,7 +4247,7 @@ function Le(t) {
4244
4247
  e.push([i, o]);
4245
4248
  }), k(e);
4246
4249
  }
4247
- function _e(t, e) {
4250
+ function pe(t, e) {
4248
4251
  const { spaces: n } = g.data, o = n.find((a) => a.id === t);
4249
4252
  if (!o)
4250
4253
  return [];
@@ -4261,7 +4264,7 @@ function $e(t, e, n) {
4261
4264
  }
4262
4265
  function is(t, e) {
4263
4266
  const n = [];
4264
- return _e(t, e).forEach(({ id: i, name: a }) => {
4267
+ return pe(t, e).forEach(({ id: i, name: a }) => {
4265
4268
  n.push([a, i]);
4266
4269
  }), k(n);
4267
4270
  }
@@ -4409,7 +4412,7 @@ const rs = {
4409
4412
  if (!e)
4410
4413
  return;
4411
4414
  this.table.id = e.id, this.table.name = e.name;
4412
- const n = _e(this.space.id, this.table.id)?.[0];
4415
+ const n = pe(this.space.id, this.table.id)?.[0];
4413
4416
  n && (this.column.id = n.id, this.column.name = n.name, this.column.type = n.type, this.column.extend = n.extend);
4414
4417
  },
4415
4418
  saveExtraState: function() {
@@ -4463,7 +4466,7 @@ const rs = {
4463
4466
  }
4464
4467
  const n = e.id !== this.table.id;
4465
4468
  if (this.table.id = e.id, this.table.name = e.name, n || !$e(this.space.id, this.table.id, this.column.id)) {
4466
- const o = _e(this.space.id, this.table.id)?.[0]?.id ?? "", i = this.getField("COLUMN");
4469
+ const o = pe(this.space.id, this.table.id)?.[0]?.id ?? "", i = this.getField("COLUMN");
4467
4470
  i.getOptions(!1), i.setValue(o, !1), this.onColumnChange_(o);
4468
4471
  }
4469
4472
  },
@@ -4654,7 +4657,7 @@ function ds(t) {
4654
4657
  const e = t.getInput("CONDITION").connection;
4655
4658
  if (e.targetBlock())
4656
4659
  return;
4657
- const n = nt()?.[0], o = H(n?.id ?? "")?.[0], i = _e(n?.id, o?.id)?.[0], a = {
4660
+ const n = nt()?.[0], o = H(n?.id ?? "")?.[0], i = pe(n?.id, o?.id)?.[0], a = {
4658
4661
  type: "cond_atomic_v1",
4659
4662
  extraState: {
4660
4663
  space: {
@@ -5199,12 +5202,12 @@ E.select_column_v1 = ys;
5199
5202
  s.forBlock.select_column_v1 = function(t) {
5200
5203
  const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
5201
5204
  for (let l = 0; l < n.itemCount_; l++) {
5202
- const _ = n.getFieldValue("COLUMN" + l), d = n.table.columns.find((p) => p.id === _).name, h = n.getFieldValue("ALIAS" + l);
5203
- a.push({ name: d, alias: h });
5205
+ const _ = n.getFieldValue("COLUMN" + l), p = n.table.columns.find((d) => d.id === _).name, h = n.getFieldValue("ALIAS" + l);
5206
+ a.push({ name: p, alias: h });
5204
5207
  }
5205
5208
  let c = "[";
5206
- return a.forEach(({ name: l, alias: _ }, d) => {
5207
- d !== 0 && (c += ","), c += `{name:${e(l)},alias:${e(_)}}`;
5209
+ return a.forEach(({ name: l, alias: _ }, p) => {
5210
+ p !== 0 && (c += ","), c += `{name:${e(l)},alias:${e(_)}}`;
5208
5211
  }), c += "]", [`{spaceId:${e(o)},tableId:${e(i)},columns:${c}}`, u.ATOMIC];
5209
5212
  };
5210
5213
  const vs = {
@@ -5630,12 +5633,12 @@ E.update_column_v1 = Ls;
5630
5633
  s.forBlock.update_column_v1 = function(t) {
5631
5634
  const e = s.quote_, n = t, o = n.space.id, i = n.table.id, a = [];
5632
5635
  for (let l = 0; l < n.itemCount_; l++) {
5633
- const _ = n.getFieldValue("COLUMN" + l), d = n.table.columns.find((p) => p.id === _).name, h = s.valueToCode(n, "ADD" + l, u.ATOMIC) || "null";
5634
- a.push({ name: d, value: h });
5636
+ const _ = n.getFieldValue("COLUMN" + l), p = n.table.columns.find((d) => d.id === _).name, h = s.valueToCode(n, "ADD" + l, u.ATOMIC) || "null";
5637
+ a.push({ name: p, value: h });
5635
5638
  }
5636
5639
  let c = "[";
5637
- return a.forEach(({ name: l, value: _ }, d) => {
5638
- d !== 0 && (c += ","), c += `{name:${e(l)},value:${_}}`;
5640
+ return a.forEach(({ name: l, value: _ }, p) => {
5641
+ p !== 0 && (c += ","), c += `{name:${e(l)},value:${_}}`;
5639
5642
  }), c += "]", [`{spaceId:${e(o)},tableId:${e(i)},columns:${c}}`, u.ATOMIC];
5640
5643
  };
5641
5644
  function Ss(t) {
@@ -5771,7 +5774,7 @@ const Rs = C.xml, Ds = {
5771
5774
  this.isInFlyout || this.addEntry_(n);
5772
5775
  })
5773
5776
  ), n.appendField(new En(String(t))), n.appendField(
5774
- new ot(se, 20, 20, void 0, () => {
5777
+ new ot(ae, 20, 20, void 0, () => {
5775
5778
  this.isInFlyout || this.removeEntry_(n);
5776
5779
  })
5777
5780
  ), this.moveInputBefore(e, "ADD");
@@ -5790,7 +5793,7 @@ const Rs = C.xml, Ds = {
5790
5793
  this.isInFlyout || this.addEntry_(n);
5791
5794
  })
5792
5795
  ), n.appendField(new En(String(e))), n.appendField(
5793
- new ot(se, 20, 20, void 0, () => {
5796
+ new ot(ae, 20, 20, void 0, () => {
5794
5797
  this.isInFlyout || this.removeEntry_(n);
5795
5798
  })
5796
5799
  ), e === this.length ? this.moveInputBefore("ENTRY" + e, "ADD") : this.moveInputBefore("ENTRY" + e, "ENTRY" + (e + 1)), this.length++;
@@ -5854,7 +5857,7 @@ const Ln = C.xml, Us = {
5854
5857
  this.isInFlyout || this.addEntry_(i);
5855
5858
  })
5856
5859
  ), i.appendField(new ft(n), "KEY" + e), i.appendField(
5857
- new ot(se, 20, 20, void 0, () => {
5860
+ new ot(ae, 20, 20, void 0, () => {
5858
5861
  this.isInFlyout || this.removeEntry_(i);
5859
5862
  })
5860
5863
  ), this.moveInputBefore(o, "ADD");
@@ -5871,7 +5874,7 @@ const Ln = C.xml, Us = {
5871
5874
  this.isInFlyout || this.addEntry_(n);
5872
5875
  })
5873
5876
  ), n.appendField(new ft("key"), "KEY" + e), n.appendField(
5874
- new ot(se, 20, 20, void 0, () => {
5877
+ new ot(ae, 20, 20, void 0, () => {
5875
5878
  this.isInFlyout || this.removeEntry_(n);
5876
5879
  })
5877
5880
  ), e === this.length ? this.moveInputBefore("ENTRY" + e, "ADD") : this.moveInputBefore("ENTRY" + e, "ENTRY" + (e + 1)), this.length++;
@@ -6836,16 +6839,16 @@ ${c}}
6836
6839
  it.NameType.VARIABLE
6837
6840
  ), r += `var ${_} = ${i};
6838
6841
  `);
6839
- const d = s.nameDB_.getDistinctName(
6842
+ const p = s.nameDB_.getDistinctName(
6840
6843
  `${n}_by`,
6841
6844
  it.NameType.VARIABLE
6842
6845
  );
6843
- return r += `var ${d} = `, C.string.isNumber(a) ? r += `${Math.abs(Number(a))};
6846
+ return r += `var ${p} = `, C.string.isNumber(a) ? r += `${Math.abs(Number(a))};
6844
6847
  ` : r += `Math.abs(${a});
6845
6848
  `, r += `if (${l} > ${_}) {
6846
- ${e}${d} = -${d};
6849
+ ${e}${p} = -${p};
6847
6850
  }
6848
- `, r += `for (${n} = ${l}; ${d} >= 0 ? ${n} <= ${_} : ${n} >= ${_}; ${n} += ${d}) {
6851
+ `, r += `for (${n} = ${l}; ${p} >= 0 ? ${n} <= ${_} : ${n} >= ${_}; ${n} += ${p}) {
6849
6852
  ${c}}
6850
6853
  `, r;
6851
6854
  }
@@ -8389,7 +8392,7 @@ s.forBlock.text_v1 = function(t) {
8389
8392
  return [s.quote_(t.getFieldValue("TEXT")), u.ATOMIC];
8390
8393
  };
8391
8394
  const da = /^\s*'([^']|\\')*'\s*$/;
8392
- function oe(t) {
8395
+ function ie(t) {
8393
8396
  return da.test(t) ? [t, u.ATOMIC] : [`String(${t})`, u.FUNCTION_CALL];
8394
8397
  }
8395
8398
  B.register(
@@ -8425,7 +8428,7 @@ s.forBlock.text_append_v1 = function(t) {
8425
8428
  t.getFieldValue("VAR"),
8426
8429
  it.NameType.VARIABLE
8427
8430
  ), n = s.valueToCode(t, "TEXT", u.NONE) || "''";
8428
- return `${e} += ${oe(n)};
8431
+ return `${e} += ${ie(n)};
8429
8432
  `;
8430
8433
  };
8431
8434
  T([
@@ -8717,11 +8720,11 @@ s.forBlock.text_join_v1 = function(t) {
8717
8720
  return ["''", u.ATOMIC];
8718
8721
  case 1: {
8719
8722
  const n = s.valueToCode(e, "ADD0", u.NONE) || "''";
8720
- return oe(n);
8723
+ return ie(n);
8721
8724
  }
8722
8725
  case 2: {
8723
8726
  const n = s.valueToCode(e, "ADD0", u.NONE) || "''", o = s.valueToCode(e, "ADD1", u.NONE) || "''";
8724
- return [oe(n)[0] + " + " + oe(o)[0], u.ADDITION];
8727
+ return [ie(n)[0] + " + " + ie(o)[0], u.ADDITION];
8725
8728
  }
8726
8729
  default: {
8727
8730
  const n = new Array(e.itemCount_);
@@ -8922,13 +8925,13 @@ const Ta = {
8922
8925
  updateShadow_: function() {
8923
8926
  if (this.isInsertionMarker())
8924
8927
  return;
8925
- const t = ce(1e3);
8928
+ const t = re(1e3);
8926
8929
  this.getInput("INTERVAL")?.setShadowDom(t);
8927
- const e = re(!1);
8930
+ const e = ue(!1);
8928
8931
  this.getInput("LOOP")?.setShadowDom(e);
8929
- const n = ce(1);
8932
+ const n = re(1);
8930
8933
  this.getInput("COUNT")?.setShadowDom(n);
8931
- const o = re(!1);
8934
+ const o = ue(!1);
8932
8935
  this.getInput("IMMEDIATE")?.setShadowDom(o);
8933
8936
  }
8934
8937
  };
@@ -9073,16 +9076,16 @@ Mn.setPrompt(async (t, e, n) => {
9073
9076
  });
9074
9077
  o !== void 0 && n(String(o));
9075
9078
  });
9076
- const zt = O.prototype;
9077
- zt.doClassValidation_ = function(t) {
9079
+ const Zt = O.prototype;
9080
+ Zt.doClassValidation_ = function(t) {
9078
9081
  return t;
9079
9082
  };
9080
- const Ia = zt.doValueUpdate_;
9081
- zt.doValueUpdate_ = function(t) {
9083
+ const Ia = Zt.doValueUpdate_;
9084
+ Zt.doValueUpdate_ = function(t) {
9082
9085
  Ia.call(this, t), this.selectedOption && this.selectedOption[1] !== t && (this.selectedOption = null);
9083
9086
  };
9084
- const Oa = zt.getText_;
9085
- zt.getText_ = function() {
9087
+ const Oa = Zt.getText_;
9088
+ Zt.getText_ = function() {
9086
9089
  if (this.selectedOption)
9087
9090
  return Oa.call(this);
9088
9091
  const { i18n: t } = kt, e = this.getSourceBlock();
@@ -9103,7 +9106,7 @@ zt.getText_ = function() {
9103
9106
  return Fn(n, o);
9104
9107
  } else if (this.name === "EVENT") {
9105
9108
  const { kind: n, names: o } = e.event;
9106
- return console.log(e.event), Ie(n, o);
9109
+ return console.log(e.event), Oe(n, o);
9107
9110
  } else if (this.name === "METHOD") {
9108
9111
  const { kind: n, names: o } = e.method;
9109
9112
  return ye(n, o);
@@ -9188,7 +9191,7 @@ function ro() {
9188
9191
  const e = t.getTopBlocks(!0)?.[0];
9189
9192
  e && un(e.id);
9190
9193
  }
9191
- Ae.Classic.blockStyles = {
9194
+ Ie.Classic.blockStyles = {
9192
9195
  color_blocks: {
9193
9196
  colourPrimary: "#a5745b",
9194
9197
  colourSecondary: "#ede3de",
@@ -9274,7 +9277,7 @@ Ae.Classic.blockStyles = {
9274
9277
  hat: ""
9275
9278
  }
9276
9279
  };
9277
- Ae.Classic.categoryStyles = {
9280
+ Ie.Classic.categoryStyles = {
9278
9281
  color_category: {
9279
9282
  colour: "#a5745b"
9280
9283
  },
@@ -9341,7 +9344,7 @@ Ae.Classic.categoryStyles = {
9341
9344
  };
9342
9345
  const ka = Un.defineTheme("light", {
9343
9346
  name: "light",
9344
- base: Ae.Classic,
9347
+ base: Ie.Classic,
9345
9348
  componentStyles: {
9346
9349
  workspaceBackgroundColour: "#ffffff",
9347
9350
  toolboxBackgroundColour: "#eeeeee",
@@ -9357,7 +9360,7 @@ const ka = Un.defineTheme("light", {
9357
9360
  }
9358
9361
  }), Na = Un.defineTheme("dark", {
9359
9362
  name: "dark",
9360
- base: Ae.Classic,
9363
+ base: Ie.Classic,
9361
9364
  componentStyles: {
9362
9365
  workspaceBackgroundColour: "#1e1e1e",
9363
9366
  toolboxBackgroundColour: "#272727",
@@ -9524,7 +9527,7 @@ const Ma = /* @__PURE__ */ rt({
9524
9527
  lock: { type: Boolean }
9525
9528
  },
9526
9529
  setup(t, { expose: e }) {
9527
- const { t: n } = Jt(), o = t, i = ln(), a = () => {
9530
+ const { t: n } = qt(), o = t, i = ln(), a = () => {
9528
9531
  if (!i.workspace) {
9529
9532
  console.assert(!1);
9530
9533
  return;
@@ -9538,8 +9541,8 @@ const Ma = /* @__PURE__ */ rt({
9538
9541
  a();
9539
9542
  };
9540
9543
  return e({ cleanWorkspace: a }), (r, l) => {
9541
- const _ = M("v-btn"), d = M("v-tooltip");
9542
- return S(), st(d, {
9544
+ const _ = M("v-btn"), p = M("v-tooltip");
9545
+ return S(), st(p, {
9543
9546
  text: D(n)("x-block-lib.tip.hotkeyCtrlQ")
9544
9547
  }, {
9545
9548
  activator: at(({ props: h }) => [
@@ -9562,7 +9565,7 @@ const Ma = /* @__PURE__ */ rt({
9562
9565
  },
9563
9566
  emits: ["update:modelValue"],
9564
9567
  setup(t) {
9565
- const { t: e } = Jt(), n = $t(t, "modelValue");
9568
+ const { t: e } = qt(), n = $t(t, "modelValue");
9566
9569
  return (o, i) => {
9567
9570
  const a = M("v-btn"), c = M("v-tooltip");
9568
9571
  return S(), st(c, {
@@ -9611,8 +9614,8 @@ const Ma = /* @__PURE__ */ rt({
9611
9614
  border: "1px solid " + n.value,
9612
9615
  pointerEvents: "none"
9613
9616
  }));
9614
- return (d, h) => {
9615
- const p = M("v-spacer"), m = M("v-icon"), A = zo("ripple");
9617
+ return (p, h) => {
9618
+ const d = M("v-spacer"), m = M("v-icon"), A = zo("ripple");
9616
9619
  return Zo((S(), tt("div", {
9617
9620
  class: "d-flex align-center cursor-pointer",
9618
9621
  style: j(l.value),
@@ -9624,7 +9627,7 @@ const Ma = /* @__PURE__ */ rt({
9624
9627
  K("span", xa, Ht(a.title), 1),
9625
9628
  a.desc ? (S(), tt("span", Ya, Ht(a.desc), 1)) : ut("", !0)
9626
9629
  ]),
9627
- L(p),
9630
+ L(d),
9628
9631
  L(m, {
9629
9632
  class: "x-handle cursor-move mr-3",
9630
9633
  icon: "mdi-drag-horizontal-variant",
@@ -9652,19 +9655,19 @@ const Ma = /* @__PURE__ */ rt({
9652
9655
  }),
9653
9656
  emits: ["update:modelValue"],
9654
9657
  setup(t, { expose: e }) {
9655
- const { t: n } = Jt(), o = $t(t, "modelValue"), i = ln(), a = Bt([]);
9658
+ const { t: n } = qt(), o = $t(t, "modelValue"), i = ln(), a = Bt([]);
9656
9659
  e({ update: () => {
9657
9660
  if (!i.workspace) {
9658
9661
  console.assert(!1);
9659
9662
  return;
9660
9663
  }
9661
- const p = [];
9664
+ const d = [];
9662
9665
  i.workspace.getTopBlocks(!0).forEach((A) => {
9663
9666
  const R = A.id === Uo()?.id;
9664
9667
  let P = "";
9665
9668
  if (A.type.startsWith("on_app_event_v")) {
9666
9669
  const G = A, Nt = et[G.node.key];
9667
- Nt && (P = n(Nt.name), G.node.alias && (P += " / " + G.node.alias), P += " - " + Ie(G.event.kind, G.event.names));
9670
+ Nt && (P = n(Nt.name), G.node.alias && (P += " / " + G.node.alias), P += " - " + Oe(G.event.kind, G.event.names));
9668
9671
  } else if (A.type.startsWith("watch_effect_v"))
9669
9672
  P = n("x-block-lib.watchEffect");
9670
9673
  else if (A.type.startsWith("app_bind_v"))
@@ -9674,13 +9677,13 @@ const Ma = /* @__PURE__ */ rt({
9674
9677
  P = n("x-block-lib.implementMethod"), P += " - " + ye(G.method.kind, G.method.names);
9675
9678
  } else A.type.startsWith("func_entry_v") ? P = n("x-block-lib.funcEntry") : A.type.startsWith("procedure_def_v") ? P = n("x-block-lib.procedure") + " - " + A.getFieldValue("NAME") : P = n("x-block-lib.temporaryBlock");
9676
9679
  const It = A.getCommentText() ?? "";
9677
- p.push({
9680
+ d.push({
9678
9681
  id: A.id,
9679
9682
  name: P,
9680
9683
  desc: It,
9681
9684
  select: R
9682
9685
  });
9683
- }), a.value = p;
9686
+ }), a.value = d;
9684
9687
  } });
9685
9688
  let r = [];
9686
9689
  const l = () => {
@@ -9688,22 +9691,22 @@ const Ma = /* @__PURE__ */ rt({
9688
9691
  xn(n("x-block-lib.msg.cannotOperateInLockedState"));
9689
9692
  return;
9690
9693
  }
9691
- const p = [];
9694
+ const d = [];
9692
9695
  a.value.forEach(({ id: m }) => {
9693
- p.push(m);
9694
- }), r = p;
9695
- }, _ = () => !t.lock, d = (p) => {
9696
+ d.push(m);
9697
+ }), r = d;
9698
+ }, _ = () => !t.lock, p = (d) => {
9696
9699
  if (!i.workspace) {
9697
9700
  console.assert(!1);
9698
9701
  return;
9699
9702
  }
9700
- if (p.oldIndex === void 0 || p.newIndex === void 0) {
9703
+ if (d.oldIndex === void 0 || d.newIndex === void 0) {
9701
9704
  console.assert(!1);
9702
9705
  return;
9703
9706
  }
9704
- if (p.oldIndex === p.newIndex)
9707
+ if (d.oldIndex === d.newIndex)
9705
9708
  return;
9706
- const m = r[p.oldIndex], A = i.workspace.getBlockById(
9709
+ const m = r[d.oldIndex], A = i.workspace.getBlockById(
9707
9710
  m
9708
9711
  );
9709
9712
  if (!A) {
@@ -9711,29 +9714,29 @@ const Ma = /* @__PURE__ */ rt({
9711
9714
  return;
9712
9715
  }
9713
9716
  let R = "";
9714
- p.newIndex > p.oldIndex ? R = r[p.newIndex] : p.newIndex > 0 && (R = r[p.newIndex - 1]);
9717
+ d.newIndex > d.oldIndex ? R = r[d.newIndex] : d.newIndex > 0 && (R = r[d.newIndex - 1]);
9715
9718
  let P = -10;
9716
9719
  R !== "" && (P = i.workspace.getBlockById(
9717
9720
  R
9718
9721
  ).getRelativeToSurfaceXY().y + 10);
9719
9722
  const It = A.getRelativeToSurfaceXY();
9720
9723
  A.moveTo(new C.Coordinate(It.x, P)), i.workspace.cleanUp(), ro();
9721
- }, h = async (p) => {
9724
+ }, h = async (d) => {
9722
9725
  if (!i.workspace) {
9723
9726
  console.assert(!1);
9724
9727
  return;
9725
9728
  }
9726
- const m = i.workspace.getBlockById(p);
9727
- Vn.setSelected(m), un(p), o.value = !1;
9729
+ const m = i.workspace.getBlockById(d);
9730
+ Vn.setSelected(m), un(d), o.value = !1;
9728
9731
  };
9729
- return (p, m) => a.value.length > 0 ? (S(), st(D(Mo), {
9732
+ return (d, m) => a.value.length > 0 ? (S(), st(D(Mo), {
9730
9733
  key: 0,
9731
9734
  modelValue: a.value,
9732
9735
  "onUpdate:modelValue": m[0] || (m[0] = (A) => a.value = A),
9733
9736
  animation: 150,
9734
9737
  "ghost-class": "ghost",
9735
9738
  handle: ".x-handle",
9736
- onEnd: d,
9739
+ onEnd: p,
9737
9740
  onMove: _,
9738
9741
  onStart: l
9739
9742
  }, {
@@ -9790,7 +9793,7 @@ const Ma = /* @__PURE__ */ rt({
9790
9793
  lock: { type: Boolean }
9791
9794
  },
9792
9795
  setup(t, { expose: e }) {
9793
- const { t: n } = Jt(), o = ii(), { sysBarAvail: i } = Yn(), { backgroundColor1: a } = Xt(), c = w(() => {
9796
+ const { t: n } = qt(), o = ii(), { sysBarAvail: i } = Yn(), { backgroundColor1: a } = Xt(), c = w(() => {
9794
9797
  let m = "100%";
9795
9798
  return o.mdAndUp.value && (m = "400px"), {
9796
9799
  background: a.value,
@@ -9809,15 +9812,15 @@ const Ma = /* @__PURE__ */ rt({
9809
9812
  ei(() => {
9810
9813
  _.value = !1;
9811
9814
  });
9812
- const d = Kt("blockList"), h = Kt("blockTree");
9815
+ const p = Kt("blockList"), h = Kt("blockTree");
9813
9816
  return e({ open: _, update: () => {
9814
- t.type === "list" ? d.value?.update() : t.type === "tree" && h.value?.update();
9817
+ t.type === "list" ? p.value?.update() : t.type === "tree" && h.value?.update();
9815
9818
  } }), (m, A) => {
9816
9819
  const R = M("v-sheet"), P = M("v-btn"), It = M("v-spacer"), G = M("v-dialog"), Nt = M("v-tooltip");
9817
9820
  return S(), tt(Kn, null, [
9818
9821
  L(G, {
9819
9822
  modelValue: D(_),
9820
- "onUpdate:modelValue": A[5] || (A[5] = (W) => ne(_) ? _.value = W : null),
9823
+ "onUpdate:modelValue": A[5] || (A[5] = (W) => oe(_) ? _.value = W : null),
9821
9824
  eager: "",
9822
9825
  fullscreen: "",
9823
9826
  "no-click-animation": "",
@@ -9864,16 +9867,16 @@ const Ma = /* @__PURE__ */ rt({
9864
9867
  t.type === "list" ? (S(), st(Ha, {
9865
9868
  key: 0,
9866
9869
  ref_key: "blockList",
9867
- ref: d,
9870
+ ref: p,
9868
9871
  modelValue: D(_),
9869
- "onUpdate:modelValue": A[1] || (A[1] = (W) => ne(_) ? _.value = W : null),
9872
+ "onUpdate:modelValue": A[1] || (A[1] = (W) => oe(_) ? _.value = W : null),
9870
9873
  lock: t.lock
9871
9874
  }, null, 8, ["modelValue", "lock"])) : t.type === "tree" ? (S(), st(Ga, {
9872
9875
  key: 1,
9873
9876
  ref_key: "blockTree",
9874
9877
  ref: h,
9875
9878
  modelValue: D(_),
9876
- "onUpdate:modelValue": A[2] || (A[2] = (W) => ne(_) ? _.value = W : null)
9879
+ "onUpdate:modelValue": A[2] || (A[2] = (W) => oe(_) ? _.value = W : null)
9877
9880
  }, null, 8, ["modelValue"])) : ut("", !0),
9878
9881
  K("div", {
9879
9882
  style: j(l.value)
@@ -9983,12 +9986,12 @@ function Za() {
9983
9986
  const t = [];
9984
9987
  return t.push(x(f("LABEL_FUNC"))), t.push(x(f("LABEL_FLOW"))), t;
9985
9988
  }
9986
- const pe = { name: "APP_COMPUTE_CATEGORY", callback: Za };
9989
+ const de = { name: "APP_COMPUTE_CATEGORY", callback: Za };
9987
9990
  function tc() {
9988
9991
  const t = [];
9989
9992
  return t.push(y("app_debug_trace_v1", [Rt("OBJECT")])), t.push(y("popup_message_v1", [Rt("TEXT")])), t.push(y("open_confirm_dlg_v1")), t.push(y("open_prompt_dlg_v1")), t;
9990
9993
  }
9991
- const de = { name: "APP_MESSAGE_CATEGORY", callback: tc };
9994
+ const he = { name: "APP_MESSAGE_CATEGORY", callback: tc };
9992
9995
  function ec() {
9993
9996
  for (const t of g.app.appList)
9994
9997
  if (t.pages.length > 0)
@@ -9999,7 +10002,7 @@ function nc() {
9999
10002
  const t = [];
10000
10003
  return t.push(y("app_env_is_v1")), ec() && t.push(y("navigate_to_v1")), t;
10001
10004
  }
10002
- const he = { name: "APP_MISC_CATEGORY", callback: nc };
10005
+ const fe = { name: "APP_MISC_CATEGORY", callback: nc };
10003
10006
  function oc() {
10004
10007
  const { activeObject: t, activePage: e } = g.app;
10005
10008
  return !(t.type !== "page" || e.meta.states.length <= 0);
@@ -10019,7 +10022,7 @@ function ac() {
10019
10022
  const t = [];
10020
10023
  return t.push(x(f("LABEL_RESOURCE"))), t.push(y("upload_resource_v1")), t;
10021
10024
  }
10022
- const fe = { name: "APP_RESOURCE_CATEGORY", callback: ac }, xt = C.xml;
10025
+ const me = { name: "APP_RESOURCE_CATEGORY", callback: ac }, xt = C.xml;
10023
10026
  function cc() {
10024
10027
  const t = [];
10025
10028
  {
@@ -10046,11 +10049,11 @@ function cc() {
10046
10049
  const _t = {
10047
10050
  name: "PROCEDURE_CATEGORY",
10048
10051
  callback: cc
10049
- }, ee = C.xml;
10052
+ }, ne = C.xml;
10050
10053
  function rc() {
10051
10054
  const t = jt(), e = [];
10052
10055
  {
10053
- const o = ee.createElement("label");
10056
+ const o = ne.createElement("label");
10054
10057
  o.setAttribute("text", "%{BKY_LABEL_VARIABLE}"), e.push(o);
10055
10058
  }
10056
10059
  {
@@ -10069,16 +10072,16 @@ function rc() {
10069
10072
  return e;
10070
10073
  n.sort(St.compareByName);
10071
10074
  {
10072
- const o = ee.createElement("label");
10075
+ const o = ne.createElement("label");
10073
10076
  o.setAttribute("text", f("LABEL_CREATED")), e.push(o);
10074
10077
  }
10075
10078
  return n.forEach((o) => {
10076
10079
  {
10077
- const i = ee.createElement("block");
10080
+ const i = ne.createElement("block");
10078
10081
  i.setAttribute("type", "variable_get_v1"), i.appendChild(St.generateVariableFieldDom(o)), e.push(i);
10079
10082
  }
10080
10083
  {
10081
- const i = ee.createElement("block");
10084
+ const i = ne.createElement("block");
10082
10085
  i.setAttribute("type", "variable_set_v1"), i.appendChild(St.generateVariableFieldDom(o)), e.push(i);
10083
10086
  }
10084
10087
  }), e;
@@ -10109,30 +10112,30 @@ function uc() {
10109
10112
  }
10110
10113
  return t;
10111
10114
  }
10112
- const me = { name: "COMPUTE_DATA_CATEGORY", callback: uc };
10115
+ const Te = { name: "COMPUTE_DATA_CATEGORY", callback: uc };
10113
10116
  function lc() {
10114
- return Qt("flow").length > 0;
10117
+ return zt("flow").length > 0;
10115
10118
  }
10116
10119
  function _c() {
10117
10120
  const t = [];
10118
10121
  return g.compute.activeObject.type === "flow" && t.push(y("on_flow_state_event_v1")), lc() && console.assert(!0), t;
10119
10122
  }
10120
- const Te = { name: "COMPUTE_FLOW_CATEGORY", callback: _c };
10123
+ const Ee = { name: "COMPUTE_FLOW_CATEGORY", callback: _c };
10121
10124
  function pc() {
10122
- return Qt("func").length > 0;
10125
+ return zt("func").length > 0;
10123
10126
  }
10124
10127
  function dc() {
10125
10128
  const t = [];
10126
10129
  return g.compute.activeObject.type === "func" && (t.push(y("func_entry_v1")), g.compute.activeFunc.outputs.length > 0 && t.push(y("set_func_output_v1")), t.push(y("procedure_return_v1"))), pc() && t.push(y("call_func_internal_v1")), t;
10127
10130
  }
10128
- const Ee = { name: "COMPUTE_FUNC_CATEGORY", callback: dc };
10131
+ const ge = { name: "COMPUTE_FUNC_CATEGORY", callback: dc };
10129
10132
  function hc() {
10130
10133
  const t = [];
10131
10134
  return t.push(
10132
10135
  y("compute_debug_trace_v1", [Rt("OBJECT")])
10133
10136
  ), t;
10134
10137
  }
10135
- const ge = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Se = {
10138
+ const Ae = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Se = {
10136
10139
  kind: "category",
10137
10140
  name: "%{BKY_CATEGORY_COLOR}",
10138
10141
  categorystyle: "color_category",
@@ -10848,13 +10851,13 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Se = {
10848
10851
  kind: "category",
10849
10852
  name: "%{BKY_CATEGORY_MESSAGE}",
10850
10853
  categorystyle: "misc_category",
10851
- custom: de.name
10854
+ custom: he.name
10852
10855
  },
10853
10856
  {
10854
10857
  kind: "category",
10855
10858
  name: "%{BKY_CATEGORY_MISC}",
10856
10859
  categorystyle: "misc_category",
10857
- custom: he.name
10860
+ custom: fe.name
10858
10861
  },
10859
10862
  Pe,
10860
10863
  be,
@@ -10880,13 +10883,13 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Se = {
10880
10883
  kind: "category",
10881
10884
  name: "%{BKY_CATEGORY_RESOURCE}",
10882
10885
  categorystyle: "resource_category",
10883
- custom: fe.name
10886
+ custom: me.name
10884
10887
  },
10885
10888
  {
10886
10889
  kind: "category",
10887
10890
  name: "%{BKY_CATEGORY_COMPUTE}",
10888
10891
  categorystyle: "compute_category",
10889
- custom: pe.name
10892
+ custom: de.name
10890
10893
  }
10891
10894
  ]
10892
10895
  }, mc = {
@@ -10896,25 +10899,25 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Se = {
10896
10899
  kind: "category",
10897
10900
  name: "%{BKY_CATEGORY_FUNC}",
10898
10901
  categorystyle: "func_category",
10899
- custom: Ee.name
10902
+ custom: ge.name
10900
10903
  },
10901
10904
  {
10902
10905
  kind: "category",
10903
10906
  name: "%{BKY_CATEGORY_FLOW}",
10904
10907
  categorystyle: "flow_category",
10905
- custom: Te.name
10908
+ custom: Ee.name
10906
10909
  },
10907
10910
  {
10908
10911
  kind: "category",
10909
10912
  name: "%{BKY_CATEGORY_DATA}",
10910
10913
  categorystyle: "data_category",
10911
- custom: me.name
10914
+ custom: Te.name
10912
10915
  },
10913
10916
  {
10914
10917
  kind: "category",
10915
10918
  name: "%{BKY_CATEGORY_MISC}",
10916
10919
  categorystyle: "misc_category",
10917
- custom: ge.name
10920
+ custom: Ae.name
10918
10921
  },
10919
10922
  Pe,
10920
10923
  be,
@@ -10943,25 +10946,25 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Se = {
10943
10946
  kind: "category",
10944
10947
  name: "%{BKY_CATEGORY_FUNC}",
10945
10948
  categorystyle: "func_category",
10946
- custom: Ee.name
10949
+ custom: ge.name
10947
10950
  },
10948
10951
  {
10949
10952
  kind: "category",
10950
10953
  name: "%{BKY_CATEGORY_FLOW}",
10951
10954
  categorystyle: "flow_category",
10952
- custom: Te.name
10955
+ custom: Ee.name
10953
10956
  },
10954
10957
  {
10955
10958
  kind: "category",
10956
10959
  name: "%{BKY_CATEGORY_DATA}",
10957
10960
  categorystyle: "data_category",
10958
- custom: me.name
10961
+ custom: Te.name
10959
10962
  },
10960
10963
  {
10961
10964
  kind: "category",
10962
10965
  name: "%{BKY_CATEGORY_MISC}",
10963
10966
  categorystyle: "misc_category",
10964
- custom: ge.name
10967
+ custom: Ae.name
10965
10968
  },
10966
10969
  Pe,
10967
10970
  be,
@@ -11027,13 +11030,13 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Se = {
11027
11030
  kind: "category",
11028
11031
  name: "%{BKY_CATEGORY_MESSAGE}",
11029
11032
  categorystyle: "misc_category",
11030
- custom: de.name
11033
+ custom: he.name
11031
11034
  },
11032
11035
  {
11033
11036
  kind: "category",
11034
11037
  name: "%{BKY_CATEGORY_MISC}",
11035
11038
  categorystyle: "misc_category",
11036
- custom: he.name
11039
+ custom: fe.name
11037
11040
  },
11038
11041
  Pe,
11039
11042
  be,
@@ -11059,13 +11062,13 @@ const ge = { name: "COMPUTE_MISC_CATEGORY", callback: hc }, Se = {
11059
11062
  kind: "category",
11060
11063
  name: "%{BKY_CATEGORY_RESOURCE}",
11061
11064
  categorystyle: "resource_category",
11062
- custom: fe.name
11065
+ custom: me.name
11063
11066
  },
11064
11067
  {
11065
11068
  kind: "category",
11066
11069
  name: "%{BKY_CATEGORY_COMPUTE}",
11067
11070
  categorystyle: "compute_category",
11068
- custom: pe.name
11071
+ custom: de.name
11069
11072
  }
11070
11073
  ]
11071
11074
  }, He = {
@@ -11107,7 +11110,7 @@ function Oc(t, e, n) {
11107
11110
  function o({ name: i, callback: a }) {
11108
11111
  t.registerToolboxCategoryCallback(i, () => a(e));
11109
11112
  }
11110
- e === "page" ? n === "v1" && (o(po), o(de), o(he), o(pt), o(_t), o(fe), o(pe)) : e === "comp" ? n === "v1" && (o(_o), o(de), o(he), o(pt), o(_t), o(fe), o(pe)) : e === "func" ? n === "v1" && (o(Ee), o(Te), o(me), o(ge), o(pt), o(_t)) : e === "flow" && n === "v1" && (o(Ee), o(Te), o(me), o(ge), o(pt), o(_t));
11113
+ e === "page" ? n === "v1" && (o(po), o(he), o(fe), o(pt), o(_t), o(me), o(de)) : e === "comp" ? n === "v1" && (o(_o), o(he), o(fe), o(pt), o(_t), o(me), o(de)) : e === "func" ? n === "v1" && (o(ge), o(Ee), o(Te), o(Ae), o(pt), o(_t)) : e === "flow" && n === "v1" && (o(ge), o(Ee), o(Te), o(Ae), o(pt), o(_t));
11111
11114
  }
11112
11115
  function yc(t) {
11113
11116
  const { router: e } = kt;
@@ -11156,8 +11159,8 @@ function vc(t, e) {
11156
11159
  l.push(_);
11157
11160
  r.initData(l);
11158
11161
  for (let _ = 0; _ < l.length; _++) {
11159
- const d = l[_], h = r.getInput("ENTRY" + _);
11160
- o(i[d], h.connection);
11162
+ const p = l[_], h = r.getInput("ENTRY" + _);
11163
+ o(i[p], h.connection);
11161
11164
  }
11162
11165
  } else if (c === "json_array_v1") {
11163
11166
  r.initData(i.length);
@@ -11216,8 +11219,8 @@ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ rt({
11216
11219
  }),
11217
11220
  emits: /* @__PURE__ */ je(["ready"], ["update:lock", "update:scale"]),
11218
11221
  setup(t, { expose: e, emit: n }) {
11219
- const { backgroundColor2: o } = Xt(), i = $t(t, "lock"), a = $t(t, "scale"), c = n, r = `blocklyEditor${Xe()}`, l = Bt(), _ = Kt("parentContainer"), d = Kt("clean"), h = Kt("navigator"), p = {};
11220
- Da(p);
11222
+ const { backgroundColor2: o } = Xt(), i = $t(t, "lock"), a = $t(t, "scale"), c = n, r = `blocklyEditor${Xe()}`, l = Bt(), _ = Kt("parentContainer"), p = Kt("clean"), h = Kt("navigator"), d = {};
11223
+ Da(d);
11221
11224
  const m = Bt(!0), A = Bt(!1), R = w(() => t.type === "json" ? "tree" : "list"), P = w(() => ({
11222
11225
  width: "100%",
11223
11226
  height: "calc(100% - 48px)"
@@ -11267,17 +11270,17 @@ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ rt({
11267
11270
  console.assert(!1);
11268
11271
  return;
11269
11272
  }
11270
- 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);
11273
+ Yo(_.value), await In(t.locale), d.workspace = Ac(l.value, t.type, t.version, t.dark), d.workspace.addChangeListener(I.disableOrphans), d.workspace.addChangeListener(mo);
11271
11274
  const N = document.querySelector(`#${r} .blocklyFlyout`);
11272
11275
  new MutationObserver((Ue) => {
11273
- Ue.forEach((Zt) => {
11274
- Zt.type === "attributes" && Zt.attributeName === "style" && (Ut.value = p.workspace.getFlyout().isVisible());
11276
+ Ue.forEach((te) => {
11277
+ te.type === "attributes" && te.attributeName === "style" && (Ut.value = d.workspace.getFlyout().isVisible());
11275
11278
  });
11276
- }).observe(N, { attributes: !0 }), Ut.value = p.workspace.getFlyout().isVisible(), pn(), dn(), await ni(), c("ready");
11279
+ }).observe(N, { attributes: !0 }), Ut.value = d.workspace.getFlyout().isVisible(), pn(), dn(), await ni(), c("ready");
11277
11280
  }), An(() => {
11278
11281
  Ut.value = !1;
11279
11282
  }), Fo(l, () => {
11280
- p.workspace && wo(p.workspace);
11283
+ d.workspace && wo(d.workspace);
11281
11284
  });
11282
11285
  async function mo(N) {
11283
11286
  if (N.type === I.FINISHED_LOADING) {
@@ -11288,7 +11291,7 @@ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ rt({
11288
11291
  }
11289
11292
  if (!m.value) {
11290
11293
  if (N.type === I.VIEWPORT_CHANGE) {
11291
- a.value = p.workspace.getScale();
11294
+ a.value = d.workspace.getScale();
11292
11295
  return;
11293
11296
  }
11294
11297
  N.type === I.BLOCK_DRAG && (N.isStart ? A.value = !0 : A.value = !1), setTimeout(() => {
@@ -11297,20 +11300,20 @@ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ rt({
11297
11300
  }
11298
11301
  }
11299
11302
  const To = (N) => {
11300
- m.value = !0, t.type === "json" ? vc(N, p.workspace) : $.workspaces.load(N, p.workspace);
11301
- }, Eo = () => t.type === "json" ? Cc(p.workspace) : $.workspaces.save(p.workspace), go = () => {
11303
+ m.value = !0, t.type === "json" ? vc(N, d.workspace) : $.workspaces.load(N, d.workspace);
11304
+ }, Eo = () => t.type === "json" ? Cc(d.workspace) : $.workspaces.save(d.workspace), go = () => {
11302
11305
  if (t.type === "json")
11303
11306
  console.assert(!1);
11304
11307
  else
11305
- return s.workspaceToCode(p.workspace);
11306
- }, Ao = () => Ra(p.workspace), pn = () => {
11307
- p.workspace.setIsReadOnly(i.value), p.workspace.isReadOnly() && (Ut.value = !1);
11308
+ return s.workspaceToCode(d.workspace);
11309
+ }, Ao = () => Ra(d.workspace), pn = () => {
11310
+ d.workspace.setIsReadOnly(i.value), d.workspace.isReadOnly() && (Ut.value = !1);
11308
11311
  }, dn = () => {
11309
- p.workspace.setScale(a.value);
11312
+ d.workspace.setScale(a.value);
11310
11313
  }, Io = () => {
11311
- p.workspace.fireChangeListener(new Hn());
11314
+ d.workspace.fireChangeListener(new Hn());
11312
11315
  }, hn = () => {
11313
- d.value?.cleanWorkspace();
11316
+ p.value?.cleanWorkspace();
11314
11317
  }, fn = () => {
11315
11318
  i.value = !i.value;
11316
11319
  }, mn = () => {
@@ -11331,7 +11334,7 @@ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ rt({
11331
11334
  La(N ? "dark" : "light");
11332
11335
  }
11333
11336
  ), Vt(Ut, (N) => {
11334
- N || p.workspace?.hideChaff();
11337
+ N || d.workspace?.hideChaff();
11335
11338
  }), Vt(i, () => {
11336
11339
  pn();
11337
11340
  }), Vt(a, () => {
@@ -11344,7 +11347,7 @@ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ rt({
11344
11347
  generateReactivity: Ao,
11345
11348
  fireStateChange: Io
11346
11349
  }), (N, Ot) => {
11347
- const Ue = M("v-icon"), Zt = M("x-loading");
11350
+ const Ue = M("v-icon"), te = M("x-loading");
11348
11351
  return S(), tt("div", kc, [
11349
11352
  K("div", {
11350
11353
  id: r,
@@ -11374,7 +11377,7 @@ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ rt({
11374
11377
  }, [
11375
11378
  L(Ma, {
11376
11379
  ref_key: "clean",
11377
- ref: d,
11380
+ ref: p,
11378
11381
  lock: i.value
11379
11382
  }, null, 8, ["lock"]),
11380
11383
  L(Ua, {
@@ -11401,7 +11404,7 @@ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ rt({
11401
11404
  ref: _,
11402
11405
  style: j(fo.value)
11403
11406
  }, null, 4),
11404
- L(Zt, {
11407
+ L(te, {
11405
11408
  open: m.value,
11406
11409
  "z-index": 99
11407
11410
  }, null, 8, ["open"])
@@ -11437,7 +11440,7 @@ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ rt({
11437
11440
  }), Sc = { class: "text-subtitle-1" }, Bc = { class: "w-100 h-100 overflow-auto" }, bc = /* @__PURE__ */ rt({
11438
11441
  __name: "index",
11439
11442
  setup(t) {
11440
- const { t: e } = Jt(), { sysBarAvail: n } = Yn(), { backgroundColor0: o, backgroundColor2: i } = Xt(), a = Bt(""), c = w(() => {
11443
+ const { t: e } = qt(), { sysBarAvail: n } = Yn(), { backgroundColor0: o, backgroundColor2: i } = Xt(), a = Bt(""), c = w(() => {
11441
11444
  let _ = 48;
11442
11445
  return n.value && (_ += 24), {
11443
11446
  position: "relative",
@@ -11446,16 +11449,16 @@ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ rt({
11446
11449
  }), r = (_) => {
11447
11450
  a.value = _.code;
11448
11451
  }, { open: l } = nn("sourceDlg", r);
11449
- return (_, d) => {
11450
- const h = M("v-sheet"), p = M("v-btn"), m = M("v-spacer"), A = M("v-dialog");
11452
+ return (_, p) => {
11453
+ const h = M("v-sheet"), d = M("v-btn"), m = M("v-spacer"), A = M("v-dialog");
11451
11454
  return S(), st(A, {
11452
11455
  modelValue: D(l),
11453
- "onUpdate:modelValue": d[1] || (d[1] = (R) => ne(l) ? l.value = R : null),
11456
+ "onUpdate:modelValue": p[1] || (p[1] = (R) => oe(l) ? l.value = R : null),
11454
11457
  fullscreen: "",
11455
11458
  "no-click-animation": "",
11456
11459
  persistent: "",
11457
11460
  transition: "dialog-bottom-transition",
11458
- onKeydown: d[2] || (d[2] = $n(wt((R) => l.value = !1, ["stop", "prevent"]), ["esc"]))
11461
+ onKeydown: p[2] || (p[2] = $n(wt((R) => l.value = !1, ["stop", "prevent"]), ["esc"]))
11459
11462
  }, {
11460
11463
  default: at(() => [
11461
11464
  L(h, {
@@ -11475,11 +11478,11 @@ const kc = { class: "position-relative w-100 h-100" }, Nc = /* @__PURE__ */ rt({
11475
11478
  height: 48
11476
11479
  }, {
11477
11480
  default: at(() => [
11478
- L(p, {
11481
+ L(d, {
11479
11482
  density: "comfortable",
11480
11483
  icon: "mdi-close",
11481
11484
  variant: "text",
11482
- onClick: d[0] || (d[0] = (R) => l.value = !1)
11485
+ onClick: p[0] || (p[0] = (R) => l.value = !1)
11483
11486
  }),
11484
11487
  K("span", Sc, Ht(D(e)("x-block-lib.dlg.source.title")), 1),
11485
11488
  L(m)