x-block-lib 0.4.26 → 0.4.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
var xn = Object.defineProperty;
|
|
3
3
|
var Pn = (e, o, t) => o in e ? xn(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t;
|
|
4
4
|
var Te = (e, o, t) => Pn(e, typeof o != "symbol" ? o + "" : o, t);
|
|
5
|
-
import { getCurrentScope as wn, onScopeDispose as Vn, unref as N, computed as
|
|
6
|
-
import { d as m, j as a, O as c, u as T, X as jn, B as
|
|
5
|
+
import { getCurrentScope as wn, onScopeDispose as Vn, unref as N, computed as le, watch as De, ref as we, getCurrentInstance as Pt, onMounted as qe, defineComponent as Ue, onBeforeUnmount as Nt, resolveComponent as ne, openBlock as W, createBlock as Se, withCtx as Je, createVNode as ie, mergeProps as mo, useModel as co, toRefs as Un, reactive as Yn, h as Kn, onUnmounted as Fn, nextTick as go, isRef as vt, resolveDirective as Hn, withDirectives as Gn, createElementBlock as be, normalizeStyle as Oe, createElementVNode as ye, toDisplayString as Eo, withModifiers as yt, Fragment as Zo, renderList as Xn, withKeys as $n, createCommentVNode as Xe, mergeModels as Lo } from "vue";
|
|
6
|
+
import { d as m, j as a, O as c, u as T, X as jn, B as _e, E as G, M as J, i as wt, a as xe, b as U, C as en, F as vo, c as Wn, P as uo, N as yo, V as bt, e as Jn, f as tn, s as zn, g as Ve, S as Q, h as Jt, k as He, l as _t, m as zt, n as Ze, o as Pe, p as ko, G as qt, q as qn, r as Qn, t as Qt, U as pt, D as dt, v as Ye, w as Zn, T as Vt, x as on, y as ei, z as ti, A as oi, H as No } from "./blockly-nx44b3kf.js";
|
|
7
7
|
import { storeToRefs as ni } from "pinia";
|
|
8
8
|
import { openConfirmDlg as ii, openPromptDlg as ri, eventBus as me, useColor as nn, useViewStack as bo, useSystem as li, useGlobalStore as ai } from "x-essential-lib";
|
|
9
9
|
import { useI18n as Ut } from "vue-i18n";
|
|
@@ -31,14 +31,14 @@ function vi() {
|
|
|
31
31
|
}
|
|
32
32
|
function yi(e) {
|
|
33
33
|
const o = vi();
|
|
34
|
-
return
|
|
34
|
+
return le(() => (o.value, !!e()));
|
|
35
35
|
}
|
|
36
36
|
function bi(e, o, t = {}) {
|
|
37
37
|
const { window: n = Ei, ...i } = t;
|
|
38
38
|
let r;
|
|
39
39
|
const l = yi(() => n && "ResizeObserver" in n), s = () => {
|
|
40
40
|
r && (r.disconnect(), r = void 0);
|
|
41
|
-
}, u =
|
|
41
|
+
}, u = le(() => Array.isArray(e) ? e.map((_) => So(_)) : [So(e)]), p = De(
|
|
42
42
|
u,
|
|
43
43
|
(_) => {
|
|
44
44
|
if (s(), l.value && n) {
|
|
@@ -329,10 +329,10 @@ const Li = {
|
|
|
329
329
|
}
|
|
330
330
|
},
|
|
331
331
|
updateShape_: function() {
|
|
332
|
-
this.name ? this.setFieldValue(
|
|
332
|
+
this.name ? this.setFieldValue(J[this.name], "LABEL") : this.setFieldValue(this.key, "LABEL");
|
|
333
333
|
}
|
|
334
334
|
};
|
|
335
|
-
|
|
335
|
+
_e.parameter_v1 = Li;
|
|
336
336
|
a.forBlock.parameter_v1 = function(e) {
|
|
337
337
|
return [e.key, c.ATOMIC];
|
|
338
338
|
};
|
|
@@ -341,13 +341,13 @@ const ki = T.xml, Ni = {
|
|
|
341
341
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_CONTAINER_TITLE}"), this.appendStatementInput("STACK"), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
342
342
|
}
|
|
343
343
|
};
|
|
344
|
-
|
|
344
|
+
_e.list_create_container_v1 = Ni;
|
|
345
345
|
const Si = {
|
|
346
346
|
init: function() {
|
|
347
347
|
this.appendDummyInput().appendField("%{BKY_LIST_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("list_blocks"), this.contextMenu = !1;
|
|
348
348
|
}
|
|
349
349
|
};
|
|
350
|
-
|
|
350
|
+
_e.list_create_item_v1 = Si;
|
|
351
351
|
const Bi = {
|
|
352
352
|
init: function() {
|
|
353
353
|
this.itemCount_ = 0, this.setMutator(
|
|
@@ -432,7 +432,7 @@ const Bi = {
|
|
|
432
432
|
this.removeInput("ADD" + e);
|
|
433
433
|
}
|
|
434
434
|
};
|
|
435
|
-
|
|
435
|
+
_e.list_create_v1 = Bi;
|
|
436
436
|
a.forBlock.list_create_v1 = function(e) {
|
|
437
437
|
const o = e, t = new Array(o.itemCount_);
|
|
438
438
|
for (let i = 0; i < o.itemCount_; i++)
|
|
@@ -660,9 +660,9 @@ const Ri = {
|
|
|
660
660
|
AND: "%{BKY_LOGIC_V1_OPERATION_TOOLTIP_AND}",
|
|
661
661
|
OR: "%{BKY_LOGIC_V1_OPERATION_TOOLTIP_OR}"
|
|
662
662
|
};
|
|
663
|
-
|
|
663
|
+
U.register(
|
|
664
664
|
"logic_op_tooltip_v1",
|
|
665
|
-
|
|
665
|
+
U.buildTooltipForDropdown("OP", Ri)
|
|
666
666
|
);
|
|
667
667
|
m([
|
|
668
668
|
{
|
|
@@ -704,7 +704,7 @@ const Mi = {
|
|
|
704
704
|
this.prevBlocks_[0] = this.getInputTargetBlock("A"), this.prevBlocks_[1] = this.getInputTargetBlock("B");
|
|
705
705
|
}
|
|
706
706
|
};
|
|
707
|
-
|
|
707
|
+
U.register(
|
|
708
708
|
"logic_compare_v1",
|
|
709
709
|
function() {
|
|
710
710
|
this.mixin(Mi);
|
|
@@ -873,8 +873,8 @@ const Di = {
|
|
|
873
873
|
for (let e = 1; this.getInput("IF" + e); e++)
|
|
874
874
|
this.removeInput("IF" + e), this.removeInput("DO" + e);
|
|
875
875
|
for (let e = 1; e <= this.elseIfCount_; e++)
|
|
876
|
-
this.appendValueInput("IF" + e).setCheck("Boolean").appendField(
|
|
877
|
-
this.hasElse_ && this.appendStatementInput("ELSE").appendField(
|
|
876
|
+
this.appendValueInput("IF" + e).setCheck("Boolean").appendField(J.LOGIC_ELSE_IF), this.appendStatementInput("DO" + e).appendField(J.LOGIC_DO);
|
|
877
|
+
this.hasElse_ && this.appendStatementInput("ELSE").appendField(J.LOGIC_ELSE);
|
|
878
878
|
},
|
|
879
879
|
reconnectChildBlocks_: function(e, o, t) {
|
|
880
880
|
var n, i;
|
|
@@ -883,7 +883,7 @@ const Di = {
|
|
|
883
883
|
t == null || t.reconnect(this, "ELSE");
|
|
884
884
|
}
|
|
885
885
|
};
|
|
886
|
-
|
|
886
|
+
U.registerMutator(
|
|
887
887
|
"logic_if_v1_mutator",
|
|
888
888
|
Di,
|
|
889
889
|
void 0,
|
|
@@ -1046,7 +1046,7 @@ const xi = {
|
|
|
1046
1046
|
this.prevParentConnection_ = n;
|
|
1047
1047
|
}
|
|
1048
1048
|
};
|
|
1049
|
-
|
|
1049
|
+
U.registerMixin("logic_ternary_v1", xi);
|
|
1050
1050
|
m([
|
|
1051
1051
|
{
|
|
1052
1052
|
type: "logic_ternary_v1",
|
|
@@ -1097,19 +1097,19 @@ const Pi = {
|
|
|
1097
1097
|
};
|
|
1098
1098
|
e.push({
|
|
1099
1099
|
enabled: !0,
|
|
1100
|
-
text:
|
|
1100
|
+
text: J.VARIABLES_SET_CREATE_GET.replace("%1", n),
|
|
1101
1101
|
callback: en.callbackFactory(this, i)
|
|
1102
1102
|
});
|
|
1103
1103
|
}
|
|
1104
1104
|
}
|
|
1105
1105
|
};
|
|
1106
|
-
|
|
1106
|
+
U.registerMixin(
|
|
1107
1107
|
"contextMenu_newGetVariableBlock_v1",
|
|
1108
1108
|
Pi
|
|
1109
1109
|
);
|
|
1110
|
-
|
|
1110
|
+
U.register(
|
|
1111
1111
|
"flow_control_tooltip_v1",
|
|
1112
|
-
|
|
1112
|
+
U.buildTooltipForDropdown("MODE", {
|
|
1113
1113
|
BREAK: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_BREAK}",
|
|
1114
1114
|
CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
|
|
1115
1115
|
})
|
|
@@ -1135,7 +1135,7 @@ const wi = /* @__PURE__ */ new Set([
|
|
|
1135
1135
|
return;
|
|
1136
1136
|
const t = this.getSurroundLoop();
|
|
1137
1137
|
if (console.log(e.type, t), this.setWarningText(
|
|
1138
|
-
t ? null :
|
|
1138
|
+
t ? null : J.LOOP_FLOW_CONTROL_WARNING
|
|
1139
1139
|
), !this.isInFlyout)
|
|
1140
1140
|
try {
|
|
1141
1141
|
G.setRecordUndo(!1), this.setDisabledReason(!t, "FLOW_CONTROL_NOT_IN_LOOP");
|
|
@@ -1144,7 +1144,7 @@ const wi = /* @__PURE__ */ new Set([
|
|
|
1144
1144
|
}
|
|
1145
1145
|
}
|
|
1146
1146
|
};
|
|
1147
|
-
|
|
1147
|
+
U.registerMixin(
|
|
1148
1148
|
"flow_control_in_loop_check_v1",
|
|
1149
1149
|
Vi
|
|
1150
1150
|
);
|
|
@@ -1169,9 +1169,9 @@ m([
|
|
|
1169
1169
|
extensions: ["flow_control_tooltip_v1", "flow_control_in_loop_check_v1"]
|
|
1170
1170
|
}
|
|
1171
1171
|
]);
|
|
1172
|
-
|
|
1172
|
+
U.register(
|
|
1173
1173
|
"for_tooltip_v1",
|
|
1174
|
-
|
|
1174
|
+
U.buildTooltipWithFieldText(
|
|
1175
1175
|
"%{BKY_LOOP_V1_FOR_TOOLTIP}",
|
|
1176
1176
|
"VAR"
|
|
1177
1177
|
)
|
|
@@ -1220,9 +1220,9 @@ m([
|
|
|
1220
1220
|
extensions: ["contextMenu_newGetVariableBlock_v1", "for_tooltip_v1"]
|
|
1221
1221
|
}
|
|
1222
1222
|
]);
|
|
1223
|
-
|
|
1223
|
+
U.register(
|
|
1224
1224
|
"for_each_tooltip_v1",
|
|
1225
|
-
|
|
1225
|
+
U.buildTooltipWithFieldText(
|
|
1226
1226
|
"%{BKY_LOOP_V1_FOR_EACH_TOOLTIP}",
|
|
1227
1227
|
"VAR"
|
|
1228
1228
|
)
|
|
@@ -1257,9 +1257,9 @@ m([
|
|
|
1257
1257
|
extensions: ["contextMenu_newGetVariableBlock_v1", "for_each_tooltip_v1"]
|
|
1258
1258
|
}
|
|
1259
1259
|
]);
|
|
1260
|
-
|
|
1260
|
+
U.register(
|
|
1261
1261
|
"loop_while_until_tooltip_v1",
|
|
1262
|
-
|
|
1262
|
+
U.buildTooltipForDropdown("MODE", {
|
|
1263
1263
|
WHILE: "%{BKY_LOOP_V1_WHILE_UNTIL_TOOLTIP_WHILE}",
|
|
1264
1264
|
UNTIL: "%{BKY_LOOP_V1_WHILE_UNTIL_TOOLTIP_UNTIL}"
|
|
1265
1265
|
})
|
|
@@ -1343,9 +1343,9 @@ const Ui = {
|
|
|
1343
1343
|
STD_DEV: "%{BKY_MATH_V1_ON_LIST_TOOLTIP_STD_DEV}",
|
|
1344
1344
|
RANDOM: "%{BKY_MATH_V1_ON_LIST_TOOLTIP_RANDOM}"
|
|
1345
1345
|
};
|
|
1346
|
-
|
|
1346
|
+
U.register(
|
|
1347
1347
|
"math_op_tooltip_v1",
|
|
1348
|
-
|
|
1348
|
+
U.buildTooltipForDropdown("OP", Ui)
|
|
1349
1349
|
);
|
|
1350
1350
|
m([
|
|
1351
1351
|
{
|
|
@@ -1955,13 +1955,13 @@ const Yi = T.xml, Ki = {
|
|
|
1955
1955
|
), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
1956
1956
|
}
|
|
1957
1957
|
};
|
|
1958
|
-
|
|
1958
|
+
_e.object_create_container_v1 = Ki;
|
|
1959
1959
|
const Fi = {
|
|
1960
1960
|
init: function() {
|
|
1961
1961
|
this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_ITEM_TITLE}"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
1962
1962
|
}
|
|
1963
1963
|
};
|
|
1964
|
-
|
|
1964
|
+
_e.object_create_item_v1 = Fi;
|
|
1965
1965
|
const Hi = {
|
|
1966
1966
|
init: function() {
|
|
1967
1967
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
|
|
@@ -2042,7 +2042,7 @@ const Hi = {
|
|
|
2042
2042
|
this.removeInput("ADD" + e);
|
|
2043
2043
|
}
|
|
2044
2044
|
};
|
|
2045
|
-
|
|
2045
|
+
_e.object_create_v1 = Hi;
|
|
2046
2046
|
a.forBlock.object_create_v1 = function(e) {
|
|
2047
2047
|
const o = e;
|
|
2048
2048
|
let t = "{";
|
|
@@ -2305,7 +2305,7 @@ const Bo = T.xml, Gi = {
|
|
|
2305
2305
|
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new Wn(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
2306
2306
|
}
|
|
2307
2307
|
};
|
|
2308
|
-
|
|
2308
|
+
_e.procedure_def_container_v1 = Gi;
|
|
2309
2309
|
const Xi = {
|
|
2310
2310
|
init: function() {
|
|
2311
2311
|
const e = new vo(uo.DEFAULT_ARG);
|
|
@@ -2328,7 +2328,7 @@ const Xi = {
|
|
|
2328
2328
|
return e;
|
|
2329
2329
|
}
|
|
2330
2330
|
};
|
|
2331
|
-
|
|
2331
|
+
_e.procedure_def_item_v1 = Xi;
|
|
2332
2332
|
const $i = {
|
|
2333
2333
|
init: function() {
|
|
2334
2334
|
this.withReturn = !1, this.args = [];
|
|
@@ -2429,7 +2429,7 @@ const $i = {
|
|
|
2429
2429
|
}
|
|
2430
2430
|
}
|
|
2431
2431
|
};
|
|
2432
|
-
|
|
2432
|
+
_e.procedure_def_v1 = $i;
|
|
2433
2433
|
const ji = T.xml, Wi = {
|
|
2434
2434
|
init: function() {
|
|
2435
2435
|
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}");
|
|
@@ -2486,7 +2486,7 @@ const ji = T.xml, Wi = {
|
|
|
2486
2486
|
e.type === "procedure_def_v1" || e.type === "func_entry_v1" ? this.setWarningText(null) : this.setWarningText("the block can only be used in procedure block");
|
|
2487
2487
|
}
|
|
2488
2488
|
};
|
|
2489
|
-
|
|
2489
|
+
_e.procedure_return_v1 = Wi;
|
|
2490
2490
|
a.forBlock.procedure_return_v1 = function(e) {
|
|
2491
2491
|
const o = e;
|
|
2492
2492
|
return o.withReturn ? `return ${a.valueToCode(o, "VALUE", c.NONE) || "null"};
|
|
@@ -2518,9 +2518,9 @@ const Ji = /^\s*'([^']|\\')*'\s*$/;
|
|
|
2518
2518
|
function Ot(e) {
|
|
2519
2519
|
return Ji.test(e) ? [e, c.ATOMIC] : [`String(${e})`, c.FUNCTION_CALL];
|
|
2520
2520
|
}
|
|
2521
|
-
|
|
2521
|
+
U.register(
|
|
2522
2522
|
"text_append_tooltip_v1",
|
|
2523
|
-
|
|
2523
|
+
U.buildTooltipWithFieldText(
|
|
2524
2524
|
"%{BKY_TEXT_V1_APPEND_TOOLTIP}",
|
|
2525
2525
|
"VAR"
|
|
2526
2526
|
)
|
|
@@ -2799,7 +2799,7 @@ const zi = T.xml, qi = {
|
|
|
2799
2799
|
}, Qi = function() {
|
|
2800
2800
|
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new wt.MutatorIcon(["text_join_item_v1"], this));
|
|
2801
2801
|
};
|
|
2802
|
-
|
|
2802
|
+
U.registerMutator(
|
|
2803
2803
|
"text_join_mutator_v1",
|
|
2804
2804
|
qi,
|
|
2805
2805
|
Qi
|
|
@@ -3060,7 +3060,7 @@ const Zi = {
|
|
|
3060
3060
|
));
|
|
3061
3061
|
}
|
|
3062
3062
|
};
|
|
3063
|
-
|
|
3063
|
+
_e.create_timer_v1 = Zi;
|
|
3064
3064
|
a.forBlock.create_timer_v1 = function(e) {
|
|
3065
3065
|
const o = a.valueToCode(e, "INTERVAL", c.ATOMIC) || "1000", t = a.valueToCode(e, "LOOP", c.ATOMIC) || "false", n = a.valueToCode(e, "COUNT", c.ATOMIC) || "1", i = a.valueToCode(e, "IMMEDIATE", c.ATOMIC) || "false", r = a.statementToCode(e, "CALLBACK");
|
|
3066
3066
|
return `__createTimerV1__(${o}, ${t}, ${n}, ${i}, function() {
|
|
@@ -3095,11 +3095,11 @@ const er = {
|
|
|
3095
3095
|
if (this.isInFlyout) {
|
|
3096
3096
|
if (this.type === "variables_get_v1" || this.type === "variables_get_v1_reporter") {
|
|
3097
3097
|
const o = {
|
|
3098
|
-
text:
|
|
3098
|
+
text: J.RENAME_VARIABLE,
|
|
3099
3099
|
enabled: !0,
|
|
3100
3100
|
callback: tr(this)
|
|
3101
3101
|
}, t = this.getField("VAR").getText(), n = {
|
|
3102
|
-
text:
|
|
3102
|
+
text: J.DELETE_VARIABLE.replace("%1", t),
|
|
3103
3103
|
enabled: !0,
|
|
3104
3104
|
callback: or(this)
|
|
3105
3105
|
};
|
|
@@ -3107,7 +3107,7 @@ const er = {
|
|
|
3107
3107
|
}
|
|
3108
3108
|
} else {
|
|
3109
3109
|
let o, t;
|
|
3110
|
-
this.type === "variables_get_v1" ? (o = "variables_set_v1", t =
|
|
3110
|
+
this.type === "variables_get_v1" ? (o = "variables_set_v1", t = J.VARIABLE_V1_GET_CREATE_SET) : this.type === "variables_set_v1" ? (o = "variables_get_v1", t = J.VARIABLE_V1_SET_CREATE_GET) : console.assert(!1);
|
|
3111
3111
|
const n = this.getField("VAR"), i = {
|
|
3112
3112
|
type: o,
|
|
3113
3113
|
fields: { VAR: n.saveState(!0) }
|
|
@@ -3130,7 +3130,7 @@ const er = {
|
|
|
3130
3130
|
o.deleteVariableById(n.getId()), o.refreshToolboxSelection();
|
|
3131
3131
|
};
|
|
3132
3132
|
};
|
|
3133
|
-
|
|
3133
|
+
U.registerMixin(
|
|
3134
3134
|
"context_menu_variable_v1",
|
|
3135
3135
|
er
|
|
3136
3136
|
);
|
|
@@ -3193,7 +3193,7 @@ function nr() {
|
|
|
3193
3193
|
const e = [];
|
|
3194
3194
|
{
|
|
3195
3195
|
const o = Ro.createElement("label");
|
|
3196
|
-
o.setAttribute("text",
|
|
3196
|
+
o.setAttribute("text", J.LABEL_ASSET_LAYER), e.push(o);
|
|
3197
3197
|
}
|
|
3198
3198
|
{
|
|
3199
3199
|
const o = Ro.createElement("block");
|
|
@@ -3218,7 +3218,7 @@ function ir() {
|
|
|
3218
3218
|
const t = et.createElement("field");
|
|
3219
3219
|
t.setAttribute("name", "NAME");
|
|
3220
3220
|
const n = et.createTextNode(
|
|
3221
|
-
|
|
3221
|
+
J.PROCEDURE_DEFAULT_NAME
|
|
3222
3222
|
);
|
|
3223
3223
|
t.appendChild(n), o.appendChild(t);
|
|
3224
3224
|
}
|
|
@@ -3230,7 +3230,7 @@ function ir() {
|
|
|
3230
3230
|
}
|
|
3231
3231
|
return e;
|
|
3232
3232
|
}
|
|
3233
|
-
const
|
|
3233
|
+
const ce = {
|
|
3234
3234
|
name: "PROCEDURE_CATEGORY",
|
|
3235
3235
|
callback: ir
|
|
3236
3236
|
};
|
|
@@ -3282,7 +3282,7 @@ function ar(e) {
|
|
|
3282
3282
|
t.sort(Jn.compareByName);
|
|
3283
3283
|
{
|
|
3284
3284
|
const n = ht.createElement("label");
|
|
3285
|
-
n.setAttribute("text",
|
|
3285
|
+
n.setAttribute("text", J.LABEL_CREATED), o.push(n);
|
|
3286
3286
|
}
|
|
3287
3287
|
return t.forEach((n) => {
|
|
3288
3288
|
{
|
|
@@ -3295,7 +3295,7 @@ function ar(e) {
|
|
|
3295
3295
|
}
|
|
3296
3296
|
}), o;
|
|
3297
3297
|
}
|
|
3298
|
-
const
|
|
3298
|
+
const ue = {
|
|
3299
3299
|
name: "VARIABLE_CATEGORY",
|
|
3300
3300
|
callback: ar
|
|
3301
3301
|
};
|
|
@@ -3356,18 +3356,18 @@ class sr {
|
|
|
3356
3356
|
contextMenu: !0,
|
|
3357
3357
|
shortcut: !0
|
|
3358
3358
|
}) {
|
|
3359
|
-
o && (this.blockCopyToStorageContextMenu(), this.blockPasteFromStorageContextMenu()), t && (
|
|
3359
|
+
o && (this.blockCopyToStorageContextMenu(), this.blockPasteFromStorageContextMenu()), t && (Q.registry.unregister(
|
|
3360
3360
|
Jt.names.COPY
|
|
3361
|
-
),
|
|
3361
|
+
), Q.registry.unregister(
|
|
3362
3362
|
Jt.names.CUT
|
|
3363
|
-
),
|
|
3363
|
+
), Q.registry.unregister(
|
|
3364
3364
|
Jt.names.PASTE
|
|
3365
3365
|
), this.blockCopyToStorageShortcut(), this.blockCutToStorageShortcut(), this.blockPasteFromStorageShortcut());
|
|
3366
3366
|
}
|
|
3367
3367
|
blockCopyToStorageContextMenu() {
|
|
3368
3368
|
const o = {
|
|
3369
3369
|
displayText: function() {
|
|
3370
|
-
return
|
|
3370
|
+
return J.CROSS_TAB_COPY ? J.CROSS_TAB_COPY : "Copy";
|
|
3371
3371
|
},
|
|
3372
3372
|
preconditionFn: function() {
|
|
3373
3373
|
const t = He();
|
|
@@ -3389,7 +3389,7 @@ class sr {
|
|
|
3389
3389
|
blockPasteFromStorageContextMenu() {
|
|
3390
3390
|
const o = {
|
|
3391
3391
|
displayText: function() {
|
|
3392
|
-
return
|
|
3392
|
+
return J.CROSS_TAB_PASTE ? J.CROSS_TAB_PASTE : "Paste";
|
|
3393
3393
|
},
|
|
3394
3394
|
preconditionFn: function(t) {
|
|
3395
3395
|
var r;
|
|
@@ -3413,13 +3413,13 @@ class sr {
|
|
|
3413
3413
|
Pe.registry.register(o);
|
|
3414
3414
|
}
|
|
3415
3415
|
blockCopyToStorageShortcut() {
|
|
3416
|
-
const o =
|
|
3416
|
+
const o = Q.registry.createSerializedKey(
|
|
3417
3417
|
T.KeyCodes.C,
|
|
3418
3418
|
[T.KeyCodes.CTRL]
|
|
3419
|
-
), t =
|
|
3419
|
+
), t = Q.registry.createSerializedKey(
|
|
3420
3420
|
T.KeyCodes.C,
|
|
3421
3421
|
[T.KeyCodes.ALT]
|
|
3422
|
-
), n =
|
|
3422
|
+
), n = Q.registry.createSerializedKey(
|
|
3423
3423
|
T.KeyCodes.C,
|
|
3424
3424
|
[T.KeyCodes.META]
|
|
3425
3425
|
), i = {
|
|
@@ -3440,16 +3440,16 @@ class sr {
|
|
|
3440
3440
|
},
|
|
3441
3441
|
keyCodes: [o, t, n]
|
|
3442
3442
|
};
|
|
3443
|
-
|
|
3443
|
+
Q.registry.register(i);
|
|
3444
3444
|
}
|
|
3445
3445
|
blockCutToStorageShortcut() {
|
|
3446
|
-
const o =
|
|
3446
|
+
const o = Q.registry.createSerializedKey(
|
|
3447
3447
|
T.KeyCodes.X,
|
|
3448
3448
|
[T.KeyCodes.CTRL]
|
|
3449
|
-
), t =
|
|
3449
|
+
), t = Q.registry.createSerializedKey(
|
|
3450
3450
|
T.KeyCodes.X,
|
|
3451
3451
|
[T.KeyCodes.ALT]
|
|
3452
|
-
), n =
|
|
3452
|
+
), n = Q.registry.createSerializedKey(
|
|
3453
3453
|
T.KeyCodes.X,
|
|
3454
3454
|
[T.KeyCodes.META]
|
|
3455
3455
|
), i = {
|
|
@@ -3470,16 +3470,16 @@ class sr {
|
|
|
3470
3470
|
},
|
|
3471
3471
|
keyCodes: [o, t, n]
|
|
3472
3472
|
};
|
|
3473
|
-
|
|
3473
|
+
Q.registry.register(i);
|
|
3474
3474
|
}
|
|
3475
3475
|
blockPasteFromStorageShortcut() {
|
|
3476
|
-
const o =
|
|
3476
|
+
const o = Q.registry.createSerializedKey(
|
|
3477
3477
|
T.KeyCodes.V,
|
|
3478
3478
|
[T.KeyCodes.CTRL]
|
|
3479
|
-
), t =
|
|
3479
|
+
), t = Q.registry.createSerializedKey(
|
|
3480
3480
|
T.KeyCodes.V,
|
|
3481
3481
|
[T.KeyCodes.ALT]
|
|
3482
|
-
), n =
|
|
3482
|
+
), n = Q.registry.createSerializedKey(
|
|
3483
3483
|
T.KeyCodes.V,
|
|
3484
3484
|
[T.KeyCodes.META]
|
|
3485
3485
|
), i = {
|
|
@@ -3503,7 +3503,7 @@ class sr {
|
|
|
3503
3503
|
},
|
|
3504
3504
|
keyCodes: [o, t, n]
|
|
3505
3505
|
};
|
|
3506
|
-
|
|
3506
|
+
Q.registry.register(i);
|
|
3507
3507
|
}
|
|
3508
3508
|
}
|
|
3509
3509
|
class cr {
|
|
@@ -5246,13 +5246,13 @@ const Yt = {
|
|
|
5246
5246
|
kind: "category",
|
|
5247
5247
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
5248
5248
|
categorystyle: "variable_category",
|
|
5249
|
-
custom:
|
|
5249
|
+
custom: ue.name
|
|
5250
5250
|
},
|
|
5251
5251
|
{
|
|
5252
5252
|
kind: "category",
|
|
5253
5253
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
5254
5254
|
categorystyle: "procedure_category",
|
|
5255
|
-
custom:
|
|
5255
|
+
custom: ce.name
|
|
5256
5256
|
},
|
|
5257
5257
|
{
|
|
5258
5258
|
kind: "category",
|
|
@@ -5275,13 +5275,13 @@ const Yt = {
|
|
|
5275
5275
|
kind: "category",
|
|
5276
5276
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
5277
5277
|
categorystyle: "variable_category",
|
|
5278
|
-
custom:
|
|
5278
|
+
custom: ue.name
|
|
5279
5279
|
},
|
|
5280
5280
|
{
|
|
5281
5281
|
kind: "category",
|
|
5282
5282
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
5283
5283
|
categorystyle: "procedure_category",
|
|
5284
|
-
custom:
|
|
5284
|
+
custom: ce.name
|
|
5285
5285
|
}
|
|
5286
5286
|
]
|
|
5287
5287
|
}, vr = {
|
|
@@ -5298,13 +5298,13 @@ const Yt = {
|
|
|
5298
5298
|
kind: "category",
|
|
5299
5299
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
5300
5300
|
categorystyle: "variable_category",
|
|
5301
|
-
custom:
|
|
5301
|
+
custom: ue.name
|
|
5302
5302
|
},
|
|
5303
5303
|
{
|
|
5304
5304
|
kind: "category",
|
|
5305
5305
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
5306
5306
|
categorystyle: "procedure_category",
|
|
5307
|
-
custom:
|
|
5307
|
+
custom: ce.name
|
|
5308
5308
|
}
|
|
5309
5309
|
]
|
|
5310
5310
|
}, yr = {
|
|
@@ -5328,13 +5328,13 @@ const Yt = {
|
|
|
5328
5328
|
kind: "category",
|
|
5329
5329
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
5330
5330
|
categorystyle: "variable_category",
|
|
5331
|
-
custom:
|
|
5331
|
+
custom: ue.name
|
|
5332
5332
|
},
|
|
5333
5333
|
{
|
|
5334
5334
|
kind: "category",
|
|
5335
5335
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
5336
5336
|
categorystyle: "procedure_category",
|
|
5337
|
-
custom:
|
|
5337
|
+
custom: ce.name
|
|
5338
5338
|
},
|
|
5339
5339
|
{
|
|
5340
5340
|
kind: "category",
|
|
@@ -5358,12 +5358,12 @@ const Yt = {
|
|
|
5358
5358
|
}), Nt(() => {
|
|
5359
5359
|
me.off("cleanWorkspace", t);
|
|
5360
5360
|
}), (n, i) => {
|
|
5361
|
-
const r =
|
|
5362
|
-
return
|
|
5361
|
+
const r = ne("v-btn"), l = ne("v-tooltip");
|
|
5362
|
+
return W(), Se(l, {
|
|
5363
5363
|
text: N(o)("x-block-lib.tip.hotkeyCtrlQ")
|
|
5364
5364
|
}, {
|
|
5365
5365
|
activator: Je(({ props: s }) => [
|
|
5366
|
-
|
|
5366
|
+
ie(r, mo(s, {
|
|
5367
5367
|
class: "mr-3",
|
|
5368
5368
|
variant: "outlined",
|
|
5369
5369
|
density: "comfortable",
|
|
@@ -5385,12 +5385,12 @@ const Yt = {
|
|
|
5385
5385
|
setup(e) {
|
|
5386
5386
|
const { t: o } = Ut(), t = co(e, "modelValue");
|
|
5387
5387
|
return (n, i) => {
|
|
5388
|
-
const r =
|
|
5389
|
-
return
|
|
5388
|
+
const r = ne("v-btn"), l = ne("v-tooltip");
|
|
5389
|
+
return W(), Se(l, {
|
|
5390
5390
|
text: N(o)("x-block-lib.tip.hotkeyCtrlW")
|
|
5391
5391
|
}, {
|
|
5392
5392
|
activator: Je(({ props: s }) => [
|
|
5393
|
-
|
|
5393
|
+
ie(r, mo(s, {
|
|
5394
5394
|
class: "mr-3",
|
|
5395
5395
|
variant: "outlined",
|
|
5396
5396
|
density: "comfortable",
|
|
@@ -5589,7 +5589,7 @@ function Bt(e, o) {
|
|
|
5589
5589
|
function Kr(e) {
|
|
5590
5590
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
5591
5591
|
}
|
|
5592
|
-
function
|
|
5592
|
+
function fe(e, o, t, n) {
|
|
5593
5593
|
if (e) {
|
|
5594
5594
|
t = t || document;
|
|
5595
5595
|
do {
|
|
@@ -5602,7 +5602,7 @@ function he(e, o, t, n) {
|
|
|
5602
5602
|
return null;
|
|
5603
5603
|
}
|
|
5604
5604
|
var Ho = /\s+/g;
|
|
5605
|
-
function
|
|
5605
|
+
function te(e, o, t) {
|
|
5606
5606
|
if (e && o)
|
|
5607
5607
|
if (e.classList)
|
|
5608
5608
|
e.classList[t ? "add" : "remove"](o);
|
|
@@ -5657,8 +5657,8 @@ function H(e, o, t, n, i) {
|
|
|
5657
5657
|
}
|
|
5658
5658
|
while (i = i.parentNode);
|
|
5659
5659
|
if (n && e !== window) {
|
|
5660
|
-
var h = ze(i || e), A = h && h.a,
|
|
5661
|
-
h && (l /=
|
|
5660
|
+
var h = ze(i || e), A = h && h.a, O = h && h.d;
|
|
5661
|
+
h && (l /= O, s /= A, _ /= A, d /= O, u = l + d, p = s + _);
|
|
5662
5662
|
}
|
|
5663
5663
|
return {
|
|
5664
5664
|
top: l,
|
|
@@ -5683,7 +5683,7 @@ function Go(e, o, t) {
|
|
|
5683
5683
|
}
|
|
5684
5684
|
function Qe(e, o, t, n) {
|
|
5685
5685
|
for (var i = 0, r = 0, l = e.children; r < l.length; ) {
|
|
5686
|
-
if (l[r].style.display !== "none" && l[r] !== y.ghost && (n || l[r] !== y.dragged) &&
|
|
5686
|
+
if (l[r].style.display !== "none" && l[r] !== y.ghost && (n || l[r] !== y.dragged) && fe(l[r], t.draggable, e, !1)) {
|
|
5687
5687
|
if (i === o)
|
|
5688
5688
|
return l[r];
|
|
5689
5689
|
i++;
|
|
@@ -5697,7 +5697,7 @@ function Oo(e, o) {
|
|
|
5697
5697
|
t = t.previousElementSibling;
|
|
5698
5698
|
return t || null;
|
|
5699
5699
|
}
|
|
5700
|
-
function
|
|
5700
|
+
function se(e, o) {
|
|
5701
5701
|
var t = 0;
|
|
5702
5702
|
if (!e || !e.parentNode)
|
|
5703
5703
|
return -1;
|
|
@@ -5775,13 +5775,13 @@ function In(e, o, t) {
|
|
|
5775
5775
|
var n = {};
|
|
5776
5776
|
return Array.from(e.children).forEach(function(i) {
|
|
5777
5777
|
var r, l, s, u;
|
|
5778
|
-
if (!(!
|
|
5778
|
+
if (!(!fe(i, o.draggable, e, !1) || i.animated || i === t)) {
|
|
5779
5779
|
var p = H(i);
|
|
5780
5780
|
n.left = Math.min((r = n.left) !== null && r !== void 0 ? r : 1 / 0, p.left), n.top = Math.min((l = n.top) !== null && l !== void 0 ? l : 1 / 0, p.top), n.right = Math.max((s = n.right) !== null && s !== void 0 ? s : -1 / 0, p.right), n.bottom = Math.max((u = n.bottom) !== null && u !== void 0 ? u : -1 / 0, p.bottom);
|
|
5781
5781
|
}
|
|
5782
5782
|
}), n.width = n.right - n.left, n.height = n.bottom - n.top, n.x = n.left, n.y = n.top, n;
|
|
5783
5783
|
}
|
|
5784
|
-
var
|
|
5784
|
+
var re = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
5785
5785
|
function Xr() {
|
|
5786
5786
|
var e = [], o;
|
|
5787
5787
|
return {
|
|
@@ -5900,16 +5900,16 @@ var Ke = [], to = {
|
|
|
5900
5900
|
};
|
|
5901
5901
|
function Wr(e) {
|
|
5902
5902
|
var o = e.sortable, t = e.rootEl, n = e.name, i = e.targetEl, r = e.cloneEl, l = e.toEl, s = e.fromEl, u = e.oldIndex, p = e.newIndex, d = e.oldDraggableIndex, _ = e.newDraggableIndex, g = e.originalEvent, h = e.putSortable, A = e.extraEventProperties;
|
|
5903
|
-
if (o = o || t && t[
|
|
5904
|
-
var
|
|
5905
|
-
window.CustomEvent && !Ae && !ct ?
|
|
5903
|
+
if (o = o || t && t[re], !!o) {
|
|
5904
|
+
var O, X = o.options, S = "on" + n.charAt(0).toUpperCase() + n.substr(1);
|
|
5905
|
+
window.CustomEvent && !Ae && !ct ? O = new CustomEvent(n, {
|
|
5906
5906
|
bubbles: !0,
|
|
5907
5907
|
cancelable: !0
|
|
5908
|
-
}) : (
|
|
5909
|
-
var
|
|
5910
|
-
for (var V in
|
|
5911
|
-
|
|
5912
|
-
t && t.dispatchEvent(
|
|
5908
|
+
}) : (O = document.createEvent("Event"), O.initEvent(n, !0, !0)), O.to = l || t, O.from = s || t, O.item = i || t, O.clone = r, O.oldIndex = u, O.newIndex = p, O.oldDraggableIndex = d, O.newDraggableIndex = _, O.originalEvent = g, O.pullMode = h ? h.lastPutMode : void 0;
|
|
5909
|
+
var $ = Ee(Ee({}, A), ut.getEventProperties(n, o));
|
|
5910
|
+
for (var V in $)
|
|
5911
|
+
O[V] = $[V];
|
|
5912
|
+
t && t.dispatchEvent(O), X[S] && X[S].call(o, O);
|
|
5913
5913
|
}
|
|
5914
5914
|
}
|
|
5915
5915
|
var Jr = ["evt"], ee = function(e, o) {
|
|
@@ -5924,12 +5924,12 @@ var Jr = ["evt"], ee = function(e, o) {
|
|
|
5924
5924
|
cloneEl: x,
|
|
5925
5925
|
cloneHidden: ke,
|
|
5926
5926
|
dragStarted: tt,
|
|
5927
|
-
putSortable:
|
|
5927
|
+
putSortable: j,
|
|
5928
5928
|
activeSortable: y.active,
|
|
5929
5929
|
originalEvent: n,
|
|
5930
5930
|
oldIndex: We,
|
|
5931
5931
|
oldDraggableIndex: lt,
|
|
5932
|
-
newIndex:
|
|
5932
|
+
newIndex: oe,
|
|
5933
5933
|
newDraggableIndex: Le,
|
|
5934
5934
|
hideGhostForTarget: kn,
|
|
5935
5935
|
unhideGhostForTarget: Nn,
|
|
@@ -5940,7 +5940,7 @@ var Jr = ["evt"], ee = function(e, o) {
|
|
|
5940
5940
|
ke = !1;
|
|
5941
5941
|
},
|
|
5942
5942
|
dispatchSortableEvent: function(r) {
|
|
5943
|
-
|
|
5943
|
+
Z({
|
|
5944
5944
|
sortable: o,
|
|
5945
5945
|
name: r,
|
|
5946
5946
|
originalEvent: n
|
|
@@ -5948,19 +5948,19 @@ var Jr = ["evt"], ee = function(e, o) {
|
|
|
5948
5948
|
}
|
|
5949
5949
|
}, i));
|
|
5950
5950
|
};
|
|
5951
|
-
function
|
|
5951
|
+
function Z(e) {
|
|
5952
5952
|
Wr(Ee({
|
|
5953
|
-
putSortable:
|
|
5953
|
+
putSortable: j,
|
|
5954
5954
|
cloneEl: x,
|
|
5955
5955
|
targetEl: f,
|
|
5956
5956
|
rootEl: D,
|
|
5957
5957
|
oldIndex: We,
|
|
5958
5958
|
oldDraggableIndex: lt,
|
|
5959
|
-
newIndex:
|
|
5959
|
+
newIndex: oe,
|
|
5960
5960
|
newDraggableIndex: Le
|
|
5961
5961
|
}, e));
|
|
5962
5962
|
}
|
|
5963
|
-
var f, w, I, D, Me, Ct, x, ke, We,
|
|
5963
|
+
var f, w, I, D, Me, Ct, x, ke, We, oe, lt, Le, Tt, j, Ge = !1, Rt = !1, Mt = [], Be, de, oo, no, $o, jo, tt, Fe, at, st = !1, mt = !1, At, z, io = [], _o = !1, Dt = [], jt = typeof document < "u", gt = mn, Wo = ct || Ae ? "cssFloat" : "float", zr = jt && !gn && !mn && "draggable" in document.createElement("div"), Cn = function() {
|
|
5964
5964
|
if (jt) {
|
|
5965
5965
|
if (Ae)
|
|
5966
5966
|
return !1;
|
|
@@ -5984,7 +5984,7 @@ var f, w, I, D, Me, Ct, x, ke, We, ne, lt, Le, Tt, $, Ge = !1, Rt = !1, Mt = [],
|
|
|
5984
5984
|
}, Qr = function(e, o) {
|
|
5985
5985
|
var t;
|
|
5986
5986
|
return Mt.some(function(n) {
|
|
5987
|
-
var i = n[
|
|
5987
|
+
var i = n[re].options.emptyInsertThreshold;
|
|
5988
5988
|
if (!(!i || Oo(n))) {
|
|
5989
5989
|
var r = H(n), l = e >= r.left - i && e <= r.right + i, s = o >= r.top - i && o <= r.bottom + i;
|
|
5990
5990
|
if (l && s)
|
|
@@ -6028,16 +6028,16 @@ var Re = function(e) {
|
|
|
6028
6028
|
var t = {};
|
|
6029
6029
|
for (var n in e)
|
|
6030
6030
|
e.hasOwnProperty(n) && (t[n] = e[n]);
|
|
6031
|
-
t.target = t.rootEl = o, t.preventDefault = void 0, t.stopPropagation = void 0, o[
|
|
6031
|
+
t.target = t.rootEl = o, t.preventDefault = void 0, t.stopPropagation = void 0, o[re]._onDragOver(t);
|
|
6032
6032
|
}
|
|
6033
6033
|
}
|
|
6034
6034
|
}, Zr = function(e) {
|
|
6035
|
-
f && f.parentNode[
|
|
6035
|
+
f && f.parentNode[re]._isOutsideThisEl(e.target);
|
|
6036
6036
|
};
|
|
6037
6037
|
function y(e, o) {
|
|
6038
6038
|
if (!(e && e.nodeType && e.nodeType === 1))
|
|
6039
6039
|
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));
|
|
6040
|
-
this.el = e, this.options = o = Ce({}, o), e[
|
|
6040
|
+
this.el = e, this.options = o = Ce({}, o), e[re] = this;
|
|
6041
6041
|
var t = {
|
|
6042
6042
|
group: null,
|
|
6043
6043
|
sort: !0,
|
|
@@ -6103,10 +6103,10 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6103
6103
|
_onTapStart: function(e) {
|
|
6104
6104
|
if (e.cancelable) {
|
|
6105
6105
|
var o = this, t = this.el, n = this.options, i = n.preventOnFilter, r = e.type, l = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (l || e).target, u = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, p = n.filter;
|
|
6106
|
-
if (al(t), !f && !(/mousedown|pointerdown/.test(r) && e.button !== 0 || n.disabled) && !u.isContentEditable && !(!this.nativeDraggable && it && s && s.tagName.toUpperCase() === "SELECT") && (s =
|
|
6107
|
-
if (We =
|
|
6106
|
+
if (al(t), !f && !(/mousedown|pointerdown/.test(r) && e.button !== 0 || n.disabled) && !u.isContentEditable && !(!this.nativeDraggable && it && s && s.tagName.toUpperCase() === "SELECT") && (s = fe(s, n.draggable, t, !1), !(s && s.animated) && Ct !== s)) {
|
|
6107
|
+
if (We = se(s), lt = se(s, n.draggable), typeof p == "function") {
|
|
6108
6108
|
if (p.call(this, e, s, this)) {
|
|
6109
|
-
|
|
6109
|
+
Z({
|
|
6110
6110
|
sortable: o,
|
|
6111
6111
|
rootEl: u,
|
|
6112
6112
|
name: "filter",
|
|
@@ -6119,8 +6119,8 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6119
6119
|
return;
|
|
6120
6120
|
}
|
|
6121
6121
|
} else if (p && (p = p.split(",").some(function(d) {
|
|
6122
|
-
if (d =
|
|
6123
|
-
return
|
|
6122
|
+
if (d = fe(u, d.trim(), t, !1), d)
|
|
6123
|
+
return Z({
|
|
6124
6124
|
sortable: o,
|
|
6125
6125
|
rootEl: d,
|
|
6126
6126
|
name: "filter",
|
|
@@ -6134,7 +6134,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6134
6134
|
i && e.cancelable && e.preventDefault();
|
|
6135
6135
|
return;
|
|
6136
6136
|
}
|
|
6137
|
-
n.handle && !
|
|
6137
|
+
n.handle && !fe(u, n.handle, t, !1) || this._prepareDragStart(e, l, s);
|
|
6138
6138
|
}
|
|
6139
6139
|
}
|
|
6140
6140
|
},
|
|
@@ -6153,11 +6153,11 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6153
6153
|
n._onDrop();
|
|
6154
6154
|
return;
|
|
6155
6155
|
}
|
|
6156
|
-
n._disableDelayedDragEvents(), !Fo && n.nativeDraggable && (f.draggable = !0), n._triggerDragStart(e, o),
|
|
6156
|
+
n._disableDelayedDragEvents(), !Fo && n.nativeDraggable && (f.draggable = !0), n._triggerDragStart(e, o), Z({
|
|
6157
6157
|
sortable: n,
|
|
6158
6158
|
name: "choose",
|
|
6159
6159
|
originalEvent: e
|
|
6160
|
-
}),
|
|
6160
|
+
}), te(f, r.chosenClass, !0);
|
|
6161
6161
|
}, r.ignore.split(",").forEach(function(p) {
|
|
6162
6162
|
vn(f, p.trim(), ro);
|
|
6163
6163
|
}), k(l, "dragover", Re), k(l, "mousemove", Re), k(l, "touchmove", Re), k(l, "mouseup", n._onDrop), k(l, "touchend", n._onDrop), k(l, "touchcancel", n._onDrop), Fo && this.nativeDraggable && (this.options.touchStartThreshold = 4, f.draggable = !0), ee("delayStart", this, {
|
|
@@ -6198,7 +6198,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6198
6198
|
evt: o
|
|
6199
6199
|
}), this.nativeDraggable && k(document, "dragover", Zr);
|
|
6200
6200
|
var t = this.options;
|
|
6201
|
-
!e &&
|
|
6201
|
+
!e && te(f, t.dragClass, !1), te(f, t.ghostClass, !0), y.active = this, e && this._appendGhost(), Z({
|
|
6202
6202
|
sortable: this,
|
|
6203
6203
|
name: "start",
|
|
6204
6204
|
originalEvent: o
|
|
@@ -6207,17 +6207,17 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6207
6207
|
this._nulling();
|
|
6208
6208
|
},
|
|
6209
6209
|
_emulateDragOver: function() {
|
|
6210
|
-
if (
|
|
6211
|
-
this._lastX =
|
|
6212
|
-
for (var e = document.elementFromPoint(
|
|
6210
|
+
if (de) {
|
|
6211
|
+
this._lastX = de.clientX, this._lastY = de.clientY, kn();
|
|
6212
|
+
for (var e = document.elementFromPoint(de.clientX, de.clientY), o = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(de.clientX, de.clientY), e !== o); )
|
|
6213
6213
|
o = e;
|
|
6214
|
-
if (f.parentNode[
|
|
6214
|
+
if (f.parentNode[re]._isOutsideThisEl(e), o)
|
|
6215
6215
|
do {
|
|
6216
|
-
if (o[
|
|
6216
|
+
if (o[re]) {
|
|
6217
6217
|
var t = void 0;
|
|
6218
|
-
if (t = o[
|
|
6219
|
-
clientX:
|
|
6220
|
-
clientY:
|
|
6218
|
+
if (t = o[re]._onDragOver({
|
|
6219
|
+
clientX: de.clientX,
|
|
6220
|
+
clientY: de.clientY,
|
|
6221
6221
|
target: e,
|
|
6222
6222
|
rootEl: o
|
|
6223
6223
|
}), t && !this.options.dragoverBubble)
|
|
@@ -6230,7 +6230,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6230
6230
|
},
|
|
6231
6231
|
_onTouchMove: function(e) {
|
|
6232
6232
|
if (Be) {
|
|
6233
|
-
var o = this.options, t = o.fallbackTolerance, n = o.fallbackOffset, i = e.touches ? e.touches[0] : e, r = I && ze(I, !0), l = I && r && r.a, s = I && r && r.d, u = gt &&
|
|
6233
|
+
var o = this.options, t = o.fallbackTolerance, n = o.fallbackOffset, i = e.touches ? e.touches[0] : e, r = I && ze(I, !0), l = I && r && r.a, s = I && r && r.d, u = gt && z && Xo(z), p = (i.clientX - Be.clientX + n.x) / (l || 1) + (u ? u[0] - io[0] : 0) / (l || 1), d = (i.clientY - Be.clientY + n.y) / (s || 1) + (u ? u[1] - io[1] : 0) / (s || 1);
|
|
6234
6234
|
if (!y.active && !Ge) {
|
|
6235
6235
|
if (t && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < t)
|
|
6236
6236
|
return;
|
|
@@ -6246,7 +6246,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6246
6246
|
f: d
|
|
6247
6247
|
};
|
|
6248
6248
|
var _ = "matrix(".concat(r.a, ",").concat(r.b, ",").concat(r.c, ",").concat(r.d, ",").concat(r.e, ",").concat(r.f, ")");
|
|
6249
|
-
v(I, "webkitTransform", _), v(I, "mozTransform", _), v(I, "msTransform", _), v(I, "transform", _), oo = p, no = d,
|
|
6249
|
+
v(I, "webkitTransform", _), v(I, "mozTransform", _), v(I, "msTransform", _), v(I, "transform", _), oo = p, no = d, de = i;
|
|
6250
6250
|
}
|
|
6251
6251
|
e.cancelable && e.preventDefault();
|
|
6252
6252
|
}
|
|
@@ -6255,11 +6255,11 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6255
6255
|
if (!I) {
|
|
6256
6256
|
var e = this.options.fallbackOnBody ? document.body : D, o = H(f, !0, gt, !0, e), t = this.options;
|
|
6257
6257
|
if (gt) {
|
|
6258
|
-
for (
|
|
6259
|
-
|
|
6260
|
-
|
|
6258
|
+
for (z = e; v(z, "position") === "static" && v(z, "transform") === "none" && z !== document; )
|
|
6259
|
+
z = z.parentNode;
|
|
6260
|
+
z !== document.body && z !== document.documentElement ? (z === document && (z = ge()), o.top += z.scrollTop, o.left += z.scrollLeft) : z = ge(), io = Xo(z);
|
|
6261
6261
|
}
|
|
6262
|
-
I = f.cloneNode(!0),
|
|
6262
|
+
I = f.cloneNode(!0), te(I, t.ghostClass, !1), te(I, t.fallbackClass, !0), te(I, t.dragClass, !0), v(I, "transition", ""), v(I, "transform", ""), v(I, "box-sizing", "border-box"), v(I, "margin", 0), v(I, "top", o.top), v(I, "left", o.left), v(I, "width", o.width), v(I, "height", o.height), v(I, "opacity", "0.8"), v(I, "position", gt ? "absolute" : "fixed"), v(I, "zIndex", "100000"), v(I, "pointerEvents", "none"), y.ghost = I, e.appendChild(I), v(I, "transform-origin", $o / parseInt(I.style.width) * 100 + "% " + jo / parseInt(I.style.height) * 100 + "%");
|
|
6263
6263
|
}
|
|
6264
6264
|
},
|
|
6265
6265
|
_onDragStart: function(e, o) {
|
|
@@ -6270,19 +6270,19 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6270
6270
|
this._onDrop();
|
|
6271
6271
|
return;
|
|
6272
6272
|
}
|
|
6273
|
-
ee("setupClone", this), y.eventCanceled || (x = On(f), x.removeAttribute("id"), x.draggable = !1, x.style["will-change"] = "", this._hideClone(),
|
|
6274
|
-
ee("clone", t), !y.eventCanceled && (t.options.removeCloneOnHide || D.insertBefore(x, f), t._hideClone(),
|
|
6273
|
+
ee("setupClone", this), y.eventCanceled || (x = On(f), x.removeAttribute("id"), x.draggable = !1, x.style["will-change"] = "", this._hideClone(), te(x, this.options.chosenClass, !1), y.clone = x), t.cloneId = Lt(function() {
|
|
6274
|
+
ee("clone", t), !y.eventCanceled && (t.options.removeCloneOnHide || D.insertBefore(x, f), t._hideClone(), Z({
|
|
6275
6275
|
sortable: t,
|
|
6276
6276
|
name: "clone"
|
|
6277
6277
|
}));
|
|
6278
|
-
}), !o &&
|
|
6278
|
+
}), !o && te(f, i.dragClass, !0), o ? (Rt = !0, t._loopId = setInterval(t._emulateDragOver, 50)) : (L(document, "mouseup", t._onDrop), L(document, "touchend", t._onDrop), L(document, "touchcancel", t._onDrop), n && (n.effectAllowed = "move", i.setData && i.setData.call(t, n, f)), k(document, "drop", t), v(f, "transform", "translateZ(0)")), Ge = !0, t._dragStartId = Lt(t._dragStarted.bind(t, o, e)), k(document, "selectstart", t), tt = !0, it && v(document.body, "user-select", "none");
|
|
6279
6279
|
},
|
|
6280
6280
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
6281
6281
|
_onDragOver: function(e) {
|
|
6282
|
-
var o = this.el, t = e.target, n, i, r, l = this.options, s = l.group, u = y.active, p = Tt === s, d = l.sort, _ =
|
|
6282
|
+
var o = this.el, t = e.target, n, i, r, l = this.options, s = l.group, u = y.active, p = Tt === s, d = l.sort, _ = j || u, g, h = this, A = !1;
|
|
6283
6283
|
if (_o)
|
|
6284
6284
|
return;
|
|
6285
|
-
function
|
|
6285
|
+
function O(ve, Wt) {
|
|
6286
6286
|
ee(ve, h, Ee({
|
|
6287
6287
|
evt: e,
|
|
6288
6288
|
isOwner: p,
|
|
@@ -6297,69 +6297,69 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6297
6297
|
onMove: function(Ao, Dn) {
|
|
6298
6298
|
return Et(D, o, f, n, Ao, H(Ao), e, Dn);
|
|
6299
6299
|
},
|
|
6300
|
-
changed:
|
|
6300
|
+
changed: $
|
|
6301
6301
|
}, Wt));
|
|
6302
6302
|
}
|
|
6303
6303
|
function X() {
|
|
6304
|
-
|
|
6304
|
+
O("dragOverAnimationCapture"), h.captureAnimationState(), h !== _ && _.captureAnimationState();
|
|
6305
6305
|
}
|
|
6306
6306
|
function S(ve) {
|
|
6307
|
-
return
|
|
6307
|
+
return O("dragOverCompleted", {
|
|
6308
6308
|
insertion: ve
|
|
6309
|
-
}), ve && (p ? u._hideClone() : u._showClone(h), h !== _ && (
|
|
6310
|
-
|
|
6311
|
-
}), h !== _ && (_.animateAll(), _._ignoreWhileAnimating = null)), (t === f && !f.animated || t === o && !t.animated) && (Fe = null), !l.dragoverBubble && !e.rootEl && t !== document && (f.parentNode[
|
|
6309
|
+
}), ve && (p ? u._hideClone() : u._showClone(h), h !== _ && (te(f, j ? j.options.ghostClass : u.options.ghostClass, !1), te(f, l.ghostClass, !0)), j !== h && h !== y.active ? j = h : h === y.active && j && (j = null), _ === h && (h._ignoreWhileAnimating = t), h.animateAll(function() {
|
|
6310
|
+
O("dragOverAnimationComplete"), h._ignoreWhileAnimating = null;
|
|
6311
|
+
}), h !== _ && (_.animateAll(), _._ignoreWhileAnimating = null)), (t === f && !f.animated || t === o && !t.animated) && (Fe = null), !l.dragoverBubble && !e.rootEl && t !== document && (f.parentNode[re]._isOutsideThisEl(e.target), !ve && Re(e)), !l.dragoverBubble && e.stopPropagation && e.stopPropagation(), A = !0;
|
|
6312
6312
|
}
|
|
6313
|
-
function
|
|
6314
|
-
|
|
6313
|
+
function $() {
|
|
6314
|
+
oe = se(f), Le = se(f, l.draggable), Z({
|
|
6315
6315
|
sortable: h,
|
|
6316
6316
|
name: "change",
|
|
6317
6317
|
toEl: o,
|
|
6318
|
-
newIndex:
|
|
6318
|
+
newIndex: oe,
|
|
6319
6319
|
newDraggableIndex: Le,
|
|
6320
6320
|
originalEvent: e
|
|
6321
6321
|
});
|
|
6322
6322
|
}
|
|
6323
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), t =
|
|
6323
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), t = fe(t, l.draggable, o, !0), O("dragOver"), y.eventCanceled)
|
|
6324
6324
|
return A;
|
|
6325
6325
|
if (f.contains(e.target) || t.animated && t.animatingX && t.animatingY || h._ignoreWhileAnimating === t)
|
|
6326
6326
|
return S(!1);
|
|
6327
|
-
if (Rt = !1, u && !l.disabled && (p ? d || (r = w !== D) :
|
|
6328
|
-
if (g = this._getDirection(e, t) === "vertical", n = H(f),
|
|
6327
|
+
if (Rt = !1, u && !l.disabled && (p ? d || (r = w !== D) : j === this || (this.lastPutMode = Tt.checkPull(this, u, f, e)) && s.checkPut(this, u, f, e))) {
|
|
6328
|
+
if (g = this._getDirection(e, t) === "vertical", n = H(f), O("dragOverValid"), y.eventCanceled)
|
|
6329
6329
|
return A;
|
|
6330
6330
|
if (r)
|
|
6331
|
-
return w = D, X(), this._hideClone(),
|
|
6331
|
+
return w = D, X(), this._hideClone(), O("revert"), y.eventCanceled || (Me ? D.insertBefore(f, Me) : D.appendChild(f)), S(!0);
|
|
6332
6332
|
var V = Oo(o, l.draggable);
|
|
6333
6333
|
if (!V || nl(e, g, this) && !V.animated) {
|
|
6334
6334
|
if (V === f)
|
|
6335
6335
|
return S(!1);
|
|
6336
6336
|
if (V && o === e.target && (t = V), t && (i = H(t)), Et(D, o, f, n, t, i, e, !!t) !== !1)
|
|
6337
|
-
return X(), V && V.nextSibling ? o.insertBefore(f, V.nextSibling) : o.appendChild(f), w = o,
|
|
6337
|
+
return X(), V && V.nextSibling ? o.insertBefore(f, V.nextSibling) : o.appendChild(f), w = o, $(), S(!0);
|
|
6338
6338
|
} else if (V && ol(e, g, this)) {
|
|
6339
|
-
var
|
|
6340
|
-
if (
|
|
6339
|
+
var ae = Qe(o, 0, l, !0);
|
|
6340
|
+
if (ae === f)
|
|
6341
6341
|
return S(!1);
|
|
6342
|
-
if (t =
|
|
6343
|
-
return X(), o.insertBefore(f,
|
|
6342
|
+
if (t = ae, i = H(t), Et(D, o, f, n, t, i, e, !1) !== !1)
|
|
6343
|
+
return X(), o.insertBefore(f, ae), w = o, $(), S(!0);
|
|
6344
6344
|
} else if (t.parentNode === o) {
|
|
6345
6345
|
i = H(t);
|
|
6346
|
-
var
|
|
6347
|
-
Fe !== t && (
|
|
6346
|
+
var Y = 0, pe, he = f.parentNode !== o, b = !qr(f.animated && f.toRect || n, t.animated && t.toRect || i, g), C = g ? "top" : "left", R = Go(t, "top", "top") || Go(f, "top", "top"), K = R ? R.scrollTop : void 0;
|
|
6347
|
+
Fe !== t && (pe = i[C], st = !1, mt = !b && l.invertSwap || he), Y = il(e, t, i, g, b ? 1 : l.swapThreshold, l.invertedSwapThreshold == null ? l.swapThreshold : l.invertedSwapThreshold, mt, Fe === t);
|
|
6348
6348
|
var B;
|
|
6349
|
-
if (
|
|
6350
|
-
var E =
|
|
6349
|
+
if (Y !== 0) {
|
|
6350
|
+
var E = se(f);
|
|
6351
6351
|
do
|
|
6352
|
-
E -=
|
|
6352
|
+
E -= Y, B = w.children[E];
|
|
6353
6353
|
while (B && (v(B, "display") === "none" || B === I));
|
|
6354
6354
|
}
|
|
6355
|
-
if (
|
|
6355
|
+
if (Y === 0 || B === t)
|
|
6356
6356
|
return S(!1);
|
|
6357
|
-
Fe = t, at =
|
|
6357
|
+
Fe = t, at = Y;
|
|
6358
6358
|
var M = t.nextElementSibling, P = !1;
|
|
6359
|
-
P =
|
|
6360
|
-
var
|
|
6361
|
-
if (
|
|
6362
|
-
return (
|
|
6359
|
+
P = Y === 1;
|
|
6360
|
+
var q = Et(D, o, f, n, t, i, e, P);
|
|
6361
|
+
if (q !== !1)
|
|
6362
|
+
return (q === 1 || q === -1) && (P = q === 1), _o = !0, setTimeout(tl, 30), X(), P && !M ? o.appendChild(f) : t.parentNode.insertBefore(f, P ? M : t), R && bn(R, 0, K - R.scrollTop), w = f.parentNode, pe !== void 0 && !mt && (At = Math.abs(pe - H(t)[C])), $(), S(!0);
|
|
6363
6363
|
}
|
|
6364
6364
|
if (o.contains(f))
|
|
6365
6365
|
return S(!1);
|
|
@@ -6376,52 +6376,52 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6376
6376
|
},
|
|
6377
6377
|
_onDrop: function(e) {
|
|
6378
6378
|
var o = this.el, t = this.options;
|
|
6379
|
-
if (
|
|
6379
|
+
if (oe = se(f), Le = se(f, t.draggable), ee("drop", this, {
|
|
6380
6380
|
evt: e
|
|
6381
|
-
}), w = f && f.parentNode,
|
|
6381
|
+
}), w = f && f.parentNode, oe = se(f), Le = se(f, t.draggable), y.eventCanceled) {
|
|
6382
6382
|
this._nulling();
|
|
6383
6383
|
return;
|
|
6384
6384
|
}
|
|
6385
|
-
Ge = !1, mt = !1, st = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), po(this.cloneId), po(this._dragStartId), this.nativeDraggable && (L(document, "drop", this), L(o, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), it && v(document.body, "user-select", ""), v(f, "transform", ""), e && (tt && (e.cancelable && e.preventDefault(), !t.dropBubble && e.stopPropagation()), I && I.parentNode && I.parentNode.removeChild(I), (D === w ||
|
|
6385
|
+
Ge = !1, mt = !1, st = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), po(this.cloneId), po(this._dragStartId), this.nativeDraggable && (L(document, "drop", this), L(o, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), it && v(document.body, "user-select", ""), v(f, "transform", ""), e && (tt && (e.cancelable && e.preventDefault(), !t.dropBubble && e.stopPropagation()), I && I.parentNode && I.parentNode.removeChild(I), (D === w || j && j.lastPutMode !== "clone") && x && x.parentNode && x.parentNode.removeChild(x), f && (this.nativeDraggable && L(f, "dragend", this), ro(f), f.style["will-change"] = "", tt && !Ge && te(f, j ? j.options.ghostClass : this.options.ghostClass, !1), te(f, this.options.chosenClass, !1), Z({
|
|
6386
6386
|
sortable: this,
|
|
6387
6387
|
name: "unchoose",
|
|
6388
6388
|
toEl: w,
|
|
6389
6389
|
newIndex: null,
|
|
6390
6390
|
newDraggableIndex: null,
|
|
6391
6391
|
originalEvent: e
|
|
6392
|
-
}), D !== w ? (
|
|
6392
|
+
}), D !== w ? (oe >= 0 && (Z({
|
|
6393
6393
|
rootEl: w,
|
|
6394
6394
|
name: "add",
|
|
6395
6395
|
toEl: w,
|
|
6396
6396
|
fromEl: D,
|
|
6397
6397
|
originalEvent: e
|
|
6398
|
-
}),
|
|
6398
|
+
}), Z({
|
|
6399
6399
|
sortable: this,
|
|
6400
6400
|
name: "remove",
|
|
6401
6401
|
toEl: w,
|
|
6402
6402
|
originalEvent: e
|
|
6403
|
-
}),
|
|
6403
|
+
}), Z({
|
|
6404
6404
|
rootEl: w,
|
|
6405
6405
|
name: "sort",
|
|
6406
6406
|
toEl: w,
|
|
6407
6407
|
fromEl: D,
|
|
6408
6408
|
originalEvent: e
|
|
6409
|
-
}),
|
|
6409
|
+
}), Z({
|
|
6410
6410
|
sortable: this,
|
|
6411
6411
|
name: "sort",
|
|
6412
6412
|
toEl: w,
|
|
6413
6413
|
originalEvent: e
|
|
6414
|
-
})),
|
|
6414
|
+
})), j && j.save()) : oe !== We && oe >= 0 && (Z({
|
|
6415
6415
|
sortable: this,
|
|
6416
6416
|
name: "update",
|
|
6417
6417
|
toEl: w,
|
|
6418
6418
|
originalEvent: e
|
|
6419
|
-
}),
|
|
6419
|
+
}), Z({
|
|
6420
6420
|
sortable: this,
|
|
6421
6421
|
name: "sort",
|
|
6422
6422
|
toEl: w,
|
|
6423
6423
|
originalEvent: e
|
|
6424
|
-
})), y.active && ((
|
|
6424
|
+
})), y.active && ((oe == null || oe === -1) && (oe = We, Le = lt), Z({
|
|
6425
6425
|
sortable: this,
|
|
6426
6426
|
name: "end",
|
|
6427
6427
|
toEl: w,
|
|
@@ -6429,7 +6429,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6429
6429
|
}), this.save()))), this._nulling();
|
|
6430
6430
|
},
|
|
6431
6431
|
_nulling: function() {
|
|
6432
|
-
ee("nulling", this), D = f = w = I = Me = x = Ct = ke = Be =
|
|
6432
|
+
ee("nulling", this), D = f = w = I = Me = x = Ct = ke = Be = de = tt = oe = Le = We = lt = Fe = at = j = Tt = y.dragged = y.ghost = y.clone = y.active = null, Dt.forEach(function(e) {
|
|
6433
6433
|
e.checked = !0;
|
|
6434
6434
|
}), Dt.length = oo = no = 0;
|
|
6435
6435
|
},
|
|
@@ -6454,7 +6454,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6454
6454
|
*/
|
|
6455
6455
|
toArray: function() {
|
|
6456
6456
|
for (var e = [], o, t = this.el.children, n = 0, i = t.length, r = this.options; n < i; n++)
|
|
6457
|
-
o = t[n],
|
|
6457
|
+
o = t[n], fe(o, r.draggable, this.el, !1) && e.push(o.getAttribute(r.dataIdAttr) || ll(o));
|
|
6458
6458
|
return e;
|
|
6459
6459
|
},
|
|
6460
6460
|
/**
|
|
@@ -6465,7 +6465,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6465
6465
|
var t = {}, n = this.el;
|
|
6466
6466
|
this.toArray().forEach(function(i, r) {
|
|
6467
6467
|
var l = n.children[r];
|
|
6468
|
-
|
|
6468
|
+
fe(l, this.options.draggable, n, !1) && (t[i] = l);
|
|
6469
6469
|
}, this), o && this.captureAnimationState(), e.forEach(function(i) {
|
|
6470
6470
|
t[i] && (n.removeChild(t[i]), n.appendChild(t[i]));
|
|
6471
6471
|
}), o && this.animateAll();
|
|
@@ -6484,7 +6484,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6484
6484
|
* @returns {HTMLElement|null}
|
|
6485
6485
|
*/
|
|
6486
6486
|
closest: function(e, o) {
|
|
6487
|
-
return
|
|
6487
|
+
return fe(e, o || this.options.draggable, this.el, !1);
|
|
6488
6488
|
},
|
|
6489
6489
|
/**
|
|
6490
6490
|
* Set/get option
|
|
@@ -6505,7 +6505,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6505
6505
|
destroy: function() {
|
|
6506
6506
|
ee("destroy", this);
|
|
6507
6507
|
var e = this.el;
|
|
6508
|
-
e[
|
|
6508
|
+
e[re] = null, L(e, "mousedown", this._onTapStart), L(e, "touchstart", this._onTapStart), L(e, "pointerdown", this._onTapStart), this.nativeDraggable && (L(e, "dragover", this), L(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(o) {
|
|
6509
6509
|
o.removeAttribute("draggable");
|
|
6510
6510
|
}), this._onDrop(), this._disableDelayedDragEvents(), Mt.splice(Mt.indexOf(this.el), 1), this.el = e = null;
|
|
6511
6511
|
},
|
|
@@ -6532,7 +6532,7 @@ function el(e) {
|
|
|
6532
6532
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
6533
6533
|
}
|
|
6534
6534
|
function Et(e, o, t, n, i, r, l, s) {
|
|
6535
|
-
var u, p = e[
|
|
6535
|
+
var u, p = e[re], d = p.options.onMove, _;
|
|
6536
6536
|
return window.CustomEvent && !Ae && !ct ? u = new CustomEvent("move", {
|
|
6537
6537
|
bubbles: !0,
|
|
6538
6538
|
cancelable: !0
|
|
@@ -6566,7 +6566,7 @@ function il(e, o, t, n, i, r, l, s) {
|
|
|
6566
6566
|
return g = g || l, g && (u < d + p * r / 2 || u > _ - p * r / 2) ? u > d + p / 2 ? 1 : -1 : 0;
|
|
6567
6567
|
}
|
|
6568
6568
|
function rl(e) {
|
|
6569
|
-
return
|
|
6569
|
+
return se(f) < se(e) ? 1 : -1;
|
|
6570
6570
|
}
|
|
6571
6571
|
function ll(e) {
|
|
6572
6572
|
for (var o = e.tagName + e.className + e.src + e.href + e.textContent, t = o.length, n = 0; t--; )
|
|
@@ -6595,21 +6595,21 @@ y.utils = {
|
|
|
6595
6595
|
css: v,
|
|
6596
6596
|
find: vn,
|
|
6597
6597
|
is: function(e, o) {
|
|
6598
|
-
return !!
|
|
6598
|
+
return !!fe(e, o, e, !1);
|
|
6599
6599
|
},
|
|
6600
6600
|
extend: Hr,
|
|
6601
6601
|
throttle: yn,
|
|
6602
|
-
closest:
|
|
6603
|
-
toggleClass:
|
|
6602
|
+
closest: fe,
|
|
6603
|
+
toggleClass: te,
|
|
6604
6604
|
clone: On,
|
|
6605
|
-
index:
|
|
6605
|
+
index: se,
|
|
6606
6606
|
nextTick: Lt,
|
|
6607
6607
|
cancelNextTick: po,
|
|
6608
6608
|
detectDirection: An,
|
|
6609
6609
|
getChild: Qe
|
|
6610
6610
|
};
|
|
6611
6611
|
y.get = function(e) {
|
|
6612
|
-
return e[
|
|
6612
|
+
return e[re];
|
|
6613
6613
|
};
|
|
6614
6614
|
y.mount = function() {
|
|
6615
6615
|
for (var e = arguments.length, o = new Array(e), t = 0; t < e; t++)
|
|
@@ -6691,16 +6691,16 @@ var so = yn(function(e, o, t, n) {
|
|
|
6691
6691
|
fo !== t && (fo = t, kt(), ot = o.scroll, d = o.scrollFn, ot === !0 && (ot = Ne(t, !0)));
|
|
6692
6692
|
var _ = 0, g = ot;
|
|
6693
6693
|
do {
|
|
6694
|
-
var h = g, A = H(h),
|
|
6695
|
-
h === u ? (
|
|
6696
|
-
var B =
|
|
6694
|
+
var h = g, A = H(h), O = A.top, X = A.bottom, S = A.left, $ = A.right, V = A.width, ae = A.height, Y = void 0, pe = void 0, he = h.scrollWidth, b = h.scrollHeight, C = v(h), R = h.scrollLeft, K = h.scrollTop;
|
|
6695
|
+
h === u ? (Y = V < he && (C.overflowX === "auto" || C.overflowX === "scroll" || C.overflowX === "visible"), pe = ae < b && (C.overflowY === "auto" || C.overflowY === "scroll" || C.overflowY === "visible")) : (Y = V < he && (C.overflowX === "auto" || C.overflowX === "scroll"), pe = ae < b && (C.overflowY === "auto" || C.overflowY === "scroll"));
|
|
6696
|
+
var B = Y && (Math.abs($ - i) <= l && R + V < he) - (Math.abs(S - i) <= l && !!R), E = pe && (Math.abs(X - r) <= l && K + ae < b) - (Math.abs(O - r) <= l && !!K);
|
|
6697
6697
|
if (!F[_])
|
|
6698
6698
|
for (var M = 0; M <= _; M++)
|
|
6699
6699
|
F[M] || (F[M] = {});
|
|
6700
6700
|
(F[_].vx != B || F[_].vy != E || F[_].el !== h) && (F[_].el = h, F[_].vx = B, F[_].vy = E, clearInterval(F[_].pid), (B != 0 || E != 0) && (p = !0, F[_].pid = setInterval((function() {
|
|
6701
6701
|
n && this.layer === 0 && y.active._onTouchMove(xt);
|
|
6702
|
-
var P = F[this.layer].vy ? F[this.layer].vy * s : 0,
|
|
6703
|
-
typeof d == "function" && d.call(y.dragged.parentNode[
|
|
6702
|
+
var P = F[this.layer].vy ? F[this.layer].vy * s : 0, q = F[this.layer].vx ? F[this.layer].vx * s : 0;
|
|
6703
|
+
typeof d == "function" && d.call(y.dragged.parentNode[re], q, P, e, xt, F[this.layer].el) !== "continue" || bn(F[this.layer].el, q, P);
|
|
6704
6704
|
}).bind({
|
|
6705
6705
|
layer: _
|
|
6706
6706
|
}), 24))), _++;
|
|
@@ -6785,26 +6785,26 @@ function dl(...e) {
|
|
|
6785
6785
|
clone: d = cl,
|
|
6786
6786
|
customUpdate: _
|
|
6787
6787
|
} = (t = N(s)) != null ? t : {};
|
|
6788
|
-
function g(
|
|
6788
|
+
function g(b) {
|
|
6789
6789
|
var C;
|
|
6790
|
-
const { from: R, oldIndex: K, item: B } =
|
|
6790
|
+
const { from: R, oldIndex: K, item: B } = b;
|
|
6791
6791
|
i = Array.from(R.childNodes);
|
|
6792
6792
|
const E = N((C = N(l)) == null ? void 0 : C[K]), M = d(E);
|
|
6793
6793
|
zo(E, M), B[qo] = M;
|
|
6794
6794
|
}
|
|
6795
|
-
function h(
|
|
6796
|
-
const C =
|
|
6795
|
+
function h(b) {
|
|
6796
|
+
const C = b.item[qo];
|
|
6797
6797
|
if (!Nr(C)) {
|
|
6798
|
-
if (Zt(
|
|
6798
|
+
if (Zt(b.item), vt(l)) {
|
|
6799
6799
|
const R = [...N(l)];
|
|
6800
|
-
l.value = Vo(R,
|
|
6800
|
+
l.value = Vo(R, b.newDraggableIndex, C);
|
|
6801
6801
|
return;
|
|
6802
6802
|
}
|
|
6803
|
-
Vo(N(l),
|
|
6803
|
+
Vo(N(l), b.newDraggableIndex, C);
|
|
6804
6804
|
}
|
|
6805
6805
|
}
|
|
6806
|
-
function A(
|
|
6807
|
-
const { from: C, item: R, oldIndex: K, oldDraggableIndex: B, pullMode: E, clone: M } =
|
|
6806
|
+
function A(b) {
|
|
6807
|
+
const { from: C, item: R, oldIndex: K, oldDraggableIndex: B, pullMode: E, clone: M } = b;
|
|
6808
6808
|
if (Uo(C, R, K), E === "clone") {
|
|
6809
6809
|
Zt(M);
|
|
6810
6810
|
return;
|
|
@@ -6816,12 +6816,12 @@ function dl(...e) {
|
|
|
6816
6816
|
}
|
|
6817
6817
|
wo(N(l), B);
|
|
6818
6818
|
}
|
|
6819
|
-
function b
|
|
6819
|
+
function O(b) {
|
|
6820
6820
|
if (_) {
|
|
6821
|
-
_(
|
|
6821
|
+
_(b);
|
|
6822
6822
|
return;
|
|
6823
6823
|
}
|
|
6824
|
-
const { from: C, item: R, oldIndex: K, newIndex: B } =
|
|
6824
|
+
const { from: C, item: R, oldIndex: K, newIndex: B } = b;
|
|
6825
6825
|
if (Zt(R), Uo(C, R, K), vt(l)) {
|
|
6826
6826
|
const E = [...N(l)];
|
|
6827
6827
|
l.value = Po(E, K, B);
|
|
@@ -6829,18 +6829,18 @@ function dl(...e) {
|
|
|
6829
6829
|
}
|
|
6830
6830
|
Po(N(l), K, B);
|
|
6831
6831
|
}
|
|
6832
|
-
function X(
|
|
6833
|
-
const { newIndex: C, oldIndex: R, from: K, to: B } =
|
|
6832
|
+
function X(b) {
|
|
6833
|
+
const { newIndex: C, oldIndex: R, from: K, to: B } = b;
|
|
6834
6834
|
let E = null;
|
|
6835
6835
|
const M = C === R && K === B;
|
|
6836
6836
|
try {
|
|
6837
6837
|
if (M) {
|
|
6838
6838
|
let P = null;
|
|
6839
|
-
i == null || i.some((
|
|
6839
|
+
i == null || i.some((q, ve) => {
|
|
6840
6840
|
if (P && (i == null ? void 0 : i.length) !== B.childNodes.length)
|
|
6841
|
-
return K.insertBefore(P,
|
|
6841
|
+
return K.insertBefore(P, q.nextSibling), !0;
|
|
6842
6842
|
const Wt = B.childNodes[ve];
|
|
6843
|
-
P = B == null ? void 0 : B.replaceChild(
|
|
6843
|
+
P = B == null ? void 0 : B.replaceChild(q, Wt);
|
|
6844
6844
|
});
|
|
6845
6845
|
}
|
|
6846
6846
|
} catch (P) {
|
|
@@ -6854,19 +6854,19 @@ function dl(...e) {
|
|
|
6854
6854
|
});
|
|
6855
6855
|
}
|
|
6856
6856
|
const S = {
|
|
6857
|
-
onUpdate:
|
|
6857
|
+
onUpdate: O,
|
|
6858
6858
|
onStart: g,
|
|
6859
6859
|
onAdd: h,
|
|
6860
6860
|
onRemove: A,
|
|
6861
6861
|
onEnd: X
|
|
6862
6862
|
};
|
|
6863
|
-
function
|
|
6863
|
+
function $(b) {
|
|
6864
6864
|
const C = N(r);
|
|
6865
|
-
return
|
|
6865
|
+
return b || (b = Sr(C) ? Br(C, n == null ? void 0 : n.$el) : C), b && !Dr(b) && (b = b.$el), b || Ar("Root element not found"), b;
|
|
6866
6866
|
}
|
|
6867
6867
|
function V() {
|
|
6868
|
-
var
|
|
6869
|
-
const C = (
|
|
6868
|
+
var b;
|
|
6869
|
+
const C = (b = N(s)) != null ? b : {}, R = hn(C, ["immediate", "clone"]);
|
|
6870
6870
|
return Yo(R, (K, B) => {
|
|
6871
6871
|
xr(K) && (R[K] = (E, ...M) => {
|
|
6872
6872
|
const P = pl();
|
|
@@ -6877,30 +6877,30 @@ function dl(...e) {
|
|
|
6877
6877
|
R
|
|
6878
6878
|
);
|
|
6879
6879
|
}
|
|
6880
|
-
const
|
|
6881
|
-
|
|
6880
|
+
const ae = (b) => {
|
|
6881
|
+
b = $(b), u && Y.destroy(), u = new y(b, V());
|
|
6882
6882
|
};
|
|
6883
6883
|
De(
|
|
6884
6884
|
() => s,
|
|
6885
6885
|
() => {
|
|
6886
|
-
u && Yo(V(), (
|
|
6887
|
-
u == null || u.option(
|
|
6886
|
+
u && Yo(V(), (b, C) => {
|
|
6887
|
+
u == null || u.option(b, C);
|
|
6888
6888
|
});
|
|
6889
6889
|
},
|
|
6890
6890
|
{ deep: !0 }
|
|
6891
6891
|
);
|
|
6892
|
-
const
|
|
6893
|
-
option: (
|
|
6892
|
+
const Y = {
|
|
6893
|
+
option: (b, C) => u == null ? void 0 : u.option(b, C),
|
|
6894
6894
|
destroy: () => {
|
|
6895
6895
|
u == null || u.destroy(), u = null;
|
|
6896
6896
|
},
|
|
6897
6897
|
save: () => u == null ? void 0 : u.save(),
|
|
6898
6898
|
toArray: () => u == null ? void 0 : u.toArray(),
|
|
6899
|
-
closest: (...
|
|
6900
|
-
},
|
|
6899
|
+
closest: (...b) => u == null ? void 0 : u.closest(...b)
|
|
6900
|
+
}, pe = () => Y == null ? void 0 : Y.option("disabled", !0), he = () => Y == null ? void 0 : Y.option("disabled", !1);
|
|
6901
6901
|
return _l(() => {
|
|
6902
|
-
p &&
|
|
6903
|
-
}), ul(
|
|
6902
|
+
p && ae();
|
|
6903
|
+
}), ul(Y.destroy), je({ start: ae, pause: pe, resume: he }, Y);
|
|
6904
6904
|
}
|
|
6905
6905
|
const To = [
|
|
6906
6906
|
"update",
|
|
@@ -6972,13 +6972,13 @@ const To = [
|
|
|
6972
6972
|
const r = To.reduce((d, _) => {
|
|
6973
6973
|
const g = `on${_.replace(/^\S/, (h) => h.toUpperCase())}`;
|
|
6974
6974
|
return d[g] = (...h) => t(_, ...h), d;
|
|
6975
|
-
}, {}), l =
|
|
6976
|
-
const d = Un(e), _ = hn(d, ["modelValue"]), g = Object.entries(_).reduce((h, [A,
|
|
6977
|
-
const X = N(
|
|
6975
|
+
}, {}), l = le(() => {
|
|
6976
|
+
const d = Un(e), _ = hn(d, ["modelValue"]), g = Object.entries(_).reduce((h, [A, O]) => {
|
|
6977
|
+
const X = N(O);
|
|
6978
6978
|
return X !== void 0 && (h[A] = X), h;
|
|
6979
6979
|
}, {});
|
|
6980
6980
|
return je(je({}, r), kr(je(je({}, i), g)));
|
|
6981
|
-
}), s =
|
|
6981
|
+
}), s = le({
|
|
6982
6982
|
get: () => e.modelValue,
|
|
6983
6983
|
set: (d) => t("update:modelValue", d)
|
|
6984
6984
|
}), u = we(), p = Yn(
|
|
@@ -6998,13 +6998,13 @@ const To = [
|
|
|
6998
6998
|
},
|
|
6999
6999
|
emits: ["x-click"],
|
|
7000
7000
|
setup(e, { emit: o }) {
|
|
7001
|
-
const { primaryColor: t, backgroundColor2: n, highlightColor: i } = nn(), r = e, l = o, s = we(!1), u =
|
|
7001
|
+
const { primaryColor: t, backgroundColor2: n, highlightColor: i } = nn(), r = e, l = o, s = we(!1), u = le(() => ({
|
|
7002
7002
|
position: "relative",
|
|
7003
7003
|
background: s.value ? i.value : n.value,
|
|
7004
7004
|
height: "48px",
|
|
7005
7005
|
marginBottom: "1px",
|
|
7006
7006
|
userSelect: "none"
|
|
7007
|
-
})), p =
|
|
7007
|
+
})), p = le(() => ({
|
|
7008
7008
|
display: r.select ? "block" : "none",
|
|
7009
7009
|
position: "absolute",
|
|
7010
7010
|
top: "0px",
|
|
@@ -7015,17 +7015,17 @@ const To = [
|
|
|
7015
7015
|
pointerEvents: "none"
|
|
7016
7016
|
}));
|
|
7017
7017
|
return (d, _) => {
|
|
7018
|
-
const g =
|
|
7019
|
-
return Gn((
|
|
7018
|
+
const g = ne("v-spacer"), h = ne("v-icon"), A = Hn("ripple");
|
|
7019
|
+
return Gn((W(), be("div", {
|
|
7020
7020
|
class: "d-flex align-center cursor-pointer",
|
|
7021
7021
|
style: Oe(u.value),
|
|
7022
|
-
onClick: _[1] || (_[1] = (
|
|
7023
|
-
onMouseover: _[2] || (_[2] = (
|
|
7024
|
-
onMouseout: _[3] || (_[3] = (
|
|
7022
|
+
onClick: _[1] || (_[1] = (O) => l("x-click", r.id)),
|
|
7023
|
+
onMouseover: _[2] || (_[2] = (O) => s.value = !0),
|
|
7024
|
+
onMouseout: _[3] || (_[3] = (O) => s.value = !1)
|
|
7025
7025
|
}, [
|
|
7026
7026
|
ye("span", Tl, Eo(r.title), 1),
|
|
7027
|
-
|
|
7028
|
-
|
|
7027
|
+
ie(g),
|
|
7028
|
+
ie(h, {
|
|
7029
7029
|
class: "x-handle cursor-move mr-3",
|
|
7030
7030
|
icon: N(pi),
|
|
7031
7031
|
onMousedown: _[0] || (_[0] = yt(() => {
|
|
@@ -7060,12 +7060,12 @@ const To = [
|
|
|
7060
7060
|
else if (g.type.startsWith("procedure_def_v"))
|
|
7061
7061
|
console.log("2");
|
|
7062
7062
|
else {
|
|
7063
|
-
const
|
|
7063
|
+
const O = g.getRelativeToSurfaceXY();
|
|
7064
7064
|
d.push({
|
|
7065
7065
|
id: g.id,
|
|
7066
7066
|
name: o("x-block-lib.temporaryBlock"),
|
|
7067
|
-
x:
|
|
7068
|
-
y:
|
|
7067
|
+
x: O.x,
|
|
7068
|
+
y: O.y,
|
|
7069
7069
|
select: h
|
|
7070
7070
|
});
|
|
7071
7071
|
}
|
|
@@ -7103,8 +7103,8 @@ const To = [
|
|
|
7103
7103
|
p.newIndex > p.oldIndex ? h = i[p.newIndex] : p.newIndex > 0 && (h = i[p.newIndex - 1]);
|
|
7104
7104
|
let A = -10;
|
|
7105
7105
|
h !== "" && (A = d.getBlockById(h).getRelativeToSurfaceXY().y + 10);
|
|
7106
|
-
const
|
|
7107
|
-
g.moveTo(new T.Coordinate(
|
|
7106
|
+
const O = g.getRelativeToSurfaceXY();
|
|
7107
|
+
g.moveTo(new T.Coordinate(O.x, A)), me.emit("cleanWorkspace"), cn();
|
|
7108
7108
|
}, { open: s } = bo("blocklyNavigatorDlg"), u = async (p) => {
|
|
7109
7109
|
const d = Ve();
|
|
7110
7110
|
if (!d) {
|
|
@@ -7114,7 +7114,7 @@ const To = [
|
|
|
7114
7114
|
const _ = d.getBlockById(p);
|
|
7115
7115
|
ei.setSelected(_), sn(p), s.value = !1;
|
|
7116
7116
|
};
|
|
7117
|
-
return (p, d) => t.value.length > 0 ? (
|
|
7117
|
+
return (p, d) => t.value.length > 0 ? (W(), Se(N(hl), {
|
|
7118
7118
|
key: 0,
|
|
7119
7119
|
modelValue: t.value,
|
|
7120
7120
|
"onUpdate:modelValue": d[0] || (d[0] = (_) => t.value = _),
|
|
@@ -7125,7 +7125,7 @@ const To = [
|
|
|
7125
7125
|
onEnd: l
|
|
7126
7126
|
}, {
|
|
7127
7127
|
default: Je(() => [
|
|
7128
|
-
(
|
|
7128
|
+
(W(!0), be(Zo, null, Xn(t.value, (_) => (W(), Se(ml, {
|
|
7129
7129
|
id: _.id,
|
|
7130
7130
|
key: _.id,
|
|
7131
7131
|
title: _.name,
|
|
@@ -7134,7 +7134,7 @@ const To = [
|
|
|
7134
7134
|
}, null, 8, ["id", "title", "select"]))), 128))
|
|
7135
7135
|
]),
|
|
7136
7136
|
_: 1
|
|
7137
|
-
}, 8, ["modelValue"])) : (
|
|
7137
|
+
}, 8, ["modelValue"])) : (W(), be("span", gl, Eo(N(o)("x-block-lib.noOption")), 1));
|
|
7138
7138
|
}
|
|
7139
7139
|
}), Mn = (e, o) => {
|
|
7140
7140
|
const t = e.__vccOpts || e;
|
|
@@ -7143,7 +7143,7 @@ const To = [
|
|
|
7143
7143
|
return t;
|
|
7144
7144
|
}, vl = /* @__PURE__ */ Mn(El, [["__scopeId", "data-v-91f61557"]]), yl = {};
|
|
7145
7145
|
function bl(e, o) {
|
|
7146
|
-
return
|
|
7146
|
+
return W(), be("div", null, "blockTree");
|
|
7147
7147
|
}
|
|
7148
7148
|
const Ol = /* @__PURE__ */ Mn(yl, [["render", bl]]), Il = { class: "text-subtitle-1 ml-3" }, Cl = /* @__PURE__ */ Ue({
|
|
7149
7149
|
__name: "index",
|
|
@@ -7151,27 +7151,27 @@ const Ol = /* @__PURE__ */ Mn(yl, [["render", bl]]), Il = { class: "text-subtitl
|
|
|
7151
7151
|
type: {}
|
|
7152
7152
|
},
|
|
7153
7153
|
setup(e) {
|
|
7154
|
-
const { t: o } = Ut(), t = si(), { sysBarAvail: n } = li(), { backgroundColor1: i } = nn(), r = e, l =
|
|
7154
|
+
const { t: o } = Ut(), t = si(), { sysBarAvail: n } = li(), { backgroundColor1: i } = nn(), r = e, l = le(() => {
|
|
7155
7155
|
let d = "100%";
|
|
7156
7156
|
return t.mdAndUp.value && (d = "400px"), {
|
|
7157
7157
|
background: i.value,
|
|
7158
7158
|
width: d,
|
|
7159
7159
|
height: "100%"
|
|
7160
7160
|
};
|
|
7161
|
-
}), s =
|
|
7161
|
+
}), s = le(() => {
|
|
7162
7162
|
let d = 48;
|
|
7163
7163
|
return n.value && (d += 24), {
|
|
7164
7164
|
position: "relative",
|
|
7165
7165
|
width: "100%",
|
|
7166
7166
|
height: `calc(100% - ${d}px)`
|
|
7167
7167
|
};
|
|
7168
|
-
}), u =
|
|
7168
|
+
}), u = le(() => ({
|
|
7169
7169
|
height: "60px"
|
|
7170
7170
|
})), { open: p } = bo("blocklyNavigatorDlg");
|
|
7171
7171
|
return (d, _) => {
|
|
7172
|
-
const g =
|
|
7173
|
-
return
|
|
7174
|
-
|
|
7172
|
+
const g = ne("v-sheet"), h = ne("v-icon"), A = ne("v-dialog"), O = ne("v-btn"), X = ne("v-tooltip");
|
|
7173
|
+
return W(), be(Zo, null, [
|
|
7174
|
+
ie(A, {
|
|
7175
7175
|
modelValue: N(p),
|
|
7176
7176
|
"onUpdate:modelValue": _[3] || (_[3] = (S) => vt(p) ? p.value = S : null),
|
|
7177
7177
|
transition: "scroll-x-reverse-transition",
|
|
@@ -7191,18 +7191,18 @@ const Ol = /* @__PURE__ */ Mn(yl, [["render", bl]]), Il = { class: "text-subtitl
|
|
|
7191
7191
|
class: "elevation-2",
|
|
7192
7192
|
style: Oe(l.value)
|
|
7193
7193
|
}, [
|
|
7194
|
-
N(n) ? (
|
|
7194
|
+
N(n) ? (W(), Se(g, {
|
|
7195
7195
|
key: 0,
|
|
7196
7196
|
color: "transparent",
|
|
7197
7197
|
height: 24
|
|
7198
7198
|
})) : Xe("", !0),
|
|
7199
|
-
|
|
7199
|
+
ie(g, {
|
|
7200
7200
|
class: "d-flex align-center px-3",
|
|
7201
7201
|
color: "transparent",
|
|
7202
7202
|
height: 48
|
|
7203
7203
|
}, {
|
|
7204
7204
|
default: Je(() => [
|
|
7205
|
-
|
|
7205
|
+
ie(h, {
|
|
7206
7206
|
icon: N(ui),
|
|
7207
7207
|
onClick: _[0] || (_[0] = (S) => p.value = !1)
|
|
7208
7208
|
}, null, 8, ["icon"]),
|
|
@@ -7214,7 +7214,7 @@ const Ol = /* @__PURE__ */ Mn(yl, [["render", bl]]), Il = { class: "text-subtitl
|
|
|
7214
7214
|
class: "overflow-y-auto",
|
|
7215
7215
|
style: Oe(s.value)
|
|
7216
7216
|
}, [
|
|
7217
|
-
r.type === "list" ? (
|
|
7217
|
+
r.type === "list" ? (W(), Se(vl, { key: 0 })) : r.type === "tree" ? (W(), Se(Ol, { key: 1 })) : Xe("", !0),
|
|
7218
7218
|
ye("div", {
|
|
7219
7219
|
style: Oe(u.value)
|
|
7220
7220
|
}, null, 4)
|
|
@@ -7224,15 +7224,15 @@ const Ol = /* @__PURE__ */ Mn(yl, [["render", bl]]), Il = { class: "text-subtitl
|
|
|
7224
7224
|
]),
|
|
7225
7225
|
_: 1
|
|
7226
7226
|
}, 8, ["modelValue"]),
|
|
7227
|
-
|
|
7227
|
+
ie(X, {
|
|
7228
7228
|
text: N(o)("x-block-lib.tip.hotkeyCtrlE")
|
|
7229
7229
|
}, {
|
|
7230
7230
|
activator: Je(({ props: S }) => [
|
|
7231
|
-
|
|
7231
|
+
ie(O, mo(S, {
|
|
7232
7232
|
variant: "outlined",
|
|
7233
7233
|
density: "comfortable",
|
|
7234
7234
|
icon: N(hi),
|
|
7235
|
-
onClick: _[5] || (_[5] = (
|
|
7235
|
+
onClick: _[5] || (_[5] = ($) => p.value = !0)
|
|
7236
7236
|
}), null, 16, ["icon"])
|
|
7237
7237
|
]),
|
|
7238
7238
|
_: 1
|
|
@@ -7271,23 +7271,23 @@ function Al(e, o, t) {
|
|
|
7271
7271
|
$e.name,
|
|
7272
7272
|
$e.callback
|
|
7273
7273
|
), i.registerToolboxCategoryCallback(
|
|
7274
|
-
|
|
7275
|
-
|
|
7274
|
+
ce.name,
|
|
7275
|
+
ce.callback
|
|
7276
7276
|
), i.registerToolboxCategoryCallback(
|
|
7277
|
-
|
|
7278
|
-
|
|
7277
|
+
ue.name,
|
|
7278
|
+
ue.callback
|
|
7279
7279
|
)) : o === "func" ? t === "v1" && (i.registerToolboxCategoryCallback(
|
|
7280
|
-
|
|
7281
|
-
|
|
7280
|
+
ce.name,
|
|
7281
|
+
ce.callback
|
|
7282
7282
|
), i.registerToolboxCategoryCallback(
|
|
7283
|
-
|
|
7284
|
-
|
|
7283
|
+
ue.name,
|
|
7284
|
+
ue.callback
|
|
7285
7285
|
)) : o === "flow" && t === "v1" && (i.registerToolboxCategoryCallback(
|
|
7286
|
-
|
|
7287
|
-
|
|
7286
|
+
ce.name,
|
|
7287
|
+
ce.callback
|
|
7288
7288
|
), i.registerToolboxCategoryCallback(
|
|
7289
|
-
|
|
7290
|
-
|
|
7289
|
+
ue.name,
|
|
7290
|
+
ue.callback
|
|
7291
7291
|
)), i;
|
|
7292
7292
|
}
|
|
7293
7293
|
const Ll = { class: "position-relative w-100 h-100" }, kl = /* @__PURE__ */ Ue({
|
|
@@ -7305,7 +7305,7 @@ const Ll = { class: "position-relative w-100 h-100" }, kl = /* @__PURE__ */ Ue({
|
|
|
7305
7305
|
setup(e, { expose: o, emit: t }) {
|
|
7306
7306
|
const n = ai(), { locale: i, dark: r } = ni(n), l = co(e, "lock"), s = co(e, "scale"), u = e, p = t, d = we();
|
|
7307
7307
|
let _;
|
|
7308
|
-
const g = we(!1), h = we(!1), A =
|
|
7308
|
+
const g = we(!1), h = we(!1), A = le(() => ({
|
|
7309
7309
|
position: "absolute",
|
|
7310
7310
|
background: r.value ? "#0000007f" : "#ffffff7f",
|
|
7311
7311
|
top: "1px",
|
|
@@ -7314,7 +7314,7 @@ const Ll = { class: "position-relative w-100 h-100" }, kl = /* @__PURE__ */ Ue({
|
|
|
7314
7314
|
height: "calc(100% - 1px)",
|
|
7315
7315
|
pointerEvents: "none",
|
|
7316
7316
|
zIndex: 999
|
|
7317
|
-
})),
|
|
7317
|
+
})), O = le(() => ({
|
|
7318
7318
|
position: "absolute",
|
|
7319
7319
|
background: r.value ? "#0000007f" : "#ffffff7f",
|
|
7320
7320
|
top: "1px",
|
|
@@ -7322,12 +7322,12 @@ const Ll = { class: "position-relative w-100 h-100" }, kl = /* @__PURE__ */ Ue({
|
|
|
7322
7322
|
width: "56px",
|
|
7323
7323
|
height: "calc(100% - 1px)",
|
|
7324
7324
|
zIndex: 999
|
|
7325
|
-
})), X =
|
|
7325
|
+
})), X = le(() => ({
|
|
7326
7326
|
position: "absolute",
|
|
7327
7327
|
top: "0px",
|
|
7328
7328
|
right: "0px",
|
|
7329
7329
|
zIndex: 20
|
|
7330
|
-
})), S =
|
|
7330
|
+
})), S = le(() => ({
|
|
7331
7331
|
position: "absolute",
|
|
7332
7332
|
background: r.value ? "#0000007f" : "#ffffff7f",
|
|
7333
7333
|
top: "0px",
|
|
@@ -7335,38 +7335,38 @@ const Ll = { class: "position-relative w-100 h-100" }, kl = /* @__PURE__ */ Ue({
|
|
|
7335
7335
|
width: "100%",
|
|
7336
7336
|
height: "100%",
|
|
7337
7337
|
pointerEvents: "none"
|
|
7338
|
-
})),
|
|
7339
|
-
g.value = !0, No.workspaces.load(E, _);
|
|
7340
|
-
}, V = () => No.workspaces.save(_), se = () => a.workspaceToCode(_), U = () => {
|
|
7341
|
-
_.options.readOnly = l.value, _.options.readOnly && (te.value = !1);
|
|
7342
|
-
}, ce = () => {
|
|
7343
|
-
_.setScale(s.value);
|
|
7344
|
-
}, { open: te } = bo("blocklyEditorFlyout");
|
|
7338
|
+
})), { open: $ } = bo("blocklyEditorFlyout");
|
|
7345
7339
|
qe(async () => {
|
|
7346
7340
|
if (!d.value) {
|
|
7347
7341
|
console.assert(!1);
|
|
7348
7342
|
return;
|
|
7349
7343
|
}
|
|
7350
|
-
await Do(i.value), _ = Al(d.value, u.type, u.version), _.addChangeListener(G.disableOrphans), _.addChangeListener(
|
|
7344
|
+
await Do(i.value), _ = Al(d.value, u.type, u.version), _.addChangeListener(G.disableOrphans), _.addChangeListener(V);
|
|
7351
7345
|
const E = document.querySelector("#blocklyEditor .blocklyFlyout");
|
|
7352
7346
|
new MutationObserver((P) => {
|
|
7353
|
-
P.forEach((
|
|
7354
|
-
|
|
7347
|
+
P.forEach((q) => {
|
|
7348
|
+
q.type === "attributes" && q.attributeName === "style" && ($.value = _.getFlyout().isVisible());
|
|
7355
7349
|
});
|
|
7356
|
-
}).observe(E, { attributes: !0 }),
|
|
7350
|
+
}).observe(E, { attributes: !0 }), $.value = _.getFlyout().isVisible(), he(), b(), await go(), p("ready");
|
|
7357
7351
|
}), Nt(() => {
|
|
7358
|
-
|
|
7352
|
+
$.value = !1;
|
|
7359
7353
|
}), bi(d, () => {
|
|
7360
7354
|
_ && oi(_);
|
|
7361
7355
|
});
|
|
7362
|
-
async function
|
|
7356
|
+
async function V(E) {
|
|
7363
7357
|
if (E.type === G.FINISHED_LOADING) {
|
|
7364
7358
|
cn(), me.emit("codeUpdate"), g.value = !1;
|
|
7365
7359
|
return;
|
|
7366
7360
|
}
|
|
7367
7361
|
g.value || (E.type === G.VIEWPORT_CHANGE && (s.value = _.getScale()), E.type === G.BLOCK_DRAG && (E.isStart ? h.value = !0 : h.value = !1), me.emit("codeUpdate"));
|
|
7368
7362
|
}
|
|
7369
|
-
const
|
|
7363
|
+
const ae = (E) => {
|
|
7364
|
+
g.value = !0, No.workspaces.load(E, _);
|
|
7365
|
+
}, Y = () => No.workspaces.save(_), pe = () => a.workspaceToCode(_), he = () => {
|
|
7366
|
+
_.options.readOnly = l.value, _.options.readOnly && ($.value = !1);
|
|
7367
|
+
}, b = () => {
|
|
7368
|
+
_.setScale(s.value);
|
|
7369
|
+
}, C = (E) => {
|
|
7370
7370
|
if (E.key === "q" && E.ctrlKey) {
|
|
7371
7371
|
R();
|
|
7372
7372
|
return;
|
|
@@ -7394,53 +7394,53 @@ const Ll = { class: "position-relative w-100 h-100" }, kl = /* @__PURE__ */ Ue({
|
|
|
7394
7394
|
Do(E);
|
|
7395
7395
|
}), De(r, (E) => {
|
|
7396
7396
|
mr(E ? "dark" : "light");
|
|
7397
|
-
}), De(
|
|
7397
|
+
}), De($, (E) => {
|
|
7398
7398
|
E || _.hideChaff();
|
|
7399
7399
|
}), De(l, () => {
|
|
7400
|
-
|
|
7400
|
+
he();
|
|
7401
7401
|
}), De(s, () => {
|
|
7402
|
-
|
|
7403
|
-
}), o({ loading: g, load:
|
|
7404
|
-
const P =
|
|
7405
|
-
return
|
|
7402
|
+
b();
|
|
7403
|
+
}), o({ loading: g, load: ae, save: Y, generateCode: pe }), (E, M) => {
|
|
7404
|
+
const P = ne("v-icon"), q = ne("x-loading");
|
|
7405
|
+
return W(), be("div", Ll, [
|
|
7406
7406
|
ye("div", {
|
|
7407
7407
|
id: "blocklyEditor",
|
|
7408
7408
|
ref_key: "blocklyDiv",
|
|
7409
7409
|
ref: d,
|
|
7410
7410
|
class: "w-100 h-100"
|
|
7411
7411
|
}, null, 512),
|
|
7412
|
-
h.value ? (
|
|
7412
|
+
h.value ? (W(), be("div", {
|
|
7413
7413
|
key: 0,
|
|
7414
7414
|
class: "d-flex flex-column align-center justify-center",
|
|
7415
7415
|
style: Oe(A.value)
|
|
7416
7416
|
}, [
|
|
7417
|
-
|
|
7417
|
+
ie(P, {
|
|
7418
7418
|
icon: N(_i),
|
|
7419
7419
|
size: "x-large"
|
|
7420
7420
|
}, null, 8, ["icon"])
|
|
7421
7421
|
], 4)) : Xe("", !0),
|
|
7422
|
-
l.value ? (
|
|
7422
|
+
l.value ? (W(), be("div", {
|
|
7423
7423
|
key: 1,
|
|
7424
|
-
style: Oe(
|
|
7424
|
+
style: Oe(O.value)
|
|
7425
7425
|
}, null, 4)) : Xe("", !0),
|
|
7426
7426
|
ye("div", {
|
|
7427
7427
|
class: "d-flex align-end pt-3 pr-3",
|
|
7428
7428
|
style: Oe(X.value)
|
|
7429
7429
|
}, [
|
|
7430
|
-
|
|
7431
|
-
|
|
7430
|
+
ie(br),
|
|
7431
|
+
ie(Or, {
|
|
7432
7432
|
modelValue: l.value,
|
|
7433
7433
|
"onUpdate:modelValue": M[0] || (M[0] = (ve) => l.value = ve)
|
|
7434
7434
|
}, null, 8, ["modelValue"]),
|
|
7435
|
-
|
|
7435
|
+
ie(Cl, {
|
|
7436
7436
|
type: E.type === "json" ? "tree" : "list"
|
|
7437
7437
|
}, null, 8, ["type"])
|
|
7438
7438
|
], 4),
|
|
7439
|
-
l.value ? (
|
|
7439
|
+
l.value ? (W(), be("div", {
|
|
7440
7440
|
key: 2,
|
|
7441
7441
|
style: Oe(S.value)
|
|
7442
7442
|
}, null, 4)) : Xe("", !0),
|
|
7443
|
-
g.value ? (
|
|
7443
|
+
g.value ? (W(), Se(q, {
|
|
7444
7444
|
key: 3,
|
|
7445
7445
|
"z-index": 99
|
|
7446
7446
|
})) : Xe("", !0)
|