@oomol-lab/open-flow 0.1.0-beta.39 → 0.1.0-beta.40

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.
Files changed (41) hide show
  1. package/dist/browser/codeDiagnostics-BtH_YuXu.js +44 -0
  2. package/dist/browser/{createResourceDialog-DnlKSqIs.js → createResourceDialog-BOrW62JW.js} +1 -1
  3. package/dist/browser/{dist-DYjIVIZC.js → dist-Cdna4VV_.js} +1 -1
  4. package/dist/browser/{dist-CeSZ2xSM.js → dist-DINmJ4Gr.js} +171 -112
  5. package/dist/browser/{editorComponent-T-GmTa-C.js → editorComponent-0skblWYk.js} +190 -107
  6. package/dist/browser/flow-authoring-node.d.ts +2 -5
  7. package/dist/browser/flow-authoring.js +111 -83
  8. package/dist/browser/flow-change-schema.d.ts +1 -1
  9. package/dist/browser/flow-change.d.ts +16 -5
  10. package/dist/browser/flow-change.js +196 -143
  11. package/dist/browser/{flowChanges-BXqN4jyH.js → flowChanges-3o9Vs_1I.js} +2479 -3906
  12. package/dist/browser/{flowWorkspace-a5QLISui.js → flowWorkspace-DJzQVVtZ.js} +12035 -10159
  13. package/dist/browser/{inputValues-Do4FrC_6.js → inputValues-DkDT6u0o.js} +1 -1
  14. package/dist/browser/{typeScriptSession-vC9uPDVV.js → typeScriptSession-v9Pb3G6d.js} +136 -136
  15. package/dist/browser/ui.css +1 -1
  16. package/dist/browser/workbench.css +1 -1
  17. package/dist/browser/workbench.d.ts +0 -3
  18. package/dist/browser/workbench.js +1046 -1025
  19. package/dist/browser/{workbenchSelect-Dx2Y46cD.js → workbenchSelect-B5zXyaaX.js} +1116 -1063
  20. package/dist/common/connectorDecoders.d.ts +2 -1
  21. package/dist/common/control-api-conformance.js +1589 -1518
  22. package/dist/common/control-api.d.ts +18 -6
  23. package/dist/common/control-api.js +1470 -1392
  24. package/dist/common/control-requests.js +1550 -1535
  25. package/dist/common/draftOperations.d.ts +0 -1
  26. package/dist/common/flow-connectionUsage.d.ts +1 -1
  27. package/dist/common/flow-encoding.js +1092 -1060
  28. package/dist/common/flow-semantics.d.ts +1 -0
  29. package/dist/common/flow-semantics.js +2777 -2699
  30. package/dist/common/flowInspection.d.ts +1 -1
  31. package/dist/common/integration-trigger.js +350 -328
  32. package/dist/common/mcp.d.ts +27 -0
  33. package/dist/common/mcp.js +807 -728
  34. package/dist/common/poll-trigger.js +993 -971
  35. package/dist/common/provider-triggers.js +1521 -1203
  36. package/dist/common/runtime-contract.js +13 -6
  37. package/dist/common/scheduler.js +1430 -1408
  38. package/dist/common/trigger-catalog.d.ts +2 -1
  39. package/dist/common/webhook-trigger.js +221 -199
  40. package/dist/common/{zh-CN-D2od3TNw.js → zh-CN-CxZ3yYfR.js} +2 -2
  41. package/package.json +1 -1
@@ -1,19 +1,19 @@
1
1
  import { a as e, i as t, l as n } from "./dist-Dz6Nglsd.js";
2
2
  import { a as r, i, r as a, t as o } from "./main-BDnNHhkU.js";
3
3
  import { Bn as s, Hn as c, kt as l, t as u } from "./lite-BA96NG4M.js";
4
- import { E as d, M as f, N as p, O as m, P as h, T as g, _, h as v, j as y, k as b, m as x, w as S } from "./editorComponent-T-GmTa-C.js";
5
- import { $ as C, At as w, E as T, Ft as E, Gt as ee, H as D, Ht as O, It as te, J as ne, Jt as re, Kt as k, Lt as ie, M as A, Mt as ae, N as j, Nt as oe, O as M, Pt as se, Q as N, R as ce, S as le, T as ue, U as de, Ut as fe, V as P, W as pe, Wt as F, X as me, Xt as he, Y as ge, Yt as _e, Z as ve, Zt as ye, _ as be, a as xe, an as Se, b as Ce, c as we, cn as I, d as Te, et as Ee, f as De, g as Oe, h as ke, i as Ae, in as L, j as R, jt as je, k as Me, kt as Ne, l as Pe, ln as Fe, m as Ie, nn as Le, nt as Re, o as ze, on as Be, p as Ve, qt as He, r as z, rn as Ue, s as We, sn as B, t as Ge, tn as Ke, tt as qe, u as Je, v as Ye, w as Xe, x as Ze, y as Qe } from "./flowChanges-BXqN4jyH.js";
6
- import { C as $e, D as et, O as tt, _ as nt, a as rt, c as it, d as at, f as ot, g as st, h as ct, i as lt, l as ut, m as dt, n as ft, o as pt, r as mt, s as ht, t as gt, v as _t, w as vt } from "./workbenchSelect-Dx2Y46cD.js";
7
- import { a as V } from "./dist-CoszrK7m.js";
8
- import { c as yt, d as bt, l as xt, u as St } from "./value-B_yE9ean.js";
9
- import { Fragment as Ct, jsx as H, jsxs as U } from "react/jsx-runtime";
10
- import { Suspense as wt, lazy as Tt, useEffect as Et, useRef as Dt, useState as W } from "react";
11
- import * as Ot from "effect/Cause";
12
- import * as G from "effect/Effect";
13
- import * as kt from "effect/Exit";
14
- import * as At from "effect/Fiber";
4
+ import { E as d, M as f, N as p, O as m, P as h, T as g, _, h as v, j as y, k as b, m as x, w as S } from "./editorComponent-0skblWYk.js";
5
+ import { C, D as w, O as T, _ as E, a as ee, c as te, d as D, f as ne, g as re, h as O, i as ie, l as ae, m as oe, n as k, o as se, r as ce, s as le, t as ue, v as de, w as fe } from "./workbenchSelect-B5zXyaaX.js";
6
+ import { $ as pe, At as A, Ct as me, E as he, Et as ge, Ft as _e, H as j, It as M, J as N, Lt as P, M as F, Mt as ve, N as I, Nt as L, O as ye, Pt as be, Q as xe, R as Se, Rt as Ce, S as we, St as Te, T as Ee, Tt as De, U as Oe, V as R, W as ke, X as Ae, Y as je, Z as Me, _ as Ne, _t as z, a as Pe, at as Fe, b as Ie, bt as Le, c as Re, ct as ze, d as Be, dt as Ve, et as He, f as Ue, ft as We, g as Ge, h as Ke, i as qe, it as Je, j as B, jt as Ye, k as Xe, l as Ze, lt as Qe, m as $e, nt as V, o as et, ot as tt, p as nt, r as H, rt, s as it, st as at, t as ot, tt as st, u as ct, ut as lt, v as ut, vt as dt, w as ft, wt as pt, x as mt, xt as ht, y as gt, yt as U } from "./flowChanges-3o9Vs_1I.js";
7
+ import { a as W } from "./dist-CoszrK7m.js";
8
+ import { c as _t, d as vt, l as yt, u as bt } from "./value-B_yE9ean.js";
9
+ import { Fragment as xt, jsx as G, jsxs as K } from "react/jsx-runtime";
10
+ import { Suspense as St, lazy as Ct, useEffect as wt, useRef as Tt, useState as q } from "react";
11
+ import * as Et from "effect/Cause";
12
+ import * as J from "effect/Effect";
13
+ import * as Dt from "effect/Exit";
14
+ import * as Ot from "effect/Fiber";
15
15
  //#region src/workbench/browser/runtime/navigation.ts
16
- var jt = class {
16
+ var kt = class {
17
17
  #e;
18
18
  #t;
19
19
  #n;
@@ -24,62 +24,65 @@ var jt = class {
24
24
  #s;
25
25
  #c;
26
26
  constructor(e, t, r) {
27
- this.#r = n("design"), this.#i = 0, this.#a = !1, this.#o = !1, this.#s = !1, this.#c = [], this.$ = { view: this.#r }, this.#l = () => {
28
- this.#o && !this.#s && this.#u(this.#r.value, !0);
29
- }, this.#t = t, this.#e = r, this.#n = e, this.#r.set(t.view);
27
+ this.#r = n(!1), this.#i = n("design"), this.#a = 0, this.#o = !1, this.#s = !1, this.#c = [], this.$ = {
28
+ ready: this.#r,
29
+ view: this.#i
30
+ }, this.#l = () => {
31
+ this.#r.value && !this.#s && this.#u(this.#i.value, !0);
32
+ }, this.#t = t, this.#e = r, this.#n = e, this.#i.set(t.view);
30
33
  }
31
34
  async start() {
32
- let e = this.#t, t = ++this.#i;
33
- this.#s = !0, this.#c.push(this.#n.workspace.$.flowId.reaction(this.#l)), await this.#n.start(e.flowId), !(this.#a || t != this.#i) && (this.#u(e.view, !0), this.#s = !1, this.#o = !0);
35
+ let e = this.#t, t = ++this.#a;
36
+ this.#s = !0, this.#c.push(this.#n.workspace.$.flowId.reaction(this.#l)), await this.#n.start(e.flowId), !(this.#o || t != this.#a) && (this.#u(e.view, !0), this.#s = !1, this.#r.set(!0));
34
37
  }
