x-block-lib 0.4.26 → 0.4.28
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/{blockly-ou5p4kro.js → blockly-nx44b3kf.js} +2 -2
- package/dist/components/blockly/clean/index.vue.d.ts +5 -0
- package/dist/components/blockly/navigator/blockList/index.vue.d.ts +4 -1
- package/dist/components/blockly/navigator/index.vue.d.ts +1 -0
- package/dist/{i18n-en-58ejxm4b.js → i18n-en-gc42vrme.js} +4 -0
- package/dist/{i18n-zhHans-cb9uza7v.js → i18n-zhHans-lr11azyl.js} +4 -0
- package/dist/index.js +1031 -1011
- package/package.json +1 -1
- package/dist/components/blockly/cleanup/index.vue.d.ts +0 -2
- package/dist/core/plugins/readOnlyFlyout/index.d.ts +0 -9
- package/dist/core/toolbox/app/v1/index.d.ts +0 -30
- package/dist/core/toolbox/app/v1/time.d.ts +0 -24
package/dist/index.js
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.id="x-block-lib",o.appendChild(document.createTextNode(".ghost[data-v-
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var Te = (e, o, t) =>
|
|
5
|
-
import { getCurrentScope as
|
|
6
|
-
import { d as
|
|
7
|
-
import { storeToRefs as
|
|
8
|
-
import { openConfirmDlg as
|
|
9
|
-
import { useI18n as
|
|
10
|
-
import { useDisplay as
|
|
11
|
-
var
|
|
12
|
-
function Ti(e) {
|
|
13
|
-
return wn() ? (Vn(e), !0) : !1;
|
|
14
|
-
}
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.id="x-block-lib",o.appendChild(document.createTextNode(".ghost[data-v-35be3e12]{opacity:.4;pointer-events:none}.blocklyToolboxDiv{overflow-x:hidden;width:56px}.blocklyMainBackground{stroke-width:0}.blocklyToolboxCategory{margin-bottom:10px}.blocklyTreeRow{height:28px;display:flex;align-items:center;border-left-width:6px!important;border-right-width:6px!important}.blocklyTreeIcon{display:none!important}.blocklyFlyout{z-index:21}")),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
var Pn = Object.defineProperty;
|
|
3
|
+
var wn = (e, o, t) => o in e ? Pn(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t;
|
|
4
|
+
var Te = (e, o, t) => wn(e, typeof o != "symbol" ? o + "" : o, t);
|
|
5
|
+
import { getCurrentScope as Vn, onScopeDispose as Un, unref as S, computed as te, watch as De, ref as we, getCurrentInstance as wt, onMounted as qe, defineComponent as Ue, onBeforeUnmount as St, resolveComponent as ie, openBlock as j, createBlock as Se, withCtx as Je, createVNode as re, mergeProps as mo, useModel as co, toRefs as Yn, reactive as Kn, h as Fn, onUnmounted as Hn, nextTick as go, isRef as yt, resolveDirective as Gn, withDirectives as Xn, createElementBlock as be, normalizeStyle as Oe, createElementVNode as ye, toDisplayString as Eo, withModifiers as bt, Fragment as Zo, renderList as $n, withKeys as jn, createCommentVNode as Xe, mergeModels as Lo } from "vue";
|
|
6
|
+
import { d as g, j as a, O as c, u as m, X as Wn, B as pe, E as X, M as W, i as Vt, a as xe, b as Y, C as en, F as vo, c as Jn, P as uo, N as yo, V as Ot, e as zn, f as tn, s as qn, g as Ve, S as q, h as Jt, k as He, l as pt, m as zt, n as et, o as Pe, p as ko, G as qt, q as Qn, r as Zn, t as Qt, U as dt, D as ft, v as Ye, w as ei, T as Ut, x as on, y as ti, z as oi, A as ni, H as No } from "./blockly-nx44b3kf.js";
|
|
7
|
+
import { storeToRefs as ii } from "pinia";
|
|
8
|
+
import { openConfirmDlg as ri, openPromptDlg as li, eventBus as me, messageWarning as nn, useColor as rn, useViewStack as bo, useSystem as ai, useGlobalStore as si } from "x-essential-lib";
|
|
9
|
+
import { useI18n as Yt } from "vue-i18n";
|
|
10
|
+
import { useDisplay as ci } from "vuetify";
|
|
11
|
+
var ui = "M19.36,2.72L20.78,4.14L15.06,9.85C16.13,11.39 16.28,13.24 15.38,14.44L9.06,8.12C10.26,7.22 12.11,7.37 13.65,8.44L19.36,2.72M5.93,17.57C3.92,15.56 2.69,13.16 2.35,10.92L7.23,8.83L14.67,16.27L12.58,21.15C10.34,20.81 7.94,19.58 5.93,17.57Z", _i = "M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z", pi = "M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z", di = "M21 11H3V9H21V11M21 13H3V15H21V13Z", fi = "M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z", hi = "M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V10A2,2 0 0,1 6,8H15V6A3,3 0 0,0 12,3A3,3 0 0,0 9,6H7A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,17A2,2 0 0,0 14,15A2,2 0 0,0 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17Z", Ti = "M21 3L3 10.53V11.5L9.84 14.16L12.5 21H13.46L21 3Z";
|
|
15
12
|
function mi(e) {
|
|
16
|
-
return
|
|
13
|
+
return Vn() ? (Un(e), !0) : !1;
|
|
14
|
+
}
|
|
15
|
+
function gi(e) {
|
|
16
|
+
return typeof e == "function" ? e() : S(e);
|
|
17
17
|
}
|
|
18
|
-
const
|
|
18
|
+
const Ei = typeof window < "u" && typeof document < "u";
|
|
19
19
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
20
20
|
function So(e) {
|
|
21
21
|
var o;
|
|
22
|
-
const t =
|
|
22
|
+
const t = gi(e);
|
|
23
23
|
return (o = t == null ? void 0 : t.$el) != null ? o : t;
|
|
24
24
|
}
|
|
25
|
-
const
|
|
26
|
-
function
|
|
27
|
-
const e = we(!1), o =
|
|
25
|
+
const vi = Ei ? window : void 0;
|
|
26
|
+
function yi() {
|
|
27
|
+
const e = we(!1), o = wt();
|
|
28
28
|
return o && qe(() => {
|
|
29
29
|
e.value = !0;
|
|
30
30
|
}, o), e;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
const o =
|
|
34
|
-
return
|
|
32
|
+
function bi(e) {
|
|
33
|
+
const o = yi();
|
|
34
|
+
return te(() => (o.value, !!e()));
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
const { window: n =
|
|
36
|
+
function Oi(e, o, t = {}) {
|
|
37
|
+
const { window: n = vi, ...i } = t;
|
|
38
38
|
let r;
|
|
39
|
-
const l =
|
|
39
|
+
const l = bi(() => n && "ResizeObserver" in n), s = () => {
|
|
40
40
|
r && (r.disconnect(), r = void 0);
|
|
41
|
-
}, u =
|
|
41
|
+
}, u = te(() => Array.isArray(e) ? e.map((_) => So(_)) : [So(e)]), d = De(
|
|
42
42
|
u,
|
|
43
43
|
(_) => {
|
|
44
44
|
if (s(), l.value && n) {
|
|
45
45
|
r = new ResizeObserver(o);
|
|
46
|
-
for (const
|
|
47
|
-
|
|
46
|
+
for (const T of _)
|
|
47
|
+
T && r.observe(T, i);
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
{ immediate: !0, flush: "post" }
|
|
51
|
-
),
|
|
52
|
-
s(),
|
|
51
|
+
), p = () => {
|
|
52
|
+
s(), d();
|
|
53
53
|
};
|
|
54
|
-
return
|
|
54
|
+
return mi(p), {
|
|
55
55
|
isSupported: l,
|
|
56
|
-
stop:
|
|
56
|
+
stop: p
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
g([
|
|
60
60
|
{
|
|
61
61
|
type: "color_blend_v1",
|
|
62
62
|
message0: "%{BKY_COLOR_V1_BLEND_TITLE}",
|
|
@@ -110,7 +110,7 @@ function ${a.FUNCTION_NAME_PLACEHOLDER_}(c1, c2, ratio) {
|
|
|
110
110
|
`
|
|
111
111
|
)}(${o}, ${t}, ${n})`, c.FUNCTION_CALL];
|
|
112
112
|
};
|
|
113
|
-
|
|
113
|
+
g([
|
|
114
114
|
{
|
|
115
115
|
type: "color_picker_v1",
|
|
116
116
|
message0: "%1",
|
|
@@ -130,7 +130,7 @@ m([
|
|
|
130
130
|
a.forBlock.color_picker_v1 = function(e) {
|
|
131
131
|
return [a.quote_(e.getFieldValue("COLOR")), c.ATOMIC];
|
|
132
132
|
};
|
|
133
|
-
|
|
133
|
+
g([
|
|
134
134
|
{
|
|
135
135
|
type: "color_random_v1",
|
|
136
136
|
message0: "%{BKY_COLOR_V1_RANDOM_TITLE}",
|
|
@@ -151,7 +151,7 @@ function ${a.FUNCTION_NAME_PLACEHOLDER_}() {
|
|
|
151
151
|
`
|
|
152
152
|
)}()`, c.FUNCTION_CALL];
|
|
153
153
|
};
|
|
154
|
-
|
|
154
|
+
g([
|
|
155
155
|
{
|
|
156
156
|
type: "color_rgb_v1",
|
|
157
157
|
message0: "%{BKY_COLOR_V1_RGB_TITLE}",
|
|
@@ -198,7 +198,7 @@ function ${a.FUNCTION_NAME_PLACEHOLDER_}(r, g, b) {
|
|
|
198
198
|
`
|
|
199
199
|
)}(${o}, ${t}, ${n})`, c.FUNCTION_CALL];
|
|
200
200
|
};
|
|
201
|
-
const
|
|
201
|
+
const Ii = function() {
|
|
202
202
|
if (!window.blocklyState) {
|
|
203
203
|
const e = {
|
|
204
204
|
runtime: {
|
|
@@ -228,7 +228,7 @@ const Oi = function() {
|
|
|
228
228
|
}
|
|
229
229
|
return window.blocklyState;
|
|
230
230
|
}();
|
|
231
|
-
function
|
|
231
|
+
function ht(e) {
|
|
232
232
|
let o = "";
|
|
233
233
|
if (e.type === "string") {
|
|
234
234
|
let t = "";
|
|
@@ -241,13 +241,13 @@ function ft(e) {
|
|
|
241
241
|
typeof e.default == "boolean" && (t = e.default ? "TRUE" : "FALSE"), o = `<shadow type="logic_boolean_v1"><field name="BOOL">${t}</field></shadow>`;
|
|
242
242
|
} else
|
|
243
243
|
console.assert(!1, "invalid param type", e.type);
|
|
244
|
-
return
|
|
244
|
+
return m.xml.textToDom(o);
|
|
245
245
|
}
|
|
246
|
-
function
|
|
247
|
-
const n = `<xml><block type="parameter_v1"><mutation key="${o}" name="${t}"/></block></xml>`, i =
|
|
246
|
+
function ln(e, o, t) {
|
|
247
|
+
const n = `<xml><block type="parameter_v1"><mutation key="${o}" name="${t}"/></block></xml>`, i = m.xml.textToDom(n), r = Wn.domToWorkspace(i, e);
|
|
248
248
|
return e.getBlockById(r[0]);
|
|
249
249
|
}
|
|
250
|
-
const
|
|
250
|
+
const Ci = m.xml, Ai = [
|
|
251
251
|
{
|
|
252
252
|
type: "call_func_v1",
|
|
253
253
|
prefixInputs: ["OUTPUT"]
|
|
@@ -277,17 +277,17 @@ const Ii = T.xml, Ci = [
|
|
|
277
277
|
prefixInputs: ["ARG"]
|
|
278
278
|
}
|
|
279
279
|
];
|
|
280
|
-
function
|
|
280
|
+
function Li(e, o) {
|
|
281
281
|
var n, i;
|
|
282
|
-
const t =
|
|
282
|
+
const t = Ai.find((r) => r.type === e);
|
|
283
283
|
return t ? !!((n = t.prefixInputs) != null && n.some((r) => o.startsWith(r)) || (i = t.inputs) != null && i.some((r) => r === o)) : !1;
|
|
284
284
|
}
|
|
285
|
-
const
|
|
285
|
+
const ki = {
|
|
286
286
|
init: function() {
|
|
287
287
|
this.key = "", this.name = "", this.appendDummyInput().appendField("", "LABEL"), this.setOutput(!0), this.setColour(220);
|
|
288
288
|
},
|
|
289
289
|
mutationToDom: function() {
|
|
290
|
-
const e =
|
|
290
|
+
const e = Ci.createElement("mutation");
|
|
291
291
|
return e.setAttribute("key", this.key), e.setAttribute("name", this.name), e;
|
|
292
292
|
},
|
|
293
293
|
domToMutation: function(e) {
|
|
@@ -306,7 +306,7 @@ const Li = {
|
|
|
306
306
|
this.key = e, this.name = o, this.updateShape_();
|
|
307
307
|
},
|
|
308
308
|
onchange: function(e) {
|
|
309
|
-
if (e.type ===
|
|
309
|
+
if (e.type === X.BLOCK_MOVE) {
|
|
310
310
|
const o = e;
|
|
311
311
|
if (o.blockId !== this.id)
|
|
312
312
|
return;
|
|
@@ -316,49 +316,49 @@ const Li = {
|
|
|
316
316
|
tryDuplicate_: function(e) {
|
|
317
317
|
var t;
|
|
318
318
|
const o = this.workspace.getBlockById(e.oldParentId);
|
|
319
|
-
if (o &&
|
|
319
|
+
if (o && Li(o.type, e.oldInputName))
|
|
320
320
|
try {
|
|
321
|
-
|
|
321
|
+
X.disable();
|
|
322
322
|
const n = (t = o.getInput(e.oldInputName)) == null ? void 0 : t.connection;
|
|
323
323
|
if (n) {
|
|
324
|
-
const i =
|
|
324
|
+
const i = ln(this.workspace, this.key, this.name);
|
|
325
325
|
n.connect(i.outputConnection);
|
|
326
326
|
}
|
|
327
327
|
} finally {
|
|
328
|
-
|
|
328
|
+
X.enable();
|
|
329
329
|
}
|
|
330
330
|
},
|
|
331
331
|
updateShape_: function() {
|
|
332
332
|
this.name ? this.setFieldValue(W[this.name], "LABEL") : this.setFieldValue(this.key, "LABEL");
|
|
333
333
|
}
|
|
334
334
|
};
|
|
335
|
-
|
|
335
|
+
pe.parameter_v1 = ki;
|
|
336
336
|
a.forBlock.parameter_v1 = function(e) {
|
|
337
337
|
return [e.key, c.ATOMIC];
|
|
338
338
|
};
|
|
339
|
-
const
|
|
339
|
+
const Ni = m.xml, Si = {
|
|
340
340
|
init: function() {
|
|
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
|
-
|
|
345
|
-
const
|
|
344
|
+
pe.list_create_container_v1 = Si;
|
|
345
|
+
const Bi = {
|
|
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
|
-
|
|
351
|
-
const
|
|
350
|
+
pe.list_create_item_v1 = Bi;
|
|
351
|
+
const Ri = {
|
|
352
352
|
init: function() {
|
|
353
353
|
this.itemCount_ = 0, this.setMutator(
|
|
354
|
-
new
|
|
354
|
+
new Vt.MutatorIcon(
|
|
355
355
|
["list_create_item_v1"],
|
|
356
356
|
this
|
|
357
357
|
)
|
|
358
358
|
), this.setOutput(!0, "Array"), this.setStyle("list_blocks"), this.setTooltip("%{BKY_LIST_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_LIST_V1_CREATE_HELPURL}");
|
|
359
359
|
},
|
|
360
360
|
mutationToDom: function() {
|
|
361
|
-
const e =
|
|
361
|
+
const e = Ni.createElement("mutation");
|
|
362
362
|
return e.setAttribute("items", String(this.itemCount_)), e;
|
|
363
363
|
},
|
|
364
364
|
domToMutation: function(e) {
|
|
@@ -432,14 +432,14 @@ const Bi = {
|
|
|
432
432
|
this.removeInput("ADD" + e);
|
|
433
433
|
}
|
|
434
434
|
};
|
|
435
|
-
|
|
435
|
+
pe.list_create_v1 = Ri;
|
|
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++)
|
|
439
439
|
t[i] = a.valueToCode(o, "ADD" + i, c.NONE) || "null";
|
|
440
440
|
return ["[" + t.join(", ") + "]", c.ATOMIC];
|
|
441
441
|
};
|
|
442
|
-
|
|
442
|
+
g([
|
|
443
443
|
{
|
|
444
444
|
type: "list_delete_v1",
|
|
445
445
|
message0: "%{BKY_LIST_V1_DELETE_TITLE}",
|
|
@@ -467,7 +467,7 @@ a.forBlock.list_delete_v1 = function(e) {
|
|
|
467
467
|
const o = a.valueToCode(e, "VALUE", c.MEMBER) || "[]", t = a.getAdjusted(e, "AT");
|
|
468
468
|
return `${o}.splice(${t}, 1)`;
|
|
469
469
|
};
|
|
470
|
-
|
|
470
|
+
g([
|
|
471
471
|
{
|
|
472
472
|
type: "list_get_v1",
|
|
473
473
|
message0: "%{BKY_LIST_V1_GET_TITLE}",
|
|
@@ -494,7 +494,7 @@ a.forBlock.list_get_v1 = function(e) {
|
|
|
494
494
|
const o = a.valueToCode(e, "VALUE", c.MEMBER) || "[]", t = a.getAdjusted(e, "AT");
|
|
495
495
|
return [`${o}[${t}]`, c.MEMBER];
|
|
496
496
|
};
|
|
497
|
-
|
|
497
|
+
g([
|
|
498
498
|
{
|
|
499
499
|
type: "list_get_sublist_v1",
|
|
500
500
|
message0: "%{BKY_LIST_V1_GET_SUBLIST_TITLE}",
|
|
@@ -526,7 +526,7 @@ a.forBlock.list_get_sublist_v1 = function(e) {
|
|
|
526
526
|
const o = a.valueToCode(e, "LIST", c.MEMBER) || "[]", t = a.getAdjusted(e, "START"), n = a.getAdjusted(e, "END", 1);
|
|
527
527
|
return [`${o}.slice(${t}, ${n})`, c.FUNCTION_CALL];
|
|
528
528
|
};
|
|
529
|
-
|
|
529
|
+
g([
|
|
530
530
|
{
|
|
531
531
|
type: "list_is_empty_v1",
|
|
532
532
|
message0: "%{BKY_LIST_V1_IS_EMPTY_TITLE}",
|
|
@@ -546,7 +546,7 @@ m([
|
|
|
546
546
|
a.forBlock.list_is_empty_v1 = function(e) {
|
|
547
547
|
return [`!${a.valueToCode(e, "VALUE", c.MEMBER) || "[]"}.length`, c.LOGICAL_NOT];
|
|
548
548
|
};
|
|
549
|
-
|
|
549
|
+
g([
|
|
550
550
|
{
|
|
551
551
|
type: "list_join_v1",
|
|
552
552
|
message0: "%{BKY_LIST_V1_JOIN_TITLE}",
|
|
@@ -573,7 +573,7 @@ a.forBlock.list_join_v1 = function(e) {
|
|
|
573
573
|
const o = a.valueToCode(e, "LIST", c.MEMBER) || "[]", t = a.valueToCode(e, "DELIM", c.NONE) || "''";
|
|
574
574
|
return [`${o}.join(${t})`, c.FUNCTION_CALL];
|
|
575
575
|
};
|
|
576
|
-
|
|
576
|
+
g([
|
|
577
577
|
{
|
|
578
578
|
type: "list_length_v1",
|
|
579
579
|
message0: "%{BKY_LIST_V1_LENGTH_TITLE}",
|
|
@@ -593,7 +593,7 @@ m([
|
|
|
593
593
|
a.forBlock.list_length_v1 = function(e) {
|
|
594
594
|
return [`${a.valueToCode(e, "VALUE", c.MEMBER) || "[]"}.length`, c.MEMBER];
|
|
595
595
|
};
|
|
596
|
-
|
|
596
|
+
g([
|
|
597
597
|
{
|
|
598
598
|
type: "list_reverse_v1",
|
|
599
599
|
message0: "%{BKY_LIST_V1_REVERSE_TITLE}",
|
|
@@ -614,7 +614,7 @@ m([
|
|
|
614
614
|
a.forBlock.list_reverse_v1 = function(e) {
|
|
615
615
|
return [`${a.valueToCode(e, "LIST", c.NONE) || "[]"}.slice().reverse()`, c.FUNCTION_CALL];
|
|
616
616
|
};
|
|
617
|
-
|
|
617
|
+
g([
|
|
618
618
|
{
|
|
619
619
|
type: "list_set_v1",
|
|
620
620
|
message0: "%{BKY_LIST_V1_SET_TITLE}",
|
|
@@ -648,7 +648,7 @@ a.forBlock.list_set_v1 = function(e) {
|
|
|
648
648
|
return `${o}[${t}] = ${n};
|
|
649
649
|
`;
|
|
650
650
|
};
|
|
651
|
-
const
|
|
651
|
+
const Mi = {
|
|
652
652
|
// logic_compare
|
|
653
653
|
EQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_EQ}",
|
|
654
654
|
NEQ: "%{BKY_LOGIC_V1_COMPARE_TOOLTIP_NEQ}",
|
|
@@ -662,9 +662,9 @@ const Ri = {
|
|
|
662
662
|
};
|
|
663
663
|
Y.register(
|
|
664
664
|
"logic_op_tooltip_v1",
|
|
665
|
-
Y.buildTooltipForDropdown("OP",
|
|
665
|
+
Y.buildTooltipForDropdown("OP", Mi)
|
|
666
666
|
);
|
|
667
|
-
|
|
667
|
+
g([
|
|
668
668
|
{
|
|
669
669
|
type: "logic_boolean_v1",
|
|
670
670
|
message0: "%1",
|
|
@@ -687,7 +687,7 @@ m([
|
|
|
687
687
|
a.forBlock.logic_boolean_v1 = function(e) {
|
|
688
688
|
return [e.getFieldValue("BOOL") === "TRUE" ? "true" : "false", c.ATOMIC];
|
|
689
689
|
};
|
|
690
|
-
const
|
|
690
|
+
const Di = {
|
|
691
691
|
onchange: function(e) {
|
|
692
692
|
this.prevBlocks_ || (this.prevBlocks_ = [null, null]);
|
|
693
693
|
const o = this.getInputTargetBlock("A"), t = this.getInputTargetBlock("B");
|
|
@@ -695,11 +695,11 @@ const Mi = {
|
|
|
695
695
|
o.outputConnection,
|
|
696
696
|
t.outputConnection
|
|
697
697
|
)) {
|
|
698
|
-
|
|
698
|
+
X.setGroup(e.group);
|
|
699
699
|
const n = this.prevBlocks_[0];
|
|
700
700
|
n !== o && (o.unplug(), n && !n.isDisposed() && !n.isShadow() && this.getInput("A").connection.connect(n.outputConnection));
|
|
701
701
|
const i = this.prevBlocks_[1];
|
|
702
|
-
i !== t && (t.unplug(), i && !i.isDisposed() && !i.isShadow() && this.getInput("B").connection.connect(i.outputConnection)), this.bumpNeighbours(),
|
|
702
|
+
i !== t && (t.unplug(), i && !i.isDisposed() && !i.isShadow() && this.getInput("B").connection.connect(i.outputConnection)), this.bumpNeighbours(), X.setGroup(!1);
|
|
703
703
|
}
|
|
704
704
|
this.prevBlocks_[0] = this.getInputTargetBlock("A"), this.prevBlocks_[1] = this.getInputTargetBlock("B");
|
|
705
705
|
}
|
|
@@ -707,10 +707,10 @@ const Mi = {
|
|
|
707
707
|
Y.register(
|
|
708
708
|
"logic_compare_v1",
|
|
709
709
|
function() {
|
|
710
|
-
this.mixin(
|
|
710
|
+
this.mixin(Di);
|
|
711
711
|
}
|
|
712
712
|
);
|
|
713
|
-
|
|
713
|
+
g([
|
|
714
714
|
{
|
|
715
715
|
type: "logic_compare_v1",
|
|
716
716
|
message0: "%1 %2 %3",
|
|
@@ -757,13 +757,13 @@ a.forBlock.logic_compare_v1 = function(e) {
|
|
|
757
757
|
const i = a.valueToCode(e, "A", n) || "0", r = a.valueToCode(e, "B", n) || "0";
|
|
758
758
|
return [`${i} ${t} ${r}`, n];
|
|
759
759
|
};
|
|
760
|
-
const
|
|
760
|
+
const xi = {
|
|
761
761
|
elseIfCount_: 0,
|
|
762
762
|
hasElse_: !1,
|
|
763
763
|
mutationToDom: function() {
|
|
764
764
|
if (this.elseIfCount_ <= 0 && !this.hasElse_)
|
|
765
765
|
return null;
|
|
766
|
-
const e =
|
|
766
|
+
const e = m.xml.createElement("mutation");
|
|
767
767
|
return this.elseIfCount_ > 0 && e.setAttribute("elseIf", String(this.elseIfCount_)), this.hasElse_ && e.setAttribute("else", "TRUE"), e;
|
|
768
768
|
},
|
|
769
769
|
domToMutation: function(e) {
|
|
@@ -885,11 +885,11 @@ const Di = {
|
|
|
885
885
|
};
|
|
886
886
|
Y.registerMutator(
|
|
887
887
|
"logic_if_v1_mutator",
|
|
888
|
-
|
|
888
|
+
xi,
|
|
889
889
|
void 0,
|
|
890
890
|
["logic_if_else_if_v1", "logic_if_else_v1"]
|
|
891
891
|
);
|
|
892
|
-
|
|
892
|
+
g([
|
|
893
893
|
{
|
|
894
894
|
type: "logic_if_v1",
|
|
895
895
|
message0: "%{BKY_LOGIC_IF} %1",
|
|
@@ -969,7 +969,7 @@ a.forBlock.logic_if_v1 = function(e) {
|
|
|
969
969
|
return t + `
|
|
970
970
|
`;
|
|
971
971
|
};
|
|
972
|
-
|
|
972
|
+
g([
|
|
973
973
|
{
|
|
974
974
|
type: "logic_negate_v1",
|
|
975
975
|
message0: "%{BKY_LOGIC_V1_NEGATE_TITLE}",
|
|
@@ -989,7 +989,7 @@ m([
|
|
|
989
989
|
a.forBlock.logic_negate_v1 = function(e) {
|
|
990
990
|
return [`!${a.valueToCode(e, "BOOL", c.LOGICAL_NOT) || "true"}`, c.LOGICAL_NOT];
|
|
991
991
|
};
|
|
992
|
-
|
|
992
|
+
g([
|
|
993
993
|
{
|
|
994
994
|
type: "logic_operation_v1",
|
|
995
995
|
message0: "%1 %2 %3",
|
|
@@ -1031,7 +1031,7 @@ a.forBlock.logic_operation_v1 = function(e) {
|
|
|
1031
1031
|
}
|
|
1032
1032
|
return [`${n} ${o} ${i}`, t];
|
|
1033
1033
|
};
|
|
1034
|
-
const
|
|
1034
|
+
const Pi = {
|
|
1035
1035
|
prevParentConnection_: null,
|
|
1036
1036
|
onchange: function(e) {
|
|
1037
1037
|
const o = this.getInputTargetBlock("THEN"), t = this.getInputTargetBlock("ELSE"), n = this.outputConnection.targetConnection;
|
|
@@ -1041,13 +1041,13 @@ const xi = {
|
|
|
1041
1041
|
r && !r.workspace.connectionChecker.doTypeChecks(
|
|
1042
1042
|
r.outputConnection,
|
|
1043
1043
|
n
|
|
1044
|
-
) && (
|
|
1044
|
+
) && (X.setGroup(e.group), n === this.prevParentConnection_ ? (this.unplug(), n.getSourceBlock().bumpNeighbours()) : (r.unplug(), r.bumpNeighbours()), X.setGroup(!1));
|
|
1045
1045
|
}
|
|
1046
1046
|
this.prevParentConnection_ = n;
|
|
1047
1047
|
}
|
|
1048
1048
|
};
|
|
1049
|
-
Y.registerMixin("logic_ternary_v1",
|
|
1050
|
-
|
|
1049
|
+
Y.registerMixin("logic_ternary_v1", Pi);
|
|
1050
|
+
g([
|
|
1051
1051
|
{
|
|
1052
1052
|
type: "logic_ternary_v1",
|
|
1053
1053
|
message0: "%{BKY_LOGIC_TERNARY_CONDITION} %1",
|
|
@@ -1083,7 +1083,7 @@ a.forBlock.logic_ternary_v1 = function(e) {
|
|
|
1083
1083
|
const o = a.valueToCode(e, "IF", c.CONDITIONAL) || "false", t = a.valueToCode(e, "THEN", c.CONDITIONAL) || "null", n = a.valueToCode(e, "ELSE", c.CONDITIONAL) || "null";
|
|
1084
1084
|
return [o + " ? " + t + " : " + n, c.CONDITIONAL];
|
|
1085
1085
|
};
|
|
1086
|
-
const
|
|
1086
|
+
const wi = {
|
|
1087
1087
|
customContextMenu: function(e) {
|
|
1088
1088
|
if (this.isInFlyout)
|
|
1089
1089
|
return;
|
|
@@ -1105,7 +1105,7 @@ const Pi = {
|
|
|
1105
1105
|
};
|
|
1106
1106
|
Y.registerMixin(
|
|
1107
1107
|
"contextMenu_newGetVariableBlock_v1",
|
|
1108
|
-
|
|
1108
|
+
wi
|
|
1109
1109
|
);
|
|
1110
1110
|
Y.register(
|
|
1111
1111
|
"flow_control_tooltip_v1",
|
|
@@ -1114,16 +1114,16 @@ Y.register(
|
|
|
1114
1114
|
CONTINUE: "%{BKY_LOOP_V1_FLOW_CONTROL_TOOLTIP_CONTINUE}"
|
|
1115
1115
|
})
|
|
1116
1116
|
);
|
|
1117
|
-
const
|
|
1117
|
+
const Vi = /* @__PURE__ */ new Set([
|
|
1118
1118
|
"repeat_v1",
|
|
1119
1119
|
"for_each_v1",
|
|
1120
1120
|
"for_v1",
|
|
1121
1121
|
"while_until_v1"
|
|
1122
|
-
]),
|
|
1122
|
+
]), Ui = {
|
|
1123
1123
|
getSurroundLoop: function() {
|
|
1124
1124
|
let e = this;
|
|
1125
1125
|
do {
|
|
1126
|
-
if (
|
|
1126
|
+
if (Vi.has(e.type))
|
|
1127
1127
|
return !0;
|
|
1128
1128
|
e = e == null ? void 0 : e.getSurroundParent();
|
|
1129
1129
|
} while (e);
|
|
@@ -1131,24 +1131,24 @@ const wi = /* @__PURE__ */ new Set([
|
|
|
1131
1131
|
},
|
|
1132
1132
|
onchange: function(e) {
|
|
1133
1133
|
const o = this.workspace;
|
|
1134
|
-
if (!o.isDragging || o.isDragging() || e.type !==
|
|
1134
|
+
if (!o.isDragging || o.isDragging() || e.type !== X.BLOCK_MOVE && e.type !== X.BLOCK_CREATE)
|
|
1135
1135
|
return;
|
|
1136
1136
|
const t = this.getSurroundLoop();
|
|
1137
1137
|
if (console.log(e.type, t), this.setWarningText(
|
|
1138
1138
|
t ? null : W.LOOP_FLOW_CONTROL_WARNING
|
|
1139
1139
|
), !this.isInFlyout)
|
|
1140
1140
|
try {
|
|
1141
|
-
|
|
1141
|
+
X.setRecordUndo(!1), this.setDisabledReason(!t, "FLOW_CONTROL_NOT_IN_LOOP");
|
|
1142
1142
|
} finally {
|
|
1143
|
-
|
|
1143
|
+
X.setRecordUndo(!0);
|
|
1144
1144
|
}
|
|
1145
1145
|
}
|
|
1146
1146
|
};
|
|
1147
1147
|
Y.registerMixin(
|
|
1148
1148
|
"flow_control_in_loop_check_v1",
|
|
1149
|
-
|
|
1149
|
+
Ui
|
|
1150
1150
|
);
|
|
1151
|
-
|
|
1151
|
+
g([
|
|
1152
1152
|
{
|
|
1153
1153
|
type: "flow_control_v1",
|
|
1154
1154
|
message0: "%1",
|
|
@@ -1176,7 +1176,7 @@ Y.register(
|
|
|
1176
1176
|
"VAR"
|
|
1177
1177
|
)
|
|
1178
1178
|
);
|
|
1179
|
-
|
|
1179
|
+
g([
|
|
1180
1180
|
{
|
|
1181
1181
|
type: "for_v1",
|
|
1182
1182
|
message0: "%{BKY_LOOP_V1_FOR_TITLE}",
|
|
@@ -1227,7 +1227,7 @@ Y.register(
|
|
|
1227
1227
|
"VAR"
|
|
1228
1228
|
)
|
|
1229
1229
|
);
|
|
1230
|
-
|
|
1230
|
+
g([
|
|
1231
1231
|
{
|
|
1232
1232
|
type: "for_each_v1",
|
|
1233
1233
|
message0: "%{BKY_LOOP_V1_FOR_EACH_TITLE}",
|
|
@@ -1264,7 +1264,7 @@ Y.register(
|
|
|
1264
1264
|
UNTIL: "%{BKY_LOOP_V1_WHILE_UNTIL_TOOLTIP_UNTIL}"
|
|
1265
1265
|
})
|
|
1266
1266
|
);
|
|
1267
|
-
|
|
1267
|
+
g([
|
|
1268
1268
|
{
|
|
1269
1269
|
type: "loop_while_until_v1",
|
|
1270
1270
|
message0: "%1 %2",
|
|
@@ -1311,7 +1311,7 @@ ${n}
|
|
|
1311
1311
|
}
|
|
1312
1312
|
`;
|
|
1313
1313
|
};
|
|
1314
|
-
const
|
|
1314
|
+
const Yi = {
|
|
1315
1315
|
// math_arithmetic
|
|
1316
1316
|
ADD: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_ADD}",
|
|
1317
1317
|
SUBTRACT: "%{BKY_MATH_V1_ARITHMETIC_TOOLTIP_SUBTRACT}",
|
|
@@ -1345,9 +1345,9 @@ const Ui = {
|
|
|
1345
1345
|
};
|
|
1346
1346
|
Y.register(
|
|
1347
1347
|
"math_op_tooltip_v1",
|
|
1348
|
-
Y.buildTooltipForDropdown("OP",
|
|
1348
|
+
Y.buildTooltipForDropdown("OP", Yi)
|
|
1349
1349
|
);
|
|
1350
|
-
|
|
1350
|
+
g([
|
|
1351
1351
|
{
|
|
1352
1352
|
type: "math_arithmetic_v1",
|
|
1353
1353
|
message0: "%1 %2 %3",
|
|
@@ -1391,7 +1391,7 @@ a.forBlock.math_arithmetic_v1 = function(e) {
|
|
|
1391
1391
|
}, [t, n] = o[e.getFieldValue("OP")], i = a.valueToCode(e, "A", n) || "0", r = a.valueToCode(e, "B", n) || "0";
|
|
1392
1392
|
return t ? [i + t + r, n] : [`Math.pow(${i}, ${r})`, c.FUNCTION_CALL];
|
|
1393
1393
|
};
|
|
1394
|
-
|
|
1394
|
+
g([
|
|
1395
1395
|
{
|
|
1396
1396
|
type: "math_constant_v1",
|
|
1397
1397
|
message0: "%1",
|
|
@@ -1425,7 +1425,7 @@ a.forBlock.math_constant_v1 = function(e) {
|
|
|
1425
1425
|
INFINITY: ["Infinity", c.ATOMIC]
|
|
1426
1426
|
}[e.getFieldValue("CONSTANT")];
|
|
1427
1427
|
};
|
|
1428
|
-
|
|
1428
|
+
g([
|
|
1429
1429
|
{
|
|
1430
1430
|
type: "math_constrain_v1",
|
|
1431
1431
|
message0: "%{BKY_MATH_V1_CONSTRAIN_TITLE}",
|
|
@@ -1457,7 +1457,7 @@ a.forBlock.math_constrain_v1 = function(e) {
|
|
|
1457
1457
|
const o = a.valueToCode(e, "VALUE", c.NONE) || "0", t = a.valueToCode(e, "LOW", c.NONE) || "0", n = a.valueToCode(e, "HIGH", c.NONE) || "Infinity";
|
|
1458
1458
|
return [`Math.min(Math.max(${o}, ${t}), ${n})`, c.FUNCTION_CALL];
|
|
1459
1459
|
};
|
|
1460
|
-
|
|
1460
|
+
g([
|
|
1461
1461
|
{
|
|
1462
1462
|
type: "math_modulo_v1",
|
|
1463
1463
|
message0: "%{BKY_MATH_V1_MODULO_TITLE}",
|
|
@@ -1484,7 +1484,7 @@ a.forBlock.math_modulo_v1 = function(e) {
|
|
|
1484
1484
|
const o = a.valueToCode(e, "DIVIDEND", c.MODULUS) || "0", t = a.valueToCode(e, "DIVISOR", c.MODULUS) || "0";
|
|
1485
1485
|
return [o + " % " + t, c.MODULUS];
|
|
1486
1486
|
};
|
|
1487
|
-
|
|
1487
|
+
g([
|
|
1488
1488
|
{
|
|
1489
1489
|
type: "math_number_v1",
|
|
1490
1490
|
message0: "%1",
|
|
@@ -1506,7 +1506,7 @@ a.forBlock.math_number_v1 = function(e) {
|
|
|
1506
1506
|
const o = Number(e.getFieldValue("NUM")), t = o >= 0 ? c.ATOMIC : c.UNARY_NEGATION;
|
|
1507
1507
|
return [String(o), t];
|
|
1508
1508
|
};
|
|
1509
|
-
|
|
1509
|
+
g([
|
|
1510
1510
|
{
|
|
1511
1511
|
type: "math_number_property_v1",
|
|
1512
1512
|
message0: "%{BKY_MATH_V1_NUMBER_PROPERTY_TITLE}",
|
|
@@ -1578,7 +1578,7 @@ function ${a.FUNCTION_NAME_PLACEHOLDER_}(n) {
|
|
|
1578
1578
|
s = l + n;
|
|
1579
1579
|
return [s, r];
|
|
1580
1580
|
};
|
|
1581
|
-
|
|
1581
|
+
g([
|
|
1582
1582
|
{
|
|
1583
1583
|
type: "math_on_list_v1",
|
|
1584
1584
|
message0: "%{BKY_MATH_V1_ON_LIST_TITLE}",
|
|
@@ -1728,7 +1728,7 @@ function ${a.FUNCTION_NAME_PLACEHOLDER_}(list) {
|
|
|
1728
1728
|
}
|
|
1729
1729
|
return [n, c.FUNCTION_CALL];
|
|
1730
1730
|
};
|
|
1731
|
-
|
|
1731
|
+
g([
|
|
1732
1732
|
{
|
|
1733
1733
|
type: "math_random_float_v1",
|
|
1734
1734
|
message0: "%{BKY_MATH_V1_RANDOM_FLOAT_TITLE}",
|
|
@@ -1741,7 +1741,7 @@ m([
|
|
|
1741
1741
|
a.forBlock.math_random_float_v1 = function() {
|
|
1742
1742
|
return ["Math.random()", c.FUNCTION_CALL];
|
|
1743
1743
|
};
|
|
1744
|
-
|
|
1744
|
+
g([
|
|
1745
1745
|
{
|
|
1746
1746
|
type: "math_random_int_v1",
|
|
1747
1747
|
message0: "%{BKY_MATH_V1_RANDOM_INT_TITLE}",
|
|
@@ -1781,7 +1781,7 @@ function ${a.FUNCTION_NAME_PLACEHOLDER_}(a, b) {
|
|
|
1781
1781
|
`
|
|
1782
1782
|
) + "(" + o + ", " + t + ")", c.FUNCTION_CALL];
|
|
1783
1783
|
};
|
|
1784
|
-
|
|
1784
|
+
g([
|
|
1785
1785
|
{
|
|
1786
1786
|
type: "math_round_v1",
|
|
1787
1787
|
message0: "%1 %2",
|
|
@@ -1823,7 +1823,7 @@ a.forBlock.math_round_v1 = function(e) {
|
|
|
1823
1823
|
}
|
|
1824
1824
|
return [n, c.FUNCTION_CALL];
|
|
1825
1825
|
};
|
|
1826
|
-
|
|
1826
|
+
g([
|
|
1827
1827
|
{
|
|
1828
1828
|
type: "math_single_v1",
|
|
1829
1829
|
message0: "%1 %2",
|
|
@@ -1886,7 +1886,7 @@ a.forBlock.math_single_v1 = function(e) {
|
|
|
1886
1886
|
}
|
|
1887
1887
|
return [t, c.DIVISION];
|
|
1888
1888
|
};
|
|
1889
|
-
|
|
1889
|
+
g([
|
|
1890
1890
|
{
|
|
1891
1891
|
type: "math_trig_v1",
|
|
1892
1892
|
message0: "%1 %2",
|
|
@@ -1948,31 +1948,31 @@ a.forBlock.math_trig_v1 = function(e) {
|
|
|
1948
1948
|
}
|
|
1949
1949
|
return [n, c.DIVISION];
|
|
1950
1950
|
};
|
|
1951
|
-
const
|
|
1951
|
+
const Ki = m.xml, Fi = {
|
|
1952
1952
|
init: function() {
|
|
1953
1953
|
this.appendDummyInput().appendField(
|
|
1954
1954
|
"%{BKY_OBJECT_V1_CREATE_CONTAINER_TITLE}"
|
|
1955
1955
|
), this.appendStatementInput("STACK"), this.setStyle("object_blocks"), this.contextMenu = !1;
|
|
1956
1956
|
}
|
|
1957
1957
|
};
|
|
1958
|
-
|
|
1959
|
-
const
|
|
1958
|
+
pe.object_create_container_v1 = Fi;
|
|
1959
|
+
const Hi = {
|
|
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
|
-
|
|
1965
|
-
const
|
|
1964
|
+
pe.object_create_item_v1 = Hi;
|
|
1965
|
+
const Gi = {
|
|
1966
1966
|
init: function() {
|
|
1967
1967
|
this.itemCount_ = 0, this.appendDummyInput().appendField("%{BKY_OBJECT_V1_CREATE_TITLE}"), this.setMutator(
|
|
1968
|
-
new
|
|
1968
|
+
new Vt.MutatorIcon(
|
|
1969
1969
|
["object_create_item_v1"],
|
|
1970
1970
|
this
|
|
1971
1971
|
)
|
|
1972
1972
|
), this.setOutput(!0, "Object"), this.setStyle("object_blocks"), this.setTooltip("%{BKY_OBJECT_V1_CREATE_TOOLTIP}"), this.setHelpUrl("%{BKY_OBJECT_V1_CREATE_HELPURL}");
|
|
1973
1973
|
},
|
|
1974
1974
|
mutationToDom: function() {
|
|
1975
|
-
const e =
|
|
1975
|
+
const e = Ki.createElement("mutation");
|
|
1976
1976
|
return e.setAttribute("items", String(this.itemCount_)), e;
|
|
1977
1977
|
},
|
|
1978
1978
|
domToMutation: function(e) {
|
|
@@ -2042,7 +2042,7 @@ const Hi = {
|
|
|
2042
2042
|
this.removeInput("ADD" + e);
|
|
2043
2043
|
}
|
|
2044
2044
|
};
|
|
2045
|
-
|
|
2045
|
+
pe.object_create_v1 = Gi;
|
|
2046
2046
|
a.forBlock.object_create_v1 = function(e) {
|
|
2047
2047
|
const o = e;
|
|
2048
2048
|
let t = "{";
|
|
@@ -2052,7 +2052,7 @@ a.forBlock.object_create_v1 = function(e) {
|
|
|
2052
2052
|
}
|
|
2053
2053
|
return t += "}", [t, c.ATOMIC];
|
|
2054
2054
|
};
|
|
2055
|
-
|
|
2055
|
+
g([
|
|
2056
2056
|
{
|
|
2057
2057
|
type: "object_delete_v1",
|
|
2058
2058
|
message0: "%{BKY_OBJECT_V1_DELETE_TITLE}",
|
|
@@ -2119,7 +2119,7 @@ function ${a.FUNCTION_NAME_PLACEHOLDER_}(obj, key) {
|
|
|
2119
2119
|
return `${o}(${t}, ${n});
|
|
2120
2120
|
`;
|
|
2121
2121
|
};
|
|
2122
|
-
|
|
2122
|
+
g([
|
|
2123
2123
|
{
|
|
2124
2124
|
type: "object_from_json_v1",
|
|
2125
2125
|
message0: "%{BKY_OBJECT_V1_FROM_JSON_TITLE}",
|
|
@@ -2140,7 +2140,7 @@ m([
|
|
|
2140
2140
|
a.forBlock.object_from_json_v1 = function(e) {
|
|
2141
2141
|
return [`__parseJsonV1__(${a.valueToCode(e, "JSON", c.NONE) || "''"})`, c.FUNCTION_CALL];
|
|
2142
2142
|
};
|
|
2143
|
-
|
|
2143
|
+
g([
|
|
2144
2144
|
{
|
|
2145
2145
|
type: "object_get_v1",
|
|
2146
2146
|
message0: "%{BKY_OBJECT_V1_GET_TITLE}",
|
|
@@ -2205,7 +2205,7 @@ function ${a.FUNCTION_NAME_PLACEHOLDER_}(obj, key) {
|
|
|
2205
2205
|
), t = a.valueToCode(e, "OBJECT", c.ATOMIC) || "null", n = a.valueToCode(e, "KEY", c.ATOMIC) || "''";
|
|
2206
2206
|
return [`${o}(${t}, ${n})`, c.FUNCTION_CALL];
|
|
2207
2207
|
};
|
|
2208
|
-
|
|
2208
|
+
g([
|
|
2209
2209
|
{
|
|
2210
2210
|
type: "object_set_v1",
|
|
2211
2211
|
message0: "%{BKY_OBJECT_V1_SET_TITLE}",
|
|
@@ -2279,7 +2279,7 @@ function ${a.FUNCTION_NAME_PLACEHOLDER_}(obj, key, val) {
|
|
|
2279
2279
|
return `${o}(${t}, ${n}, ${i});
|
|
2280
2280
|
`;
|
|
2281
2281
|
};
|
|
2282
|
-
|
|
2282
|
+
g([
|
|
2283
2283
|
{
|
|
2284
2284
|
type: "object_to_json_v1",
|
|
2285
2285
|
message0: "%{BKY_OBJECT_V1_TO_JSON_TITLE}",
|
|
@@ -2300,13 +2300,13 @@ m([
|
|
|
2300
2300
|
a.forBlock.object_to_json_v1 = function(e) {
|
|
2301
2301
|
return [`__jsonStringifyV1__(${a.valueToCode(e, "OBJECT", c.NONE) || "null"})`, c.FUNCTION_CALL];
|
|
2302
2302
|
};
|
|
2303
|
-
const Bo =
|
|
2303
|
+
const Bo = m.xml, Xi = {
|
|
2304
2304
|
init: function() {
|
|
2305
|
-
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new
|
|
2305
|
+
this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_CONTAINER_TITLE}").appendField(new Jn(!1), "WITHRETURN"), this.appendStatementInput("STACK"), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
2306
2306
|
}
|
|
2307
2307
|
};
|
|
2308
|
-
|
|
2309
|
-
const
|
|
2308
|
+
pe.procedure_def_container_v1 = Xi;
|
|
2309
|
+
const $i = {
|
|
2310
2310
|
init: function() {
|
|
2311
2311
|
const e = new vo(uo.DEFAULT_ARG);
|
|
2312
2312
|
e.setValidator(this.validator_), this.appendDummyInput().appendField("%{BKY_PROCEDURE_V1_DEF_ITEM_TITLE}").appendField(e, "NAME"), this.setPreviousStatement(!0), this.setNextStatement(!0), this.setStyle("procedure_blocks"), this.contextMenu = !1;
|
|
@@ -2328,15 +2328,15 @@ const Xi = {
|
|
|
2328
2328
|
return e;
|
|
2329
2329
|
}
|
|
2330
2330
|
};
|
|
2331
|
-
|
|
2332
|
-
const
|
|
2331
|
+
pe.procedure_def_item_v1 = $i;
|
|
2332
|
+
const ji = {
|
|
2333
2333
|
init: function() {
|
|
2334
2334
|
this.withReturn = !1, this.args = [];
|
|
2335
2335
|
const e = new vo(
|
|
2336
2336
|
uo.findLegalName("", this)
|
|
2337
2337
|
);
|
|
2338
2338
|
e.setValidator(uo.rename), e.setSpellcheck(!1), this.appendDummyInput("DUMMY").appendField(e, "NAME"), this.appendStatementInput("HANDLE"), this.setMutator(
|
|
2339
|
-
new
|
|
2339
|
+
new Vt.MutatorIcon(
|
|
2340
2340
|
["procedure_def_item_v1"],
|
|
2341
2341
|
this
|
|
2342
2342
|
)
|
|
@@ -2422,20 +2422,20 @@ const $i = {
|
|
|
2422
2422
|
n.setKeyName(o.name, "");
|
|
2423
2423
|
else
|
|
2424
2424
|
try {
|
|
2425
|
-
|
|
2425
|
+
X.disable(), n = ln(this.workspace, o.name, ""), n.outputConnection.connect(t);
|
|
2426
2426
|
} finally {
|
|
2427
|
-
|
|
2427
|
+
X.enable();
|
|
2428
2428
|
}
|
|
2429
2429
|
}
|
|
2430
2430
|
}
|
|
2431
2431
|
};
|
|
2432
|
-
|
|
2433
|
-
const
|
|
2432
|
+
pe.procedure_def_v1 = ji;
|
|
2433
|
+
const Wi = m.xml, Ji = {
|
|
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}");
|
|
2436
2436
|
},
|
|
2437
2437
|
mutationToDom: function() {
|
|
2438
|
-
const e =
|
|
2438
|
+
const e = Wi.createElement("mutation");
|
|
2439
2439
|
return e.setAttribute("withreturn", this.withReturn ? "TRUE" : "FALSE"), e;
|
|
2440
2440
|
},
|
|
2441
2441
|
domToMutation: function(e) {
|
|
@@ -2455,7 +2455,7 @@ const ji = T.xml, Wi = {
|
|
|
2455
2455
|
},
|
|
2456
2456
|
onchange: function(e) {
|
|
2457
2457
|
var o;
|
|
2458
|
-
if (e.type ===
|
|
2458
|
+
if (e.type === X.BLOCK_DRAG) {
|
|
2459
2459
|
const t = e;
|
|
2460
2460
|
if (t.isStart || !((o = t.blocks) != null && o.find((n) => n.id === this.id)))
|
|
2461
2461
|
return;
|
|
@@ -2486,14 +2486,14 @@ 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
|
+
pe.procedure_return_v1 = Ji;
|
|
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"};
|
|
2493
2493
|
` : `return;
|
|
2494
2494
|
`;
|
|
2495
2495
|
};
|
|
2496
|
-
|
|
2496
|
+
g([
|
|
2497
2497
|
{
|
|
2498
2498
|
type: "text_v1",
|
|
2499
2499
|
message0: "%{BKY_TEXT_V1_TEXT_TITLE}",
|
|
@@ -2514,9 +2514,9 @@ m([
|
|
|
2514
2514
|
a.forBlock.text_v1 = function(e) {
|
|
2515
2515
|
return [a.quote_(e.getFieldValue("TEXT")), c.ATOMIC];
|
|
2516
2516
|
};
|
|
2517
|
-
const
|
|
2518
|
-
function
|
|
2519
|
-
return
|
|
2517
|
+
const zi = /^\s*'([^']|\\')*'\s*$/;
|
|
2518
|
+
function It(e) {
|
|
2519
|
+
return zi.test(e) ? [e, c.ATOMIC] : [`String(${e})`, c.FUNCTION_CALL];
|
|
2520
2520
|
}
|
|
2521
2521
|
Y.register(
|
|
2522
2522
|
"text_append_tooltip_v1",
|
|
@@ -2525,7 +2525,7 @@ Y.register(
|
|
|
2525
2525
|
"VAR"
|
|
2526
2526
|
)
|
|
2527
2527
|
);
|
|
2528
|
-
|
|
2528
|
+
g([
|
|
2529
2529
|
{
|
|
2530
2530
|
type: "text_append_v1",
|
|
2531
2531
|
message0: "%{BKY_TEXT_V1_APPEND_TITLE}",
|
|
@@ -2552,10 +2552,10 @@ a.forBlock.text_append_v1 = function(e) {
|
|
|
2552
2552
|
e.getFieldValue("VAR"),
|
|
2553
2553
|
yo.NameType.VARIABLE
|
|
2554
2554
|
), t = a.valueToCode(e, "TEXT", c.NONE) || "''";
|
|
2555
|
-
return `${o} += ${
|
|
2555
|
+
return `${o} += ${It(t)};
|
|
2556
2556
|
`;
|
|
2557
2557
|
};
|
|
2558
|
-
|
|
2558
|
+
g([
|
|
2559
2559
|
{
|
|
2560
2560
|
type: "text_change_case_v1",
|
|
2561
2561
|
message0: "%{BKY_TEXT_V1_CHANGE_CASE_TITLE}",
|
|
@@ -2601,7 +2601,7 @@ function ${a.FUNCTION_NAME_PLACEHOLDER_}(str) {
|
|
|
2601
2601
|
`
|
|
2602
2602
|
) + "(" + n + ")", [i, c.FUNCTION_CALL];
|
|
2603
2603
|
};
|
|
2604
|
-
|
|
2604
|
+
g([
|
|
2605
2605
|
{
|
|
2606
2606
|
type: "text_char_at_v1",
|
|
2607
2607
|
message0: "%{BKY_TEXT_V1_CHAR_AT_TITLE}",
|
|
@@ -2628,7 +2628,7 @@ a.forBlock.text_char_at_v1 = function(e) {
|
|
|
2628
2628
|
const o = a.valueToCode(e, "VALUE", c.MEMBER) || "[]", t = a.getAdjusted(e, "AT");
|
|
2629
2629
|
return [`${o}.charAt(${t})`, c.FUNCTION_CALL];
|
|
2630
2630
|
};
|
|
2631
|
-
|
|
2631
|
+
g([
|
|
2632
2632
|
{
|
|
2633
2633
|
type: "text_count_v1",
|
|
2634
2634
|
message0: "%{BKY_TEXT_V1_COUNT_TITLE}",
|
|
@@ -2666,7 +2666,7 @@ function ${a.FUNCTION_NAME_PLACEHOLDER_}(haystack, needle) {
|
|
|
2666
2666
|
`
|
|
2667
2667
|
)}(${o}, ${t})`, c.FUNCTION_CALL];
|
|
2668
2668
|
};
|
|
2669
|
-
|
|
2669
|
+
g([
|
|
2670
2670
|
{
|
|
2671
2671
|
type: "text_index_of_v1",
|
|
2672
2672
|
message0: "%{BKY_TEXT_V1_INDEX_OF_TITLE}",
|
|
@@ -2701,7 +2701,7 @@ a.forBlock.text_index_of_v1 = function(e) {
|
|
|
2701
2701
|
const o = e.getFieldValue("OP") === "FIRST" ? "indexOf" : "lastIndexOf", t = a.valueToCode(e, "TEXT", c.MEMBER) || "''", n = a.valueToCode(e, "SUBSTR", c.NONE) || "''";
|
|
2702
2702
|
return [`${t}.${o}(${n})`, c.FUNCTION_CALL];
|
|
2703
2703
|
};
|
|
2704
|
-
|
|
2704
|
+
g([
|
|
2705
2705
|
{
|
|
2706
2706
|
type: "text_is_empty_v1",
|
|
2707
2707
|
message0: "%{BKY_TEXT_V1_IS_EMPTY_TITLE}",
|
|
@@ -2721,10 +2721,10 @@ m([
|
|
|
2721
2721
|
a.forBlock.text_is_empty_v1 = function(e) {
|
|
2722
2722
|
return [`!${a.valueToCode(e, "VALUE", c.MEMBER) || "''"}.length`, c.LOGICAL_NOT];
|
|
2723
2723
|
};
|
|
2724
|
-
const
|
|
2724
|
+
const qi = m.xml, Qi = {
|
|
2725
2725
|
itemCount_: 0,
|
|
2726
2726
|
mutationToDom: function() {
|
|
2727
|
-
const e =
|
|
2727
|
+
const e = qi.createElement("mutation");
|
|
2728
2728
|
return e.setAttribute("items", `${this.itemCount_}`), e;
|
|
2729
2729
|
},
|
|
2730
2730
|
domToMutation: function(e) {
|
|
@@ -2796,15 +2796,15 @@ const zi = T.xml, qi = {
|
|
|
2796
2796
|
for (let e = this.itemCount_; this.getInput("ADD" + e); e++)
|
|
2797
2797
|
this.removeInput("ADD" + e);
|
|
2798
2798
|
}
|
|
2799
|
-
},
|
|
2800
|
-
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new
|
|
2799
|
+
}, Zi = function() {
|
|
2800
|
+
this.itemCount_ = 2, this.updateShape_(), this.setMutator(new Vt.MutatorIcon(["text_join_item_v1"], this));
|
|
2801
2801
|
};
|
|
2802
2802
|
Y.registerMutator(
|
|
2803
2803
|
"text_join_mutator_v1",
|
|
2804
|
-
|
|
2805
|
-
|
|
2804
|
+
Qi,
|
|
2805
|
+
Zi
|
|
2806
2806
|
);
|
|
2807
|
-
|
|
2807
|
+
g([
|
|
2808
2808
|
{
|
|
2809
2809
|
type: "text_join_v1",
|
|
2810
2810
|
message0: "",
|
|
@@ -2845,11 +2845,11 @@ a.forBlock.text_join_v1 = function(e) {
|
|
|
2845
2845
|
return ["''", c.ATOMIC];
|
|
2846
2846
|
case 1: {
|
|
2847
2847
|
const t = a.valueToCode(o, "ADD0", c.NONE) || "''";
|
|
2848
|
-
return
|
|
2848
|
+
return It(t);
|
|
2849
2849
|
}
|
|
2850
2850
|
case 2: {
|
|
2851
2851
|
const t = a.valueToCode(o, "ADD0", c.NONE) || "''", n = a.valueToCode(o, "ADD1", c.NONE) || "''";
|
|
2852
|
-
return [
|
|
2852
|
+
return [It(t)[0] + " + " + It(n)[0], c.ADDITION];
|
|
2853
2853
|
}
|
|
2854
2854
|
default: {
|
|
2855
2855
|
const t = new Array(o.itemCount_);
|
|
@@ -2859,7 +2859,7 @@ a.forBlock.text_join_v1 = function(e) {
|
|
|
2859
2859
|
}
|
|
2860
2860
|
}
|
|
2861
2861
|
};
|
|
2862
|
-
|
|
2862
|
+
g([
|
|
2863
2863
|
{
|
|
2864
2864
|
type: "text_length_v1",
|
|
2865
2865
|
message0: "%{BKY_TEXT_V1_LENGTH_TITLE}",
|
|
@@ -2879,7 +2879,7 @@ m([
|
|
|
2879
2879
|
a.forBlock.text_length_v1 = function(e) {
|
|
2880
2880
|
return [`${a.valueToCode(e, "VALUE", c.MEMBER) || "''"}.length`, c.MEMBER];
|
|
2881
2881
|
};
|
|
2882
|
-
|
|
2882
|
+
g([
|
|
2883
2883
|
{
|
|
2884
2884
|
type: "text_replace_v1",
|
|
2885
2885
|
message0: "%{BKY_TEXT_V1_REPLACE_TITLE}",
|
|
@@ -2920,7 +2920,7 @@ function ${a.FUNCTION_NAME_PLACEHOLDER_}(haystack, needle, replacement) {
|
|
|
2920
2920
|
`
|
|
2921
2921
|
)}(${o}, ${t}, ${n})`, c.FUNCTION_CALL];
|
|
2922
2922
|
};
|
|
2923
|
-
|
|
2923
|
+
g([
|
|
2924
2924
|
{
|
|
2925
2925
|
type: "text_reverse_v1",
|
|
2926
2926
|
message0: "%{BKY_TEXT_V1_REVERSE_TITLE}",
|
|
@@ -2941,7 +2941,7 @@ m([
|
|
|
2941
2941
|
a.forBlock.text_reverse_v1 = function(e) {
|
|
2942
2942
|
return [(a.valueToCode(e, "TEXT", c.MEMBER) || "''") + ".split('').reverse().join('')", c.FUNCTION_CALL];
|
|
2943
2943
|
};
|
|
2944
|
-
|
|
2944
|
+
g([
|
|
2945
2945
|
{
|
|
2946
2946
|
type: "text_split_v1",
|
|
2947
2947
|
message0: "%{BKY_TEXT_V1_SPLIT_TITLE}",
|
|
@@ -2968,7 +2968,7 @@ a.forBlock.text_split_v1 = function(e) {
|
|
|
2968
2968
|
const o = a.valueToCode(e, "TEXT", c.MEMBER) || "''", t = a.valueToCode(e, "DELIM", c.NONE) || "''";
|
|
2969
2969
|
return [`${o}.split(${t})`, c.FUNCTION_CALL];
|
|
2970
2970
|
};
|
|
2971
|
-
|
|
2971
|
+
g([
|
|
2972
2972
|
{
|
|
2973
2973
|
type: "text_substring_v1",
|
|
2974
2974
|
message0: "%{BKY_TEXT_V1_SUBSTRING_TITLE}",
|
|
@@ -3000,7 +3000,7 @@ a.forBlock.text_substring_v1 = function(e) {
|
|
|
3000
3000
|
const o = a.valueToCode(e, "TEXT", c.MEMBER) || "''", t = a.getAdjusted(e, "START"), n = a.getAdjusted(e, "END", 1);
|
|
3001
3001
|
return [`${o}.slice(${t}, ${n})`, c.FUNCTION_CALL];
|
|
3002
3002
|
};
|
|
3003
|
-
|
|
3003
|
+
g([
|
|
3004
3004
|
{
|
|
3005
3005
|
type: "text_trim_v1",
|
|
3006
3006
|
message0: "%{BKY_TEXT_V1_TRIM_TITLE}",
|
|
@@ -3034,7 +3034,7 @@ a.forBlock.text_trim_v1 = function(e) {
|
|
|
3034
3034
|
}[e.getFieldValue("MODE")];
|
|
3035
3035
|
return [`__trimV1__(${o}, ${n})`, c.ATOMIC];
|
|
3036
3036
|
};
|
|
3037
|
-
const
|
|
3037
|
+
const er = {
|
|
3038
3038
|
init: function() {
|
|
3039
3039
|
this.appendDummyInput().appendField("%{BKY_TIME_V1_CREATE_TIMER_TITLE}"), this.setPreviousStatement(!0, null), this.setNextStatement(!0, null), this.setStyle("time_blocks"), this.setTooltip("%{BKY_TIME_V1_CREATE_TIMER_TOOLTIP}"), this.setHelpUrl("%{BKY_TIME_V1_CREATE_TIMER_HELPURL}");
|
|
3040
3040
|
},
|
|
@@ -3050,17 +3050,17 @@ const Zi = {
|
|
|
3050
3050
|
updateShadow_: function() {
|
|
3051
3051
|
var e, o, t, n, i, r, l, s;
|
|
3052
3052
|
this.isInsertionMarker() || ((o = (e = this.getInput("INTERVAL")) == null ? void 0 : e.connection) == null || o.setShadowDom(
|
|
3053
|
-
|
|
3053
|
+
ht({ type: "number", default: 1e3 })
|
|
3054
3054
|
), (n = (t = this.getInput("LOOP")) == null ? void 0 : t.connection) == null || n.setShadowDom(
|
|
3055
|
-
|
|
3055
|
+
ht({ type: "boolean", default: !1 })
|
|
3056
3056
|
), (r = (i = this.getInput("COUNT")) == null ? void 0 : i.connection) == null || r.setShadowDom(
|
|
3057
|
-
|
|
3057
|
+
ht({ type: "number", default: 1 })
|
|
3058
3058
|
), (s = (l = this.getInput("IMMEDIATE")) == null ? void 0 : l.connection) == null || s.setShadowDom(
|
|
3059
|
-
|
|
3059
|
+
ht({ type: "boolean", default: !1 })
|
|
3060
3060
|
));
|
|
3061
3061
|
}
|
|
3062
3062
|
};
|
|
3063
|
-
|
|
3063
|
+
pe.create_timer_v1 = er;
|
|
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() {
|
|
@@ -3068,7 +3068,7 @@ a.forBlock.create_timer_v1 = function(e) {
|
|
|
3068
3068
|
});
|
|
3069
3069
|
`;
|
|
3070
3070
|
};
|
|
3071
|
-
|
|
3071
|
+
g([
|
|
3072
3072
|
{
|
|
3073
3073
|
type: "delay_v1",
|
|
3074
3074
|
message0: "%{BKY_TIME_V1_DELAY_TITLE}",
|
|
@@ -3090,18 +3090,18 @@ a.forBlock.delay_v1 = function(e) {
|
|
|
3090
3090
|
return `__delayV1__(${a.valueToCode(e, "MS", c.ATOMIC) || "0"});
|
|
3091
3091
|
`;
|
|
3092
3092
|
};
|
|
3093
|
-
const
|
|
3093
|
+
const tr = {
|
|
3094
3094
|
customContextMenu: function(e) {
|
|
3095
3095
|
if (this.isInFlyout) {
|
|
3096
3096
|
if (this.type === "variables_get_v1" || this.type === "variables_get_v1_reporter") {
|
|
3097
3097
|
const o = {
|
|
3098
3098
|
text: W.RENAME_VARIABLE,
|
|
3099
3099
|
enabled: !0,
|
|
3100
|
-
callback:
|
|
3100
|
+
callback: or(this)
|
|
3101
3101
|
}, t = this.getField("VAR").getText(), n = {
|
|
3102
3102
|
text: W.DELETE_VARIABLE.replace("%1", t),
|
|
3103
3103
|
enabled: !0,
|
|
3104
|
-
callback:
|
|
3104
|
+
callback: nr(this)
|
|
3105
3105
|
};
|
|
3106
3106
|
e.unshift(o), e.unshift(n);
|
|
3107
3107
|
}
|
|
@@ -3119,12 +3119,12 @@ const er = {
|
|
|
3119
3119
|
});
|
|
3120
3120
|
}
|
|
3121
3121
|
}
|
|
3122
|
-
},
|
|
3122
|
+
}, or = function(e) {
|
|
3123
3123
|
return function() {
|
|
3124
3124
|
const o = e.workspace, n = e.getField("VAR").getVariable();
|
|
3125
|
-
|
|
3125
|
+
Ot.renameVariable(o, n);
|
|
3126
3126
|
};
|
|
3127
|
-
},
|
|
3127
|
+
}, nr = function(e) {
|
|
3128
3128
|
return function() {
|
|
3129
3129
|
const o = e.workspace, n = e.getField("VAR").getVariable();
|
|
3130
3130
|
o.deleteVariableById(n.getId()), o.refreshToolboxSelection();
|
|
@@ -3132,9 +3132,9 @@ const er = {
|
|
|
3132
3132
|
};
|
|
3133
3133
|
Y.registerMixin(
|
|
3134
3134
|
"context_menu_variable_v1",
|
|
3135
|
-
|
|
3135
|
+
tr
|
|
3136
3136
|
);
|
|
3137
|
-
|
|
3137
|
+
g([
|
|
3138
3138
|
{
|
|
3139
3139
|
type: "variable_get_v1",
|
|
3140
3140
|
message0: "%1",
|
|
@@ -3157,7 +3157,7 @@ a.forBlock.variable_get_v1 = function(e) {
|
|
|
3157
3157
|
yo.NameType.VARIABLE
|
|
3158
3158
|
), c.ATOMIC];
|
|
3159
3159
|
};
|
|
3160
|
-
|
|
3160
|
+
g([
|
|
3161
3161
|
{
|
|
3162
3162
|
type: "variable_set_v1",
|
|
3163
3163
|
message0: "%{BKY_VARIABLE_V1_SET_TITLE}",
|
|
@@ -3188,8 +3188,8 @@ a.forBlock.variable_set_v1 = function(e) {
|
|
|
3188
3188
|
return `${o} = ${t};
|
|
3189
3189
|
`;
|
|
3190
3190
|
};
|
|
3191
|
-
const Ro =
|
|
3192
|
-
function
|
|
3191
|
+
const Ro = m.xml;
|
|
3192
|
+
function ir() {
|
|
3193
3193
|
const e = [];
|
|
3194
3194
|
{
|
|
3195
3195
|
const o = Ro.createElement("label");
|
|
@@ -3201,23 +3201,23 @@ function nr() {
|
|
|
3201
3201
|
}
|
|
3202
3202
|
return e;
|
|
3203
3203
|
}
|
|
3204
|
-
const
|
|
3204
|
+
const an = {
|
|
3205
3205
|
name: "INTERFACE_CATEGORY",
|
|
3206
|
-
callback:
|
|
3207
|
-
},
|
|
3208
|
-
function
|
|
3206
|
+
callback: ir
|
|
3207
|
+
}, tt = m.xml;
|
|
3208
|
+
function rr() {
|
|
3209
3209
|
const e = [];
|
|
3210
3210
|
{
|
|
3211
|
-
const o =
|
|
3211
|
+
const o = tt.createElement("label");
|
|
3212
3212
|
o.setAttribute("text", "%{BKY_LABEL_PROCEDURE}"), e.push(o);
|
|
3213
3213
|
}
|
|
3214
3214
|
{
|
|
3215
|
-
const o =
|
|
3215
|
+
const o = tt.createElement("block");
|
|
3216
3216
|
o.setAttribute("type", "procedure_def_v1");
|
|
3217
3217
|
{
|
|
3218
|
-
const t =
|
|
3218
|
+
const t = tt.createElement("field");
|
|
3219
3219
|
t.setAttribute("name", "NAME");
|
|
3220
|
-
const n =
|
|
3220
|
+
const n = tt.createTextNode(
|
|
3221
3221
|
W.PROCEDURE_DEFAULT_NAME
|
|
3222
3222
|
);
|
|
3223
3223
|
t.appendChild(n), o.appendChild(t);
|
|
@@ -3225,25 +3225,25 @@ function ir() {
|
|
|
3225
3225
|
e.push(o);
|
|
3226
3226
|
}
|
|
3227
3227
|
{
|
|
3228
|
-
const o =
|
|
3228
|
+
const o = tt.createElement("block");
|
|
3229
3229
|
o.setAttribute("type", "procedure_return_v1"), e.push(o);
|
|
3230
3230
|
}
|
|
3231
3231
|
return e;
|
|
3232
3232
|
}
|
|
3233
|
-
const
|
|
3233
|
+
const ue = {
|
|
3234
3234
|
name: "PROCEDURE_CATEGORY",
|
|
3235
|
-
callback:
|
|
3235
|
+
callback: rr
|
|
3236
3236
|
};
|
|
3237
|
-
function
|
|
3238
|
-
const { args: e } =
|
|
3237
|
+
function lr() {
|
|
3238
|
+
const { args: e } = Ii.app.view, o = [];
|
|
3239
3239
|
return e == null || e.forEach(({ id: t, name: n, type: i }) => {
|
|
3240
3240
|
o.push({ id: t, name: n, type: i });
|
|
3241
3241
|
}), o;
|
|
3242
3242
|
}
|
|
3243
|
-
const Mo =
|
|
3244
|
-
function
|
|
3243
|
+
const Mo = m.xml;
|
|
3244
|
+
function ar() {
|
|
3245
3245
|
const e = [];
|
|
3246
|
-
if (
|
|
3246
|
+
if (lr().length > 0) {
|
|
3247
3247
|
{
|
|
3248
3248
|
const o = Mo.createElement("label");
|
|
3249
3249
|
o.setAttribute("text", "%{BKY_LABEL_ARGUMENT}"), e.push(o);
|
|
@@ -3257,12 +3257,12 @@ function lr() {
|
|
|
3257
3257
|
}
|
|
3258
3258
|
const $e = {
|
|
3259
3259
|
name: "UI_CATEGORY",
|
|
3260
|
-
callback:
|
|
3261
|
-
},
|
|
3262
|
-
function
|
|
3260
|
+
callback: ar
|
|
3261
|
+
}, Tt = m.xml;
|
|
3262
|
+
function sr(e) {
|
|
3263
3263
|
const o = [];
|
|
3264
3264
|
{
|
|
3265
|
-
const n =
|
|
3265
|
+
const n = Tt.createElement("label");
|
|
3266
3266
|
n.setAttribute("text", "%{BKY_LABEL_VARIABLE}"), o.push(n);
|
|
3267
3267
|
}
|
|
3268
3268
|
{
|
|
@@ -3270,7 +3270,7 @@ function ar(e) {
|
|
|
3270
3270
|
n.setAttribute("text", "%{BKY_NEW_VARIABLE}"), n.setAttribute("callbackKey", "CREATE_VARIABLE"), e.registerButtonCallback(
|
|
3271
3271
|
"CREATE_VARIABLE",
|
|
3272
3272
|
function(i) {
|
|
3273
|
-
|
|
3273
|
+
Ot.createVariableButtonHandler(
|
|
3274
3274
|
i.getTargetWorkspace()
|
|
3275
3275
|
);
|
|
3276
3276
|
}
|
|
@@ -3279,41 +3279,41 @@ function ar(e) {
|
|
|
3279
3279
|
const t = e.getVariablesOfType("");
|
|
3280
3280
|
if (t.length <= 0)
|
|
3281
3281
|
return o;
|
|
3282
|
-
t.sort(
|
|
3282
|
+
t.sort(zn.compareByName);
|
|
3283
3283
|
{
|
|
3284
|
-
const n =
|
|
3284
|
+
const n = Tt.createElement("label");
|
|
3285
3285
|
n.setAttribute("text", W.LABEL_CREATED), o.push(n);
|
|
3286
3286
|
}
|
|
3287
3287
|
return t.forEach((n) => {
|
|
3288
3288
|
{
|
|
3289
|
-
const i =
|
|
3290
|
-
i.setAttribute("type", "variable_get_v1"), i.appendChild(
|
|
3289
|
+
const i = Tt.createElement("block");
|
|
3290
|
+
i.setAttribute("type", "variable_get_v1"), i.appendChild(Ot.generateVariableFieldDom(n)), o.push(i);
|
|
3291
3291
|
}
|
|
3292
3292
|
{
|
|
3293
|
-
const i =
|
|
3294
|
-
i.setAttribute("type", "variable_set_v1"), i.appendChild(
|
|
3293
|
+
const i = Tt.createElement("block");
|
|
3294
|
+
i.setAttribute("type", "variable_set_v1"), i.appendChild(Ot.generateVariableFieldDom(n)), o.push(i);
|
|
3295
3295
|
}
|
|
3296
3296
|
}), o;
|
|
3297
3297
|
}
|
|
3298
|
-
const
|
|
3298
|
+
const _e = {
|
|
3299
3299
|
name: "VARIABLE_CATEGORY",
|
|
3300
|
-
callback:
|
|
3300
|
+
callback: sr
|
|
3301
3301
|
};
|
|
3302
3302
|
tn.setConfirm(async (e, o) => {
|
|
3303
|
-
const t = await
|
|
3303
|
+
const t = await ri({
|
|
3304
3304
|
title: "",
|
|
3305
3305
|
text: e
|
|
3306
3306
|
});
|
|
3307
3307
|
o(!!t);
|
|
3308
3308
|
});
|
|
3309
3309
|
tn.setPrompt(async (e, o, t) => {
|
|
3310
|
-
const n = await
|
|
3310
|
+
const n = await li({
|
|
3311
3311
|
title: "",
|
|
3312
3312
|
value: o
|
|
3313
3313
|
});
|
|
3314
3314
|
t(String(n));
|
|
3315
3315
|
});
|
|
3316
|
-
const
|
|
3316
|
+
const sn = (e, o, t) => {
|
|
3317
3317
|
const n = e[o];
|
|
3318
3318
|
return n ? typeof n == "function" ? n() : Promise.resolve(n) : new Promise((i, r) => {
|
|
3319
3319
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
@@ -3327,10 +3327,10 @@ const an = (e, o, t) => {
|
|
|
3327
3327
|
});
|
|
3328
3328
|
};
|
|
3329
3329
|
async function Do(e) {
|
|
3330
|
-
const o = await
|
|
3331
|
-
|
|
3330
|
+
const o = await sn(/* @__PURE__ */ Object.assign({ "./msg/en.ts": () => import("./msg-en-kge4l75d.js"), "./msg/zhHans.ts": () => import("./msg-zhHans-hfznrf5k.js") }), `./msg/${e}.ts`, 3);
|
|
3331
|
+
qn(o.default);
|
|
3332
3332
|
}
|
|
3333
|
-
function
|
|
3333
|
+
function cn(e) {
|
|
3334
3334
|
const o = Ve();
|
|
3335
3335
|
if (!o)
|
|
3336
3336
|
return;
|
|
@@ -3343,15 +3343,15 @@ function sn(e) {
|
|
|
3343
3343
|
const i = n.getRelativeToSurfaceXY(), r = i.x * o.scale, l = i.y * o.scale;
|
|
3344
3344
|
o.scroll(-r, -l);
|
|
3345
3345
|
}
|
|
3346
|
-
function
|
|
3346
|
+
function un() {
|
|
3347
3347
|
var t;
|
|
3348
3348
|
const e = Ve();
|
|
3349
3349
|
if (!e)
|
|
3350
3350
|
return;
|
|
3351
3351
|
const o = (t = e.getTopBlocks(!0)) == null ? void 0 : t[0];
|
|
3352
|
-
o &&
|
|
3352
|
+
o && cn(o.id);
|
|
3353
3353
|
}
|
|
3354
|
-
class
|
|
3354
|
+
class cr {
|
|
3355
3355
|
init({ contextMenu: o = !0, shortcut: t = !0 } = {
|
|
3356
3356
|
contextMenu: !0,
|
|
3357
3357
|
shortcut: !0
|
|
@@ -3371,7 +3371,7 @@ class sr {
|
|
|
3371
3371
|
},
|
|
3372
3372
|
preconditionFn: function() {
|
|
3373
3373
|
const t = He();
|
|
3374
|
-
return !t || !
|
|
3374
|
+
return !t || !pt(t) || !t.isDeletable() || !zt(t) || !t.isMovable() || !et(t) ? "disabled" : "enabled";
|
|
3375
3375
|
},
|
|
3376
3376
|
callback: function(t) {
|
|
3377
3377
|
var n;
|
|
@@ -3414,26 +3414,26 @@ class sr {
|
|
|
3414
3414
|
}
|
|
3415
3415
|
blockCopyToStorageShortcut() {
|
|
3416
3416
|
const o = q.registry.createSerializedKey(
|
|
3417
|
-
|
|
3418
|
-
[
|
|
3417
|
+
m.KeyCodes.C,
|
|
3418
|
+
[m.KeyCodes.CTRL]
|
|
3419
3419
|
), t = q.registry.createSerializedKey(
|
|
3420
|
-
|
|
3421
|
-
[
|
|
3420
|
+
m.KeyCodes.C,
|
|
3421
|
+
[m.KeyCodes.ALT]
|
|
3422
3422
|
), n = q.registry.createSerializedKey(
|
|
3423
|
-
|
|
3424
|
-
[
|
|
3423
|
+
m.KeyCodes.C,
|
|
3424
|
+
[m.KeyCodes.META]
|
|
3425
3425
|
), i = {
|
|
3426
3426
|
name: "copy",
|
|
3427
3427
|
preconditionFn: function(r) {
|
|
3428
3428
|
if (r.options.readOnly || qt.inProgress())
|
|
3429
3429
|
return !1;
|
|
3430
3430
|
const l = He();
|
|
3431
|
-
return !(!l || !
|
|
3431
|
+
return !(!l || !pt(l) || !l.isDeletable() || !zt(l) || !l.isMovable() || !et(l));
|
|
3432
3432
|
},
|
|
3433
3433
|
callback: function(r, l) {
|
|
3434
3434
|
l.preventDefault();
|
|
3435
3435
|
const s = He();
|
|
3436
|
-
if (!s || !
|
|
3436
|
+
if (!s || !et(s))
|
|
3437
3437
|
return !1;
|
|
3438
3438
|
const u = s.toCopyData();
|
|
3439
3439
|
return u ? (r.hideChaff(), localStorage.setItem("blocklyStash", JSON.stringify(u)), !0) : !1;
|
|
@@ -3444,29 +3444,29 @@ class sr {
|
|
|
3444
3444
|
}
|
|
3445
3445
|
blockCutToStorageShortcut() {
|
|
3446
3446
|
const o = q.registry.createSerializedKey(
|
|
3447
|
-
|
|
3448
|
-
[
|
|
3447
|
+
m.KeyCodes.X,
|
|
3448
|
+
[m.KeyCodes.CTRL]
|
|
3449
3449
|
), t = q.registry.createSerializedKey(
|
|
3450
|
-
|
|
3451
|
-
[
|
|
3450
|
+
m.KeyCodes.X,
|
|
3451
|
+
[m.KeyCodes.ALT]
|
|
3452
3452
|
), n = q.registry.createSerializedKey(
|
|
3453
|
-
|
|
3454
|
-
[
|
|
3453
|
+
m.KeyCodes.X,
|
|
3454
|
+
[m.KeyCodes.META]
|
|
3455
3455
|
), i = {
|
|
3456
3456
|
name: "cut",
|
|
3457
3457
|
preconditionFn: function(r) {
|
|
3458
3458
|
if (r.options.readOnly || qt.inProgress())
|
|
3459
3459
|
return !1;
|
|
3460
3460
|
const l = He();
|
|
3461
|
-
return !(!l || !
|
|
3461
|
+
return !(!l || !pt(l) || !l.isDeletable() || !zt(l) || !l.isMovable() || !et(l) || l.workspace.isFlyout);
|
|
3462
3462
|
},
|
|
3463
3463
|
callback: function(r, l) {
|
|
3464
3464
|
l.preventDefault();
|
|
3465
3465
|
const s = He();
|
|
3466
|
-
if (!s || !
|
|
3466
|
+
if (!s || !pt(s) || !s.isDeletable() || !et(s))
|
|
3467
3467
|
return !1;
|
|
3468
3468
|
const u = s.toCopyData();
|
|
3469
|
-
return u ? (localStorage.setItem("blocklyStash", JSON.stringify(u)), s instanceof
|
|
3469
|
+
return u ? (localStorage.setItem("blocklyStash", JSON.stringify(u)), s instanceof Qn ? s.checkAndDelete() : s.dispose(), !0) : !1;
|
|
3470
3470
|
},
|
|
3471
3471
|
keyCodes: [o, t, n]
|
|
3472
3472
|
};
|
|
@@ -3474,14 +3474,14 @@ class sr {
|
|
|
3474
3474
|
}
|
|
3475
3475
|
blockPasteFromStorageShortcut() {
|
|
3476
3476
|
const o = q.registry.createSerializedKey(
|
|
3477
|
-
|
|
3478
|
-
[
|
|
3477
|
+
m.KeyCodes.V,
|
|
3478
|
+
[m.KeyCodes.CTRL]
|
|
3479
3479
|
), t = q.registry.createSerializedKey(
|
|
3480
|
-
|
|
3481
|
-
[
|
|
3480
|
+
m.KeyCodes.V,
|
|
3481
|
+
[m.KeyCodes.ALT]
|
|
3482
3482
|
), n = q.registry.createSerializedKey(
|
|
3483
|
-
|
|
3484
|
-
[
|
|
3483
|
+
m.KeyCodes.V,
|
|
3484
|
+
[m.KeyCodes.META]
|
|
3485
3485
|
), i = {
|
|
3486
3486
|
name: "paste",
|
|
3487
3487
|
preconditionFn: function(r) {
|
|
@@ -3506,14 +3506,14 @@ class sr {
|
|
|
3506
3506
|
q.registry.register(i);
|
|
3507
3507
|
}
|
|
3508
3508
|
}
|
|
3509
|
-
class
|
|
3509
|
+
class ur {
|
|
3510
3510
|
init() {
|
|
3511
3511
|
const o = Pe.registry.getItem("cleanWorkspace");
|
|
3512
3512
|
o && (o.callback = function(t) {
|
|
3513
3513
|
const n = t.workspace;
|
|
3514
3514
|
if (!n)
|
|
3515
3515
|
return;
|
|
3516
|
-
n.setResizesEnabled(!1),
|
|
3516
|
+
n.setResizesEnabled(!1), X.setGroup(!0);
|
|
3517
3517
|
const i = n.getTopBlocks(!0);
|
|
3518
3518
|
let r = 0;
|
|
3519
3519
|
for (let l = 0, s; s = i[l]; l++) {
|
|
@@ -3522,24 +3522,24 @@ class cr {
|
|
|
3522
3522
|
const u = s.getRelativeToSurfaceXY();
|
|
3523
3523
|
s.moveBy(-u.x, r - u.y, ["cleanup"]), s.snapToGrid(), r = s.getRelativeToSurfaceXY().y + s.getHeightWidth().height + 100;
|
|
3524
3524
|
}
|
|
3525
|
-
|
|
3525
|
+
X.setGroup(!1), n.setResizesEnabled(!0);
|
|
3526
3526
|
});
|
|
3527
3527
|
}
|
|
3528
3528
|
}
|
|
3529
|
-
function
|
|
3529
|
+
function _n(e) {
|
|
3530
3530
|
const o = e.getParent();
|
|
3531
|
-
return o &&
|
|
3531
|
+
return o && _n(o) ? !0 : !o && !!(e.outputConnection || e.previousConnection);
|
|
3532
3532
|
}
|
|
3533
|
-
class
|
|
3533
|
+
class _r {
|
|
3534
3534
|
init() {
|
|
3535
3535
|
const o = Pe.registry.getItem("blockDisable");
|
|
3536
3536
|
o && (o.preconditionFn = function(t) {
|
|
3537
3537
|
const n = t.block;
|
|
3538
|
-
return n && !n.isInFlyout && n.workspace.options.disable && n.isEditable() ? n.getInheritedDisabled() ||
|
|
3538
|
+
return n && !n.isInFlyout && n.workspace.options.disable && n.isEditable() ? n.getInheritedDisabled() || _n(n) ? "disabled" : "enabled" : "hidden";
|
|
3539
3539
|
});
|
|
3540
3540
|
}
|
|
3541
3541
|
}
|
|
3542
|
-
class
|
|
3542
|
+
class pn extends Qt {
|
|
3543
3543
|
constructor(t, n, i) {
|
|
3544
3544
|
super(Qt.SKIP_SETUP);
|
|
3545
3545
|
/** The field's colour picker element. */
|
|
@@ -4144,19 +4144,19 @@ class _n extends Qt {
|
|
|
4144
4144
|
initView() {
|
|
4145
4145
|
const t = this.getConstants();
|
|
4146
4146
|
if (!t) throw Error("Constants not found");
|
|
4147
|
-
this.size_ = new
|
|
4147
|
+
this.size_ = new m.Size(
|
|
4148
4148
|
t.FIELD_COLOUR_DEFAULT_WIDTH,
|
|
4149
4149
|
t.FIELD_COLOUR_DEFAULT_HEIGHT
|
|
4150
4150
|
), this.createBorderRect_(), this.getBorderRect().style.fillOpacity = "1", this.getBorderRect().setAttribute("stroke", "#fff"), this.isFullBlockField() && (this.clickTarget_ = this.sourceBlock_.getSvgRoot());
|
|
4151
4151
|
}
|
|
4152
4152
|
isFullBlockField() {
|
|
4153
|
-
if (!this.getSourceBlock()) throw new
|
|
4153
|
+
if (!this.getSourceBlock()) throw new dt();
|
|
4154
4154
|
const n = this.getConstants();
|
|
4155
4155
|
return this.blockIsSimpleReporter() && !!(n != null && n.FIELD_COLOUR_FULL_BLOCK);
|
|
4156
4156
|
}
|
|
4157
4157
|
blockIsSimpleReporter() {
|
|
4158
4158
|
const t = this.getSourceBlock();
|
|
4159
|
-
if (!t) throw new
|
|
4159
|
+
if (!t) throw new dt();
|
|
4160
4160
|
if (!t.outputConnection) return !1;
|
|
4161
4161
|
for (const n of t.inputList)
|
|
4162
4162
|
if (n.connection || n.fieldRow.length > 1) return !1;
|
|
@@ -4164,7 +4164,7 @@ class _n extends Qt {
|
|
|
4164
4164
|
}
|
|
4165
4165
|
applyColour() {
|
|
4166
4166
|
const t = this.getSourceBlock();
|
|
4167
|
-
if (!t) throw new
|
|
4167
|
+
if (!t) throw new dt();
|
|
4168
4168
|
if (!this.fieldGroup_) return;
|
|
4169
4169
|
const n = this.borderRect_;
|
|
4170
4170
|
if (!n)
|
|
@@ -4178,7 +4178,7 @@ class _n extends Qt {
|
|
|
4178
4178
|
render_() {
|
|
4179
4179
|
super.render_();
|
|
4180
4180
|
const t = this.getSourceBlock();
|
|
4181
|
-
if (!t) throw new
|
|
4181
|
+
if (!t) throw new dt();
|
|
4182
4182
|
t.applyColour();
|
|
4183
4183
|
}
|
|
4184
4184
|
updateSize_(t) {
|
|
@@ -4188,7 +4188,7 @@ class _n extends Qt {
|
|
|
4188
4188
|
this.isFullBlockField() ? (i = (t ?? 0) * 2, r = n.FIELD_TEXT_HEIGHT) : (i = n.FIELD_COLOUR_DEFAULT_WIDTH, r = n.FIELD_COLOUR_DEFAULT_HEIGHT), this.size_.height = r, this.size_.width = i, this.positionBorderRect_();
|
|
4189
4189
|
}
|
|
4190
4190
|
doClassValidation_(t) {
|
|
4191
|
-
return typeof t != "string" ? null :
|
|
4191
|
+
return typeof t != "string" ? null : m.colour.parse(t);
|
|
4192
4192
|
}
|
|
4193
4193
|
getText() {
|
|
4194
4194
|
let t = this.value_;
|
|
@@ -4203,14 +4203,14 @@ class _n extends Qt {
|
|
|
4203
4203
|
showEditor_() {
|
|
4204
4204
|
if (this.dropdownCreate(), !this.picker)
|
|
4205
4205
|
throw Error("Picker not found");
|
|
4206
|
-
|
|
4206
|
+
ft.getContentDiv().appendChild(this.picker), ft.showPositionedByField(
|
|
4207
4207
|
this,
|
|
4208
4208
|
this.dropdownDispose.bind(this)
|
|
4209
4209
|
), this.picker.focus({ preventScroll: !0 });
|
|
4210
4210
|
}
|
|
4211
4211
|
onClick(t) {
|
|
4212
4212
|
const n = t.target, i = n && n.getAttribute("data-colour");
|
|
4213
|
-
i !== null && (this.setValue(i),
|
|
4213
|
+
i !== null && (this.setValue(i), ft.hideIfOwner(this));
|
|
4214
4214
|
}
|
|
4215
4215
|
onKeyDown(t) {
|
|
4216
4216
|
let n = !0, i;
|
|
@@ -4232,7 +4232,7 @@ class _n extends Qt {
|
|
|
4232
4232
|
const r = i.getAttribute("data-colour");
|
|
4233
4233
|
r !== null && this.setValue(r);
|
|
4234
4234
|
}
|
|
4235
|
-
|
|
4235
|
+
ft.hideWithoutAnimation();
|
|
4236
4236
|
break;
|
|
4237
4237
|
default:
|
|
4238
4238
|
n = !1;
|
|
@@ -4245,8 +4245,8 @@ class _n extends Qt {
|
|
|
4245
4245
|
const i = this.colours, r = this.columns;
|
|
4246
4246
|
let l = this.highlightedIndex % r, s = Math.floor(this.highlightedIndex / r);
|
|
4247
4247
|
l += t, s += n, t < 0 ? l < 0 && s > 0 ? (l = r - 1, s--) : l < 0 && (l = 0) : t > 0 ? l > r - 1 && s < Math.floor(i.length / r) - 1 ? (l = 0, s++) : l > r - 1 && l-- : n < 0 ? s < 0 && (s = 0) : n > 0 && s > Math.floor(i.length / r) - 1 && (s = Math.floor(i.length / r) - 1);
|
|
4248
|
-
const u = this.picker.childNodes[s].childNodes[l],
|
|
4249
|
-
this.setHighlightedCell(u,
|
|
4248
|
+
const u = this.picker.childNodes[s].childNodes[l], d = s * r + l;
|
|
4249
|
+
this.setHighlightedCell(u, d);
|
|
4250
4250
|
}
|
|
4251
4251
|
onMouseMove(t) {
|
|
4252
4252
|
const n = t.target, i = n && Number(n.getAttribute("data-index"));
|
|
@@ -4260,7 +4260,7 @@ class _n extends Qt {
|
|
|
4260
4260
|
var n;
|
|
4261
4261
|
(n = this.picker) == null || n.blur();
|
|
4262
4262
|
const t = this.getHighlighted();
|
|
4263
|
-
t &&
|
|
4263
|
+
t && m.dom.removeClass(t, "blocklyColourHighlighted");
|
|
4264
4264
|
}
|
|
4265
4265
|
getHighlighted() {
|
|
4266
4266
|
var r;
|
|
@@ -4271,36 +4271,36 @@ class _n extends Qt {
|
|
|
4271
4271
|
}
|
|
4272
4272
|
setHighlightedCell(t, n) {
|
|
4273
4273
|
const i = this.getHighlighted();
|
|
4274
|
-
i &&
|
|
4274
|
+
i && m.dom.removeClass(i, "blocklyColourHighlighted"), m.dom.addClass(t, "blocklyColourHighlighted"), this.highlightedIndex = n;
|
|
4275
4275
|
const r = t.getAttribute("id");
|
|
4276
|
-
r && this.picker &&
|
|
4276
|
+
r && this.picker && m.aria.setState(
|
|
4277
4277
|
this.picker,
|
|
4278
|
-
|
|
4278
|
+
m.aria.State.ACTIVEDESCENDANT,
|
|
4279
4279
|
r
|
|
4280
4280
|
);
|
|
4281
4281
|
}
|
|
4282
4282
|
dropdownCreate() {
|
|
4283
4283
|
const t = this.columns, n = this.colours, i = this.getValue(), r = document.createElement("table");
|
|
4284
|
-
r.className = "blocklyColourTable", r.tabIndex = 0, r.dir = "ltr",
|
|
4284
|
+
r.className = "blocklyColourTable", r.tabIndex = 0, r.dir = "ltr", m.aria.setRole(r, m.aria.Role.GRID), m.aria.setState(r, m.aria.State.EXPANDED, !0), m.aria.setState(
|
|
4285
4285
|
r,
|
|
4286
|
-
|
|
4286
|
+
m.aria.State.ROWCOUNT,
|
|
4287
4287
|
Math.floor(n.length / t)
|
|
4288
|
-
),
|
|
4288
|
+
), m.aria.setState(
|
|
4289
4289
|
r,
|
|
4290
|
-
|
|
4290
|
+
m.aria.State.COLCOUNT,
|
|
4291
4291
|
t
|
|
4292
4292
|
);
|
|
4293
4293
|
let l = null;
|
|
4294
4294
|
for (let s = 0; s < n.length; s++) {
|
|
4295
|
-
s % t === 0 && (l = document.createElement("tr"),
|
|
4295
|
+
s % t === 0 && (l = document.createElement("tr"), m.aria.setRole(l, m.aria.Role.ROW), r.appendChild(l));
|
|
4296
4296
|
const u = document.createElement("td");
|
|
4297
|
-
l.appendChild(u), u.setAttribute("data-colour", n[s]), u.title = this.titles[s] || n[s], u.id =
|
|
4297
|
+
l.appendChild(u), u.setAttribute("data-colour", n[s]), u.title = this.titles[s] || n[s], u.id = m.idGenerator.getNextUniqueId(), u.setAttribute("data-index", `${s}`), m.aria.setRole(u, m.aria.Role.GRIDCELL), m.aria.setState(
|
|
4298
4298
|
u,
|
|
4299
|
-
|
|
4299
|
+
m.aria.State.LABEL,
|
|
4300
4300
|
n[s]
|
|
4301
|
-
),
|
|
4301
|
+
), m.aria.setState(
|
|
4302
4302
|
u,
|
|
4303
|
-
|
|
4303
|
+
m.aria.State.SELECTED,
|
|
4304
4304
|
n[s] === i
|
|
4305
4305
|
), u.style.backgroundColor = n[s], n[s] === i && (u.className = "blocklyColourSelected", this.highlightedIndex = s);
|
|
4306
4306
|
}
|
|
@@ -4356,8 +4356,8 @@ class _n extends Qt {
|
|
|
4356
4356
|
return new this(t.colour, void 0, t);
|
|
4357
4357
|
}
|
|
4358
4358
|
}
|
|
4359
|
-
|
|
4360
|
-
|
|
4359
|
+
pn.prototype.DEFAULT_VALUE = "#ffffff";
|
|
4360
|
+
Zn.register(`
|
|
4361
4361
|
.blocklyColourTable {
|
|
4362
4362
|
border-collapse: collapse;
|
|
4363
4363
|
display: block;
|
|
@@ -4384,17 +4384,17 @@ Qn.register(`
|
|
|
4384
4384
|
position: relative;
|
|
4385
4385
|
}
|
|
4386
4386
|
`);
|
|
4387
|
-
function
|
|
4388
|
-
|
|
4387
|
+
function pr() {
|
|
4388
|
+
ei.register("field_colour", pn);
|
|
4389
4389
|
}
|
|
4390
|
-
const pr = new sr();
|
|
4391
|
-
pr.init({ contextMenu: !0, shortcut: !0 });
|
|
4392
4390
|
const dr = new cr();
|
|
4393
|
-
dr.init();
|
|
4391
|
+
dr.init({ contextMenu: !0, shortcut: !0 });
|
|
4394
4392
|
const fr = new ur();
|
|
4395
4393
|
fr.init();
|
|
4396
|
-
_r();
|
|
4397
|
-
|
|
4394
|
+
const hr = new _r();
|
|
4395
|
+
hr.init();
|
|
4396
|
+
pr();
|
|
4397
|
+
Ut.Classic.blockStyles = {
|
|
4398
4398
|
color_blocks: {
|
|
4399
4399
|
colourPrimary: "#a5745b",
|
|
4400
4400
|
colourSecondary: "#ede3de",
|
|
@@ -4468,7 +4468,7 @@ Vt.Classic.blockStyles = {
|
|
|
4468
4468
|
hat: ""
|
|
4469
4469
|
}
|
|
4470
4470
|
};
|
|
4471
|
-
|
|
4471
|
+
Ut.Classic.categoryStyles = {
|
|
4472
4472
|
calc_category: {
|
|
4473
4473
|
colour: "#757575"
|
|
4474
4474
|
},
|
|
@@ -4518,9 +4518,9 @@ Vt.Classic.categoryStyles = {
|
|
|
4518
4518
|
colour: "#a55b80"
|
|
4519
4519
|
}
|
|
4520
4520
|
};
|
|
4521
|
-
const
|
|
4521
|
+
const Tr = on.defineTheme("light", {
|
|
4522
4522
|
name: "light",
|
|
4523
|
-
base:
|
|
4523
|
+
base: Ut.Classic,
|
|
4524
4524
|
componentStyles: {
|
|
4525
4525
|
workspaceBackgroundColour: "#ffffff",
|
|
4526
4526
|
toolboxBackgroundColour: "#eeeeee",
|
|
@@ -4534,9 +4534,9 @@ const hr = on.defineTheme("light", {
|
|
|
4534
4534
|
scrollbarOpacity: 0.4,
|
|
4535
4535
|
cursorColour: ""
|
|
4536
4536
|
}
|
|
4537
|
-
}),
|
|
4537
|
+
}), mr = on.defineTheme("dark", {
|
|
4538
4538
|
name: "dark",
|
|
4539
|
-
base:
|
|
4539
|
+
base: Ut.Classic,
|
|
4540
4540
|
componentStyles: {
|
|
4541
4541
|
workspaceBackgroundColour: "#1e1e1e",
|
|
4542
4542
|
toolboxBackgroundColour: "#272727",
|
|
@@ -4551,18 +4551,18 @@ const hr = on.defineTheme("light", {
|
|
|
4551
4551
|
cursorColour: ""
|
|
4552
4552
|
}
|
|
4553
4553
|
});
|
|
4554
|
-
function
|
|
4554
|
+
function gr(e) {
|
|
4555
4555
|
const o = Ve();
|
|
4556
4556
|
switch (console.log(o), e) {
|
|
4557
4557
|
case "light":
|
|
4558
|
-
o.setTheme(
|
|
4558
|
+
o.setTheme(Tr);
|
|
4559
4559
|
break;
|
|
4560
4560
|
case "dark":
|
|
4561
|
-
o.setTheme(
|
|
4561
|
+
o.setTheme(mr);
|
|
4562
4562
|
break;
|
|
4563
4563
|
}
|
|
4564
4564
|
}
|
|
4565
|
-
const
|
|
4565
|
+
const Kt = {
|
|
4566
4566
|
kind: "category",
|
|
4567
4567
|
name: "%{BKY_CATEGORY_COLOR}",
|
|
4568
4568
|
categorystyle: "color_category",
|
|
@@ -4636,7 +4636,7 @@ const Yt = {
|
|
|
4636
4636
|
}
|
|
4637
4637
|
}
|
|
4638
4638
|
]
|
|
4639
|
-
},
|
|
4639
|
+
}, Ft = {
|
|
4640
4640
|
kind: "category",
|
|
4641
4641
|
name: "%{BKY_CATEGORY_LIST}",
|
|
4642
4642
|
categorystyle: "list_category",
|
|
@@ -4751,7 +4751,7 @@ const Yt = {
|
|
|
4751
4751
|
type: "list_reverse_v1"
|
|
4752
4752
|
}
|
|
4753
4753
|
]
|
|
4754
|
-
},
|
|
4754
|
+
}, Ht = {
|
|
4755
4755
|
kind: "category",
|
|
4756
4756
|
name: "%{BKY_CATEGORY_LOGIC}",
|
|
4757
4757
|
categorystyle: "logic_category",
|
|
@@ -4793,7 +4793,7 @@ const Yt = {
|
|
|
4793
4793
|
type: "logic_ternary_v1"
|
|
4794
4794
|
}
|
|
4795
4795
|
]
|
|
4796
|
-
},
|
|
4796
|
+
}, Gt = {
|
|
4797
4797
|
kind: "category",
|
|
4798
4798
|
name: "%{BKY_CATEGORY_LOOP}",
|
|
4799
4799
|
categorystyle: "loop_category",
|
|
@@ -4815,7 +4815,7 @@ const Yt = {
|
|
|
4815
4815
|
type: "for_each_v1"
|
|
4816
4816
|
}
|
|
4817
4817
|
]
|
|
4818
|
-
},
|
|
4818
|
+
}, Xt = {
|
|
4819
4819
|
kind: "category",
|
|
4820
4820
|
name: "%{BKY_CATEGORY_MATH}",
|
|
4821
4821
|
categorystyle: "math_category",
|
|
@@ -4970,7 +4970,7 @@ const Yt = {
|
|
|
4970
4970
|
type: "math_on_list_v1"
|
|
4971
4971
|
}
|
|
4972
4972
|
]
|
|
4973
|
-
},
|
|
4973
|
+
}, $t = {
|
|
4974
4974
|
kind: "category",
|
|
4975
4975
|
name: "%{BKY_CATEGORY_OBJECT}",
|
|
4976
4976
|
categorystyle: "object_category",
|
|
@@ -5038,7 +5038,7 @@ const Yt = {
|
|
|
5038
5038
|
}
|
|
5039
5039
|
}
|
|
5040
5040
|
]
|
|
5041
|
-
},
|
|
5041
|
+
}, jt = {
|
|
5042
5042
|
kind: "category",
|
|
5043
5043
|
name: "%{BKY_CATEGORY_TEXT}",
|
|
5044
5044
|
categorystyle: "text_category",
|
|
@@ -5201,7 +5201,7 @@ const Yt = {
|
|
|
5201
5201
|
type: "text_reverse_v1"
|
|
5202
5202
|
}
|
|
5203
5203
|
]
|
|
5204
|
-
},
|
|
5204
|
+
}, dn = {
|
|
5205
5205
|
kind: "category",
|
|
5206
5206
|
name: "%{BKY_CATEGORY_TIME}",
|
|
5207
5207
|
categorystyle: "time_category",
|
|
@@ -5225,7 +5225,7 @@ const Yt = {
|
|
|
5225
5225
|
}
|
|
5226
5226
|
}
|
|
5227
5227
|
]
|
|
5228
|
-
},
|
|
5228
|
+
}, Er = {
|
|
5229
5229
|
kind: "categoryToolbox",
|
|
5230
5230
|
contents: [
|
|
5231
5231
|
{
|
|
@@ -5234,80 +5234,80 @@ const Yt = {
|
|
|
5234
5234
|
categorystyle: "ui_category",
|
|
5235
5235
|
custom: $e.name
|
|
5236
5236
|
},
|
|
5237
|
+
Gt,
|
|
5237
5238
|
Ht,
|
|
5239
|
+
Xt,
|
|
5240
|
+
jt,
|
|
5238
5241
|
Ft,
|
|
5239
|
-
Gt,
|
|
5240
5242
|
$t,
|
|
5241
5243
|
Kt,
|
|
5242
|
-
|
|
5243
|
-
Yt,
|
|
5244
|
-
pn,
|
|
5244
|
+
dn,
|
|
5245
5245
|
{
|
|
5246
5246
|
kind: "category",
|
|
5247
5247
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
5248
5248
|
categorystyle: "variable_category",
|
|
5249
|
-
custom:
|
|
5249
|
+
custom: _e.name
|
|
5250
5250
|
},
|
|
5251
5251
|
{
|
|
5252
5252
|
kind: "category",
|
|
5253
5253
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
5254
5254
|
categorystyle: "procedure_category",
|
|
5255
|
-
custom:
|
|
5255
|
+
custom: ue.name
|
|
5256
5256
|
},
|
|
5257
5257
|
{
|
|
5258
5258
|
kind: "category",
|
|
5259
5259
|
name: "%{BKY_CATEGORY_INTERFACE}",
|
|
5260
5260
|
categorystyle: "interface_category",
|
|
5261
|
-
custom:
|
|
5261
|
+
custom: an.name
|
|
5262
5262
|
}
|
|
5263
5263
|
]
|
|
5264
|
-
},
|
|
5264
|
+
}, vr = {
|
|
5265
5265
|
kind: "categoryToolbox",
|
|
5266
5266
|
contents: [
|
|
5267
|
+
Gt,
|
|
5267
5268
|
Ht,
|
|
5269
|
+
Xt,
|
|
5270
|
+
jt,
|
|
5268
5271
|
Ft,
|
|
5269
|
-
Gt,
|
|
5270
5272
|
$t,
|
|
5271
5273
|
Kt,
|
|
5272
|
-
Xt,
|
|
5273
|
-
Yt,
|
|
5274
5274
|
{
|
|
5275
5275
|
kind: "category",
|
|
5276
5276
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
5277
5277
|
categorystyle: "variable_category",
|
|
5278
|
-
custom:
|
|
5278
|
+
custom: _e.name
|
|
5279
5279
|
},
|
|
5280
5280
|
{
|
|
5281
5281
|
kind: "category",
|
|
5282
5282
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
5283
5283
|
categorystyle: "procedure_category",
|
|
5284
|
-
custom:
|
|
5284
|
+
custom: ue.name
|
|
5285
5285
|
}
|
|
5286
5286
|
]
|
|
5287
|
-
},
|
|
5287
|
+
}, yr = {
|
|
5288
5288
|
kind: "categoryToolbox",
|
|
5289
5289
|
contents: [
|
|
5290
|
+
Gt,
|
|
5290
5291
|
Ht,
|
|
5292
|
+
Xt,
|
|
5293
|
+
jt,
|
|
5291
5294
|
Ft,
|
|
5292
|
-
Gt,
|
|
5293
5295
|
$t,
|
|
5294
5296
|
Kt,
|
|
5295
|
-
Xt,
|
|
5296
|
-
Yt,
|
|
5297
5297
|
{
|
|
5298
5298
|
kind: "category",
|
|
5299
5299
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
5300
5300
|
categorystyle: "variable_category",
|
|
5301
|
-
custom:
|
|
5301
|
+
custom: _e.name
|
|
5302
5302
|
},
|
|
5303
5303
|
{
|
|
5304
5304
|
kind: "category",
|
|
5305
5305
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
5306
5306
|
categorystyle: "procedure_category",
|
|
5307
|
-
custom:
|
|
5307
|
+
custom: ue.name
|
|
5308
5308
|
}
|
|
5309
5309
|
]
|
|
5310
|
-
},
|
|
5310
|
+
}, br = {
|
|
5311
5311
|
kind: "categoryToolbox",
|
|
5312
5312
|
contents: [
|
|
5313
5313
|
{
|
|
@@ -5316,66 +5316,73 @@ const Yt = {
|
|
|
5316
5316
|
categorystyle: "ui_category",
|
|
5317
5317
|
custom: $e.name
|
|
5318
5318
|
},
|
|
5319
|
+
Gt,
|
|
5319
5320
|
Ht,
|
|
5321
|
+
Xt,
|
|
5322
|
+
jt,
|
|
5320
5323
|
Ft,
|
|
5321
|
-
Gt,
|
|
5322
5324
|
$t,
|
|
5323
5325
|
Kt,
|
|
5324
|
-
|
|
5325
|
-
Yt,
|
|
5326
|
-
pn,
|
|
5326
|
+
dn,
|
|
5327
5327
|
{
|
|
5328
5328
|
kind: "category",
|
|
5329
5329
|
name: "%{BKY_CATEGORY_VARIABLE}",
|
|
5330
5330
|
categorystyle: "variable_category",
|
|
5331
|
-
custom:
|
|
5331
|
+
custom: _e.name
|
|
5332
5332
|
},
|
|
5333
5333
|
{
|
|
5334
5334
|
kind: "category",
|
|
5335
5335
|
name: "%{BKY_CATEGORY_PROCEDURE}",
|
|
5336
5336
|
categorystyle: "procedure_category",
|
|
5337
|
-
custom:
|
|
5337
|
+
custom: ue.name
|
|
5338
5338
|
},
|
|
5339
5339
|
{
|
|
5340
5340
|
kind: "category",
|
|
5341
5341
|
name: "%{BKY_CATEGORY_INTERFACE}",
|
|
5342
5342
|
categorystyle: "interface_category",
|
|
5343
|
-
custom:
|
|
5343
|
+
custom: an.name
|
|
5344
5344
|
}
|
|
5345
5345
|
]
|
|
5346
|
-
},
|
|
5346
|
+
}, Or = /* @__PURE__ */ Ue({
|
|
5347
5347
|
__name: "index",
|
|
5348
|
+
props: {
|
|
5349
|
+
lock: { type: Boolean }
|
|
5350
|
+
},
|
|
5348
5351
|
setup(e) {
|
|
5349
|
-
const { t: o } =
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
+
const { t: o } = Yt(), t = e, n = () => {
|
|
5353
|
+
if (t.lock) {
|
|
5354
|
+
nn(o("x-block-lib.msg.cannotCleanInLockState"));
|
|
5355
|
+
return;
|
|
5356
|
+
}
|
|
5357
|
+
const i = Ve();
|
|
5358
|
+
if (!i)
|
|
5352
5359
|
return;
|
|
5353
|
-
const
|
|
5354
|
-
|
|
5360
|
+
const r = Pe.registry.getItem("cleanWorkspace");
|
|
5361
|
+
r && r.callback({ workspace: i }, new PointerEvent("dummy"));
|
|
5355
5362
|
};
|
|
5356
5363
|
return qe(() => {
|
|
5357
|
-
me.on("cleanWorkspace",
|
|
5358
|
-
}),
|
|
5359
|
-
me.off("cleanWorkspace",
|
|
5360
|
-
}), (
|
|
5361
|
-
const
|
|
5362
|
-
return j(), Se(
|
|
5363
|
-
text:
|
|
5364
|
+
me.on("cleanWorkspace", n);
|
|
5365
|
+
}), St(() => {
|
|
5366
|
+
me.off("cleanWorkspace", n);
|
|
5367
|
+
}), (i, r) => {
|
|
5368
|
+
const l = ie("v-btn"), s = ie("v-tooltip");
|
|
5369
|
+
return j(), Se(s, {
|
|
5370
|
+
text: S(o)("x-block-lib.tip.hotkeyCtrlQ")
|
|
5364
5371
|
}, {
|
|
5365
|
-
activator: Je(({ props:
|
|
5366
|
-
re(
|
|
5372
|
+
activator: Je(({ props: u }) => [
|
|
5373
|
+
re(l, mo(u, {
|
|
5367
5374
|
class: "mr-3",
|
|
5368
5375
|
variant: "outlined",
|
|
5369
5376
|
density: "comfortable",
|
|
5370
|
-
icon:
|
|
5371
|
-
onClick:
|
|
5377
|
+
icon: S(ui),
|
|
5378
|
+
onClick: r[0] || (r[0] = (d) => S(me).emit("cleanWorkspace"))
|
|
5372
5379
|
}), null, 16, ["icon"])
|
|
5373
5380
|
]),
|
|
5374
5381
|
_: 1
|
|
5375
5382
|
}, 8, ["text"]);
|
|
5376
5383
|
};
|
|
5377
5384
|
}
|
|
5378
|
-
}),
|
|
5385
|
+
}), Ir = /* @__PURE__ */ Ue({
|
|
5379
5386
|
__name: "index",
|
|
5380
5387
|
props: {
|
|
5381
5388
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -5383,18 +5390,18 @@ const Yt = {
|
|
|
5383
5390
|
},
|
|
5384
5391
|
emits: ["update:modelValue"],
|
|
5385
5392
|
setup(e) {
|
|
5386
|
-
const { t: o } =
|
|
5393
|
+
const { t: o } = Yt(), t = co(e, "modelValue");
|
|
5387
5394
|
return (n, i) => {
|
|
5388
5395
|
const r = ie("v-btn"), l = ie("v-tooltip");
|
|
5389
5396
|
return j(), Se(l, {
|
|
5390
|
-
text:
|
|
5397
|
+
text: S(o)("x-block-lib.tip.hotkeyCtrlW")
|
|
5391
5398
|
}, {
|
|
5392
5399
|
activator: Je(({ props: s }) => [
|
|
5393
5400
|
re(r, mo(s, {
|
|
5394
5401
|
class: "mr-3",
|
|
5395
5402
|
variant: "outlined",
|
|
5396
5403
|
density: "comfortable",
|
|
5397
|
-
icon: t.value ?
|
|
5404
|
+
icon: t.value ? S(fi) : S(hi),
|
|
5398
5405
|
onClick: i[0] || (i[0] = (u) => t.value = !t.value)
|
|
5399
5406
|
}), null, 16, ["icon"])
|
|
5400
5407
|
]),
|
|
@@ -5403,37 +5410,37 @@ const Yt = {
|
|
|
5403
5410
|
};
|
|
5404
5411
|
}
|
|
5405
5412
|
});
|
|
5406
|
-
var
|
|
5413
|
+
var Cr = Object.defineProperty, Bt = Object.getOwnPropertySymbols, fn = Object.prototype.hasOwnProperty, hn = Object.prototype.propertyIsEnumerable, xo = (e, o, t) => o in e ? Cr(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t, je = (e, o) => {
|
|
5407
5414
|
for (var t in o || (o = {}))
|
|
5408
|
-
|
|
5409
|
-
if (
|
|
5410
|
-
for (var t of
|
|
5411
|
-
|
|
5415
|
+
fn.call(o, t) && xo(e, t, o[t]);
|
|
5416
|
+
if (Bt)
|
|
5417
|
+
for (var t of Bt(o))
|
|
5418
|
+
hn.call(o, t) && xo(e, t, o[t]);
|
|
5412
5419
|
return e;
|
|
5413
|
-
},
|
|
5420
|
+
}, Tn = (e, o) => {
|
|
5414
5421
|
var t = {};
|
|
5415
5422
|
for (var n in e)
|
|
5416
|
-
|
|
5417
|
-
if (e != null &&
|
|
5418
|
-
for (var n of
|
|
5419
|
-
o.indexOf(n) < 0 &&
|
|
5423
|
+
fn.call(e, n) && o.indexOf(n) < 0 && (t[n] = e[n]);
|
|
5424
|
+
if (e != null && Bt)
|
|
5425
|
+
for (var n of Bt(e))
|
|
5426
|
+
o.indexOf(n) < 0 && hn.call(e, n) && (t[n] = e[n]);
|
|
5420
5427
|
return t;
|
|
5421
5428
|
};
|
|
5422
|
-
const
|
|
5423
|
-
function Cr(e) {
|
|
5424
|
-
console.warn(Tn + e);
|
|
5425
|
-
}
|
|
5429
|
+
const mn = "[vue-draggable-plus]: ";
|
|
5426
5430
|
function Ar(e) {
|
|
5427
|
-
console.
|
|
5431
|
+
console.warn(mn + e);
|
|
5432
|
+
}
|
|
5433
|
+
function Lr(e) {
|
|
5434
|
+
console.error(mn + e);
|
|
5428
5435
|
}
|
|
5429
5436
|
function Po(e, o, t) {
|
|
5430
5437
|
return t >= 0 && t < e.length && e.splice(t, 0, e.splice(o, 1)[0]), e;
|
|
5431
5438
|
}
|
|
5432
|
-
function
|
|
5439
|
+
function kr(e) {
|
|
5433
5440
|
return e.replace(/-(\w)/g, (o, t) => t ? t.toUpperCase() : "");
|
|
5434
5441
|
}
|
|
5435
|
-
function
|
|
5436
|
-
return Object.keys(e).reduce((o, t) => (typeof e[t] < "u" && (o[
|
|
5442
|
+
function Nr(e) {
|
|
5443
|
+
return Object.keys(e).reduce((o, t) => (typeof e[t] < "u" && (o[kr(t)] = e[t]), o), {});
|
|
5437
5444
|
}
|
|
5438
5445
|
function wo(e, o) {
|
|
5439
5446
|
return Array.isArray(e) && e.splice(o, 1), e;
|
|
@@ -5441,10 +5448,10 @@ function wo(e, o) {
|
|
|
5441
5448
|
function Vo(e, o, t) {
|
|
5442
5449
|
return Array.isArray(e) && e.splice(o, 0, t), e;
|
|
5443
5450
|
}
|
|
5444
|
-
function
|
|
5451
|
+
function Sr(e) {
|
|
5445
5452
|
return typeof e > "u";
|
|
5446
5453
|
}
|
|
5447
|
-
function
|
|
5454
|
+
function Br(e) {
|
|
5448
5455
|
return typeof e == "string";
|
|
5449
5456
|
}
|
|
5450
5457
|
function Uo(e, o, t) {
|
|
@@ -5454,23 +5461,23 @@ function Uo(e, o, t) {
|
|
|
5454
5461
|
function Zt(e) {
|
|
5455
5462
|
e.parentNode && e.parentNode.removeChild(e);
|
|
5456
5463
|
}
|
|
5457
|
-
function
|
|
5464
|
+
function Rr(e, o = document) {
|
|
5458
5465
|
var t;
|
|
5459
5466
|
let n = null;
|
|
5460
|
-
return typeof (o == null ? void 0 : o.querySelector) == "function" ? n = (t = o == null ? void 0 : o.querySelector) == null ? void 0 : t.call(o, e) : n = document.querySelector(e), n ||
|
|
5467
|
+
return typeof (o == null ? void 0 : o.querySelector) == "function" ? n = (t = o == null ? void 0 : o.querySelector) == null ? void 0 : t.call(o, e) : n = document.querySelector(e), n || Ar(`Element not found: ${e}`), n;
|
|
5461
5468
|
}
|
|
5462
|
-
function
|
|
5469
|
+
function Mr(e, o, t = null) {
|
|
5463
5470
|
return function(...n) {
|
|
5464
5471
|
return e.apply(t, n), o.apply(t, n);
|
|
5465
5472
|
};
|
|
5466
5473
|
}
|
|
5467
|
-
function
|
|
5474
|
+
function Dr(e, o) {
|
|
5468
5475
|
const t = je({}, e);
|
|
5469
5476
|
return Object.keys(o).forEach((n) => {
|
|
5470
|
-
t[n] ? t[n] =
|
|
5477
|
+
t[n] ? t[n] = Mr(e[n], o[n]) : t[n] = o[n];
|
|
5471
5478
|
}), t;
|
|
5472
5479
|
}
|
|
5473
|
-
function
|
|
5480
|
+
function xr(e) {
|
|
5474
5481
|
return e instanceof HTMLElement;
|
|
5475
5482
|
}
|
|
5476
5483
|
function Yo(e, o) {
|
|
@@ -5478,11 +5485,11 @@ function Yo(e, o) {
|
|
|
5478
5485
|
o(t, e[t]);
|
|
5479
5486
|
});
|
|
5480
5487
|
}
|
|
5481
|
-
function
|
|
5488
|
+
function Pr(e) {
|
|
5482
5489
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // uppercase letter
|
|
5483
5490
|
(e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
5484
5491
|
}
|
|
5485
|
-
const
|
|
5492
|
+
const wr = Object.assign;
|
|
5486
5493
|
/**!
|
|
5487
5494
|
* Sortable 1.15.2
|
|
5488
5495
|
* @author RubaXa <trash@rubaxa.org>
|
|
@@ -5503,22 +5510,22 @@ function Ee(e) {
|
|
|
5503
5510
|
for (var o = 1; o < arguments.length; o++) {
|
|
5504
5511
|
var t = arguments[o] != null ? arguments[o] : {};
|
|
5505
5512
|
o % 2 ? Ko(Object(t), !0).forEach(function(n) {
|
|
5506
|
-
|
|
5513
|
+
Vr(e, n, t[n]);
|
|
5507
5514
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Ko(Object(t)).forEach(function(n) {
|
|
5508
5515
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
|
|
5509
5516
|
});
|
|
5510
5517
|
}
|
|
5511
5518
|
return e;
|
|
5512
5519
|
}
|
|
5513
|
-
function
|
|
5520
|
+
function Ct(e) {
|
|
5514
5521
|
"@babel/helpers - typeof";
|
|
5515
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ?
|
|
5522
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Ct = function(o) {
|
|
5516
5523
|
return typeof o;
|
|
5517
|
-
} :
|
|
5524
|
+
} : Ct = function(o) {
|
|
5518
5525
|
return o && typeof Symbol == "function" && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
5519
|
-
},
|
|
5526
|
+
}, Ct(e);
|
|
5520
5527
|
}
|
|
5521
|
-
function
|
|
5528
|
+
function Vr(e, o, t) {
|
|
5522
5529
|
return o in e ? Object.defineProperty(e, o, {
|
|
5523
5530
|
value: t,
|
|
5524
5531
|
enumerable: !0,
|
|
@@ -5536,7 +5543,7 @@ function Ce() {
|
|
|
5536
5543
|
return e;
|
|
5537
5544
|
}, Ce.apply(this, arguments);
|
|
5538
5545
|
}
|
|
5539
|
-
function
|
|
5546
|
+
function Ur(e, o) {
|
|
5540
5547
|
if (e == null)
|
|
5541
5548
|
return {};
|
|
5542
5549
|
var t = {}, n = Object.keys(e), i, r;
|
|
@@ -5544,10 +5551,10 @@ function Vr(e, o) {
|
|
|
5544
5551
|
i = n[r], !(o.indexOf(i) >= 0) && (t[i] = e[i]);
|
|
5545
5552
|
return t;
|
|
5546
5553
|
}
|
|
5547
|
-
function
|
|
5554
|
+
function Yr(e, o) {
|
|
5548
5555
|
if (e == null)
|
|
5549
5556
|
return {};
|
|
5550
|
-
var t =
|
|
5557
|
+
var t = Ur(e, o), n, i;
|
|
5551
5558
|
if (Object.getOwnPropertySymbols) {
|
|
5552
5559
|
var r = Object.getOwnPropertySymbols(e);
|
|
5553
5560
|
for (i = 0; i < r.length; i++)
|
|
@@ -5555,22 +5562,22 @@ function Ur(e, o) {
|
|
|
5555
5562
|
}
|
|
5556
5563
|
return t;
|
|
5557
5564
|
}
|
|
5558
|
-
var
|
|
5565
|
+
var Kr = "1.15.2";
|
|
5559
5566
|
function Ie(e) {
|
|
5560
5567
|
if (typeof window < "u" && window.navigator)
|
|
5561
5568
|
return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
5562
5569
|
}
|
|
5563
|
-
var Ae = Ie(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),
|
|
5570
|
+
var Ae = Ie(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), ut = Ie(/Edge/i), Fo = Ie(/firefox/i), rt = Ie(/safari/i) && !Ie(/chrome/i) && !Ie(/android/i), gn = Ie(/iP(ad|od|hone)/i), En = Ie(/chrome/i) && Ie(/android/i), vn = {
|
|
5564
5571
|
capture: !1,
|
|
5565
5572
|
passive: !1
|
|
5566
5573
|
};
|
|
5567
|
-
function
|
|
5568
|
-
e.addEventListener(o, t, !Ae &&
|
|
5574
|
+
function N(e, o, t) {
|
|
5575
|
+
e.addEventListener(o, t, !Ae && vn);
|
|
5569
5576
|
}
|
|
5570
5577
|
function L(e, o, t) {
|
|
5571
|
-
e.removeEventListener(o, t, !Ae &&
|
|
5578
|
+
e.removeEventListener(o, t, !Ae && vn);
|
|
5572
5579
|
}
|
|
5573
|
-
function
|
|
5580
|
+
function Rt(e, o) {
|
|
5574
5581
|
if (o) {
|
|
5575
5582
|
if (o[0] === ">" && (o = o.substring(1)), e)
|
|
5576
5583
|
try {
|
|
@@ -5586,18 +5593,18 @@ function Bt(e, o) {
|
|
|
5586
5593
|
return !1;
|
|
5587
5594
|
}
|
|
5588
5595
|
}
|
|
5589
|
-
function
|
|
5596
|
+
function Fr(e) {
|
|
5590
5597
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
5591
5598
|
}
|
|
5592
5599
|
function he(e, o, t, n) {
|
|
5593
5600
|
if (e) {
|
|
5594
5601
|
t = t || document;
|
|
5595
5602
|
do {
|
|
5596
|
-
if (o != null && (o[0] === ">" ? e.parentNode === t &&
|
|
5603
|
+
if (o != null && (o[0] === ">" ? e.parentNode === t && Rt(e, o) : Rt(e, o)) || n && e === t)
|
|
5597
5604
|
return e;
|
|
5598
5605
|
if (e === t)
|
|
5599
5606
|
break;
|
|
5600
|
-
} while (e =
|
|
5607
|
+
} while (e = Fr(e));
|
|
5601
5608
|
}
|
|
5602
5609
|
return null;
|
|
5603
5610
|
}
|
|
@@ -5611,7 +5618,7 @@ function oe(e, o, t) {
|
|
|
5611
5618
|
e.className = (n + (t ? " " + o : "")).replace(Ho, " ");
|
|
5612
5619
|
}
|
|
5613
5620
|
}
|
|
5614
|
-
function
|
|
5621
|
+
function E(e, o, t) {
|
|
5615
5622
|
var n = e && e.style;
|
|
5616
5623
|
if (n) {
|
|
5617
5624
|
if (t === void 0)
|
|
@@ -5625,13 +5632,13 @@ function ze(e, o) {
|
|
|
5625
5632
|
t = e;
|
|
5626
5633
|
else
|
|
5627
5634
|
do {
|
|
5628
|
-
var n =
|
|
5635
|
+
var n = E(e, "transform");
|
|
5629
5636
|
n && n !== "none" && (t = n + " " + t);
|
|
5630
5637
|
} while (!o && (e = e.parentNode));
|
|
5631
5638
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
5632
5639
|
return i && new i(t);
|
|
5633
5640
|
}
|
|
5634
|
-
function
|
|
5641
|
+
function yn(e, o, t) {
|
|
5635
5642
|
if (e) {
|
|
5636
5643
|
var n = e.getElementsByTagName(o), i = 0, r = n.length;
|
|
5637
5644
|
if (t)
|
|
@@ -5645,34 +5652,34 @@ function ge() {
|
|
|
5645
5652
|
var e = document.scrollingElement;
|
|
5646
5653
|
return e || document.documentElement;
|
|
5647
5654
|
}
|
|
5648
|
-
function
|
|
5655
|
+
function G(e, o, t, n, i) {
|
|
5649
5656
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
5650
|
-
var r, l, s, u,
|
|
5651
|
-
if (e !== window && e.parentNode && e !== ge() ? (r = e.getBoundingClientRect(), l = r.top, s = r.left, u = r.bottom,
|
|
5657
|
+
var r, l, s, u, d, p, _;
|
|
5658
|
+
if (e !== window && e.parentNode && e !== ge() ? (r = e.getBoundingClientRect(), l = r.top, s = r.left, u = r.bottom, d = r.right, p = r.height, _ = r.width) : (l = 0, s = 0, u = window.innerHeight, d = window.innerWidth, p = window.innerHeight, _ = window.innerWidth), (o || t) && e !== window && (i = i || e.parentNode, !Ae))
|
|
5652
5659
|
do
|
|
5653
|
-
if (i && i.getBoundingClientRect && (
|
|
5654
|
-
var
|
|
5655
|
-
l -=
|
|
5660
|
+
if (i && i.getBoundingClientRect && (E(i, "transform") !== "none" || t && E(i, "position") !== "static")) {
|
|
5661
|
+
var T = i.getBoundingClientRect();
|
|
5662
|
+
l -= T.top + parseInt(E(i, "border-top-width")), s -= T.left + parseInt(E(i, "border-left-width")), u = l + r.height, d = s + r.width;
|
|
5656
5663
|
break;
|
|
5657
5664
|
}
|
|
5658
5665
|
while (i = i.parentNode);
|
|
5659
5666
|
if (n && e !== window) {
|
|
5660
|
-
var h = ze(i || e),
|
|
5661
|
-
h && (l /=
|
|
5667
|
+
var h = ze(i || e), C = h && h.a, y = h && h.d;
|
|
5668
|
+
h && (l /= y, s /= C, _ /= C, p /= y, u = l + p, d = s + _);
|
|
5662
5669
|
}
|
|
5663
5670
|
return {
|
|
5664
5671
|
top: l,
|
|
5665
5672
|
left: s,
|
|
5666
5673
|
bottom: u,
|
|
5667
|
-
right:
|
|
5674
|
+
right: d,
|
|
5668
5675
|
width: _,
|
|
5669
|
-
height:
|
|
5676
|
+
height: p
|
|
5670
5677
|
};
|
|
5671
5678
|
}
|
|
5672
5679
|
}
|
|
5673
5680
|
function Go(e, o, t) {
|
|
5674
|
-
for (var n = Ne(e, !0), i =
|
|
5675
|
-
var r =
|
|
5681
|
+
for (var n = Ne(e, !0), i = G(e)[o]; n; ) {
|
|
5682
|
+
var r = G(n)[t], l = void 0;
|
|
5676
5683
|
if (l = i >= r, !l)
|
|
5677
5684
|
return n;
|
|
5678
5685
|
if (n === ge())
|
|
@@ -5683,7 +5690,7 @@ function Go(e, o, t) {
|
|
|
5683
5690
|
}
|
|
5684
5691
|
function Qe(e, o, t, n) {
|
|
5685
5692
|
for (var i = 0, r = 0, l = e.children; r < l.length; ) {
|
|
5686
|
-
if (l[r].style.display !== "none" && l[r] !==
|
|
5693
|
+
if (l[r].style.display !== "none" && l[r] !== v.ghost && (n || l[r] !== v.dragged) && he(l[r], t.draggable, e, !1)) {
|
|
5687
5694
|
if (i === o)
|
|
5688
5695
|
return l[r];
|
|
5689
5696
|
i++;
|
|
@@ -5693,16 +5700,16 @@ function Qe(e, o, t, n) {
|
|
|
5693
5700
|
return null;
|
|
5694
5701
|
}
|
|
5695
5702
|
function Oo(e, o) {
|
|
5696
|
-
for (var t = e.lastElementChild; t && (t ===
|
|
5703
|
+
for (var t = e.lastElementChild; t && (t === v.ghost || E(t, "display") === "none" || o && !Rt(t, o)); )
|
|
5697
5704
|
t = t.previousElementSibling;
|
|
5698
5705
|
return t || null;
|
|
5699
5706
|
}
|
|
5700
|
-
function
|
|
5707
|
+
function ce(e, o) {
|
|
5701
5708
|
var t = 0;
|
|
5702
5709
|
if (!e || !e.parentNode)
|
|
5703
5710
|
return -1;
|
|
5704
5711
|
for (; e = e.previousElementSibling; )
|
|
5705
|
-
e.nodeName.toUpperCase() !== "TEMPLATE" && e !==
|
|
5712
|
+
e.nodeName.toUpperCase() !== "TEMPLATE" && e !== v.clone && (!o || Rt(e, o)) && t++;
|
|
5706
5713
|
return t;
|
|
5707
5714
|
}
|
|
5708
5715
|
function Xo(e) {
|
|
@@ -5714,7 +5721,7 @@ function Xo(e) {
|
|
|
5714
5721
|
} while (e !== n && (e = e.parentNode));
|
|
5715
5722
|
return [o, t];
|
|
5716
5723
|
}
|
|
5717
|
-
function
|
|
5724
|
+
function Hr(e, o) {
|
|
5718
5725
|
for (var t in e)
|
|
5719
5726
|
if (e.hasOwnProperty(t)) {
|
|
5720
5727
|
for (var n in o)
|
|
@@ -5729,7 +5736,7 @@ function Ne(e, o) {
|
|
|
5729
5736
|
var t = e, n = !1;
|
|
5730
5737
|
do
|
|
5731
5738
|
if (t.clientWidth < t.scrollWidth || t.clientHeight < t.scrollHeight) {
|
|
5732
|
-
var i =
|
|
5739
|
+
var i = E(t);
|
|
5733
5740
|
if (t.clientWidth < t.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || t.clientHeight < t.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
5734
5741
|
if (!t.getBoundingClientRect || t === document.body)
|
|
5735
5742
|
return ge();
|
|
@@ -5741,7 +5748,7 @@ function Ne(e, o) {
|
|
|
5741
5748
|
while (t = t.parentNode);
|
|
5742
5749
|
return ge();
|
|
5743
5750
|
}
|
|
5744
|
-
function
|
|
5751
|
+
function Gr(e, o) {
|
|
5745
5752
|
if (e && o)
|
|
5746
5753
|
for (var t in o)
|
|
5747
5754
|
o.hasOwnProperty(t) && (e[t] = o[t]);
|
|
@@ -5750,49 +5757,49 @@ function Hr(e, o) {
|
|
|
5750
5757
|
function eo(e, o) {
|
|
5751
5758
|
return Math.round(e.top) === Math.round(o.top) && Math.round(e.left) === Math.round(o.left) && Math.round(e.height) === Math.round(o.height) && Math.round(e.width) === Math.round(o.width);
|
|
5752
5759
|
}
|
|
5753
|
-
var
|
|
5754
|
-
function
|
|
5760
|
+
var lt;
|
|
5761
|
+
function bn(e, o) {
|
|
5755
5762
|
return function() {
|
|
5756
|
-
if (!
|
|
5763
|
+
if (!lt) {
|
|
5757
5764
|
var t = arguments, n = this;
|
|
5758
|
-
t.length === 1 ? e.call(n, t[0]) : e.apply(n, t),
|
|
5759
|
-
|
|
5765
|
+
t.length === 1 ? e.call(n, t[0]) : e.apply(n, t), lt = setTimeout(function() {
|
|
5766
|
+
lt = void 0;
|
|
5760
5767
|
}, o);
|
|
5761
5768
|
}
|
|
5762
5769
|
};
|
|
5763
5770
|
}
|
|
5764
|
-
function
|
|
5765
|
-
clearTimeout(
|
|
5771
|
+
function Xr() {
|
|
5772
|
+
clearTimeout(lt), lt = void 0;
|
|
5766
5773
|
}
|
|
5767
|
-
function
|
|
5774
|
+
function On(e, o, t) {
|
|
5768
5775
|
e.scrollLeft += o, e.scrollTop += t;
|
|
5769
5776
|
}
|
|
5770
|
-
function
|
|
5777
|
+
function In(e) {
|
|
5771
5778
|
var o = window.Polymer, t = window.jQuery || window.Zepto;
|
|
5772
5779
|
return o && o.dom ? o.dom(e).cloneNode(!0) : t ? t(e).clone(!0)[0] : e.cloneNode(!0);
|
|
5773
5780
|
}
|
|
5774
|
-
function
|
|
5781
|
+
function Cn(e, o, t) {
|
|
5775
5782
|
var n = {};
|
|
5776
5783
|
return Array.from(e.children).forEach(function(i) {
|
|
5777
5784
|
var r, l, s, u;
|
|
5778
5785
|
if (!(!he(i, o.draggable, e, !1) || i.animated || i === t)) {
|
|
5779
|
-
var
|
|
5780
|
-
n.left = Math.min((r = n.left) !== null && r !== void 0 ? r : 1 / 0,
|
|
5786
|
+
var d = G(i);
|
|
5787
|
+
n.left = Math.min((r = n.left) !== null && r !== void 0 ? r : 1 / 0, d.left), n.top = Math.min((l = n.top) !== null && l !== void 0 ? l : 1 / 0, d.top), n.right = Math.max((s = n.right) !== null && s !== void 0 ? s : -1 / 0, d.right), n.bottom = Math.max((u = n.bottom) !== null && u !== void 0 ? u : -1 / 0, d.bottom);
|
|
5781
5788
|
}
|
|
5782
5789
|
}), n.width = n.right - n.left, n.height = n.bottom - n.top, n.x = n.left, n.y = n.top, n;
|
|
5783
5790
|
}
|
|
5784
5791
|
var le = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
5785
|
-
function
|
|
5792
|
+
function $r() {
|
|
5786
5793
|
var e = [], o;
|
|
5787
5794
|
return {
|
|
5788
5795
|
captureAnimationState: function() {
|
|
5789
5796
|
if (e = [], !!this.options.animation) {
|
|
5790
5797
|
var t = [].slice.call(this.el.children);
|
|
5791
5798
|
t.forEach(function(n) {
|
|
5792
|
-
if (!(
|
|
5799
|
+
if (!(E(n, "display") === "none" || n === v.ghost)) {
|
|
5793
5800
|
e.push({
|
|
5794
5801
|
target: n,
|
|
5795
|
-
rect:
|
|
5802
|
+
rect: G(n)
|
|
5796
5803
|
});
|
|
5797
5804
|
var i = Ee({}, e[e.length - 1].rect);
|
|
5798
5805
|
if (n.thisAnimationDuration) {
|
|
@@ -5808,7 +5815,7 @@ function Xr() {
|
|
|
5808
5815
|
e.push(t);
|
|
5809
5816
|
},
|
|
5810
5817
|
removeAnimationState: function(t) {
|
|
5811
|
-
e.splice(
|
|
5818
|
+
e.splice(Hr(e, {
|
|
5812
5819
|
target: t
|
|
5813
5820
|
}), 1);
|
|
5814
5821
|
},
|
|
@@ -5820,9 +5827,9 @@ function Xr() {
|
|
|
5820
5827
|
}
|
|
5821
5828
|
var i = !1, r = 0;
|
|
5822
5829
|
e.forEach(function(l) {
|
|
5823
|
-
var s = 0, u = l.target,
|
|
5824
|
-
|
|
5825
|
-
(h.top -
|
|
5830
|
+
var s = 0, u = l.target, d = u.fromRect, p = G(u), _ = u.prevFromRect, T = u.prevToRect, h = l.rect, C = ze(u, !0);
|
|
5831
|
+
C && (p.top -= C.f, p.left -= C.e), u.toRect = p, u.thisAnimationDuration && eo(_, p) && !eo(d, p) && // Make sure animatingRect is on line between toRect & fromRect
|
|
5832
|
+
(h.top - p.top) / (h.left - p.left) === (d.top - p.top) / (d.left - p.left) && (s = Wr(h, _, T, n.options)), eo(p, d) || (u.prevFromRect = d, u.prevToRect = p, s || (s = n.options.animation), n.animate(u, h, p, s)), s && (i = !0, r = Math.max(r, s), clearTimeout(u.animationResetTimer), u.animationResetTimer = setTimeout(function() {
|
|
5826
5833
|
u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null;
|
|
5827
5834
|
}, s), u.thisAnimationDuration = s);
|
|
5828
5835
|
}), clearTimeout(o), i ? o = setTimeout(function() {
|
|
@@ -5831,24 +5838,24 @@ function Xr() {
|
|
|
5831
5838
|
},
|
|
5832
5839
|
animate: function(t, n, i, r) {
|
|
5833
5840
|
if (r) {
|
|
5834
|
-
|
|
5835
|
-
var l = ze(this.el), s = l && l.a, u = l && l.d,
|
|
5836
|
-
t.animatingX = !!
|
|
5837
|
-
|
|
5841
|
+
E(t, "transition", ""), E(t, "transform", "");
|
|
5842
|
+
var l = ze(this.el), s = l && l.a, u = l && l.d, d = (n.left - i.left) / (s || 1), p = (n.top - i.top) / (u || 1);
|
|
5843
|
+
t.animatingX = !!d, t.animatingY = !!p, E(t, "transform", "translate3d(" + d + "px," + p + "px,0)"), this.forRepaintDummy = jr(t), E(t, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), E(t, "transform", "translate3d(0,0,0)"), typeof t.animated == "number" && clearTimeout(t.animated), t.animated = setTimeout(function() {
|
|
5844
|
+
E(t, "transition", ""), E(t, "transform", ""), t.animated = !1, t.animatingX = !1, t.animatingY = !1;
|
|
5838
5845
|
}, r);
|
|
5839
5846
|
}
|
|
5840
5847
|
}
|
|
5841
5848
|
};
|
|
5842
5849
|
}
|
|
5843
|
-
function
|
|
5850
|
+
function jr(e) {
|
|
5844
5851
|
return e.offsetWidth;
|
|
5845
5852
|
}
|
|
5846
|
-
function
|
|
5853
|
+
function Wr(e, o, t, n) {
|
|
5847
5854
|
return Math.sqrt(Math.pow(o.top - e.top, 2) + Math.pow(o.left - e.left, 2)) / Math.sqrt(Math.pow(o.top - t.top, 2) + Math.pow(o.left - t.left, 2)) * n.animation;
|
|
5848
5855
|
}
|
|
5849
5856
|
var Ke = [], to = {
|
|
5850
5857
|
initializeByDefault: !0
|
|
5851
|
-
},
|
|
5858
|
+
}, _t = {
|
|
5852
5859
|
mount: function(e) {
|
|
5853
5860
|
for (var o in to)
|
|
5854
5861
|
to.hasOwnProperty(o) && !(o in e) && (e[o] = to[o]);
|
|
@@ -5898,41 +5905,41 @@ var Ke = [], to = {
|
|
|
5898
5905
|
}), n;
|
|
5899
5906
|
}
|
|
5900
5907
|
};
|
|
5901
|
-
function
|
|
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,
|
|
5908
|
+
function Jr(e) {
|
|
5909
|
+
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, d = e.newIndex, p = e.oldDraggableIndex, _ = e.newDraggableIndex, T = e.originalEvent, h = e.putSortable, C = e.extraEventProperties;
|
|
5903
5910
|
if (o = o || t && t[le], !!o) {
|
|
5904
|
-
var
|
|
5905
|
-
window.CustomEvent && !Ae && !
|
|
5911
|
+
var y, x = o.options, k = "on" + n.charAt(0).toUpperCase() + n.substr(1);
|
|
5912
|
+
window.CustomEvent && !Ae && !ut ? y = new CustomEvent(n, {
|
|
5906
5913
|
bubbles: !0,
|
|
5907
5914
|
cancelable: !0
|
|
5908
|
-
}) : (
|
|
5909
|
-
var
|
|
5910
|
-
for (var
|
|
5911
|
-
|
|
5912
|
-
t && t.dispatchEvent(
|
|
5915
|
+
}) : (y = document.createEvent("Event"), y.initEvent(n, !0, !0)), y.to = l || t, y.from = s || t, y.item = i || t, y.clone = r, y.oldIndex = u, y.newIndex = d, y.oldDraggableIndex = p, y.newDraggableIndex = _, y.originalEvent = T, y.pullMode = h ? h.lastPutMode : void 0;
|
|
5916
|
+
var z = Ee(Ee({}, C), _t.getEventProperties(n, o));
|
|
5917
|
+
for (var D in z)
|
|
5918
|
+
y[D] = z[D];
|
|
5919
|
+
t && t.dispatchEvent(y), x[k] && x[k].call(o, y);
|
|
5913
5920
|
}
|
|
5914
5921
|
}
|
|
5915
|
-
var
|
|
5916
|
-
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = t.evt, i =
|
|
5917
|
-
|
|
5922
|
+
var zr = ["evt"], ee = function(e, o) {
|
|
5923
|
+
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, n = t.evt, i = Yr(t, zr);
|
|
5924
|
+
_t.pluginEvent.bind(v)(e, o, Ee({
|
|
5918
5925
|
dragEl: f,
|
|
5919
|
-
parentEl:
|
|
5920
|
-
ghostEl:
|
|
5921
|
-
rootEl:
|
|
5926
|
+
parentEl: U,
|
|
5927
|
+
ghostEl: O,
|
|
5928
|
+
rootEl: P,
|
|
5922
5929
|
nextEl: Me,
|
|
5923
|
-
lastDownEl:
|
|
5924
|
-
cloneEl:
|
|
5930
|
+
lastDownEl: At,
|
|
5931
|
+
cloneEl: w,
|
|
5925
5932
|
cloneHidden: ke,
|
|
5926
|
-
dragStarted:
|
|
5933
|
+
dragStarted: ot,
|
|
5927
5934
|
putSortable: $,
|
|
5928
|
-
activeSortable:
|
|
5935
|
+
activeSortable: v.active,
|
|
5929
5936
|
originalEvent: n,
|
|
5930
5937
|
oldIndex: We,
|
|
5931
|
-
oldDraggableIndex:
|
|
5938
|
+
oldDraggableIndex: at,
|
|
5932
5939
|
newIndex: ne,
|
|
5933
5940
|
newDraggableIndex: Le,
|
|
5934
|
-
hideGhostForTarget:
|
|
5935
|
-
unhideGhostForTarget:
|
|
5941
|
+
hideGhostForTarget: Nn,
|
|
5942
|
+
unhideGhostForTarget: Sn,
|
|
5936
5943
|
cloneNowHidden: function() {
|
|
5937
5944
|
ke = !0;
|
|
5938
5945
|
},
|
|
@@ -5949,81 +5956,81 @@ var Jr = ["evt"], ee = function(e, o) {
|
|
|
5949
5956
|
}, i));
|
|
5950
5957
|
};
|
|
5951
5958
|
function Q(e) {
|
|
5952
|
-
|
|
5959
|
+
Jr(Ee({
|
|
5953
5960
|
putSortable: $,
|
|
5954
|
-
cloneEl:
|
|
5961
|
+
cloneEl: w,
|
|
5955
5962
|
targetEl: f,
|
|
5956
|
-
rootEl:
|
|
5963
|
+
rootEl: P,
|
|
5957
5964
|
oldIndex: We,
|
|
5958
|
-
oldDraggableIndex:
|
|
5965
|
+
oldDraggableIndex: at,
|
|
5959
5966
|
newIndex: ne,
|
|
5960
5967
|
newDraggableIndex: Le
|
|
5961
5968
|
}, e));
|
|
5962
5969
|
}
|
|
5963
|
-
var f,
|
|
5964
|
-
if (
|
|
5970
|
+
var f, U, O, P, Me, At, w, ke, We, ne, at, Le, mt, $, Ge = !1, Mt = !1, Dt = [], Be, fe, oo, no, $o, jo, ot, Fe, st, ct = !1, gt = !1, Lt, J, io = [], _o = !1, xt = [], Wt = typeof document < "u", Et = gn, Wo = ut || Ae ? "cssFloat" : "float", qr = Wt && !En && !gn && "draggable" in document.createElement("div"), An = function() {
|
|
5971
|
+
if (Wt) {
|
|
5965
5972
|
if (Ae)
|
|
5966
5973
|
return !1;
|
|
5967
5974
|
var e = document.createElement("x");
|
|
5968
5975
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
5969
5976
|
}
|
|
5970
|
-
}(),
|
|
5971
|
-
var t =
|
|
5977
|
+
}(), Ln = function(e, o) {
|
|
5978
|
+
var t = E(e), n = parseInt(t.width) - parseInt(t.paddingLeft) - parseInt(t.paddingRight) - parseInt(t.borderLeftWidth) - parseInt(t.borderRightWidth), i = Qe(e, 0, o), r = Qe(e, 1, o), l = i && E(i), s = r && E(r), u = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + G(i).width, d = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + G(r).width;
|
|
5972
5979
|
if (t.display === "flex")
|
|
5973
5980
|
return t.flexDirection === "column" || t.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
5974
5981
|
if (t.display === "grid")
|
|
5975
5982
|
return t.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
5976
5983
|
if (i && l.float && l.float !== "none") {
|
|
5977
|
-
var
|
|
5978
|
-
return r && (s.clear === "both" || s.clear ===
|
|
5984
|
+
var p = l.float === "left" ? "left" : "right";
|
|
5985
|
+
return r && (s.clear === "both" || s.clear === p) ? "vertical" : "horizontal";
|
|
5979
5986
|
}
|
|
5980
|
-
return i && (l.display === "block" || l.display === "flex" || l.display === "table" || l.display === "grid" || u >= n && t[Wo] === "none" || r && t[Wo] === "none" && u +
|
|
5981
|
-
},
|
|
5987
|
+
return i && (l.display === "block" || l.display === "flex" || l.display === "table" || l.display === "grid" || u >= n && t[Wo] === "none" || r && t[Wo] === "none" && u + d > n) ? "vertical" : "horizontal";
|
|
5988
|
+
}, Qr = function(e, o, t) {
|
|
5982
5989
|
var n = t ? e.left : e.top, i = t ? e.right : e.bottom, r = t ? e.width : e.height, l = t ? o.left : o.top, s = t ? o.right : o.bottom, u = t ? o.width : o.height;
|
|
5983
5990
|
return n === l || i === s || n + r / 2 === l + u / 2;
|
|
5984
|
-
},
|
|
5991
|
+
}, Zr = function(e, o) {
|
|
5985
5992
|
var t;
|
|
5986
|
-
return
|
|
5993
|
+
return Dt.some(function(n) {
|
|
5987
5994
|
var i = n[le].options.emptyInsertThreshold;
|
|
5988
5995
|
if (!(!i || Oo(n))) {
|
|
5989
|
-
var r =
|
|
5996
|
+
var r = G(n), l = e >= r.left - i && e <= r.right + i, s = o >= r.top - i && o <= r.bottom + i;
|
|
5990
5997
|
if (l && s)
|
|
5991
5998
|
return t = n;
|
|
5992
5999
|
}
|
|
5993
6000
|
}), t;
|
|
5994
|
-
},
|
|
6001
|
+
}, kn = function(e) {
|
|
5995
6002
|
function o(i, r) {
|
|
5996
|
-
return function(l, s, u,
|
|
5997
|
-
var
|
|
5998
|
-
if (i == null && (r ||
|
|
6003
|
+
return function(l, s, u, d) {
|
|
6004
|
+
var p = l.options.group.name && s.options.group.name && l.options.group.name === s.options.group.name;
|
|
6005
|
+
if (i == null && (r || p))
|
|
5999
6006
|
return !0;
|
|
6000
6007
|
if (i == null || i === !1)
|
|
6001
6008
|
return !1;
|
|
6002
6009
|
if (r && i === "clone")
|
|
6003
6010
|
return i;
|
|
6004
6011
|
if (typeof i == "function")
|
|
6005
|
-
return o(i(l, s, u,
|
|
6012
|
+
return o(i(l, s, u, d), r)(l, s, u, d);
|
|
6006
6013
|
var _ = (r ? l : s).options.group.name;
|
|
6007
6014
|
return i === !0 || typeof i == "string" && i === _ || i.join && i.indexOf(_) > -1;
|
|
6008
6015
|
};
|
|
6009
6016
|
}
|
|
6010
6017
|
var t = {}, n = e.group;
|
|
6011
|
-
(!n ||
|
|
6018
|
+
(!n || Ct(n) != "object") && (n = {
|
|
6012
6019
|
name: n
|
|
6013
6020
|
}), t.name = n.name, t.checkPull = o(n.pull, !0), t.checkPut = o(n.put), t.revertClone = n.revertClone, e.group = t;
|
|
6014
|
-
}, kn = function() {
|
|
6015
|
-
!Cn && I && v(I, "display", "none");
|
|
6016
6021
|
}, Nn = function() {
|
|
6017
|
-
!
|
|
6022
|
+
!An && O && E(O, "display", "none");
|
|
6023
|
+
}, Sn = function() {
|
|
6024
|
+
!An && O && E(O, "display", "");
|
|
6018
6025
|
};
|
|
6019
|
-
|
|
6020
|
-
if (
|
|
6021
|
-
return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(),
|
|
6026
|
+
Wt && !En && document.addEventListener("click", function(e) {
|
|
6027
|
+
if (Mt)
|
|
6028
|
+
return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Mt = !1, !1;
|
|
6022
6029
|
}, !0);
|
|
6023
6030
|
var Re = function(e) {
|
|
6024
6031
|
if (f) {
|
|
6025
6032
|
e = e.touches ? e.touches[0] : e;
|
|
6026
|
-
var o =
|
|
6033
|
+
var o = Zr(e.clientX, e.clientY);
|
|
6027
6034
|
if (o) {
|
|
6028
6035
|
var t = {};
|
|
6029
6036
|
for (var n in e)
|
|
@@ -6031,10 +6038,10 @@ var Re = function(e) {
|
|
|
6031
6038
|
t.target = t.rootEl = o, t.preventDefault = void 0, t.stopPropagation = void 0, o[le]._onDragOver(t);
|
|
6032
6039
|
}
|
|
6033
6040
|
}
|
|
6034
|
-
},
|
|
6041
|
+
}, el = function(e) {
|
|
6035
6042
|
f && f.parentNode[le]._isOutsideThisEl(e.target);
|
|
6036
6043
|
};
|
|
6037
|
-
function
|
|
6044
|
+
function v(e, o) {
|
|
6038
6045
|
if (!(e && e.nodeType && e.nodeType === 1))
|
|
6039
6046
|
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));
|
|
6040
6047
|
this.el = e, this.options = o = Ce({}, o), e[le] = this;
|
|
@@ -6053,7 +6060,7 @@ function y(e, o) {
|
|
|
6053
6060
|
// will be set to same as swapThreshold if default
|
|
6054
6061
|
removeCloneOnHide: !0,
|
|
6055
6062
|
direction: function() {
|
|
6056
|
-
return
|
|
6063
|
+
return Ln(e, this.options);
|
|
6057
6064
|
},
|
|
6058
6065
|
ghostClass: "sortable-ghost",
|
|
6059
6066
|
chosenClass: "sortable-chosen",
|
|
@@ -6080,20 +6087,20 @@ function y(e, o) {
|
|
|
6080
6087
|
x: 0,
|
|
6081
6088
|
y: 0
|
|
6082
6089
|
},
|
|
6083
|
-
supportPointer:
|
|
6090
|
+
supportPointer: v.supportPointer !== !1 && "PointerEvent" in window && !rt,
|
|
6084
6091
|
emptyInsertThreshold: 5
|
|
6085
6092
|
};
|
|
6086
|
-
|
|
6093
|
+
_t.initializePlugins(this, e, t);
|
|
6087
6094
|
for (var n in t)
|
|
6088
6095
|
!(n in o) && (o[n] = t[n]);
|
|
6089
|
-
|
|
6096
|
+
kn(o);
|
|
6090
6097
|
for (var i in this)
|
|
6091
6098
|
i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
6092
|
-
this.nativeDraggable = o.forceFallback ? !1 :
|
|
6099
|
+
this.nativeDraggable = o.forceFallback ? !1 : qr, this.nativeDraggable && (this.options.touchStartThreshold = 1), o.supportPointer ? N(e, "pointerdown", this._onTapStart) : (N(e, "mousedown", this._onTapStart), N(e, "touchstart", this._onTapStart)), this.nativeDraggable && (N(e, "dragover", this), N(e, "dragenter", this)), Dt.push(this.el), o.store && o.store.get && this.sort(o.store.get(this) || []), Ce(this, $r());
|
|
6093
6100
|
}
|
|
6094
|
-
|
|
6101
|
+
v.prototype = /** @lends Sortable.prototype */
|
|
6095
6102
|
{
|
|
6096
|
-
constructor:
|
|
6103
|
+
constructor: v,
|
|
6097
6104
|
_isOutsideThisEl: function(e) {
|
|
6098
6105
|
!this.el.contains(e) && e !== this.el && (Fe = null);
|
|
6099
6106
|
},
|
|
@@ -6102,10 +6109,10 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6102
6109
|
},
|
|
6103
6110
|
_onTapStart: function(e) {
|
|
6104
6111
|
if (e.cancelable) {
|
|
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,
|
|
6106
|
-
if (
|
|
6107
|
-
if (We =
|
|
6108
|
-
if (
|
|
6112
|
+
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, d = n.filter;
|
|
6113
|
+
if (sl(t), !f && !(/mousedown|pointerdown/.test(r) && e.button !== 0 || n.disabled) && !u.isContentEditable && !(!this.nativeDraggable && rt && s && s.tagName.toUpperCase() === "SELECT") && (s = he(s, n.draggable, t, !1), !(s && s.animated) && At !== s)) {
|
|
6114
|
+
if (We = ce(s), at = ce(s, n.draggable), typeof d == "function") {
|
|
6115
|
+
if (d.call(this, e, s, this)) {
|
|
6109
6116
|
Q({
|
|
6110
6117
|
sortable: o,
|
|
6111
6118
|
rootEl: u,
|
|
@@ -6118,11 +6125,11 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6118
6125
|
}), i && e.cancelable && e.preventDefault();
|
|
6119
6126
|
return;
|
|
6120
6127
|
}
|
|
6121
|
-
} else if (
|
|
6122
|
-
if (
|
|
6128
|
+
} else if (d && (d = d.split(",").some(function(p) {
|
|
6129
|
+
if (p = he(u, p.trim(), t, !1), p)
|
|
6123
6130
|
return Q({
|
|
6124
6131
|
sortable: o,
|
|
6125
|
-
rootEl:
|
|
6132
|
+
rootEl: p,
|
|
6126
6133
|
name: "filter",
|
|
6127
6134
|
targetEl: s,
|
|
6128
6135
|
fromEl: t,
|
|
@@ -6130,7 +6137,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6130
6137
|
}), ee("filter", o, {
|
|
6131
6138
|
evt: e
|
|
6132
6139
|
}), !0;
|
|
6133
|
-
}),
|
|
6140
|
+
}), d)) {
|
|
6134
6141
|
i && e.cancelable && e.preventDefault();
|
|
6135
6142
|
return;
|
|
6136
6143
|
}
|
|
@@ -6141,15 +6148,15 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6141
6148
|
_prepareDragStart: function(e, o, t) {
|
|
6142
6149
|
var n = this, i = n.el, r = n.options, l = i.ownerDocument, s;
|
|
6143
6150
|
if (t && !f && t.parentNode === i) {
|
|
6144
|
-
var u =
|
|
6145
|
-
if (
|
|
6151
|
+
var u = G(t);
|
|
6152
|
+
if (P = i, f = t, U = f.parentNode, Me = f.nextSibling, At = t, mt = r.group, v.dragged = f, Be = {
|
|
6146
6153
|
target: f,
|
|
6147
6154
|
clientX: (o || e).clientX,
|
|
6148
6155
|
clientY: (o || e).clientY
|
|
6149
6156
|
}, $o = Be.clientX - u.left, jo = Be.clientY - u.top, this._lastX = (o || e).clientX, this._lastY = (o || e).clientY, f.style["will-change"] = "all", s = function() {
|
|
6150
6157
|
if (ee("delayEnded", n, {
|
|
6151
6158
|
evt: e
|
|
6152
|
-
}),
|
|
6159
|
+
}), v.eventCanceled) {
|
|
6153
6160
|
n._onDrop();
|
|
6154
6161
|
return;
|
|
6155
6162
|
}
|
|
@@ -6158,16 +6165,16 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6158
6165
|
name: "choose",
|
|
6159
6166
|
originalEvent: e
|
|
6160
6167
|
}), oe(f, r.chosenClass, !0);
|
|
6161
|
-
}, r.ignore.split(",").forEach(function(
|
|
6162
|
-
|
|
6163
|
-
}),
|
|
6168
|
+
}, r.ignore.split(",").forEach(function(d) {
|
|
6169
|
+
yn(f, d.trim(), ro);
|
|
6170
|
+
}), N(l, "dragover", Re), N(l, "mousemove", Re), N(l, "touchmove", Re), N(l, "mouseup", n._onDrop), N(l, "touchend", n._onDrop), N(l, "touchcancel", n._onDrop), Fo && this.nativeDraggable && (this.options.touchStartThreshold = 4, f.draggable = !0), ee("delayStart", this, {
|
|
6164
6171
|
evt: e
|
|
6165
|
-
}), r.delay && (!r.delayOnTouchOnly || o) && (!this.nativeDraggable || !(
|
|
6166
|
-
if (
|
|
6172
|
+
}), r.delay && (!r.delayOnTouchOnly || o) && (!this.nativeDraggable || !(ut || Ae))) {
|
|
6173
|
+
if (v.eventCanceled) {
|
|
6167
6174
|
this._onDrop();
|
|
6168
6175
|
return;
|
|
6169
6176
|
}
|
|
6170
|
-
|
|
6177
|
+
N(l, "mouseup", n._disableDelayedDrag), N(l, "touchend", n._disableDelayedDrag), N(l, "touchcancel", n._disableDelayedDrag), N(l, "mousemove", n._delayedDragTouchMoveHandler), N(l, "touchmove", n._delayedDragTouchMoveHandler), r.supportPointer && N(l, "pointermove", n._delayedDragTouchMoveHandler), n._dragStartTimer = setTimeout(s, r.delay);
|
|
6171
6178
|
} else
|
|
6172
6179
|
s();
|
|
6173
6180
|
}
|
|
@@ -6184,21 +6191,21 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6184
6191
|
L(e, "mouseup", this._disableDelayedDrag), L(e, "touchend", this._disableDelayedDrag), L(e, "touchcancel", this._disableDelayedDrag), L(e, "mousemove", this._delayedDragTouchMoveHandler), L(e, "touchmove", this._delayedDragTouchMoveHandler), L(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
6185
6192
|
},
|
|
6186
6193
|
_triggerDragStart: function(e, o) {
|
|
6187
|
-
o = o || e.pointerType == "touch" && e, !this.nativeDraggable || o ? this.options.supportPointer ?
|
|
6194
|
+
o = o || e.pointerType == "touch" && e, !this.nativeDraggable || o ? this.options.supportPointer ? N(document, "pointermove", this._onTouchMove) : o ? N(document, "touchmove", this._onTouchMove) : N(document, "mousemove", this._onTouchMove) : (N(f, "dragend", this), N(P, "dragstart", this._onDragStart));
|
|
6188
6195
|
try {
|
|
6189
|
-
document.selection ?
|
|
6196
|
+
document.selection ? kt(function() {
|
|
6190
6197
|
document.selection.empty();
|
|
6191
6198
|
}) : window.getSelection().removeAllRanges();
|
|
6192
6199
|
} catch {
|
|
6193
6200
|
}
|
|
6194
6201
|
},
|
|
6195
6202
|
_dragStarted: function(e, o) {
|
|
6196
|
-
if (Ge = !1,
|
|
6203
|
+
if (Ge = !1, P && f) {
|
|
6197
6204
|
ee("dragStarted", this, {
|
|
6198
6205
|
evt: o
|
|
6199
|
-
}), this.nativeDraggable &&
|
|
6206
|
+
}), this.nativeDraggable && N(document, "dragover", el);
|
|
6200
6207
|
var t = this.options;
|
|
6201
|
-
!e && oe(f, t.dragClass, !1), oe(f, t.ghostClass, !0),
|
|
6208
|
+
!e && oe(f, t.dragClass, !1), oe(f, t.ghostClass, !0), v.active = this, e && this._appendGhost(), Q({
|
|
6202
6209
|
sortable: this,
|
|
6203
6210
|
name: "start",
|
|
6204
6211
|
originalEvent: o
|
|
@@ -6208,7 +6215,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6208
6215
|
},
|
|
6209
6216
|
_emulateDragOver: function() {
|
|
6210
6217
|
if (fe) {
|
|
6211
|
-
this._lastX = fe.clientX, this._lastY = fe.clientY,
|
|
6218
|
+
this._lastX = fe.clientX, this._lastY = fe.clientY, Nn();
|
|
6212
6219
|
for (var e = document.elementFromPoint(fe.clientX, fe.clientY), o = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(fe.clientX, fe.clientY), e !== o); )
|
|
6213
6220
|
o = e;
|
|
6214
6221
|
if (f.parentNode[le]._isOutsideThisEl(e), o)
|
|
@@ -6225,93 +6232,93 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6225
6232
|
}
|
|
6226
6233
|
e = o;
|
|
6227
6234
|
} while (o = o.parentNode);
|
|
6228
|
-
|
|
6235
|
+
Sn();
|
|
6229
6236
|
}
|
|
6230
6237
|
},
|
|
6231
6238
|
_onTouchMove: function(e) {
|
|
6232
6239
|
if (Be) {
|
|
6233
|
-
var o = this.options, t = o.fallbackTolerance, n = o.fallbackOffset, i = e.touches ? e.touches[0] : e, r =
|
|
6234
|
-
if (!
|
|
6240
|
+
var o = this.options, t = o.fallbackTolerance, n = o.fallbackOffset, i = e.touches ? e.touches[0] : e, r = O && ze(O, !0), l = O && r && r.a, s = O && r && r.d, u = Et && J && Xo(J), d = (i.clientX - Be.clientX + n.x) / (l || 1) + (u ? u[0] - io[0] : 0) / (l || 1), p = (i.clientY - Be.clientY + n.y) / (s || 1) + (u ? u[1] - io[1] : 0) / (s || 1);
|
|
6241
|
+
if (!v.active && !Ge) {
|
|
6235
6242
|
if (t && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < t)
|
|
6236
6243
|
return;
|
|
6237
6244
|
this._onDragStart(e, !0);
|
|
6238
6245
|
}
|
|
6239
|
-
if (
|
|
6240
|
-
r ? (r.e +=
|
|
6246
|
+
if (O) {
|
|
6247
|
+
r ? (r.e += d - (oo || 0), r.f += p - (no || 0)) : r = {
|
|
6241
6248
|
a: 1,
|
|
6242
6249
|
b: 0,
|
|
6243
6250
|
c: 0,
|
|
6244
6251
|
d: 1,
|
|
6245
|
-
e:
|
|
6246
|
-
f:
|
|
6252
|
+
e: d,
|
|
6253
|
+
f: p
|
|
6247
6254
|
};
|
|
6248
6255
|
var _ = "matrix(".concat(r.a, ",").concat(r.b, ",").concat(r.c, ",").concat(r.d, ",").concat(r.e, ",").concat(r.f, ")");
|
|
6249
|
-
|
|
6256
|
+
E(O, "webkitTransform", _), E(O, "mozTransform", _), E(O, "msTransform", _), E(O, "transform", _), oo = d, no = p, fe = i;
|
|
6250
6257
|
}
|
|
6251
6258
|
e.cancelable && e.preventDefault();
|
|
6252
6259
|
}
|
|
6253
6260
|
},
|
|
6254
6261
|
_appendGhost: function() {
|
|
6255
|
-
if (!
|
|
6256
|
-
var e = this.options.fallbackOnBody ? document.body :
|
|
6257
|
-
if (
|
|
6258
|
-
for (J = e;
|
|
6262
|
+
if (!O) {
|
|
6263
|
+
var e = this.options.fallbackOnBody ? document.body : P, o = G(f, !0, Et, !0, e), t = this.options;
|
|
6264
|
+
if (Et) {
|
|
6265
|
+
for (J = e; E(J, "position") === "static" && E(J, "transform") === "none" && J !== document; )
|
|
6259
6266
|
J = J.parentNode;
|
|
6260
6267
|
J !== document.body && J !== document.documentElement ? (J === document && (J = ge()), o.top += J.scrollTop, o.left += J.scrollLeft) : J = ge(), io = Xo(J);
|
|
6261
6268
|
}
|
|
6262
|
-
|
|
6269
|
+
O = f.cloneNode(!0), oe(O, t.ghostClass, !1), oe(O, t.fallbackClass, !0), oe(O, t.dragClass, !0), E(O, "transition", ""), E(O, "transform", ""), E(O, "box-sizing", "border-box"), E(O, "margin", 0), E(O, "top", o.top), E(O, "left", o.left), E(O, "width", o.width), E(O, "height", o.height), E(O, "opacity", "0.8"), E(O, "position", Et ? "absolute" : "fixed"), E(O, "zIndex", "100000"), E(O, "pointerEvents", "none"), v.ghost = O, e.appendChild(O), E(O, "transform-origin", $o / parseInt(O.style.width) * 100 + "% " + jo / parseInt(O.style.height) * 100 + "%");
|
|
6263
6270
|
}
|
|
6264
6271
|
},
|
|
6265
6272
|
_onDragStart: function(e, o) {
|
|
6266
6273
|
var t = this, n = e.dataTransfer, i = t.options;
|
|
6267
6274
|
if (ee("dragStart", this, {
|
|
6268
6275
|
evt: e
|
|
6269
|
-
}),
|
|
6276
|
+
}), v.eventCanceled) {
|
|
6270
6277
|
this._onDrop();
|
|
6271
6278
|
return;
|
|
6272
6279
|
}
|
|
6273
|
-
ee("setupClone", this),
|
|
6274
|
-
ee("clone", t), !
|
|
6280
|
+
ee("setupClone", this), v.eventCanceled || (w = In(f), w.removeAttribute("id"), w.draggable = !1, w.style["will-change"] = "", this._hideClone(), oe(w, this.options.chosenClass, !1), v.clone = w), t.cloneId = kt(function() {
|
|
6281
|
+
ee("clone", t), !v.eventCanceled && (t.options.removeCloneOnHide || P.insertBefore(w, f), t._hideClone(), Q({
|
|
6275
6282
|
sortable: t,
|
|
6276
6283
|
name: "clone"
|
|
6277
6284
|
}));
|
|
6278
|
-
}), !o && oe(f, i.dragClass, !0), o ? (
|
|
6285
|
+
}), !o && oe(f, i.dragClass, !0), o ? (Mt = !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)), N(document, "drop", t), E(f, "transform", "translateZ(0)")), Ge = !0, t._dragStartId = kt(t._dragStarted.bind(t, o, e)), N(document, "selectstart", t), ot = !0, rt && E(document.body, "user-select", "none");
|
|
6279
6286
|
},
|
|
6280
6287
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
6281
6288
|
_onDragOver: function(e) {
|
|
6282
|
-
var o = this.el, t = e.target, n, i, r, l = this.options, s = l.group, u =
|
|
6289
|
+
var o = this.el, t = e.target, n, i, r, l = this.options, s = l.group, u = v.active, d = mt === s, p = l.sort, _ = $ || u, T, h = this, C = !1;
|
|
6283
6290
|
if (_o)
|
|
6284
6291
|
return;
|
|
6285
|
-
function
|
|
6286
|
-
ee(
|
|
6292
|
+
function y(se, Ze) {
|
|
6293
|
+
ee(se, h, Ee({
|
|
6287
6294
|
evt: e,
|
|
6288
|
-
isOwner:
|
|
6289
|
-
axis:
|
|
6295
|
+
isOwner: d,
|
|
6296
|
+
axis: T ? "vertical" : "horizontal",
|
|
6290
6297
|
revert: r,
|
|
6291
6298
|
dragRect: n,
|
|
6292
6299
|
targetRect: i,
|
|
6293
|
-
canSort:
|
|
6300
|
+
canSort: p,
|
|
6294
6301
|
fromSortable: _,
|
|
6295
6302
|
target: t,
|
|
6296
|
-
completed:
|
|
6297
|
-
onMove: function(Ao,
|
|
6298
|
-
return
|
|
6303
|
+
completed: k,
|
|
6304
|
+
onMove: function(Ao, xn) {
|
|
6305
|
+
return vt(P, o, f, n, Ao, G(Ao), e, xn);
|
|
6299
6306
|
},
|
|
6300
|
-
changed:
|
|
6301
|
-
},
|
|
6307
|
+
changed: z
|
|
6308
|
+
}, Ze));
|
|
6302
6309
|
}
|
|
6303
|
-
function
|
|
6304
|
-
|
|
6310
|
+
function x() {
|
|
6311
|
+
y("dragOverAnimationCapture"), h.captureAnimationState(), h !== _ && _.captureAnimationState();
|
|
6305
6312
|
}
|
|
6306
|
-
function
|
|
6307
|
-
return
|
|
6308
|
-
insertion:
|
|
6309
|
-
}),
|
|
6310
|
-
|
|
6311
|
-
}), h !== _ && (_.animateAll(), _._ignoreWhileAnimating = null)), (t === f && !f.animated || t === o && !t.animated) && (Fe = null), !l.dragoverBubble && !e.rootEl && t !== document && (f.parentNode[le]._isOutsideThisEl(e.target), !
|
|
6313
|
+
function k(se) {
|
|
6314
|
+
return y("dragOverCompleted", {
|
|
6315
|
+
insertion: se
|
|
6316
|
+
}), se && (d ? u._hideClone() : u._showClone(h), h !== _ && (oe(f, $ ? $.options.ghostClass : u.options.ghostClass, !1), oe(f, l.ghostClass, !0)), $ !== h && h !== v.active ? $ = h : h === v.active && $ && ($ = null), _ === h && (h._ignoreWhileAnimating = t), h.animateAll(function() {
|
|
6317
|
+
y("dragOverAnimationComplete"), h._ignoreWhileAnimating = null;
|
|
6318
|
+
}), h !== _ && (_.animateAll(), _._ignoreWhileAnimating = null)), (t === f && !f.animated || t === o && !t.animated) && (Fe = null), !l.dragoverBubble && !e.rootEl && t !== document && (f.parentNode[le]._isOutsideThisEl(e.target), !se && Re(e)), !l.dragoverBubble && e.stopPropagation && e.stopPropagation(), C = !0;
|
|
6312
6319
|
}
|
|
6313
|
-
function
|
|
6314
|
-
ne =
|
|
6320
|
+
function z() {
|
|
6321
|
+
ne = ce(f), Le = ce(f, l.draggable), Q({
|
|
6315
6322
|
sortable: h,
|
|
6316
6323
|
name: "change",
|
|
6317
6324
|
toEl: o,
|
|
@@ -6320,49 +6327,49 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6320
6327
|
originalEvent: e
|
|
6321
6328
|
});
|
|
6322
6329
|
}
|
|
6323
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), t = he(t, l.draggable, o, !0),
|
|
6324
|
-
return
|
|
6330
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), t = he(t, l.draggable, o, !0), y("dragOver"), v.eventCanceled)
|
|
6331
|
+
return C;
|
|
6325
6332
|
if (f.contains(e.target) || t.animated && t.animatingX && t.animatingY || h._ignoreWhileAnimating === t)
|
|
6326
|
-
return
|
|
6327
|
-
if (
|
|
6328
|
-
if (
|
|
6329
|
-
return
|
|
6333
|
+
return k(!1);
|
|
6334
|
+
if (Mt = !1, u && !l.disabled && (d ? p || (r = U !== P) : $ === this || (this.lastPutMode = mt.checkPull(this, u, f, e)) && s.checkPut(this, u, f, e))) {
|
|
6335
|
+
if (T = this._getDirection(e, t) === "vertical", n = G(f), y("dragOverValid"), v.eventCanceled)
|
|
6336
|
+
return C;
|
|
6330
6337
|
if (r)
|
|
6331
|
-
return
|
|
6332
|
-
var
|
|
6333
|
-
if (!
|
|
6334
|
-
if (
|
|
6335
|
-
return
|
|
6336
|
-
if (
|
|
6337
|
-
return
|
|
6338
|
-
} else if (
|
|
6339
|
-
var
|
|
6340
|
-
if (
|
|
6341
|
-
return
|
|
6342
|
-
if (t =
|
|
6343
|
-
return
|
|
6338
|
+
return U = P, x(), this._hideClone(), y("revert"), v.eventCanceled || (Me ? P.insertBefore(f, Me) : P.appendChild(f)), k(!0);
|
|
6339
|
+
var D = Oo(o, l.draggable);
|
|
6340
|
+
if (!D || il(e, T, this) && !D.animated) {
|
|
6341
|
+
if (D === f)
|
|
6342
|
+
return k(!1);
|
|
6343
|
+
if (D && o === e.target && (t = D), t && (i = G(t)), vt(P, o, f, n, t, i, e, !!t) !== !1)
|
|
6344
|
+
return x(), D && D.nextSibling ? o.insertBefore(f, D.nextSibling) : o.appendChild(f), U = o, z(), k(!0);
|
|
6345
|
+
} else if (D && nl(e, T, this)) {
|
|
6346
|
+
var ae = Qe(o, 0, l, !0);
|
|
6347
|
+
if (ae === f)
|
|
6348
|
+
return k(!1);
|
|
6349
|
+
if (t = ae, i = G(t), vt(P, o, f, n, t, i, e, !1) !== !1)
|
|
6350
|
+
return x(), o.insertBefore(f, ae), U = o, z(), k(!0);
|
|
6344
6351
|
} else if (t.parentNode === o) {
|
|
6345
|
-
i =
|
|
6346
|
-
var
|
|
6347
|
-
Fe !== t && (
|
|
6352
|
+
i = G(t);
|
|
6353
|
+
var K = 0, de, ve = f.parentNode !== o, b = !Qr(f.animated && f.toRect || n, t.animated && t.toRect || i, T), A = T ? "top" : "left", R = Go(t, "top", "top") || Go(f, "top", "top"), F = R ? R.scrollTop : void 0;
|
|
6354
|
+
Fe !== t && (de = i[A], ct = !1, gt = !b && l.invertSwap || ve), K = rl(e, t, i, T, b ? 1 : l.swapThreshold, l.invertedSwapThreshold == null ? l.swapThreshold : l.invertedSwapThreshold, gt, Fe === t);
|
|
6348
6355
|
var B;
|
|
6349
|
-
if (
|
|
6350
|
-
var
|
|
6356
|
+
if (K !== 0) {
|
|
6357
|
+
var V = ce(f);
|
|
6351
6358
|
do
|
|
6352
|
-
|
|
6353
|
-
while (B && (
|
|
6359
|
+
V -= K, B = U.children[V];
|
|
6360
|
+
while (B && (E(B, "display") === "none" || B === O));
|
|
6354
6361
|
}
|
|
6355
|
-
if (
|
|
6356
|
-
return
|
|
6357
|
-
Fe = t,
|
|
6358
|
-
var
|
|
6359
|
-
|
|
6360
|
-
var
|
|
6361
|
-
if (
|
|
6362
|
-
return (
|
|
6362
|
+
if (K === 0 || B === t)
|
|
6363
|
+
return k(!1);
|
|
6364
|
+
Fe = t, st = K;
|
|
6365
|
+
var I = t.nextElementSibling, M = !1;
|
|
6366
|
+
M = K === 1;
|
|
6367
|
+
var Z = vt(P, o, f, n, t, i, e, M);
|
|
6368
|
+
if (Z !== !1)
|
|
6369
|
+
return (Z === 1 || Z === -1) && (M = Z === 1), _o = !0, setTimeout(ol, 30), x(), M && !I ? o.appendChild(f) : t.parentNode.insertBefore(f, M ? I : t), R && On(R, 0, F - R.scrollTop), U = f.parentNode, de !== void 0 && !gt && (Lt = Math.abs(de - G(t)[A])), z(), k(!0);
|
|
6363
6370
|
}
|
|
6364
6371
|
if (o.contains(f))
|
|
6365
|
-
return
|
|
6372
|
+
return k(!1);
|
|
6366
6373
|
}
|
|
6367
6374
|
return !1;
|
|
6368
6375
|
},
|
|
@@ -6376,62 +6383,62 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6376
6383
|
},
|
|
6377
6384
|
_onDrop: function(e) {
|
|
6378
6385
|
var o = this.el, t = this.options;
|
|
6379
|
-
if (ne =
|
|
6386
|
+
if (ne = ce(f), Le = ce(f, t.draggable), ee("drop", this, {
|
|
6380
6387
|
evt: e
|
|
6381
|
-
}),
|
|
6388
|
+
}), U = f && f.parentNode, ne = ce(f), Le = ce(f, t.draggable), v.eventCanceled) {
|
|
6382
6389
|
this._nulling();
|
|
6383
6390
|
return;
|
|
6384
6391
|
}
|
|
6385
|
-
Ge = !1,
|
|
6392
|
+
Ge = !1, gt = !1, ct = !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(), rt && E(document.body, "user-select", ""), E(f, "transform", ""), e && (ot && (e.cancelable && e.preventDefault(), !t.dropBubble && e.stopPropagation()), O && O.parentNode && O.parentNode.removeChild(O), (P === U || $ && $.lastPutMode !== "clone") && w && w.parentNode && w.parentNode.removeChild(w), f && (this.nativeDraggable && L(f, "dragend", this), ro(f), f.style["will-change"] = "", ot && !Ge && oe(f, $ ? $.options.ghostClass : this.options.ghostClass, !1), oe(f, this.options.chosenClass, !1), Q({
|
|
6386
6393
|
sortable: this,
|
|
6387
6394
|
name: "unchoose",
|
|
6388
|
-
toEl:
|
|
6395
|
+
toEl: U,
|
|
6389
6396
|
newIndex: null,
|
|
6390
6397
|
newDraggableIndex: null,
|
|
6391
6398
|
originalEvent: e
|
|
6392
|
-
}),
|
|
6393
|
-
rootEl:
|
|
6399
|
+
}), P !== U ? (ne >= 0 && (Q({
|
|
6400
|
+
rootEl: U,
|
|
6394
6401
|
name: "add",
|
|
6395
|
-
toEl:
|
|
6396
|
-
fromEl:
|
|
6402
|
+
toEl: U,
|
|
6403
|
+
fromEl: P,
|
|
6397
6404
|
originalEvent: e
|
|
6398
6405
|
}), Q({
|
|
6399
6406
|
sortable: this,
|
|
6400
6407
|
name: "remove",
|
|
6401
|
-
toEl:
|
|
6408
|
+
toEl: U,
|
|
6402
6409
|
originalEvent: e
|
|
6403
6410
|
}), Q({
|
|
6404
|
-
rootEl:
|
|
6411
|
+
rootEl: U,
|
|
6405
6412
|
name: "sort",
|
|
6406
|
-
toEl:
|
|
6407
|
-
fromEl:
|
|
6413
|
+
toEl: U,
|
|
6414
|
+
fromEl: P,
|
|
6408
6415
|
originalEvent: e
|
|
6409
6416
|
}), Q({
|
|
6410
6417
|
sortable: this,
|
|
6411
6418
|
name: "sort",
|
|
6412
|
-
toEl:
|
|
6419
|
+
toEl: U,
|
|
6413
6420
|
originalEvent: e
|
|
6414
6421
|
})), $ && $.save()) : ne !== We && ne >= 0 && (Q({
|
|
6415
6422
|
sortable: this,
|
|
6416
6423
|
name: "update",
|
|
6417
|
-
toEl:
|
|
6424
|
+
toEl: U,
|
|
6418
6425
|
originalEvent: e
|
|
6419
6426
|
}), Q({
|
|
6420
6427
|
sortable: this,
|
|
6421
6428
|
name: "sort",
|
|
6422
|
-
toEl:
|
|
6429
|
+
toEl: U,
|
|
6423
6430
|
originalEvent: e
|
|
6424
|
-
})),
|
|
6431
|
+
})), v.active && ((ne == null || ne === -1) && (ne = We, Le = at), Q({
|
|
6425
6432
|
sortable: this,
|
|
6426
6433
|
name: "end",
|
|
6427
|
-
toEl:
|
|
6434
|
+
toEl: U,
|
|
6428
6435
|
originalEvent: e
|
|
6429
6436
|
}), this.save()))), this._nulling();
|
|
6430
6437
|
},
|
|
6431
6438
|
_nulling: function() {
|
|
6432
|
-
ee("nulling", this),
|
|
6439
|
+
ee("nulling", this), P = f = U = O = Me = w = At = ke = Be = fe = ot = ne = Le = We = at = Fe = st = $ = mt = v.dragged = v.ghost = v.clone = v.active = null, xt.forEach(function(e) {
|
|
6433
6440
|
e.checked = !0;
|
|
6434
|
-
}),
|
|
6441
|
+
}), xt.length = oo = no = 0;
|
|
6435
6442
|
},
|
|
6436
6443
|
handleEvent: function(e) {
|
|
6437
6444
|
switch (e.type) {
|
|
@@ -6441,7 +6448,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6441
6448
|
break;
|
|
6442
6449
|
case "dragenter":
|
|
6443
6450
|
case "dragover":
|
|
6444
|
-
f && (this._onDragOver(e),
|
|
6451
|
+
f && (this._onDragOver(e), tl(e));
|
|
6445
6452
|
break;
|
|
6446
6453
|
case "selectstart":
|
|
6447
6454
|
e.preventDefault();
|
|
@@ -6454,7 +6461,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6454
6461
|
*/
|
|
6455
6462
|
toArray: function() {
|
|
6456
6463
|
for (var e = [], o, t = this.el.children, n = 0, i = t.length, r = this.options; n < i; n++)
|
|
6457
|
-
o = t[n], he(o, r.draggable, this.el, !1) && e.push(o.getAttribute(r.dataIdAttr) ||
|
|
6464
|
+
o = t[n], he(o, r.draggable, this.el, !1) && e.push(o.getAttribute(r.dataIdAttr) || al(o));
|
|
6458
6465
|
return e;
|
|
6459
6466
|
},
|
|
6460
6467
|
/**
|
|
@@ -6496,8 +6503,8 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6496
6503
|
var t = this.options;
|
|
6497
6504
|
if (o === void 0)
|
|
6498
6505
|
return t[e];
|
|
6499
|
-
var n =
|
|
6500
|
-
typeof n < "u" ? t[e] = n : t[e] = o, e === "group" &&
|
|
6506
|
+
var n = _t.modifyOption(this, e, o);
|
|
6507
|
+
typeof n < "u" ? t[e] = n : t[e] = o, e === "group" && kn(t);
|
|
6501
6508
|
},
|
|
6502
6509
|
/**
|
|
6503
6510
|
* Destroy
|
|
@@ -6507,13 +6514,13 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6507
6514
|
var e = this.el;
|
|
6508
6515
|
e[le] = 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
6516
|
o.removeAttribute("draggable");
|
|
6510
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
6517
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), Dt.splice(Dt.indexOf(this.el), 1), this.el = e = null;
|
|
6511
6518
|
},
|
|
6512
6519
|
_hideClone: function() {
|
|
6513
6520
|
if (!ke) {
|
|
6514
|
-
if (ee("hideClone", this),
|
|
6521
|
+
if (ee("hideClone", this), v.eventCanceled)
|
|
6515
6522
|
return;
|
|
6516
|
-
|
|
6523
|
+
E(w, "display", "none"), this.options.removeCloneOnHide && w.parentNode && w.parentNode.removeChild(w), ke = !0;
|
|
6517
6524
|
}
|
|
6518
6525
|
},
|
|
6519
6526
|
_showClone: function(e) {
|
|
@@ -6522,110 +6529,110 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
6522
6529
|
return;
|
|
6523
6530
|
}
|
|
6524
6531
|
if (ke) {
|
|
6525
|
-
if (ee("showClone", this),
|
|
6532
|
+
if (ee("showClone", this), v.eventCanceled)
|
|
6526
6533
|
return;
|
|
6527
|
-
f.parentNode ==
|
|
6534
|
+
f.parentNode == P && !this.options.group.revertClone ? P.insertBefore(w, f) : Me ? P.insertBefore(w, Me) : P.appendChild(w), this.options.group.revertClone && this.animate(f, w), E(w, "display", ""), ke = !1;
|
|
6528
6535
|
}
|
|
6529
6536
|
}
|
|
6530
6537
|
};
|
|
6531
|
-
function
|
|
6538
|
+
function tl(e) {
|
|
6532
6539
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
6533
6540
|
}
|
|
6534
|
-
function
|
|
6535
|
-
var u,
|
|
6536
|
-
return window.CustomEvent && !Ae && !
|
|
6541
|
+
function vt(e, o, t, n, i, r, l, s) {
|
|
6542
|
+
var u, d = e[le], p = d.options.onMove, _;
|
|
6543
|
+
return window.CustomEvent && !Ae && !ut ? u = new CustomEvent("move", {
|
|
6537
6544
|
bubbles: !0,
|
|
6538
6545
|
cancelable: !0
|
|
6539
|
-
}) : (u = document.createEvent("Event"), u.initEvent("move", !0, !0)), u.to = o, u.from = e, u.dragged = t, u.draggedRect = n, u.related = i || o, u.relatedRect = r ||
|
|
6546
|
+
}) : (u = document.createEvent("Event"), u.initEvent("move", !0, !0)), u.to = o, u.from = e, u.dragged = t, u.draggedRect = n, u.related = i || o, u.relatedRect = r || G(o), u.willInsertAfter = s, u.originalEvent = l, e.dispatchEvent(u), p && (_ = p.call(d, u, l)), _;
|
|
6540
6547
|
}
|
|
6541
6548
|
function ro(e) {
|
|
6542
6549
|
e.draggable = !1;
|
|
6543
6550
|
}
|
|
6544
|
-
function
|
|
6551
|
+
function ol() {
|
|
6545
6552
|
_o = !1;
|
|
6546
6553
|
}
|
|
6547
|
-
function
|
|
6548
|
-
var n =
|
|
6554
|
+
function nl(e, o, t) {
|
|
6555
|
+
var n = G(Qe(t.el, 0, t.options, !0)), i = Cn(t.el, t.options, O), r = 10;
|
|
6549
6556
|
return o ? e.clientX < i.left - r || e.clientY < n.top && e.clientX < n.right : e.clientY < i.top - r || e.clientY < n.bottom && e.clientX < n.left;
|
|
6550
6557
|
}
|
|
6551
|
-
function
|
|
6552
|
-
var n =
|
|
6558
|
+
function il(e, o, t) {
|
|
6559
|
+
var n = G(Oo(t.el, t.options.draggable)), i = Cn(t.el, t.options, O), r = 10;
|
|
6553
6560
|
return o ? e.clientX > i.right + r || e.clientY > n.bottom && e.clientX > n.left : e.clientY > i.bottom + r || e.clientX > n.right && e.clientY > n.top;
|
|
6554
6561
|
}
|
|
6555
|
-
function
|
|
6556
|
-
var u = n ? e.clientY : e.clientX,
|
|
6562
|
+
function rl(e, o, t, n, i, r, l, s) {
|
|
6563
|
+
var u = n ? e.clientY : e.clientX, d = n ? t.height : t.width, p = n ? t.top : t.left, _ = n ? t.bottom : t.right, T = !1;
|
|
6557
6564
|
if (!l) {
|
|
6558
|
-
if (s &&
|
|
6559
|
-
if (!
|
|
6560
|
-
|
|
6561
|
-
else if (
|
|
6562
|
-
return -
|
|
6563
|
-
} else if (u >
|
|
6564
|
-
return
|
|
6565
|
+
if (s && Lt < d * i) {
|
|
6566
|
+
if (!ct && (st === 1 ? u > p + d * r / 2 : u < _ - d * r / 2) && (ct = !0), ct)
|
|
6567
|
+
T = !0;
|
|
6568
|
+
else if (st === 1 ? u < p + Lt : u > _ - Lt)
|
|
6569
|
+
return -st;
|
|
6570
|
+
} else if (u > p + d * (1 - i) / 2 && u < _ - d * (1 - i) / 2)
|
|
6571
|
+
return ll(o);
|
|
6565
6572
|
}
|
|
6566
|
-
return
|
|
6567
|
-
}
|
|
6568
|
-
function rl(e) {
|
|
6569
|
-
return ue(f) < ue(e) ? 1 : -1;
|
|
6573
|
+
return T = T || l, T && (u < p + d * r / 2 || u > _ - d * r / 2) ? u > p + d / 2 ? 1 : -1 : 0;
|
|
6570
6574
|
}
|
|
6571
6575
|
function ll(e) {
|
|
6576
|
+
return ce(f) < ce(e) ? 1 : -1;
|
|
6577
|
+
}
|
|
6578
|
+
function al(e) {
|
|
6572
6579
|
for (var o = e.tagName + e.className + e.src + e.href + e.textContent, t = o.length, n = 0; t--; )
|
|
6573
6580
|
n += o.charCodeAt(t);
|
|
6574
6581
|
return n.toString(36);
|
|
6575
6582
|
}
|
|
6576
|
-
function
|
|
6577
|
-
|
|
6583
|
+
function sl(e) {
|
|
6584
|
+
xt.length = 0;
|
|
6578
6585
|
for (var o = e.getElementsByTagName("input"), t = o.length; t--; ) {
|
|
6579
6586
|
var n = o[t];
|
|
6580
|
-
n.checked &&
|
|
6587
|
+
n.checked && xt.push(n);
|
|
6581
6588
|
}
|
|
6582
6589
|
}
|
|
6583
|
-
function
|
|
6590
|
+
function kt(e) {
|
|
6584
6591
|
return setTimeout(e, 0);
|
|
6585
6592
|
}
|
|
6586
6593
|
function po(e) {
|
|
6587
6594
|
return clearTimeout(e);
|
|
6588
6595
|
}
|
|
6589
|
-
|
|
6590
|
-
(
|
|
6596
|
+
Wt && N(document, "touchmove", function(e) {
|
|
6597
|
+
(v.active || Ge) && e.cancelable && e.preventDefault();
|
|
6591
6598
|
});
|
|
6592
|
-
|
|
6593
|
-
on:
|
|
6599
|
+
v.utils = {
|
|
6600
|
+
on: N,
|
|
6594
6601
|
off: L,
|
|
6595
|
-
css:
|
|
6596
|
-
find:
|
|
6602
|
+
css: E,
|
|
6603
|
+
find: yn,
|
|
6597
6604
|
is: function(e, o) {
|
|
6598
6605
|
return !!he(e, o, e, !1);
|
|
6599
6606
|
},
|
|
6600
|
-
extend:
|
|
6601
|
-
throttle:
|
|
6607
|
+
extend: Gr,
|
|
6608
|
+
throttle: bn,
|
|
6602
6609
|
closest: he,
|
|
6603
6610
|
toggleClass: oe,
|
|
6604
|
-
clone:
|
|
6605
|
-
index:
|
|
6606
|
-
nextTick:
|
|
6611
|
+
clone: In,
|
|
6612
|
+
index: ce,
|
|
6613
|
+
nextTick: kt,
|
|
6607
6614
|
cancelNextTick: po,
|
|
6608
|
-
detectDirection:
|
|
6615
|
+
detectDirection: Ln,
|
|
6609
6616
|
getChild: Qe
|
|
6610
6617
|
};
|
|
6611
|
-
|
|
6618
|
+
v.get = function(e) {
|
|
6612
6619
|
return e[le];
|
|
6613
6620
|
};
|
|
6614
|
-
|
|
6621
|
+
v.mount = function() {
|
|
6615
6622
|
for (var e = arguments.length, o = new Array(e), t = 0; t < e; t++)
|
|
6616
6623
|
o[t] = arguments[t];
|
|
6617
6624
|
o[0].constructor === Array && (o = o[0]), o.forEach(function(n) {
|
|
6618
6625
|
if (!n.prototype || !n.prototype.constructor)
|
|
6619
6626
|
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));
|
|
6620
|
-
n.utils && (
|
|
6627
|
+
n.utils && (v.utils = Ee(Ee({}, v.utils), n.utils)), _t.mount(n);
|
|
6621
6628
|
});
|
|
6622
6629
|
};
|
|
6623
|
-
|
|
6624
|
-
return new
|
|
6630
|
+
v.create = function(e, o) {
|
|
6631
|
+
return new v(e, o);
|
|
6625
6632
|
};
|
|
6626
|
-
|
|
6627
|
-
var
|
|
6628
|
-
function
|
|
6633
|
+
v.version = Kr;
|
|
6634
|
+
var H = [], nt, fo, ho = !1, lo, ao, Pt, it;
|
|
6635
|
+
function cl() {
|
|
6629
6636
|
function e() {
|
|
6630
6637
|
this.defaults = {
|
|
6631
6638
|
scroll: !0,
|
|
@@ -6640,33 +6647,33 @@ function sl() {
|
|
|
6640
6647
|
return e.prototype = {
|
|
6641
6648
|
dragStarted: function(o) {
|
|
6642
6649
|
var t = o.originalEvent;
|
|
6643
|
-
this.sortable.nativeDraggable ?
|
|
6650
|
+
this.sortable.nativeDraggable ? N(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? N(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? N(document, "touchmove", this._handleFallbackAutoScroll) : N(document, "mousemove", this._handleFallbackAutoScroll);
|
|
6644
6651
|
},
|
|
6645
6652
|
dragOverCompleted: function(o) {
|
|
6646
6653
|
var t = o.originalEvent;
|
|
6647
6654
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
6648
6655
|
},
|
|
6649
6656
|
drop: function() {
|
|
6650
|
-
this.sortable.nativeDraggable ? L(document, "dragover", this._handleAutoScroll) : (L(document, "pointermove", this._handleFallbackAutoScroll), L(document, "touchmove", this._handleFallbackAutoScroll), L(document, "mousemove", this._handleFallbackAutoScroll)), Jo(),
|
|
6657
|
+
this.sortable.nativeDraggable ? L(document, "dragover", this._handleAutoScroll) : (L(document, "pointermove", this._handleFallbackAutoScroll), L(document, "touchmove", this._handleFallbackAutoScroll), L(document, "mousemove", this._handleFallbackAutoScroll)), Jo(), Nt(), Xr();
|
|
6651
6658
|
},
|
|
6652
6659
|
nulling: function() {
|
|
6653
|
-
|
|
6660
|
+
Pt = fo = nt = ho = it = lo = ao = null, H.length = 0;
|
|
6654
6661
|
},
|
|
6655
6662
|
_handleFallbackAutoScroll: function(o) {
|
|
6656
6663
|
this._handleAutoScroll(o, !0);
|
|
6657
6664
|
},
|
|
6658
6665
|
_handleAutoScroll: function(o, t) {
|
|
6659
6666
|
var n = this, i = (o.touches ? o.touches[0] : o).clientX, r = (o.touches ? o.touches[0] : o).clientY, l = document.elementFromPoint(i, r);
|
|
6660
|
-
if (
|
|
6667
|
+
if (Pt = o, t || this.options.forceAutoScrollFallback || ut || Ae || rt) {
|
|
6661
6668
|
so(o, this.options, l, t);
|
|
6662
6669
|
var s = Ne(l, !0);
|
|
6663
|
-
ho && (!
|
|
6670
|
+
ho && (!it || i !== lo || r !== ao) && (it && Jo(), it = setInterval(function() {
|
|
6664
6671
|
var u = Ne(document.elementFromPoint(i, r), !0);
|
|
6665
|
-
u !== s && (s = u,
|
|
6672
|
+
u !== s && (s = u, Nt()), so(o, n.options, u, t);
|
|
6666
6673
|
}, 10), lo = i, ao = r);
|
|
6667
6674
|
} else {
|
|
6668
6675
|
if (!this.options.bubbleScroll || Ne(l, !0) === ge()) {
|
|
6669
|
-
|
|
6676
|
+
Nt();
|
|
6670
6677
|
return;
|
|
6671
6678
|
}
|
|
6672
6679
|
so(o, this.options, Ne(l, !1), !1);
|
|
@@ -6677,43 +6684,43 @@ function sl() {
|
|
|
6677
6684
|
initializeByDefault: !0
|
|
6678
6685
|
});
|
|
6679
6686
|
}
|
|
6680
|
-
function
|
|
6681
|
-
|
|
6687
|
+
function Nt() {
|
|
6688
|
+
H.forEach(function(e) {
|
|
6682
6689
|
clearInterval(e.pid);
|
|
6683
|
-
}),
|
|
6690
|
+
}), H = [];
|
|
6684
6691
|
}
|
|
6685
6692
|
function Jo() {
|
|
6686
|
-
clearInterval(
|
|
6693
|
+
clearInterval(it);
|
|
6687
6694
|
}
|
|
6688
|
-
var so =
|
|
6695
|
+
var so = bn(function(e, o, t, n) {
|
|
6689
6696
|
if (o.scroll) {
|
|
6690
|
-
var i = (e.touches ? e.touches[0] : e).clientX, r = (e.touches ? e.touches[0] : e).clientY, l = o.scrollSensitivity, s = o.scrollSpeed, u = ge(),
|
|
6691
|
-
fo !== t && (fo = t,
|
|
6692
|
-
var _ = 0,
|
|
6697
|
+
var i = (e.touches ? e.touches[0] : e).clientX, r = (e.touches ? e.touches[0] : e).clientY, l = o.scrollSensitivity, s = o.scrollSpeed, u = ge(), d = !1, p;
|
|
6698
|
+
fo !== t && (fo = t, Nt(), nt = o.scroll, p = o.scrollFn, nt === !0 && (nt = Ne(t, !0)));
|
|
6699
|
+
var _ = 0, T = nt;
|
|
6693
6700
|
do {
|
|
6694
|
-
var h =
|
|
6695
|
-
h === u ? (
|
|
6696
|
-
var B =
|
|
6697
|
-
if (!
|
|
6698
|
-
for (var
|
|
6699
|
-
|
|
6700
|
-
(
|
|
6701
|
-
n && this.layer === 0 &&
|
|
6702
|
-
var
|
|
6703
|
-
typeof
|
|
6701
|
+
var h = T, C = G(h), y = C.top, x = C.bottom, k = C.left, z = C.right, D = C.width, ae = C.height, K = void 0, de = void 0, ve = h.scrollWidth, b = h.scrollHeight, A = E(h), R = h.scrollLeft, F = h.scrollTop;
|
|
6702
|
+
h === u ? (K = D < ve && (A.overflowX === "auto" || A.overflowX === "scroll" || A.overflowX === "visible"), de = ae < b && (A.overflowY === "auto" || A.overflowY === "scroll" || A.overflowY === "visible")) : (K = D < ve && (A.overflowX === "auto" || A.overflowX === "scroll"), de = ae < b && (A.overflowY === "auto" || A.overflowY === "scroll"));
|
|
6703
|
+
var B = K && (Math.abs(z - i) <= l && R + D < ve) - (Math.abs(k - i) <= l && !!R), V = de && (Math.abs(x - r) <= l && F + ae < b) - (Math.abs(y - r) <= l && !!F);
|
|
6704
|
+
if (!H[_])
|
|
6705
|
+
for (var I = 0; I <= _; I++)
|
|
6706
|
+
H[I] || (H[I] = {});
|
|
6707
|
+
(H[_].vx != B || H[_].vy != V || H[_].el !== h) && (H[_].el = h, H[_].vx = B, H[_].vy = V, clearInterval(H[_].pid), (B != 0 || V != 0) && (d = !0, H[_].pid = setInterval((function() {
|
|
6708
|
+
n && this.layer === 0 && v.active._onTouchMove(Pt);
|
|
6709
|
+
var M = H[this.layer].vy ? H[this.layer].vy * s : 0, Z = H[this.layer].vx ? H[this.layer].vx * s : 0;
|
|
6710
|
+
typeof p == "function" && p.call(v.dragged.parentNode[le], Z, M, e, Pt, H[this.layer].el) !== "continue" || On(H[this.layer].el, Z, M);
|
|
6704
6711
|
}).bind({
|
|
6705
6712
|
layer: _
|
|
6706
6713
|
}), 24))), _++;
|
|
6707
|
-
} while (o.bubbleScroll &&
|
|
6708
|
-
ho =
|
|
6714
|
+
} while (o.bubbleScroll && T !== u && (T = Ne(T, !1)));
|
|
6715
|
+
ho = d;
|
|
6709
6716
|
}
|
|
6710
|
-
}, 30),
|
|
6717
|
+
}, 30), Bn = function(e) {
|
|
6711
6718
|
var o = e.originalEvent, t = e.putSortable, n = e.dragEl, i = e.activeSortable, r = e.dispatchSortableEvent, l = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
6712
6719
|
if (o) {
|
|
6713
6720
|
var u = t || i;
|
|
6714
6721
|
l();
|
|
6715
|
-
var
|
|
6716
|
-
s(), u && !u.el.contains(
|
|
6722
|
+
var d = o.changedTouches && o.changedTouches.length ? o.changedTouches[0] : o, p = document.elementFromPoint(d.clientX, d.clientY);
|
|
6723
|
+
s(), u && !u.el.contains(p) && (r("spill"), this.onSpill({
|
|
6717
6724
|
dragEl: n,
|
|
6718
6725
|
putSortable: t
|
|
6719
6726
|
}));
|
|
@@ -6733,7 +6740,7 @@ Io.prototype = {
|
|
|
6733
6740
|
var n = Qe(this.sortable.el, this.startIndex, this.options);
|
|
6734
6741
|
n ? this.sortable.el.insertBefore(o, n) : this.sortable.el.appendChild(o), this.sortable.animateAll(), t && t.animateAll();
|
|
6735
6742
|
},
|
|
6736
|
-
drop:
|
|
6743
|
+
drop: Bn
|
|
6737
6744
|
};
|
|
6738
6745
|
Ce(Io, {
|
|
6739
6746
|
pluginName: "revertOnSpill"
|
|
@@ -6745,162 +6752,162 @@ Co.prototype = {
|
|
|
6745
6752
|
var o = e.dragEl, t = e.putSortable, n = t || this.sortable;
|
|
6746
6753
|
n.captureAnimationState(), o.parentNode && o.parentNode.removeChild(o), n.animateAll();
|
|
6747
6754
|
},
|
|
6748
|
-
drop:
|
|
6755
|
+
drop: Bn
|
|
6749
6756
|
};
|
|
6750
6757
|
Ce(Co, {
|
|
6751
6758
|
pluginName: "removeOnSpill"
|
|
6752
6759
|
});
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
function cl(e) {
|
|
6756
|
-
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
6757
|
-
}
|
|
6760
|
+
v.mount(new cl());
|
|
6761
|
+
v.mount(Co, Io);
|
|
6758
6762
|
function ul(e) {
|
|
6759
|
-
|
|
6763
|
+
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
6760
6764
|
}
|
|
6761
6765
|
function _l(e) {
|
|
6762
|
-
|
|
6766
|
+
wt() && Hn(e);
|
|
6763
6767
|
}
|
|
6764
|
-
|
|
6768
|
+
function pl(e) {
|
|
6769
|
+
wt() ? qe(e) : go(e);
|
|
6770
|
+
}
|
|
6771
|
+
let Rn = null, Mn = null;
|
|
6765
6772
|
function zo(e = null, o = null) {
|
|
6766
|
-
|
|
6773
|
+
Rn = e, Mn = o;
|
|
6767
6774
|
}
|
|
6768
|
-
function
|
|
6775
|
+
function dl() {
|
|
6769
6776
|
return {
|
|
6770
|
-
data:
|
|
6771
|
-
clonedData:
|
|
6777
|
+
data: Rn,
|
|
6778
|
+
clonedData: Mn
|
|
6772
6779
|
};
|
|
6773
6780
|
}
|
|
6774
6781
|
const qo = Symbol("cloneElement");
|
|
6775
|
-
function
|
|
6782
|
+
function fl(...e) {
|
|
6776
6783
|
var o, t;
|
|
6777
|
-
const n = (o =
|
|
6784
|
+
const n = (o = wt()) == null ? void 0 : o.proxy;
|
|
6778
6785
|
let i = null;
|
|
6779
6786
|
const r = e[0];
|
|
6780
6787
|
let [, l, s] = e;
|
|
6781
|
-
Array.isArray(
|
|
6788
|
+
Array.isArray(S(l)) || (s = l, l = null);
|
|
6782
6789
|
let u = null;
|
|
6783
6790
|
const {
|
|
6784
|
-
immediate:
|
|
6785
|
-
clone:
|
|
6791
|
+
immediate: d = !0,
|
|
6792
|
+
clone: p = ul,
|
|
6786
6793
|
customUpdate: _
|
|
6787
|
-
} = (t =
|
|
6788
|
-
function
|
|
6789
|
-
var
|
|
6790
|
-
const { from: R, oldIndex:
|
|
6794
|
+
} = (t = S(s)) != null ? t : {};
|
|
6795
|
+
function T(b) {
|
|
6796
|
+
var A;
|
|
6797
|
+
const { from: R, oldIndex: F, item: B } = b;
|
|
6791
6798
|
i = Array.from(R.childNodes);
|
|
6792
|
-
const
|
|
6793
|
-
zo(
|
|
6794
|
-
}
|
|
6795
|
-
function h(
|
|
6796
|
-
const
|
|
6797
|
-
if (!
|
|
6798
|
-
if (Zt(
|
|
6799
|
-
const R = [...
|
|
6800
|
-
l.value = Vo(R,
|
|
6799
|
+
const V = S((A = S(l)) == null ? void 0 : A[F]), I = p(V);
|
|
6800
|
+
zo(V, I), B[qo] = I;
|
|
6801
|
+
}
|
|
6802
|
+
function h(b) {
|
|
6803
|
+
const A = b.item[qo];
|
|
6804
|
+
if (!Sr(A)) {
|
|
6805
|
+
if (Zt(b.item), yt(l)) {
|
|
6806
|
+
const R = [...S(l)];
|
|
6807
|
+
l.value = Vo(R, b.newDraggableIndex, A);
|
|
6801
6808
|
return;
|
|
6802
6809
|
}
|
|
6803
|
-
Vo(
|
|
6810
|
+
Vo(S(l), b.newDraggableIndex, A);
|
|
6804
6811
|
}
|
|
6805
6812
|
}
|
|
6806
|
-
function
|
|
6807
|
-
const { from:
|
|
6808
|
-
if (Uo(
|
|
6809
|
-
Zt(
|
|
6813
|
+
function C(b) {
|
|
6814
|
+
const { from: A, item: R, oldIndex: F, oldDraggableIndex: B, pullMode: V, clone: I } = b;
|
|
6815
|
+
if (Uo(A, R, F), V === "clone") {
|
|
6816
|
+
Zt(I);
|
|
6810
6817
|
return;
|
|
6811
6818
|
}
|
|
6812
|
-
if (
|
|
6813
|
-
const
|
|
6814
|
-
l.value = wo(
|
|
6819
|
+
if (yt(l)) {
|
|
6820
|
+
const M = [...S(l)];
|
|
6821
|
+
l.value = wo(M, B);
|
|
6815
6822
|
return;
|
|
6816
6823
|
}
|
|
6817
|
-
wo(
|
|
6824
|
+
wo(S(l), B);
|
|
6818
6825
|
}
|
|
6819
|
-
function b
|
|
6826
|
+
function y(b) {
|
|
6820
6827
|
if (_) {
|
|
6821
|
-
_(
|
|
6828
|
+
_(b);
|
|
6822
6829
|
return;
|
|
6823
6830
|
}
|
|
6824
|
-
const { from:
|
|
6825
|
-
if (Zt(R), Uo(
|
|
6826
|
-
const
|
|
6827
|
-
l.value = Po(
|
|
6831
|
+
const { from: A, item: R, oldIndex: F, newIndex: B } = b;
|
|
6832
|
+
if (Zt(R), Uo(A, R, F), yt(l)) {
|
|
6833
|
+
const V = [...S(l)];
|
|
6834
|
+
l.value = Po(V, F, B);
|
|
6828
6835
|
return;
|
|
6829
6836
|
}
|
|
6830
|
-
Po(
|
|
6837
|
+
Po(S(l), F, B);
|
|
6831
6838
|
}
|
|
6832
|
-
function
|
|
6833
|
-
const { newIndex:
|
|
6834
|
-
let
|
|
6835
|
-
const
|
|
6839
|
+
function x(b) {
|
|
6840
|
+
const { newIndex: A, oldIndex: R, from: F, to: B } = b;
|
|
6841
|
+
let V = null;
|
|
6842
|
+
const I = A === R && F === B;
|
|
6836
6843
|
try {
|
|
6837
|
-
if (
|
|
6838
|
-
let
|
|
6839
|
-
i == null || i.some((
|
|
6840
|
-
if (
|
|
6841
|
-
return
|
|
6842
|
-
const
|
|
6843
|
-
|
|
6844
|
+
if (I) {
|
|
6845
|
+
let M = null;
|
|
6846
|
+
i == null || i.some((Z, se) => {
|
|
6847
|
+
if (M && (i == null ? void 0 : i.length) !== B.childNodes.length)
|
|
6848
|
+
return F.insertBefore(M, Z.nextSibling), !0;
|
|
6849
|
+
const Ze = B.childNodes[se];
|
|
6850
|
+
M = B == null ? void 0 : B.replaceChild(Z, Ze);
|
|
6844
6851
|
});
|
|
6845
6852
|
}
|
|
6846
|
-
} catch (
|
|
6847
|
-
|
|
6853
|
+
} catch (M) {
|
|
6854
|
+
V = M;
|
|
6848
6855
|
} finally {
|
|
6849
6856
|
i = null;
|
|
6850
6857
|
}
|
|
6851
6858
|
go(() => {
|
|
6852
|
-
if (zo(),
|
|
6853
|
-
throw
|
|
6859
|
+
if (zo(), V)
|
|
6860
|
+
throw V;
|
|
6854
6861
|
});
|
|
6855
6862
|
}
|
|
6856
|
-
const
|
|
6857
|
-
onUpdate:
|
|
6858
|
-
onStart:
|
|
6863
|
+
const k = {
|
|
6864
|
+
onUpdate: y,
|
|
6865
|
+
onStart: T,
|
|
6859
6866
|
onAdd: h,
|
|
6860
|
-
onRemove:
|
|
6861
|
-
onEnd:
|
|
6867
|
+
onRemove: C,
|
|
6868
|
+
onEnd: x
|
|
6862
6869
|
};
|
|
6863
|
-
function
|
|
6864
|
-
const
|
|
6865
|
-
return
|
|
6866
|
-
}
|
|
6867
|
-
function
|
|
6868
|
-
var
|
|
6869
|
-
const
|
|
6870
|
-
return Yo(R, (
|
|
6871
|
-
|
|
6872
|
-
const
|
|
6873
|
-
return
|
|
6870
|
+
function z(b) {
|
|
6871
|
+
const A = S(r);
|
|
6872
|
+
return b || (b = Br(A) ? Rr(A, n == null ? void 0 : n.$el) : A), b && !xr(b) && (b = b.$el), b || Lr("Root element not found"), b;
|
|
6873
|
+
}
|
|
6874
|
+
function D() {
|
|
6875
|
+
var b;
|
|
6876
|
+
const A = (b = S(s)) != null ? b : {}, R = Tn(A, ["immediate", "clone"]);
|
|
6877
|
+
return Yo(R, (F, B) => {
|
|
6878
|
+
Pr(F) && (R[F] = (V, ...I) => {
|
|
6879
|
+
const M = dl();
|
|
6880
|
+
return wr(V, M), B(V, ...I);
|
|
6874
6881
|
});
|
|
6875
|
-
}),
|
|
6876
|
-
l === null ? {} :
|
|
6882
|
+
}), Dr(
|
|
6883
|
+
l === null ? {} : k,
|
|
6877
6884
|
R
|
|
6878
6885
|
);
|
|
6879
6886
|
}
|
|
6880
|
-
const
|
|
6881
|
-
|
|
6887
|
+
const ae = (b) => {
|
|
6888
|
+
b = z(b), u && K.destroy(), u = new v(b, D());
|
|
6882
6889
|
};
|
|
6883
6890
|
De(
|
|
6884
6891
|
() => s,
|
|
6885
6892
|
() => {
|
|
6886
|
-
u && Yo(
|
|
6887
|
-
u == null || u.option(
|
|
6893
|
+
u && Yo(D(), (b, A) => {
|
|
6894
|
+
u == null || u.option(b, A);
|
|
6888
6895
|
});
|
|
6889
6896
|
},
|
|
6890
6897
|
{ deep: !0 }
|
|
6891
6898
|
);
|
|
6892
|
-
const
|
|
6893
|
-
option: (
|
|
6899
|
+
const K = {
|
|
6900
|
+
option: (b, A) => u == null ? void 0 : u.option(b, A),
|
|
6894
6901
|
destroy: () => {
|
|
6895
6902
|
u == null || u.destroy(), u = null;
|
|
6896
6903
|
},
|
|
6897
6904
|
save: () => u == null ? void 0 : u.save(),
|
|
6898
6905
|
toArray: () => u == null ? void 0 : u.toArray(),
|
|
6899
|
-
closest: (...
|
|
6900
|
-
},
|
|
6901
|
-
return
|
|
6902
|
-
|
|
6903
|
-
}),
|
|
6906
|
+
closest: (...b) => u == null ? void 0 : u.closest(...b)
|
|
6907
|
+
}, de = () => K == null ? void 0 : K.option("disabled", !0), ve = () => K == null ? void 0 : K.option("disabled", !1);
|
|
6908
|
+
return pl(() => {
|
|
6909
|
+
d && ae();
|
|
6910
|
+
}), _l(K.destroy), je({ start: ae, pause: de, resume: ve }, K);
|
|
6904
6911
|
}
|
|
6905
6912
|
const To = [
|
|
6906
6913
|
"update",
|
|
@@ -6915,7 +6922,7 @@ const To = [
|
|
|
6915
6922
|
"clone",
|
|
6916
6923
|
"move",
|
|
6917
6924
|
"change"
|
|
6918
|
-
],
|
|
6925
|
+
], hl = [
|
|
6919
6926
|
"clone",
|
|
6920
6927
|
"animation",
|
|
6921
6928
|
"ghostClass",
|
|
@@ -6960,36 +6967,36 @@ const To = [
|
|
|
6960
6967
|
"target",
|
|
6961
6968
|
"customUpdate",
|
|
6962
6969
|
...To.map((e) => `on${e.replace(/^\S/, (o) => o.toUpperCase())}`)
|
|
6963
|
-
],
|
|
6970
|
+
], Tl = Ue({
|
|
6964
6971
|
name: "VueDraggable",
|
|
6965
6972
|
model: {
|
|
6966
6973
|
prop: "modelValue",
|
|
6967
6974
|
event: "update:modelValue"
|
|
6968
6975
|
},
|
|
6969
|
-
props:
|
|
6976
|
+
props: hl,
|
|
6970
6977
|
emits: ["update:modelValue", ...To],
|
|
6971
6978
|
setup(e, { slots: o, emit: t, expose: n, attrs: i }) {
|
|
6972
|
-
const r = To.reduce((
|
|
6973
|
-
const
|
|
6974
|
-
return
|
|
6975
|
-
}, {}), l =
|
|
6976
|
-
const
|
|
6977
|
-
const
|
|
6978
|
-
return
|
|
6979
|
+
const r = To.reduce((p, _) => {
|
|
6980
|
+
const T = `on${_.replace(/^\S/, (h) => h.toUpperCase())}`;
|
|
6981
|
+
return p[T] = (...h) => t(_, ...h), p;
|
|
6982
|
+
}, {}), l = te(() => {
|
|
6983
|
+
const p = Yn(e), _ = Tn(p, ["modelValue"]), T = Object.entries(_).reduce((h, [C, y]) => {
|
|
6984
|
+
const x = S(y);
|
|
6985
|
+
return x !== void 0 && (h[C] = x), h;
|
|
6979
6986
|
}, {});
|
|
6980
|
-
return je(je({}, r),
|
|
6981
|
-
}), s =
|
|
6987
|
+
return je(je({}, r), Nr(je(je({}, i), T)));
|
|
6988
|
+
}), s = te({
|
|
6982
6989
|
get: () => e.modelValue,
|
|
6983
|
-
set: (
|
|
6984
|
-
}), u = we(),
|
|
6985
|
-
|
|
6990
|
+
set: (p) => t("update:modelValue", p)
|
|
6991
|
+
}), u = we(), d = Kn(
|
|
6992
|
+
fl(e.target || u, s, l)
|
|
6986
6993
|
);
|
|
6987
|
-
return n(
|
|
6988
|
-
var
|
|
6989
|
-
return
|
|
6994
|
+
return n(d), () => {
|
|
6995
|
+
var p;
|
|
6996
|
+
return Fn(e.tag || "div", { ref: u }, (p = o == null ? void 0 : o.default) == null ? void 0 : p.call(o, d));
|
|
6990
6997
|
};
|
|
6991
6998
|
}
|
|
6992
|
-
}),
|
|
6999
|
+
}), ml = { class: "text-subtitle-1 ml-6" }, gl = /* @__PURE__ */ Ue({
|
|
6993
7000
|
__name: "item",
|
|
6994
7001
|
props: {
|
|
6995
7002
|
id: {},
|
|
@@ -6998,13 +7005,13 @@ const To = [
|
|
|
6998
7005
|
},
|
|
6999
7006
|
emits: ["x-click"],
|
|
7000
7007
|
setup(e, { emit: o }) {
|
|
7001
|
-
const { primaryColor: t, backgroundColor2: n, highlightColor: i } =
|
|
7008
|
+
const { primaryColor: t, backgroundColor2: n, highlightColor: i } = rn(), r = e, l = o, s = we(!1), u = te(() => ({
|
|
7002
7009
|
position: "relative",
|
|
7003
7010
|
background: s.value ? i.value : n.value,
|
|
7004
7011
|
height: "48px",
|
|
7005
7012
|
marginBottom: "1px",
|
|
7006
7013
|
userSelect: "none"
|
|
7007
|
-
})),
|
|
7014
|
+
})), d = te(() => ({
|
|
7008
7015
|
display: r.select ? "block" : "none",
|
|
7009
7016
|
position: "absolute",
|
|
7010
7017
|
top: "0px",
|
|
@@ -7014,199 +7021,208 @@ const To = [
|
|
|
7014
7021
|
border: "1px solid " + t.value,
|
|
7015
7022
|
pointerEvents: "none"
|
|
7016
7023
|
}));
|
|
7017
|
-
return (
|
|
7018
|
-
const
|
|
7019
|
-
return
|
|
7024
|
+
return (p, _) => {
|
|
7025
|
+
const T = ie("v-spacer"), h = ie("v-icon"), C = Gn("ripple");
|
|
7026
|
+
return Xn((j(), be("div", {
|
|
7020
7027
|
class: "d-flex align-center cursor-pointer",
|
|
7021
7028
|
style: Oe(u.value),
|
|
7022
|
-
onClick: _[1] || (_[1] = (
|
|
7023
|
-
onMouseover: _[2] || (_[2] = (
|
|
7024
|
-
onMouseout: _[3] || (_[3] = (
|
|
7029
|
+
onClick: _[1] || (_[1] = (y) => l("x-click", r.id)),
|
|
7030
|
+
onMouseover: _[2] || (_[2] = (y) => s.value = !0),
|
|
7031
|
+
onMouseout: _[3] || (_[3] = (y) => s.value = !1)
|
|
7025
7032
|
}, [
|
|
7026
|
-
ye("span",
|
|
7027
|
-
re(
|
|
7033
|
+
ye("span", ml, Eo(r.title), 1),
|
|
7034
|
+
re(T),
|
|
7028
7035
|
re(h, {
|
|
7029
7036
|
class: "x-handle cursor-move mr-3",
|
|
7030
|
-
icon:
|
|
7031
|
-
onMousedown: _[0] || (_[0] =
|
|
7037
|
+
icon: S(di),
|
|
7038
|
+
onMousedown: _[0] || (_[0] = bt(() => {
|
|
7032
7039
|
}, ["stop"]))
|
|
7033
7040
|
}, null, 8, ["icon"]),
|
|
7034
7041
|
ye("div", {
|
|
7035
|
-
style: Oe(
|
|
7042
|
+
style: Oe(d.value)
|
|
7036
7043
|
}, null, 4)
|
|
7037
7044
|
], 36)), [
|
|
7038
|
-
[
|
|
7045
|
+
[C]
|
|
7039
7046
|
]);
|
|
7040
7047
|
};
|
|
7041
7048
|
}
|
|
7042
|
-
}),
|
|
7049
|
+
}), El = {
|
|
7043
7050
|
key: 1,
|
|
7044
7051
|
class: "text-caption text-grey"
|
|
7045
|
-
},
|
|
7052
|
+
}, vl = /* @__PURE__ */ Ue({
|
|
7046
7053
|
__name: "index",
|
|
7054
|
+
props: {
|
|
7055
|
+
lock: { type: Boolean }
|
|
7056
|
+
},
|
|
7047
7057
|
setup(e) {
|
|
7048
|
-
const { t: o } =
|
|
7049
|
-
const
|
|
7050
|
-
if (!
|
|
7058
|
+
const { t: o } = Yt(), t = e, n = we([]), i = () => {
|
|
7059
|
+
const _ = Ve();
|
|
7060
|
+
if (!_) {
|
|
7051
7061
|
console.assert(!1);
|
|
7052
7062
|
return;
|
|
7053
7063
|
}
|
|
7054
|
-
const
|
|
7055
|
-
|
|
7056
|
-
var
|
|
7057
|
-
const
|
|
7058
|
-
if (
|
|
7064
|
+
const T = [];
|
|
7065
|
+
_.getTopBlocks(!0).forEach((C) => {
|
|
7066
|
+
var x;
|
|
7067
|
+
const y = C.id === ((x = He()) == null ? void 0 : x.id);
|
|
7068
|
+
if (C.type.startsWith("on_node_event_v"))
|
|
7059
7069
|
console.log("1");
|
|
7060
|
-
else if (
|
|
7070
|
+
else if (C.type.startsWith("procedure_def_v"))
|
|
7061
7071
|
console.log("2");
|
|
7062
7072
|
else {
|
|
7063
|
-
const
|
|
7064
|
-
|
|
7065
|
-
id:
|
|
7073
|
+
const k = C.getRelativeToSurfaceXY();
|
|
7074
|
+
T.push({
|
|
7075
|
+
id: C.id,
|
|
7066
7076
|
name: o("x-block-lib.temporaryBlock"),
|
|
7067
|
-
x:
|
|
7068
|
-
y:
|
|
7069
|
-
select:
|
|
7077
|
+
x: k.x,
|
|
7078
|
+
y: k.y,
|
|
7079
|
+
select: y
|
|
7070
7080
|
});
|
|
7071
7081
|
}
|
|
7072
|
-
}),
|
|
7082
|
+
}), n.value = T;
|
|
7073
7083
|
};
|
|
7074
7084
|
qe(() => {
|
|
7075
|
-
me.on("codeUpdate",
|
|
7076
|
-
}),
|
|
7077
|
-
me.off("codeUpdate",
|
|
7085
|
+
me.on("codeUpdate", i);
|
|
7086
|
+
}), St(() => {
|
|
7087
|
+
me.off("codeUpdate", i);
|
|
7078
7088
|
});
|
|
7079
|
-
let
|
|
7080
|
-
const
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
}
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
|
|
7089
|
+
let r = [];
|
|
7090
|
+
const l = () => {
|
|
7091
|
+
if (t.lock) {
|
|
7092
|
+
nn(o("x-block-lib.msg.cannotArrangeInLockState"));
|
|
7093
|
+
return;
|
|
7094
|
+
}
|
|
7095
|
+
const _ = [];
|
|
7096
|
+
n.value.forEach(({ id: T }) => {
|
|
7097
|
+
_.push(T);
|
|
7098
|
+
}), r = _;
|
|
7099
|
+
}, s = () => !t.lock, u = (_) => {
|
|
7100
|
+
const T = Ve();
|
|
7101
|
+
if (!T) {
|
|
7088
7102
|
console.assert(!1);
|
|
7089
7103
|
return;
|
|
7090
7104
|
}
|
|
7091
|
-
if (
|
|
7105
|
+
if (_.oldIndex === void 0 || _.newIndex === void 0) {
|
|
7092
7106
|
console.assert(!1);
|
|
7093
7107
|
return;
|
|
7094
7108
|
}
|
|
7095
|
-
if (
|
|
7109
|
+
if (_.oldIndex === _.newIndex)
|
|
7096
7110
|
return;
|
|
7097
|
-
const
|
|
7098
|
-
if (!
|
|
7111
|
+
const h = r[_.oldIndex], C = T.getBlockById(h);
|
|
7112
|
+
if (!C) {
|
|
7099
7113
|
console.assert(!1);
|
|
7100
7114
|
return;
|
|
7101
7115
|
}
|
|
7102
|
-
let
|
|
7103
|
-
|
|
7104
|
-
let
|
|
7105
|
-
|
|
7106
|
-
const
|
|
7107
|
-
|
|
7108
|
-
}, { open:
|
|
7109
|
-
const
|
|
7110
|
-
if (!
|
|
7116
|
+
let y = "";
|
|
7117
|
+
_.newIndex > _.oldIndex ? y = r[_.newIndex] : _.newIndex > 0 && (y = r[_.newIndex - 1]);
|
|
7118
|
+
let x = -10;
|
|
7119
|
+
y !== "" && (x = T.getBlockById(y).getRelativeToSurfaceXY().y + 10);
|
|
7120
|
+
const k = C.getRelativeToSurfaceXY();
|
|
7121
|
+
C.moveTo(new m.Coordinate(k.x, x)), me.emit("cleanWorkspace"), un();
|
|
7122
|
+
}, { open: d } = bo("blocklyNavigatorDlg"), p = async (_) => {
|
|
7123
|
+
const T = Ve();
|
|
7124
|
+
if (!T) {
|
|
7111
7125
|
console.assert(!1);
|
|
7112
7126
|
return;
|
|
7113
7127
|
}
|
|
7114
|
-
const
|
|
7115
|
-
|
|
7128
|
+
const h = T.getBlockById(_);
|
|
7129
|
+
ti.setSelected(h), cn(_), d.value = !1;
|
|
7116
7130
|
};
|
|
7117
|
-
return (
|
|
7131
|
+
return (_, T) => n.value.length > 0 ? (j(), Se(S(Tl), {
|
|
7118
7132
|
key: 0,
|
|
7119
|
-
modelValue:
|
|
7120
|
-
"onUpdate:modelValue":
|
|
7133
|
+
modelValue: n.value,
|
|
7134
|
+
"onUpdate:modelValue": T[0] || (T[0] = (h) => n.value = h),
|
|
7121
7135
|
animation: 150,
|
|
7122
7136
|
"ghost-class": "ghost",
|
|
7123
7137
|
handle: ".x-handle",
|
|
7124
|
-
onStart:
|
|
7125
|
-
|
|
7138
|
+
onStart: l,
|
|
7139
|
+
onMove: s,
|
|
7140
|
+
onEnd: u
|
|
7126
7141
|
}, {
|
|
7127
7142
|
default: Je(() => [
|
|
7128
|
-
(j(!0), be(Zo, null,
|
|
7129
|
-
id:
|
|
7130
|
-
key:
|
|
7131
|
-
title:
|
|
7132
|
-
select:
|
|
7133
|
-
onXClick:
|
|
7143
|
+
(j(!0), be(Zo, null, $n(n.value, (h) => (j(), Se(gl, {
|
|
7144
|
+
id: h.id,
|
|
7145
|
+
key: h.id,
|
|
7146
|
+
title: h.name,
|
|
7147
|
+
select: h.select,
|
|
7148
|
+
onXClick: p
|
|
7134
7149
|
}, null, 8, ["id", "title", "select"]))), 128))
|
|
7135
7150
|
]),
|
|
7136
7151
|
_: 1
|
|
7137
|
-
}, 8, ["modelValue"])) : (j(), be("span",
|
|
7152
|
+
}, 8, ["modelValue"])) : (j(), be("span", El, Eo(S(o)("x-block-lib.noOption")), 1));
|
|
7138
7153
|
}
|
|
7139
|
-
}),
|
|
7154
|
+
}), Dn = (e, o) => {
|
|
7140
7155
|
const t = e.__vccOpts || e;
|
|
7141
7156
|
for (const [n, i] of o)
|
|
7142
7157
|
t[n] = i;
|
|
7143
7158
|
return t;
|
|
7144
|
-
},
|
|
7145
|
-
function
|
|
7159
|
+
}, yl = /* @__PURE__ */ Dn(vl, [["__scopeId", "data-v-35be3e12"]]), bl = {};
|
|
7160
|
+
function Ol(e, o) {
|
|
7146
7161
|
return j(), be("div", null, "blockTree");
|
|
7147
7162
|
}
|
|
7148
|
-
const
|
|
7163
|
+
const Il = /* @__PURE__ */ Dn(bl, [["render", Ol]]), Cl = { class: "text-subtitle-1 ml-3" }, Al = /* @__PURE__ */ Ue({
|
|
7149
7164
|
__name: "index",
|
|
7150
7165
|
props: {
|
|
7151
|
-
type: {}
|
|
7166
|
+
type: {},
|
|
7167
|
+
lock: { type: Boolean }
|
|
7152
7168
|
},
|
|
7153
7169
|
setup(e) {
|
|
7154
|
-
const { t: o } =
|
|
7155
|
-
let
|
|
7156
|
-
return t.mdAndUp.value && (
|
|
7170
|
+
const { t: o } = Yt(), t = ci(), { sysBarAvail: n } = ai(), { backgroundColor1: i } = rn(), r = e, l = te(() => {
|
|
7171
|
+
let p = "100%";
|
|
7172
|
+
return t.mdAndUp.value && (p = "400px"), {
|
|
7157
7173
|
background: i.value,
|
|
7158
|
-
width:
|
|
7174
|
+
width: p,
|
|
7159
7175
|
height: "100%"
|
|
7160
7176
|
};
|
|
7161
|
-
}), s =
|
|
7162
|
-
let
|
|
7163
|
-
return n.value && (
|
|
7177
|
+
}), s = te(() => {
|
|
7178
|
+
let p = 48;
|
|
7179
|
+
return n.value && (p += 24), {
|
|
7164
7180
|
position: "relative",
|
|
7165
7181
|
width: "100%",
|
|
7166
|
-
height: `calc(100% - ${
|
|
7182
|
+
height: `calc(100% - ${p}px)`
|
|
7167
7183
|
};
|
|
7168
|
-
}), u =
|
|
7184
|
+
}), u = te(() => ({
|
|
7169
7185
|
height: "60px"
|
|
7170
|
-
})), { open:
|
|
7171
|
-
return (
|
|
7172
|
-
const
|
|
7186
|
+
})), { open: d } = bo("blocklyNavigatorDlg");
|
|
7187
|
+
return (p, _) => {
|
|
7188
|
+
const T = ie("v-sheet"), h = ie("v-icon"), C = ie("v-dialog"), y = ie("v-btn"), x = ie("v-tooltip");
|
|
7173
7189
|
return j(), be(Zo, null, [
|
|
7174
|
-
re(
|
|
7175
|
-
modelValue:
|
|
7176
|
-
"onUpdate:modelValue": _[3] || (_[3] = (
|
|
7190
|
+
re(C, {
|
|
7191
|
+
modelValue: S(d),
|
|
7192
|
+
"onUpdate:modelValue": _[3] || (_[3] = (k) => yt(d) ? d.value = k : null),
|
|
7177
7193
|
transition: "scroll-x-reverse-transition",
|
|
7178
7194
|
persistent: "",
|
|
7179
7195
|
"no-click-animation": "",
|
|
7180
7196
|
fullscreen: "",
|
|
7181
7197
|
eager: "",
|
|
7182
|
-
onKeydown: _[4] || (_[4] =
|
|
7198
|
+
onKeydown: _[4] || (_[4] = jn(bt((k) => d.value = !1, ["stop", "prevent"]), ["esc"]))
|
|
7183
7199
|
}, {
|
|
7184
7200
|
default: Je(() => [
|
|
7185
7201
|
ye("div", {
|
|
7186
7202
|
class: "w-100 h-100 d-flex flex-row-reverse",
|
|
7187
|
-
onClick: _[1] || (_[1] =
|
|
7188
|
-
onContextmenu: _[2] || (_[2] =
|
|
7203
|
+
onClick: _[1] || (_[1] = bt((k) => d.value = !1, ["self"])),
|
|
7204
|
+
onContextmenu: _[2] || (_[2] = bt((k) => d.value = !1, ["self", "prevent"]))
|
|
7189
7205
|
}, [
|
|
7190
7206
|
ye("div", {
|
|
7191
7207
|
class: "elevation-2",
|
|
7192
7208
|
style: Oe(l.value)
|
|
7193
7209
|
}, [
|
|
7194
|
-
|
|
7210
|
+
S(n) ? (j(), Se(T, {
|
|
7195
7211
|
key: 0,
|
|
7196
7212
|
color: "transparent",
|
|
7197
7213
|
height: 24
|
|
7198
7214
|
})) : Xe("", !0),
|
|
7199
|
-
re(
|
|
7215
|
+
re(T, {
|
|
7200
7216
|
class: "d-flex align-center px-3",
|
|
7201
7217
|
color: "transparent",
|
|
7202
7218
|
height: 48
|
|
7203
7219
|
}, {
|
|
7204
7220
|
default: Je(() => [
|
|
7205
7221
|
re(h, {
|
|
7206
|
-
icon:
|
|
7207
|
-
onClick: _[0] || (_[0] = (
|
|
7222
|
+
icon: S(_i),
|
|
7223
|
+
onClick: _[0] || (_[0] = (k) => d.value = !1)
|
|
7208
7224
|
}, null, 8, ["icon"]),
|
|
7209
|
-
ye("span",
|
|
7225
|
+
ye("span", Cl, Eo(S(o)("x-block-lib.navigator")), 1)
|
|
7210
7226
|
]),
|
|
7211
7227
|
_: 1
|
|
7212
7228
|
}),
|
|
@@ -7214,7 +7230,10 @@ const Ol = /* @__PURE__ */ Mn(yl, [["render", bl]]), Il = { class: "text-subtitl
|
|
|
7214
7230
|
class: "overflow-y-auto",
|
|
7215
7231
|
style: Oe(s.value)
|
|
7216
7232
|
}, [
|
|
7217
|
-
r.type === "list" ? (j(), Se(
|
|
7233
|
+
r.type === "list" ? (j(), Se(yl, {
|
|
7234
|
+
key: 0,
|
|
7235
|
+
lock: r.lock
|
|
7236
|
+
}, null, 8, ["lock"])) : r.type === "tree" ? (j(), Se(Il, { key: 1 })) : Xe("", !0),
|
|
7218
7237
|
ye("div", {
|
|
7219
7238
|
style: Oe(u.value)
|
|
7220
7239
|
}, null, 4)
|
|
@@ -7224,15 +7243,15 @@ const Ol = /* @__PURE__ */ Mn(yl, [["render", bl]]), Il = { class: "text-subtitl
|
|
|
7224
7243
|
]),
|
|
7225
7244
|
_: 1
|
|
7226
7245
|
}, 8, ["modelValue"]),
|
|
7227
|
-
re(
|
|
7228
|
-
text:
|
|
7246
|
+
re(x, {
|
|
7247
|
+
text: S(o)("x-block-lib.tip.hotkeyCtrlE")
|
|
7229
7248
|
}, {
|
|
7230
|
-
activator: Je(({ props:
|
|
7231
|
-
re(
|
|
7249
|
+
activator: Je(({ props: k }) => [
|
|
7250
|
+
re(y, mo(k, {
|
|
7232
7251
|
variant: "outlined",
|
|
7233
7252
|
density: "comfortable",
|
|
7234
|
-
icon:
|
|
7235
|
-
onClick: _[5] || (_[5] = (
|
|
7253
|
+
icon: S(Ti),
|
|
7254
|
+
onClick: _[5] || (_[5] = (z) => d.value = !0)
|
|
7236
7255
|
}), null, 16, ["icon"])
|
|
7237
7256
|
]),
|
|
7238
7257
|
_: 1
|
|
@@ -7263,34 +7282,34 @@ const Ol = /* @__PURE__ */ Mn(yl, [["render", bl]]), Il = { class: "text-subtitl
|
|
|
7263
7282
|
wheel: !0
|
|
7264
7283
|
}
|
|
7265
7284
|
};
|
|
7266
|
-
function
|
|
7285
|
+
function Ll(e, o, t) {
|
|
7267
7286
|
let n;
|
|
7268
|
-
o === "page" ? t === "v1" && (n =
|
|
7269
|
-
const i =
|
|
7287
|
+
o === "page" ? t === "v1" && (n = br) : o === "comp" ? t === "v1" && (n = Er) : o === "func" ? t === "v1" && (n = yr) : o === "flow" && t === "v1" && (n = vr), console.assert(!!n), Qo.toolbox = n;
|
|
7288
|
+
const i = oi(e, Qo);
|
|
7270
7289
|
return o === "page" || o === "comp" ? t === "v1" && (i.registerToolboxCategoryCallback(
|
|
7271
7290
|
$e.name,
|
|
7272
7291
|
$e.callback
|
|
7292
|
+
), i.registerToolboxCategoryCallback(
|
|
7293
|
+
ue.name,
|
|
7294
|
+
ue.callback
|
|
7273
7295
|
), i.registerToolboxCategoryCallback(
|
|
7274
7296
|
_e.name,
|
|
7275
7297
|
_e.callback
|
|
7276
|
-
), i.registerToolboxCategoryCallback(
|
|
7277
|
-
pe.name,
|
|
7278
|
-
pe.callback
|
|
7279
7298
|
)) : o === "func" ? t === "v1" && (i.registerToolboxCategoryCallback(
|
|
7299
|
+
ue.name,
|
|
7300
|
+
ue.callback
|
|
7301
|
+
), i.registerToolboxCategoryCallback(
|
|
7280
7302
|
_e.name,
|
|
7281
7303
|
_e.callback
|
|
7282
|
-
), i.registerToolboxCategoryCallback(
|
|
7283
|
-
pe.name,
|
|
7284
|
-
pe.callback
|
|
7285
7304
|
)) : o === "flow" && t === "v1" && (i.registerToolboxCategoryCallback(
|
|
7305
|
+
ue.name,
|
|
7306
|
+
ue.callback
|
|
7307
|
+
), i.registerToolboxCategoryCallback(
|
|
7286
7308
|
_e.name,
|
|
7287
7309
|
_e.callback
|
|
7288
|
-
), i.registerToolboxCategoryCallback(
|
|
7289
|
-
pe.name,
|
|
7290
|
-
pe.callback
|
|
7291
7310
|
)), i;
|
|
7292
7311
|
}
|
|
7293
|
-
const
|
|
7312
|
+
const kl = { class: "position-relative w-100 h-100" }, Nl = /* @__PURE__ */ Ue({
|
|
7294
7313
|
__name: "index",
|
|
7295
7314
|
props: /* @__PURE__ */ Lo({
|
|
7296
7315
|
type: {},
|
|
@@ -7303,9 +7322,9 @@ const Ll = { class: "position-relative w-100 h-100" }, kl = /* @__PURE__ */ Ue({
|
|
|
7303
7322
|
}),
|
|
7304
7323
|
emits: /* @__PURE__ */ Lo(["ready"], ["update:lock", "update:scale"]),
|
|
7305
7324
|
setup(e, { expose: o, emit: t }) {
|
|
7306
|
-
const n =
|
|
7325
|
+
const n = si(), { locale: i, dark: r } = ii(n), l = co(e, "lock"), s = co(e, "scale"), u = e, d = t, p = we();
|
|
7307
7326
|
let _;
|
|
7308
|
-
const
|
|
7327
|
+
const T = we(!1), h = we(!1), C = te(() => u.type === "json" ? "tree" : "list"), y = te(() => ({
|
|
7309
7328
|
position: "absolute",
|
|
7310
7329
|
background: r.value ? "#0000007f" : "#ffffff7f",
|
|
7311
7330
|
top: "1px",
|
|
@@ -7314,7 +7333,7 @@ const Ll = { class: "position-relative w-100 h-100" }, kl = /* @__PURE__ */ Ue({
|
|
|
7314
7333
|
height: "calc(100% - 1px)",
|
|
7315
7334
|
pointerEvents: "none",
|
|
7316
7335
|
zIndex: 999
|
|
7317
|
-
})),
|
|
7336
|
+
})), x = te(() => ({
|
|
7318
7337
|
position: "absolute",
|
|
7319
7338
|
background: r.value ? "#0000007f" : "#ffffff7f",
|
|
7320
7339
|
top: "1px",
|
|
@@ -7322,12 +7341,12 @@ const Ll = { class: "position-relative w-100 h-100" }, kl = /* @__PURE__ */ Ue({
|
|
|
7322
7341
|
width: "56px",
|
|
7323
7342
|
height: "calc(100% - 1px)",
|
|
7324
7343
|
zIndex: 999
|
|
7325
|
-
})),
|
|
7344
|
+
})), k = te(() => ({
|
|
7326
7345
|
position: "absolute",
|
|
7327
7346
|
top: "0px",
|
|
7328
7347
|
right: "0px",
|
|
7329
7348
|
zIndex: 20
|
|
7330
|
-
})),
|
|
7349
|
+
})), z = te(() => ({
|
|
7331
7350
|
position: "absolute",
|
|
7332
7351
|
background: r.value ? "#0000007f" : "#ffffff7f",
|
|
7333
7352
|
top: "0px",
|
|
@@ -7335,128 +7354,129 @@ const Ll = { class: "position-relative w-100 h-100" }, kl = /* @__PURE__ */ Ue({
|
|
|
7335
7354
|
width: "100%",
|
|
7336
7355
|
height: "100%",
|
|
7337
7356
|
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");
|
|
7357
|
+
})), { open: D } = bo("blocklyEditorFlyout");
|
|
7345
7358
|
qe(async () => {
|
|
7346
|
-
if (!
|
|
7359
|
+
if (!p.value) {
|
|
7347
7360
|
console.assert(!1);
|
|
7348
7361
|
return;
|
|
7349
7362
|
}
|
|
7350
|
-
await Do(i.value), _ =
|
|
7351
|
-
const
|
|
7352
|
-
new MutationObserver((
|
|
7353
|
-
|
|
7354
|
-
|
|
7363
|
+
await Do(i.value), _ = Ll(p.value, u.type, u.version), _.addChangeListener(X.disableOrphans), _.addChangeListener(ae);
|
|
7364
|
+
const I = document.querySelector("#blocklyEditor .blocklyFlyout");
|
|
7365
|
+
new MutationObserver((Z) => {
|
|
7366
|
+
Z.forEach((se) => {
|
|
7367
|
+
se.type === "attributes" && se.attributeName === "style" && (D.value = _.getFlyout().isVisible());
|
|
7355
7368
|
});
|
|
7356
|
-
}).observe(
|
|
7357
|
-
}),
|
|
7358
|
-
|
|
7359
|
-
}),
|
|
7360
|
-
_ &&
|
|
7369
|
+
}).observe(I, { attributes: !0 }), D.value = _.getFlyout().isVisible(), b(), A(), await go(), d("ready");
|
|
7370
|
+
}), St(() => {
|
|
7371
|
+
D.value = !1;
|
|
7372
|
+
}), Oi(p, () => {
|
|
7373
|
+
_ && ni(_);
|
|
7361
7374
|
});
|
|
7362
|
-
async function
|
|
7363
|
-
if (
|
|
7364
|
-
|
|
7375
|
+
async function ae(I) {
|
|
7376
|
+
if (I.type === X.FINISHED_LOADING) {
|
|
7377
|
+
un(), me.emit("codeUpdate"), T.value = !1;
|
|
7365
7378
|
return;
|
|
7366
7379
|
}
|
|
7367
|
-
|
|
7380
|
+
T.value || (I.type === X.VIEWPORT_CHANGE && (s.value = _.getScale()), I.type === X.BLOCK_DRAG && (I.isStart ? h.value = !0 : h.value = !1), me.emit("codeUpdate"));
|
|
7368
7381
|
}
|
|
7369
|
-
const
|
|
7370
|
-
|
|
7371
|
-
|
|
7382
|
+
const K = (I) => {
|
|
7383
|
+
T.value = !0, No.workspaces.load(I, _);
|
|
7384
|
+
}, de = () => No.workspaces.save(_), ve = () => a.workspaceToCode(_), b = () => {
|
|
7385
|
+
_.options.readOnly = l.value, _.options.readOnly && (D.value = !1);
|
|
7386
|
+
}, A = () => {
|
|
7387
|
+
_.setScale(s.value);
|
|
7388
|
+
}, R = (I) => {
|
|
7389
|
+
if (I.key === "q" && I.ctrlKey) {
|
|
7390
|
+
F();
|
|
7372
7391
|
return;
|
|
7373
7392
|
}
|
|
7374
|
-
if (
|
|
7375
|
-
|
|
7393
|
+
if (I.key === "w" && I.ctrlKey) {
|
|
7394
|
+
B();
|
|
7376
7395
|
return;
|
|
7377
7396
|
}
|
|
7378
|
-
if (
|
|
7379
|
-
|
|
7397
|
+
if (I.key === "e" && I.ctrlKey) {
|
|
7398
|
+
V();
|
|
7380
7399
|
return;
|
|
7381
7400
|
}
|
|
7382
|
-
},
|
|
7401
|
+
}, F = () => {
|
|
7383
7402
|
me.emit("cleanWorkspace");
|
|
7384
|
-
}, K = () => {
|
|
7385
|
-
l.value = !l.value;
|
|
7386
7403
|
}, B = () => {
|
|
7404
|
+
l.value = !l.value;
|
|
7405
|
+
}, V = () => {
|
|
7387
7406
|
me.emit("blocklyNavigatorDlg");
|
|
7388
7407
|
};
|
|
7389
7408
|
return qe(() => {
|
|
7390
|
-
window.addEventListener("keydown",
|
|
7391
|
-
}),
|
|
7392
|
-
window.addEventListener("keydown",
|
|
7393
|
-
}), De(i, (
|
|
7394
|
-
Do(
|
|
7395
|
-
}), De(r, (
|
|
7396
|
-
|
|
7397
|
-
}), De(
|
|
7398
|
-
|
|
7409
|
+
window.addEventListener("keydown", R, !1);
|
|
7410
|
+
}), St(() => {
|
|
7411
|
+
window.addEventListener("keydown", R, !1);
|
|
7412
|
+
}), De(i, (I) => {
|
|
7413
|
+
Do(I);
|
|
7414
|
+
}), De(r, (I) => {
|
|
7415
|
+
gr(I ? "dark" : "light");
|
|
7416
|
+
}), De(D, (I) => {
|
|
7417
|
+
I || _.hideChaff();
|
|
7399
7418
|
}), De(l, () => {
|
|
7400
|
-
|
|
7419
|
+
b();
|
|
7401
7420
|
}), De(s, () => {
|
|
7402
|
-
|
|
7403
|
-
}), o({ loading:
|
|
7404
|
-
const
|
|
7405
|
-
return j(), be("div",
|
|
7421
|
+
A();
|
|
7422
|
+
}), o({ loading: T, load: K, save: de, generateCode: ve }), (I, M) => {
|
|
7423
|
+
const Z = ie("v-icon"), se = ie("x-loading");
|
|
7424
|
+
return j(), be("div", kl, [
|
|
7406
7425
|
ye("div", {
|
|
7407
7426
|
id: "blocklyEditor",
|
|
7408
7427
|
ref_key: "blocklyDiv",
|
|
7409
|
-
ref:
|
|
7428
|
+
ref: p,
|
|
7410
7429
|
class: "w-100 h-100"
|
|
7411
7430
|
}, null, 512),
|
|
7412
7431
|
h.value ? (j(), be("div", {
|
|
7413
7432
|
key: 0,
|
|
7414
7433
|
class: "d-flex flex-column align-center justify-center",
|
|
7415
|
-
style: Oe(
|
|
7434
|
+
style: Oe(y.value)
|
|
7416
7435
|
}, [
|
|
7417
|
-
re(
|
|
7418
|
-
icon:
|
|
7436
|
+
re(Z, {
|
|
7437
|
+
icon: S(pi),
|
|
7419
7438
|
size: "x-large"
|
|
7420
7439
|
}, null, 8, ["icon"])
|
|
7421
7440
|
], 4)) : Xe("", !0),
|
|
7422
7441
|
l.value ? (j(), be("div", {
|
|
7423
7442
|
key: 1,
|
|
7424
|
-
style: Oe(
|
|
7443
|
+
style: Oe(x.value)
|
|
7425
7444
|
}, null, 4)) : Xe("", !0),
|
|
7426
7445
|
ye("div", {
|
|
7427
7446
|
class: "d-flex align-end pt-3 pr-3",
|
|
7428
|
-
style: Oe(
|
|
7447
|
+
style: Oe(k.value)
|
|
7429
7448
|
}, [
|
|
7430
|
-
re(
|
|
7431
|
-
re(
|
|
7449
|
+
re(Or, { lock: l.value }, null, 8, ["lock"]),
|
|
7450
|
+
re(Ir, {
|
|
7432
7451
|
modelValue: l.value,
|
|
7433
|
-
"onUpdate:modelValue": M[0] || (M[0] = (
|
|
7452
|
+
"onUpdate:modelValue": M[0] || (M[0] = (Ze) => l.value = Ze)
|
|
7434
7453
|
}, null, 8, ["modelValue"]),
|
|
7435
|
-
re(
|
|
7436
|
-
type:
|
|
7437
|
-
|
|
7454
|
+
re(Al, {
|
|
7455
|
+
type: C.value,
|
|
7456
|
+
lock: l.value
|
|
7457
|
+
}, null, 8, ["type", "lock"])
|
|
7438
7458
|
], 4),
|
|
7439
7459
|
l.value ? (j(), be("div", {
|
|
7440
7460
|
key: 2,
|
|
7441
|
-
style: Oe(
|
|
7461
|
+
style: Oe(z.value)
|
|
7442
7462
|
}, null, 4)) : Xe("", !0),
|
|
7443
|
-
|
|
7463
|
+
T.value ? (j(), Se(se, {
|
|
7444
7464
|
key: 3,
|
|
7445
7465
|
"z-index": 99
|
|
7446
7466
|
})) : Xe("", !0)
|
|
7447
7467
|
]);
|
|
7448
7468
|
};
|
|
7449
7469
|
}
|
|
7450
|
-
}),
|
|
7451
|
-
e.component("XBlockly",
|
|
7470
|
+
}), Sl = (e) => {
|
|
7471
|
+
e.component("XBlockly", Nl);
|
|
7452
7472
|
};
|
|
7453
|
-
async function
|
|
7454
|
-
return (await
|
|
7473
|
+
async function Vl(e) {
|
|
7474
|
+
return (await sn(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en-gc42vrme.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans-lr11azyl.js") }), `./locales/${e}/index.ts`, 4)).default;
|
|
7455
7475
|
}
|
|
7456
|
-
const
|
|
7476
|
+
const Ul = { install: Sl };
|
|
7457
7477
|
export {
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
|
|
7461
|
-
|
|
7478
|
+
Nl as XBlockly,
|
|
7479
|
+
Ul as default,
|
|
7480
|
+
Sl as install,
|
|
7481
|
+
Vl as loadLocaleMessageBlock
|
|
7462
7482
|
};
|