@babsey/code-graph 0.9.6 → 0.10.0
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/code-graph.js +285 -261
- package/dist/code-graph.umd.cjs +4 -4
- package/dist/codeEditor.d.ts +16 -1
- package/dist/codeGraph/codeGraph.d.ts +6 -4
- package/dist/codeNode/codeNode.d.ts +0 -1
- package/dist/codeNode/defineCodeNode.d.ts +0 -1
- package/dist/codeNode/dynamicCodeNode.d.ts +0 -1
- package/package.json +1 -1
package/dist/code-graph.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createElementBlock as k, openBlock as m, createElementVNode as p, createStaticVNode as jt, defineComponent as de, toRef as xn, ref as ae, createVNode as X, unref as H, mergeModels as as, useModel as sa, resolveComponent as ys, createCommentVNode as K, onMounted as Cn, onBeforeUnmount as gs, watch as bs, createBlock as le, withCtx as Ye, normalizeProps as ra, guardReactiveProps as aa, renderSlot as Me, mergeProps as oa, toDisplayString as ee, computed as z, onUpdated as ws, normalizeStyle as On, normalizeClass as je, withModifiers as st, withDirectives as zt, Fragment as re, createTextVNode as ks, withKeys as fn, vModelText as Bt, renderList as Ke, nextTick as Ms, resolveDynamicComponent as os, inject as ia, Transition as la, reactive as Ae, markRaw as ce, shallowReadonly as ua } from "vue";
|
|
2
|
-
import { BaklavaEditor as da, Components as pn, useViewModel as kt, useGraph as Tn, useTemporaryConnection as ca, useTransform as ha, useNodeCategories as fa, displayInSidebar as Ss, CheckboxInterfaceComponent as pa, IntegerInterfaceComponent as ma, TextInputInterfaceComponent as xs, NumberInterfaceComponent as va, SelectInterfaceComponent as _a, SliderInterfaceComponent as ya, TextareaInputInterfaceComponent as ga, Commands as He, DEFAULT_TOOLBAR_COMMANDS as ba, TextInputInterface as Cs, DEFAULT_SETTINGS as wa, useCommandHandler as ka, useHistory as Ma, useClipboard as Sa, registerDeleteNodesCommand as xa, registerSaveSubgraphCommand as Ca, registerSwitchToMainGraphCommand as Oa, registerSidebarCommands as Ta, registerZoomToFitCommands as Na, setViewNodeProperties as
|
|
3
|
-
import { GRAPH_NODE_TYPE_PREFIX as
|
|
4
|
-
import { usePointer as
|
|
2
|
+
import { BaklavaEditor as da, Components as pn, useViewModel as kt, useGraph as Tn, useTemporaryConnection as ca, useTransform as ha, useNodeCategories as fa, displayInSidebar as Ss, CheckboxInterfaceComponent as pa, IntegerInterfaceComponent as ma, TextInputInterfaceComponent as xs, NumberInterfaceComponent as va, SelectInterfaceComponent as _a, SliderInterfaceComponent as ya, TextareaInputInterfaceComponent as ga, Commands as He, DEFAULT_TOOLBAR_COMMANDS as ba, TextInputInterface as Cs, DEFAULT_SETTINGS as wa, useCommandHandler as ka, useHistory as Ma, useClipboard as Sa, registerDeleteNodesCommand as xa, registerSaveSubgraphCommand as Ca, registerSwitchToMainGraphCommand as Oa, registerSidebarCommands as Ta, registerZoomToFitCommands as Na, setViewNodeProperties as Ia } from "@baklavajs/renderer-vue";
|
|
3
|
+
import { GRAPH_NODE_TYPE_PREFIX as Da, AbstractNode as Ya, NodeInterface as Se, Graph as Ea, getGraphNodeTypeString as Os, GraphTemplate as Ra, GRAPH_INPUT_NODE_TYPE as Pa, GRAPH_OUTPUT_NODE_TYPE as La, Editor as Aa } from "@baklavajs/core";
|
|
4
|
+
import { usePointer as $a } from "@vueuse/core";
|
|
5
5
|
import ut from "mustache";
|
|
6
6
|
import { v4 as Xe } from "uuid";
|
|
7
|
-
import { NodeInterfaceType as Je, BaklavaInterfaceTypes as
|
|
7
|
+
import { NodeInterfaceType as Je, BaklavaInterfaceTypes as Ua, setType as ve, setTypeForMultipleConnections as Ut } from "@baklavajs/interface-types";
|
|
8
8
|
import { allowMultipleConnections as lt, applyResult as Ts, BaseEngine as Wa } from "@baklavajs/engine";
|
|
9
9
|
import Ha from "toposort";
|
|
10
10
|
import { SequentialHook as is } from "@baklavajs/events";
|
|
@@ -57,7 +57,7 @@ function Ba(e, t) {
|
|
|
57
57
|
p("path", { d: "M4 8m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z" }, null, -1)
|
|
58
58
|
])]);
|
|
59
59
|
}
|
|
60
|
-
const
|
|
60
|
+
const Is = /* @__PURE__ */ q(ja, [["render", Ba]]), Za = {}, qa = {
|
|
61
61
|
xmlns: "http://www.w3.org/2000/svg",
|
|
62
62
|
width: "24",
|
|
63
63
|
height: "24",
|
|
@@ -80,7 +80,7 @@ function Ka(e, t) {
|
|
|
80
80
|
p("path", { d: "M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1" }, null, -1)
|
|
81
81
|
])]);
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const Ds = /* @__PURE__ */ q(Za, [["render", Ka]]), Xa = {}, Ja = {
|
|
84
84
|
xmlns: "http://www.w3.org/2000/svg",
|
|
85
85
|
width: "24",
|
|
86
86
|
height: "24",
|
|
@@ -235,7 +235,7 @@ function So(e, t) {
|
|
|
235
235
|
jt('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M11.5 21h-4.5a2 2 0 0 1 -2 -2v-6a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2"></path><path d="M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0"></path><path d="M8 11v-4a4 4 0 1 1 8 0v4"></path><path d="M20 21l2 -2l-2 -2"></path><path d="M17 17l-2 2l2 2"></path>', 6)
|
|
236
236
|
])]);
|
|
237
237
|
}
|
|
238
|
-
const
|
|
238
|
+
const In = /* @__PURE__ */ q(ko, [["render", So]]), xo = {}, Co = {
|
|
239
239
|
xmlns: "http://www.w3.org/2000/svg",
|
|
240
240
|
width: "24",
|
|
241
241
|
height: "24",
|
|
@@ -257,7 +257,7 @@ function Oo(e, t) {
|
|
|
257
257
|
p("path", { d: "M7 4v16l13 -8z" }, null, -1)
|
|
258
258
|
])]);
|
|
259
259
|
}
|
|
260
|
-
const To = /* @__PURE__ */ q(xo, [["render", Oo]]), No = {},
|
|
260
|
+
const To = /* @__PURE__ */ q(xo, [["render", Oo]]), No = {}, Io = {
|
|
261
261
|
xmlns: "http://www.w3.org/2000/svg",
|
|
262
262
|
width: "24",
|
|
263
263
|
height: "24",
|
|
@@ -269,8 +269,8 @@ const To = /* @__PURE__ */ q(xo, [["render", Oo]]), No = {}, Do = {
|
|
|
269
269
|
"stroke-linejoin": "round",
|
|
270
270
|
class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-plus"
|
|
271
271
|
};
|
|
272
|
-
function
|
|
273
|
-
return m(), k("svg",
|
|
272
|
+
function Do(e, t) {
|
|
273
|
+
return m(), k("svg", Io, [...t[0] || (t[0] = [
|
|
274
274
|
p("path", {
|
|
275
275
|
stroke: "none",
|
|
276
276
|
d: "M0 0h24v24H0z",
|
|
@@ -280,7 +280,7 @@ function Io(e, t) {
|
|
|
280
280
|
p("path", { d: "M5 12l14 0" }, null, -1)
|
|
281
281
|
])]);
|
|
282
282
|
}
|
|
283
|
-
const Ps = /* @__PURE__ */ q(No, [["render",
|
|
283
|
+
const Ps = /* @__PURE__ */ q(No, [["render", Do]]), Yo = {}, Eo = {
|
|
284
284
|
xmlns: "http://www.w3.org/2000/svg",
|
|
285
285
|
width: "24",
|
|
286
286
|
height: "24",
|
|
@@ -321,7 +321,7 @@ function Ao(e, t) {
|
|
|
321
321
|
jt('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M5 2h5v4h-5z"></path><path d="M15 10h5v4h-5z"></path><path d="M5 18h5v4h-5z"></path><path d="M5 10h5v4h-5z"></path><path d="M10 12h5"></path><path d="M7.5 6v4"></path><path d="M7.5 14v4"></path>', 8)
|
|
322
322
|
])]);
|
|
323
323
|
}
|
|
324
|
-
const As = /* @__PURE__ */ q(Po, [["render", Ao]]),
|
|
324
|
+
const As = /* @__PURE__ */ q(Po, [["render", Ao]]), $o = {}, Uo = {
|
|
325
325
|
xmlns: "http://www.w3.org/2000/svg",
|
|
326
326
|
width: "24",
|
|
327
327
|
height: "24",
|
|
@@ -334,11 +334,11 @@ const As = /* @__PURE__ */ q(Po, [["render", Ao]]), Uo = {}, $o = {
|
|
|
334
334
|
class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-schema-off"
|
|
335
335
|
};
|
|
336
336
|
function Wo(e, t) {
|
|
337
|
-
return m(), k("svg",
|
|
337
|
+
return m(), k("svg", Uo, [...t[0] || (t[0] = [
|
|
338
338
|
jt('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M6 2h4v4m-4 0h-1v-1"></path><path d="M15 11v-1h5v4h-2"></path><path d="M5 18h5v4h-5z"></path><path d="M5 10h5v4h-5z"></path><path d="M10 12h2"></path><path d="M7.5 7.5v2.5"></path><path d="M7.5 14v4"></path><path d="M3 3l18 18"></path>', 9)
|
|
339
339
|
])]);
|
|
340
340
|
}
|
|
341
|
-
const
|
|
341
|
+
const $s = /* @__PURE__ */ q($o, [["render", Wo]]), Ho = {}, Fo = {
|
|
342
342
|
xmlns: "http://www.w3.org/2000/svg",
|
|
343
343
|
width: "24",
|
|
344
344
|
height: "24",
|
|
@@ -355,7 +355,7 @@ function Go(e, t) {
|
|
|
355
355
|
jt('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M21 18a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3"></path><path d="M3 3m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v0a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z"></path><path d="M12 9v8"></path><path d="M9 14l3 3l3 -3"></path>', 5)
|
|
356
356
|
])]);
|
|
357
357
|
}
|
|
358
|
-
const
|
|
358
|
+
const Us = /* @__PURE__ */ q(Ho, [["render", Go]]), Vo = {}, jo = {
|
|
359
359
|
xmlns: "http://www.w3.org/2000/svg",
|
|
360
360
|
width: "24",
|
|
361
361
|
height: "24",
|
|
@@ -405,8 +405,8 @@ function qo(e, t) {
|
|
|
405
405
|
const Hs = /* @__PURE__ */ q(Bo, [["render", qo]]), Lh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
406
406
|
__proto__: null,
|
|
407
407
|
Check: Ns,
|
|
408
|
-
CodeVariable:
|
|
409
|
-
Copy:
|
|
408
|
+
CodeVariable: Is,
|
|
409
|
+
Copy: Ds,
|
|
410
410
|
DotsVertical: Ys,
|
|
411
411
|
Download: Es,
|
|
412
412
|
LayoutSidebarLeftCollapse: oo,
|
|
@@ -414,13 +414,13 @@ const Hs = /* @__PURE__ */ q(Bo, [["render", qo]]), Lh = /* @__PURE__ */ Object.
|
|
|
414
414
|
LayoutSidebarRight: mo,
|
|
415
415
|
LayoutSidebarRightCollapse: Rs,
|
|
416
416
|
LayoutSidebarRightExpand: Nn,
|
|
417
|
-
LockCode:
|
|
417
|
+
LockCode: In,
|
|
418
418
|
PlayerPlay: To,
|
|
419
419
|
Plus: Ps,
|
|
420
420
|
Restore: Ls,
|
|
421
421
|
Schema: As,
|
|
422
|
-
SchemaOff:
|
|
423
|
-
TransitionBottom:
|
|
422
|
+
SchemaOff: $s,
|
|
423
|
+
TransitionBottom: Us,
|
|
424
424
|
Upload: Ws,
|
|
425
425
|
X: Hs
|
|
426
426
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -450,7 +450,7 @@ function Jo() {
|
|
|
450
450
|
);
|
|
451
451
|
}
|
|
452
452
|
});
|
|
453
|
-
var l = i(279), u = /* @__PURE__ */ i.n(l), d = i(370), _ = /* @__PURE__ */ i.n(d), f = i(817),
|
|
453
|
+
var l = i(279), u = /* @__PURE__ */ i.n(l), d = i(370), _ = /* @__PURE__ */ i.n(d), f = i(817), I = /* @__PURE__ */ i.n(f);
|
|
454
454
|
function g(w) {
|
|
455
455
|
try {
|
|
456
456
|
return document.execCommand(w);
|
|
@@ -459,7 +459,7 @@ function Jo() {
|
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
461
|
var C = function(S) {
|
|
462
|
-
var M =
|
|
462
|
+
var M = I()(S);
|
|
463
463
|
return g("cut"), M;
|
|
464
464
|
}, h = C;
|
|
465
465
|
function b(w) {
|
|
@@ -468,16 +468,16 @@ function Jo() {
|
|
|
468
468
|
var T = window.pageYOffset || document.documentElement.scrollTop;
|
|
469
469
|
return M.style.top = "".concat(T, "px"), M.setAttribute("readonly", ""), M.value = w, M;
|
|
470
470
|
}
|
|
471
|
-
var
|
|
471
|
+
var U = function(S, M) {
|
|
472
472
|
var T = b(S);
|
|
473
473
|
M.container.appendChild(T);
|
|
474
|
-
var
|
|
475
|
-
return g("copy"), T.remove(),
|
|
474
|
+
var D = I()(T);
|
|
475
|
+
return g("copy"), T.remove(), D;
|
|
476
476
|
}, A = function(S) {
|
|
477
477
|
var M = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
478
478
|
container: document.body
|
|
479
479
|
}, T = "";
|
|
480
|
-
return typeof S == "string" ? T =
|
|
480
|
+
return typeof S == "string" ? T = U(S, M) : S instanceof HTMLInputElement && !["text", "search", "url", "tel", "password"].includes(S?.type) ? T = U(S.value, M) : (T = I()(S), g("copy")), T;
|
|
481
481
|
}, F = A;
|
|
482
482
|
function Te(w) {
|
|
483
483
|
"@babel/helpers - typeof";
|
|
@@ -488,7 +488,7 @@ function Jo() {
|
|
|
488
488
|
}, Te(w);
|
|
489
489
|
}
|
|
490
490
|
var Ne = function() {
|
|
491
|
-
var S = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, M = S.action, T = M === void 0 ? "copy" : M,
|
|
491
|
+
var S = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, M = S.action, T = M === void 0 ? "copy" : M, D = S.container, R = S.target, pe = S.text;
|
|
492
492
|
if (T !== "copy" && T !== "cut")
|
|
493
493
|
throw new Error('Invalid "action" value, use either "copy" or "cut"');
|
|
494
494
|
if (R !== void 0)
|
|
@@ -501,11 +501,11 @@ function Jo() {
|
|
|
501
501
|
throw new Error('Invalid "target" value, use a valid Element');
|
|
502
502
|
if (pe)
|
|
503
503
|
return F(pe, {
|
|
504
|
-
container:
|
|
504
|
+
container: D
|
|
505
505
|
});
|
|
506
506
|
if (R)
|
|
507
507
|
return T === "cut" ? h(R) : F(R, {
|
|
508
|
-
container:
|
|
508
|
+
container: D
|
|
509
509
|
});
|
|
510
510
|
}, ft = Ne;
|
|
511
511
|
function we(w) {
|
|
@@ -535,23 +535,23 @@ function Jo() {
|
|
|
535
535
|
w.prototype = Object.create(S && S.prototype, { constructor: { value: w, writable: !0, configurable: !0 } }), S && pt(w, S);
|
|
536
536
|
}
|
|
537
537
|
function pt(w, S) {
|
|
538
|
-
return pt = Object.setPrototypeOf || function(T,
|
|
539
|
-
return T.__proto__ =
|
|
538
|
+
return pt = Object.setPrototypeOf || function(T, D) {
|
|
539
|
+
return T.__proto__ = D, T;
|
|
540
540
|
}, pt(w, S);
|
|
541
541
|
}
|
|
542
542
|
function Nt(w) {
|
|
543
|
-
var S =
|
|
543
|
+
var S = Dt();
|
|
544
544
|
return function() {
|
|
545
|
-
var T = ze(w),
|
|
545
|
+
var T = ze(w), D;
|
|
546
546
|
if (S) {
|
|
547
547
|
var R = ze(this).constructor;
|
|
548
|
-
|
|
548
|
+
D = Reflect.construct(T, arguments, R);
|
|
549
549
|
} else
|
|
550
|
-
|
|
551
|
-
return
|
|
550
|
+
D = T.apply(this, arguments);
|
|
551
|
+
return It(this, D);
|
|
552
552
|
};
|
|
553
553
|
}
|
|
554
|
-
function
|
|
554
|
+
function It(w, S) {
|
|
555
555
|
return S && (we(S) === "object" || typeof S == "function") ? S : ln(w);
|
|
556
556
|
}
|
|
557
557
|
function ln(w) {
|
|
@@ -559,7 +559,7 @@ function Jo() {
|
|
|
559
559
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
560
560
|
return w;
|
|
561
561
|
}
|
|
562
|
-
function
|
|
562
|
+
function Dt() {
|
|
563
563
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
564
564
|
if (typeof Proxy == "function") return !0;
|
|
565
565
|
try {
|
|
@@ -582,15 +582,15 @@ function Jo() {
|
|
|
582
582
|
var W = /* @__PURE__ */ (function(w) {
|
|
583
583
|
on(M, w);
|
|
584
584
|
var S = Nt(M);
|
|
585
|
-
function M(T,
|
|
585
|
+
function M(T, D) {
|
|
586
586
|
var R;
|
|
587
|
-
return O(this, M), R = S.call(this), R.resolveOptions(
|
|
587
|
+
return O(this, M), R = S.call(this), R.resolveOptions(D), R.listenClick(T), R;
|
|
588
588
|
}
|
|
589
589
|
return ne(M, [{
|
|
590
590
|
key: "resolveOptions",
|
|
591
591
|
value: function() {
|
|
592
|
-
var
|
|
593
|
-
this.action = typeof
|
|
592
|
+
var D = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
593
|
+
this.action = typeof D.action == "function" ? D.action : this.defaultAction, this.target = typeof D.target == "function" ? D.target : this.defaultTarget, this.text = typeof D.text == "function" ? D.text : this.defaultText, this.container = we(D.container) === "object" ? D.container : document.body;
|
|
594
594
|
}
|
|
595
595
|
/**
|
|
596
596
|
* Adds a click event listener to the passed trigger.
|
|
@@ -598,9 +598,9 @@ function Jo() {
|
|
|
598
598
|
*/
|
|
599
599
|
}, {
|
|
600
600
|
key: "listenClick",
|
|
601
|
-
value: function(
|
|
601
|
+
value: function(D) {
|
|
602
602
|
var R = this;
|
|
603
|
-
this.listener = _()(
|
|
603
|
+
this.listener = _()(D, "click", function(pe) {
|
|
604
604
|
return R.onClick(pe);
|
|
605
605
|
});
|
|
606
606
|
}
|
|
@@ -610,8 +610,8 @@ function Jo() {
|
|
|
610
610
|
*/
|
|
611
611
|
}, {
|
|
612
612
|
key: "onClick",
|
|
613
|
-
value: function(
|
|
614
|
-
var R =
|
|
613
|
+
value: function(D) {
|
|
614
|
+
var R = D.delegateTarget || D.currentTarget, pe = this.action(R) || "copy", Yt = ft({
|
|
615
615
|
action: pe,
|
|
616
616
|
container: this.container,
|
|
617
617
|
target: this.target(R),
|
|
@@ -632,8 +632,8 @@ function Jo() {
|
|
|
632
632
|
*/
|
|
633
633
|
}, {
|
|
634
634
|
key: "defaultAction",
|
|
635
|
-
value: function(
|
|
636
|
-
return et("action",
|
|
635
|
+
value: function(D) {
|
|
636
|
+
return et("action", D);
|
|
637
637
|
}
|
|
638
638
|
/**
|
|
639
639
|
* Default `target` lookup function.
|
|
@@ -641,8 +641,8 @@ function Jo() {
|
|
|
641
641
|
*/
|
|
642
642
|
}, {
|
|
643
643
|
key: "defaultTarget",
|
|
644
|
-
value: function(
|
|
645
|
-
var R = et("target",
|
|
644
|
+
value: function(D) {
|
|
645
|
+
var R = et("target", D);
|
|
646
646
|
if (R)
|
|
647
647
|
return document.querySelector(R);
|
|
648
648
|
}
|
|
@@ -658,8 +658,8 @@ function Jo() {
|
|
|
658
658
|
* Default `text` lookup function.
|
|
659
659
|
* @param {Element} trigger
|
|
660
660
|
*/
|
|
661
|
-
value: function(
|
|
662
|
-
return et("text",
|
|
661
|
+
value: function(D) {
|
|
662
|
+
return et("text", D);
|
|
663
663
|
}
|
|
664
664
|
/**
|
|
665
665
|
* Destroy lifecycle.
|
|
@@ -671,11 +671,11 @@ function Jo() {
|
|
|
671
671
|
}
|
|
672
672
|
}], [{
|
|
673
673
|
key: "copy",
|
|
674
|
-
value: function(
|
|
674
|
+
value: function(D) {
|
|
675
675
|
var R = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
676
676
|
container: document.body
|
|
677
677
|
};
|
|
678
|
-
return F(
|
|
678
|
+
return F(D, R);
|
|
679
679
|
}
|
|
680
680
|
/**
|
|
681
681
|
* Allow fire programmatically a cut action
|
|
@@ -684,8 +684,8 @@ function Jo() {
|
|
|
684
684
|
*/
|
|
685
685
|
}, {
|
|
686
686
|
key: "cut",
|
|
687
|
-
value: function(
|
|
688
|
-
return h(
|
|
687
|
+
value: function(D) {
|
|
688
|
+
return h(D);
|
|
689
689
|
}
|
|
690
690
|
/**
|
|
691
691
|
* Returns the support of the given action, or all actions if no action is
|
|
@@ -695,7 +695,7 @@ function Jo() {
|
|
|
695
695
|
}, {
|
|
696
696
|
key: "isSupported",
|
|
697
697
|
value: function() {
|
|
698
|
-
var
|
|
698
|
+
var D = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ["copy", "cut"], R = typeof D == "string" ? [D] : D, pe = !!document.queryCommandSupported;
|
|
699
699
|
return R.forEach(function(Yt) {
|
|
700
700
|
pe = pe && !!document.queryCommandSupported(Yt);
|
|
701
701
|
}), pe;
|
|
@@ -728,7 +728,7 @@ function Jo() {
|
|
|
728
728
|
/***/
|
|
729
729
|
(function(a, o, i) {
|
|
730
730
|
var l = i(828);
|
|
731
|
-
function u(f,
|
|
731
|
+
function u(f, I, g, C, h) {
|
|
732
732
|
var b = _.apply(this, arguments);
|
|
733
733
|
return f.addEventListener(g, b, h), {
|
|
734
734
|
destroy: function() {
|
|
@@ -736,14 +736,14 @@ function Jo() {
|
|
|
736
736
|
}
|
|
737
737
|
};
|
|
738
738
|
}
|
|
739
|
-
function d(f,
|
|
739
|
+
function d(f, I, g, C, h) {
|
|
740
740
|
return typeof f.addEventListener == "function" ? u.apply(null, arguments) : typeof g == "function" ? u.bind(null, document).apply(null, arguments) : (typeof f == "string" && (f = document.querySelectorAll(f)), Array.prototype.map.call(f, function(b) {
|
|
741
|
-
return u(b,
|
|
741
|
+
return u(b, I, g, C, h);
|
|
742
742
|
}));
|
|
743
743
|
}
|
|
744
|
-
function _(f,
|
|
744
|
+
function _(f, I, g, C) {
|
|
745
745
|
return function(h) {
|
|
746
|
-
h.delegateTarget = l(h.target,
|
|
746
|
+
h.delegateTarget = l(h.target, I), h.delegateTarget && C.call(f, h);
|
|
747
747
|
};
|
|
748
748
|
}
|
|
749
749
|
a.exports = d;
|
|
@@ -783,7 +783,7 @@ function Jo() {
|
|
|
783
783
|
if (l.nodeList(g))
|
|
784
784
|
return f(g, C, h);
|
|
785
785
|
if (l.string(g))
|
|
786
|
-
return
|
|
786
|
+
return I(g, C, h);
|
|
787
787
|
throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");
|
|
788
788
|
}
|
|
789
789
|
function _(g, C, h) {
|
|
@@ -804,7 +804,7 @@ function Jo() {
|
|
|
804
804
|
}
|
|
805
805
|
};
|
|
806
806
|
}
|
|
807
|
-
function
|
|
807
|
+
function I(g, C, h) {
|
|
808
808
|
return u(document.body, g, C, h);
|
|
809
809
|
}
|
|
810
810
|
a.exports = d;
|
|
@@ -861,7 +861,7 @@ function Jo() {
|
|
|
861
861
|
off: function(i, l) {
|
|
862
862
|
var u = this.e || (this.e = {}), d = u[i], _ = [];
|
|
863
863
|
if (d && l)
|
|
864
|
-
for (var f = 0,
|
|
864
|
+
for (var f = 0, I = d.length; f < I; f++)
|
|
865
865
|
d[f].fn !== l && d[f].fn._ !== l && _.push(d[f]);
|
|
866
866
|
return _.length ? u[i] = _ : delete u[i], this;
|
|
867
867
|
}
|
|
@@ -952,7 +952,7 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
952
952
|
onClick: a,
|
|
953
953
|
class: "baklava-button"
|
|
954
954
|
}, [
|
|
955
|
-
X(H(
|
|
955
|
+
X(H(Ds))
|
|
956
956
|
]))
|
|
957
957
|
]));
|
|
958
958
|
}
|
|
@@ -978,7 +978,7 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
978
978
|
title: "The code is locked.",
|
|
979
979
|
onClick: o[0] || (o[0] = (l) => r(!1))
|
|
980
980
|
}, [
|
|
981
|
-
X(H(
|
|
981
|
+
X(H(In))
|
|
982
982
|
])) : K("", !0),
|
|
983
983
|
X(Fs, { text: e.modelValue }, null, 8, ["text"])
|
|
984
984
|
]),
|
|
@@ -1051,15 +1051,15 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1051
1051
|
},
|
|
1052
1052
|
emits: ["select", "start-drag", "update"],
|
|
1053
1053
|
setup(e, { emit: t }) {
|
|
1054
|
-
const n = pn.ContextMenu, s = pn.NodeInterface, r = e, a = z(() => r.node), o = t, { viewModel: i } = kt(), { graph: l, switchGraph: u } = Tn(), d = ae(null), _ = ae(!1), f = ae(""),
|
|
1054
|
+
const n = pn.ContextMenu, s = pn.NodeInterface, r = e, a = z(() => r.node), o = t, { viewModel: i } = kt(), { graph: l, switchGraph: u } = Tn(), d = ae(null), _ = ae(!1), f = ae(""), I = ae(null), g = ae(!1);
|
|
1055
1055
|
let C = 0, h = 0;
|
|
1056
|
-
const b = ae(!1),
|
|
1056
|
+
const b = ae(!1), U = z(() => {
|
|
1057
1057
|
const W = [
|
|
1058
1058
|
{ value: "edit", label: "Edit" },
|
|
1059
1059
|
{ value: "rename", label: "Rename" },
|
|
1060
1060
|
{ value: "delete", label: "Delete" }
|
|
1061
1061
|
];
|
|
1062
|
-
return r.node.type.startsWith(
|
|
1062
|
+
return r.node.type.startsWith(Da) && W.push({ value: "editSubgraph", label: "Edit Subgraph" }), W;
|
|
1063
1063
|
}), A = z(() => ({
|
|
1064
1064
|
"--selected": r.selected,
|
|
1065
1065
|
"--dragging": r.dragging,
|
|
@@ -1092,7 +1092,7 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1092
1092
|
l.value.removeNode(r.node);
|
|
1093
1093
|
break;
|
|
1094
1094
|
case "rename":
|
|
1095
|
-
f.value = r.node.title, _.value = !0, await Ms(),
|
|
1095
|
+
f.value = r.node.title, _.value = !0, await Ms(), I.value?.focus();
|
|
1096
1096
|
break;
|
|
1097
1097
|
case "editSubgraph":
|
|
1098
1098
|
u(r.node.template);
|
|
@@ -1100,11 +1100,11 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1100
1100
|
}
|
|
1101
1101
|
}, Nt = () => {
|
|
1102
1102
|
a.value.title = f.value, a.value.events.titleChanged.emit(a.value.title), _.value = !1;
|
|
1103
|
-
},
|
|
1103
|
+
}, It = () => {
|
|
1104
1104
|
d.value && i.value.hooks.renderNode.execute({ node: r.node, el: d.value });
|
|
1105
1105
|
}, ln = (W) => {
|
|
1106
1106
|
g.value = !0, C = r.node.width, h = W.clientX, W.preventDefault();
|
|
1107
|
-
},
|
|
1107
|
+
}, Dt = (W) => {
|
|
1108
1108
|
a.value.state && (a.value.state.integrated = W, o("update"));
|
|
1109
1109
|
}, ze = (W) => {
|
|
1110
1110
|
if (!g.value) return;
|
|
@@ -1114,8 +1114,8 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1114
1114
|
g.value = !1;
|
|
1115
1115
|
};
|
|
1116
1116
|
return Cn(() => {
|
|
1117
|
-
|
|
1118
|
-
}), ws(
|
|
1117
|
+
It(), window.addEventListener("mousemove", ze), window.addEventListener("mouseup", et);
|
|
1118
|
+
}), ws(It), gs(() => {
|
|
1119
1119
|
window.removeEventListener("mousemove", ze), window.removeEventListener("mouseup", et);
|
|
1120
1120
|
}), (W, B) => (m(), k("div", {
|
|
1121
1121
|
class: je([A.value, "baklava-node"]),
|
|
@@ -1148,7 +1148,7 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1148
1148
|
_.value ? zt((m(), k("input", {
|
|
1149
1149
|
key: 2,
|
|
1150
1150
|
ref_key: "renameInputEl",
|
|
1151
|
-
ref:
|
|
1151
|
+
ref: I,
|
|
1152
1152
|
"onUpdate:modelValue": B[4] || (B[4] = (w) => f.value = w),
|
|
1153
1153
|
class: "baklava-input",
|
|
1154
1154
|
placeholder: "Title",
|
|
@@ -1165,7 +1165,7 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1165
1165
|
]),
|
|
1166
1166
|
p("div", hi, [
|
|
1167
1167
|
a.value.isCodeNode ? (m(), k(re, { key: 0 }, [
|
|
1168
|
-
a.value.state.lockCode ? (m(), le(H(
|
|
1168
|
+
a.value.state.lockCode ? (m(), le(H(In), {
|
|
1169
1169
|
key: 0,
|
|
1170
1170
|
class: "--clickable mx-1",
|
|
1171
1171
|
onClick: B[0] || (B[0] = (w) => a.value.lockCode = !1)
|
|
@@ -1176,14 +1176,14 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1176
1176
|
onClick: ne
|
|
1177
1177
|
})) : K("", !0),
|
|
1178
1178
|
a.value.hasConnectedOutputNodes ? (m(), k(re, { key: 2 }, [
|
|
1179
|
-
a.value.state.integrated ? (m(), le(H(
|
|
1179
|
+
a.value.state.integrated ? (m(), le(H(Is), {
|
|
1180
1180
|
key: 1,
|
|
1181
1181
|
class: "--clickable mx-1",
|
|
1182
|
-
onClick: B[2] || (B[2] = (w) =>
|
|
1183
|
-
})) : (m(), le(H(
|
|
1182
|
+
onClick: B[2] || (B[2] = (w) => Dt(!1))
|
|
1183
|
+
})) : (m(), le(H(Us), {
|
|
1184
1184
|
key: 0,
|
|
1185
1185
|
class: "--clickable mx-1",
|
|
1186
|
-
onClick: B[1] || (B[1] = (w) =>
|
|
1186
|
+
onClick: B[1] || (B[1] = (w) => Dt(!0))
|
|
1187
1187
|
}))
|
|
1188
1188
|
], 64)) : K("", !0)
|
|
1189
1189
|
], 64)) : K("", !0),
|
|
@@ -1196,7 +1196,7 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1196
1196
|
"onUpdate:modelValue": B[3] || (B[3] = (w) => b.value = w),
|
|
1197
1197
|
x: 0,
|
|
1198
1198
|
y: 0,
|
|
1199
|
-
items:
|
|
1199
|
+
items: U.value,
|
|
1200
1200
|
onClick: pt
|
|
1201
1201
|
}, null, 8, ["modelValue", "items"])
|
|
1202
1202
|
])
|
|
@@ -1346,17 +1346,17 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1346
1346
|
}), Mi = { class: "__header" }, Si = { class: "__node-name" }, xi = { class: "__interfaces" }, Ci = { class: "__inputs" }, Oi = { style: { display: "flex" } }, Ti = { class: "__outputs" }, Ni = {
|
|
1347
1347
|
key: 0,
|
|
1348
1348
|
class: "__interface"
|
|
1349
|
-
},
|
|
1349
|
+
}, Ii = ["placeholder"], Di = { style: { display: "flex" } }, Vs = /* @__PURE__ */ de({
|
|
1350
1350
|
__name: "CodeGraphSidebar",
|
|
1351
1351
|
setup(e) {
|
|
1352
1352
|
const { viewModel: t } = kt(), { graph: n } = Tn(), s = ae(null), r = xn(t.value.settings.sidebar, "width"), a = z(() => t.value.settings.sidebar.resizable);
|
|
1353
1353
|
let o = 0, i = 0;
|
|
1354
1354
|
const l = z(() => {
|
|
1355
1355
|
const b = n.value.sidebar.nodeId;
|
|
1356
|
-
return n.value.nodes.find((
|
|
1356
|
+
return n.value.nodes.find((U) => U.id === b);
|
|
1357
1357
|
}), u = z(() => l.value), d = z(() => ({
|
|
1358
1358
|
width: `${r.value}px`
|
|
1359
|
-
})), _ = z(() => u.value ? Object.values(u.value.inputs).filter((b) => b.displayInSidebar && b.component) : []), f = z(() => u.value ? Object.values(u.value.outputs).filter((b) => b.displayInSidebar && b.component) : []),
|
|
1359
|
+
})), _ = z(() => u.value ? Object.values(u.value.inputs).filter((b) => b.displayInSidebar && b.component) : []), f = z(() => u.value ? Object.values(u.value.outputs).filter((b) => b.displayInSidebar && b.component) : []), I = () => {
|
|
1360
1360
|
n.value.sidebar.visible = !1;
|
|
1361
1361
|
}, g = () => {
|
|
1362
1362
|
l.value && (l.value.state.variableNameNumberAppendix = u.value.state.variableName.length === 0, l.value.events.update.emit(null));
|
|
@@ -1369,11 +1369,11 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1369
1369
|
{ once: !0 }
|
|
1370
1370
|
);
|
|
1371
1371
|
}, h = (b) => {
|
|
1372
|
-
const
|
|
1372
|
+
const U = s.value?.parentElement?.getBoundingClientRect().width ?? 500, A = b.clientX - i;
|
|
1373
1373
|
let F = o - A;
|
|
1374
|
-
F < 300 ? F = 300 : F > 0.9 *
|
|
1374
|
+
F < 300 ? F = 300 : F > 0.9 * U && (F = 0.9 * U), r.value = F;
|
|
1375
1375
|
};
|
|
1376
|
-
return (b,
|
|
1376
|
+
return (b, U) => (m(), k("div", {
|
|
1377
1377
|
class: je([{ "--open": H(n).sidebar.visible }, "baklava-sidebar"]),
|
|
1378
1378
|
style: On(d.value),
|
|
1379
1379
|
ref_key: "el",
|
|
@@ -1389,7 +1389,7 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1389
1389
|
p("button", {
|
|
1390
1390
|
tabindex: "-1",
|
|
1391
1391
|
class: "__close",
|
|
1392
|
-
onClick:
|
|
1392
|
+
onClick: I
|
|
1393
1393
|
}, "×"),
|
|
1394
1394
|
p("div", Si, [
|
|
1395
1395
|
p("b", null, ee(l.value.title), 1)
|
|
@@ -1406,7 +1406,7 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1406
1406
|
modelValue: A.hidden,
|
|
1407
1407
|
"onUpdate:modelValue": [
|
|
1408
1408
|
(F) => A.hidden = F,
|
|
1409
|
-
|
|
1409
|
+
U[0] || (U[0] = () => l.value?.events.update.emit(null))
|
|
1410
1410
|
],
|
|
1411
1411
|
disabled: !A.optional,
|
|
1412
1412
|
inversed: "",
|
|
@@ -1424,16 +1424,16 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1424
1424
|
]),
|
|
1425
1425
|
p("div", Ti, [
|
|
1426
1426
|
u.value && u.value.state ? (m(), k("div", Ni, [
|
|
1427
|
-
|
|
1427
|
+
U[3] || (U[3] = p("label", null, "Variable name", -1)),
|
|
1428
1428
|
zt(p("input", {
|
|
1429
|
-
"onUpdate:modelValue":
|
|
1429
|
+
"onUpdate:modelValue": U[1] || (U[1] = (A) => u.value.state.variableName = A),
|
|
1430
1430
|
placeholder: u.value.variableName,
|
|
1431
1431
|
type: "text",
|
|
1432
1432
|
class: "baklava-input",
|
|
1433
1433
|
title: "Variable name",
|
|
1434
1434
|
onBlur: g,
|
|
1435
1435
|
onKeydown: fn(g, ["enter"])
|
|
1436
|
-
}, null, 40,
|
|
1436
|
+
}, null, 40, Ii), [
|
|
1437
1437
|
[Bt, u.value.state.variableName]
|
|
1438
1438
|
])
|
|
1439
1439
|
])) : K("", !0),
|
|
@@ -1441,12 +1441,12 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1441
1441
|
key: A.id,
|
|
1442
1442
|
class: "__interface"
|
|
1443
1443
|
}, [
|
|
1444
|
-
p("div",
|
|
1444
|
+
p("div", Di, [
|
|
1445
1445
|
X(vn, {
|
|
1446
1446
|
modelValue: A.hidden,
|
|
1447
1447
|
"onUpdate:modelValue": [
|
|
1448
1448
|
(F) => A.hidden = F,
|
|
1449
|
-
|
|
1449
|
+
U[2] || (U[2] = () => l.value?.events.update.emit(null))
|
|
1450
1450
|
],
|
|
1451
1451
|
disabled: !A.optional,
|
|
1452
1452
|
inversed: "",
|
|
@@ -1486,7 +1486,7 @@ const Ri = {
|
|
|
1486
1486
|
}, js = /* @__PURE__ */ de({
|
|
1487
1487
|
__name: "CodeNodePalette",
|
|
1488
1488
|
setup(e) {
|
|
1489
|
-
const t = pn.PaletteEntry, { viewModel: n } = kt(), { x: s, y: r } =
|
|
1489
|
+
const t = pn.PaletteEntry, { viewModel: n } = kt(), { x: s, y: r } = $a(), { transform: a } = ha(), o = fa(n), i = ia("editorEl"), l = ae(""), u = ae(null), d = () => l.value ? o.value.filter(
|
|
1490
1490
|
(g) => g.name.toLowerCase().includes(l.value.toLowerCase()) || Object.values(g.nodeTypes).some(
|
|
1491
1491
|
(C) => C.title.toLowerCase().includes(l.value.toLowerCase())
|
|
1492
1492
|
)
|
|
@@ -1500,7 +1500,7 @@ const Ri = {
|
|
|
1500
1500
|
top: `${r.value - C}px`,
|
|
1501
1501
|
left: `${s.value - g}px`
|
|
1502
1502
|
};
|
|
1503
|
-
}),
|
|
1503
|
+
}), I = (g, C) => {
|
|
1504
1504
|
u.value = {
|
|
1505
1505
|
type: g,
|
|
1506
1506
|
nodeInformation: C
|
|
@@ -1508,7 +1508,7 @@ const Ri = {
|
|
|
1508
1508
|
const h = () => {
|
|
1509
1509
|
const b = Ae(new C.type());
|
|
1510
1510
|
n.value.displayedGraph.addNode(b);
|
|
1511
|
-
const
|
|
1511
|
+
const U = i.value.getBoundingClientRect(), [A, F] = a(s.value - U.left, r.value - U.top);
|
|
1512
1512
|
b.position.x = A, b.position.y = F, u.value = null, document.removeEventListener("pointerup", h);
|
|
1513
1513
|
};
|
|
1514
1514
|
document.addEventListener("pointerup", h);
|
|
@@ -1540,11 +1540,11 @@ const Ri = {
|
|
|
1540
1540
|
}, ee(h.name), 9, Li),
|
|
1541
1541
|
Object.keys(_(h.nodeTypes)).length < Object.values(h.nodeTypes).length ? (m(), k("div", Ai, " ( " + ee(Object.keys(_(h.nodeTypes)).length) + " / " + ee(Object.values(h.nodeTypes).length) + " ) ", 1)) : K("", !0)
|
|
1542
1542
|
])) : K("", !0),
|
|
1543
|
-
(m(!0), k(re, null, Ke(_(h.nodeTypes), (b,
|
|
1544
|
-
key:
|
|
1543
|
+
(m(!0), k(re, null, Ke(_(h.nodeTypes), (b, U) => (m(), le(H(t), {
|
|
1544
|
+
key: U,
|
|
1545
1545
|
title: b.title,
|
|
1546
|
-
type:
|
|
1547
|
-
onPointerdown: (A) =>
|
|
1546
|
+
type: U,
|
|
1547
|
+
onPointerdown: (A) => I(U, b)
|
|
1548
1548
|
}, null, 8, ["title", "type", "onPointerdown"]))), 128))
|
|
1549
1549
|
]))), 128))
|
|
1550
1550
|
], 34),
|
|
@@ -1565,12 +1565,12 @@ const Ri = {
|
|
|
1565
1565
|
})
|
|
1566
1566
|
], 64));
|
|
1567
1567
|
}
|
|
1568
|
-
}),
|
|
1568
|
+
}), $i = {}, Ui = { class: "prependIcon" }, Wi = { class: "appendIcon" };
|
|
1569
1569
|
function Hi(e, t) {
|
|
1570
1570
|
const n = ys("router-link");
|
|
1571
1571
|
return m(), le(n, { class: "navItem" }, {
|
|
1572
1572
|
default: Ye(() => [
|
|
1573
|
-
p("span",
|
|
1573
|
+
p("span", Ui, [
|
|
1574
1574
|
Me(e.$slots, "prependIcon")
|
|
1575
1575
|
]),
|
|
1576
1576
|
Me(e.$slots, "default"),
|
|
@@ -1581,7 +1581,7 @@ function Hi(e, t) {
|
|
|
1581
1581
|
_: 3
|
|
1582
1582
|
});
|
|
1583
1583
|
}
|
|
1584
|
-
const _n = /* @__PURE__ */ q(
|
|
1584
|
+
const _n = /* @__PURE__ */ q($i, [["render", Hi]]), Fi = { class: "navbar" }, Gi = ["onClick"], Vi = /* @__PURE__ */ de({
|
|
1585
1585
|
__name: "NavBar",
|
|
1586
1586
|
props: {
|
|
1587
1587
|
viewModel: {},
|
|
@@ -1883,7 +1883,7 @@ class Bs extends Ya {
|
|
|
1883
1883
|
});
|
|
1884
1884
|
}
|
|
1885
1885
|
}
|
|
1886
|
-
class
|
|
1886
|
+
class Dn extends Bs {
|
|
1887
1887
|
/**
|
|
1888
1888
|
* The default implementation does nothing.
|
|
1889
1889
|
* Overwrite this method to do calculation.
|
|
@@ -1990,8 +1990,8 @@ class Mt extends oe {
|
|
|
1990
1990
|
super.value = t, this.name !== "_code" && this.setHidden(!1);
|
|
1991
1991
|
}
|
|
1992
1992
|
}
|
|
1993
|
-
const Zs = new Je("boolean"), Qi = new Je("dict"), qs = new Je("list"), _e = new Je("node"), Ks = new Je("number"), Xs = new Je("string"), Js = new Je("tuple"),
|
|
1994
|
-
new
|
|
1993
|
+
const Zs = new Je("boolean"), Qi = new Je("dict"), qs = new Je("list"), _e = new Je("node"), Ks = new Je("number"), Xs = new Je("string"), Js = new Je("tuple"), $h = (e) => {
|
|
1994
|
+
new Ua(e.editor, { viewPlugin: e }).addTypes(Zs, Qi, qs, _e, Ks, Xs, Js);
|
|
1995
1995
|
};
|
|
1996
1996
|
class el extends Mt {
|
|
1997
1997
|
constructor(t, n) {
|
|
@@ -2029,7 +2029,7 @@ class Qs extends En {
|
|
|
2029
2029
|
return Number.isInteger(t) && super.validate(t);
|
|
2030
2030
|
}
|
|
2031
2031
|
}
|
|
2032
|
-
class
|
|
2032
|
+
class Uh extends Mt {
|
|
2033
2033
|
constructor(t = "", n = "") {
|
|
2034
2034
|
super(t, n), this.setComponent(ce(xs)), this.use(ve, qs);
|
|
2035
2035
|
}
|
|
@@ -2073,7 +2073,7 @@ class Fh extends Mt {
|
|
|
2073
2073
|
getValue = () => `(${this.value})`;
|
|
2074
2074
|
}
|
|
2075
2075
|
function Gh(e) {
|
|
2076
|
-
return class extends
|
|
2076
|
+
return class extends Dn {
|
|
2077
2077
|
type = e.type;
|
|
2078
2078
|
inputs = {};
|
|
2079
2079
|
outputs = {};
|
|
@@ -2081,11 +2081,11 @@ function Gh(e) {
|
|
|
2081
2081
|
super(), this._title = e.title ?? e.type, this.executeFactory("input", e.inputs), this.executeFactory("output", e.outputs), e.calculate && (this.calculate = (t, n) => e.calculate.call(this, t, n)), e.onCreate?.call(this), this.name = e.name ?? e.type, this.updateModules(e.modules), e.codeTemplate && (this.codeTemplate = e.codeTemplate), e.variableName != null && (this.variableName = e.variableName), this.addInput(
|
|
2082
2082
|
"_code",
|
|
2083
2083
|
// new CodeNodeInterface("_code", []).use(setType, nodeType).use(allowMultipleConnections).setHidden(true),
|
|
2084
|
-
new oe("_code", []).use(
|
|
2084
|
+
new oe("_code", []).use(Ut, _e).use(lt).setHidden(!0)
|
|
2085
2085
|
), this.addOutput(
|
|
2086
2086
|
"_code",
|
|
2087
2087
|
// new CodeNodeInterface("_code", []).use(setType, nodeType).use(allowMultipleConnections).setHidden(true),
|
|
2088
|
-
new oe("_code", []).use(
|
|
2088
|
+
new oe("_code", []).use(Ut, _e).use(lt).setHidden(!0)
|
|
2089
2089
|
);
|
|
2090
2090
|
}
|
|
2091
2091
|
afterGraphLoaded() {
|
|
@@ -2106,9 +2106,6 @@ function Gh(e) {
|
|
|
2106
2106
|
onDestroy() {
|
|
2107
2107
|
e.onDestroy?.call(this);
|
|
2108
2108
|
}
|
|
2109
|
-
onGraphUpdate() {
|
|
2110
|
-
e.onGraphUpdate?.call(this);
|
|
2111
|
-
}
|
|
2112
2109
|
onUnconnected() {
|
|
2113
2110
|
e.onUnconnected?.call(this);
|
|
2114
2111
|
}
|
|
@@ -2117,7 +2114,7 @@ function Gh(e) {
|
|
|
2117
2114
|
}
|
|
2118
2115
|
};
|
|
2119
2116
|
}
|
|
2120
|
-
class rl extends
|
|
2117
|
+
class rl extends Dn {
|
|
2121
2118
|
}
|
|
2122
2119
|
function Vh(e) {
|
|
2123
2120
|
return class extends rl {
|
|
@@ -2131,11 +2128,11 @@ function Vh(e) {
|
|
|
2131
2128
|
super(), this._title = e.title ?? e.type, this.executeFactory("input", e.inputs), this.executeFactory("output", e.outputs), e.calculate && (this.calculate = (t, n) => e.calculate?.call(this, t, n)), e.onCreate?.call(this), this.name = e.name ?? e.type, this.updateModules(e.modules), e.codeTemplate && (this.codeTemplate = e.codeTemplate), e.variableName && (this.variableName = e.variableName), this.addInput(
|
|
2132
2129
|
"_code",
|
|
2133
2130
|
// new CodeNodeInterface("_code", []).use(setType, nodeType).use(allowMultipleConnections).setHidden(true),
|
|
2134
|
-
new oe("_code", []).use(
|
|
2131
|
+
new oe("_code", []).use(Ut, _e).use(lt).setHidden(!0)
|
|
2135
2132
|
), this.addOutput(
|
|
2136
2133
|
"_code",
|
|
2137
2134
|
// new CodeNodeInterface("_code", []).use(setType, nodeType).use(allowMultipleConnections).setHidden(true),
|
|
2138
|
-
new oe("_code", []).use(
|
|
2135
|
+
new oe("_code", []).use(Ut, _e).use(lt).setHidden(!0)
|
|
2139
2136
|
), this.staticInputKeys.push("_code"), this.staticOutputKeys.push("_code");
|
|
2140
2137
|
}
|
|
2141
2138
|
afterGraphLoaded() {
|
|
@@ -2158,9 +2155,6 @@ function Vh(e) {
|
|
|
2158
2155
|
onDestroy() {
|
|
2159
2156
|
e.onDestroy?.call(this);
|
|
2160
2157
|
}
|
|
2161
|
-
onGraphUpdate() {
|
|
2162
|
-
e.onGraphUpdate?.call(this);
|
|
2163
|
-
}
|
|
2164
2158
|
onUnconnected() {
|
|
2165
2159
|
e.onUnconnected?.call(this);
|
|
2166
2160
|
}
|
|
@@ -2433,12 +2427,6 @@ class St extends Ea {
|
|
|
2433
2427
|
const n = super.load(t);
|
|
2434
2428
|
return this.nodes.forEach((s) => s.afterGraphLoaded()), n;
|
|
2435
2429
|
}
|
|
2436
|
-
/**
|
|
2437
|
-
* Trigger on graph update.
|
|
2438
|
-
*/
|
|
2439
|
-
onUpdate() {
|
|
2440
|
-
this.nodes.forEach((t) => t.onGraphUpdate());
|
|
2441
|
-
}
|
|
2442
2430
|
/**
|
|
2443
2431
|
* Render code script.
|
|
2444
2432
|
*/
|
|
@@ -2464,6 +2452,21 @@ class St extends Ea {
|
|
|
2464
2452
|
console.warn("Failed to sort nodes.");
|
|
2465
2453
|
}
|
|
2466
2454
|
}
|
|
2455
|
+
/**
|
|
2456
|
+
* Sort nodes by order rank of node types.
|
|
2457
|
+
* @remarks Set `orderRank` in `registerNodeType` function,
|
|
2458
|
+
* e.g. editor.registerNodeType(nodeType, {orderRank: 0})
|
|
2459
|
+
*/
|
|
2460
|
+
sortNodesByRank() {
|
|
2461
|
+
if (this.nodes.length === 0) return;
|
|
2462
|
+
const t = /* @__PURE__ */ new Map();
|
|
2463
|
+
this.nodes.forEach((s) => {
|
|
2464
|
+
const r = this.editor.nodeTypes.get(s.type).orderRank;
|
|
2465
|
+
t.has(r) ? t.set(r, [...t.get(r), s]) : t.set(r, [s]);
|
|
2466
|
+
});
|
|
2467
|
+
const n = Array.from(t.keys());
|
|
2468
|
+
n.sort((s, r) => s - r), this.nodes = n.flatMap((s) => t.get(s));
|
|
2469
|
+
}
|
|
2467
2470
|
}
|
|
2468
2471
|
const tr = (e) => {
|
|
2469
2472
|
const t = [];
|
|
@@ -2477,7 +2480,7 @@ const tr = (e) => {
|
|
|
2477
2480
|
const t = { ...e.position };
|
|
2478
2481
|
return t.x -= Ln + 70, t.y += 50, t;
|
|
2479
2482
|
}, us = "__baklava_SubgraphInputNode", ds = "__baklava_SubgraphOutputNode";
|
|
2480
|
-
class nr extends
|
|
2483
|
+
class nr extends Dn {
|
|
2481
2484
|
graphInterfaceId;
|
|
2482
2485
|
constructor() {
|
|
2483
2486
|
super(), this.graphInterfaceId = Xe();
|
|
@@ -2553,12 +2556,18 @@ function ol(e) {
|
|
|
2553
2556
|
outputs = {};
|
|
2554
2557
|
template = e;
|
|
2555
2558
|
subgraph;
|
|
2556
|
-
|
|
2559
|
+
afterGraphLoaded() {
|
|
2560
|
+
}
|
|
2561
|
+
afterLoaded() {
|
|
2562
|
+
}
|
|
2563
|
+
beforeRun() {
|
|
2557
2564
|
}
|
|
2558
2565
|
onConnected() {
|
|
2559
2566
|
}
|
|
2560
2567
|
onUnconnected() {
|
|
2561
2568
|
}
|
|
2569
|
+
update() {
|
|
2570
|
+
}
|
|
2562
2571
|
calculate = async (n, s) => {
|
|
2563
2572
|
if (!this.subgraph) throw new Error(`GraphNode ${this.id}: calculate called without subgraph being initialized`);
|
|
2564
2573
|
if (!s.engine || typeof s.engine != "object")
|
|
@@ -2666,16 +2675,16 @@ class Zt extends Ra {
|
|
|
2666
2675
|
*/
|
|
2667
2676
|
createGraph(t) {
|
|
2668
2677
|
const n = /* @__PURE__ */ new Map(), s = (f) => {
|
|
2669
|
-
const
|
|
2670
|
-
return n.set(f,
|
|
2678
|
+
const I = Xe();
|
|
2679
|
+
return n.set(f, I), I;
|
|
2671
2680
|
}, r = (f) => {
|
|
2672
|
-
const
|
|
2673
|
-
if (!
|
|
2674
|
-
return
|
|
2675
|
-
}, a = (f) => Ei(f, (
|
|
2676
|
-
id: s(
|
|
2677
|
-
templateId:
|
|
2678
|
-
value:
|
|
2681
|
+
const I = n.get(f);
|
|
2682
|
+
if (!I) throw new Error(`Unable to create graph from template: Could not map old id ${f} to new id`);
|
|
2683
|
+
return I;
|
|
2684
|
+
}, a = (f) => Ei(f, (I) => ({
|
|
2685
|
+
id: s(I.id),
|
|
2686
|
+
templateId: I.id,
|
|
2687
|
+
value: I.value
|
|
2679
2688
|
})), o = this.nodes.map((f) => ({
|
|
2680
2689
|
...f,
|
|
2681
2690
|
id: s(f.id),
|
|
@@ -2757,7 +2766,7 @@ function cl(e, t) {
|
|
|
2757
2766
|
for (; d.size > 0; ) {
|
|
2758
2767
|
const _ = d.values().next().value;
|
|
2759
2768
|
if (d.delete(_), Array.from(s.values()).every((f) => !f.has(_))) {
|
|
2760
|
-
const f = a.find((
|
|
2769
|
+
const f = a.find((I) => I.id === _);
|
|
2761
2770
|
i.push(f);
|
|
2762
2771
|
}
|
|
2763
2772
|
}
|
|
@@ -2798,7 +2807,7 @@ class hl extends Wa {
|
|
|
2798
2807
|
u[d] = this.getInterfaceValue(n, _.id);
|
|
2799
2808
|
}
|
|
2800
2809
|
this.events.afterNodeCalculation.emit({ outputValues: u, node: i }), o.set(i.id, new Map(Object.entries(u))), a.has(i) && a.get(i).forEach((d) => {
|
|
2801
|
-
const _ = Object.entries(i.outputs).find(([,
|
|
2810
|
+
const _ = Object.entries(i.outputs).find(([, I]) => I.id === d.from.id)?.[0];
|
|
2802
2811
|
if (!_)
|
|
2803
2812
|
throw new Error(
|
|
2804
2813
|
`Could not find key for interface ${d.from.id}
|
|
@@ -2865,7 +2874,7 @@ function An(e) {
|
|
|
2865
2874
|
function se(e) {
|
|
2866
2875
|
return e === void 0;
|
|
2867
2876
|
}
|
|
2868
|
-
function
|
|
2877
|
+
function $e(e) {
|
|
2869
2878
|
return typeof e == "number" || Object.prototype.toString.call(e) === "[object Number]";
|
|
2870
2879
|
}
|
|
2871
2880
|
function xt(e) {
|
|
@@ -2916,7 +2925,7 @@ Array.prototype.some ? yn = Array.prototype.some : yn = function(e) {
|
|
|
2916
2925
|
return !0;
|
|
2917
2926
|
return !1;
|
|
2918
2927
|
};
|
|
2919
|
-
function
|
|
2928
|
+
function $n(e) {
|
|
2920
2929
|
var t = null, n = !1, s = e._d && !isNaN(e._d.getTime());
|
|
2921
2930
|
if (s && (t = N(e), n = yn.call(t.parsedDateParts, function(r) {
|
|
2922
2931
|
return r != null;
|
|
@@ -2931,7 +2940,7 @@ function qt(e) {
|
|
|
2931
2940
|
return e != null ? Fe(N(t), e) : N(t).userInvalidated = !0, t;
|
|
2932
2941
|
}
|
|
2933
2942
|
var cs = v.momentProperties = [], un = !1;
|
|
2934
|
-
function
|
|
2943
|
+
function Un(e, t) {
|
|
2935
2944
|
var n, s, r, a = cs.length;
|
|
2936
2945
|
if (se(t._isAMomentObject) || (e._isAMomentObject = t._isAMomentObject), se(t._i) || (e._i = t._i), se(t._f) || (e._f = t._f), se(t._l) || (e._l = t._l), se(t._strict) || (e._strict = t._strict), se(t._tzm) || (e._tzm = t._tzm), se(t._isUTC) || (e._isUTC = t._isUTC), se(t._offset) || (e._offset = t._offset), se(t._pf) || (e._pf = N(t)), se(t._locale) || (e._locale = t._locale), a > 0)
|
|
2937
2946
|
for (n = 0; n < a; n++)
|
|
@@ -2939,7 +2948,7 @@ function $n(e, t) {
|
|
|
2939
2948
|
return e;
|
|
2940
2949
|
}
|
|
2941
2950
|
function Ct(e) {
|
|
2942
|
-
|
|
2951
|
+
Un(this, e), this._d = new Date(e._d != null ? e._d.getTime() : NaN), this.isValid() || (this._d = /* @__PURE__ */ new Date(NaN)), un === !1 && (un = !0, v.updateOffset(this), un = !1);
|
|
2943
2952
|
}
|
|
2944
2953
|
function ge(e) {
|
|
2945
2954
|
return e instanceof Ct || e != null && e._isAMomentObject != null;
|
|
@@ -3173,7 +3182,7 @@ function Fn(e) {
|
|
|
3173
3182
|
P(e, s) && (n = fe(s), n && (t[n] = e[s]));
|
|
3174
3183
|
return t;
|
|
3175
3184
|
}
|
|
3176
|
-
var
|
|
3185
|
+
var Il = {
|
|
3177
3186
|
date: 9,
|
|
3178
3187
|
day: 11,
|
|
3179
3188
|
weekday: 11,
|
|
@@ -3191,10 +3200,10 @@ var Dl = {
|
|
|
3191
3200
|
isoWeek: 5,
|
|
3192
3201
|
year: 1
|
|
3193
3202
|
};
|
|
3194
|
-
function
|
|
3203
|
+
function Dl(e) {
|
|
3195
3204
|
var t = [], n;
|
|
3196
3205
|
for (n in e)
|
|
3197
|
-
P(e, n) && t.push({ unit: n, priority:
|
|
3206
|
+
P(e, n) && t.push({ unit: n, priority: Il[n] });
|
|
3198
3207
|
return t.sort(function(s, r) {
|
|
3199
3208
|
return s.priority - r.priority;
|
|
3200
3209
|
}), t;
|
|
@@ -3230,15 +3239,15 @@ function Y(e) {
|
|
|
3230
3239
|
return t !== 0 && isFinite(t) && (n = ue(t)), n;
|
|
3231
3240
|
}
|
|
3232
3241
|
var wn = {};
|
|
3233
|
-
function
|
|
3242
|
+
function $(e, t) {
|
|
3234
3243
|
var n, s = t, r;
|
|
3235
|
-
for (typeof e == "string" && (e = [e]),
|
|
3244
|
+
for (typeof e == "string" && (e = [e]), $e(t) && (s = function(a, o) {
|
|
3236
3245
|
o[t] = Y(a);
|
|
3237
3246
|
}), r = e.length, n = 0; n < r; n++)
|
|
3238
3247
|
wn[e[n]] = s;
|
|
3239
3248
|
}
|
|
3240
3249
|
function Tt(e, t) {
|
|
3241
|
-
|
|
3250
|
+
$(e, function(n, s, r, a) {
|
|
3242
3251
|
r._w = r._w || {}, t(n, r._w, r, a);
|
|
3243
3252
|
});
|
|
3244
3253
|
}
|
|
@@ -3248,7 +3257,7 @@ function Ll(e, t, n) {
|
|
|
3248
3257
|
function tn(e) {
|
|
3249
3258
|
return e % 4 === 0 && e % 100 !== 0 || e % 400 === 0;
|
|
3250
3259
|
}
|
|
3251
|
-
var te = 0, Ee = 1, ke = 2, J = 3, me = 4, Re = 5, Ze = 6, Al = 7,
|
|
3260
|
+
var te = 0, Ee = 1, ke = 2, J = 3, me = 4, Re = 5, Ze = 6, Al = 7, $l = 8;
|
|
3252
3261
|
x("Y", 0, 0, function() {
|
|
3253
3262
|
var e = this.year();
|
|
3254
3263
|
return e <= 9999 ? xe(e, 4) : "+" + e;
|
|
@@ -3264,14 +3273,14 @@ y("YY", V, ie);
|
|
|
3264
3273
|
y("YYYY", Vn, Gn);
|
|
3265
3274
|
y("YYYYY", Jt, Kt);
|
|
3266
3275
|
y("YYYYYY", Jt, Kt);
|
|
3267
|
-
|
|
3268
|
-
|
|
3276
|
+
$(["YYYYY", "YYYYYY"], te);
|
|
3277
|
+
$("YYYY", function(e, t) {
|
|
3269
3278
|
t[te] = e.length === 2 ? v.parseTwoDigitYear(e) : Y(e);
|
|
3270
3279
|
});
|
|
3271
|
-
|
|
3280
|
+
$("YY", function(e, t) {
|
|
3272
3281
|
t[te] = v.parseTwoDigitYear(e);
|
|
3273
3282
|
});
|
|
3274
|
-
|
|
3283
|
+
$("Y", function(e, t) {
|
|
3275
3284
|
t[te] = parseInt(e, 10);
|
|
3276
3285
|
});
|
|
3277
3286
|
function _t(e) {
|
|
@@ -3281,7 +3290,7 @@ v.parseTwoDigitYear = function(e) {
|
|
|
3281
3290
|
return Y(e) + (Y(e) > 68 ? 1900 : 2e3);
|
|
3282
3291
|
};
|
|
3283
3292
|
var pr = ht("FullYear", !0);
|
|
3284
|
-
function
|
|
3293
|
+
function Ul() {
|
|
3285
3294
|
return tn(this.year());
|
|
3286
3295
|
}
|
|
3287
3296
|
function ht(e, t) {
|
|
@@ -3347,7 +3356,7 @@ function Wl(e) {
|
|
|
3347
3356
|
function Hl(e, t) {
|
|
3348
3357
|
if (typeof e == "object") {
|
|
3349
3358
|
e = Fn(e);
|
|
3350
|
-
var n =
|
|
3359
|
+
var n = Dl(e), s, r = n.length;
|
|
3351
3360
|
for (s = 0; s < r; s++)
|
|
3352
3361
|
this[n[s].unit](e[n[s].unit]);
|
|
3353
3362
|
} else if (e = fe(e), Oe(this[e]))
|
|
@@ -3388,10 +3397,10 @@ y("MMM", function(e, t) {
|
|
|
3388
3397
|
y("MMMM", function(e, t) {
|
|
3389
3398
|
return t.monthsRegex(e);
|
|
3390
3399
|
});
|
|
3391
|
-
|
|
3400
|
+
$(["M", "MM"], function(e, t) {
|
|
3392
3401
|
t[Ee] = Y(e) - 1;
|
|
3393
3402
|
});
|
|
3394
|
-
|
|
3403
|
+
$(["MMM", "MMMM"], function(e, t, n, s) {
|
|
3395
3404
|
var r = n._locale.monthsParse(e, s, n._strict);
|
|
3396
3405
|
r != null ? t[Ee] = r : N(n).invalidMonth = e;
|
|
3397
3406
|
});
|
|
@@ -3439,7 +3448,7 @@ function yr(e, t) {
|
|
|
3439
3448
|
if (typeof t == "string") {
|
|
3440
3449
|
if (/^\d+$/.test(t))
|
|
3441
3450
|
t = Y(t);
|
|
3442
|
-
else if (t = e.localeData().monthsParse(t),
|
|
3451
|
+
else if (t = e.localeData().monthsParse(t), !$e(t))
|
|
3443
3452
|
return e;
|
|
3444
3453
|
}
|
|
3445
3454
|
var n = t, s = e.date();
|
|
@@ -3720,30 +3729,30 @@ y("hmm", hr);
|
|
|
3720
3729
|
y("hmmss", fr);
|
|
3721
3730
|
y("Hmm", hr);
|
|
3722
3731
|
y("Hmmss", fr);
|
|
3723
|
-
|
|
3724
|
-
|
|
3732
|
+
$(["H", "HH"], J);
|
|
3733
|
+
$(["k", "kk"], function(e, t, n) {
|
|
3725
3734
|
var s = Y(e);
|
|
3726
3735
|
t[J] = s === 24 ? 0 : s;
|
|
3727
3736
|
});
|
|
3728
|
-
|
|
3737
|
+
$(["a", "A"], function(e, t, n) {
|
|
3729
3738
|
n._isPm = n._locale.isPM(e), n._meridiem = e;
|
|
3730
3739
|
});
|
|
3731
|
-
|
|
3740
|
+
$(["h", "hh"], function(e, t, n) {
|
|
3732
3741
|
t[J] = Y(e), N(n).bigHour = !0;
|
|
3733
3742
|
});
|
|
3734
|
-
|
|
3743
|
+
$("hmm", function(e, t, n) {
|
|
3735
3744
|
var s = e.length - 2;
|
|
3736
3745
|
t[J] = Y(e.substr(0, s)), t[me] = Y(e.substr(s)), N(n).bigHour = !0;
|
|
3737
3746
|
});
|
|
3738
|
-
|
|
3747
|
+
$("hmmss", function(e, t, n) {
|
|
3739
3748
|
var s = e.length - 4, r = e.length - 2;
|
|
3740
3749
|
t[J] = Y(e.substr(0, s)), t[me] = Y(e.substr(s, 2)), t[Re] = Y(e.substr(r)), N(n).bigHour = !0;
|
|
3741
3750
|
});
|
|
3742
|
-
|
|
3751
|
+
$("Hmm", function(e, t, n) {
|
|
3743
3752
|
var s = e.length - 2;
|
|
3744
3753
|
t[J] = Y(e.substr(0, s)), t[me] = Y(e.substr(s));
|
|
3745
3754
|
});
|
|
3746
|
-
|
|
3755
|
+
$("Hmmss", function(e, t, n) {
|
|
3747
3756
|
var s = e.length - 4, r = e.length - 2;
|
|
3748
3757
|
t[J] = Y(e.substr(0, s)), t[me] = Y(e.substr(s, 2)), t[Re] = Y(e.substr(r));
|
|
3749
3758
|
});
|
|
@@ -3779,7 +3788,7 @@ function Nu(e, t) {
|
|
|
3779
3788
|
function ps(e) {
|
|
3780
3789
|
return e && e.toLowerCase().replace("_", "-");
|
|
3781
3790
|
}
|
|
3782
|
-
function
|
|
3791
|
+
function Iu(e) {
|
|
3783
3792
|
for (var t = 0, n, s, r, a; t < e.length; ) {
|
|
3784
3793
|
for (a = ps(e[t]).split("-"), n = a.length, s = ps(e[t + 1]), s = s ? s.split("-") : null; n > 0; ) {
|
|
3785
3794
|
if (r = nn(a.slice(0, n).join("-")), r)
|
|
@@ -3792,12 +3801,12 @@ function Du(e) {
|
|
|
3792
3801
|
}
|
|
3793
3802
|
return wt;
|
|
3794
3803
|
}
|
|
3795
|
-
function
|
|
3804
|
+
function Du(e) {
|
|
3796
3805
|
return !!(e && e.match("^[^/\\\\]*$"));
|
|
3797
3806
|
}
|
|
3798
3807
|
function nn(e) {
|
|
3799
3808
|
var t = null, n;
|
|
3800
|
-
if (j[e] === void 0 && typeof module < "u" && module && module.exports &&
|
|
3809
|
+
if (j[e] === void 0 && typeof module < "u" && module && module.exports && Du(e))
|
|
3801
3810
|
try {
|
|
3802
3811
|
t = wt._abbr, n = require, n("./locale/" + e), Ve(t);
|
|
3803
3812
|
} catch {
|
|
@@ -3807,7 +3816,7 @@ function nn(e) {
|
|
|
3807
3816
|
}
|
|
3808
3817
|
function Ve(e, t) {
|
|
3809
3818
|
var n;
|
|
3810
|
-
return e && (se(t) ? n =
|
|
3819
|
+
return e && (se(t) ? n = Ue(e) : n = Kn(e, t), n ? wt = n : typeof console < "u" && console.warn && console.warn(
|
|
3811
3820
|
"Locale " + e + " not found. Did you forget to load it?"
|
|
3812
3821
|
)), wt._abbr;
|
|
3813
3822
|
}
|
|
@@ -3843,7 +3852,7 @@ function Yu(e, t) {
|
|
|
3843
3852
|
j[e] != null && (j[e].parentLocale != null ? (j[e] = j[e].parentLocale, e === Ve() && Ve(e)) : j[e] != null && delete j[e]);
|
|
3844
3853
|
return j[e];
|
|
3845
3854
|
}
|
|
3846
|
-
function
|
|
3855
|
+
function Ue(e) {
|
|
3847
3856
|
var t;
|
|
3848
3857
|
if (e && e._locale && e._locale._abbr && (e = e._locale._abbr), !e)
|
|
3849
3858
|
return wt;
|
|
@@ -3852,14 +3861,14 @@ function $e(e) {
|
|
|
3852
3861
|
return t;
|
|
3853
3862
|
e = [e];
|
|
3854
3863
|
}
|
|
3855
|
-
return
|
|
3864
|
+
return Iu(e);
|
|
3856
3865
|
}
|
|
3857
3866
|
function Eu() {
|
|
3858
3867
|
return bn(j);
|
|
3859
3868
|
}
|
|
3860
3869
|
function Xn(e) {
|
|
3861
3870
|
var t, n = e._a;
|
|
3862
|
-
return n && N(e).overflow === -2 && (t = n[Ee] < 0 || n[Ee] > 11 ? Ee : n[ke] < 1 || n[ke] > zn(n[te], n[Ee]) ? ke : n[J] < 0 || n[J] > 24 || n[J] === 24 && (n[me] !== 0 || n[Re] !== 0 || n[Ze] !== 0) ? J : n[me] < 0 || n[me] > 59 ? me : n[Re] < 0 || n[Re] > 59 ? Re : n[Ze] < 0 || n[Ze] > 999 ? Ze : -1, N(e)._overflowDayOfYear && (t < te || t > ke) && (t = ke), N(e)._overflowWeeks && t === -1 && (t = Al), N(e)._overflowWeekday && t === -1 && (t =
|
|
3871
|
+
return n && N(e).overflow === -2 && (t = n[Ee] < 0 || n[Ee] > 11 ? Ee : n[ke] < 1 || n[ke] > zn(n[te], n[Ee]) ? ke : n[J] < 0 || n[J] > 24 || n[J] === 24 && (n[me] !== 0 || n[Re] !== 0 || n[Ze] !== 0) ? J : n[me] < 0 || n[me] > 59 ? me : n[Re] < 0 || n[Re] > 59 ? Re : n[Ze] < 0 || n[Ze] > 999 ? Ze : -1, N(e)._overflowDayOfYear && (t < te || t > ke) && (t = ke), N(e)._overflowWeeks && t === -1 && (t = Al), N(e)._overflowWeekday && t === -1 && (t = $l), N(e).overflow = t), e;
|
|
3863
3872
|
}
|
|
3864
3873
|
var Ru = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, Pu = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, Lu = /Z|[+-]\d\d(?::?\d\d)?/, Rt = [
|
|
3865
3874
|
["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/],
|
|
@@ -3885,7 +3894,7 @@ var Ru = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(
|
|
|
3885
3894
|
["HHmmss", /\d\d\d\d\d\d/],
|
|
3886
3895
|
["HHmm", /\d\d\d\d/],
|
|
3887
3896
|
["HH", /\d\d/]
|
|
3888
|
-
], Au = /^\/?Date\((-?\d+)/i,
|
|
3897
|
+
], Au = /^\/?Date\((-?\d+)/i, $u = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, Uu = {
|
|
3889
3898
|
UT: 0,
|
|
3890
3899
|
GMT: 0,
|
|
3891
3900
|
EDT: -240,
|
|
@@ -3966,14 +3975,14 @@ function Gu(e, t, n) {
|
|
|
3966
3975
|
}
|
|
3967
3976
|
function Vu(e, t, n) {
|
|
3968
3977
|
if (e)
|
|
3969
|
-
return
|
|
3978
|
+
return Uu[e];
|
|
3970
3979
|
if (t)
|
|
3971
3980
|
return 0;
|
|
3972
3981
|
var s = parseInt(n, 10), r = s % 100, a = (s - r) / 100;
|
|
3973
3982
|
return a * 60 + r;
|
|
3974
3983
|
}
|
|
3975
3984
|
function Or(e) {
|
|
3976
|
-
var t =
|
|
3985
|
+
var t = $u.exec(Fu(e._i)), n;
|
|
3977
3986
|
if (t) {
|
|
3978
3987
|
if (n = Wu(
|
|
3979
3988
|
t[4],
|
|
@@ -4078,7 +4087,7 @@ function qu(e) {
|
|
|
4078
4087
|
return;
|
|
4079
4088
|
}
|
|
4080
4089
|
for (r = 0; r < l; r++)
|
|
4081
|
-
a = 0, o = !1, t =
|
|
4090
|
+
a = 0, o = !1, t = Un({}, e), e._useUTC != null && (t._useUTC = e._useUTC), t._f = e._f[r], Qn(t), $n(t) && (o = !0), a += N(t).charsLeftOver, a += N(t).unusedTokens.length * 10, N(t).score = a, i ? a < s && (s = a, n = t) : (s == null || a < s || o) && (s = a, n = t, o && (i = !0));
|
|
4082
4091
|
Fe(e, n || t);
|
|
4083
4092
|
}
|
|
4084
4093
|
function Ku(e) {
|
|
@@ -4098,13 +4107,13 @@ function Xu(e) {
|
|
|
4098
4107
|
}
|
|
4099
4108
|
function Tr(e) {
|
|
4100
4109
|
var t = e._i, n = e._f;
|
|
4101
|
-
return e._locale = e._locale ||
|
|
4110
|
+
return e._locale = e._locale || Ue(e._l), t === null || n === void 0 && t === "" ? qt({ nullInput: !0 }) : (typeof t == "string" && (e._i = t = e._locale.preparse(t)), ge(t) ? new Ct(Xn(t)) : (xt(t) ? e._d = t : ye(n) ? qu(e) : n ? Qn(e) : Ju(e), $n(e) || (e._d = null), e));
|
|
4102
4111
|
}
|
|
4103
4112
|
function Ju(e) {
|
|
4104
4113
|
var t = e._i;
|
|
4105
4114
|
se(t) ? e._d = new Date(v.now()) : xt(t) ? e._d = new Date(t.valueOf()) : typeof t == "string" ? ju(e) : ye(t) ? (e._a = or(t.slice(0), function(n) {
|
|
4106
4115
|
return parseInt(n, 10);
|
|
4107
|
-
}), Jn(e)) : qe(t) ? Ku(e) :
|
|
4116
|
+
}), Jn(e)) : qe(t) ? Ku(e) : $e(t) ? e._d = new Date(t) : v.createFromInputFallback(e);
|
|
4108
4117
|
}
|
|
4109
4118
|
function Nr(e, t, n, s, r) {
|
|
4110
4119
|
var a = {};
|
|
@@ -4126,7 +4135,7 @@ var Qu = he(
|
|
|
4126
4135
|
return this.isValid() && e.isValid() ? e > this ? this : e : qt();
|
|
4127
4136
|
}
|
|
4128
4137
|
);
|
|
4129
|
-
function
|
|
4138
|
+
function Ir(e, t) {
|
|
4130
4139
|
var n, s;
|
|
4131
4140
|
if (t.length === 1 && ye(t[0]) && (t = t[0]), !t.length)
|
|
4132
4141
|
return G();
|
|
@@ -4136,11 +4145,11 @@ function Dr(e, t) {
|
|
|
4136
4145
|
}
|
|
4137
4146
|
function td() {
|
|
4138
4147
|
var e = [].slice.call(arguments, 0);
|
|
4139
|
-
return
|
|
4148
|
+
return Ir("isBefore", e);
|
|
4140
4149
|
}
|
|
4141
4150
|
function nd() {
|
|
4142
4151
|
var e = [].slice.call(arguments, 0);
|
|
4143
|
-
return
|
|
4152
|
+
return Ir("isAfter", e);
|
|
4144
4153
|
}
|
|
4145
4154
|
var sd = function() {
|
|
4146
4155
|
return Date.now ? Date.now() : +/* @__PURE__ */ new Date();
|
|
@@ -4178,7 +4187,7 @@ function sn(e) {
|
|
|
4178
4187
|
var t = Fn(e), n = t.year || 0, s = t.quarter || 0, r = t.month || 0, a = t.week || t.isoWeek || 0, o = t.day || 0, i = t.hour || 0, l = t.minute || 0, u = t.second || 0, d = t.millisecond || 0;
|
|
4179
4188
|
this._isValid = rd(t), this._milliseconds = +d + u * 1e3 + // 1000
|
|
4180
4189
|
l * 6e4 + // 1000 * 60
|
|
4181
|
-
i * 1e3 * 60 * 60, this._days = +o + a * 7, this._months = +r + s * 3 + n * 12, this._data = {}, this._locale =
|
|
4190
|
+
i * 1e3 * 60 * 60, this._days = +o + a * 7, this._months = +r + s * 3 + n * 12, this._data = {}, this._locale = Ue(), this._bubble();
|
|
4182
4191
|
}
|
|
4183
4192
|
function At(e) {
|
|
4184
4193
|
return e instanceof sn;
|
|
@@ -4192,17 +4201,17 @@ function id(e, t, n) {
|
|
|
4192
4201
|
Y(e[o]) !== Y(t[o]) && a++;
|
|
4193
4202
|
return a + r;
|
|
4194
4203
|
}
|
|
4195
|
-
function
|
|
4204
|
+
function Dr(e, t) {
|
|
4196
4205
|
x(e, 0, 0, function() {
|
|
4197
4206
|
var n = this.utcOffset(), s = "+";
|
|
4198
4207
|
return n < 0 && (n = -n, s = "-"), s + xe(~~(n / 60), 2) + t + xe(~~n % 60, 2);
|
|
4199
4208
|
});
|
|
4200
4209
|
}
|
|
4201
|
-
|
|
4202
|
-
|
|
4210
|
+
Dr("Z", ":");
|
|
4211
|
+
Dr("ZZ", "");
|
|
4203
4212
|
y("Z", en);
|
|
4204
4213
|
y("ZZ", en);
|
|
4205
|
-
|
|
4214
|
+
$(["Z", "ZZ"], function(e, t, n) {
|
|
4206
4215
|
n._useUTC = !0, n._tzm = es(en, e);
|
|
4207
4216
|
});
|
|
4208
4217
|
var ld = /([\+\-]|\d\d)/gi;
|
|
@@ -4265,7 +4274,7 @@ function vd() {
|
|
|
4265
4274
|
if (!se(this._isDSTShifted))
|
|
4266
4275
|
return this._isDSTShifted;
|
|
4267
4276
|
var e = {}, t;
|
|
4268
|
-
return
|
|
4277
|
+
return Un(e, this), e = Tr(e), e._a ? (t = e._isUTC ? Ce(e._a) : G(e._a), this._isDSTShifted = this.isValid() && id(e._a, t.toArray()) > 0) : this._isDSTShifted = !1, this._isDSTShifted;
|
|
4269
4278
|
}
|
|
4270
4279
|
function _d() {
|
|
4271
4280
|
return this.isValid() ? !this._isUTC : !1;
|
|
@@ -4283,7 +4292,7 @@ function be(e, t) {
|
|
|
4283
4292
|
ms: e._milliseconds,
|
|
4284
4293
|
d: e._days,
|
|
4285
4294
|
M: e._months
|
|
4286
|
-
} :
|
|
4295
|
+
} : $e(e) || !isNaN(+e) ? (n = {}, t ? n[t] = +e : n.milliseconds = +e) : (s = gd.exec(e)) ? (r = s[1] === "-" ? -1 : 1, n = {
|
|
4287
4296
|
y: 0,
|
|
4288
4297
|
d: Y(s[ke]) * r,
|
|
4289
4298
|
h: Y(s[J]) * r,
|
|
@@ -4336,7 +4345,7 @@ function Pr(e) {
|
|
|
4336
4345
|
return typeof e == "string" || e instanceof String;
|
|
4337
4346
|
}
|
|
4338
4347
|
function Sd(e) {
|
|
4339
|
-
return ge(e) || xt(e) || Pr(e) ||
|
|
4348
|
+
return ge(e) || xt(e) || Pr(e) || $e(e) || Cd(e) || xd(e) || e === null || e === void 0;
|
|
4340
4349
|
}
|
|
4341
4350
|
function xd(e) {
|
|
4342
4351
|
var t = qe(e) && !An(e), n = !1, s = [
|
|
@@ -4372,7 +4381,7 @@ function xd(e) {
|
|
|
4372
4381
|
function Cd(e) {
|
|
4373
4382
|
var t = ye(e), n = !1;
|
|
4374
4383
|
return t && (n = e.filter(function(s) {
|
|
4375
|
-
return
|
|
4384
|
+
return !$e(s) && Pr(e);
|
|
4376
4385
|
}).length === 0), t && n;
|
|
4377
4386
|
}
|
|
4378
4387
|
function Od(e) {
|
|
@@ -4399,10 +4408,10 @@ function Nd(e, t) {
|
|
|
4399
4408
|
a || this.localeData().calendar(r, this, G(n))
|
|
4400
4409
|
);
|
|
4401
4410
|
}
|
|
4402
|
-
function
|
|
4411
|
+
function Id() {
|
|
4403
4412
|
return new Ct(this);
|
|
4404
4413
|
}
|
|
4405
|
-
function
|
|
4414
|
+
function Dd(e, t) {
|
|
4406
4415
|
var n = ge(e) ? e : G(e);
|
|
4407
4416
|
return this.isValid() && n.isValid() ? (t = fe(t) || "millisecond", t === "millisecond" ? this.valueOf() > n.valueOf() : n.valueOf() < this.clone().startOf(t).valueOf()) : !1;
|
|
4408
4417
|
}
|
|
@@ -4432,13 +4441,13 @@ function Ad(e, t, n) {
|
|
|
4432
4441
|
return NaN;
|
|
4433
4442
|
switch (r = (s.utcOffset() - this.utcOffset()) * 6e4, t = fe(t), t) {
|
|
4434
4443
|
case "year":
|
|
4435
|
-
a =
|
|
4444
|
+
a = $t(this, s) / 12;
|
|
4436
4445
|
break;
|
|
4437
4446
|
case "month":
|
|
4438
|
-
a =
|
|
4447
|
+
a = $t(this, s);
|
|
4439
4448
|
break;
|
|
4440
4449
|
case "quarter":
|
|
4441
|
-
a =
|
|
4450
|
+
a = $t(this, s) / 3;
|
|
4442
4451
|
break;
|
|
4443
4452
|
case "second":
|
|
4444
4453
|
a = (this - s) / 1e3;
|
|
@@ -4465,18 +4474,18 @@ function Ad(e, t, n) {
|
|
|
4465
4474
|
}
|
|
4466
4475
|
return n ? a : ue(a);
|
|
4467
4476
|
}
|
|
4468
|
-
function
|
|
4477
|
+
function $t(e, t) {
|
|
4469
4478
|
if (e.date() < t.date())
|
|
4470
|
-
return
|
|
4479
|
+
return -$t(t, e);
|
|
4471
4480
|
var n = (t.year() - e.year()) * 12 + (t.month() - e.month()), s = e.clone().add(n, "months"), r, a;
|
|
4472
4481
|
return t - s < 0 ? (r = e.clone().add(n - 1, "months"), a = (t - s) / (s - r)) : (r = e.clone().add(n + 1, "months"), a = (t - s) / (r - s)), -(n + a) || 0;
|
|
4473
4482
|
}
|
|
4474
4483
|
v.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ";
|
|
4475
4484
|
v.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]";
|
|
4476
|
-
function
|
|
4485
|
+
function $d() {
|
|
4477
4486
|
return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ");
|
|
4478
4487
|
}
|
|
4479
|
-
function
|
|
4488
|
+
function Ud(e) {
|
|
4480
4489
|
if (!this.isValid())
|
|
4481
4490
|
return null;
|
|
4482
4491
|
var t = e !== !0, n = t ? this.clone().utc() : this;
|
|
@@ -4513,7 +4522,7 @@ function jd(e) {
|
|
|
4513
4522
|
}
|
|
4514
4523
|
function Lr(e) {
|
|
4515
4524
|
var t;
|
|
4516
|
-
return e === void 0 ? this._locale._abbr : (t =
|
|
4525
|
+
return e === void 0 ? this._locale._abbr : (t = Ue(e), t != null && (this._locale = t), this);
|
|
4517
4526
|
}
|
|
4518
4527
|
var Ar = he(
|
|
4519
4528
|
"moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",
|
|
@@ -4521,18 +4530,18 @@ var Ar = he(
|
|
|
4521
4530
|
return e === void 0 ? this.localeData() : this.locale(e);
|
|
4522
4531
|
}
|
|
4523
4532
|
);
|
|
4524
|
-
function
|
|
4533
|
+
function $r() {
|
|
4525
4534
|
return this._locale;
|
|
4526
4535
|
}
|
|
4527
|
-
var Ft = 1e3, ot = 60 * Ft, Gt = 60 * ot,
|
|
4536
|
+
var Ft = 1e3, ot = 60 * Ft, Gt = 60 * ot, Ur = (365 * 400 + 97) * 24 * Gt;
|
|
4528
4537
|
function it(e, t) {
|
|
4529
4538
|
return (e % t + t) % t;
|
|
4530
4539
|
}
|
|
4531
4540
|
function Wr(e, t, n) {
|
|
4532
|
-
return e < 100 && e >= 0 ? new Date(e + 400, t, n) -
|
|
4541
|
+
return e < 100 && e >= 0 ? new Date(e + 400, t, n) - Ur : new Date(e, t, n).valueOf();
|
|
4533
4542
|
}
|
|
4534
4543
|
function Hr(e, t, n) {
|
|
4535
|
-
return e < 100 && e >= 0 ? Date.UTC(e + 400, t, n) -
|
|
4544
|
+
return e < 100 && e >= 0 ? Date.UTC(e + 400, t, n) - Ur : Date.UTC(e, t, n);
|
|
4536
4545
|
}
|
|
4537
4546
|
function zd(e) {
|
|
4538
4547
|
var t, n;
|
|
@@ -4673,7 +4682,7 @@ function Qd() {
|
|
|
4673
4682
|
return this.isValid() ? this.toISOString() : null;
|
|
4674
4683
|
}
|
|
4675
4684
|
function ec() {
|
|
4676
|
-
return
|
|
4685
|
+
return $n(this);
|
|
4677
4686
|
}
|
|
4678
4687
|
function tc() {
|
|
4679
4688
|
return Fe({}, N(this));
|
|
@@ -4704,7 +4713,7 @@ y("NN", ns);
|
|
|
4704
4713
|
y("NNN", ns);
|
|
4705
4714
|
y("NNNN", pc);
|
|
4706
4715
|
y("NNNNN", mc);
|
|
4707
|
-
|
|
4716
|
+
$(
|
|
4708
4717
|
["N", "NN", "NNN", "NNNN", "NNNNN"],
|
|
4709
4718
|
function(e, t, n, s) {
|
|
4710
4719
|
var r = n._locale.erasParse(e, s, n._strict);
|
|
@@ -4716,13 +4725,13 @@ y("yy", dt);
|
|
|
4716
4725
|
y("yyy", dt);
|
|
4717
4726
|
y("yyyy", dt);
|
|
4718
4727
|
y("yo", vc);
|
|
4719
|
-
|
|
4720
|
-
|
|
4728
|
+
$(["y", "yy", "yyy", "yyyy"], te);
|
|
4729
|
+
$(["yo"], function(e, t, n, s) {
|
|
4721
4730
|
var r;
|
|
4722
4731
|
n._locale._eraYearOrdinalRegex && (r = e.match(n._locale._eraYearOrdinalRegex)), n._locale.eraYearOrdinalParse ? t[te] = n._locale.eraYearOrdinalParse(e, r) : t[te] = parseInt(e, 10);
|
|
4723
4732
|
});
|
|
4724
4733
|
function rc(e, t) {
|
|
4725
|
-
var n, s, r, a = this._eras ||
|
|
4734
|
+
var n, s, r, a = this._eras || Ue("en")._eras;
|
|
4726
4735
|
for (n = 0, s = a.length; n < s; ++n)
|
|
4727
4736
|
switch (typeof a[n].since === "string" && (r = v(a[n].since).startOf("day"), a[n].since = r.valueOf()), typeof a[n].until) {
|
|
4728
4737
|
case "undefined":
|
|
@@ -4893,7 +4902,7 @@ function Mc(e, t, n, s, r) {
|
|
|
4893
4902
|
}
|
|
4894
4903
|
x("Q", 0, "Qo", "quarter");
|
|
4895
4904
|
y("Q", dr);
|
|
4896
|
-
|
|
4905
|
+
$("Q", function(e, t) {
|
|
4897
4906
|
t[Ee] = (Y(e) - 1) * 3;
|
|
4898
4907
|
});
|
|
4899
4908
|
function Sc(e) {
|
|
@@ -4905,15 +4914,15 @@ y("DD", V, ie);
|
|
|
4905
4914
|
y("Do", function(e, t) {
|
|
4906
4915
|
return e ? t._dayOfMonthOrdinalParse || t._ordinalParse : t._dayOfMonthOrdinalParseLenient;
|
|
4907
4916
|
});
|
|
4908
|
-
|
|
4909
|
-
|
|
4917
|
+
$(["D", "DD"], ke);
|
|
4918
|
+
$("Do", function(e, t) {
|
|
4910
4919
|
t[ke] = Y(e.match(V)[0]);
|
|
4911
4920
|
});
|
|
4912
4921
|
var Gr = ht("Date", !0);
|
|
4913
4922
|
x("DDD", ["DDDD", 3], "DDDo", "dayOfYear");
|
|
4914
4923
|
y("DDD", Xt);
|
|
4915
4924
|
y("DDDD", cr);
|
|
4916
|
-
|
|
4925
|
+
$(["DDD", "DDDD"], function(e, t, n) {
|
|
4917
4926
|
n._dayOfYear = Y(e);
|
|
4918
4927
|
});
|
|
4919
4928
|
function xc(e) {
|
|
@@ -4925,12 +4934,12 @@ function xc(e) {
|
|
|
4925
4934
|
x("m", ["mm", 2], 0, "minute");
|
|
4926
4935
|
y("m", V, jn);
|
|
4927
4936
|
y("mm", V, ie);
|
|
4928
|
-
|
|
4937
|
+
$(["m", "mm"], me);
|
|
4929
4938
|
var Cc = ht("Minutes", !1);
|
|
4930
4939
|
x("s", ["ss", 2], 0, "second");
|
|
4931
4940
|
y("s", V, jn);
|
|
4932
4941
|
y("ss", V, ie);
|
|
4933
|
-
|
|
4942
|
+
$(["s", "ss"], Re);
|
|
4934
4943
|
var Oc = ht("Seconds", !1);
|
|
4935
4944
|
x("S", 0, 0, function() {
|
|
4936
4945
|
return ~~(this.millisecond() / 100);
|
|
@@ -4967,20 +4976,20 @@ function Tc(e, t) {
|
|
|
4967
4976
|
t[Ze] = Y(("0." + e) * 1e3);
|
|
4968
4977
|
}
|
|
4969
4978
|
for (Ge = "S"; Ge.length <= 9; Ge += "S")
|
|
4970
|
-
|
|
4979
|
+
$(Ge, Tc);
|
|
4971
4980
|
Vr = ht("Milliseconds", !1);
|
|
4972
4981
|
x("z", 0, 0, "zoneAbbr");
|
|
4973
4982
|
x("zz", 0, 0, "zoneName");
|
|
4974
4983
|
function Nc() {
|
|
4975
4984
|
return this._isUTC ? "UTC" : "";
|
|
4976
4985
|
}
|
|
4977
|
-
function
|
|
4986
|
+
function Ic() {
|
|
4978
4987
|
return this._isUTC ? "Coordinated Universal Time" : "";
|
|
4979
4988
|
}
|
|
4980
4989
|
var c = Ct.prototype;
|
|
4981
4990
|
c.add = kd;
|
|
4982
4991
|
c.calendar = Nd;
|
|
4983
|
-
c.clone =
|
|
4992
|
+
c.clone = Id;
|
|
4984
4993
|
c.diff = Ad;
|
|
4985
4994
|
c.endOf = Bd;
|
|
4986
4995
|
c.format = Hd;
|
|
@@ -4990,7 +4999,7 @@ c.to = Vd;
|
|
|
4990
4999
|
c.toNow = jd;
|
|
4991
5000
|
c.get = Wl;
|
|
4992
5001
|
c.invalidAt = nc;
|
|
4993
|
-
c.isAfter =
|
|
5002
|
+
c.isAfter = Dd;
|
|
4994
5003
|
c.isBefore = Yd;
|
|
4995
5004
|
c.isBetween = Ed;
|
|
4996
5005
|
c.isSame = Rd;
|
|
@@ -4999,7 +5008,7 @@ c.isSameOrBefore = Ld;
|
|
|
4999
5008
|
c.isValid = ec;
|
|
5000
5009
|
c.lang = Ar;
|
|
5001
5010
|
c.locale = Lr;
|
|
5002
|
-
c.localeData =
|
|
5011
|
+
c.localeData = $r;
|
|
5003
5012
|
c.max = ed;
|
|
5004
5013
|
c.min = Qu;
|
|
5005
5014
|
c.parsingFlags = tc;
|
|
@@ -5009,13 +5018,13 @@ c.subtract = Md;
|
|
|
5009
5018
|
c.toArray = Xd;
|
|
5010
5019
|
c.toObject = Jd;
|
|
5011
5020
|
c.toDate = Kd;
|
|
5012
|
-
c.toISOString =
|
|
5021
|
+
c.toISOString = Ud;
|
|
5013
5022
|
c.inspect = Wd;
|
|
5014
5023
|
typeof Symbol < "u" && Symbol.for != null && (c[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")] = function() {
|
|
5015
5024
|
return "Moment<" + this.format() + ">";
|
|
5016
5025
|
});
|
|
5017
5026
|
c.toJSON = Qd;
|
|
5018
|
-
c.toString =
|
|
5027
|
+
c.toString = $d;
|
|
5019
5028
|
c.unix = qd;
|
|
5020
5029
|
c.valueOf = Zd;
|
|
5021
5030
|
c.creationData = sc;
|
|
@@ -5024,7 +5033,7 @@ c.eraNarrow = lc;
|
|
|
5024
5033
|
c.eraAbbr = uc;
|
|
5025
5034
|
c.eraYear = dc;
|
|
5026
5035
|
c.year = pr;
|
|
5027
|
-
c.isLeapYear =
|
|
5036
|
+
c.isLeapYear = Ul;
|
|
5028
5037
|
c.weekYear = _c;
|
|
5029
5038
|
c.isoWeekYear = yc;
|
|
5030
5039
|
c.quarter = c.quarters = Sc;
|
|
@@ -5056,7 +5065,7 @@ c.isUtcOffset = yd;
|
|
|
5056
5065
|
c.isUtc = Yr;
|
|
5057
5066
|
c.isUTC = Yr;
|
|
5058
5067
|
c.zoneAbbr = Nc;
|
|
5059
|
-
c.zoneName =
|
|
5068
|
+
c.zoneName = Ic;
|
|
5060
5069
|
c.dates = he(
|
|
5061
5070
|
"dates accessor is deprecated. Use date instead.",
|
|
5062
5071
|
Gr
|
|
@@ -5077,7 +5086,7 @@ c.isDSTShifted = he(
|
|
|
5077
5086
|
"isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",
|
|
5078
5087
|
vd
|
|
5079
5088
|
);
|
|
5080
|
-
function
|
|
5089
|
+
function Dc(e) {
|
|
5081
5090
|
return G(e * 1e3);
|
|
5082
5091
|
}
|
|
5083
5092
|
function Yc() {
|
|
@@ -5120,11 +5129,11 @@ L.weekdaysMinRegex = Mu;
|
|
|
5120
5129
|
L.isPM = xu;
|
|
5121
5130
|
L.meridiem = Tu;
|
|
5122
5131
|
function Vt(e, t, n, s) {
|
|
5123
|
-
var r =
|
|
5132
|
+
var r = Ue(), a = Ce().set(s, t);
|
|
5124
5133
|
return r[n](a, e);
|
|
5125
5134
|
}
|
|
5126
5135
|
function zr(e, t, n) {
|
|
5127
|
-
if (
|
|
5136
|
+
if ($e(e) && (t = e, e = void 0), e = e || "", t != null)
|
|
5128
5137
|
return Vt(e, t, n, "month");
|
|
5129
5138
|
var s, r = [];
|
|
5130
5139
|
for (s = 0; s < 12; s++)
|
|
@@ -5132,8 +5141,8 @@ function zr(e, t, n) {
|
|
|
5132
5141
|
return r;
|
|
5133
5142
|
}
|
|
5134
5143
|
function rs(e, t, n, s) {
|
|
5135
|
-
typeof e == "boolean" ? (
|
|
5136
|
-
var r =
|
|
5144
|
+
typeof e == "boolean" ? ($e(t) && (n = t, t = void 0), t = t || "") : (t = e, n = t, e = !1, $e(t) && (n = t, t = void 0), t = t || "");
|
|
5145
|
+
var r = Ue(), a = e ? r._week.dow : 0, o, i = [];
|
|
5137
5146
|
if (n != null)
|
|
5138
5147
|
return Vt(t, (n + a) % 7, s, "day");
|
|
5139
5148
|
for (o = 0; o < 7; o++)
|
|
@@ -5186,18 +5195,18 @@ v.lang = he(
|
|
|
5186
5195
|
);
|
|
5187
5196
|
v.langData = he(
|
|
5188
5197
|
"moment.langData is deprecated. Use moment.localeData instead.",
|
|
5189
|
-
|
|
5198
|
+
Ue
|
|
5190
5199
|
);
|
|
5191
|
-
var
|
|
5192
|
-
function
|
|
5200
|
+
var Ie = Math.abs;
|
|
5201
|
+
function $c() {
|
|
5193
5202
|
var e = this._data;
|
|
5194
|
-
return this._milliseconds =
|
|
5203
|
+
return this._milliseconds = Ie(this._milliseconds), this._days = Ie(this._days), this._months = Ie(this._months), e.milliseconds = Ie(e.milliseconds), e.seconds = Ie(e.seconds), e.minutes = Ie(e.minutes), e.hours = Ie(e.hours), e.months = Ie(e.months), e.years = Ie(e.years), this;
|
|
5195
5204
|
}
|
|
5196
5205
|
function Br(e, t, n, s) {
|
|
5197
5206
|
var r = be(t, n);
|
|
5198
5207
|
return e._milliseconds += s * r._milliseconds, e._days += s * r._days, e._months += s * r._months, e._bubble();
|
|
5199
5208
|
}
|
|
5200
|
-
function
|
|
5209
|
+
function Uc(e, t) {
|
|
5201
5210
|
return Br(this, e, t, 1);
|
|
5202
5211
|
}
|
|
5203
5212
|
function Wc(e, t) {
|
|
@@ -5269,7 +5278,7 @@ var eh = Qe("milliseconds"), th = Qe("seconds"), nh = Qe("minutes"), sh = Qe("ho
|
|
|
5269
5278
|
function ih() {
|
|
5270
5279
|
return ue(this.days() / 7);
|
|
5271
5280
|
}
|
|
5272
|
-
var
|
|
5281
|
+
var De = Math.round, rt = {
|
|
5273
5282
|
ss: 44,
|
|
5274
5283
|
// a few seconds to seconds
|
|
5275
5284
|
s: 45,
|
|
@@ -5289,11 +5298,11 @@ function lh(e, t, n, s, r) {
|
|
|
5289
5298
|
return r.relativeTime(t || 1, !!n, e, s);
|
|
5290
5299
|
}
|
|
5291
5300
|
function uh(e, t, n, s) {
|
|
5292
|
-
var r = be(e).abs(), a =
|
|
5301
|
+
var r = be(e).abs(), a = De(r.as("s")), o = De(r.as("m")), i = De(r.as("h")), l = De(r.as("d")), u = De(r.as("M")), d = De(r.as("w")), _ = De(r.as("y")), f = a <= n.ss && ["s", a] || a < n.s && ["ss", a] || o <= 1 && ["m"] || o < n.m && ["mm", o] || i <= 1 && ["h"] || i < n.h && ["hh", i] || l <= 1 && ["d"] || l < n.d && ["dd", l];
|
|
5293
5302
|
return n.w != null && (f = f || d <= 1 && ["w"] || d < n.w && ["ww", d]), f = f || u <= 1 && ["M"] || u < n.M && ["MM", u] || _ <= 1 && ["y"] || ["yy", _], f[2] = t, f[3] = +e > 0, f[4] = s, lh.apply(null, f);
|
|
5294
5303
|
}
|
|
5295
5304
|
function dh(e) {
|
|
5296
|
-
return e === void 0 ?
|
|
5305
|
+
return e === void 0 ? De : typeof e == "function" ? (De = e, !0) : !1;
|
|
5297
5306
|
}
|
|
5298
5307
|
function ch(e, t) {
|
|
5299
5308
|
return rt[e] === void 0 ? !1 : t === void 0 ? rt[e] : (rt[e] = t, e === "s" && (rt.ss = t - 1), !0);
|
|
@@ -5316,8 +5325,8 @@ function an() {
|
|
|
5316
5325
|
}
|
|
5317
5326
|
var E = sn.prototype;
|
|
5318
5327
|
E.isValid = ad;
|
|
5319
|
-
E.abs =
|
|
5320
|
-
E.add =
|
|
5328
|
+
E.abs = $c;
|
|
5329
|
+
E.add = Uc;
|
|
5321
5330
|
E.subtract = Wc;
|
|
5322
5331
|
E.as = Fc;
|
|
5323
5332
|
E.asMilliseconds = qr;
|
|
@@ -5346,7 +5355,7 @@ E.toISOString = an;
|
|
|
5346
5355
|
E.toString = an;
|
|
5347
5356
|
E.toJSON = an;
|
|
5348
5357
|
E.locale = Lr;
|
|
5349
|
-
E.localeData =
|
|
5358
|
+
E.localeData = $r;
|
|
5350
5359
|
E.toIsoString = he(
|
|
5351
5360
|
"toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",
|
|
5352
5361
|
an
|
|
@@ -5356,10 +5365,10 @@ x("X", 0, 0, "unix");
|
|
|
5356
5365
|
x("x", 0, 0, "valueOf");
|
|
5357
5366
|
y("x", Qt);
|
|
5358
5367
|
y("X", El);
|
|
5359
|
-
|
|
5368
|
+
$("X", function(e, t, n) {
|
|
5360
5369
|
n._d = new Date(parseFloat(e) * 1e3);
|
|
5361
5370
|
});
|
|
5362
|
-
|
|
5371
|
+
$("x", function(e, t, n) {
|
|
5363
5372
|
n._d = new Date(Y(e));
|
|
5364
5373
|
});
|
|
5365
5374
|
v.version = "2.30.1";
|
|
@@ -5369,7 +5378,7 @@ v.min = td;
|
|
|
5369
5378
|
v.max = nd;
|
|
5370
5379
|
v.now = sd;
|
|
5371
5380
|
v.utc = Ce;
|
|
5372
|
-
v.unix =
|
|
5381
|
+
v.unix = Dc;
|
|
5373
5382
|
v.months = Ec;
|
|
5374
5383
|
v.isDate = xt;
|
|
5375
5384
|
v.locale = Ve;
|
|
@@ -5378,7 +5387,7 @@ v.duration = be;
|
|
|
5378
5387
|
v.isMoment = ge;
|
|
5379
5388
|
v.weekdays = Pc;
|
|
5380
5389
|
v.parseZone = Yc;
|
|
5381
|
-
v.localeData =
|
|
5390
|
+
v.localeData = Ue;
|
|
5382
5391
|
v.isDuration = At;
|
|
5383
5392
|
v.monthsShort = Rc;
|
|
5384
5393
|
v.weekdaysMin = Ac;
|
|
@@ -5472,7 +5481,7 @@ const fh = "code-graph", ph = (e, t = "", n = "json") => {
|
|
|
5472
5481
|
}, s = {
|
|
5473
5482
|
command: Jr,
|
|
5474
5483
|
title: "Toggle minimap",
|
|
5475
|
-
icon: z(() => e.enableMinimap ?
|
|
5484
|
+
icon: z(() => e.enableMinimap ? $s : As)
|
|
5476
5485
|
}, r = {
|
|
5477
5486
|
command: Qr,
|
|
5478
5487
|
title: "Toggle palette",
|
|
@@ -5506,7 +5515,7 @@ function bh(e) {
|
|
|
5506
5515
|
}, e.newGraph = () => {
|
|
5507
5516
|
e.engine?.pause(), e.displayedGraph.clear(), e.commandHandler.executeCommand(He.CLEAR_CLIPBOARD_COMMAND), e.commandHandler.executeCommand(He.CLEAR_HISTORY_COMMAND), e.displayedGraph.id = Xe(), e.engine?.resume(), e.engine?.runOnce({});
|
|
5508
5517
|
}, e.subscribe = () => {
|
|
5509
|
-
e.displayedGraph.
|
|
5518
|
+
e.displayedGraph.events.addConnection.subscribe(t, (n) => {
|
|
5510
5519
|
const s = e.displayedGraph.findNodeById(n.to.nodeId);
|
|
5511
5520
|
s && s.isCodeNode && s.onConnected();
|
|
5512
5521
|
const r = e.displayedGraph.findNodeById(n.from.nodeId);
|
|
@@ -5517,7 +5526,7 @@ function bh(e) {
|
|
|
5517
5526
|
const r = e.displayedGraph.findNodeById(n.from.nodeId);
|
|
5518
5527
|
r && r.isCodeNode && r.onUnconnected();
|
|
5519
5528
|
}), e.engine?.events.beforeRun.subscribe(t, () => {
|
|
5520
|
-
e.
|
|
5529
|
+
e.engine?.pause(), e.displayedGraph.beforeRun(), e.displayedGraph.sortNodesByRank(), e.displayedGraph.sortNodes(), e.engine?.resume();
|
|
5521
5530
|
}), e.engine?.events.afterRun.subscribe(t, (n) => {
|
|
5522
5531
|
e.engine?.pause(), Ts(n, e.editor), e.code.state.lockCode || e.code.renderCode({
|
|
5523
5532
|
nodes: e.editor.graph.scriptedCodeNodes,
|
|
@@ -5560,18 +5569,18 @@ function kh(e, t, n) {
|
|
|
5560
5569
|
(O) => !d.includes(O.from) && u.includes(O.to)
|
|
5561
5570
|
), f = o.connections.filter(
|
|
5562
5571
|
(O) => d.includes(O.from) && !u.includes(O.to)
|
|
5563
|
-
),
|
|
5572
|
+
), I = o.connections.filter(
|
|
5564
5573
|
(O) => d.includes(O.from) && u.includes(O.to)
|
|
5565
|
-
), g = l.map((O) => O.save()), C =
|
|
5574
|
+
), g = l.map((O) => O.save()), C = I.map((O) => ({
|
|
5566
5575
|
id: O.id,
|
|
5567
5576
|
from: O.from.id,
|
|
5568
5577
|
to: O.to.id
|
|
5569
|
-
})), h = /* @__PURE__ */ new Map(), { xLeft: b, xRight:
|
|
5578
|
+
})), h = /* @__PURE__ */ new Map(), { xLeft: b, xRight: U, yTop: A } = Mh(l);
|
|
5570
5579
|
for (const [O, Q] of _.entries()) {
|
|
5571
5580
|
const ne = new ta();
|
|
5572
5581
|
ne.inputs.name.value = Q.to.name, g.push({
|
|
5573
5582
|
...ne.save(),
|
|
5574
|
-
position: { x:
|
|
5583
|
+
position: { x: U - a.value.settings.nodes.defaultWidth - 100, y: A + O * 200 }
|
|
5575
5584
|
}), C.push({ id: Xe(), from: ne.outputs.placeholder.id, to: Q.to.id }), h.set(Q.to.id, ne.graphInterfaceId);
|
|
5576
5585
|
}
|
|
5577
5586
|
for (const [O, Q] of f.entries()) {
|
|
@@ -5671,6 +5680,21 @@ class Sh extends Aa {
|
|
|
5671
5680
|
super._loading = !1;
|
|
5672
5681
|
}
|
|
5673
5682
|
}
|
|
5683
|
+
/**
|
|
5684
|
+
* Register a new node type.
|
|
5685
|
+
* @param nodeType Actual type / constructor of the node
|
|
5686
|
+
* @param options Optionally specify a title and/or a category for this node
|
|
5687
|
+
*/
|
|
5688
|
+
registerNodeType(t, n) {
|
|
5689
|
+
if (this.events.beforeRegisterNodeType.emit({ type: t, options: n }).prevented) return;
|
|
5690
|
+
const s = new t();
|
|
5691
|
+
this.nodeTypes.set(s.type, {
|
|
5692
|
+
type: t,
|
|
5693
|
+
category: n?.category ?? "default",
|
|
5694
|
+
title: n?.title ?? s.title,
|
|
5695
|
+
orderRank: n?.orderRank
|
|
5696
|
+
}), this.events.registerNodeType.emit({ type: t, options: n });
|
|
5697
|
+
}
|
|
5674
5698
|
/**
|
|
5675
5699
|
* Register category module
|
|
5676
5700
|
* @param category string
|
|
@@ -5688,7 +5712,7 @@ function Xh(e) {
|
|
|
5688
5712
|
renderNode: new is(null),
|
|
5689
5713
|
/** Called whenever an interface is rendered */
|
|
5690
5714
|
renderInterface: new is(null)
|
|
5691
|
-
},
|
|
5715
|
+
}, I = Ae({
|
|
5692
5716
|
clipboard: _,
|
|
5693
5717
|
code: t,
|
|
5694
5718
|
commandHandler: u,
|
|
@@ -5705,16 +5729,16 @@ function Xh(e) {
|
|
|
5705
5729
|
settings: l,
|
|
5706
5730
|
switchGraph: o
|
|
5707
5731
|
});
|
|
5708
|
-
return t.value.registerViewModel(
|
|
5732
|
+
return t.value.registerViewModel(I), bh(I), xa(a, u), kh(a, u, o), Ca(a, u), Oa(a, u, o), Ta(a, u), Na(a, u, l), _h(a, u, l), yh(l), bs(
|
|
5709
5733
|
n,
|
|
5710
5734
|
(g, C) => {
|
|
5711
5735
|
C && (C.events.registerGraph.unsubscribe(s), C.graphEvents.beforeAddNode.unsubscribe(s), g.nodeHooks.beforeLoad.unsubscribe(s), g.nodeHooks.afterSave.unsubscribe(s), g.graphTemplateHooks.beforeLoad.unsubscribe(s), g.graphTemplateHooks.afterSave.unsubscribe(s), g.graph.hooks.load.unsubscribe(s), g.graph.hooks.save.unsubscribe(s)), g && (g.nodeHooks.beforeLoad.subscribe(s, (h, b) => (b.position = h.position ?? { x: 0, y: 0 }, b.state && (b.state.integrated = h.integrated, h.props && (b.state.props = h.props), h.variableName && (b.state.variableName = h.variableName)), h)), g.nodeHooks.afterSave.subscribe(s, (h, b) => (h.position = b.position, b.state && (h.integrated = b.state.integrated, b.state.props && (h.props = b.state.props), b.state.variableName && (h.variableName = b.state.variableName)), h)), g.graphTemplateHooks.beforeLoad.subscribe(s, (h, b) => (b.panning = h.panning, b.scaling = h.scaling, h)), g.graphTemplateHooks.afterSave.subscribe(s, (h, b) => (h.panning = b.panning, h.scaling = b.scaling, h)), g.graph.hooks.load.subscribe(s, (h, b) => (b.panning = h.panning, b.scaling = h.scaling, h)), g.graph.hooks.save.subscribe(s, (h, b) => (h.panning = b.panning, h.scaling = b.scaling, h)), g.graphEvents.beforeAddNode.subscribe(
|
|
5712
5736
|
s,
|
|
5713
|
-
(h) =>
|
|
5737
|
+
(h) => Ia(h, { defaultWidth: l.nodes.defaultWidth })
|
|
5714
5738
|
), n.value.registerNodeType(ta, { category: "Subgraphs" }), n.value.registerNodeType(na, { category: "Subgraphs" }), o(g.graph));
|
|
5715
5739
|
},
|
|
5716
5740
|
{ immediate: !0 }
|
|
5717
|
-
), Ms(() =>
|
|
5741
|
+
), Ms(() => I.isReady = !0), I;
|
|
5718
5742
|
}
|
|
5719
5743
|
export {
|
|
5720
5744
|
Bs as AbstractCodeNode,
|
|
@@ -5727,7 +5751,7 @@ export {
|
|
|
5727
5751
|
sr as CodeGraphInputNode,
|
|
5728
5752
|
rr as CodeGraphOutputNode,
|
|
5729
5753
|
Zt as CodeGraphTemplate,
|
|
5730
|
-
|
|
5754
|
+
Dn as CodeNode,
|
|
5731
5755
|
Mt as CodeNodeInputInterface,
|
|
5732
5756
|
oe as CodeNodeInterface,
|
|
5733
5757
|
Yn as CodeNodeInterfaceComponent,
|
|
@@ -5738,7 +5762,7 @@ export {
|
|
|
5738
5762
|
ds as GRAPH_OUTPUT_NODE_TYPE,
|
|
5739
5763
|
Qs as IntegerInterface,
|
|
5740
5764
|
zh as JavascriptCode,
|
|
5741
|
-
|
|
5765
|
+
Uh as ListInputInterface,
|
|
5742
5766
|
Ln as NODE_DEFAULT_WITH,
|
|
5743
5767
|
nl as NumberInterface,
|
|
5744
5768
|
jh as PythonCode,
|
|
@@ -5754,7 +5778,7 @@ export {
|
|
|
5754
5778
|
Hh as TextareaInputInterface,
|
|
5755
5779
|
Fh as TupleInputInterface,
|
|
5756
5780
|
ea as UPLOAD_EDITOR_STATE_COMMAND,
|
|
5757
|
-
|
|
5781
|
+
$h as addDefaultInterfaceTypes,
|
|
5758
5782
|
Kh as allowMultipleConnections,
|
|
5759
5783
|
Zs as booleanType,
|
|
5760
5784
|
Ah as components,
|