35
38
  dispose() {
36
- this.#a = !0;
39
+ this.#o = !0;
37
40
  for (let e of this.#c) e();
38
- this.#r.dispose();
41
+ this.#r.dispose(), this.#i.dispose();
39
42
  }
40
43
  open(e) {
41
- this.#i += 1, this.#s = !1, this.#u(e, !1);
44
+ this.#a += 1, this.#s = !1, this.#u(e, !1);
42
45
  }
43
46
  async createFlow(e, t) {
44
- let n = ++this.#i;
47
+ let n = ++this.#a;
45
48
  this.#s = !0;
46
49
  try {
47
50
  let r = await this.#n.createFlow(e, t);
48
- return r && n == this.#i && this.#u("design", !1), r;
51
+ return r && n == this.#a && this.#u("design", !1), r;
49
52
  } finally {
50
- n == this.#i && (this.#s = !1);
53
+ n == this.#a && (this.#s = !1);
51
54
  }
52
55
  }
53
56
  async createSubflow(e) {
54
- let t = ++this.#i;
57
+ let t = ++this.#a;
55
58
  this.#s = !0;
56
59
  try {
57
60
  let n = await this.#n.workspace.createResource(e);
58
- return n && t == this.#i && this.#u("design", !1), n;
61
+ return n && t == this.#a && this.#u("design", !1), n;
59
62
  } finally {
60
- t == this.#i && (this.#s = !1);
63
+ t == this.#a && (this.#s = !1);
61
64
  }
62
65
  }
63
66
  async selectFlow(e) {
64
- let t = ++this.#i;
65
- this.#s = !0, this.#n.runRequests.dismissInputs(), await this.#n.selectFlow(e.flowId), t == this.#i && (this.#u("design", !1), this.#s = !1);
67
+ let t = ++this.#a;
68
+ this.#s = !0, this.#n.runRequests.dismissInputs(), await this.#n.selectFlow(e.flowId), t == this.#a && (this.#u("design", !1), this.#s = !1);
66
69
  }
67
70
  openMainFlow() {
68
71
  this.#n.workspace.selectTarget({ kind: "flow" }) && this.#u("design", !1);
69
72
  }
70
73
  async openFlows() {
71
- let e = ++this.#i;
72
- this.#s = !0, await this.#n.selectFlow(void 0), e == this.#i && (this.#u("design", !1), this.#s = !1);
74
+ let e = ++this.#a;
75
+ this.#s = !0, await this.#n.selectFlow(void 0), e == this.#a && (this.#u("design", !1), this.#s = !1);
73
76
  }
74
77
  async apply(e) {
75
- if (Mt(e, this.#t)) return;
78
+ if (At(e, this.#t)) return;
76
79
  this.#t = e;
77
- let t = ++this.#i;
80
+ let t = ++this.#a;
78
81
  this.#s = !0;
79
82
  try {
80
- e.flowId != this.#n.workspace.$.flowId.value && await this.#n.selectFlow(e.flowId), t == this.#i && this.#u(e.view, !0);
83
+ e.flowId != this.#n.workspace.$.flowId.value && await this.#n.selectFlow(e.flowId), t == this.#a && this.#u(e.view, !0);
81
84
  } finally {
82
- t == this.#i && (this.#s = !1, this.#o = !0);
85
+ t == this.#a && (this.#s = !1, this.#r.set(!0));
83
86
  }
84
87
  }
85
88
  #l;
@@ -88,39 +91,48 @@ var jt = class {
88
91
  flowId: n,
89
92
  view: n == null ? "design" : e
90
93
  };
91
- Mt(r, this.#t) || (this.#t = r, this.#e(r, { replace: t })), this.#r.set(r.view);
94
+ At(r, this.#t) || (this.#t = r, this.#e(r, { replace: t })), this.#i.set(r.view);
92
95
  }
93
96
  };
94
- function Mt(e, t) {
97
+ function At(e, t) {
95
98
  return e.flowId == t.flowId && e.view == t.view;
96
99
  }
97
100
  //#endregion
101
+ //#region src/ui/browser/skeleton.tsx
102
+ function Y({ className: e, ...t }) {
103
+ return /* @__PURE__ */ G("div", {
104
+ "data-slot": "skeleton",
105
+ className: c("animate-pulse rounded-md bg-muted motion-reduce:animate-none", e),
106
+ ...t
107
+ });
108
+ }
109
+ //#endregion
98
110
  //#region src/workbench/browser/runtime/shell/resourceBrowser.tsx
99
- var Nt = Tt(() => import("./createResourceDialog-DnlKSqIs.js")), Pt = bt.map((e) => ({
100
- label: St[e],
111
+ var jt = Ct(() => import("./createResourceDialog-BOrW62JW.js")), Mt = vt.map((e) => ({
112
+ label: bt[e],
101
113
  value: e
102
- })), Ft = 44, It = -12, Lt = 8, Rt = "a, button, input, select, textarea, [data-slot=\"tooltip-trigger\"]";
103
- function zt({ language: e, onLanguageChange: t }) {
104
- let n = i(), [r, a] = W(null);
105
- return t == null ? null : /* @__PURE__ */ U("div", {
114
+ })), Nt = 44, Pt = -12, Ft = 8, It = "a, button, input, select, textarea, [data-slot=\"tooltip-trigger\"]";
115
+ function Lt({ language: e, onLanguageChange: t }) {
116
+ let n = i(), [r, a] = q(null);
117
+ return t == null ? null : /* @__PURE__ */ K("div", {
106
118
  className: "resource-language",
107
119
  ref: a,
108
- children: [/* @__PURE__ */ H("span", {
120
+ children: [/* @__PURE__ */ G("span", {
109
121
  className: "sr-only",
110
122
  children: n("language.label")
111
- }), /* @__PURE__ */ H(gt, {
123
+ }), /* @__PURE__ */ G(ue, {
112
124
  ariaLabel: n("language.label"),
113
125
  onValueChange: (e) => t(e),
114
- options: Pt,
126
+ options: Mt,
115
127
  portalRoot: r,
116
128
  value: e
117
129
  })]
118
130
  });
119
131
  }
120
- function Bt(e) {
132
+ function Rt(e) {
121
133
  return e.length <= 20 ? e : `${e.slice(0, 10)}…${e.slice(-6)}`;
122
134
  }
123
- function Vt(e, t) {
135
+ function zt(e, t) {
124
136
  let n = new Date(e), r = /* @__PURE__ */ new Date();
125
137
  return n.toLocaleString(t, {
126
138
  day: "numeric",
@@ -130,51 +142,51 @@ function Vt(e, t) {
130
142
  year: n.getFullYear() == r.getFullYear() ? void 0 : "numeric"
131
143
  });
132
144
  }
133
- function Ht(e) {
134
- return e.target instanceof Element && e.target.closest(Rt) != null;
145
+ function Bt(e) {
146
+ return e.target instanceof Element && e.target.closest(It) != null;
135
147
  }
136
- function Ut({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
137
- let [f, p] = W(null), h = Dt(null), y = Dt(null), C = Dt(null), w = Dt(null), T = a(), E = i(), [ee, D] = W("idle"), [O, te] = W(n.name), [ne, re] = W(!1), [k, ie] = W(), A = n.live != null && n.live.revisionId != n.draftRevisionId, ae = n.status == "retiring" ? "resource.retiring" : n.live == null ? "resource.notPublished" : A ? "resource.unpublishedChanges" : "resource.isPublished", j = n.status == "retiring" ? "danger" : n.live == null ? "neutral" : A ? "running" : "success";
138
- async function oe(e) {
139
- ie(e == "publish" ? "publish" : "enabled");
148
+ function Vt({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
149
+ let [f, p] = q(null), h = Tt(null), y = Tt(null), C = Tt(null), w = Tt(null), T = a(), E = i(), [D, O] = q("idle"), [k, ue] = q(n.name), [de, pe] = q(!1), [A, me] = q(), he = n.live != null && n.live.revisionId != n.draftRevisionId, ge = n.status == "retiring" ? "resource.retiring" : n.live == null ? "resource.notPublished" : he ? "resource.unpublishedChanges" : "resource.isPublished", _e = n.status == "retiring" ? "danger" : n.live == null ? "neutral" : he ? "running" : "success";
150
+ async function j(e) {
151
+ me(e == "publish" ? "publish" : "enabled");
140
152
  try {
141
153
  e == "publish" ? await u.workspace.publishFlow(n) : await u.workspace.setFlowEnabled(n, e);
142
154
  } finally {
143
- ie(void 0);
155
+ me(void 0);
144
156
  }
145
157
  }
146
- let M = vt(O);
147
- async function se(e) {
158
+ let M = fe(k);
159
+ async function N(e) {
148
160
  e.preventDefault();
149
- let t = O.trim();
150
- vt(t) == null && await u.workspace.renameFlow(n.flowId, t) && D("idle");
161
+ let t = k.trim();
162
+ fe(t) == null && await u.workspace.renameFlow(n.flowId, t) && O("idle");
151
163
  }
152
- async function N() {
153
- await u.workspace.deleteFlow(n.flowId) && D("idle");
164
+ async function P() {
165
+ await u.workspace.deleteFlow(n.flowId) && O("idle");
154
166
  }
155
- function ce(e) {
156
- Ht(e) || o(n);
167
+ function F(e) {
168
+ Bt(e) || o(n);
157
169
  }
158
- return /* @__PURE__ */ U("div", {
170
+ return /* @__PURE__ */ K("div", {
159
171
  className: "resource-item-row",
160
172
  ref: p,
161
173
  children: [
162
- /* @__PURE__ */ U("div", {
174
+ /* @__PURE__ */ K("div", {
163
175
  className: "resource-list-row flow-columns",
164
- onClick: ce,
176
+ onClick: F,
165
177
  children: [
166
- /* @__PURE__ */ U("span", {
178
+ /* @__PURE__ */ K("span", {
167
179
  className: "resource-primary-cell",
168
- children: [/* @__PURE__ */ H("span", {
180
+ children: [/* @__PURE__ */ G("span", {
169
181
  "aria-hidden": "true",
170
182
  className: "resource-flow-icon",
171
- children: /* @__PURE__ */ H("i", { className: "i-lucide-light:workflow" })
172
- }), /* @__PURE__ */ U("span", {
183
+ children: /* @__PURE__ */ G("i", { className: "i-lucide-light:workflow" })
184
+ }), /* @__PURE__ */ K("span", {
173
185
  className: "resource-primary-copy",
174
- children: [/* @__PURE__ */ U("span", {
186
+ children: [/* @__PURE__ */ K("span", {
175
187
  className: "resource-primary-heading",
176
188
  ref: h,
177
- children: [/* @__PURE__ */ H(s, {
189
+ children: [/* @__PURE__ */ G(s, {
178
190
  "aria-disabled": n.status == "retiring",
179
191
  className: "resource-primary-title",
180
192
  nativeButton: !1,
@@ -183,33 +195,33 @@ function Ut({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
183
195
  e.preventDefault();
184
196
  return;
185
197
  }
186
- Ne(e, () => o(n));
198
+ Fe(e, () => o(n));
187
199
  },
188
- render: /* @__PURE__ */ H("a", { href: n.status == "retiring" ? void 0 : r }),
200
+ render: /* @__PURE__ */ G("a", { href: n.status == "retiring" ? void 0 : r }),
189
201
  tabIndex: n.status == "retiring" ? -1 : void 0,
190
202
  title: n.name,
191
203
  variant: "link",
192
204
  children: n.name
193
- }), n.status == "active" && /* @__PURE__ */ U(g, {
205
+ }), n.status == "active" && /* @__PURE__ */ K(g, {
194
206
  onOpenChange: (e) => {
195
- D(e ? "rename" : "idle"), e && te(n.name);
207
+ O(e ? "rename" : "idle"), e && ue(n.name);
196
208
  },
197
- open: ee == "rename",
198
- children: [/* @__PURE__ */ H(b, {
199
- render: /* @__PURE__ */ H(s, {
209
+ open: D == "rename",
210
+ children: [/* @__PURE__ */ G(b, {
211
+ render: /* @__PURE__ */ G(s, {
200
212
  "aria-label": E("sidebar.renameFlow", { name: n.name }),
201
213
  className: "resource-rename-trigger",
202
214
  size: "icon-xs",
203
215
  type: "button",
204
216
  variant: "ghost"
205
217
  }),
206
- children: /* @__PURE__ */ H("i", {
218
+ children: /* @__PURE__ */ G("i", {
207
219
  "aria-hidden": "true",
208
220
  className: "i-lucide-light:pencil"
209
221
  })
210
- }), /* @__PURE__ */ U(d, {
222
+ }), /* @__PURE__ */ K(d, {
211
223
  align: "start",
212
- alignOffset: It,
224
+ alignOffset: Pt,
213
225
  anchor: h,
214
226
  className: "resource-rename-popover",
215
227
  collisionBoundary: [],
@@ -217,48 +229,48 @@ function Ut({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
217
229
  initialFocus: C,
218
230
  positionMethod: "fixed",
219
231
  side: "top",
220
- sideOffset: ({ anchor: e, positioner: t }) => -(e.height + t.height) / 2 - Lt,
221
- children: [/* @__PURE__ */ H(m, {
232
+ sideOffset: ({ anchor: e, positioner: t }) => -(e.height + t.height) / 2 - Ft,
233
+ children: [/* @__PURE__ */ G(m, {
222
234
  className: "sr-only",
223
235
  children: E("sidebar.renameFlow", { name: n.name })
224
- }), /* @__PURE__ */ U("form", {
236
+ }), /* @__PURE__ */ K("form", {
225
237
  className: "resource-rename-form",
226
- onSubmit: (e) => void se(e),
238
+ onSubmit: (e) => void N(e),
227
239
  children: [
228
- /* @__PURE__ */ U(ot, {
240
+ /* @__PURE__ */ K(ne, {
229
241
  className: "min-w-0 flex-1",
230
- "data-invalid": O.length > 0 && M != null,
242
+ "data-invalid": k.length > 0 && M != null,
231
243
  children: [
232
- /* @__PURE__ */ H(st, {
244
+ /* @__PURE__ */ G(re, {
233
245
  className: "sr-only",
234
246
  htmlFor: `rename-flow-${n.flowId}`,
235
247
  children: E("resource.flowName")
236
248
  }),
237
- /* @__PURE__ */ H(l, {
249
+ /* @__PURE__ */ G(l, {
238
250
  autoComplete: "off",
239
- "aria-invalid": O.length > 0 && M != null,
240
- "aria-describedby": O.length > 0 && M != null ? `rename-error-${n.flowId}` : void 0,
251
+ "aria-invalid": k.length > 0 && M != null,
252
+ "aria-describedby": k.length > 0 && M != null ? `rename-error-${n.flowId}` : void 0,
241
253
  id: `rename-flow-${n.flowId}`,
242
254
  name: "flow-name",
243
- onChange: (e) => te(e.target.value),
255
+ onChange: (e) => ue(e.target.value),
244
256
  ref: C,
245
257
  required: !0,
246
- value: O
258
+ value: k
247
259
  }),
248
- O.length > 0 && M != null && /* @__PURE__ */ H(dt, {
260
+ k.length > 0 && M != null && /* @__PURE__ */ G(oe, {
249
261
  id: `rename-error-${n.flowId}`,
250
262
  children: E(`resource.nameIssue.${M}`, { max: 80 })
251
263
  })
252
264
  ]
253
265
  }),
254
- /* @__PURE__ */ H(s, {
255
- onClick: () => D("idle"),
266
+ /* @__PURE__ */ G(s, {
267
+ onClick: () => O("idle"),
256
268
  size: "sm",
257
269
  type: "button",
258
270
  variant: "ghost",
259
271
  children: E("common.cancel")
260
272
  }),
261
- /* @__PURE__ */ H(s, {
273
+ /* @__PURE__ */ G(s, {
262
274
  disabled: t != null || M != null,
263
275
  size: "sm",
264
276
  type: "submit",
@@ -268,58 +280,58 @@ function Ut({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
268
280
  })]
269
281
  })]
270
282
  })]
271
- }), e != null && /* @__PURE__ */ H("span", {
283
+ }), e != null && /* @__PURE__ */ G("span", {
272
284
  className: "resource-team-label",
273
285
  title: e,
274
286
  children: e
275
287
  })]
276
288
  })]
277
289
  }),
278
- /* @__PURE__ */ H("span", {
290
+ /* @__PURE__ */ G("span", {
279
291
  className: "resource-flow-id-cell",
280
- children: /* @__PURE__ */ U(x, { children: [/* @__PURE__ */ H(_, {
281
- render: /* @__PURE__ */ H("code", {
292
+ children: /* @__PURE__ */ K(x, { children: [/* @__PURE__ */ G(_, {
293
+ render: /* @__PURE__ */ G("code", {
282
294
  className: "resource-flow-id",
283
295
  tabIndex: 0,
284
296
  translate: "no"
285
297
  }),
286
- children: Bt(n.flowId)
287
- }), /* @__PURE__ */ U(v, {
298
+ children: Rt(n.flowId)
299
+ }), /* @__PURE__ */ K(v, {
288
300
  align: "start",
289
- alignOffset: Ft,
301
+ alignOffset: Nt,
290
302
  className: "resource-flow-id-tooltip",
291
303
  collisionBoundary: [],
292
304
  container: f,
293
305
  positionMethod: "fixed",
294
306
  side: "top",
295
307
  sideOffset: 6,
296
- children: [/* @__PURE__ */ H(s, {
297
- "aria-label": E(ne ? "resource.flowIdCopied" : "resource.copyFlowId"),
308
+ children: [/* @__PURE__ */ G(s, {
309
+ "aria-label": E(de ? "resource.flowIdCopied" : "resource.copyFlowId"),
298
310
  className: "resource-tooltip-icon-button",
299
311
  onClick: () => {
300
- navigator.clipboard.writeText(n.flowId).then(() => re(!0));
312
+ navigator.clipboard.writeText(n.flowId).then(() => pe(!0));
301
313
  },
302
314
  size: "icon-xs",
303
315
  type: "button",
304
316
  variant: "ghost",
305
- children: /* @__PURE__ */ H("i", {
317
+ children: /* @__PURE__ */ G("i", {
306
318
  "aria-hidden": "true",
307
319
  className: "i-lucide-light:copy"
308
320
  })
309
- }), /* @__PURE__ */ H("code", {
321
+ }), /* @__PURE__ */ G("code", {
310
322
  translate: "no",
311
323
  children: n.flowId
312
324
  })]
313
325
  })] })
314
326
  }),
315
- /* @__PURE__ */ U(x, { children: [/* @__PURE__ */ H(_, {
316
- render: /* @__PURE__ */ H("time", {
327
+ /* @__PURE__ */ K(x, { children: [/* @__PURE__ */ G(_, {
328
+ render: /* @__PURE__ */ G("time", {
317
329
  className: "resource-updated-at",
318
330
  dateTime: n.updatedAt,
319
331
  tabIndex: 0
320
332
  }),
321
- children: Vt(n.updatedAt, T)
322
- }), /* @__PURE__ */ H(v, {
333
+ children: zt(n.updatedAt, T)
334
+ }), /* @__PURE__ */ G(v, {
323
335
  align: "center",
324
336
  collisionBoundary: [],
325
337
  container: f,
@@ -328,63 +340,63 @@ function Ut({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
328
340
  sideOffset: 6,
329
341
  children: new Date(n.updatedAt).toLocaleString(T)
330
342
  })] }),
331
- /* @__PURE__ */ U("span", {
343
+ /* @__PURE__ */ K("span", {
332
344
  className: "resource-status",
333
345
  children: [
334
- /* @__PURE__ */ H("span", {
346
+ /* @__PURE__ */ G("span", {
335
347
  "aria-hidden": "true",
336
- className: c("status-dot", j)
348
+ className: c("status-dot", _e)
337
349
  }),
338
- E(ae),
339
- n.live != null && /* @__PURE__ */ U(Ct, { children: [/* @__PURE__ */ H("span", {
350
+ E(ge),
351
+ n.live != null && /* @__PURE__ */ K(xt, { children: [/* @__PURE__ */ G("span", {
340
352
  "aria-hidden": "true",
341
353
  className: "resource-status-separator",
342
354
  children: "·"
343
- }), /* @__PURE__ */ H("span", { children: E(n.live.enabled ? "resource.enabled" : "resource.disabled") })] })
355
+ }), /* @__PURE__ */ G("span", { children: E(n.live.enabled ? "resource.enabled" : "resource.disabled") })] })
344
356
  ]
345
357
  })
346
358
  ]
347
359
  }),
348
- /* @__PURE__ */ U("div", {
360
+ /* @__PURE__ */ K("div", {
349
361
  className: "resource-live-controls",
350
- "aria-busy": k != null,
351
- onClick: ce,
362
+ "aria-busy": A != null,
363
+ onClick: F,
352
364
  children: [
353
- n.live != null && /* @__PURE__ */ H(S, {
365
+ n.live != null && /* @__PURE__ */ G(S, {
354
366
  "aria-label": E("resource.enableFlow", { name: n.name }),
355
367
  checked: n.live.enabled,
356
- disabled: n.status != "active" || t != null || k != null,
357
- onCheckedChange: (e) => void oe(e),
368
+ disabled: n.status != "active" || t != null || A != null,
369
+ onCheckedChange: (e) => void j(e),
358
370
  size: "sm",
359
371
  title: E("resource.enabledHint")
360
372
  }),
361
- n.status == "active" && /* @__PURE__ */ H(s, {
373
+ n.status == "active" && /* @__PURE__ */ G(s, {
362
374
  onClick: () => o(n),
363
375
  size: "sm",
364
376
  variant: "outline",
365
377
  children: E("resource.edit")
366
378
  }),
367
- /* @__PURE__ */ H(s, {
368
- disabled: n.status != "active" || t != null || k != null || n.live != null && !A,
369
- onClick: () => void oe("publish"),
379
+ /* @__PURE__ */ G(s, {
380
+ disabled: n.status != "active" || t != null || A != null || n.live != null && !he,
381
+ onClick: () => void j("publish"),
370
382
  size: "sm",
371
383
  variant: "outline",
372
- children: E(k == "publish" ? "workspace.publishing" : n.live == null ? "resource.publish" : "resource.publishUpdate")
384
+ children: E(A == "publish" ? "workspace.publishing" : n.live == null ? "resource.publish" : "resource.publishUpdate")
373
385
  }),
374
- n.status == "active" && /* @__PURE__ */ U(x, { children: [/* @__PURE__ */ H(_, {
375
- render: /* @__PURE__ */ H(s, {
386
+ n.status == "active" && /* @__PURE__ */ K(x, { children: [/* @__PURE__ */ G(_, {
387
+ render: /* @__PURE__ */ G(s, {
376
388
  "aria-label": E("sidebar.deleteFlow", { name: n.name }),
377
389
  ref: y,
378
- disabled: t != null || k != null,
379
- onClick: () => D("delete"),
390
+ disabled: t != null || A != null,
391
+ onClick: () => O("delete"),
380
392
  size: "icon-sm",
381
393
  variant: "destructive"
382
394
  }),
383
- children: /* @__PURE__ */ H("i", {
395
+ children: /* @__PURE__ */ G("i", {
384
396
  "aria-hidden": "true",
385
397
  className: "i-lucide-light:trash-2"
386
398
  })
387
- }), /* @__PURE__ */ H(v, {
399
+ }), /* @__PURE__ */ G(v, {
388
400
  align: "center",
389
401
  collisionBoundary: [],
390
402
  container: f,
@@ -394,25 +406,25 @@ function Ut({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
394
406
  })] })
395
407
  ]
396
408
  }),
397
- /* @__PURE__ */ H(mt, {
398
- open: ee == "delete",
409
+ /* @__PURE__ */ G(ce, {
410
+ open: D == "delete",
399
411
  onOpenChange: (e) => {
400
- e || D("idle");
412
+ e || O("idle");
401
413
  },
402
- children: /* @__PURE__ */ U(rt, {
414
+ children: /* @__PURE__ */ K(ee, {
403
415
  container: f,
404
416
  initialFocus: w,
405
417
  finalFocus: y,
406
418
  showCloseButton: !1,
407
- children: [/* @__PURE__ */ U(it, { children: [/* @__PURE__ */ H(ut, { children: E("sidebar.deleteFlowConfirm", { name: n.name }) }), /* @__PURE__ */ H(pt, { children: E("resource.deleteDescription") })] }), /* @__PURE__ */ U(ht, { children: [/* @__PURE__ */ H(lt, {
408
- render: /* @__PURE__ */ H(s, {
419
+ children: [/* @__PURE__ */ K(te, { children: [/* @__PURE__ */ G(ae, { children: E("sidebar.deleteFlowConfirm", { name: n.name }) }), /* @__PURE__ */ G(se, { children: E("resource.deleteDescription") })] }), /* @__PURE__ */ K(le, { children: [/* @__PURE__ */ G(ie, {
420
+ render: /* @__PURE__ */ G(s, {
409
421
  ref: w,
410
422
  variant: "outline"
411
423
  }),
412
424
  children: E("common.cancel")
413
- }), /* @__PURE__ */ H(s, {
425
+ }), /* @__PURE__ */ G(s, {
414
426
  disabled: t != null,
415
- onClick: () => void N(),
427
+ onClick: () => void P(),
416
428
  variant: "destructive",
417
429
  children: E(t == "flow" ? "common.deleting" : "common.delete")
418
430
  })] })]
@@ -421,190 +433,185 @@ function Ut({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
421
433
  ]
422
434
  });
423
435
  }
424
- function Wt() {
425
- return /* @__PURE__ */ U("div", {
436
+ function Ht() {
437
+ return /* @__PURE__ */ K("div", {
426
438
  "aria-hidden": "true",
427
439
  className: "resource-item-row",
428
- children: [/* @__PURE__ */ U("div", {
440
+ children: [/* @__PURE__ */ K("div", {
429
441
  className: "resource-list-row resource-skeleton-row flow-columns",
430
442
  children: [
431
- /* @__PURE__ */ U("span", {
443
+ /* @__PURE__ */ K("span", {
432
444
  className: "resource-skeleton-copy",
433
- children: [/* @__PURE__ */ H(w, { className: "h-3.5 w-36 max-w-full" }), /* @__PURE__ */ H(w, { className: "h-3 w-24 max-w-full" })]
445
+ children: [/* @__PURE__ */ G(Y, { className: "h-3.5 w-36 max-w-full" }), /* @__PURE__ */ G(Y, { className: "h-3 w-24 max-w-full" })]
434
446
  }),
435
- /* @__PURE__ */ H(w, { className: "h-3 w-36 max-w-full" }),
436
- /* @__PURE__ */ H(w, { className: "h-3 w-28 max-w-full" }),
437
- /* @__PURE__ */ H(w, { className: "h-3 w-16" })
447
+ /* @__PURE__ */ G(Y, { className: "h-3 w-36 max-w-full" }),
448
+ /* @__PURE__ */ G(Y, { className: "h-3 w-28 max-w-full" }),
449
+ /* @__PURE__ */ G(Y, { className: "h-3 w-16" })
438
450
  ]
439
- }), /* @__PURE__ */ U("div", {
451
+ }), /* @__PURE__ */ K("div", {
440
452
  className: "resource-live-controls",
441
- children: [/* @__PURE__ */ H(w, { className: "h-7 w-16" }), /* @__PURE__ */ H(w, { className: "h-7 w-14" })]
453
+ children: [/* @__PURE__ */ G(Y, { className: "h-7 w-16" }), /* @__PURE__ */ G(Y, { className: "h-7 w-14" })]
442
454
  })]
443
455
  });
444
456
  }
445
- function Gt({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBadges: a, hrefForFlow: o, hostAction: l, hostTitle: u, language: d, onCreateFlow: m, onHostAction: h, onLanguageChange: g, onSelectFlow: _, store: v }) {
446
- let b = i(), x = r(v.workspace.$.busy), S = r(v.workspace.$.flowLoadFailed), C = r(v.workspace.$.flowLoadMoreFailed), w = r(v.workspace.$.flowLoading), T = r(v.workspace.$.flowLoadingMore), ee = r(v.workspace.$.flowNextCursor), D = r(v.workspace.$.flowRefreshing), O = r(v.workspace.$.flows), ne = r(v.workspace.$.flowTotal), [re, k] = W(!1), [ie, A] = W(""), [j, M] = W(""), N = ie.trim().toLocaleLowerCase(), ce = O.filter((e) => e.name.toLocaleLowerCase().includes(N));
447
- async function le(e) {
457
+ function Ut({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBadges: a, hrefForFlow: o, language: l, onCreateFlow: u, onLanguageChange: d, onSelectFlow: m, store: h }) {
458
+ let g = i(), _ = r(h.workspace.$.busy), v = r(h.workspace.$.flowLoadFailed), b = r(h.workspace.$.flowLoadMoreFailed), x = r(h.workspace.$.flowLoading), S = r(h.workspace.$.flowLoadingMore), C = r(h.workspace.$.flowNextCursor), w = r(h.workspace.$.flowRefreshing), T = r(h.workspace.$.flows), E = r(h.workspace.$.flowTotal), [ee, te] = q(!1), [D, ne] = q(""), [re, O] = q(""), ie = D.trim().toLocaleLowerCase(), ae = T.filter((e) => e.name.toLocaleLowerCase().includes(ie));
459
+ async function oe(e) {
448
460
  e.preventDefault();
449
- let t = j.trim();
450
- vt(t) != null || !await m(t) || (k(!1), M(""));
461
+ let t = re.trim();
462
+ fe(t) != null || !await u(t) || (te(!1), O(""));
451
463
  }
452
- return /* @__PURE__ */ H("main", {
464
+ return /* @__PURE__ */ G("main", {
453
465
  className: "resource-browser",
454
466
  "data-tooltip-portal": !0,
455
- children: /* @__PURE__ */ U("div", {
467
+ children: /* @__PURE__ */ K("div", {
456
468
  className: c("resource-page", e != "default" && "resource-page-full"),
457
469
  children: [
458
- /* @__PURE__ */ H("h1", {
470
+ /* @__PURE__ */ G("h1", {
459
471
  className: "sr-only",
460
- children: b("resource.flows")
472
+ children: g("resource.flows")
461
473
  }),
462
- /* @__PURE__ */ U("section", {
474
+ /* @__PURE__ */ K("section", {
463
475
  "aria-labelledby": "flow-list-title",
464
476
  className: "resource-list-section rounded-lg",
465
477
  children: [
466
- /* @__PURE__ */ U("div", {
478
+ /* @__PURE__ */ K("div", {
467
479
  className: "resource-list-title",
468
- children: [/* @__PURE__ */ U("div", {
480
+ children: [/* @__PURE__ */ K("div", {
469
481
  className: "resource-list-heading",
470
- children: [/* @__PURE__ */ H("h2", {
482
+ children: [/* @__PURE__ */ G("h2", {
471
483
  id: "flow-list-title",
472
- children: b("resource.all")
473
- }), !w && /* @__PURE__ */ H("span", { children: b("resource.flowCount", { count: ne ?? O.length }) })]
474
- }), /* @__PURE__ */ U("div", {
484
+ children: g("resource.flows")
485
+ }), !x && /* @__PURE__ */ G("span", { children: g("resource.flowCount", { count: E ?? T.length }) })]
486
+ }), /* @__PURE__ */ K("div", {
475
487
  className: "resource-list-actions",
476
488
  children: [
477
- /* @__PURE__ */ H(zt, {
478
- language: d,
479
- onLanguageChange: g
489
+ /* @__PURE__ */ G(Lt, {
490
+ language: l,
491
+ onLanguageChange: d
480
492
  }),
481
- /* @__PURE__ */ U(y, {
493
+ /* @__PURE__ */ K(y, {
482
494
  className: "w-full sm:w-56",
483
- children: [/* @__PURE__ */ H(f, { children: /* @__PURE__ */ H(ft, {
495
+ children: [/* @__PURE__ */ G(f, { children: /* @__PURE__ */ G(k, {
484
496
  name: "search",
485
497
  size: 17
486
- }) }), /* @__PURE__ */ H(p, {
498
+ }) }), /* @__PURE__ */ G(p, {
487
499
  autoComplete: "off",
488
- "aria-label": b("resource.searchByName"),
500
+ "aria-label": g("resource.searchByName"),
489
501
  name: "flow-search",
490
- onChange: (e) => A(e.target.value),
491
- placeholder: b("resource.searchByName"),
492
- value: ie
502
+ onChange: (e) => ne(e.target.value),
503
+ placeholder: g("resource.searchByName"),
504
+ value: D
493
505
  })]
494
506
  }),
495
- /* @__PURE__ */ U(s, {
507
+ /* @__PURE__ */ K(s, {
496
508
  className: "pr-3",
497
- disabled: x != null,
498
- onClick: () => k(!0),
499
- children: [/* @__PURE__ */ H(ft, {
509
+ disabled: _ != null,
510
+ onClick: () => te(!0),
511
+ children: [/* @__PURE__ */ G(k, {
500
512
  "data-icon": "inline-start",
501
513
  name: "plus"
502
- }), b("resource.newFlow")]
503
- }),
504
- l != null && u != null && h != null && /* @__PURE__ */ H(Re, {
505
- action: l,
506
- onAction: h,
507
- title: u
514
+ }), g("resource.newFlow")]
508
515
  })
509
516
  ]
510
517
  })]
511
518
  }),
512
- /* @__PURE__ */ U("div", {
519
+ /* @__PURE__ */ K("div", {
513
520
  "aria-hidden": "true",
514
521
  className: "resource-list-columns-shell",
515
- children: [/* @__PURE__ */ U("div", {
522
+ children: [/* @__PURE__ */ K("div", {
516
523
  className: "resource-list-columns flow-columns",
517
524
  children: [
518
- /* @__PURE__ */ H("span", { children: b("resource.name") }),
519
- /* @__PURE__ */ H("span", {
525
+ /* @__PURE__ */ G("span", { children: g("resource.name") }),
526
+ /* @__PURE__ */ G("span", {
520
527
  className: "resource-flow-id-heading",
521
- children: b("resource.flowId")
528
+ children: g("resource.flowId")
522
529
  }),
523
- /* @__PURE__ */ H("span", {
530
+ /* @__PURE__ */ G("span", {
524
531
  className: "resource-updated-heading",
525
- children: b("resource.updated")
532
+ children: g("resource.updated")
526
533
  }),
527
- /* @__PURE__ */ H("span", { children: b("resource.status") })
534
+ /* @__PURE__ */ G("span", { children: g("resource.status") })
528
535
  ]
529
- }), /* @__PURE__ */ H("span", {
536
+ }), /* @__PURE__ */ G("span", {
530
537
  className: "resource-actions-heading",
531
- children: b("resource.actions")
538
+ children: g("resource.actions")
532
539
  })]
533
540
  }),
534
- /* @__PURE__ */ H("div", {
541
+ /* @__PURE__ */ G("div", {
535
542
  className: "resource-list",
536
- children: w ? Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ H(Wt, {}, t)) : S ? /* @__PURE__ */ U(je, {
543
+ children: x ? Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ G(Ht, {}, t)) : v ? /* @__PURE__ */ K(tt, {
537
544
  className: "min-h-64",
538
545
  role: "alert",
539
- children: [/* @__PURE__ */ U(se, { children: [
540
- /* @__PURE__ */ H(E, {
546
+ children: [/* @__PURE__ */ K(Qe, { children: [
547
+ /* @__PURE__ */ G(lt, {
541
548
  variant: "icon",
542
- children: /* @__PURE__ */ H(ft, {
549
+ children: /* @__PURE__ */ G(k, {
543
550
  name: "alert",
544
551
  size: 20
545
552
  })
546
553
  }),
547
- /* @__PURE__ */ H(te, { children: b("resource.flowsLoadFailed") }),
548
- /* @__PURE__ */ H(oe, { children: b("resource.flowsLoadFailedDescription") })
549
- ] }), /* @__PURE__ */ H(ae, { children: /* @__PURE__ */ H(s, {
550
- onClick: () => void v.retryFlows(),
554
+ /* @__PURE__ */ G(Ve, { children: g("resource.flowsLoadFailed") }),
555
+ /* @__PURE__ */ G(ze, { children: g("resource.flowsLoadFailedDescription") })
556
+ ] }), /* @__PURE__ */ G(at, { children: /* @__PURE__ */ G(s, {
557
+ onClick: () => void h.retryFlows(),
551
558
  variant: "outline",
552
- children: b("empty.retry")
559
+ children: g("empty.retry")
553
560
  }) })]
554
- }) : ce.length == 0 ? /* @__PURE__ */ U(je, {
561
+ }) : ae.length == 0 ? /* @__PURE__ */ K(tt, {
555
562
  className: "min-h-64",
556
- children: [/* @__PURE__ */ U(se, { children: [
557
- /* @__PURE__ */ H(E, {
563
+ children: [/* @__PURE__ */ K(Qe, { children: [
564
+ /* @__PURE__ */ G(lt, {
558
565
  variant: "icon",
559
- children: /* @__PURE__ */ H(ft, {
566
+ children: /* @__PURE__ */ G(k, {
560
567
  name: "flow",
561
568
  size: 20
562
569
  })
563
570
  }),
564
- /* @__PURE__ */ H(te, { children: b(N.length == 0 ? "resource.noFlows" : "resource.noMatchingFlows") }),
565
- /* @__PURE__ */ H(oe, { children: b(N.length == 0 ? "resource.noFlowsDescription" : "resource.noMatchingDescription") })
566
- ] }), N.length == 0 && /* @__PURE__ */ H(ae, { children: /* @__PURE__ */ U(s, {
567
- onClick: () => k(!0),
571
+ /* @__PURE__ */ G(Ve, { children: g(ie.length == 0 ? "resource.noFlows" : "resource.noMatchingFlows") }),
572
+ /* @__PURE__ */ G(ze, { children: g(ie.length == 0 ? "resource.noFlowsDescription" : "resource.noMatchingDescription") })
573
+ ] }), ie.length == 0 && /* @__PURE__ */ G(at, { children: /* @__PURE__ */ K(s, {
574
+ onClick: () => te(!0),
568
575
  variant: "outline",
569
- children: [/* @__PURE__ */ H(ft, {
576
+ children: [/* @__PURE__ */ G(k, {
570
577
  "data-icon": "inline-start",
571
578
  name: "plus"
572
- }), b("resource.newFlow")]
579
+ }), g("resource.newFlow")]
573
580
  }) })]
574
- }) : ce.map((e) => /* @__PURE__ */ H(Ut, {
581
+ }) : ae.map((e) => /* @__PURE__ */ G(Vt, {
575
582
  badge: a?.[e.flowId],
576
- busy: x,
583
+ busy: _,
577
584
  flow: e,
578
585
  href: o(e),
579
- onSelect: _,
580
- store: v
586
+ onSelect: m,
587
+ store: h
581
588
  }, e.flowId))
582
589
  }),
583
- ee != null && /* @__PURE__ */ H("div", {
590
+ C != null && /* @__PURE__ */ G("div", {
584
591
  className: "resource-list-footer",
585
- children: /* @__PURE__ */ H(s, {
586
- disabled: T || D,
587
- onClick: () => void v.workspace.loadMoreFlows(),
592
+ children: /* @__PURE__ */ G(s, {
593
+ disabled: S || w,
594
+ onClick: () => void h.workspace.loadMoreFlows(),
588
595
  variant: "outline",
589
- children: b(T ? "resource.loadingMore" : C ? "resource.retryLoadMore" : "resource.loadMore")
596
+ children: g(S ? "resource.loadingMore" : b ? "resource.retryLoadMore" : "resource.loadMore")
590
597
  })
591
598
  })
592
599
  ]
593
600
  }),
594
- re && /* @__PURE__ */ H(wt, {
601
+ ee && /* @__PURE__ */ G(St, {
595
602
  fallback: null,
596
- children: /* @__PURE__ */ H(Nt, {
603
+ children: /* @__PURE__ */ G(jt, {
597
604
  disabled: t,
598
605
  field: n,
599
606
  id: "flow-name",
600
- issue: vt(j),
601
- label: b("resource.flowName"),
602
- name: j,
603
- onNameChange: M,
604
- onOpenChange: k,
605
- onSubmit: (e) => void le(e),
606
- pending: x == "flow",
607
- title: b("resource.newFlow")
607
+ issue: fe(re),
608
+ label: g("resource.flowName"),
609
+ name: re,
610
+ onNameChange: O,
611
+ onOpenChange: te,
612
+ onSubmit: (e) => void oe(e),
613
+ pending: _ == "flow",
614
+ title: g("resource.newFlow")
608
615
  })
609
616
  })
610
617
  ]
@@ -613,28 +620,28 @@ function Gt({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBa
613
620
  }
614
621
  //#endregion
615
622
  //#region ../../node_modules/.bun/dequal@2.0.3/node_modules/dequal/dist/index.mjs
616
- var Kt = Object.prototype.hasOwnProperty;
617
- function qt(e, t, n) {
618
- for (n of e.keys()) if (K(n, t)) return n;
623
+ var Wt = Object.prototype.hasOwnProperty;
624
+ function Gt(e, t, n) {
625
+ for (n of e.keys()) if (X(n, t)) return n;
619
626
  }
620
- function K(e, t) {
627
+ function X(e, t) {
621
628
  var n, r, i;
622
629
  if (e === t) return !0;
623
630
  if (e && t && (n = e.constructor) === t.constructor) {
624
631
  if (n === Date) return e.getTime() === t.getTime();
625
632
  if (n === RegExp) return e.toString() === t.toString();
626
633
  if (n === Array) {
627
- if ((r = e.length) === t.length) for (; r-- && K(e[r], t[r]););
634
+ if ((r = e.length) === t.length) for (; r-- && X(e[r], t[r]););
628
635
  return r === -1;
629
636
  }
630
637
  if (n === Set) {
631
638
  if (e.size !== t.size) return !1;
632
- for (r of e) if (i = r, i && typeof i == "object" && (i = qt(t, i), !i) || !t.has(i)) return !1;
639
+ for (r of e) if (i = r, i && typeof i == "object" && (i = Gt(t, i), !i) || !t.has(i)) return !1;
633
640
  return !0;
634
641
  }
635
642
  if (n === Map) {
636
643
  if (e.size !== t.size) return !1;
637
- for (r of e) if (i = r[0], i && typeof i == "object" && (i = qt(t, i), !i) || !K(r[1], t.get(i))) return !1;
644
+ for (r of e) if (i = r[0], i && typeof i == "object" && (i = Gt(t, i), !i) || !X(r[1], t.get(i))) return !1;
638
645
  return !0;
639
646
  }
640
647
  if (n === ArrayBuffer) e = new Uint8Array(e), t = new Uint8Array(t);
@@ -647,7 +654,7 @@ function K(e, t) {
647
654
  return r === -1;
648
655
  }
649
656
  if (!n || typeof e == "object") {
650
- for (n in r = 0, e) if (Kt.call(e, n) && ++r && !Kt.call(t, n) || !(n in t) || !K(e[n], t[n])) return !1;
657
+ for (n in r = 0, e) if (Wt.call(e, n) && ++r && !Wt.call(t, n) || !(n in t) || !X(e[n], t[n])) return !1;
651
658
  return Object.keys(t).length === r;
652
659
  }
653
660
  }
@@ -655,7 +662,7 @@ function K(e, t) {
655
662
  }
656
663
  //#endregion
657
664
  //#region ../../node_modules/.bun/nanoid@6.0.1/node_modules/nanoid/index.browser.js
658
- var Jt = (e) => crypto.getRandomValues(new Uint8Array(e)), Yt = (e, t, n) => {
665
+ var Kt = (e) => crypto.getRandomValues(new Uint8Array(e)), qt = (e, t, n) => {
659
666
  let r = 256 - 256 % e.length;
660
667
  if (r === 256) {
661
668
  let r = e.length - 1;
@@ -677,29 +684,29 @@ var Jt = (e) => crypto.getRandomValues(new Uint8Array(e)), Yt = (e, t, n) => {
677
684
  for (; s--;) if (t[s] < r && (o += e[t[s] % e.length], o.length >= a)) return o;
678
685
  }
679
686
  };
680
- }, Xt = (e, t = 21) => Yt(e, t | 0, Jt);
687
+ }, Jt = (e, t = 21) => qt(e, t | 0, Kt);
681
688
  //#endregion
682
689
  //#region src/flow/common/edgeChanges.ts
683
- function Zt(e, t, n) {
684
- return $t(e, t)?.edges.some((e) => u(e, n)) ? [] : [{
690
+ function Yt(e, t, n) {
691
+ return Zt(e, t)?.edges.some((e) => u(e, n)) ? [] : [{
685
692
  edge: n,
686
693
  kind: "graph.edge.connect",
687
694
  target: t
688
695
  }];
689
696
  }
690
- function Qt(e, t, n) {
691
- return $t(e, t)?.edges.some((e) => u(e, n)) ? [{
697
+ function Xt(e, t, n) {
698
+ return Zt(e, t)?.edges.some((e) => u(e, n)) ? [{
692
699
  edge: n,
693
700
  kind: "graph.edge.disconnect",
694
701
  target: t
695
702
  }] : [];
696
703
  }
697
- function $t(e, t) {
704
+ function Zt(e, t) {
698
705
  return t.kind == "flow" ? e.document.graph : e.document.subflows[t.id]?.graph;
699
706
  }
700
707
  //#endregion
701
708
  //#region src/flow/common/moduleChanges.ts
702
- async function en(e) {
709
+ async function Qt(e) {
703
710
  try {
704
711
  let { parse: t } = await import("./lib-C5Ipyfps.js").then((e) => e.t), n = t(e, {
705
712
  errorRecovery: !0,
@@ -715,7 +722,7 @@ async function en(e) {
715
722
  return [];
716
723
  }
717
724
  }
718
- function tn(e, t, n, r, i) {
725
+ function $t(e, t, n, r, i) {
719
726
  return [{
720
727
  beforeImports: n,
721
728
  beforeSource: t,
@@ -725,51 +732,51 @@ function tn(e, t, n, r, i) {
725
732
  source: r
726
733
  }];
727
734
  }
728
- var nn = Xt("23456789abcdefghjkmnpqrstuvwxyz", 10);
735
+ var en = Jt("23456789abcdefghjkmnpqrstuvwxyz", 10);
729
736
  //#endregion
730
737
  //#region src/workbench/browser/runtime/canvasPresentation.ts
731
- function q(e) {
738
+ function Z(e) {
732
739
  if (!(typeof e != "object" || !e || Array.isArray(e))) return e;
733
740
  }
734
- function rn(e) {
741
+ function tn(e) {
735
742
  return typeof e == "number" && Number.isFinite(e) ? e : void 0;
736
743
  }
737
- function J(e, t) {
738
- let n = q(e.designer);
744
+ function Q(e, t) {
745
+ let n = Z(e.designer);
739
746
  if (n?.version == 1) return ln(n, t);
740
747
  }
741
- function an(e, t) {
742
- return ((e) => Object.fromEntries(Object.entries(q(e) ?? {}).flatMap(([e, t]) => {
743
- let n = q(t), r = rn(n?.x), i = rn(n?.y);
748
+ function nn(e, t) {
749
+ return ((e) => Object.fromEntries(Object.entries(Z(e) ?? {}).flatMap(([e, t]) => {
750
+ let n = Z(t), r = tn(n?.x), i = tn(n?.y);
744
751
  return r == null || i == null ? [] : [[e, {
745
752
  x: r,
746
753
  y: i
747
754
  }]];
748
- })))(J(e, t)?.nodes);
755
+ })))(Q(e, t)?.nodes);
749
756
  }
750
- function Y(e, t) {
751
- let n = an(e, t), r = J(e, t)?.order, i = Array.isArray(r) ? r.flatMap((e) => typeof e == "string" && n[e] != null ? [e] : []) : [];
757
+ function rn(e, t) {
758
+ let n = nn(e, t), r = Q(e, t)?.order, i = Array.isArray(r) ? r.flatMap((e) => typeof e == "string" && n[e] != null ? [e] : []) : [];
752
759
  return [.../* @__PURE__ */ new Set([...i, ...Object.keys(n)])];
753
760
  }
754
- function on(e, t) {
755
- let n = q(J(e, t)?.viewport), r = rn(n?.x), i = rn(n?.y), a = rn(n?.zoom);
761
+ function an(e, t) {
762
+ let n = Z(Q(e, t)?.viewport), r = tn(n?.x), i = tn(n?.y), a = tn(n?.zoom);
756
763
  return r == null || i == null || a == null || a <= 0 ? void 0 : {
757
764
  x: r,
758
765
  y: i,
759
766
  zoom: a
760
767
  };
761
768
  }
762
- function sn(e, t) {
763
- return on(e, t) ?? {
769
+ function on(e, t) {
770
+ return an(e, t) ?? {
764
771
  x: 0,
765
772
  y: 0,
766
773
  zoom: 1
767
774
  };
768
775
  }
769
- function cn(e, t, n) {
770
- let r = q(J(e, t)?.comments) ?? {};
776
+ function sn(e, t, n) {
777
+ let r = Z(Q(e, t)?.comments) ?? {};
771
778
  return Object.fromEntries(Object.entries(r).flatMap(([e, t]) => {
772
- let r = q(t), i = typeof r?.title == "string" ? r.title : void 0, a = typeof r?.content == "string" ? r.content : void 0;
779
+ let r = Z(t), i = typeof r?.title == "string" ? r.title : void 0, a = typeof r?.content == "string" ? r.content : void 0;
773
780
  return i == null || a == null ? [] : [[e, {
774
781
  content: a,
775
782
  position: n[e] ?? {
@@ -780,20 +787,20 @@ function cn(e, t, n) {
780
787
  }]];
781
788
  }));
782
789
  }
783
- function X(e) {
784
- let t = q(e.designer);
790
+ function cn(e) {
791
+ let t = Z(e.designer);
785
792
  return t?.version == 1 ? t : { version: 1 };
786
793
  }
787
794
  function ln(e, t) {
788
- return t.kind == "flow" ? q(e.flow) : q(q(e.subflows)?.[t.id]);
795
+ return t.kind == "flow" ? Z(e.flow) : Z(Z(e.subflows)?.[t.id]);
789
796
  }
790
- function Z(e, t, n) {
797
+ function un(e, t, n) {
791
798
  if (t.kind == "flow") return {
792
799
  ...e,
793
800
  flow: n,
794
801
  version: 1
795
802
  };
796
- let r = q(e.subflows) ?? {};
803
+ let r = Z(e.subflows) ?? {};
797
804
  return {
798
805
  ...e,
799
806
  subflows: {
@@ -803,17 +810,17 @@ function Z(e, t, n) {
803
810
  version: 1
804
811
  };
805
812
  }
806
- function Q(e, t) {
813
+ function $(e, t) {
807
814
  let n = {
808
- ...J(e, t),
809
- viewport: { ...sn(e, t) },
810
- nodes: an(e, t),
811
- order: Y(e, t)
815
+ ...Q(e, t),
816
+ viewport: { ...on(e, t) },
817
+ nodes: nn(e, t),
818
+ order: rn(e, t)
812
819
  };
813
820
  return delete n.layouts, n;
814
821
  }
815
- function un(e, t, n) {
816
- let r = X(e), i = Q(e, t), a = q(i.nodes) ?? {}, o = [...Y(e, t)];
822
+ function dn(e, t, n) {
823
+ let r = cn(e), i = $(e, t), a = Z(i.nodes) ?? {}, o = [...rn(e, t)];
817
824
  for (let e of Object.keys(n)) o.includes(e) || o.push(e);
818
825
  let s = {
819
826
  ...a,
@@ -824,29 +831,29 @@ function un(e, t, n) {
824
831
  };
825
832
  return {
826
833
  ...e,
827
- designer: Z(r, t, {
834
+ designer: un(r, t, {
828
835
  ...i,
829
836
  nodes: s,
830
837
  order: o
831
838
  })
832
839
  };
833
840
  }
834
- function dn(e, t, n, r) {
835
- if (q(J(e, t)?.hiddenNodeContent)?.[n] === !0 === r) return e;
836
- let i = Q(e, t), a = { ...q(i.hiddenNodeContent) };
841
+ function fn(e, t, n, r) {
842
+ if (Z(Q(e, t)?.hiddenNodeContent)?.[n] === !0 === r) return e;
843
+ let i = $(e, t), a = { ...Z(i.hiddenNodeContent) };
837
844
  return r ? a[n] = !0 : delete a[n], {
838
845
  ...e,
839
- designer: Z(X(e), t, {
846
+ designer: un(cn(e), t, {
840
847
  ...i,
841
848
  hiddenNodeContent: a
842
849
  })
843
850
  };
844
851
  }
845
- function fn(e, t, n, r) {
846
- let i = un(e, t, { [n]: r.position }), a = X(i), o = ln(a, t) ?? {}, s = q(o.comments) ?? {};
852
+ function pn(e, t, n, r) {
853
+ let i = dn(e, t, { [n]: r.position }), a = cn(i), o = ln(a, t) ?? {}, s = Z(o.comments) ?? {};
847
854
  return {
848
855
  ...i,
849
- designer: Z(a, t, {
856
+ designer: un(a, t, {
850
857
  ...o,
851
858
  comments: {
852
859
  ...s,
@@ -858,13 +865,13 @@ function fn(e, t, n, r) {
858
865
  })
859
866
  };
860
867
  }
861
- function pn(e, t, n) {
862
- let r = X(e), i = Q(e, t), a = { ...q(i.comments) }, o = { ...q(i.nodes) };
868
+ function mn(e, t, n) {
869
+ let r = cn(e), i = $(e, t), a = { ...Z(i.comments) }, o = { ...Z(i.nodes) };
863
870
  for (let e of n) delete a[e], delete o[e];
864
- let s = Y(e, t).filter((e) => !n.has(e));
871
+ let s = rn(e, t).filter((e) => !n.has(e));
865
872
  return {
866
873
  ...e,
867
- designer: Z(r, t, {
874
+ designer: un(r, t, {
868
875
  ...i,
869
876
  comments: a,
870
877
  nodes: o,
@@ -872,16 +879,16 @@ function pn(e, t, n) {
872
879
  })
873
880
  };
874
881
  }
875
- function mn(e, t) {
876
- return new Set(Object.keys(q(J(e, t)?.comments) ?? {}));
882
+ function hn(e, t) {
883
+ return new Set(Object.keys(Z(Q(e, t)?.comments) ?? {}));
877
884
  }
878
- function hn(e, t, n) {
879
- let r = on(e, t);
885
+ function gn(e, t, n) {
886
+ let r = an(e, t);
880
887
  if (r?.x == n.x && r.y == n.y && r.zoom == n.zoom) return e;
881
- let i = X(e), a = Q(e, t);
888
+ let i = cn(e), a = $(e, t);
882
889
  return {
883
890
  ...e,
884
- designer: Z(i, t, {
891
+ designer: un(i, t, {
885
892
  ...a,
886
893
  viewport: {
887
894
  x: n.x,
@@ -891,71 +898,66 @@ function hn(e, t, n) {
891
898
  })
892
899
  };
893
900
  }
894
- function gn(e, t, n) {
895
- let r = Q(e, n), i = Q(t, n), a = /* @__PURE__ */ new Set();
901
+ function _n(e, t, n) {
902
+ let r = $(e, n), i = $(t, n), a = /* @__PURE__ */ new Set();
896
903
  for (let e of [
897
904
  "nodes",
898
905
  "comments",
899
906
  "hiddenNodeContent"
900
907
  ]) {
901
- let t = q(r[e]) ?? {}, n = q(i[e]) ?? {};
908
+ let t = Z(r[e]) ?? {}, n = Z(i[e]) ?? {};
902
909
  for (let e of /* @__PURE__ */ new Set([...Object.keys(t), ...Object.keys(n)])) u(t[e], n[e]) || a.add(e);
903
910
  }
904
911
  let o = (e) => Object.fromEntries([
905
912
  "nodes",
906
913
  "comments",
907
914
  "hiddenNodeContent"
908
- ].map((t) => [t, Object.fromEntries(Object.entries(q(e[t]) ?? {}).filter(([e]) => a.has(e)))]));
915
+ ].map((t) => [t, Object.fromEntries(Object.entries(Z(e[t]) ?? {}).filter(([e]) => a.has(e)))]));
909
916
  return {
910
917
  before: o(r),
911
918
  after: o(i),
912
919
  nodeIds: [...a],
913
- beforeOrder: Y(e, n),
914
- afterOrder: Y(t, n)
920
+ beforeOrder: rn(e, n),
921
+ afterOrder: rn(t, n)
915
922
  };
916
923
  }
917
- function _n(e, t, n, r) {
924
+ function vn(e, t, n, r) {
918
925
  if (n.nodeIds.length == 0) return e;
919
- let i = Q(e, t), a = r ? n.after : n.before;
926
+ let i = $(e, t), a = r ? n.after : n.before;
920
927
  for (let e of [
921
928
  "nodes",
922
929
  "comments",
923
930
  "hiddenNodeContent"
924
931
  ]) {
925
- let t = { ...q(i[e]) }, r = q(a[e]) ?? {};
932
+ let t = { ...Z(i[e]) }, r = Z(a[e]) ?? {};
926
933
  for (let e of n.nodeIds) r[e] == null ? delete t[e] : t[e] = r[e];
927
934
  i[e] = t;
928
935
  }
929
936
  return i.order = [...r ? n.afterOrder : n.beforeOrder], {
930
937
  ...e,
931
- designer: Z(X(e), t, i)
938
+ designer: un(cn(e), t, i)
932
939
  };
933
940
  }
934
- function vn(e, t) {
935
- return q(J(e, t)?.hiddenNodeContent);
936
- }
937
- //#endregion
938
- //#region src/workbench/browser/runtime/connectionCatalog.ts
939
941
  function yn(e, t) {
940
- let n = e.authenticated && t != null ? $(t).preferred : void 0;
941
- return {
942
- ...e,
943
- ...n == null ? {} : { defaultConnection: n }
944
- };
942
+ return Z(Q(e, t)?.hiddenNodeContent);
945
943
  }
946
- function $(e) {
947
- let t = [], n = /* @__PURE__ */ new Map(), r;
948
- for (let i of e) n.set(i.connectionId, i), i.status == "active" && (t.push(i), i.isDefault && (r = i));
949
- return {
950
- active: t,
951
- all: e,
952
- byId: n,
953
- preferred: r ?? (t.length == 1 ? t[0] : void 0)
954
- };
944
+ //#endregion
945
+ //#region src/workbench/browser/runtime/editor/triggerDiagnosticPresentation.ts
946
+ function bn(e, t, n, r, i, a) {
947
+ return t == null || n == null ? e : e.map((e) => {
948
+ if (e.diagnostic.code != "trigger.config-incomplete" || e.location == null) return e;
949
+ let o = t.node(n, e.location.nodeId)?.node;
950
+ if (o?.kind != "integration" && o?.kind != "poll") return e;
951
+ let s = r?.[o.definition.key]?.configInputLabels, c = e.diagnostic.fields?.map((e) => s?.[e]), l = c != null && c.length > 0 && c.every((e) => e != null) ? a("diagnostics.messages.trigger.config-incomplete-fields", { fields: new Intl.ListFormat(i, { type: "conjunction" }).format(c) }) : a("diagnostics.messages.trigger.config-incomplete");
952
+ return {
953
+ ...e,
954
+ message: l
955
+ };
956
+ });
955
957
  }
956
958
  //#endregion
957
959
  //#region src/workbench/browser/runtime/publications/publicationStore.ts
958
- var bn = {
960
+ var xn = {
959
961
  activities: [],
960
962
  activitiesLoadFailed: !1,
961
963
  activitiesLoading: !1,
@@ -970,25 +972,25 @@ var bn = {
970
972
  publications: [],
971
973
  publishing: !1,
972
974
  refreshing: !1
973
- }, xn = 20, Sn = 50, Cn = 750;
974
- function wn(e, t) {
975
+ }, Sn = 20, Cn = 50, wn = 750;
976
+ function Tn(e, t) {
975
977
  return e?.flowId == t.flowId;
976
978
  }
977
- var Tn = class {
979
+ var En = class {
978
980
  #e;
979
981
  #t;
980
982
  #n;
981
- #r = new D();
982
- #i = new D();
983
+ #r = new j();
984
+ #i = new j();
983
985
  #a;
984
- #o = new D();
985
- #s = new D();
986
+ #o = new j();
987
+ #s = new j();
986
988
  #c;
987
- #l = n(bn);
989
+ #l = n(xn);
988
990
  #u;
989
991
  #d;
990
992
  #f;
991
- constructor(t, n, r, i, a = F, o = h()) {
993
+ constructor(t, n, r, i, a = U, o = h()) {
992
994
  this.#e = t, this.#t = a, this.#n = o, this.#a = i, this.#c = r, this.#u = n, this.$ = {
993
995
  activities: e(this.#l, (e) => e.activities),
994
996
  activitiesLoadFailed: e(this.#l, (e) => e.activitiesLoadFailed),
@@ -1022,17 +1024,17 @@ var Tn = class {
1022
1024
  this.#l.dispose();
1023
1025
  }
1024
1026
  reset() {
1025
- this.#r.invalidate(), this.#i.invalidate(), this.#y(), this.#o.invalidate(), this.#s.invalidate(), this.#f = void 0, this.#l.set(bn);
1027
+ this.#r.invalidate(), this.#i.invalidate(), this.#y(), this.#o.invalidate(), this.#s.invalidate(), this.#f = void 0, this.#l.set(xn);
1026
1028
  }
1027
1029
  async load(e) {
1028
- let t = { flowId: e }, n = this.#l.value, r = n.loaded && wn(n.target, t), i = this.#r.begin();
1029
- wn(n.target, t) || (this.#i.invalidate(), this.#y(), this.#f = void 0), r ? this.#S({
1030
+ let t = { flowId: e }, n = this.#l.value, r = n.loaded && Tn(n.target, t), i = this.#r.begin();
1031
+ Tn(n.target, t) || (this.#i.invalidate(), this.#y(), this.#f = void 0), r ? this.#S({
1030
1032
  loadFailed: !1,
1031
1033
  loadingMore: !1,
1032
1034
  loadMoreFailed: !1,
1033
1035
  refreshing: !0
1034
1036
  }) : this.#l.set({
1035
- ...bn,
1037
+ ...xn,
1036
1038
  loading: !0,
1037
1039
  target: t
1038
1040
  });
@@ -1062,7 +1064,7 @@ var Tn = class {
1062
1064
  loadFailed: !r,
1063
1065
  loading: !1,
1064
1066
  refreshing: !1
1065
- }), this.#c(O(e, this.#n.t));
1067
+ }), this.#c(z(e, this.#n.t));
1066
1068
  }
1067
1069
  }
1068
1070
  async loadMore() {
@@ -1076,7 +1078,7 @@ var Tn = class {
1076
1078
  try {
1077
1079
  let e = await this.#e.listPublications(n.flowId, {
1078
1080
  cursor: t,
1079
- limit: Sn
1081
+ limit: Cn
1080
1082
  });
1081
1083
  if (!r()) return;
1082
1084
  let i = new Set(this.#l.value.publications.map((e) => e.publicationId));
@@ -1091,7 +1093,7 @@ var Tn = class {
1091
1093
  this.#S({
1092
1094
  loadMoreFailed: !0,
1093
1095
  loadingMore: !1
1094
- }), this.#c(O(e, this.#n.t));
1096
+ }), this.#c(z(e, this.#n.t));
1095
1097
  }
1096
1098
  }
1097
1099
  async publish() {
@@ -1118,7 +1120,7 @@ var Tn = class {
1118
1120
  publishing: e.status == "pending"
1119
1121
  }), await this.#_(r, e, s, t.name)) : !1;
1120
1122
  } catch (e) {
1121
- return s() ? (e instanceof I && e.code == "live.conflict" && await this.#m(r), this.#c(O(e, this.#n.t)), !1) : !1;
1123
+ return s() ? (e instanceof P && e.code == "live.conflict" && await this.#m(r), this.#c(z(e, this.#n.t)), !1) : !1;
1122
1124
  } finally {
1123
1125
  s() && this.#S({ publishing: !1 });
1124
1126
  }
@@ -1144,7 +1146,7 @@ var Tn = class {
1144
1146
  message: this.#n.t("notice.rolledBack", { revision: e.revisionId })
1145
1147
  }), !0);
1146
1148
  } catch (e) {
1147
- return s() ? (e instanceof I && e.code == "live.conflict" && await this.#m(r), this.#c(O(e, this.#n.t)), !1) : !1;
1149
+ return s() ? (e instanceof P && e.code == "live.conflict" && await this.#m(r), this.#c(z(e, this.#n.t)), !1) : !1;
1148
1150
  } finally {
1149
1151
  s() && this.#S({ rollingBackPublicationId: void 0 });
1150
1152
  }
@@ -1179,13 +1181,13 @@ var Tn = class {
1179
1181
  testingTriggerId: void 0,
1180
1182
  testResult: void 0
1181
1183
  });
1182
- let [r, i] = await Promise.allSettled([this.#e.getFlowTriggerBinding(t.flowId, e), this.#e.listFlowTriggerActivities(t.flowId, e, { limit: xn })]);
1184
+ let [r, i] = await Promise.allSettled([this.#e.getFlowTriggerBinding(t.flowId, e), this.#e.listFlowTriggerActivities(t.flowId, e, { limit: Sn })]);
1183
1185
  if (n()) {
1184
1186
  if (r.status == "rejected") {
1185
1187
  this.#S({
1186
1188
  activitiesLoading: !1,
1187
1189
  detailLoading: !1
1188
- }), this.#c(O(r.reason, this.#n.t));
1190
+ }), this.#c(z(r.reason, this.#n.t));
1189
1191
  return;
1190
1192
  }
1191
1193
  this.#S({
@@ -1199,7 +1201,7 @@ var Tn = class {
1199
1201
  }) : (this.#S({
1200
1202
  activitiesLoadFailed: !0,
1201
1203
  activitiesLoading: !1
1202
- }), this.#c(O(i.reason, this.#n.t)));
1204
+ }), this.#c(z(i.reason, this.#n.t)));
1203
1205
  }
1204
1206
  }
1205
1207
  async loadMoreTriggerActivities() {
@@ -1213,7 +1215,7 @@ var Tn = class {
1213
1215
  try {
1214
1216
  let e = await this.#e.listFlowTriggerActivities(r.flowId, n, {
1215
1217
  cursor: t,
1216
- limit: xn
1218
+ limit: Sn
1217
1219
  });
1218
1220
  if (!i() || this.#l.value.selectedTriggerId != n) return;
1219
1221
  let a = new Set(this.#l.value.activities.map((e) => e.activityId));
@@ -1228,7 +1230,7 @@ var Tn = class {
1228
1230
  this.#S({
1229
1231
  activitiesLoadFailed: !0,
1230
1232
  activitiesLoadingMore: !1
1231
- }), this.#c(O(e, this.#n.t));
1233
+ }), this.#c(z(e, this.#n.t));
1232
1234
  }
1233
1235
  }
1234
1236
  async testTrigger() {
@@ -1243,7 +1245,7 @@ var Tn = class {
1243
1245
  let e = await this.#e.testFlowPollTrigger(n.flowId, t);
1244
1246
  return !i() || this.#l.value.selectedTriggerId != t ? !1 : (this.#S({ testResult: e }), !0);
1245
1247
  } catch (e) {
1246
- return i() && this.#l.value.selectedTriggerId == t && this.#c(O(e, this.#n.t)), !1;
1248
+ return i() && this.#l.value.selectedTriggerId == t && this.#c(z(e, this.#n.t)), !1;
1247
1249
  } finally {
1248
1250
  i() && this.#l.value.selectedTriggerId == t && this.#S({ testingTriggerId: void 0 });
1249
1251
  }
@@ -1262,16 +1264,16 @@ var Tn = class {
1262
1264
  message: this.#n.t(e.operatorState == "active" ? "notice.triggerPaused" : "notice.triggerResumed")
1263
1265
  }), !0) : !1;
1264
1266
  } catch (e) {
1265
- return n() && this.#c(O(e, this.#n.t)), !1;
1267
+ return n() && this.#c(z(e, this.#n.t)), !1;
1266
1268
  } finally {
1267
1269
  n() && this.#S({ changingTriggerId: void 0 });
1268
1270
  }
1269
1271
  }
1270
1272
  async #p(e, t) {
1271
1273
  let n = this.#r.begin(), [r, i, a] = await this.#h(e, t).catch((t) => {
1272
- throw n() && wn(this.#l.value.target, e) && this.#S({ refreshing: !1 }), t;
1274
+ throw n() && Tn(this.#l.value.target, e) && this.#S({ refreshing: !1 }), t;
1273
1275
  });
1274
- t?.throwIfAborted(), n() && this.#u.updateLive(r), n() && wn(this.#l.value.target, e) && this.#S({
1276
+ t?.throwIfAborted(), n() && this.#u.updateLive(r), n() && Tn(this.#l.value.target, e) && this.#S({
1275
1277
  bindings: a,
1276
1278
  live: r,
1277
1279
  loaded: !0,
@@ -1295,7 +1297,7 @@ var Tn = class {
1295
1297
  this.#e.getLive(e.flowId, t),
1296
1298
  this.#e.listPublications(e.flowId, {
1297
1299
  includeTotal: !0,
1298
- limit: Sn
1300
+ limit: Cn
1299
1301
  }, t),
1300
1302
  this.#e.listFlowTriggerBindings(e.flowId, t)
1301
1303
  ]);
@@ -1305,7 +1307,7 @@ var Tn = class {
1305
1307
  if (t != null && t != "") try {
1306
1308
  return await this.#e.getPublishOperation(e.flowId, t);
1307
1309
  } catch (t) {
1308
- if (t instanceof I && t.code == "publication.operation-not-found") {
1310
+ if (t instanceof P && t.code == "publication.operation-not-found") {
1309
1311
  this.#a.setItem(this.#b(e.flowId), "");
1310
1312
  return;
1311
1313
  }
@@ -1314,7 +1316,7 @@ var Tn = class {
1314
1316
  }
1315
1317
  async #_(e, t, n, r) {
1316
1318
  this.#y();
1317
- let i = G.runFork(G.gen({ self: this }, function* () {
1319
+ let i = J.runFork(J.gen({ self: this }, function* () {
1318
1320
  let i = yield* this.#v(e, t, n);
1319
1321
  if (i == null || !n()) return !1;
1320
1322
  if (this.#f = void 0, this.#x(e, {
@@ -1324,11 +1326,11 @@ var Tn = class {
1324
1326
  kind: "error",
1325
1327
  message: i.issue.message
1326
1328
  }), !1;
1327
- let a = yield* G.tryPromise({
1329
+ let a = yield* J.tryPromise({
1328
1330
  try: (t) => this.#p(e, t),
1329
1331
  catch: (e) => e
1330
- }).pipe(G.match({
1331
- onFailure: (e) => (n() && this.#c(O(e, this.#n.t)), !1),
1332
+ }).pipe(J.match({
1333
+ onFailure: (e) => (n() && this.#c(z(e, this.#n.t)), !1),
1332
1334
  onSuccess: () => !0
1333
1335
  }));
1334
1336
  return n() ? (a && this.#c({
@@ -1337,34 +1339,34 @@ var Tn = class {
1337
1339
  }), !0) : !1;
1338
1340
  }));
1339
1341
  this.#d = i;
1340
- let a = await G.runPromiseExit(At.join(i));
1341
- if (kt.isSuccess(a)) return a.value;
1342
- if (Ot.hasInterruptsOnly(a.cause)) return !1;
1343
- throw Ot.squash(a.cause);
1342
+ let a = await J.runPromiseExit(Ot.join(i));
1343
+ if (Dt.isSuccess(a)) return a.value;
1344
+ if (Et.hasInterruptsOnly(a.cause)) return !1;
1345
+ throw Et.squash(a.cause);
1344
1346
  }
1345
1347
  #v(e, t, n) {
1346
- return G.gen({ self: this }, function* () {
1348
+ return J.gen({ self: this }, function* () {
1347
1349
  let r = t;
1348
1350
  for (; r.status == "pending";) {
1349
- if (yield* G.sleep(Cn), !n()) return;
1350
- let t = yield* G.tryPromise({
1351
+ if (yield* J.sleep(wn), !n()) return;
1352
+ let t = yield* J.tryPromise({
1351
1353
  try: (t) => this.#e.getPublishOperation(e.flowId, r.operationId, t),
1352
1354
  catch: (e) => e
1353
- }).pipe(G.match({
1355
+ }).pipe(J.match({
1354
1356
  onFailure: (e) => ({ error: e }),
1355
1357
  onSuccess: (e) => ({ value: e })
1356
1358
  }));
1357
1359
  if (!n()) return;
1358
1360
  if ("error" in t) {
1359
1361
  let n = t.error;
1360
- if (n instanceof I && n.code == "publication.operation-not-found") {
1362
+ if (n instanceof P && n.code == "publication.operation-not-found") {
1361
1363
  this.#a.setItem(this.#b(e.flowId), ""), this.#x(e, {
1362
1364
  operation: void 0,
1363
1365
  publishing: !1
1364
- }), this.#c(O(n, this.#n.t));
1366
+ }), this.#c(z(n, this.#n.t));
1365
1367
  return;
1366
1368
  }
1367
- this.#c(O(n, this.#n.t));
1369
+ this.#c(z(n, this.#n.t));
1368
1370
  continue;
1369
1371
  }
1370
1372
  r = t.value, this.#x(e, { operation: r });
@@ -1379,8 +1381,8 @@ var Tn = class {
1379
1381
  return `publish-operation:${e}`;
1380
1382
  }
1381
1383
  #x(e, t) {
1382
- wn(this.#l.value.target, e) ? this.#S(t) : this.#l.set({
1383
- ...bn,
1384
+ Tn(this.#l.value.target, e) ? this.#S(t) : this.#l.set({
1385
+ ...xn,
1384
1386
  ...t,
1385
1387
  target: e
1386
1388
  });
@@ -1391,22 +1393,22 @@ var Tn = class {
1391
1393
  ...e
1392
1394
  });
1393
1395
  }
1394
- }, En = { starting: !1 };
1395
- function Dn(e) {
1396
+ }, Dn = { starting: !1 };
1397
+ function On(e) {
1396
1398
  switch (e.kind) {
1397
1399
  case "condition": return {};
1398
- case "subflow": return $e(e.definition?.inputs ?? []);
1399
- case "task": return $e(e.definition?.inputs ?? []);
1400
+ case "subflow": return C(e.definition?.inputs ?? []);
1401
+ case "task": return C(e.definition?.inputs ?? []);
1400
1402
  case "value": return {};
1401
1403
  case "approval":
1402
- case "wait": return $e(e.node.inputDefinitions);
1404
+ case "wait": return C(e.node.inputDefinitions);
1403
1405
  }
1404
1406
  }
1405
- function On(e) {
1407
+ function kn(e) {
1406
1408
  return e.node.name == null ? e.kind == "task" || e.kind == "subflow" ? e.definition?.name ?? e.id : e.id : e.node.name;
1407
1409
  }
1408
- function kn(e, t) {
1409
- let n = P(e), r = n.graph({ kind: "flow" });
1410
+ function An(e, t) {
1411
+ let n = R(e), r = n.graph({ kind: "flow" });
1410
1412
  if (r == null) return [];
1411
1413
  let i = /* @__PURE__ */ new Set([t]), a = [t];
1412
1414
  for (; a.length > 0;) {
@@ -1416,11 +1418,11 @@ function kn(e, t) {
1416
1418
  return Object.entries(r.nodes).filter(([e]) => i.has(e)).toSorted(([e], [t]) => e.localeCompare(t)).flatMap(([e, t]) => {
1417
1419
  let r = n.resolveNode(e, t);
1418
1420
  if (r.kind == "trigger") return r.trigger.kind == "manual" || r.trigger.kind == "cron" ? [] : [{
1419
- definitions: _e(r.trigger),
1421
+ definitions: pt(r.trigger),
1420
1422
  nodeId: e,
1421
1423
  title: r.trigger.name
1422
1424
  }];
1423
- let i = Object.entries(Dn(r)).filter(([e, t]) => r.node.inputs[e] == null && !Object.hasOwn(t, "value")).toSorted(([e], [t]) => e.localeCompare(t)).map(([e, t]) => Object.assign({
1425
+ let i = Object.entries(On(r)).filter(([e, t]) => r.node.inputs[e] == null && !Object.hasOwn(t, "value")).toSorted(([e], [t]) => e.localeCompare(t)).map(([e, t]) => Object.assign({
1424
1426
  handle: e,
1425
1427
  jsonSchema: t.jsonSchema,
1426
1428
  nullable: t.nullable
@@ -1428,18 +1430,18 @@ function kn(e, t) {
1428
1430
  return i.length == 0 ? [] : [{
1429
1431
  definitions: i,
1430
1432
  nodeId: e,
1431
- title: On(r)
1433
+ title: kn(r)
1432
1434
  }];
1433
1435
  });
1434
1436
  }
1435
- function An(e) {
1437
+ function jn(e) {
1436
1438
  return JSON.stringify(e.map((e) => [e.nodeId, e.definitions.map((e) => [
1437
1439
  e.handle,
1438
1440
  e.jsonSchema,
1439
1441
  e.nullable
1440
1442
  ])]));
1441
1443
  }
1442
- async function jn(e, t, n) {
1444
+ async function Mn(e, t, n) {
1443
1445
  let { FlowRunInputEditorStore: r } = await import("./flowRunInputEditorStore-Bgb5vSeS.js").then((e) => e.n);
1444
1446
  return e.map((e) => {
1445
1447
  let i = new r(e.definitions, t);
@@ -1450,31 +1452,31 @@ async function jn(e, t, n) {
1450
1452
  };
1451
1453
  });
1452
1454
  }
1453
- function Mn(e) {
1455
+ function Nn(e) {
1454
1456
  return Object.fromEntries(e.map((e) => [e.nodeId, e.editor.values()]));
1455
1457
  }
1456
- function Nn(e, t) {
1457
- return P(e).graph({ kind: "flow" })?.nodes[t]?.kind === "cron" ? { scheduledAt: (/* @__PURE__ */ new Date()).toISOString() } : {};
1458
+ function Pn(e, t) {
1459
+ return R(e).graph({ kind: "flow" })?.nodes[t]?.kind === "cron" ? { scheduledAt: (/* @__PURE__ */ new Date()).toISOString() } : {};
1458
1460
  }
1459
- function Pn(e, t, n) {
1461
+ function Fn(e, t, n) {
1460
1462
  return {
1461
1463
  inputs: Object.fromEntries(e.filter((e) => e.nodeId != t).map((e) => [e.nodeId, e.editor.values()])),
1462
- outputs: e.find((e) => e.nodeId == t)?.editor.values() ?? Nn(n, t)
1464
+ outputs: e.find((e) => e.nodeId == t)?.editor.values() ?? Pn(n, t)
1463
1465
  };
1464
1466
  }
1465
- var Fn = class {
1467
+ var In = class {
1466
1468
  #e;
1467
1469
  #t;
1468
1470
  #n;
1469
1471
  #r;
1470
- #i = new D();
1471
- #a = new D();
1472
+ #i = new j();
1473
+ #a = new j();
1472
1474
  #o;
1473
1475
  #s = /* @__PURE__ */ new Map();
1474
1476
  #c;
1475
- #l = n(En);
1477
+ #l = n(Dn);
1476
1478
  #u;
1477
- constructor(t, n, r, i, a = h(), o = F) {
1479
+ constructor(t, n, r, i, a = h(), o = U) {
1478
1480
  this.#e = i, this.#t = t, this.#o = n, this.#c = r, this.#r = a, this.#n = o, this.$ = {
1479
1481
  inputRequest: e(this.#l, (e) => e.inputRequest),
1480
1482
  starting: e(this.#l, (e) => e.starting),
@@ -1489,14 +1491,14 @@ var Fn = class {
1489
1491
  reset() {
1490
1492
  this.#i.invalidate(), this.#a.invalidate(), this.#u = void 0;
1491
1493
  let e = this.#l.value.inputRequest;
1492
- this.#h(e), this.#l.set(En), this.#p(e);
1494
+ this.#h(e), this.#l.set(Dn), this.#p(e);
1493
1495
  }
1494
1496
  async requestDraft(e, t, n) {
1495
1497
  let r = this.#a.begin();
1496
1498
  try {
1497
1499
  return await this.#d("draft", e, t, t.revisionId, r, void 0, n);
1498
1500
  } catch (e) {
1499
- return r() && this.#c(O(e, this.#r.t)), "unavailable";
1501
+ return r() && this.#c(z(e, this.#r.t)), "unavailable";
1500
1502
  } finally {
1501
1503
  r() && this.#g({ starting: !1 });
1502
1504
  }
@@ -1506,16 +1508,16 @@ var Fn = class {
1506
1508
  try {
1507
1509
  return await this.#d("draft", e, t, t.revisionId, r, void 0, n, !0);
1508
1510
  } catch (e) {
1509
- return r() && this.#c(O(e, this.#r.t)), "unavailable";
1511
+ return r() && this.#c(z(e, this.#r.t)), "unavailable";
1510
1512
  } finally {
1511
1513
  r() && this.#g({ starting: !1 });
1512
1514
  }
1513
1515
  }
1514
1516
  inputStatus(e, t, n) {
1515
- let r = kn(t, n);
1517
+ let r = An(t, n);
1516
1518
  if (r.length == 0) return "none";
1517
1519
  let i = this.#s.get(this.#m(e, n));
1518
- return i?.valid == 1 && i.signature == An(r) ? "ready" : "missing";
1520
+ return i?.valid == 1 && i.signature == jn(r) ? "ready" : "missing";
1519
1521
  }
1520
1522
  async requestLive(e) {
1521
1523
  let t = this.#a.begin();
@@ -1526,7 +1528,7 @@ var Fn = class {
1526
1528
  let r = await this.#t.getRevision(e.flowId, n.revisionId);
1527
1529
  return t() ? await this.#d("live", e, r, n.revisionId, t, n.publicationId) : "unavailable";
1528
1530
  } catch (e) {
1529
- return t() && this.#c(O(e, this.#r.t)), "unavailable";
1531
+ return t() && this.#c(z(e, this.#r.t)), "unavailable";
1530
1532
  } finally {
1531
1533
  t() && this.#g({ starting: !1 });
1532
1534
  }
@@ -1543,7 +1545,7 @@ var Fn = class {
1543
1545
  attempted: !0
1544
1546
  } }), !1;
1545
1547
  this.#h(e);
1546
- let { inputs: t, outputs: n } = Pn(e.groups, e.triggerId, e.revision), r = await this.#f(e.source, e.flow, e.revisionId, {
1548
+ let { inputs: t, outputs: n } = Fn(e.groups, e.triggerId, e.revision), r = await this.#f(e.source, e.flow, e.revisionId, {
1547
1549
  nodeId: e.triggerId,
1548
1550
  outputs: n
1549
1551
  }, t, e.publicationId);
@@ -1555,7 +1557,7 @@ var Fn = class {
1555
1557
  let r = this.#a.begin();
1556
1558
  this.#h(n), this.#g({ starting: !0 });
1557
1559
  try {
1558
- let i = kn(n.revision, e), a = this.#s.get(this.#m(n.flow.flowId, e)), o = await jn(i, this.#r.lang$, a?.values);
1560
+ let i = An(n.revision, e), a = this.#s.get(this.#m(n.flow.flowId, e)), o = await Mn(i, this.#r.lang$, a?.values);
1559
1561
  if (!r() || this.#l.value.inputRequest !== n) {
1560
1562
  for (let e of o) e.editor.dispose();
1561
1563
  return;
@@ -1569,7 +1571,7 @@ var Fn = class {
1569
1571
  valid: s
1570
1572
  } }), this.#p(n);
1571
1573
  } catch (e) {
1572
- r() && this.#c(O(e, this.#r.t));
1574
+ r() && this.#c(z(e, this.#r.t));
1573
1575
  } finally {
1574
1576
  r() && this.#g({ starting: !1 });
1575
1577
  }
@@ -1581,7 +1583,7 @@ var Fn = class {
1581
1583
  starting: !c,
1582
1584
  submitting: void 0
1583
1585
  }), this.#p(l);
1584
- let u = P(r).graph({ kind: "flow" }), d = Object.entries(u?.nodes ?? {}).flatMap(([e, t]) => "inputs" in t ? [] : [{
1586
+ let u = R(r).graph({ kind: "flow" }), d = Object.entries(u?.nodes ?? {}).flatMap(([e, t]) => "inputs" in t ? [] : [{
1585
1587
  nodeId: e,
1586
1588
  title: t.name
1587
1589
  }]);
@@ -1594,17 +1596,17 @@ var Fn = class {
1594
1596
  kind: "error",
1595
1597
  message: this.#r.t("runInput.selectTrigger")
1596
1598
  }), "unavailable";
1597
- let p = f == null ? [] : kn(r, f.nodeId), m = An(p), h = f == null ? void 0 : this.#s.get(this.#m(n.flowId, f.nodeId)), g = f == null ? [] : await jn(p, this.#r.lang$, h?.values);
1599
+ let p = f == null ? [] : An(r, f.nodeId), m = jn(p), h = f == null ? void 0 : this.#s.get(this.#m(n.flowId, f.nodeId)), g = f == null ? [] : await Mn(p, this.#r.lang$, h?.values);
1598
1600
  if (!a()) {
1599
1601
  for (let e of g) e.editor.dispose();
1600
1602
  return "unavailable";
1601
1603
  }
1602
1604
  if (!c && f != null && g.length == 0) return await this.#f(e, n, i, {
1603
1605
  nodeId: f.nodeId,
1604
- outputs: Nn(r, f.nodeId)
1606
+ outputs: Pn(r, f.nodeId)
1605
1607
  }, {}, o) ? "started" : "unavailable";
1606
1608
  if (!c && f != null && h?.valid == 1 && h.signature == m && g.every((e) => e.editor.valid$.value)) {
1607
- let t = Pn(g, f.nodeId, r);
1609
+ let t = Fn(g, f.nodeId, r);
1608
1610
  for (let e of g) e.editor.dispose();
1609
1611
  return await this.#f(e, n, i, {
1610
1612
  nodeId: f.nodeId,
@@ -1666,7 +1668,7 @@ var Fn = class {
1666
1668
  });
1667
1669
  return !o() || !s() ? !1 : (this.#u = void 0, this.#o.follow(d, s));
1668
1670
  } catch (e) {
1669
- return o() && s() && this.#c(O(e, this.#r.t)), !1;
1671
+ return o() && s() && this.#c(z(e, this.#r.t)), !1;
1670
1672
  } finally {
1671
1673
  o() && this.#g({
1672
1674
  starting: !1,
@@ -1685,9 +1687,9 @@ var Fn = class {
1685
1687
  }
1686
1688
  #h(e) {
1687
1689
  e?.triggerId != null && e.groups.length != 0 && this.#s.set(this.#m(e.flow.flowId, e.triggerId), {
1688
- signature: An(kn(e.revision, e.triggerId)),
1690
+ signature: jn(An(e.revision, e.triggerId)),
1689
1691
  valid: e.valid.value,
1690
- values: Mn(e.groups)
1692
+ values: Nn(e.groups)
1691
1693
  });
1692
1694
  }
1693
1695
  #g(e) {
@@ -1699,22 +1701,22 @@ var Fn = class {
1699
1701
  };
1700
1702
  //#endregion
1701
1703
  //#region src/workbench/browser/runtime/workspace.ts
1702
- function In(e, t) {
1704
+ function Ln(e, t) {
1703
1705
  if (e.node.icon != null) return e.node.icon;
1704
- if (e.kind != "task" || e.definition == null || !("executor" in e.definition) || e.definition.executor.kind != "connector") return zn(e);
1706
+ if (e.kind != "task" || e.definition == null || !("executor" in e.definition) || e.definition.executor.kind != "connector") return Bn(e);
1705
1707
  let n = t[e.definition.executor.action];
1706
- return n == null ? zn(e) : j(n);
1708
+ return n == null ? Bn(e) : I(n);
1707
1709
  }
1708
- function Ln(e, t) {
1710
+ function Rn(e, t) {
1709
1711
  return e.kind == "trigger" ? {
1710
- icon: Jn(e.trigger, t.providers),
1712
+ icon: Yn(e.trigger, t.providers),
1711
1713
  title: e.trigger.name
1712
1714
  } : {
1713
- icon: In(e, t.connectorActions),
1714
- title: Rn(e, t.t)
1715
+ icon: Ln(e, t.connectorActions),
1716
+ title: zn(e, t.t)
1715
1717
  };
1716
1718
  }
1717
- function Rn(e, t) {
1719
+ function zn(e, t) {
1718
1720
  if (e.node.name != null) return e.node.name;
1719
1721
  switch (e.kind) {
1720
1722
  case "condition": return t?.("addNode.condition") ?? "Condition";
@@ -1725,7 +1727,7 @@ function Rn(e, t) {
1725
1727
  case "task": return e.definition?.name ?? (e.node.task == null ? e.node.taskId : e.node.task.moduleId);
1726
1728
  }
1727
1729
  }
1728
- function zn(e) {
1730
+ function Bn(e) {
1729
1731
  switch (e.kind) {
1730
1732
  case "condition": return ":carbon:child-node:";
1731
1733
  case "subflow": return ":carbon:subflow:";
@@ -1738,7 +1740,7 @@ function zn(e) {
1738
1740
  }
1739
1741
  }
1740
1742
  }
1741
- function Bn(e, t, n, r) {
1743
+ function Vn(e, t, n, r) {
1742
1744
  return JSON.stringify([
1743
1745
  e,
1744
1746
  t,
@@ -1746,10 +1748,10 @@ function Bn(e, t, n, r) {
1746
1748
  r
1747
1749
  ]);
1748
1750
  }
1749
- function Vn(e) {
1751
+ function Hn(e) {
1750
1752
  if (e.kind == "trigger") return {
1751
1753
  inputs: /* @__PURE__ */ new Map(),
1752
- outputs: new Map(Object.entries(he(e.trigger)))
1754
+ outputs: new Map(Object.entries(De(e.trigger)))
1753
1755
  };
1754
1756
  let t = new Map(Object.keys(e.node.inputs).map((e) => [e, {}])), n = /* @__PURE__ */ new Map();
1755
1757
  switch (e.kind) {
@@ -1772,7 +1774,7 @@ function Vn(e) {
1772
1774
  jsonSchema: n.jsonSchema,
1773
1775
  nullable: n.nullable
1774
1776
  });
1775
- for (let [t, r] of Object.entries(He(e.node))) n.set(t, r);
1777
+ for (let [t, r] of Object.entries(Te(e.node))) n.set(t, r);
1776
1778
  break;
1777
1779
  case "subflow": {
1778
1780
  let r = e.definition;
@@ -1818,7 +1820,7 @@ function Vn(e) {
1818
1820
  outputs: n
1819
1821
  };
1820
1822
  }
1821
- function Hn(e) {
1823
+ function Un(e) {
1822
1824
  switch (e) {
1823
1825
  case "endsWith": return "ends with";
1824
1826
  case "hasKey": return "has key";
@@ -1842,7 +1844,7 @@ function Hn(e) {
1842
1844
  case "contains": return e;
1843
1845
  }
1844
1846
  }
1845
- function Un(e, t) {
1847
+ function Wn(e, t) {
1846
1848
  if (e.kind == "value") return JSON.stringify(e.value) ?? "…";
1847
1849
  let n = e.source;
1848
1850
  if (n.kind == "flow") return n.input;
@@ -1850,14 +1852,14 @@ function Un(e, t) {
1850
1852
  kind: "environment",
1851
1853
  label: t.t?.("nodeInput.variable") ?? "Env"
1852
1854
  };
1853
- let r = t.nodes.get(n.nodeId), i = r == null ? void 0 : Ln(r, t);
1855
+ let r = t.nodes.get(n.nodeId), i = r == null ? void 0 : Rn(r, t);
1854
1856
  return {
1855
1857
  icon: i?.icon,
1856
1858
  kind: "node",
1857
- label: `${i?.title ?? n.nodeId} · ${re(n)}`
1859
+ label: `${i?.title ?? n.nodeId} · ${me(n)}`
1858
1860
  };
1859
1861
  }
1860
- function Wn(e, t, n) {
1862
+ function Gn(e, t, n) {
1861
1863
  let r = e.kind == "flow" ? `/document/graph/nodes/${t.id}` : `/document/subflows/${e.id}/graph/nodes/${t.id}`, i = [r];
1862
1864
  if (t.kind == "task") {
1863
1865
  t.node.task == null ? i.push(`/document/tasks/${t.node.taskId}`) : i.push(`${r}/task`);
@@ -1866,7 +1868,7 @@ function Wn(e, t, n) {
1866
1868
  } else t.kind == "subflow" && i.push(`/document/subflows/${t.node.subflowId}`);
1867
1869
  return n.filter((e) => i.some((t) => e.path.startsWith(t))).length;
1868
1870
  }
1869
- function Gn(e, t, n, r) {
1871
+ function Kn(e, t, n, r) {
1870
1872
  if (t.kind != "flow" || n?.flowId != e.revision.flowId || n.revisionId != e.revision.revisionId) return { nodes: /* @__PURE__ */ new Map() };
1871
1873
  let i = n.status == "queued" || n.status == "starting" || n.status == "running" || n.status == "waiting", a = /* @__PURE__ */ new Map();
1872
1874
  if ("waits" in n) for (let e of n.waits) a.set(e.nodeId, {
@@ -1965,10 +1967,10 @@ function Gn(e, t, n, r) {
1965
1967
  status: i ? "running" : "idle"
1966
1968
  };
1967
1969
  }
1968
- function Kn(e, t, n) {
1970
+ function qn(e, t, n) {
1969
1971
  if (e != null) return "moduleId" in e ? n?.("designer.executorJavaScript") ?? "javascript" : e.executor.kind == "agent" ? "Agent" : e.executor.kind == "llm" ? n?.("designer.executorLlm") ?? "llm" : `${n?.("designer.executorConnector") ?? "connector"} · ${t ?? e.executor.action.split(".")[0]}`;
1970
1972
  }
1971
- function qn(e) {
1973
+ function Jn(e) {
1972
1974
  switch (e.kind) {
1973
1975
  case "manual": return ":carbon:play:";
1974
1976
  case "cron": return ":carbon:time:";
@@ -1977,17 +1979,17 @@ function qn(e) {
1977
1979
  case "webhook": return ":carbon:webhook:";
1978
1980
  }
1979
1981
  }
1980
- function Jn(e, t) {
1981
- return e.icon == null ? e.kind != "integration" && e.kind != "poll" ? qn(e) : j(t[e.definition.provider] ?? {
1982
+ function Yn(e, t) {
1983
+ return e.icon == null ? e.kind != "integration" && e.kind != "poll" ? Jn(e) : I(t[e.definition.provider] ?? {
1982
1984
  serviceId: e.definition.provider,
1983
1985
  serviceName: e.definition.provider
1984
1986
  }) : e.icon;
1985
1987
  }
1986
- function Yn(e, t) {
1988
+ function Xn(e, t) {
1987
1989
  let n = `/document/graph/nodes/${e}`;
1988
- return t.filter((e) => e.code != "trigger.config-incomplete" && (e.path == n || e.path.startsWith(`${n}/`)));
1990
+ return t.filter((e) => e.path == n || e.path.startsWith(`${n}/`));
1989
1991
  }
1990
- function Xn(e, t) {
1992
+ function Zn(e, t) {
1991
1993
  let n = [], r = new Map([...t].map((e) => [e, /* @__PURE__ */ new Set()])), i = new Map([...t].map((e) => [e, /* @__PURE__ */ new Set()])), a = Array.isArray(e.edges) ? e.edges : [];
1992
1994
  for (let e of a) {
1993
1995
  if (typeof e != "object" || !e || Array.isArray(e)) continue;
@@ -1995,7 +1997,7 @@ function Xn(e, t) {
1995
1997
  if (typeof a.source != "string" || typeof a.target != "string" || a.sourceHandle != null && typeof a.sourceHandle != "string" || !t.has(a.source) || !t.has(a.target)) continue;
1996
1998
  let o = a.sourceHandle == null ? "$out" : `$branch:${a.sourceHandle}`;
1997
1999
  n.push({
1998
- id: Bn(a.source, o, a.target, "$in"),
2000
+ id: Vn(a.source, o, a.target, "$in"),
1999
2001
  source: a.source,
2000
2002
  sourceHandle: o,
2001
2003
  target: a.target,
@@ -2008,7 +2010,7 @@ function Xn(e, t) {
2008
2010
  edges: n
2009
2011
  };
2010
2012
  }
2011
- function Zn(e, t, n) {
2013
+ function Qn(e, t, n) {
2012
2014
  let r = new Map([...t].map(([e, t]) => [e, t.size])), i = /* @__PURE__ */ new Map(), a = [], o = /* @__PURE__ */ new Set(), s = [...r].filter(([, e]) => e == 0).map(([e]) => e).toSorted();
2013
2015
  for (let e = 0; e < s.length; e += 1) {
2014
2016
  let t = s[e];
@@ -2027,14 +2029,14 @@ function Zn(e, t, n) {
2027
2029
  ordered: a
2028
2030
  };
2029
2031
  }
2030
- function Qn(e, t, n) {
2032
+ function $n(e, t, n) {
2031
2033
  if (!("inputs" in t)) return [];
2032
2034
  let r = [];
2033
2035
  for (let [i, a] of n.inputs) {
2034
2036
  let n = t.inputs[i], o = [], s = /* @__PURE__ */ new Set();
2035
2037
  if (n?.kind == "sources") for (let t of n.sources) {
2036
2038
  if (t.kind != "node") continue;
2037
- let n = t.nodeId, r = t.output, a = Bn(n, r, e, i);
2039
+ let n = t.nodeId, r = t.output, a = Vn(n, r, e, i);
2038
2040
  s.has(a) || (s.add(a), o.push({
2039
2041
  nodeId: n,
2040
2042
  output: r
@@ -2049,10 +2051,10 @@ function Qn(e, t, n) {
2049
2051
  }
2050
2052
  return r;
2051
2053
  }
2052
- function $n(e) {
2054
+ function er(e) {
2053
2055
  return [...e.outputs].map(([e, t]) => Object.assign({ handle: e }, t));
2054
2056
  }
2055
- function er(e, t) {
2057
+ function tr(e, t) {
2056
2058
  if (e.kind != "task" || e.definition == null) return t;
2057
2059
  let n = new Map(t.map((e) => [e.handle, e])), r = [];
2058
2060
  for (let t of e.definition.inputs) {
@@ -2065,7 +2067,7 @@ function er(e, t) {
2065
2067
  }
2066
2068
  return r.push(...n.values()), r;
2067
2069
  }
2068
- function tr(e, t) {
2070
+ function nr(e, t) {
2069
2071
  if (e.kind != "task" || e.definition == null) return t;
2070
2072
  let n = new Map(t.map((e) => [e.handle, e])), r = [];
2071
2073
  for (let t of e.definition.outputs) {
@@ -2078,8 +2080,8 @@ function tr(e, t) {
2078
2080
  }
2079
2081
  return r.push(...n.values()), r;
2080
2082
  }
2081
- function nr(e, t, n, r, i) {
2082
- let a = Yn(e, r), o = a.some((e) => e.code == "trigger.connection-missing" || e.code == "trigger.connection-invalid"), s = t.kind == "integration" || t.kind == "poll" ? i[t.definition.provider] : void 0, c;
2083
+ function rr(e, t, n, r, i) {
2084
+ let a = Xn(e, r), o = a.some((e) => e.code == "trigger.connection-missing" || e.code == "trigger.connection-invalid"), s = t.kind == "integration" || t.kind == "poll" ? i[t.definition.provider] : void 0, c;
2083
2085
  switch (t.kind) {
2084
2086
  case "manual":
2085
2087
  c = {
@@ -2116,27 +2118,27 @@ function nr(e, t, n, r, i) {
2116
2118
  description: t.description,
2117
2119
  diagnostics: a.length,
2118
2120
  connectionRequired: o,
2119
- icon: Jn(t, i),
2121
+ icon: Yn(t, i),
2120
2122
  id: e,
2121
2123
  inputs: [],
2122
2124
  kind: "trigger",
2123
- outputs: Object.entries(he(t)).map(([e, t]) => Object.assign({ handle: e }, t)),
2125
+ outputs: Object.entries(De(t)).map(([e, t]) => Object.assign({ handle: e }, t)),
2124
2126
  presentation: c,
2125
2127
  position: n,
2126
2128
  title: t.name
2127
2129
  };
2128
2130
  }
2129
- function rr(e, t, n, r, i) {
2130
- let a = t.node, o = er(t, Qn(e, a, n)), s = tr(t, $n(n)), c = t.kind == "task" ? t.definition : void 0, l = c != null && "executor" in c && c.executor.kind == "connector" ? c.executor : void 0, u = l == null ? void 0 : i.connectorActions[l.action], d = u == null ? void 0 : i.connectionCatalogs[u.serviceId], f = l?.connectionId, p = f == null ? void 0 : d?.byId.get(f), m = u?.authenticated == 1 && (l?.connectionId == null || d != null && p?.status != "active"), h = i.runNodes.get(e), g = {
2131
+ function ir(e, t, n, r, i) {
2132
+ let a = t.node, o = tr(t, $n(e, a, n)), s = nr(t, er(n)), c = t.kind == "task" ? t.definition : void 0, l = c != null && "executor" in c && c.executor.kind == "connector" ? c.executor : void 0, u = l == null ? void 0 : i.connectorActions[l.action], d = u == null ? void 0 : i.connectionCatalogs[u.serviceId], f = l?.connectionId, p = f == null ? void 0 : d?.byId.get(f), m = u?.authenticated == 1 && (l?.connectionId == null || d != null && p?.status != "active"), h = i.runNodes.get(e), g = {
2131
2133
  description: a.description,
2132
- diagnostics: Wn(i.target, t, i.diagnostics),
2133
- icon: In(t, i.connectorActions),
2134
+ diagnostics: Gn(i.target, t, i.diagnostics),
2135
+ icon: Ln(t, i.connectorActions),
2134
2136
  id: e,
2135
2137
  inputs: o,
2136
2138
  outputs: s,
2137
2139
  position: r,
2138
2140
  ...h == null ? {} : { run: h },
2139
- title: Rn(t, i.t)
2141
+ title: zn(t, i.t)
2140
2142
  };
2141
2143
  switch (a.kind) {
2142
2144
  case "condition": return {
@@ -2145,9 +2147,9 @@ function rr(e, t, n, r, i) {
2145
2147
  cases: a.cases.map((e) => ({
2146
2148
  ...e.description == null ? {} : { description: e.description },
2147
2149
  groups: e.groups.map((e) => ({ expressions: e.expressions.map((e) => ({
2148
- left: Un(e.left, i),
2149
- operator: Hn(e.operator),
2150
- right: e.right == null ? void 0 : Un(e.right, i)
2150
+ left: Wn(e.left, i),
2151
+ operator: Un(e.operator),
2152
+ right: e.right == null ? void 0 : Wn(e.right, i)
2151
2153
  })) })),
2152
2154
  output: e.output
2153
2155
  })),
@@ -2166,13 +2168,13 @@ function rr(e, t, n, r, i) {
2166
2168
  return t == null || "group" in t ? [] : [t];
2167
2169
  }),
2168
2170
  kind: a.kind,
2169
- executorName: Kn(c, u?.serviceName, i.t),
2171
+ executorName: qn(c, u?.serviceName, i.t),
2170
2172
  connectionRequired: m,
2171
2173
  ...c != null && "executor" in c && c.executor.kind == "agent" ? { tools: c.executor.tools.map((e) => {
2172
2174
  let t = i.connectorActions[e.action], n = t?.serviceId ?? e.action.split(".")[0], r = t?.serviceName ?? n;
2173
2175
  return {
2174
2176
  id: e.id,
2175
- icon: j(t ?? {
2177
+ icon: I(t ?? {
2176
2178
  serviceId: n,
2177
2179
  serviceName: r
2178
2180
  }),
@@ -2193,8 +2195,8 @@ function rr(e, t, n, r, i) {
2193
2195
  };
2194
2196
  }
2195
2197
  }
2196
- function ir(e, t, n = {}, r = [], i = {}, a = {}, o, s, c = [], l = {}) {
2197
- let u = e == null ? void 0 : P(e), d = u == null || t == null ? void 0 : u.graph(t);
2198
+ function ar(e, t, n = {}, r = [], i = {}, a = {}, o, s, c = [], l = {}) {
2199
+ let u = e == null ? void 0 : R(e), d = u == null || t == null ? void 0 : u.graph(t);
2198
2200
  if (u == null || t == null || d == null) return {
2199
2201
  edges: [],
2200
2202
  nodes: [],
@@ -2204,7 +2206,7 @@ function ir(e, t, n = {}, r = [], i = {}, a = {}, o, s, c = [], l = {}) {
2204
2206
  zoom: 1
2205
2207
  }
2206
2208
  };
2207
- let f = Gn(u, t, s, c), p = Object.entries(d.nodes), m = new Map(p.map(([e, t]) => [e, u.resolveNode(e, t)])), h = new Set(p.map(([e]) => e)), g = new Map([...m].map(([e, t]) => [e, Vn(t)])), _ = Xn(d, h), v = Zn(h, _.dependencies, _.dependents), y = an(n, t), b = vn(n, t), x = {
2209
+ let f = Kn(u, t, s, c), p = Object.entries(d.nodes), m = new Map(p.map(([e, t]) => [e, u.resolveNode(e, t)])), h = new Set(p.map(([e]) => e)), g = new Map([...m].map(([e, t]) => [e, Hn(t)])), _ = Zn(d, h), v = Qn(h, _.dependencies, _.dependents), y = nn(n, t), b = yn(n, t), x = {
2208
2210
  connectionCatalogs: a,
2209
2211
  connectorActions: i,
2210
2212
  diagnostics: r,
@@ -2224,128 +2226,128 @@ function ir(e, t, n = {}, r = [], i = {}, a = {}, o, s, c = [], l = {}) {
2224
2226
  }, a = m.get(e);
2225
2227
  if (a.kind == "trigger") {
2226
2228
  C.push({
2227
- ...nr(e, a.trigger, i, r, l),
2229
+ ...rr(e, a.trigger, i, r, l),
2228
2230
  contentHidden: b?.[e] === !0
2229
2231
  });
2230
2232
  continue;
2231
2233
  }
2232
- let o = rr(e, a, g.get(e), i, x);
2234
+ let o = ir(e, a, g.get(e), i, x);
2233
2235
  C.push({
2234
2236
  ...o,
2235
2237
  contentHidden: b?.[e] === !0
2236
2238
  });
2237
2239
  }
2238
- for (let [e, r] of Object.entries(cn(n, t, y)).toSorted(([e], [t]) => e.localeCompare(t))) C.push({
2240
+ for (let [e, r] of Object.entries(sn(n, t, y)).toSorted(([e], [t]) => e.localeCompare(t))) C.push({
2239
2241
  ...r,
2240
2242
  id: e,
2241
2243
  kind: "comment",
2242
2244
  contentHidden: b?.[e] === !0
2243
2245
  });
2244
- let w = new Map(Y(n, t).map((e, t) => [e, t]));
2246
+ let w = new Map(rn(n, t).map((e, t) => [e, t]));
2245
2247
  return C.sort((e, t) => (w.get(e.id) ?? -1) - (w.get(t.id) ?? -1)), {
2246
2248
  edges: _.edges,
2247
2249
  nodes: C,
2248
2250
  ...f.status == null ? {} : { runStatus: f.status },
2249
- viewport: sn(n, t)
2251
+ viewport: on(n, t)
2250
2252
  };
2251
2253
  }
2252
2254
  //#endregion
2253
2255
  //#region src/connector/common/actionSchema.ts
2254
- function ar(e, t) {
2255
- let n = or(e);
2256
+ function or(e, t) {
2257
+ let n = sr(e);
2256
2258
  return {
2257
2259
  inputs: n,
2258
2260
  initialInputs: n.flatMap((e) => e.value === void 0 ? [] : [{
2259
2261
  handle: e.handle,
2260
2262
  value: e.value
2261
2263
  }]),
2262
- outputs: sr(t)
2264
+ outputs: cr(t)
2263
2265
  };
2264
2266
  }
2265
- function or(e) {
2266
- let t = V(e);
2267
+ function sr(e) {
2268
+ let t = W(e);
2267
2269
  if (t == null || t.type != "object" && t.properties == null) throw Error("Connector action inputSchema must be an object schema.");
2268
- let n = V(t.properties);
2270
+ let n = W(t.properties);
2269
2271
  if (n == null) return [];
2270
- let r = dr(t.required);
2272
+ let r = fr(t.required);
2271
2273
  return Object.entries(n).map(([e, n]) => {
2272
- let i = !r.has(e) || fr(n, t);
2274
+ let i = !r.has(e) || pr(n, t);
2273
2275
  return {
2274
- description: lr(t, n),
2276
+ description: ur(t, n),
2275
2277
  handle: e,
2276
- json_schema: cr(t, n),
2278
+ json_schema: lr(t, n),
2277
2279
  nullable: i,
2278
- value: ur(t, n, i)
2280
+ value: dr(t, n, i)
2279
2281
  };
2280
2282
  });
2281
2283
  }
2282
- function sr(e) {
2283
- let t = V(e), n = V(t?.properties);
2284
+ function cr(e) {
2285
+ let t = W(e), n = W(t?.properties);
2284
2286
  if (t != null && (t.type == "object" || n != null)) {
2285
2287
  if (n == null) return [];
2286
- let e = dr(t.required);
2288
+ let e = fr(t.required);
2287
2289
  return Object.entries(n).map(([n, r]) => ({
2288
- description: lr(t, r),
2290
+ description: ur(t, r),
2289
2291
  handle: n,
2290
- json_schema: cr(t, r),
2291
- nullable: !e.has(n) || fr(r, t)
2292
+ json_schema: lr(t, r),
2293
+ nullable: !e.has(n) || pr(r, t)
2292
2294
  }));
2293
2295
  }
2294
2296
  return [{
2295
- description: lr(t, e),
2297
+ description: ur(t, e),
2296
2298
  handle: "output",
2297
2299
  json_schema: e,
2298
- nullable: fr(e)
2300
+ nullable: pr(e)
2299
2301
  }];
2300
2302
  }
2301
- function cr(e, t) {
2302
- let n = V(t);
2303
+ function lr(e, t) {
2304
+ let n = W(t);
2303
2305
  if (n == null) return t;
2304
2306
  let r = Object.assign({}, n);
2305
2307
  return r.$defs == null && e.$defs != null && (r.$defs = e.$defs), r.definitions == null && e.definitions != null && (r.definitions = e.definitions), r;
2306
2308
  }
2307
- function lr(e, t) {
2308
- for (let n of pr(e, t)) if (typeof n.description == "string") return n.description;
2309
+ function ur(e, t) {
2310
+ for (let n of mr(e, t)) if (typeof n.description == "string") return n.description;
2309
2311
  }
2310
- function ur(e, t, n) {
2311
- for (let n of pr(e, t)) if (Object.hasOwn(n, "default")) return n.default;
2312
+ function dr(e, t, n) {
2313
+ for (let n of mr(e, t)) if (Object.hasOwn(n, "default")) return n.default;
2312
2314
  return n ? null : void 0;
2313
2315
  }
2314
- function dr(e) {
2316
+ function fr(e) {
2315
2317
  return Array.isArray(e) ? new Set(e.filter((e) => typeof e == "string")) : /* @__PURE__ */ new Set();
2316
2318
  }
2317
- function fr(e, t = e, n = /* @__PURE__ */ new Set()) {
2318
- let r = V(e);
2319
+ function pr(e, t = e, n = /* @__PURE__ */ new Set()) {
2320
+ let r = W(e);
2319
2321
  if (r == null) return !1;
2320
2322
  if (Object.hasOwn(r, "type")) return r.type == "null" || Array.isArray(r.type) && r.type.includes("null");
2321
2323
  if (Object.hasOwn(r, "enum")) return Array.isArray(r.enum) && r.enum.includes(null);
2322
- for (let e of ["anyOf", "oneOf"]) if (Object.hasOwn(r, e)) return Array.isArray(r[e]) && r[e].some((e) => fr(e, t, n));
2324
+ for (let e of ["anyOf", "oneOf"]) if (Object.hasOwn(r, e)) return Array.isArray(r[e]) && r[e].some((e) => pr(e, t, n));
2323
2325
  let i = typeof r.$ref == "string" ? r.$ref : void 0;
2324
2326
  if (i == null || n.has(i)) return !1;
2325
- let a = mr(t, i);
2327
+ let a = hr(t, i);
2326
2328
  if (a === void 0) return !1;
2327
2329
  let o = new Set(n);
2328
- return o.add(i), fr(a, t, o);
2330
+ return o.add(i), pr(a, t, o);
2329
2331
  }
2330
- function pr(e, t) {
2332
+ function mr(e, t) {
2331
2333
  let n = [], r = /* @__PURE__ */ new Set(), i = t;
2332
2334
  for (;;) {
2333
- let t = V(i);
2335
+ let t = W(i);
2334
2336
  if (t == null) return n;
2335
2337
  n.push(t);
2336
2338
  let a = typeof t.$ref == "string" ? t.$ref : void 0;
2337
2339
  if (a == null || r.has(a)) return n;
2338
- let o = mr(e, a);
2340
+ let o = hr(e, a);
2339
2341
  if (o === void 0) return n;
2340
2342
  r.add(a), i = o;
2341
2343
  }
2342
2344
  }
2343
- function mr(e, t) {
2345
+ function hr(e, t) {
2344
2346
  if (t == "#") return e;
2345
2347
  if (!t.startsWith("#/")) return;
2346
2348
  let n = e;
2347
2349
  for (let e of t.slice(2).split("/")) {
2348
- let t = V(n), r = e.replaceAll("~1", "/").replaceAll("~0", "~");
2350
+ let t = W(n), r = e.replaceAll("~1", "/").replaceAll("~0", "~");
2349
2351
  if (t == null || !Object.hasOwn(t, r)) return;
2350
2352
  n = t[r];
2351
2353
  }
@@ -2353,61 +2355,61 @@ function mr(e, t) {
2353
2355
  }
2354
2356
  //#endregion
2355
2357
  //#region src/workbench/browser/runtime/stores/proxyCatalog.ts
2356
- function hr(e, t) {
2357
- let n = Be(e);
2358
- if (n.success === !1) throw new I(502, typeof n.errorCode == "string" ? n.errorCode : "connector.unavailable", typeof n.message == "string" ? n.message : "Connector request failed.");
2358
+ function gr(e, t) {
2359
+ let n = _e(e);
2360
+ if (n.success === !1) throw new P(502, typeof n.errorCode == "string" ? n.errorCode : "connector.unavailable", typeof n.message == "string" ? n.message : "Connector request failed.");
2359
2361
  if (n.success !== !0 || !Array.isArray(n.data)) return L();
2360
- if (t != null) for (let e of n.data) t(Be(e));
2362
+ if (t != null) for (let e of n.data) t(_e(e));
2361
2363
  return n;
2362
2364
  }
2363
- function gr(e) {
2365
+ function _r(e) {
2364
2366
  return !Array.isArray(e.authTypes) || e.authTypes.some((e) => typeof e != "string") ? L() : {
2365
- serviceId: B(e.service),
2366
- serviceName: B(e.displayName),
2367
+ serviceId: M(e.service),
2368
+ serviceName: M(e.displayName),
2367
2369
  noSetup: e.authTypes.length == 1 && e.authTypes[0] == "no_auth",
2368
- ...e.iconUrl == null || e.iconUrl === "" ? {} : { icon: B(e.iconUrl) },
2369
- ...e.homepageUrl == null || e.homepageUrl === "" ? {} : { homepageUrl: B(e.homepageUrl) }
2370
+ ...e.iconUrl == null || e.iconUrl === "" ? {} : { icon: M(e.iconUrl) },
2371
+ ...e.homepageUrl == null || e.homepageUrl === "" ? {} : { homepageUrl: M(e.homepageUrl) }
2370
2372
  };
2371
2373
  }
2372
- function _r(e) {
2373
- if (B(e.id), B(e.service), B(e.name), typeof e.description != "string") return L();
2374
- ar(e.inputSchema, e.outputSchema);
2375
- }
2376
2374
  function vr(e) {
2375
+ if (M(e.id), M(e.service), M(e.name), typeof e.description != "string") return L();
2376
+ or(e.inputSchema, e.outputSchema);
2377
+ }
2378
+ function yr(e) {
2377
2379
  return {
2378
2380
  nullable: e.nullable,
2379
- jsonSchema: Se(e.json_schema),
2381
+ jsonSchema: be(e.json_schema),
2380
2382
  ...e.description == null ? {} : { description: e.description },
2381
- ...e.value === void 0 ? {} : { value: Se(e.value) }
2383
+ ...e.value === void 0 ? {} : { value: be(e.value) }
2382
2384
  };
2383
2385
  }
2384
- function yr(e, t) {
2386
+ function br(e, t) {
2385
2387
  let n = t.data.find((t) => t.service == e.service);
2386
2388
  if (n == null) return L();
2387
- let r = gr(n), i = ar(e.inputSchema, e.outputSchema);
2389
+ let r = _r(n), i = or(e.inputSchema, e.outputSchema);
2388
2390
  return {
2389
2391
  serviceId: r.serviceId,
2390
2392
  serviceName: r.serviceName,
2391
2393
  ...r.icon == null ? {} : { icon: r.icon },
2392
2394
  ...r.homepageUrl == null ? {} : { homepageUrl: r.homepageUrl },
2393
- actionId: B(e.id),
2394
- ...e.operationType == null ? {} : { operationType: B(e.operationType) },
2395
- name: B(e.name),
2395
+ actionId: M(e.id),
2396
+ ...e.operationType == null ? {} : { operationType: M(e.operationType) },
2397
+ name: M(e.name),
2396
2398
  description: e.description,
2397
2399
  authenticated: !n.authTypes.includes("no_auth"),
2398
- inputSchema: Se(e.inputSchema),
2399
- outputSchema: Se(e.outputSchema),
2400
- inputs: Object.fromEntries(i.inputs.map((e) => [e.handle, vr(e)])),
2401
- outputs: Object.fromEntries(i.outputs.map((e) => [e.handle, vr(e)]))
2400
+ inputSchema: be(e.inputSchema),
2401
+ outputSchema: be(e.outputSchema),
2402
+ inputs: Object.fromEntries(i.inputs.map((e) => [e.handle, yr(e)])),
2403
+ outputs: Object.fromEntries(i.outputs.map((e) => [e.handle, yr(e)]))
2402
2404
  };
2403
2405
  }
2404
2406
  //#endregion
2405
2407
  //#region src/workbench/browser/runtime/stores/catalogStores.ts
2406
- function br(e) {
2407
- let t = Be(e);
2408
- return t.version != 1 || !Array.isArray(t.actions) ? L() : t.actions.map(Le);
2408
+ function xr(e) {
2409
+ let t = _e(e);
2410
+ return t.version != 1 || !Array.isArray(t.actions) ? L() : t.actions.map(Ye);
2409
2411
  }
2410
- var xr = (...e) => JSON.stringify(e), Sr = class {
2412
+ var Sr = (...e) => JSON.stringify(e), Cr = class {
2411
2413
  constructor(e, t, n) {
2412
2414
  this.client = e, this.kind = t, this.options = n, this.entries = /* @__PURE__ */ new Map();
2413
2415
  }
@@ -2418,8 +2420,8 @@ var xr = (...e) => JSON.stringify(e), Sr = class {
2418
2420
  ...t == null ? {} : { locale: t }
2419
2421
  }), a = `/v1/connector/proxy/${this.kind}${i.size ? `?${i}` : ""}`, o = this.entries.get(a);
2420
2422
  if (o == null) {
2421
- let e = (e) => hr(e, this.kind == "providers" ? gr : void 0);
2422
- o = new Me((t, n) => this.client.readProxyCatalog({
2423
+ let e = (e) => gr(e, this.kind == "providers" ? _r : void 0);
2424
+ o = new Xe((t, n) => this.client.readProxyCatalog({
2423
2425
  path: a,
2424
2426
  decode: e
2425
2427
  }, t, n), this.kind == "providers" ? 3e5 : 3e4, this.options == null ? void 0 : {
@@ -2440,7 +2442,7 @@ var xr = (...e) => JSON.stringify(e), Sr = class {
2440
2442
  for (let e of this.entries.values()) e.dispose();
2441
2443
  this.entries.clear();
2442
2444
  }
2443
- }, Cr = class {
2445
+ }, wr = class {
2444
2446
  constructor() {
2445
2447
  this.entries = /* @__PURE__ */ new Map();
2446
2448
  }
@@ -2478,13 +2480,13 @@ var xr = (...e) => JSON.stringify(e), Sr = class {
2478
2480
  for (let e of this.entries.values()) e.dispose();
2479
2481
  this.entries.clear();
2480
2482
  }
2481
- }, wr = class {
2482
- #e = new Cr();
2483
+ }, Tr = class {
2484
+ #e = new wr();
2483
2485
  constructor(e, t) {
2484
- this.raw = new Sr(e, "providers", t);
2486
+ this.raw = new Cr(e, "providers", t);
2485
2487
  }
2486
2488
  get(e, t = "en", n = !1) {
2487
- return this.#e.get(xr(e, t), [this.raw.get(e, t, void 0, n)], (e) => e.data.map(gr));
2489
+ return this.#e.get(Sr(e, t), [this.raw.get(e, t, void 0, n)], (e) => e.data.map(_r));
2488
2490
  }
2489
2491
  retryFailed() {
2490
2492
  this.raw.retryFailed();
@@ -2495,7 +2497,7 @@ var xr = (...e) => JSON.stringify(e), Sr = class {
2495
2497
  dispose() {
2496
2498
  this.#e.dispose(), this.raw.dispose();
2497
2499
  }
2498
- }, Tr = class {
2500
+ }, Er = class {
2499
2501
  #e = /* @__PURE__ */ new Map();
2500
2502
  #t = /* @__PURE__ */ new Map();
2501
2503
  constructor(e, t) {
@@ -2504,16 +2506,16 @@ var xr = (...e) => JSON.stringify(e), Sr = class {
2504
2506
  get(t, n, r = !1) {
2505
2507
  let i = this.#e.get(n);
2506
2508
  if (i == null) {
2507
- let e = ee(n);
2508
- i = new Me((t, n) => this.client.readCatalog(e, t, n), 3e4, this.options == null ? void 0 : {
2509
+ let e = Le(n);
2510
+ i = new Xe((t, n) => this.client.readCatalog(e, t, n), 3e4, this.options == null ? void 0 : {
2509
2511
  key: `open-flow:connections:v1:${encodeURIComponent(this.options.namespace)}:${e.path}`,
2510
2512
  storage: () => this.options.sessionStorage ?? window.sessionStorage,
2511
- decode: (e) => Array.isArray(e) ? e.map(Ke) : L()
2513
+ decode: (e) => Array.isArray(e) ? e.map(A) : L()
2512
2514
  }), this.#e.set(n, i);
2513
2515
  }
2514
2516
  let a = i.get(r);
2515
2517
  if (t == null) return a;
2516
- let o = xr(n, t), s = this.#t.get(o);
2518
+ let o = Sr(n, t), s = this.#t.get(o);
2517
2519
  return s ?? (s = e(a, (e) => ({
2518
2520
  ...e,
2519
2521
  data: e.data?.filter((e) => e.serviceId == t)
@@ -2531,20 +2533,20 @@ var xr = (...e) => JSON.stringify(e), Sr = class {
2531
2533
  for (let e of this.#e.values()) e.dispose();
2532
2534
  this.#e.clear();
2533
2535
  }
2534
- }, Er = class {
2536
+ }, Dr = class {
2535
2537
  #e;
2536
- #t = new Cr();
2538
+ #t = new wr();
2537
2539
  #n = /* @__PURE__ */ new Map();
2538
2540
  #r = /* @__PURE__ */ new Set();
2539
2541
  #i = /* @__PURE__ */ new WeakMap();
2540
2542
  constructor(e, t, n) {
2541
- this.client = e, this.providers = t, this.#e = new Sr(e, "actions", n);
2543
+ this.client = e, this.providers = t, this.#e = new Cr(e, "actions", n);
2542
2544
  }
2543
2545
  get(e, t, n = "en", r = !1) {
2544
- return this.#t.get(xr(t, e, n), [this.#e.get(t, n, e, r), this.providers.raw.get(t, n)], (t, n) => t.data.flatMap((t) => {
2546
+ return this.#t.get(Sr(t, e, n), [this.#e.get(t, n, e, r), this.providers.raw.get(t, n)], (t, n) => t.data.flatMap((t) => {
2545
2547
  try {
2546
- let r = Be(t);
2547
- return _r(r), r.service == e ? [yr(r, n)] : L();
2548
+ let r = _e(t);
2549
+ return vr(r), r.service == e ? [br(r, n)] : L();
2548
2550
  } catch (n) {
2549
2551
  return console.warn("Could not load Connector Action.", {
2550
2552
  serviceId: e,
@@ -2555,9 +2557,9 @@ var xr = (...e) => JSON.stringify(e), Sr = class {
2555
2557
  }));
2556
2558
  }
2557
2559
  detail(t, n, r = "en", i = !1) {
2558
- let a = t.split(".")[0], o = this.get(a, n, r, i), s = xr(n, t, r), c = this.#n.get(s);
2560
+ let a = t.split(".")[0], o = this.get(a, n, r, i), s = Sr(n, t, r), c = this.#n.get(s);
2559
2561
  if (c == null) {
2560
- let n = new I(404, "connector.action-not-found", `Connector Action "${t}" was not found.`);
2562
+ let n = new P(404, "connector.action-not-found", `Connector Action "${t}" was not found.`);
2561
2563
  c = e(o, (e) => {
2562
2564
  let r = e.data?.find((e) => e.actionId == t);
2563
2565
  return {
@@ -2585,9 +2587,9 @@ var xr = (...e) => JSON.stringify(e), Sr = class {
2585
2587
  }
2586
2588
  let s = o.get(a);
2587
2589
  if (s != null) return s.refresh(), s;
2588
- let c = new Me((e, t) => this.client.readCatalog({
2590
+ let c = new Xe((e, t) => this.client.readCatalog({
2589
2591
  path: `/v1/connector/action-metadata?${i}`,
2590
- decode: br
2592
+ decode: xr
2591
2593
  }, null, t), 3e4);
2592
2594
  return r.aborted ? c.dispose() : (o.set(a, c), this.#r.add(c)), c;
2593
2595
  }
@@ -2603,9 +2605,9 @@ var xr = (...e) => JSON.stringify(e), Sr = class {
2603
2605
  for (let e of this.#n.values()) e.dispose();
2604
2606
  this.#n.clear(), this.#t.dispose(), this.#e.dispose();
2605
2607
  }
2606
- }, Dr = class {
2608
+ }, Or = class {
2607
2609
  constructor(e, t) {
2608
- this.providers = new wr(e, t), this.actions = new Er(e, this.providers, t), this.connections = new Tr(e, t);
2610
+ this.providers = new Tr(e, t), this.actions = new Dr(e, this.providers, t), this.connections = new Er(e, t);
2609
2611
  }
2610
2612
  dispose() {
2611
2613
  this.actions.dispose(), this.connections.dispose(), this.providers.dispose();
@@ -2613,12 +2615,12 @@ var xr = (...e) => JSON.stringify(e), Sr = class {
2613
2615
  refreshFlow(e) {
2614
2616
  this.actions.refreshFlow(e), this.connections.refreshFlow(e), this.providers.refreshFlow(e);
2615
2617
  }
2616
- }, Or = {
2618
+ }, kr = {
2617
2619
  candidates: {},
2618
2620
  candidateErrors: [],
2619
2621
  loading: !1,
2620
2622
  loadingCandidates: []
2621
- }, kr = class {
2623
+ }, Ar = class {
2622
2624
  #e;
2623
2625
  #t;
2624
2626
  #n;
@@ -2626,12 +2628,12 @@ var xr = (...e) => JSON.stringify(e), Sr = class {
2626
2628
  #i;
2627
2629
  #a;
2628
2630
  constructor(e, t, r = h(), i = () => {}) {
2629
- this.client = e, this.setNotice = t, this.i18n = r, this.onSaved = i, this.#e = n(Or), this.#n = 0, this.#r = !1, this.#i = new AbortController(), this.#a = /* @__PURE__ */ new Map(), this.$ = this.#e;
2631
+ this.client = e, this.setNotice = t, this.i18n = r, this.onSaved = i, this.#e = n(kr), this.#n = 0, this.#r = !1, this.#i = new AbortController(), this.#a = /* @__PURE__ */ new Map(), this.$ = this.#e;
2630
2632
  }
2631
2633
  async load(e) {
2632
2634
  let t = e != null && e == this.#t && this.#e.value.access != null, n = ++this.#n;
2633
- if (this.#t = e, t || (this.#i.abort(), this.#i = new AbortController(), this.#a.clear(), this.#e.set(e == null ? Or : {
2634
- ...Or,
2635
+ if (this.#t = e, t || (this.#i.abort(), this.#i = new AbortController(), this.#a.clear(), this.#e.set(e == null ? kr : {
2636
+ ...kr,
2635
2637
  loading: !0
2636
2638
  })), e != null) try {
2637
2639
  let t = await this.client.getConnectorAccess(e);
@@ -2644,7 +2646,7 @@ var xr = (...e) => JSON.stringify(e), Sr = class {
2644
2646
  });
2645
2647
  }
2646
2648
  } catch (e) {
2647
- !this.#r && n == this.#n && (t || this.#e.set(Or), this.setNotice(O(e, this.i18n.t)));
2649
+ !this.#r && n == this.#n && (t || this.#e.set(kr), this.setNotice(z(e, this.i18n.t)));
2648
2650
  }
2649
2651
  }
2650
2652
  changed(e) {
@@ -2690,7 +2692,7 @@ var xr = (...e) => JSON.stringify(e), Sr = class {
2690
2692
  loadingCandidates: t.loadingCandidates.filter((e) => !a.includes(e))
2691
2693
  });
2692
2694
  let o = e.results.find((e) => "error" in e);
2693
- o != null && "error" in o && this.setNotice(O(new I(502, o.error.code, o.error.message), this.i18n.t));
2695
+ o != null && "error" in o && this.setNotice(z(new P(502, o.error.code, o.error.message), this.i18n.t));
2694
2696
  } catch (e) {
2695
2697
  if (s.aborted) return;
2696
2698
  let t = this.#e.value;
@@ -2698,7 +2700,7 @@ var xr = (...e) => JSON.stringify(e), Sr = class {
2698
2700
  ...t,
2699
2701
  candidateErrors: [...t.candidateErrors, ...a],
2700
2702
  loadingCandidates: t.loadingCandidates.filter((e) => !a.includes(e))
2701
- }), this.setNotice(O(e, this.i18n.t));
2703
+ }), this.setNotice(z(e, this.i18n.t));
2702
2704
  } finally {
2703
2705
  for (let e of a) this.#a.get(e) == o.promise && this.#a.delete(e);
2704
2706
  o.resolve();
@@ -2734,7 +2736,7 @@ var xr = (...e) => JSON.stringify(e), Sr = class {
2734
2736
  ...this.#e.value,
2735
2737
  savingProviderId: void 0,
2736
2738
  pendingSelection: void 0
2737
- }), this.setNotice(O(e, this.i18n.t)), await this.load(r);
2739
+ }), this.setNotice(z(e, this.i18n.t)), await this.load(r);
2738
2740
  }
2739
2741
  return !1;
2740
2742
  }
@@ -2767,21 +2769,21 @@ var xr = (...e) => JSON.stringify(e), Sr = class {
2767
2769
  ...this.#e.value,
2768
2770
  savingProviderId: void 0,
2769
2771
  pendingSelection: void 0
2770
- }), this.setNotice(O(e, this.i18n.t)), await this.load(n), !1);
2772
+ }), this.setNotice(z(e, this.i18n.t)), await this.load(n), !1);
2771
2773
  }
2772
2774
  }
2773
2775
  dispose() {
2774
2776
  this.#r = !0, this.#i.abort(), this.#a.clear(), this.#n += 1, this.#e.dispose();
2775
2777
  }
2776
- }, Ar = {};
2777
- function jr(e) {
2778
+ }, jr = {};
2779
+ function Mr(e) {
2778
2780
  return Object.entries(e).map(([e, t]) => ({
2779
2781
  description: t.description,
2780
2782
  handle: e,
2781
2783
  jsonSchema: t.jsonSchema
2782
2784
  }));
2783
2785
  }
2784
- function Mr(e, t) {
2786
+ function Nr(e, t) {
2785
2787
  return {
2786
2788
  connector: e,
2787
2789
  description: e.authenticated && e.defaultConnection == null ? t("addNode.connectorNeedsConnection", {
@@ -2789,15 +2791,15 @@ function Mr(e, t) {
2789
2791
  service: e.serviceName
2790
2792
  }) : e.description,
2791
2793
  group: t("addNode.connectorActions"),
2792
- icon: j(e),
2794
+ icon: I(e),
2793
2795
  id: `connector:${e.actionId}`,
2794
- inputs: jr(e.inputs),
2796
+ inputs: Mr(e.inputs),
2795
2797
  kind: "connector",
2796
2798
  label: e.name,
2797
- outputs: jr(e.outputs)
2799
+ outputs: Mr(e.outputs)
2798
2800
  };
2799
2801
  }
2800
- function Nr(e, t) {
2802
+ function Pr(e, t) {
2801
2803
  let n = /* @__PURE__ */ new Map();
2802
2804
  for (let t of e) {
2803
2805
  let e = n.get(t.serviceId) ?? [];
@@ -2805,7 +2807,7 @@ function Nr(e, t) {
2805
2807
  }
2806
2808
  return [...n.values()].toSorted((e, t) => e[0].serviceName.localeCompare(t[0].serviceName)).map((e) => {
2807
2809
  let n = e[0], r = e.map((e) => {
2808
- let n = Mr(e, t);
2810
+ let n = Nr(e, t);
2809
2811
  return {
2810
2812
  description: n.description,
2811
2813
  label: n.label,
@@ -2816,7 +2818,7 @@ function Nr(e, t) {
2816
2818
  choices: r,
2817
2819
  description: t(r.length == 1 ? "addNode.connectorActionCountOne" : "addNode.connectorActionCount", { count: r.length }),
2818
2820
  group: t("addNode.connectorActions"),
2819
- icon: j(n),
2821
+ icon: I(n),
2820
2822
  id: `connector-provider:${n.serviceId}`,
2821
2823
  inputs: [],
2822
2824
  kind: "connector-group",
@@ -2826,12 +2828,12 @@ function Nr(e, t) {
2826
2828
  };
2827
2829
  });
2828
2830
  }
2829
- function Pr(e, t) {
2831
+ function Fr(e, t) {
2830
2832
  return {
2831
2833
  choices: [],
2832
2834
  description: t("addNode.connectorBrowseActions"),
2833
2835
  group: t("addNode.connectorActions"),
2834
- icon: j(e),
2836
+ icon: I(e),
2835
2837
  id: `connector-provider:${e.serviceId}`,
2836
2838
  inputs: [],
2837
2839
  kind: "connector-group",
@@ -2841,7 +2843,7 @@ function Pr(e, t) {
2841
2843
  serviceId: e.serviceId
2842
2844
  };
2843
2845
  }
2844
- function Fr(e, t) {
2846
+ function Ir(e, t) {
2845
2847
  if (e == null) return;
2846
2848
  let n = e.kind == "task" && e.node.task == null ? e.node.taskId : void 0;
2847
2849
  if (n == null) return;
@@ -2853,10 +2855,10 @@ function Fr(e, t) {
2853
2855
  taskId: n
2854
2856
  };
2855
2857
  }
2856
- function Ir(e, t, n) {
2858
+ function Lr(e, t, n) {
2857
2859
  if (e == null) return [];
2858
2860
  let r = [];
2859
- for (let i of [...qe(e.revision.content).tasks].toSorted()) {
2861
+ for (let i of [...Je(e.revision.content).tasks].toSorted()) {
2860
2862
  let a = e.task(i);
2861
2863
  if (a?.executor.kind != "connector") continue;
2862
2864
  let o = t[a.executor.action];
@@ -2873,7 +2875,7 @@ function Ir(e, t, n) {
2873
2875
  }
2874
2876
  return r;
2875
2877
  }
2876
- var Lr = class {
2878
+ var Rr = class {
2877
2879
  #e;
2878
2880
  #t;
2879
2881
  #n;
@@ -2892,25 +2894,25 @@ var Lr = class {
2892
2894
  #h;
2893
2895
  #g;
2894
2896
  constructor(r, i, a, o, s = h(), c = i.catalogs) {
2895
- this.data = c, this.#i = /* @__PURE__ */ new Set(), this.#a = new D(), this.#o = new D(), this.#d = n(Ar), this.#f = n([]), this.#p = n([]), this.#g = !1, this.loadConnections = async (e) => {
2897
+ this.data = c, this.#i = /* @__PURE__ */ new Set(), this.#a = new j(), this.#o = new j(), this.#d = n(jr), this.#f = n([]), this.#p = n([]), this.#g = !1, this.loadConnections = async (e) => {
2896
2898
  let t = this.#m.$.flowId.value;
2897
- this.#g || t == null || await A(this.data.connections.get(void 0), e);
2899
+ this.#g || t == null || await F(this.data.connections.get(void 0), e);
2898
2900
  }, this.browseAddNodeOptions = (e) => {
2899
2901
  let t = this.data.providers.get(void 0, this.#n);
2900
- return M(e, (e) => {
2902
+ return ye(e, (e) => {
2901
2903
  let n = e(t), r = e(this.#t.t$);
2902
2904
  return {
2903
2905
  ...n,
2904
- data: n.data?.toSorted((e, t) => e.serviceName.localeCompare(t.serviceName)).map((e) => Pr(e, r))
2906
+ data: n.data?.toSorted((e, t) => e.serviceName.localeCompare(t.serviceName)).map((e) => Fr(e, r))
2905
2907
  };
2906
2908
  });
2907
2909
  }, this.provideAddNodeOptionChoices = (e, t) => {
2908
2910
  let n = e.slice(19), r = this.data.actions.get(n, void 0, this.#n), i = this.data.providers.get(void 0, this.#n);
2909
- return M(t, (e) => {
2911
+ return ye(t, (e) => {
2910
2912
  let t = e(r), a = e(i).data?.find((e) => e.serviceId == n), o = e(this.#t.t$);
2911
2913
  return {
2912
2914
  ...t,
2913
- data: t.data?.map((e) => Mr(yn({
2915
+ data: t.data?.map((e) => Nr(N({
2914
2916
  ...e,
2915
2917
  ...a == null ? {} : {
2916
2918
  serviceName: a.serviceName,
@@ -2921,17 +2923,17 @@ var Lr = class {
2921
2923
  });
2922
2924
  }, this.provideAddNodeOptions = (e, t, n = t) => {
2923
2925
  let r = e.trim();
2924
- if (r.length == 0) return M(t, (e) => ({
2925
- data: Nr(Object.values(e(this.$.actions)), e(this.#t.t$)),
2926
+ if (r.length == 0) return ye(t, (e) => ({
2927
+ data: Pr(Object.values(e(this.$.actions)), e(this.#t.t$)),
2926
2928
  refreshing: !1,
2927
2929
  error: void 0
2928
2930
  }));
2929
2931
  let i = this.data.actions.search(r, void 0, this.#n, n).get();
2930
- return M(t, (e) => {
2932
+ return ye(t, (e) => {
2931
2933
  let t = e(i), n = e(this.#t.t$);
2932
2934
  return {
2933
2935
  ...t,
2934
- data: t.data?.map((e) => Mr(yn(e, void 0), n))
2936
+ data: t.data?.map((e) => Nr(N(e, void 0), n))
2935
2937
  };
2936
2938
  });
2937
2939
  }, this.retryCatalog = () => {
@@ -2940,42 +2942,42 @@ var Lr = class {
2940
2942
  let l = t((e) => {
2941
2943
  let t = e(i.$.flowId);
2942
2944
  return Object.fromEntries(e(this.#f).flatMap((n) => {
2943
- let r = e(R(this.data.actions.detail(n, t, this.#n)));
2944
- return r == null ? [] : [[n, yn(r, e(R(this.data.connections.get(r.serviceId, t))))]];
2945
+ let r = e(B(this.data.actions.detail(n, t, this.#n)));
2946
+ return r == null ? [] : [[n, N(r, e(B(this.data.connections.get(r.serviceId, t))))]];
2945
2947
  }));
2946
2948
  }), u = t((e) => {
2947
2949
  let t = e(i.$.flowId);
2948
2950
  return Object.fromEntries(e(this.#p).flatMap((n) => {
2949
- let r = e(R(this.data.connections.get(n, t)));
2950
- return r == null ? [] : [[n, $(r)]];
2951
+ let r = e(B(this.data.connections.get(n, t)));
2952
+ return r == null ? [] : [[n, je(r)]];
2951
2953
  }));
2952
2954
  });
2953
2955
  this.#l = t((e) => {
2954
- let t = Fr(e(i.$.selection), e(i.$.revision)), n = e(this.#d);
2956
+ let t = Ir(e(i.$.selection), e(i.$.revision)), n = e(this.#d);
2955
2957
  if (t == null) return { authorizationPending: !1 };
2956
2958
  let r = e(l)[t.actionId], a = r == null ? void 0 : e(u)[r.serviceId], o = e(this.data.actions.detail(t.actionId, e(i.$.flowId), this.#n)).error, s = r == null ? void 0 : e(this.data.connections.get(r.serviceId, e(i.$.flowId))).error, c = t.connectionId == null ? void 0 : a?.byId.get(t.connectionId);
2957
2959
  return {
2958
2960
  action: r,
2959
2961
  actionError: o == null ? void 0 : {
2960
- ...o instanceof I ? { code: o.code } : {},
2961
- message: O(o, this.#t.t).message
2962
+ ...o instanceof P ? { code: o.code } : {},
2963
+ message: z(o, this.#t.t).message
2962
2964
  },
2963
2965
  activeConnections: a?.active,
2964
2966
  authorizationPending: r != null && n.authorizationServiceId == r.serviceId,
2965
2967
  connection: c,
2966
- connectionError: s == null ? void 0 : O(s, this.#t.t).message
2968
+ connectionError: s == null ? void 0 : z(s, this.#t.t).message
2967
2969
  };
2968
2970
  }), this.$ = {
2969
- pickerConnections: t((e) => e(i.$.flowId) == null ? [] : e(R(this.data.connections.get(void 0))) ?? []),
2971
+ pickerConnections: t((e) => e(i.$.flowId) == null ? [] : e(B(this.data.connections.get(void 0))) ?? []),
2970
2972
  connections: t((e) => {
2971
2973
  let t = e(i.$.flowId);
2972
- return t == null ? [] : e(R(this.data.connections.get(void 0, t))) ?? [];
2974
+ return t == null ? [] : e(B(this.data.connections.get(void 0, t))) ?? [];
2973
2975
  }),
2974
2976
  actionLoading: e(this.#d, (e) => e.actionLoading),
2975
2977
  actions: l,
2976
2978
  catalogs: u,
2977
2979
  connectionLoading: e(this.#d, (e) => e.connectionLoading),
2978
- diagnostics: t((e) => Ir(e(i.$.revision), e(l), e(u))),
2980
+ diagnostics: t((e) => Lr(e(i.$.revision), e(l), e(u))),
2979
2981
  selectedAction: e(this.#l, (e) => e.action),
2980
2982
  selectedActionError: e(this.#l, (e) => e.actionError),
2981
2983
  selectedActiveConnections: e(this.#l, (e) => e.activeConnections),
@@ -2993,21 +2995,21 @@ var Lr = class {
2993
2995
  e == this.#n || this.#g || (this.#n = e, this.reset(), this.#C());
2994
2996
  }
2995
2997
  reset() {
2996
- this.#g || (this.#a.invalidate(), this.#o.invalidate(), this.#h = void 0, this.#i.clear(), this.#d.set(Ar), this.#f.set([]), this.#p.set([]));
2998
+ this.#g || (this.#a.invalidate(), this.#o.invalidate(), this.#h = void 0, this.#i.clear(), this.#d.set(jr), this.#f.set([]), this.#p.set([]));
2997
2999
  }
2998
3000
  async resolveAction(e) {
2999
3001
  let t = this.#m.$.flowId.value;
3000
3002
  if (t == null || this.#g) throw Error("Connector Action cannot be resolved without an active Flow.");
3001
3003
  await Promise.resolve();
3002
- let n = await A(this.data.actions.detail(e, t, this.#n), void 0, !0), r = n.authenticated ? await A(this.data.connections.get(n.serviceId, t), void 0, !0) : [];
3004
+ let n = await F(this.data.actions.detail(e, t, this.#n), void 0, !0), r = n.authenticated ? await F(this.data.connections.get(n.serviceId, t), void 0, !0) : [];
3003
3005
  return this.#b(this.#f, [e]), n.authenticated && this.#b(this.#p, [n.serviceId]), {
3004
- action: yn(n, r),
3005
- connections: $(r).active
3006
+ action: N(n, r),
3007
+ connections: je(r).active
3006
3008
  };
3007
3009
  }
3008
3010
  async refresh(e = !1) {
3009
3011
  if (this.#g) return;
3010
- let t = this.#o.begin(), n = this.#m.$.flowId.value, r = Fr(this.#m.$.selection.value, this.#m.$.revision.value);
3012
+ let t = this.#o.begin(), n = this.#m.$.flowId.value, r = Ir(this.#m.$.selection.value, this.#m.$.revision.value);
3011
3013
  if (n == null || r == null) {
3012
3014
  (this.#d.value.actionLoading != null || this.#d.value.connectionLoading != null) && this.#x({
3013
3015
  actionLoading: void 0,
@@ -3024,13 +3026,13 @@ var Lr = class {
3024
3026
  });
3025
3027
  try {
3026
3028
  await Promise.resolve();
3027
- let a = await A(i, void 0, e);
3029
+ let a = await F(i, void 0, e);
3028
3030
  if (!this.#S(t, n)) return;
3029
3031
  this.#b(this.#f, [a.actionId]), a.authenticated && await this.#_(n, r, a.serviceId, e, t);
3030
3032
  } catch (e) {
3031
3033
  this.#S(t, n) && this.#x({ actionError: {
3032
3034
  actionId: r.actionId,
3033
- message: O(e, this.#t.t).message
3035
+ message: z(e, this.#t.t).message
3034
3036
  } });
3035
3037
  } finally {
3036
3038
  this.#S(t, n) && this.#d.value.actionLoading == r.actionId && this.#x({ actionLoading: void 0 });
@@ -3038,11 +3040,11 @@ var Lr = class {
3038
3040
  }
3039
3041
  async loadCodeConnections(e, t) {
3040
3042
  let n = this.#m.$.flowId.value;
3041
- n == null || this.#g || (await A(this.data.connections.get(e, n), t), !(t.aborted || this.#g || n != this.#m.$.flowId.value) && this.#b(this.#p, [e]));
3043
+ n == null || this.#g || (await F(this.data.connections.get(e, n), t), !(t.aborted || this.#g || n != this.#m.$.flowId.value) && this.#b(this.#p, [e]));
3042
3044
  }
3043
3045
  async loadCodeAction(e, t) {
3044
3046
  let n = this.#n, r = this.#m.$.flowId.value;
3045
- r == null || this.#g || (await A(this.data.actions.detail(e, r, n), t), !(t.aborted || this.#g || n != this.#n || r != this.#m.$.flowId.value) && this.#b(this.#f, [e]));
3047
+ r == null || this.#g || (await F(this.data.actions.detail(e, r, n), t), !(t.aborted || this.#g || n != this.#n || r != this.#m.$.flowId.value) && this.#b(this.#f, [e]));
3046
3048
  }
3047
3049
  async connect(e) {
3048
3050
  if (this.#g) return;
@@ -3063,7 +3065,7 @@ var Lr = class {
3063
3065
  serviceId: e
3064
3066
  }, this.#x({ authorizationServiceId: e });
3065
3067
  } catch (e) {
3066
- this.#g || this.#u(O(e, this.#t.t));
3068
+ this.#g || this.#u(z(e, this.#t.t));
3067
3069
  }
3068
3070
  }
3069
3071
  async setConnection(e, t) {
@@ -3089,16 +3091,16 @@ var Lr = class {
3089
3091
  let i;
3090
3092
  try {
3091
3093
  let r = this.data.connections.get(t, e, n);
3092
- await Promise.resolve(), i = await A(r, void 0, n);
3094
+ await Promise.resolve(), i = await F(r, void 0, n);
3093
3095
  } catch (n) {
3094
3096
  this.#S(r, e) && this.#x({ connectionError: {
3095
- message: O(n, this.#t.t).message,
3097
+ message: z(n, this.#t.t).message,
3096
3098
  serviceId: t
3097
3099
  } });
3098
3100
  return;
3099
3101
  }
3100
3102
  if (!this.#S(r, e)) return;
3101
- let a = $(i);
3103
+ let a = je(i);
3102
3104
  return this.#b(this.#p, [t]), a;
3103
3105
  }
3104
3106
  async #y(e, t, n) {
@@ -3126,7 +3128,7 @@ var Lr = class {
3126
3128
  if (r.length > 0) {
3127
3129
  for (let e of r) this.#i.add(e);
3128
3130
  try {
3129
- let n = await Promise.all(r.map((e) => A(this.data.actions.detail(e, t, this.#n))));
3131
+ let n = await Promise.all(r.map((e) => F(this.data.actions.detail(e, t, this.#n))));
3130
3132
  if (!this.#S(e, t)) return;
3131
3133
  this.#b(this.#f, n.map((e) => e.actionId));
3132
3134
  } catch {
@@ -3137,7 +3139,7 @@ var Lr = class {
3137
3139
  }
3138
3140
  if (!this.#S(e, t)) return;
3139
3141
  let i = /* @__PURE__ */ new Set();
3140
- for (let e of qe(n.revision.content).tasks) {
3142
+ for (let e of Je(n.revision.content).tasks) {
3141
3143
  let t = n.task(e);
3142
3144
  if (t?.executor.kind != "connector") continue;
3143
3145
  let r = this.$.actions.value[t.executor.action];
@@ -3148,14 +3150,14 @@ var Lr = class {
3148
3150
  };
3149
3151
  //#endregion
3150
3152
  //#region src/workbench/browser/runtime/stores/triggerCatalog.ts
3151
- function Rr(e, t) {
3152
- let n = `open-flow:trigger-catalog:v3:${encodeURIComponent(e)}:`;
3153
+ function zr(e, t) {
3154
+ let n = `open-flow:trigger-catalog:v4:${encodeURIComponent(e)}:`;
3153
3155
  return {
3154
3156
  getItem: (e) => (t ?? window.localStorage).getItem(n + e),
3155
3157
  setItem: (e, r) => (t ?? window.localStorage).setItem(n + e, r)
3156
3158
  };
3157
3159
  }
3158
- var zr = class {
3160
+ var Br = class {
3159
3161
  #e;
3160
3162
  #t;
3161
3163
  constructor(e, r, i) {
@@ -3167,16 +3169,16 @@ var zr = class {
3167
3169
  let t = this.#t.get(e);
3168
3170
  if (t == null) {
3169
3171
  let n = (t) => {
3170
- let n = k(t);
3172
+ let n = ht(t);
3171
3173
  if (n.locale != e) throw Error("Unexpected Trigger catalog language.");
3172
3174
  return n;
3173
3175
  }, r = this.host.triggerCatalogCache;
3174
- t = new Me((t, r) => this.client.readCatalog({
3176
+ t = new Xe((t, r) => this.client.readCatalog({
3175
3177
  path: `/v1/trigger-keys/catalog?locale=${encodeURIComponent(e)}`,
3176
3178
  decode: n
3177
3179
  }, t, r), 3e5, r == null ? void 0 : {
3178
3180
  key: e,
3179
- storage: () => Rr(r.namespace, r.storage),
3181
+ storage: () => zr(r.namespace, r.storage),
3180
3182
  decode: n
3181
3183
  }), this.#t.set(e, t);
3182
3184
  }
@@ -3196,27 +3198,25 @@ var zr = class {
3196
3198
  for (let e of this.#t.values()) e.dispose();
3197
3199
  this.#t.clear();
3198
3200
  }
3199
- }, Br = {}, Vr = "trigger:";
3200
- function Hr(e, t) {
3201
+ }, Vr = {}, Hr = "trigger:";
3202
+ function Ur(e) {
3201
3203
  if (e?.kind != "trigger") return;
3202
- let n = e.trigger;
3203
- if (n.kind != "poll" && n.kind != "integration") return;
3204
- let r = t.$.revision.value?.binding(n.bindingId);
3205
- return {
3206
- ...r?.kind == "connection" ? { connectionId: r.target } : {},
3207
- provider: n.definition.provider,
3204
+ let t = e.trigger;
3205
+ if (t.kind == "poll" || t.kind == "integration") return {
3206
+ ...t.connectionId == null ? {} : { connectionId: t.connectionId },
3207
+ provider: t.definition.provider,
3208
3208
  triggerId: e.id
3209
3209
  };
3210
3210
  }
3211
- function Ur(e, t, n) {
3211
+ function Wr(e, t, n) {
3212
3212
  return {
3213
3213
  description: n?.description ?? e.description,
3214
3214
  group: t.t("addNode.integrationTriggers"),
3215
- icon: j({
3215
+ icon: I({
3216
3216
  serviceId: e.provider,
3217
3217
  serviceName: e.provider
3218
3218
  }),
3219
- id: `${Vr}${e.key}`,
3219
+ id: `${Hr}${e.key}`,
3220
3220
  inputs: [],
3221
3221
  kind: "trigger",
3222
3222
  label: n?.displayName ?? e.displayName,
@@ -3233,7 +3233,7 @@ function Ur(e, t, n) {
3233
3233
  }
3234
3234
  };
3235
3235
  }
3236
- var Wr = class {
3236
+ var Gr = class {
3237
3237
  #e;
3238
3238
  #t;
3239
3239
  #n;
@@ -3245,17 +3245,17 @@ var Wr = class {
3245
3245
  #c;
3246
3246
  #l;
3247
3247
  constructor(r, i, a, o, s = h()) {
3248
- this.#r = new D(), this.#i = /* @__PURE__ */ new Set(), this.#s = n(Br), this.#l = !1, this.browseAddNodeOptions = (e) => this.#u("", e), this.provideAddNodeOptions = (e, t) => this.#u(e, t), this.catalog = new zr(r, xt([s.lang]), o), this.#e = r, this.#t = o, this.#n = s, this.#o = a, this.#c = i, this.#a = t((e) => {
3249
- let t = e(i.$.selection), n = Hr(t, i), r = e(this.#s);
3248
+ this.#r = new j(), this.#i = /* @__PURE__ */ new Set(), this.#s = n(Vr), this.#l = !1, this.browseAddNodeOptions = (e) => this.#u("", e), this.provideAddNodeOptions = (e, t) => this.#u(e, t), this.catalog = new Br(r, yt([s.lang]), o), this.#e = r, this.#t = o, this.#n = s, this.#o = a, this.#c = i, this.#a = t((e) => {
3249
+ let t = e(i.$.selection), n = Ur(t), r = e(this.#s);
3250
3250
  if (t?.kind != "trigger") return { authorizationPending: !1 };
3251
3251
  let a = t.trigger;
3252
3252
  if (a.kind != "poll" && a.kind != "integration") return { authorizationPending: !1 };
3253
- let o = n == null ? void 0 : e(i.catalogs.connections.get(n.provider, e(i.$.flowId))).data, s = o == null ? void 0 : $(o), c = n == null ? void 0 : e(i.catalogs.connections.get(n.provider, e(i.$.flowId))).error;
3253
+ let o = n == null ? void 0 : e(i.catalogs.connections.get(n.provider, e(i.$.flowId))).data, s = o == null ? void 0 : je(o), c = n == null ? void 0 : e(i.catalogs.connections.get(n.provider, e(i.$.flowId))).error;
3254
3254
  return {
3255
3255
  activeConnections: s?.active,
3256
3256
  authorizationPending: r.authorizationProvider == n?.provider,
3257
3257
  connection: n?.connectionId == null ? void 0 : s?.byId.get(n.connectionId),
3258
- connectionError: c == null ? void 0 : O(c, this.#n.t).message,
3258
+ connectionError: c == null ? void 0 : z(c, this.#n.t).message,
3259
3259
  definition: a.definition
3260
3260
  };
3261
3261
  }), this.$ = {
@@ -3273,11 +3273,11 @@ var Wr = class {
3273
3273
  this.#a.dispose(), this.#s.dispose();
3274
3274
  }
3275
3275
  reset() {
3276
- this.#l || (this.#i.clear(), this.#r.invalidate(), this.#s.set(Br));
3276
+ this.#l || (this.#i.clear(), this.#r.invalidate(), this.#s.set(Vr));
3277
3277
  }
3278
3278
  #u(e, t) {
3279
3279
  let n = this.catalog.get(), r = e.trim().toLowerCase();
3280
- return M(t, (e) => {
3280
+ return ye(t, (e) => {
3281
3281
  let t = e(n);
3282
3282
  e(this.#n.t$);
3283
3283
  let i = e(this.#c.$.flowId) != null && e(this.#c.$.target)?.kind == "flow", a = t.data, o = a?.definitions.filter((e) => !r || [
@@ -3292,13 +3292,13 @@ var Wr = class {
3292
3292
  ].some((e) => e?.toLowerCase().includes(r)));
3293
3293
  return {
3294
3294
  ...t,
3295
- data: i ? o?.map((e) => Ur(e, this.#n, a.display[e.key])) : []
3295
+ data: i ? o?.map((e) => Wr(e, this.#n, a.display[e.key])) : []
3296
3296
  };
3297
3297
  });
3298
3298
  }
3299
3299
  async refresh(e = !1) {
3300
3300
  if (this.#l) return;
3301
- let t = this.#r.begin(), n = this.#c.$.flowId.value, r = Hr(this.#c.$.selection.value, this.#c);
3301
+ let t = this.#r.begin(), n = this.#c.$.flowId.value, r = Ur(this.#c.$.selection.value);
3302
3302
  if (n == null || r == null) {
3303
3303
  this.#s.value.connectionLoading != null && this.#d({ connectionLoading: void 0 });
3304
3304
  return;
@@ -3309,11 +3309,11 @@ var Wr = class {
3309
3309
  });
3310
3310
  try {
3311
3311
  let i = this.#c.catalogs.connections.get(r.provider, n, e || this.#i.has(r.provider));
3312
- if (await Promise.resolve(), await A(i, void 0, e || this.#i.has(r.provider)), !this.#f(t, n)) return;
3312
+ if (await Promise.resolve(), await F(i, void 0, e || this.#i.has(r.provider)), !this.#f(t, n)) return;
3313
3313
  this.#i.delete(r.provider);
3314
3314
  } catch (e) {
3315
3315
  this.#f(t, n) && this.#d({ connectionError: {
3316
- message: O(e, this.#n.t).message,
3316
+ message: z(e, this.#n.t).message,
3317
3317
  provider: r.provider
3318
3318
  } });
3319
3319
  } finally {
@@ -3332,7 +3332,7 @@ var Wr = class {
3332
3332
  }
3333
3333
  !this.#l && t == this.#c.$.flowId.value && this.#d({ authorizationProvider: e });
3334
3334
  } catch (e) {
3335
- this.#l || this.#o(O(e, this.#n.t));
3335
+ this.#l || this.#o(z(e, this.#n.t));
3336
3336
  }
3337
3337
  }
3338
3338
  async setConnection(e, t) {
@@ -3341,7 +3341,7 @@ var Wr = class {
3341
3341
  async refreshAfterAuthorization() {
3342
3342
  if (this.#l) return;
3343
3343
  let e = this.#s.value.authorizationProvider;
3344
- e != null && (this.#i.add(e), this.#d({ authorizationProvider: void 0 }), Hr(this.#c.$.selection.value, this.#c)?.provider == e && await this.refresh(!0));
3344
+ e != null && (this.#i.add(e), this.#d({ authorizationProvider: void 0 }), Ur(this.#c.$.selection.value)?.provider == e && await this.refresh(!0));
3345
3345
  }
3346
3346
  #d(e) {
3347
3347
  this.#l || this.#s.set({
@@ -3355,10 +3355,10 @@ var Wr = class {
3355
3355
  };
3356
3356
  //#endregion
3357
3357
  //#region src/flow/common/inverseChanges.ts
3358
- function Gr(e, t) {
3358
+ function Kr(e, t) {
3359
3359
  let n = e, r = [];
3360
3360
  for (let e of t) {
3361
- let t = _t(n, [e]), i = [];
3361
+ let t = de(n, [e]), i = [];
3362
3362
  switch (e.kind) {
3363
3363
  case "graph.node.create":
3364
3364
  i.push({
@@ -3613,11 +3613,11 @@ function Gr(e, t) {
3613
3613
  }
3614
3614
  //#endregion
3615
3615
  //#region src/workbench/browser/runtime/editor/nodeClipboard.ts
3616
- function Kr(e, t, n) {
3616
+ function qr(e, t, n) {
3617
3617
  let r = e.graph(t)?.nodes ?? {}, i = Object.fromEntries(n.flatMap((e) => r[e] == null ? [] : [[e, r[e]]]));
3618
3618
  return {
3619
3619
  edges: (e.graph(t)?.edges ?? []).filter((e) => i[e.source] != null && i[e.target] != null),
3620
- bindings: Object.fromEntries(Object.values(i).flatMap((t) => "inputs" in t ? Object.values(tt(t)).flatMap((t) => t.kind == "sources" ? t.sources.flatMap((t) => {
3620
+ bindings: Object.fromEntries(Object.values(i).flatMap((t) => "inputs" in t ? Object.values(T(t)).flatMap((t) => t.kind == "sources" ? t.sources.flatMap((t) => {
3621
3621
  if (t.kind != "binding") return [];
3622
3622
  let n = e.binding(t.bindingId);
3623
3623
  return n?.kind == "variable" ? [[t.bindingId, n]] : [];
@@ -3630,7 +3630,7 @@ function Kr(e, t, n) {
3630
3630
  nodes: i
3631
3631
  };
3632
3632
  }
3633
- function qr(e, t, n, r) {
3633
+ function Jr(e, t, n, r) {
3634
3634
  if (e.graph(t) == null) return {
3635
3635
  changes: [],
3636
3636
  nodeIds: [],
@@ -3639,7 +3639,7 @@ function qr(e, t, n, r) {
3639
3639
  let i = Object.values(e.graph(t)?.nodes ?? {}).some((e) => e.kind === "manual"), a = Object.entries(n.nodes).filter(([, e]) => (t.kind == "flow" || "inputs" in e) && (e.kind !== "manual" || !i) && (e.kind != "task" || e.task == null || n.modules[e.task.moduleId] != null)), o = a.map(([e]) => e), s = new Map(o.map((e) => [e, r()])), c = [], l = /* @__PURE__ */ new Map();
3640
3640
  for (let [, e] of a) {
3641
3641
  if (!("inputs" in e)) continue;
3642
- let t = Object.values(tt(e));
3642
+ let t = Object.values(T(e));
3643
3643
  for (let e of t) if (e.kind == "sources") for (let t of e.sources) t.kind != "binding" || n.bindings[t.bindingId]?.kind != "variable" || l.has(t.bindingId) || l.set(t.bindingId, r());
3644
3644
  }
3645
3645
  for (let [e, t] of l) {
@@ -3650,33 +3650,18 @@ function qr(e, t, n, r) {
3650
3650
  kind: "binding.create"
3651
3651
  });
3652
3652
  }
3653
- for (let [i, o] of a) {
3654
- let a = s.get(i);
3655
- if (!("inputs" in o)) {
3656
- if (o.kind == "poll" || o.kind == "integration") {
3657
- let n = e.binding(o.bindingId), i = r();
3658
- n != null && c.push({
3659
- binding: n,
3660
- bindingId: i,
3661
- kind: "binding.create"
3662
- }), c.push({
3663
- kind: "graph.node.create",
3664
- node: {
3665
- ...o,
3666
- bindingId: i
3667
- },
3668
- nodeId: a,
3669
- target: t
3670
- });
3671
- } else c.push({
3653
+ for (let [e, r] of a) {
3654
+ let i = s.get(e);
3655
+ if (!("inputs" in r)) {
3656
+ c.push({
3672
3657
  kind: "graph.node.create",
3673
- node: o,
3674
- nodeId: a,
3658
+ node: r,
3659
+ nodeId: i,
3675
3660
  target: t
3676
3661
  });
3677
3662
  continue;
3678
3663
  }
3679
- let u = ((e) => {
3664
+ let a = ((e) => {
3680
3665
  let t = {};
3681
3666
  for (let [n, r] of Object.entries(e)) {
3682
3667
  if (r.kind != "sources") {
@@ -3709,18 +3694,18 @@ function qr(e, t, n, r) {
3709
3694
  });
3710
3695
  }
3711
3696
  return t;
3712
- })(o.inputs), d = {
3713
- ...o,
3714
- inputs: u
3697
+ })(r.inputs), o = {
3698
+ ...r,
3699
+ inputs: a
3715
3700
  };
3716
- if (o.kind == "condition" && (d = et(o, (e) => e.kind == "node" ? {
3701
+ if (r.kind == "condition" && (o = w(r, (e) => e.kind == "node" ? {
3717
3702
  ...e,
3718
3703
  nodeId: s.get(e.nodeId) ?? e.nodeId
3719
3704
  } : e.kind == "binding" ? {
3720
3705
  ...e,
3721
3706
  bindingId: l.get(e.bindingId) ?? e.bindingId
3722
- } : e)), o.kind == "task" && o.task != null) {
3723
- let e = a, t = n.modules[o.task.moduleId];
3707
+ } : e)), r.kind == "task" && r.task != null) {
3708
+ let e = i, t = n.modules[r.task.moduleId];
3724
3709
  c.push({
3725
3710
  kind: "module.create",
3726
3711
  module: {
@@ -3728,21 +3713,21 @@ function qr(e, t, n, r) {
3728
3713
  name: `${t.name} copy`
3729
3714
  },
3730
3715
  moduleId: e
3731
- }), d = {
3732
- ...o,
3733
- inputs: u,
3734
- ...o.name == null ? {} : { name: o.name },
3716
+ }), o = {
3717
+ ...r,
3718
+ inputs: a,
3719
+ ...r.name == null ? {} : { name: r.name },
3735
3720
  task: {
3736
- ...o.task,
3721
+ ...r.task,
3737
3722
  moduleId: e,
3738
- name: `${o.task.name} copy`
3723
+ name: `${r.task.name} copy`
3739
3724
  }
3740
3725
  };
3741
3726
  }
3742
3727
  c.push({
3743
3728
  kind: "graph.node.create",
3744
- node: d,
3745
- nodeId: a,
3729
+ node: o,
3730
+ nodeId: i,
3746
3731
  target: t
3747
3732
  });
3748
3733
  }
@@ -3759,14 +3744,14 @@ function qr(e, t, n, r) {
3759
3744
  });
3760
3745
  }
3761
3746
  return {
3762
- changes: ze(e, t, c),
3747
+ changes: et(e, t, c),
3763
3748
  nodeIds: [...s.values()],
3764
3749
  sourceIds: o
3765
3750
  };
3766
3751
  }
3767
3752
  //#endregion
3768
3753
  //#region src/workbench/browser/runtime/stores/canvasHistory.ts
3769
- var Jr = class {
3754
+ var Yr = class {
3770
3755
  constructor() {
3771
3756
  this.state$ = n({
3772
3757
  canUndo: !1,
@@ -3783,6 +3768,29 @@ var Jr = class {
3783
3768
  let e = this.#e.length + this.#t.length > 0;
3784
3769
  return this.generation++, this.#e.length = 0, this.#t.length = 0, this.publish(), e;
3785
3770
  }
3771
+ discardRedo() {
3772
+ this.#t.length != 0 && (this.#t.length = 0, this.publish());
3773
+ }
3774
+ rebaseModuleCreation(e, t) {
3775
+ for (let [n, r] of this.#e.entries()) {
3776
+ if (!r.forward.some((t) => t.kind == "module.create" && t.moduleId == e)) continue;
3777
+ let i = [...r.forward];
3778
+ for (let [n, r] of i.entries()) r.kind == "module.create" && r.moduleId == e && (i[n] = {
3779
+ ...r,
3780
+ module: {
3781
+ ...r.module,
3782
+ imports: t.imports,
3783
+ source: t.source
3784
+ }
3785
+ });
3786
+ this.#e[n] = {
3787
+ ...r,
3788
+ forward: i
3789
+ };
3790
+ }
3791
+ for (; this.#e.length > 0 && this.#n(this.#e) > 10485760;) this.#e.shift();
3792
+ this.publish();
3793
+ }
3786
3794
  record(e) {
3787
3795
  if (this.#t.length = 0, this.#e.push(e), this.#n([e]) > 10485760) return this.clear(), !1;
3788
3796
  for (; this.#e.length > 30 || this.#n(this.#e) > 10485760;) this.#e.shift();
@@ -3809,7 +3817,7 @@ var Jr = class {
3809
3817
  };
3810
3818
  //#endregion
3811
3819
  //#region src/workbench/browser/runtime/stores/draftChanges.ts
3812
- function Yr(e, t) {
3820
+ function Xr(e, t) {
3813
3821
  if (e.length != 1 || t.length != 1) return;
3814
3822
  let n = e[0], r = t[0];
3815
3823
  if (n?.kind == "graph.node.field.set" && r?.kind == "graph.node.field.set") return n.nodeId != r.nodeId || n.field != r.field || n.target.kind != r.target.kind || n.target.kind == "subflow" && (r.target.kind != "subflow" || n.target.id != r.target.id) ? void 0 : [{
@@ -3829,7 +3837,7 @@ function Yr(e, t) {
3829
3837
  value: r.value
3830
3838
  }];
3831
3839
  }
3832
- var Xr = class {
3840
+ var Zr = class {
3833
3841
  #e;
3834
3842
  #t;
3835
3843
  #n;
@@ -3857,15 +3865,15 @@ var Xr = class {
3857
3865
  this.#a = e;
3858
3866
  let t = e, n = [];
3859
3867
  for (let e of this.#o) try {
3860
- t = z(t, e.changes), n.push(e);
3868
+ t = H(t, e.changes), n.push(e);
3861
3869
  } catch (t) {
3862
- if (!(t instanceof nt)) throw t;
3870
+ if (!(t instanceof E)) throw t;
3863
3871
  e.active = !1;
3864
3872
  }
3865
3873
  return this.#o = n, t;
3866
3874
  }
3867
3875
  project(e) {
3868
- return this.#o.reduce((e, t) => z(e, t.changes), e);
3876
+ return this.#o.reduce((e, t) => H(e, t.changes), e);
3869
3877
  }
3870
3878
  async settled() {
3871
3879
  await this.#s;
@@ -3879,13 +3887,13 @@ var Xr = class {
3879
3887
  return this.#s = t, t;
3880
3888
  }
3881
3889
  async change(e, t, n, r = !0) {
3882
- let i = this.#o.at(-1), a = i == null || i.started || !i.active ? void 0 : Yr(i.changes, n);
3890
+ let i = this.#o.at(-1), a = i == null || i.started || !i.active ? void 0 : Xr(i.changes, n);
3883
3891
  if (i != null && a != null) return i.changes = a, this.#a != null && this.#t.apply(this.project(this.#a)), i.result;
3884
3892
  this.#t.beforeChange(r);
3885
3893
  let o = {
3886
3894
  ...e,
3887
3895
  active: !0,
3888
- changeId: F(),
3896
+ changeId: U(),
3889
3897
  changes: n,
3890
3898
  started: !1
3891
3899
  };
@@ -3910,21 +3918,21 @@ var Xr = class {
3910
3918
  let r = this.#l(e, n, t);
3911
3919
  return this.#o.length == 0 && this.#t.check(), r;
3912
3920
  } catch (n) {
3913
- if (n instanceof I && n.code == "flow.revision-conflict") {
3921
+ if (n instanceof P && n.code == "flow.revision-conflict") {
3914
3922
  if (!t && await this.#t.recover(e)) {
3915
- t = !0, e.changeId = F();
3923
+ t = !0, e.changeId = U();
3916
3924
  continue;
3917
3925
  }
3918
3926
  t && await this.#t.recover(e), this.#u(e);
3919
3927
  } else {
3920
- if (!(n instanceof I) && !t) {
3928
+ if (!(n instanceof P) && !t) {
3921
3929
  let n = this.#a?.revisionId;
3922
3930
  if (await this.#t.recover(e)) {
3923
- t = !0, e.active && this.#a?.revisionId != n && (e.changeId = F());
3931
+ t = !0, e.active && this.#a?.revisionId != n && (e.changeId = U());
3924
3932
  continue;
3925
3933
  }
3926
3934
  }
3927
- this.#u(e), this.#t.current(e) && this.#r(O(n, this.#n.t));
3935
+ this.#u(e), this.#t.current(e) && this.#r(z(n, this.#n.t));
3928
3936
  }
3929
3937
  return;
3930
3938
  }
@@ -3933,14 +3941,14 @@ var Xr = class {
3933
3941
  #l(e, t, n) {
3934
3942
  let r = {
3935
3943
  ...n.revision,
3936
- content: z(t, e.changes).content
3944
+ content: H(t, e.changes).content
3937
3945
  };
3938
3946
  return this.#o = this.#o.filter((t) => t !== e), this.#a = r, this.#t.apply(this.project(r)), this.#t.headChanged(e.flowId, r.revisionId), r;
3939
3947
  }
3940
3948
  #u(e) {
3941
3949
  e.active = !1, this.#o = this.#o.filter((t) => t !== e), !(!this.#t.current(e) || this.#a == null) && this.#t.apply(this.project(this.#a));
3942
3950
  }
3943
- }, Zr = 50, Qr = {
3951
+ }, Qr = 50, $r = {
3944
3952
  failed: !1,
3945
3953
  loaded: !1,
3946
3954
  loading: !0,
@@ -3948,12 +3956,12 @@ var Xr = class {
3948
3956
  loadMoreFailed: !1,
3949
3957
  refreshing: !1,
3950
3958
  flows: []
3951
- }, $r = class {
3959
+ }, ei = class {
3952
3960
  #e;
3953
3961
  #t;
3954
- #n = new D();
3962
+ #n = new j();
3955
3963
  #r;
3956
- #i = n(Qr);
3964
+ #i = n($r);
3957
3965
  #a = new AbortController();
3958
3966
  #o = /* @__PURE__ */ new Set();
3959
3967
  #s = !1;
@@ -4000,7 +4008,7 @@ var Xr = class {
4000
4008
  try {
4001
4009
  let t = await this.#e.listFlows({
4002
4010
  includeTotal: !0,
4003
- limit: Zr
4011
+ limit: Qr
4004
4012
  });
4005
4013
  if (!e()) return;
4006
4014
  this.#c({
@@ -4017,7 +4025,7 @@ var Xr = class {
4017
4025
  failed: !t,
4018
4026
  loading: !1,
4019
4027
  refreshing: !1
4020
- }), this.#r(O(n, this.#t.t));
4028
+ }), this.#r(z(n, this.#t.t));
4021
4029
  }
4022
4030
  }
4023
4031
  async loadMore() {
@@ -4031,7 +4039,7 @@ var Xr = class {
4031
4039
  try {
4032
4040
  let e = await this.#e.listFlows({
4033
4041
  cursor: t,
4034
- limit: Zr
4042
+ limit: Qr
4035
4043
  });
4036
4044
  if (!r()) return;
4037
4045
  let n = new Set(this.#i.value.flows.map((e) => e.flowId));
@@ -4045,7 +4053,7 @@ var Xr = class {
4045
4053
  this.#c({
4046
4054
  loadingMore: !1,
4047
4055
  loadMoreFailed: !0
4048
- }), this.#r(O(e, this.#t.t));
4056
+ }), this.#r(z(e, this.#t.t));
4049
4057
  }
4050
4058
  }
4051
4059
  async setEnabled(e, t) {
@@ -4055,7 +4063,7 @@ var Xr = class {
4055
4063
  let n = await this.#e.setFlowEnabled(e.flowId, e.live.publicationId, t);
4056
4064
  this.#s || this.include(n);
4057
4065
  } catch (e) {
4058
- this.#s || (this.#r(O(e, this.#t.t)), await this.reload());
4066
+ this.#s || (this.#r(z(e, this.#t.t)), await this.reload());
4059
4067
  } finally {
4060
4068
  this.#o.delete(e.flowId);
4061
4069
  }
@@ -4067,9 +4075,9 @@ var Xr = class {
4067
4075
  try {
4068
4076
  let t = await this.#e.publishFlow(e.flowId, e.draftRevisionId, e.live?.publicationId ?? null);
4069
4077
  if (this.#s) return;
4070
- let n = await G.runPromise(G.gen({ self: this }, function* () {
4078
+ let n = await J.runPromise(J.gen({ self: this }, function* () {
4071
4079
  let n = t;
4072
- for (; n.status == "pending";) yield* G.sleep(1e3), n = yield* G.tryPromise((t) => this.#e.getPublishOperation(e.flowId, n.operationId, t));
4080
+ for (; n.status == "pending";) yield* J.sleep(1e3), n = yield* J.tryPromise((t) => this.#e.getPublishOperation(e.flowId, n.operationId, t));
4073
4081
  return n;
4074
4082
  }), { signal: this.#a.signal });
4075
4083
  if (this.#s) return;
@@ -4081,7 +4089,7 @@ var Xr = class {
4081
4089
  message: this.#t.t("notice.published", { name: e.name })
4082
4090
  }), this.include(await this.#e.getFlow(e.flowId));
4083
4091
  } catch (e) {
4084
- this.#s || this.#r(O(e, this.#t.t));
4092
+ this.#s || this.#r(z(e, this.#t.t));
4085
4093
  } finally {
4086
4094
  this.#o.delete(e.flowId);
4087
4095
  }
@@ -4123,7 +4131,7 @@ var Xr = class {
4123
4131
  ...e
4124
4132
  });
4125
4133
  }
4126
- }, ei = class {
4134
+ }, ti = class {
4127
4135
  #e = /* @__PURE__ */ new Map();
4128
4136
  #t;
4129
4137
  #n = !1;
@@ -4190,11 +4198,11 @@ var Xr = class {
4190
4198
  phase: "saving"
4191
4199
  }, this.#c();
4192
4200
  try {
4193
- let t = await en(i);
4201
+ let t = await Qt(i);
4194
4202
  if (this.#n || !e()) return !1;
4195
4203
  let a = this.#r.value.draft?.content.modules[n];
4196
4204
  if (a == null || a.source != r.base.source || JSON.stringify(a.imports) != JSON.stringify(r.base.imports)) throw Error(this.#o.t("notice.moduleUpdated"));
4197
- let o = i == a.source && JSON.stringify(t) == JSON.stringify(a.imports) ? this.#r.value.draft : await this.changeDraft(tn(n, r.base.source, r.base.imports, i, t));
4205
+ let o = i == a.source && JSON.stringify(t) == JSON.stringify(a.imports) ? this.#r.value.draft : await this.changeDraft($t(n, r.base.source, r.base.imports, i, t));
4198
4206
  if (this.#n || !e()) return !1;
4199
4207
  let s = this.#e.get(n);
4200
4208
  if (s == null) continue;
@@ -4218,7 +4226,7 @@ var Xr = class {
4218
4226
  r != null && (r.editor = {
4219
4227
  ...r.editor,
4220
4228
  phase: "failed"
4221
- }), this.#a(O(t, this.#o.t));
4229
+ }), this.#a(z(t, this.#o.t));
4222
4230
  }
4223
4231
  this.#c();
4224
4232
  }
@@ -4234,7 +4242,7 @@ var Xr = class {
4234
4242
  #c() {
4235
4243
  this.#n || this.#r.set(this.state(this.#r.value.moduleEditor));
4236
4244
  }
4237
- }, ti = class {
4245
+ }, ni = class {
4238
4246
  #e;
4239
4247
  #t;
4240
4248
  #n;
@@ -4282,7 +4290,7 @@ var Xr = class {
4282
4290
  this.#c(a, r), o = !0;
4283
4291
  } catch (r) {
4284
4292
  if (this.#o || !n()) return;
4285
- if (r instanceof I && r.code == "flow.presentation-conflict") try {
4293
+ if (r instanceof P && r.code == "flow.presentation-conflict") try {
4286
4294
  let t = await this.#e.getPresentation(e);
4287
4295
  if (this.#o || !n()) return;
4288
4296
  this.#c(a, t), this.#n({
@@ -4290,9 +4298,9 @@ var Xr = class {
4290
4298
  message: this.#t.t("notice.layoutConflict")
4291
4299
  });
4292
4300
  } catch (e) {
4293
- !this.#o && n() && this.#c(a, t), !this.#o && n() && this.#n(O(e, this.#t.t));
4301
+ !this.#o && n() && this.#c(a, t), !this.#o && n() && this.#n(z(e, this.#t.t));
4294
4302
  }
4295
- else this.#c(a, t), this.#n(O(r, this.#t.t));
4303
+ else this.#c(a, t), this.#n(z(r, this.#t.t));
4296
4304
  }
4297
4305
  }), await this.#i, o;
4298
4306
  }
@@ -4304,22 +4312,22 @@ var Xr = class {
4304
4312
  value: n
4305
4313
  });
4306
4314
  }
4307
- }, ni = {
4315
+ }, ri = {
4308
4316
  checkLoading: !1,
4309
4317
  selectedNodeIds: [],
4310
4318
  workspaceLoadFailed: !1,
4311
4319
  workspaceLoading: !1,
4312
4320
  workspaceRepairing: !1
4313
4321
  };
4314
- function ri(e) {
4322
+ function ii(e) {
4315
4323
  return e.workspaceLoading ? "loading" : e.moduleSaveStatus == null ? e.busy == "designer" ? "saving" : e.draft == null ? "noDraft" : "saved" : e.moduleSaveStatus;
4316
4324
  }
4317
- function ii(e, t) {
4325
+ function ai(e, t) {
4318
4326
  if (t.phase != null) return t.phase;
4319
4327
  let n = e?.content.modules[t.moduleId];
4320
4328
  return n == null ? "failed" : t.source == n.source ? "saved" : "dirty";
4321
4329
  }
4322
- function ai(e, t, n) {
4330
+ function oi(e, t, n) {
4323
4331
  if (e == null || t == null || n.length != 1) return;
4324
4332
  let r = e.node(t, n[0]);
4325
4333
  if (!(r?.kind != "task" || r.definition == null || !("moduleId" in r.definition) || r.module == null)) return {
@@ -4327,9 +4335,9 @@ function ai(e, t, n) {
4327
4335
  source: r.module.source
4328
4336
  };
4329
4337
  }
4330
- var oi = class {
4338
+ var si = class {
4331
4339
  #e;
4332
- #t = n(ni);
4340
+ #t = n(ri);
4333
4341
  #n;
4334
4342
  constructor(n, r) {
4335
4343
  let i = e(this.#t, (e) => e.busy), a = e(this.#t, (e) => e.checkLoading), o = e(this.#t, (e) => e.diagnosticFocus), s = e(this.#t, (e) => e.diagnostics), c = e(this.#t, (e) => e.draft), l = e(this.#t, (e) => {
@@ -4337,25 +4345,25 @@ var oi = class {
4337
4345
  let { phase: t, ...n } = e.moduleEditor;
4338
4346
  return {
4339
4347
  ...n,
4340
- status: ii(e.draft, e.moduleEditor)
4348
+ status: ai(e.draft, e.moduleEditor)
4341
4349
  };
4342
- }), u = e(this.#t, (e) => e.nodeFocus), d = e(this.#t, (e) => e.presentation), f = e(this.#t, (e) => e.flowId), p = e(this.#t, (e) => e.live), m = e(this.#t, (e) => e.draft == null ? void 0 : P(e.draft)), h = e(this.#t, (e) => e.selectedNodeIds), g = e(this.#t, (e) => e.target), _ = e(this.#t, (e) => e.workspaceLoadFailed), v = e(this.#t, (e) => e.workspaceLoadProblem), y = e(this.#t, (e) => e.workspaceLoading), b = e(this.#t, (e) => e.workspaceRepairing);
4350
+ }), u = e(this.#t, (e) => e.nodeFocus), d = e(this.#t, (e) => e.presentation), f = e(this.#t, (e) => e.flowId), p = e(this.#t, (e) => e.live), m = e(this.#t, (e) => e.draft == null ? void 0 : R(e.draft)), h = e(this.#t, (e) => e.selectedNodeIds), g = e(this.#t, (e) => e.target), _ = e(this.#t, (e) => e.workspaceLoadFailed), v = e(this.#t, (e) => e.workspaceLoadProblem), y = e(this.#t, (e) => e.workspaceLoading), b = e(this.#t, (e) => e.workspaceRepairing);
4343
4351
  this.#e = e(this.#t, (e) => ({
4344
- revision: e.draft == null ? void 0 : P(e.draft),
4352
+ revision: e.draft == null ? void 0 : R(e.draft),
4345
4353
  target: e.target
4346
4354
  }), { equal: (e, t) => e.revision === t.revision && e.target === t.target });
4347
4355
  let x = e(this.#t, (e) => {
4348
- if (e.draft != null && e.target != null && e.selectedNodeIds.length == 1) return P(e.draft).selection(e.target, e.selectedNodeIds[0]);
4356
+ if (e.draft != null && e.target != null && e.selectedNodeIds.length == 1) return R(e.draft).selection(e.target, e.selectedNodeIds[0]);
4349
4357
  });
4350
4358
  this.$ = {
4351
4359
  addNodeOptions: t((e) => {
4352
4360
  let { revision: t, target: r } = e(this.#e);
4353
- return le(t?.revision, r, e(n.t$));
4361
+ return we(t?.revision, r, e(n.t$));
4354
4362
  }),
4355
4363
  busy: i,
4356
4364
  checkLoading: a,
4357
4365
  diagnosticFocus: o,
4358
- diagnosticItems: e(this.#t, (e) => pe(e.draft == null ? void 0 : P(e.draft), e.target, e.diagnostics)),
4366
+ diagnosticItems: e(this.#t, (e) => ke(e.draft == null ? void 0 : R(e.draft), e.target, e.diagnostics)),
4359
4367
  diagnostics: s,
4360
4368
  draft: c,
4361
4369
  flow: t((e) => {
@@ -4371,7 +4379,7 @@ var oi = class {
4371
4379
  flowRefreshing: r.$.refreshing,
4372
4380
  flowTotal: r.$.total,
4373
4381
  flows: r.$.flows,
4374
- inspectorDiagnostics: e(this.#t, (e) => de(e.draft == null ? void 0 : P(e.draft), e.target, e.diagnostics, x.value)),
4382
+ inspectorDiagnostics: e(this.#t, (e) => Oe(e.draft == null ? void 0 : R(e.draft), e.target, e.diagnostics, x.value)),
4375
4383
  live: p,
4376
4384
  moduleEditor: l,
4377
4385
  nodeFocus: u,
@@ -4379,11 +4387,11 @@ var oi = class {
4379
4387
  revision: m,
4380
4388
  selection: x,
4381
4389
  selectedNodeIds: h,
4382
- status: e(this.#t, ri),
4390
+ status: e(this.#t, ii),
4383
4391
  target: g,
4384
4392
  targetFlow: t((e) => e(g)?.kind == "flow" ? e(r.$.flows).find((t) => t.flowId == e(f)) : void 0),
4385
4393
  targetName: e(this.#t, (e) => {
4386
- if (e.target != null) return e.target.kind == "flow" ? r.flow(e.flowId ?? "")?.name : e.draft == null ? e.target.id : P(e.draft).subflow(e.target.id)?.name ?? e.target.id;
4394
+ if (e.target != null) return e.target.kind == "flow" ? r.flow(e.flowId ?? "")?.name : e.draft == null ? e.target.id : R(e.draft).subflow(e.target.id)?.name ?? e.target.id;
4387
4395
  }),
4388
4396
  workspaceLoadFailed: _,
4389
4397
  workspaceLoadProblem: v,
@@ -4404,10 +4412,10 @@ var oi = class {
4404
4412
  for (let e of Object.values(this.$)) this.#n.has(e) || e.dispose();
4405
4413
  this.#e.dispose(), this.#t.dispose();
4406
4414
  }
4407
- }, si = {
4415
+ }, ci = {
4408
4416
  x: 40,
4409
4417
  y: 40
4410
- }, ci = {
4418
+ }, li = {
4411
4419
  field: "history.deleted.field",
4412
4420
  group: "history.deleted.group",
4413
4421
  objectItem: "history.deleted.objectItem",
@@ -4418,10 +4426,10 @@ var oi = class {
4418
4426
  conditionGroup: "history.deleted.conditionGroup",
4419
4427
  webhookBody: "history.deleted.webhookBody"
4420
4428
  };
4421
- function li(e, t) {
4429
+ function ui(e, t) {
4422
4430
  if (t != null) return t.kind == "flow" || e.subflow(t.id) != null ? t : { kind: "flow" };
4423
4431
  }
4424
- var ui = class {
4432
+ var di = class {
4425
4433
  #e;
4426
4434
  #t;
4427
4435
  #n;
@@ -4446,20 +4454,20 @@ var ui = class {
4446
4454
  #x;
4447
4455
  #S;
4448
4456
  #C;
4449
- constructor(e, t, n = nn, r = h(), i = () => {}, a = new Dr(e), o = () => {}, s = () => {}) {
4450
- this.catalogs = a, this.flowCreated = o, this.accessChanged = s, this.#n = new D(), this.#d = new Jr(), this.history$ = this.#d.state$, this.#m = 0, this.#h = 0, this.#g = !1, this.#_ = !1, this.#v = !1, this.#y = !1, this.#b = 0, this.#e = e, this.#c = t, this.#i = n, this.#r = r, this.#s = i, this.#o = new $r(e, t, r), this.#l = new oi(r, this.#o), this.#u = new ei(this.#l, this.#n, (e) => this.#O(e, !1), t, r), this.#t = new Xr(e, t, r, {
4451
- apply: (e) => this.#A(e, "local"),
4457
+ constructor(e, t, n = en, r = h(), i = () => {}, a = new Or(e), o = () => {}, s = () => {}) {
4458
+ this.catalogs = a, this.flowCreated = o, this.accessChanged = s, this.#n = new j(), this.#d = new Yr(), this.history$ = this.#d.state$, this.#m = 0, this.#h = 0, this.#g = !1, this.#_ = !1, this.#v = !1, this.#y = !1, this.#b = 0, this.#e = e, this.#c = t, this.#i = n, this.#r = r, this.#s = i, this.#o = new ei(e, t, r), this.#l = new si(r, this.#o), this.#u = new ti(this.#l, this.#n, (e) => this.#k(e), t, r), this.#t = new Zr(e, t, r, {
4459
+ apply: (e) => this.#j(e, "local"),
4452
4460
  beforeChange: (e) => {
4453
- e && this.#V({ busy: "designer" });
4461
+ e && this.#H({ busy: "designer" });
4454
4462
  },
4455
- check: () => void this.#F(),
4456
- current: (e) => this.#B(e),
4463
+ check: () => void this.#I(),
4464
+ current: (e) => this.#V(e),
4457
4465
  finishChanges: () => {
4458
- !this.#_ && this.#l.value.busy == "designer" && this.#V({ busy: void 0 });
4466
+ !this.#_ && this.#l.value.busy == "designer" && this.#H({ busy: void 0 });
4459
4467
  },
4460
4468
  headChanged: (e, t) => this.#o.advanceHead(e, t),
4461
- recover: (e) => (this.retryHistorySync(), this.#L(e, !0))
4462
- }), this.#a = new ti(e, t, (e) => this.#V({ presentation: e }), r), this.$ = this.#l.$;
4469
+ recover: (e) => (this.retryHistorySync(), this.#R(e, !0))
4470
+ }), this.#a = new ni(e, t, (e) => this.#H({ presentation: e }), r), this.$ = this.#l.$;
4463
4471
  }
4464
4472
  dispose() {
4465
4473
  this.catalogs.dispose(), this.#_ = !0, this.#u.dispose(), this.#n.invalidate(), this.#a.dispose(), this.#S?.(), this.#C?.(), this.history$.dispose(), this.#l.dispose(), this.#o.dispose();
@@ -4489,7 +4497,7 @@ var ui = class {
4489
4497
  if (this.#d.applying || !await this.saveModuleEditor() || this.#_) return !1;
4490
4498
  this.#d.clear(), this.#x = void 0, this.#d.failed = !1, this.#d.publish();
4491
4499
  let t = this.#n.begin();
4492
- if (this.#t.reset(), this.#a.reset(), this.#h = 0, this.#g = !1, this.#y = !1, this.#C?.(), this.#C = void 0, this.#V({
4500
+ if (this.#t.reset(), this.#a.reset(), this.#h = 0, this.#g = !1, this.#y = !1, this.#C?.(), this.#C = void 0, this.#H({
4493
4501
  checkLoading: !1,
4494
4502
  diagnosticFocus: void 0,
4495
4503
  diagnostics: void 0,
@@ -4508,7 +4516,7 @@ var ui = class {
4508
4516
  }), e == null) return !0;
4509
4517
  try {
4510
4518
  let n = !1, r, i = this.#e.watchFlow(e, (e) => {
4511
- t() && (this.#t.committed == null ? (n = !0, r = e) : e != this.#t.committed.revisionId && this.#I(e));
4519
+ t() && (this.#t.committed == null ? (n = !0, r = e) : e != this.#t.committed.revisionId && this.#L(e));
4512
4520
  }, (e) => {
4513
4521
  t() && this.#s(e);
4514
4522
  }, (n) => {
@@ -4517,7 +4525,7 @@ var ui = class {
4517
4525
  if (this.#C = i.stop, await i.ready, !t()) return !1;
4518
4526
  let { flow: a, draft: o, live: s, presentation: c } = await this.#e.getEditor(e);
4519
4527
  if (!t()) return !1;
4520
- this.#t.reset(o), this.#a.reset(c), this.#o.include(a), this.#V({
4528
+ this.#t.reset(o), this.#a.reset(c), this.#o.include(a), this.#H({
4521
4529
  draft: o,
4522
4530
  live: s,
4523
4531
  presentation: c,
@@ -4525,16 +4533,16 @@ var ui = class {
4525
4533
  workspaceLoadFailed: !1,
4526
4534
  workspaceLoadProblem: void 0,
4527
4535
  workspaceLoading: !1
4528
- }), await this.#k(t), n && r != o.revisionId && this.#I(r);
4536
+ }), await this.#A(t), n && r != o.revisionId && this.#L(r);
4529
4537
  } catch (e) {
4530
4538
  if (!t()) return !1;
4531
4539
  this.#C?.(), this.#C = void 0;
4532
- let n = e instanceof I && e.code == Fe.flowUpgradeRequired ? "upgrade" : e instanceof I && (e.code == Fe.flowRepairRequired || e.code == Fe.flowInvalid) ? "repair" : "failed";
4533
- return this.#V({
4540
+ let n = e instanceof P && e.code == Ce.flowUpgradeRequired ? "upgrade" : e instanceof P && (e.code == Ce.flowRepairRequired || e.code == Ce.flowInvalid) ? "repair" : "failed";
4541
+ return this.#H({
4534
4542
  workspaceLoadFailed: !0,
4535
4543
  workspaceLoadProblem: {
4536
4544
  kind: n,
4537
- ...n == "failed" ? { message: O(e, this.#r.t).message } : {}
4545
+ ...n == "failed" ? { message: z(e, this.#r.t).message } : {}
4538
4546
  },
4539
4547
  workspaceLoading: !1
4540
4548
  }), !1;
@@ -4548,7 +4556,7 @@ var ui = class {
4548
4556
  changeId: this.#i(),
4549
4557
  expectedRevisionId: t.draftRevisionId
4550
4558
  };
4551
- this.#V({
4559
+ this.#H({
4552
4560
  workspaceRepairing: !0,
4553
4561
  workspaceLoadProblem: this.#l.value.workspaceLoadProblem
4554
4562
  });
@@ -4556,14 +4564,14 @@ var ui = class {
4556
4564
  await this.#e.repairDraft(e, n.expectedRevisionId, n.changeId), this.#x = void 0, await this.selectFlow(e);
4557
4565
  } catch (t) {
4558
4566
  if (this.#_) return;
4559
- if (t instanceof I && t.code == Fe.flowRevisionConflict) {
4567
+ if (t instanceof P && t.code == Ce.flowRevisionConflict) {
4560
4568
  this.#x = void 0, await this.selectFlow(e);
4561
4569
  return;
4562
4570
  }
4563
- this.#V({
4571
+ this.#H({
4564
4572
  workspaceLoadProblem: {
4565
4573
  kind: this.#l.value.workspaceLoadProblem?.kind == "upgrade" ? "upgrade" : "repair",
4566
- message: O(t, this.#r.t).message
4574
+ message: z(t, this.#r.t).message
4567
4575
  },
4568
4576
  workspaceRepairing: !1
4569
4577
  });
@@ -4572,40 +4580,40 @@ var ui = class {
4572
4580
  async #w(e, t) {
4573
4581
  try {
4574
4582
  let n = await this.#e.getLive(e);
4575
- t() && this.#l.value.flowId == e && this.#V({ live: n });
4583
+ t() && this.#l.value.flowId == e && this.#H({ live: n });
4576
4584
  } catch (n) {
4577
- t() && this.#l.value.flowId == e && this.#c(O(n, this.#r.t));
4585
+ t() && this.#l.value.flowId == e && this.#c(z(n, this.#r.t));
4578
4586
  }
4579
4587
  }
4580
4588
  selectTarget(e) {
4581
- return !this.#d.applying && (u(e, this.#l.value.target) || this.#d.clear(), this.#u.flush(), this.#V({
4589
+ return !this.#d.applying && (u(e, this.#l.value.target) || this.#d.clear(), this.#u.flush(), this.#H({
4582
4590
  diagnosticFocus: void 0,
4583
4591
  diagnostics: void 0,
4584
4592
  moduleEditor: void 0,
4585
4593
  nodeFocus: void 0,
4586
4594
  selectedNodeIds: [],
4587
4595
  target: e
4588
- }), this.#F(), !0);
4596
+ }), this.#I(), !0);
4589
4597
  }
4590
4598
  selectNodes(e) {
4591
- return e.length == this.#l.value.selectedNodeIds.length && e.every((e, t) => e == this.#l.value.selectedNodeIds[t]) ? !0 : (this.#u.flush(), this.#V({
4599
+ return e.length == this.#l.value.selectedNodeIds.length && e.every((e, t) => e == this.#l.value.selectedNodeIds[t]) ? !0 : (this.#u.flush(), this.#H({
4592
4600
  diagnosticFocus: void 0,
4593
- moduleEditor: ai(this.#l.value.draft == null ? void 0 : P(this.#l.value.draft), this.#l.value.target, e),
4601
+ moduleEditor: oi(this.#l.value.draft == null ? void 0 : R(this.#l.value.draft), this.#l.value.target, e),
4594
4602
  nodeFocus: void 0,
4595
4603
  selectedNodeIds: e
4596
4604
  }), !0);
4597
4605
  }
4598
4606
  async createFlow(e, t) {
4599
4607
  if (await this.saveModuleEditor()) {
4600
- this.#V({ busy: "flow" });
4608
+ this.#H({ busy: "flow" });
4601
4609
  try {
4602
4610
  if (t == null) return await this.#o.create(e);
4603
4611
  let n = await this.#e.getFlow(await t(e));
4604
4612
  return this.#o.insert(n), n;
4605
4613
  } catch (e) {
4606
- this.#_ || this.#c(O(e, this.#r.t));
4614
+ this.#_ || this.#c(z(e, this.#r.t));
4607
4615
  } finally {
4608
- this.#V({ busy: void 0 });
4616
+ this.#H({ busy: void 0 });
4609
4617
  }
4610
4618
  }
4611
4619
  }
@@ -4613,24 +4621,24 @@ var ui = class {
4613
4621
  if (!await this.saveModuleEditor()) return !1;
4614
4622
  let t = this.#o.flow(e);
4615
4623
  if (t == null || t.status == "retiring") return !1;
4616
- this.#V({ busy: "flow" });
4624
+ this.#H({ busy: "flow" });
4617
4625
  try {
4618
4626
  return await this.#e.deleteFlow(e), !this.#_ && (this.#o.remove(e), this.#c({
4619
4627
  kind: "success",
4620
4628
  message: this.#r.t("notice.flowDeleteAccepted", { name: t.name })
4621
4629
  }), !0);
4622
4630
  } catch (e) {
4623
- return this.#_ || this.#c(O(e, this.#r.t)), !1;
4631
+ return this.#_ || this.#c(z(e, this.#r.t)), !1;
4624
4632
  } finally {
4625
- this.#V({ busy: void 0 });
4633
+ this.#H({ busy: void 0 });
4626
4634
  }
4627
4635
  }
4628
4636
  async createResource(e) {
4629
4637
  if (!await this.saveModuleEditor() || this.#l.value.draft == null) return !1;
4630
4638
  let t = this.#i();
4631
- this.#V({ busy: "resource" });
4632
- let n = await this.#O(Ae(t, e), !1);
4633
- return this.#V({ busy: void 0 }), n != null && (this.selectTarget({
4639
+ this.#H({ busy: "resource" });
4640
+ let n = await this.#O(qe(t, e), !1);
4641
+ return this.#H({ busy: void 0 }), n != null && (this.selectTarget({
4634
4642
  id: t,
4635
4643
  kind: "subflow"
4636
4644
  }), this.#c({
@@ -4642,14 +4650,14 @@ var ui = class {
4642
4650
  let n = this.#o.flow(e), r = t.trim();
4643
4651
  if (n == null || r.length == 0) return !1;
4644
4652
  if (n.name == r) return !0;
4645
- this.#V({ busy: "flow" });
4653
+ this.#H({ busy: "flow" });
4646
4654
  let i;
4647
4655
  try {
4648
4656
  i = await this.#e.renameFlow(e, r), i != null && this.#o.include(i);
4649
4657
  } catch (e) {
4650
- this.#_ || this.#c(O(e, this.#r.t));
4658
+ this.#_ || this.#c(z(e, this.#r.t));
4651
4659
  }
4652
- return this.#V({ busy: void 0 }), i != null && (this.#c({
4660
+ return this.#H({ busy: void 0 }), i != null && (this.#c({
4653
4661
  kind: "success",
4654
4662
  message: this.#r.t("notice.flowRenamed", { name: r })
4655
4663
  }), !0);
@@ -4660,28 +4668,28 @@ var ui = class {
4660
4668
  if (r == null || i == null) return;
4661
4669
  let a = this.#i();
4662
4670
  if (e.kind == "comment") return await this.#T(i, a, t);
4663
- let o = P(r), s = Ze(e, o, i, this.#r.t);
4671
+ let o = R(r), s = mt(e, o, i, this.#r.t);
4664
4672
  if (s == null) return;
4665
- if (s.kind == "provider-trigger" && s.connectionId == null && s.definition.key != "feishu_app_bot.on_event") {
4673
+ if (s.kind == "provider-trigger" && s.connectionId == null) {
4666
4674
  try {
4667
- let e = await A(this.catalogs.connections.get(s.definition.provider, r.flowId));
4675
+ let e = await F(this.catalogs.connections.get(s.definition.provider, r.flowId));
4668
4676
  s = {
4669
4677
  ...s,
4670
- connectionId: $(e).preferred?.connectionId
4678
+ connectionId: je(e).preferred?.connectionId
4671
4679
  };
4672
4680
  } catch (e) {
4673
- !this.#_ && this.#l.value.draft == r && this.#c(O(e, this.#r.t));
4681
+ !this.#_ && this.#l.value.draft == r && this.#c(z(e, this.#r.t));
4674
4682
  }
4675
4683
  if (this.#_ || this.#l.value.draft != r || this.#l.value.target != i) return;
4676
4684
  }
4677
- let c = n?.(a), l = Ge(o, i, a, s, this.#i);
4685
+ let c = n?.(a), l = ot(o, i, a, s, this.#i);
4678
4686
  if (l == null) return;
4679
- let u = c == null ? l : [...l, ...Zt(z(r, l).content, i, {
4687
+ let u = c == null ? l : [...l, ...Yt(H(r, l).content, i, {
4680
4688
  source: c.source,
4681
4689
  target: c.target,
4682
4690
  ...c.sourceHandle.startsWith("$branch:") ? { sourceHandle: c.sourceHandle.slice(8) } : {}
4683
4691
  })];
4684
- if (await this.#N("add", 1, u, (e) => un(e, i, { [a]: t }), [a]) && !this.#_) return this.#V({ nodeFocus: {
4692
+ if (await this.#P("add", 1, u, (e) => dn(e, i, { [a]: t }), [a]) && !this.#_) return this.#H({ nodeFocus: {
4685
4693
  nodeId: a,
4686
4694
  requestId: ++this.#b
4687
4695
  } }), a;
@@ -4689,31 +4697,31 @@ var ui = class {
4689
4697
  async connect(e) {
4690
4698
  let t = this.$.revision.value, n = this.#l.value.target;
4691
4699
  if (t == null || n == null) return;
4692
- let r = Zt(t.revision.content, n, {
4700
+ let r = Yt(t.revision.content, n, {
4693
4701
  source: e.source,
4694
4702
  target: e.target,
4695
4703
  ...e.sourceHandle.startsWith("$branch:") ? { sourceHandle: e.sourceHandle.slice(8) } : {}
4696
4704
  });
4697
- r.length > 0 && await this.#N("connect", 1, r);
4705
+ r.length > 0 && await this.#P("connect", 1, r);
4698
4706
  }
4699
4707
  async disconnect(e) {
4700
4708
  let t = this.$.revision.value, n = this.#l.value.target;
4701
4709
  if (t == null || n == null) return;
4702
- let r = Qt(t.revision.content, n, {
4710
+ let r = Xt(t.revision.content, n, {
4703
4711
  source: e.source,
4704
4712
  target: e.target,
4705
4713
  ...e.sourceHandle.startsWith("$branch:") ? { sourceHandle: e.sourceHandle.slice(8) } : {}
4706
4714
  });
4707
- r.length > 0 && await this.#N("disconnect", 1, r);
4715
+ r.length > 0 && await this.#P("disconnect", 1, r);
4708
4716
  }
4709
4717
  async deleteSelectedNodes() {
4710
4718
  if (!await this.saveModuleEditor()) return;
4711
4719
  let e = this.$.revision.value, t = this.#l.value.target;
4712
4720
  if (e == null || t == null || this.#l.value.selectedNodeIds.length == 0) return;
4713
- let n = [...this.#l.value.selectedNodeIds], r = mn(this.#l.value.presentation?.value ?? {}, t), i = new Set(this.#l.value.selectedNodeIds.filter((e) => r.has(e))), a = xe(e, t, this.#l.value.selectedNodeIds);
4714
- await this.#N("delete", this.#l.value.selectedNodeIds.length, a, (e) => {
4715
- let r = i.size == 0 ? e : pn(e, t, i);
4716
- for (let e of n) r = dn(r, t, e, !1);
4721
+ let n = [...this.#l.value.selectedNodeIds], r = hn(this.#l.value.presentation?.value ?? {}, t), i = new Set(this.#l.value.selectedNodeIds.filter((e) => r.has(e))), a = Pe(e, t, this.#l.value.selectedNodeIds);
4722
+ await this.#P("delete", this.#l.value.selectedNodeIds.length, a, (e) => {
4723
+ let r = i.size == 0 ? e : mn(e, t, i);
4724
+ for (let e of n) r = fn(r, t, e, !1);
4717
4725
  return r;
4718
4726
  }, []);
4719
4727
  }
@@ -4722,26 +4730,26 @@ var ui = class {
4722
4730
  if (e == null || t == null || this.#l.value.selectedNodeIds.length == 0) return;
4723
4731
  let n = new Set(this.#l.value.selectedNodeIds);
4724
4732
  this.#p = {
4725
- hiddenNodeIds: this.#R().nodes.flatMap((e) => e.contentHidden && n.has(e.id) ? [e.id] : []),
4726
- comments: this.#R().nodes.flatMap((e) => e.kind == "comment" && n.has(e.id) ? [{
4733
+ hiddenNodeIds: this.#z().nodes.flatMap((e) => e.contentHidden && n.has(e.id) ? [e.id] : []),
4734
+ comments: this.#z().nodes.flatMap((e) => e.kind == "comment" && n.has(e.id) ? [{
4727
4735
  content: e.content,
4728
4736
  position: e.position,
4729
4737
  sourceId: e.id,
4730
4738
  title: e.title
4731
4739
  }] : []),
4732
- nodes: Kr(e, t, this.#l.value.selectedNodeIds)
4740
+ nodes: qr(e, t, this.#l.value.selectedNodeIds)
4733
4741
  };
4734
4742
  }
4735
- async pasteNodes(e, t = si) {
4743
+ async pasteNodes(e, t = ci) {
4736
4744
  if (!await this.saveModuleEditor()) return;
4737
4745
  let n = this.$.revision.value, r = this.#l.value.target;
4738
4746
  if (n == null || r == null || this.#p == null) return;
4739
- let i = new Set(this.#p.hiddenNodeIds), a = qr(n, r, this.#p.nodes, this.#i), o = this.#p.comments.map((e) => ({
4747
+ let i = new Set(this.#p.hiddenNodeIds), a = Jr(n, r, this.#p.nodes, this.#i), o = this.#p.comments.map((e) => ({
4740
4748
  ...e,
4741
4749
  nodeId: this.#i()
4742
4750
  }));
4743
4751
  if (a.nodeIds.length == 0 && o.length == 0) return;
4744
- let s = new Map(this.#R().nodes.map((e) => [e.id, e])), c = /* @__PURE__ */ new Set([...a.nodeIds, ...o.map((e) => e.nodeId)]), l = new Set([...s].filter(([e]) => !c.has(e)).map(([, e]) => `${e.position.x}\0${e.position.y}`)), u = [...a.sourceIds.map((t) => e?.[t] ?? s.get(t)?.position ?? {
4752
+ let s = new Map(this.#z().nodes.map((e) => [e.id, e])), c = /* @__PURE__ */ new Set([...a.nodeIds, ...o.map((e) => e.nodeId)]), l = new Set([...s].filter(([e]) => !c.has(e)).map(([, e]) => `${e.position.x}\0${e.position.y}`)), u = [...a.sourceIds.map((t) => e?.[t] ?? s.get(t)?.position ?? {
4745
4753
  x: 80,
4746
4754
  y: 80
4747
4755
  }), ...o.map((e) => e.position)], d = 1;
@@ -4753,10 +4761,10 @@ var ui = class {
4753
4761
  y: (i?.y ?? 80) + t.y * d
4754
4762
  }];
4755
4763
  }));
4756
- await this.#N("paste", c.size, a.changes, (e) => {
4757
- let n = un(e, r, f);
4758
- for (let [e, t] of a.sourceIds.entries()) i.has(t) && (n = dn(n, r, a.nodeIds[e], !0));
4759
- for (let e of o) i.has(e.sourceId) && (n = dn(n, r, e.nodeId, !0)), n = fn(n, r, e.nodeId, {
4764
+ await this.#P("paste", c.size, a.changes, (e) => {
4765
+ let n = dn(e, r, f);
4766
+ for (let [e, t] of a.sourceIds.entries()) i.has(t) && (n = fn(n, r, a.nodeIds[e], !0));
4767
+ for (let e of o) i.has(e.sourceId) && (n = fn(n, r, e.nodeId, !0)), n = pn(n, r, e.nodeId, {
4760
4768
  content: e.content,
4761
4769
  position: {
4762
4770
  x: e.position.x + t.x * d,
@@ -4773,36 +4781,36 @@ var ui = class {
4773
4781
  async saveNodeSettings(e, t) {
4774
4782
  let n = this.$.revision.value, r = this.#l.value.target;
4775
4783
  if (n == null || r == null) return !1;
4776
- let i = Ve(n, r, e, t);
4784
+ let i = nt(n, r, e, t);
4777
4785
  return i != null && await this.#E(i) != null;
4778
4786
  }
4779
4787
  async saveNodeDescription(e, t) {
4780
4788
  let n = this.$.revision.value, r = this.#l.value.target;
4781
4789
  if (n == null || r == null) return !1;
4782
- let i = Je(n, r, e, t);
4790
+ let i = ct(n, r, e, t);
4783
4791
  return i != null && await this.#E(i) != null;
4784
4792
  }
4785
4793
  async saveNodeIcon(e, t) {
4786
4794
  let n = this.$.revision.value, r = this.#l.value.target;
4787
4795
  if (n == null || r == null) return !1;
4788
- let i = Te(n, r, e, t);
4796
+ let i = Be(n, r, e, t);
4789
4797
  return i != null && await this.#E(i) != null;
4790
4798
  }
4791
4799
  async saveNodeTitle(e, t) {
4792
4800
  let n = this.$.revision.value, r = this.#l.value.target;
4793
4801
  if (n == null || r == null) return !1;
4794
- let i = De(n, r, e, t);
4802
+ let i = Ue(n, r, e, t);
4795
4803
  return i != null && await this.#E(i) != null;
4796
4804
  }
4797
4805
  async setInputValue(e, t, n, r) {
4798
4806
  let i = this.$.revision.value, a = this.#l.value.target;
4799
4807
  if (i == null || a == null) return !1;
4800
- let o = We(i, a, e, t, n);
4808
+ let o = it(i, a, e, t, n);
4801
4809
  return o != null && await this.#E(o, r) != null;
4802
4810
  }
4803
4811
  async resetInputs(e, t) {
4804
4812
  let n = this.$.revision.value, r = this.#l.value.target;
4805
- return n == null || r == null ? !1 : await this.#E(ge(n.revision.content, r, e, t)) != null;
4813
+ return n == null || r == null ? !1 : await this.#E(Me(n.revision.content, r, e, t)) != null;
4806
4814
  }
4807
4815
  async resetTriggerConfig(e, t) {
4808
4816
  let n = this.$.revision.value, r = this.#l.value.target;
@@ -4820,7 +4828,7 @@ var ui = class {
4820
4828
  }
4821
4829
  async setInputSource(e, t, n) {
4822
4830
  let r = this.$.revision.value, i = this.#l.value.target;
4823
- return r == null || i == null ? !1 : await this.#E(ve(r.revision.content, i, e, t, [{
4831
+ return r == null || i == null ? !1 : await this.#E(He(r.revision.content, i, e, t, [{
4824
4832
  kind: "node",
4825
4833
  ...n
4826
4834
  }])) != null;
@@ -4828,36 +4836,36 @@ var ui = class {
4828
4836
  async setInputVariable(e, t, n) {
4829
4837
  let r = this.$.revision.value, i = this.#l.value.target;
4830
4838
  if (r == null || i == null) return !1;
4831
- let a = n == null ? We(r, i, e, t, void 0) : we(r, i, e, t, n, this.#i());
4839
+ let a = n == null ? it(r, i, e, t, void 0) : Re(r, i, e, t, n, this.#i());
4832
4840
  return a != null && await this.#E(a) != null;
4833
4841
  }
4834
4842
  async saveCondition(e, t, n) {
4835
4843
  let r = this.$.revision.value, i = this.#l.value.target;
4836
4844
  if (r == null || i == null) return !1;
4837
- let a = Pe(r, i, e, t);
4845
+ let a = Ze(r, i, e, t);
4838
4846
  return a != null && await this.#E(a, n) != null;
4839
4847
  }
4840
4848
  async saveValue(e, t, n) {
4841
4849
  let r = this.$.revision.value, i = this.#l.value.target;
4842
4850
  if (r == null || i == null) return !1;
4843
- let a = Qe(r, i, e, t);
4851
+ let a = gt(r, i, e, t);
4844
4852
  return a != null && await this.#E(a, n) != null;
4845
4853
  }
4846
4854
  async saveResolution(e, t, n, r) {
4847
4855
  let i = this.$.revision.value, a = this.#l.value.target;
4848
4856
  if (i == null || a?.kind != "flow") return !1;
4849
- let o = Ie(i, a, e, t, r);
4857
+ let o = $e(i, a, e, t, r);
4850
4858
  return o != null && await this.#E(o, n) != null;
4851
4859
  }
4852
4860
  async saveNodeContentHidden(e, t) {
4853
- let n = this.#l.value.target, r = this.#R().nodes.find((t) => t.id == e);
4854
- n != null && r != null && r.kind != "condition" && await this.#N("edit", 1, [], (r) => dn(r, n, e, t));
4861
+ let n = this.#l.value.target, r = this.#z().nodes.find((t) => t.id == e);
4862
+ n != null && r != null && r.kind != "condition" && await this.#P("edit", 1, [], (r) => fn(r, n, e, t));
4855
4863
  }
4856
4864
  async saveComment(e, t) {
4857
4865
  let n = this.#l.value.target;
4858
4866
  if (n == null) return;
4859
- let r = this.#R().nodes.find((t) => t.id == e)?.position;
4860
- r != null && await this.#N("edit", 1, [], (i) => fn(i, n, e, {
4867
+ let r = this.#z().nodes.find((t) => t.id == e)?.position;
4868
+ r != null && await this.#P("edit", 1, [], (i) => pn(i, n, e, {
4861
4869
  ...t,
4862
4870
  position: r
4863
4871
  }));
@@ -4865,27 +4873,33 @@ var ui = class {
4865
4873
  async saveTaskSettings(e, t) {
4866
4874
  let n = this.$.revision.value, r = this.#l.value.target;
4867
4875
  if (n == null || r == null) return !1;
4868
- let i = Oe(n, r, e, t);
4876
+ let i = Ge(n, r, e, t);
4869
4877
  return i != null && await this.#E(i) != null;
4870
4878
  }
4871
4879
  async saveTaskPorts(e, t, n, r) {
4872
4880
  let i = this.$.revision.value, a = this.#l.value.target;
4873
4881
  if (i == null || a == null) return !1;
4874
- let o = Ye(i, a, e, t, r);
4882
+ let o = ut(i, a, e, t, r);
4875
4883
  return o != null && await this.#E(o, n) != null;
4876
4884
  }
4877
4885
  async saveTaskAdditionalInputs(e, t, n, r) {
4878
4886
  let i = this.$.revision.value, a = this.#l.value.target;
4879
4887
  if (i == null || a == null) return !1;
4880
- let o = be(i, a, e, t, r);
4888
+ let o = Ne(i, a, e, t, r);
4881
4889
  return o != null && await this.#E(o, n) != null;
4882
4890
  }
4883
4891
  async setConnectorConnection(e, t) {
4884
4892
  let n = this.$.revision.value;
4885
4893
  if (n == null) return !1;
4886
- let r = me(n.revision.content, e, t);
4894
+ let r = pe(n.revision.content, e, t);
4887
4895
  return r != null && await this.#E(r) != null;
4888
4896
  }
4897
+ async setCodeActions(e, t) {
4898
+ let n = this.$.revision.value, r = this.#l.value.target;
4899
+ if (n == null || r == null) return !1;
4900
+ let i = xe(n.revision.content, r, e, t);
4901
+ return i == null || await this.#E(i) != null;
4902
+ }
4889
4903
  get eventSourceClient() {
4890
4904
  return this.#e;
4891
4905
  }
@@ -4899,15 +4913,15 @@ var ui = class {
4899
4913
  if (n == null || r?.kind != "flow") return !1;
4900
4914
  let i = n.graph(r)?.nodes[e];
4901
4915
  if (i?.kind != "integration" || i.definition.key != "feishu_app_bot.on_event" || t.provider != i.definition.provider) return !1;
4902
- let a = N(n.revision.content, r, e, t.connectionId);
4916
+ let a = st(n.revision.content, r, e, t.connectionId);
4903
4917
  if (a == null) return !1;
4904
- let o = Ue(i.config.sourceId, void 0) != t.sourceId;
4918
+ let o = ve(i.config.sourceId, void 0) != t.sourceId;
4905
4919
  return await this.#E([
4906
4920
  ...a,
4907
- ...C(n.revision.content, r, e, "sourceId", t.sourceId) ?? [],
4908
- ...o ? C(n.revision.content, r, e, "eventTypes", []) ?? [] : [],
4909
- ...o ? C(n.revision.content, r, e, "resource", void 0) ?? [] : [],
4910
- ...o ? C(n.revision.content, r, e, "chatIds", void 0) ?? [] : []
4921
+ ...V(n.revision.content, r, e, "sourceId", t.sourceId) ?? [],
4922
+ ...o ? V(n.revision.content, r, e, "eventTypes", void 0) ?? [] : [],
4923
+ ...o ? V(n.revision.content, r, e, "resource", void 0) ?? [] : [],
4924
+ ...o ? V(n.revision.content, r, e, "chatIds", void 0) ?? [] : []
4911
4925
  ]) != null;
4912
4926
  }
4913
4927
  async loadTriggerConfigOptions(e, t, n) {
@@ -4918,46 +4932,46 @@ var ui = class {
4918
4932
  async saveTriggerConfig(e, t, n) {
4919
4933
  let r = this.$.revision.value, i = this.#l.value.target;
4920
4934
  if (r == null || i?.kind != "flow") return !1;
4921
- let a = C(r.revision.content, i, e, t, n);
4935
+ let a = V(r.revision.content, i, e, t, n);
4922
4936
  if (a == null) return !1;
4923
4937
  let o = r.graph(i)?.nodes[e];
4924
4938
  if (a.length > 0 && o?.kind == "integration" && o.definition.key == "feishu_app_bot.on_event" && t == "eventTypes") {
4925
4939
  let t = Array.isArray(n) ? n.filter((e) => typeof e == "string") : [];
4926
- ue(t) || (a = [...a, ...C(r.revision.content, i, e, "chatIds", void 0) ?? []]);
4927
- let s = Ue(o.config.resource, void 0);
4928
- ye(s) && s.kind != Xe(t) && (a = [...a, ...C(r.revision.content, i, e, "resource", void 0) ?? []]);
4940
+ Ee(t) || (a = [...a, ...V(r.revision.content, i, e, "chatIds", void 0) ?? []]);
4941
+ let s = ve(o.config.resource, void 0);
4942
+ ge(s) && s.kind != ft(t) && (a = [...a, ...V(r.revision.content, i, e, "resource", void 0) ?? []]);
4929
4943
  }
4930
- return a.length > 0 && o?.kind == "poll" && o.definition.key == "linear.on_issue_changed" && t == "teamId" ? await this.#E([...a, ...C(r.revision.content, i, e, "stateIds", void 0) ?? []]) != null : await this.#E(a) != null;
4944
+ return a.length > 0 && o?.kind == "poll" && o.definition.key == "linear.on_issue_changed" && t == "teamId" ? await this.#E([...a, ...V(r.revision.content, i, e, "stateIds", void 0) ?? []]) != null : await this.#E(a) != null;
4931
4945
  }
4932
4946
  async saveTriggerSchedule(e, t) {
4933
4947
  let n = this.$.revision.value, r = this.#l.value.target;
4934
4948
  if (n == null || r?.kind != "flow") return !1;
4935
- let i = Ee(n.revision.content, r, e, t);
4949
+ let i = rt(n.revision.content, r, e, t);
4936
4950
  return i != null && await this.#E(i) != null;
4937
4951
  }
4938
4952
  async saveWebhook(e, t, n) {
4939
4953
  let r = this.$.revision.value, i = this.#l.value.target;
4940
4954
  if (r == null || i?.kind != "flow") return !1;
4941
- let a = Ce(r, i, e, t);
4955
+ let a = Ie(r, i, e, t);
4942
4956
  return a != null && await this.#E(a, n) != null;
4943
4957
  }
4944
4958
  async setTriggerConnection(e, t) {
4945
4959
  let n = this.$.revision.value, r = this.#l.value.target;
4946
4960
  if (n == null || r?.kind != "flow") return !1;
4947
- let i = N(n.revision.content, r, e, t);
4961
+ let i = st(n.revision.content, r, e, t);
4948
4962
  if (i == null) return !1;
4949
4963
  let a = n.graph(r)?.nodes[e];
4950
- return i.length > 0 && a?.kind == "poll" && a.definition.key == "linear.on_issue_changed" ? await this.#E([...i, ...["teamId", "stateIds"].flatMap((t) => C(n.revision.content, r, e, t, void 0) ?? [])]) != null : await this.#E(i) != null;
4964
+ return i.length > 0 && a?.kind == "poll" && a.definition.key == "linear.on_issue_changed" ? await this.#E([...i, ...["teamId", "stateIds"].flatMap((t) => V(n.revision.content, r, e, t, void 0) ?? [])]) != null : await this.#E(i) != null;
4951
4965
  }
4952
4966
  async saveSubflowSettings(e, t) {
4953
4967
  let n = this.$.revision.value;
4954
4968
  if (n == null) return !1;
4955
- let r = ke(n, e, t);
4969
+ let r = Ke(n, e, t);
4956
4970
  return r != null && await this.#E(r) != null;
4957
4971
  }
4958
4972
  updateModuleSource(e) {
4959
4973
  let t = this.#l.value.moduleEditor;
4960
- this.#d.applying || this.#d.failed || t == null || t.source == e || (this.#M(), this.#u.updateModuleSource(e));
4974
+ this.#d.applying || this.#d.failed || t == null || t.source == e || (this.#d.discardRedo(), this.#u.updateModuleSource(e));
4961
4975
  }
4962
4976
  discardModuleChanges() {
4963
4977
  this.#u.discardModuleChanges();
@@ -4974,54 +4988,54 @@ var ui = class {
4974
4988
  }
4975
4989
  async moveNodes(e) {
4976
4990
  let t = this.#l.value.target;
4977
- t != null && await this.#N("move", Object.keys(e).length, [], (n) => un(n, t, e));
4991
+ t != null && await this.#P("move", Object.keys(e).length, [], (n) => dn(n, t, e));
4978
4992
  }
4979
4993
  async moveViewport(e) {
4980
4994
  let t = this.#l.value.target;
4981
- t != null && await this.#j((n) => hn(n, t, e), !0);
4995
+ t != null && await this.#M((n) => gn(n, t, e), !0);
4982
4996
  }
4983
4997
  async check() {
4984
- await this.#F();
4998
+ await this.#I();
4985
4999
  }
4986
5000
  async refreshFlows() {
4987
5001
  await this.reloadFlows();
4988
5002
  }
4989
5003
  updateLive(e) {
4990
- e.flowId == this.#l.value.flowId && this.#V({ live: e });
5004
+ e.flowId == this.#l.value.flowId && this.#H({ live: e });
4991
5005
  }
4992
5006
  locateNode(e, { preserveSelection: t = !1 } = {}) {
4993
5007
  let n = this.$.revision.value, r = this.#l.value.target;
4994
- return n == null || r == null || n.node(r, e) == null && !mn(this.#l.value.presentation?.value ?? {}, r).has(e) || !t && !this.selectNodes([e]) ? !1 : (this.#V({ nodeFocus: {
5008
+ return n == null || r == null || n.node(r, e) == null && !hn(this.#l.value.presentation?.value ?? {}, r).has(e) || !t && !this.selectNodes([e]) ? !1 : (this.#H({ nodeFocus: {
4995
5009
  nodeId: e,
4996
5010
  requestId: ++this.#b
4997
5011
  } }), !0);
4998
5012
  }
4999
5013
  locateDiagnostic(e) {
5000
- return e.location == null || !this.selectNodes([e.location.nodeId]) ? !1 : (this.#V({ diagnosticFocus: {
5014
+ return e.location == null || !this.selectNodes([e.location.nodeId]) ? !1 : (this.#H({ diagnosticFocus: {
5001
5015
  ...e.location,
5002
5016
  diagnostic: e.diagnostic,
5003
5017
  requestId: ++this.#m
5004
5018
  } }), !0);
5005
5019
  }
5006
5020
  async #T(e, t, n) {
5007
- let r = Math.max(0, ...this.#R().nodes.flatMap((e) => {
5021
+ let r = Math.max(0, ...this.#z().nodes.flatMap((e) => {
5008
5022
  if (e.kind != "comment") return [];
5009
5023
  let t = /#(\d+)$/.exec(e.title);
5010
5024
  return t == null ? [] : [Number(t[1])];
5011
5025
  }));
5012
- if (!(!await this.#N("add", 1, [], (i) => fn(i, e, t, {
5026
+ if (!(!await this.#P("add", 1, [], (i) => pn(i, e, t, {
5013
5027
  content: "",
5014
5028
  position: n,
5015
5029
  title: this.#r.t("addNode.commentName", { number: r + 1 })
5016
5030
  }), [t]) || this.#_)) return t;
5017
5031
  }
5018
5032
  async #E(e, t) {
5019
- return await this.#N("edit", 1, e, void 0, void 0, t) ? this.#l.value.draft : void 0;
5033
+ return await this.#P("edit", 1, e, void 0, void 0, t) ? this.#l.value.draft : void 0;
5020
5034
  }
5021
5035
  #D(e, t) {
5022
5036
  this.#c({
5023
5037
  kind: "success",
5024
- message: "name" in e ? this.#r.t(ci[e.target], { name: e.name }) : this.#r.t(ci[e.target]),
5038
+ message: "name" in e ? this.#r.t(li[e.target], { name: e.name }) : this.#r.t(li[e.target]),
5025
5039
  undo: {
5026
5040
  label: this.#r.t("history.undo"),
5027
5041
  run: async () => {
@@ -5030,12 +5044,12 @@ var ui = class {
5030
5044
  }
5031
5045
  });
5032
5046
  }
5033
- async #O(e, t = !0, n = !1) {
5034
- if (this.#_ || (this.#d.applying || this.#d.failed) && !n) return;
5047
+ async #O(e, t = !0, n = "clear") {
5048
+ if (this.#_ || (this.#d.applying || this.#d.failed) && n != "canvas") return;
5035
5049
  let r = this.#l.value.flowId, i = this.#l.value.draft;
5036
5050
  if (r == null || i == null) return;
5037
- if (e.length == 0 || u(z(i, e).content, i.content)) return i;
5038
- let a = !n && this.#d.clear(), o = this.#n.capture();
5051
+ if (e.length == 0 || u(H(i, e).content, i.content)) return i;
5052
+ let a = n == "clear" && this.#d.clear(), o = this.#n.capture();
5039
5053
  this.#d.pending++, this.#d.publish();
5040
5054
  try {
5041
5055
  let n = this.#t.change({
@@ -5053,37 +5067,46 @@ var ui = class {
5053
5067
  }
5054
5068
  }
5055
5069
  async #k(e) {
5070
+ let t = await this.#O(e, !1, "code");
5071
+ if (t != null) for (let n of e) {
5072
+ if (n.kind != "module.source.replace") continue;
5073
+ let e = t.content.modules[n.moduleId];
5074
+ e != null && this.#d.rebaseModuleCreation(n.moduleId, e);
5075
+ }
5076
+ return t;
5077
+ }
5078
+ async #A(e) {
5056
5079
  for (let t = 0; t < 2 && e(); t += 1) {
5057
5080
  let t = this.#l.value.draft;
5058
5081
  if (t == null) return;
5059
- let n = ne(t.content);
5082
+ let n = Ae(t.content);
5060
5083
  if (n.length == 0) {
5061
- this.#F();
5084
+ this.#I();
5062
5085
  return;
5063
5086
  }
5064
5087
  if (await this.#O(n, !1) != null || !e()) return;
5065
5088
  if (this.#l.value.draft?.revisionId == t.revisionId) break;
5066
5089
  }
5067
- e() && this.#F();
5090
+ e() && this.#I();
5068
5091
  }
5069
- #A(e, t) {
5070
- let n = this.#l.value.draft, { revision: r, selectedNodeIds: i, target: a } = this.#z(e), o = this.#l.value.moduleEditor, s = o != null && (t == "external" || n != null) && ii(n, o) != "saved", c;
5092
+ #j(e, t) {
5093
+ let n = this.#l.value.draft, { revision: r, selectedNodeIds: i, target: a } = this.#B(e), o = this.#l.value.moduleEditor, s = o != null && (t == "external" || n != null) && ai(n, o) != "saved", c;
5071
5094
  return c = s ? t == "external" ? {
5072
5095
  ...o,
5073
5096
  phase: "failed"
5074
- } : o : ai(r, a, i), this.#V({
5097
+ } : o : oi(r, a, i), this.#H({
5075
5098
  draft: e,
5076
5099
  moduleEditor: c,
5077
5100
  selectedNodeIds: i,
5078
5101
  target: a
5079
5102
  }), s;
5080
5103
  }
5081
- async #j(e, t = !1) {
5104
+ async #M(e, t = !1) {
5082
5105
  if (this.#_ || (this.#d.applying || this.#d.failed) && !t) return !1;
5083
5106
  let n = this.#l.value.flowId, r = this.#l.value.presentation;
5084
5107
  if (n == null || r == null) return !1;
5085
5108
  if (u(e(r.value), r.value)) return !0;
5086
- t || this.#M();
5109
+ t || this.#N();
5087
5110
  let i = this.#n.capture();
5088
5111
  this.#d.pending++, this.#d.publish();
5089
5112
  try {
@@ -5093,19 +5116,19 @@ var ui = class {
5093
5116
  this.#d.pending--, this.#_ || this.#d.publish();
5094
5117
  }
5095
5118
  }
5096
- #M() {
5119
+ #N() {
5097
5120
  this.#d.clear() && this.#c({
5098
5121
  kind: "success",
5099
5122
  message: this.#r.t("history.cleared")
5100
5123
  });
5101
5124
  }
5102
- async #N(e, t, n, r, i = this.#l.value.selectedNodeIds, a) {
5125
+ async #P(e, t, n, r, i = this.#l.value.selectedNodeIds, a) {
5103
5126
  if (this.#_ || this.#d.applying || this.#d.failed) return !1;
5104
5127
  let { draft: o, target: s, presentation: c, selectedNodeIds: l } = this.#l.value;
5105
5128
  if (o == null || s == null || c == null) return !1;
5106
- let d = r?.(c.value) ?? c.value, f = gn(c.value, d, s);
5107
- if (u(z(o, n).content, o.content) && f.nodeIds.length == 0) return !0;
5108
- let p = this.#d.generation, m = Gr(o.content, n);
5129
+ let d = r?.(c.value) ?? c.value, f = _n(c.value, d, s);
5130
+ if (u(H(o, n).content, o.content) && f.nodeIds.length == 0) return !0;
5131
+ let p = this.#d.generation, m = Kr(o.content, n);
5109
5132
  this.#d.pending++;
5110
5133
  let h = {
5111
5134
  action: e,
@@ -5118,7 +5141,7 @@ var ui = class {
5118
5141
  afterSelection: i
5119
5142
  }, g = this.#d.record(h);
5120
5143
  try {
5121
- let e = n.length == 0 ? Promise.resolve(o) : this.#O(n, !0, !0), t = r == null ? Promise.resolve(!0) : this.#j(r, !0);
5144
+ let e = n.length == 0 ? Promise.resolve(o) : this.#O(n, !0, "canvas"), t = r == null ? Promise.resolve(!0) : this.#M(r, !0);
5122
5145
  this.selectNodes(i), g || this.#c({
5123
5146
  kind: "success",
5124
5147
  message: this.#r.t("history.tooLarge")
@@ -5126,18 +5149,19 @@ var ui = class {
5126
5149
  let [s, c] = await Promise.all([e, t]), l = s != null && c && (!g || p == this.#d.generation);
5127
5150
  return l && g && a != null && this.history$.value.undo === h && this.#D(a, h), l;
5128
5151
  } catch (e) {
5129
- return this.#c(O(e, this.#r.t)), this.retryHistorySync(), !1;
5152
+ return this.#c(z(e, this.#r.t)), this.retryHistorySync(), !1;
5130
5153
  } finally {
5131
5154
  this.#d.pending--, this.#_ || this.#d.publish();
5132
5155
  }
5133
5156
  }
5134
5157
  async undo() {
5135
- await this.#P(!1);
5158
+ await this.#F(!1);
5136
5159
  }
5137
5160
  async redo() {
5138
- await this.#P(!0);
5161
+ await this.#F(!0);
5139
5162
  }
5140
- async #P(e) {
5163
+ async #F(e) {
5164
+ if (this.hasUnsavedCode && !await this.saveModuleEditor()) return;
5141
5165
  let t = this.history$.value;
5142
5166
  if (!(e ? t.canRedo : t.canUndo)) return;
5143
5167
  let n = e ? t.redo : t.undo;
@@ -5145,10 +5169,10 @@ var ui = class {
5145
5169
  let r = this.#d.generation;
5146
5170
  this.#d.applying = !0, this.#d.publish();
5147
5171
  try {
5148
- let [t, i] = await Promise.all([this.#O(e ? n.forward : n.inverse, !0, !0), this.#j((t) => _n(t, n.target, n.presentation, e), !0)]);
5172
+ let [t, i] = await Promise.all([this.#O(e ? n.forward : n.inverse, !0, "canvas"), this.#M((t) => vn(t, n.target, n.presentation, e), !0)]);
5149
5173
  t != null && i && r == this.#d.generation && (this.selectNodes(e ? n.afterSelection : n.beforeSelection), this.#d.complete(e));
5150
5174
  } catch (e) {
5151
- this.#c(O(e, this.#r.t)), this.retryHistorySync();
5175
+ this.#c(z(e, this.#r.t)), this.retryHistorySync();
5152
5176
  } finally {
5153
5177
  this.#d.applying = !1, this.#_ || this.#d.publish();
5154
5178
  }
@@ -5163,10 +5187,10 @@ var ui = class {
5163
5187
  if (await Promise.allSettled([this.#t.settled(), this.#a.settled()]), !(!t() || this.#_)) try {
5164
5188
  let { draft: n, presentation: r } = await this.#e.getEditor(e);
5165
5189
  if (!t() || this.#_) return;
5166
- this.#t.reset(n), this.#a.reset(r), this.#A(n, "external"), this.#V({ presentation: r }), this.#o.advanceHead(e, n.revisionId), this.#d.failed = !1, this.#c({
5190
+ this.#t.reset(n), this.#a.reset(r), this.#j(n, "external"), this.#H({ presentation: r }), this.#o.advanceHead(e, n.revisionId), this.#d.failed = !1, this.#c({
5167
5191
  kind: "error",
5168
5192
  message: this.#r.t("history.resynced")
5169
- }), this.#F();
5193
+ }), this.#I();
5170
5194
  } catch {
5171
5195
  t() && !this.#_ && this.#c({
5172
5196
  kind: "error",
@@ -5178,17 +5202,17 @@ var ui = class {
5178
5202
  this.#f = void 0, this.#_ || this.#d.publish();
5179
5203
  }), this.#f;
5180
5204
  }
5181
- async #F() {
5205
+ async #I() {
5182
5206
  if (this.#_) return;
5183
5207
  let e = this.#l.value.flowId, t = this.#l.value.draft, n = this.#l.value.target;
5184
5208
  if (e == null || t == null || n == null) {
5185
- n ?? this.#V({
5209
+ n ?? this.#H({
5186
5210
  checkLoading: !1,
5187
5211
  diagnostics: void 0
5188
5212
  });
5189
5213
  return;
5190
5214
  }
5191
- this.#V({
5215
+ this.#H({
5192
5216
  checkLoading: !0,
5193
5217
  diagnosticFocus: void 0
5194
5218
  });
@@ -5196,7 +5220,7 @@ var ui = class {
5196
5220
  let n = await this.#e.checkFlow(e, t.revisionId);
5197
5221
  if (!this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId) {
5198
5222
  let e = this.#l.value.live;
5199
- this.#V({
5223
+ this.#H({
5200
5224
  diagnostics: n,
5201
5225
  live: e == null ? void 0 : {
5202
5226
  ...e,
@@ -5205,12 +5229,12 @@ var ui = class {
5205
5229
  });
5206
5230
  }
5207
5231
  } catch (n) {
5208
- !this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#c(O(n, this.#r.t));
5232
+ !this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#c(z(n, this.#r.t));
5209
5233
  } finally {
5210
- !this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#V({ checkLoading: !1 });
5234
+ !this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#H({ checkLoading: !1 });
5211
5235
  }
5212
5236
  }
5213
- async #I(e) {
5237
+ async #L(e) {
5214
5238
  if (this.#_) return;
5215
5239
  let t = this.#l.value.flowId;
5216
5240
  if (t == null || (this.#h += 1, e != null && (this.#g = !0), this.#y)) return;
@@ -5224,47 +5248,47 @@ var ui = class {
5224
5248
  do {
5225
5249
  e = this.#h;
5226
5250
  let t = this.#g;
5227
- this.#g = !1, await this.#L(n, !1, t);
5228
- } while (this.#B(n) && e != this.#h);
5229
- }), this.#B(n) && (this.#y = !1);
5251
+ this.#g = !1, await this.#R(n, !1, t);
5252
+ } while (this.#V(n) && e != this.#h);
5253
+ }), this.#V(n) && (this.#y = !1);
5230
5254
  }
5231
- async #L(e, t, n = !1) {
5255
+ async #R(e, t, n = !1) {
5232
5256
  try {
5233
5257
  let t = this.#t.committed;
5234
5258
  if (t == null) return !1;
5235
5259
  let r = await this.#e.syncDraft(e.flowId);
5236
- if (!this.#B(e)) return !1;
5260
+ if (!this.#V(e)) return !1;
5237
5261
  let i = r.draft;
5238
5262
  if (i.revisionId == t.revisionId) return !0;
5239
5263
  this.#d.clear() && this.#c({
5240
5264
  kind: "success",
5241
5265
  message: this.#r.t("history.external")
5242
5266
  });
5243
- let a = this.#t.replaceCommitted(i), o = this.#A(a, "external");
5267
+ let a = this.#t.replaceCommitted(i), o = this.#j(a, "external");
5244
5268
  return this.#o.advanceHead(e.flowId, i.revisionId), n && this.#c({
5245
5269
  kind: o ? "error" : "success",
5246
5270
  message: this.#r.t(o ? "notice.moduleUpdated" : "notice.draftUpdated")
5247
- }), this.#F(), !0;
5271
+ }), this.#I(), !0;
5248
5272
  } catch (n) {
5249
- return t && this.#B(e) && this.#c(O(n, this.#r.t)), !1;
5273
+ return t && this.#V(e) && this.#c(z(n, this.#r.t)), !1;
5250
5274
  }
5251
5275
  }
5252
- #R() {
5276
+ #z() {
5253
5277
  let e = this.#l.value;
5254
- return ir(e.draft, e.target, e.presentation?.value, e.diagnostics?.diagnostics, {}, {}, this.#r.t);
5278
+ return ar(e.draft, e.target, e.presentation?.value, e.diagnostics?.diagnostics, {}, {}, this.#r.t);
5255
5279
  }
5256
- #z(e) {
5257
- let t = P(e), n = li(t, this.#l.value.target);
5280
+ #B(e) {
5281
+ let t = R(e), n = ui(t, this.#l.value.target);
5258
5282
  return {
5259
5283
  revision: t,
5260
5284
  selectedNodeIds: this.#l.value.selectedNodeIds.filter((e) => n != null && t.selection(n, e) != null),
5261
5285
  target: n
5262
5286
  };
5263
5287
  }
5264
- #B(e) {
5288
+ #V(e) {
5265
5289
  return !this.#_ && e.flowId == this.#l.value.flowId && e.current();
5266
5290
  }
5267
- #V(e) {
5291
+ #H(e) {
5268
5292
  if (this.#_) return;
5269
5293
  let t = Object.hasOwn(e, "moduleEditor") ? e.moduleEditor : this.#l.value.moduleEditor;
5270
5294
  this.#l.set({
@@ -5275,13 +5299,13 @@ var ui = class {
5275
5299
  };
5276
5300
  //#endregion
5277
5301
  //#region src/workbench/browser/runtime/stores/workbenchStore.ts
5278
- function di(e) {
5302
+ function fi(e) {
5279
5303
  return new Map(e.nodes.map((e) => [e.id, e]));
5280
5304
  }
5281
- function fi(e, t) {
5282
- return e == null || t == null ? [] : P(e).designerInputs(t);
5305
+ function pi(e, t) {
5306
+ return e == null || t == null ? [] : R(e).designerInputs(t);
5283
5307
  }
5284
- function pi(e, t, n, r, i) {
5308
+ function mi(e, t, n, r, i) {
5285
5309
  if (e == null || t?.kind != "flow" || n?.revisionId != e.revisionId || n.flowId != e.flowId) return /* @__PURE__ */ new Map();
5286
5310
  let a = r.find((t) => t.kind == "run.started" && t.payload.flowId == e.flowId)?.payload.scopeId;
5287
5311
  return typeof a == "string" ? new Map(r.flatMap((t) => {
@@ -5289,7 +5313,7 @@ function pi(e, t, n, r, i) {
5289
5313
  return t.payload.scopeId == a && t.payload.flowId == e.flowId && typeof n == "string" && i.has(n) ? [[t.sequence, n]] : [];
5290
5314
  })) : /* @__PURE__ */ new Map();
5291
5315
  }
5292
- var mi = { openExternalPage: async () => !1 }, hi = class {
5316
+ var hi = { openExternalPage: async () => !1 }, gi = class {
5293
5317
  #e;
5294
5318
  #t;
5295
5319
  #n;
@@ -5308,20 +5332,20 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5308
5332
  #f;
5309
5333
  #p;
5310
5334
  #m;
5311
- constructor(r, i, a = F, o = h(), s = mi, c = !0) {
5312
- this.#t = new D(), this.#r = n(), this.#a = n([]), this.#o = n(!1), this.#s = n(!1), this.#c = !0, this.#u = n([]), this.#d = !1, this.#f = !1, this.#m = Promise.resolve(), this.retryCatalog = () => {
5335
+ constructor(r, i, a = U, o = h(), s = hi, c = !0) {
5336
+ this.#t = new j(), this.#r = n(), this.#a = n([]), this.#o = n(!1), this.#s = n(!1), this.#c = !0, this.#u = n([]), this.#d = !1, this.#f = !1, this.#m = Promise.resolve(), this.retryCatalog = () => {
5313
5337
  this.connectors.retryCatalog(), this.triggers.catalog.retry();
5314
- }, this.provideAddNodeOptions = (e, t, n = t) => T(t, [this.triggers.provideAddNodeOptions(e, t), this.connectors.provideAddNodeOptions(e, t, n)]), this.browseAddNodeOptions = (e) => T(e, [this.triggers.browseAddNodeOptions(e), this.connectors.browseAddNodeOptions(e)]), this.provideAddNodeOptionChoices = (e, t) => this.connectors.provideAddNodeOptionChoices(e, t), this.preferences = i, this.#e = r, this.results = r, this.#n = o, this.#i = c;
5338
+ }, this.provideAddNodeOptions = (e, t, n = t) => he(t, [this.triggers.provideAddNodeOptions(e, t), this.connectors.provideAddNodeOptions(e, t, n)]), this.browseAddNodeOptions = (e) => he(e, [this.triggers.browseAddNodeOptions(e), this.connectors.browseAddNodeOptions(e)]), this.provideAddNodeOptionChoices = (e, t) => this.connectors.provideAddNodeOptionChoices(e, t), this.preferences = i, this.#e = r, this.results = r, this.#n = o, this.#i = c;
5315
5339
  let l = (e) => {
5316
5340
  this.#d || this.#r.set(e);
5317
5341
  };
5318
- this.connectorAccess = new kr(r, l, o, (e) => this.workspace.catalogs.refreshFlow(e)), this.runs = new ce(r, l, o), this.workspace = new ui(r, l, nn, o, (e) => {
5342
+ this.connectorAccess = new Ar(r, l, o, (e) => this.workspace.catalogs.refreshFlow(e)), this.runs = new Se(r, l, o), this.workspace = new di(r, l, en, o, (e) => {
5319
5343
  e.kind == "run.created" ? this.#_(r, e) : this.runs.changed(e.runId);
5320
- }, new Dr(r, s.connectorCache), (e) => void this.#h(e), (e) => {
5344
+ }, new Or(r, s.connectorCache), (e) => void this.#h(e), (e) => {
5321
5345
  this.connectorAccess.changed(e), this.workspace.catalogs.refreshFlow(e);
5322
5346
  }), this.#p = this.workspace.$.flowId.reaction((e) => {
5323
5347
  this.#m = this.connectorAccess.load(e);
5324
- }), this.connectors = new Lr(r, this.workspace, l, s, o), this.triggers = new Wr(r, this.workspace, l, s, o), this.publications = new Tn(r, this.workspace, l, i, a, o), this.runRequests = new Fn(r, this.runs, l, async (e) => {
5348
+ }), this.connectors = new Rr(r, this.workspace, l, s, o), this.triggers = new Gr(r, this.workspace, l, s, o), this.publications = new En(r, this.workspace, l, i, a, o), this.runRequests = new In(r, this.runs, l, async (e) => {
5325
5349
  if (!(e != this.workspace.$.flowId.value || !await this.workspace.saveModuleEditor() || this.#d || e != this.workspace.$.flowId.value)) return this.workspace.$.draft.value?.revisionId;
5326
5350
  }, o, a);
5327
5351
  let u = t((e) => {
@@ -5336,9 +5360,9 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5336
5360
  }), d = /* @__PURE__ */ new Map(), f, p = t((e) => {
5337
5361
  let t = e(this.workspace.$.draft);
5338
5362
  f != t?.flowId && (d.clear(), f = t?.flowId);
5339
- let n = e(this.workspace.$.target), r = e(this.workspace.$.presentation)?.value, i = e(u)?.diagnostics ?? e(this.connectors.$.diagnostics), a = t == null ? void 0 : e(R(this.workspace.catalogs.providers.get(t.flowId, o.lang))), s = Object.fromEntries((a ?? []).map((e) => [e.serviceId, e])), c = e(this.connectors.$.actions), l = e(this.connectors.$.catalogs), p = e(o.t$), m = e(this.runs.$.run), h = e(this.runs.$.events), g = n == null ? "" : n.kind == "flow" ? "flow" : `subflow:${n.id}`, _ = [
5340
- ...fi(t, n),
5341
- r == null || n == null ? void 0 : J(r, n),
5363
+ let n = e(this.workspace.$.target), r = e(this.workspace.$.presentation)?.value, i = e(u)?.diagnostics ?? e(this.connectors.$.diagnostics), a = t == null ? void 0 : e(B(this.workspace.catalogs.providers.get(t.flowId, o.lang))), s = Object.fromEntries((a ?? []).map((e) => [e.serviceId, e])), c = e(this.connectors.$.actions), l = e(this.connectors.$.catalogs), p = e(o.t$), m = e(this.runs.$.run), h = e(this.runs.$.events), g = n == null ? "" : n.kind == "flow" ? "flow" : `subflow:${n.id}`, _ = [
5364
+ ...pi(t, n),
5365
+ r == null || n == null ? void 0 : Q(r, n),
5342
5366
  i,
5343
5367
  c,
5344
5368
  a,
@@ -5349,18 +5373,18 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5349
5373
  ...m == null ? [] : [t?.revisionId]
5350
5374
  ], v = d.get(g);
5351
5375
  if (v != null && v.inputs.length == _.length && v.inputs.every((e, t) => e === _[t])) return v.graph;
5352
- let y = ir(t, n, r, i, c, l, p, m, h, s);
5376
+ let y = ar(t, n, r, i, c, l, p, m, h, s);
5353
5377
  return d.set(g, {
5354
5378
  graph: y,
5355
5379
  inputs: _
5356
5380
  }), y;
5357
- }), m = e(p, di);
5381
+ }), m = e(p, fi);
5358
5382
  this.$ = {
5359
5383
  connectorSetupPending: t((e) => {
5360
5384
  let t = e(this.workspace.$.flowId), n = e(this.workspace.$.target), r = e(this.workspace.$.selection);
5361
5385
  if (r?.kind != "task" || r.definition == null || !("executor" in r.definition) || r.definition.executor.kind != "connector") return !1;
5362
5386
  let i = r.definition.executor.action;
5363
- return e(this.#u).some((e) => e.flowId == t && K(e.target, n) && e.actionId == i && (e.nodeId == null || e.nodeId == r.id));
5387
+ return e(this.#u).some((e) => e.flowId == t && X(e.target, n) && e.actionId == i && (e.nodeId == null || e.nodeId == r.id));
5364
5388
  }),
5365
5389
  busy: t((e) => {
5366
5390
  let t = e(this.workspace.$.busy);
@@ -5371,13 +5395,16 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5371
5395
  if (e(this.publications.$.rollingBackPublicationId) != null) return "rollback";
5372
5396
  if (e(this.publications.$.changingTriggerId) != null) return "trigger";
5373
5397
  }),
5374
- diagnosticItems: t((e) => pe(e(this.workspace.$.revision), e(this.workspace.$.target), e(u))),
5398
+ diagnosticItems: t((e) => {
5399
+ let t = e(this.workspace.$.revision), n = e(this.workspace.$.target);
5400
+ return bn(ke(t, n, e(u)), t, n, e(this.triggers.catalog.state).data?.display, yt([o.lang]), e(o.t$));
5401
+ }),
5375
5402
  diagnostics: u,
5376
5403
  designer: p,
5377
5404
  designerNodeById: m,
5378
- sourceNodeIcons: e(p, (e) => Object.fromEntries(e.nodes.flatMap((e) => "icon" in e ? [[e.id, e.icon]] : [])), { equal: K }),
5405
+ sourceNodeIcons: e(p, (e) => Object.fromEntries(e.nodes.flatMap((e) => "icon" in e ? [[e.id, e.icon]] : [])), { equal: X }),
5379
5406
  notice: this.#r,
5380
- runEventNodes: t((e) => pi(e(this.workspace.$.draft), e(this.workspace.$.target), e(this.runs.$.run), e(this.runs.$.events), e(m))),
5407
+ runEventNodes: t((e) => mi(e(this.workspace.$.draft), e(this.workspace.$.target), e(this.runs.$.run), e(this.runs.$.events), e(m))),
5381
5408
  selectedDesignerNode: t((e) => {
5382
5409
  let t = e(this.workspace.$.selectedNodeIds);
5383
5410
  return t.length == 1 ? e(m).get(t[0]) : void 0;
@@ -5413,7 +5440,7 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5413
5440
  if (this.#d) return;
5414
5441
  this.#a.set(e.map((e) => e.name)), this.#o.set(!0);
5415
5442
  } catch (e) {
5416
- this.#c = !0, this.#d || this.#r.set(O(e, this.#n.t));
5443
+ this.#c = !0, this.#d || this.#r.set(z(e, this.#n.t));
5417
5444
  } finally {
5418
5445
  this.#l = void 0, this.#d || this.#s.set(!1);
5419
5446
  }
@@ -5483,7 +5510,7 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5483
5510
  let s = await this.workspace.addNode(e, t, n);
5484
5511
  return s != null && e.kind == "connector" && o != null && (o.nodeId = s, this.#u.set([...this.#u.value]), this.#g(o.flowId, o.target, s, e.connector).finally(r), r = void 0), s != null && e.kind == "trigger" && this.triggers.refresh(), s;
5485
5512
  } catch (e) {
5486
- this.#d || this.#r.set(O(e, this.#n.t));
5513
+ this.#d || this.#r.set(z(e, this.#n.t));
5487
5514
  return;
5488
5515
  } finally {
5489
5516
  r?.();
@@ -5501,7 +5528,7 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5501
5528
  let s = i.action.defaultConnection;
5502
5529
  s != null && await this.workspace.setConnectorConnection(a.node.taskId, s.connectionId), !this.#d && e == this.workspace.$.flowId.value && await this.connectors.refresh();
5503
5530
  } catch (t) {
5504
- !this.#d && e == this.workspace.$.flowId.value && this.#r.set(O(t, this.#n.t));
5531
+ !this.#d && e == this.workspace.$.flowId.value && this.#r.set(z(t, this.#n.t));
5505
5532
  }
5506
5533
  }
5507
5534
  async prepareConnectorAction(e) {
@@ -5526,7 +5553,7 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5526
5553
  if (n == null) return i;
5527
5554
  let r = new Set(n.filter((t) => t.permissions == null || t.permissions.allActions || t.permissions.actionIds.includes(e.actionId)).map((e) => e.connectionId)), a = o.connections.filter((e) => r.has(e.connectionId));
5528
5555
  return {
5529
- action: yn(o.action, a),
5556
+ action: N(o.action, a),
5530
5557
  connections: a
5531
5558
  };
5532
5559
  }
@@ -5534,11 +5561,11 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5534
5561
  }
5535
5562
  }
5536
5563
  async publishedConnectionUsage(e, t, n, r) {
5537
- let [i, a] = await Promise.all([this.#e.getConnectorAccess(e, r, t), this.#e.getRevision(e, n, r)]);
5564
+ let [i, a] = await Promise.all([this.#e.getPublishedConnectorAccess(e, t, r), this.#e.getRevision(e, n, r)]);
5538
5565
  return {
5539
5566
  publicationId: t,
5540
5567
  access: i,
5541
- revision: P(a)
5568
+ revision: R(a)
5542
5569
  };
5543
5570
  }
5544
5571
  async removeConnectionUsage(e) {
@@ -5546,9 +5573,9 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5546
5573
  let t = this.workspace.$.flowId.value, n = this.workspace.$.revision.value, r = this.connectorAccess.$.value.access;
5547
5574
  if (t == null || n == null || r == null) return !1;
5548
5575
  try {
5549
- return await this.#e.removeConnectionUsage(t, e, n.revision.revisionId, r.accessRevision, F()), t != this.workspace.$.flowId.value || this.#d ? !1 : (await this.workspace.selectFlow(t), await this.connectorAccess.load(t), !0);
5576
+ return await this.#e.removeConnectionUsage(t, e, n.revision.revisionId, r.accessRevision, U()), t != this.workspace.$.flowId.value || this.#d ? !1 : (await this.workspace.selectFlow(t), await this.connectorAccess.load(t), !0);
5550
5577
  } catch (e) {
5551
- return this.#r.set(O(e, this.#n.t)), !1;
5578
+ return this.#r.set(z(e, this.#n.t)), !1;
5552
5579
  }
5553
5580
  }
5554
5581
  async refreshSelectedConnector(e = !1) {
@@ -5582,13 +5609,13 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5582
5609
  return;
5583
5610
  }
5584
5611
  }
5585
- }, gi = Tt(() => import("./flowWorkspace-a5QLISui.js").then((e) => e.t));
5586
- function _i({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i, pending: a = !1, title: o, token: c, tokenLabel: u }) {
5587
- let d = c != null && u != null && i != null, f = c ?? "", p = /* @__PURE__ */ U(Ct, { children: [
5588
- /* @__PURE__ */ H("div", {
5612
+ }, _i = Ct(() => import("./flowWorkspace-DJzQVVtZ.js").then((e) => e.t));
5613
+ function vi({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i, pending: a = !1, title: o, token: c, tokenLabel: u }) {
5614
+ let d = c != null && u != null && i != null, f = c ?? "", p = /* @__PURE__ */ K(xt, { children: [
5615
+ /* @__PURE__ */ G("div", {
5589
5616
  "aria-hidden": "true",
5590
5617
  className: "flex size-10 items-center justify-center rounded-lg bg-muted text-muted-foreground",
5591
- children: /* @__PURE__ */ U("svg", {
5618
+ children: /* @__PURE__ */ K("svg", {
5592
5619
  className: "size-5",
5593
5620
  fill: "none",
5594
5621
  stroke: "currentColor",
@@ -5596,40 +5623,40 @@ function _i({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
5596
5623
  strokeLinejoin: "round",
5597
5624
  strokeWidth: "1.8",
5598
5625
  viewBox: "0 0 24 24",
5599
- children: [/* @__PURE__ */ H("rect", {
5626
+ children: [/* @__PURE__ */ G("rect", {
5600
5627
  height: "9",
5601
5628
  rx: "2",
5602
5629
  width: "14",
5603
5630
  x: "5",
5604
5631
  y: "11"
5605
- }), /* @__PURE__ */ H("path", { d: "M8 11V8a4 4 0 0 1 8 0v3" })]
5632
+ }), /* @__PURE__ */ G("path", { d: "M8 11V8a4 4 0 0 1 8 0v3" })]
5606
5633
  })
5607
5634
  }),
5608
- /* @__PURE__ */ U("header", {
5635
+ /* @__PURE__ */ K("header", {
5609
5636
  className: "flex flex-col gap-2",
5610
- children: [/* @__PURE__ */ H("h1", {
5637
+ children: [/* @__PURE__ */ G("h1", {
5611
5638
  className: "text-xl font-semibold tracking-tight text-balance",
5612
5639
  children: o
5613
- }), /* @__PURE__ */ H("p", {
5640
+ }), /* @__PURE__ */ G("p", {
5614
5641
  className: "text-sm/relaxed text-muted-foreground text-pretty",
5615
5642
  children: t
5616
5643
  })]
5617
5644
  }),
5618
- d && /* @__PURE__ */ H(ct, { children: /* @__PURE__ */ U(ot, {
5645
+ d && /* @__PURE__ */ G(O, { children: /* @__PURE__ */ K(ne, {
5619
5646
  "data-invalid": n != null,
5620
5647
  children: [
5621
- /* @__PURE__ */ H(st, {
5648
+ /* @__PURE__ */ G(re, {
5622
5649
  htmlFor: "session-token",
5623
5650
  children: u
5624
5651
  }),
5625
- /* @__PURE__ */ H(l, {
5652
+ /* @__PURE__ */ G(l, {
5626
5653
  autoComplete: "username",
5627
5654
  name: "username",
5628
5655
  type: "hidden",
5629
5656
  value: "open-flow",
5630
5657
  readOnly: !0
5631
5658
  }),
5632
- /* @__PURE__ */ H(l, {
5659
+ /* @__PURE__ */ G(l, {
5633
5660
  autoComplete: "current-password",
5634
5661
  "aria-invalid": n != null,
5635
5662
  autoFocus: !0,
@@ -5641,29 +5668,29 @@ function _i({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
5641
5668
  type: "password",
5642
5669
  value: f
5643
5670
  }),
5644
- n != null && /* @__PURE__ */ H(dt, { children: n })
5671
+ n != null && /* @__PURE__ */ G(oe, { children: n })
5645
5672
  ]
5646
5673
  }) }),
5647
- e != null && r != null && /* @__PURE__ */ U(s, {
5674
+ e != null && r != null && /* @__PURE__ */ K(s, {
5648
5675
  disabled: a || d && f.length == 0,
5649
5676
  size: "lg",
5650
5677
  type: "submit",
5651
- children: [a && /* @__PURE__ */ H(at, {
5678
+ children: [a && /* @__PURE__ */ G(D, {
5652
5679
  "aria-label": e,
5653
5680
  "data-icon": "inline-start"
5654
5681
  }), e]
5655
5682
  }),
5656
- a && e == null && /* @__PURE__ */ H(at, { "aria-label": t })
5683
+ a && e == null && /* @__PURE__ */ G(D, { "aria-label": t })
5657
5684
  ] }), m = "m-auto flex w-full max-w-[420px] flex-col gap-5 rounded-xl bg-card p-6 shadow-lg shadow-black/10";
5658
- return /* @__PURE__ */ H("main", {
5685
+ return /* @__PURE__ */ G("main", {
5659
5686
  className: "open-flow-workbench",
5660
- children: /* @__PURE__ */ H("div", {
5687
+ children: /* @__PURE__ */ G("div", {
5661
5688
  className: "grid h-full overflow-auto bg-muted/20 p-4",
5662
- children: r == null ? /* @__PURE__ */ H("section", {
5689
+ children: r == null ? /* @__PURE__ */ G("section", {
5663
5690
  "aria-busy": a,
5664
5691
  className: m,
5665
5692
  children: p
5666
- }) : /* @__PURE__ */ H("form", {
5693
+ }) : /* @__PURE__ */ G("form", {
5667
5694
  "aria-busy": a,
5668
5695
  className: m,
5669
5696
  onSubmit: r,
@@ -5672,15 +5699,15 @@ function _i({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
5672
5699
  })
5673
5700
  });
5674
5701
  }
5675
- function vi({ host: e, store: t }) {
5676
- let [n] = W(() => e.notify.bind(e)), i = r(t.$.notice);
5677
- return Et(() => n(i), [n, i]), Et(() => () => n(void 0), [n]), null;
5702
+ function yi({ host: e, store: t }) {
5703
+ let [n] = q(() => e.notify.bind(e)), i = r(t.$.notice);
5704
+ return wt(() => n(i), [n, i]), wt(() => () => n(void 0), [n]), null;
5678
5705
  }
5679
- function yi({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowField: i, flowBadges: a, hrefFor: o, hostAction: s, hostTitle: c, language: l, navigation: u, onConfigureConnector: d, onManageConnectorAccess: f, onHostAction: p, onLanguageChange: m, store: h, theme: g }) {
5680
- let _ = r(h.workspace.$.flowId);
5681
- return /* @__PURE__ */ H("div", {
5706
+ function bi({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowField: i, flowBadges: a, hrefFor: o, language: s, navigation: c, onConfigureConnector: l, onManageConnectorAccess: u, onLanguageChange: d, store: f, theme: p }) {
5707
+ let m = r(f.workspace.$.flowId);
5708
+ return /* @__PURE__ */ G("div", {
5682
5709
  className: "app-shell",
5683
- children: _ == null ? /* @__PURE__ */ H(Gt, {
5710
+ children: m == null ? /* @__PURE__ */ G(Ut, {
5684
5711
  catalogWidth: e,
5685
5712
  createFlowDisabled: n,
5686
5713
  createFlowField: i,
@@ -5689,93 +5716,87 @@ function yi({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowF
5689
5716
  flowId: e.flowId,
5690
5717
  view: "design"
5691
5718
  }),
5692
- hostAction: s,
5693
- hostTitle: c,
5694
- language: l,
5695
- onCreateFlow: (e) => u.createFlow(e, t),
5696
- onHostAction: p,
5697
- onLanguageChange: m,
5698
- onSelectFlow: (e) => void u.selectFlow(e),
5699
- store: h
5700
- }) : /* @__PURE__ */ H(wt, {
5701
- fallback: /* @__PURE__ */ H("main", {
5719
+ language: s,
5720
+ onCreateFlow: (e) => c.createFlow(e, t),
5721
+ onLanguageChange: d,
5722
+ onSelectFlow: (e) => void c.selectFlow(e),
5723
+ store: f
5724
+ }) : /* @__PURE__ */ G(St, {
5725
+ fallback: /* @__PURE__ */ G("main", {
5702
5726
  "aria-busy": "true",
5703
5727
  className: "workspace"
5704
5728
  }),
5705
- children: /* @__PURE__ */ H(gi, {
5706
- hostAction: s,
5707
- hostTitle: c,
5729
+ children: /* @__PURE__ */ G(_i, {
5708
5730
  hrefFor: o,
5709
- navigation: u,
5710
- onConfigureConnector: d,
5711
- onManageConnectorAccess: f,
5712
- onHostAction: p,
5713
- store: h,
5714
- theme: g
5731
+ navigation: c,
5732
+ onConfigureConnector: l,
5733
+ onManageConnectorAccess: u,
5734
+ store: f,
5735
+ theme: p
5715
5736
  })
5716
5737
  })
5717
5738
  });
5718
5739
  }
5719
- function bi({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowField: r, flowBadges: i, host: a, hostAction: s, hostTitle: c, hrefFor: l, language: u, location: d, onConfigureConnector: f, onManageConnectorAccess: p, onHostAction: m, onLanguageChange: g, onNavigate: _, preferences: v, theme: y, variables: b = !0 }) {
5720
- let x = Dt(_);
5721
- x.current = _;
5722
- let [{ i18n: S, navigation: C, store: w }] = W(() => {
5723
- let e = h(u), t = new hi(new fe((e, t) => a.request(e, t), (e, t) => a.subscribeFlow(e, t), (e) => a.subscribeFlowCatalog(e)), v, F, e, a, b);
5740
+ function xi({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowField: i, flowBadges: a, host: s, hrefFor: c, language: l, location: u, onConfigureConnector: d, onManageConnectorAccess: f, onLanguageChange: p, onNavigate: m, preferences: g, theme: _, variables: v = !0 }) {
5741
+ let y = Tt(m);
5742
+ y.current = m;
5743
+ let [{ i18n: b, navigation: x, store: S }] = q(() => {
5744
+ let e = h(l), t = new gi(new dt((e, t) => s.request(e, t), (e, t) => s.subscribeFlow(e, t), (e) => s.subscribeFlowCatalog(e)), g, U, e, s, v);
5724
5745
  return {
5725
5746
  i18n: e,
5726
- navigation: new jt(t, d, (e, t) => x.current(e, t)),
5747
+ navigation: new kt(t, u, (e, t) => y.current(e, t)),
5727
5748
  store: t
5728
5749
  };
5729
- });
5730
- return Et(() => {
5731
- C.start();
5750
+ }), C = r(x.$.ready);
5751
+ return wt(() => {
5752
+ x.start();
5732
5753
  let e = () => {
5733
- w.connectors.refreshAfterAuthorization(), w.triggers.refreshAfterAuthorization(), w.invalidateVariableNames();
5754
+ S.connectors.refreshAfterAuthorization(), S.triggers.refreshAfterAuthorization(), S.invalidateVariableNames();
5734
5755
  };
5735
5756
  return globalThis.addEventListener("focus", e), () => {
5736
- globalThis.removeEventListener("focus", e), C.dispose(), w.dispose(), S.dispose();
5757
+ globalThis.removeEventListener("focus", e), x.dispose(), S.dispose(), b.dispose();
5737
5758
  };
5738
5759
  }, [
5739
- S,
5740
- C,
5741
- w
5742
- ]), Et(() => void C.apply(d), [d, C]), Et(() => {
5743
- w.triggers.catalog.setLanguage(u), w.connectors.setLanguage(u), S.lang != u && S.switchLang(u);
5760
+ b,
5761
+ x,
5762
+ S
5763
+ ]), wt(() => void x.apply(u), [u, x]), wt(() => {
5764
+ S.triggers.catalog.setLanguage(l), S.connectors.setLanguage(l), b.lang != l && b.switchLang(l);
5744
5765
  }, [
5745
- S,
5746
- u,
5747
- w
5748
- ]), /* @__PURE__ */ H(o, {
5749
- i18n: S,
5750
- children: /* @__PURE__ */ U("div", {
5766
+ b,
5767
+ l,
5768
+ S
5769
+ ]), /* @__PURE__ */ G(o, {
5770
+ i18n: b,
5771
+ children: /* @__PURE__ */ K("div", {
5751
5772
  className: "open-flow-theme open-flow-workbench",
5752
- "data-theme": y,
5753
- children: [/* @__PURE__ */ H(vi, {
5754
- host: a,
5755
- store: w
5756
- }), /* @__PURE__ */ H(yi, {
5773
+ "data-theme": _,
5774
+ children: [/* @__PURE__ */ G(yi, {
5775
+ host: s,
5776
+ store: S
5777
+ }), C ? /* @__PURE__ */ G(bi, {
5757
5778
  catalogWidth: e,
5758
5779
  createFlow: t,
5759
5780
  createFlowDisabled: n,
5760
- createFlowField: r,
5761
- flowBadges: i,
5762
- hostAction: s,
5763
- hostTitle: c,
5764
- hrefFor: l,
5765
- language: u,
5766
- navigation: C,
5767
- onConfigureConnector: f,
5768
- onManageConnectorAccess: p,
5769
- onHostAction: m,
5770
- onLanguageChange: g,
5771
- store: w,
5772
- theme: y
5781
+ createFlowField: i,
5782
+ flowBadges: a,
5783
+ hrefFor: c,
5784
+ language: l,
5785
+ navigation: x,
5786
+ onConfigureConnector: d,
5787
+ onManageConnectorAccess: f,
5788
+ onLanguageChange: p,
5789
+ store: S,
5790
+ theme: _
5791
+ }) : /* @__PURE__ */ G("main", {
5792
+ "aria-busy": "true",
5793
+ className: "workspace"
5773
5794
  })]
5774
5795
  })
5775
5796
  });
5776
5797
  }
5777
- function xi({ sessionKey: e, ...t }) {
5778
- return /* @__PURE__ */ H(bi, { ...t }, e);
5798
+ function Si({ sessionKey: e, ...t }) {
5799
+ return /* @__PURE__ */ G(xi, { ...t }, e);
5779
5800
  }
5780
5801
  //#endregion
5781
- export { ie as EventSourcesPage, _i as OpenFlowSessionGate, xi as OpenFlowWorkbench, yt as isWorkbenchLanguage, xt as resolveWorkbenchLanguage, St as workbenchLanguageNames, bt as workbenchLanguages };
5802
+ export { We as EventSourcesPage, vi as OpenFlowSessionGate, Si as OpenFlowWorkbench, _t as isWorkbenchLanguage, yt as resolveWorkbenchLanguage, bt as workbenchLanguageNames, vt as workbenchLanguages };