superleap-code-editor 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,8 +1,8 @@
1
- import ne, { useState as $, useCallback as A, useEffect as Oe } from "react";
2
- import yr from "@monaco-editor/react";
3
- import { Tooltip as Pe, Button as te, Splitter as k, Alert as Er, Tree as br } from "antd";
4
- import { Alert as Hr, Button as Xr, Splitter as Zr, Tooltip as Qr, Tree as et } from "antd";
5
- import { IconFolderOpen as Ae, IconDatabase as xr, IconCode as Fr, IconHistory as Rr, IconFlask as wr, IconSettings as _r, IconPlus as jr, IconFile as Cr } from "@tabler/icons-react";
1
+ import ne, { useState as $, useCallback as D, useEffect as Oe } from "react";
2
+ import xr from "@monaco-editor/react";
3
+ import { Tooltip as Pe, Button as te, Splitter as k, Alert as br, Tree as Er } from "antd";
4
+ import { Alert as tt, Button as nt, Splitter as it, Tooltip as at, Tree as ot } from "antd";
5
+ import { IconFolderOpen as De, IconDatabase as jr, IconCode as Fr, IconHistory as Ae, IconFlask as Rr, IconSettings as wr, IconPlus as _r, IconFile as Cr, IconEyeOff as Tr, IconEye as Sr, IconPlayerPlay as Or, IconDownload as Pr, IconDeviceFloppy as kr } from "@tabler/icons-react";
6
6
  var q = { exports: {} }, L = {};
7
7
  /**
8
8
  * @license React
@@ -14,20 +14,20 @@ var q = { exports: {} }, L = {};
14
14
  * LICENSE file in the root directory of this source tree.
15
15
  */
16
16
  var ke;
17
- function Tr() {
17
+ function Nr() {
18
18
  if (ke) return L;
19
19
  ke = 1;
20
- var o = ne, t = Symbol.for("react.element"), a = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, d = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, b = { key: !0, ref: !0, __self: !0, __source: !0 };
21
- function x(F, m, j) {
22
- var u, R = {}, w = null, S = null;
23
- j !== void 0 && (w = "" + j), m.key !== void 0 && (w = "" + m.key), m.ref !== void 0 && (S = m.ref);
24
- for (u in m) i.call(m, u) && !b.hasOwnProperty(u) && (R[u] = m[u]);
25
- if (F && F.defaultProps) for (u in m = F.defaultProps, m) R[u] === void 0 && (R[u] = m[u]);
26
- return { $$typeof: t, type: F, key: w, ref: S, props: R, _owner: d.current };
20
+ var s = ne, t = Symbol.for("react.element"), i = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, d = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, b = { key: !0, ref: !0, __self: !0, __source: !0 };
21
+ function E(j, p, _) {
22
+ var u, F = {}, R = null, S = null;
23
+ _ !== void 0 && (R = "" + _), p.key !== void 0 && (R = "" + p.key), p.ref !== void 0 && (S = p.ref);
24
+ for (u in p) a.call(p, u) && !b.hasOwnProperty(u) && (F[u] = p[u]);
25
+ if (j && j.defaultProps) for (u in p = j.defaultProps, p) F[u] === void 0 && (F[u] = p[u]);
26
+ return { $$typeof: t, type: j, key: R, ref: S, props: F, _owner: d.current };
27
27
  }
28
- return L.Fragment = a, L.jsx = x, L.jsxs = x, L;
28
+ return L.Fragment = i, L.jsx = E, L.jsxs = E, L;
29
29
  }
30
- var W = {};
30
+ var z = {};
31
31
  /**
32
32
  * @license React
33
33
  * react-jsx-runtime.development.js
@@ -37,47 +37,47 @@ var W = {};
37
37
  * This source code is licensed under the MIT license found in the
38
38
  * LICENSE file in the root directory of this source tree.
39
39
  */
40
- var Ie;
41
- function Sr() {
42
- return Ie || (Ie = 1, process.env.NODE_ENV !== "production" && (function() {
43
- var o = ne, t = Symbol.for("react.element"), a = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), d = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), x = Symbol.for("react.provider"), F = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), j = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), B = Symbol.iterator, J = "@@iterator";
44
- function G(e) {
40
+ var Ne;
41
+ function Ir() {
42
+ return Ne || (Ne = 1, process.env.NODE_ENV !== "production" && (function() {
43
+ var s = ne, t = Symbol.for("react.element"), i = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), d = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), E = Symbol.for("react.provider"), j = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), _ = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), F = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), W = Symbol.iterator, J = "@@iterator";
44
+ function H(e) {
45
45
  if (e === null || typeof e != "object")
46
46
  return null;
47
- var r = B && e[B] || e[J];
47
+ var r = W && e[W] || e[J];
48
48
  return typeof r == "function" ? r : null;
49
49
  }
50
- var g = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
50
+ var g = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
51
51
  function h(e) {
52
52
  {
53
- for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++)
54
- n[s - 1] = arguments[s];
53
+ for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), l = 1; l < r; l++)
54
+ n[l - 1] = arguments[l];
55
55
  We("error", e, n);
56
56
  }
57
57
  }
58
58
  function We(e, r, n) {
59
59
  {
60
- var s = g.ReactDebugCurrentFrame, v = s.getStackAddendum();
60
+ var l = g.ReactDebugCurrentFrame, v = l.getStackAddendum();
61
61
  v !== "" && (r += "%s", n = n.concat([v]));
62
- var p = n.map(function(f) {
62
+ var m = n.map(function(f) {
63
63
  return String(f);
64
64
  });
65
- p.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, p);
65
+ m.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, m);
66
66
  }
67
67
  }
68
- var Be = !1, Me = !1, Ye = !1, ze = !1, Ve = !1, ae;
68
+ var Me = !1, Be = !1, Ye = !1, Ve = !1, Ue = !1, ae;
69
69
  ae = Symbol.for("react.module.reference");
