x-block-lib 0.6.1 → 0.6.2
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 +646 -632
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9,10 +9,10 @@
|
|
|
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}`)),document.head.appendChild(l)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
10
10
|
var Ll = Object.defineProperty;
|
|
11
11
|
var Sl = (e, t, n) => t in e ? Ll(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
12
|
-
var
|
|
13
|
-
import { getCurrentScope as Bl, onScopeDispose as Rl, computed as
|
|
14
|
-
import { d as C, j as r, O as p, E as w, u as k, X as Fl, M as T, B as
|
|
15
|
-
import { openConfirmDlg as Jl, openPromptDlg as Ql, eventBus as
|
|
12
|
+
var nt = (e, t, n) => Sl(e, typeof t != "symbol" ? t + "" : t, n);
|
|
13
|
+
import { getCurrentScope as Bl, onScopeDispose as Rl, computed as Be, toValue as Na, watch as Lt, shallowRef as Dl, getCurrentInstance as xo, onMounted as dn, defineComponent as ht, onBeforeUnmount as Oo, resolveComponent as Ie, createBlock as pt, openBlock as Re, unref as X, withCtx as Ze, createVNode as he, mergeProps as Zi, useModel as Di, toRefs as Ml, ref as Mt, reactive as Pl, h as Mi, nextTick as es, onUnmounted as Ul, isRef as kn, resolveDirective as xl, withDirectives as wl, createElementBlock as Et, normalizeStyle as ct, createElementVNode as at, toDisplayString as wo, withModifiers as Ln, Fragment as ka, renderList as Vl, withKeys as La, createCommentVNode as cn, mergeModels as Ns } from "vue";
|
|
14
|
+
import { d as C, j as r, O as p, E as w, u as k, X as Fl, M as T, B as P, i as pe, F as $, a as Wt, b as Vo, c as ye, C as Sa, e as Yl, P as Pi, N as ts, V as po, g as Pt, f as Kl, h as Ba, s as Hl, S as Ye, k as _o, l as $t, m as sn, n as no, o as ui, p as On, q as ks, G as pi, r as $l, t as Gl, v as _i, U as oo, D as io, w as en, x as jl, T as Fo, y as Ra, z as Wl, A as Xl, H as Ls, I as zl, J as ql } from "./blockly-o2yt2sz2.js";
|
|
15
|
+
import { openConfirmDlg as Jl, openPromptDlg as Ql, eventBus as ut, messageWarning as Da, useColor as Yo, useViewStack as Ko, useSystem as Ma, injectDark as Zl, injectLocale as ec } from "x-essential-lib";
|
|
16
16
|
import { pkgs as tc, elements as Ke, getPropTag as Ho } from "x-runtime-lib";
|
|
17
17
|
import { globalState as V } from "x-state-lib";
|
|
18
18
|
import { useI18n as Kn } from "vue-i18n";
|
|
@@ -37,14 +37,14 @@ function _c() {
|
|
|
37
37
|
}
|
|
38
38
|
function dc(e) {
|
|
39
39
|
const t = _c();
|
|
40
|
-
return
|
|
40
|
+
return Be(() => (t.value, !!e()));
|
|
41
41
|
}
|
|
42
42
|
function hc(e, t, n = {}) {
|
|
43
43
|
const { window: o = pc, ...i } = n;
|
|
44
44
|
let s;
|
|
45
45
|
const a = dc(() => o && "ResizeObserver" in o), l = () => {
|
|
46
46
|
s && (s.disconnect(), s = void 0);
|
|
47
|
-
}, c =
|
|
47
|
+
}, c = Be(() => {
|
|
48
48
|
const h = Na(e);
|
|
49
49
|
return Array.isArray(h) ? h.map((g) => Ss(g)) : [Ss(h)];
|
|
50
50
|
}), _ = Lt(
|
|
@@ -486,8 +486,8 @@ function yp(e, t, n) {
|
|
|
486
486
|
function xi(e) {
|
|
487
487
|
return yp(e, Vu, Ip);
|
|
488
488
|
}
|
|
489
|
-
var wi = zt(ft, "DataView"), Vi = zt(ft, "Promise"), Fi = zt(ft, "Set"), Ks = "[object Map]", Cp = "[object Object]", Hs = "[object Promise]", $s = "[object Set]", Gs = "[object WeakMap]", js = "[object DataView]", Np = Xt(wi), kp = Xt(wn), Lp = Xt(Vi), Sp = Xt(Fi), Bp = Xt(Ui),
|
|
490
|
-
(wi &&
|
|
489
|
+
var wi = zt(ft, "DataView"), Vi = zt(ft, "Promise"), Fi = zt(ft, "Set"), Ks = "[object Map]", Cp = "[object Object]", Hs = "[object Promise]", $s = "[object Set]", Gs = "[object WeakMap]", js = "[object DataView]", Np = Xt(wi), kp = Xt(wn), Lp = Xt(Vi), Sp = Xt(Fi), Bp = Xt(Ui), st = Hn;
|
|
490
|
+
(wi && st(new wi(new ArrayBuffer(1))) != js || wn && st(new wn()) != Ks || Vi && st(Vi.resolve()) != Hs || Fi && st(new Fi()) != $s || Ui && st(new Ui()) != Gs) && (st = function(e) {
|
|
491
491
|
var t = Hn(e), n = t == Cp ? e.constructor : void 0, o = n ? Xt(n) : "";
|
|
492
492
|
if (o)
|
|
493
493
|
switch (o) {
|
|
@@ -570,11 +570,11 @@ function a_(e) {
|
|
|
570
570
|
}
|
|
571
571
|
var r_ = "[object Map]";
|
|
572
572
|
function l_(e) {
|
|
573
|
-
return Gt(e) &&
|
|
573
|
+
return Gt(e) && st(e) == r_;
|
|
574
574
|
}
|
|
575
575
|
var zs = hn && hn.isMap, c_ = zs ? os(zs) : l_, u_ = "[object Set]";
|
|
576
576
|
function p_(e) {
|
|
577
|
-
return Gt(e) &&
|
|
577
|
+
return Gt(e) && st(e) == u_;
|
|
578
578
|
}
|
|
579
579
|
var qs = hn && hn.isSet, __ = qs ? os(qs) : p_, Wa = "[object Arguments]", d_ = "[object Array]", h_ = "[object Boolean]", f_ = "[object Date]", g_ = "[object Error]", Xa = "[object Function]", m_ = "[object GeneratorFunction]", T_ = "[object Map]", E_ = "[object Number]", za = "[object Object]", A_ = "[object RegExp]", v_ = "[object Set]", O_ = "[object String]", b_ = "[object Symbol]", I_ = "[object WeakMap]", y_ = "[object ArrayBuffer]", C_ = "[object DataView]", N_ = "[object Float32Array]", k_ = "[object Float64Array]", L_ = "[object Int8Array]", S_ = "[object Int16Array]", B_ = "[object Int32Array]", R_ = "[object Uint8Array]", D_ = "[object Uint8ClampedArray]", M_ = "[object Uint16Array]", P_ = "[object Uint32Array]", ue = {};
|
|
580
580
|
ue[Wa] = ue[d_] = ue[y_] = ue[C_] = ue[h_] = ue[f_] = ue[N_] = ue[k_] = ue[L_] = ue[S_] = ue[B_] = ue[T_] = ue[E_] = ue[za] = ue[A_] = ue[v_] = ue[O_] = ue[b_] = ue[R_] = ue[D_] = ue[M_] = ue[P_] = !0;
|
|
@@ -589,7 +589,7 @@ function ho(e, t, n, o, i, s) {
|
|
|
589
589
|
if (l)
|
|
590
590
|
a = Mp(e);
|
|
591
591
|
else {
|
|
592
|
-
var c =
|
|
592
|
+
var c = st(e), _ = c == Xa || c == m_;
|
|
593
593
|
if (bo(e))
|
|
594
594
|
return Ep(e);
|
|
595
595
|
if (c == za || c == Wa || _ && !i)
|
|
@@ -661,9 +661,9 @@ function Ja(e, t, n, o, i, s) {
|
|
|
661
661
|
break;
|
|
662
662
|
}
|
|
663
663
|
if (m) {
|
|
664
|
-
if (!Y_(t, function(
|
|
665
|
-
if (!K_(m,
|
|
666
|
-
return m.push(
|
|
664
|
+
if (!Y_(t, function(j, U) {
|
|
665
|
+
if (!K_(m, U) && (I === j || i(I, j, n, o, s)))
|
|
666
|
+
return m.push(U);
|
|
667
667
|
})) {
|
|
668
668
|
g = !1;
|
|
669
669
|
break;
|
|
@@ -740,24 +740,24 @@ function ud(e, t, n, o, i, s) {
|
|
|
740
740
|
s.set(e, t), s.set(t, e);
|
|
741
741
|
for (var G = a; ++h < c; ) {
|
|
742
742
|
g = l[h];
|
|
743
|
-
var
|
|
743
|
+
var j = e[g], U = t[g];
|
|
744
744
|
if (o)
|
|
745
|
-
var
|
|
746
|
-
if (!(
|
|
745
|
+
var J = a ? o(U, j, g, t, e, s) : o(j, U, g, e, t, s);
|
|
746
|
+
if (!(J === void 0 ? j === U || i(j, U, n, o, s) : J)) {
|
|
747
747
|
O = !1;
|
|
748
748
|
break;
|
|
749
749
|
}
|
|
750
750
|
G || (G = g == "constructor");
|
|
751
751
|
}
|
|
752
752
|
if (O && !G) {
|
|
753
|
-
var
|
|
754
|
-
|
|
753
|
+
var ge = e.constructor, Q = t.constructor;
|
|
754
|
+
ge != Q && "constructor" in e && "constructor" in t && !(typeof ge == "function" && ge instanceof ge && typeof Q == "function" && Q instanceof Q) && (O = !1);
|
|
755
755
|
}
|
|
756
756
|
return s.delete(e), s.delete(t), O;
|
|
757
757
|
}
|
|
758
758
|
var pd = 1, Qs = "[object Arguments]", Zs = "[object Array]", so = "[object Object]", _d = Object.prototype, ea = _d.hasOwnProperty;
|
|
759
759
|
function dd(e, t, n, o, i, s) {
|
|
760
|
-
var a = Un(e), l = Un(t), c = a ? Zs :
|
|
760
|
+
var a = Un(e), l = Un(t), c = a ? Zs : st(e), _ = l ? Zs : st(t);
|
|
761
761
|
c = c == Qs ? so : c, _ = _ == Qs ? so : _;
|
|
762
762
|
var d = c == so, h = _ == so, g = c == _;
|
|
763
763
|
if (g && bo(e)) {
|
|
@@ -782,10 +782,10 @@ function Qa(e, t, n, o, i) {
|
|
|
782
782
|
function we(e, t) {
|
|
783
783
|
return Qa(e, t);
|
|
784
784
|
}
|
|
785
|
-
function
|
|
785
|
+
function Ae(e) {
|
|
786
786
|
return e.length <= 0 && e.push([T.NO_OPTION, ""]), e;
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function Ee(e) {
|
|
789
789
|
let t = "";
|
|
790
790
|
if (e.type === "string") {
|
|
791
791
|
let n = "";
|
|
@@ -849,7 +849,7 @@ function fn(e) {
|
|
|
849
849
|
const { i18n: t } = V.base, n = [];
|
|
850
850
|
return $n(e).forEach((i) => {
|
|
851
851
|
n.push([t.global.t(i.name), i.key]);
|
|
852
|
-
}),
|
|
852
|
+
}), Ae(n);
|
|
853
853
|
}
|
|
854
854
|
function Yi(e) {
|
|
855
855
|
const t = Ke[e];
|
|
@@ -864,7 +864,7 @@ function hd(e) {
|
|
|
864
864
|
const t = [];
|
|
865
865
|
return Yi(e).forEach(({ key: o, name: i }) => {
|
|
866
866
|
t.push([T[i] ?? i, o]);
|
|
867
|
-
}),
|
|
867
|
+
}), Ae(t);
|
|
868
868
|
}
|
|
869
869
|
function Ki(e) {
|
|
870
870
|
const t = Ke[e];
|
|
@@ -879,7 +879,7 @@ function fd(e) {
|
|
|
879
879
|
const t = [];
|
|
880
880
|
return Ki(e).forEach(({ key: o, name: i }) => {
|
|
881
881
|
t.push([T[i] ?? i, o]);
|
|
882
|
-
}),
|
|
882
|
+
}), Ae(t);
|
|
883
883
|
}
|
|
884
884
|
function Vn(e, t) {
|
|
885
885
|
var c, _;
|
|
@@ -909,7 +909,7 @@ function Za(e, t) {
|
|
|
909
909
|
s.names.forEach((l, c) => {
|
|
910
910
|
c !== 0 && (a += " - "), a += n.global.t(l);
|
|
911
911
|
}), o.push([a, s.keys]);
|
|
912
|
-
}),
|
|
912
|
+
}), Ae(o);
|
|
913
913
|
}
|
|
914
914
|
function Tn(e) {
|
|
915
915
|
const { nodes: t } = V.app.activeObject, n = [];
|
|
@@ -941,7 +941,7 @@ function Gn(e) {
|
|
|
941
941
|
}
|
|
942
942
|
let a = t.global.t(s.name);
|
|
943
943
|
i.alias && (a += ` / ${i.alias}`), n.push([a, i.id]);
|
|
944
|
-
}),
|
|
944
|
+
}), Ae(n);
|
|
945
945
|
}
|
|
946
946
|
function Hi(e) {
|
|
947
947
|
const t = He(e);
|
|
@@ -965,7 +965,7 @@ function gd(e) {
|
|
|
965
965
|
const t = [];
|
|
966
966
|
return Hi(e).forEach(({ key: o, name: i }) => {
|
|
967
967
|
t.push([T[i] ?? i, o]);
|
|
968
|
-
}),
|
|
968
|
+
}), Ae(t);
|
|
969
969
|
}
|
|
970
970
|
function $i(e) {
|
|
971
971
|
const t = He(e);
|
|
@@ -989,7 +989,7 @@ function md(e) {
|
|
|
989
989
|
const t = [];
|
|
990
990
|
return $i(e).forEach(({ key: o, name: i }) => {
|
|
991
991
|
t.push([T[i] ?? i, o]);
|
|
992
|
-
}),
|
|
992
|
+
}), Ae(t);
|
|
993
993
|
}
|
|
994
994
|
function Fn(e, t) {
|
|
995
995
|
var _, d;
|
|
@@ -1019,7 +1019,7 @@ function er(e, t) {
|
|
|
1019
1019
|
s.names.forEach((l, c) => {
|
|
1020
1020
|
c !== 0 && (a += " - "), a += n.global.t(l);
|
|
1021
1021
|
}), o.push([a, s.keys]);
|
|
1022
|
-
}),
|
|
1022
|
+
}), Ae(o);
|
|
1023
1023
|
}
|
|
1024
1024
|
const Td = {
|
|
1025
1025
|
init: function() {
|
|
@@ -1143,7 +1143,7 @@ const Td = {
|
|
|
1143
1143
|
const t = this.method.inputs[e];
|
|
1144
1144
|
if (!t.type)
|
|
1145
1145
|
continue;
|
|
1146
|
-
const n =
|
|
1146
|
+
const n = Ee({
|
|
1147
1147
|
type: t.type,
|
|
1148
1148
|
default: t.default
|
|
1149
1149
|
});
|
|
@@ -1183,7 +1183,7 @@ const Td = {
|
|
|
1183
1183
|
this.setWarningText(null);
|
|
1184
1184
|
}
|
|
1185
1185
|
};
|
|
1186
|
-
|
|
1186
|
+
P.call_node_method_v1 = Td;
|
|
1187
1187
|
r.forBlock.call_node_method_v1 = function(e) {
|
|
1188
1188
|
const t = r.quote_, n = e;
|
|
1189
1189
|
let o = n.node.id;
|
|
@@ -1327,7 +1327,7 @@ const Ed = {
|
|
|
1327
1327
|
const t = this.method.inputs[e];
|
|
1328
1328
|
if (!t.type)
|
|
1329
1329
|
continue;
|
|
1330
|
-
const n =
|
|
1330
|
+
const n = Ee({
|
|
1331
1331
|
type: t.type,
|
|
1332
1332
|
default: t.default
|
|
1333
1333
|
});
|
|
@@ -1363,7 +1363,7 @@ const Ed = {
|
|
|
1363
1363
|
this.setWarningText(null);
|
|
1364
1364
|
}
|
|
1365
1365
|
};
|
|
1366
|
-
|
|
1366
|
+
P.call_node_method_as_v1 = Ed;
|
|
1367
1367
|
r.forBlock.call_node_method_as_v1 = function(e) {
|
|
1368
1368
|
const t = r.quote_, n = e, o = r.valueToCode(n, "NODE", p.NONE) || "";
|
|
1369
1369
|
if (!o)
|
|
@@ -1400,7 +1400,7 @@ function tr() {
|
|
|
1400
1400
|
const e = [];
|
|
1401
1401
|
return Yn().forEach((n) => {
|
|
1402
1402
|
e.push([n.name, n.id]);
|
|
1403
|
-
}),
|
|
1403
|
+
}), Ae(e);
|
|
1404
1404
|
}
|
|
1405
1405
|
function Gi(e) {
|
|
1406
1406
|
const t = V.app.activeComp.meta.methods.find(
|
|
@@ -1419,7 +1419,7 @@ function vd(e) {
|
|
|
1419
1419
|
const t = [];
|
|
1420
1420
|
return Gi(e).forEach((o) => {
|
|
1421
1421
|
t.push([o.name, o.id]);
|
|
1422
|
-
}),
|
|
1422
|
+
}), Ae(t);
|
|
1423
1423
|
}
|
|
1424
1424
|
function nr() {
|
|
1425
1425
|
return V.app.activeComp.meta.events;
|
|
@@ -1431,7 +1431,7 @@ function Od() {
|
|
|
1431
1431
|
const e = [];
|
|
1432
1432
|
return nr().forEach((n) => {
|
|
1433
1433
|
e.push([n.name, n.id]);
|
|
1434
|
-
}),
|
|
1434
|
+
}), Ae(e);
|
|
1435
1435
|
}
|
|
1436
1436
|
const bd = {
|
|
1437
1437
|
init: function() {
|
|
@@ -1517,7 +1517,7 @@ const bd = {
|
|
|
1517
1517
|
this.setWarningText(null);
|
|
1518
1518
|
}
|
|
1519
1519
|
};
|
|
1520
|
-
|
|
1520
|
+
P.comp_method_impl_v1 = bd;
|
|
1521
1521
|
r.forBlock.comp_method_impl_v1 = function(e) {
|
|
1522
1522
|
const t = e;
|
|
1523
1523
|
return `{${r.statementToCode(t, "HANDLE")}}`;
|
|
@@ -1586,7 +1586,7 @@ const Id = {
|
|
|
1586
1586
|
this.node.alias !== e.alias && (this.node.alias = e.alias), this.setWarningText(null);
|
|
1587
1587
|
}
|
|
1588
1588
|
};
|
|
1589
|
-
|
|
1589
|
+
P.get_node_v1 = Id;
|
|
1590
1590
|
r.forBlock.get_node_v1 = function(e) {
|
|
1591
1591
|
const t = e;
|
|
1592
1592
|
return [r.quote_(t.node.id), p.ATOMIC];
|
|
@@ -1685,7 +1685,7 @@ const yd = {
|
|
|
1685
1685
|
we(t.names, this.prop.names) || (this.prop.names = t.names), this.setWarningText(null);
|
|
1686
1686
|
}
|
|
1687
1687
|
};
|
|
1688
|
-
|
|
1688
|
+
P.get_node_prop_v1 = yd;
|
|
1689
1689
|
r.forBlock.get_node_prop_v1 = function(e) {
|
|
1690
1690
|
const t = e, n = r.quote_(t.node.id), o = r.quote_(t.prop.keys);
|
|
1691
1691
|
return [`__getNodePropV1__(${n}, ${o})`, p.ATOMIC];
|
|
@@ -1782,7 +1782,7 @@ const Cd = {
|
|
|
1782
1782
|
we(t.names, this.prop.names) || (this.prop.names = t.names), this.setWarningText(null);
|
|
1783
1783
|
}
|
|
1784
1784
|
};
|
|
1785
|
-
|
|
1785
|
+
P.get_node_prop_as_v1 = Cd;
|
|
1786
1786
|
r.forBlock.get_node_prop_as_v1 = function(e) {
|
|
1787
1787
|
const t = e, n = r.valueToCode(t, "NODE", p.ATOMIC) || "null", o = r.quote_(t.prop.keys);
|
|
1788
1788
|
return [`__getNodePropV1__(${n}, ${o})`, p.ATOMIC];
|
|
@@ -1802,7 +1802,7 @@ function kd() {
|
|
|
1802
1802
|
const e = [];
|
|
1803
1803
|
return or().forEach((n) => {
|
|
1804
1804
|
e.push([n.name, n.id]);
|
|
1805
|
-
}),
|
|
1805
|
+
}), Ae(e);
|
|
1806
1806
|
}
|
|
1807
1807
|
const Ld = {
|
|
1808
1808
|
init: function() {
|
|
@@ -1863,7 +1863,7 @@ const Ld = {
|
|
|
1863
1863
|
this.setWarningText(null);
|
|
1864
1864
|
}
|
|
1865
1865
|
};
|
|
1866
|
-
|
|
1866
|
+
P.get_page_argument_v1 = Ld;
|
|
1867
1867
|
r.forBlock.get_page_argument_v1 = function(e) {
|
|
1868
1868
|
const t = e;
|
|
1869
1869
|
return [`__getPageArgumentV1__(${r.quote_(t.argument.id)})`, p.FUNCTION_CALL];
|
|
@@ -1878,7 +1878,7 @@ function Sd() {
|
|
|
1878
1878
|
const e = [];
|
|
1879
1879
|
return as().forEach((n) => {
|
|
1880
1880
|
e.push([n.name, n.id]);
|
|
1881
|
-
}),
|
|
1881
|
+
}), Ae(e);
|
|
1882
1882
|
}
|
|
1883
1883
|
function ji(e) {
|
|
1884
1884
|
const t = V.app.appList.find((n) => n.id === e);
|
|
@@ -1893,7 +1893,7 @@ function Bd(e) {
|
|
|
1893
1893
|
const t = [];
|
|
1894
1894
|
return ji(e).forEach((o) => {
|
|
1895
1895
|
t.push([o.name, o.id]);
|
|
1896
|
-
}),
|
|
1896
|
+
}), Ae(t);
|
|
1897
1897
|
}
|
|
1898
1898
|
const Rd = {
|
|
1899
1899
|
init: function() {
|
|
@@ -1990,7 +1990,7 @@ const Rd = {
|
|
|
1990
1990
|
t.name !== this.page.name && (this.page.name = t.name), this.setWarningText(null);
|
|
1991
1991
|
}
|
|
1992
1992
|
};
|
|
1993
|
-
|
|
1993
|
+
P.navigate_to_v1 = Rd;
|
|
1994
1994
|
r.forBlock.navigate_to_v1 = function(e) {
|
|
1995
1995
|
const t = e, n = r.quote_(t.app.id), o = r.quote_(t.page.id), i = r.quote_(t.getFieldValue("MODE"));
|
|
1996
1996
|
return `__navigateToV1__(${n}, ${o}, ${i});
|
|
@@ -2116,7 +2116,7 @@ const Dd = {
|
|
|
2116
2116
|
this.setWarningText(null);
|
|
2117
2117
|
}
|
|
2118
2118
|
};
|
|
2119
|
-
|
|
2119
|
+
P.on_node_event_v1 = Dd;
|
|
2120
2120
|
r.forBlock.on_node_event_v1 = function(e) {
|
|
2121
2121
|
const t = e, n = r.quote_(t.node.id), o = r.quote_(t.event.key);
|
|
2122
2122
|
let i = "";
|
|
@@ -2246,7 +2246,7 @@ const Md = {
|
|
|
2246
2246
|
this.setWarningText(null);
|
|
2247
2247
|
}
|
|
2248
2248
|
};
|
|
2249
|
-
|
|
2249
|
+
P.on_node_event_as_v1 = Md;
|
|
2250
2250
|
r.forBlock.on_node_event_as_v1 = function(e) {
|
|
2251
2251
|
const t = e, n = r.valueToCode(t, "NODE", p.NONE), o = r.quote_(t.event.key);
|
|
2252
2252
|
let i = "";
|
|
@@ -2276,9 +2276,9 @@ const Pd = {
|
|
|
2276
2276
|
updateShadow_: function() {
|
|
2277
2277
|
if (this.isInsertionMarker())
|
|
2278
2278
|
return;
|
|
2279
|
-
const e =
|
|
2279
|
+
const e = Ee({ type: "string", default: "" });
|
|
2280
2280
|
this.getInput("TITLE").connection.setShadowDom(e);
|
|
2281
|
-
const t =
|
|
2281
|
+
const t = Ee({ type: "string", default: "" });
|
|
2282
2282
|
this.getInput("TEXT").connection.setShadowDom(t);
|
|
2283
2283
|
},
|
|
2284
2284
|
rebuildBlocks_: function() {
|
|
@@ -2287,7 +2287,7 @@ const Pd = {
|
|
|
2287
2287
|
]);
|
|
2288
2288
|
}
|
|
2289
2289
|
};
|
|
2290
|
-
|
|
2290
|
+
P.open_confirm_dlg_v1 = Pd;
|
|
2291
2291
|
r.forBlock.open_confirm_dlg_v1 = function(e) {
|
|
2292
2292
|
const t = r.valueToCode(e, "TITLE", p.ATOMIC), n = r.valueToCode(e, "TEXT", p.ATOMIC), o = r.statementToCode(e, "HANDLE");
|
|
2293
2293
|
return `{
|
|
@@ -2313,11 +2313,11 @@ const Ud = {
|
|
|
2313
2313
|
updateShadow_: function() {
|
|
2314
2314
|
if (this.isInsertionMarker())
|
|
2315
2315
|
return;
|
|
2316
|
-
const e =
|
|
2316
|
+
const e = Ee({ type: "string", default: "" });
|
|
2317
2317
|
this.getInput("TITLE").connection.setShadowDom(e);
|
|
2318
|
-
const t =
|
|
2318
|
+
const t = Ee({ type: "string", default: "" });
|
|
2319
2319
|
this.getInput("LABEL").connection.setShadowDom(t);
|
|
2320
|
-
const n =
|
|
2320
|
+
const n = Ee({ type: "string", default: "" });
|
|
2321
2321
|
this.getInput("VALUE").connection.setShadowDom(n);
|
|
2322
2322
|
},
|
|
2323
2323
|
rebuildBlocks_: function() {
|
|
@@ -2326,7 +2326,7 @@ const Ud = {
|
|
|
2326
2326
|
]);
|
|
2327
2327
|
}
|
|
2328
2328
|
};
|
|
2329
|
-
|
|
2329
|
+
P.open_prompt_dlg_v1 = Ud;
|
|
2330
2330
|
r.forBlock.open_prompt_dlg_v1 = function(e) {
|
|
2331
2331
|
const t = r.valueToCode(e, "TITLE", p.ATOMIC), n = r.valueToCode(e, "LABEL", p.ATOMIC), o = r.valueToCode(e, "VALUE", p.ATOMIC), i = r.statementToCode(e, "HANDLE");
|
|
2332
2332
|
return `{
|
|
@@ -2460,7 +2460,7 @@ const xd = {
|
|
|
2460
2460
|
return;
|
|
2461
2461
|
let e = null;
|
|
2462
2462
|
const t = this.output.type;
|
|
2463
|
-
t === "string" ? e =
|
|
2463
|
+
t === "string" ? e = Ee({ type: "string", default: "" }) : t === "number" ? e = Ee({ type: "number", default: 0 }) : t === "boolean" && (e = Ee({ type: "boolean", default: !1 })), this.getInput("VALUE").connection.setShadowDom(e);
|
|
2464
2464
|
},
|
|
2465
2465
|
checkWarning_: function() {
|
|
2466
2466
|
const e = Co(this.method.id);
|
|
@@ -2481,7 +2481,7 @@ const xd = {
|
|
|
2481
2481
|
this.setWarningText(null);
|
|
2482
2482
|
}
|
|
2483
2483
|
};
|
|
2484
|
-
|
|
2484
|
+
P.set_comp_method_output_v1 = xd;
|
|
2485
2485
|
r.forBlock.set_comp_method_output_v1 = function(e) {
|
|
2486
2486
|
const t = e;
|
|
2487
2487
|
let n = r.valueToCode(t, "VALUE", p.ATOMIC);
|
|
@@ -2600,7 +2600,7 @@ const wd = {
|
|
|
2600
2600
|
we(t.names, this.prop.names) || (this.prop.names = t.names), this.setWarningText(null);
|
|
2601
2601
|
}
|
|
2602
2602
|
};
|
|
2603
|
-
|
|
2603
|
+
P.set_node_prop_v1 = wd;
|
|
2604
2604
|
r.forBlock.set_node_prop_v1 = function(e) {
|
|
2605
2605
|
const t = e, n = r.quote_(t.node.id), o = r.quote_(t.prop.keys), i = r.valueToCode(t, "VALUE", p.NONE);
|
|
2606
2606
|
return `__setNodePropV1__(${n}, ${o}, ${i});
|
|
@@ -2700,7 +2700,7 @@ const Vd = {
|
|
|
2700
2700
|
we(t.names, this.prop.names) || (this.prop.names = t.names), this.setWarningText(null);
|
|
2701
2701
|
}
|
|
2702
2702
|
};
|
|
2703
|
-
|
|
2703
|
+
P.set_node_prop_as_v1 = Vd;
|
|
2704
2704
|
r.forBlock.set_node_prop_as_v1 = function(e) {
|
|
2705
2705
|
const t = e, n = r.valueToCode(t, "NODE", p.NONE), o = r.quote_(t.prop.keys), i = r.valueToCode(t, "VALUE", p.NONE);
|
|
2706
2706
|
return `__setNodePropV1__(${n}, ${o}, ${i});
|
|
@@ -2779,7 +2779,7 @@ const Fd = {
|
|
|
2779
2779
|
for (let n = 0; n < this.event.params.length; n++) {
|
|
2780
2780
|
const o = this.event.params[n].type;
|
|
2781
2781
|
let i = null;
|
|
2782
|
-
o === "string" ? i =
|
|
2782
|
+
o === "string" ? i = Ee({ type: "string", default: "" }) : o === "number" ? i = Ee({ type: "number", default: 0 }) : o === "boolean" && (i = Ee({ type: "boolean", default: !1 })), (t = (e = this.getInput("PARAM" + n)) == null ? void 0 : e.connection) == null || t.setShadowDom(i);
|
|
2783
2783
|
}
|
|
2784
2784
|
},
|
|
2785
2785
|
checkWarning_: function() {
|
|
@@ -2795,7 +2795,7 @@ const Fd = {
|
|
|
2795
2795
|
this.setWarningText(null);
|
|
2796
2796
|
}
|
|
2797
2797
|
};
|
|
2798
|
-
|
|
2798
|
+
P.trigger_comp_event_v1 = Fd;
|
|
2799
2799
|
r.forBlock.trigger_comp_event_v1 = function() {
|
|
2800
2800
|
return "";
|
|
2801
2801
|
};
|
|
@@ -3060,7 +3060,7 @@ const $d = {
|
|
|
3060
3060
|
this.locale ? this.setFieldValue(T[this.name], "LABEL") : this.setFieldValue(this.name, "LABEL");
|
|
3061
3061
|
}
|
|
3062
3062
|
};
|
|
3063
|
-
|
|
3063
|
+
P.parameter_v1 = $d;
|
|
3064
3064
|
r.forBlock.parameter_v1 = function(e) {
|
|
3065
3065
|
return [e.key, p.ATOMIC];
|
|
3066
3066
|
};
|
|
@@ -3077,7 +3077,7 @@ function sr() {
|
|
|
3077
3077
|
const e = [];
|
|
3078
3078
|
return gn().forEach((n) => {
|
|
3079
3079
|
e.push([n.name, n.id]);
|
|
3080
|
-
}),
|
|
3080
|
+
}), Ae(e);
|
|
3081
3081
|
}
|
|
3082
3082
|
function rs(e) {
|
|
3083
3083
|
const t = V.compute.spaces.find((n) => n.id === e);
|
|
@@ -3092,7 +3092,7 @@ function rr(e) {
|
|
|
3092
3092
|
const t = [];
|
|
3093
3093
|
return rs(e).forEach((o) => {
|
|
3094
3094
|
t.push([o.name, o.id]);
|
|
3095
|
-
}),
|
|
3095
|
+
}), Ae(t);
|
|
3096
3096
|
}
|
|
3097
3097
|
function Wi() {
|
|
3098
3098
|
return V.compute.activeFunc;
|
|
@@ -3105,7 +3105,7 @@ function Gd() {
|
|
|
3105
3105
|
const e = [], { outputs: t } = V.compute.activeFunc;
|
|
3106
3106
|
return t.forEach(({ id: n, name: o }) => {
|
|
3107
3107
|
e.push([o, n]);
|
|
3108
|
-
}),
|
|
3108
|
+
}), Ae(e);
|
|
3109
3109
|
}
|
|
3110
3110
|
const jd = {
|
|
3111
3111
|
init: function() {
|
|
@@ -3197,7 +3197,7 @@ const jd = {
|
|
|
3197
3197
|
n = { type: "boolean", default: !1 };
|
|
3198
3198
|
else
|
|
3199
3199
|
continue;
|
|
3200
|
-
this.getInput("INPUT" + e).connection.setShadowDom(
|
|
3200
|
+
this.getInput("INPUT" + e).connection.setShadowDom(Ee(n));
|
|
3201
3201
|
}
|
|
3202
3202
|
},
|
|
3203
3203
|
rebuildBlocks_: function() {
|
|
@@ -3233,7 +3233,7 @@ const jd = {
|
|
|
3233
3233
|
this.setWarningText(null);
|
|
3234
3234
|
}
|
|
3235
3235
|
};
|
|
3236
|
-
|
|
3236
|
+
P.call_func_v1 = jd;
|
|
3237
3237
|
r.forBlock.call_func_v1 = function(e) {
|
|
3238
3238
|
const t = r.INDENT, n = r.quote_, o = e, i = n(o.space.id), s = n(o.func.id), a = [];
|
|
3239
3239
|
for (let g = 0; g < o.func.inputs.length; g++)
|
|
@@ -3341,7 +3341,7 @@ const Wd = {
|
|
|
3341
3341
|
n = { type: "boolean", default: !1 };
|
|
3342
3342
|
else
|
|
3343
3343
|
continue;
|
|
3344
|
-
this.getInput("INPUT" + e).connection.setShadowDom(
|
|
3344
|
+
this.getInput("INPUT" + e).connection.setShadowDom(Ee(n));
|
|
3345
3345
|
}
|
|
3346
3346
|
},
|
|
3347
3347
|
rebuildBlocks_: function() {
|
|
@@ -3377,7 +3377,7 @@ const Wd = {
|
|
|
3377
3377
|
this.setWarningText(null);
|
|
3378
3378
|
}
|
|
3379
3379
|
};
|
|
3380
|
-
|
|
3380
|
+
P.call_func_internal_v1 = Wd;
|
|
3381
3381
|
r.forBlock.call_func_internal_v1 = function(e) {
|
|
3382
3382
|
const t = r.INDENT, n = r.quote_, o = e, i = n(o.space.id), s = n(o.func.id), a = [];
|
|
3383
3383
|
for (let g = 0; g < o.func.inputs.length; g++)
|
|
@@ -3483,7 +3483,7 @@ const Xd = {
|
|
|
3483
3483
|
this.setWarningText(null);
|
|
3484
3484
|
}
|
|
3485
3485
|
};
|
|
3486
|
-
|
|
3486
|
+
P.func_entry_v1 = Xd;
|
|
3487
3487
|
r.forBlock.func_entry_v1 = function(e) {
|
|
3488
3488
|
const t = e, n = r.statementToCode(t, "HANDLE"), o = [];
|
|
3489
3489
|
for (let a = 0; a < t.func.inputs.length; a++) {
|
|
@@ -3497,7 +3497,7 @@ const zd = {
|
|
|
3497
3497
|
init: function() {
|
|
3498
3498
|
}
|
|
3499
3499
|
};
|
|
3500
|
-
|
|
3500
|
+
P.on_flow_state_event_v1 = zd;
|
|
3501
3501
|
r.forBlock.on_flow_state_event_v1 = function() {
|
|
3502
3502
|
return `__onFlowStateEventV1__();
|
|
3503
3503
|
`;
|
|
@@ -3566,7 +3566,7 @@ const qd = {
|
|
|
3566
3566
|
return;
|
|
3567
3567
|
let e = null;
|
|
3568
3568
|
const t = this.output.type;
|
|
3569
|
-
t === "string" ? e =
|
|
3569
|
+
t === "string" ? e = Ee({ type: "string", default: "" }) : t === "number" ? e = Ee({ type: "number", default: 0 }) : t === "boolean" && (e = Ee({ type: "boolean", default: !1 })), this.getInput("VALUE").connection.setShadowDom(e);
|
|
3570
3570
|
},
|
|
3571
3571
|
checkWarning_: function() {
|
|
3572
3572
|
const e = ia(this.output.id);
|
|
@@ -3581,7 +3581,7 @@ const qd = {
|
|
|
3581
3581
|
this.setWarningText(null);
|
|
3582
3582
|
}
|
|
3583
3583
|
};
|
|
3584
|
-
|
|
3584
|
+
P.set_func_output_v1 = qd;
|
|
3585
3585
|
r.forBlock.set_func_output_v1 = function(e) {
|
|
3586
3586
|
const t = r.quote_, n = e, { id: o, type: i } = n.output;
|
|
3587
3587
|
let s = r.valueToCode(n, "VALUE", p.ATOMIC);
|
|
@@ -3631,7 +3631,7 @@ const Jd = {
|
|
|
3631
3631
|
]);
|
|
3632
3632
|
}
|
|
3633
3633
|
};
|
|
3634
|
-
|
|
3634
|
+
P.add_data_v1 = Jd;
|
|
3635
3635
|
r.forBlock.add_data_v1 = function(e) {
|
|
3636
3636
|
const t = r.INDENT, n = r.valueToCode(e, "TABLE", p.ATOMIC) || "null", o = r.statementToCode(e, "HANDLE");
|
|
3637
3637
|
return `{
|
|
@@ -3657,7 +3657,7 @@ function Wo() {
|
|
|
3657
3657
|
const e = [];
|
|
3658
3658
|
return En().forEach((n) => {
|
|
3659
3659
|
e.push([n.name, n.id]);
|
|
3660
|
-
}),
|
|
3660
|
+
}), Ae(e);
|
|
3661
3661
|
}
|
|
3662
3662
|
function Ot(e) {
|
|
3663
3663
|
const { spaces: t } = V.data, n = t.find((o) => o.id === e);
|
|
@@ -3672,7 +3672,7 @@ function Xo(e) {
|
|
|
3672
3672
|
const t = [];
|
|
3673
3673
|
return Ot(e).forEach((o) => {
|
|
3674
3674
|
t.push([o.name, o.id]);
|
|
3675
|
-
}),
|
|
3675
|
+
}), Ae(t);
|
|
3676
3676
|
}
|
|
3677
3677
|
const Qd = {
|
|
3678
3678
|
init: function() {
|
|
@@ -3751,7 +3751,7 @@ const Qd = {
|
|
|
3751
3751
|
const e = [], t = xe(this.space.id, this.table.id);
|
|
3752
3752
|
return t == null || t.columns.forEach((n) => {
|
|
3753
3753
|
e.push([n.name, n.name]);
|
|
3754
|
-
}),
|
|
3754
|
+
}), Ae(e);
|
|
3755
3755
|
},
|
|
3756
3756
|
onchange: function(e) {
|
|
3757
3757
|
if (e.type === w.BLOCK_CHANGE) {
|
|
@@ -3819,7 +3819,7 @@ const Qd = {
|
|
|
3819
3819
|
this.setWarningText(null);
|
|
3820
3820
|
}
|
|
3821
3821
|
};
|
|
3822
|
-
|
|
3822
|
+
P.cond_atomic_v1 = Qd;
|
|
3823
3823
|
r.forBlock.cond_atomic_v1 = function(e) {
|
|
3824
3824
|
const t = r.quote_, n = e.getFieldValue("COLUMN"), o = r.valueToCode(e, "VALUE", p.ATOMIC) || null, s = {
|
|
3825
3825
|
EQ: "=",
|
|
@@ -3836,13 +3836,13 @@ const Zd = {
|
|
|
3836
3836
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
3837
3837
|
}
|
|
3838
3838
|
};
|
|
3839
|
-
|
|
3839
|
+
P.cond_logic_container_v1 = Zd;
|
|
3840
3840
|
const eh = {
|
|
3841
3841
|
init: function() {
|
|
3842
3842
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
3843
3843
|
}
|
|
3844
3844
|
};
|
|
3845
|
-
|
|
3845
|
+
P.cond_logic_item_v1 = eh;
|
|
3846
3846
|
const th = {
|
|
3847
3847
|
init: function() {
|
|
3848
3848
|
this.itemCount_ = 1, this.appendValueInput("VALUE").setCheck("Condition").appendField(
|
|
@@ -3919,7 +3919,7 @@ const th = {
|
|
|
3919
3919
|
this.getInput("ADD" + e) || this.appendValueInput("ADD" + e).setCheck("Condition");
|
|
3920
3920
|
}
|
|
3921
3921
|
};
|
|
3922
|
-
|
|
3922
|
+
P.cond_logic_v1 = th;
|
|
3923
3923
|
r.forBlock.cond_logic_v1 = function(e) {
|
|
3924
3924
|
const t = r.quote_, n = e, o = n.getFieldValue("TYPE"), i = [], s = r.valueToCode(n, "VALUE", p.ATOMIC) || null;
|
|
3925
3925
|
i.push(s);
|
|
@@ -3951,7 +3951,7 @@ const nh = {
|
|
|
3951
3951
|
]);
|
|
3952
3952
|
}
|
|
3953
3953
|
};
|
|
3954
|
-
|
|
3954
|
+
P.delete_data_v1 = nh;
|
|
3955
3955
|
r.forBlock.delete_data_v1 = function(e) {
|
|
3956
3956
|
const t = r.INDENT, n = r.valueToCode(e, "TABLE", p.ATOMIC) || "null", o = r.valueToCode(e, "CONDITION", p.ATOMIC) || "null", i = r.statementToCode(e, "HANDLE");
|
|
3957
3957
|
return `{
|
|
@@ -4012,7 +4012,7 @@ const oh = {
|
|
|
4012
4012
|
]);
|
|
4013
4013
|
}
|
|
4014
4014
|
};
|
|
4015
|
-
|
|
4015
|
+
P.query_data_v1 = oh;
|
|
4016
4016
|
r.forBlock.query_data_v1 = function(e) {
|
|
4017
4017
|
const t = r.INDENT, n = r.valueToCode(e, "TABLE", p.ATOMIC) || "null", o = r.valueToCode(e, "CONDITION", p.ATOMIC) || "null";
|
|
4018
4018
|
let i = "null";
|
|
@@ -4087,13 +4087,13 @@ const ih = {
|
|
|
4087
4087
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4088
4088
|
}
|
|
4089
4089
|
};
|
|
4090
|
-
|
|
4090
|
+
P.select_column_container_v1 = ih;
|
|
4091
4091
|
const sh = {
|
|
4092
4092
|
init: function() {
|
|
4093
4093
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4094
4094
|
}
|
|
4095
4095
|
};
|
|
4096
|
-
|
|
4096
|
+
P.select_column_item_v1 = sh;
|
|
4097
4097
|
const ah = {
|
|
4098
4098
|
init: function() {
|
|
4099
4099
|
this.space = {
|
|
@@ -4155,7 +4155,7 @@ const ah = {
|
|
|
4155
4155
|
const e = [], t = xe(this.space.id, this.table.id);
|
|
4156
4156
|
return t == null || t.columns.forEach((n) => {
|
|
4157
4157
|
e.push([n.name, n.name]);
|
|
4158
|
-
}),
|
|
4158
|
+
}), Ae(e);
|
|
4159
4159
|
},
|
|
4160
4160
|
onchange: function(e) {
|
|
4161
4161
|
var t;
|
|
@@ -4283,7 +4283,7 @@ const ah = {
|
|
|
4283
4283
|
this.setWarningText(null);
|
|
4284
4284
|
}
|
|
4285
4285
|
};
|
|
4286
|
-
|
|
4286
|
+
P.select_column_v1 = ah;
|
|
4287
4287
|
r.forBlock.select_column_v1 = function(e) {
|
|
4288
4288
|
const t = r.quote_, n = e, o = n.space.id, i = n.table.id, s = [];
|
|
4289
4289
|
for (let c = 0; c < n.itemCount_; c++) {
|
|
@@ -4389,7 +4389,7 @@ const rh = {
|
|
|
4389
4389
|
t.name !== this.table.name && (this.table.name = t.name), this.setWarningText(null);
|
|
4390
4390
|
}
|
|
4391
4391
|
};
|
|
4392
|
-
|
|
4392
|
+
P.select_table_v1 = rh;
|
|
4393
4393
|
r.forBlock.select_table_v1 = function(e) {
|
|
4394
4394
|
const t = r.quote_, n = e, o = n.space.id, i = n.table.id;
|
|
4395
4395
|
return [`{spaceid:${t(o)},tableid:${t(i)}}`, p.ATOMIC];
|
|
@@ -4399,13 +4399,13 @@ const lh = {
|
|
|
4399
4399
|
this.appendDummyInput().appendField("%{BKY_DATA_LIST}"), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4400
4400
|
}
|
|
4401
4401
|
};
|
|
4402
|
-
|
|
4402
|
+
P.update_column_container_v1 = lh;
|
|
4403
4403
|
const ch = {
|
|
4404
4404
|
init: function() {
|
|
4405
4405
|
this.appendDummyInput().appendField("%{BKY_DATA_ITEM}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
4406
4406
|
}
|
|
4407
4407
|
};
|
|
4408
|
-
|
|
4408
|
+
P.update_column_item_v1 = ch;
|
|
4409
4409
|
const uh = {
|
|
4410
4410
|
init: function() {
|
|
4411
4411
|
this.space = {
|
|
@@ -4467,7 +4467,7 @@ const uh = {
|
|
|
4467
4467
|
const e = [], t = xe(this.space.id, this.table.id);
|
|
4468
4468
|
return t == null || t.columns.forEach((n) => {
|
|
4469
4469
|
e.push([n.name, n.name]);
|
|
4470
|
-
}),
|
|
4470
|
+
}), Ae(e);
|
|
4471
4471
|
},
|
|
4472
4472
|
onchange: function(e) {
|
|
4473
4473
|
if (e.type === w.BLOCK_CHANGE) {
|
|
@@ -4614,7 +4614,7 @@ const uh = {
|
|
|
4614
4614
|
this.setWarningText(null);
|
|
4615
4615
|
}
|
|
4616
4616
|
};
|
|
4617
|
-
|
|
4617
|
+
P.update_column_v1 = uh;
|
|
4618
4618
|
r.forBlock.update_column_v1 = function(e) {
|
|
4619
4619
|
const t = r.quote_, n = e, o = n.space.id, i = n.table.id, s = [];
|
|
4620
4620
|
for (let c = 0; c < n.itemCount_; c++) {
|
|
@@ -4647,7 +4647,7 @@ const ph = {
|
|
|
4647
4647
|
]);
|
|
4648
4648
|
}
|
|
4649
4649
|
};
|
|
4650
|
-
|
|
4650
|
+
P.update_data_v1 = ph;
|
|
4651
4651
|
r.forBlock.update_data_v1 = function(e) {
|
|
4652
4652
|
const t = r.INDENT, n = r.valueToCode(e, "TABLE", p.ATOMIC) || "null", o = r.valueToCode(e, "CONDITION", p.ATOMIC) || "null", i = r.statementToCode(e, "HANDLE");
|
|
4653
4653
|
return `{
|
|
@@ -4664,13 +4664,13 @@ const _h = k.xml, dh = {
|
|
|
4664
4664
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
4665
4665
|
}
|
|
4666
4666
|
};
|
|
4667
|
-
|
|
4667
|
+
P.list_create_container_v1 = dh;
|
|
4668
4668
|
const hh = {
|
|
4669
4669
|
init: function() {
|
|
4670
4670
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
4671
4671
|
}
|
|
4672
4672
|
};
|
|
4673
|
-
|
|
4673
|
+
P.list_create_item_v1 = hh;
|
|
4674
4674
|
const fh = {
|
|
4675
4675
|
init: function() {
|
|
4676
4676
|
this.itemCount_ = 0, this.setMutator(
|
|
@@ -4755,7 +4755,7 @@ const fh = {
|
|
|
4755
4755
|
this.removeInput("ADD" + e);
|
|
4756
4756
|
}
|
|
4757
4757
|
};
|
|
4758
|
-
|
|
4758
|
+
P.list_create_v1 = fh;
|
|
4759
4759
|
r.forBlock.list_create_v1 = function(e) {
|
|
4760
4760
|
const t = e, n = new Array(t.itemCount_);
|
|
4761
4761
|
for (let i = 0; i < t.itemCount_; i++)
|
|
@@ -4983,9 +4983,9 @@ const gh = {
|
|
|
4983
4983
|
AND: "%{BKY_LOGIC_V1_OPERATION_TOOLTIP_AND}",
|
|
4984
4984
|
OR: "%{BKY_LOGIC_V1_OPERATION_TOOLTIP_OR}"
|
|
4985
4985
|
};
|
|
4986
|
-
|
|
4986
|
+
ye.register(
|
|
4987
4987
|
"logic_op_tooltip_v1",
|
|
4988
|
-
|
|
4988
|
+
ye.buildTooltipForDropdown("OP", gh)
|
|
4989
4989
|
);
|
|
4990
4990
|
C([
|
|
4991
4991
|
{
|
|
@@ -5027,7 +5027,7 @@ const mh = {
|
|
|
5027
5027
|
this.prevBlocks_[0] = this.getInputTargetBlock("A"), this.prevBlocks_[1] = this.getInputTargetBlock("B");
|
|
5028
5028
|
}
|
|
5029
5029
|
};
|
|
5030
|
-
|
|
5030
|
+
ye.register(
|
|
5031
5031
|
"logic_compare_v1",
|
|
5032
5032
|
function() {
|
|
5033
5033
|
this.mixin(mh);
|
|
@@ -5206,7 +5206,7 @@ const Th = {
|
|
|
5206
5206
|
n == null || n.reconnect(this, "ELSE");
|
|
5207
5207
|
}
|
|
5208
5208
|
};
|
|
5209
|
-
|
|
5209
|
+
ye.registerMutator(
|
|
5210
5210
|
"logic_if_v1_mutator",
|
|
5211
5211
|
Th,
|
|
5212
5212
|
void 0,
|
|
@@ -5369,7 +5369,7 @@ const Eh = {
|
|
|
5369
5369
|
this.prevParentConnection_ = o;
|
|
5370
5370
|
}
|
|
5371
5371
|
};
|
|
5372
|
-
|
|
5372
|
+
ye.registerMixin("logic_ternary_v1", Eh);
|
|
5373
5373
|
C([
|
|
5374
5374
|
{
|
|
5375
5375
|
type: "logic_ternary_v1",
|
|
@@ -5426,13 +5426,13 @@ const Ah = {
|
|
|
5426
5426
|
}
|
|
5427
5427
|
}
|
|
5428
5428
|
};
|
|
5429
|
-
|
|
5429
|
+
ye.registerMixin(
|
|
5430
5430
|
"contextMenu_newGetVariableBlock_v1",
|
|
5431
5431
|
Ah
|
|
5432
5432
|
);
|
|
5433
|
-
|
|
5433
|
+
ye.register(
|
|
5434
5434
|
"flow_control_tooltip_v1",
|
|
5435
|
-
|
|
5435
|
+
ye.buildTooltipForDropdown("MODE", {
|
|
5436
5436
|
BREAK: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_BREAK}",
|
|
5437
5437
|
CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
|
|
5438
5438
|
})
|
|
@@ -5467,7 +5467,7 @@ const vh = /* @__PURE__ */ new Set([
|
|
|
5467
5467
|
}
|
|
5468
5468
|
}
|
|
5469
5469
|
};
|
|
5470
|
-
|
|
5470
|
+
ye.registerMixin(
|
|
5471
5471
|
"flow_control_in_loop_check_v1",
|
|
5472
5472
|
Oh
|
|
5473
5473
|
);
|
|
@@ -5492,9 +5492,9 @@ C([
|
|
|
5492
5492
|
extensions: ["flow_control_tooltip_v1", "flow_control_in_loop_check_v1"]
|
|
5493
5493
|
}
|
|
5494
5494
|
]);
|
|
5495
|
-
|
|
5495
|
+
ye.register(
|
|
5496
5496
|
"for_tooltip_v1",
|
|
5497
|
-
|
|
5497
|
+
ye.buildTooltipWithFieldText(
|
|
5498
5498
|
"%{BKY_LOOP_V1_FOR_TOOLTIP}",
|
|
5499
5499
|
"VAR"
|
|
5500
5500
|
)
|
|
@@ -5543,9 +5543,9 @@ C([
|
|
|
5543
5543
|
extensions: ["contextMenu_newGetVariableBlock_v1", "for_tooltip_v1"]
|
|
5544
5544
|
}
|
|
5545
5545
|
]);
|
|
5546
|
-
|
|
5546
|
+
ye.register(
|
|
5547
5547
|
"for_each_tooltip_v1",
|
|
5548
|
-
|
|
5548
|
+
ye.buildTooltipWithFieldText(
|
|
5549
5549
|
"%{BKY_LOOP_V1_FOR_EACH_TOOLTIP}",
|
|
5550
5550
|
"VAR"
|
|
5551
5551
|
)
|
|
@@ -5580,9 +5580,9 @@ C([
|
|
|
5580
5580
|
extensions: ["contextMenu_newGetVariableBlock_v1", "for_each_tooltip_v1"]
|
|
5581
5581
|
}
|
|
5582
5582
|
]);
|
|
5583
|
-
|
|
5583
|
+
ye.register(
|
|
5584
5584
|
"loop_while_until_tooltip_v1",
|
|
5585
|
-
|
|
5585
|
+
ye.buildTooltipForDropdown("MODE", {
|
|
5586
5586
|
WHILE: "%{BKY_LOOP_V1_WHILE_UNTIL_TOOLTIP_WHILE}",
|
|
5587
5587
|
UNTIL: "%{BKY_LOOP_V1_WHILE_UNTIL_TOOLTIP_UNTIL}"
|
|
5588
5588
|
})
|
|
@@ -5666,9 +5666,9 @@ const bh = {
|
|
|
5666
5666
|
STD_DEV: "%{BKY_MATH_V1_ON_LIST_TOOLTIP_STD_DEV}",
|
|
5667
5667
|
RANDOM: "%{BKY_MATH_V1_ON_LIST_TOOLTIP_RANDOM}"
|
|
5668
5668
|
};
|
|
5669
|
-
|
|
5669
|
+
ye.register(
|
|
5670
5670
|
"math_op_tooltip_v1",
|
|
5671
|
-
|
|
5671
|
+
ye.buildTooltipForDropdown("OP", bh)
|
|
5672
5672
|
);
|
|
5673
5673
|
C([
|
|
5674
5674
|
{
|
|
@@ -6278,13 +6278,13 @@ const Ih = k.xml, yh = {
|
|
|
6278
6278
|
), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
6279
6279
|
}
|
|
6280
6280
|
};
|
|
6281
|
-
|
|
6281
|
+
P.object_create_container_v1 = yh;
|
|
6282
6282
|
const Ch = {
|
|
6283
6283
|
init: function() {
|
|
6284
6284
|
this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
6285
6285
|
}
|
|
6286
6286
|
};
|
|
6287
|
-
|
|
6287
|
+
P.object_create_item_v1 = Ch;
|
|
6288
6288
|
const Nh = {
|
|
6289
6289
|
init: function() {
|
|
6290
6290
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
|
|
@@ -6361,7 +6361,7 @@ const Nh = {
|
|
|
6361
6361
|
this.removeInput("ADD" + e);
|
|
6362
6362
|
}
|
|
6363
6363
|
};
|
|
6364
|
-
|
|
6364
|
+
P.object_create_v1 = Nh;
|
|
6365
6365
|
r.forBlock.object_create_v1 = function(e) {
|
|
6366
6366
|
const t = e;
|
|
6367
6367
|
let n = "{";
|
|
@@ -6624,7 +6624,7 @@ const sa = k.xml, kh = {
|
|
|
6624
6624
|
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new Yl(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
6625
6625
|
}
|
|
6626
6626
|
};
|
|
6627
|
-
|
|
6627
|
+
P.procedure_def_container_v1 = kh;
|
|
6628
6628
|
const Lh = {
|
|
6629
6629
|
init: function() {
|
|
6630
6630
|
const e = new Vo(Pi.DEFAULT_ARG);
|
|
@@ -6647,7 +6647,7 @@ const Lh = {
|
|
|
6647
6647
|
return e;
|
|
6648
6648
|
}
|
|
6649
6649
|
};
|
|
6650
|
-
|
|
6650
|
+
P.procedure_def_item_v1 = Lh;
|
|
6651
6651
|
const Sh = {
|
|
6652
6652
|
init: function() {
|
|
6653
6653
|
this.withReturn = !1, this.args = [];
|
|
@@ -6753,7 +6753,7 @@ const Sh = {
|
|
|
6753
6753
|
}
|
|
6754
6754
|
}
|
|
6755
6755
|
};
|
|
6756
|
-
|
|
6756
|
+
P.procedure_def_v1 = Sh;
|
|
6757
6757
|
const Bh = k.xml, Rh = {
|
|
6758
6758
|
init: function() {
|
|
6759
6759
|
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}");
|
|
@@ -6810,7 +6810,7 @@ const Bh = k.xml, Rh = {
|
|
|
6810
6810
|
e.type === "procedure_def_v1" || e.type === "func_entry_v1" ? this.setWarningText(null) : this.setWarningText("the block can only be used in procedure block");
|
|
6811
6811
|
}
|
|
6812
6812
|
};
|
|
6813
|
-
|
|
6813
|
+
P.procedure_return_v1 = Rh;
|
|
6814
6814
|
r.forBlock.procedure_return_v1 = function(e) {
|
|
6815
6815
|
const t = e;
|
|
6816
6816
|
return t.withReturn ? `return ${r.valueToCode(t, "VALUE", p.NONE) || "null"};
|
|
@@ -6842,9 +6842,9 @@ const Dh = /^\s*'([^']|\\')*'\s*$/;
|
|
|
6842
6842
|
function fo(e) {
|
|
6843
6843
|
return Dh.test(e) ? [e, p.ATOMIC] : [`String(${e})`, p.FUNCTION_CALL];
|
|
6844
6844
|
}
|
|
6845
|
-
|
|
6845
|
+
ye.register(
|
|
6846
6846
|
"text_append_tooltip_v1",
|
|
6847
|
-
|
|
6847
|
+
ye.buildTooltipWithFieldText(
|
|
6848
6848
|
"%{BKY_TEXT_V1_APPEND_TOOLTIP}",
|
|
6849
6849
|
"VAR"
|
|
6850
6850
|
)
|
|
@@ -7123,7 +7123,7 @@ const Mh = k.xml, Ph = {
|
|
|
7123
7123
|
}, Uh = function() {
|
|
7124
7124
|
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new Wt.MutatorIcon(["text_join_item_v1"], this));
|
|
7125
7125
|
};
|
|
7126
|
-
|
|
7126
|
+
ye.registerMutator(
|
|
7127
7127
|
"text_join_mutator_v1",
|
|
7128
7128
|
Ph,
|
|
7129
7129
|
Uh
|
|
@@ -7374,17 +7374,17 @@ const xh = {
|
|
|
7374
7374
|
updateShadow_: function() {
|
|
7375
7375
|
var e, t, n, o, i, s, a, l;
|
|
7376
7376
|
this.isInsertionMarker() || ((t = (e = this.getInput("INTERVAL")) == null ? void 0 : e.connection) == null || t.setShadowDom(
|
|
7377
|
-
|
|
7377
|
+
Ee({ type: "number", default: 1e3 })
|
|
7378
7378
|
), (o = (n = this.getInput("LOOP")) == null ? void 0 : n.connection) == null || o.setShadowDom(
|
|
7379
|
-
|
|
7379
|
+
Ee({ type: "boolean", default: !1 })
|
|
7380
7380
|
), (s = (i = this.getInput("COUNT")) == null ? void 0 : i.connection) == null || s.setShadowDom(
|
|
7381
|
-
|
|
7381
|
+
Ee({ type: "number", default: 1 })
|
|
7382
7382
|
), (l = (a = this.getInput("IMMEDIATE")) == null ? void 0 : a.connection) == null || l.setShadowDom(
|
|
7383
|
-
|
|
7383
|
+
Ee({ type: "boolean", default: !1 })
|
|
7384
7384
|
));
|
|
7385
7385
|
}
|
|
7386
7386
|
};
|
|
7387
|
-
|
|
7387
|
+
P.create_timer_v1 = xh;
|
|
7388
7388
|
r.forBlock.create_timer_v1 = function(e) {
|
|
7389
7389
|
const t = r.valueToCode(e, "INTERVAL", p.ATOMIC) || "1000", n = r.valueToCode(e, "LOOP", p.ATOMIC) || "false", o = r.valueToCode(e, "COUNT", p.ATOMIC) || "1", i = r.valueToCode(e, "IMMEDIATE", p.ATOMIC) || "false", s = r.statementToCode(e, "CALLBACK");
|
|
7390
7390
|
return `__createTimerV1__(${t}, ${n}, ${o}, ${i}, function() {
|
|
@@ -7453,7 +7453,7 @@ const wh = {
|
|
|
7453
7453
|
t.deleteVariableById(o.getId()), t.refreshToolboxSelection();
|
|
7454
7454
|
};
|
|
7455
7455
|
};
|
|
7456
|
-
|
|
7456
|
+
ye.registerMixin(
|
|
7457
7457
|
"context_menu_variable_v1",
|
|
7458
7458
|
wh
|
|
7459
7459
|
);
|
|
@@ -7788,97 +7788,97 @@ function $h() {
|
|
|
7788
7788
|
const Bt = {
|
|
7789
7789
|
name: "PROCEDURE_CATEGORY",
|
|
7790
7790
|
callback: $h
|
|
7791
|
-
},
|
|
7791
|
+
}, be = k.xml;
|
|
7792
7792
|
function Gh() {
|
|
7793
7793
|
const e = [];
|
|
7794
7794
|
if (Nd()) {
|
|
7795
7795
|
{
|
|
7796
|
-
const t =
|
|
7796
|
+
const t = be.createElement("label");
|
|
7797
7797
|
t.setAttribute("text", T.LABEL_PAGE), e.push(t);
|
|
7798
7798
|
}
|
|
7799
7799
|
if (or().length > 0) {
|
|
7800
|
-
const t =
|
|
7800
|
+
const t = be.createElement("block");
|
|
7801
7801
|
t.setAttribute("type", "get_page_argument_v1"), e.push(t);
|
|
7802
7802
|
}
|
|
7803
7803
|
}
|
|
7804
7804
|
if (Ad()) {
|
|
7805
7805
|
{
|
|
7806
|
-
const t =
|
|
7806
|
+
const t = be.createElement("label");
|
|
7807
7807
|
t.setAttribute("text", T.LABEL_COMP), e.push(t);
|
|
7808
7808
|
}
|
|
7809
7809
|
if (Yn().length > 0) {
|
|
7810
7810
|
{
|
|
7811
|
-
const t =
|
|
7811
|
+
const t = be.createElement("block");
|
|
7812
7812
|
t.setAttribute("type", "comp_method_impl_v1"), e.push(t);
|
|
7813
7813
|
}
|
|
7814
7814
|
{
|
|
7815
|
-
const t =
|
|
7815
|
+
const t = be.createElement("block");
|
|
7816
7816
|
t.setAttribute("type", "set_comp_method_output_v1"), e.push(t);
|
|
7817
7817
|
}
|
|
7818
7818
|
}
|
|
7819
7819
|
if (Yn().length > 0) {
|
|
7820
|
-
const t =
|
|
7820
|
+
const t = be.createElement("block");
|
|
7821
7821
|
t.setAttribute("type", "trigger_comp_event_v1"), e.push(t);
|
|
7822
7822
|
}
|
|
7823
7823
|
}
|
|
7824
7824
|
{
|
|
7825
|
-
const t =
|
|
7825
|
+
const t = be.createElement("label");
|
|
7826
7826
|
t.setAttribute("text", T.LABEL_EVENT), e.push(t);
|
|
7827
7827
|
}
|
|
7828
7828
|
{
|
|
7829
|
-
const t =
|
|
7829
|
+
const t = be.createElement("block");
|
|
7830
7830
|
t.setAttribute("type", "on_node_event_v1"), e.push(t);
|
|
7831
7831
|
}
|
|
7832
7832
|
{
|
|
7833
|
-
const t =
|
|
7833
|
+
const t = be.createElement("block");
|
|
7834
7834
|
t.setAttribute("type", "on_node_event_as_v1"), e.push(t);
|
|
7835
7835
|
}
|
|
7836
7836
|
{
|
|
7837
|
-
const t =
|
|
7837
|
+
const t = be.createElement("label");
|
|
7838
7838
|
t.setAttribute("text", T.LABEL_METHOD), e.push(t);
|
|
7839
7839
|
}
|
|
7840
7840
|
{
|
|
7841
|
-
const t =
|
|
7841
|
+
const t = be.createElement("block");
|
|
7842
7842
|
t.setAttribute("type", "call_node_method_v1"), e.push(t);
|
|
7843
7843
|
}
|
|
7844
7844
|
{
|
|
7845
|
-
const t =
|
|
7845
|
+
const t = be.createElement("block");
|
|
7846
7846
|
t.setAttribute("type", "call_node_method_as_v1"), e.push(t);
|
|
7847
7847
|
}
|
|
7848
7848
|
{
|
|
7849
|
-
const t =
|
|
7849
|
+
const t = be.createElement("label");
|
|
7850
7850
|
t.setAttribute("text", T.LABEL_PROPERTY), e.push(t);
|
|
7851
7851
|
}
|
|
7852
7852
|
{
|
|
7853
|
-
const t =
|
|
7853
|
+
const t = be.createElement("block");
|
|
7854
7854
|
t.setAttribute("type", "get_node_prop_v1"), e.push(t);
|
|
7855
7855
|
}
|
|
7856
7856
|
{
|
|
7857
|
-
const t =
|
|
7857
|
+
const t = be.createElement("block");
|
|
7858
7858
|
t.setAttribute("type", "get_node_prop_as_v1"), e.push(t);
|
|
7859
7859
|
}
|
|
7860
7860
|
{
|
|
7861
|
-
const t =
|
|
7861
|
+
const t = be.createElement("block");
|
|
7862
7862
|
t.setAttribute("type", "set_node_prop_v1"), e.push(t);
|
|
7863
7863
|
}
|
|
7864
7864
|
{
|
|
7865
|
-
const t =
|
|
7865
|
+
const t = be.createElement("block");
|
|
7866
7866
|
t.setAttribute("type", "set_node_prop_as_v1"), e.push(t);
|
|
7867
7867
|
}
|
|
7868
7868
|
{
|
|
7869
|
-
const t =
|
|
7869
|
+
const t = be.createElement("label");
|
|
7870
7870
|
t.setAttribute("text", T.LABEL_OTHER), e.push(t);
|
|
7871
7871
|
}
|
|
7872
7872
|
{
|
|
7873
|
-
const t =
|
|
7873
|
+
const t = be.createElement("block");
|
|
7874
7874
|
t.setAttribute("type", "get_node_v1"), e.push(t);
|
|
7875
7875
|
}
|
|
7876
7876
|
{
|
|
7877
|
-
const t =
|
|
7877
|
+
const t = be.createElement("block");
|
|
7878
7878
|
t.setAttribute("type", "app_env_v1"), e.push(t);
|
|
7879
7879
|
}
|
|
7880
7880
|
if (as().length > 0) {
|
|
7881
|
-
const t =
|
|
7881
|
+
const t = be.createElement("block");
|
|
7882
7882
|
t.setAttribute("type", "navigate_to_v1"), e.push(t);
|
|
7883
7883
|
}
|
|
7884
7884
|
return e;
|
|
@@ -8171,33 +8171,33 @@ class dr extends _i {
|
|
|
8171
8171
|
constructor(n, o, i) {
|
|
8172
8172
|
super(_i.SKIP_SETUP);
|
|
8173
8173
|
/** The field's colour picker element. */
|
|
8174
|
-
|
|
8174
|
+
nt(this, "picker", null);
|
|
8175
8175
|
/** Index of the currently highlighted element. */
|
|
8176
|
-
|
|
8176
|
+
nt(this, "highlightedIndex", null);
|
|
8177
8177
|
/**
|
|
8178
8178
|
* Array holding info needed to unbind events.
|
|
8179
8179
|
* Used for disposing.
|
|
8180
8180
|
* Ex: [[node, name, func], [node, name, func]].
|
|
8181
8181
|
*/
|
|
8182
|
-
|
|
8182
|
+
nt(this, "boundEvents", []);
|
|
8183
8183
|
/**
|
|
8184
8184
|
* Serializable fields are saved by the serializer, non-serializable fields
|
|
8185
8185
|
* are not. Editable fields should also be serializable.
|
|
8186
8186
|
*/
|
|
8187
|
-
|
|
8187
|
+
nt(this, "SERIALIZABLE", !0);
|
|
8188
8188
|
/** Mouse cursor style when over the hotspot that initiates the editor. */
|
|
8189
|
-
|
|
8189
|
+
nt(this, "CURSOR", "default");
|
|
8190
8190
|
/**
|
|
8191
8191
|
* Used to tell if the field needs to be rendered the next time the block is
|
|
8192
8192
|
* rendered. Colour fields are statically sized, and only need to be
|
|
8193
8193
|
* rendered at initialization.
|
|
8194
8194
|
*/
|
|
8195
|
-
|
|
8195
|
+
nt(this, "isDirty_", !1);
|
|
8196
8196
|
/**
|
|
8197
8197
|
* An array of colour strings for the palette.
|
|
8198
8198
|
* Copied from goog.ui.ColorPicker.SIMPLE_GRID_COLORS
|
|
8199
8199
|
*/
|
|
8200
|
-
|
|
8200
|
+
nt(this, "colours", [
|
|
8201
8201
|
// red
|
|
8202
8202
|
"#F44336",
|
|
8203
8203
|
// base
|
|
@@ -8759,11 +8759,11 @@ class dr extends _i {
|
|
|
8759
8759
|
* An array of tooltip strings for the palette. If not the same length as
|
|
8760
8760
|
* COLOURS, the colour's hex code will be used for any missing titles.
|
|
8761
8761
|
*/
|
|
8762
|
-
|
|
8762
|
+
nt(this, "titles", ["%{BKY_COLOR_RED}"]);
|
|
8763
8763
|
/**
|
|
8764
8764
|
* Number of columns in the palette.
|
|
8765
8765
|
*/
|
|
8766
|
-
|
|
8766
|
+
nt(this, "columns", 14);
|
|
8767
8767
|
n !== _i.SKIP_SETUP && (i && this.configure_(i), this.setValue(n), o && this.setValidator(o));
|
|
8768
8768
|
}
|
|
8769
8769
|
configure_(n) {
|
|
@@ -10070,21 +10070,26 @@ const zo = {
|
|
|
10070
10070
|
s && s.callback({ workspace: i }, new PointerEvent("dummy"));
|
|
10071
10071
|
};
|
|
10072
10072
|
return dn(() => {
|
|
10073
|
-
|
|
10073
|
+
ut.on("cleanWorkspace", o);
|
|
10074
10074
|
}), Oo(() => {
|
|
10075
|
-
|
|
10075
|
+
ut.off("cleanWorkspace", o);
|
|
10076
10076
|
}), (i, s) => {
|
|
10077
|
-
const a =
|
|
10078
|
-
return
|
|
10077
|
+
const a = Ie("v-btn"), l = Ie("v-fade-transition"), c = Ie("v-tooltip");
|
|
10078
|
+
return Re(), pt(c, {
|
|
10079
10079
|
text: X(t)("x-block-lib.tip.hotkeyCtrlQ")
|
|
10080
10080
|
}, {
|
|
10081
|
-
activator:
|
|
10082
|
-
|
|
10083
|
-
|
|
10084
|
-
|
|
10085
|
-
|
|
10086
|
-
|
|
10087
|
-
|
|
10081
|
+
activator: Ze(({ props: _ }) => [
|
|
10082
|
+
he(l, null, {
|
|
10083
|
+
default: Ze(() => [
|
|
10084
|
+
he(a, Zi(_, {
|
|
10085
|
+
variant: "outlined",
|
|
10086
|
+
density: "comfortable",
|
|
10087
|
+
icon: X(oc),
|
|
10088
|
+
onClick: s[0] || (s[0] = (d) => X(ut).emit("cleanWorkspace"))
|
|
10089
|
+
}), null, 16, ["icon"])
|
|
10090
|
+
]),
|
|
10091
|
+
_: 2
|
|
10092
|
+
}, 1024)
|
|
10088
10093
|
]),
|
|
10089
10094
|
_: 1
|
|
10090
10095
|
}, 8, ["text"]);
|
|
@@ -10100,17 +10105,22 @@ const zo = {
|
|
|
10100
10105
|
setup(e) {
|
|
10101
10106
|
const { t } = Kn(), n = Di(e, "modelValue");
|
|
10102
10107
|
return (o, i) => {
|
|
10103
|
-
const s =
|
|
10104
|
-
return
|
|
10108
|
+
const s = Ie("v-btn"), a = Ie("v-fade-transition"), l = Ie("v-tooltip");
|
|
10109
|
+
return Re(), pt(l, {
|
|
10105
10110
|
text: X(t)("x-block-lib.tip.hotkeyCtrlW")
|
|
10106
10111
|
}, {
|
|
10107
|
-
activator:
|
|
10108
|
-
|
|
10109
|
-
|
|
10110
|
-
|
|
10111
|
-
|
|
10112
|
-
|
|
10113
|
-
|
|
10112
|
+
activator: Ze(({ props: c }) => [
|
|
10113
|
+
he(a, null, {
|
|
10114
|
+
default: Ze(() => [
|
|
10115
|
+
he(s, Zi(c, {
|
|
10116
|
+
variant: "outlined",
|
|
10117
|
+
density: "comfortable",
|
|
10118
|
+
icon: n.value ? X(ac) : X(rc),
|
|
10119
|
+
onClick: i[0] || (i[0] = (_) => n.value = !n.value)
|
|
10120
|
+
}), null, 16, ["icon"])
|
|
10121
|
+
]),
|
|
10122
|
+
_: 2
|
|
10123
|
+
}, 1024)
|
|
10114
10124
|
]),
|
|
10115
10125
|
_: 1
|
|
10116
10126
|
}, 8, ["text"]);
|
|
@@ -10281,7 +10291,7 @@ var yt = vt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), jn = vt(/E
|
|
|
10281
10291
|
function te(e, t, n) {
|
|
10282
10292
|
e.addEventListener(t, n, !yt && Or);
|
|
10283
10293
|
}
|
|
10284
|
-
function
|
|
10294
|
+
function ee(e, t, n) {
|
|
10285
10295
|
e.removeEventListener(t, n, !yt && Or);
|
|
10286
10296
|
}
|
|
10287
10297
|
function Ro(e, t) {
|
|
@@ -10303,7 +10313,7 @@ function Ro(e, t) {
|
|
|
10303
10313
|
function Nf(e) {
|
|
10304
10314
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
10305
10315
|
}
|
|
10306
|
-
function
|
|
10316
|
+
function it(e, t, n, o) {
|
|
10307
10317
|
if (e) {
|
|
10308
10318
|
n = n || document;
|
|
10309
10319
|
do {
|
|
@@ -10325,7 +10335,7 @@ function qe(e, t, n) {
|
|
|
10325
10335
|
e.className = (o + (n ? " " + t : "")).replace(fa, " ");
|
|
10326
10336
|
}
|
|
10327
10337
|
}
|
|
10328
|
-
function
|
|
10338
|
+
function D(e, t, n) {
|
|
10329
10339
|
var o = e && e.style;
|
|
10330
10340
|
if (o) {
|
|
10331
10341
|
if (n === void 0)
|
|
@@ -10339,7 +10349,7 @@ function _n(e, t) {
|
|
|
10339
10349
|
n = e;
|
|
10340
10350
|
else
|
|
10341
10351
|
do {
|
|
10342
|
-
var o =
|
|
10352
|
+
var o = D(e, "transform");
|
|
10343
10353
|
o && o !== "none" && (n = o + " " + n);
|
|
10344
10354
|
} while (!t && (e = e.parentNode));
|
|
10345
10355
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
@@ -10359,14 +10369,14 @@ function _t() {
|
|
|
10359
10369
|
var e = document.scrollingElement;
|
|
10360
10370
|
return e || document.documentElement;
|
|
10361
10371
|
}
|
|
10362
|
-
function
|
|
10372
|
+
function ke(e, t, n, o, i) {
|
|
10363
10373
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
10364
10374
|
var s, a, l, c, _, d, h;
|
|
10365
10375
|
if (e !== window && e.parentNode && e !== _t() ? (s = e.getBoundingClientRect(), a = s.top, l = s.left, c = s.bottom, _ = s.right, d = s.height, h = s.width) : (a = 0, l = 0, c = window.innerHeight, _ = window.innerWidth, d = window.innerHeight, h = window.innerWidth), (t || n) && e !== window && (i = i || e.parentNode, !yt))
|
|
10366
10376
|
do
|
|
10367
|
-
if (i && i.getBoundingClientRect && (
|
|
10377
|
+
if (i && i.getBoundingClientRect && (D(i, "transform") !== "none" || n && D(i, "position") !== "static")) {
|
|
10368
10378
|
var g = i.getBoundingClientRect();
|
|
10369
|
-
a -= g.top + parseInt(
|
|
10379
|
+
a -= g.top + parseInt(D(i, "border-top-width")), l -= g.left + parseInt(D(i, "border-left-width")), c = a + s.height, _ = l + s.width;
|
|
10370
10380
|
break;
|
|
10371
10381
|
}
|
|
10372
10382
|
while (i = i.parentNode);
|
|
@@ -10385,8 +10395,8 @@ function Ne(e, t, n, o, i) {
|
|
|
10385
10395
|
}
|
|
10386
10396
|
}
|
|
10387
10397
|
function ga(e, t, n) {
|
|
10388
|
-
for (var o = Dt(e, !0), i =
|
|
10389
|
-
var s =
|
|
10398
|
+
for (var o = Dt(e, !0), i = ke(e)[t]; o; ) {
|
|
10399
|
+
var s = ke(o)[n], a = void 0;
|
|
10390
10400
|
if (a = i >= s, !a)
|
|
10391
10401
|
return o;
|
|
10392
10402
|
if (o === _t())
|
|
@@ -10397,7 +10407,7 @@ function ga(e, t, n) {
|
|
|
10397
10407
|
}
|
|
10398
10408
|
function mn(e, t, n, o) {
|
|
10399
10409
|
for (var i = 0, s = 0, a = e.children; s < a.length; ) {
|
|
10400
|
-
if (a[s].style.display !== "none" && a[s] !==
|
|
10410
|
+
if (a[s].style.display !== "none" && a[s] !== M.ghost && (o || a[s] !== M.dragged) && it(a[s], n.draggable, e, !1)) {
|
|
10401
10411
|
if (i === t)
|
|
10402
10412
|
return a[s];
|
|
10403
10413
|
i++;
|
|
@@ -10407,16 +10417,16 @@ function mn(e, t, n, o) {
|
|
|
10407
10417
|
return null;
|
|
10408
10418
|
}
|
|
10409
10419
|
function ls(e, t) {
|
|
10410
|
-
for (var n = e.lastElementChild; n && (n ===
|
|
10420
|
+
for (var n = e.lastElementChild; n && (n === M.ghost || D(n, "display") === "none" || t && !Ro(n, t)); )
|
|
10411
10421
|
n = n.previousElementSibling;
|
|
10412
10422
|
return n || null;
|
|
10413
10423
|
}
|
|
10414
|
-
function
|
|
10424
|
+
function et(e, t) {
|
|
10415
10425
|
var n = 0;
|
|
10416
10426
|
if (!e || !e.parentNode)
|
|
10417
10427
|
return -1;
|
|
10418
10428
|
for (; e = e.previousElementSibling; )
|
|
10419
|
-
e.nodeName.toUpperCase() !== "TEMPLATE" && e !==
|
|
10429
|
+
e.nodeName.toUpperCase() !== "TEMPLATE" && e !== M.clone && (!t || Ro(e, t)) && n++;
|
|
10420
10430
|
return n;
|
|
10421
10431
|
}
|
|
10422
10432
|
function ma(e) {
|
|
@@ -10443,7 +10453,7 @@ function Dt(e, t) {
|
|
|
10443
10453
|
var n = e, o = !1;
|
|
10444
10454
|
do
|
|
10445
10455
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
10446
|
-
var i =
|
|
10456
|
+
var i = D(n);
|
|
10447
10457
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
10448
10458
|
if (!n.getBoundingClientRect || n === document.body)
|
|
10449
10459
|
return _t();
|
|
@@ -10489,8 +10499,8 @@ function Nr(e, t, n) {
|
|
|
10489
10499
|
var o = {};
|
|
10490
10500
|
return Array.from(e.children).forEach(function(i) {
|
|
10491
10501
|
var s, a, l, c;
|
|
10492
|
-
if (!(!
|
|
10493
|
-
var _ =
|
|
10502
|
+
if (!(!it(i, t.draggable, e, !1) || i.animated || i === n)) {
|
|
10503
|
+
var _ = ke(i);
|
|
10494
10504
|
o.left = Math.min((s = o.left) !== null && s !== void 0 ? s : 1 / 0, _.left), o.top = Math.min((a = o.top) !== null && a !== void 0 ? a : 1 / 0, _.top), o.right = Math.max((l = o.right) !== null && l !== void 0 ? l : -1 / 0, _.right), o.bottom = Math.max((c = o.bottom) !== null && c !== void 0 ? c : -1 / 0, _.bottom);
|
|
10495
10505
|
}
|
|
10496
10506
|
}), o.width = o.right - o.left, o.height = o.bottom - o.top, o.x = o.left, o.y = o.top, o;
|
|
@@ -10503,10 +10513,10 @@ function Bf() {
|
|
|
10503
10513
|
if (e = [], !!this.options.animation) {
|
|
10504
10514
|
var n = [].slice.call(this.el.children);
|
|
10505
10515
|
n.forEach(function(o) {
|
|
10506
|
-
if (!(
|
|
10516
|
+
if (!(D(o, "display") === "none" || o === M.ghost)) {
|
|
10507
10517
|
e.push({
|
|
10508
10518
|
target: o,
|
|
10509
|
-
rect:
|
|
10519
|
+
rect: ke(o)
|
|
10510
10520
|
});
|
|
10511
10521
|
var i = dt({}, e[e.length - 1].rect);
|
|
10512
10522
|
if (o.thisAnimationDuration) {
|
|
@@ -10534,7 +10544,7 @@ function Bf() {
|
|
|
10534
10544
|
}
|
|
10535
10545
|
var i = !1, s = 0;
|
|
10536
10546
|
e.forEach(function(a) {
|
|
10537
|
-
var l = 0, c = a.target, _ = c.fromRect, d =
|
|
10547
|
+
var l = 0, c = a.target, _ = c.fromRect, d = ke(c), h = c.prevFromRect, g = c.prevToRect, m = a.rect, I = _n(c, !0);
|
|
10538
10548
|
I && (d.top -= I.f, d.left -= I.e), c.toRect = d, c.thisAnimationDuration && bi(h, d) && !bi(_, d) && // Make sure animatingRect is on line between toRect & fromRect
|
|
10539
10549
|
(m.top - d.top) / (m.left - d.left) === (_.top - d.top) / (_.left - d.left) && (l = Df(m, h, g, o.options)), bi(d, _) || (c.prevFromRect = _, c.prevToRect = d, l || (l = o.options.animation), o.animate(c, m, d, l)), l && (i = !0, s = Math.max(s, l), clearTimeout(c.animationResetTimer), c.animationResetTimer = setTimeout(function() {
|
|
10540
10550
|
c.animationTime = 0, c.prevFromRect = null, c.fromRect = null, c.prevToRect = null, c.thisAnimationDuration = null;
|
|
@@ -10545,10 +10555,10 @@ function Bf() {
|
|
|
10545
10555
|
},
|
|
10546
10556
|
animate: function(n, o, i, s) {
|
|
10547
10557
|
if (s) {
|
|
10548
|
-
|
|
10558
|
+
D(n, "transition", ""), D(n, "transform", "");
|
|
10549
10559
|
var a = _n(this.el), l = a && a.a, c = a && a.d, _ = (o.left - i.left) / (l || 1), d = (o.top - i.top) / (c || 1);
|
|
10550
|
-
n.animatingX = !!_, n.animatingY = !!d,
|
|
10551
|
-
|
|
10560
|
+
n.animatingX = !!_, n.animatingY = !!d, D(n, "transform", "translate3d(" + _ + "px," + d + "px,0)"), this.forRepaintDummy = Rf(n), D(n, "transition", "transform " + s + "ms" + (this.options.easing ? " " + this.options.easing : "")), D(n, "transform", "translate3d(0,0,0)"), typeof n.animated == "number" && clearTimeout(n.animated), n.animated = setTimeout(function() {
|
|
10561
|
+
D(n, "transition", ""), D(n, "transform", ""), n.animated = !1, n.animatingX = !1, n.animatingY = !1;
|
|
10552
10562
|
}, s);
|
|
10553
10563
|
}
|
|
10554
10564
|
}
|
|
@@ -10615,31 +10625,31 @@ var nn = [], Ii = {
|
|
|
10615
10625
|
function Mf(e) {
|
|
10616
10626
|
var t = e.sortable, n = e.rootEl, o = e.name, i = e.targetEl, s = e.cloneEl, a = e.toEl, l = e.fromEl, c = e.oldIndex, _ = e.newIndex, d = e.oldDraggableIndex, h = e.newDraggableIndex, g = e.originalEvent, m = e.putSortable, I = e.extraEventProperties;
|
|
10617
10627
|
if (t = t || n && n[Qe], !!t) {
|
|
10618
|
-
var O, G = t.options,
|
|
10628
|
+
var O, G = t.options, j = "on" + o.charAt(0).toUpperCase() + o.substr(1);
|
|
10619
10629
|
window.CustomEvent && !yt && !jn ? O = new CustomEvent(o, {
|
|
10620
10630
|
bubbles: !0,
|
|
10621
10631
|
cancelable: !0
|
|
10622
10632
|
}) : (O = document.createEvent("Event"), O.initEvent(o, !0, !0)), O.to = a || n, O.from = l || n, O.item = i || n, O.clone = s, O.oldIndex = c, O.newIndex = _, O.oldDraggableIndex = d, O.newDraggableIndex = h, O.originalEvent = g, O.pullMode = m ? m.lastPutMode : void 0;
|
|
10623
|
-
var
|
|
10624
|
-
for (var
|
|
10625
|
-
O[
|
|
10626
|
-
n && n.dispatchEvent(O), G[
|
|
10633
|
+
var U = dt(dt({}, I), Wn.getEventProperties(o, t));
|
|
10634
|
+
for (var J in U)
|
|
10635
|
+
O[J] = U[J];
|
|
10636
|
+
n && n.dispatchEvent(O), G[j] && G[j].call(t, O);
|
|
10627
10637
|
}
|
|
10628
10638
|
}
|
|
10629
10639
|
var Pf = ["evt"], je = function(e, t) {
|
|
10630
10640
|
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = n.evt, i = yf(n, Pf);
|
|
10631
|
-
Wn.pluginEvent.bind(
|
|
10641
|
+
Wn.pluginEvent.bind(M)(e, t, dt({
|
|
10632
10642
|
dragEl: A,
|
|
10633
|
-
parentEl:
|
|
10643
|
+
parentEl: Te,
|
|
10634
10644
|
ghostEl: K,
|
|
10635
10645
|
rootEl: de,
|
|
10636
10646
|
nextEl: Ht,
|
|
10637
10647
|
lastDownEl: mo,
|
|
10638
|
-
cloneEl:
|
|
10648
|
+
cloneEl: fe,
|
|
10639
10649
|
cloneHidden: St,
|
|
10640
10650
|
dragStarted: yn,
|
|
10641
10651
|
putSortable: Ue,
|
|
10642
|
-
activeSortable:
|
|
10652
|
+
activeSortable: M.active,
|
|
10643
10653
|
originalEvent: o,
|
|
10644
10654
|
oldIndex: ln,
|
|
10645
10655
|
oldDraggableIndex: Dn,
|
|
@@ -10665,7 +10675,7 @@ var Pf = ["evt"], je = function(e, t) {
|
|
|
10665
10675
|
function Ge(e) {
|
|
10666
10676
|
Mf(dt({
|
|
10667
10677
|
putSortable: Ue,
|
|
10668
|
-
cloneEl:
|
|
10678
|
+
cloneEl: fe,
|
|
10669
10679
|
targetEl: A,
|
|
10670
10680
|
rootEl: de,
|
|
10671
10681
|
oldIndex: ln,
|
|
@@ -10674,7 +10684,7 @@ function Ge(e) {
|
|
|
10674
10684
|
newDraggableIndex: kt
|
|
10675
10685
|
}, e));
|
|
10676
10686
|
}
|
|
10677
|
-
var A,
|
|
10687
|
+
var A, Te, K, de, Ht, mo, fe, St, ln, Je, Dn, kt, ro, Ue, an = !1, Do = !1, Mo = [], Yt, ot, yi, Ci, Ta, Ea, yn, on, Mn, Pn = !1, lo = !1, To, Fe, Ni = [], Xi = !1, Po = [], ni = typeof document < "u", co = Ar, Aa = jn || yt ? "cssFloat" : "float", Uf = ni && !vr && !Ar && "draggable" in document.createElement("div"), kr = function() {
|
|
10678
10688
|
if (ni) {
|
|
10679
10689
|
if (yt)
|
|
10680
10690
|
return !1;
|
|
@@ -10682,7 +10692,7 @@ var A, me, K, de, Ht, mo, he, St, ln, Je, Dn, kt, ro, Ue, an = !1, Do = !1, Mo =
|
|
|
10682
10692
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
10683
10693
|
}
|
|
10684
10694
|
}(), Lr = function(e, t) {
|
|
10685
|
-
var n =
|
|
10695
|
+
var n = D(e), o = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = mn(e, 0, t), s = mn(e, 1, t), a = i && D(i), l = s && D(s), c = a && parseInt(a.marginLeft) + parseInt(a.marginRight) + ke(i).width, _ = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + ke(s).width;
|
|
10686
10696
|
if (n.display === "flex")
|
|
10687
10697
|
return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
10688
10698
|
if (n.display === "grid")
|
|
@@ -10700,7 +10710,7 @@ var A, me, K, de, Ht, mo, he, St, ln, Je, Dn, kt, ro, Ue, an = !1, Do = !1, Mo =
|
|
|
10700
10710
|
return Mo.some(function(o) {
|
|
10701
10711
|
var i = o[Qe].options.emptyInsertThreshold;
|
|
10702
10712
|
if (!(!i || ls(o))) {
|
|
10703
|
-
var s =
|
|
10713
|
+
var s = ke(o), a = e >= s.left - i && e <= s.right + i, l = t >= s.top - i && t <= s.bottom + i;
|
|
10704
10714
|
if (a && l)
|
|
10705
10715
|
return n = o;
|
|
10706
10716
|
}
|
|
@@ -10726,9 +10736,9 @@ var A, me, K, de, Ht, mo, he, St, ln, Je, Dn, kt, ro, Ue, an = !1, Do = !1, Mo =
|
|
|
10726
10736
|
name: o
|
|
10727
10737
|
}), n.name = o.name, n.checkPull = t(o.pull, !0), n.checkPut = t(o.put), n.revertClone = o.revertClone, e.group = n;
|
|
10728
10738
|
}, Br = function() {
|
|
10729
|
-
!kr && K &&
|
|
10739
|
+
!kr && K && D(K, "display", "none");
|
|
10730
10740
|
}, Rr = function() {
|
|
10731
|
-
!kr && K &&
|
|
10741
|
+
!kr && K && D(K, "display", "");
|
|
10732
10742
|
};
|
|
10733
10743
|
ni && !vr && document.addEventListener("click", function(e) {
|
|
10734
10744
|
if (Do)
|
|
@@ -10748,7 +10758,7 @@ var Kt = function(e) {
|
|
|
10748
10758
|
}, Vf = function(e) {
|
|
10749
10759
|
A && A.parentNode[Qe]._isOutsideThisEl(e.target);
|
|
10750
10760
|
};
|
|
10751
|
-
function
|
|
10761
|
+
function M(e, t) {
|
|
10752
10762
|
if (!(e && e.nodeType && e.nodeType === 1))
|
|
10753
10763
|
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));
|
|
10754
10764
|
this.el = e, this.options = t = bt({}, t), e[Qe] = this;
|
|
@@ -10794,7 +10804,7 @@ function P(e, t) {
|
|
|
10794
10804
|
x: 0,
|
|
10795
10805
|
y: 0
|
|
10796
10806
|
},
|
|
10797
|
-
supportPointer:
|
|
10807
|
+
supportPointer: M.supportPointer !== !1 && "PointerEvent" in window && !Bn,
|
|
10798
10808
|
emptyInsertThreshold: 5
|
|
10799
10809
|
};
|
|
10800
10810
|
Wn.initializePlugins(this, e, n);
|
|
@@ -10805,9 +10815,9 @@ function P(e, t) {
|
|
|
10805
10815
|
i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
10806
10816
|
this.nativeDraggable = t.forceFallback ? !1 : Uf, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? te(e, "pointerdown", this._onTapStart) : (te(e, "mousedown", this._onTapStart), te(e, "touchstart", this._onTapStart)), this.nativeDraggable && (te(e, "dragover", this), te(e, "dragenter", this)), Mo.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), bt(this, Bf());
|
|
10807
10817
|
}
|
|
10808
|
-
|
|
10818
|
+
M.prototype = /** @lends Sortable.prototype */
|
|
10809
10819
|
{
|
|
10810
|
-
constructor:
|
|
10820
|
+
constructor: M,
|
|
10811
10821
|
_isOutsideThisEl: function(e) {
|
|
10812
10822
|
!this.el.contains(e) && e !== this.el && (on = null);
|
|
10813
10823
|
},
|
|
@@ -10817,8 +10827,8 @@ P.prototype = /** @lends Sortable.prototype */
|
|
|
10817
10827
|
_onTapStart: function(e) {
|
|
10818
10828
|
if (e.cancelable) {
|
|
10819
10829
|
var t = this, n = this.el, o = this.options, i = o.preventOnFilter, s = e.type, a = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, l = (a || e).target, c = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || l, _ = o.filter;
|
|
10820
|
-
if (Wf(n), !A && !(/mousedown|pointerdown/.test(s) && e.button !== 0 || o.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Bn && l && l.tagName.toUpperCase() === "SELECT") && (l =
|
|
10821
|
-
if (ln =
|
|
10830
|
+
if (Wf(n), !A && !(/mousedown|pointerdown/.test(s) && e.button !== 0 || o.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Bn && l && l.tagName.toUpperCase() === "SELECT") && (l = it(l, o.draggable, n, !1), !(l && l.animated) && mo !== l)) {
|
|
10831
|
+
if (ln = et(l), Dn = et(l, o.draggable), typeof _ == "function") {
|
|
10822
10832
|
if (_.call(this, e, l, this)) {
|
|
10823
10833
|
Ge({
|
|
10824
10834
|
sortable: t,
|
|
@@ -10833,7 +10843,7 @@ P.prototype = /** @lends Sortable.prototype */
|
|
|
10833
10843
|
return;
|
|
10834
10844
|
}
|
|
10835
10845
|
} else if (_ && (_ = _.split(",").some(function(d) {
|
|
10836
|
-
if (d =
|
|
10846
|
+
if (d = it(c, d.trim(), n, !1), d)
|
|
10837
10847
|
return Ge({
|
|
10838
10848
|
sortable: t,
|
|
10839
10849
|
rootEl: d,
|
|
@@ -10848,22 +10858,22 @@ P.prototype = /** @lends Sortable.prototype */
|
|
|
10848
10858
|
i && e.cancelable && e.preventDefault();
|
|
10849
10859
|
return;
|
|
10850
10860
|
}
|
|
10851
|
-
o.handle && !
|
|
10861
|
+
o.handle && !it(c, o.handle, n, !1) || this._prepareDragStart(e, a, l);
|
|
10852
10862
|
}
|
|
10853
10863
|
}
|
|
10854
10864
|
},
|
|
10855
10865
|
_prepareDragStart: function(e, t, n) {
|
|
10856
10866
|
var o = this, i = o.el, s = o.options, a = i.ownerDocument, l;
|
|
10857
10867
|
if (n && !A && n.parentNode === i) {
|
|
10858
|
-
var c =
|
|
10859
|
-
if (de = i, A = n,
|
|
10868
|
+
var c = ke(n);
|
|
10869
|
+
if (de = i, A = n, Te = A.parentNode, Ht = A.nextSibling, mo = n, ro = s.group, M.dragged = A, Yt = {
|
|
10860
10870
|
target: A,
|
|
10861
10871
|
clientX: (t || e).clientX,
|
|
10862
10872
|
clientY: (t || e).clientY
|
|
10863
10873
|
}, Ta = Yt.clientX - c.left, Ea = Yt.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, A.style["will-change"] = "all", l = function() {
|
|
10864
10874
|
if (je("delayEnded", o, {
|
|
10865
10875
|
evt: e
|
|
10866
|
-
}),
|
|
10876
|
+
}), M.eventCanceled) {
|
|
10867
10877
|
o._onDrop();
|
|
10868
10878
|
return;
|
|
10869
10879
|
}
|
|
@@ -10877,7 +10887,7 @@ P.prototype = /** @lends Sortable.prototype */
|
|
|
10877
10887
|
}), te(a, "dragover", Kt), te(a, "mousemove", Kt), te(a, "touchmove", Kt), te(a, "mouseup", o._onDrop), te(a, "touchend", o._onDrop), te(a, "touchcancel", o._onDrop), ha && this.nativeDraggable && (this.options.touchStartThreshold = 4, A.draggable = !0), je("delayStart", this, {
|
|
10878
10888
|
evt: e
|
|
10879
10889
|
}), s.delay && (!s.delayOnTouchOnly || t) && (!this.nativeDraggable || !(jn || yt))) {
|
|
10880
|
-
if (
|
|
10890
|
+
if (M.eventCanceled) {
|
|
10881
10891
|
this._onDrop();
|
|
10882
10892
|
return;
|
|
10883
10893
|
}
|
|
@@ -10895,7 +10905,7 @@ P.prototype = /** @lends Sortable.prototype */
|
|
|
10895
10905
|
},
|
|
10896
10906
|
_disableDelayedDragEvents: function() {
|
|
10897
10907
|
var e = this.el.ownerDocument;
|
|
10898
|
-
|
|
10908
|
+
ee(e, "mouseup", this._disableDelayedDrag), ee(e, "touchend", this._disableDelayedDrag), ee(e, "touchcancel", this._disableDelayedDrag), ee(e, "mousemove", this._delayedDragTouchMoveHandler), ee(e, "touchmove", this._delayedDragTouchMoveHandler), ee(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
10899
10909
|
},
|
|
10900
10910
|
_triggerDragStart: function(e, t) {
|
|
10901
10911
|
t = t || e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? te(document, "pointermove", this._onTouchMove) : t ? te(document, "touchmove", this._onTouchMove) : te(document, "mousemove", this._onTouchMove) : (te(A, "dragend", this), te(de, "dragstart", this._onDragStart));
|
|
@@ -10912,7 +10922,7 @@ P.prototype = /** @lends Sortable.prototype */
|
|
|
10912
10922
|
evt: t
|
|
10913
10923
|
}), this.nativeDraggable && te(document, "dragover", Vf);
|
|
10914
10924
|
var n = this.options;
|
|
10915
|
-
!e && qe(A, n.dragClass, !1), qe(A, n.ghostClass, !0),
|
|
10925
|
+
!e && qe(A, n.dragClass, !1), qe(A, n.ghostClass, !0), M.active = this, e && this._appendGhost(), Ge({
|
|
10916
10926
|
sortable: this,
|
|
10917
10927
|
name: "start",
|
|
10918
10928
|
originalEvent: t
|
|
@@ -10921,17 +10931,17 @@ P.prototype = /** @lends Sortable.prototype */
|
|
|
10921
10931
|
this._nulling();
|
|
10922
10932
|
},
|
|
10923
10933
|
_emulateDragOver: function() {
|
|
10924
|
-
if (
|
|
10925
|
-
this._lastX =
|
|
10926
|
-
for (var e = document.elementFromPoint(
|
|
10934
|
+
if (ot) {
|
|
10935
|
+
this._lastX = ot.clientX, this._lastY = ot.clientY, Br();
|
|
10936
|
+
for (var e = document.elementFromPoint(ot.clientX, ot.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(ot.clientX, ot.clientY), e !== t); )
|
|
10927
10937
|
t = e;
|
|
10928
10938
|
if (A.parentNode[Qe]._isOutsideThisEl(e), t)
|
|
10929
10939
|
do {
|
|
10930
10940
|
if (t[Qe]) {
|
|
10931
10941
|
var n = void 0;
|
|
10932
10942
|
if (n = t[Qe]._onDragOver({
|
|
10933
|
-
clientX:
|
|
10934
|
-
clientY:
|
|
10943
|
+
clientX: ot.clientX,
|
|
10944
|
+
clientY: ot.clientY,
|
|
10935
10945
|
target: e,
|
|
10936
10946
|
rootEl: t
|
|
10937
10947
|
}), n && !this.options.dragoverBubble)
|
|
@@ -10945,7 +10955,7 @@ P.prototype = /** @lends Sortable.prototype */
|
|
|
10945
10955
|
_onTouchMove: function(e) {
|
|
10946
10956
|
if (Yt) {
|
|
10947
10957
|
var t = this.options, n = t.fallbackTolerance, o = t.fallbackOffset, i = e.touches ? e.touches[0] : e, s = K && _n(K, !0), a = K && s && s.a, l = K && s && s.d, c = co && Fe && ma(Fe), _ = (i.clientX - Yt.clientX + o.x) / (a || 1) + (c ? c[0] - Ni[0] : 0) / (a || 1), d = (i.clientY - Yt.clientY + o.y) / (l || 1) + (c ? c[1] - Ni[1] : 0) / (l || 1);
|
|
10948
|
-
if (!
|
|
10958
|
+
if (!M.active && !an) {
|
|
10949
10959
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n)
|
|
10950
10960
|
return;
|
|
10951
10961
|
this._onDragStart(e, !0);
|
|
@@ -10960,40 +10970,40 @@ P.prototype = /** @lends Sortable.prototype */
|
|
|
10960
10970
|
f: d
|
|
10961
10971
|
};
|
|
10962
10972
|
var h = "matrix(".concat(s.a, ",").concat(s.b, ",").concat(s.c, ",").concat(s.d, ",").concat(s.e, ",").concat(s.f, ")");
|
|
10963
|
-
|
|
10973
|
+
D(K, "webkitTransform", h), D(K, "mozTransform", h), D(K, "msTransform", h), D(K, "transform", h), yi = _, Ci = d, ot = i;
|
|
10964
10974
|
}
|
|
10965
10975
|
e.cancelable && e.preventDefault();
|
|
10966
10976
|
}
|
|
10967
10977
|
},
|
|
10968
10978
|
_appendGhost: function() {
|
|
10969
10979
|
if (!K) {
|
|
10970
|
-
var e = this.options.fallbackOnBody ? document.body : de, t =
|
|
10980
|
+
var e = this.options.fallbackOnBody ? document.body : de, t = ke(A, !0, co, !0, e), n = this.options;
|
|
10971
10981
|
if (co) {
|
|
10972
|
-
for (Fe = e;
|
|
10982
|
+
for (Fe = e; D(Fe, "position") === "static" && D(Fe, "transform") === "none" && Fe !== document; )
|
|
10973
10983
|
Fe = Fe.parentNode;
|
|
10974
10984
|
Fe !== document.body && Fe !== document.documentElement ? (Fe === document && (Fe = _t()), t.top += Fe.scrollTop, t.left += Fe.scrollLeft) : Fe = _t(), Ni = ma(Fe);
|
|
10975
10985
|
}
|
|
10976
|
-
K = A.cloneNode(!0), qe(K, n.ghostClass, !1), qe(K, n.fallbackClass, !0), qe(K, n.dragClass, !0),
|
|
10986
|
+
K = A.cloneNode(!0), qe(K, n.ghostClass, !1), qe(K, n.fallbackClass, !0), qe(K, n.dragClass, !0), D(K, "transition", ""), D(K, "transform", ""), D(K, "box-sizing", "border-box"), D(K, "margin", 0), D(K, "top", t.top), D(K, "left", t.left), D(K, "width", t.width), D(K, "height", t.height), D(K, "opacity", "0.8"), D(K, "position", co ? "absolute" : "fixed"), D(K, "zIndex", "100000"), D(K, "pointerEvents", "none"), M.ghost = K, e.appendChild(K), D(K, "transform-origin", Ta / parseInt(K.style.width) * 100 + "% " + Ea / parseInt(K.style.height) * 100 + "%");
|
|
10977
10987
|
}
|
|
10978
10988
|
},
|
|
10979
10989
|
_onDragStart: function(e, t) {
|
|
10980
10990
|
var n = this, o = e.dataTransfer, i = n.options;
|
|
10981
10991
|
if (je("dragStart", this, {
|
|
10982
10992
|
evt: e
|
|
10983
|
-
}),
|
|
10993
|
+
}), M.eventCanceled) {
|
|
10984
10994
|
this._onDrop();
|
|
10985
10995
|
return;
|
|
10986
10996
|
}
|
|
10987
|
-
je("setupClone", this),
|
|
10988
|
-
je("clone", n), !
|
|
10997
|
+
je("setupClone", this), M.eventCanceled || (fe = Cr(A), fe.removeAttribute("id"), fe.draggable = !1, fe.style["will-change"] = "", this._hideClone(), qe(fe, this.options.chosenClass, !1), M.clone = fe), n.cloneId = Eo(function() {
|
|
10998
|
+
je("clone", n), !M.eventCanceled && (n.options.removeCloneOnHide || de.insertBefore(fe, A), n._hideClone(), Ge({
|
|
10989
10999
|
sortable: n,
|
|
10990
11000
|
name: "clone"
|
|
10991
11001
|
}));
|
|
10992
|
-
}), !t && qe(A, i.dragClass, !0), t ? (Do = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (
|
|
11002
|
+
}), !t && qe(A, i.dragClass, !0), t ? (Do = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (ee(document, "mouseup", n._onDrop), ee(document, "touchend", n._onDrop), ee(document, "touchcancel", n._onDrop), o && (o.effectAllowed = "move", i.setData && i.setData.call(n, o, A)), te(document, "drop", n), D(A, "transform", "translateZ(0)")), an = !0, n._dragStartId = Eo(n._dragStarted.bind(n, t, e)), te(document, "selectstart", n), yn = !0, Bn && D(document.body, "user-select", "none");
|
|
10993
11003
|
},
|
|
10994
11004
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
10995
11005
|
_onDragOver: function(e) {
|
|
10996
|
-
var t = this.el, n = e.target, o, i, s, a = this.options, l = a.group, c =
|
|
11006
|
+
var t = this.el, n = e.target, o, i, s, a = this.options, l = a.group, c = M.active, _ = ro === l, d = a.sort, h = Ue || c, g, m = this, I = !1;
|
|
10997
11007
|
if (Xi)
|
|
10998
11008
|
return;
|
|
10999
11009
|
function O(Me, re) {
|
|
@@ -11007,25 +11017,25 @@ P.prototype = /** @lends Sortable.prototype */
|
|
|
11007
11017
|
canSort: d,
|
|
11008
11018
|
fromSortable: h,
|
|
11009
11019
|
target: n,
|
|
11010
|
-
completed:
|
|
11020
|
+
completed: j,
|
|
11011
11021
|
onMove: function(Xe, gt) {
|
|
11012
|
-
return uo(de, t, A, o, Xe,
|
|
11022
|
+
return uo(de, t, A, o, Xe, ke(Xe), e, gt);
|
|
11013
11023
|
},
|
|
11014
|
-
changed:
|
|
11024
|
+
changed: U
|
|
11015
11025
|
}, re));
|
|
11016
11026
|
}
|
|
11017
11027
|
function G() {
|
|
11018
11028
|
O("dragOverAnimationCapture"), m.captureAnimationState(), m !== h && h.captureAnimationState();
|
|
11019
11029
|
}
|
|
11020
|
-
function
|
|
11030
|
+
function j(Me) {
|
|
11021
11031
|
return O("dragOverCompleted", {
|
|
11022
11032
|
insertion: Me
|
|
11023
|
-
}), Me && (_ ? c._hideClone() : c._showClone(m), m !== h && (qe(A, Ue ? Ue.options.ghostClass : c.options.ghostClass, !1), qe(A, a.ghostClass, !0)), Ue !== m && m !==
|
|
11033
|
+
}), Me && (_ ? c._hideClone() : c._showClone(m), m !== h && (qe(A, Ue ? Ue.options.ghostClass : c.options.ghostClass, !1), qe(A, a.ghostClass, !0)), Ue !== m && m !== M.active ? Ue = m : m === M.active && Ue && (Ue = null), h === m && (m._ignoreWhileAnimating = n), m.animateAll(function() {
|
|
11024
11034
|
O("dragOverAnimationComplete"), m._ignoreWhileAnimating = null;
|
|
11025
11035
|
}), m !== h && (h.animateAll(), h._ignoreWhileAnimating = null)), (n === A && !A.animated || n === t && !n.animated) && (on = null), !a.dragoverBubble && !e.rootEl && n !== document && (A.parentNode[Qe]._isOutsideThisEl(e.target), !Me && Kt(e)), !a.dragoverBubble && e.stopPropagation && e.stopPropagation(), I = !0;
|
|
11026
11036
|
}
|
|
11027
|
-
function
|
|
11028
|
-
Je =
|
|
11037
|
+
function U() {
|
|
11038
|
+
Je = et(A), kt = et(A, a.draggable), Ge({
|
|
11029
11039
|
sortable: m,
|
|
11030
11040
|
name: "change",
|
|
11031
11041
|
toEl: t,
|
|
@@ -11034,116 +11044,116 @@ P.prototype = /** @lends Sortable.prototype */
|
|
|
11034
11044
|
originalEvent: e
|
|
11035
11045
|
});
|
|
11036
11046
|
}
|
|
11037
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
11047
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = it(n, a.draggable, t, !0), O("dragOver"), M.eventCanceled)
|
|
11038
11048
|
return I;
|
|
11039
11049
|
if (A.contains(e.target) || n.animated && n.animatingX && n.animatingY || m._ignoreWhileAnimating === n)
|
|
11040
|
-
return
|
|
11041
|
-
if (Do = !1, c && !a.disabled && (_ ? d || (s =
|
|
11042
|
-
if (g = this._getDirection(e, n) === "vertical", o =
|
|
11050
|
+
return j(!1);
|
|
11051
|
+
if (Do = !1, c && !a.disabled && (_ ? d || (s = Te !== de) : Ue === this || (this.lastPutMode = ro.checkPull(this, c, A, e)) && l.checkPut(this, c, A, e))) {
|
|
11052
|
+
if (g = this._getDirection(e, n) === "vertical", o = ke(A), O("dragOverValid"), M.eventCanceled)
|
|
11043
11053
|
return I;
|
|
11044
11054
|
if (s)
|
|
11045
|
-
return
|
|
11046
|
-
var
|
|
11047
|
-
if (!
|
|
11048
|
-
if (
|
|
11049
|
-
return
|
|
11050
|
-
if (
|
|
11051
|
-
return G(),
|
|
11052
|
-
} else if (
|
|
11053
|
-
var
|
|
11054
|
-
if (
|
|
11055
|
-
return
|
|
11056
|
-
if (n =
|
|
11057
|
-
return G(), t.insertBefore(A,
|
|
11055
|
+
return Te = de, G(), this._hideClone(), O("revert"), M.eventCanceled || (Ht ? de.insertBefore(A, Ht) : de.appendChild(A)), j(!0);
|
|
11056
|
+
var J = ls(t, a.draggable);
|
|
11057
|
+
if (!J || Hf(e, g, this) && !J.animated) {
|
|
11058
|
+
if (J === A)
|
|
11059
|
+
return j(!1);
|
|
11060
|
+
if (J && t === e.target && (n = J), n && (i = ke(n)), uo(de, t, A, o, n, i, e, !!n) !== !1)
|
|
11061
|
+
return G(), J && J.nextSibling ? t.insertBefore(A, J.nextSibling) : t.appendChild(A), Te = t, U(), j(!0);
|
|
11062
|
+
} else if (J && Kf(e, g, this)) {
|
|
11063
|
+
var ge = mn(t, 0, a, !0);
|
|
11064
|
+
if (ge === A)
|
|
11065
|
+
return j(!1);
|
|
11066
|
+
if (n = ge, i = ke(n), uo(de, t, A, o, n, i, e, !1) !== !1)
|
|
11067
|
+
return G(), t.insertBefore(A, ge), Te = t, U(), j(!0);
|
|
11058
11068
|
} else if (n.parentNode === t) {
|
|
11059
|
-
i =
|
|
11060
|
-
var
|
|
11061
|
-
on !== n && (
|
|
11062
|
-
var
|
|
11063
|
-
if (
|
|
11064
|
-
var se =
|
|
11069
|
+
i = ke(n);
|
|
11070
|
+
var Q = 0, Le, $e = A.parentNode !== t, B = !xf(A.animated && A.toRect || o, n.animated && n.toRect || i, g), F = g ? "top" : "left", ie = ga(n, "top", "top") || ga(A, "top", "top"), me = ie ? ie.scrollTop : void 0;
|
|
11071
|
+
on !== n && (Le = i[F], Pn = !1, lo = !B && a.invertSwap || $e), Q = $f(e, n, i, g, B ? 1 : a.swapThreshold, a.invertedSwapThreshold == null ? a.swapThreshold : a.invertedSwapThreshold, lo, on === n);
|
|
11072
|
+
var Z;
|
|
11073
|
+
if (Q !== 0) {
|
|
11074
|
+
var se = et(A);
|
|
11065
11075
|
do
|
|
11066
|
-
se -=
|
|
11067
|
-
while (
|
|
11076
|
+
se -= Q, Z = Te.children[se];
|
|
11077
|
+
while (Z && (D(Z, "display") === "none" || Z === K));
|
|
11068
11078
|
}
|
|
11069
|
-
if (
|
|
11070
|
-
return
|
|
11071
|
-
on = n, Mn =
|
|
11079
|
+
if (Q === 0 || Z === n)
|
|
11080
|
+
return j(!1);
|
|
11081
|
+
on = n, Mn = Q;
|
|
11072
11082
|
var oe = n.nextElementSibling, R = !1;
|
|
11073
|
-
R =
|
|
11083
|
+
R = Q === 1;
|
|
11074
11084
|
var ae = uo(de, t, A, o, n, i, e, R);
|
|
11075
11085
|
if (ae !== !1)
|
|
11076
|
-
return (ae === 1 || ae === -1) && (R = ae === 1), Xi = !0, setTimeout(Yf, 30), G(), R && !oe ? t.appendChild(A) : n.parentNode.insertBefore(A, R ? oe : n), ie && yr(ie, 0,
|
|
11086
|
+
return (ae === 1 || ae === -1) && (R = ae === 1), Xi = !0, setTimeout(Yf, 30), G(), R && !oe ? t.appendChild(A) : n.parentNode.insertBefore(A, R ? oe : n), ie && yr(ie, 0, me - ie.scrollTop), Te = A.parentNode, Le !== void 0 && !lo && (To = Math.abs(Le - ke(n)[F])), U(), j(!0);
|
|
11077
11087
|
}
|
|
11078
11088
|
if (t.contains(A))
|
|
11079
|
-
return
|
|
11089
|
+
return j(!1);
|
|
11080
11090
|
}
|
|
11081
11091
|
return !1;
|
|
11082
11092
|
},
|
|
11083
11093
|
_ignoreWhileAnimating: null,
|
|
11084
11094
|
_offMoveEvents: function() {
|
|
11085
|
-
|
|
11095
|
+
ee(document, "mousemove", this._onTouchMove), ee(document, "touchmove", this._onTouchMove), ee(document, "pointermove", this._onTouchMove), ee(document, "dragover", Kt), ee(document, "mousemove", Kt), ee(document, "touchmove", Kt);
|
|
11086
11096
|
},
|
|
11087
11097
|
_offUpEvents: function() {
|
|
11088
11098
|
var e = this.el.ownerDocument;
|
|
11089
|
-
|
|
11099
|
+
ee(e, "mouseup", this._onDrop), ee(e, "touchend", this._onDrop), ee(e, "pointerup", this._onDrop), ee(e, "touchcancel", this._onDrop), ee(document, "selectstart", this);
|
|
11090
11100
|
},
|
|
11091
11101
|
_onDrop: function(e) {
|
|
11092
11102
|
var t = this.el, n = this.options;
|
|
11093
|
-
if (Je =
|
|
11103
|
+
if (Je = et(A), kt = et(A, n.draggable), je("drop", this, {
|
|
11094
11104
|
evt: e
|
|
11095
|
-
}),
|
|
11105
|
+
}), Te = A && A.parentNode, Je = et(A), kt = et(A, n.draggable), M.eventCanceled) {
|
|
11096
11106
|
this._nulling();
|
|
11097
11107
|
return;
|
|
11098
11108
|
}
|
|
11099
|
-
an = !1, lo = !1, Pn = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), zi(this.cloneId), zi(this._dragStartId), this.nativeDraggable && (
|
|
11109
|
+
an = !1, lo = !1, Pn = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), zi(this.cloneId), zi(this._dragStartId), this.nativeDraggable && (ee(document, "drop", this), ee(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Bn && D(document.body, "user-select", ""), D(A, "transform", ""), e && (yn && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), K && K.parentNode && K.parentNode.removeChild(K), (de === Te || Ue && Ue.lastPutMode !== "clone") && fe && fe.parentNode && fe.parentNode.removeChild(fe), A && (this.nativeDraggable && ee(A, "dragend", this), ki(A), A.style["will-change"] = "", yn && !an && qe(A, Ue ? Ue.options.ghostClass : this.options.ghostClass, !1), qe(A, this.options.chosenClass, !1), Ge({
|
|
11100
11110
|
sortable: this,
|
|
11101
11111
|
name: "unchoose",
|
|
11102
|
-
toEl:
|
|
11112
|
+
toEl: Te,
|
|
11103
11113
|
newIndex: null,
|
|
11104
11114
|
newDraggableIndex: null,
|
|
11105
11115
|
originalEvent: e
|
|
11106
|
-
}), de !==
|
|
11107
|
-
rootEl:
|
|
11116
|
+
}), de !== Te ? (Je >= 0 && (Ge({
|
|
11117
|
+
rootEl: Te,
|
|
11108
11118
|
name: "add",
|
|
11109
|
-
toEl:
|
|
11119
|
+
toEl: Te,
|
|
11110
11120
|
fromEl: de,
|
|
11111
11121
|
originalEvent: e
|
|
11112
11122
|
}), Ge({
|
|
11113
11123
|
sortable: this,
|
|
11114
11124
|
name: "remove",
|
|
11115
|
-
toEl:
|
|
11125
|
+
toEl: Te,
|
|
11116
11126
|
originalEvent: e
|
|
11117
11127
|
}), Ge({
|
|
11118
|
-
rootEl:
|
|
11128
|
+
rootEl: Te,
|
|
11119
11129
|
name: "sort",
|
|
11120
|
-
toEl:
|
|
11130
|
+
toEl: Te,
|
|
11121
11131
|
fromEl: de,
|
|
11122
11132
|
originalEvent: e
|
|
11123
11133
|
}), Ge({
|
|
11124
11134
|
sortable: this,
|
|
11125
11135
|
name: "sort",
|
|
11126
|
-
toEl:
|
|
11136
|
+
toEl: Te,
|
|
11127
11137
|
originalEvent: e
|
|
11128
11138
|
})), Ue && Ue.save()) : Je !== ln && Je >= 0 && (Ge({
|
|
11129
11139
|
sortable: this,
|
|
11130
11140
|
name: "update",
|
|
11131
|
-
toEl:
|
|
11141
|
+
toEl: Te,
|
|
11132
11142
|
originalEvent: e
|
|
11133
11143
|
}), Ge({
|
|
11134
11144
|
sortable: this,
|
|
11135
11145
|
name: "sort",
|
|
11136
|
-
toEl:
|
|
11146
|
+
toEl: Te,
|
|
11137
11147
|
originalEvent: e
|
|
11138
|
-
})),
|
|
11148
|
+
})), M.active && ((Je == null || Je === -1) && (Je = ln, kt = Dn), Ge({
|
|
11139
11149
|
sortable: this,
|
|
11140
11150
|
name: "end",
|
|
11141
|
-
toEl:
|
|
11151
|
+
toEl: Te,
|
|
11142
11152
|
originalEvent: e
|
|
11143
11153
|
}), this.save()))), this._nulling();
|
|
11144
11154
|
},
|
|
11145
11155
|
_nulling: function() {
|
|
11146
|
-
je("nulling", this), de = A =
|
|
11156
|
+
je("nulling", this), de = A = Te = K = Ht = fe = mo = St = Yt = ot = yn = Je = kt = ln = Dn = on = Mn = Ue = ro = M.dragged = M.ghost = M.clone = M.active = null, Po.forEach(function(e) {
|
|
11147
11157
|
e.checked = !0;
|
|
11148
11158
|
}), Po.length = yi = Ci = 0;
|
|
11149
11159
|
},
|
|
@@ -11168,7 +11178,7 @@ P.prototype = /** @lends Sortable.prototype */
|
|
|
11168
11178
|
*/
|
|
11169
11179
|
toArray: function() {
|
|
11170
11180
|
for (var e = [], t, n = this.el.children, o = 0, i = n.length, s = this.options; o < i; o++)
|
|
11171
|
-
t = n[o],
|
|
11181
|
+
t = n[o], it(t, s.draggable, this.el, !1) && e.push(t.getAttribute(s.dataIdAttr) || jf(t));
|
|
11172
11182
|
return e;
|
|
11173
11183
|
},
|
|
11174
11184
|
/**
|
|
@@ -11179,7 +11189,7 @@ P.prototype = /** @lends Sortable.prototype */
|
|
|
11179
11189
|
var n = {}, o = this.el;
|
|
11180
11190
|
this.toArray().forEach(function(i, s) {
|
|
11181
11191
|
var a = o.children[s];
|
|
11182
|
-
|
|
11192
|
+
it(a, this.options.draggable, o, !1) && (n[i] = a);
|
|
11183
11193
|
}, this), t && this.captureAnimationState(), e.forEach(function(i) {
|
|
11184
11194
|
n[i] && (o.removeChild(n[i]), o.appendChild(n[i]));
|
|
11185
11195
|
}), t && this.animateAll();
|
|
@@ -11198,7 +11208,7 @@ P.prototype = /** @lends Sortable.prototype */
|
|
|
11198
11208
|
* @returns {HTMLElement|null}
|
|
11199
11209
|
*/
|
|
11200
11210
|
closest: function(e, t) {
|
|
11201
|
-
return
|
|
11211
|
+
return it(e, t || this.options.draggable, this.el, !1);
|
|
11202
11212
|
},
|
|
11203
11213
|
/**
|
|
11204
11214
|
* Set/get option
|
|
@@ -11219,15 +11229,15 @@ P.prototype = /** @lends Sortable.prototype */
|
|
|
11219
11229
|
destroy: function() {
|
|
11220
11230
|
je("destroy", this);
|
|
11221
11231
|
var e = this.el;
|
|
11222
|
-
e[Qe] = null,
|
|
11232
|
+
e[Qe] = null, ee(e, "mousedown", this._onTapStart), ee(e, "touchstart", this._onTapStart), ee(e, "pointerdown", this._onTapStart), this.nativeDraggable && (ee(e, "dragover", this), ee(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(t) {
|
|
11223
11233
|
t.removeAttribute("draggable");
|
|
11224
11234
|
}), this._onDrop(), this._disableDelayedDragEvents(), Mo.splice(Mo.indexOf(this.el), 1), this.el = e = null;
|
|
11225
11235
|
},
|
|
11226
11236
|
_hideClone: function() {
|
|
11227
11237
|
if (!St) {
|
|
11228
|
-
if (je("hideClone", this),
|
|
11238
|
+
if (je("hideClone", this), M.eventCanceled)
|
|
11229
11239
|
return;
|
|
11230
|
-
|
|
11240
|
+
D(fe, "display", "none"), this.options.removeCloneOnHide && fe.parentNode && fe.parentNode.removeChild(fe), St = !0;
|
|
11231
11241
|
}
|
|
11232
11242
|
},
|
|
11233
11243
|
_showClone: function(e) {
|
|
@@ -11236,9 +11246,9 @@ P.prototype = /** @lends Sortable.prototype */
|
|
|
11236
11246
|
return;
|
|
11237
11247
|
}
|
|
11238
11248
|
if (St) {
|
|
11239
|
-
if (je("showClone", this),
|
|
11249
|
+
if (je("showClone", this), M.eventCanceled)
|
|
11240
11250
|
return;
|
|
11241
|
-
A.parentNode == de && !this.options.group.revertClone ? de.insertBefore(
|
|
11251
|
+
A.parentNode == de && !this.options.group.revertClone ? de.insertBefore(fe, A) : Ht ? de.insertBefore(fe, Ht) : de.appendChild(fe), this.options.group.revertClone && this.animate(A, fe), D(fe, "display", ""), St = !1;
|
|
11242
11252
|
}
|
|
11243
11253
|
}
|
|
11244
11254
|
};
|
|
@@ -11250,7 +11260,7 @@ function uo(e, t, n, o, i, s, a, l) {
|
|
|
11250
11260
|
return window.CustomEvent && !yt && !jn ? c = new CustomEvent("move", {
|
|
11251
11261
|
bubbles: !0,
|
|
11252
11262
|
cancelable: !0
|
|
11253
|
-
}) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = o, c.related = i || t, c.relatedRect = s ||
|
|
11263
|
+
}) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = o, c.related = i || t, c.relatedRect = s || ke(t), c.willInsertAfter = l, c.originalEvent = a, e.dispatchEvent(c), d && (h = d.call(_, c, a)), h;
|
|
11254
11264
|
}
|
|
11255
11265
|
function ki(e) {
|
|
11256
11266
|
e.draggable = !1;
|
|
@@ -11259,11 +11269,11 @@ function Yf() {
|
|
|
11259
11269
|
Xi = !1;
|
|
11260
11270
|
}
|
|
11261
11271
|
function Kf(e, t, n) {
|
|
11262
|
-
var o =
|
|
11272
|
+
var o = ke(mn(n.el, 0, n.options, !0)), i = Nr(n.el, n.options, K), s = 10;
|
|
11263
11273
|
return t ? e.clientX < i.left - s || e.clientY < o.top && e.clientX < o.right : e.clientY < i.top - s || e.clientY < o.bottom && e.clientX < o.left;
|
|
11264
11274
|
}
|
|
11265
11275
|
function Hf(e, t, n) {
|
|
11266
|
-
var o =
|
|
11276
|
+
var o = ke(ls(n.el, n.options.draggable)), i = Nr(n.el, n.options, K), s = 10;
|
|
11267
11277
|
return t ? e.clientX > i.right + s || e.clientY > o.bottom && e.clientX > o.left : e.clientY > i.bottom + s || e.clientX > o.right && e.clientY > o.top;
|
|
11268
11278
|
}
|
|
11269
11279
|
function $f(e, t, n, o, i, s, a, l) {
|
|
@@ -11280,7 +11290,7 @@ function $f(e, t, n, o, i, s, a, l) {
|
|
|
11280
11290
|
return g = g || a, g && (c < d + _ * s / 2 || c > h - _ * s / 2) ? c > d + _ / 2 ? 1 : -1 : 0;
|
|
11281
11291
|
}
|
|
11282
11292
|
function Gf(e) {
|
|
11283
|
-
return
|
|
11293
|
+
return et(A) < et(e) ? 1 : -1;
|
|
11284
11294
|
}
|
|
11285
11295
|
function jf(e) {
|
|
11286
11296
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, o = 0; n--; )
|
|
@@ -11301,44 +11311,44 @@ function zi(e) {
|
|
|
11301
11311
|
return clearTimeout(e);
|
|
11302
11312
|
}
|
|
11303
11313
|
ni && te(document, "touchmove", function(e) {
|
|
11304
|
-
(
|
|
11314
|
+
(M.active || an) && e.cancelable && e.preventDefault();
|
|
11305
11315
|
});
|
|
11306
|
-
|
|
11316
|
+
M.utils = {
|
|
11307
11317
|
on: te,
|
|
11308
|
-
off:
|
|
11309
|
-
css:
|
|
11318
|
+
off: ee,
|
|
11319
|
+
css: D,
|
|
11310
11320
|
find: br,
|
|
11311
11321
|
is: function(e, t) {
|
|
11312
|
-
return !!
|
|
11322
|
+
return !!it(e, t, e, !1);
|
|
11313
11323
|
},
|
|
11314
11324
|
extend: Lf,
|
|
11315
11325
|
throttle: Ir,
|
|
11316
|
-
closest:
|
|
11326
|
+
closest: it,
|
|
11317
11327
|
toggleClass: qe,
|
|
11318
11328
|
clone: Cr,
|
|
11319
|
-
index:
|
|
11329
|
+
index: et,
|
|
11320
11330
|
nextTick: Eo,
|
|
11321
11331
|
cancelNextTick: zi,
|
|
11322
11332
|
detectDirection: Lr,
|
|
11323
11333
|
getChild: mn
|
|
11324
11334
|
};
|
|
11325
|
-
|
|
11335
|
+
M.get = function(e) {
|
|
11326
11336
|
return e[Qe];
|
|
11327
11337
|
};
|
|
11328
|
-
|
|
11338
|
+
M.mount = function() {
|
|
11329
11339
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
11330
11340
|
t[n] = arguments[n];
|
|
11331
11341
|
t[0].constructor === Array && (t = t[0]), t.forEach(function(o) {
|
|
11332
11342
|
if (!o.prototype || !o.prototype.constructor)
|
|
11333
11343
|
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));
|
|
11334
|
-
o.utils && (
|
|
11344
|
+
o.utils && (M.utils = dt(dt({}, M.utils), o.utils)), Wn.mount(o);
|
|
11335
11345
|
});
|
|
11336
11346
|
};
|
|
11337
|
-
|
|
11338
|
-
return new
|
|
11347
|
+
M.create = function(e, t) {
|
|
11348
|
+
return new M(e, t);
|
|
11339
11349
|
};
|
|
11340
|
-
|
|
11341
|
-
var
|
|
11350
|
+
M.version = Cf;
|
|
11351
|
+
var Ne = [], Cn, qi, Ji = !1, Li, Si, Uo, Nn;
|
|
11342
11352
|
function Xf() {
|
|
11343
11353
|
function e() {
|
|
11344
11354
|
this.defaults = {
|
|
@@ -11361,10 +11371,10 @@ function Xf() {
|
|
|
11361
11371
|
!this.options.dragOverBubble && !n.rootEl && this._handleAutoScroll(n);
|
|
11362
11372
|
},
|
|
11363
11373
|
drop: function() {
|
|
11364
|
-
this.sortable.nativeDraggable ?
|
|
11374
|
+
this.sortable.nativeDraggable ? ee(document, "dragover", this._handleAutoScroll) : (ee(document, "pointermove", this._handleFallbackAutoScroll), ee(document, "touchmove", this._handleFallbackAutoScroll), ee(document, "mousemove", this._handleFallbackAutoScroll)), va(), Ao(), Sf();
|
|
11365
11375
|
},
|
|
11366
11376
|
nulling: function() {
|
|
11367
|
-
Uo = qi = Cn = Ji = Nn = Li = Si = null,
|
|
11377
|
+
Uo = qi = Cn = Ji = Nn = Li = Si = null, Ne.length = 0;
|
|
11368
11378
|
},
|
|
11369
11379
|
_handleFallbackAutoScroll: function(t) {
|
|
11370
11380
|
this._handleAutoScroll(t, !0);
|
|
@@ -11392,9 +11402,9 @@ function Xf() {
|
|
|
11392
11402
|
});
|
|
11393
11403
|
}
|
|
11394
11404
|
function Ao() {
|
|
11395
|
-
|
|
11405
|
+
Ne.forEach(function(e) {
|
|
11396
11406
|
clearInterval(e.pid);
|
|
11397
|
-
}),
|
|
11407
|
+
}), Ne = [];
|
|
11398
11408
|
}
|
|
11399
11409
|
function va() {
|
|
11400
11410
|
clearInterval(Nn);
|
|
@@ -11405,16 +11415,16 @@ var Bi = Ir(function(e, t, n, o) {
|
|
|
11405
11415
|
qi !== n && (qi = n, Ao(), Cn = t.scroll, d = t.scrollFn, Cn === !0 && (Cn = Dt(n, !0)));
|
|
11406
11416
|
var h = 0, g = Cn;
|
|
11407
11417
|
do {
|
|
11408
|
-
var m = g, I =
|
|
11409
|
-
m === c ? (
|
|
11410
|
-
var
|
|
11411
|
-
if (!
|
|
11418
|
+
var m = g, I = ke(m), O = I.top, G = I.bottom, j = I.left, U = I.right, J = I.width, ge = I.height, Q = void 0, Le = void 0, $e = m.scrollWidth, B = m.scrollHeight, F = D(m), ie = m.scrollLeft, me = m.scrollTop;
|
|
11419
|
+
m === c ? (Q = J < $e && (F.overflowX === "auto" || F.overflowX === "scroll" || F.overflowX === "visible"), Le = ge < B && (F.overflowY === "auto" || F.overflowY === "scroll" || F.overflowY === "visible")) : (Q = J < $e && (F.overflowX === "auto" || F.overflowX === "scroll"), Le = ge < B && (F.overflowY === "auto" || F.overflowY === "scroll"));
|
|
11420
|
+
var Z = Q && (Math.abs(U - i) <= a && ie + J < $e) - (Math.abs(j - i) <= a && !!ie), se = Le && (Math.abs(G - s) <= a && me + ge < B) - (Math.abs(O - s) <= a && !!me);
|
|
11421
|
+
if (!Ne[h])
|
|
11412
11422
|
for (var oe = 0; oe <= h; oe++)
|
|
11413
|
-
|
|
11414
|
-
(
|
|
11415
|
-
o && this.layer === 0 &&
|
|
11416
|
-
var R =
|
|
11417
|
-
typeof d == "function" && d.call(
|
|
11423
|
+
Ne[oe] || (Ne[oe] = {});
|
|
11424
|
+
(Ne[h].vx != Z || Ne[h].vy != se || Ne[h].el !== m) && (Ne[h].el = m, Ne[h].vx = Z, Ne[h].vy = se, clearInterval(Ne[h].pid), (Z != 0 || se != 0) && (_ = !0, Ne[h].pid = setInterval((function() {
|
|
11425
|
+
o && this.layer === 0 && M.active._onTouchMove(Uo);
|
|
11426
|
+
var R = Ne[this.layer].vy ? Ne[this.layer].vy * l : 0, ae = Ne[this.layer].vx ? Ne[this.layer].vx * l : 0;
|
|
11427
|
+
typeof d == "function" && d.call(M.dragged.parentNode[Qe], ae, R, e, Uo, Ne[this.layer].el) !== "continue" || yr(Ne[this.layer].el, ae, R);
|
|
11418
11428
|
}).bind({
|
|
11419
11429
|
layer: h
|
|
11420
11430
|
}), 24))), h++;
|
|
@@ -11464,8 +11474,8 @@ us.prototype = {
|
|
|
11464
11474
|
bt(us, {
|
|
11465
11475
|
pluginName: "removeOnSpill"
|
|
11466
11476
|
});
|
|
11467
|
-
|
|
11468
|
-
|
|
11477
|
+
M.mount(new Xf());
|
|
11478
|
+
M.mount(us, cs);
|
|
11469
11479
|
function zf(e) {
|
|
11470
11480
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
11471
11481
|
}
|
|
@@ -11501,10 +11511,10 @@ function Zf(...e) {
|
|
|
11501
11511
|
} = (n = X(l)) != null ? n : {};
|
|
11502
11512
|
function g(B) {
|
|
11503
11513
|
var F;
|
|
11504
|
-
const { from: ie, oldIndex:
|
|
11514
|
+
const { from: ie, oldIndex: me, item: Z } = B;
|
|
11505
11515
|
i = Array.from(ie.childNodes);
|
|
11506
|
-
const se = X((F = X(a)) == null ? void 0 : F[
|
|
11507
|
-
Oa(se, oe),
|
|
11516
|
+
const se = X((F = X(a)) == null ? void 0 : F[me]), oe = d(se);
|
|
11517
|
+
Oa(se, oe), Z[ba] = oe;
|
|
11508
11518
|
}
|
|
11509
11519
|
function m(B) {
|
|
11510
11520
|
const F = B.item[ba];
|
|
@@ -11518,47 +11528,47 @@ function Zf(...e) {
|
|
|
11518
11528
|
}
|
|
11519
11529
|
}
|
|
11520
11530
|
function I(B) {
|
|
11521
|
-
const { from: F, item: ie, oldIndex:
|
|
11522
|
-
if (pa(F, ie,
|
|
11531
|
+
const { from: F, item: ie, oldIndex: me, oldDraggableIndex: Z, pullMode: se, clone: oe } = B;
|
|
11532
|
+
if (pa(F, ie, me), se === "clone") {
|
|
11523
11533
|
Oi(oe);
|
|
11524
11534
|
return;
|
|
11525
11535
|
}
|
|
11526
11536
|
if (kn(a)) {
|
|
11527
11537
|
const R = [...X(a)];
|
|
11528
|
-
a.value = ca(R,
|
|
11538
|
+
a.value = ca(R, Z);
|
|
11529
11539
|
return;
|
|
11530
11540
|
}
|
|
11531
|
-
ca(X(a),
|
|
11541
|
+
ca(X(a), Z);
|
|
11532
11542
|
}
|
|
11533
11543
|
function O(B) {
|
|
11534
11544
|
if (h) {
|
|
11535
11545
|
h(B);
|
|
11536
11546
|
return;
|
|
11537
11547
|
}
|
|
11538
|
-
const { from: F, item: ie, oldIndex:
|
|
11539
|
-
if (Oi(ie), pa(F, ie,
|
|
11548
|
+
const { from: F, item: ie, oldIndex: me, oldDraggableIndex: Z, newDraggableIndex: se } = B;
|
|
11549
|
+
if (Oi(ie), pa(F, ie, me), kn(a)) {
|
|
11540
11550
|
const oe = [...X(a)];
|
|
11541
11551
|
a.value = la(
|
|
11542
11552
|
oe,
|
|
11543
|
-
|
|
11553
|
+
Z,
|
|
11544
11554
|
se
|
|
11545
11555
|
);
|
|
11546
11556
|
return;
|
|
11547
11557
|
}
|
|
11548
|
-
la(X(a),
|
|
11558
|
+
la(X(a), Z, se);
|
|
11549
11559
|
}
|
|
11550
11560
|
function G(B) {
|
|
11551
|
-
const { newIndex: F, oldIndex: ie, from:
|
|
11561
|
+
const { newIndex: F, oldIndex: ie, from: me, to: Z } = B;
|
|
11552
11562
|
let se = null;
|
|
11553
|
-
const oe = F === ie &&
|
|
11563
|
+
const oe = F === ie && me === Z;
|
|
11554
11564
|
try {
|
|
11555
11565
|
if (oe) {
|
|
11556
11566
|
let R = null;
|
|
11557
11567
|
i == null || i.some((ae, Me) => {
|
|
11558
|
-
if (R && (i == null ? void 0 : i.length) !==
|
|
11559
|
-
return
|
|
11560
|
-
const re =
|
|
11561
|
-
R =
|
|
11568
|
+
if (R && (i == null ? void 0 : i.length) !== Z.childNodes.length)
|
|
11569
|
+
return me.insertBefore(R, ae.nextSibling), !0;
|
|
11570
|
+
const re = Z.childNodes[Me];
|
|
11571
|
+
R = Z == null ? void 0 : Z.replaceChild(ae, re);
|
|
11562
11572
|
});
|
|
11563
11573
|
}
|
|
11564
11574
|
} catch (R) {
|
|
@@ -11571,43 +11581,43 @@ function Zf(...e) {
|
|
|
11571
11581
|
throw se;
|
|
11572
11582
|
});
|
|
11573
11583
|
}
|
|
11574
|
-
const
|
|
11584
|
+
const j = {
|
|
11575
11585
|
onUpdate: O,
|
|
11576
11586
|
onStart: g,
|
|
11577
11587
|
onAdd: m,
|
|
11578
11588
|
onRemove: I,
|
|
11579
11589
|
onEnd: G
|
|
11580
11590
|
};
|
|
11581
|
-
function
|
|
11591
|
+
function U(B) {
|
|
11582
11592
|
const F = X(s);
|
|
11583
11593
|
return B || (B = gf(F) ? mf(F, o == null ? void 0 : o.$el) : F), B && !Af(B) && (B = B.$el), B || _f("Root element not found"), B;
|
|
11584
11594
|
}
|
|
11585
|
-
function
|
|
11595
|
+
function J() {
|
|
11586
11596
|
var B;
|
|
11587
|
-
const F = (B = X(l)) != null ? B : {}, { immediate: ie, clone:
|
|
11588
|
-
return _a(
|
|
11589
|
-
vf(se) && (
|
|
11597
|
+
const F = (B = X(l)) != null ? B : {}, { immediate: ie, clone: me } = F, Z = Tr(F, ["immediate", "clone"]);
|
|
11598
|
+
return _a(Z, (se, oe) => {
|
|
11599
|
+
vf(se) && (Z[se] = (R, ...ae) => {
|
|
11590
11600
|
const Me = Qf();
|
|
11591
11601
|
return Of(R, Me), oe(R, ...ae);
|
|
11592
11602
|
});
|
|
11593
11603
|
}), Ef(
|
|
11594
|
-
a === null ? {} :
|
|
11595
|
-
|
|
11604
|
+
a === null ? {} : j,
|
|
11605
|
+
Z
|
|
11596
11606
|
);
|
|
11597
11607
|
}
|
|
11598
|
-
const
|
|
11599
|
-
B =
|
|
11608
|
+
const ge = (B) => {
|
|
11609
|
+
B = U(B), c && Q.destroy(), c = new M(B, J());
|
|
11600
11610
|
};
|
|
11601
11611
|
Lt(
|
|
11602
11612
|
() => l,
|
|
11603
11613
|
() => {
|
|
11604
|
-
c && _a(
|
|
11614
|
+
c && _a(J(), (B, F) => {
|
|
11605
11615
|
c == null || c.option(B, F);
|
|
11606
11616
|
});
|
|
11607
11617
|
},
|
|
11608
11618
|
{ deep: !0 }
|
|
11609
11619
|
);
|
|
11610
|
-
const
|
|
11620
|
+
const Q = {
|
|
11611
11621
|
option: (B, F) => c == null ? void 0 : c.option(B, F),
|
|
11612
11622
|
destroy: () => {
|
|
11613
11623
|
c == null || c.destroy(), c = null;
|
|
@@ -11615,10 +11625,10 @@ function Zf(...e) {
|
|
|
11615
11625
|
save: () => c == null ? void 0 : c.save(),
|
|
11616
11626
|
toArray: () => c == null ? void 0 : c.toArray(),
|
|
11617
11627
|
closest: (...B) => c == null ? void 0 : c.closest(...B)
|
|
11618
|
-
},
|
|
11628
|
+
}, Le = () => Q == null ? void 0 : Q.option("disabled", !0), $e = () => Q == null ? void 0 : Q.option("disabled", !1);
|
|
11619
11629
|
return Jf(() => {
|
|
11620
|
-
_ &&
|
|
11621
|
-
}), qf(
|
|
11630
|
+
_ && ge();
|
|
11631
|
+
}), qf(Q.destroy), rn({ start: ge, pause: Le, resume: $e }, Q);
|
|
11622
11632
|
}
|
|
11623
11633
|
const Qi = [
|
|
11624
11634
|
"update",
|
|
@@ -11690,13 +11700,13 @@ const Qi = [
|
|
|
11690
11700
|
const s = Qi.reduce((d, h) => {
|
|
11691
11701
|
const g = `on${h.replace(/^\S/, (m) => m.toUpperCase())}`;
|
|
11692
11702
|
return d[g] = (...m) => n(h, ...m), d;
|
|
11693
|
-
}, {}), a =
|
|
11703
|
+
}, {}), a = Be(() => {
|
|
11694
11704
|
const d = Ml(e), { modelValue: h } = d, g = Tr(d, ["modelValue"]), m = Object.entries(g).reduce((I, [O, G]) => {
|
|
11695
|
-
const
|
|
11696
|
-
return
|
|
11705
|
+
const j = X(G);
|
|
11706
|
+
return j !== void 0 && (I[O] = j), I;
|
|
11697
11707
|
}, {});
|
|
11698
11708
|
return rn(rn({}, s), hf(rn(rn({}, i), m)));
|
|
11699
|
-
}), l =
|
|
11709
|
+
}), l = Be({
|
|
11700
11710
|
get: () => e.modelValue,
|
|
11701
11711
|
set: (d) => n("update:modelValue", d)
|
|
11702
11712
|
}), c = Mt(), _ = Pl(
|
|
@@ -11716,13 +11726,13 @@ const Qi = [
|
|
|
11716
11726
|
},
|
|
11717
11727
|
emits: ["x-click"],
|
|
11718
11728
|
setup(e, { emit: t }) {
|
|
11719
|
-
const { primaryColor: n, backgroundColor2: o, highlightColor: i } = Yo(), s = e, a = t, l = Mt(!1), c =
|
|
11729
|
+
const { primaryColor: n, backgroundColor2: o, highlightColor: i } = Yo(), s = e, a = t, l = Mt(!1), c = Be(() => ({
|
|
11720
11730
|
position: "relative",
|
|
11721
11731
|
background: l.value ? i.value : o.value,
|
|
11722
11732
|
height: "48px",
|
|
11723
11733
|
marginBottom: "1px",
|
|
11724
11734
|
userSelect: "none"
|
|
11725
|
-
})), _ =
|
|
11735
|
+
})), _ = Be(() => ({
|
|
11726
11736
|
display: s.select ? "block" : "none",
|
|
11727
11737
|
position: "absolute",
|
|
11728
11738
|
top: "0px",
|
|
@@ -11733,24 +11743,24 @@ const Qi = [
|
|
|
11733
11743
|
pointerEvents: "none"
|
|
11734
11744
|
}));
|
|
11735
11745
|
return (d, h) => {
|
|
11736
|
-
const g =
|
|
11737
|
-
return wl((
|
|
11746
|
+
const g = Ie("v-spacer"), m = Ie("v-icon"), I = xl("ripple");
|
|
11747
|
+
return wl((Re(), Et("div", {
|
|
11738
11748
|
class: "d-flex align-center cursor-pointer",
|
|
11739
|
-
style:
|
|
11749
|
+
style: ct(c.value),
|
|
11740
11750
|
onClick: h[1] || (h[1] = (O) => a("x-click", s.id)),
|
|
11741
11751
|
onMouseover: h[2] || (h[2] = (O) => l.value = !0),
|
|
11742
11752
|
onMouseout: h[3] || (h[3] = (O) => l.value = !1)
|
|
11743
11753
|
}, [
|
|
11744
|
-
|
|
11745
|
-
|
|
11746
|
-
|
|
11754
|
+
at("span", ng, wo(s.title), 1),
|
|
11755
|
+
he(g),
|
|
11756
|
+
he(m, {
|
|
11747
11757
|
class: "x-handle cursor-move mr-3",
|
|
11748
11758
|
icon: X(sc),
|
|
11749
11759
|
onMousedown: h[0] || (h[0] = Ln(() => {
|
|
11750
11760
|
}, ["stop"]))
|
|
11751
11761
|
}, null, 8, ["icon"]),
|
|
11752
|
-
|
|
11753
|
-
style:
|
|
11762
|
+
at("div", {
|
|
11763
|
+
style: ct(_.value)
|
|
11754
11764
|
}, null, 4)
|
|
11755
11765
|
], 36)), [
|
|
11756
11766
|
[I]
|
|
@@ -11774,12 +11784,12 @@ const Qi = [
|
|
|
11774
11784
|
}
|
|
11775
11785
|
const g = [];
|
|
11776
11786
|
h.getTopBlocks(!0).forEach((I) => {
|
|
11777
|
-
var
|
|
11778
|
-
const O = I.id === ((
|
|
11787
|
+
var j;
|
|
11788
|
+
const O = I.id === ((j = sn()) == null ? void 0 : j.id);
|
|
11779
11789
|
let G = "<n/a>";
|
|
11780
11790
|
if (I.type.startsWith("on_node_event_v")) {
|
|
11781
|
-
const
|
|
11782
|
-
|
|
11791
|
+
const U = I, J = Ke[U.node.key];
|
|
11792
|
+
J && (G = t(J.name), U.node.alias && (G += " / " + U.node.alias), G += " - " + T[U.event.name]);
|
|
11783
11793
|
} else I.type.startsWith("func_entry_v") ? G = t("x-block-lib.funcEntry") : I.type.startsWith("procedure_def_v") ? (console.log(I), G = t("x-block-lib.procedure") + " - " + I.getFieldValue("NAME")) : G = t("x-block-lib.temporaryBlock");
|
|
11784
11794
|
g.push({
|
|
11785
11795
|
id: I.id,
|
|
@@ -11789,9 +11799,9 @@ const Qi = [
|
|
|
11789
11799
|
}), o.value = g;
|
|
11790
11800
|
};
|
|
11791
11801
|
dn(() => {
|
|
11792
|
-
|
|
11802
|
+
ut.on("codeUpdate", i);
|
|
11793
11803
|
}), Oo(() => {
|
|
11794
|
-
|
|
11804
|
+
ut.off("codeUpdate", i);
|
|
11795
11805
|
});
|
|
11796
11806
|
let s = [];
|
|
11797
11807
|
const a = () => {
|
|
@@ -11824,8 +11834,8 @@ const Qi = [
|
|
|
11824
11834
|
h.newIndex > h.oldIndex ? O = s[h.newIndex] : h.newIndex > 0 && (O = s[h.newIndex - 1]);
|
|
11825
11835
|
let G = -10;
|
|
11826
11836
|
O !== "" && (G = g.getBlockById(O).getRelativeToSurfaceXY().y + 10);
|
|
11827
|
-
const
|
|
11828
|
-
I.moveTo(new k.Coordinate(
|
|
11837
|
+
const j = I.getRelativeToSurfaceXY();
|
|
11838
|
+
I.moveTo(new k.Coordinate(j.x, G)), ut.emit("cleanWorkspace"), pr();
|
|
11829
11839
|
}, { open: _ } = Ko("blocklyNavigatorDlg"), d = async (h) => {
|
|
11830
11840
|
const g = Pt();
|
|
11831
11841
|
if (!g) {
|
|
@@ -11835,7 +11845,7 @@ const Qi = [
|
|
|
11835
11845
|
const m = g.getBlockById(h);
|
|
11836
11846
|
Wl.setSelected(m), ur(h), _.value = !1;
|
|
11837
11847
|
};
|
|
11838
|
-
return (h, g) => o.value.length > 0 ? (
|
|
11848
|
+
return (h, g) => o.value.length > 0 ? (Re(), pt(X(tg), {
|
|
11839
11849
|
key: 0,
|
|
11840
11850
|
modelValue: o.value,
|
|
11841
11851
|
"onUpdate:modelValue": g[0] || (g[0] = (m) => o.value = m),
|
|
@@ -11846,8 +11856,8 @@ const Qi = [
|
|
|
11846
11856
|
onMove: l,
|
|
11847
11857
|
onEnd: c
|
|
11848
11858
|
}, {
|
|
11849
|
-
default:
|
|
11850
|
-
(
|
|
11859
|
+
default: Ze(() => [
|
|
11860
|
+
(Re(!0), Et(ka, null, Vl(o.value, (m) => (Re(), pt(og, {
|
|
11851
11861
|
id: m.id,
|
|
11852
11862
|
key: m.id,
|
|
11853
11863
|
title: m.name,
|
|
@@ -11856,7 +11866,7 @@ const Qi = [
|
|
|
11856
11866
|
}, null, 8, ["id", "title", "select"]))), 128))
|
|
11857
11867
|
]),
|
|
11858
11868
|
_: 1
|
|
11859
|
-
}, 8, ["modelValue"])) : (
|
|
11869
|
+
}, 8, ["modelValue"])) : (Re(), Et("span", ig, wo(X(t)("x-block-lib.noOption")), 1));
|
|
11860
11870
|
}
|
|
11861
11871
|
}), Ur = (e, t) => {
|
|
11862
11872
|
const n = e.__vccOpts || e;
|
|
@@ -11865,7 +11875,7 @@ const Qi = [
|
|
|
11865
11875
|
return n;
|
|
11866
11876
|
}, ag = /* @__PURE__ */ Ur(sg, [["__scopeId", "data-v-448cc5cd"]]), rg = {};
|
|
11867
11877
|
function lg(e, t) {
|
|
11868
|
-
return
|
|
11878
|
+
return Re(), Et("div", null, "blockTree");
|
|
11869
11879
|
}
|
|
11870
11880
|
const cg = /* @__PURE__ */ Ur(rg, [["render", lg]]), ug = { class: "text-subtitle-1" }, pg = /* @__PURE__ */ ht({
|
|
11871
11881
|
__name: "index",
|
|
@@ -11874,78 +11884,77 @@ const cg = /* @__PURE__ */ Ur(rg, [["render", lg]]), ug = { class: "text-subtitl
|
|
|
11874
11884
|
lock: { type: Boolean }
|
|
11875
11885
|
},
|
|
11876
11886
|
setup(e) {
|
|
11877
|
-
const { t } = Kn(), n = nc(), { sysBarAvail: o } = Ma(), { backgroundColor1: i } = Yo(), s = e, a =
|
|
11887
|
+
const { t } = Kn(), n = nc(), { sysBarAvail: o } = Ma(), { backgroundColor1: i } = Yo(), s = e, a = Be(() => {
|
|
11878
11888
|
let d = "100%";
|
|
11879
11889
|
return n.mdAndUp.value && (d = "400px"), {
|
|
11880
11890
|
background: i.value,
|
|
11881
11891
|
width: d,
|
|
11882
11892
|
height: "100%"
|
|
11883
11893
|
};
|
|
11884
|
-
}), l =
|
|
11894
|
+
}), l = Be(() => {
|
|
11885
11895
|
let d = 48;
|
|
11886
11896
|
return o.value && (d += 24), {
|
|
11887
11897
|
position: "relative",
|
|
11888
|
-
width: "100%",
|
|
11889
11898
|
height: `calc(100% - ${d}px)`
|
|
11890
11899
|
};
|
|
11891
|
-
}), c =
|
|
11900
|
+
}), c = Be(() => ({
|
|
11892
11901
|
height: "60px"
|
|
11893
11902
|
})), { open: _ } = Ko("blocklyNavigatorDlg");
|
|
11894
11903
|
return (d, h) => {
|
|
11895
|
-
const g =
|
|
11896
|
-
return
|
|
11897
|
-
|
|
11904
|
+
const g = Ie("v-sheet"), m = Ie("v-btn"), I = Ie("v-spacer"), O = Ie("v-dialog"), G = Ie("v-fade-transition"), j = Ie("v-tooltip");
|
|
11905
|
+
return Re(), Et(ka, null, [
|
|
11906
|
+
he(O, {
|
|
11898
11907
|
modelValue: X(_),
|
|
11899
|
-
"onUpdate:modelValue": h[3] || (h[3] = (
|
|
11908
|
+
"onUpdate:modelValue": h[3] || (h[3] = (U) => kn(_) ? _.value = U : null),
|
|
11900
11909
|
transition: "scroll-x-reverse-transition",
|
|
11901
11910
|
persistent: "",
|
|
11902
11911
|
"no-click-animation": "",
|
|
11903
11912
|
fullscreen: "",
|
|
11904
11913
|
eager: "",
|
|
11905
|
-
onKeydown: h[4] || (h[4] = La(Ln((
|
|
11914
|
+
onKeydown: h[4] || (h[4] = La(Ln((U) => _.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
11906
11915
|
}, {
|
|
11907
|
-
default:
|
|
11908
|
-
|
|
11916
|
+
default: Ze(() => [
|
|
11917
|
+
at("div", {
|
|
11909
11918
|
class: "w-100 h-100 d-flex flex-row-reverse",
|
|
11910
|
-
onClick: h[1] || (h[1] = Ln((
|
|
11911
|
-
onContextmenu: h[2] || (h[2] = Ln((
|
|
11919
|
+
onClick: h[1] || (h[1] = Ln((U) => _.value = !1, ["self"])),
|
|
11920
|
+
onContextmenu: h[2] || (h[2] = Ln((U) => _.value = !1, ["self", "prevent"]))
|
|
11912
11921
|
}, [
|
|
11913
|
-
|
|
11922
|
+
at("div", {
|
|
11914
11923
|
class: "elevation-2",
|
|
11915
|
-
style:
|
|
11924
|
+
style: ct(a.value)
|
|
11916
11925
|
}, [
|
|
11917
|
-
X(o) ? (
|
|
11926
|
+
X(o) ? (Re(), pt(g, {
|
|
11918
11927
|
key: 0,
|
|
11919
11928
|
color: "transparent",
|
|
11920
11929
|
height: 24
|
|
11921
11930
|
})) : cn("", !0),
|
|
11922
|
-
|
|
11931
|
+
he(g, {
|
|
11923
11932
|
class: "d-flex align-center px-2",
|
|
11924
11933
|
color: "transparent",
|
|
11925
11934
|
height: 48
|
|
11926
11935
|
}, {
|
|
11927
|
-
default:
|
|
11928
|
-
|
|
11936
|
+
default: Ze(() => [
|
|
11937
|
+
he(m, {
|
|
11929
11938
|
variant: "text",
|
|
11930
11939
|
density: "comfortable",
|
|
11931
11940
|
icon: X(Pa),
|
|
11932
|
-
onClick: h[0] || (h[0] = (
|
|
11941
|
+
onClick: h[0] || (h[0] = (U) => _.value = !1)
|
|
11933
11942
|
}, null, 8, ["icon"]),
|
|
11934
|
-
|
|
11935
|
-
|
|
11943
|
+
at("span", ug, wo(X(t)("x-block-lib.navigator")), 1),
|
|
11944
|
+
he(I)
|
|
11936
11945
|
]),
|
|
11937
11946
|
_: 1
|
|
11938
11947
|
}),
|
|
11939
|
-
|
|
11948
|
+
at("div", {
|
|
11940
11949
|
class: "overflow-y-auto",
|
|
11941
|
-
style:
|
|
11950
|
+
style: ct(l.value)
|
|
11942
11951
|
}, [
|
|
11943
|
-
s.type === "list" ? (
|
|
11952
|
+
s.type === "list" ? (Re(), pt(ag, {
|
|
11944
11953
|
key: 0,
|
|
11945
11954
|
lock: s.lock
|
|
11946
|
-
}, null, 8, ["lock"])) : s.type === "tree" ? (
|
|
11947
|
-
|
|
11948
|
-
style:
|
|
11955
|
+
}, null, 8, ["lock"])) : s.type === "tree" ? (Re(), pt(cg, { key: 1 })) : cn("", !0),
|
|
11956
|
+
at("div", {
|
|
11957
|
+
style: ct(c.value)
|
|
11949
11958
|
}, null, 4)
|
|
11950
11959
|
], 4)
|
|
11951
11960
|
], 4)
|
|
@@ -11953,16 +11962,21 @@ const cg = /* @__PURE__ */ Ur(rg, [["render", lg]]), ug = { class: "text-subtitl
|
|
|
11953
11962
|
]),
|
|
11954
11963
|
_: 1
|
|
11955
11964
|
}, 8, ["modelValue"]),
|
|
11956
|
-
|
|
11965
|
+
he(j, {
|
|
11957
11966
|
text: X(t)("x-block-lib.tip.hotkeyCtrlE")
|
|
11958
11967
|
}, {
|
|
11959
|
-
activator:
|
|
11960
|
-
|
|
11961
|
-
|
|
11962
|
-
|
|
11963
|
-
|
|
11964
|
-
|
|
11965
|
-
|
|
11968
|
+
activator: Ze(({ props: U }) => [
|
|
11969
|
+
he(G, null, {
|
|
11970
|
+
default: Ze(() => [
|
|
11971
|
+
he(m, Zi(U, {
|
|
11972
|
+
variant: "outlined",
|
|
11973
|
+
density: "comfortable",
|
|
11974
|
+
icon: X(lc),
|
|
11975
|
+
onClick: h[5] || (h[5] = (J) => _.value = !0)
|
|
11976
|
+
}), null, 16, ["icon"])
|
|
11977
|
+
]),
|
|
11978
|
+
_: 2
|
|
11979
|
+
}, 1024)
|
|
11966
11980
|
]),
|
|
11967
11981
|
_: 1
|
|
11968
11982
|
}, 8, ["text"])
|
|
@@ -12043,7 +12057,7 @@ const gg = { class: "position-relative w-100 h-100" }, mg = /* @__PURE__ */ ht({
|
|
|
12043
12057
|
setup(e, { expose: t, emit: n }) {
|
|
12044
12058
|
const o = Zl(), i = ec(), s = Di(e, "lock"), a = Di(e, "scale"), l = e, c = n, _ = Mt();
|
|
12045
12059
|
let d;
|
|
12046
|
-
const h = Mt(!1), g = Mt(!1), m =
|
|
12060
|
+
const h = Mt(!1), g = Mt(!1), m = Be(() => l.type === "json" ? "tree" : "list"), I = Be(() => ({
|
|
12047
12061
|
position: "absolute",
|
|
12048
12062
|
background: o.value ? "#0000007f" : "#ffffff7f",
|
|
12049
12063
|
top: "1px",
|
|
@@ -12051,12 +12065,12 @@ const gg = { class: "position-relative w-100 h-100" }, mg = /* @__PURE__ */ ht({
|
|
|
12051
12065
|
width: "56px",
|
|
12052
12066
|
height: "calc(100% - 1px)",
|
|
12053
12067
|
zIndex: 999
|
|
12054
|
-
})), O =
|
|
12068
|
+
})), O = Be(() => ({
|
|
12055
12069
|
position: "absolute",
|
|
12056
12070
|
top: "0px",
|
|
12057
12071
|
right: "0px",
|
|
12058
12072
|
zIndex: 20
|
|
12059
|
-
})), G =
|
|
12073
|
+
})), G = Be(() => ({
|
|
12060
12074
|
position: "absolute",
|
|
12061
12075
|
background: o.value ? "#0000007f" : "#ffffff7f",
|
|
12062
12076
|
top: "0px",
|
|
@@ -12064,7 +12078,7 @@ const gg = { class: "position-relative w-100 h-100" }, mg = /* @__PURE__ */ ht({
|
|
|
12064
12078
|
width: "100%",
|
|
12065
12079
|
height: "100%",
|
|
12066
12080
|
pointerEvents: "none"
|
|
12067
|
-
})),
|
|
12081
|
+
})), j = Be(() => ({
|
|
12068
12082
|
position: "absolute",
|
|
12069
12083
|
background: o.value ? "#0000007f" : "#ffffff7f",
|
|
12070
12084
|
top: "1px",
|
|
@@ -12072,27 +12086,27 @@ const gg = { class: "position-relative w-100 h-100" }, mg = /* @__PURE__ */ ht({
|
|
|
12072
12086
|
width: "56px",
|
|
12073
12087
|
height: "calc(100% - 1px)",
|
|
12074
12088
|
zIndex: 999
|
|
12075
|
-
})), { open:
|
|
12089
|
+
})), { open: U } = Ko("blocklyEditorFlyout");
|
|
12076
12090
|
dn(async () => {
|
|
12077
12091
|
if (!_.value) {
|
|
12078
12092
|
console.assert(!1);
|
|
12079
12093
|
return;
|
|
12080
12094
|
}
|
|
12081
|
-
await aa(i.value), d = _g(_.value, l.type, l.version), d.addChangeListener(w.disableOrphans), d.addChangeListener(
|
|
12095
|
+
await aa(i.value), d = _g(_.value, l.type, l.version), d.addChangeListener(w.disableOrphans), d.addChangeListener(J);
|
|
12082
12096
|
const R = document.querySelector("#blocklyEditor .blocklyFlyout");
|
|
12083
12097
|
new MutationObserver((Me) => {
|
|
12084
12098
|
Me.forEach((re) => {
|
|
12085
|
-
re.type === "attributes" && re.attributeName === "style" && (
|
|
12099
|
+
re.type === "attributes" && re.attributeName === "style" && (U.value = d.getFlyout().isVisible());
|
|
12086
12100
|
});
|
|
12087
|
-
}).observe(R, { attributes: !0 }),
|
|
12101
|
+
}).observe(R, { attributes: !0 }), U.value = d.getFlyout().isVisible(), $e(), B(), await es(), c("ready");
|
|
12088
12102
|
}), Oo(() => {
|
|
12089
|
-
|
|
12103
|
+
U.value = !1;
|
|
12090
12104
|
}), hc(_, () => {
|
|
12091
12105
|
d && zl(d);
|
|
12092
12106
|
});
|
|
12093
|
-
async function
|
|
12107
|
+
async function J(R) {
|
|
12094
12108
|
if (R.type === w.FINISHED_LOADING) {
|
|
12095
|
-
pr(),
|
|
12109
|
+
pr(), ut.emit("codeUpdate"), h.value = !1;
|
|
12096
12110
|
return;
|
|
12097
12111
|
}
|
|
12098
12112
|
if (!h.value) {
|
|
@@ -12100,27 +12114,27 @@ const gg = { class: "position-relative w-100 h-100" }, mg = /* @__PURE__ */ ht({
|
|
|
12100
12114
|
a.value = d.getScale();
|
|
12101
12115
|
return;
|
|
12102
12116
|
}
|
|
12103
|
-
R.type === w.BLOCK_DRAG && (R.isStart ? g.value = !0 : g.value = !1),
|
|
12117
|
+
R.type === w.BLOCK_DRAG && (R.isStart ? g.value = !0 : g.value = !1), ut.emit("codeUpdate");
|
|
12104
12118
|
}
|
|
12105
12119
|
}
|
|
12106
|
-
const
|
|
12120
|
+
const ge = (R) => {
|
|
12107
12121
|
h.value = !0, Ls.workspaces.load(R, d);
|
|
12108
|
-
},
|
|
12109
|
-
d.options.readOnly = s.value, d.options.readOnly && (
|
|
12122
|
+
}, Q = () => Ls.workspaces.save(d), Le = () => r.workspaceToCode(d), $e = () => {
|
|
12123
|
+
d.options.readOnly = s.value, d.options.readOnly && (U.value = !1);
|
|
12110
12124
|
}, B = () => {
|
|
12111
12125
|
d.setScale(a.value);
|
|
12112
12126
|
};
|
|
12113
12127
|
class F extends w.Abstract {
|
|
12114
12128
|
constructor() {
|
|
12115
12129
|
super(...arguments);
|
|
12116
|
-
|
|
12130
|
+
nt(this, "isBlank", !0);
|
|
12117
12131
|
}
|
|
12118
12132
|
}
|
|
12119
12133
|
const ie = () => {
|
|
12120
12134
|
d.fireChangeListener(new F());
|
|
12121
|
-
},
|
|
12135
|
+
}, me = (R) => {
|
|
12122
12136
|
if (R.key === "q" && R.ctrlKey) {
|
|
12123
|
-
|
|
12137
|
+
Z();
|
|
12124
12138
|
return;
|
|
12125
12139
|
}
|
|
12126
12140
|
if (R.key === "w" && R.ctrlKey) {
|
|
@@ -12131,69 +12145,69 @@ const gg = { class: "position-relative w-100 h-100" }, mg = /* @__PURE__ */ ht({
|
|
|
12131
12145
|
oe();
|
|
12132
12146
|
return;
|
|
12133
12147
|
}
|
|
12134
|
-
},
|
|
12135
|
-
|
|
12148
|
+
}, Z = () => {
|
|
12149
|
+
ut.emit("cleanWorkspace");
|
|
12136
12150
|
}, se = () => {
|
|
12137
12151
|
s.value = !s.value;
|
|
12138
12152
|
}, oe = () => {
|
|
12139
|
-
|
|
12153
|
+
ut.emit("blocklyNavigatorDlg");
|
|
12140
12154
|
};
|
|
12141
12155
|
return dn(() => {
|
|
12142
|
-
window.addEventListener("keydown",
|
|
12156
|
+
window.addEventListener("keydown", me, !1);
|
|
12143
12157
|
}), Oo(() => {
|
|
12144
|
-
window.addEventListener("keydown",
|
|
12158
|
+
window.addEventListener("keydown", me, !1);
|
|
12145
12159
|
}), Lt(i, (R) => {
|
|
12146
12160
|
aa(R);
|
|
12147
12161
|
}), Lt(o, (R) => {
|
|
12148
12162
|
nf(R ? "dark" : "light");
|
|
12149
|
-
}), Lt(
|
|
12163
|
+
}), Lt(U, (R) => {
|
|
12150
12164
|
R || d.hideChaff();
|
|
12151
12165
|
}), Lt(s, () => {
|
|
12152
12166
|
$e();
|
|
12153
12167
|
}), Lt(a, () => {
|
|
12154
12168
|
B();
|
|
12155
|
-
}), t({ loading: h, load:
|
|
12156
|
-
const Me =
|
|
12157
|
-
return
|
|
12158
|
-
|
|
12169
|
+
}), t({ loading: h, load: ge, save: Q, generateCode: Le, fireStateChange: ie }), (R, ae) => {
|
|
12170
|
+
const Me = Ie("v-icon"), re = Ie("x-loading");
|
|
12171
|
+
return Re(), Et("div", gg, [
|
|
12172
|
+
at("div", {
|
|
12159
12173
|
id: "blocklyEditor",
|
|
12160
12174
|
ref_key: "blocklyDiv",
|
|
12161
12175
|
ref: _,
|
|
12162
12176
|
class: "w-100 h-100"
|
|
12163
12177
|
}, null, 512),
|
|
12164
|
-
g.value ? (
|
|
12178
|
+
g.value ? (Re(), Et("div", {
|
|
12165
12179
|
key: 0,
|
|
12166
12180
|
class: "d-flex flex-column justify-center align-center",
|
|
12167
|
-
style:
|
|
12181
|
+
style: ct(I.value)
|
|
12168
12182
|
}, [
|
|
12169
|
-
|
|
12183
|
+
he(Me, {
|
|
12170
12184
|
size: "x-large",
|
|
12171
12185
|
icon: X(ic)
|
|
12172
12186
|
}, null, 8, ["icon"])
|
|
12173
12187
|
], 4)) : cn("", !0),
|
|
12174
|
-
|
|
12188
|
+
at("div", {
|
|
12175
12189
|
class: "d-flex align-end ga-3 pt-3 pr-3",
|
|
12176
|
-
style:
|
|
12190
|
+
style: ct(O.value)
|
|
12177
12191
|
}, [
|
|
12178
|
-
|
|
12179
|
-
|
|
12192
|
+
he(lf, { lock: s.value }, null, 8, ["lock"]),
|
|
12193
|
+
he(cf, {
|
|
12180
12194
|
modelValue: s.value,
|
|
12181
12195
|
"onUpdate:modelValue": ae[0] || (ae[0] = (Xe) => s.value = Xe)
|
|
12182
12196
|
}, null, 8, ["modelValue"]),
|
|
12183
|
-
|
|
12197
|
+
he(pg, {
|
|
12184
12198
|
type: m.value,
|
|
12185
12199
|
lock: s.value
|
|
12186
12200
|
}, null, 8, ["type", "lock"])
|
|
12187
12201
|
], 4),
|
|
12188
|
-
s.value ? (
|
|
12202
|
+
s.value ? (Re(), Et("div", {
|
|
12189
12203
|
key: 1,
|
|
12190
|
-
style:
|
|
12204
|
+
style: ct(j.value)
|
|
12191
12205
|
}, null, 4)) : cn("", !0),
|
|
12192
|
-
s.value ? (
|
|
12206
|
+
s.value ? (Re(), Et("div", {
|
|
12193
12207
|
key: 2,
|
|
12194
|
-
style:
|
|
12208
|
+
style: ct(G.value)
|
|
12195
12209
|
}, null, 4)) : cn("", !0),
|
|
12196
|
-
|
|
12210
|
+
he(re, {
|
|
12197
12211
|
open: h.value,
|
|
12198
12212
|
"z-index": 99
|
|
12199
12213
|
}, null, 8, ["open"])
|
|
@@ -12234,8 +12248,8 @@ function Tg() {
|
|
|
12234
12248
|
for (const Y in u)
|
|
12235
12249
|
v[Y] = u[Y];
|
|
12236
12250
|
return f.forEach(function(Y) {
|
|
12237
|
-
for (const
|
|
12238
|
-
v[
|
|
12251
|
+
for (const ve in Y)
|
|
12252
|
+
v[ve] = Y[ve];
|
|
12239
12253
|
}), /** @type {T} */
|
|
12240
12254
|
v;
|
|
12241
12255
|
}
|
|
@@ -12246,7 +12260,7 @@ function Tg() {
|
|
|
12246
12260
|
const v = u.split(".");
|
|
12247
12261
|
return [
|
|
12248
12262
|
`${f}${v.shift()}`,
|
|
12249
|
-
...v.map((Y,
|
|
12263
|
+
...v.map((Y, ve) => `${Y}${"_".repeat(ve + 1)}`)
|
|
12250
12264
|
].join(" ");
|
|
12251
12265
|
}
|
|
12252
12266
|
return `${f}${u}`;
|
|
@@ -12412,35 +12426,35 @@ function Tg() {
|
|
|
12412
12426
|
const f = u[u.length - 1];
|
|
12413
12427
|
return typeof f == "object" && f.constructor === Object ? (u.splice(u.length - 1, 1), f) : {};
|
|
12414
12428
|
}
|
|
12415
|
-
function
|
|
12429
|
+
function j(...u) {
|
|
12416
12430
|
return "(" + (G(u).capture ? "" : "?:") + u.map((Y) => h(Y)).join("|") + ")";
|
|
12417
12431
|
}
|
|
12418
|
-
function
|
|
12432
|
+
function U(u) {
|
|
12419
12433
|
return new RegExp(u.toString() + "|").exec("").length - 1;
|
|
12420
12434
|
}
|
|
12421
|
-
function
|
|
12435
|
+
function J(u, f) {
|
|
12422
12436
|
const v = u && u.exec(f);
|
|
12423
12437
|
return v && v.index === 0;
|
|
12424
12438
|
}
|
|
12425
|
-
const
|
|
12426
|
-
function
|
|
12439
|
+
const ge = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
|
12440
|
+
function Q(u, { joinWith: f }) {
|
|
12427
12441
|
let v = 0;
|
|
12428
12442
|
return u.map((Y) => {
|
|
12429
12443
|
v += 1;
|
|
12430
|
-
const
|
|
12431
|
-
let
|
|
12432
|
-
for (;
|
|
12433
|
-
const y =
|
|
12444
|
+
const ve = v;
|
|
12445
|
+
let Oe = h(Y), N = "";
|
|
12446
|
+
for (; Oe.length > 0; ) {
|
|
12447
|
+
const y = ge.exec(Oe);
|
|
12434
12448
|
if (!y) {
|
|
12435
|
-
N +=
|
|
12449
|
+
N += Oe;
|
|
12436
12450
|
break;
|
|
12437
12451
|
}
|
|
12438
|
-
N +=
|
|
12452
|
+
N += Oe.substring(0, y.index), Oe = Oe.substring(y.index + y[0].length), y[0][0] === "\\" && y[1] ? N += "\\" + String(Number(y[1]) + ve) : (N += y[0], y[0] === "(" && v++);
|
|
12439
12453
|
}
|
|
12440
12454
|
return N;
|
|
12441
12455
|
}).map((Y) => `(${Y})`).join(f);
|
|
12442
12456
|
}
|
|
12443
|
-
const
|
|
12457
|
+
const Le = /\b\B/, $e = "[a-zA-Z]\\w*", B = "[a-zA-Z_]\\w*", F = "\\b\\d+(\\.\\d+)?", ie = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", me = "\\b(0b[01]+)", Z = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", se = (u = {}) => {
|
|
12444
12458
|
const f = /^#![ ]*\//;
|
|
12445
12459
|
return u.binary && (u.begin = O(
|
|
12446
12460
|
f,
|
|
@@ -12493,7 +12507,7 @@ function Tg() {
|
|
|
12493
12507
|
excludeBegin: !0,
|
|
12494
12508
|
relevance: 0
|
|
12495
12509
|
});
|
|
12496
|
-
const
|
|
12510
|
+
const ve = j(
|
|
12497
12511
|
// list of common 1 and 2 letter words in English
|
|
12498
12512
|
"I",
|
|
12499
12513
|
"a",
|
|
@@ -12533,7 +12547,7 @@ function Tg() {
|
|
|
12533
12547
|
/[ ]+/,
|
|
12534
12548
|
// necessary to prevent us gobbling up doctags like /* @author Bob Mcgill */
|
|
12535
12549
|
"(",
|
|
12536
|
-
|
|
12550
|
+
ve,
|
|
12537
12551
|
/[.]?[:]?([.][ ]|[ ])/,
|
|
12538
12552
|
"){3}"
|
|
12539
12553
|
)
|
|
@@ -12550,7 +12564,7 @@ function Tg() {
|
|
|
12550
12564
|
relevance: 0
|
|
12551
12565
|
}, Fr = {
|
|
12552
12566
|
scope: "number",
|
|
12553
|
-
begin:
|
|
12567
|
+
begin: me,
|
|
12554
12568
|
relevance: 0
|
|
12555
12569
|
}, Yr = {
|
|
12556
12570
|
scope: "regexp",
|
|
@@ -12583,7 +12597,7 @@ function Tg() {
|
|
|
12583
12597
|
APOS_STRING_MODE: R,
|
|
12584
12598
|
BACKSLASH_ESCAPE: oe,
|
|
12585
12599
|
BINARY_NUMBER_MODE: Fr,
|
|
12586
|
-
BINARY_NUMBER_RE:
|
|
12600
|
+
BINARY_NUMBER_RE: me,
|
|
12587
12601
|
COMMENT: re,
|
|
12588
12602
|
C_BLOCK_COMMENT_MODE: gt,
|
|
12589
12603
|
C_LINE_COMMENT_MODE: Xe,
|
|
@@ -12606,14 +12620,14 @@ function Tg() {
|
|
|
12606
12620
|
},
|
|
12607
12621
|
HASH_COMMENT_MODE: Jt,
|
|
12608
12622
|
IDENT_RE: $e,
|
|
12609
|
-
MATCH_NOTHING_RE:
|
|
12623
|
+
MATCH_NOTHING_RE: Le,
|
|
12610
12624
|
METHOD_GUARD: $r,
|
|
12611
12625
|
NUMBER_MODE: An,
|
|
12612
12626
|
NUMBER_RE: F,
|
|
12613
12627
|
PHRASAL_WORDS_MODE: Me,
|
|
12614
12628
|
QUOTE_STRING_MODE: ae,
|
|
12615
12629
|
REGEXP_MODE: Yr,
|
|
12616
|
-
RE_STARTERS_RE:
|
|
12630
|
+
RE_STARTERS_RE: Z,
|
|
12617
12631
|
SHEBANG: se,
|
|
12618
12632
|
TITLE_MODE: Kr,
|
|
12619
12633
|
UNDERSCORE_IDENT_RE: B,
|
|
@@ -12629,7 +12643,7 @@ function Tg() {
|
|
|
12629
12643
|
f && u.beginKeywords && (u.begin = "\\b(" + u.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", u.__beforeBegin = Gr, u.keywords = u.keywords || u.beginKeywords, delete u.beginKeywords, u.relevance === void 0 && (u.relevance = 0));
|
|
12630
12644
|
}
|
|
12631
12645
|
function Xr(u, f) {
|
|
12632
|
-
Array.isArray(u.illegal) && (u.illegal =
|
|
12646
|
+
Array.isArray(u.illegal) && (u.illegal = j(...u.illegal));
|
|
12633
12647
|
}
|
|
12634
12648
|
function zr(u, f) {
|
|
12635
12649
|
if (u.match) {
|
|
@@ -12670,16 +12684,16 @@ function Tg() {
|
|
|
12670
12684
|
], Zr = "keyword";
|
|
12671
12685
|
function ps(u, f, v = Zr) {
|
|
12672
12686
|
const Y = /* @__PURE__ */ Object.create(null);
|
|
12673
|
-
return typeof u == "string" ?
|
|
12687
|
+
return typeof u == "string" ? ve(v, u.split(" ")) : Array.isArray(u) ? ve(v, u) : Object.keys(u).forEach(function(Oe) {
|
|
12674
12688
|
Object.assign(
|
|
12675
12689
|
Y,
|
|
12676
|
-
ps(u[
|
|
12690
|
+
ps(u[Oe], f, Oe)
|
|
12677
12691
|
);
|
|
12678
12692
|
}), Y;
|
|
12679
|
-
function
|
|
12693
|
+
function ve(Oe, N) {
|
|
12680
12694
|
f && (N = N.map((y) => y.toLowerCase())), N.forEach(function(y) {
|
|
12681
12695
|
const x = y.split("|");
|
|
12682
|
-
Y[x[0]] = [
|
|
12696
|
+
Y[x[0]] = [Oe, el(x[0], x[1])];
|
|
12683
12697
|
});
|
|
12684
12698
|
}
|
|
12685
12699
|
}
|
|
@@ -12698,10 +12712,10 @@ function Tg() {
|
|
|
12698
12712
|
}, qn = new Error();
|
|
12699
12713
|
function hs(u, f, { key: v }) {
|
|
12700
12714
|
let Y = 0;
|
|
12701
|
-
const
|
|
12715
|
+
const ve = u[v], Oe = {}, N = {};
|
|
12702
12716
|
for (let y = 1; y <= f.length; y++)
|
|
12703
|
-
N[y + Y] =
|
|
12704
|
-
u[v] = N, u[v]._emit =
|
|
12717
|
+
N[y + Y] = ve[y], Oe[y + Y] = !0, Y += U(f[y - 1]);
|
|
12718
|
+
u[v] = N, u[v]._emit = Oe, u[v]._multi = !0;
|
|
12705
12719
|
}
|
|
12706
12720
|
function nl(u) {
|
|
12707
12721
|
if (Array.isArray(u.begin)) {
|
|
@@ -12709,7 +12723,7 @@ function Tg() {
|
|
|
12709
12723
|
throw Vt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), qn;
|
|
12710
12724
|
if (typeof u.beginScope != "object" || u.beginScope === null)
|
|
12711
12725
|
throw Vt("beginScope must be object"), qn;
|
|
12712
|
-
hs(u, u.begin, { key: "beginScope" }), u.begin =
|
|
12726
|
+
hs(u, u.begin, { key: "beginScope" }), u.begin = Q(u.begin, { joinWith: "" });
|
|
12713
12727
|
}
|
|
12714
12728
|
}
|
|
12715
12729
|
function ol(u) {
|
|
@@ -12718,7 +12732,7 @@ function Tg() {
|
|
|
12718
12732
|
throw Vt("skip, excludeEnd, returnEnd not compatible with endScope: {}"), qn;
|
|
12719
12733
|
if (typeof u.endScope != "object" || u.endScope === null)
|
|
12720
12734
|
throw Vt("endScope must be object"), qn;
|
|
12721
|
-
hs(u, u.end, { key: "endScope" }), u.end =
|
|
12735
|
+
hs(u, u.end, { key: "endScope" }), u.end = Q(u.end, { joinWith: "" });
|
|
12722
12736
|
}
|
|
12723
12737
|
}
|
|
12724
12738
|
function il(u) {
|
|
@@ -12740,12 +12754,12 @@ function Tg() {
|
|
|
12740
12754
|
}
|
|
12741
12755
|
// @ts-ignore
|
|
12742
12756
|
addRule(y, x) {
|
|
12743
|
-
x.position = this.position++, this.matchIndexes[this.matchAt] = x, this.regexes.push([x, y]), this.matchAt +=
|
|
12757
|
+
x.position = this.position++, this.matchIndexes[this.matchAt] = x, this.regexes.push([x, y]), this.matchAt += U(y) + 1;
|
|
12744
12758
|
}
|
|
12745
12759
|
compile() {
|
|
12746
12760
|
this.regexes.length === 0 && (this.exec = () => null);
|
|
12747
12761
|
const y = this.regexes.map((x) => x[1]);
|
|
12748
|
-
this.matcherRe = f(
|
|
12762
|
+
this.matcherRe = f(Q(y, { joinWith: "|" }), !0), this.lastIndex = 0;
|
|
12749
12763
|
}
|
|
12750
12764
|
/** @param {string} s */
|
|
12751
12765
|
exec(y) {
|
|
@@ -12753,8 +12767,8 @@ function Tg() {
|
|
|
12753
12767
|
const x = this.matcherRe.exec(y);
|
|
12754
12768
|
if (!x)
|
|
12755
12769
|
return null;
|
|
12756
|
-
const
|
|
12757
|
-
return x.splice(0,
|
|
12770
|
+
const De = x.findIndex((vn, ii) => ii > 0 && vn !== void 0), Ce = this.matchIndexes[De];
|
|
12771
|
+
return x.splice(0, De), Object.assign(x, Ce);
|
|
12758
12772
|
}
|
|
12759
12773
|
}
|
|
12760
12774
|
class Y {
|
|
@@ -12765,7 +12779,7 @@ function Tg() {
|
|
|
12765
12779
|
getMatcher(y) {
|
|
12766
12780
|
if (this.multiRegexes[y]) return this.multiRegexes[y];
|
|
12767
12781
|
const x = new v();
|
|
12768
|
-
return this.rules.slice(y).forEach(([
|
|
12782
|
+
return this.rules.slice(y).forEach(([De, Ce]) => x.addRule(De, Ce)), x.compile(), this.multiRegexes[y] = x, x;
|
|
12769
12783
|
}
|
|
12770
12784
|
resumingScanAtSamePosition() {
|
|
12771
12785
|
return this.regexIndex !== 0;
|
|
@@ -12781,19 +12795,19 @@ function Tg() {
|
|
|
12781
12795
|
exec(y) {
|
|
12782
12796
|
const x = this.getMatcher(this.regexIndex);
|
|
12783
12797
|
x.lastIndex = this.lastIndex;
|
|
12784
|
-
let
|
|
12785
|
-
if (this.resumingScanAtSamePosition() && !(
|
|
12786
|
-
const
|
|
12787
|
-
|
|
12798
|
+
let De = x.exec(y);
|
|
12799
|
+
if (this.resumingScanAtSamePosition() && !(De && De.index === this.lastIndex)) {
|
|
12800
|
+
const Ce = this.getMatcher(0);
|
|
12801
|
+
Ce.lastIndex = this.lastIndex + 1, De = Ce.exec(y);
|
|
12788
12802
|
}
|
|
12789
|
-
return
|
|
12803
|
+
return De && (this.regexIndex += De.position + 1, this.regexIndex === this.count && this.considerAll()), De;
|
|
12790
12804
|
}
|
|
12791
12805
|
}
|
|
12792
|
-
function
|
|
12806
|
+
function ve(N) {
|
|
12793
12807
|
const y = new Y();
|
|
12794
12808
|
return N.contains.forEach((x) => y.addRule(x.begin, { rule: x, type: "begin" })), N.terminatorEnd && y.addRule(N.terminatorEnd, { type: "end" }), N.illegal && y.addRule(N.illegal, { type: "illegal" }), y;
|
|
12795
12809
|
}
|
|
12796
|
-
function
|
|
12810
|
+
function Oe(N, y) {
|
|
12797
12811
|
const x = (
|
|
12798
12812
|
/** @type CompiledMode */
|
|
12799
12813
|
N
|
|
@@ -12806,31 +12820,31 @@ function Tg() {
|
|
|
12806
12820
|
zr,
|
|
12807
12821
|
sl,
|
|
12808
12822
|
Jr
|
|
12809
|
-
].forEach((
|
|
12823
|
+
].forEach((Ce) => Ce(N, y)), u.compilerExtensions.forEach((Ce) => Ce(N, y)), N.__beforeBegin = null, [
|
|
12810
12824
|
Wr,
|
|
12811
12825
|
// do this later so compiler extensions that come earlier have access to the
|
|
12812
12826
|
// raw array if they wanted to perhaps manipulate it, etc.
|
|
12813
12827
|
Xr,
|
|
12814
12828
|
// default to 1 relevance if not specified
|
|
12815
12829
|
qr
|
|
12816
|
-
].forEach((
|
|
12817
|
-
let
|
|
12818
|
-
return typeof N.keywords == "object" && N.keywords.$pattern && (N.keywords = Object.assign({}, N.keywords),
|
|
12830
|
+
].forEach((Ce) => Ce(N, y)), N.isCompiled = !0;
|
|
12831
|
+
let De = null;
|
|
12832
|
+
return typeof N.keywords == "object" && N.keywords.$pattern && (N.keywords = Object.assign({}, N.keywords), De = N.keywords.$pattern, delete N.keywords.$pattern), De = De || /\w+/, N.keywords && (N.keywords = ps(N.keywords, u.case_insensitive)), x.keywordPatternRe = f(De, !0), y && (N.begin || (N.begin = /\B|\b/), x.beginRe = f(x.begin), !N.end && !N.endsWithParent && (N.end = /\B|\b/), N.end && (x.endRe = f(x.end)), x.terminatorEnd = h(x.end) || "", N.endsWithParent && y.terminatorEnd && (x.terminatorEnd += (N.end ? "|" : "") + y.terminatorEnd)), N.illegal && (x.illegalRe = f(
|
|
12819
12833
|
/** @type {RegExp | string} */
|
|
12820
12834
|
N.illegal
|
|
12821
|
-
)), N.contains || (N.contains = []), N.contains = [].concat(...N.contains.map(function(
|
|
12822
|
-
return rl(
|
|
12823
|
-
})), N.contains.forEach(function(
|
|
12824
|
-
|
|
12835
|
+
)), N.contains || (N.contains = []), N.contains = [].concat(...N.contains.map(function(Ce) {
|
|
12836
|
+
return rl(Ce === "self" ? N : Ce);
|
|
12837
|
+
})), N.contains.forEach(function(Ce) {
|
|
12838
|
+
Oe(
|
|
12825
12839
|
/** @type Mode */
|
|
12826
|
-
|
|
12840
|
+
Ce,
|
|
12827
12841
|
x
|
|
12828
12842
|
);
|
|
12829
|
-
}), N.starts &&
|
|
12843
|
+
}), N.starts && Oe(N.starts, y), x.matcher = ve(x), x;
|
|
12830
12844
|
}
|
|
12831
12845
|
if (u.compilerExtensions || (u.compilerExtensions = []), u.contains && u.contains.includes("self"))
|
|
12832
12846
|
throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
|
|
12833
|
-
return u.classNameAliases = o(u.classNameAliases || {}),
|
|
12847
|
+
return u.classNameAliases = o(u.classNameAliases || {}), Oe(
|
|
12834
12848
|
/** @type Mode */
|
|
12835
12849
|
u
|
|
12836
12850
|
);
|
|
@@ -12851,8 +12865,8 @@ function Tg() {
|
|
|
12851
12865
|
}
|
|
12852
12866
|
const oi = n, gs = o, ms = Symbol("nomatch"), ul = 7, Ts = function(u) {
|
|
12853
12867
|
const f = /* @__PURE__ */ Object.create(null), v = /* @__PURE__ */ Object.create(null), Y = [];
|
|
12854
|
-
let
|
|
12855
|
-
const
|
|
12868
|
+
let ve = !0;
|
|
12869
|
+
const Oe = "Could not find the language '{}', did you forget to load/include a language module?", N = { disableAutodetect: !0, name: "Plain text", contains: [] };
|
|
12856
12870
|
let y = {
|
|
12857
12871
|
ignoreUnescapedHTML: !1,
|
|
12858
12872
|
throwUnescapedHTML: !1,
|
|
@@ -12868,31 +12882,31 @@ function Tg() {
|
|
|
12868
12882
|
function x(E) {
|
|
12869
12883
|
return y.noHighlightRe.test(E);
|
|
12870
12884
|
}
|
|
12871
|
-
function
|
|
12885
|
+
function De(E) {
|
|
12872
12886
|
let S = E.className + " ";
|
|
12873
12887
|
S += E.parentNode ? E.parentNode.className : "";
|
|
12874
12888
|
const z = y.languageDetectRe.exec(S);
|
|
12875
12889
|
if (z) {
|
|
12876
12890
|
const le = Ct(z[1]);
|
|
12877
|
-
return le || (ds(
|
|
12891
|
+
return le || (ds(Oe.replace("{}", z[1])), ds("Falling back to no-highlight mode for this block.", E)), le ? z[1] : "no-highlight";
|
|
12878
12892
|
}
|
|
12879
12893
|
return S.split(/\s+/).find((le) => x(le) || Ct(le));
|
|
12880
12894
|
}
|
|
12881
|
-
function
|
|
12882
|
-
let le = "",
|
|
12883
|
-
typeof S == "object" ? (le = E, z = S.ignoreIllegals,
|
|
12884
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),
|
|
12885
|
-
const
|
|
12895
|
+
function Ce(E, S, z) {
|
|
12896
|
+
let le = "", Se = "";
|
|
12897
|
+
typeof S == "object" ? (le = E, z = S.ignoreIllegals, Se = S.language) : (Qt("10.7.0", "highlight(lang, code, ...args) has been deprecated."), Qt("10.7.0", `Please use highlight(code, options) instead.
|
|
12898
|
+
https://github.com/highlightjs/highlight.js/issues/2277`), Se = E, le = S), z === void 0 && (z = !0);
|
|
12899
|
+
const tt = {
|
|
12886
12900
|
code: le,
|
|
12887
|
-
language:
|
|
12901
|
+
language: Se
|
|
12888
12902
|
};
|
|
12889
|
-
Qn("before:highlight",
|
|
12890
|
-
const Nt =
|
|
12891
|
-
return Nt.code =
|
|
12903
|
+
Qn("before:highlight", tt);
|
|
12904
|
+
const Nt = tt.result ? tt.result : vn(tt.language, tt.code, z);
|
|
12905
|
+
return Nt.code = tt.code, Qn("after:highlight", Nt), Nt;
|
|
12892
12906
|
}
|
|
12893
12907
|
function vn(E, S, z, le) {
|
|
12894
|
-
const
|
|
12895
|
-
function
|
|
12908
|
+
const Se = /* @__PURE__ */ Object.create(null);
|
|
12909
|
+
function tt(b, L) {
|
|
12896
12910
|
return b.keywords[L];
|
|
12897
12911
|
}
|
|
12898
12912
|
function Nt() {
|
|
@@ -12905,14 +12919,14 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Le = E, le = S), z ==
|
|
|
12905
12919
|
let L = H.keywordPatternRe.exec(ce), W = "";
|
|
12906
12920
|
for (; L; ) {
|
|
12907
12921
|
W += ce.substring(b, L.index);
|
|
12908
|
-
const ne =
|
|
12922
|
+
const ne = lt.case_insensitive ? L[0].toLowerCase() : L[0], Ve = tt(H, ne);
|
|
12909
12923
|
if (Ve) {
|
|
12910
12924
|
const [mt, Nl] = Ve;
|
|
12911
|
-
if (Pe.addText(W), W = "",
|
|
12925
|
+
if (Pe.addText(W), W = "", Se[ne] = (Se[ne] || 0) + 1, Se[ne] <= ul && (to += Nl), mt.startsWith("_"))
|
|
12912
12926
|
W += L[0];
|
|
12913
12927
|
else {
|
|
12914
|
-
const kl =
|
|
12915
|
-
|
|
12928
|
+
const kl = lt.classNameAliases[mt] || mt;
|
|
12929
|
+
rt(L[0], kl);
|
|
12916
12930
|
}
|
|
12917
12931
|
} else
|
|
12918
12932
|
W += L[0];
|
|
@@ -12937,7 +12951,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Le = E, le = S), z ==
|
|
|
12937
12951
|
function ze() {
|
|
12938
12952
|
H.subLanguage != null ? Zn() : Nt(), ce = "";
|
|
12939
12953
|
}
|
|
12940
|
-
function
|
|
12954
|
+
function rt(b, L) {
|
|
12941
12955
|
b !== "" && (Pe.startScope(L), Pe.addText(b), Pe.endScope());
|
|
12942
12956
|
}
|
|
12943
12957
|
function Os(b, L) {
|
|
@@ -12948,15 +12962,15 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Le = E, le = S), z ==
|
|
|
12948
12962
|
W++;
|
|
12949
12963
|
continue;
|
|
12950
12964
|
}
|
|
12951
|
-
const Ve =
|
|
12952
|
-
Ve ?
|
|
12965
|
+
const Ve = lt.classNameAliases[b[W]] || b[W], mt = L[W];
|
|
12966
|
+
Ve ? rt(mt, Ve) : (ce = mt, Nt(), ce = ""), W++;
|
|
12953
12967
|
}
|
|
12954
12968
|
}
|
|
12955
12969
|
function bs(b, L) {
|
|
12956
|
-
return b.scope && typeof b.scope == "string" && Pe.openNode(
|
|
12970
|
+
return b.scope && typeof b.scope == "string" && Pe.openNode(lt.classNameAliases[b.scope] || b.scope), b.beginScope && (b.beginScope._wrap ? (rt(ce, lt.classNameAliases[b.beginScope._wrap] || b.beginScope._wrap), ce = "") : b.beginScope._multi && (Os(b.beginScope, L), ce = "")), H = Object.create(b, { parent: { value: H } }), H;
|
|
12957
12971
|
}
|
|
12958
12972
|
function Is(b, L, W) {
|
|
12959
|
-
let ne =
|
|
12973
|
+
let ne = J(b.endRe, W);
|
|
12960
12974
|
if (ne) {
|
|
12961
12975
|
if (b["on:end"]) {
|
|
12962
12976
|
const Ve = new t(b);
|
|
@@ -12986,7 +13000,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Le = E, le = S), z ==
|
|
|
12986
13000
|
if (!ne)
|
|
12987
13001
|
return ms;
|
|
12988
13002
|
const Ve = H;
|
|
12989
|
-
H.endScope && H.endScope._wrap ? (ze(),
|
|
13003
|
+
H.endScope && H.endScope._wrap ? (ze(), rt(L, H.endScope._wrap)) : H.endScope && H.endScope._multi ? (ze(), Os(H.endScope, b)) : Ve.skip ? ce += L : (Ve.returnEnd || Ve.excludeEnd || (ce += L), ze(), Ve.excludeEnd && (ce = L));
|
|
12990
13004
|
do
|
|
12991
13005
|
H.scope && Pe.closeNode(), !H.skip && !H.subLanguage && (to += H.relevance), H = H.parent;
|
|
12992
13006
|
while (H !== ne.parent);
|
|
@@ -12994,7 +13008,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Le = E, le = S), z ==
|
|
|
12994
13008
|
}
|
|
12995
13009
|
function yl() {
|
|
12996
13010
|
const b = [];
|
|
12997
|
-
for (let L = H; L !==
|
|
13011
|
+
for (let L = H; L !== lt; L = L.parent)
|
|
12998
13012
|
L.scope && b.unshift(L.scope);
|
|
12999
13013
|
b.forEach((L) => Pe.openNode(L));
|
|
13000
13014
|
}
|
|
@@ -13004,7 +13018,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Le = E, le = S), z ==
|
|
|
13004
13018
|
if (ce += b, W == null)
|
|
13005
13019
|
return ze(), 0;
|
|
13006
13020
|
if (eo.type === "begin" && L.type === "end" && eo.index === L.index && W === "") {
|
|
13007
|
-
if (ce += S.slice(L.index, L.index + 1), !
|
|
13021
|
+
if (ce += S.slice(L.index, L.index + 1), !ve) {
|
|
13008
13022
|
const ne = new Error(`0 width match regex (${E})`);
|
|
13009
13023
|
throw ne.languageName = E, ne.badRule = eo.rule, ne;
|
|
13010
13024
|
}
|
|
@@ -13027,17 +13041,17 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Le = E, le = S), z ==
|
|
|
13027
13041
|
throw new Error("potential infinite loop, way more iterations than matches");
|
|
13028
13042
|
return ce += W, W.length;
|
|
13029
13043
|
}
|
|
13030
|
-
const
|
|
13031
|
-
if (!
|
|
13032
|
-
throw Vt(
|
|
13033
|
-
const Cl = al(
|
|
13044
|
+
const lt = Ct(E);
|
|
13045
|
+
if (!lt)
|
|
13046
|
+
throw Vt(Oe.replace("{}", E)), new Error('Unknown language: "' + E + '"');
|
|
13047
|
+
const Cl = al(lt);
|
|
13034
13048
|
let ri = "", H = le || Cl;
|
|
13035
13049
|
const Cs = {}, Pe = new y.__emitter(y);
|
|
13036
13050
|
yl();
|
|
13037
13051
|
let ce = "", to = 0, Ft = 0, li = 0, ci = !1;
|
|
13038
13052
|
try {
|
|
13039
|
-
if (
|
|
13040
|
-
|
|
13053
|
+
if (lt.__emitTokens)
|
|
13054
|
+
lt.__emitTokens(S, Pe);
|
|
13041
13055
|
else {
|
|
13042
13056
|
for (H.matcher.considerAll(); ; ) {
|
|
13043
13057
|
li++, ci ? ci = !1 : H.matcher.considerAll(), H.matcher.lastIndex = Ft;
|
|
@@ -13072,7 +13086,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Le = E, le = S), z ==
|
|
|
13072
13086
|
},
|
|
13073
13087
|
_emitter: Pe
|
|
13074
13088
|
};
|
|
13075
|
-
if (
|
|
13089
|
+
if (ve)
|
|
13076
13090
|
return {
|
|
13077
13091
|
language: E,
|
|
13078
13092
|
value: oi(S),
|
|
@@ -13101,16 +13115,16 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Le = E, le = S), z ==
|
|
|
13101
13115
|
(ze) => vn(ze, E, !1)
|
|
13102
13116
|
);
|
|
13103
13117
|
le.unshift(z);
|
|
13104
|
-
const
|
|
13105
|
-
if (ze.relevance !==
|
|
13106
|
-
if (ze.language &&
|
|
13107
|
-
if (Ct(ze.language).supersetOf ===
|
|
13118
|
+
const Se = le.sort((ze, rt) => {
|
|
13119
|
+
if (ze.relevance !== rt.relevance) return rt.relevance - ze.relevance;
|
|
13120
|
+
if (ze.language && rt.language) {
|
|
13121
|
+
if (Ct(ze.language).supersetOf === rt.language)
|
|
13108
13122
|
return 1;
|
|
13109
|
-
if (Ct(
|
|
13123
|
+
if (Ct(rt.language).supersetOf === ze.language)
|
|
13110
13124
|
return -1;
|
|
13111
13125
|
}
|
|
13112
13126
|
return 0;
|
|
13113
|
-
}), [
|
|
13127
|
+
}), [tt, Nt] = Se, Zn = tt;
|
|
13114
13128
|
return Zn.secondBest = Nt, Zn;
|
|
13115
13129
|
}
|
|
13116
13130
|
function pl(E, S, z) {
|
|
@@ -13119,7 +13133,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Le = E, le = S), z ==
|
|
|
13119
13133
|
}
|
|
13120
13134
|
function ai(E) {
|
|
13121
13135
|
let S = null;
|
|
13122
|
-
const z =
|
|
13136
|
+
const z = De(E);
|
|
13123
13137
|
if (x(z)) return;
|
|
13124
13138
|
if (Qn(
|
|
13125
13139
|
"before:highlightElement",
|
|
@@ -13134,16 +13148,16 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Le = E, le = S), z ==
|
|
|
13134
13148
|
E.innerHTML
|
|
13135
13149
|
);
|
|
13136
13150
|
S = E;
|
|
13137
|
-
const le = S.textContent,
|
|
13138
|
-
E.innerHTML =
|
|
13139
|
-
language:
|
|
13151
|
+
const le = S.textContent, Se = z ? Ce(le, { language: z, ignoreIllegals: !0 }) : si(le);
|
|
13152
|
+
E.innerHTML = Se.value, E.dataset.highlighted = "yes", pl(E, z, Se.language), E.result = {
|
|
13153
|
+
language: Se.language,
|
|
13140
13154
|
// TODO: remove with version 11.0
|
|
13141
|
-
re:
|
|
13142
|
-
relevance:
|
|
13143
|
-
},
|
|
13144
|
-
language:
|
|
13145
|
-
relevance:
|
|
13146
|
-
}), Qn("after:highlightElement", { el: E, result:
|
|
13155
|
+
re: Se.relevance,
|
|
13156
|
+
relevance: Se.relevance
|
|
13157
|
+
}, Se.secondBest && (E.secondBest = {
|
|
13158
|
+
language: Se.secondBest.language,
|
|
13159
|
+
relevance: Se.secondBest.relevance
|
|
13160
|
+
}), Qn("after:highlightElement", { el: E, result: Se, text: le });
|
|
13147
13161
|
}
|
|
13148
13162
|
function _l(E) {
|
|
13149
13163
|
y = gs(y, E);
|
|
@@ -13170,7 +13184,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Le = E, le = S), z ==
|
|
|
13170
13184
|
try {
|
|
13171
13185
|
z = S(u);
|
|
13172
13186
|
} catch (le) {
|
|
13173
|
-
if (Vt("Language definition for '{}' could not be registered.".replace("{}", E)),
|
|
13187
|
+
if (Vt("Language definition for '{}' could not be registered.".replace("{}", E)), ve)
|
|
13174
13188
|
Vt(le);
|
|
13175
13189
|
else
|
|
13176
13190
|
throw le;
|
|
@@ -13226,7 +13240,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Le = E, le = S), z ==
|
|
|
13226
13240
|
return Qt("10.7.0", "highlightBlock will be removed entirely in v12.0"), Qt("10.7.0", "Please use highlightElement now."), ai(E);
|
|
13227
13241
|
}
|
|
13228
13242
|
Object.assign(u, {
|
|
13229
|
-
highlight:
|
|
13243
|
+
highlight: Ce,
|
|
13230
13244
|
highlightAuto: si,
|
|
13231
13245
|
highlightAll: Jn,
|
|
13232
13246
|
highlightElement: ai,
|
|
@@ -13245,13 +13259,13 @@ https://github.com/highlightjs/highlight.js/issues/2277`), Le = E, le = S), z ==
|
|
|
13245
13259
|
addPlugin: El,
|
|
13246
13260
|
removePlugin: Al
|
|
13247
13261
|
}), u.debugMode = function() {
|
|
13248
|
-
|
|
13262
|
+
ve = !1;
|
|
13249
13263
|
}, u.safeMode = function() {
|
|
13250
|
-
|
|
13264
|
+
ve = !0;
|
|
13251
13265
|
}, u.versionString = ll, u.regex = {
|
|
13252
13266
|
concat: O,
|
|
13253
13267
|
lookahead: g,
|
|
13254
|
-
either:
|
|
13268
|
+
either: j,
|
|
13255
13269
|
optional: I,
|
|
13256
13270
|
anyNumberOfTimes: m
|
|
13257
13271
|
};
|
|
@@ -13521,7 +13535,7 @@ function Ig(e) {
|
|
|
13521
13535
|
e.BACKSLASH_ESCAPE,
|
|
13522
13536
|
g
|
|
13523
13537
|
]
|
|
13524
|
-
},
|
|
13538
|
+
}, U = {
|
|
13525
13539
|
className: "comment",
|
|
13526
13540
|
variants: [
|
|
13527
13541
|
e.COMMENT(
|
|
@@ -13566,7 +13580,7 @@ function Ig(e) {
|
|
|
13566
13580
|
e.C_BLOCK_COMMENT_MODE,
|
|
13567
13581
|
e.C_LINE_COMMENT_MODE
|
|
13568
13582
|
]
|
|
13569
|
-
},
|
|
13583
|
+
}, J = [
|
|
13570
13584
|
e.APOS_STRING_MODE,
|
|
13571
13585
|
e.QUOTE_STRING_MODE,
|
|
13572
13586
|
m,
|
|
@@ -13580,7 +13594,7 @@ function Ig(e) {
|
|
|
13580
13594
|
// See https://github.com/highlightjs/highlight.js/issues/3288
|
|
13581
13595
|
// hljs.REGEXP_MODE
|
|
13582
13596
|
];
|
|
13583
|
-
g.contains =
|
|
13597
|
+
g.contains = J.concat({
|
|
13584
13598
|
// we need to pair up {} inside our subst to prevent
|
|
13585
13599
|
// it from ending too early by matching another }
|
|
13586
13600
|
begin: /\{/,
|
|
@@ -13588,17 +13602,17 @@ function Ig(e) {
|
|
|
13588
13602
|
keywords: l,
|
|
13589
13603
|
contains: [
|
|
13590
13604
|
"self"
|
|
13591
|
-
].concat(
|
|
13605
|
+
].concat(J)
|
|
13592
13606
|
});
|
|
13593
|
-
const
|
|
13607
|
+
const ge = [].concat(U, g.contains), Q = ge.concat([
|
|
13594
13608
|
// eat recursive parens in sub expressions
|
|
13595
13609
|
{
|
|
13596
13610
|
begin: /(\s*)\(/,
|
|
13597
13611
|
end: /\)/,
|
|
13598
13612
|
keywords: l,
|
|
13599
|
-
contains: ["self"].concat(
|
|
13613
|
+
contains: ["self"].concat(ge)
|
|
13600
13614
|
}
|
|
13601
|
-
]),
|
|
13615
|
+
]), Le = {
|
|
13602
13616
|
className: "params",
|
|
13603
13617
|
// convert this to negative lookbehind in v12
|
|
13604
13618
|
begin: /(\s*)\(/,
|
|
@@ -13607,7 +13621,7 @@ function Ig(e) {
|
|
|
13607
13621
|
excludeBegin: !0,
|
|
13608
13622
|
excludeEnd: !0,
|
|
13609
13623
|
keywords: l,
|
|
13610
|
-
contains:
|
|
13624
|
+
contains: Q
|
|
13611
13625
|
}, $e = {
|
|
13612
13626
|
variants: [
|
|
13613
13627
|
// class Car extends vehicle
|
|
@@ -13693,20 +13707,20 @@ function Ig(e) {
|
|
|
13693
13707
|
3: "title.function"
|
|
13694
13708
|
},
|
|
13695
13709
|
label: "func.def",
|
|
13696
|
-
contains: [
|
|
13710
|
+
contains: [Le],
|
|
13697
13711
|
illegal: /%/
|
|
13698
|
-
},
|
|
13712
|
+
}, me = {
|
|
13699
13713
|
relevance: 0,
|
|
13700
13714
|
match: /\b[A-Z][A-Z_0-9]+\b/,
|
|
13701
13715
|
className: "variable.constant"
|
|
13702
13716
|
};
|
|
13703
|
-
function
|
|
13717
|
+
function Z(re) {
|
|
13704
13718
|
return t.concat("(?!", re.join("|"), ")");
|
|
13705
13719
|
}
|
|
13706
13720
|
const se = {
|
|
13707
13721
|
match: t.concat(
|
|
13708
13722
|
/\b/,
|
|
13709
|
-
|
|
13723
|
+
Z([
|
|
13710
13724
|
...Vr,
|
|
13711
13725
|
"super",
|
|
13712
13726
|
"import"
|
|
@@ -13741,7 +13755,7 @@ function Ig(e) {
|
|
|
13741
13755
|
// eat to avoid empty params
|
|
13742
13756
|
begin: /\(\)/
|
|
13743
13757
|
},
|
|
13744
|
-
|
|
13758
|
+
Le
|
|
13745
13759
|
]
|
|
13746
13760
|
}, ae = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", Me = {
|
|
13747
13761
|
match: [
|
|
@@ -13760,7 +13774,7 @@ function Ig(e) {
|
|
|
13760
13774
|
3: "title.function"
|
|
13761
13775
|
},
|
|
13762
13776
|
contains: [
|
|
13763
|
-
|
|
13777
|
+
Le
|
|
13764
13778
|
]
|
|
13765
13779
|
};
|
|
13766
13780
|
return {
|
|
@@ -13768,7 +13782,7 @@ function Ig(e) {
|
|
|
13768
13782
|
aliases: ["js", "jsx", "mjs", "cjs"],
|
|
13769
13783
|
keywords: l,
|
|
13770
13784
|
// this will be extended by TypeScript
|
|
13771
|
-
exports: { PARAMS_CONTAINS:
|
|
13785
|
+
exports: { PARAMS_CONTAINS: Q, CLASS_REFERENCE: B },
|
|
13772
13786
|
illegal: /#(?![$_A-z])/,
|
|
13773
13787
|
contains: [
|
|
13774
13788
|
e.SHEBANG({
|
|
@@ -13783,7 +13797,7 @@ function Ig(e) {
|
|
|
13783
13797
|
I,
|
|
13784
13798
|
O,
|
|
13785
13799
|
G,
|
|
13786
|
-
|
|
13800
|
+
U,
|
|
13787
13801
|
// Skip numbers when they are part of a variable name
|
|
13788
13802
|
{ match: /\$\d+/ },
|
|
13789
13803
|
h,
|
|
@@ -13800,7 +13814,7 @@ function Ig(e) {
|
|
|
13800
13814
|
keywords: "return throw case",
|
|
13801
13815
|
relevance: 0,
|
|
13802
13816
|
contains: [
|
|
13803
|
-
|
|
13817
|
+
U,
|
|
13804
13818
|
e.REGEXP_MODE,
|
|
13805
13819
|
{
|
|
13806
13820
|
className: "function",
|
|
@@ -13829,7 +13843,7 @@ function Ig(e) {
|
|
|
13829
13843
|
excludeBegin: !0,
|
|
13830
13844
|
excludeEnd: !0,
|
|
13831
13845
|
keywords: l,
|
|
13832
|
-
contains:
|
|
13846
|
+
contains: Q
|
|
13833
13847
|
}
|
|
13834
13848
|
]
|
|
13835
13849
|
}
|
|
@@ -13884,7 +13898,7 @@ function Ig(e) {
|
|
|
13884
13898
|
returnBegin: !0,
|
|
13885
13899
|
label: "func.def",
|
|
13886
13900
|
contains: [
|
|
13887
|
-
|
|
13901
|
+
Le,
|
|
13888
13902
|
e.inherit(e.TITLE_MODE, { begin: o, className: "title.function" })
|
|
13889
13903
|
]
|
|
13890
13904
|
},
|
|
@@ -13904,10 +13918,10 @@ function Ig(e) {
|
|
|
13904
13918
|
{
|
|
13905
13919
|
match: [/\bconstructor(?=\s*\()/],
|
|
13906
13920
|
className: { 1: "title.function" },
|
|
13907
|
-
contains: [
|
|
13921
|
+
contains: [Le]
|
|
13908
13922
|
},
|
|
13909
13923
|
se,
|
|
13910
|
-
|
|
13924
|
+
me,
|
|
13911
13925
|
$e,
|
|
13912
13926
|
R,
|
|
13913
13927
|
{
|
|
@@ -13924,14 +13938,14 @@ var yg = ht({ props: { code: { type: String, required: !0 }, language: { type: S
|
|
|
13924
13938
|
}, function(i) {
|
|
13925
13939
|
t.value = i;
|
|
13926
13940
|
});
|
|
13927
|
-
var n =
|
|
13941
|
+
var n = Be(function() {
|
|
13928
13942
|
return e.autodetect || !t.value;
|
|
13929
|
-
}), o =
|
|
13943
|
+
}), o = Be(function() {
|
|
13930
13944
|
return !n.value && !vo.getLanguage(t.value);
|
|
13931
13945
|
});
|
|
13932
|
-
return { className:
|
|
13946
|
+
return { className: Be(function() {
|
|
13933
13947
|
return o.value ? "" : "hljs " + t.value;
|
|
13934
|
-
}), highlightedCode:
|
|
13948
|
+
}), highlightedCode: Be(function() {
|
|
13935
13949
|
var i;
|
|
13936
13950
|
if (o.value) return console.warn('The language "' + t.value + '" you specified could not be found.'), e.code.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
13937
13951
|
if (n.value) {
|
|
@@ -13953,14 +13967,14 @@ const Ng = /* @__PURE__ */ ht({
|
|
|
13953
13967
|
vo.registerLanguage("javascript", Ig);
|
|
13954
13968
|
const n = Cg.component, { backgroundColor2: o } = Yo();
|
|
13955
13969
|
return (i, s) => {
|
|
13956
|
-
const a =
|
|
13957
|
-
return
|
|
13970
|
+
const a = Ie("v-sheet");
|
|
13971
|
+
return Re(), pt(a, {
|
|
13958
13972
|
color: X(o),
|
|
13959
13973
|
width: "100%",
|
|
13960
13974
|
height: "100%"
|
|
13961
13975
|
}, {
|
|
13962
|
-
default:
|
|
13963
|
-
|
|
13976
|
+
default: Ze(() => [
|
|
13977
|
+
he(X(n), {
|
|
13964
13978
|
language: "js",
|
|
13965
13979
|
code: t.code
|
|
13966
13980
|
}, null, 8, ["code"])
|
|
@@ -13972,7 +13986,7 @@ const Ng = /* @__PURE__ */ ht({
|
|
|
13972
13986
|
}), kg = { class: "text-subtitle-1 ml-3" }, Lg = /* @__PURE__ */ ht({
|
|
13973
13987
|
__name: "index",
|
|
13974
13988
|
setup(e) {
|
|
13975
|
-
const { t } = Kn(), { sysBarAvail: n } = Ma(), { backgroundColor0: o, backgroundColor2: i } = Yo(), s = Mt(""), a =
|
|
13989
|
+
const { t } = Kn(), { sysBarAvail: n } = Ma(), { backgroundColor0: o, backgroundColor2: i } = Yo(), s = Mt(""), a = Be(() => {
|
|
13976
13990
|
let _ = 48;
|
|
13977
13991
|
return n.value && (_ += 24), {
|
|
13978
13992
|
position: "relative",
|
|
@@ -13983,8 +13997,8 @@ const Ng = /* @__PURE__ */ ht({
|
|
|
13983
13997
|
s.value = _.code;
|
|
13984
13998
|
}, { open: c } = Ko("sourceDlg", l);
|
|
13985
13999
|
return (_, d) => {
|
|
13986
|
-
const h =
|
|
13987
|
-
return
|
|
14000
|
+
const h = Ie("v-sheet"), g = Ie("v-icon"), m = Ie("v-spacer"), I = Ie("v-dialog");
|
|
14001
|
+
return Re(), pt(I, {
|
|
13988
14002
|
modelValue: X(c),
|
|
13989
14003
|
"onUpdate:modelValue": d[1] || (d[1] = (O) => kn(c) ? c.value = O : null),
|
|
13990
14004
|
transition: "dialog-bottom-transition",
|
|
@@ -13993,37 +14007,37 @@ const Ng = /* @__PURE__ */ ht({
|
|
|
13993
14007
|
fullscreen: "",
|
|
13994
14008
|
onKeydown: d[2] || (d[2] = La(Ln((O) => c.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
13995
14009
|
}, {
|
|
13996
|
-
default:
|
|
13997
|
-
|
|
14010
|
+
default: Ze(() => [
|
|
14011
|
+
he(h, {
|
|
13998
14012
|
color: X(o),
|
|
13999
14013
|
width: "100%",
|
|
14000
14014
|
height: "100%"
|
|
14001
14015
|
}, {
|
|
14002
|
-
default:
|
|
14003
|
-
X(n) ? (
|
|
14016
|
+
default: Ze(() => [
|
|
14017
|
+
X(n) ? (Re(), pt(h, {
|
|
14004
14018
|
key: 0,
|
|
14005
14019
|
color: X(i),
|
|
14006
14020
|
height: 24
|
|
14007
14021
|
}, null, 8, ["color"])) : cn("", !0),
|
|
14008
|
-
|
|
14022
|
+
he(h, {
|
|
14009
14023
|
class: "d-flex align-center px-3",
|
|
14010
14024
|
color: X(i),
|
|
14011
14025
|
height: 48
|
|
14012
14026
|
}, {
|
|
14013
|
-
default:
|
|
14014
|
-
|
|
14027
|
+
default: Ze(() => [
|
|
14028
|
+
he(g, {
|
|
14015
14029
|
icon: X(Pa),
|
|
14016
14030
|
onClick: d[0] || (d[0] = (O) => c.value = !1)
|
|
14017
14031
|
}, null, 8, ["icon"]),
|
|
14018
|
-
|
|
14019
|
-
|
|
14032
|
+
at("span", kg, wo(X(t)("x-block-lib.dlg.source.title")), 1),
|
|
14033
|
+
he(m)
|
|
14020
14034
|
]),
|
|
14021
14035
|
_: 1
|
|
14022
14036
|
}, 8, ["color"]),
|
|
14023
|
-
|
|
14024
|
-
style:
|
|
14037
|
+
at("div", {
|
|
14038
|
+
style: ct(a.value)
|
|
14025
14039
|
}, [
|
|
14026
|
-
|
|
14040
|
+
he(Ng, { code: s.value }, null, 8, ["code"])
|
|
14027
14041
|
], 4)
|
|
14028
14042
|
]),
|
|
14029
14043
|
_: 1
|