@babsey/code-graph 0.8.4 → 0.8.6
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/.vscode/extensions.json +3 -0
- package/dist/code-graph.js +445 -444
- package/dist/code-graph.umd.cjs +4 -4
- package/package.json +1 -1
package/dist/code-graph.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createElementBlock as k, openBlock as m, createElementVNode as f, createStaticVNode as Gt, defineComponent as ce, toRef as Sn, ref as
|
|
1
|
+
import { createElementBlock as k, openBlock as m, createElementVNode as f, createStaticVNode as Gt, defineComponent as ce, toRef as Sn, ref as ie, createVNode as X, unref as H, mergeModels as rs, useModel as na, resolveComponent as _s, createCommentVNode as K, onMounted as xn, onBeforeUnmount as ys, watch as gs, createBlock as ue, withCtx as Ye, normalizeProps as sa, guardReactiveProps as ra, renderSlot as Me, mergeProps as aa, toDisplayString as te, computed as z, onUpdated as bs, normalizeStyle as On, normalizeClass as je, withModifiers as st, withDirectives as Vt, Fragment as ae, createTextVNode as ws, withKeys as hn, vModelText as jt, renderList as Ke, nextTick as ks, resolveDynamicComponent as as, inject as ia, Transition as oa, reactive as Ae, markRaw as he, shallowReadonly as la } from "vue";
|
|
2
2
|
import { BaklavaEditor as ua, Components as fn, useViewModel as kt, useGraph as Cn, useTemporaryConnection as da, useTransform as ca, useNodeCategories as ha, displayInSidebar as Ms, CheckboxInterfaceComponent as fa, IntegerInterfaceComponent as pa, TextInputInterfaceComponent as Ss, NumberInterfaceComponent as ma, SelectInterfaceComponent as va, SliderInterfaceComponent as _a, TextareaInputInterfaceComponent as ya, Commands as He, DEFAULT_TOOLBAR_COMMANDS as ga, TextInputInterface as xs, DEFAULT_SETTINGS as ba, useCommandHandler as wa, useHistory as ka, useClipboard as Ma, registerDeleteNodesCommand as Sa, registerSaveSubgraphCommand as xa, registerSwitchToMainGraphCommand as Oa, registerSidebarCommands as Ca, registerZoomToFitCommands as Ta, setViewNodeProperties as Na } from "@baklavajs/renderer-vue";
|
|
3
3
|
import { GRAPH_NODE_TYPE_PREFIX as Da, AbstractNode as Ia, NodeInterface as Se, Graph as Ya, getGraphNodeTypeString as Os, GraphTemplate as Ea, GRAPH_INPUT_NODE_TYPE as Ra, GRAPH_OUTPUT_NODE_TYPE as Pa, Editor as La } from "@baklavajs/core";
|
|
4
4
|
import { usePointer as Aa } from "@vueuse/core";
|
|
@@ -7,7 +7,7 @@ import { v4 as Xe } from "uuid";
|
|
|
7
7
|
import { NodeInterfaceType as Je, BaklavaInterfaceTypes as Ua, setType as ne } from "@baklavajs/interface-types";
|
|
8
8
|
import { allowMultipleConnections as lt, BaseEngine as $a, sortTopologically as Wa, applyResult as Cs } from "@baklavajs/engine";
|
|
9
9
|
import Ha from "toposort";
|
|
10
|
-
import { SequentialHook as
|
|
10
|
+
import { SequentialHook as is } from "@baklavajs/events";
|
|
11
11
|
const q = (e, t) => {
|
|
12
12
|
const n = e.__vccOpts || e;
|
|
13
13
|
for (const [s, r] of t)
|
|
@@ -104,7 +104,7 @@ function Qa(e, t) {
|
|
|
104
104
|
f("path", { d: "M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1)
|
|
105
105
|
])]);
|
|
106
106
|
}
|
|
107
|
-
const Is = /* @__PURE__ */ q(Xa, [["render", Qa]]),
|
|
107
|
+
const Is = /* @__PURE__ */ q(Xa, [["render", Qa]]), ei = {}, ti = {
|
|
108
108
|
xmlns: "http://www.w3.org/2000/svg",
|
|
109
109
|
width: "24",
|
|
110
110
|
height: "24",
|
|
@@ -116,8 +116,8 @@ const Is = /* @__PURE__ */ q(Xa, [["render", Qa]]), eo = {}, to = {
|
|
|
116
116
|
"stroke-linejoin": "round",
|
|
117
117
|
class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-download"
|
|
118
118
|
};
|
|
119
|
-
function
|
|
120
|
-
return m(), k("svg",
|
|
119
|
+
function ni(e, t) {
|
|
120
|
+
return m(), k("svg", ti, [...t[0] || (t[0] = [
|
|
121
121
|
f("path", {
|
|
122
122
|
stroke: "none",
|
|
123
123
|
d: "M0 0h24v24H0z",
|
|
@@ -128,7 +128,7 @@ function no(e, t) {
|
|
|
128
128
|
f("path", { d: "M12 4l0 12" }, null, -1)
|
|
129
129
|
])]);
|
|
130
130
|
}
|
|
131
|
-
const Ys = /* @__PURE__ */ q(
|
|
131
|
+
const Ys = /* @__PURE__ */ q(ei, [["render", ni]]), si = {}, ri = {
|
|
132
132
|
xmlns: "http://www.w3.org/2000/svg",
|
|
133
133
|
width: "24",
|
|
134
134
|
height: "24",
|
|
@@ -136,8 +136,8 @@ const Ys = /* @__PURE__ */ q(eo, [["render", no]]), so = {}, ro = {
|
|
|
136
136
|
fill: "currentColor",
|
|
137
137
|
class: "baklava-icon icon icon-tabler icons-tabler-filled icon-tabler-layout-sidebar-left-collapse"
|
|
138
138
|
};
|
|
139
|
-
function
|
|
140
|
-
return m(), k("svg",
|
|
139
|
+
function ai(e, t) {
|
|
140
|
+
return m(), k("svg", ri, [...t[0] || (t[0] = [
|
|
141
141
|
f("path", {
|
|
142
142
|
stroke: "none",
|
|
143
143
|
d: "M0 0h24v24H0z",
|
|
@@ -146,7 +146,7 @@ function ao(e, t) {
|
|
|
146
146
|
f("path", { d: "M18 3a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h12zm0 2h-9v14h9a1 1 0 0 0 .993 -.883l.007 -.117v-12a1 1 0 0 0 -.883 -.993l-.117 -.007zm-2.293 4.293a1 1 0 0 1 .083 1.32l-.083 .094l-1.292 1.293l1.292 1.293a1 1 0 0 1 .083 1.32l-.083 .094a1 1 0 0 1 -1.32 .083l-.094 -.083l-2 -2a1 1 0 0 1 -.083 -1.32l.083 -.094l2 -2a1 1 0 0 1 1.414 0z" }, null, -1)
|
|
147
147
|
])]);
|
|
148
148
|
}
|
|
149
|
-
const
|
|
149
|
+
const ii = /* @__PURE__ */ q(si, [["render", ai]]), oi = {}, li = {
|
|
150
150
|
xmlns: "http://www.w3.org/2000/svg",
|
|
151
151
|
width: "24",
|
|
152
152
|
height: "24",
|
|
@@ -154,8 +154,8 @@ const oo = /* @__PURE__ */ q(so, [["render", ao]]), io = {}, lo = {
|
|
|
154
154
|
fill: "currentColor",
|
|
155
155
|
class: "baklava-icon icon icon-tabler icons-tabler-filled icon-tabler-layout-sidebar-left-expand"
|
|
156
156
|
};
|
|
157
|
-
function
|
|
158
|
-
return m(), k("svg",
|
|
157
|
+
function ui(e, t) {
|
|
158
|
+
return m(), k("svg", li, [...t[0] || (t[0] = [
|
|
159
159
|
f("path", {
|
|
160
160
|
stroke: "none",
|
|
161
161
|
d: "M0 0h24v24H0z",
|
|
@@ -164,7 +164,7 @@ function uo(e, t) {
|
|
|
164
164
|
f("path", { d: "M18 3a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h12zm0 2h-9v14h9a1 1 0 0 0 .993 -.883l.007 -.117v-12a1 1 0 0 0 -.883 -.993l-.117 -.007zm-4.387 4.21l.094 .083l2 2a1 1 0 0 1 .083 1.32l-.083 .094l-2 2a1 1 0 0 1 -1.497 -1.32l.083 -.094l1.292 -1.293l-1.292 -1.293a1 1 0 0 1 -.083 -1.32l.083 -.094a1 1 0 0 1 1.32 -.083z" }, null, -1)
|
|
165
165
|
])]);
|
|
166
166
|
}
|
|
167
|
-
const
|
|
167
|
+
const di = /* @__PURE__ */ q(oi, [["render", ui]]), ci = {}, hi = {
|
|
168
168
|
xmlns: "http://www.w3.org/2000/svg",
|
|
169
169
|
width: "24",
|
|
170
170
|
height: "24",
|
|
@@ -172,8 +172,8 @@ const co = /* @__PURE__ */ q(io, [["render", uo]]), ho = {}, fo = {
|
|
|
172
172
|
fill: "currentColor",
|
|
173
173
|
class: "baklava-icon icon icon-tabler icons-tabler-filled icon-tabler-layout-sidebar-right"
|
|
174
174
|
};
|
|
175
|
-
function
|
|
176
|
-
return m(), k("svg",
|
|
175
|
+
function fi(e, t) {
|
|
176
|
+
return m(), k("svg", hi, [...t[0] || (t[0] = [
|
|
177
177
|
f("path", {
|
|
178
178
|
stroke: "none",
|
|
179
179
|
d: "M0 0h24v24H0z",
|
|
@@ -182,7 +182,7 @@ function po(e, t) {
|
|
|
182
182
|
f("path", { d: "M6 21a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3zm8 -16h-8a1 1 0 0 0 -1 1v12a1 1 0 0 0 1 1h8z" }, null, -1)
|
|
183
183
|
])]);
|
|
184
184
|
}
|
|
185
|
-
const
|
|
185
|
+
const pi = /* @__PURE__ */ q(ci, [["render", fi]]), mi = {}, vi = {
|
|
186
186
|
xmlns: "http://www.w3.org/2000/svg",
|
|
187
187
|
width: "24",
|
|
188
188
|
height: "24",
|
|
@@ -190,8 +190,8 @@ const mo = /* @__PURE__ */ q(ho, [["render", po]]), vo = {}, _o = {
|
|
|
190
190
|
fill: "currentColor",
|
|
191
191
|
class: "baklava-icon icon icon-tabler icons-tabler-filled icon-tabler-layout-sidebar-right-collapse"
|
|
192
192
|
};
|
|
193
|
-
function
|
|
194
|
-
return m(), k("svg",
|
|
193
|
+
function _i(e, t) {
|
|
194
|
+
return m(), k("svg", vi, [...t[0] || (t[0] = [
|
|
195
195
|
f("path", {
|
|
196
196
|
stroke: "none",
|
|
197
197
|
d: "M0 0h24v24H0z",
|
|
@@ -200,7 +200,7 @@ function yo(e, t) {
|
|
|
200
200
|
f("path", { d: "M18 3a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h12zm-3 2h-9a1 1 0 0 0 -.993 .883l-.007 .117v12a1 1 0 0 0 .883 .993l.117 .007h9v-14zm-5.387 4.21l.094 .083l2 2a1 1 0 0 1 .083 1.32l-.083 .094l-2 2a1 1 0 0 1 -1.497 -1.32l.083 -.094l1.292 -1.293l-1.292 -1.293a1 1 0 0 1 -.083 -1.32l.083 -.094a1 1 0 0 1 1.32 -.083z" }, null, -1)
|
|
201
201
|
])]);
|
|
202
202
|
}
|
|
203
|
-
const Es = /* @__PURE__ */ q(
|
|
203
|
+
const Es = /* @__PURE__ */ q(mi, [["render", _i]]), yi = {}, gi = {
|
|
204
204
|
xmlns: "http://www.w3.org/2000/svg",
|
|
205
205
|
width: "24",
|
|
206
206
|
height: "24",
|
|
@@ -208,8 +208,8 @@ const Es = /* @__PURE__ */ q(vo, [["render", yo]]), go = {}, bo = {
|
|
|
208
208
|
fill: "currentColor",
|
|
209
209
|
class: "baklava-icon icon icon-tabler icons-tabler-filled icon-tabler-layout-sidebar-right-expand"
|
|
210
210
|
};
|
|
211
|
-
function
|
|
212
|
-
return m(), k("svg",
|
|
211
|
+
function bi(e, t) {
|
|
212
|
+
return m(), k("svg", gi, [...t[0] || (t[0] = [
|
|
213
213
|
f("path", {
|
|
214
214
|
stroke: "none",
|
|
215
215
|
d: "M0 0h24v24H0z",
|
|
@@ -218,7 +218,7 @@ function wo(e, t) {
|
|
|
218
218
|
f("path", { d: "M18 3a3 3 0 0 1 2.995 2.824l.005 .176v12a3 3 0 0 1 -2.824 2.995l-.176 .005h-12a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-12a3 3 0 0 1 2.824 -2.995l.176 -.005h12zm-3 2h-9a1 1 0 0 0 -.993 .883l-.007 .117v12a1 1 0 0 0 .883 .993l.117 .007h9v-14zm-3.293 4.293a1 1 0 0 1 .083 1.32l-.083 .094l-1.292 1.293l1.292 1.293a1 1 0 0 1 .083 1.32l-.083 .094a1 1 0 0 1 -1.32 .083l-.094 -.083l-2 -2a1 1 0 0 1 -.083 -1.32l.083 -.094l2 -2a1 1 0 0 1 1.414 0z" }, null, -1)
|
|
219
219
|
])]);
|
|
220
220
|
}
|
|
221
|
-
const Tn = /* @__PURE__ */ q(
|
|
221
|
+
const Tn = /* @__PURE__ */ q(yi, [["render", bi]]), wi = {}, ki = {
|
|
222
222
|
xmlns: "http://www.w3.org/2000/svg",
|
|
223
223
|
width: "24",
|
|
224
224
|
height: "24",
|
|
@@ -230,12 +230,12 @@ const Tn = /* @__PURE__ */ q(go, [["render", wo]]), ko = {}, Mo = {
|
|
|
230
230
|
"stroke-linejoin": "round",
|
|
231
231
|
class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-lock-code"
|
|
232
232
|
};
|
|
233
|
-
function
|
|
234
|
-
return m(), k("svg",
|
|
233
|
+
function Mi(e, t) {
|
|
234
|
+
return m(), k("svg", ki, [...t[0] || (t[0] = [
|
|
235
235
|
Gt('<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 Nn = /* @__PURE__ */ q(
|
|
238
|
+
const Nn = /* @__PURE__ */ q(wi, [["render", Mi]]), Si = {}, xi = {
|
|
239
239
|
xmlns: "http://www.w3.org/2000/svg",
|
|
240
240
|
width: "24",
|
|
241
241
|
height: "24",
|
|
@@ -247,8 +247,8 @@ const Nn = /* @__PURE__ */ q(ko, [["render", So]]), xo = {}, Oo = {
|
|
|
247
247
|
"stroke-linejoin": "round",
|
|
248
248
|
class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-player-play"
|
|
249
249
|
};
|
|
250
|
-
function
|
|
251
|
-
return m(), k("svg",
|
|
250
|
+
function Oi(e, t) {
|
|
251
|
+
return m(), k("svg", xi, [...t[0] || (t[0] = [
|
|
252
252
|
f("path", {
|
|
253
253
|
stroke: "none",
|
|
254
254
|
d: "M0 0h24v24H0z",
|
|
@@ -257,7 +257,7 @@ function Co(e, t) {
|
|
|
257
257
|
f("path", { d: "M7 4v16l13 -8z" }, null, -1)
|
|
258
258
|
])]);
|
|
259
259
|
}
|
|
260
|
-
const
|
|
260
|
+
const Ci = /* @__PURE__ */ q(Si, [["render", Oi]]), Ti = {}, Ni = {
|
|
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", Co]]), 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 Di(e, t) {
|
|
273
|
+
return m(), k("svg", Ni, [...t[0] || (t[0] = [
|
|
274
274
|
f("path", {
|
|
275
275
|
stroke: "none",
|
|
276
276
|
d: "M0 0h24v24H0z",
|
|
@@ -280,7 +280,7 @@ function Io(e, t) {
|
|
|
280
280
|
f("path", { d: "M5 12l14 0" }, null, -1)
|
|
281
281
|
])]);
|
|
282
282
|
}
|
|
283
|
-
const Rs = /* @__PURE__ */ q(
|
|
283
|
+
const Rs = /* @__PURE__ */ q(Ti, [["render", Di]]), Ii = {}, Yi = {
|
|
284
284
|
xmlns: "http://www.w3.org/2000/svg",
|
|
285
285
|
width: "24",
|
|
286
286
|
height: "24",
|
|
@@ -292,8 +292,8 @@ const Rs = /* @__PURE__ */ q(No, [["render", Io]]), Yo = {}, Eo = {
|
|
|
292
292
|
"stroke-linejoin": "round",
|
|
293
293
|
class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-restore"
|
|
294
294
|
};
|
|
295
|
-
function
|
|
296
|
-
return m(), k("svg",
|
|
295
|
+
function Ei(e, t) {
|
|
296
|
+
return m(), k("svg", Yi, [...t[0] || (t[0] = [
|
|
297
297
|
f("path", {
|
|
298
298
|
stroke: "none",
|
|
299
299
|
d: "M0 0h24v24H0z",
|
|
@@ -304,7 +304,7 @@ function Ro(e, t) {
|
|
|
304
304
|
f("path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, null, -1)
|
|
305
305
|
])]);
|
|
306
306
|
}
|
|
307
|
-
const Ps = /* @__PURE__ */ q(
|
|
307
|
+
const Ps = /* @__PURE__ */ q(Ii, [["render", Ei]]), Ri = {}, Pi = {
|
|
308
308
|
xmlns: "http://www.w3.org/2000/svg",
|
|
309
309
|
width: "24",
|
|
310
310
|
height: "24",
|
|
@@ -316,12 +316,12 @@ const Ps = /* @__PURE__ */ q(Yo, [["render", Ro]]), Po = {}, Lo = {
|
|
|
316
316
|
"stroke-linejoin": "round",
|
|
317
317
|
class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-schema"
|
|
318
318
|
};
|
|
319
|
-
function
|
|
320
|
-
return m(), k("svg",
|
|
319
|
+
function Li(e, t) {
|
|
320
|
+
return m(), k("svg", Pi, [...t[0] || (t[0] = [
|
|
321
321
|
Gt('<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 Ls = /* @__PURE__ */ q(
|
|
324
|
+
const Ls = /* @__PURE__ */ q(Ri, [["render", Li]]), Ai = {}, Ui = {
|
|
325
325
|
xmlns: "http://www.w3.org/2000/svg",
|
|
326
326
|
width: "24",
|
|
327
327
|
height: "24",
|
|
@@ -333,12 +333,12 @@ const Ls = /* @__PURE__ */ q(Po, [["render", Ao]]), Uo = {}, $o = {
|
|
|
333
333
|
"stroke-linejoin": "round",
|
|
334
334
|
class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-schema-off"
|
|
335
335
|
};
|
|
336
|
-
function
|
|
337
|
-
return m(), k("svg",
|
|
336
|
+
function $i(e, t) {
|
|
337
|
+
return m(), k("svg", Ui, [...t[0] || (t[0] = [
|
|
338
338
|
Gt('<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 As = /* @__PURE__ */ q(
|
|
341
|
+
const As = /* @__PURE__ */ q(Ai, [["render", $i]]), Wi = {}, Hi = {
|
|
342
342
|
xmlns: "http://www.w3.org/2000/svg",
|
|
343
343
|
width: "24",
|
|
344
344
|
height: "24",
|
|
@@ -350,12 +350,12 @@ const As = /* @__PURE__ */ q(Uo, [["render", Wo]]), Ho = {}, Fo = {
|
|
|
350
350
|
"stroke-linejoin": "round",
|
|
351
351
|
class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-transition-bottom"
|
|
352
352
|
};
|
|
353
|
-
function
|
|
354
|
-
return m(), k("svg",
|
|
353
|
+
function Fi(e, t) {
|
|
354
|
+
return m(), k("svg", Hi, [...t[0] || (t[0] = [
|
|
355
355
|
Gt('<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 Us = /* @__PURE__ */ q(
|
|
358
|
+
const Us = /* @__PURE__ */ q(Wi, [["render", Fi]]), Gi = {}, Vi = {
|
|
359
359
|
xmlns: "http://www.w3.org/2000/svg",
|
|
360
360
|
width: "24",
|
|
361
361
|
height: "24",
|
|
@@ -367,8 +367,8 @@ const Us = /* @__PURE__ */ q(Ho, [["render", Go]]), Vo = {}, jo = {
|
|
|
367
367
|
"stroke-linejoin": "round",
|
|
368
368
|
class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-upload"
|
|
369
369
|
};
|
|
370
|
-
function
|
|
371
|
-
return m(), k("svg",
|
|
370
|
+
function ji(e, t) {
|
|
371
|
+
return m(), k("svg", Vi, [...t[0] || (t[0] = [
|
|
372
372
|
f("path", {
|
|
373
373
|
stroke: "none",
|
|
374
374
|
d: "M0 0h24v24H0z",
|
|
@@ -379,7 +379,7 @@ function zo(e, t) {
|
|
|
379
379
|
f("path", { d: "M12 4l0 12" }, null, -1)
|
|
380
380
|
])]);
|
|
381
381
|
}
|
|
382
|
-
const $s = /* @__PURE__ */ q(
|
|
382
|
+
const $s = /* @__PURE__ */ q(Gi, [["render", ji]]), zi = {}, Bi = {
|
|
383
383
|
xmlns: "http://www.w3.org/2000/svg",
|
|
384
384
|
width: "24",
|
|
385
385
|
height: "24",
|
|
@@ -391,8 +391,8 @@ const $s = /* @__PURE__ */ q(Vo, [["render", zo]]), Bo = {}, Zo = {
|
|
|
391
391
|
"stroke-linejoin": "round",
|
|
392
392
|
class: "baklava-icon icon icon-tabler icons-tabler-outline icon-tabler-x"
|
|
393
393
|
};
|
|
394
|
-
function
|
|
395
|
-
return m(), k("svg",
|
|
394
|
+
function Zi(e, t) {
|
|
395
|
+
return m(), k("svg", Bi, [...t[0] || (t[0] = [
|
|
396
396
|
f("path", {
|
|
397
397
|
stroke: "none",
|
|
398
398
|
d: "M0 0h24v24H0z",
|
|
@@ -402,20 +402,20 @@ function qo(e, t) {
|
|
|
402
402
|
f("path", { d: "M6 6l12 12" }, null, -1)
|
|
403
403
|
])]);
|
|
404
404
|
}
|
|
405
|
-
const Ws = /* @__PURE__ */ q(
|
|
405
|
+
const Ws = /* @__PURE__ */ q(zi, [["render", Zi]]), Eh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
406
406
|
__proto__: null,
|
|
407
407
|
Check: Ts,
|
|
408
408
|
CodeVariable: Ns,
|
|
409
409
|
Copy: Ds,
|
|
410
410
|
DotsVertical: Is,
|
|
411
411
|
Download: Ys,
|
|
412
|
-
LayoutSidebarLeftCollapse:
|
|
413
|
-
LayoutSidebarLeftExpand:
|
|
414
|
-
LayoutSidebarRight:
|
|
412
|
+
LayoutSidebarLeftCollapse: ii,
|
|
413
|
+
LayoutSidebarLeftExpand: di,
|
|
414
|
+
LayoutSidebarRight: pi,
|
|
415
415
|
LayoutSidebarRightCollapse: Es,
|
|
416
416
|
LayoutSidebarRightExpand: Tn,
|
|
417
417
|
LockCode: Nn,
|
|
418
|
-
PlayerPlay:
|
|
418
|
+
PlayerPlay: Ci,
|
|
419
419
|
Plus: Rs,
|
|
420
420
|
Restore: Ps,
|
|
421
421
|
Schema: Ls,
|
|
@@ -424,16 +424,16 @@ const Ws = /* @__PURE__ */ q(Bo, [["render", qo]]), Eh = /* @__PURE__ */ Object.
|
|
|
424
424
|
Upload: $s,
|
|
425
425
|
X: Ws
|
|
426
426
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
427
|
-
function
|
|
427
|
+
function qi(e) {
|
|
428
428
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
429
429
|
}
|
|
430
430
|
var Rt = { exports: {} };
|
|
431
|
-
var
|
|
432
|
-
function
|
|
433
|
-
return
|
|
431
|
+
var Ki = Rt.exports, os;
|
|
432
|
+
function Xi() {
|
|
433
|
+
return os || (os = 1, (function(e, t) {
|
|
434
434
|
(function(s, r) {
|
|
435
435
|
e.exports = r();
|
|
436
|
-
})(
|
|
436
|
+
})(Ki, function() {
|
|
437
437
|
return (
|
|
438
438
|
/******/
|
|
439
439
|
(function() {
|
|
@@ -441,8 +441,8 @@ function Jo() {
|
|
|
441
441
|
/***/
|
|
442
442
|
686: (
|
|
443
443
|
/***/
|
|
444
|
-
(function(a,
|
|
445
|
-
|
|
444
|
+
(function(a, i, o) {
|
|
445
|
+
o.d(i, {
|
|
446
446
|
default: function() {
|
|
447
447
|
return (
|
|
448
448
|
/* binding */
|
|
@@ -450,7 +450,7 @@ function Jo() {
|
|
|
450
450
|
);
|
|
451
451
|
}
|
|
452
452
|
});
|
|
453
|
-
var l =
|
|
453
|
+
var l = o(279), u = /* @__PURE__ */ o.n(l), h = o(370), w = /* @__PURE__ */ o.n(h), p = o(817), I = /* @__PURE__ */ o.n(p);
|
|
454
454
|
function y(b) {
|
|
455
455
|
try {
|
|
456
456
|
return document.execCommand(b);
|
|
@@ -708,13 +708,13 @@ function Jo() {
|
|
|
708
708
|
828: (
|
|
709
709
|
/***/
|
|
710
710
|
(function(a) {
|
|
711
|
-
var
|
|
711
|
+
var i = 9;
|
|
712
712
|
if (typeof Element < "u" && !Element.prototype.matches) {
|
|
713
|
-
var
|
|
714
|
-
|
|
713
|
+
var o = Element.prototype;
|
|
714
|
+
o.matches = o.matchesSelector || o.mozMatchesSelector || o.msMatchesSelector || o.oMatchesSelector || o.webkitMatchesSelector;
|
|
715
715
|
}
|
|
716
716
|
function l(u, h) {
|
|
717
|
-
for (; u && u.nodeType !==
|
|
717
|
+
for (; u && u.nodeType !== i; ) {
|
|
718
718
|
if (typeof u.matches == "function" && u.matches(h))
|
|
719
719
|
return u;
|
|
720
720
|
u = u.parentNode;
|
|
@@ -726,8 +726,8 @@ function Jo() {
|
|
|
726
726
|
/***/
|
|
727
727
|
438: (
|
|
728
728
|
/***/
|
|
729
|
-
(function(a,
|
|
730
|
-
var l =
|
|
729
|
+
(function(a, i, o) {
|
|
730
|
+
var l = o(828);
|
|
731
731
|
function u(p, I, y, O, c) {
|
|
732
732
|
var g = w.apply(this, arguments);
|
|
733
733
|
return p.addEventListener(y, g, c), {
|
|
@@ -752,16 +752,16 @@ function Jo() {
|
|
|
752
752
|
/***/
|
|
753
753
|
879: (
|
|
754
754
|
/***/
|
|
755
|
-
(function(a,
|
|
756
|
-
|
|
757
|
-
return
|
|
758
|
-
},
|
|
759
|
-
var l = Object.prototype.toString.call(
|
|
760
|
-
return
|
|
761
|
-
},
|
|
762
|
-
return typeof
|
|
763
|
-
},
|
|
764
|
-
var l = Object.prototype.toString.call(
|
|
755
|
+
(function(a, i) {
|
|
756
|
+
i.node = function(o) {
|
|
757
|
+
return o !== void 0 && o instanceof HTMLElement && o.nodeType === 1;
|
|
758
|
+
}, i.nodeList = function(o) {
|
|
759
|
+
var l = Object.prototype.toString.call(o);
|
|
760
|
+
return o !== void 0 && (l === "[object NodeList]" || l === "[object HTMLCollection]") && "length" in o && (o.length === 0 || i.node(o[0]));
|
|
761
|
+
}, i.string = function(o) {
|
|
762
|
+
return typeof o == "string" || o instanceof String;
|
|
763
|
+
}, i.fn = function(o) {
|
|
764
|
+
var l = Object.prototype.toString.call(o);
|
|
765
765
|
return l === "[object Function]";
|
|
766
766
|
};
|
|
767
767
|
})
|
|
@@ -769,8 +769,8 @@ function Jo() {
|
|
|
769
769
|
/***/
|
|
770
770
|
370: (
|
|
771
771
|
/***/
|
|
772
|
-
(function(a,
|
|
773
|
-
var l =
|
|
772
|
+
(function(a, i, o) {
|
|
773
|
+
var l = o(879), u = o(438);
|
|
774
774
|
function h(y, O, c) {
|
|
775
775
|
if (!y && !O && !c)
|
|
776
776
|
throw new Error("Missing required arguments");
|
|
@@ -814,58 +814,58 @@ function Jo() {
|
|
|
814
814
|
817: (
|
|
815
815
|
/***/
|
|
816
816
|
(function(a) {
|
|
817
|
-
function o
|
|
817
|
+
function i(o) {
|
|
818
818
|
var l;
|
|
819
|
-
if (
|
|
820
|
-
|
|
821
|
-
else if (
|
|
822
|
-
var u =
|
|
823
|
-
u ||
|
|
819
|
+
if (o.nodeName === "SELECT")
|
|
820
|
+
o.focus(), l = o.value;
|
|
821
|
+
else if (o.nodeName === "INPUT" || o.nodeName === "TEXTAREA") {
|
|
822
|
+
var u = o.hasAttribute("readonly");
|
|
823
|
+
u || o.setAttribute("readonly", ""), o.select(), o.setSelectionRange(0, o.value.length), u || o.removeAttribute("readonly"), l = o.value;
|
|
824
824
|
} else {
|
|
825
|
-
|
|
825
|
+
o.hasAttribute("contenteditable") && o.focus();
|
|
826
826
|
var h = window.getSelection(), w = document.createRange();
|
|
827
|
-
w.selectNodeContents(
|
|
827
|
+
w.selectNodeContents(o), h.removeAllRanges(), h.addRange(w), l = h.toString();
|
|
828
828
|
}
|
|
829
829
|
return l;
|
|
830
830
|
}
|
|
831
|
-
a.exports =
|
|
831
|
+
a.exports = i;
|
|
832
832
|
})
|
|
833
833
|
),
|
|
834
834
|
/***/
|
|
835
835
|
279: (
|
|
836
836
|
/***/
|
|
837
837
|
(function(a) {
|
|
838
|
-
function
|
|
838
|
+
function i() {
|
|
839
839
|
}
|
|
840
|
-
|
|
841
|
-
on: function(
|
|
840
|
+
i.prototype = {
|
|
841
|
+
on: function(o, l, u) {
|
|
842
842
|
var h = this.e || (this.e = {});
|
|
843
|
-
return (h[
|
|
843
|
+
return (h[o] || (h[o] = [])).push({
|
|
844
844
|
fn: l,
|
|
845
845
|
ctx: u
|
|
846
846
|
}), this;
|
|
847
847
|
},
|
|
848
|
-
once: function(
|
|
848
|
+
once: function(o, l, u) {
|
|
849
849
|
var h = this;
|
|
850
850
|
function w() {
|
|
851
|
-
h.off(
|
|
851
|
+
h.off(o, w), l.apply(u, arguments);
|
|
852
852
|
}
|
|
853
|
-
return w._ = l, this.on(
|
|
853
|
+
return w._ = l, this.on(o, w, u);
|
|
854
854
|
},
|
|
855
|
-
emit: function(
|
|
856
|
-
var l = [].slice.call(arguments, 1), u = ((this.e || (this.e = {}))[
|
|
855
|
+
emit: function(o) {
|
|
856
|
+
var l = [].slice.call(arguments, 1), u = ((this.e || (this.e = {}))[o] || []).slice(), h = 0, w = u.length;
|
|
857
857
|
for (h; h < w; h++)
|
|
858
858
|
u[h].fn.apply(u[h].ctx, l);
|
|
859
859
|
return this;
|
|
860
860
|
},
|
|
861
|
-
off: function(
|
|
862
|
-
var u = this.e || (this.e = {}), h = u[
|
|
861
|
+
off: function(o, l) {
|
|
862
|
+
var u = this.e || (this.e = {}), h = u[o], w = [];
|
|
863
863
|
if (h && l)
|
|
864
864
|
for (var p = 0, I = h.length; p < I; p++)
|
|
865
865
|
h[p].fn !== l && h[p].fn._ !== l && w.push(h[p]);
|
|
866
|
-
return w.length ? u[
|
|
866
|
+
return w.length ? u[o] = w : delete u[o], this;
|
|
867
867
|
}
|
|
868
|
-
}, a.exports =
|
|
868
|
+
}, a.exports = i, a.exports.TinyEmitter = i;
|
|
869
869
|
})
|
|
870
870
|
)
|
|
871
871
|
/******/
|
|
@@ -873,7 +873,7 @@ function Jo() {
|
|
|
873
873
|
function r(a) {
|
|
874
874
|
if (s[a])
|
|
875
875
|
return s[a].exports;
|
|
876
|
-
var
|
|
876
|
+
var i = s[a] = {
|
|
877
877
|
/******/
|
|
878
878
|
// no module.id needed
|
|
879
879
|
/******/
|
|
@@ -882,11 +882,11 @@ function Jo() {
|
|
|
882
882
|
exports: {}
|
|
883
883
|
/******/
|
|
884
884
|
};
|
|
885
|
-
return n[a](
|
|
885
|
+
return n[a](i, i.exports, r), i.exports;
|
|
886
886
|
}
|
|
887
887
|
return (function() {
|
|
888
888
|
r.n = function(a) {
|
|
889
|
-
var
|
|
889
|
+
var i = a && a.__esModule ? (
|
|
890
890
|
/******/
|
|
891
891
|
function() {
|
|
892
892
|
return a.default;
|
|
@@ -897,16 +897,16 @@ function Jo() {
|
|
|
897
897
|
return a;
|
|
898
898
|
}
|
|
899
899
|
);
|
|
900
|
-
return r.d(
|
|
900
|
+
return r.d(i, { a: i }), i;
|
|
901
901
|
};
|
|
902
902
|
})(), (function() {
|
|
903
|
-
r.d = function(a,
|
|
904
|
-
for (var
|
|
905
|
-
r.o(
|
|
903
|
+
r.d = function(a, i) {
|
|
904
|
+
for (var o in i)
|
|
905
|
+
r.o(i, o) && !r.o(a, o) && Object.defineProperty(a, o, { enumerable: !0, get: i[o] });
|
|
906
906
|
};
|
|
907
907
|
})(), (function() {
|
|
908
|
-
r.o = function(a,
|
|
909
|
-
return Object.prototype.hasOwnProperty.call(a,
|
|
908
|
+
r.o = function(a, i) {
|
|
909
|
+
return Object.prototype.hasOwnProperty.call(a, i);
|
|
910
910
|
};
|
|
911
911
|
})(), r(686);
|
|
912
912
|
})().default
|
|
@@ -914,38 +914,38 @@ function Jo() {
|
|
|
914
914
|
});
|
|
915
915
|
})(Rt)), Rt.exports;
|
|
916
916
|
}
|
|
917
|
-
var
|
|
918
|
-
const
|
|
917
|
+
var Ji = Xi();
|
|
918
|
+
const Qi = /* @__PURE__ */ qi(Ji), eo = (e) => ({
|
|
919
919
|
toClipboard(t, n) {
|
|
920
920
|
return new Promise((s, r) => {
|
|
921
|
-
const a = document.createElement("button"),
|
|
921
|
+
const a = document.createElement("button"), i = new Qi(a, {
|
|
922
922
|
text: () => t,
|
|
923
923
|
action: () => "copy",
|
|
924
924
|
container: n !== void 0 ? n : document.body
|
|
925
925
|
});
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
}),
|
|
929
|
-
|
|
926
|
+
i.on("success", (o) => {
|
|
927
|
+
i.destroy(), s(o);
|
|
928
|
+
}), i.on("error", (o) => {
|
|
929
|
+
i.destroy(), r(o);
|
|
930
930
|
}), document.body.appendChild(a), a.click(), document.body.removeChild(a);
|
|
931
931
|
});
|
|
932
932
|
}
|
|
933
|
-
}),
|
|
933
|
+
}), to = {
|
|
934
934
|
key: 0,
|
|
935
935
|
class: "baklava-button"
|
|
936
936
|
}, Hs = /* @__PURE__ */ ce({
|
|
937
937
|
__name: "CopyToClipboard",
|
|
938
938
|
props: { text: String },
|
|
939
939
|
setup(e) {
|
|
940
|
-
const { toClipboard: t } =
|
|
940
|
+
const { toClipboard: t } = eo(), s = Sn(e, "text"), r = ie(!1), a = async () => {
|
|
941
941
|
try {
|
|
942
942
|
await t(s.value), r.value = !0, setTimeout(() => r.value = !1, 1500), console.log("Copied to clipboard");
|
|
943
|
-
} catch (
|
|
944
|
-
console.error(
|
|
943
|
+
} catch (i) {
|
|
944
|
+
console.error(i);
|
|
945
945
|
}
|
|
946
946
|
};
|
|
947
|
-
return (
|
|
948
|
-
r.value ? (m(), k("button",
|
|
947
|
+
return (i, o) => (m(), k("div", null, [
|
|
948
|
+
r.value ? (m(), k("button", to, [
|
|
949
949
|
X(H(Ts))
|
|
950
950
|
])) : (m(), k("button", {
|
|
951
951
|
key: 1,
|
|
@@ -956,7 +956,7 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
956
956
|
]))
|
|
957
957
|
]));
|
|
958
958
|
}
|
|
959
|
-
}),
|
|
959
|
+
}), no = { class: "code-editor" }, so = { class: "code-buttons" }, ro = /* @__PURE__ */ ce({
|
|
960
960
|
__name: "CodeEditor",
|
|
961
961
|
props: /* @__PURE__ */ rs({
|
|
962
962
|
locked: { type: Boolean },
|
|
@@ -968,32 +968,32 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
968
968
|
emits: /* @__PURE__ */ rs(["update:locked"], ["update:modelValue"]),
|
|
969
969
|
setup(e, { emit: t }) {
|
|
970
970
|
const n = na(e, "modelValue"), s = t, r = (a) => s("update:locked", a);
|
|
971
|
-
return (a,
|
|
972
|
-
const
|
|
973
|
-
return m(), k("div",
|
|
974
|
-
f("div",
|
|
971
|
+
return (a, i) => {
|
|
972
|
+
const o = _s("codemirror");
|
|
973
|
+
return m(), k("div", no, [
|
|
974
|
+
f("div", so, [
|
|
975
975
|
e.locked ? (m(), k("button", {
|
|
976
976
|
key: 0,
|
|
977
977
|
class: "baklava-button",
|
|
978
978
|
title: "The code is locked.",
|
|
979
|
-
onClick:
|
|
979
|
+
onClick: i[0] || (i[0] = (l) => r(!1))
|
|
980
980
|
}, [
|
|
981
981
|
X(H(Nn))
|
|
982
982
|
])) : K("", !0),
|
|
983
983
|
X(Hs, { text: e.modelValue }, null, 8, ["text"])
|
|
984
984
|
]),
|
|
985
|
-
X(
|
|
985
|
+
X(o, {
|
|
986
986
|
modelValue: n.value,
|
|
987
|
-
"onUpdate:modelValue":
|
|
987
|
+
"onUpdate:modelValue": i[1] || (i[1] = (l) => n.value = l),
|
|
988
988
|
extensions: e.extensions,
|
|
989
989
|
class: "codemirror",
|
|
990
990
|
style: { height: "100%" },
|
|
991
|
-
onKeydown:
|
|
991
|
+
onKeydown: i[2] || (i[2] = (l) => r(!0))
|
|
992
992
|
}, null, 8, ["modelValue", "extensions"])
|
|
993
993
|
]);
|
|
994
994
|
};
|
|
995
995
|
}
|
|
996
|
-
}),
|
|
996
|
+
}), ao = /* @__PURE__ */ ce({
|
|
997
997
|
__name: "CodeGraphEditor",
|
|
998
998
|
props: {
|
|
999
999
|
viewModel: {}
|
|
@@ -1006,15 +1006,15 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1006
1006
|
palette: Ye(() => [
|
|
1007
1007
|
X(H(Vs))
|
|
1008
1008
|
]),
|
|
1009
|
-
node: Ye((
|
|
1010
|
-
X(H(Fs), aa(
|
|
1011
|
-
onUpdate: (
|
|
1009
|
+
node: Ye((i) => [
|
|
1010
|
+
X(H(Fs), aa(i, {
|
|
1011
|
+
onUpdate: (o) => s(i.node)
|
|
1012
1012
|
}), null, 16, ["onUpdate"])
|
|
1013
1013
|
]),
|
|
1014
|
-
sidebar: Ye((
|
|
1015
|
-
X(H(Gs), sa(ra(
|
|
1016
|
-
codeEditor: Ye(({ node:
|
|
1017
|
-
Me(r.$slots, "sidebarCodeEditor", { node:
|
|
1014
|
+
sidebar: Ye((i) => [
|
|
1015
|
+
X(H(Gs), sa(ra(i)), {
|
|
1016
|
+
codeEditor: Ye(({ node: o }) => [
|
|
1017
|
+
Me(r.$slots, "sidebarCodeEditor", { node: o })
|
|
1018
1018
|
]),
|
|
1019
1019
|
_: 3
|
|
1020
1020
|
}, 16)
|
|
@@ -1022,13 +1022,13 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1022
1022
|
_: 3
|
|
1023
1023
|
}, 8, ["viewModel"]));
|
|
1024
1024
|
}
|
|
1025
|
-
}),
|
|
1025
|
+
}), io = { class: "code-graph-info" }, oo = /* @__PURE__ */ ce({
|
|
1026
1026
|
__name: "CodeGraphInfo",
|
|
1027
1027
|
props: {
|
|
1028
1028
|
viewModel: {}
|
|
1029
1029
|
},
|
|
1030
1030
|
setup(e) {
|
|
1031
|
-
return (t, n) => (m(), k("div",
|
|
1031
|
+
return (t, n) => (m(), k("div", io, [
|
|
1032
1032
|
f("div", null, "Editor graph: " + te(e.viewModel.editor.graph.shortId), 1),
|
|
1033
1033
|
f("div", null, "Displayed graph: " + te(e.viewModel.displayedGraph.shortId), 1),
|
|
1034
1034
|
f("div", null, "Graphs: " + te(e.viewModel.editor.graphIds), 1),
|
|
@@ -1036,13 +1036,13 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1036
1036
|
f("div", null, "Engine status: " + te(e.viewModel.engine?.status), 1)
|
|
1037
1037
|
]));
|
|
1038
1038
|
}
|
|
1039
|
-
}),
|
|
1039
|
+
}), lo = ["data-node-type", "id"], uo = {
|
|
1040
1040
|
class: "__title-label",
|
|
1041
1041
|
style: { "flex-grow": "1" }
|
|
1042
|
-
},
|
|
1042
|
+
}, co = { key: 0 }, ho = {
|
|
1043
1043
|
class: "__menu",
|
|
1044
1044
|
style: { display: "flex" }
|
|
1045
|
-
},
|
|
1045
|
+
}, fo = { class: "__outputs" }, po = { key: 0 }, mo = ["id", "title"], vo = { class: "__inputs" }, _o = { key: 0 }, yo = ["id", "title"], Fs = /* @__PURE__ */ ce({
|
|
1046
1046
|
__name: "CodeGraphNode",
|
|
1047
1047
|
props: {
|
|
1048
1048
|
node: {},
|
|
@@ -1051,9 +1051,9 @@ 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 = fn.ContextMenu, s = fn.NodeInterface, r = e, a = z(() => r.node),
|
|
1054
|
+
const n = fn.ContextMenu, s = fn.NodeInterface, r = e, a = z(() => r.node), i = t, { viewModel: o } = kt(), { graph: l, switchGraph: u } = Cn(), h = ie(null), w = ie(!1), p = ie(""), I = ie(null), y = ie(!1);
|
|
1055
1055
|
let O = 0, c = 0;
|
|
1056
|
-
const g =
|
|
1056
|
+
const g = ie(!1), $ = z(() => {
|
|
1057
1057
|
const W = [
|
|
1058
1058
|
{ value: "edit", label: "Edit" },
|
|
1059
1059
|
{ value: "rename", label: "Rename" },
|
|
@@ -1066,22 +1066,22 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1066
1066
|
"--two-column": !!r.node.twoColumn,
|
|
1067
1067
|
"--hidden": a.value.state?.hidden
|
|
1068
1068
|
})), F = z(() => ({
|
|
1069
|
-
"--reverse-y": r.node.reverseY ??
|
|
1069
|
+
"--reverse-y": r.node.reverseY ?? o.value.settings.nodes.reverseY
|
|
1070
1070
|
})), Te = z(() => ({
|
|
1071
1071
|
top: `${r.node.position?.y ?? 0}px`,
|
|
1072
1072
|
left: `${r.node.position?.x ?? 0}px`,
|
|
1073
|
-
"--width": `${r.node.width ??
|
|
1073
|
+
"--width": `${r.node.width ?? o.value.settings.nodes.defaultWidth}px`
|
|
1074
1074
|
})), Ne = z(() => Object.values(r.node.inputs).filter((W) => !W.hidden)), ft = z(() => Object.values(r.node.outputs).filter((W) => !W.hidden)), we = () => {
|
|
1075
|
-
an(),
|
|
1075
|
+
an(), i("select");
|
|
1076
1076
|
}, C = (W) => {
|
|
1077
|
-
r.selected || we(),
|
|
1077
|
+
r.selected || we(), i("start-drag", W);
|
|
1078
1078
|
}, Q = () => {
|
|
1079
1079
|
g.value = !0;
|
|
1080
1080
|
}, se = () => {
|
|
1081
|
-
const W =
|
|
1081
|
+
const W = o.value.displayedGraph.sidebar;
|
|
1082
1082
|
W.nodeId = r.node.id, W.visible = !0;
|
|
1083
1083
|
}, an = () => {
|
|
1084
|
-
const W =
|
|
1084
|
+
const W = o.value.displayedGraph.sidebar;
|
|
1085
1085
|
W.nodeId = r.node.id;
|
|
1086
1086
|
}, pt = async (W) => {
|
|
1087
1087
|
switch (W) {
|
|
@@ -1092,23 +1092,23 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1092
1092
|
l.value.removeNode(r.node);
|
|
1093
1093
|
break;
|
|
1094
1094
|
case "rename":
|
|
1095
|
-
p.value = r.node.
|
|
1095
|
+
p.value = r.node.title, w.value = !0, await ks(), I.value?.focus();
|
|
1096
1096
|
break;
|
|
1097
1097
|
case "editSubgraph":
|
|
1098
1098
|
u(r.node.template);
|
|
1099
1099
|
break;
|
|
1100
1100
|
}
|
|
1101
1101
|
}, Tt = () => {
|
|
1102
|
-
a.value.
|
|
1102
|
+
a.value.title = p.value, a.value.events.titleChanged.emit(a.value.title), w.value = !1;
|
|
1103
1103
|
}, Nt = () => {
|
|
1104
|
-
h.value &&
|
|
1104
|
+
h.value && o.value.hooks.renderNode.execute({ node: r.node, el: h.value });
|
|
1105
1105
|
}, on = (W) => {
|
|
1106
1106
|
y.value = !0, O = r.node.width, c = W.clientX, W.preventDefault();
|
|
1107
1107
|
}, Dt = (W) => {
|
|
1108
|
-
a.value.state && (a.value.state.integrated = W,
|
|
1108
|
+
a.value.state && (a.value.state.integrated = W, i("update"));
|
|
1109
1109
|
}, ze = (W) => {
|
|
1110
1110
|
if (!y.value) return;
|
|
1111
|
-
const B = W.clientX - c, b = O + B / l.value.scaling, S =
|
|
1111
|
+
const B = W.clientX - c, b = O + B / l.value.scaling, S = o.value.settings.nodes.minWidth, M = o.value.settings.nodes.maxWidth;
|
|
1112
1112
|
a.value.width = Math.max(S, Math.min(M, b));
|
|
1113
1113
|
}, et = () => {
|
|
1114
1114
|
y.value = !1;
|
|
@@ -1126,7 +1126,7 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1126
1126
|
ref: h,
|
|
1127
1127
|
onPointerdown: we
|
|
1128
1128
|
}, [
|
|
1129
|
-
H(
|
|
1129
|
+
H(o).settings.nodes.resizable ? (m(), k("div", {
|
|
1130
1130
|
key: 0,
|
|
1131
1131
|
class: "__resize-handle",
|
|
1132
1132
|
onMousedown: on
|
|
@@ -1151,7 +1151,7 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1151
1151
|
ref: I,
|
|
1152
1152
|
"onUpdate:modelValue": B[4] || (B[4] = (b) => p.value = b),
|
|
1153
1153
|
class: "baklava-input",
|
|
1154
|
-
placeholder: "
|
|
1154
|
+
placeholder: "Title",
|
|
1155
1155
|
style: { "flex-grow": "1" },
|
|
1156
1156
|
type: "text",
|
|
1157
1157
|
onBlur: Tt,
|
|
@@ -1159,11 +1159,11 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1159
1159
|
}, null, 544)), [
|
|
1160
1160
|
[jt, p.value]
|
|
1161
1161
|
]) : (m(), k(ae, { key: 1 }, [
|
|
1162
|
-
f("div",
|
|
1163
|
-
a.value.idx > -1 ? (m(), k("span",
|
|
1164
|
-
ws(" " + te(a.value.
|
|
1162
|
+
f("div", uo, [
|
|
1163
|
+
a.value.idx > -1 ? (m(), k("span", co, te(a.value.idx + 1) + " - ", 1)) : K("", !0),
|
|
1164
|
+
ws(" " + te(a.value.title), 1)
|
|
1165
1165
|
]),
|
|
1166
|
-
f("div",
|
|
1166
|
+
f("div", ho, [
|
|
1167
1167
|
a.value.isCodeNode ? (m(), k(ae, { key: 0 }, [
|
|
1168
1168
|
a.value.state.lockCode ? (m(), ue(H(Nn), {
|
|
1169
1169
|
key: 0,
|
|
@@ -1181,7 +1181,7 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1181
1181
|
onClick: B[1] || (B[1] = (b) => Dt(!0))
|
|
1182
1182
|
}))
|
|
1183
1183
|
], 64)) : K("", !0),
|
|
1184
|
-
a.value.isSelected && !H(
|
|
1184
|
+
a.value.isSelected && !H(o).displayedGraph.sidebar.visible ? (m(), ue(H(Tn), {
|
|
1185
1185
|
key: 2,
|
|
1186
1186
|
class: "--clickable mx-1",
|
|
1187
1187
|
onClick: se
|
|
@@ -1217,11 +1217,11 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1217
1217
|
onContextmenu: B[6] || (B[6] = st(() => {
|
|
1218
1218
|
}, ["prevent"]))
|
|
1219
1219
|
}, [
|
|
1220
|
-
f("div",
|
|
1220
|
+
f("div", fo, [
|
|
1221
1221
|
(m(!0), k(ae, null, Ke(ft.value, (b) => (m(), k(ae, {
|
|
1222
1222
|
key: b.id
|
|
1223
1223
|
}, [
|
|
1224
|
-
a.value.state?.hidden ? (m(), k("div",
|
|
1224
|
+
a.value.state?.hidden ? (m(), k("div", po, [
|
|
1225
1225
|
b.port ? (m(), k("div", {
|
|
1226
1226
|
key: 0,
|
|
1227
1227
|
id: b.id,
|
|
@@ -1229,7 +1229,7 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1229
1229
|
class: "baklava-node-interface --output --connected"
|
|
1230
1230
|
}, [...B[7] || (B[7] = [
|
|
1231
1231
|
f("div", { class: "__port" }, null, -1)
|
|
1232
|
-
])], 8,
|
|
1232
|
+
])], 8, mo)) : K("", !0)
|
|
1233
1233
|
])) : Me(W.$slots, "nodeInterface", {
|
|
1234
1234
|
key: 1,
|
|
1235
1235
|
type: "output",
|
|
@@ -1244,11 +1244,11 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1244
1244
|
])
|
|
1245
1245
|
], 64))), 128))
|
|
1246
1246
|
]),
|
|
1247
|
-
f("div",
|
|
1247
|
+
f("div", vo, [
|
|
1248
1248
|
(m(!0), k(ae, null, Ke(Ne.value, (b) => (m(), k(ae, {
|
|
1249
1249
|
key: b.id
|
|
1250
1250
|
}, [
|
|
1251
|
-
a.value.state?.hidden ? (m(), k("div",
|
|
1251
|
+
a.value.state?.hidden ? (m(), k("div", _o, [
|
|
1252
1252
|
b.port ? (m(), k("div", {
|
|
1253
1253
|
key: 0,
|
|
1254
1254
|
id: b.id,
|
|
@@ -1256,7 +1256,7 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1256
1256
|
class: "baklava-node-interface --input --connected"
|
|
1257
1257
|
}, [...B[8] || (B[8] = [
|
|
1258
1258
|
f("div", { class: "__port" }, null, -1)
|
|
1259
|
-
])], 8,
|
|
1259
|
+
])], 8, yo)) : K("", !0)
|
|
1260
1260
|
])) : Me(W.$slots, "nodeInterface", {
|
|
1261
1261
|
key: 1,
|
|
1262
1262
|
node: a.value,
|
|
@@ -1272,17 +1272,17 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1272
1272
|
], 64))), 128))
|
|
1273
1273
|
])
|
|
1274
1274
|
], 34)
|
|
1275
|
-
], 46,
|
|
1275
|
+
], 46, lo));
|
|
1276
1276
|
}
|
|
1277
|
-
}),
|
|
1277
|
+
}), go = ["id"], bo = { class: "align-middle" }, pn = /* @__PURE__ */ ce({
|
|
1278
1278
|
__name: "CodeGraphNodeInterface",
|
|
1279
1279
|
props: {
|
|
1280
1280
|
node: {},
|
|
1281
1281
|
intf: {}
|
|
1282
1282
|
},
|
|
1283
1283
|
setup(e) {
|
|
1284
|
-
const t = e, { viewModel: n } = kt(), { hoveredOver: s, temporaryConnection: r } = da(), a =
|
|
1285
|
-
"--connected":
|
|
1284
|
+
const t = e, { viewModel: n } = kt(), { hoveredOver: s, temporaryConnection: r } = da(), a = ie(null), i = z(() => t.intf.connectionCount > 0), o = z(() => ({
|
|
1285
|
+
"--connected": i.value
|
|
1286
1286
|
})), l = () => {
|
|
1287
1287
|
s(t.intf);
|
|
1288
1288
|
}, u = () => {
|
|
@@ -1294,7 +1294,7 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1294
1294
|
id: e.intf.id,
|
|
1295
1295
|
ref_key: "el",
|
|
1296
1296
|
ref: a,
|
|
1297
|
-
class: je(["baklava-node-interface",
|
|
1297
|
+
class: je(["baklava-node-interface", o.value])
|
|
1298
1298
|
}, [
|
|
1299
1299
|
e.intf.port ? (m(), k("div", {
|
|
1300
1300
|
key: 0,
|
|
@@ -1302,12 +1302,12 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1302
1302
|
onPointerover: l,
|
|
1303
1303
|
onPointerout: u
|
|
1304
1304
|
}, null, 34)) : K("", !0),
|
|
1305
|
-
f("span",
|
|
1305
|
+
f("span", bo, [
|
|
1306
1306
|
Me(w.$slots, "default")
|
|
1307
1307
|
])
|
|
1308
|
-
], 10,
|
|
1308
|
+
], 10, go));
|
|
1309
1309
|
}
|
|
1310
|
-
}),
|
|
1310
|
+
}), wo = ["title"], ko = {
|
|
1311
1311
|
key: 0,
|
|
1312
1312
|
class: "__label"
|
|
1313
1313
|
}, mn = /* @__PURE__ */ ce({
|
|
@@ -1340,17 +1340,17 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1340
1340
|
})
|
|
1341
1341
|
])
|
|
1342
1342
|
], -1)),
|
|
1343
|
-
e.name ? (m(), k("div",
|
|
1344
|
-
], 10,
|
|
1343
|
+
e.name ? (m(), k("div", ko, te(e.name), 1)) : K("", !0)
|
|
1344
|
+
], 10, wo));
|
|
1345
1345
|
}
|
|
1346
|
-
}),
|
|
1346
|
+
}), Mo = { class: "__header" }, So = { class: "__node-name" }, xo = { class: "__interfaces" }, Oo = { class: "__inputs" }, Co = { style: { display: "flex" } }, To = { class: "__outputs" }, No = {
|
|
1347
1347
|
key: 0,
|
|
1348
1348
|
class: "__interface"
|
|
1349
|
-
},
|
|
1349
|
+
}, Do = ["placeholder"], Io = { style: { display: "flex" } }, Gs = /* @__PURE__ */ ce({
|
|
1350
1350
|
__name: "CodeGraphSidebar",
|
|
1351
1351
|
setup(e) {
|
|
1352
|
-
const { viewModel: t } = kt(), { graph: n } = Cn(), s =
|
|
1353
|
-
let
|
|
1352
|
+
const { viewModel: t } = kt(), { graph: n } = Cn(), s = ie(null), r = Sn(t.value.settings.sidebar, "width"), a = z(() => t.value.settings.sidebar.resizable);
|
|
1353
|
+
let i = 0, o = 0;
|
|
1354
1354
|
const l = z(() => {
|
|
1355
1355
|
const g = n.value.sidebar.nodeId;
|
|
1356
1356
|
return n.value.nodes.find(($) => $.id === g);
|
|
@@ -1359,9 +1359,9 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1359
1359
|
})), w = z(() => u.value ? Object.values(u.value.inputs).filter((g) => g.displayInSidebar && g.component) : []), p = z(() => u.value ? Object.values(u.value.outputs).filter((g) => g.displayInSidebar && g.component) : []), I = () => {
|
|
1360
1360
|
n.value.sidebar.visible = !1;
|
|
1361
1361
|
}, y = () => {
|
|
1362
|
-
l.value
|
|
1362
|
+
l.value && (l.value.state.variableNameNumberAppendix = u.value.state.variableName.length === 0, l.value.events.update.emit(null));
|
|
1363
1363
|
}, O = (g) => {
|
|
1364
|
-
|
|
1364
|
+
i = r.value, o = g.clientX, window.addEventListener("mousemove", c), window.addEventListener(
|
|
1365
1365
|
"mouseup",
|
|
1366
1366
|
() => {
|
|
1367
1367
|
window.removeEventListener("mousemove", c);
|
|
@@ -1369,8 +1369,8 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1369
1369
|
{ once: !0 }
|
|
1370
1370
|
);
|
|
1371
1371
|
}, c = (g) => {
|
|
1372
|
-
const $ = s.value?.parentElement?.getBoundingClientRect().width ?? 500, A = g.clientX -
|
|
1373
|
-
let F =
|
|
1372
|
+
const $ = s.value?.parentElement?.getBoundingClientRect().width ?? 500, A = g.clientX - o;
|
|
1373
|
+
let F = i - A;
|
|
1374
1374
|
F < 300 ? F = 300 : F > 0.9 * $ && (F = 0.9 * $), r.value = F;
|
|
1375
1375
|
};
|
|
1376
1376
|
return (g, $) => (m(), k("div", {
|
|
@@ -1385,23 +1385,23 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1385
1385
|
onMousedown: O
|
|
1386
1386
|
}, null, 32)) : K("", !0),
|
|
1387
1387
|
l.value ? (m(), k(ae, { key: 1 }, [
|
|
1388
|
-
f("div",
|
|
1388
|
+
f("div", Mo, [
|
|
1389
1389
|
f("button", {
|
|
1390
1390
|
tabindex: "-1",
|
|
1391
1391
|
class: "__close",
|
|
1392
1392
|
onClick: I
|
|
1393
1393
|
}, "×"),
|
|
1394
|
-
f("div",
|
|
1394
|
+
f("div", So, [
|
|
1395
1395
|
f("b", null, te(l.value.title), 1)
|
|
1396
1396
|
])
|
|
1397
1397
|
]),
|
|
1398
|
-
f("div",
|
|
1399
|
-
f("div",
|
|
1398
|
+
f("div", xo, [
|
|
1399
|
+
f("div", Oo, [
|
|
1400
1400
|
(m(!0), k(ae, null, Ke(w.value, (A) => (m(), k("div", {
|
|
1401
1401
|
key: A.id,
|
|
1402
1402
|
class: "__interface"
|
|
1403
1403
|
}, [
|
|
1404
|
-
f("div",
|
|
1404
|
+
f("div", Co, [
|
|
1405
1405
|
X(mn, {
|
|
1406
1406
|
modelValue: A.hidden,
|
|
1407
1407
|
"onUpdate:modelValue": [
|
|
@@ -1422,8 +1422,8 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1422
1422
|
])
|
|
1423
1423
|
]))), 128))
|
|
1424
1424
|
]),
|
|
1425
|
-
f("div",
|
|
1426
|
-
u.value && u.value.state ? (m(), k("div",
|
|
1425
|
+
f("div", To, [
|
|
1426
|
+
u.value && u.value.state ? (m(), k("div", No, [
|
|
1427
1427
|
$[3] || ($[3] = f("label", null, "Variable name", -1)),
|
|
1428
1428
|
Vt(f("input", {
|
|
1429
1429
|
"onUpdate:modelValue": $[1] || ($[1] = (A) => u.value.state.variableName = A),
|
|
@@ -1433,7 +1433,7 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1433
1433
|
title: "Variable name",
|
|
1434
1434
|
onBlur: y,
|
|
1435
1435
|
onKeydown: hn(y, ["enter"])
|
|
1436
|
-
}, null, 40,
|
|
1436
|
+
}, null, 40, Do), [
|
|
1437
1437
|
[jt, u.value.state.variableName]
|
|
1438
1438
|
])
|
|
1439
1439
|
])) : K("", !0),
|
|
@@ -1441,7 +1441,7 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1441
1441
|
key: A.id,
|
|
1442
1442
|
class: "__interface"
|
|
1443
1443
|
}, [
|
|
1444
|
-
f("div",
|
|
1444
|
+
f("div", Io, [
|
|
1445
1445
|
X(mn, {
|
|
1446
1446
|
modelValue: A.hidden,
|
|
1447
1447
|
"onUpdate:modelValue": [
|
|
@@ -1468,34 +1468,34 @@ const ei = /* @__PURE__ */ Ko(Qo), ti = (e) => ({
|
|
|
1468
1468
|
], 6));
|
|
1469
1469
|
}
|
|
1470
1470
|
});
|
|
1471
|
-
function
|
|
1471
|
+
function Yo(e, t) {
|
|
1472
1472
|
return Object.fromEntries(Object.entries(e).filter(t));
|
|
1473
1473
|
}
|
|
1474
|
-
function
|
|
1474
|
+
function Eo(e, t) {
|
|
1475
1475
|
return Object.fromEntries(Object.entries(e).map(([n, s]) => [n, t(s)]));
|
|
1476
1476
|
}
|
|
1477
|
-
const
|
|
1477
|
+
const Ro = {
|
|
1478
1478
|
class: "baklava-node --palette",
|
|
1479
1479
|
style: { "margin-top": "-20px", "margin-bottom": "20px" }
|
|
1480
|
-
},
|
|
1480
|
+
}, Po = {
|
|
1481
1481
|
key: 0,
|
|
1482
1482
|
style: { display: "flex", "justify-content": "space-between" }
|
|
1483
|
-
},
|
|
1483
|
+
}, Lo = ["onClick"], Ao = {
|
|
1484
1484
|
key: 0,
|
|
1485
1485
|
style: { margin: "auto 0", "font-size": "12px" }
|
|
1486
1486
|
}, Vs = /* @__PURE__ */ ce({
|
|
1487
1487
|
__name: "CodeNodePalette",
|
|
1488
1488
|
setup(e) {
|
|
1489
|
-
const t = fn.PaletteEntry, { viewModel: n } = kt(), { x: s, y: r } = Aa(), { transform: a } = ca(),
|
|
1489
|
+
const t = fn.PaletteEntry, { viewModel: n } = kt(), { x: s, y: r } = Aa(), { transform: a } = ca(), i = ha(n), o = ia("editorEl"), l = ie(""), u = ie(null), h = () => l.value ? i.value.filter(
|
|
1490
1490
|
(y) => y.name.toLowerCase().includes(l.value.toLowerCase()) || Object.values(y.nodeTypes).some(
|
|
1491
1491
|
(O) => O.title.toLowerCase().includes(l.value.toLowerCase())
|
|
1492
1492
|
)
|
|
1493
|
-
) :
|
|
1493
|
+
) : i.value, w = (y) => l.value ? Yo(y, (O) => {
|
|
1494
1494
|
const c = O[1];
|
|
1495
1495
|
return c.category.includes(l.value.toLowerCase()) || c.title?.toLowerCase().includes(l.value.toLowerCase());
|
|
1496
1496
|
}) : y, p = z(() => {
|
|
1497
|
-
if (!u.value || !
|
|
1498
|
-
const { left: y, top: O } =
|
|
1497
|
+
if (!u.value || !o?.value) return {};
|
|
1498
|
+
const { left: y, top: O } = o.value.getBoundingClientRect();
|
|
1499
1499
|
return {
|
|
1500
1500
|
top: `${r.value - O}px`,
|
|
1501
1501
|
left: `${s.value - y}px`
|
|
@@ -1508,7 +1508,7 @@ const Ri = {
|
|
|
1508
1508
|
const c = () => {
|
|
1509
1509
|
const g = Ae(new O.type());
|
|
1510
1510
|
n.value.displayedGraph.addNode(g);
|
|
1511
|
-
const $ =
|
|
1511
|
+
const $ = o.value.getBoundingClientRect(), [A, F] = a(s.value - $.left, r.value - $.top);
|
|
1512
1512
|
g.position.x = A, g.position.y = F, u.value = null, document.removeEventListener("pointerup", c);
|
|
1513
1513
|
};
|
|
1514
1514
|
document.addEventListener("pointerup", c);
|
|
@@ -1519,7 +1519,7 @@ const Ri = {
|
|
|
1519
1519
|
onContextmenu: O[1] || (O[1] = st(() => {
|
|
1520
1520
|
}, ["stop", "prevent"]))
|
|
1521
1521
|
}, [
|
|
1522
|
-
f("div",
|
|
1522
|
+
f("div", Ro, [
|
|
1523
1523
|
Vt(f("input", {
|
|
1524
1524
|
"onUpdate:modelValue": O[0] || (O[0] = (c) => l.value = c),
|
|
1525
1525
|
type: "text",
|
|
@@ -1533,12 +1533,12 @@ const Ri = {
|
|
|
1533
1533
|
(m(!0), k(ae, null, Ke(h(), (c) => (m(), k("section", {
|
|
1534
1534
|
key: c.name
|
|
1535
1535
|
}, [
|
|
1536
|
-
c.name !== "default" ? (m(), k("h3",
|
|
1536
|
+
c.name !== "default" ? (m(), k("h3", Po, [
|
|
1537
1537
|
f("div", {
|
|
1538
1538
|
onClick: (g) => l.value = c.name,
|
|
1539
1539
|
style: { cursor: "pointer" }
|
|
1540
|
-
}, te(c.name), 9,
|
|
1541
|
-
Object.keys(w(c.nodeTypes)).length < Object.values(c.nodeTypes).length ? (m(), k("div",
|
|
1540
|
+
}, te(c.name), 9, Lo),
|
|
1541
|
+
Object.keys(w(c.nodeTypes)).length < Object.values(c.nodeTypes).length ? (m(), k("div", Ao, " ( " + te(Object.keys(w(c.nodeTypes)).length) + " / " + te(Object.values(c.nodeTypes).length) + " ) ", 1)) : K("", !0)
|
|
1542
1542
|
])) : K("", !0),
|
|
1543
1543
|
(m(!0), k(ae, null, Ke(w(c.nodeTypes), (g, $) => (m(), ue(H(t), {
|
|
1544
1544
|
key: $,
|
|
@@ -1548,7 +1548,7 @@ const Ri = {
|
|
|
1548
1548
|
}, null, 8, ["title", "type", "onPointerdown"]))), 128))
|
|
1549
1549
|
]))), 128))
|
|
1550
1550
|
], 34),
|
|
1551
|
-
X(
|
|
1551
|
+
X(oa, { name: "fade" }, {
|
|
1552
1552
|
default: Ye(() => [
|
|
1553
1553
|
u.value ? (m(), k("div", {
|
|
1554
1554
|
key: 0,
|
|
@@ -1565,23 +1565,23 @@ const Ri = {
|
|
|
1565
1565
|
})
|
|
1566
1566
|
], 64));
|
|
1567
1567
|
}
|
|
1568
|
-
}),
|
|
1569
|
-
function
|
|
1568
|
+
}), Uo = {}, $o = { class: "prependIcon" }, Wo = { class: "appendIcon" };
|
|
1569
|
+
function Ho(e, t) {
|
|
1570
1570
|
const n = _s("router-link");
|
|
1571
1571
|
return m(), ue(n, { class: "navItem" }, {
|
|
1572
1572
|
default: Ye(() => [
|
|
1573
|
-
f("span", $
|
|
1573
|
+
f("span", $o, [
|
|
1574
1574
|
Me(e.$slots, "prependIcon")
|
|
1575
1575
|
]),
|
|
1576
1576
|
Me(e.$slots, "default"),
|
|
1577
|
-
f("span",
|
|
1577
|
+
f("span", Wo, [
|
|
1578
1578
|
Me(e.$slots, "appendIcon")
|
|
1579
1579
|
])
|
|
1580
1580
|
]),
|
|
1581
1581
|
_: 3
|
|
1582
1582
|
});
|
|
1583
1583
|
}
|
|
1584
|
-
const vn = /* @__PURE__ */ q(
|
|
1584
|
+
const vn = /* @__PURE__ */ q(Uo, [["render", Ho]]), Fo = { class: "navbar" }, Go = ["onClick"], Vo = /* @__PURE__ */ ce({
|
|
1585
1585
|
__name: "NavBar",
|
|
1586
1586
|
props: {
|
|
1587
1587
|
viewModel: {},
|
|
@@ -1593,23 +1593,23 @@ const vn = /* @__PURE__ */ q(Ui, [["render", Hi]]), Fi = { class: "navbar" }, Gi
|
|
|
1593
1593
|
const n = t, s = (r) => {
|
|
1594
1594
|
n("click:remove", r);
|
|
1595
1595
|
};
|
|
1596
|
-
return (r, a) => (m(), k("nav",
|
|
1596
|
+
return (r, a) => (m(), k("nav", Fo, [
|
|
1597
1597
|
Me(r.$slots, "prepend"),
|
|
1598
|
-
(m(!0), k(ae, null, Ke(e.editorStates, (
|
|
1599
|
-
key:
|
|
1600
|
-
class: je({ active:
|
|
1601
|
-
to: { name: e.routes?.edit ?? "edit", params: { editorId:
|
|
1598
|
+
(m(!0), k(ae, null, Ke(e.editorStates, (i) => (m(), ue(vn, {
|
|
1599
|
+
key: i.graph.id,
|
|
1600
|
+
class: je({ active: i.graph.id === e.viewModel.displayedGraph.id }),
|
|
1601
|
+
to: { name: e.routes?.edit ?? "edit", params: { editorId: i.graph.id } }
|
|
1602
1602
|
}, {
|
|
1603
1603
|
appendIcon: Ye(() => [
|
|
1604
1604
|
f("button", {
|
|
1605
1605
|
class: "remove",
|
|
1606
|
-
onClick: st((
|
|
1606
|
+
onClick: st((o) => s(i.graph.id), ["prevent"])
|
|
1607
1607
|
}, [
|
|
1608
1608
|
X(H(Ws))
|
|
1609
|
-
], 8,
|
|
1609
|
+
], 8, Go)
|
|
1610
1610
|
]),
|
|
1611
1611
|
default: Ye(() => [
|
|
1612
|
-
ws(te(
|
|
1612
|
+
ws(te(i.graph.id.slice(0, 6)) + " ", 1)
|
|
1613
1613
|
]),
|
|
1614
1614
|
_: 2
|
|
1615
1615
|
}, 1032, ["class", "to"]))), 128)),
|
|
@@ -1626,7 +1626,7 @@ const vn = /* @__PURE__ */ q(Ui, [["render", Hi]]), Fi = { class: "navbar" }, Gi
|
|
|
1626
1626
|
])
|
|
1627
1627
|
]));
|
|
1628
1628
|
}
|
|
1629
|
-
}),
|
|
1629
|
+
}), jo = ce({
|
|
1630
1630
|
props: {
|
|
1631
1631
|
intf: {
|
|
1632
1632
|
type: Object,
|
|
@@ -1646,32 +1646,32 @@ const vn = /* @__PURE__ */ q(Ui, [["render", Hi]]), Fi = { class: "navbar" }, Gi
|
|
|
1646
1646
|
}
|
|
1647
1647
|
}) };
|
|
1648
1648
|
}
|
|
1649
|
-
}),
|
|
1650
|
-
function
|
|
1651
|
-
return m(), k("div",
|
|
1652
|
-
f("label",
|
|
1649
|
+
}), zo = { style: { position: "relative" } }, Bo = { style: { "font-size": "12px", padding: "0 6px", position: "absolute", top: "-8px", "background-color": "var(--baklava-node-color-background)" } }, Zo = ["placeholder", "title"];
|
|
1650
|
+
function qo(e, t, n, s, r, a) {
|
|
1651
|
+
return m(), k("div", zo, [
|
|
1652
|
+
f("label", Bo, te(e.intf.name), 1),
|
|
1653
1653
|
Vt(f("input", {
|
|
1654
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
1654
|
+
"onUpdate:modelValue": t[0] || (t[0] = (i) => e.v = i),
|
|
1655
1655
|
type: "text",
|
|
1656
1656
|
class: "baklava-input",
|
|
1657
1657
|
placeholder: e.intf.name,
|
|
1658
1658
|
title: e.intf.name
|
|
1659
|
-
}, null, 8,
|
|
1659
|
+
}, null, 8, Zo), [
|
|
1660
1660
|
[jt, e.v]
|
|
1661
1661
|
])
|
|
1662
1662
|
]);
|
|
1663
1663
|
}
|
|
1664
|
-
const js = /* @__PURE__ */ q(
|
|
1664
|
+
const js = /* @__PURE__ */ q(jo, [["render", qo]]), Rh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1665
1665
|
__proto__: null,
|
|
1666
|
-
CodeEditor:
|
|
1667
|
-
CodeGraphEditor:
|
|
1668
|
-
CodeGraphInfo:
|
|
1666
|
+
CodeEditor: ro,
|
|
1667
|
+
CodeGraphEditor: ao,
|
|
1668
|
+
CodeGraphInfo: oo,
|
|
1669
1669
|
CodeGraphNode: Fs,
|
|
1670
1670
|
CodeGraphNodeInterface: pn,
|
|
1671
1671
|
CodeGraphSidebar: Gs,
|
|
1672
1672
|
CodeNodePalette: Vs,
|
|
1673
1673
|
CopyToClipboard: Hs,
|
|
1674
|
-
NavBar:
|
|
1674
|
+
NavBar: Vo,
|
|
1675
1675
|
NavItem: vn,
|
|
1676
1676
|
SidebarCheckbox: mn,
|
|
1677
1677
|
TextInputInterface: js
|
|
@@ -1695,9 +1695,10 @@ class zs extends Ia {
|
|
|
1695
1695
|
modules: [],
|
|
1696
1696
|
props: null,
|
|
1697
1697
|
script: "",
|
|
1698
|
-
variableName: ""
|
|
1698
|
+
variableName: "",
|
|
1699
|
+
variableNameNumberAppendix: !0
|
|
1699
1700
|
}), this.codeTemplate = function() {
|
|
1700
|
-
return `${this.name}(${
|
|
1701
|
+
return `${this.name}(${Ko(this.codeNodeInputs).join(", ")})`;
|
|
1701
1702
|
};
|
|
1702
1703
|
}
|
|
1703
1704
|
get code() {
|
|
@@ -1763,7 +1764,7 @@ class zs extends Ia {
|
|
|
1763
1764
|
get subgraph() {
|
|
1764
1765
|
}
|
|
1765
1766
|
get variableName() {
|
|
1766
|
-
return this.state.variableName || this._variableName ? this.state.variableName || this._variableName + (this.idxByVariableNames + 1) : "";
|
|
1767
|
+
return this.state.variableName || this._variableName ? (this.state.variableName || this._variableName) + (this.state.variableNameNumberAppendix ? this.idxByVariableNames + 1 : "") : "";
|
|
1767
1768
|
}
|
|
1768
1769
|
/**
|
|
1769
1770
|
* Get connected node to the node interface.
|
|
@@ -1899,14 +1900,14 @@ class Dn extends zs {
|
|
|
1899
1900
|
super.load(t), this.afterLoaded();
|
|
1900
1901
|
}
|
|
1901
1902
|
}
|
|
1902
|
-
const
|
|
1903
|
+
const Ko = (e, t = !0) => {
|
|
1903
1904
|
const n = [], s = Object.keys(e);
|
|
1904
1905
|
return s.forEach((r) => {
|
|
1905
1906
|
if (e[r]?.hidden) return;
|
|
1906
|
-
const
|
|
1907
|
-
n.push(`${
|
|
1907
|
+
const i = t && n.length < s.indexOf(r) ? `${r}=` : "";
|
|
1908
|
+
n.push(`${i}{{ inputs.${r} }}`);
|
|
1908
1909
|
}), n;
|
|
1909
|
-
},
|
|
1910
|
+
}, Xo = (e, t) => {
|
|
1910
1911
|
switch (e) {
|
|
1911
1912
|
case "CheckBoxInterface":
|
|
1912
1913
|
return new el(t.id, t.value);
|
|
@@ -1929,7 +1930,7 @@ const Ki = (e, t = !0) => {
|
|
|
1929
1930
|
default:
|
|
1930
1931
|
return new Qs(t.id, t.value);
|
|
1931
1932
|
}
|
|
1932
|
-
},
|
|
1933
|
+
}, Jo = ["title"], In = /* @__PURE__ */ ce({
|
|
1933
1934
|
__name: "CodeNodeInterface",
|
|
1934
1935
|
props: {
|
|
1935
1936
|
intf: {}
|
|
@@ -1937,10 +1938,10 @@ const Ki = (e, t = !0) => {
|
|
|
1937
1938
|
setup(e) {
|
|
1938
1939
|
return (t, n) => (m(), k("div", {
|
|
1939
1940
|
title: e.intf.value
|
|
1940
|
-
}, te(e.intf.name), 9,
|
|
1941
|
+
}, te(e.intf.name), 9, Jo));
|
|
1941
1942
|
}
|
|
1942
1943
|
});
|
|
1943
|
-
class
|
|
1944
|
+
class oe extends Se {
|
|
1944
1945
|
isCodeNode = !0;
|
|
1945
1946
|
code;
|
|
1946
1947
|
state;
|
|
@@ -1973,7 +1974,7 @@ class ie extends Se {
|
|
|
1973
1974
|
return this.state.optional = t, this.setHidden(t), this;
|
|
1974
1975
|
}
|
|
1975
1976
|
}
|
|
1976
|
-
class Mt extends
|
|
1977
|
+
class Mt extends oe {
|
|
1977
1978
|
constructor(t = "", n) {
|
|
1978
1979
|
super(t, n), this.setComponent(he(In)), this.use(Ms, !0);
|
|
1979
1980
|
}
|
|
@@ -1984,8 +1985,8 @@ class Mt extends ie {
|
|
|
1984
1985
|
super.value = t, this.name !== "_code" && this.setHidden(!1);
|
|
1985
1986
|
}
|
|
1986
1987
|
}
|
|
1987
|
-
const Bs = new Je("boolean"),
|
|
1988
|
-
new Ua(e.editor, { viewPlugin: e }).addTypes(Bs,
|
|
1988
|
+
const Bs = new Je("boolean"), Qo = new Je("dict"), Zs = new Je("list"), _e = new Je("node"), qs = new Je("number"), Ks = new Je("string"), Xs = new Je("tuple"), Ph = (e) => {
|
|
1989
|
+
new Ua(e.editor, { viewPlugin: e }).addTypes(Bs, Qo, Zs, _e, qs, Ks, Xs);
|
|
1989
1990
|
};
|
|
1990
1991
|
class el extends Mt {
|
|
1991
1992
|
constructor(t, n) {
|
|
@@ -1993,7 +1994,7 @@ class el extends Mt {
|
|
|
1993
1994
|
}
|
|
1994
1995
|
getValue = () => this.value ? "True" : "False";
|
|
1995
1996
|
}
|
|
1996
|
-
class tl extends
|
|
1997
|
+
class tl extends oe {
|
|
1997
1998
|
isCodeNodeOutput = !0;
|
|
1998
1999
|
suffix = "";
|
|
1999
2000
|
constructor(t = "", n = "") {
|
|
@@ -2074,10 +2075,10 @@ function Wh(e) {
|
|
|
2074
2075
|
constructor() {
|
|
2075
2076
|
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(
|
|
2076
2077
|
"_code",
|
|
2077
|
-
new
|
|
2078
|
+
new oe("_code", []).use(ne, _e).use(lt).setHidden(!0)
|
|
2078
2079
|
), this.addOutput(
|
|
2079
2080
|
"_code",
|
|
2080
|
-
new
|
|
2081
|
+
new oe("_code", []).use(ne, _e).use(lt).setHidden(!0)
|
|
2081
2082
|
);
|
|
2082
2083
|
}
|
|
2083
2084
|
afterGraphLoaded() {
|
|
@@ -2119,10 +2120,10 @@ function Hh(e) {
|
|
|
2119
2120
|
constructor() {
|
|
2120
2121
|
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(
|
|
2121
2122
|
"_code",
|
|
2122
|
-
new
|
|
2123
|
+
new oe("_code", []).use(ne, _e).use(lt).setHidden(!0)
|
|
2123
2124
|
), this.addOutput(
|
|
2124
2125
|
"_code",
|
|
2125
|
-
new
|
|
2126
|
+
new oe("_code", []).use(ne, _e).use(lt).setHidden(!0)
|
|
2126
2127
|
), this.staticInputKeys.push("_code"), this.staticOutputKeys.push("_code");
|
|
2127
2128
|
}
|
|
2128
2129
|
afterGraphLoaded() {
|
|
@@ -2163,7 +2164,7 @@ function Hh(e) {
|
|
|
2163
2164
|
if (!this.inputs[n]) {
|
|
2164
2165
|
const s = t.inputs[n], r = s.value;
|
|
2165
2166
|
let a;
|
|
2166
|
-
s.component ? a =
|
|
2167
|
+
s.component ? a = Xo(s.component, { ...s, id: n }) : typeof r == "number" ? a = new Js(n, r) : a = new Qs(n, JSON.stringify(r)), a.use(Ms, !0), this.addInput(n, a);
|
|
2167
2168
|
}
|
|
2168
2169
|
this.inputs[n] && (this.inputs[n].load(t.inputs[n]), this.inputs[n].nodeId = this.id);
|
|
2169
2170
|
}
|
|
@@ -2194,12 +2195,12 @@ function Hh(e) {
|
|
|
2194
2195
|
}
|
|
2195
2196
|
updateInterfaces(t, n = {}, s = []) {
|
|
2196
2197
|
const r = t === "input" ? this.staticInputKeys : this.staticOutputKeys, a = t === "input" ? this.inputs : this.outputs;
|
|
2197
|
-
for (const
|
|
2198
|
-
r.includes(
|
|
2199
|
-
for (const
|
|
2200
|
-
if (a[
|
|
2201
|
-
const
|
|
2202
|
-
t === "input" ? this.addInput(
|
|
2198
|
+
for (const i of Object.keys(a))
|
|
2199
|
+
r.includes(i) || n[i] && !s.includes(i) || (t === "input" ? this.removeInput(i) : this.removeOutput(i));
|
|
2200
|
+
for (const i of Object.keys(n)) {
|
|
2201
|
+
if (a[i]) continue;
|
|
2202
|
+
const o = n[i]();
|
|
2203
|
+
t === "input" ? this.addInput(i, o) : this.addOutput(i, o);
|
|
2203
2204
|
}
|
|
2204
2205
|
}
|
|
2205
2206
|
updateProps(t) {
|
|
@@ -2304,24 +2305,24 @@ class al extends $a {
|
|
|
2304
2305
|
}
|
|
2305
2306
|
async runGraph(t, n, s) {
|
|
2306
2307
|
this.order.has(t.id) || this.order.set(t.id, Wa(t));
|
|
2307
|
-
const { calculationOrder: r, connectionsFromNode: a } = this.order.get(t.id),
|
|
2308
|
-
for (const
|
|
2308
|
+
const { calculationOrder: r, connectionsFromNode: a } = this.order.get(t.id), i = /* @__PURE__ */ new Map();
|
|
2309
|
+
for (const o of r) {
|
|
2309
2310
|
const l = {};
|
|
2310
|
-
Object.entries(
|
|
2311
|
+
Object.entries(o.inputs).forEach(([h, w]) => {
|
|
2311
2312
|
l[h] = this.getInterfaceValue(n, w.id);
|
|
2312
|
-
}),
|
|
2313
|
+
}), o.isCodeNode && (o.updateCodeTemplate(), o.updateOutputNames()), this.events.beforeNodeCalculation.emit({ inputValues: l, node: o });
|
|
2313
2314
|
let u;
|
|
2314
|
-
if (
|
|
2315
|
-
if (u = await
|
|
2315
|
+
if (o.calculate) {
|
|
2316
|
+
if (u = await o.calculate(l, { globalValues: s, engine: this }), a.has(o))
|
|
2316
2317
|
for (const [h, w] of Object.entries(u))
|
|
2317
|
-
this.hooks.transferData.execute(u[h], w), a.get(
|
|
2318
|
+
this.hooks.transferData.execute(u[h], w), a.get(o).forEach((p) => n.set(p.to.id, w));
|
|
2318
2319
|
} else {
|
|
2319
2320
|
u = {};
|
|
2320
|
-
for (const [h, w] of Object.entries(
|
|
2321
|
+
for (const [h, w] of Object.entries(o.outputs))
|
|
2321
2322
|
u[h] = this.getInterfaceValue(n, w.id);
|
|
2322
2323
|
}
|
|
2323
|
-
this.events.afterNodeCalculation.emit({ outputValues: u, node:
|
|
2324
|
-
const w = Object.entries(
|
|
2324
|
+
this.events.afterNodeCalculation.emit({ outputValues: u, node: o }), i.set(o.id, new Map(Object.entries(u))), a.has(o) && a.get(o).forEach((h) => {
|
|
2325
|
+
const w = Object.entries(o.outputs).find(([, I]) => I.id === h.from.id)?.[0];
|
|
2325
2326
|
if (!w)
|
|
2326
2327
|
throw new Error(
|
|
2327
2328
|
`Could not find key for interface ${h.from.id}
|
|
@@ -2331,7 +2332,7 @@ This is likely an internal issue. Please report it on GitHub.`
|
|
|
2331
2332
|
w !== "_code" && (h.to.allowMultipleConnections ? n.has(h.to.id) ? n.get(h.to.id).push(p) : n.set(h.to.id, [p]) : n.set(h.to.id, p));
|
|
2332
2333
|
});
|
|
2333
2334
|
}
|
|
2334
|
-
return
|
|
2335
|
+
return i;
|
|
2335
2336
|
}
|
|
2336
2337
|
async execute(t) {
|
|
2337
2338
|
this.recalculateOrder && (this.order.clear(), this.recalculateOrder = !1);
|
|
@@ -2364,7 +2365,7 @@ var er;
|
|
|
2364
2365
|
function v() {
|
|
2365
2366
|
return er.apply(null, arguments);
|
|
2366
2367
|
}
|
|
2367
|
-
function
|
|
2368
|
+
function il(e) {
|
|
2368
2369
|
er = e;
|
|
2369
2370
|
}
|
|
2370
2371
|
function ye(e) {
|
|
@@ -2408,7 +2409,7 @@ function Fe(e, t) {
|
|
|
2408
2409
|
function Oe(e, t, n, s) {
|
|
2409
2410
|
return Sr(e, t, n, s, !0).utc();
|
|
2410
2411
|
}
|
|
2411
|
-
function
|
|
2412
|
+
function ol() {
|
|
2412
2413
|
return {
|
|
2413
2414
|
empty: !1,
|
|
2414
2415
|
unusedTokens: [],
|
|
@@ -2429,7 +2430,7 @@ function il() {
|
|
|
2429
2430
|
};
|
|
2430
2431
|
}
|
|
2431
2432
|
function N(e) {
|
|
2432
|
-
return e._pf == null && (e._pf =
|
|
2433
|
+
return e._pf == null && (e._pf = ol()), e._pf;
|
|
2433
2434
|
}
|
|
2434
2435
|
var _n;
|
|
2435
2436
|
Array.prototype.some ? _n = Array.prototype.some : _n = function(e) {
|
|
@@ -2474,13 +2475,13 @@ function fe(e, t) {
|
|
|
2474
2475
|
var n = !0;
|
|
2475
2476
|
return Fe(function() {
|
|
2476
2477
|
if (v.deprecationHandler != null && v.deprecationHandler(null, e), n) {
|
|
2477
|
-
var s = [], r, a,
|
|
2478
|
-
for (a = 0; a <
|
|
2478
|
+
var s = [], r, a, i, o = arguments.length;
|
|
2479
|
+
for (a = 0; a < o; a++) {
|
|
2479
2480
|
if (r = "", typeof arguments[a] == "object") {
|
|
2480
2481
|
r += `
|
|
2481
2482
|
[` + a + "] ";
|
|
2482
|
-
for (
|
|
2483
|
-
P(arguments[0],
|
|
2483
|
+
for (i in arguments[0])
|
|
2484
|
+
P(arguments[0], i) && (r += i + ": " + arguments[0][i] + ", ");
|
|
2484
2485
|
r = r.slice(0, -2);
|
|
2485
2486
|
} else
|
|
2486
2487
|
r = arguments[a];
|
|
@@ -2568,9 +2569,9 @@ function hl(e) {
|
|
|
2568
2569
|
for (n = 0, s = t.length; n < s; n++)
|
|
2569
2570
|
at[t[n]] ? t[n] = at[t[n]] : t[n] = cl(t[n]);
|
|
2570
2571
|
return function(r) {
|
|
2571
|
-
var a = "",
|
|
2572
|
-
for (
|
|
2573
|
-
a += Ce(t[
|
|
2572
|
+
var a = "", i;
|
|
2573
|
+
for (i = 0; i < s; i++)
|
|
2574
|
+
a += Ce(t[i]) ? t[i].call(r, e) : t[i];
|
|
2574
2575
|
return a;
|
|
2575
2576
|
};
|
|
2576
2577
|
}
|
|
@@ -2722,7 +2723,7 @@ function Sl(e) {
|
|
|
2722
2723
|
return s.priority - r.priority;
|
|
2723
2724
|
}), t;
|
|
2724
2725
|
}
|
|
2725
|
-
var ar = /\d/, le = /\d\d/,
|
|
2726
|
+
var ar = /\d/, le = /\d\d/, ir = /\d{3}/, Hn = /\d{4}/, Bt = /[+-]?\d{6}/, V = /\d\d?/, or = /\d\d\d\d?/, lr = /\d\d\d\d\d\d?/, Zt = /\d{1,3}/, Fn = /\d{1,4}/, qt = /[+-]?\d{1,6}/, dt = /\d+/, Kt = /[+-]?\d+/, xl = /Z|[+-]\d\d:?\d\d/gi, Xt = /Z|[+-]\d\d(?::?\d\d)?/gi, Ol = /[+-]?\d+(\.\d{1,3})?/, Ot = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, ct = /^[1-9]\d?/, Gn = /^([1-9]\d|\d)/, Ut;
|
|
2726
2727
|
Ut = {};
|
|
2727
2728
|
function _(e, t, n) {
|
|
2728
2729
|
Ut[e] = Ce(t) ? t : function(s, r) {
|
|
@@ -2755,8 +2756,8 @@ function Y(e) {
|
|
|
2755
2756
|
var bn = {};
|
|
2756
2757
|
function U(e, t) {
|
|
2757
2758
|
var n, s = t, r;
|
|
2758
|
-
for (typeof e == "string" && (e = [e]), Ue(t) && (s = function(a,
|
|
2759
|
-
|
|
2759
|
+
for (typeof e == "string" && (e = [e]), Ue(t) && (s = function(a, i) {
|
|
2760
|
+
i[t] = Y(a);
|
|
2760
2761
|
}), r = e.length, n = 0; n < r; n++)
|
|
2761
2762
|
bn[e[n]] = s;
|
|
2762
2763
|
}
|
|
@@ -2838,7 +2839,7 @@ function yt(e, t) {
|
|
|
2838
2839
|
}
|
|
2839
2840
|
}
|
|
2840
2841
|
function dr(e, t, n) {
|
|
2841
|
-
var s, r, a,
|
|
2842
|
+
var s, r, a, i, o;
|
|
2842
2843
|
if (!(!e.isValid() || isNaN(n))) {
|
|
2843
2844
|
switch (s = e._d, r = e._isUTC, t) {
|
|
2844
2845
|
case "Milliseconds":
|
|
@@ -2861,7 +2862,7 @@ function dr(e, t, n) {
|
|
|
2861
2862
|
default:
|
|
2862
2863
|
return;
|
|
2863
2864
|
}
|
|
2864
|
-
a = n,
|
|
2865
|
+
a = n, i = e.month(), o = e.date(), o = o === 29 && i === 1 && !Jt(a) ? 28 : o, r ? s.setUTCFullYear(a, i, o) : s.setFullYear(a, i, o);
|
|
2865
2866
|
}
|
|
2866
2867
|
}
|
|
2867
2868
|
function El(e) {
|
|
@@ -2928,14 +2929,14 @@ function Wl(e, t) {
|
|
|
2928
2929
|
return e ? ye(this._monthsShort) ? this._monthsShort[e.month()] : this._monthsShort[hr.test(t) ? "format" : "standalone"][e.month()] : ye(this._monthsShort) ? this._monthsShort : this._monthsShort.standalone;
|
|
2929
2930
|
}
|
|
2930
2931
|
function Hl(e, t, n) {
|
|
2931
|
-
var s, r, a,
|
|
2932
|
+
var s, r, a, i = e.toLocaleLowerCase();
|
|
2932
2933
|
if (!this._monthsParse)
|
|
2933
2934
|
for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], s = 0; s < 12; ++s)
|
|
2934
2935
|
a = Oe([2e3, s]), this._shortMonthsParse[s] = this.monthsShort(
|
|
2935
2936
|
a,
|
|
2936
2937
|
""
|
|
2937
2938
|
).toLocaleLowerCase(), this._longMonthsParse[s] = this.months(a, "").toLocaleLowerCase();
|
|
2938
|
-
return n ? t === "MMM" ? (r = Z.call(this._shortMonthsParse,
|
|
2939
|
+
return n ? t === "MMM" ? (r = Z.call(this._shortMonthsParse, i), r !== -1 ? r : null) : (r = Z.call(this._longMonthsParse, i), r !== -1 ? r : null) : t === "MMM" ? (r = Z.call(this._shortMonthsParse, i), r !== -1 ? r : (r = Z.call(this._longMonthsParse, i), r !== -1 ? r : null)) : (r = Z.call(this._longMonthsParse, i), r !== -1 ? r : (r = Z.call(this._shortMonthsParse, i), r !== -1 ? r : null));
|
|
2939
2940
|
}
|
|
2940
2941
|
function Fl(e, t, n) {
|
|
2941
2942
|
var s, r, a;
|
|
@@ -2984,9 +2985,9 @@ function mr() {
|
|
|
2984
2985
|
function e(l, u) {
|
|
2985
2986
|
return u.length - l.length;
|
|
2986
2987
|
}
|
|
2987
|
-
var t = [], n = [], s = [], r, a,
|
|
2988
|
+
var t = [], n = [], s = [], r, a, i, o;
|
|
2988
2989
|
for (r = 0; r < 12; r++)
|
|
2989
|
-
a = Oe([2e3, r]),
|
|
2990
|
+
a = Oe([2e3, r]), i = Pe(this.monthsShort(a, "")), o = Pe(this.months(a, "")), t.push(i), n.push(o), s.push(o), s.push(i);
|
|
2990
2991
|
t.sort(e), n.sort(e), s.sort(e), this._monthsRegex = new RegExp("^(" + s.join("|") + ")", "i"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp(
|
|
2991
2992
|
"^(" + n.join("|") + ")",
|
|
2992
2993
|
"i"
|
|
@@ -2995,9 +2996,9 @@ function mr() {
|
|
|
2995
2996
|
"i"
|
|
2996
2997
|
);
|
|
2997
2998
|
}
|
|
2998
|
-
function zl(e, t, n, s, r, a,
|
|
2999
|
-
var
|
|
3000
|
-
return e < 100 && e >= 0 ? (
|
|
2999
|
+
function zl(e, t, n, s, r, a, i) {
|
|
3000
|
+
var o;
|
|
3001
|
+
return e < 100 && e >= 0 ? (o = new Date(e + 400, t, n, s, r, a, i), isFinite(o.getFullYear()) && o.setFullYear(e)) : o = new Date(e, t, n, s, r, a, i), o;
|
|
3001
3002
|
}
|
|
3002
3003
|
function gt(e) {
|
|
3003
3004
|
var t, n;
|
|
@@ -3008,17 +3009,17 @@ function $t(e, t, n) {
|
|
|
3008
3009
|
return -r + s - 1;
|
|
3009
3010
|
}
|
|
3010
3011
|
function vr(e, t, n, s, r) {
|
|
3011
|
-
var a = (7 + n - s) % 7,
|
|
3012
|
-
return
|
|
3012
|
+
var a = (7 + n - s) % 7, i = $t(e, s, r), o = 1 + 7 * (t - 1) + a + i, l, u;
|
|
3013
|
+
return o <= 0 ? (l = e - 1, u = _t(l) + o) : o > _t(e) ? (l = e + 1, u = o - _t(e)) : (l = e, u = o), {
|
|
3013
3014
|
year: l,
|
|
3014
3015
|
dayOfYear: u
|
|
3015
3016
|
};
|
|
3016
3017
|
}
|
|
3017
3018
|
function bt(e, t, n) {
|
|
3018
|
-
var s = $t(e.year(), t, n), r = Math.floor((e.dayOfYear() - s - 1) / 7) + 1, a,
|
|
3019
|
-
return r < 1 ? (
|
|
3019
|
+
var s = $t(e.year(), t, n), r = Math.floor((e.dayOfYear() - s - 1) / 7) + 1, a, i;
|
|
3020
|
+
return r < 1 ? (i = e.year() - 1, a = r + Le(i, t, n)) : r > Le(e.year(), t, n) ? (a = r - Le(e.year(), t, n), i = e.year() + 1) : (i = e.year(), a = r), {
|
|
3020
3021
|
week: a,
|
|
3021
|
-
year:
|
|
3022
|
+
year: i
|
|
3022
3023
|
};
|
|
3023
3024
|
}
|
|
3024
3025
|
function Le(e, t, n) {
|
|
@@ -3101,18 +3102,18 @@ function jn(e, t) {
|
|
|
3101
3102
|
return e.slice(t, 7).concat(e.slice(0, t));
|
|
3102
3103
|
}
|
|
3103
3104
|
var tu = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), _r = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), nu = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), su = Ot, ru = Ot, au = Ot;
|
|
3104
|
-
function
|
|
3105
|
+
function iu(e, t) {
|
|
3105
3106
|
var n = ye(this._weekdays) ? this._weekdays : this._weekdays[e && e !== !0 && this._weekdays.isFormat.test(t) ? "format" : "standalone"];
|
|
3106
3107
|
return e === !0 ? jn(n, this._week.dow) : e ? n[e.day()] : n;
|
|
3107
3108
|
}
|
|
3108
|
-
function
|
|
3109
|
+
function ou(e) {
|
|
3109
3110
|
return e === !0 ? jn(this._weekdaysShort, this._week.dow) : e ? this._weekdaysShort[e.day()] : this._weekdaysShort;
|
|
3110
3111
|
}
|
|
3111
3112
|
function lu(e) {
|
|
3112
3113
|
return e === !0 ? jn(this._weekdaysMin, this._week.dow) : e ? this._weekdaysMin[e.day()] : this._weekdaysMin;
|
|
3113
3114
|
}
|
|
3114
3115
|
function uu(e, t, n) {
|
|
3115
|
-
var s, r, a,
|
|
3116
|
+
var s, r, a, i = e.toLocaleLowerCase();
|
|
3116
3117
|
if (!this._weekdaysParse)
|
|
3117
3118
|
for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], s = 0; s < 7; ++s)
|
|
3118
3119
|
a = Oe([2e3, 1]).day(s), this._minWeekdaysParse[s] = this.weekdaysMin(
|
|
@@ -3122,7 +3123,7 @@ function uu(e, t, n) {
|
|
|
3122
3123
|
a,
|
|
3123
3124
|
""
|
|
3124
3125
|
).toLocaleLowerCase(), this._weekdaysParse[s] = this.weekdays(a, "").toLocaleLowerCase();
|
|
3125
|
-
return n ? t === "dddd" ? (r = Z.call(this._weekdaysParse,
|
|
3126
|
+
return n ? t === "dddd" ? (r = Z.call(this._weekdaysParse, i), r !== -1 ? r : null) : t === "ddd" ? (r = Z.call(this._shortWeekdaysParse, i), r !== -1 ? r : null) : (r = Z.call(this._minWeekdaysParse, i), r !== -1 ? r : null) : t === "dddd" ? (r = Z.call(this._weekdaysParse, i), r !== -1 || (r = Z.call(this._shortWeekdaysParse, i), r !== -1) ? r : (r = Z.call(this._minWeekdaysParse, i), r !== -1 ? r : null)) : t === "ddd" ? (r = Z.call(this._shortWeekdaysParse, i), r !== -1 || (r = Z.call(this._weekdaysParse, i), r !== -1) ? r : (r = Z.call(this._minWeekdaysParse, i), r !== -1 ? r : null)) : (r = Z.call(this._minWeekdaysParse, i), r !== -1 || (r = Z.call(this._weekdaysParse, i), r !== -1) ? r : (r = Z.call(this._shortWeekdaysParse, i), r !== -1 ? r : null));
|
|
3126
3127
|
}
|
|
3127
3128
|
function du(e, t, n) {
|
|
3128
3129
|
var s, r, a;
|
|
@@ -3182,9 +3183,9 @@ function zn() {
|
|
|
3182
3183
|
function e(h, w) {
|
|
3183
3184
|
return w.length - h.length;
|
|
3184
3185
|
}
|
|
3185
|
-
var t = [], n = [], s = [], r = [], a,
|
|
3186
|
+
var t = [], n = [], s = [], r = [], a, i, o, l, u;
|
|
3186
3187
|
for (a = 0; a < 7; a++)
|
|
3187
|
-
|
|
3188
|
+
i = Oe([2e3, 1]).day(a), o = Pe(this.weekdaysMin(i, "")), l = Pe(this.weekdaysShort(i, "")), u = Pe(this.weekdays(i, "")), t.push(o), n.push(l), s.push(u), r.push(o), r.push(l), r.push(u);
|
|
3188
3189
|
t.sort(e), n.sort(e), s.sort(e), r.sort(e), this._weekdaysRegex = new RegExp("^(" + r.join("|") + ")", "i"), this._weekdaysShortRegex = this._weekdaysRegex, this._weekdaysMinRegex = this._weekdaysRegex, this._weekdaysStrictRegex = new RegExp(
|
|
3189
3190
|
"^(" + s.join("|") + ")",
|
|
3190
3191
|
"i"
|
|
@@ -3239,9 +3240,9 @@ _("k", V, ct);
|
|
|
3239
3240
|
_("HH", V, le);
|
|
3240
3241
|
_("hh", V, le);
|
|
3241
3242
|
_("kk", V, le);
|
|
3242
|
-
_("hmm",
|
|
3243
|
+
_("hmm", or);
|
|
3243
3244
|
_("hmmss", lr);
|
|
3244
|
-
_("Hmm",
|
|
3245
|
+
_("Hmm", or);
|
|
3245
3246
|
_("Hmmss", lr);
|
|
3246
3247
|
U(["H", "HH"], J);
|
|
3247
3248
|
U(["k", "kk"], function(e, t, n) {
|
|
@@ -3421,29 +3422,29 @@ var Cu = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(
|
|
|
3421
3422
|
PST: -480
|
|
3422
3423
|
};
|
|
3423
3424
|
function wr(e) {
|
|
3424
|
-
var t, n, s = e._i, r = Cu.exec(s) || Tu.exec(s), a,
|
|
3425
|
+
var t, n, s = e._i, r = Cu.exec(s) || Tu.exec(s), a, i, o, l, u = Et.length, h = dn.length;
|
|
3425
3426
|
if (r) {
|
|
3426
3427
|
for (N(e).iso = !0, t = 0, n = u; t < n; t++)
|
|
3427
3428
|
if (Et[t][1].exec(r[1])) {
|
|
3428
|
-
|
|
3429
|
+
i = Et[t][0], a = Et[t][2] !== !1;
|
|
3429
3430
|
break;
|
|
3430
3431
|
}
|
|
3431
|
-
if (
|
|
3432
|
+
if (i == null) {
|
|
3432
3433
|
e._isValid = !1;
|
|
3433
3434
|
return;
|
|
3434
3435
|
}
|
|
3435
3436
|
if (r[3]) {
|
|
3436
3437
|
for (t = 0, n = h; t < n; t++)
|
|
3437
3438
|
if (dn[t][1].exec(r[3])) {
|
|
3438
|
-
|
|
3439
|
+
o = (r[2] || " ") + dn[t][0];
|
|
3439
3440
|
break;
|
|
3440
3441
|
}
|
|
3441
|
-
if (
|
|
3442
|
+
if (o == null) {
|
|
3442
3443
|
e._isValid = !1;
|
|
3443
3444
|
return;
|
|
3444
3445
|
}
|
|
3445
3446
|
}
|
|
3446
|
-
if (!a &&
|
|
3447
|
+
if (!a && o != null) {
|
|
3447
3448
|
e._isValid = !1;
|
|
3448
3449
|
return;
|
|
3449
3450
|
}
|
|
@@ -3454,19 +3455,19 @@ function wr(e) {
|
|
|
3454
3455
|
e._isValid = !1;
|
|
3455
3456
|
return;
|
|
3456
3457
|
}
|
|
3457
|
-
e._f =
|
|
3458
|
+
e._f = i + (o || "") + (l || ""), Xn(e);
|
|
3458
3459
|
} else
|
|
3459
3460
|
e._isValid = !1;
|
|
3460
3461
|
}
|
|
3461
3462
|
function Eu(e, t, n, s, r, a) {
|
|
3462
|
-
var
|
|
3463
|
+
var i = [
|
|
3463
3464
|
Ru(e),
|
|
3464
3465
|
cr.indexOf(t),
|
|
3465
3466
|
parseInt(n, 10),
|
|
3466
3467
|
parseInt(s, 10),
|
|
3467
3468
|
parseInt(r, 10)
|
|
3468
3469
|
];
|
|
3469
|
-
return a &&
|
|
3470
|
+
return a && i.push(parseInt(a, 10)), i;
|
|
3470
3471
|
}
|
|
3471
3472
|
function Ru(e) {
|
|
3472
3473
|
var t = parseInt(e, 10);
|
|
@@ -3545,9 +3546,9 @@ function $u(e) {
|
|
|
3545
3546
|
] : [t.getFullYear(), t.getMonth(), t.getDate()];
|
|
3546
3547
|
}
|
|
3547
3548
|
function Kn(e) {
|
|
3548
|
-
var t, n, s = [], r, a,
|
|
3549
|
+
var t, n, s = [], r, a, i;
|
|
3549
3550
|
if (!e._d) {
|
|
3550
|
-
for (r = $u(e), e._w && e._a[ke] == null && e._a[Ee] == null && Wu(e), e._dayOfYear != null && (
|
|
3551
|
+
for (r = $u(e), e._w && e._a[ke] == null && e._a[Ee] == null && Wu(e), e._dayOfYear != null && (i = nt(e._a[ee], r[ee]), (e._dayOfYear > _t(i) || e._dayOfYear === 0) && (N(e)._overflowDayOfYear = !0), n = gt(i, 0, e._dayOfYear), e._a[Ee] = n.getUTCMonth(), e._a[ke] = n.getUTCDate()), t = 0; t < 3 && e._a[t] == null; ++t)
|
|
3551
3552
|
e._a[t] = s[t] = r[t];
|
|
3552
3553
|
for (; t < 7; t++)
|
|
3553
3554
|
e._a[t] = s[t] = e._a[t] == null ? t === 2 ? 1 : 0 : e._a[t];
|
|
@@ -3558,12 +3559,12 @@ function Kn(e) {
|
|
|
3558
3559
|
}
|
|
3559
3560
|
}
|
|
3560
3561
|
function Wu(e) {
|
|
3561
|
-
var t, n, s, r, a,
|
|
3562
|
-
t = e._w, t.GG != null || t.W != null || t.E != null ? (a = 1,
|
|
3562
|
+
var t, n, s, r, a, i, o, l, u;
|
|
3563
|
+
t = e._w, t.GG != null || t.W != null || t.E != null ? (a = 1, i = 4, n = nt(
|
|
3563
3564
|
t.GG,
|
|
3564
3565
|
e._a[ee],
|
|
3565
3566
|
bt(G(), 1, 4).year
|
|
3566
|
-
), s = nt(t.W, 1), r = nt(t.E, 1), (r < 1 || r > 7) && (l = !0)) : (a = e._locale._week.dow,
|
|
3567
|
+
), s = nt(t.W, 1), r = nt(t.E, 1), (r < 1 || r > 7) && (l = !0)) : (a = e._locale._week.dow, i = e._locale._week.doy, u = bt(G(), a, i), n = nt(t.gg, e._a[ee], u.year), s = nt(t.w, u.week), t.d != null ? (r = t.d, (r < 0 || r > 6) && (l = !0)) : t.e != null ? (r = t.e + a, (t.e < 0 || t.e > 6) && (l = !0)) : r = a), s < 1 || s > Le(n, a, i) ? N(e)._overflowWeeks = !0 : l != null ? N(e)._overflowWeekday = !0 : (o = vr(n, s, r, a, i), e._a[ee] = o.year, e._dayOfYear = o.dayOfYear);
|
|
3567
3568
|
}
|
|
3568
3569
|
v.ISO_8601 = function() {
|
|
3569
3570
|
};
|
|
@@ -3579,12 +3580,12 @@ function Xn(e) {
|
|
|
3579
3580
|
return;
|
|
3580
3581
|
}
|
|
3581
3582
|
e._a = [], N(e).empty = !0;
|
|
3582
|
-
var t = "" + e._i, n, s, r, a,
|
|
3583
|
+
var t = "" + e._i, n, s, r, a, i, o = t.length, l = 0, u, h;
|
|
3583
3584
|
for (r = rr(e._f, e._locale).match($n) || [], h = r.length, n = 0; n < h; n++)
|
|
3584
|
-
a = r[n], s = (t.match(Cl(a, e)) || [])[0], s && (
|
|
3585
|
+
a = r[n], s = (t.match(Cl(a, e)) || [])[0], s && (i = t.substr(0, t.indexOf(s)), i.length > 0 && N(e).unusedInput.push(i), t = t.slice(
|
|
3585
3586
|
t.indexOf(s) + s.length
|
|
3586
3587
|
), l += s.length), at[a] ? (s ? N(e).empty = !1 : N(e).unusedTokens.push(a), Nl(a, s, e)) : e._strict && !s && N(e).unusedTokens.push(a);
|
|
3587
|
-
N(e).charsLeftOver =
|
|
3588
|
+
N(e).charsLeftOver = o - l, t.length > 0 && N(e).unusedInput.push(t), e._a[J] <= 12 && N(e).bigHour === !0 && e._a[J] > 0 && (N(e).bigHour = void 0), N(e).parsedDateParts = e._a.slice(0), N(e).meridiem = e._meridiem, e._a[J] = Hu(
|
|
3588
3589
|
e._locale,
|
|
3589
3590
|
e._a[J],
|
|
3590
3591
|
e._meridiem
|
|
@@ -3595,13 +3596,13 @@ function Hu(e, t, n) {
|
|
|
3595
3596
|
return n == null ? t : e.meridiemHour != null ? e.meridiemHour(t, n) : (e.isPM != null && (s = e.isPM(n), s && t < 12 && (t += 12), !s && t === 12 && (t = 0)), t);
|
|
3596
3597
|
}
|
|
3597
3598
|
function Fu(e) {
|
|
3598
|
-
var t, n, s, r, a,
|
|
3599
|
+
var t, n, s, r, a, i, o = !1, l = e._f.length;
|
|
3599
3600
|
if (l === 0) {
|
|
3600
3601
|
N(e).invalidFormat = !0, e._d = /* @__PURE__ */ new Date(NaN);
|
|
3601
3602
|
return;
|
|
3602
3603
|
}
|
|
3603
3604
|
for (r = 0; r < l; r++)
|
|
3604
|
-
a = 0,
|
|
3605
|
+
a = 0, i = !1, t = An({}, e), e._useUTC != null && (t._useUTC = e._useUTC), t._f = e._f[r], Xn(t), Ln(t) && (i = !0), a += N(t).charsLeftOver, a += N(t).unusedTokens.length * 10, N(t).score = a, o ? a < s && (s = a, n = t) : (s == null || a < s || i) && (s = a, n = t, i && (o = !0));
|
|
3605
3606
|
Fe(e, n || t);
|
|
3606
3607
|
}
|
|
3607
3608
|
function Gu(e) {
|
|
@@ -3698,10 +3699,10 @@ function Qu() {
|
|
|
3698
3699
|
return be(NaN);
|
|
3699
3700
|
}
|
|
3700
3701
|
function en(e) {
|
|
3701
|
-
var t = Wn(e), n = t.year || 0, s = t.quarter || 0, r = t.month || 0, a = t.week || t.isoWeek || 0,
|
|
3702
|
+
var t = Wn(e), n = t.year || 0, s = t.quarter || 0, r = t.month || 0, a = t.week || t.isoWeek || 0, i = t.day || 0, o = t.hour || 0, l = t.minute || 0, u = t.second || 0, h = t.millisecond || 0;
|
|
3702
3703
|
this._isValid = Xu(t), this._milliseconds = +h + u * 1e3 + // 1000
|
|
3703
3704
|
l * 6e4 + // 1000 * 60
|
|
3704
|
-
|
|
3705
|
+
o * 1e3 * 60 * 60, this._days = +i + a * 7, this._months = +r + s * 3 + n * 12, this._data = {}, this._locale = $e(), this._bubble();
|
|
3705
3706
|
}
|
|
3706
3707
|
function Lt(e) {
|
|
3707
3708
|
return e instanceof en;
|
|
@@ -3710,9 +3711,9 @@ function wn(e) {
|
|
|
3710
3711
|
return e < 0 ? Math.round(-1 * e) * -1 : Math.round(e);
|
|
3711
3712
|
}
|
|
3712
3713
|
function ed(e, t, n) {
|
|
3713
|
-
var s = Math.min(e.length, t.length), r = Math.abs(e.length - t.length), a = 0,
|
|
3714
|
-
for (
|
|
3715
|
-
Y(e[
|
|
3714
|
+
var s = Math.min(e.length, t.length), r = Math.abs(e.length - t.length), a = 0, i;
|
|
3715
|
+
for (i = 0; i < s; i++)
|
|
3716
|
+
Y(e[i]) !== Y(t[i]) && a++;
|
|
3716
3717
|
return a + r;
|
|
3717
3718
|
}
|
|
3718
3719
|
function Or(e, t) {
|
|
@@ -3769,7 +3770,7 @@ function rd(e) {
|
|
|
3769
3770
|
function ad(e) {
|
|
3770
3771
|
return this._isUTC && (this.utcOffset(0, e), this._isUTC = !1, e && this.subtract(kn(this), "m")), this;
|
|
3771
3772
|
}
|
|
3772
|
-
function
|
|
3773
|
+
function id() {
|
|
3773
3774
|
if (this._tzm != null)
|
|
3774
3775
|
this.utcOffset(this._tzm, !1, !0);
|
|
3775
3776
|
else if (typeof this._i == "string") {
|
|
@@ -3778,7 +3779,7 @@ function od() {
|
|
|
3778
3779
|
}
|
|
3779
3780
|
return this;
|
|
3780
3781
|
}
|
|
3781
|
-
function
|
|
3782
|
+
function od(e) {
|
|
3782
3783
|
return this.isValid() ? (e = e ? G(e).utcOffset() : 0, (this.utcOffset() - e) % 60 === 0) : !1;
|
|
3783
3784
|
}
|
|
3784
3785
|
function ld() {
|
|
@@ -3801,7 +3802,7 @@ function Cr() {
|
|
|
3801
3802
|
}
|
|
3802
3803
|
var hd = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, fd = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
|
|
3803
3804
|
function be(e, t) {
|
|
3804
|
-
var n = e, s = null, r, a,
|
|
3805
|
+
var n = e, s = null, r, a, i;
|
|
3805
3806
|
return Lt(e) ? n = {
|
|
3806
3807
|
ms: e._milliseconds,
|
|
3807
3808
|
d: e._days,
|
|
@@ -3822,10 +3823,10 @@ function be(e, t) {
|
|
|
3822
3823
|
h: Be(s[6], r),
|
|
3823
3824
|
m: Be(s[7], r),
|
|
3824
3825
|
s: Be(s[8], r)
|
|
3825
|
-
}) : n == null ? n = {} : typeof n == "object" && ("from" in n || "to" in n) && (
|
|
3826
|
+
}) : n == null ? n = {} : typeof n == "object" && ("from" in n || "to" in n) && (i = pd(
|
|
3826
3827
|
G(n.from),
|
|
3827
3828
|
G(n.to)
|
|
3828
|
-
), n = {}, n.ms =
|
|
3829
|
+
), n = {}, n.ms = i.milliseconds, n.M = i.months), a = new en(n), Lt(e) && P(e, "_locale") && (a._locale = e._locale), Lt(e) && P(e, "_isValid") && (a._isValid = e._isValid), a;
|
|
3829
3830
|
}
|
|
3830
3831
|
be.fn = en.prototype;
|
|
3831
3832
|
be.invalid = Qu;
|
|
@@ -3851,8 +3852,8 @@ function Tr(e, t) {
|
|
|
3851
3852
|
};
|
|
3852
3853
|
}
|
|
3853
3854
|
function Nr(e, t, n, s) {
|
|
3854
|
-
var r = t._milliseconds, a = wn(t._days),
|
|
3855
|
-
e.isValid() && (s = s ?? !0,
|
|
3855
|
+
var r = t._milliseconds, a = wn(t._days), i = wn(t._months);
|
|
3856
|
+
e.isValid() && (s = s ?? !0, i && fr(e, yt(e, "Month") + i * n), a && dr(e, "Date", yt(e, "Date") + a * n), r && e._d.setTime(e._d.valueOf() + r * n), s && v.updateOffset(e, a || i));
|
|
3856
3857
|
}
|
|
3857
3858
|
var md = Tr(1, "add"), vd = Tr(-1, "subtract");
|
|
3858
3859
|
function Dr(e) {
|
|
@@ -3887,8 +3888,8 @@ function yd(e) {
|
|
|
3887
3888
|
"milliseconds",
|
|
3888
3889
|
"millisecond",
|
|
3889
3890
|
"ms"
|
|
3890
|
-
], r, a,
|
|
3891
|
-
for (r = 0; r <
|
|
3891
|
+
], r, a, i = s.length;
|
|
3892
|
+
for (r = 0; r < i; r += 1)
|
|
3892
3893
|
a = s[r], n = n || P(e, a);
|
|
3893
3894
|
return t && n;
|
|
3894
3895
|
}
|
|
@@ -4047,8 +4048,8 @@ var Yr = fe(
|
|
|
4047
4048
|
function Er() {
|
|
4048
4049
|
return this._locale;
|
|
4049
4050
|
}
|
|
4050
|
-
var Wt = 1e3,
|
|
4051
|
-
function
|
|
4051
|
+
var Wt = 1e3, it = 60 * Wt, Ht = 60 * it, Rr = (365 * 400 + 97) * 24 * Ht;
|
|
4052
|
+
function ot(e, t) {
|
|
4052
4053
|
return (e % t + t) % t;
|
|
4053
4054
|
}
|
|
4054
4055
|
function Pr(e, t, n) {
|
|
@@ -4094,16 +4095,16 @@ function $d(e) {
|
|
|
4094
4095
|
t = n(this.year(), this.month(), this.date());
|
|
4095
4096
|
break;
|
|
4096
4097
|
case "hour":
|
|
4097
|
-
t = this._d.valueOf(), t -=
|
|
4098
|
-
t + (this._isUTC ? 0 : this.utcOffset() *
|
|
4098
|
+
t = this._d.valueOf(), t -= ot(
|
|
4099
|
+
t + (this._isUTC ? 0 : this.utcOffset() * it),
|
|
4099
4100
|
Ht
|
|
4100
4101
|
);
|
|
4101
4102
|
break;
|
|
4102
4103
|
case "minute":
|
|
4103
|
-
t = this._d.valueOf(), t -=
|
|
4104
|
+
t = this._d.valueOf(), t -= ot(t, it);
|
|
4104
4105
|
break;
|
|
4105
4106
|
case "second":
|
|
4106
|
-
t = this._d.valueOf(), t -=
|
|
4107
|
+
t = this._d.valueOf(), t -= ot(t, Wt);
|
|
4107
4108
|
break;
|
|
4108
4109
|
}
|
|
4109
4110
|
return this._d.setTime(t), v.updateOffset(this, !0), this;
|
|
@@ -4145,16 +4146,16 @@ function Wd(e) {
|
|
|
4145
4146
|
t = n(this.year(), this.month(), this.date() + 1) - 1;
|
|
4146
4147
|
break;
|
|
4147
4148
|
case "hour":
|
|
4148
|
-
t = this._d.valueOf(), t += Ht -
|
|
4149
|
-
t + (this._isUTC ? 0 : this.utcOffset() *
|
|
4149
|
+
t = this._d.valueOf(), t += Ht - ot(
|
|
4150
|
+
t + (this._isUTC ? 0 : this.utcOffset() * it),
|
|
4150
4151
|
Ht
|
|
4151
4152
|
) - 1;
|
|
4152
4153
|
break;
|
|
4153
4154
|
case "minute":
|
|
4154
|
-
t = this._d.valueOf(), t +=
|
|
4155
|
+
t = this._d.valueOf(), t += it - ot(t, it) - 1;
|
|
4155
4156
|
break;
|
|
4156
4157
|
case "second":
|
|
4157
|
-
t = this._d.valueOf(), t += Wt -
|
|
4158
|
+
t = this._d.valueOf(), t += Wt - ot(t, Wt) - 1;
|
|
4158
4159
|
break;
|
|
4159
4160
|
}
|
|
4160
4161
|
return this._d.setTime(t), v.updateOffset(this, !0), this;
|
|
@@ -4225,7 +4226,7 @@ x("y", ["yyyy", 4], 0, "eraYear");
|
|
|
4225
4226
|
_("N", es);
|
|
4226
4227
|
_("NN", es);
|
|
4227
4228
|
_("NNN", es);
|
|
4228
|
-
_("NNNN",
|
|
4229
|
+
_("NNNN", oc);
|
|
4229
4230
|
_("NNNNN", lc);
|
|
4230
4231
|
U(
|
|
4231
4232
|
["N", "NN", "NNN", "NNNN", "NNNNN"],
|
|
@@ -4258,18 +4259,18 @@ function Xd(e, t) {
|
|
|
4258
4259
|
return a;
|
|
4259
4260
|
}
|
|
4260
4261
|
function Jd(e, t, n) {
|
|
4261
|
-
var s, r, a = this.eras(),
|
|
4262
|
+
var s, r, a = this.eras(), i, o, l;
|
|
4262
4263
|
for (e = e.toUpperCase(), s = 0, r = a.length; s < r; ++s)
|
|
4263
|
-
if (
|
|
4264
|
+
if (i = a[s].name.toUpperCase(), o = a[s].abbr.toUpperCase(), l = a[s].narrow.toUpperCase(), n)
|
|
4264
4265
|
switch (t) {
|
|
4265
4266
|
case "N":
|
|
4266
4267
|
case "NN":
|
|
4267
4268
|
case "NNN":
|
|
4268
|
-
if (
|
|
4269
|
+
if (o === e)
|
|
4269
4270
|
return a[s];
|
|
4270
4271
|
break;
|
|
4271
4272
|
case "NNNN":
|
|
4272
|
-
if (
|
|
4273
|
+
if (i === e)
|
|
4273
4274
|
return a[s];
|
|
4274
4275
|
break;
|
|
4275
4276
|
case "NNNNN":
|
|
@@ -4277,7 +4278,7 @@ function Jd(e, t, n) {
|
|
|
4277
4278
|
return a[s];
|
|
4278
4279
|
break;
|
|
4279
4280
|
}
|
|
4280
|
-
else if ([
|
|
4281
|
+
else if ([i, o, l].indexOf(e) >= 0)
|
|
4281
4282
|
return a[s];
|
|
4282
4283
|
}
|
|
4283
4284
|
function Qd(e, t) {
|
|
@@ -4318,13 +4319,13 @@ function rc(e) {
|
|
|
4318
4319
|
function ac(e) {
|
|
4319
4320
|
return P(this, "_erasAbbrRegex") || ts.call(this), e ? this._erasAbbrRegex : this._erasRegex;
|
|
4320
4321
|
}
|
|
4321
|
-
function
|
|
4322
|
+
function ic(e) {
|
|
4322
4323
|
return P(this, "_erasNarrowRegex") || ts.call(this), e ? this._erasNarrowRegex : this._erasRegex;
|
|
4323
4324
|
}
|
|
4324
4325
|
function es(e, t) {
|
|
4325
4326
|
return t.erasAbbrRegex(e);
|
|
4326
4327
|
}
|
|
4327
|
-
function
|
|
4328
|
+
function oc(e, t) {
|
|
4328
4329
|
return t.erasNameRegex(e);
|
|
4329
4330
|
}
|
|
4330
4331
|
function lc(e, t) {
|
|
@@ -4334,9 +4335,9 @@ function uc(e, t) {
|
|
|
4334
4335
|
return t._eraYearOrdinalRegex || dt;
|
|
4335
4336
|
}
|
|
4336
4337
|
function ts() {
|
|
4337
|
-
var e = [], t = [], n = [], s = [], r, a,
|
|
4338
|
+
var e = [], t = [], n = [], s = [], r, a, i, o, l, u = this.eras();
|
|
4338
4339
|
for (r = 0, a = u.length; r < a; ++r)
|
|
4339
|
-
|
|
4340
|
+
i = Pe(u[r].name), o = Pe(u[r].abbr), l = Pe(u[r].narrow), t.push(i), e.push(o), n.push(l), s.push(i), s.push(o), s.push(l);
|
|
4340
4341
|
this._erasRegex = new RegExp("^(" + s.join("|") + ")", "i"), this._erasNameRegex = new RegExp("^(" + t.join("|") + ")", "i"), this._erasAbbrRegex = new RegExp("^(" + e.join("|") + ")", "i"), this._erasNarrowRegex = new RegExp(
|
|
4341
4342
|
"^(" + n.join("|") + ")",
|
|
4342
4343
|
"i"
|
|
@@ -4411,8 +4412,8 @@ function Ar(e, t, n, s, r) {
|
|
|
4411
4412
|
return e == null ? bt(this, s, r).year : (a = Le(e, s, r), t > a && (t = a), vc.call(this, e, t, n, s, r));
|
|
4412
4413
|
}
|
|
4413
4414
|
function vc(e, t, n, s, r) {
|
|
4414
|
-
var a = vr(e, t, n, s, r),
|
|
4415
|
-
return this.year(
|
|
4415
|
+
var a = vr(e, t, n, s, r), i = gt(a.year, 0, a.dayOfYear);
|
|
4416
|
+
return this.year(i.getUTCFullYear()), this.month(i.getUTCMonth()), this.date(i.getUTCDate()), this;
|
|
4416
4417
|
}
|
|
4417
4418
|
x("Q", 0, "Qo", "quarter");
|
|
4418
4419
|
_("Q", ar);
|
|
@@ -4435,7 +4436,7 @@ U("Do", function(e, t) {
|
|
|
4435
4436
|
var Ur = ht("Date", !0);
|
|
4436
4437
|
x("DDD", ["DDDD", 3], "DDDo", "dayOfYear");
|
|
4437
4438
|
_("DDD", Zt);
|
|
4438
|
-
_("DDDD",
|
|
4439
|
+
_("DDDD", ir);
|
|
4439
4440
|
U(["DDD", "DDDD"], function(e, t, n) {
|
|
4440
4441
|
n._dayOfYear = Y(e);
|
|
4441
4442
|
});
|
|
@@ -4482,7 +4483,7 @@ x(0, ["SSSSSSSSS", 9], 0, function() {
|
|
|
4482
4483
|
});
|
|
4483
4484
|
_("S", Zt, ar);
|
|
4484
4485
|
_("SS", Zt, le);
|
|
4485
|
-
_("SSS", Zt,
|
|
4486
|
+
_("SSS", Zt, ir);
|
|
4486
4487
|
var Ge, $r;
|
|
4487
4488
|
for (Ge = "SSSS"; Ge.length <= 9; Ge += "S")
|
|
4488
4489
|
_(Ge, dt);
|
|
@@ -4571,8 +4572,8 @@ d.millisecond = d.milliseconds = $r;
|
|
|
4571
4572
|
d.utcOffset = nd;
|
|
4572
4573
|
d.utc = rd;
|
|
4573
4574
|
d.local = ad;
|
|
4574
|
-
d.parseZone =
|
|
4575
|
-
d.hasAlignedHourOffset =
|
|
4575
|
+
d.parseZone = id;
|
|
4576
|
+
d.hasAlignedHourOffset = od;
|
|
4576
4577
|
d.isDST = ld;
|
|
4577
4578
|
d.isLocal = dd;
|
|
4578
4579
|
d.isUtcOffset = cd;
|
|
@@ -4624,7 +4625,7 @@ L.erasParse = Jd;
|
|
|
4624
4625
|
L.erasConvertYear = Qd;
|
|
4625
4626
|
L.erasAbbrRegex = ac;
|
|
4626
4627
|
L.erasNameRegex = rc;
|
|
4627
|
-
L.erasNarrowRegex =
|
|
4628
|
+
L.erasNarrowRegex = ic;
|
|
4628
4629
|
L.months = $l;
|
|
4629
4630
|
L.monthsShort = Wl;
|
|
4630
4631
|
L.monthsParse = Fl;
|
|
@@ -4633,9 +4634,9 @@ L.monthsShortRegex = Vl;
|
|
|
4633
4634
|
L.week = Bl;
|
|
4634
4635
|
L.firstDayOfYear = Kl;
|
|
4635
4636
|
L.firstDayOfWeek = ql;
|
|
4636
|
-
L.weekdays =
|
|
4637
|
+
L.weekdays = iu;
|
|
4637
4638
|
L.weekdaysMin = lu;
|
|
4638
|
-
L.weekdaysShort =
|
|
4639
|
+
L.weekdaysShort = ou;
|
|
4639
4640
|
L.weekdaysParse = du;
|
|
4640
4641
|
L.weekdaysRegex = pu;
|
|
4641
4642
|
L.weekdaysShortRegex = mu;
|
|
@@ -4656,12 +4657,12 @@ function Hr(e, t, n) {
|
|
|
4656
4657
|
}
|
|
4657
4658
|
function ns(e, t, n, s) {
|
|
4658
4659
|
typeof e == "boolean" ? (Ue(t) && (n = t, t = void 0), t = t || "") : (t = e, n = t, e = !1, Ue(t) && (n = t, t = void 0), t = t || "");
|
|
4659
|
-
var r = $e(), a = e ? r._week.dow : 0,
|
|
4660
|
+
var r = $e(), a = e ? r._week.dow : 0, i, o = [];
|
|
4660
4661
|
if (n != null)
|
|
4661
4662
|
return Ft(t, (n + a) % 7, s, "day");
|
|
4662
|
-
for (
|
|
4663
|
-
i
|
|
4664
|
-
return
|
|
4663
|
+
for (i = 0; i < 7; i++)
|
|
4664
|
+
o[i] = Ft(t, (i + a) % 7, s, "day");
|
|
4665
|
+
return o;
|
|
4665
4666
|
}
|
|
4666
4667
|
function Oc(e, t) {
|
|
4667
4668
|
return Hr(e, t, "months");
|
|
@@ -4730,8 +4731,8 @@ function fs(e) {
|
|
|
4730
4731
|
return e < 0 ? Math.floor(e) : Math.ceil(e);
|
|
4731
4732
|
}
|
|
4732
4733
|
function Rc() {
|
|
4733
|
-
var e = this._milliseconds, t = this._days, n = this._months, s = this._data, r, a,
|
|
4734
|
-
return e >= 0 && t >= 0 && n >= 0 || e <= 0 && t <= 0 && n <= 0 || (e += fs(Mn(n) + t) * 864e5, t = 0, n = 0), s.milliseconds = e % 1e3, r = de(e / 1e3), s.seconds = r % 60, a = de(r / 60), s.minutes = a % 60,
|
|
4734
|
+
var e = this._milliseconds, t = this._days, n = this._months, s = this._data, r, a, i, o, l;
|
|
4735
|
+
return e >= 0 && t >= 0 && n >= 0 || e <= 0 && t <= 0 && n <= 0 || (e += fs(Mn(n) + t) * 864e5, t = 0, n = 0), s.milliseconds = e % 1e3, r = de(e / 1e3), s.seconds = r % 60, a = de(r / 60), s.minutes = a % 60, i = de(a / 60), s.hours = i % 24, t += de(i / 24), l = de(Gr(t)), n += l, t -= fs(Mn(l)), o = de(n / 12), n %= 12, s.days = t, s.months = n, s.years = o, this;
|
|
4735
4736
|
}
|
|
4736
4737
|
function Gr(e) {
|
|
4737
4738
|
return e * 4800 / 146097;
|
|
@@ -4812,7 +4813,7 @@ function th(e, t, n, s, r) {
|
|
|
4812
4813
|
return r.relativeTime(t || 1, !!n, e, s);
|
|
4813
4814
|
}
|
|
4814
4815
|
function nh(e, t, n, s) {
|
|
4815
|
-
var r = be(e).abs(), a = Ie(r.as("s")),
|
|
4816
|
+
var r = be(e).abs(), a = Ie(r.as("s")), i = Ie(r.as("m")), o = Ie(r.as("h")), l = Ie(r.as("d")), u = Ie(r.as("M")), h = Ie(r.as("w")), w = Ie(r.as("y")), p = a <= n.ss && ["s", a] || a < n.s && ["ss", a] || i <= 1 && ["m"] || i < n.m && ["mm", i] || o <= 1 && ["h"] || o < n.h && ["hh", o] || l <= 1 && ["d"] || l < n.d && ["dd", l];
|
|
4816
4817
|
return n.w != null && (p = p || h <= 1 && ["w"] || h < n.w && ["ww", h]), p = p || u <= 1 && ["M"] || u < n.M && ["MM", u] || w <= 1 && ["y"] || ["yy", w], p[2] = t, p[3] = +e > 0, p[4] = s, th.apply(null, p);
|
|
4817
4818
|
}
|
|
4818
4819
|
function sh(e) {
|
|
@@ -4834,8 +4835,8 @@ function tt(e) {
|
|
|
4834
4835
|
function nn() {
|
|
4835
4836
|
if (!this.isValid())
|
|
4836
4837
|
return this.localeData().invalidDate();
|
|
4837
|
-
var e = cn(this._milliseconds) / 1e3, t = cn(this._days), n = cn(this._months), s, r, a,
|
|
4838
|
-
return
|
|
4838
|
+
var e = cn(this._milliseconds) / 1e3, t = cn(this._days), n = cn(this._months), s, r, a, i, o = this.asSeconds(), l, u, h, w;
|
|
4839
|
+
return o ? (s = de(e / 60), r = de(s / 60), e %= 60, s %= 60, a = de(n / 12), n %= 12, i = e ? e.toFixed(3).replace(/\.?0+$/, "") : "", l = o < 0 ? "-" : "", u = tt(this._months) !== tt(o) ? "-" : "", h = tt(this._days) !== tt(o) ? "-" : "", w = tt(this._milliseconds) !== tt(o) ? "-" : "", l + "P" + (a ? u + a + "Y" : "") + (n ? u + n + "M" : "") + (t ? h + t + "D" : "") + (r || s || e ? "T" : "") + (r ? w + r + "H" : "") + (s ? w + s + "M" : "") + (e ? w + i + "S" : "")) : "P0D";
|
|
4839
4840
|
}
|
|
4840
4841
|
var E = en.prototype;
|
|
4841
4842
|
E.isValid = Ju;
|
|
@@ -4886,7 +4887,7 @@ U("x", function(e, t, n) {
|
|
|
4886
4887
|
n._d = new Date(Y(e));
|
|
4887
4888
|
});
|
|
4888
4889
|
v.version = "2.30.1";
|
|
4889
|
-
|
|
4890
|
+
il(G);
|
|
4890
4891
|
v.fn = d;
|
|
4891
4892
|
v.min = Zu;
|
|
4892
4893
|
v.max = qu;
|
|
@@ -4934,11 +4935,11 @@ v.HTML5_FMT = {
|
|
|
4934
4935
|
MONTH: "YYYY-MM"
|
|
4935
4936
|
// <input type="month" />
|
|
4936
4937
|
};
|
|
4937
|
-
const
|
|
4938
|
+
const ih = "code-graph", oh = (e, t = "", n = "json") => {
|
|
4938
4939
|
const s = document.createElement("a");
|
|
4939
4940
|
s.setAttribute("href", `data:text/${n};charset=UTF-8,${encodeURIComponent(e)}`);
|
|
4940
4941
|
const r = v().format("YYMMDD_HHMMSS");
|
|
4941
|
-
s.setAttribute("download", `${
|
|
4942
|
+
s.setAttribute("download", `${ih}_${r}_${t}.${n}`), s.style.display = "none", document.body.appendChild(s), s.click(), document.body.removeChild(s);
|
|
4942
4943
|
}, lh = (e = "json") => {
|
|
4943
4944
|
const t = document.createElement("input");
|
|
4944
4945
|
return t.setAttribute("type", "file"), t.setAttribute("id", "fileElem"), t.setAttribute("multiple", "true"), t.setAttribute("accept", `${e}/*`), t.style.display = "none", document.body.appendChild(t), t.click(), t;
|
|
@@ -4952,7 +4953,7 @@ const oh = "code-graph", ih = (e, t = "", n = "json") => {
|
|
|
4952
4953
|
}), t.registerCommand(zr, {
|
|
4953
4954
|
execute: () => {
|
|
4954
4955
|
const r = e.value.editor.save();
|
|
4955
|
-
|
|
4956
|
+
oh(JSON.stringify(r, null, 2), e.value.shortId);
|
|
4956
4957
|
},
|
|
4957
4958
|
canExecute: () => e.value.nodes.length > 0
|
|
4958
4959
|
}), t.registerCommand(Br, {
|
|
@@ -4970,15 +4971,15 @@ const oh = "code-graph", ih = (e, t = "", n = "json") => {
|
|
|
4970
4971
|
document.body.removeChild(r);
|
|
4971
4972
|
const a = r.files;
|
|
4972
4973
|
if (!a || a.length <= 0) return !1;
|
|
4973
|
-
const
|
|
4974
|
-
|
|
4975
|
-
if (
|
|
4976
|
-
const l =
|
|
4974
|
+
const i = new FileReader();
|
|
4975
|
+
i.onload = (o) => {
|
|
4976
|
+
if (o.target?.result) {
|
|
4977
|
+
const l = o.target.result;
|
|
4977
4978
|
if (l.length === 0) return;
|
|
4978
4979
|
const u = JSON.parse(l);
|
|
4979
4980
|
e.value.editor.load(u), e.value.code?.engine?.runOnce(null);
|
|
4980
4981
|
}
|
|
4981
|
-
},
|
|
4982
|
+
}, i.readAsText(a.item(0));
|
|
4982
4983
|
});
|
|
4983
4984
|
},
|
|
4984
4985
|
canExecute: () => !0
|
|
@@ -5304,18 +5305,18 @@ function mh(e) {
|
|
|
5304
5305
|
if (!s.engine || typeof s.engine != "object")
|
|
5305
5306
|
throw new Error(`GraphNode ${this.id}: calculate called but no engine provided in context`);
|
|
5306
5307
|
const r = s.engine.getInputValues(this.subgraph);
|
|
5307
|
-
for (const
|
|
5308
|
-
r.set(
|
|
5308
|
+
for (const o of this.subgraph.inputs)
|
|
5309
|
+
r.set(o.nodeInterfaceId, n[o.id]);
|
|
5309
5310
|
const a = await s.engine.runGraph(
|
|
5310
5311
|
this.subgraph,
|
|
5311
5312
|
r,
|
|
5312
5313
|
s.globalValues
|
|
5313
5314
|
);
|
|
5314
5315
|
s.engine.pause(), Cs(a, s.engine.editor), s.engine.resume();
|
|
5315
|
-
const
|
|
5316
|
-
for (const
|
|
5317
|
-
o
|
|
5318
|
-
return
|
|
5316
|
+
const i = {};
|
|
5317
|
+
for (const o of this.subgraph.outputs)
|
|
5318
|
+
i[o.id] = a.get(o.nodeId)?.get("output");
|
|
5319
|
+
return i._calculationResults = a, this.lockCode || (i._code = this.renderCode({ inputs: n, ...s.globalValues })), this.updateOutputValues(i), i;
|
|
5319
5320
|
};
|
|
5320
5321
|
load(n) {
|
|
5321
5322
|
if (!this.subgraph) throw new Error("Cannot load a graph node without a graph");
|
|
@@ -5359,10 +5360,10 @@ function mh(e) {
|
|
|
5359
5360
|
this.subgraph.outputs.some((s) => s.id === n) || this.removeOutput(n);
|
|
5360
5361
|
this.addInput(
|
|
5361
5362
|
"_code",
|
|
5362
|
-
new
|
|
5363
|
+
new oe("_code", []).use(ne, _e).use(lt).setHidden(!0)
|
|
5363
5364
|
), this.addOutput(
|
|
5364
5365
|
"_code",
|
|
5365
|
-
new
|
|
5366
|
+
new oe("_code", []).use(ne, _e).use(lt).setHidden(!0)
|
|
5366
5367
|
), this.addOutput("_calculationResults", new Se("_calculationResults", void 0).setHidden(!0));
|
|
5367
5368
|
}
|
|
5368
5369
|
/**
|
|
@@ -5371,19 +5372,19 @@ function mh(e) {
|
|
|
5371
5372
|
* These properties should be proxied to the subgraph interface, so they behave the same as the original interface.
|
|
5372
5373
|
*/
|
|
5373
5374
|
createProxyInterface(n, s) {
|
|
5374
|
-
const r = new
|
|
5375
|
+
const r = new oe(n.name, void 0);
|
|
5375
5376
|
return new Proxy(r, {
|
|
5376
|
-
get: (a,
|
|
5377
|
-
if (ph.includes(
|
|
5378
|
-
return Reflect.get(a,
|
|
5379
|
-
let
|
|
5380
|
-
s ?
|
|
5377
|
+
get: (a, i) => {
|
|
5378
|
+
if (ph.includes(i) || i in a || typeof i == "string" && i.startsWith("__v_"))
|
|
5379
|
+
return Reflect.get(a, i);
|
|
5380
|
+
let o;
|
|
5381
|
+
s ? o = this.subgraph?.nodes.find(
|
|
5381
5382
|
(w) => Jr.isGraphInputNode(w) && w.graphInterfaceId === n.id
|
|
5382
|
-
)?.outputs.placeholder.id :
|
|
5383
|
+
)?.outputs.placeholder.id : o = this.subgraph?.nodes.find(
|
|
5383
5384
|
(w) => Qr.isGraphOutputNode(w) && w.graphInterfaceId === n.id
|
|
5384
5385
|
)?.inputs.placeholder.id;
|
|
5385
|
-
const l = this.subgraph?.connections.find((h) =>
|
|
5386
|
-
if (u) return Reflect.get(u,
|
|
5386
|
+
const l = this.subgraph?.connections.find((h) => o === (s ? h.from : h.to)?.id), u = s ? l?.to : l?.from;
|
|
5387
|
+
if (u) return Reflect.get(u, i);
|
|
5387
5388
|
}
|
|
5388
5389
|
});
|
|
5389
5390
|
}
|
|
@@ -5412,16 +5413,16 @@ class rn extends Ea {
|
|
|
5412
5413
|
const I = n.get(p);
|
|
5413
5414
|
if (!I) throw new Error(`Unable to create graph from template: Could not map old id ${p} to new id`);
|
|
5414
5415
|
return I;
|
|
5415
|
-
}, a = (p) =>
|
|
5416
|
+
}, a = (p) => Eo(p, (I) => ({
|
|
5416
5417
|
id: s(I.id),
|
|
5417
5418
|
templateId: I.id,
|
|
5418
5419
|
value: I.value
|
|
5419
|
-
})),
|
|
5420
|
+
})), i = this.nodes.map((p) => ({
|
|
5420
5421
|
...p,
|
|
5421
5422
|
id: s(p.id),
|
|
5422
5423
|
inputs: a(p.inputs),
|
|
5423
5424
|
outputs: a(p.outputs)
|
|
5424
|
-
})),
|
|
5425
|
+
})), o = this.connections.map((p) => ({
|
|
5425
5426
|
id: s(p.id),
|
|
5426
5427
|
from: r(p.from),
|
|
5427
5428
|
to: r(p.to)
|
|
@@ -5437,8 +5438,8 @@ class rn extends Ea {
|
|
|
5437
5438
|
nodeInterfaceId: r(p.nodeInterfaceId)
|
|
5438
5439
|
})), h = {
|
|
5439
5440
|
id: Xe(),
|
|
5440
|
-
nodes:
|
|
5441
|
-
connections:
|
|
5441
|
+
nodes: i,
|
|
5442
|
+
connections: o,
|
|
5442
5443
|
inputs: l,
|
|
5443
5444
|
outputs: u
|
|
5444
5445
|
};
|
|
@@ -5464,36 +5465,36 @@ function _h(e, t) {
|
|
|
5464
5465
|
class ea extends Jr {
|
|
5465
5466
|
_title = "Subgraph Input";
|
|
5466
5467
|
inputs = {
|
|
5467
|
-
_code: new
|
|
5468
|
+
_code: new oe("_code", "").use(ne, _e).setHidden(!0),
|
|
5468
5469
|
name: new xs("Name", "Input").setPort(!1)
|
|
5469
5470
|
};
|
|
5470
5471
|
outputs = {
|
|
5471
|
-
_code: new
|
|
5472
|
+
_code: new oe("_code", "").use(ne, _e).setHidden(!0),
|
|
5472
5473
|
placeholder: new Se("Connection", void 0)
|
|
5473
5474
|
};
|
|
5474
5475
|
}
|
|
5475
5476
|
class ta extends Qr {
|
|
5476
5477
|
_title = "Subgraph Output";
|
|
5477
5478
|
inputs = {
|
|
5478
|
-
_code: new
|
|
5479
|
+
_code: new oe("_code", "").use(ne, _e).setHidden(!0),
|
|
5479
5480
|
name: new xs("Name", "Output").setPort(!1),
|
|
5480
5481
|
placeholder: new Se("Connection", void 0)
|
|
5481
5482
|
};
|
|
5482
5483
|
outputs = {
|
|
5483
|
-
_code: new
|
|
5484
|
+
_code: new oe("_code", "").use(ne, _e).setHidden(!0),
|
|
5484
5485
|
output: new Se("Output", void 0).setHidden(!0)
|
|
5485
5486
|
};
|
|
5486
5487
|
}
|
|
5487
5488
|
const yh = "CREATE_SUBGRAPH", vs = [Ra, Pa];
|
|
5488
5489
|
function gh(e, t, n) {
|
|
5489
5490
|
const s = () => e.value.selectedNodes.filter((a) => !vs.includes(a.type)).length > 0, r = () => {
|
|
5490
|
-
const { viewModel: a } = kt(),
|
|
5491
|
-
if (
|
|
5492
|
-
const l =
|
|
5491
|
+
const { viewModel: a } = kt(), i = e.value, o = e.value.editor;
|
|
5492
|
+
if (i.selectedNodes.length === 0) return;
|
|
5493
|
+
const l = i.selectedNodes.filter((C) => !vs.includes(C.type)), u = l.flatMap((C) => Object.values(C.inputs)), h = l.flatMap((C) => Object.values(C.outputs)), w = i.connections.filter(
|
|
5493
5494
|
(C) => !h.includes(C.from) && u.includes(C.to)
|
|
5494
|
-
), p =
|
|
5495
|
+
), p = i.connections.filter(
|
|
5495
5496
|
(C) => h.includes(C.from) && !u.includes(C.to)
|
|
5496
|
-
), I =
|
|
5497
|
+
), I = i.connections.filter(
|
|
5497
5498
|
(C) => h.includes(C.from) && u.includes(C.to)
|
|
5498
5499
|
), y = l.map((C) => C.save()), O = I.map((C) => ({
|
|
5499
5500
|
id: C.id,
|
|
@@ -5523,25 +5524,25 @@ function gh(e, t, n) {
|
|
|
5523
5524
|
inputs: [],
|
|
5524
5525
|
outputs: []
|
|
5525
5526
|
},
|
|
5526
|
-
|
|
5527
|
+
o
|
|
5527
5528
|
)
|
|
5528
5529
|
);
|
|
5529
|
-
|
|
5530
|
-
const Te =
|
|
5530
|
+
o.addGraphTemplate(F);
|
|
5531
|
+
const Te = o.nodeTypes.get(Os(F));
|
|
5531
5532
|
if (!Te) throw new Error("Unable to create subgraph: Could not find corresponding graph node type");
|
|
5532
|
-
|
|
5533
|
+
i.activeTransactions++;
|
|
5533
5534
|
const Ne = Ae(new Te.type());
|
|
5534
|
-
|
|
5535
|
+
i.addNode(Ne);
|
|
5535
5536
|
const ft = Math.round(
|
|
5536
5537
|
l.map((C) => C.position.x).reduce((C, Q) => C + Q, 0) / l.length
|
|
5537
5538
|
), we = Math.round(
|
|
5538
5539
|
l.map((C) => C.position.y).reduce((C, Q) => C + Q, 0) / l.length
|
|
5539
5540
|
);
|
|
5540
5541
|
Ne.position.x = ft, Ne.position.y = we, w.forEach((C) => {
|
|
5541
|
-
|
|
5542
|
+
i.removeConnection(C), i.addConnection(C.from, Ne.inputs[c.get(C.to.id)]);
|
|
5542
5543
|
}), p.forEach((C) => {
|
|
5543
|
-
|
|
5544
|
-
}), l.forEach((C) =>
|
|
5544
|
+
i.removeConnection(C), i.addConnection(Ne.outputs[c.get(C.from.id)], C.to);
|
|
5545
|
+
}), l.forEach((C) => i.removeNode(C)), i.activeTransactions--, t.canExecuteCommand(He.SAVE_SUBGRAPH_COMMAND) && t.executeCommand(He.SAVE_SUBGRAPH_COMMAND), n(F), e.value.panning = { ...i.panning }, e.value.scaling = i.scaling;
|
|
5545
5546
|
};
|
|
5546
5547
|
t.registerCommand(yh, {
|
|
5547
5548
|
canExecute: s,
|
|
@@ -5550,15 +5551,15 @@ function gh(e, t, n) {
|
|
|
5550
5551
|
}
|
|
5551
5552
|
function bh(e) {
|
|
5552
5553
|
const t = e.reduce((r, a) => {
|
|
5553
|
-
const
|
|
5554
|
-
return
|
|
5554
|
+
const i = a.position.x;
|
|
5555
|
+
return i < r ? i : r;
|
|
5555
5556
|
}, 1 / 0), n = e.reduce((r, a) => {
|
|
5556
|
-
const
|
|
5557
|
-
return
|
|
5557
|
+
const i = a.position.y;
|
|
5558
|
+
return i < r ? i : r;
|
|
5558
5559
|
}, 1 / 0);
|
|
5559
5560
|
return { xLeft: e.reduce((r, a) => {
|
|
5560
|
-
const
|
|
5561
|
-
return
|
|
5561
|
+
const i = a.position.x + a.width;
|
|
5562
|
+
return i > r ? i : r;
|
|
5562
5563
|
}, -1 / 0), xRight: t, yTop: n };
|
|
5563
5564
|
}
|
|
5564
5565
|
class wh extends La {
|
|
@@ -5614,13 +5615,13 @@ class wh extends La {
|
|
|
5614
5615
|
}
|
|
5615
5616
|
}
|
|
5616
5617
|
function Zh(e) {
|
|
5617
|
-
const t =
|
|
5618
|
+
const t = ie(e?.code ?? new Rn()), n = ie(e?.existingEditor ?? new wh(t.value)), s = /* @__PURE__ */ Symbol("ViewModelToken"), r = ie(null), a = la(r), { switchGraph: i } = _h(n, r), o = z(() => a.value && a.value !== n.value.graph), l = Ae(ba());
|
|
5618
5619
|
l.nodes.defaultWidth = ss;
|
|
5619
5620
|
const u = wa(), h = ka(a, u), w = Ma(a, n, u), p = {
|
|
5620
5621
|
/** Called whenever a node is rendered */
|
|
5621
|
-
renderNode: new
|
|
5622
|
+
renderNode: new is(null),
|
|
5622
5623
|
/** Called whenever an interface is rendered */
|
|
5623
|
-
renderInterface: new
|
|
5624
|
+
renderInterface: new is(null)
|
|
5624
5625
|
}, I = Ae({
|
|
5625
5626
|
clipboard: w,
|
|
5626
5627
|
code: t,
|
|
@@ -5630,21 +5631,21 @@ function Zh(e) {
|
|
|
5630
5631
|
history: h,
|
|
5631
5632
|
hooks: p,
|
|
5632
5633
|
isReady: !1,
|
|
5633
|
-
isSubgraph:
|
|
5634
|
+
isSubgraph: o,
|
|
5634
5635
|
onBeforeUnmount: () => {
|
|
5635
5636
|
},
|
|
5636
5637
|
onMounted: () => {
|
|
5637
5638
|
},
|
|
5638
5639
|
settings: l,
|
|
5639
|
-
switchGraph:
|
|
5640
|
+
switchGraph: i
|
|
5640
5641
|
});
|
|
5641
|
-
return t.value.registerViewModel(I), fh(I), Sa(a, u), gh(a, u,
|
|
5642
|
+
return t.value.registerViewModel(I), fh(I), Sa(a, u), gh(a, u, i), xa(a, u), Oa(a, u, i), Ca(a, u), Ta(a, u, l), dh(a, u, l), ch(l), gs(
|
|
5642
5643
|
n,
|
|
5643
5644
|
(y, O) => {
|
|
5644
5645
|
O && (O.events.registerGraph.unsubscribe(s), O.graphEvents.beforeAddNode.unsubscribe(s), y.nodeHooks.beforeLoad.unsubscribe(s), y.nodeHooks.afterSave.unsubscribe(s), y.graphTemplateHooks.beforeLoad.unsubscribe(s), y.graphTemplateHooks.afterSave.unsubscribe(s), y.graph.hooks.load.unsubscribe(s), y.graph.hooks.save.unsubscribe(s)), y && (y.nodeHooks.beforeLoad.subscribe(s, (c, g) => (g.position = c.position ?? { x: 0, y: 0 }, g.state && (g.state.integrated = c.integrated, c.props && (g.state.props = c.props), c.variableName && (g.state.variableName = c.variableName)), c)), y.nodeHooks.afterSave.subscribe(s, (c, g) => (c.position = g.position, g.state && (c.integrated = g.state.integrated, g.state.props && (c.props = g.state.props), g.state.variableName && (c.variableName = g.state.variableName)), c)), y.graphTemplateHooks.beforeLoad.subscribe(s, (c, g) => (g.panning = c.panning, g.scaling = c.scaling, c)), y.graphTemplateHooks.afterSave.subscribe(s, (c, g) => (c.panning = g.panning, c.scaling = g.scaling, c)), y.graph.hooks.load.subscribe(s, (c, g) => (g.panning = c.panning, g.scaling = c.scaling, c)), y.graph.hooks.save.subscribe(s, (c, g) => (c.panning = g.panning, c.scaling = g.scaling, c)), y.graphEvents.beforeAddNode.subscribe(
|
|
5645
5646
|
s,
|
|
5646
5647
|
(c) => Na(c, { defaultWidth: l.nodes.defaultWidth })
|
|
5647
|
-
), n.value.registerNodeType(ea, { category: "Subgraphs" }), n.value.registerNodeType(ta, { category: "Subgraphs" }),
|
|
5648
|
+
), n.value.registerNodeType(ea, { category: "Subgraphs" }), n.value.registerNodeType(ta, { category: "Subgraphs" }), i(y.graph));
|
|
5648
5649
|
},
|
|
5649
5650
|
{ immediate: !0 }
|
|
5650
5651
|
), ks(() => I.isReady = !0), I;
|
|
@@ -5662,7 +5663,7 @@ export {
|
|
|
5662
5663
|
rn as CodeGraphTemplate,
|
|
5663
5664
|
Dn as CodeNode,
|
|
5664
5665
|
Mt as CodeNodeInputInterface,
|
|
5665
|
-
|
|
5666
|
+
oe as CodeNodeInterface,
|
|
5666
5667
|
In as CodeNodeInterfaceComponent,
|
|
5667
5668
|
tl as CodeNodeOutputInterface,
|
|
5668
5669
|
zr as DOWNLOAD_EDITOR_STATE_COMMAND,
|
|
@@ -5692,11 +5693,11 @@ export {
|
|
|
5692
5693
|
Bs as booleanType,
|
|
5693
5694
|
Rh as components,
|
|
5694
5695
|
mh as createCodeGraphNodeType,
|
|
5695
|
-
|
|
5696
|
+
Xo as createInterface,
|
|
5696
5697
|
Wh as defineCodeNode,
|
|
5697
5698
|
Hh as defineDynamicCodeNode,
|
|
5698
|
-
|
|
5699
|
-
|
|
5699
|
+
Qo as dictType,
|
|
5700
|
+
Ko as formatInputs,
|
|
5700
5701
|
Kr as getCodeNodes,
|
|
5701
5702
|
jh as getPositionAtColumn,
|
|
5702
5703
|
zh as getPositionBeforeNode,
|