70
- function Ue(e) {
71
- return !!(typeof e == "string" || typeof e == "function" || e === i || e === b || Ve || e === d || e === j || e === u || ze || e === S || Be || Me || Ye || typeof e == "object" && e !== null && (e.$$typeof === w || e.$$typeof === R || e.$$typeof === x || e.$$typeof === F || e.$$typeof === m || // This needs to include all possible module reference object
70
+ function qe(e) {
71
+ return !!(typeof e == "string" || typeof e == "function" || e === a || e === b || Ue || e === d || e === _ || e === u || Ve || e === S || Me || Be || Ye || typeof e == "object" && e !== null && (e.$$typeof === R || e.$$typeof === F || e.$$typeof === E || e.$$typeof === j || e.$$typeof === p || // This needs to include all possible module reference object
72
72
  // types supported by any Flight configuration anywhere since
73
73
  // we don't know which Flight build this will end up being used
74
74
  // with.
75
75
  e.$$typeof === ae || e.getModuleId !== void 0));
76
76
  }
77
- function qe(e, r, n) {
78
- var s = e.displayName;
79
- if (s)
80
- return s;
77
+ function Je(e, r, n) {
78
+ var l = e.displayName;
79
+ if (l)
80
+ return l;
81
81
  var v = r.displayName || r.name || "";
82
82
  return v !== "" ? n + "(" + v + ")" : n;
83
83
  }
@@ -92,36 +92,36 @@ function Sr() {
92
92
  if (typeof e == "string")
93
93
  return e;
94
94
  switch (e) {
95
- case i:
96
- return "Fragment";
97
95
  case a:
96
+ return "Fragment";
97
+ case i:
98
98
  return "Portal";
99
99
  case b:
100
100
  return "Profiler";
101
101
  case d:
102
102
  return "StrictMode";
103
- case j:
103
+ case _:
104
104
  return "Suspense";
105
105
  case u:
106
106
  return "SuspenseList";
107
107
  }
108
108
  if (typeof e == "object")
109
109
  switch (e.$$typeof) {
110
- case F:
110
+ case j:
111
111
  var r = e;
112
112
  return oe(r) + ".Consumer";
113
- case x:
113
+ case E:
114
114
  var n = e;
115
115
  return oe(n._context) + ".Provider";
116
- case m:
117
- return qe(e, e.render, "ForwardRef");
118
- case R:
119
- var s = e.displayName || null;
120
- return s !== null ? s : O(e.type) || "Memo";
121
- case w: {
122
- var v = e, p = v._payload, f = v._init;
116
+ case p:
117
+ return Je(e, e.render, "ForwardRef");
118
+ case F:
119
+ var l = e.displayName || null;
120
+ return l !== null ? l : O(e.type) || "Memo";
121
+ case R: {
122
+ var v = e, m = v._payload, f = v._init;
123
123
  try {
124
- return O(f(p));
124
+ return O(f(m));
125
125
  } catch {
126
126
  return null;
127
127
  }
@@ -129,13 +129,13 @@ function Sr() {
129
129
  }
130
130
  return null;
131
131
  }
132
- var P = Object.assign, N = 0, se, le, ce, ue, fe, de, ve;
132
+ var P = Object.assign, A = 0, se, le, ce, ue, fe, de, ve;
133
133
  function he() {
134
134
  }
135
135
  he.__reactDisabledLog = !0;
136
- function Je() {
136
+ function He() {
137
137
  {
138
- if (N === 0) {
138
+ if (A === 0) {
139
139
  se = console.log, le = console.info, ce = console.warn, ue = console.error, fe = console.group, de = console.groupCollapsed, ve = console.groupEnd;
140
140
  var e = {
141
141
  configurable: !0,
@@ -153,12 +153,12 @@ function Sr() {
153
153
  groupEnd: e
154
154
  });
155
155
  }
156
- N++;
156
+ A++;
157
157
  }
158
158
  }
159
159
  function Ge() {
160
160
  {
161
- if (N--, N === 0) {
161
+ if (A--, A === 0) {
162
162
  var e = {
163
163
  configurable: !0,
164
164
  enumerable: !0,
@@ -188,42 +188,42 @@ function Sr() {
188
188
  })
189
189
  });
190
190
  }
191
- N < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
191
+ A < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
192
192
  }
193
193
  }
194
- var K = g.ReactCurrentDispatcher, H;
194
+ var G = g.ReactCurrentDispatcher, K;
195
195
  function M(e, r, n) {
196
196
  {
197
- if (H === void 0)
197
+ if (K === void 0)
198
198
  try {
199
199
  throw Error();
200
200
  } catch (v) {
201
- var s = v.stack.trim().match(/\n( *(at )?)/);
202
- H = s && s[1] || "";
201
+ var l = v.stack.trim().match(/\n( *(at )?)/);
202
+ K = l && l[1] || "";
203
203
  }
204
204
  return `
205
- ` + H + e;
205
+ ` + K + e;
206
206
  }
207
207
  }
208
- var X = !1, Y;
208
+ var X = !1, B;
209
209
  {
210
210
  var Ke = typeof WeakMap == "function" ? WeakMap : Map;
211
- Y = new Ke();
211
+ B = new Ke();
212
212
  }
213
- function pe(e, r) {
213
+ function me(e, r) {
214
214
  if (!e || X)
215
215
  return "";
216
216
  {
217
- var n = Y.get(e);
217
+ var n = B.get(e);
218
218
  if (n !== void 0)
219
219
  return n;
220
220
  }
221
- var s;
221
+ var l;
222
222
  X = !0;
223
223
  var v = Error.prepareStackTrace;
224
224
  Error.prepareStackTrace = void 0;
225
- var p;
226
- p = K.current, K.current = null, Je();
225
+ var m;
226
+ m = G.current, G.current = null, He();
227
227
  try {
228
228
  if (r) {
229
229
  var f = function() {
@@ -237,14 +237,14 @@ function Sr() {
237
237
  try {
238
238
  Reflect.construct(f, []);
239
239
  } catch (T) {
240
- s = T;
240
+ l = T;
241
241
  }
242
242
  Reflect.construct(e, [], f);
243
243
  } else {
244
244
  try {
245
245
  f.call();
246
246
  } catch (T) {
247
- s = T;
247
+ l = T;
248
248
  }
249
249
  e.call(f.prototype);
250
250
  }
@@ -252,109 +252,109 @@ function Sr() {
252
252
  try {
253
253
  throw Error();
254
254
  } catch (T) {
255
- s = T;
255
+ l = T;
256
256
  }
257
257
  e();
258
258
  }
259
259
  } catch (T) {
260
- if (T && s && typeof T.stack == "string") {
260
+ if (T && l && typeof T.stack == "string") {
261
261
  for (var c = T.stack.split(`
262
- `), _ = s.stack.split(`
263
- `), y = c.length - 1, E = _.length - 1; y >= 1 && E >= 0 && c[y] !== _[E]; )
264
- E--;
265
- for (; y >= 1 && E >= 0; y--, E--)
266
- if (c[y] !== _[E]) {
267
- if (y !== 1 || E !== 1)
262
+ `), w = l.stack.split(`
263
+ `), y = c.length - 1, x = w.length - 1; y >= 1 && x >= 0 && c[y] !== w[x]; )
264
+ x--;
265
+ for (; y >= 1 && x >= 0; y--, x--)
266
+ if (c[y] !== w[x]) {
267
+ if (y !== 1 || x !== 1)
268
268
  do
269
- if (y--, E--, E < 0 || c[y] !== _[E]) {
269
+ if (y--, x--, x < 0 || c[y] !== w[x]) {
270
270
  var C = `
271
271
  ` + c[y].replace(" at new ", " at ");
272
- return e.displayName && C.includes("<anonymous>") && (C = C.replace("<anonymous>", e.displayName)), typeof e == "function" && Y.set(e, C), C;
272
+ return e.displayName && C.includes("<anonymous>") && (C = C.replace("<anonymous>", e.displayName)), typeof e == "function" && B.set(e, C), C;
273
273
  }
274
- while (y >= 1 && E >= 0);
274
+ while (y >= 1 && x >= 0);
275
275
  break;
276
276
  }
277
277
  }
278
278
  } finally {
279
- X = !1, K.current = p, Ge(), Error.prepareStackTrace = v;
279
+ X = !1, G.current = m, Ge(), Error.prepareStackTrace = v;
280
280
  }
281
- var D = e ? e.displayName || e.name : "", Se = D ? M(D) : "";
282
- return typeof e == "function" && Y.set(e, Se), Se;
281
+ var I = e ? e.displayName || e.name : "", Se = I ? M(I) : "";
282
+ return typeof e == "function" && B.set(e, Se), Se;
283
283
  }
284
- function He(e, r, n) {
285
- return pe(e, !1);
284
+ function Xe(e, r, n) {
285
+ return me(e, !1);
286
286
  }
287
- function Xe(e) {
287
+ function Ze(e) {
288
288
  var r = e.prototype;
289
289
  return !!(r && r.isReactComponent);
290
290
  }
291
- function z(e, r, n) {
291
+ function Y(e, r, n) {
292
292
  if (e == null)
293
293
  return "";
294
294
  if (typeof e == "function")
295
- return pe(e, Xe(e));
295
+ return me(e, Ze(e));
296
296
  if (typeof e == "string")
297
297
  return M(e);
298
298
  switch (e) {
299
- case j:
299
+ case _:
300
300
  return M("Suspense");
301
301
  case u:
302
302
  return M("SuspenseList");
303
303
  }
304
304
  if (typeof e == "object")
305
305
  switch (e.$$typeof) {
306
- case m:
307
- return He(e.render);
308
- case R:
309
- return z(e.type, r, n);
310
- case w: {
311
- var s = e, v = s._payload, p = s._init;
306
+ case p:
307
+ return Xe(e.render);
308
+ case F:
309
+ return Y(e.type, r, n);
310
+ case R: {
311
+ var l = e, v = l._payload, m = l._init;
312
312
  try {
313
- return z(p(v), r, n);
313
+ return Y(m(v), r, n);
314
314
  } catch {
315
315
  }
316
316
  }
317
317
  }
318
318
  return "";
319
319
  }
320
- var V = Object.prototype.hasOwnProperty, me = {}, ge = g.ReactDebugCurrentFrame;
320
+ var V = Object.prototype.hasOwnProperty, pe = {}, ge = g.ReactDebugCurrentFrame;
321
321
  function U(e) {
322
322
  if (e) {
323
- var r = e._owner, n = z(e.type, e._source, r ? r.type : null);
323
+ var r = e._owner, n = Y(e.type, e._source, r ? r.type : null);
324
324
  ge.setExtraStackFrame(n);
325
325
  } else
326
326
  ge.setExtraStackFrame(null);
327
327
  }
328
- function Ze(e, r, n, s, v) {
328
+ function Qe(e, r, n, l, v) {
329
329
  {
330
- var p = Function.call.bind(V);
330
+ var m = Function.call.bind(V);
331
331
  for (var f in e)
332
- if (p(e, f)) {
332
+ if (m(e, f)) {
333
333
  var c = void 0;
334
334
  try {
335
335
  if (typeof e[f] != "function") {
336
- var _ = Error((s || "React class") + ": " + n + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
337
- throw _.name = "Invariant Violation", _;
336
+ var w = Error((l || "React class") + ": " + n + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
337
+ throw w.name = "Invariant Violation", w;
338
338
  }
339
- c = e[f](r, f, s, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
339
+ c = e[f](r, f, l, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
340
340
  } catch (y) {
341
341
  c = y;
342
342
  }
343
- c && !(c instanceof Error) && (U(v), h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", s || "React class", n, f, typeof c), U(null)), c instanceof Error && !(c.message in me) && (me[c.message] = !0, U(v), h("Failed %s type: %s", n, c.message), U(null));
343
+ c && !(c instanceof Error) && (U(v), h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", l || "React class", n, f, typeof c), U(null)), c instanceof Error && !(c.message in pe) && (pe[c.message] = !0, U(v), h("Failed %s type: %s", n, c.message), U(null));
344
344
  }
345
345
  }
346
346
  }
347
- var Qe = Array.isArray;
347
+ var er = Array.isArray;
348
348
  function Z(e) {
349
- return Qe(e);
349
+ return er(e);
350
350
  }
351
- function er(e) {
351
+ function rr(e) {
352
352
  {
353
353
  var r = typeof Symbol == "function" && Symbol.toStringTag, n = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
354
354
  return n;
355
355
  }
356
356
  }
357
- function rr(e) {
357
+ function tr(e) {
358
358
  try {
359
359
  return ye(e), !1;
360
360
  } catch {
@@ -364,17 +364,17 @@ function Sr() {
364
364
  function ye(e) {
365
365
  return "" + e;
366
366
  }
367
- function Ee(e) {
368
- if (rr(e))
369
- return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", er(e)), ye(e);
367
+ function xe(e) {
368
+ if (tr(e))
369
+ return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", rr(e)), ye(e);
370
370
  }
371
- var be = g.ReactCurrentOwner, tr = {
371
+ var be = g.ReactCurrentOwner, nr = {
372
372
  key: !0,
373
373
  ref: !0,
374
374
  __self: !0,
375
375
  __source: !0
376
- }, xe, Fe;
377
- function nr(e) {
376
+ }, Ee, je;
377
+ function ir(e) {
378
378
  if (V.call(e, "ref")) {
379
379
  var r = Object.getOwnPropertyDescriptor(e, "ref").get;
380
380
  if (r && r.isReactWarning)
@@ -382,7 +382,7 @@ function Sr() {
382
382
  }
383
383
  return e.ref !== void 0;
384
384
  }
385
- function ir(e) {
385
+ function ar(e) {
386
386
  if (V.call(e, "key")) {
387
387
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
388
388
  if (r && r.isReactWarning)
@@ -390,13 +390,13 @@ function Sr() {
390
390
  }
391
391
  return e.key !== void 0;
392
392
  }
393
- function ar(e, r) {
393
+ function or(e, r) {
394
394
  typeof e.ref == "string" && be.current;
395
395
  }
396
- function or(e, r) {
396
+ function sr(e, r) {
397
397
  {
398
398
  var n = function() {
399
- xe || (xe = !0, h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
399
+ Ee || (Ee = !0, h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
400
400
  };
401
401
  n.isReactWarning = !0, Object.defineProperty(e, "key", {
402
402
  get: n,
@@ -404,10 +404,10 @@ function Sr() {
404
404
  });
405
405
  }
406
406
  }
407
- function sr(e, r) {
407
+ function lr(e, r) {
408
408
  {
409
409
  var n = function() {
410
- Fe || (Fe = !0, h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
410
+ je || (je = !0, h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
411
411
  };
412
412
  n.isReactWarning = !0, Object.defineProperty(e, "ref", {
413
413
  get: n,
@@ -415,7 +415,7 @@ function Sr() {
415
415
  });
416
416
  }
417
417
  }
418
- var lr = function(e, r, n, s, v, p, f) {
418
+ var cr = function(e, r, n, l, v, m, f) {
419
419
  var c = {
420
420
  // This tag allows us to uniquely identify this as a React Element
421
421
  $$typeof: t,
@@ -425,7 +425,7 @@ function Sr() {
425
425
  ref: n,
426
426
  props: f,
427
427
  // Record the component responsible for creating this element.
428
- _owner: p
428
+ _owner: m
429
429
  };
430
430
  return c._store = {}, Object.defineProperty(c._store, "validated", {
431
431
  configurable: !1,
@@ -436,7 +436,7 @@ function Sr() {
436
436
  configurable: !1,
437
437
  enumerable: !1,
438
438
  writable: !1,
439
- value: s
439
+ value: l
440
440
  }), Object.defineProperty(c, "_source", {
441
441
  configurable: !1,
442
442
  enumerable: !1,
@@ -444,38 +444,38 @@ function Sr() {
444
444
  value: v
445
445
  }), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
446
446
  };
447
- function cr(e, r, n, s, v) {
447
+ function ur(e, r, n, l, v) {
448
448
  {
449
- var p, f = {}, c = null, _ = null;
450
- n !== void 0 && (Ee(n), c = "" + n), ir(r) && (Ee(r.key), c = "" + r.key), nr(r) && (_ = r.ref, ar(r, v));
451
- for (p in r)
452
- V.call(r, p) && !tr.hasOwnProperty(p) && (f[p] = r[p]);
449
+ var m, f = {}, c = null, w = null;
450
+ n !== void 0 && (xe(n), c = "" + n), ar(r) && (xe(r.key), c = "" + r.key), ir(r) && (w = r.ref, or(r, v));
451
+ for (m in r)
452
+ V.call(r, m) && !nr.hasOwnProperty(m) && (f[m] = r[m]);
453
453
  if (e && e.defaultProps) {
454
454
  var y = e.defaultProps;
455
- for (p in y)
456
- f[p] === void 0 && (f[p] = y[p]);
455
+ for (m in y)
456
+ f[m] === void 0 && (f[m] = y[m]);
457
457
  }
458
- if (c || _) {
459
- var E = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
460
- c && or(f, E), _ && sr(f, E);
458
+ if (c || w) {
459
+ var x = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
460
+ c && sr(f, x), w && lr(f, x);
461
461
  }
462
- return lr(e, c, _, v, s, be.current, f);
462
+ return cr(e, c, w, v, l, be.current, f);
463
463
  }
464
464
  }
465
- var Q = g.ReactCurrentOwner, Re = g.ReactDebugCurrentFrame;
466
- function I(e) {
465
+ var Q = g.ReactCurrentOwner, Fe = g.ReactDebugCurrentFrame;
466
+ function N(e) {
467
467
  if (e) {
468
- var r = e._owner, n = z(e.type, e._source, r ? r.type : null);
469
- Re.setExtraStackFrame(n);
468
+ var r = e._owner, n = Y(e.type, e._source, r ? r.type : null);
469
+ Fe.setExtraStackFrame(n);
470
470
  } else
471
- Re.setExtraStackFrame(null);
471
+ Fe.setExtraStackFrame(null);
472
472
  }
473
473
  var ee;
474
474
  ee = !1;
475
475
  function re(e) {
476
476
  return typeof e == "object" && e !== null && e.$$typeof === t;
477
477
  }
478
- function we() {
478
+ function Re() {
479
479
  {
480
480
  if (Q.current) {
481
481
  var e = O(Q.current.type);
@@ -487,13 +487,13 @@ Check the render method of \`` + e + "`.";
487
487
  return "";
488
488
  }
489
489
  }
490
- function ur(e) {
490
+ function fr(e) {
491
491
  return "";
492
492
  }
493
- var _e = {};
494
- function fr(e) {
493
+ var we = {};
494
+ function dr(e) {
495
495
  {
496
- var r = we();
496
+ var r = Re();
497
497
  if (!r) {
498
498
  var n = typeof e == "string" ? e : e.displayName || e.name;
499
499
  n && (r = `
@@ -503,17 +503,17 @@ Check the top-level render call using <` + n + ">.");
503
503
  return r;
504
504
  }
505
505
  }
506
- function je(e, r) {
506
+ function _e(e, r) {
507
507
  {
508
508
  if (!e._store || e._store.validated || e.key != null)
509
509
  return;
510
510
  e._store.validated = !0;
511
- var n = fr(r);
512
- if (_e[n])
511
+ var n = dr(r);
512
+ if (we[n])
513
513
  return;
514
- _e[n] = !0;
515
- var s = "";
516
- e && e._owner && e._owner !== Q.current && (s = " It was passed a child from " + O(e._owner.type) + "."), I(e), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, s), I(null);
514
+ we[n] = !0;
515
+ var l = "";
516
+ e && e._owner && e._owner !== Q.current && (l = " It was passed a child from " + O(e._owner.type) + "."), N(e), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, l), N(null);
517
517
  }
518
518
  }
519
519
  function Ce(e, r) {
@@ -522,20 +522,20 @@ Check the top-level render call using <` + n + ">.");
522
522
  return;
523
523
  if (Z(e))
524
524
  for (var n = 0; n < e.length; n++) {
525
- var s = e[n];
526
- re(s) && je(s, r);
525
+ var l = e[n];
526
+ re(l) && _e(l, r);
527
527
  }
528
528
  else if (re(e))
529
529
  e._store && (e._store.validated = !0);
530
530
  else if (e) {
531
- var v = G(e);
531
+ var v = H(e);
532
532
  if (typeof v == "function" && v !== e.entries)
533
- for (var p = v.call(e), f; !(f = p.next()).done; )
534
- re(f.value) && je(f.value, r);
533
+ for (var m = v.call(e), f; !(f = m.next()).done; )
534
+ re(f.value) && _e(f.value, r);
535
535
  }
536
536
  }
537
537
  }
538
- function dr(e) {
538
+ function vr(e) {
539
539
  {
540
540
  var r = e.type;
541
541
  if (r == null || typeof r == "string")
@@ -543,15 +543,15 @@ Check the top-level render call using <` + n + ">.");
543
543
  var n;
544
544
  if (typeof r == "function")
545
545
  n = r.propTypes;
546
- else if (typeof r == "object" && (r.$$typeof === m || // Note: Memo only checks outer props here.
546
+ else if (typeof r == "object" && (r.$$typeof === p || // Note: Memo only checks outer props here.
547
547
  // Inner props are checked in the reconciler.
548
- r.$$typeof === R))
548
+ r.$$typeof === F))
549
549
  n = r.propTypes;
550
550
  else
551
551
  return;
552
552
  if (n) {
553
- var s = O(r);
554
- Ze(n, e.props, "prop", s, e);
553
+ var l = O(r);
554
+ Qe(n, e.props, "prop", l, e);
555
555
  } else if (r.PropTypes !== void 0 && !ee) {
556
556
  ee = !0;
557
557
  var v = O(r);
@@ -560,98 +560,98 @@ Check the top-level render call using <` + n + ">.");
560
560
  typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
561
561
  }
562
562
  }
563
- function vr(e) {
563
+ function hr(e) {
564
564
  {
565
565
  for (var r = Object.keys(e.props), n = 0; n < r.length; n++) {
566
- var s = r[n];
567
- if (s !== "children" && s !== "key") {
568
- I(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), I(null);
566
+ var l = r[n];
567
+ if (l !== "children" && l !== "key") {
568
+ N(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", l), N(null);
569
569
  break;
570
570
  }
571
571
  }
572
- e.ref !== null && (I(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), I(null));
572
+ e.ref !== null && (N(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), N(null));
573
573
  }
574
574
  }
575
- function Te(e, r, n, s, v, p) {
575
+ function Te(e, r, n, l, v, m) {
576
576
  {
577
- var f = Ue(e);
577
+ var f = qe(e);
578
578
  if (!f) {
579
579
  var c = "";
580
580
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (c += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
581
- var _ = ur();
582
- _ ? c += _ : c += we();
581
+ var w = fr();
582
+ w ? c += w : c += Re();
583
583
  var y;
584
584
  e === null ? y = "null" : Z(e) ? y = "array" : e !== void 0 && e.$$typeof === t ? (y = "<" + (O(e.type) || "Unknown") + " />", c = " Did you accidentally export a JSX literal instead of a component?") : y = typeof e, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", y, c);
585
585
  }
586
- var E = cr(e, r, n, v, p);
587
- if (E == null)
588
- return E;
586
+ var x = ur(e, r, n, v, m);
587
+ if (x == null)
588
+ return x;
589
589
  if (f) {
590
590
  var C = r.children;
591
591
  if (C !== void 0)
592
- if (s)
592
+ if (l)
593
593
  if (Z(C)) {
594
- for (var D = 0; D < C.length; D++)
595
- Ce(C[D], e);
594
+ for (var I = 0; I < C.length; I++)
595
+ Ce(C[I], e);
596
596
  Object.freeze && Object.freeze(C);
597
597
  } else
598
598
  h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
599
599
  else
600
600
  Ce(C, e);
601
601
  }
602
- return e === i ? vr(E) : dr(E), E;
602
+ return e === a ? hr(x) : vr(x), x;
603
603
  }
604
604
  }
605
- function hr(e, r, n) {
605
+ function mr(e, r, n) {
606
606
  return Te(e, r, n, !0);
607
607
  }
608
608
  function pr(e, r, n) {
609
609
  return Te(e, r, n, !1);
610
610
  }
611
- var mr = pr, gr = hr;
612
- W.Fragment = i, W.jsx = mr, W.jsxs = gr;
613
- })()), W;
611
+ var gr = pr, yr = mr;
612
+ z.Fragment = a, z.jsx = gr, z.jsxs = yr;
613
+ })()), z;
614
614
  }
615
- var De;
616
- function Or() {
617
- return De || (De = 1, process.env.NODE_ENV === "production" ? q.exports = Tr() : q.exports = Sr()), q.exports;
615
+ var Ie;
616
+ function Dr() {
617
+ return Ie || (Ie = 1, process.env.NODE_ENV === "production" ? q.exports = Nr() : q.exports = Ir()), q.exports;
618
618
  }
619
- var l = Or();
620
- function Pr(o) {
621
- const [t, a] = $([]), [i, d] = $(null), [b, x] = $(""), [F, m] = $(!1), [j, u] = $(null), R = A(async () => {
619
+ var o = Dr();
620
+ function Ar(s) {
621
+ const [t, i] = $([]), [a, d] = $(null), [b, E] = $(""), [j, p] = $(!1), [_, u] = $(null), F = D(async () => {
622
622
  try {
623
- m(!0), u(null);
624
- const g = await o.getFiles();
625
- if (a(g), !i && g.length > 0) {
626
- const h = Ne(g);
623
+ p(!0), u(null);
624
+ const g = await s.getFiles();
625
+ if (i(g), !a && g.length > 0) {
626
+ const h = $e(g);
627
627
  h && d(h.id);
628
628
  }
629
629
  } catch (g) {
630
630
  u(g instanceof Error ? g.message : "Failed to load files");
631
631
  } finally {
632
- m(!1);
632
+ p(!1);
633
633
  }
634
- }, [o, i]), w = A(
634
+ }, [s, a]), R = D(
635
635
  async (g) => {
636
636
  try {
637
- m(!0), u(null);
638
- const h = await o.getFileContent(g);
639
- x(h);
637
+ p(!0), u(null);
638
+ const h = await s.getFileContent(g);
639
+ E(h);
640
640
  } catch (h) {
641
641
  u(
642
642
  h instanceof Error ? h.message : "Failed to load file content"
643
- ), x("");
643
+ ), E("");
644
644
  } finally {
645
- m(!1);
645
+ p(!1);
646
646
  }
647
647
  },
648
- [o]
649
- ), S = A(
648
+ [s]
649
+ ), S = D(
650
650
  async (g) => {
651
- if (i)
651
+ if (a)
652
652
  try {
653
- u(null), await o.updateFileContent(i, g), x(g), a(
654
- (h) => Le(h, i, { content: g })
653
+ u(null), await s.updateFileContent(a, g), E(g), i(
654
+ (h) => ze(h, a, { content: g })
655
655
  );
656
656
  } catch (h) {
657
657
  u(
@@ -659,62 +659,62 @@ function Pr(o) {
659
659
  );
660
660
  }
661
661
  },
662
- [i, o]
663
- ), B = A(
662
+ [a, s]
663
+ ), W = D(
664
664
  (g) => {
665
- d(g), w(g);
665
+ d(g), R(g);
666
666
  },
667
- [w]
668
- ), J = A(() => {
669
- R();
670
- }, [R]), G = A(
671
- (g) => $e(t, g),
667
+ [R]
668
+ ), J = D(() => {
669
+ F();
670
+ }, [F]), H = D(
671
+ (g) => Le(t, g),
672
672
  [t]
673
673
  );
674
674
  return Oe(() => {
675
- R();
676
- }, [R]), Oe(() => {
677
- i && w(i);
678
- }, [i, w]), {
675
+ F();
676
+ }, [F]), Oe(() => {
677
+ a && R(a);
678
+ }, [a, R]), {
679
679
  files: t,
680
- activeFile: i,
680
+ activeFile: a,
681
681
  fileContent: b,
682
- loading: F,
683
- error: j,
684
- setActiveFile: B,
682
+ loading: j,
683
+ error: _,
684
+ setActiveFile: W,
685
685
  updateFileContent: S,
686
686
  refreshFiles: J,
687
- getFileById: G
687
+ getFileById: H
688
688
  };
689
689
  }
690
- function Ne(o) {
691
- for (const t of o) {
690
+ function $e(s) {
691
+ for (const t of s) {
692
692
  if (t.type === "file")
693
693
  return t;
694
694
  if (t.children) {
695
- const a = Ne(t.children);
696
- if (a) return a;
695
+ const i = $e(t.children);
696
+ if (i) return i;
697
697
  }
698
698
  }
699
699
  return null;
700
700
  }
701
- function $e(o, t) {
702
- for (const a of o) {
703
- if (a.id === t) return a;
704
- if (a.children) {
705
- const i = $e(a.children, t);
706
- if (i) return i;
701
+ function Le(s, t) {
702
+ for (const i of s) {
703
+ if (i.id === t) return i;
704
+ if (i.children) {
705
+ const a = Le(i.children, t);
706
+ if (a) return a;
707
707
  }
708
708
  }
709
709
  return null;
710
710
  }
711
- function Le(o, t, a) {
712
- return o.map((i) => i.id === t ? { ...i, ...a } : i.children ? {
713
- ...i,
714
- children: Le(i.children, t, a)
715
- } : i);
711
+ function ze(s, t, i) {
712
+ return s.map((a) => a.id === t ? { ...a, ...i } : a.children ? {
713
+ ...a,
714
+ children: ze(a.children, t, i)
715
+ } : a);
716
716
  }
717
- class kr {
717
+ class $r {
718
718
  config;
719
719
  files = [];
720
720
  constructor(t) {
@@ -731,9 +731,9 @@ class kr {
731
731
  );
732
732
  throw new Error(`File ${t} not found`);
733
733
  }
734
- async updateFileContent(t, a) {
735
- const i = this.findFileById(t);
736
- i && (i.content = a), console.log(`Updated file ${t} with content:`, a);
734
+ async updateFileContent(t, i) {
735
+ const a = this.findFileById(t);
736
+ a && (a.content = i), console.log(`Updated file ${t} with content:`, i);
737
737
  }
738
738
  async getFileMetadata(t) {
739
739
  return this.findFileById(t)?.metadata || {};
@@ -768,20 +768,20 @@ class kr {
768
768
  ];
769
769
  }
770
770
  findFileById(t) {
771
- const a = (i) => {
772
- for (const d of i) {
771
+ const i = (a) => {
772
+ for (const d of a) {
773
773
  if (d.id === t) return d;
774
774
  if (d.children) {
775
- const b = a(d.children);
775
+ const b = i(d.children);
776
776
  if (b) return b;
777
777
  }
778
778
  }
779
779
  return null;
780
780
  };
781
- return a(this.files);
781
+ return i(this.files);
782
782
  }
783
783
  }
784
- class Ir {
784
+ class Lr {
785
785
  config;
786
786
  files = [];
787
787
  constructor(t) {
@@ -795,11 +795,11 @@ class Ir {
795
795
  return this.config.codeContent;
796
796
  throw new Error(`File ${t} not found`);
797
797
  }
798
- async updateFileContent(t, a) {
798
+ async updateFileContent(t, i) {
799
799
  if (t === "form-code") {
800
- this.config.codeContent = a;
801
- const i = this.files.find((d) => d.id === t);
802
- i && (i.content = a);
800
+ this.config.codeContent = i;
801
+ const a = this.files.find((d) => d.id === t);
802
+ a && (a.content = i);
803
803
  }
804
804
  }
805
805
  async getFileMetadata(t) {
@@ -821,10 +821,10 @@ class Ir {
821
821
  ];
822
822
  }
823
823
  findFileById(t) {
824
- return this.files.find((a) => a.id === t) || null;
824
+ return this.files.find((i) => i.id === t) || null;
825
825
  }
826
826
  }
827
- class Dr {
827
+ class zr {
828
828
  config;
829
829
  files = [];
830
830
  constructor(t) {
@@ -834,29 +834,29 @@ class Dr {
834
834
  return this.files;
835
835
  }
836
836
  async getFileContent(t) {
837
- const a = this.findFileById(t);
838
- if (!a || !a.metadata?.url)
837
+ const i = this.findFileById(t);
838
+ if (!i || !i.metadata?.url)
839
839
  throw new Error(`File ${t} not found`);
840
840
  try {
841
- const i = await fetch(a.metadata.url);
842
- if (!i.ok)
843
- throw new Error(`Failed to fetch file: ${i.statusText}`);
844
- return await i.text();
845
- } catch (i) {
846
- throw new Error(`Error fetching file content: ${i}`);
841
+ const a = await fetch(i.metadata.url);
842
+ if (!a.ok)
843
+ throw new Error(`Failed to fetch file: ${a.statusText}`);
844
+ return await a.text();
845
+ } catch (a) {
846
+ throw new Error(`Error fetching file content: ${a}`);
847
847
  }
848
848
  }
849
- async updateFileContent(t, a) {
850
- console.log(`Would save file ${t} content to backend:`, a);
851
- const i = this.findFileById(t);
852
- i && (i.content = a);
849
+ async updateFileContent(t, i) {
850
+ console.log(`Would save file ${t} content to backend:`, i);
851
+ const a = this.findFileById(t);
852
+ a && (a.content = i);
853
853
  }
854
854
  async getFileMetadata(t) {
855
855
  return this.findFileById(t)?.metadata || {};
856
856
  }
857
857
  initializeFiles() {
858
- this.files = this.config.fileUrls.map((t, a) => ({
859
- id: `url-file-${a}`,
858
+ this.files = this.config.fileUrls.map((t, i) => ({
859
+ id: `url-file-${i}`,
860
860
  name: t.name,
861
861
  type: "file",
862
862
  path: `/${t.name}`,
@@ -868,36 +868,36 @@ class Dr {
868
868
  }));
869
869
  }
870
870
  findFileById(t) {
871
- return this.files.find((a) => a.id === t) || null;
871
+ return this.files.find((i) => i.id === t) || null;
872
872
  }
873
873
  }
874
- function Ar(o) {
875
- if (o.workflowConfig)
876
- return new kr(o.workflowConfig);
877
- if (o.formConfig)
878
- return new Ir(o.formConfig);
879
- if (o.urlConfig)
880
- return new Dr(o.urlConfig);
874
+ function Wr(s) {
875
+ if (s.workflowConfig)
876
+ return new $r(s.workflowConfig);
877
+ if (s.formConfig)
878
+ return new Lr(s.formConfig);
879
+ if (s.urlConfig)
880
+ return new zr(s.urlConfig);
881
881
  throw new Error("No valid configuration provided");
882
882
  }
883
- const Nr = ({
884
- value: o,
883
+ const Mr = ({
884
+ value: s,
885
885
  onChange: t,
886
- language: a = "javascript",
887
- filename: i,
886
+ language: i = "javascript",
887
+ filename: a,
888
888
  readOnly: d = !1,
889
889
  loading: b = !1
890
890
  }) => {
891
- const x = (F) => {
892
- F !== void 0 && t(F);
891
+ const E = (j) => {
892
+ j !== void 0 && t(j);
893
893
  };
894
- return /* @__PURE__ */ l.jsx("div", { className: "h-full w-full", children: /* @__PURE__ */ l.jsx(
895
- yr,
894
+ return /* @__PURE__ */ o.jsx("div", { className: "h-full w-full", children: /* @__PURE__ */ o.jsx(
895
+ xr,
896
896
  {
897
897
  height: "100%",
898
- defaultLanguage: a,
899
- defaultValue: o,
900
- onChange: x,
898
+ defaultLanguage: i,
899
+ defaultValue: s,
900
+ onChange: E,
901
901
  theme: "vs-light",
902
902
  options: {
903
903
  minimap: {
@@ -914,19 +914,19 @@ const Nr = ({
914
914
  }
915
915
  }
916
916
  ) });
917
- }, $r = ({
918
- activePanel: o,
917
+ }, Br = ({
918
+ activePanel: s,
919
919
  setActivePanel: t
920
920
  }) => {
921
- const a = [
921
+ const i = [
922
922
  {
923
923
  id: "explorer",
924
- icon: Ae,
924
+ icon: De,
925
925
  label: "Files"
926
926
  },
927
927
  {
928
928
  id: "data",
929
- icon: xr,
929
+ icon: jr,
930
930
  label: "Data"
931
931
  },
932
932
  {
@@ -936,44 +936,44 @@ const Nr = ({
936
936
  },
937
937
  {
938
938
  id: "versions",
939
- icon: Rr,
939
+ icon: Ae,
940
940
  label: "Versions"
941
941
  },
942
942
  {
943
943
  id: "tests",
944
- icon: wr,
944
+ icon: Rr,
945
945
  label: "Tests"
946
946
  }
947
947
  ];
948
- return /* @__PURE__ */ l.jsxs("div", { className: "w-14 border-r border-slate-200 bg-white flex flex-col gap-4 items-center py-4", children: [
949
- a.map((i) => {
950
- const d = i.icon;
951
- return /* @__PURE__ */ l.jsx(Pe, { title: i.label, placement: "right", children: /* @__PURE__ */ l.jsx(
948
+ return /* @__PURE__ */ o.jsxs("div", { className: "w-14 border-r border-slate-200 bg-white flex flex-col gap-4 items-center py-4", children: [
949
+ i.map((a) => {
950
+ const d = a.icon;
951
+ return /* @__PURE__ */ o.jsx(Pe, { title: a.label, placement: "right", children: /* @__PURE__ */ o.jsx(
952
952
  te,
953
953
  {
954
- type: o === i.id ? "primary" : "text",
955
- icon: /* @__PURE__ */ l.jsx(d, { size: 16 }),
956
- onClick: () => t(i.id)
954
+ type: s === a.id ? "primary" : "text",
955
+ icon: /* @__PURE__ */ o.jsx(d, { size: 16 }),
956
+ onClick: () => t(a.id)
957
957
  }
958
- ) }, i.id);
958
+ ) }, a.id);
959
959
  }),
960
- /* @__PURE__ */ l.jsx("div", { className: "mt-auto", children: /* @__PURE__ */ l.jsx(Pe, { title: "Settings", placement: "right", children: /* @__PURE__ */ l.jsx(te, { type: "text", icon: /* @__PURE__ */ l.jsx(_r, { size: 20 }) }) }) })
960
+ /* @__PURE__ */ o.jsx("div", { className: "mt-auto", children: /* @__PURE__ */ o.jsx(Pe, { title: "Settings", placement: "right", children: /* @__PURE__ */ o.jsx(te, { type: "text", icon: /* @__PURE__ */ o.jsx(wr, { size: 20 }) }) }) })
961
961
  ] });
962
- }, Lr = ({
963
- leftPanel: o,
962
+ }, Yr = ({
963
+ leftPanel: s,
964
964
  editor: t,
965
- rightPanel: a,
966
- activePanel: i,
965
+ rightPanel: i,
966
+ activePanel: a,
967
967
  setActivePanel: d
968
- }) => /* @__PURE__ */ l.jsxs("div", { className: "flex flex-1 overflow-hidden", children: [
969
- /* @__PURE__ */ l.jsx($r, { activePanel: i, setActivePanel: d }),
970
- /* @__PURE__ */ l.jsx("div", { className: "flex-1", children: a ? /* @__PURE__ */ l.jsxs(
968
+ }) => /* @__PURE__ */ o.jsxs("div", { className: "flex flex-1 overflow-hidden", children: [
969
+ /* @__PURE__ */ o.jsx(Br, { activePanel: a, setActivePanel: d }),
970
+ /* @__PURE__ */ o.jsx("div", { className: "flex-1", children: i ? /* @__PURE__ */ o.jsxs(
971
971
  k,
972
972
  {
973
973
  style: { height: "100%" },
974
974
  onResize: (b) => console.log(b),
975
975
  children: [
976
- /* @__PURE__ */ l.jsx(
976
+ /* @__PURE__ */ o.jsx(
977
977
  k.Panel,
978
978
  {
979
979
  defaultSize: "25%",
@@ -981,70 +981,70 @@ const Nr = ({
981
981
  max: "40%",
982
982
  className: "bg-white border-r border-slate-200",
983
983
  collapsible: !0,
984
- children: /* @__PURE__ */ l.jsx("div", { className: "h-full overflow-y-auto", children: o })
984
+ children: /* @__PURE__ */ o.jsx("div", { className: "h-full overflow-y-auto", children: s })
985
985
  }
986
986
  ),
987
- /* @__PURE__ */ l.jsx(k.Panel, { defaultSize: "50%", min: "30%", children: t }),
988
- /* @__PURE__ */ l.jsx(
987
+ /* @__PURE__ */ o.jsx(k.Panel, { defaultSize: "50%", min: "30%", children: t }),
988
+ /* @__PURE__ */ o.jsx(
989
989
  k.Panel,
990
990
  {
991
991
  defaultSize: "25%",
992
992
  min: "20%",
993
993
  max: "50%",
994
994
  className: "bg-white border-l border-slate-200",
995
- children: /* @__PURE__ */ l.jsx("div", { className: "h-full overflow-y-auto", children: a })
995
+ children: /* @__PURE__ */ o.jsx("div", { className: "h-full overflow-y-auto", children: i })
996
996
  }
997
997
  )
998
998
  ]
999
999
  }
1000
- ) : /* @__PURE__ */ l.jsxs(k, { style: { height: "100%" }, children: [
1001
- /* @__PURE__ */ l.jsx(
1000
+ ) : /* @__PURE__ */ o.jsxs(k, { style: { height: "100%" }, children: [
1001
+ /* @__PURE__ */ o.jsx(
1002
1002
  k.Panel,
1003
1003
  {
1004
1004
  defaultSize: "25%",
1005
1005
  min: "15%",
1006
1006
  max: "40%",
1007
1007
  className: "bg-white border-r border-slate-200",
1008
- children: /* @__PURE__ */ l.jsx("div", { className: "h-full overflow-y-auto", children: o })
1008
+ children: /* @__PURE__ */ o.jsx("div", { className: "h-full overflow-y-auto", children: s })
1009
1009
  }
1010
1010
  ),
1011
- /* @__PURE__ */ l.jsx(k.Panel, { defaultSize: "75%", min: "60%", children: t })
1011
+ /* @__PURE__ */ o.jsx(k.Panel, { defaultSize: "75%", min: "60%", children: t })
1012
1012
  ] }) })
1013
- ] }), Wr = ({
1014
- files: o,
1013
+ ] }), Vr = ({
1014
+ files: s,
1015
1015
  activeFile: t,
1016
- onFileSelect: a,
1017
- loading: i = !1,
1016
+ onFileSelect: i,
1017
+ loading: a = !1,
1018
1018
  error: d = null,
1019
1019
  onRefresh: b
1020
1020
  }) => {
1021
- const x = (j) => j.map((u) => ({
1021
+ const E = (_) => _.map((u) => ({
1022
1022
  title: u.name,
1023
1023
  key: u.id,
1024
- icon: u.type === "file" ? /* @__PURE__ */ l.jsx(Cr, { size: 16, className: "text-slate-500 flex" }) : /* @__PURE__ */ l.jsx(Ae, { size: 16, className: "text-slate-500 flex" }),
1024
+ icon: u.type === "file" ? /* @__PURE__ */ o.jsx(Cr, { size: 16, className: "text-slate-500 flex" }) : /* @__PURE__ */ o.jsx(De, { size: 16, className: "text-slate-500 flex" }),
1025
1025
  isLeaf: u.type === "file",
1026
- children: u.children ? x(u.children) : void 0,
1026
+ children: u.children ? E(u.children) : void 0,
1027
1027
  metadata: u.metadata
1028
- })), F = x(o), m = (j, u) => {
1029
- u?.node.isLeaf && u.node.key && a(u.node.key);
1028
+ })), j = E(s), p = (_, u) => {
1029
+ u?.node.isLeaf && u.node.key && i(u.node.key);
1030
1030
  };
1031
- return /* @__PURE__ */ l.jsxs("div", { className: "h-full", children: [
1032
- /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between p-4 border-b border-slate-200", children: [
1033
- /* @__PURE__ */ l.jsx("h2", { className: "font-medium text-sm", children: "Files" }),
1034
- /* @__PURE__ */ l.jsx("div", { className: "flex items-center gap-2", children: b && /* @__PURE__ */ l.jsx(
1031
+ return /* @__PURE__ */ o.jsxs("div", { className: "h-full", children: [
1032
+ /* @__PURE__ */ o.jsxs("div", { className: "flex items-center justify-between p-4 border-b border-slate-200", children: [
1033
+ /* @__PURE__ */ o.jsx("h2", { className: "font-medium text-sm", children: "Files" }),
1034
+ /* @__PURE__ */ o.jsx("div", { className: "flex items-center gap-2", children: b && /* @__PURE__ */ o.jsx(
1035
1035
  te,
1036
1036
  {
1037
1037
  type: "text",
1038
- icon: /* @__PURE__ */ l.jsx(jr, { size: 16 }),
1038
+ icon: /* @__PURE__ */ o.jsx(_r, { size: 16 }),
1039
1039
  onClick: b,
1040
- loading: i,
1040
+ loading: a,
1041
1041
  title: "Refresh files"
1042
1042
  }
1043
1043
  ) })
1044
1044
  ] }),
1045
- /* @__PURE__ */ l.jsxs("div", { className: "p-2", children: [
1046
- d && /* @__PURE__ */ l.jsx(
1047
- Er,
1045
+ /* @__PURE__ */ o.jsxs("div", { className: "p-2", children: [
1046
+ d && /* @__PURE__ */ o.jsx(
1047
+ br,
1048
1048
  {
1049
1049
  message: "Error loading files",
1050
1050
  description: d,
@@ -1052,11 +1052,11 @@ const Nr = ({
1052
1052
  className: "mb-2"
1053
1053
  }
1054
1054
  ),
1055
- /* @__PURE__ */ l.jsx(
1056
- br,
1055
+ /* @__PURE__ */ o.jsx(
1056
+ Er,
1057
1057
  {
1058
- treeData: F,
1059
- onSelect: m,
1058
+ treeData: j,
1059
+ onSelect: p,
1060
1060
  selectedKeys: t ? [t] : [],
1061
1061
  showIcon: !0,
1062
1062
  defaultExpandAll: !0,
@@ -1067,48 +1067,48 @@ const Nr = ({
1067
1067
  ] })
1068
1068
  ] });
1069
1069
  }, ie = ({
1070
- config: o,
1070
+ config: s,
1071
1071
  rightPanel: t = !1
1072
1072
  }) => {
1073
- const a = ne.useMemo(
1074
- () => Ar(o),
1075
- [o]
1073
+ const i = ne.useMemo(
1074
+ () => Wr(s),
1075
+ [s]
1076
1076
  );
1077
- console.log({ config: o });
1077
+ console.log({ config: s });
1078
1078
  const {
1079
- files: i,
1079
+ files: a,
1080
1080
  activeFile: d,
1081
1081
  fileContent: b,
1082
- loading: x,
1083
- error: F,
1084
- setActiveFile: m,
1085
- updateFileContent: j,
1082
+ loading: E,
1083
+ error: j,
1084
+ setActiveFile: p,
1085
+ updateFileContent: _,
1086
1086
  refreshFiles: u,
1087
- getFileById: R
1088
- } = Pr(a), w = d ? R(d) : null, S = w?.metadata?.language || "javascript";
1089
- return /* @__PURE__ */ l.jsx(
1090
- Lr,
1087
+ getFileById: F
1088
+ } = Ar(i), R = d ? F(d) : null, S = R?.metadata?.language || "javascript";
1089
+ return /* @__PURE__ */ o.jsx(
1090
+ Yr,
1091
1091
  {
1092
- leftPanel: /* @__PURE__ */ l.jsx(
1093
- Wr,
1092
+ leftPanel: /* @__PURE__ */ o.jsx(
1093
+ Vr,
1094
1094
  {
1095
- files: i,
1095
+ files: a,
1096
1096
  activeFile: d,
1097
- onFileSelect: m,
1098
- loading: x,
1099
- error: F,
1097
+ onFileSelect: p,
1098
+ loading: E,
1099
+ error: j,
1100
1100
  onRefresh: u
1101
1101
  }
1102
1102
  ),
1103
- editor: /* @__PURE__ */ l.jsx(
1104
- Nr,
1103
+ editor: /* @__PURE__ */ o.jsx(
1104
+ Mr,
1105
1105
  {
1106
1106
  value: b,
1107
- onChange: j,
1107
+ onChange: _,
1108
1108
  language: S,
1109
- filename: w?.name,
1110
- readOnly: o.settings?.readOnly,
1111
- loading: x
1109
+ filename: R?.name,
1110
+ readOnly: s.settings?.readOnly,
1111
+ loading: E
1112
1112
  }
1113
1113
  ),
1114
1114
  rightPanel: t,
@@ -1117,65 +1117,119 @@ const Nr = ({
1117
1117
  }
1118
1118
  }
1119
1119
  );
1120
- }, Vr = ({
1121
- functionId: o,
1120
+ }, Gr = ({
1121
+ functionId: s,
1122
1122
  version: t,
1123
- versionList: a,
1124
- fetchFunction: i,
1123
+ versionList: i,
1124
+ fetchFunction: a,
1125
1125
  fetchVersionList: d
1126
1126
  }) => {
1127
1127
  const b = {
1128
1128
  workflowConfig: {
1129
- functionId: o,
1129
+ functionId: s,
1130
1130
  version: t,
1131
- versionList: a,
1132
- fetchFunction: i,
1131
+ versionList: i,
1132
+ fetchFunction: a,
1133
1133
  fetchVersionList: d
1134
1134
  }
1135
1135
  };
1136
- return /* @__PURE__ */ l.jsx(ie, { config: b });
1137
- }, Ur = ({
1138
- codeContent: o,
1136
+ return /* @__PURE__ */ o.jsx(ie, { config: b });
1137
+ }, Kr = ({
1138
+ codeContent: s,
1139
1139
  fileName: t = "code.js",
1140
- language: a = "javascript",
1141
- readOnly: i = !1
1140
+ language: i = "javascript",
1141
+ readOnly: a = !1
1142
1142
  }) => {
1143
1143
  const d = {
1144
1144
  formConfig: {
1145
- codeContent: o,
1145
+ codeContent: s,
1146
1146
  fileName: t,
1147
- language: a
1147
+ language: i
1148
1148
  },
1149
1149
  settings: {
1150
- readOnly: i
1150
+ readOnly: a
1151
1151
  }
1152
1152
  };
1153
- return /* @__PURE__ */ l.jsx(ie, { config: d });
1154
- }, qr = ({ fileUrls: o, rightPanel: t }) => {
1155
- const a = {
1153
+ return /* @__PURE__ */ o.jsx(ie, { config: d });
1154
+ }, Xr = ({ fileUrls: s, rightPanel: t }) => {
1155
+ const i = {
1156
1156
  urlConfig: {
1157
- fileUrls: o
1157
+ fileUrls: s
1158
1158
  }
1159
1159
  };
1160
- return /* @__PURE__ */ l.jsx(ie, { config: a, rightPanel: t });
1161
- }, Jr = "1.0.0";
1160
+ return /* @__PURE__ */ o.jsx(ie, { config: i, rightPanel: t });
1161
+ }, Zr = ({
1162
+ activeFile: s,
1163
+ showPreview: t,
1164
+ setShowPreview: i
1165
+ }) => /* @__PURE__ */ o.jsxs("div", { className: "h-14 border-b border-slate-200 bg-white px-4 flex items-center justify-between", children: [
1166
+ /* @__PURE__ */ o.jsxs("div", { className: "flex items-center", children: [
1167
+ /* @__PURE__ */ o.jsx("h1", { className: "text-lg font-semibold text-slate-900 mr-4", children: "CRM Code Editor" }),
1168
+ /* @__PURE__ */ o.jsx("span", { className: "text-sm text-slate-500 px-2 py-1 bg-slate-100 rounded-md", children: s })
1169
+ ] }),
1170
+ /* @__PURE__ */ o.jsxs("div", { className: "flex items-center space-x-2", children: [
1171
+ /* @__PURE__ */ o.jsx(
1172
+ "button",
1173
+ {
1174
+ className: "p-1.5 hover:bg-slate-100 rounded-md text-slate-600",
1175
+ onClick: () => i(!t),
1176
+ title: t ? "Hide Preview" : "Show Preview",
1177
+ children: t ? /* @__PURE__ */ o.jsx(Tr, { size: 18 }) : /* @__PURE__ */ o.jsx(Sr, { size: 18 })
1178
+ }
1179
+ ),
1180
+ /* @__PURE__ */ o.jsx(
1181
+ "button",
1182
+ {
1183
+ className: "p-1.5 hover:bg-slate-100 rounded-md text-slate-600",
1184
+ title: "Version History",
1185
+ children: /* @__PURE__ */ o.jsx(Ae, { size: 18 })
1186
+ }
1187
+ ),
1188
+ /* @__PURE__ */ o.jsx(
1189
+ "button",
1190
+ {
1191
+ className: "p-1.5 hover:bg-slate-100 rounded-md text-slate-600",
1192
+ title: "Run Code",
1193
+ children: /* @__PURE__ */ o.jsx(Or, { size: 18 })
1194
+ }
1195
+ ),
1196
+ /* @__PURE__ */ o.jsx(
1197
+ "button",
1198
+ {
1199
+ className: "p-1.5 hover:bg-slate-100 rounded-md text-slate-600",
1200
+ title: "Export",
1201
+ children: /* @__PURE__ */ o.jsx(Pr, { size: 18 })
1202
+ }
1203
+ ),
1204
+ /* @__PURE__ */ o.jsxs("button", { className: "ml-2 px-3 py-1.5 bg-slate-900 text-white rounded-md flex items-center text-sm hover:bg-slate-800", children: [
1205
+ /* @__PURE__ */ o.jsx(kr, { size: 16, className: "mr-1.5" }),
1206
+ " Save"
1207
+ ] }),
1208
+ /* @__PURE__ */ o.jsxs("div", { className: "ml-2 px-3 py-1.5 bg-emerald-100 text-emerald-800 rounded-md flex items-center text-sm", children: [
1209
+ /* @__PURE__ */ o.jsx("span", { className: "w-2 h-2 bg-emerald-500 rounded-full mr-1.5" }),
1210
+ " ",
1211
+ "Draft"
1212
+ ] })
1213
+ ] })
1214
+ ] }), Qr = "1.0.0";
1162
1215
  export {
1163
- Hr as Alert,
1164
- Xr as Button,
1165
- Nr as CodeEditor,
1216
+ tt as Alert,
1217
+ nt as Button,
1218
+ Mr as CodeEditor,
1166
1219
  ie as CodeEditorWrapper,
1167
- Lr as EditorLayout,
1168
- Wr as FileExplorer,
1169
- Ur as FormCodeEditor,
1170
- Ir as FormFileProvider,
1171
- Zr as Splitter,
1172
- Qr as Tooltip,
1173
- et as Tree,
1174
- qr as URLCodeEditor,
1175
- Dr as URLFileProvider,
1176
- Jr as VERSION,
1177
- Vr as WorkflowCodeEditor,
1178
- kr as WorkflowFileProvider,
1179
- Ar as createFileProvider,
1180
- Pr as useFileManager
1220
+ Yr as EditorLayout,
1221
+ Vr as FileExplorer,
1222
+ Kr as FormCodeEditor,
1223
+ Lr as FormFileProvider,
1224
+ Zr as Header,
1225
+ it as Splitter,
1226
+ at as Tooltip,
1227
+ ot as Tree,
1228
+ Xr as URLCodeEditor,
1229
+ zr as URLFileProvider,
1230
+ Qr as VERSION,
1231
+ Gr as WorkflowCodeEditor,
1232
+ $r as WorkflowFileProvider,
1233
+ Wr as createFileProvider,
1234
+ Ar as useFileManager
1181
1235
  };