@oomol-lab/open-flow 0.1.0-beta.26 → 0.1.0-beta.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/browser/{createResourceDialog-BwI2JmPE.js → createResourceDialog-C2ZLGPla.js} +1 -1
  2. package/dist/browser/flow-authoring-node.d.ts +3 -2
  3. package/dist/browser/flow-authoring.js +933 -915
  4. package/dist/browser/flow-change-schema.d.ts +4 -0
  5. package/dist/browser/flow-change.d.ts +8 -7
  6. package/dist/browser/flow-change.js +1067 -1050
  7. package/dist/browser/flow-notifications.d.ts +6 -2
  8. package/dist/browser/{flowChanges-BqPtWEI9.js → flowChanges-Z49mslMz.js} +1098 -1027
  9. package/dist/browser/{flowWorkspace-CpMGzmfz.js → flowWorkspace-DCaVDqtY.js} +40105 -43746
  10. package/dist/browser/host-conformance.js +7 -1
  11. package/dist/browser/{inputValues-CeeJw_G8.js → inputValues-CLnpqFAf.js} +1 -1
  12. package/dist/browser/{markdownContent-SIlWuHve.js → markdownContent-Bon8uhjM.js} +23 -23
  13. package/dist/browser/{switch-CyZ96-UF.js → switch-DuB8aovT.js} +5035 -513
  14. package/dist/browser/ui.css +1 -1
  15. package/dist/browser/workbench.css +1 -1
  16. package/dist/browser/workbench.js +890 -727
  17. package/dist/browser/{workbenchSelect-BUu7CjUA.js → workbenchSelect-DX9IFmX-.js} +1187 -1156
  18. package/dist/common/authoringExamples.d.ts +27 -0
  19. package/dist/common/control-api-conformance.js +838 -820
  20. package/dist/common/control-api-errors.d.ts +8 -0
  21. package/dist/common/control-api.d.ts +7 -3
  22. package/dist/common/control-api.js +1425 -1381
  23. package/dist/common/control-requests.d.ts +13 -6
  24. package/dist/common/control-requests.js +2034 -1510
  25. package/dist/common/cron-trigger.d.ts +2 -1
  26. package/dist/common/cron-trigger.js +27 -24
  27. package/dist/common/draftOperations.d.ts +14 -0
  28. package/dist/common/engine-contract.d.ts +2 -2
  29. package/dist/common/flow-encoding.d.ts +3 -0
  30. package/dist/common/flow-encoding.js +1067 -968
  31. package/dist/common/flow-notifications.d.ts +6 -2
  32. package/dist/common/flow-schema.d.ts +1 -2
  33. package/dist/common/flow-semantics.d.ts +2 -1
  34. package/dist/common/flow-semantics.js +7935 -7812
  35. package/dist/common/flowInspection.d.ts +16 -0
  36. package/dist/common/integration-trigger.d.ts +2 -2
  37. package/dist/common/integration-trigger.js +8 -8
  38. package/dist/common/mcp.d.ts +2 -1
  39. package/dist/common/mcp.js +140 -118
  40. package/dist/common/poll-trigger.d.ts +3 -0
  41. package/dist/common/poll-trigger.js +26 -22
  42. package/dist/common/provider-triggers.js +2704 -2599
  43. package/dist/common/runtime-contract.js +3 -3
  44. package/dist/common/scheduler.d.ts +4 -3
  45. package/dist/common/scheduler.js +1855 -1725
  46. package/dist/common/trigger-contract.d.ts +5 -0
  47. package/dist/common/webhook-trigger.d.ts +3 -3
  48. package/dist/common/webhook-trigger.js +64 -18
  49. 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-BuKZ8joP.js";
4
- import { i as d, n as f, o as p, r as m, t as h } from "./switch-CyZ96-UF.js";
5
- import { At as g, B as _, C as v, Ct as y, D as b, Dt as x, E as S, Et as C, F as w, Ft as ee, G as te, H as T, I as E, J as ne, K as D, L as re, M as ie, Nt as ae, O, Ot as oe, P as k, R as se, S as ce, St as le, Tt as ue, U as de, Ut as A, W as j, Y as M, _ as fe, _n as pe, _t as me, a as he, an as ge, b as _e, bn as ve, bt as N, c as ye, d as be, dn as xe, dt as Se, f as Ce, fn as P, g as we, gn as Te, gt as Ee, h as De, hn as F, ht as Oe, in as ke, it as Ae, j as I, jt as je, k as Me, kt as Ne, l as Pe, lt as L, m as Fe, mn as Ie, o as Le, p as Re, pn as ze, q as Be, r as R, rt as z, s as Ve, st as He, t as Ue, tt as We, u as Ge, un as B, ut as Ke, v as qe, vn as V, vt as Je, w as Ye, wt as H, x as Xe, xt as Ze, y as Qe, yn as U, yt as $e, z as et } from "./flowChanges-BqPtWEI9.js";
6
- import { C as tt, V as nt, _ as rt, a as it, c as at, d as ot, f as st, g as ct, h as lt, i as ut, l as dt, m as ft, n as W, o as pt, r as mt, s as ht, t as gt, v as _t, w as vt } from "./workbenchSelect-BUu7CjUA.js";
7
- import { i as yt, n as bt, r as xt, t as St } from "./languages-C0zQ4GSo.js";
8
- import { o as G } from "./dist-B_T-OpQp.js";
9
- import { Fragment as Ct, jsx as K, jsxs as q } from "react/jsx-runtime";
10
- import { Suspense as wt, lazy as Tt, useEffect as J, useRef as Et, useState as Y } from "react";
11
- import * as Dt from "effect/Cause";
12
- import * as X from "effect/Effect";
13
- import * as Ot from "effect/Exit";
14
- import * as kt from "effect/Fiber";
4
+ import { i as d, n as f, o as p, r as m, t as h } from "./switch-DuB8aovT.js";
5
+ import { A as g, At as _, C as v, Ct as y, D as b, Dt as x, E as S, Et as C, F as w, Ft as ee, G as T, H as E, I as D, J as O, K as k, L as te, N as A, Nt as ne, O as j, Ot as re, P as M, R as N, S as ie, St as ae, Tt as oe, U as P, Ut as F, V as se, W as ce, _ as le, _n as ue, _t as de, a as fe, an as pe, at as me, b as he, bn as ge, bt as I, c as _e, ct as ve, d as ye, dn as be, dt as xe, et as Se, f as Ce, fn as L, g as we, gn as Te, gt as Ee, h as De, hn as R, ht as Oe, in as ke, j as Ae, jt as je, kt as Me, l as Ne, lt as z, m as Pe, mn as Fe, nt as B, o as Ie, p as Le, pn as Re, q as ze, r as V, rt as Be, s as Ve, t as He, u as Ue, un as H, ut as We, v as Ge, vn as U, vt as Ke, w as qe, wt as W, x as Je, xt as Ye, y as Xe, yn as G, yt as Ze, z as Qe } from "./flowChanges-Z49mslMz.js";
6
+ import { C as $e, V as et, _ as tt, a as nt, c as rt, d as it, f as at, g as ot, h as st, i as ct, l as lt, m as ut, n as K, o as dt, r as ft, s as pt, t as mt, v as ht, w as gt } from "./workbenchSelect-DX9IFmX-.js";
7
+ import { i as _t, n as vt, r as yt, t as bt } from "./languages-C0zQ4GSo.js";
8
+ import { o as q } from "./dist-B_T-OpQp.js";
9
+ import { Fragment as xt, jsx as J, jsxs as Y } from "react/jsx-runtime";
10
+ import { Suspense as St, lazy as Ct, useEffect as X, useRef as wt, useState as Z } from "react";
11
+ import * as Tt from "effect/Cause";
12
+ import * as Q from "effect/Effect";
13
+ import * as Et from "effect/Exit";
14
+ import * as Dt from "effect/Fiber";
15
15
  //#region src/workbench/browser/runtime/navigation.ts
16
- var At = class {
16
+ var Ot = class {
17
17
  #e;
18
18
  #t;
19
19
  #n;
@@ -72,7 +72,7 @@ var At = class {
72
72
  this.#s = !0, await this.#n.selectFlow(void 0), e == this.#i && (this.#u("design", !1), this.#s = !1);
73
73
  }
74
74
  async apply(e) {
75
- if (jt(e, this.#t)) return;
75
+ if (kt(e, this.#t)) return;
76
76
  this.#t = e;
77
77
  let t = ++this.#i;
78
78
  this.#s = !0;
@@ -88,38 +88,38 @@ var At = class {
88
88
  flowId: n,
89
89
  view: n == null ? "design" : e
90
90
  };
91
- jt(r, this.#t) || (this.#t = r, this.#e(r, { replace: t })), this.#r.set(r.view);
91
+ kt(r, this.#t) || (this.#t = r, this.#e(r, { replace: t })), this.#r.set(r.view);
92
92
  }
93
93
  };
94
- function jt(e, t) {
94
+ function kt(e, t) {
95
95
  return e.flowId == t.flowId && e.view == t.view;
96
96
  }
97
97
  //#endregion
98
98
  //#region src/workbench/browser/runtime/shell/resourceBrowser.tsx
99
- var Mt = Tt(() => import("./createResourceDialog-BwI2JmPE.js")), Nt = yt.map((e) => ({
100
- label: xt[e],
99
+ var At = Ct(() => import("./createResourceDialog-C2ZLGPla.js")), jt = _t.map((e) => ({
100
+ label: yt[e],
101
101
  value: e
102
102
  }));
103
- function Pt({ language: e, onLanguageChange: t }) {
104
- let n = i(), [r, a] = Y(null);
105
- return t == null ? null : /* @__PURE__ */ q("div", {
103
+ function Mt({ language: e, onLanguageChange: t }) {
104
+ let n = i(), [r, a] = Z(null);
105
+ return t == null ? null : /* @__PURE__ */ Y("div", {
106
106
  className: "resource-language",
107
107
  ref: a,
108
- children: [/* @__PURE__ */ K("span", {
108
+ children: [/* @__PURE__ */ J("span", {
109
109
  className: "sr-only",
110
110
  children: n("language.label")
111
- }), /* @__PURE__ */ K(gt, {
111
+ }), /* @__PURE__ */ J(mt, {
112
112
  ariaLabel: n("language.label"),
113
113
  onValueChange: (e) => t(e),
114
- options: Nt,
114
+ options: jt,
115
115
  portalRoot: r,
116
116
  value: e
117
117
  })]
118
118
  });
119
119
  }
120
- function Ft({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: c }) {
121
- let [u, d] = Y(null), f = Et(null), p = Et(null), m = Et(null), g = a(), _ = i(), [v, b] = Y("idle"), [x, S] = Y(n.name), [C, w] = Y(), te = n.live != null && n.live.revisionId != n.draftRevisionId;
122
- async function T(e) {
120
+ function Nt({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: c }) {
121
+ let [u, d] = Z(null), f = wt(null), p = wt(null), m = wt(null), g = a(), _ = i(), [v, b] = Z("idle"), [x, S] = Z(n.name), [C, w] = Z(), T = n.live != null && n.live.revisionId != n.draftRevisionId;
122
+ async function E(e) {
123
123
  w(e == "publish" ? "publish" : "enabled");
124
124
  try {
125
125
  e == "publish" ? await c.workspace.publishFlow(n) : await c.workspace.setFlowEnabled(n, e);
@@ -127,20 +127,20 @@ function Ft({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: c }) {
127
127
  w(void 0);
128
128
  }
129
129
  }
130
- let E = vt(x);
131
- async function ne(e) {
130
+ let D = gt(x);
131
+ async function O(e) {
132
132
  e.preventDefault();
133
133
  let t = x.trim();
134
- vt(t) == null && await c.workspace.renameFlow(n.flowId, t) && b("idle");
134
+ gt(t) == null && await c.workspace.renameFlow(n.flowId, t) && b("idle");
135
135
  }
136
- async function D() {
136
+ async function k() {
137
137
  await c.workspace.deleteFlow(n.flowId) && b("idle");
138
138
  }
139
- return /* @__PURE__ */ q("div", {
139
+ return /* @__PURE__ */ Y("div", {
140
140
  className: "resource-item-row",
141
141
  ref: d,
142
142
  children: [
143
- /* @__PURE__ */ q(s, {
143
+ /* @__PURE__ */ Y(s, {
144
144
  "aria-disabled": n.status == "retiring",
145
145
  className: "resource-list-row flow-columns",
146
146
  nativeButton: !1,
@@ -151,121 +151,121 @@ function Ft({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: c }) {
151
151
  }
152
152
  y(e, () => o(n));
153
153
  },
154
- render: /* @__PURE__ */ K("a", { href: n.status == "retiring" ? void 0 : r }),
154
+ render: /* @__PURE__ */ J("a", { href: n.status == "retiring" ? void 0 : r }),
155
155
  tabIndex: n.status == "retiring" ? -1 : void 0,
156
156
  variant: "ghost",
157
157
  children: [
158
- /* @__PURE__ */ q("span", {
158
+ /* @__PURE__ */ Y("span", {
159
159
  className: "resource-primary-cell",
160
- children: [/* @__PURE__ */ K("span", {
160
+ children: [/* @__PURE__ */ J("span", {
161
161
  className: "resource-icon",
162
- children: /* @__PURE__ */ K(W, { name: "flow" })
163
- }), /* @__PURE__ */ q("span", { children: [/* @__PURE__ */ q("span", {
162
+ children: /* @__PURE__ */ J(K, { name: "flow" })
163
+ }), /* @__PURE__ */ Y("span", { children: [/* @__PURE__ */ Y("span", {
164
164
  className: "flex min-w-0 items-center gap-2",
165
- children: [/* @__PURE__ */ K("strong", {
165
+ children: [/* @__PURE__ */ J("strong", {
166
166
  className: "min-w-0 truncate",
167
167
  children: n.name
168
- }), e != null && /* @__PURE__ */ K(ke, {
168
+ }), e != null && /* @__PURE__ */ J(ke, {
169
169
  className: "min-w-0 shrink",
170
170
  title: e,
171
171
  variant: "secondary",
172
- children: /* @__PURE__ */ K("span", {
172
+ children: /* @__PURE__ */ J("span", {
173
173
  className: "truncate",
174
174
  children: e
175
175
  })
176
176
  })]
177
- }), /* @__PURE__ */ K("code", {
177
+ }), /* @__PURE__ */ J("code", {
178
178
  translate: "no",
179
179
  children: n.flowId
180
180
  })] })]
181
181
  }),
182
- /* @__PURE__ */ K("time", {
182
+ /* @__PURE__ */ J("time", {
183
183
  dateTime: n.updatedAt,
184
184
  children: new Date(n.updatedAt).toLocaleString(g)
185
185
  }),
186
- /* @__PURE__ */ K("span", {
186
+ /* @__PURE__ */ J("span", {
187
187
  className: "resource-status",
188
- children: _(n.status == "retiring" ? "resource.retiring" : n.live == null ? "resource.notPublished" : te ? "resource.unpublishedChanges" : "resource.isPublished")
188
+ children: _(n.status == "retiring" ? "resource.retiring" : n.live == null ? "resource.notPublished" : T ? "resource.unpublishedChanges" : "resource.isPublished")
189
189
  })
190
190
  ]
191
191
  }),
192
- /* @__PURE__ */ q("div", {
192
+ /* @__PURE__ */ Y("div", {
193
193
  className: "resource-live-controls",
194
194
  "aria-busy": C != null,
195
- children: [n.live == null ? /* @__PURE__ */ K("span", {
195
+ children: [n.live == null ? /* @__PURE__ */ J("span", {
196
196
  className: "resource-status",
197
197
  title: _("resource.publishFirst"),
198
198
  children: "—"
199
- }) : /* @__PURE__ */ q(nt, {
199
+ }) : /* @__PURE__ */ Y(et, {
200
200
  className: "resource-enable",
201
201
  title: _("resource.enabledHint"),
202
- children: [/* @__PURE__ */ K(h, {
202
+ children: [/* @__PURE__ */ J(h, {
203
203
  "aria-label": _("resource.enableFlow", { name: n.name }),
204
204
  checked: n.live?.enabled ?? !1,
205
205
  disabled: n.status != "active" || n.live == null || t != null || C != null,
206
- onCheckedChange: (e) => void T(e),
206
+ onCheckedChange: (e) => void E(e),
207
207
  size: "sm"
208
- }), /* @__PURE__ */ K("span", { children: _(n.live?.enabled ? "resource.enabled" : "resource.disabled") })]
209
- }), /* @__PURE__ */ K(s, {
210
- disabled: n.status != "active" || t != null || C != null || n.live != null && !te,
211
- onClick: () => void T("publish"),
208
+ }), /* @__PURE__ */ J("span", { children: _(n.live?.enabled ? "resource.enabled" : "resource.disabled") })]
209
+ }), /* @__PURE__ */ J(s, {
210
+ disabled: n.status != "active" || t != null || C != null || n.live != null && !T,
211
+ onClick: () => void E("publish"),
212
212
  size: "sm",
213
213
  variant: "outline",
214
214
  children: _(C == "publish" ? "workspace.publishing" : n.live == null ? "resource.publish" : "resource.publishUpdate")
215
215
  })]
216
216
  }),
217
- n.status == "active" && /* @__PURE__ */ q(je, { children: [/* @__PURE__ */ K(A, {
217
+ n.status == "active" && /* @__PURE__ */ Y(je, { children: [/* @__PURE__ */ J(F, {
218
218
  "aria-label": _("sidebar.flowActions", { name: n.name }),
219
219
  disabled: t != null || C != null,
220
- render: /* @__PURE__ */ K(s, {
220
+ render: /* @__PURE__ */ J(s, {
221
221
  className: "resource-row-more",
222
222
  ref: f,
223
223
  size: "icon-sm",
224
224
  variant: "ghost",
225
- children: /* @__PURE__ */ K(W, { name: "more" })
225
+ children: /* @__PURE__ */ J(K, { name: "more" })
226
226
  })
227
- }), /* @__PURE__ */ q(ae, {
227
+ }), /* @__PURE__ */ Y(ne, {
228
228
  align: "end",
229
229
  className: "min-w-36",
230
230
  container: u,
231
231
  finalFocus: v == "idle",
232
- children: [/* @__PURE__ */ K(ee, {
232
+ children: [/* @__PURE__ */ J(ee, {
233
233
  onClick: () => {
234
234
  S(n.name), b("rename");
235
235
  },
236
236
  children: _("common.rename")
237
- }), /* @__PURE__ */ K(ee, {
237
+ }), /* @__PURE__ */ J(ee, {
238
238
  onClick: () => b("delete"),
239
239
  variant: "destructive",
240
240
  children: _("common.delete")
241
241
  })]
242
242
  })] }),
243
- /* @__PURE__ */ K(mt, {
243
+ /* @__PURE__ */ J(ft, {
244
244
  open: v == "rename",
245
245
  onOpenChange: (e) => {
246
246
  e || b("idle");
247
247
  },
248
- children: /* @__PURE__ */ K(it, {
248
+ children: /* @__PURE__ */ J(nt, {
249
249
  container: u,
250
250
  initialFocus: p,
251
251
  finalFocus: f,
252
252
  closeLabel: _("common.cancel"),
253
- children: /* @__PURE__ */ q("form", {
253
+ children: /* @__PURE__ */ Y("form", {
254
254
  className: "flex flex-col gap-4",
255
- onSubmit: (e) => void ne(e),
255
+ onSubmit: (e) => void O(e),
256
256
  children: [
257
- /* @__PURE__ */ K(at, { children: /* @__PURE__ */ K(dt, { children: _("sidebar.renameFlow", { name: n.name }) }) }),
258
- /* @__PURE__ */ q(st, {
259
- "data-invalid": x.length > 0 && E != null,
257
+ /* @__PURE__ */ J(rt, { children: /* @__PURE__ */ J(lt, { children: _("sidebar.renameFlow", { name: n.name }) }) }),
258
+ /* @__PURE__ */ Y(at, {
259
+ "data-invalid": x.length > 0 && D != null,
260
260
  children: [
261
- /* @__PURE__ */ K(ct, {
261
+ /* @__PURE__ */ J(ot, {
262
262
  htmlFor: `rename-flow-${n.flowId}`,
263
263
  children: _("resource.flowName")
264
264
  }),
265
- /* @__PURE__ */ K(l, {
265
+ /* @__PURE__ */ J(l, {
266
266
  autoComplete: "off",
267
- "aria-invalid": x.length > 0 && E != null,
268
- "aria-describedby": x.length > 0 && E != null ? `rename-error-${n.flowId}` : void 0,
267
+ "aria-invalid": x.length > 0 && D != null,
268
+ "aria-describedby": x.length > 0 && D != null ? `rename-error-${n.flowId}` : void 0,
269
269
  id: `rename-flow-${n.flowId}`,
270
270
  name: "flow-name",
271
271
  onChange: (e) => S(e.target.value),
@@ -273,18 +273,18 @@ function Ft({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: c }) {
273
273
  required: !0,
274
274
  value: x
275
275
  }),
276
- x.length > 0 && E != null && /* @__PURE__ */ K(ft, {
276
+ x.length > 0 && D != null && /* @__PURE__ */ J(ut, {
277
277
  id: `rename-error-${n.flowId}`,
278
- children: _(`resource.nameIssue.${E}`, { max: 80 })
278
+ children: _(`resource.nameIssue.${D}`, { max: 80 })
279
279
  })
280
280
  ]
281
281
  }),
282
- /* @__PURE__ */ q(ht, { children: [/* @__PURE__ */ K(ut, {
283
- render: /* @__PURE__ */ K(s, { variant: "outline" }),
282
+ /* @__PURE__ */ Y(pt, { children: [/* @__PURE__ */ J(ct, {
283
+ render: /* @__PURE__ */ J(s, { variant: "outline" }),
284
284
  type: "button",
285
285
  children: _("common.cancel")
286
- }), /* @__PURE__ */ K(s, {
287
- disabled: t != null || E != null,
286
+ }), /* @__PURE__ */ J(s, {
287
+ disabled: t != null || D != null,
288
288
  type: "submit",
289
289
  children: _("common.save")
290
290
  })] })
@@ -292,25 +292,25 @@ function Ft({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: c }) {
292
292
  })
293
293
  })
294
294
  }),
295
- /* @__PURE__ */ K(mt, {
295
+ /* @__PURE__ */ J(ft, {
296
296
  open: v == "delete",
297
297
  onOpenChange: (e) => {
298
298
  e || b("idle");
299
299
  },
300
- children: /* @__PURE__ */ q(it, {
300
+ children: /* @__PURE__ */ Y(nt, {
301
301
  container: u,
302
302
  initialFocus: m,
303
303
  finalFocus: f,
304
304
  showCloseButton: !1,
305
- children: [/* @__PURE__ */ q(at, { children: [/* @__PURE__ */ K(dt, { children: _("sidebar.deleteFlowConfirm", { name: n.name }) }), /* @__PURE__ */ K(pt, { children: _("resource.deleteDescription") })] }), /* @__PURE__ */ q(ht, { children: [/* @__PURE__ */ K(ut, {
306
- render: /* @__PURE__ */ K(s, {
305
+ children: [/* @__PURE__ */ Y(rt, { children: [/* @__PURE__ */ J(lt, { children: _("sidebar.deleteFlowConfirm", { name: n.name }) }), /* @__PURE__ */ J(dt, { children: _("resource.deleteDescription") })] }), /* @__PURE__ */ Y(pt, { children: [/* @__PURE__ */ J(ct, {
306
+ render: /* @__PURE__ */ J(s, {
307
307
  ref: m,
308
308
  variant: "outline"
309
309
  }),
310
310
  children: _("common.cancel")
311
- }), /* @__PURE__ */ K(s, {
311
+ }), /* @__PURE__ */ J(s, {
312
312
  disabled: t != null,
313
- onClick: () => void D(),
313
+ onClick: () => void k(),
314
314
  variant: "destructive",
315
315
  children: _(t == "flow" ? "common.deleting" : "common.delete")
316
316
  })] })]
@@ -319,152 +319,152 @@ function Ft({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: c }) {
319
319
  ]
320
320
  });
321
321
  }
322
- function It() {
323
- return /* @__PURE__ */ q("div", {
322
+ function Pt() {
323
+ return /* @__PURE__ */ Y("div", {
324
324
  "aria-hidden": "true",
325
325
  className: "resource-list-row resource-skeleton-row flow-columns",
326
326
  children: [
327
- /* @__PURE__ */ q("span", {
327
+ /* @__PURE__ */ Y("span", {
328
328
  className: "resource-primary-cell",
329
- children: [/* @__PURE__ */ K(H, { className: "size-8 shrink-0" }), /* @__PURE__ */ q("span", {
329
+ children: [/* @__PURE__ */ J(W, { className: "size-8 shrink-0" }), /* @__PURE__ */ Y("span", {
330
330
  className: "resource-skeleton-copy",
331
- children: [/* @__PURE__ */ K(H, { className: "h-3.5 w-36" }), /* @__PURE__ */ K(H, { className: "h-2.5 w-48 max-w-full" })]
331
+ children: [/* @__PURE__ */ J(W, { className: "h-3.5 w-36" }), /* @__PURE__ */ J(W, { className: "h-2.5 w-48 max-w-full" })]
332
332
  })]
333
333
  }),
334
- /* @__PURE__ */ K(H, { className: "h-3 w-28" }),
335
- /* @__PURE__ */ K(H, { className: "h-3 w-16" })
334
+ /* @__PURE__ */ J(W, { className: "h-3 w-28" }),
335
+ /* @__PURE__ */ J(W, { className: "h-3 w-16" })
336
336
  ]
337
337
  });
338
338
  }
339
- function Lt({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBadges: a, hrefForFlow: o, hostAction: l, hostTitle: u, language: p, onCreateFlow: h, onHostAction: _, onLanguageChange: v, onSelectFlow: y, store: b }) {
340
- let S = i(), w = r(b.workspace.$.busy), ee = r(b.workspace.$.flowLoadFailed), te = r(b.workspace.$.flowLoadMoreFailed), T = r(b.workspace.$.flowLoading), E = r(b.workspace.$.flowLoadingMore), ne = r(b.workspace.$.flowNextCursor), D = r(b.workspace.$.flowRefreshing), re = r(b.workspace.$.flows), ie = r(b.workspace.$.flowTotal), [ae, O] = Y(!1), [k, se] = Y(""), [ce, de] = Y(""), A = k.trim().toLocaleLowerCase(), j = re.filter((e) => e.name.toLocaleLowerCase().includes(A));
341
- async function M(e) {
339
+ function Ft({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBadges: a, hrefForFlow: o, hostAction: l, hostTitle: u, language: p, onCreateFlow: h, onHostAction: g, onLanguageChange: v, onSelectFlow: y, store: b }) {
340
+ let S = i(), w = r(b.workspace.$.busy), ee = r(b.workspace.$.flowLoadFailed), T = r(b.workspace.$.flowLoadMoreFailed), E = r(b.workspace.$.flowLoading), D = r(b.workspace.$.flowLoadingMore), O = r(b.workspace.$.flowNextCursor), k = r(b.workspace.$.flowRefreshing), te = r(b.workspace.$.flows), A = r(b.workspace.$.flowTotal), [ne, j] = Z(!1), [M, N] = Z(""), [ie, P] = Z(""), F = M.trim().toLocaleLowerCase(), se = te.filter((e) => e.name.toLocaleLowerCase().includes(F));
341
+ async function ce(e) {
342
342
  e.preventDefault();
343
- let t = ce.trim();
344
- vt(t) != null || !await h(t) || (O(!1), de(""));
343
+ let t = ie.trim();
344
+ gt(t) != null || !await h(t) || (j(!1), P(""));
345
345
  }
346
- return /* @__PURE__ */ K("main", {
346
+ return /* @__PURE__ */ J("main", {
347
347
  className: "resource-browser",
348
- children: /* @__PURE__ */ q("div", {
348
+ children: /* @__PURE__ */ Y("div", {
349
349
  className: c("resource-page", e != "default" && "resource-page-full"),
350
350
  children: [
351
- /* @__PURE__ */ K("h1", {
351
+ /* @__PURE__ */ J("h1", {
352
352
  className: "sr-only",
353
353
  children: S("resource.flows")
354
354
  }),
355
- /* @__PURE__ */ q("section", {
355
+ /* @__PURE__ */ Y("section", {
356
356
  "aria-labelledby": "flow-list-title",
357
357
  className: "resource-list-section",
358
358
  children: [
359
- /* @__PURE__ */ q("div", {
359
+ /* @__PURE__ */ Y("div", {
360
360
  className: "resource-list-title",
361
- children: [/* @__PURE__ */ q("div", {
361
+ children: [/* @__PURE__ */ Y("div", {
362
362
  className: "resource-list-heading",
363
- children: [/* @__PURE__ */ K("h2", {
363
+ children: [/* @__PURE__ */ J("h2", {
364
364
  id: "flow-list-title",
365
365
  children: S("resource.allFlows")
366
- }), !T && /* @__PURE__ */ K("span", { children: S("resource.flowCount", { count: ie ?? re.length }) })]
367
- }), /* @__PURE__ */ q("div", {
366
+ }), !E && /* @__PURE__ */ J("span", { children: S("resource.flowCount", { count: A ?? te.length }) })]
367
+ }), /* @__PURE__ */ Y("div", {
368
368
  className: "resource-list-actions",
369
369
  children: [
370
- /* @__PURE__ */ K(Pt, {
370
+ /* @__PURE__ */ J(Mt, {
371
371
  language: p,
372
372
  onLanguageChange: v
373
373
  }),
374
- /* @__PURE__ */ q(f, {
374
+ /* @__PURE__ */ Y(f, {
375
375
  className: "w-full sm:w-56",
376
- children: [/* @__PURE__ */ K(m, { children: /* @__PURE__ */ K(W, {
376
+ children: [/* @__PURE__ */ J(m, { children: /* @__PURE__ */ J(K, {
377
377
  name: "search",
378
378
  size: 17
379
- }) }), /* @__PURE__ */ K(d, {
379
+ }) }), /* @__PURE__ */ J(d, {
380
380
  autoComplete: "off",
381
381
  "aria-label": S("resource.searchFlows"),
382
382
  name: "flow-search",
383
- onChange: (e) => se(e.target.value),
383
+ onChange: (e) => N(e.target.value),
384
384
  placeholder: S("resource.searchFlows"),
385
- value: k
385
+ value: M
386
386
  })]
387
387
  }),
388
- /* @__PURE__ */ K(s, {
388
+ /* @__PURE__ */ J(s, {
389
389
  "aria-label": S("common.refresh"),
390
- disabled: T || D || w != null,
390
+ disabled: E || k || w != null,
391
391
  onClick: () => void b.workspace.reloadFlows(),
392
392
  size: "icon",
393
393
  title: S("common.refresh"),
394
394
  variant: "outline",
395
- children: /* @__PURE__ */ K(W, {
396
- className: D ? "animate-spin" : void 0,
395
+ children: /* @__PURE__ */ J(K, {
396
+ className: k ? "animate-spin" : void 0,
397
397
  name: "refresh"
398
398
  })
399
399
  }),
400
- /* @__PURE__ */ q(s, {
400
+ /* @__PURE__ */ Y(s, {
401
401
  className: "resource-page-primary-action",
402
402
  disabled: w != null,
403
- onClick: () => O(!0),
404
- children: [/* @__PURE__ */ K(W, {
403
+ onClick: () => j(!0),
404
+ children: [/* @__PURE__ */ J(K, {
405
405
  "data-icon": "inline-start",
406
406
  name: "plus"
407
407
  }), S("resource.newFlow")]
408
408
  }),
409
- l != null && u != null && _ != null && /* @__PURE__ */ K(le, {
409
+ l != null && u != null && g != null && /* @__PURE__ */ J(ae, {
410
410
  action: l,
411
- onAction: _,
411
+ onAction: g,
412
412
  title: u
413
413
  })
414
414
  ]
415
415
  })]
416
416
  }),
417
- /* @__PURE__ */ q("div", {
417
+ /* @__PURE__ */ Y("div", {
418
418
  "aria-hidden": "true",
419
419
  className: "resource-list-columns flow-columns",
420
420
  children: [
421
- /* @__PURE__ */ K("span", { children: S("resource.name") }),
422
- /* @__PURE__ */ K("span", { children: S("resource.updated") }),
423
- /* @__PURE__ */ K("span", { children: S("resource.publication") }),
424
- /* @__PURE__ */ K("span", { children: S("resource.enabledColumn") })
421
+ /* @__PURE__ */ J("span", { children: S("resource.name") }),
422
+ /* @__PURE__ */ J("span", { children: S("resource.updated") }),
423
+ /* @__PURE__ */ J("span", { children: S("resource.publication") }),
424
+ /* @__PURE__ */ J("span", { children: S("resource.enabledColumn") })
425
425
  ]
426
426
  }),
427
- /* @__PURE__ */ K("div", {
427
+ /* @__PURE__ */ J("div", {
428
428
  className: "resource-list",
429
- children: T ? Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ K(It, {}, t)) : ee ? /* @__PURE__ */ q(ue, {
429
+ children: E ? Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ J(Pt, {}, t)) : ee ? /* @__PURE__ */ Y(oe, {
430
430
  className: "min-h-64",
431
431
  role: "alert",
432
- children: [/* @__PURE__ */ q(oe, { children: [
433
- /* @__PURE__ */ K(Ne, {
432
+ children: [/* @__PURE__ */ Y(re, { children: [
433
+ /* @__PURE__ */ J(Me, {
434
434
  variant: "icon",
435
- children: /* @__PURE__ */ K(W, {
435
+ children: /* @__PURE__ */ J(K, {
436
436
  name: "alert",
437
437
  size: 20
438
438
  })
439
439
  }),
440
- /* @__PURE__ */ K(g, { children: S("resource.flowsLoadFailed") }),
441
- /* @__PURE__ */ K(x, { children: S("resource.flowsLoadFailedDescription") })
442
- ] }), /* @__PURE__ */ K(C, { children: /* @__PURE__ */ K(s, {
440
+ /* @__PURE__ */ J(_, { children: S("resource.flowsLoadFailed") }),
441
+ /* @__PURE__ */ J(x, { children: S("resource.flowsLoadFailedDescription") })
442
+ ] }), /* @__PURE__ */ J(C, { children: /* @__PURE__ */ J(s, {
443
443
  onClick: () => void b.retryFlows(),
444
444
  variant: "outline",
445
445
  children: S("empty.retry")
446
446
  }) })]
447
- }) : j.length == 0 ? /* @__PURE__ */ q(ue, {
447
+ }) : se.length == 0 ? /* @__PURE__ */ Y(oe, {
448
448
  className: "min-h-64",
449
- children: [/* @__PURE__ */ q(oe, { children: [
450
- /* @__PURE__ */ K(Ne, {
449
+ children: [/* @__PURE__ */ Y(re, { children: [
450
+ /* @__PURE__ */ J(Me, {
451
451
  variant: "icon",
452
- children: /* @__PURE__ */ K(W, {
452
+ children: /* @__PURE__ */ J(K, {
453
453
  name: "flow",
454
454
  size: 20
455
455
  })
456
456
  }),
457
- /* @__PURE__ */ K(g, { children: S(A.length == 0 ? "resource.noFlows" : "resource.noMatchingFlows") }),
458
- /* @__PURE__ */ K(x, { children: S(A.length == 0 ? "resource.noFlowsDescription" : "resource.noMatchingDescription") })
459
- ] }), A.length == 0 && /* @__PURE__ */ K(C, { children: /* @__PURE__ */ q(s, {
460
- onClick: () => O(!0),
457
+ /* @__PURE__ */ J(_, { children: S(F.length == 0 ? "resource.noFlows" : "resource.noMatchingFlows") }),
458
+ /* @__PURE__ */ J(x, { children: S(F.length == 0 ? "resource.noFlowsDescription" : "resource.noMatchingDescription") })
459
+ ] }), F.length == 0 && /* @__PURE__ */ J(C, { children: /* @__PURE__ */ Y(s, {
460
+ onClick: () => j(!0),
461
461
  variant: "outline",
462
- children: [/* @__PURE__ */ K(W, {
462
+ children: [/* @__PURE__ */ J(K, {
463
463
  "data-icon": "inline-start",
464
464
  name: "plus"
465
465
  }), S("resource.newFlow")]
466
466
  }) })]
467
- }) : j.map((e) => /* @__PURE__ */ K(Ft, {
467
+ }) : se.map((e) => /* @__PURE__ */ J(Nt, {
468
468
  badge: a?.[e.flowId],
469
469
  busy: w,
470
470
  flow: e,
@@ -473,29 +473,29 @@ function Lt({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBa
473
473
  store: b
474
474
  }, e.flowId))
475
475
  }),
476
- ne != null && /* @__PURE__ */ K("div", {
476
+ O != null && /* @__PURE__ */ J("div", {
477
477
  className: "resource-list-footer",
478
- children: /* @__PURE__ */ K(s, {
479
- disabled: E || D,
478
+ children: /* @__PURE__ */ J(s, {
479
+ disabled: D || k,
480
480
  onClick: () => void b.workspace.loadMoreFlows(),
481
481
  variant: "outline",
482
- children: S(E ? "resource.loadingMore" : te ? "resource.retryLoadMore" : "resource.loadMore")
482
+ children: S(D ? "resource.loadingMore" : T ? "resource.retryLoadMore" : "resource.loadMore")
483
483
  })
484
484
  })
485
485
  ]
486
486
  }),
487
- ae && /* @__PURE__ */ K(wt, {
487
+ ne && /* @__PURE__ */ J(St, {
488
488
  fallback: null,
489
- children: /* @__PURE__ */ K(Mt, {
489
+ children: /* @__PURE__ */ J(At, {
490
490
  disabled: t,
491
491
  field: n,
492
492
  id: "flow-name",
493
- issue: vt(ce),
493
+ issue: gt(ie),
494
494
  label: S("resource.flowName"),
495
- name: ce,
496
- onNameChange: de,
497
- onOpenChange: O,
498
- onSubmit: (e) => void M(e),
495
+ name: ie,
496
+ onNameChange: P,
497
+ onOpenChange: j,
498
+ onSubmit: (e) => void ce(e),
499
499
  pending: w == "flow",
500
500
  title: S("resource.newFlow")
501
501
  })
@@ -506,28 +506,28 @@ function Lt({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBa
506
506
  }
507
507
  //#endregion
508
508
  //#region ../../node_modules/.bun/dequal@2.0.3/node_modules/dequal/dist/index.mjs
509
- var Rt = Object.prototype.hasOwnProperty;
510
- function zt(e, t, n) {
511
- for (n of e.keys()) if (Z(n, t)) return n;
509
+ var It = Object.prototype.hasOwnProperty;
510
+ function Lt(e, t, n) {
511
+ for (n of e.keys()) if ($(n, t)) return n;
512
512
  }
513
- function Z(e, t) {
513
+ function $(e, t) {
514
514
  var n, r, i;
515
515
  if (e === t) return !0;
516
516
  if (e && t && (n = e.constructor) === t.constructor) {
517
517
  if (n === Date) return e.getTime() === t.getTime();
518
518
  if (n === RegExp) return e.toString() === t.toString();
519
519
  if (n === Array) {
520
- if ((r = e.length) === t.length) for (; r-- && Z(e[r], t[r]););
520
+ if ((r = e.length) === t.length) for (; r-- && $(e[r], t[r]););
521
521
  return r === -1;
522
522
  }
523
523
  if (n === Set) {
524
524
  if (e.size !== t.size) return !1;
525
- for (r of e) if (i = r, i && typeof i == "object" && (i = zt(t, i), !i) || !t.has(i)) return !1;
525
+ for (r of e) if (i = r, i && typeof i == "object" && (i = Lt(t, i), !i) || !t.has(i)) return !1;
526
526
  return !0;
527
527
  }
528
528
  if (n === Map) {
529
529
  if (e.size !== t.size) return !1;
530
- for (r of e) if (i = r[0], i && typeof i == "object" && (i = zt(t, i), !i) || !Z(r[1], t.get(i))) return !1;
530
+ for (r of e) if (i = r[0], i && typeof i == "object" && (i = Lt(t, i), !i) || !$(r[1], t.get(i))) return !1;
531
531
  return !0;
532
532
  }
533
533
  if (n === ArrayBuffer) e = new Uint8Array(e), t = new Uint8Array(t);
@@ -540,7 +540,7 @@ function Z(e, t) {
540
540
  return r === -1;
541
541
  }
542
542
  if (!n || typeof e == "object") {
543
- for (n in r = 0, e) if (Rt.call(e, n) && ++r && !Rt.call(t, n) || !(n in t) || !Z(e[n], t[n])) return !1;
543
+ for (n in r = 0, e) if (It.call(e, n) && ++r && !It.call(t, n) || !(n in t) || !$(e[n], t[n])) return !1;
544
544
  return Object.keys(t).length === r;
545
545
  }
546
546
  }
@@ -548,7 +548,7 @@ function Z(e, t) {
548
548
  }
549
549
  //#endregion
550
550
  //#region ../../node_modules/.bun/nanoid@6.0.1/node_modules/nanoid/index.browser.js
551
- var Bt = (e) => crypto.getRandomValues(new Uint8Array(e)), Vt = (e, t, n) => {
551
+ var Rt = (e) => crypto.getRandomValues(new Uint8Array(e)), zt = (e, t, n) => {
552
552
  let r = 256 - 256 % e.length;
553
553
  if (r === 256) {
554
554
  let r = e.length - 1;
@@ -570,29 +570,29 @@ var Bt = (e) => crypto.getRandomValues(new Uint8Array(e)), Vt = (e, t, n) => {
570
570
  for (; s--;) if (t[s] < r && (o += e[t[s] % e.length], o.length >= a)) return o;
571
571
  }
572
572
  };
573
- }, Ht = (e, t = 21) => Vt(e, t | 0, Bt);
573
+ }, Bt = (e, t = 21) => zt(e, t | 0, Rt);
574
574
  //#endregion
575
575
  //#region src/flow/common/edgeChanges.ts
576
- function Ut(e, t, n) {
577
- return Gt(e, t)?.edges.some((e) => u(e, n)) ? [] : [{
576
+ function Vt(e, t, n) {
577
+ return Ut(e, t)?.edges.some((e) => u(e, n)) ? [] : [{
578
578
  edge: n,
579
579
  kind: "graph.edge.connect",
580
580
  target: t
581
581
  }];
582
582
  }
583
- function Wt(e, t, n) {
584
- return Gt(e, t)?.edges.some((e) => u(e, n)) ? [{
583
+ function Ht(e, t, n) {
584
+ return Ut(e, t)?.edges.some((e) => u(e, n)) ? [{
585
585
  edge: n,
586
586
  kind: "graph.edge.disconnect",
587
587
  target: t
588
588
  }] : [];
589
589
  }
590
- function Gt(e, t) {
590
+ function Ut(e, t) {
591
591
  return t.kind == "flow" ? e.document.graph : e.document.subflows[t.id]?.graph;
592
592
  }
593
593
  //#endregion
594
594
  //#region src/flow/common/moduleChanges.ts
595
- async function Kt(e) {
595
+ async function Wt(e) {
596
596
  try {
597
597
  let { parse: t } = await import("./lib-C5Ipyfps.js").then((e) => e.t), n = t(e, {
598
598
  errorRecovery: !0,
@@ -608,7 +608,7 @@ async function Kt(e) {
608
608
  return [];
609
609
  }
610
610
  }
611
- function qt(e, t, n, r, i) {
611
+ function Gt(e, t, n, r, i) {
612
612
  return [{
613
613
  beforeImports: n,
614
614
  beforeSource: t,
@@ -618,7 +618,7 @@ function qt(e, t, n, r, i) {
618
618
  source: r
619
619
  }];
620
620
  }
621
- var Jt = Ht("23456789abcdefghjkmnpqrstuvwxyz", 10), Yt = {
621
+ var Kt = Bt("23456789abcdefghjkmnpqrstuvwxyz", 10), qt = {
622
622
  activities: [],
623
623
  activitiesLoadFailed: !1,
624
624
  activitiesLoading: !1,
@@ -633,25 +633,25 @@ var Jt = Ht("23456789abcdefghjkmnpqrstuvwxyz", 10), Yt = {
633
633
  publications: [],
634
634
  publishing: !1,
635
635
  refreshing: !1
636
- }, Xt = 20, Zt = 50, Qt = 750;
637
- function Q(e, t) {
636
+ }, Jt = 20, Yt = 50, Xt = 750;
637
+ function Zt(e, t) {
638
638
  return e?.flowId == t.flowId;
639
639
  }
640
- var $t = class {
640
+ var Qt = class {
641
641
  #e;
642
642
  #t;
643
643
  #n;
644
- #r = new L();
645
- #i = new L();
644
+ #r = new z();
645
+ #i = new z();
646
646
  #a;
647
- #o = new L();
648
- #s = new L();
647
+ #o = new z();
648
+ #s = new z();
649
649
  #c;
650
- #l = n(Yt);
650
+ #l = n(qt);
651
651
  #u;
652
652
  #d;
653
653
  #f;
654
- constructor(t, n, r, i, a = P, o = p()) {
654
+ constructor(t, n, r, i, a = L, o = p()) {
655
655
  this.#e = t, this.#t = a, this.#n = o, this.#a = i, this.#c = r, this.#u = n, this.$ = {
656
656
  activities: e(this.#l, (e) => e.activities),
657
657
  activitiesLoadFailed: e(this.#l, (e) => e.activitiesLoadFailed),
@@ -685,17 +685,17 @@ var $t = class {
685
685
  this.#l.dispose();
686
686
  }
687
687
  reset() {
688
- this.#r.invalidate(), this.#i.invalidate(), this.#y(), this.#o.invalidate(), this.#s.invalidate(), this.#f = void 0, this.#l.set(Yt);
688
+ this.#r.invalidate(), this.#i.invalidate(), this.#y(), this.#o.invalidate(), this.#s.invalidate(), this.#f = void 0, this.#l.set(qt);
689
689
  }
690
690
  async load(e) {
691
- let t = { flowId: e }, n = this.#l.value, r = n.loaded && Q(n.target, t), i = this.#r.begin();
692
- Q(n.target, t) || (this.#i.invalidate(), this.#y(), this.#f = void 0), r ? this.#S({
691
+ let t = { flowId: e }, n = this.#l.value, r = n.loaded && Zt(n.target, t), i = this.#r.begin();
692
+ Zt(n.target, t) || (this.#i.invalidate(), this.#y(), this.#f = void 0), r ? this.#S({
693
693
  loadFailed: !1,
694
694
  loadingMore: !1,
695
695
  loadMoreFailed: !1,
696
696
  refreshing: !0
697
697
  }) : this.#l.set({
698
- ...Yt,
698
+ ...qt,
699
699
  loading: !0,
700
700
  target: t
701
701
  });
@@ -725,7 +725,7 @@ var $t = class {
725
725
  loadFailed: !r,
726
726
  loading: !1,
727
727
  refreshing: !1
728
- }), this.#c(B(e, this.#n.t));
728
+ }), this.#c(H(e, this.#n.t));
729
729
  }
730
730
  }
731
731
  async loadMore() {
@@ -739,7 +739,7 @@ var $t = class {
739
739
  try {
740
740
  let e = await this.#e.listPublications(n.flowId, {
741
741
  cursor: t,
742
- limit: Zt
742
+ limit: Yt
743
743
  });
744
744
  if (!r()) return;
745
745
  let i = new Set(this.#l.value.publications.map((e) => e.publicationId));
@@ -754,7 +754,7 @@ var $t = class {
754
754
  this.#S({
755
755
  loadMoreFailed: !0,
756
756
  loadingMore: !1
757
- }), this.#c(B(e, this.#n.t));
757
+ }), this.#c(H(e, this.#n.t));
758
758
  }
759
759
  }
760
760
  async publish() {
@@ -781,7 +781,7 @@ var $t = class {
781
781
  publishing: e.status == "pending"
782
782
  }), await this.#_(r, e, s, t.name)) : !1;
783
783
  } catch (e) {
784
- return s() ? (e instanceof U && e.code == "live.conflict" && await this.#m(r), this.#c(B(e, this.#n.t)), !1) : !1;
784
+ return s() ? (e instanceof G && e.code == "live.conflict" && await this.#m(r), this.#c(H(e, this.#n.t)), !1) : !1;
785
785
  } finally {
786
786
  s() && this.#S({ publishing: !1 });
787
787
  }
@@ -807,7 +807,7 @@ var $t = class {
807
807
  message: this.#n.t("notice.rolledBack", { revision: e.revisionId })
808
808
  }), !0);
809
809
  } catch (e) {
810
- return s() ? (e instanceof U && e.code == "live.conflict" && await this.#m(r), this.#c(B(e, this.#n.t)), !1) : !1;
810
+ return s() ? (e instanceof G && e.code == "live.conflict" && await this.#m(r), this.#c(H(e, this.#n.t)), !1) : !1;
811
811
  } finally {
812
812
  s() && this.#S({ rollingBackPublicationId: void 0 });
813
813
  }
@@ -842,13 +842,13 @@ var $t = class {
842
842
  testingTriggerId: void 0,
843
843
  testResult: void 0
844
844
  });
845
- let [r, i] = await Promise.allSettled([this.#e.getFlowTriggerBinding(t.flowId, e), this.#e.listFlowTriggerActivities(t.flowId, e, { limit: Xt })]);
845
+ let [r, i] = await Promise.allSettled([this.#e.getFlowTriggerBinding(t.flowId, e), this.#e.listFlowTriggerActivities(t.flowId, e, { limit: Jt })]);
846
846
  if (n()) {
847
847
  if (r.status == "rejected") {
848
848
  this.#S({
849
849
  activitiesLoading: !1,
850
850
  detailLoading: !1
851
- }), this.#c(B(r.reason, this.#n.t));
851
+ }), this.#c(H(r.reason, this.#n.t));
852
852
  return;
853
853
  }
854
854
  this.#S({
@@ -862,7 +862,7 @@ var $t = class {
862
862
  }) : (this.#S({
863
863
  activitiesLoadFailed: !0,
864
864
  activitiesLoading: !1
865
- }), this.#c(B(i.reason, this.#n.t)));
865
+ }), this.#c(H(i.reason, this.#n.t)));
866
866
  }
867
867
  }
868
868
  async loadMoreTriggerActivities() {
@@ -876,7 +876,7 @@ var $t = class {
876
876
  try {
877
877
  let e = await this.#e.listFlowTriggerActivities(r.flowId, n, {
878
878
  cursor: t,
879
- limit: Xt
879
+ limit: Jt
880
880
  });
881
881
  if (!i() || this.#l.value.selectedTriggerId != n) return;
882
882
  let a = new Set(this.#l.value.activities.map((e) => e.activityId));
@@ -891,7 +891,7 @@ var $t = class {
891
891
  this.#S({
892
892
  activitiesLoadFailed: !0,
893
893
  activitiesLoadingMore: !1
894
- }), this.#c(B(e, this.#n.t));
894
+ }), this.#c(H(e, this.#n.t));
895
895
  }
896
896
  }
897
897
  async testTrigger() {
@@ -906,7 +906,7 @@ var $t = class {
906
906
  let e = await this.#e.testFlowPollTrigger(n.flowId, t);
907
907
  return !i() || this.#l.value.selectedTriggerId != t ? !1 : (this.#S({ testResult: e }), !0);
908
908
  } catch (e) {
909
- return i() && this.#l.value.selectedTriggerId == t && this.#c(B(e, this.#n.t)), !1;
909
+ return i() && this.#l.value.selectedTriggerId == t && this.#c(H(e, this.#n.t)), !1;
910
910
  } finally {
911
911
  i() && this.#l.value.selectedTriggerId == t && this.#S({ testingTriggerId: void 0 });
912
912
  }
@@ -925,16 +925,16 @@ var $t = class {
925
925
  message: this.#n.t(e.operatorState == "active" ? "notice.triggerPaused" : "notice.triggerResumed")
926
926
  }), !0) : !1;
927
927
  } catch (e) {
928
- return n() && this.#c(B(e, this.#n.t)), !1;
928
+ return n() && this.#c(H(e, this.#n.t)), !1;
929
929
  } finally {
930
930
  n() && this.#S({ changingTriggerId: void 0 });
931
931
  }
932
932
  }
933
933
  async #p(e, t) {
934
934
  let n = this.#r.begin(), [r, i, a] = await this.#h(e, t).catch((t) => {
935
- throw n() && Q(this.#l.value.target, e) && this.#S({ refreshing: !1 }), t;
935
+ throw n() && Zt(this.#l.value.target, e) && this.#S({ refreshing: !1 }), t;
936
936
  });
937
- t?.throwIfAborted(), n() && this.#u.updateLive(r), n() && Q(this.#l.value.target, e) && this.#S({
937
+ t?.throwIfAborted(), n() && this.#u.updateLive(r), n() && Zt(this.#l.value.target, e) && this.#S({
938
938
  bindings: a,
939
939
  live: r,
940
940
  loaded: !0,
@@ -958,7 +958,7 @@ var $t = class {
958
958
  this.#e.getLive(e.flowId, t),
959
959
  this.#e.listPublications(e.flowId, {
960
960
  includeTotal: !0,
961
- limit: Zt
961
+ limit: Yt
962
962
  }, t),
963
963
  this.#e.listFlowTriggerBindings(e.flowId, t)
964
964
  ]);
@@ -968,7 +968,7 @@ var $t = class {
968
968
  if (t != null && t != "") try {
969
969
  return await this.#e.getPublishOperation(e.flowId, t);
970
970
  } catch (t) {
971
- if (t instanceof U && t.code == "publication.operation-not-found") {
971
+ if (t instanceof G && t.code == "publication.operation-not-found") {
972
972
  this.#a.setItem(this.#b(e.flowId), "");
973
973
  return;
974
974
  }
@@ -977,7 +977,7 @@ var $t = class {
977
977
  }
978
978
  async #_(e, t, n, r) {
979
979
  this.#y();
980
- let i = X.runFork(X.gen({ self: this }, function* () {
980
+ let i = Q.runFork(Q.gen({ self: this }, function* () {
981
981
  let i = yield* this.#v(e, t, n);
982
982
  if (i == null || !n()) return !1;
983
983
  if (this.#f = void 0, this.#x(e, {
@@ -987,11 +987,11 @@ var $t = class {
987
987
  kind: "error",
988
988
  message: i.issue.message
989
989
  }), !1;
990
- let a = yield* X.tryPromise({
990
+ let a = yield* Q.tryPromise({
991
991
  try: (t) => this.#p(e, t),
992
992
  catch: (e) => e
993
- }).pipe(X.match({
994
- onFailure: (e) => (n() && this.#c(B(e, this.#n.t)), !1),
993
+ }).pipe(Q.match({
994
+ onFailure: (e) => (n() && this.#c(H(e, this.#n.t)), !1),
995
995
  onSuccess: () => !0
996
996
  }));
997
997
  return n() ? (a && this.#c({
@@ -1000,34 +1000,34 @@ var $t = class {
1000
1000
  }), !0) : !1;
1001
1001
  }));
1002
1002
  this.#d = i;
1003
- let a = await X.runPromiseExit(kt.join(i));
1004
- if (Ot.isSuccess(a)) return a.value;
1005
- if (Dt.hasInterruptsOnly(a.cause)) return !1;
1006
- throw Dt.squash(a.cause);
1003
+ let a = await Q.runPromiseExit(Dt.join(i));
1004
+ if (Et.isSuccess(a)) return a.value;
1005
+ if (Tt.hasInterruptsOnly(a.cause)) return !1;
1006
+ throw Tt.squash(a.cause);
1007
1007
  }
1008
1008
  #v(e, t, n) {
1009
- return X.gen({ self: this }, function* () {
1009
+ return Q.gen({ self: this }, function* () {
1010
1010
  let r = t;
1011
1011
  for (; r.status == "pending";) {
1012
- if (yield* X.sleep(Qt), !n()) return;
1013
- let t = yield* X.tryPromise({
1012
+ if (yield* Q.sleep(Xt), !n()) return;
1013
+ let t = yield* Q.tryPromise({
1014
1014
  try: (t) => this.#e.getPublishOperation(e.flowId, r.operationId, t),
1015
1015
  catch: (e) => e
1016
- }).pipe(X.match({
1016
+ }).pipe(Q.match({
1017
1017
  onFailure: (e) => ({ error: e }),
1018
1018
  onSuccess: (e) => ({ value: e })
1019
1019
  }));
1020
1020
  if (!n()) return;
1021
1021
  if ("error" in t) {
1022
1022
  let n = t.error;
1023
- if (n instanceof U && n.code == "publication.operation-not-found") {
1023
+ if (n instanceof G && n.code == "publication.operation-not-found") {
1024
1024
  this.#a.setItem(this.#b(e.flowId), ""), this.#x(e, {
1025
1025
  operation: void 0,
1026
1026
  publishing: !1
1027
- }), this.#c(B(n, this.#n.t));
1027
+ }), this.#c(H(n, this.#n.t));
1028
1028
  return;
1029
1029
  }
1030
- this.#c(B(n, this.#n.t));
1030
+ this.#c(H(n, this.#n.t));
1031
1031
  continue;
1032
1032
  }
1033
1033
  r = t.value, this.#x(e, { operation: r });
@@ -1042,8 +1042,8 @@ var $t = class {
1042
1042
  return `publish-operation:${e}`;
1043
1043
  }
1044
1044
  #x(e, t) {
1045
- Q(this.#l.value.target, e) ? this.#S(t) : this.#l.set({
1046
- ...Yt,
1045
+ Zt(this.#l.value.target, e) ? this.#S(t) : this.#l.set({
1046
+ ...qt,
1047
1047
  ...t,
1048
1048
  target: e
1049
1049
  });
@@ -1054,21 +1054,21 @@ var $t = class {
1054
1054
  ...e
1055
1055
  });
1056
1056
  }
1057
- }, en = { starting: !1 };
1058
- function tn(e) {
1057
+ }, $t = { starting: !1 };
1058
+ function en(e) {
1059
1059
  switch (e.kind) {
1060
1060
  case "condition": return { [e.node.input.handle]: e.node.input };
1061
- case "subflow": return tt(e.definition?.inputs ?? []);
1062
- case "task": return tt(e.definition?.inputs ?? []);
1061
+ case "subflow": return $e(e.definition?.inputs ?? []);
1062
+ case "task": return $e(e.definition?.inputs ?? []);
1063
1063
  case "value": return {};
1064
1064
  case "wait": return { [e.node.input.handle]: e.node.input };
1065
1065
  }
1066
1066
  }
1067
- function nn(e) {
1067
+ function tn(e) {
1068
1068
  return e.node.name == null ? e.kind == "task" || e.kind == "subflow" ? e.definition?.name ?? e.id : e.id : e.node.name;
1069
1069
  }
1070
- function rn(e, t) {
1071
- let n = z(e), r = n.graph({ kind: "flow" });
1070
+ function nn(e, t) {
1071
+ let n = B(e), r = n.graph({ kind: "flow" });
1072
1072
  if (r == null) return [];
1073
1073
  let i = /* @__PURE__ */ new Set([t]), a = [t];
1074
1074
  for (; a.length > 0;) {
@@ -1078,15 +1078,11 @@ function rn(e, t) {
1078
1078
  return Object.entries(r.nodes).filter(([e]) => i.has(e)).toSorted(([e], [t]) => e.localeCompare(t)).flatMap(([e, t]) => {
1079
1079
  let r = n.resolveNode(e, t);
1080
1080
  if (r.kind == "trigger") return r.trigger.kind == "manual" || r.trigger.kind == "cron" ? [] : [{
1081
- definitions: [{
1082
- handle: "payload",
1083
- jsonSchema: He(r.trigger),
1084
- nullable: !1
1085
- }],
1081
+ definitions: me(r.trigger),
1086
1082
  nodeId: e,
1087
1083
  title: r.trigger.name
1088
1084
  }];
1089
- let i = Object.entries(tn(r)).filter(([e, t]) => r.node.inputs[e] == null && !Object.hasOwn(t, "value")).toSorted(([e], [t]) => e.localeCompare(t)).map(([e, t]) => Object.assign({
1085
+ let i = Object.entries(en(r)).filter(([e, t]) => r.node.inputs[e] == null && !Object.hasOwn(t, "value")).toSorted(([e], [t]) => e.localeCompare(t)).map(([e, t]) => Object.assign({
1090
1086
  handle: e,
1091
1087
  jsonSchema: t.jsonSchema,
1092
1088
  nullable: t.nullable
@@ -1094,18 +1090,18 @@ function rn(e, t) {
1094
1090
  return i.length == 0 ? [] : [{
1095
1091
  definitions: i,
1096
1092
  nodeId: e,
1097
- title: nn(r)
1093
+ title: tn(r)
1098
1094
  }];
1099
1095
  });
1100
1096
  }
1101
- function an(e) {
1097
+ function rn(e) {
1102
1098
  return JSON.stringify(e.map((e) => [e.nodeId, e.definitions.map((e) => [
1103
1099
  e.handle,
1104
1100
  e.jsonSchema,
1105
1101
  e.nullable
1106
1102
  ])]));
1107
1103
  }
1108
- async function on(e, t, n) {
1104
+ async function an(e, t, n) {
1109
1105
  let { FlowRunInputEditorStore: r } = await import("./flowRunInputEditorStore-BBqQIOCR.js").then((e) => e.n);
1110
1106
  return e.map((e) => {
1111
1107
  let i = new r(e.definitions, t);
@@ -1116,13 +1112,16 @@ async function on(e, t, n) {
1116
1112
  };
1117
1113
  });
1118
1114
  }
1119
- function sn(e) {
1115
+ function on(e) {
1120
1116
  return Object.fromEntries(e.map((e) => [e.nodeId, e.editor.values()]));
1121
1117
  }
1122
- function cn(e, t) {
1118
+ function sn(e, t) {
1119
+ return B(e).graph({ kind: "flow" })?.nodes[t]?.kind === "cron" ? { scheduledAt: (/* @__PURE__ */ new Date()).toISOString() } : {};
1120
+ }
1121
+ function cn(e, t, n) {
1123
1122
  return {
1124
1123
  inputs: Object.fromEntries(e.filter((e) => e.nodeId != t).map((e) => [e.nodeId, e.editor.values()])),
1125
- payload: e.find((e) => e.nodeId == t)?.editor.values().payload ?? {}
1124
+ outputs: e.find((e) => e.nodeId == t)?.editor.values() ?? sn(n, t)
1126
1125
  };
1127
1126
  }
1128
1127
  var ln = class {
@@ -1130,14 +1129,14 @@ var ln = class {
1130
1129
  #t;
1131
1130
  #n;
1132
1131
  #r;
1133
- #i = new L();
1134
- #a = new L();
1132
+ #i = new z();
1133
+ #a = new z();
1135
1134
  #o;
1136
1135
  #s = /* @__PURE__ */ new Map();
1137
1136
  #c;
1138
- #l = n(en);
1137
+ #l = n($t);
1139
1138
  #u;
1140
- constructor(t, n, r, i, a = p(), o = P) {
1139
+ constructor(t, n, r, i, a = p(), o = L) {
1141
1140
  this.#e = i, this.#t = t, this.#o = n, this.#c = r, this.#r = a, this.#n = o, this.$ = {
1142
1141
  inputRequest: e(this.#l, (e) => e.inputRequest),
1143
1142
  starting: e(this.#l, (e) => e.starting),
@@ -1152,14 +1151,14 @@ var ln = class {
1152
1151
  reset() {
1153
1152
  this.#i.invalidate(), this.#a.invalidate(), this.#u = void 0;
1154
1153
  let e = this.#l.value.inputRequest;
1155
- this.#h(e), this.#l.set(en), this.#p(e);
1154
+ this.#h(e), this.#l.set($t), this.#p(e);
1156
1155
  }
1157
1156
  async requestDraft(e, t, n) {
1158
1157
  let r = this.#a.begin();
1159
1158
  try {
1160
1159
  return await this.#d("draft", e, t, t.revisionId, r, void 0, n);
1161
1160
  } catch (e) {
1162
- return r() && this.#c(B(e, this.#r.t)), "unavailable";
1161
+ return r() && this.#c(H(e, this.#r.t)), "unavailable";
1163
1162
  } finally {
1164
1163
  r() && this.#g({ starting: !1 });
1165
1164
  }
@@ -1169,16 +1168,16 @@ var ln = class {
1169
1168
  try {
1170
1169
  return await this.#d("draft", e, t, t.revisionId, r, void 0, n, !0);
1171
1170
  } catch (e) {
1172
- return r() && this.#c(B(e, this.#r.t)), "unavailable";
1171
+ return r() && this.#c(H(e, this.#r.t)), "unavailable";
1173
1172
  } finally {
1174
1173
  r() && this.#g({ starting: !1 });
1175
1174
  }
1176
1175
  }
1177
1176
  inputStatus(e, t, n) {
1178
- let r = rn(t, n);
1177
+ let r = nn(t, n);
1179
1178
  if (r.length == 0) return "none";
1180
1179
  let i = this.#s.get(this.#m(e, n));
1181
- return i?.valid == 1 && i.signature == an(r) ? "ready" : "missing";
1180
+ return i?.valid == 1 && i.signature == rn(r) ? "ready" : "missing";
1182
1181
  }
1183
1182
  async requestLive(e) {
1184
1183
  let t = this.#a.begin();
@@ -1189,7 +1188,7 @@ var ln = class {
1189
1188
  let r = await this.#t.getRevision(e.flowId, n.revisionId);
1190
1189
  return t() ? await this.#d("live", e, r, n.revisionId, t, n.publicationId) : "unavailable";
1191
1190
  } catch (e) {
1192
- return t() && this.#c(B(e, this.#r.t)), "unavailable";
1191
+ return t() && this.#c(H(e, this.#r.t)), "unavailable";
1193
1192
  } finally {
1194
1193
  t() && this.#g({ starting: !1 });
1195
1194
  }
@@ -1206,9 +1205,9 @@ var ln = class {
1206
1205
  attempted: !0
1207
1206
  } }), !1;
1208
1207
  this.#h(e);
1209
- let { inputs: t, payload: n } = cn(e.groups, e.triggerId), r = await this.#f(e.source, e.flow, e.revisionId, {
1208
+ let { inputs: t, outputs: n } = cn(e.groups, e.triggerId, e.revision), r = await this.#f(e.source, e.flow, e.revisionId, {
1210
1209
  nodeId: e.triggerId,
1211
- payload: n
1210
+ outputs: n
1212
1211
  }, t, e.publicationId);
1213
1212
  return r && this.#l.value.inputRequest === e && this.dismissInputs(), r;
1214
1213
  }
@@ -1218,7 +1217,7 @@ var ln = class {
1218
1217
  let r = this.#a.begin();
1219
1218
  this.#h(n), this.#g({ starting: !0 });
1220
1219
  try {
1221
- let i = rn(n.revision, e), a = this.#s.get(this.#m(n.flow.flowId, e)), o = await on(i, this.#r.lang$, a?.values);
1220
+ let i = nn(n.revision, e), a = this.#s.get(this.#m(n.flow.flowId, e)), o = await an(i, this.#r.lang$, a?.values);
1222
1221
  if (!r() || this.#l.value.inputRequest !== n) {
1223
1222
  for (let e of o) e.editor.dispose();
1224
1223
  return;
@@ -1232,7 +1231,7 @@ var ln = class {
1232
1231
  valid: s
1233
1232
  } }), this.#p(n);
1234
1233
  } catch (e) {
1235
- r() && this.#c(B(e, this.#r.t));
1234
+ r() && this.#c(H(e, this.#r.t));
1236
1235
  } finally {
1237
1236
  r() && this.#g({ starting: !1 });
1238
1237
  }
@@ -1244,7 +1243,7 @@ var ln = class {
1244
1243
  starting: !c,
1245
1244
  submitting: void 0
1246
1245
  }), this.#p(l);
1247
- let u = z(r).graph({ kind: "flow" }), d = Object.entries(u?.nodes ?? {}).flatMap(([e, t]) => "inputs" in t ? [] : [{
1246
+ let u = B(r).graph({ kind: "flow" }), d = Object.entries(u?.nodes ?? {}).flatMap(([e, t]) => "inputs" in t ? [] : [{
1248
1247
  nodeId: e,
1249
1248
  title: t.name
1250
1249
  }]);
@@ -1257,21 +1256,21 @@ var ln = class {
1257
1256
  kind: "error",
1258
1257
  message: this.#r.t("runInput.selectTrigger")
1259
1258
  }), "unavailable";
1260
- let p = f == null ? [] : rn(r, f.nodeId), m = an(p), h = f == null ? void 0 : this.#s.get(this.#m(n.flowId, f.nodeId)), g = f == null ? [] : await on(p, this.#r.lang$, h?.values);
1259
+ let p = f == null ? [] : nn(r, f.nodeId), m = rn(p), h = f == null ? void 0 : this.#s.get(this.#m(n.flowId, f.nodeId)), g = f == null ? [] : await an(p, this.#r.lang$, h?.values);
1261
1260
  if (!a()) {
1262
1261
  for (let e of g) e.editor.dispose();
1263
1262
  return "unavailable";
1264
1263
  }
1265
1264
  if (!c && f != null && g.length == 0) return await this.#f(e, n, i, {
1266
1265
  nodeId: f.nodeId,
1267
- payload: {}
1266
+ outputs: sn(r, f.nodeId)
1268
1267
  }, {}, o) ? "started" : "unavailable";
1269
1268
  if (!c && f != null && h?.valid == 1 && h.signature == m && g.every((e) => e.editor.valid$.value)) {
1270
- let t = cn(g, f.nodeId);
1269
+ let t = cn(g, f.nodeId, r);
1271
1270
  for (let e of g) e.editor.dispose();
1272
1271
  return await this.#f(e, n, i, {
1273
1272
  nodeId: f.nodeId,
1274
- payload: t.payload
1273
+ outputs: t.outputs
1275
1274
  }, t.inputs, o) ? "started" : "unavailable";
1276
1275
  }
1277
1276
  let _ = t((e) => f != null && g.every((t) => e(t.editor.valid$)));
@@ -1329,7 +1328,7 @@ var ln = class {
1329
1328
  });
1330
1329
  return !o() || !s() ? !1 : (this.#u = void 0, this.#o.follow(d, s));
1331
1330
  } catch (e) {
1332
- return o() && s() && this.#c(B(e, this.#r.t)), !1;
1331
+ return o() && s() && this.#c(H(e, this.#r.t)), !1;
1333
1332
  } finally {
1334
1333
  o() && this.#g({
1335
1334
  starting: !1,
@@ -1348,9 +1347,9 @@ var ln = class {
1348
1347
  }
1349
1348
  #h(e) {
1350
1349
  e?.triggerId != null && e.groups.length != 0 && this.#s.set(this.#m(e.flow.flowId, e.triggerId), {
1351
- signature: an(rn(e.revision, e.triggerId)),
1350
+ signature: rn(nn(e.revision, e.triggerId)),
1352
1351
  valid: e.valid.value,
1353
- values: sn(e.groups)
1352
+ values: on(e.groups)
1354
1353
  });
1355
1354
  }
1356
1355
  #g(e) {
@@ -1374,13 +1373,13 @@ function un(e, t) {
1374
1373
  };
1375
1374
  }
1376
1375
  function dn(e) {
1377
- let t = G(e);
1376
+ let t = q(e);
1378
1377
  if (t == null || t.type != "object" && t.properties == null) throw Error("Connector action inputSchema must be an object schema.");
1379
- let n = G(t.properties);
1378
+ let n = q(t.properties);
1380
1379
  if (n == null) return [];
1381
1380
  let r = gn(t.required);
1382
1381
  return Object.entries(n).map(([e, n]) => {
1383
- let i = !r.has(e) || $(n, t);
1382
+ let i = !r.has(e) || _n(n, t);
1384
1383
  return {
1385
1384
  description: mn(t, n),
1386
1385
  handle: e,
@@ -1391,7 +1390,7 @@ function dn(e) {
1391
1390
  });
1392
1391
  }
1393
1392
  function fn(e) {
1394
- let t = G(e), n = G(t?.properties);
1393
+ let t = q(e), n = q(t?.properties);
1395
1394
  if (t != null && (t.type == "object" || n != null)) {
1396
1395
  if (n == null) return [];
1397
1396
  let e = gn(t.required);
@@ -1399,64 +1398,64 @@ function fn(e) {
1399
1398
  description: mn(t, r),
1400
1399
  handle: n,
1401
1400
  json_schema: pn(t, r),
1402
- nullable: !e.has(n) || $(r, t)
1401
+ nullable: !e.has(n) || _n(r, t)
1403
1402
  }));
1404
1403
  }
1405
1404
  return [{
1406
1405
  description: mn(t, e),
1407
1406
  handle: "output",
1408
1407
  json_schema: e,
1409
- nullable: $(e)
1408
+ nullable: _n(e)
1410
1409
  }];
1411
1410
  }
1412
1411
  function pn(e, t) {
1413
- let n = G(t);
1412
+ let n = q(t);
1414
1413
  if (n == null) return t;
1415
1414
  let r = Object.assign({}, n);
1416
1415
  return r.$defs == null && e.$defs != null && (r.$defs = e.$defs), r.definitions == null && e.definitions != null && (r.definitions = e.definitions), r;
1417
1416
  }
1418
1417
  function mn(e, t) {
1419
- for (let n of _n(e, t)) if (typeof n.description == "string") return n.description;
1418
+ for (let n of vn(e, t)) if (typeof n.description == "string") return n.description;
1420
1419
  }
1421
1420
  function hn(e, t, n) {
1422
- for (let n of _n(e, t)) if (Object.hasOwn(n, "default")) return n.default;
1421
+ for (let n of vn(e, t)) if (Object.hasOwn(n, "default")) return n.default;
1423
1422
  return n ? null : void 0;
1424
1423
  }
1425
1424
  function gn(e) {
1426
1425
  return Array.isArray(e) ? new Set(e.filter((e) => typeof e == "string")) : /* @__PURE__ */ new Set();
1427
1426
  }
1428
- function $(e, t = e, n = /* @__PURE__ */ new Set()) {
1429
- let r = G(e);
1427
+ function _n(e, t = e, n = /* @__PURE__ */ new Set()) {
1428
+ let r = q(e);
1430
1429
  if (r == null) return !1;
1431
1430
  if (Object.hasOwn(r, "type")) return r.type == "null" || Array.isArray(r.type) && r.type.includes("null");
1432
1431
  if (Object.hasOwn(r, "enum")) return Array.isArray(r.enum) && r.enum.includes(null);
1433
- for (let e of ["anyOf", "oneOf"]) if (Object.hasOwn(r, e)) return Array.isArray(r[e]) && r[e].some((e) => $(e, t, n));
1432
+ for (let e of ["anyOf", "oneOf"]) if (Object.hasOwn(r, e)) return Array.isArray(r[e]) && r[e].some((e) => _n(e, t, n));
1434
1433
  let i = typeof r.$ref == "string" ? r.$ref : void 0;
1435
1434
  if (i == null || n.has(i)) return !1;
1436
- let a = vn(t, i);
1435
+ let a = yn(t, i);
1437
1436
  if (a === void 0) return !1;
1438
1437
  let o = new Set(n);
1439
- return o.add(i), $(a, t, o);
1438
+ return o.add(i), _n(a, t, o);
1440
1439
  }
1441
- function _n(e, t) {
1440
+ function vn(e, t) {
1442
1441
  let n = [], r = /* @__PURE__ */ new Set(), i = t;
1443
1442
  for (;;) {
1444
- let t = G(i);
1443
+ let t = q(i);
1445
1444
  if (t == null) return n;
1446
1445
  n.push(t);
1447
1446
  let a = typeof t.$ref == "string" ? t.$ref : void 0;
1448
1447
  if (a == null || r.has(a)) return n;
1449
- let o = vn(e, a);
1448
+ let o = yn(e, a);
1450
1449
  if (o === void 0) return n;
1451
1450
  r.add(a), i = o;
1452
1451
  }
1453
1452
  }
1454
- function vn(e, t) {
1453
+ function yn(e, t) {
1455
1454
  if (t == "#") return e;
1456
1455
  if (!t.startsWith("#/")) return;
1457
1456
  let n = e;
1458
1457
  for (let e of t.slice(2).split("/")) {
1459
- let t = G(n), r = e.replaceAll("~1", "/").replaceAll("~0", "~");
1458
+ let t = q(n), r = e.replaceAll("~1", "/").replaceAll("~0", "~");
1460
1459
  if (t == null || !Object.hasOwn(t, r)) return;
1461
1460
  n = t[r];
1462
1461
  }
@@ -1464,43 +1463,43 @@ function vn(e, t) {
1464
1463
  }
1465
1464
  //#endregion
1466
1465
  //#region src/workbench/browser/runtime/stores/proxyCatalog.ts
1467
- function yn(e, t) {
1468
- let n = pe(e);
1469
- if (n.success === !1) throw new U(502, typeof n.errorCode == "string" ? n.errorCode : "connector.unavailable", typeof n.message == "string" ? n.message : "Connector request failed.");
1470
- if (n.success !== !0 || !Array.isArray(n.data)) return F();
1471
- for (let e of n.data) t(pe(e));
1466
+ function bn(e, t) {
1467
+ let n = ue(e);
1468
+ if (n.success === !1) throw new G(502, typeof n.errorCode == "string" ? n.errorCode : "connector.unavailable", typeof n.message == "string" ? n.message : "Connector request failed.");
1469
+ if (n.success !== !0 || !Array.isArray(n.data)) return R();
1470
+ for (let e of n.data) t(ue(e));
1472
1471
  return n;
1473
1472
  }
1474
- function bn(e) {
1475
- return !Array.isArray(e.authTypes) || e.authTypes.some((e) => typeof e != "string") ? F() : {
1476
- serviceId: V(e.service),
1477
- serviceName: V(e.displayName),
1473
+ function xn(e) {
1474
+ return !Array.isArray(e.authTypes) || e.authTypes.some((e) => typeof e != "string") ? R() : {
1475
+ serviceId: U(e.service),
1476
+ serviceName: U(e.displayName),
1478
1477
  noSetup: e.authTypes.length == 1 && e.authTypes[0] == "no_auth",
1479
- ...e.iconUrl == null || e.iconUrl === "" ? {} : { icon: V(e.iconUrl) },
1480
- ...e.homepageUrl == null || e.homepageUrl === "" ? {} : { homepageUrl: V(e.homepageUrl) }
1478
+ ...e.iconUrl == null || e.iconUrl === "" ? {} : { icon: U(e.iconUrl) },
1479
+ ...e.homepageUrl == null || e.homepageUrl === "" ? {} : { homepageUrl: U(e.homepageUrl) }
1481
1480
  };
1482
1481
  }
1483
- function xn(e) {
1482
+ function Sn(e) {
1484
1483
  return typeof e.isDefault != "boolean" || typeof e.status != "string" || ![
1485
1484
  "active",
1486
1485
  "disconnected",
1487
1486
  "error",
1488
1487
  "reauth_required"
1489
- ].includes(e.status) ? F() : {
1490
- connectionId: V(e.id),
1491
- serviceId: V(e.service),
1492
- displayName: V(e.displayName),
1488
+ ].includes(e.status) ? R() : {
1489
+ connectionId: U(e.id),
1490
+ serviceId: U(e.service),
1491
+ displayName: U(e.displayName),
1493
1492
  isDefault: e.isDefault,
1494
1493
  status: e.status,
1495
- ...e.alias == null ? {} : { alias: V(e.alias) },
1494
+ ...e.alias == null ? {} : { alias: U(e.alias) },
1496
1495
  ...e.marketplace == null ? {} : { builtInAccount: !0 }
1497
1496
  };
1498
1497
  }
1499
- function Sn(e) {
1500
- if (V(e.id), V(e.service), V(e.name), typeof e.description != "string") return F();
1498
+ function Cn(e) {
1499
+ if (U(e.id), U(e.service), U(e.name), typeof e.description != "string") return R();
1501
1500
  un(e.inputSchema, e.outputSchema);
1502
1501
  }
1503
- function Cn(e) {
1502
+ function wn(e) {
1504
1503
  return {
1505
1504
  nullable: e.nullable,
1506
1505
  jsonSchema: Te(e.json_schema),
@@ -1508,33 +1507,33 @@ function Cn(e) {
1508
1507
  ...e.value === void 0 ? {} : { value: Te(e.value) }
1509
1508
  };
1510
1509
  }
1511
- function wn(e, t) {
1510
+ function Tn(e, t) {
1512
1511
  let n = t.data.find((t) => t.service == e.service);
1513
- if (n == null) return F();
1514
- let r = bn(n), i = un(e.inputSchema, e.outputSchema);
1512
+ if (n == null) return R();
1513
+ let r = xn(n), i = un(e.inputSchema, e.outputSchema);
1515
1514
  return {
1516
1515
  serviceId: r.serviceId,
1517
1516
  serviceName: r.serviceName,
1518
1517
  ...r.icon == null ? {} : { icon: r.icon },
1519
1518
  ...r.homepageUrl == null ? {} : { homepageUrl: r.homepageUrl },
1520
- actionId: V(e.id),
1521
- ...e.operationType == null ? {} : { operationType: V(e.operationType) },
1522
- name: V(e.name),
1519
+ actionId: U(e.id),
1520
+ ...e.operationType == null ? {} : { operationType: U(e.operationType) },
1521
+ name: U(e.name),
1523
1522
  description: e.description,
1524
1523
  authenticated: !n.authTypes.includes("no_auth"),
1525
1524
  inputSchema: Te(e.inputSchema),
1526
1525
  outputSchema: Te(e.outputSchema),
1527
- inputs: Object.fromEntries(i.inputs.map((e) => [e.handle, Cn(e)])),
1528
- outputs: Object.fromEntries(i.outputs.map((e) => [e.handle, Cn(e)]))
1526
+ inputs: Object.fromEntries(i.inputs.map((e) => [e.handle, wn(e)])),
1527
+ outputs: Object.fromEntries(i.outputs.map((e) => [e.handle, wn(e)]))
1529
1528
  };
1530
1529
  }
1531
1530
  //#endregion
1532
1531
  //#region src/workbench/browser/runtime/stores/catalogStores.ts
1533
- function Tn(e) {
1534
- let t = pe(e);
1535
- return t.version != 1 || !Array.isArray(t.actions) ? F() : t.actions.map(ze);
1532
+ function En(e) {
1533
+ let t = ue(e);
1534
+ return t.version != 1 || !Array.isArray(t.actions) ? R() : t.actions.map(Re);
1536
1535
  }
1537
- var En = (...e) => JSON.stringify(e), Dn = class {
1536
+ var Dn = (...e) => JSON.stringify(e), On = class {
1538
1537
  constructor(e, t, n) {
1539
1538
  this.client = e, this.kind = t, this.options = n, this.entries = /* @__PURE__ */ new Map();
1540
1539
  }
@@ -1545,10 +1544,10 @@ var En = (...e) => JSON.stringify(e), Dn = class {
1545
1544
  ...t == null ? {} : { locale: t }
1546
1545
  }), a = `/v1/connector/proxy/${this.kind}${i.size ? `?${i}` : ""}`, o = this.entries.get(a);
1547
1546
  if (o == null) {
1548
- let e = (e) => yn(e, this.kind == "providers" ? bn : this.kind == "apps" ? xn : (e) => {
1549
- if (Sn(e), e.service != n) return F();
1547
+ let e = (e) => bn(e, this.kind == "providers" ? xn : this.kind == "apps" ? Sn : (e) => {
1548
+ if (Cn(e), e.service != n) return R();
1550
1549
  });
1551
- o = new ie((t, n) => this.client.readProxyCatalog({
1550
+ o = new Ae((t, n) => this.client.readProxyCatalog({
1552
1551
  path: a,
1553
1552
  decode: e
1554
1553
  }, t, n), this.kind == "providers" ? 3e5 : 3e4, this.options == null ? void 0 : {
@@ -1566,7 +1565,7 @@ var En = (...e) => JSON.stringify(e), Dn = class {
1566
1565
  for (let e of this.entries.values()) e.dispose();
1567
1566
  this.entries.clear();
1568
1567
  }
1569
- }, On = class {
1568
+ }, kn = class {
1570
1569
  constructor() {
1571
1570
  this.entries = /* @__PURE__ */ new Map();
1572
1571
  }
@@ -1604,13 +1603,13 @@ var En = (...e) => JSON.stringify(e), Dn = class {
1604
1603
  for (let e of this.entries.values()) e.dispose();
1605
1604
  this.entries.clear();
1606
1605
  }
1607
- }, kn = class {
1608
- #e = new On();
1606
+ }, An = class {
1607
+ #e = new kn();
1609
1608
  constructor(e, t) {
1610
- this.raw = new Dn(e, "providers", t);
1609
+ this.raw = new On(e, "providers", t);
1611
1610
  }
1612
1611
  get(e, t = "en", n = !1) {
1613
- return this.#e.get(En(e, t), [this.raw.get(e, t, void 0, n)], (e) => e.data.map(bn));
1612
+ return this.#e.get(Dn(e, t), [this.raw.get(e, t, void 0, n)], (e) => e.data.map(xn));
1614
1613
  }
1615
1614
  retryFailed() {
1616
1615
  this.raw.retryFailed();
@@ -1618,14 +1617,14 @@ var En = (...e) => JSON.stringify(e), Dn = class {
1618
1617
  dispose() {
1619
1618
  this.#e.dispose(), this.raw.dispose();
1620
1619
  }
1621
- }, An = class {
1620
+ }, jn = class {
1622
1621
  #e;
1623
- #t = new On();
1622
+ #t = new kn();
1624
1623
  constructor(e, t) {
1625
- this.#e = new Dn(e, "apps", t);
1624
+ this.#e = new On(e, "apps", t);
1626
1625
  }
1627
1626
  get(e, t, n = !1) {
1628
- return this.#t.get(En(t, e), [this.#e.get(t, void 0, void 0, n)], (t) => t.data.filter((t) => e == null || t.service == e).map(xn));
1627
+ return this.#t.get(Dn(t, e), [this.#e.get(t, void 0, void 0, n)], (t) => t.data.filter((t) => e == null || t.service == e).map(Sn));
1629
1628
  }
1630
1629
  retryFailed() {
1631
1630
  this.#e.retryFailed();
@@ -1633,20 +1632,20 @@ var En = (...e) => JSON.stringify(e), Dn = class {
1633
1632
  dispose() {
1634
1633
  this.#t.dispose(), this.#e.dispose();
1635
1634
  }
1636
- }, jn = class {
1635
+ }, Mn = class {
1637
1636
  #e;
1638
- #t = new On();
1637
+ #t = new kn();
1639
1638
  #n = /* @__PURE__ */ new Map();
1640
1639
  #r = /* @__PURE__ */ new Set();
1641
1640
  #i = /* @__PURE__ */ new WeakMap();
1642
1641
  constructor(e, t, n) {
1643
- this.client = e, this.providers = t, this.#e = new Dn(e, "actions", n);
1642
+ this.client = e, this.providers = t, this.#e = new On(e, "actions", n);
1644
1643
  }
1645
1644
  get(e, t, n = "en", r = !1) {
1646
- return this.#t.get(En(t, e, n), [this.#e.get(t, n, e, r), this.providers.raw.get(t, n)], (e, t) => e.data.map((e) => wn(e, t)));
1645
+ return this.#t.get(Dn(t, e, n), [this.#e.get(t, n, e, r), this.providers.raw.get(t, n)], (e, t) => e.data.map((e) => Tn(e, t)));
1647
1646
  }
1648
1647
  detail(e, n, r = "en", i = !1) {
1649
- let a = this.get(e.slice(0, e.indexOf(".")), n, r, i), o = En(n, e, r), s = this.#n.get(o);
1648
+ let a = this.get(e.slice(0, e.indexOf(".")), n, r, i), o = Dn(n, e, r), s = this.#n.get(o);
1650
1649
  return s ?? (s = t((t) => {
1651
1650
  let n = t(a), r = n.data?.find((t) => t.actionId == e);
1652
1651
  return {
@@ -1672,9 +1671,9 @@ var En = (...e) => JSON.stringify(e), Dn = class {
1672
1671
  }
1673
1672
  let s = o.get(a);
1674
1673
  if (s != null) return s.refresh(), s;
1675
- let c = new ie((e, t) => this.client.readCatalog({
1674
+ let c = new Ae((e, t) => this.client.readCatalog({
1676
1675
  path: `/v1/connector/action-metadata?${i}`,
1677
- decode: Tn
1676
+ decode: En
1678
1677
  }, null, t), 3e4);
1679
1678
  return r.aborted ? c.dispose() : (o.set(a, c), this.#r.add(c)), c;
1680
1679
  }
@@ -1687,22 +1686,22 @@ var En = (...e) => JSON.stringify(e), Dn = class {
1687
1686
  for (let e of this.#n.values()) e.dispose();
1688
1687
  this.#n.clear(), this.#t.dispose(), this.#e.dispose();
1689
1688
  }
1690
- }, Mn = class {
1689
+ }, Nn = class {
1691
1690
  constructor(e, t) {
1692
- this.providers = new kn(e, t), this.actions = new jn(e, this.providers, t), this.connections = new An(e, t);
1691
+ this.providers = new An(e, t), this.actions = new Mn(e, this.providers, t), this.connections = new jn(e, t);
1693
1692
  }
1694
1693
  dispose() {
1695
1694
  this.actions.dispose(), this.connections.dispose(), this.providers.dispose();
1696
1695
  }
1697
- }, Nn = {};
1698
- function Pn(e) {
1696
+ }, Pn = {};
1697
+ function Fn(e) {
1699
1698
  return Object.entries(e).map(([e, t]) => ({
1700
1699
  description: t.description,
1701
1700
  handle: e,
1702
1701
  jsonSchema: t.jsonSchema
1703
1702
  }));
1704
1703
  }
1705
- function Fn(e, t) {
1704
+ function In(e, t) {
1706
1705
  return {
1707
1706
  connector: e,
1708
1707
  description: e.authenticated && e.defaultConnection == null ? t("addNode.connectorNeedsConnection", {
@@ -1710,15 +1709,15 @@ function Fn(e, t) {
1710
1709
  service: e.serviceName
1711
1710
  }) : e.description,
1712
1711
  group: t("addNode.connectorActions"),
1713
- icon: M(e),
1712
+ icon: O(e),
1714
1713
  id: `connector:${e.actionId}`,
1715
- inputs: Pn(e.inputs),
1714
+ inputs: Fn(e.inputs),
1716
1715
  kind: "connector",
1717
1716
  label: e.name,
1718
- outputs: Pn(e.outputs)
1717
+ outputs: Fn(e.outputs)
1719
1718
  };
1720
1719
  }
1721
- function In(e, t) {
1720
+ function Ln(e, t) {
1722
1721
  let n = /* @__PURE__ */ new Map();
1723
1722
  for (let t of e) {
1724
1723
  let e = n.get(t.serviceId) ?? [];
@@ -1726,7 +1725,7 @@ function In(e, t) {
1726
1725
  }
1727
1726
  return [...n.values()].toSorted((e, t) => e[0].serviceName.localeCompare(t[0].serviceName)).map((e) => {
1728
1727
  let n = e[0], r = e.map((e) => {
1729
- let n = Fn(e, t);
1728
+ let n = In(e, t);
1730
1729
  return {
1731
1730
  description: n.description,
1732
1731
  label: n.label,
@@ -1737,7 +1736,7 @@ function In(e, t) {
1737
1736
  choices: r,
1738
1737
  description: t(r.length == 1 ? "addNode.connectorActionCountOne" : "addNode.connectorActionCount", { count: r.length }),
1739
1738
  group: t("addNode.connectorActions"),
1740
- icon: M(n),
1739
+ icon: O(n),
1741
1740
  id: `connector-provider:${n.serviceId}`,
1742
1741
  inputs: [],
1743
1742
  kind: "connector-group",
@@ -1747,12 +1746,12 @@ function In(e, t) {
1747
1746
  };
1748
1747
  });
1749
1748
  }
1750
- function Ln(e, t) {
1749
+ function Rn(e, t) {
1751
1750
  return {
1752
1751
  choices: [],
1753
1752
  description: t("addNode.connectorBrowseActions"),
1754
1753
  group: t("addNode.connectorActions"),
1755
- icon: M(e),
1754
+ icon: O(e),
1756
1755
  id: `connector-provider:${e.serviceId}`,
1757
1756
  inputs: [],
1758
1757
  kind: "connector-group",
@@ -1762,7 +1761,7 @@ function Ln(e, t) {
1762
1761
  serviceId: e.serviceId
1763
1762
  };
1764
1763
  }
1765
- function Rn(e, t) {
1764
+ function zn(e, t) {
1766
1765
  if (e == null) return;
1767
1766
  let n = e.kind == "task" && e.node.task == null ? e.node.taskId : void 0;
1768
1767
  if (n == null) return;
@@ -1774,10 +1773,10 @@ function Rn(e, t) {
1774
1773
  taskId: n
1775
1774
  };
1776
1775
  }
1777
- function zn(e, t, n) {
1776
+ function Bn(e, t, n) {
1778
1777
  if (e == null) return [];
1779
1778
  let r = [];
1780
- for (let i of [...Ae(e.revision.content).tasks].toSorted()) {
1779
+ for (let i of [...Be(e.revision.content).tasks].toSorted()) {
1781
1780
  let a = e.task(i);
1782
1781
  if (a?.executor.kind != "connector") continue;
1783
1782
  let o = t[a.executor.action];
@@ -1794,7 +1793,7 @@ function zn(e, t, n) {
1794
1793
  }
1795
1794
  return r;
1796
1795
  }
1797
- var Bn = class {
1796
+ var Vn = class {
1798
1797
  #e;
1799
1798
  #t;
1800
1799
  #n;
@@ -1813,25 +1812,25 @@ var Bn = class {
1813
1812
  #h;
1814
1813
  #g;
1815
1814
  constructor(r, i, a, o, s = p(), c = i.catalogs) {
1816
- this.data = c, this.#i = /* @__PURE__ */ new Set(), this.#a = new L(), this.#o = new L(), this.#d = n(Nn), this.#f = n([]), this.#p = n([]), this.#g = !1, this.loadConnections = async (e) => {
1815
+ this.data = c, this.#i = /* @__PURE__ */ new Set(), this.#a = new z(), this.#o = new z(), this.#d = n(Pn), this.#f = n([]), this.#p = n([]), this.#g = !1, this.loadConnections = async (e) => {
1817
1816
  let t = this.#m.$.flowId.value;
1818
- this.#g || t == null || await w(this.data.connections.get(void 0, t), e);
1817
+ this.#g || t == null || await M(this.data.connections.get(void 0, t), e);
1819
1818
  }, this.browseAddNodeOptions = (e) => {
1820
1819
  let t = this.data.providers.get(this.#m.$.flowId.value, this.#n);
1821
- return I(e, (e) => {
1820
+ return g(e, (e) => {
1822
1821
  let n = e(t), r = e(this.#t.t$);
1823
1822
  return {
1824
1823
  ...n,
1825
- data: n.data?.toSorted((e, t) => e.serviceName.localeCompare(t.serviceName)).map((e) => Ln(e, r))
1824
+ data: n.data?.toSorted((e, t) => e.serviceName.localeCompare(t.serviceName)).map((e) => Rn(e, r))
1826
1825
  };
1827
1826
  });
1828
1827
  }, this.provideAddNodeOptionChoices = (e, t) => {
1829
1828
  let n = e.slice(19), r = this.#m.$.flowId.value, i = this.data.actions.get(n, r, this.#n), a = this.data.providers.get(r, this.#n), o = this.data.connections.get(n, r);
1830
- return I(t, (e) => {
1829
+ return g(t, (e) => {
1831
1830
  let t = e(i), r = e(a).data?.find((e) => e.serviceId == n), s = e(o).data, c = e(this.#t.t$);
1832
1831
  return {
1833
1832
  ...t,
1834
- data: t.data?.map((e) => Fn(E({
1833
+ data: t.data?.map((e) => In(w({
1835
1834
  ...e,
1836
1835
  ...r == null ? {} : {
1837
1836
  serviceName: r.serviceName,
@@ -1842,17 +1841,17 @@ var Bn = class {
1842
1841
  });
1843
1842
  }, this.provideAddNodeOptions = (e, t, n = t) => {
1844
1843
  let r = this.#m.$.flowId.value, i = e.trim();
1845
- if (i.length == 0) return I(t, (e) => ({
1846
- data: In(Object.values(e(this.$.actions)), e(this.#t.t$)),
1844
+ if (i.length == 0) return g(t, (e) => ({
1845
+ data: Ln(Object.values(e(this.$.actions)), e(this.#t.t$)),
1847
1846
  refreshing: !1,
1848
1847
  error: void 0
1849
1848
  }));
1850
1849
  let a = this.data.actions.search(i, r, this.#n, n).get();
1851
- return I(t, (e) => {
1850
+ return g(t, (e) => {
1852
1851
  let t = e(a), n = e(this.#t.t$);
1853
1852
  return {
1854
1853
  ...t,
1855
- data: t.data?.map((t) => Fn(E(t, e(k(this.data.connections.get(t.serviceId, r)))), n))
1854
+ data: t.data?.map((t) => In(w(t, e(A(this.data.connections.get(t.serviceId, r)))), n))
1856
1855
  };
1857
1856
  });
1858
1857
  }, this.retryCatalog = () => {
@@ -1861,38 +1860,38 @@ var Bn = class {
1861
1860
  let l = t((e) => {
1862
1861
  let t = e(i.$.flowId);
1863
1862
  return Object.fromEntries(e(this.#f).flatMap((n) => {
1864
- let r = e(k(this.data.actions.detail(n, t, this.#n)));
1865
- return r == null ? [] : [[n, E(r, e(k(this.data.connections.get(r.serviceId, t))))]];
1863
+ let r = e(A(this.data.actions.detail(n, t, this.#n)));
1864
+ return r == null ? [] : [[n, w(r, e(A(this.data.connections.get(r.serviceId, t))))]];
1866
1865
  }));
1867
1866
  }), u = t((e) => {
1868
1867
  let t = e(i.$.flowId);
1869
1868
  return Object.fromEntries(e(this.#p).flatMap((n) => {
1870
- let r = e(k(this.data.connections.get(n, t)));
1871
- return r == null ? [] : [[n, et(r)]];
1869
+ let r = e(A(this.data.connections.get(n, t)));
1870
+ return r == null ? [] : [[n, N(r)]];
1872
1871
  }));
1873
1872
  });
1874
1873
  this.#l = t((e) => {
1875
- let t = Rn(e(i.$.selection), e(i.$.revision)), n = e(this.#d);
1874
+ let t = zn(e(i.$.selection), e(i.$.revision)), n = e(this.#d);
1876
1875
  if (t == null) return { authorizationPending: !1 };
1877
1876
  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);
1878
1877
  return {
1879
1878
  action: r,
1880
- actionError: o == null ? void 0 : B(o, this.#t.t).message,
1879
+ actionError: o == null ? void 0 : H(o, this.#t.t).message,
1881
1880
  activeConnections: a?.active,
1882
1881
  authorizationPending: r != null && n.authorizationServiceId == r.serviceId,
1883
1882
  connection: c,
1884
- connectionError: s == null ? void 0 : B(s, this.#t.t).message
1883
+ connectionError: s == null ? void 0 : H(s, this.#t.t).message
1885
1884
  };
1886
1885
  }), this.$ = {
1887
1886
  connections: t((e) => {
1888
1887
  let t = e(i.$.flowId);
1889
- return t == null ? [] : e(k(this.data.connections.get(void 0, t))) ?? [];
1888
+ return t == null ? [] : e(A(this.data.connections.get(void 0, t))) ?? [];
1890
1889
  }),
1891
1890
  actionLoading: e(this.#d, (e) => e.actionLoading),
1892
1891
  actions: l,
1893
1892
  catalogs: u,
1894
1893
  connectionLoading: e(this.#d, (e) => e.connectionLoading),
1895
- diagnostics: t((e) => zn(e(i.$.revision), e(l), e(u))),
1894
+ diagnostics: t((e) => Bn(e(i.$.revision), e(l), e(u))),
1896
1895
  selectedAction: e(this.#l, (e) => e.action),
1897
1896
  selectedActionError: e(this.#l, (e) => e.actionError),
1898
1897
  selectedActiveConnections: e(this.#l, (e) => e.activeConnections),
@@ -1910,11 +1909,11 @@ var Bn = class {
1910
1909
  e == this.#n || this.#g || (this.#n = e, this.reset(), this.#C());
1911
1910
  }
1912
1911
  reset() {
1913
- this.#g || (this.#a.invalidate(), this.#o.invalidate(), this.#h = void 0, this.#i.clear(), this.#d.set(Nn), this.#f.set([]), this.#p.set([]));
1912
+ this.#g || (this.#a.invalidate(), this.#o.invalidate(), this.#h = void 0, this.#i.clear(), this.#d.set(Pn), this.#f.set([]), this.#p.set([]));
1914
1913
  }
1915
1914
  async refresh(e = !1) {
1916
1915
  if (this.#g) return;
1917
- let t = this.#o.begin(), n = this.#m.$.flowId.value, r = Rn(this.#m.$.selection.value, this.#m.$.revision.value);
1916
+ let t = this.#o.begin(), n = this.#m.$.flowId.value, r = zn(this.#m.$.selection.value, this.#m.$.revision.value);
1918
1917
  if (n == null || r == null) {
1919
1918
  (this.#d.value.actionLoading != null || this.#d.value.connectionLoading != null) && this.#x({
1920
1919
  actionLoading: void 0,
@@ -1930,13 +1929,13 @@ var Bn = class {
1930
1929
  connectionLoading: void 0
1931
1930
  });
1932
1931
  try {
1933
- let a = await w(i);
1932
+ let a = await M(i);
1934
1933
  if (!this.#S(t, n)) return;
1935
1934
  this.#b(this.#f, [a.actionId]), a.authenticated && await this.#_(n, r, a.serviceId, e, t);
1936
1935
  } catch (e) {
1937
1936
  this.#S(t, n) && this.#x({ actionError: {
1938
1937
  actionId: r.actionId,
1939
- message: B(e, this.#t.t).message
1938
+ message: H(e, this.#t.t).message
1940
1939
  } });
1941
1940
  } finally {
1942
1941
  this.#S(t, n) && this.#d.value.actionLoading == r.actionId && this.#x({ actionLoading: void 0 });
@@ -1944,11 +1943,11 @@ var Bn = class {
1944
1943
  }
1945
1944
  async loadCodeConnections(e, t) {
1946
1945
  let n = this.#m.$.flowId.value;
1947
- n == null || this.#g || (await w(this.data.connections.get(e, n), t), !(t.aborted || this.#g || n != this.#m.$.flowId.value) && this.#b(this.#p, [e]));
1946
+ n == null || this.#g || (await M(this.data.connections.get(e, n), t), !(t.aborted || this.#g || n != this.#m.$.flowId.value) && this.#b(this.#p, [e]));
1948
1947
  }
1949
1948
  async loadCodeAction(e, t) {
1950
1949
  let n = this.#n, r = this.#m.$.flowId.value;
1951
- r == null || this.#g || (await w(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]));
1950
+ r == null || this.#g || (await M(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]));
1952
1951
  }
1953
1952
  async connect(e) {
1954
1953
  if (this.#g) return;
@@ -1969,7 +1968,7 @@ var Bn = class {
1969
1968
  serviceId: e
1970
1969
  }, this.#x({ authorizationServiceId: e });
1971
1970
  } catch (e) {
1972
- this.#g || this.#u(B(e, this.#t.t));
1971
+ this.#g || this.#u(H(e, this.#t.t));
1973
1972
  }
1974
1973
  }
1975
1974
  async setConnection(e, t) {
@@ -1995,16 +1994,16 @@ var Bn = class {
1995
1994
  let i;
1996
1995
  try {
1997
1996
  let r = this.data.connections.get(t, e, n);
1998
- await Promise.resolve(), i = await w(r, void 0, n);
1997
+ await Promise.resolve(), i = await M(r, void 0, n);
1999
1998
  } catch (n) {
2000
1999
  this.#S(r, e) && this.#x({ connectionError: {
2001
- message: B(n, this.#t.t).message,
2000
+ message: H(n, this.#t.t).message,
2002
2001
  serviceId: t
2003
2002
  } });
2004
2003
  return;
2005
2004
  }
2006
2005
  if (!this.#S(r, e)) return;
2007
- let a = et(i);
2006
+ let a = N(i);
2008
2007
  return this.#b(this.#p, [t]), a;
2009
2008
  }
2010
2009
  async #y(e, t, n) {
@@ -2032,7 +2031,7 @@ var Bn = class {
2032
2031
  if (r.length > 0) {
2033
2032
  for (let e of r) this.#i.add(e);
2034
2033
  try {
2035
- let n = await Promise.all(r.map((e) => w(this.data.actions.detail(e, t, this.#n))));
2034
+ let n = await Promise.all(r.map((e) => M(this.data.actions.detail(e, t, this.#n))));
2036
2035
  if (!this.#S(e, t)) return;
2037
2036
  this.#b(this.#f, n.map((e) => e.actionId));
2038
2037
  } catch {
@@ -2043,7 +2042,7 @@ var Bn = class {
2043
2042
  }
2044
2043
  if (!this.#S(e, t)) return;
2045
2044
  let i = /* @__PURE__ */ new Set();
2046
- for (let e of Ae(n.revision.content).tasks) {
2045
+ for (let e of Be(n.revision.content).tasks) {
2047
2046
  let t = n.task(e);
2048
2047
  if (t?.executor.kind != "connector") continue;
2049
2048
  let r = this.$.actions.value[t.executor.action];
@@ -2054,14 +2053,14 @@ var Bn = class {
2054
2053
  };
2055
2054
  //#endregion
2056
2055
  //#region src/workbench/browser/runtime/stores/triggerCatalog.ts
2057
- function Vn(e, t) {
2056
+ function Hn(e, t) {
2058
2057
  let n = `open-flow:trigger-catalog:v2:${encodeURIComponent(e)}:`;
2059
2058
  return {
2060
2059
  getItem: (e) => (t ?? window.localStorage).getItem(n + e),
2061
2060
  setItem: (e, r) => (t ?? window.localStorage).setItem(n + e, r)
2062
2061
  };
2063
2062
  }
2064
- var Hn = class {
2063
+ var Un = class {
2065
2064
  #e;
2066
2065
  #t;
2067
2066
  constructor(e, r, i) {
@@ -2073,16 +2072,16 @@ var Hn = class {
2073
2072
  let t = this.#t.get(e);
2074
2073
  if (t == null) {
2075
2074
  let n = (t) => {
2076
- let n = Ie(t);
2075
+ let n = Fe(t);
2077
2076
  if (n.locale != e) throw Error("Unexpected Trigger catalog language.");
2078
2077
  return n;
2079
2078
  }, r = this.host.triggerCatalogCache;
2080
- t = new ie((t, r) => this.client.readCatalog({
2079
+ t = new Ae((t, r) => this.client.readCatalog({
2081
2080
  path: `/v1/trigger-keys/catalog?locale=${encodeURIComponent(e)}`,
2082
2081
  decode: n
2083
2082
  }, t, r), 3e5, r == null ? void 0 : {
2084
2083
  key: e,
2085
- storage: () => Vn(r.namespace, r.storage),
2084
+ storage: () => Hn(r.namespace, r.storage),
2086
2085
  decode: n
2087
2086
  }), this.#t.set(e, t);
2088
2087
  }
@@ -2102,8 +2101,8 @@ var Hn = class {
2102
2101
  for (let e of this.#t.values()) e.dispose();
2103
2102
  this.#t.clear();
2104
2103
  }
2105
- }, Un = {}, Wn = "trigger:";
2106
- function Gn(e, t) {
2104
+ }, Wn = {}, Gn = "trigger:";
2105
+ function Kn(e, t) {
2107
2106
  if (e?.kind != "trigger") return;
2108
2107
  let n = e.trigger;
2109
2108
  if (n.kind != "poll" && n.kind != "integration") return;
@@ -2114,29 +2113,26 @@ function Gn(e, t) {
2114
2113
  triggerId: e.id
2115
2114
  };
2116
2115
  }
2117
- function Kn(e, t, n) {
2116
+ function qn(e, t, n) {
2118
2117
  return {
2119
2118
  description: n?.description ?? e.description,
2120
2119
  group: t.t("addNode.integrationTriggers"),
2121
- icon: M({
2120
+ icon: O({
2122
2121
  serviceId: e.provider,
2123
2122
  serviceName: e.provider
2124
2123
  }),
2125
- id: `${Wn}${e.key}`,
2124
+ id: `${Gn}${e.key}`,
2126
2125
  inputs: [],
2127
2126
  kind: "trigger",
2128
2127
  label: n?.displayName ?? e.displayName,
2129
- outputs: [{
2130
- handle: "payload",
2131
- jsonSchema: e.payloadSchema
2132
- }],
2128
+ outputs: e.outputs,
2133
2129
  trigger: {
2134
2130
  definition: e,
2135
2131
  kind: "catalog"
2136
2132
  }
2137
2133
  };
2138
2134
  }
2139
- var qn = class {
2135
+ var Jn = class {
2140
2136
  #e;
2141
2137
  #t;
2142
2138
  #n;
@@ -2148,17 +2144,17 @@ var qn = class {
2148
2144
  #c;
2149
2145
  #l;
2150
2146
  constructor(r, i, a, o, s = p()) {
2151
- this.#r = new L(), this.#i = /* @__PURE__ */ new Set(), this.#s = n(Un), this.#l = !1, this.browseAddNodeOptions = (e) => this.#u("", e), this.provideAddNodeOptions = (e, t) => this.#u(e, t), this.catalog = new Hn(r, bt([s.lang]), o), this.#e = r, this.#t = o, this.#n = s, this.#o = a, this.#c = i, this.#a = t((e) => {
2152
- let t = e(i.$.selection), n = Gn(t, i), r = e(this.#s);
2147
+ this.#r = new z(), this.#i = /* @__PURE__ */ new Set(), this.#s = n(Wn), this.#l = !1, this.browseAddNodeOptions = (e) => this.#u("", e), this.provideAddNodeOptions = (e, t) => this.#u(e, t), this.catalog = new Un(r, vt([s.lang]), o), this.#e = r, this.#t = o, this.#n = s, this.#o = a, this.#c = i, this.#a = t((e) => {
2148
+ let t = e(i.$.selection), n = Kn(t, i), r = e(this.#s);
2153
2149
  if (t?.kind != "trigger") return { authorizationPending: !1 };
2154
2150
  let a = t.trigger;
2155
2151
  if (a.kind != "poll" && a.kind != "integration") return { authorizationPending: !1 };
2156
- let o = n == null ? void 0 : e(i.catalogs.connections.get(n.provider, e(i.$.flowId))).data, s = o == null ? void 0 : et(o), c = n == null ? void 0 : e(i.catalogs.connections.get(n.provider, e(i.$.flowId))).error;
2152
+ let o = n == null ? void 0 : e(i.catalogs.connections.get(n.provider, e(i.$.flowId))).data, s = o == null ? void 0 : N(o), c = n == null ? void 0 : e(i.catalogs.connections.get(n.provider, e(i.$.flowId))).error;
2157
2153
  return {
2158
2154
  activeConnections: s?.active,
2159
2155
  authorizationPending: r.authorizationProvider == n?.provider,
2160
2156
  connection: n?.connectionId == null ? void 0 : s?.byId.get(n.connectionId),
2161
- connectionError: c == null ? void 0 : B(c, this.#n.t).message,
2157
+ connectionError: c == null ? void 0 : H(c, this.#n.t).message,
2162
2158
  definition: a.definition
2163
2159
  };
2164
2160
  }), this.$ = {
@@ -2176,11 +2172,11 @@ var qn = class {
2176
2172
  this.#a.dispose(), this.#s.dispose();
2177
2173
  }
2178
2174
  reset() {
2179
- this.#l || (this.#i.clear(), this.#r.invalidate(), this.#s.set(Un));
2175
+ this.#l || (this.#i.clear(), this.#r.invalidate(), this.#s.set(Wn));
2180
2176
  }
2181
2177
  #u(e, t) {
2182
2178
  let n = this.catalog.get(), r = e.trim().toLowerCase();
2183
- return I(t, (e) => {
2179
+ return g(t, (e) => {
2184
2180
  let t = e(n);
2185
2181
  e(this.#n.t$);
2186
2182
  let i = e(this.#c.$.flowId) != null && e(this.#c.$.target)?.kind == "flow", a = t.data, o = a?.definitions.filter((e) => !r || [
@@ -2195,13 +2191,13 @@ var qn = class {
2195
2191
  ].some((e) => e?.toLowerCase().includes(r)));
2196
2192
  return {
2197
2193
  ...t,
2198
- data: i ? o?.map((e) => Kn(e, this.#n, a.display[e.key])) : []
2194
+ data: i ? o?.map((e) => qn(e, this.#n, a.display[e.key])) : []
2199
2195
  };
2200
2196
  });
2201
2197
  }
2202
2198
  async refresh(e = !1) {
2203
2199
  if (this.#l) return;
2204
- let t = this.#r.begin(), n = this.#c.$.flowId.value, r = Gn(this.#c.$.selection.value, this.#c);
2200
+ let t = this.#r.begin(), n = this.#c.$.flowId.value, r = Kn(this.#c.$.selection.value, this.#c);
2205
2201
  if (n == null || r == null) {
2206
2202
  this.#s.value.connectionLoading != null && this.#d({ connectionLoading: void 0 });
2207
2203
  return;
@@ -2212,11 +2208,11 @@ var qn = class {
2212
2208
  });
2213
2209
  try {
2214
2210
  let i = this.#c.catalogs.connections.get(r.provider, n, e || this.#i.has(r.provider));
2215
- if (await Promise.resolve(), await w(i, void 0, e || this.#i.has(r.provider)), !this.#f(t, n)) return;
2211
+ if (await Promise.resolve(), await M(i, void 0, e || this.#i.has(r.provider)), !this.#f(t, n)) return;
2216
2212
  this.#i.delete(r.provider);
2217
2213
  } catch (e) {
2218
2214
  this.#f(t, n) && this.#d({ connectionError: {
2219
- message: B(e, this.#n.t).message,
2215
+ message: H(e, this.#n.t).message,
2220
2216
  provider: r.provider
2221
2217
  } });
2222
2218
  } finally {
@@ -2235,7 +2231,7 @@ var qn = class {
2235
2231
  }
2236
2232
  !this.#l && t == this.#c.$.flowId.value && this.#d({ authorizationProvider: e });
2237
2233
  } catch (e) {
2238
- this.#l || this.#o(B(e, this.#n.t));
2234
+ this.#l || this.#o(H(e, this.#n.t));
2239
2235
  }
2240
2236
  }
2241
2237
  async setConnection(e, t) {
@@ -2244,7 +2240,7 @@ var qn = class {
2244
2240
  async refreshAfterAuthorization() {
2245
2241
  if (this.#l) return;
2246
2242
  let e = this.#s.value.authorizationProvider;
2247
- e != null && (this.#i.add(e), this.#d({ authorizationProvider: void 0 }), Gn(this.#c.$.selection.value, this.#c)?.provider == e && await this.refresh(!0));
2243
+ e != null && (this.#i.add(e), this.#d({ authorizationProvider: void 0 }), Kn(this.#c.$.selection.value, this.#c)?.provider == e && await this.refresh(!0));
2248
2244
  }
2249
2245
  #d(e) {
2250
2246
  this.#l || this.#s.set({
@@ -2258,10 +2254,10 @@ var qn = class {
2258
2254
  };
2259
2255
  //#endregion
2260
2256
  //#region src/flow/common/inverseChanges.ts
2261
- function Jn(e, t) {
2257
+ function Yn(e, t) {
2262
2258
  let n = e, r = [];
2263
2259
  for (let e of t) {
2264
- let t = _t(n, [e]), i = [];
2260
+ let t = ht(n, [e]), i = [];
2265
2261
  switch (e.kind) {
2266
2262
  case "graph.node.create":
2267
2263
  i.push({
@@ -2375,6 +2371,125 @@ function Jn(e, t) {
2375
2371
  value: e.before
2376
2372
  });
2377
2373
  break;
2374
+ case "binding.target.set":
2375
+ i.push({
2376
+ ...e,
2377
+ before: e.value,
2378
+ value: e.before
2379
+ });
2380
+ break;
2381
+ case "graph.node.additional-inputs.set":
2382
+ i.push({
2383
+ ...e,
2384
+ before: e.value,
2385
+ value: e.before
2386
+ });
2387
+ break;
2388
+ case "graph.node.condition.set":
2389
+ i.push({
2390
+ ...e,
2391
+ before: e.value,
2392
+ value: e.before
2393
+ });
2394
+ break;
2395
+ case "graph.node.field.set":
2396
+ i.push({
2397
+ ...e,
2398
+ before: e.value,
2399
+ value: e.before
2400
+ });
2401
+ break;
2402
+ case "graph.node.task.ports.set":
2403
+ i.push({
2404
+ ...e,
2405
+ before: e.value,
2406
+ value: e.before
2407
+ });
2408
+ break;
2409
+ case "graph.node.task.name.set":
2410
+ i.push({
2411
+ ...e,
2412
+ before: e.value,
2413
+ value: e.before
2414
+ });
2415
+ break;
2416
+ case "graph.node.task.capabilities.set":
2417
+ i.push({
2418
+ ...e,
2419
+ before: e.value,
2420
+ value: e.before
2421
+ });
2422
+ break;
2423
+ case "graph.node.values.set":
2424
+ i.push({
2425
+ ...e,
2426
+ before: e.value,
2427
+ value: e.before
2428
+ });
2429
+ break;
2430
+ case "graph.node.wait.set":
2431
+ i.push({
2432
+ ...e,
2433
+ before: e.value,
2434
+ value: e.before
2435
+ });
2436
+ break;
2437
+ case "graph.node.webhook.set":
2438
+ i.push({
2439
+ ...e,
2440
+ before: e.value,
2441
+ value: e.before
2442
+ });
2443
+ break;
2444
+ case "graph.trigger.config.set":
2445
+ i.push({
2446
+ ...e,
2447
+ before: e.value,
2448
+ value: e.before
2449
+ });
2450
+ break;
2451
+ case "graph.trigger.schedule.set":
2452
+ i.push({
2453
+ ...e,
2454
+ before: e.value,
2455
+ value: e.before
2456
+ });
2457
+ break;
2458
+ case "task.connector.connection.set":
2459
+ i.push({
2460
+ ...e,
2461
+ before: e.value,
2462
+ value: e.before
2463
+ });
2464
+ break;
2465
+ case "task.agent.set":
2466
+ i.push({
2467
+ ...e,
2468
+ before: e.value,
2469
+ value: e.before
2470
+ });
2471
+ break;
2472
+ case "task.llm.mode.set":
2473
+ i.push({
2474
+ ...e,
2475
+ before: e.value,
2476
+ value: e.before
2477
+ });
2478
+ break;
2479
+ case "task.name.set":
2480
+ i.push({
2481
+ ...e,
2482
+ before: e.value,
2483
+ value: e.before
2484
+ });
2485
+ break;
2486
+ case "subflow.definition.set":
2487
+ i.push({
2488
+ ...e,
2489
+ before: e.definition,
2490
+ definition: e.before
2491
+ });
2492
+ break;
2378
2493
  default: throw Error(`Unsupported canvas history operation: ${e.kind}`);
2379
2494
  }
2380
2495
  r.push(i), n = t;
@@ -2383,7 +2498,7 @@ function Jn(e, t) {
2383
2498
  }
2384
2499
  //#endregion
2385
2500
  //#region src/workbench/browser/runtime/stores/canvasHistory.ts
2386
- var Yn = class {
2501
+ var Xn = class {
2387
2502
  constructor() {
2388
2503
  this.state$ = n({
2389
2504
  canUndo: !1,
@@ -2426,7 +2541,7 @@ var Yn = class {
2426
2541
  };
2427
2542
  //#endregion
2428
2543
  //#region src/workbench/browser/runtime/stores/draftChanges.ts
2429
- function Xn(e, t) {
2544
+ function Zn(e, t) {
2430
2545
  if (e.length != 1 || t.length != 1) return;
2431
2546
  let n = e[0], r = t[0];
2432
2547
  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 : [{
@@ -2446,7 +2561,7 @@ function Xn(e, t) {
2446
2561
  value: r.value
2447
2562
  }];
2448
2563
  }
2449
- var Zn = class {
2564
+ var Qn = class {
2450
2565
  #e;
2451
2566
  #t;
2452
2567
  #n;
@@ -2474,15 +2589,15 @@ var Zn = class {
2474
2589
  this.#a = e;
2475
2590
  let t = e, n = [];
2476
2591
  for (let e of this.#o) try {
2477
- t = R(t, e.changes), n.push(e);
2592
+ t = V(t, e.changes), n.push(e);
2478
2593
  } catch (t) {
2479
- if (!(t instanceof rt)) throw t;
2594
+ if (!(t instanceof tt)) throw t;
2480
2595
  e.active = !1;
2481
2596
  }
2482
2597
  return this.#o = n, t;
2483
2598
  }
2484
2599
  project(e) {
2485
- return this.#o.reduce((e, t) => R(e, t.changes), e);
2600
+ return this.#o.reduce((e, t) => V(e, t.changes), e);
2486
2601
  }
2487
2602
  async settled() {
2488
2603
  await this.#s;
@@ -2496,13 +2611,13 @@ var Zn = class {
2496
2611
  return this.#s = t, t;
2497
2612
  }
2498
2613
  async change(e, t, n, r = !0) {
2499
- let i = this.#o.at(-1), a = i == null || i.started || !i.active ? void 0 : Xn(i.changes, n);
2614
+ let i = this.#o.at(-1), a = i == null || i.started || !i.active ? void 0 : Zn(i.changes, n);
2500
2615
  if (i != null && a != null) return i.changes = a, this.#a != null && this.#t.apply(this.project(this.#a)), i.result;
2501
2616
  this.#t.beforeChange(r);
2502
2617
  let o = {
2503
2618
  ...e,
2504
2619
  active: !0,
2505
- changeId: P(),
2620
+ changeId: L(),
2506
2621
  changes: n,
2507
2622
  started: !1
2508
2623
  };
@@ -2527,21 +2642,21 @@ var Zn = class {
2527
2642
  let r = this.#l(e, n, t);
2528
2643
  return this.#o.length == 0 && this.#t.check(), r;
2529
2644
  } catch (n) {
2530
- if (n instanceof U && n.code == "flow.revision-conflict") {
2645
+ if (n instanceof G && n.code == "flow.revision-conflict") {
2531
2646
  if (!t && await this.#t.recover(e)) {
2532
- t = !0, e.changeId = P();
2647
+ t = !0, e.changeId = L();
2533
2648
  continue;
2534
2649
  }
2535
2650
  t && await this.#t.recover(e), this.#u(e);
2536
2651
  } else {
2537
- if (!(n instanceof U) && !t) {
2652
+ if (!(n instanceof G) && !t) {
2538
2653
  let n = this.#a?.revisionId;
2539
2654
  if (await this.#t.recover(e)) {
2540
- t = !0, e.active && this.#a?.revisionId != n && (e.changeId = P());
2655
+ t = !0, e.active && this.#a?.revisionId != n && (e.changeId = L());
2541
2656
  continue;
2542
2657
  }
2543
2658
  }
2544
- this.#u(e), this.#t.current(e) && this.#r(B(n, this.#n.t));
2659
+ this.#u(e), this.#t.current(e) && this.#r(H(n, this.#n.t));
2545
2660
  }
2546
2661
  return;
2547
2662
  }
@@ -2550,14 +2665,14 @@ var Zn = class {
2550
2665
  #l(e, t, n) {
2551
2666
  let r = {
2552
2667
  ...n.revision,
2553
- content: R(t, e.changes).content
2668
+ content: V(t, e.changes).content
2554
2669
  };
2555
2670
  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;
2556
2671
  }
2557
2672
  #u(e) {
2558
2673
  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));
2559
2674
  }
2560
- }, Qn = 50, $n = {
2675
+ }, $n = 50, er = {
2561
2676
  failed: !1,
2562
2677
  loaded: !1,
2563
2678
  loading: !0,
@@ -2565,12 +2680,12 @@ var Zn = class {
2565
2680
  loadMoreFailed: !1,
2566
2681
  refreshing: !1,
2567
2682
  flows: []
2568
- }, er = class {
2683
+ }, tr = class {
2569
2684
  #e;
2570
2685
  #t;
2571
- #n = new L();
2686
+ #n = new z();
2572
2687
  #r;
2573
- #i = n($n);
2688
+ #i = n(er);
2574
2689
  #a = new AbortController();
2575
2690
  #o = /* @__PURE__ */ new Set();
2576
2691
  #s = !1;
@@ -2617,7 +2732,7 @@ var Zn = class {
2617
2732
  try {
2618
2733
  let t = await this.#e.listFlows({
2619
2734
  includeTotal: !0,
2620
- limit: Qn
2735
+ limit: $n
2621
2736
  });
2622
2737
  if (!e()) return;
2623
2738
  this.#c({
@@ -2634,7 +2749,7 @@ var Zn = class {
2634
2749
  failed: !t,
2635
2750
  loading: !1,
2636
2751
  refreshing: !1
2637
- }), this.#r(B(n, this.#t.t));
2752
+ }), this.#r(H(n, this.#t.t));
2638
2753
  }
2639
2754
  }
2640
2755
  async loadMore() {
@@ -2648,7 +2763,7 @@ var Zn = class {
2648
2763
  try {
2649
2764
  let e = await this.#e.listFlows({
2650
2765
  cursor: t,
2651
- limit: Qn
2766
+ limit: $n
2652
2767
  });
2653
2768
  if (!r()) return;
2654
2769
  let n = new Set(this.#i.value.flows.map((e) => e.flowId));
@@ -2662,7 +2777,7 @@ var Zn = class {
2662
2777
  this.#c({
2663
2778
  loadingMore: !1,
2664
2779
  loadMoreFailed: !0
2665
- }), this.#r(B(e, this.#t.t));
2780
+ }), this.#r(H(e, this.#t.t));
2666
2781
  }
2667
2782
  }
2668
2783
  async setEnabled(e, t) {
@@ -2672,7 +2787,7 @@ var Zn = class {
2672
2787
  let n = await this.#e.setFlowEnabled(e.flowId, e.live.publicationId, t);
2673
2788
  this.#s || this.include(n);
2674
2789
  } catch (e) {
2675
- this.#s || (this.#r(B(e, this.#t.t)), await this.reload());
2790
+ this.#s || (this.#r(H(e, this.#t.t)), await this.reload());
2676
2791
  } finally {
2677
2792
  this.#o.delete(e.flowId);
2678
2793
  }
@@ -2684,9 +2799,9 @@ var Zn = class {
2684
2799
  try {
2685
2800
  let t = await this.#e.publishFlow(e.flowId, e.draftRevisionId, e.live?.publicationId ?? null);
2686
2801
  if (this.#s) return;
2687
- let n = await X.runPromise(X.gen({ self: this }, function* () {
2802
+ let n = await Q.runPromise(Q.gen({ self: this }, function* () {
2688
2803
  let n = t;
2689
- for (; n.status == "pending";) yield* X.sleep(1e3), n = yield* X.tryPromise((t) => this.#e.getPublishOperation(e.flowId, n.operationId, t));
2804
+ for (; n.status == "pending";) yield* Q.sleep(1e3), n = yield* Q.tryPromise((t) => this.#e.getPublishOperation(e.flowId, n.operationId, t));
2690
2805
  return n;
2691
2806
  }), { signal: this.#a.signal });
2692
2807
  if (this.#s) return;
@@ -2698,7 +2813,7 @@ var Zn = class {
2698
2813
  message: this.#t.t("notice.published", { name: e.name })
2699
2814
  }), this.include(await this.#e.getFlow(e.flowId));
2700
2815
  } catch (e) {
2701
- this.#s || this.#r(B(e, this.#t.t));
2816
+ this.#s || this.#r(H(e, this.#t.t));
2702
2817
  } finally {
2703
2818
  this.#o.delete(e.flowId);
2704
2819
  }
@@ -2740,7 +2855,7 @@ var Zn = class {
2740
2855
  ...e
2741
2856
  });
2742
2857
  }
2743
- }, tr = class {
2858
+ }, nr = class {
2744
2859
  #e;
2745
2860
  #t;
2746
2861
  #n;
@@ -2788,7 +2903,7 @@ var Zn = class {
2788
2903
  this.#c(a, r), o = !0;
2789
2904
  } catch (r) {
2790
2905
  if (this.#o || !n()) return;
2791
- if (r instanceof U && r.code == "flow.presentation-conflict") try {
2906
+ if (r instanceof G && r.code == "flow.presentation-conflict") try {
2792
2907
  let t = await this.#e.getPresentation(e);
2793
2908
  if (this.#o || !n()) return;
2794
2909
  this.#c(a, t), this.#n({
@@ -2796,9 +2911,9 @@ var Zn = class {
2796
2911
  message: this.#t.t("notice.layoutConflict")
2797
2912
  });
2798
2913
  } catch (e) {
2799
- !this.#o && n() && this.#c(a, t), !this.#o && n() && this.#n(B(e, this.#t.t));
2914
+ !this.#o && n() && this.#c(a, t), !this.#o && n() && this.#n(H(e, this.#t.t));
2800
2915
  }
2801
- else this.#c(a, t), this.#n(B(r, this.#t.t));
2916
+ else this.#c(a, t), this.#n(H(r, this.#t.t));
2802
2917
  }
2803
2918
  }), await this.#i, o;
2804
2919
  }
@@ -2810,21 +2925,22 @@ var Zn = class {
2810
2925
  value: n
2811
2926
  });
2812
2927
  }
2813
- }, nr = {
2928
+ }, rr = {
2814
2929
  checkLoading: !1,
2815
2930
  selectedNodeIds: [],
2816
2931
  workspaceLoadFailed: !1,
2817
- workspaceLoading: !1
2932
+ workspaceLoading: !1,
2933
+ workspaceRepairing: !1
2818
2934
  };
2819
- function rr(e) {
2935
+ function ir(e) {
2820
2936
  return e.workspaceLoading ? "loading" : e.moduleSaveStatus == null ? e.busy == "designer" ? "saving" : e.draft == null ? "noDraft" : "saved" : e.moduleSaveStatus;
2821
2937
  }
2822
- function ir(e, t) {
2938
+ function ar(e, t) {
2823
2939
  if (t.phase != null) return t.phase;
2824
2940
  let n = e?.content.modules[t.moduleId];
2825
2941
  return n == null ? "failed" : t.source == n.source ? "saved" : "dirty";
2826
2942
  }
2827
- function ar(e, t, n) {
2943
+ function or(e, t, n) {
2828
2944
  if (e == null || t == null || n.length != 1) return;
2829
2945
  let r = e.node(t, n[0]);
2830
2946
  if (!(r?.kind != "task" || r.definition == null || !("moduleId" in r.definition) || r.module == null)) return {
@@ -2832,9 +2948,9 @@ function ar(e, t, n) {
2832
2948
  source: r.module.source
2833
2949
  };
2834
2950
  }
2835
- var or = class {
2951
+ var sr = class {
2836
2952
  #e;
2837
- #t = n(nr);
2953
+ #t = n(rr);
2838
2954
  #n;
2839
2955
  constructor(n, r) {
2840
2956
  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) => {
@@ -2842,25 +2958,25 @@ var or = class {
2842
2958
  let { phase: t, ...n } = e.moduleEditor;
2843
2959
  return {
2844
2960
  ...n,
2845
- status: ir(e.draft, e.moduleEditor)
2961
+ status: ar(e.draft, e.moduleEditor)
2846
2962
  };
2847
- }), 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 : z(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.workspaceLoading);
2963
+ }), 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 : B(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);
2848
2964
  this.#e = e(this.#t, (e) => ({
2849
- revision: e.draft == null ? void 0 : z(e.draft),
2965
+ revision: e.draft == null ? void 0 : B(e.draft),
2850
2966
  target: e.target
2851
2967
  }), { equal: (e, t) => e.revision === t.revision && e.target === t.target });
2852
- let y = e(this.#t, (e) => {
2853
- if (e.draft != null && e.target != null && e.selectedNodeIds.length == 1) return z(e.draft).selection(e.target, e.selectedNodeIds[0]);
2968
+ let x = e(this.#t, (e) => {
2969
+ if (e.draft != null && e.target != null && e.selectedNodeIds.length == 1) return B(e.draft).selection(e.target, e.selectedNodeIds[0]);
2854
2970
  });
2855
2971
  this.$ = {
2856
2972
  addNodeOptions: t((e) => {
2857
2973
  let { revision: t, target: r } = e(this.#e);
2858
- return Ye(t?.revision, r, e(n.t$));
2974
+ return qe(t?.revision, r, e(n.t$));
2859
2975
  }),
2860
2976
  busy: i,
2861
2977
  checkLoading: a,
2862
2978
  diagnosticFocus: o,
2863
- diagnosticItems: e(this.#t, (e) => Se(e.draft == null ? void 0 : z(e.draft), e.target, e.diagnostics)),
2979
+ diagnosticItems: e(this.#t, (e) => xe(e.draft == null ? void 0 : B(e.draft), e.target, e.diagnostics)),
2864
2980
  diagnostics: s,
2865
2981
  draft: c,
2866
2982
  flow: t((e) => {
@@ -2876,22 +2992,24 @@ var or = class {
2876
2992
  flowRefreshing: r.$.refreshing,
2877
2993
  flowTotal: r.$.total,
2878
2994
  flows: r.$.flows,
2879
- inspectorDiagnostics: e(this.#t, (e) => Ke(e.draft == null ? void 0 : z(e.draft), e.target, e.diagnostics, y.value)),
2995
+ inspectorDiagnostics: e(this.#t, (e) => We(e.draft == null ? void 0 : B(e.draft), e.target, e.diagnostics, x.value)),
2880
2996
  live: p,
2881
2997
  moduleEditor: l,
2882
2998
  nodeFocus: u,
2883
2999
  presentation: d,
2884
3000
  revision: m,
2885
- selection: y,
3001
+ selection: x,
2886
3002
  selectedNodeIds: h,
2887
- status: e(this.#t, rr),
3003
+ status: e(this.#t, ir),
2888
3004
  target: g,
2889
3005
  targetFlow: t((e) => e(g)?.kind == "flow" ? e(r.$.flows).find((t) => t.flowId == e(f)) : void 0),
2890
3006
  targetName: e(this.#t, (e) => {
2891
- if (e.target != null) return e.target.kind == "flow" ? r.flow(e.flowId ?? "")?.name : e.draft == null ? e.target.id : z(e.draft).subflow(e.target.id)?.name ?? e.target.id;
3007
+ if (e.target != null) return e.target.kind == "flow" ? r.flow(e.flowId ?? "")?.name : e.draft == null ? e.target.id : B(e.draft).subflow(e.target.id)?.name ?? e.target.id;
2892
3008
  }),
2893
3009
  workspaceLoadFailed: _,
2894
- workspaceLoading: v
3010
+ workspaceLoadProblem: v,
3011
+ workspaceLoading: y,
3012
+ workspaceRepairing: b
2895
3013
  }, this.#n = new Set(Object.values(r.$));
2896
3014
  }
2897
3015
  get value() {
@@ -2907,14 +3025,14 @@ var or = class {
2907
3025
  for (let e of Object.values(this.$)) this.#n.has(e) || e.dispose();
2908
3026
  this.#e.dispose(), this.#t.dispose();
2909
3027
  }
2910
- }, sr = {
3028
+ }, cr = {
2911
3029
  x: 40,
2912
3030
  y: 40
2913
3031
  };
2914
- function cr(e, t) {
3032
+ function lr(e, t) {
2915
3033
  if (t != null) return t.kind == "flow" || e.subflow(t.id) != null ? t : { kind: "flow" };
2916
3034
  }
2917
- var lr = class {
3035
+ var ur = class {
2918
3036
  #e;
2919
3037
  #t;
2920
3038
  #n;
@@ -2938,30 +3056,34 @@ var lr = class {
2938
3056
  #b;
2939
3057
  #x;
2940
3058
  #S;
2941
- constructor(e, t, n = Jt, r = p(), i = () => {}, a = new Mn(e)) {
2942
- this.catalogs = a, this.#n = new L(), this.#u = /* @__PURE__ */ new Map(), this.#d = new Yn(), this.history$ = this.#d.state$, this.#h = 0, this.#g = 0, 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 er(e, t, r), this.#l = new or(r, this.#o), this.#t = new Zn(e, t, r, {
2943
- apply: (e) => this.#O(e, "local"),
3059
+ #C;
3060
+ #w;
3061
+ constructor(e, t, n = Kt, r = p(), i = () => {}, a = new Nn(e), o = () => {}) {
3062
+ this.catalogs = a, this.flowCreated = o, this.#n = new z(), this.#u = /* @__PURE__ */ new Map(), this.#d = new Xn(), this.history$ = this.#d.state$, this.#h = 0, this.#g = 0, this.#_ = !1, this.#v = !1, this.#y = !1, this.#b = !1, this.#x = 0, this.#e = e, this.#c = t, this.#i = n, this.#r = r, this.#s = i, this.#o = new tr(e, t, r), this.#l = new sr(r, this.#o), this.#t = new Qn(e, t, r, {
3063
+ apply: (e) => this.#j(e, "local"),
2944
3064
  beforeChange: (e) => {
2945
- e && this.#V({ busy: "designer" });
3065
+ e && this.#W({ busy: "designer" });
2946
3066
  },
2947
- check: () => void this.#N(),
2948
- current: (e) => this.#R(e),
3067
+ check: () => void this.#I(),
3068
+ current: (e) => this.#V(e),
2949
3069
  finishChanges: () => {
2950
- !this.#v && this.#l.value.busy == "designer" && this.#V({ busy: void 0 });
3070
+ !this.#v && this.#l.value.busy == "designer" && this.#W({ busy: void 0 });
2951
3071
  },
2952
3072
  headChanged: (e, t) => this.#o.advanceHead(e, t),
2953
- recover: (e) => (this.retryHistorySync(), this.#F(e, !0))
2954
- }), this.#a = new tr(e, t, (e) => this.#V({ presentation: e }), r), this.$ = this.#l.$;
3073
+ recover: (e) => (this.retryHistorySync(), this.#R(e, !0))
3074
+ }), this.#a = new nr(e, t, (e) => this.#W({ presentation: e }), r), this.$ = this.#l.$;
2955
3075
  }
2956
3076
  dispose() {
2957
- this.catalogs.dispose(), this.#v = !0, this.#n.invalidate(), this.#a.dispose(), this.#x?.(), this.#S?.(), this.history$.dispose(), this.#l.dispose(), this.#o.dispose();
3077
+ this.catalogs.dispose(), this.#v = !0, this.#n.invalidate(), this.#a.dispose(), this.#C?.(), this.#w?.(), this.history$.dispose(), this.#l.dispose(), this.#o.dispose();
2958
3078
  }
2959
3079
  async start(e) {
2960
- if (this.#x == null) {
2961
- let e = this.#e.watchFlowCatalog(() => void this.reloadFlows());
2962
- this.#x = e.stop, await e.ready;
3080
+ if (this.#y = !1, this.#C == null) {
3081
+ let e = this.#e.watchFlowCatalog((e) => {
3082
+ this.#v || (this.reloadFlows(), e?.kind == "flow.created" && this.#y && this.#l.value.flowId == null && this.#l.value.busy == null && this.flowCreated(e.flowId));
3083
+ });
3084
+ this.#C = e.stop, await e.ready;
2963
3085
  }
2964
- this.#v || (await this.reloadFlows(), this.#v || await this.selectFlow(e));
3086
+ this.#v || (await this.reloadFlows(), this.#v || await this.selectFlow(e), this.#y = !this.#v);
2965
3087
  }
2966
3088
  async reloadFlows() {
2967
3089
  await this.#o.reload();
@@ -2977,9 +3099,9 @@ var lr = class {
2977
3099
  }
2978
3100
  async selectFlow(e) {
2979
3101
  if (this.#d.applying || !await this.saveModuleEditor() || this.#v) return !1;
2980
- this.#d.clear(), this.#d.failed = !1, this.#d.publish();
3102
+ this.#d.clear(), this.#S = void 0, this.#d.failed = !1, this.#d.publish();
2981
3103
  let t = this.#n.begin();
2982
- if (this.#t.reset(), this.#a.reset(), this.#g = 0, this.#_ = !1, this.#y = !1, this.#S?.(), this.#S = void 0, this.#V({
3104
+ if (this.#t.reset(), this.#a.reset(), this.#g = 0, this.#_ = !1, this.#b = !1, this.#w?.(), this.#w = void 0, this.#W({
2983
3105
  checkLoading: !1,
2984
3106
  diagnosticFocus: void 0,
2985
3107
  diagnostics: void 0,
@@ -2992,73 +3114,100 @@ var lr = class {
2992
3114
  selectedNodeIds: [],
2993
3115
  target: e == null ? void 0 : { kind: "flow" },
2994
3116
  workspaceLoadFailed: !1,
2995
- workspaceLoading: e != null
3117
+ workspaceLoadProblem: void 0,
3118
+ workspaceLoading: e != null,
3119
+ workspaceRepairing: !1
2996
3120
  }), e == null) return !0;
2997
3121
  try {
2998
3122
  let n = !1, r, i = this.#e.watchFlow(e, (e) => {
2999
- t() && (this.#t.committed == null ? (n = !0, r = e) : e != this.#t.committed.revisionId && this.#P(e));
3123
+ t() && (this.#t.committed == null ? (n = !0, r = e) : e != this.#t.committed.revisionId && this.#L(e));
3000
3124
  }, (e) => {
3001
3125
  t() && this.#s(e);
3002
3126
  });
3003
- if (this.#S = i.stop, await i.ready, !t()) return !1;
3127
+ if (this.#w = i.stop, await i.ready, !t()) return !1;
3004
3128
  let { flow: a, draft: o, live: s, presentation: c } = await this.#e.getEditor(e);
3005
3129
  if (!t()) return !1;
3006
- this.#t.reset(o), this.#a.reset(c), this.#o.include(a), this.#V({
3130
+ this.#t.reset(o), this.#a.reset(c), this.#o.include(a), this.#W({
3007
3131
  draft: o,
3008
3132
  live: s,
3009
3133
  presentation: c,
3010
3134
  target: { kind: "flow" },
3011
3135
  workspaceLoadFailed: !1,
3136
+ workspaceLoadProblem: void 0,
3012
3137
  workspaceLoading: !1
3013
- }), await this.#D(t), n && r != o.revisionId && this.#P(r);
3138
+ }), await this.#A(t), n && r != o.revisionId && this.#L(r);
3014
3139
  } catch (e) {
3015
3140
  if (!t()) return !1;
3016
- this.#S?.(), this.#S = void 0;
3017
- let n = e instanceof U && e.code == ve.flowNotFound;
3018
- return this.#V(n ? {
3019
- flowId: void 0,
3020
- target: void 0,
3021
- workspaceLoadFailed: !1,
3022
- workspaceLoading: !1
3023
- } : {
3141
+ this.#w?.(), this.#w = void 0;
3142
+ let n = e instanceof G && e.code == ge.flowUpgradeRequired ? "upgrade" : e instanceof G && e.code == ge.flowRepairRequired ? "repair" : "failed";
3143
+ return this.#W({
3024
3144
  workspaceLoadFailed: !0,
3145
+ workspaceLoadProblem: {
3146
+ kind: n,
3147
+ ...n == "failed" ? { message: H(e, this.#r.t).message } : {}
3148
+ },
3025
3149
  workspaceLoading: !1
3026
- }), this.#c(n ? {
3027
- kind: "error",
3028
- message: this.#r.t("notice.flowMissing")
3029
- } : B(e, this.#r.t)), !1;
3150
+ }), !1;
3030
3151
  }
3031
3152
  return !0;
3032
3153
  }
3154
+ async repairWorkspace() {
3155
+ let e = this.#l.value.flowId, t = e == null ? void 0 : this.#o.flow(e);
3156
+ if (e == null || t == null || this.#l.value.workspaceRepairing) return;
3157
+ let n = this.#S ??= {
3158
+ changeId: this.#i(),
3159
+ expectedRevisionId: t.draftRevisionId
3160
+ };
3161
+ this.#W({
3162
+ workspaceRepairing: !0,
3163
+ workspaceLoadProblem: this.#l.value.workspaceLoadProblem
3164
+ });
3165
+ try {
3166
+ await this.#e.repairDraft(e, n.expectedRevisionId, n.changeId), this.#S = void 0, await this.selectFlow(e);
3167
+ } catch (t) {
3168
+ if (this.#v) return;
3169
+ if (t instanceof G && t.code == ge.flowRevisionConflict) {
3170
+ this.#S = void 0, await this.selectFlow(e);
3171
+ return;
3172
+ }
3173
+ this.#W({
3174
+ workspaceLoadProblem: {
3175
+ kind: this.#l.value.workspaceLoadProblem?.kind == "upgrade" ? "upgrade" : "repair",
3176
+ message: H(t, this.#r.t).message
3177
+ },
3178
+ workspaceRepairing: !1
3179
+ });
3180
+ }
3181
+ }
3033
3182
  selectTarget(e) {
3034
- return !this.#d.applying && (u(e, this.#l.value.target) || this.#d.clear(), this.#C(), this.#V({
3183
+ return !this.#d.applying && (u(e, this.#l.value.target) || this.#d.clear(), this.#T(), this.#W({
3035
3184
  diagnosticFocus: void 0,
3036
3185
  diagnostics: void 0,
3037
3186
  moduleEditor: void 0,
3038
3187
  nodeFocus: void 0,
3039
3188
  selectedNodeIds: [],
3040
3189
  target: e
3041
- }), this.#N(), !0);
3190
+ }), this.#I(), !0);
3042
3191
  }
3043
3192
  selectNodes(e) {
3044
- return e.length == this.#l.value.selectedNodeIds.length && e.every((e, t) => e == this.#l.value.selectedNodeIds[t]) ? !0 : (this.#C(), this.#V({
3193
+ return e.length == this.#l.value.selectedNodeIds.length && e.every((e, t) => e == this.#l.value.selectedNodeIds[t]) ? !0 : (this.#T(), this.#W({
3045
3194
  diagnosticFocus: void 0,
3046
- moduleEditor: ar(this.#l.value.draft == null ? void 0 : z(this.#l.value.draft), this.#l.value.target, e),
3195
+ moduleEditor: or(this.#l.value.draft == null ? void 0 : B(this.#l.value.draft), this.#l.value.target, e),
3047
3196
  nodeFocus: void 0,
3048
3197
  selectedNodeIds: e
3049
3198
  }), !0);
3050
3199
  }
3051
3200
  async createFlow(e, t) {
3052
3201
  if (await this.saveModuleEditor()) {
3053
- this.#V({ busy: "flow" });
3202
+ this.#W({ busy: "flow" });
3054
3203
  try {
3055
3204
  if (t == null) return await this.#o.create(e);
3056
3205
  let n = await this.#e.getFlow(await t(e));
3057
3206
  return this.#o.insert(n), n;
3058
3207
  } catch (e) {
3059
- this.#v || this.#c(B(e, this.#r.t));
3208
+ this.#v || this.#c(H(e, this.#r.t));
3060
3209
  } finally {
3061
- this.#V({ busy: void 0 });
3210
+ this.#W({ busy: void 0 });
3062
3211
  }
3063
3212
  }
3064
3213
  }
@@ -3066,24 +3215,24 @@ var lr = class {
3066
3215
  if (!await this.saveModuleEditor()) return !1;
3067
3216
  let t = this.#o.flow(e);
3068
3217
  if (t == null || t.status == "retiring") return !1;
3069
- this.#V({ busy: "flow" });
3218
+ this.#W({ busy: "flow" });
3070
3219
  try {
3071
3220
  return await this.#e.deleteFlow(e), !this.#v && (this.#o.remove(e), this.#c({
3072
3221
  kind: "success",
3073
3222
  message: this.#r.t("notice.flowDeleteAccepted", { name: t.name })
3074
3223
  }), !0);
3075
3224
  } catch (e) {
3076
- return this.#v || this.#c(B(e, this.#r.t)), !1;
3225
+ return this.#v || this.#c(H(e, this.#r.t)), !1;
3077
3226
  } finally {
3078
- this.#V({ busy: void 0 });
3227
+ this.#W({ busy: void 0 });
3079
3228
  }
3080
3229
  }
3081
3230
  async createResource(e) {
3082
3231
  if (!await this.saveModuleEditor() || this.#l.value.draft == null) return !1;
3083
3232
  let t = this.#i();
3084
- this.#V({ busy: "resource" });
3085
- let n = await this.#E(Le(t, e), !1);
3086
- return this.#V({ busy: void 0 }), n != null && (this.selectTarget({
3233
+ this.#W({ busy: "resource" });
3234
+ let n = await this.#k(Ie(t, e), !1);
3235
+ return this.#W({ busy: void 0 }), n != null && (this.selectTarget({
3087
3236
  id: t,
3088
3237
  kind: "subflow"
3089
3238
  }), this.#c({
@@ -3095,14 +3244,14 @@ var lr = class {
3095
3244
  let n = this.#o.flow(e), r = t.trim();
3096
3245
  if (n == null || r.length == 0) return !1;
3097
3246
  if (n.name == r) return !0;
3098
- this.#V({ busy: "flow" });
3247
+ this.#W({ busy: "flow" });
3099
3248
  let i;
3100
3249
  try {
3101
3250
  i = await this.#e.renameFlow(e, r), i != null && this.#o.include(i);
3102
3251
  } catch (e) {
3103
- this.#v || this.#c(B(e, this.#r.t));
3252
+ this.#v || this.#c(H(e, this.#r.t));
3104
3253
  }
3105
- return this.#V({ busy: void 0 }), i != null && (this.#c({
3254
+ return this.#W({ busy: void 0 }), i != null && (this.#c({
3106
3255
  kind: "success",
3107
3256
  message: this.#r.t("notice.flowRenamed", { name: r })
3108
3257
  }), !0);
@@ -3112,61 +3261,61 @@ var lr = class {
3112
3261
  let r = this.#l.value.draft, i = this.#l.value.target;
3113
3262
  if (r == null || i == null) return;
3114
3263
  let a = this.#i();
3115
- if (e.kind == "comment") return await this.#T(i, a, t);
3116
- let o = z(r), s = v(e, o, i, this.#r.t);
3264
+ if (e.kind == "comment") return await this.#D(i, a, t);
3265
+ let o = B(r), s = v(e, o, i, this.#r.t);
3117
3266
  if (s == null) return;
3118
3267
  if (s.kind == "provider-trigger" && s.connectionId == null && s.definition.key != "feishu_app_bot.on_event") {
3119
3268
  try {
3120
- let e = await w(this.catalogs.connections.get(s.definition.provider, r.flowId));
3269
+ let e = await M(this.catalogs.connections.get(s.definition.provider, r.flowId));
3121
3270
  s = {
3122
3271
  ...s,
3123
- connectionId: et(e).preferred?.connectionId
3272
+ connectionId: N(e).preferred?.connectionId
3124
3273
  };
3125
3274
  } catch (e) {
3126
- !this.#v && this.#l.value.draft == r && this.#c(B(e, this.#r.t));
3275
+ !this.#v && this.#l.value.draft == r && this.#c(H(e, this.#r.t));
3127
3276
  }
3128
3277
  if (this.#v || this.#l.value.draft != r || this.#l.value.target != i) return;
3129
3278
  }
3130
- let c = n?.(a), l = Ue(o, i, a, s, this.#i);
3279
+ let c = n?.(a), l = He(o, i, a, s, this.#i);
3131
3280
  if (l == null) return;
3132
- let u = c == null ? l : [...l, ...Ut(R(r, l).content, i, {
3281
+ let u = c == null ? l : [...l, ...Vt(V(r, l).content, i, {
3133
3282
  source: c.source,
3134
3283
  target: c.target,
3135
3284
  ...c.sourceHandle.startsWith("$branch:") ? { sourceHandle: c.sourceHandle.slice(8) } : {}
3136
3285
  })];
3137
- if (await this.#j("add", 1, u, (e) => Be(e, i, { [a]: t }), [a]) && !this.#v) return this.#V({ nodeFocus: {
3286
+ if (await this.#P("add", 1, u, (e) => k(e, i, { [a]: t }), [a]) && !this.#v) return this.#W({ nodeFocus: {
3138
3287
  nodeId: a,
3139
- requestId: ++this.#b
3288
+ requestId: ++this.#x
3140
3289
  } }), a;
3141
3290
  }
3142
3291
  async connect(e) {
3143
3292
  let t = this.$.revision.value, n = this.#l.value.target;
3144
3293
  if (t == null || n == null) return;
3145
- let r = Ut(t.revision.content, n, {
3294
+ let r = Vt(t.revision.content, n, {
3146
3295
  source: e.source,
3147
3296
  target: e.target,
3148
3297
  ...e.sourceHandle.startsWith("$branch:") ? { sourceHandle: e.sourceHandle.slice(8) } : {}
3149
3298
  });
3150
- r.length > 0 && await this.#j("connect", 1, r);
3299
+ r.length > 0 && await this.#P("connect", 1, r);
3151
3300
  }
3152
3301
  async disconnect(e) {
3153
3302
  let t = this.$.revision.value, n = this.#l.value.target;
3154
3303
  if (t == null || n == null) return;
3155
- let r = Wt(t.revision.content, n, {
3304
+ let r = Ht(t.revision.content, n, {
3156
3305
  source: e.source,
3157
3306
  target: e.target,
3158
3307
  ...e.sourceHandle.startsWith("$branch:") ? { sourceHandle: e.sourceHandle.slice(8) } : {}
3159
3308
  });
3160
- r.length > 0 && await this.#j("disconnect", 1, r);
3309
+ r.length > 0 && await this.#P("disconnect", 1, r);
3161
3310
  }
3162
3311
  async deleteSelectedNodes() {
3163
3312
  if (!await this.saveModuleEditor()) return;
3164
3313
  let e = this.$.revision.value, t = this.#l.value.target;
3165
3314
  if (e == null || t == null || this.#l.value.selectedNodeIds.length == 0) return;
3166
- let n = [...this.#l.value.selectedNodeIds], r = se(this.#l.value.presentation?.value ?? {}, t), i = new Set(this.#l.value.selectedNodeIds.filter((e) => r.has(e))), a = Ve(e, t, this.#l.value.selectedNodeIds);
3167
- await this.#j("delete", this.#l.value.selectedNodeIds.length, a, (e) => {
3168
- let r = i.size == 0 ? e : T(e, t, i);
3169
- for (let e of n) r = D(r, t, e, !1);
3315
+ let n = [...this.#l.value.selectedNodeIds], r = te(this.#l.value.presentation?.value ?? {}, t), i = new Set(this.#l.value.selectedNodeIds.filter((e) => r.has(e))), a = Ve(e, t, this.#l.value.selectedNodeIds);
3316
+ await this.#P("delete", this.#l.value.selectedNodeIds.length, a, (e) => {
3317
+ let r = i.size == 0 ? e : se(e, t, i);
3318
+ for (let e of n) r = T(r, t, e, !1);
3170
3319
  return r;
3171
3320
  }, []);
3172
3321
  }
@@ -3175,26 +3324,26 @@ var lr = class {
3175
3324
  if (e == null || t == null || this.#l.value.selectedNodeIds.length == 0) return;
3176
3325
  let n = new Set(this.#l.value.selectedNodeIds);
3177
3326
  this.#m = {
3178
- hiddenNodeIds: this.#I().nodes.flatMap((e) => e.contentHidden && n.has(e.id) ? [e.id] : []),
3179
- comments: this.#I().nodes.flatMap((e) => e.kind == "comment" && n.has(e.id) ? [{
3327
+ hiddenNodeIds: this.#z().nodes.flatMap((e) => e.contentHidden && n.has(e.id) ? [e.id] : []),
3328
+ comments: this.#z().nodes.flatMap((e) => e.kind == "comment" && n.has(e.id) ? [{
3180
3329
  content: e.content,
3181
3330
  position: e.position,
3182
3331
  sourceId: e.id,
3183
3332
  title: e.title
3184
3333
  }] : []),
3185
- nodes: he(e, t, this.#l.value.selectedNodeIds)
3334
+ nodes: fe(e, t, this.#l.value.selectedNodeIds)
3186
3335
  };
3187
3336
  }
3188
- async pasteNodes(e, t = sr) {
3337
+ async pasteNodes(e, t = cr) {
3189
3338
  if (!await this.saveModuleEditor()) return;
3190
3339
  let n = this.$.revision.value, r = this.#l.value.target;
3191
3340
  if (n == null || r == null || this.#m == null) return;
3192
- let i = new Set(this.#m.hiddenNodeIds), a = ye(n, r, this.#m.nodes, this.#i), o = this.#m.comments.map((e) => ({
3341
+ let i = new Set(this.#m.hiddenNodeIds), a = _e(n, r, this.#m.nodes, this.#i), o = this.#m.comments.map((e) => ({
3193
3342
  ...e,
3194
3343
  nodeId: this.#i()
3195
3344
  }));
3196
3345
  if (a.nodeIds.length == 0 && o.length == 0) return;
3197
- let s = new Map(this.#I().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 ?? {
3346
+ 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 ?? {
3198
3347
  x: 80,
3199
3348
  y: 80
3200
3349
  }), ...o.map((e) => e.position)], d = 1;
@@ -3206,10 +3355,10 @@ var lr = class {
3206
3355
  y: (i?.y ?? 80) + t.y * d
3207
3356
  }];
3208
3357
  }));
3209
- await this.#j("paste", c.size, a.changes, (e) => {
3210
- let n = Be(e, r, f);
3211
- for (let [e, t] of a.sourceIds.entries()) i.has(t) && (n = D(n, r, a.nodeIds[e], !0));
3212
- for (let e of o) i.has(e.sourceId) && (n = D(n, r, e.nodeId, !0)), n = j(n, r, e.nodeId, {
3358
+ await this.#P("paste", c.size, a.changes, (e) => {
3359
+ let n = k(e, r, f);
3360
+ for (let [e, t] of a.sourceIds.entries()) i.has(t) && (n = T(n, r, a.nodeIds[e], !0));
3361
+ for (let e of o) i.has(e.sourceId) && (n = T(n, r, e.nodeId, !0)), n = P(n, r, e.nodeId, {
3213
3362
  content: e.content,
3214
3363
  position: {
3215
3364
  x: e.position.x + t.x * d,
@@ -3227,35 +3376,35 @@ var lr = class {
3227
3376
  let n = this.$.revision.value, r = this.#l.value.target;
3228
3377
  if (n == null || r == null) return !1;
3229
3378
  let i = De(n, r, e, t);
3230
- return i != null && await this.#E(i) != null;
3379
+ return i != null && await this.#O(i) != null;
3231
3380
  }
3232
3381
  async saveNodeDescription(e, t) {
3233
3382
  let n = this.$.revision.value, r = this.#l.value.target;
3234
3383
  if (n == null || r == null) return !1;
3235
3384
  let i = Ce(n, r, e, t);
3236
- return i != null && await this.#E(i) != null;
3385
+ return i != null && await this.#O(i) != null;
3237
3386
  }
3238
3387
  async saveNodeIcon(e, t) {
3239
3388
  let n = this.$.revision.value, r = this.#l.value.target;
3240
3389
  if (n == null || r == null) return !1;
3241
- let i = Re(n, r, e, t);
3242
- return i != null && await this.#E(i) != null;
3390
+ let i = Le(n, r, e, t);
3391
+ return i != null && await this.#O(i) != null;
3243
3392
  }
3244
3393
  async saveNodeTitle(e, t) {
3245
3394
  let n = this.$.revision.value, r = this.#l.value.target;
3246
3395
  if (n == null || r == null) return !1;
3247
- let i = Fe(n, r, e, t);
3248
- return i != null && await this.#E(i) != null;
3396
+ let i = Pe(n, r, e, t);
3397
+ return i != null && await this.#O(i) != null;
3249
3398
  }
3250
3399
  async setInputValue(e, t, n) {
3251
3400
  let r = this.$.revision.value, i = this.#l.value.target;
3252
3401
  if (r == null || i == null) return !1;
3253
- let a = Pe(r, i, e, t, n);
3254
- return a != null && await this.#E(a) != null;
3402
+ let a = Ne(r, i, e, t, n);
3403
+ return a != null && await this.#O(a) != null;
3255
3404
  }
3256
3405
  async setInputSource(e, t, n) {
3257
3406
  let r = this.$.revision.value, i = this.#l.value.target;
3258
- return r == null || i == null ? !1 : await this.#E(Je(r.revision.content, i, e, t, [{
3407
+ return r == null || i == null ? !1 : await this.#O(Ke(r.revision.content, i, e, t, [{
3259
3408
  kind: "node",
3260
3409
  ...n
3261
3410
  }])) != null;
@@ -3263,36 +3412,36 @@ var lr = class {
3263
3412
  async setInputVariable(e, t, n) {
3264
3413
  let r = this.$.revision.value, i = this.#l.value.target;
3265
3414
  if (r == null || i == null) return !1;
3266
- let a = n == null ? Pe(r, i, e, t, void 0) : Ge(r, i, e, t, n, this.#i());
3267
- return a != null && await this.#E(a) != null;
3415
+ let a = n == null ? Ne(r, i, e, t, void 0) : Ue(r, i, e, t, n, this.#i());
3416
+ return a != null && await this.#O(a) != null;
3268
3417
  }
3269
3418
  async saveCondition(e, t) {
3270
3419
  let n = this.$.revision.value, r = this.#l.value.target;
3271
3420
  if (n == null || r == null) return !1;
3272
- let i = be(n, r, e, t);
3273
- return i != null && await this.#E(i) != null;
3421
+ let i = ye(n, r, e, t);
3422
+ return i != null && await this.#O(i) != null;
3274
3423
  }
3275
3424
  async saveValue(e, t) {
3276
3425
  let n = this.$.revision.value, r = this.#l.value.target;
3277
3426
  if (n == null || r == null) return !1;
3278
- let i = _e(n, r, e, t);
3279
- return i != null && await this.#E(i) != null;
3427
+ let i = he(n, r, e, t);
3428
+ return i != null && await this.#O(i) != null;
3280
3429
  }
3281
3430
  async saveWait(e, t) {
3282
3431
  let n = this.$.revision.value, r = this.#l.value.target;
3283
3432
  if (n == null || r?.kind != "flow") return !1;
3284
- let i = Xe(n, r, e, t);
3285
- return i != null && await this.#E(i) != null;
3433
+ let i = Je(n, r, e, t);
3434
+ return i != null && await this.#O(i) != null;
3286
3435
  }
3287
3436
  async saveNodeContentHidden(e, t) {
3288
- let n = this.#l.value.target, r = this.#I().nodes.find((t) => t.id == e);
3289
- n != null && r != null && r.kind != "condition" && await this.#k((r) => D(r, n, e, t));
3437
+ let n = this.#l.value.target, r = this.#z().nodes.find((t) => t.id == e);
3438
+ n != null && r != null && r.kind != "condition" && await this.#P("edit", 1, [], (r) => T(r, n, e, t));
3290
3439
  }
3291
3440
  async saveComment(e, t) {
3292
3441
  let n = this.#l.value.target;
3293
3442
  if (n == null) return;
3294
- let r = this.#I().nodes.find((t) => t.id == e)?.position;
3295
- r != null && await this.#k((i) => j(i, n, e, {
3443
+ let r = this.#z().nodes.find((t) => t.id == e)?.position;
3444
+ r != null && await this.#P("edit", 1, [], (i) => P(i, n, e, {
3296
3445
  ...t,
3297
3446
  position: r
3298
3447
  }));
@@ -3300,32 +3449,32 @@ var lr = class {
3300
3449
  async saveTaskSettings(e, t) {
3301
3450
  let n = this.$.revision.value, r = this.#l.value.target;
3302
3451
  if (n == null || r == null) return !1;
3303
- let i = fe(n, r, e, t);
3304
- return i != null && await this.#E(i) != null;
3452
+ let i = le(n, r, e, t);
3453
+ return i != null && await this.#O(i) != null;
3305
3454
  }
3306
3455
  async saveCodeActions(e, t) {
3307
3456
  let n = this.$.revision.value, r = this.#l.value.target;
3308
3457
  if (n == null || r == null) return !1;
3309
3458
  let i = Ee(n.revision.content, r, e, t);
3310
- return i == null || await this.#E(i) != null;
3459
+ return i == null || await this.#O(i) != null;
3311
3460
  }
3312
3461
  async saveTaskPorts(e, t) {
3313
3462
  let n = this.$.revision.value, r = this.#l.value.target;
3314
3463
  if (n == null || r == null) return !1;
3315
- let i = Qe(n, r, e, t);
3316
- return i != null && await this.#E(i) != null;
3464
+ let i = Xe(n, r, e, t);
3465
+ return i != null && await this.#O(i) != null;
3317
3466
  }
3318
3467
  async saveTaskAdditionalInputs(e, t) {
3319
3468
  let n = this.$.revision.value, r = this.#l.value.target;
3320
3469
  if (n == null || r == null) return !1;
3321
- let i = qe(n, r, e, t);
3322
- return i != null && await this.#E(i) != null;
3470
+ let i = Ge(n, r, e, t);
3471
+ return i != null && await this.#O(i) != null;
3323
3472
  }
3324
3473
  async setConnectorConnection(e, t) {
3325
3474
  let n = this.$.revision.value;
3326
3475
  if (n == null) return !1;
3327
- let r = me(n.revision.content, e, t);
3328
- return r != null && await this.#E(r) != null;
3476
+ let r = de(n.revision.content, e, t);
3477
+ return r != null && await this.#O(r) != null;
3329
3478
  }
3330
3479
  get eventSourceClient() {
3331
3480
  return this.#e;
@@ -3340,15 +3489,15 @@ var lr = class {
3340
3489
  if (n == null || r?.kind != "flow") return !1;
3341
3490
  let i = n.graph(r)?.nodes[e];
3342
3491
  if (i?.kind != "integration" || i.definition.key != "feishu_app_bot.on_event" || t.provider != i.definition.provider) return !1;
3343
- let a = $e(n.revision.content, r, e, t.connectionId);
3492
+ let a = Ze(n.revision.content, r, e, t.connectionId);
3344
3493
  if (a == null) return !1;
3345
3494
  let o = i.config.sourceId != t.sourceId;
3346
- return await this.#E([
3495
+ return await this.#O([
3347
3496
  ...a,
3348
- ...N(n.revision.content, r, e, "sourceId", t.sourceId) ?? [],
3349
- ...o ? N(n.revision.content, r, e, "eventTypes", []) ?? [] : [],
3350
- ...o ? N(n.revision.content, r, e, "resource", void 0) ?? [] : [],
3351
- ...o ? N(n.revision.content, r, e, "chatIds", void 0) ?? [] : []
3497
+ ...I(n.revision.content, r, e, "sourceId", t.sourceId) ?? [],
3498
+ ...o ? I(n.revision.content, r, e, "eventTypes", []) ?? [] : [],
3499
+ ...o ? I(n.revision.content, r, e, "resource", void 0) ?? [] : [],
3500
+ ...o ? I(n.revision.content, r, e, "chatIds", void 0) ?? [] : []
3352
3501
  ]) != null;
3353
3502
  }
3354
3503
  async loadTriggerConfigOptions(e, t, n) {
@@ -3359,45 +3508,45 @@ var lr = class {
3359
3508
  async saveTriggerConfig(e, t, n) {
3360
3509
  let r = this.$.revision.value, i = this.#l.value.target;
3361
3510
  if (r == null || i?.kind != "flow") return !1;
3362
- let a = N(r.revision.content, i, e, t, n);
3511
+ let a = I(r.revision.content, i, e, t, n);
3363
3512
  if (a == null) return !1;
3364
3513
  let o = r.graph(i)?.nodes[e];
3365
3514
  if (a.length > 0 && o?.kind == "integration" && o.definition.key == "feishu_app_bot.on_event" && t == "eventTypes") {
3366
3515
  let t = Array.isArray(n) ? n.filter((e) => typeof e == "string") : [];
3367
- b(t) || (a = [...a, ...N(r.revision.content, i, e, "chatIds", void 0) ?? []]), O(o.config.resource) && o.config.resource.kind != S(t) && (a = [...a, ...N(r.revision.content, i, e, "resource", void 0) ?? []]);
3516
+ b(t) || (a = [...a, ...I(r.revision.content, i, e, "chatIds", void 0) ?? []]), ve(o.config.resource) && o.config.resource.kind != S(t) && (a = [...a, ...I(r.revision.content, i, e, "resource", void 0) ?? []]);
3368
3517
  }
3369
- return a.length > 0 && o?.kind == "poll" && o.definition.key == "linear.on_issue_changed" && t == "teamId" ? await this.#E([...a, ...N(r.revision.content, i, e, "stateIds", void 0) ?? []]) != null : await this.#E(a) != null;
3518
+ return a.length > 0 && o?.kind == "poll" && o.definition.key == "linear.on_issue_changed" && t == "teamId" ? await this.#O([...a, ...I(r.revision.content, i, e, "stateIds", void 0) ?? []]) != null : await this.#O(a) != null;
3370
3519
  }
3371
3520
  async saveTriggerSchedule(e, t) {
3372
3521
  let n = this.$.revision.value, r = this.#l.value.target;
3373
3522
  if (n == null || r?.kind != "flow") return !1;
3374
- let i = Ze(n.revision.content, r, e, t);
3375
- return i != null && await this.#E(i) != null;
3523
+ let i = Ye(n.revision.content, r, e, t);
3524
+ return i != null && await this.#O(i) != null;
3376
3525
  }
3377
3526
  async saveWebhook(e, t) {
3378
3527
  let n = this.$.revision.value, r = this.#l.value.target;
3379
3528
  if (n == null || r?.kind != "flow") return !1;
3380
- let i = ce(n, r, e, t);
3381
- return i != null && await this.#E(i) != null;
3529
+ let i = ie(n, r, e, t);
3530
+ return i != null && await this.#O(i) != null;
3382
3531
  }
3383
3532
  async setTriggerConnection(e, t) {
3384
3533
  let n = this.$.revision.value, r = this.#l.value.target;
3385
3534
  if (n == null || r?.kind != "flow") return !1;
3386
- let i = $e(n.revision.content, r, e, t);
3535
+ let i = Ze(n.revision.content, r, e, t);
3387
3536
  if (i == null) return !1;
3388
3537
  let a = n.graph(r)?.nodes[e];
3389
- return i.length > 0 && a?.kind == "poll" && a.definition.key == "linear.on_issue_changed" ? await this.#E([...i, ...["teamId", "stateIds"].flatMap((t) => N(n.revision.content, r, e, t, void 0) ?? [])]) != null : await this.#E(i) != null;
3538
+ return i.length > 0 && a?.kind == "poll" && a.definition.key == "linear.on_issue_changed" ? await this.#O([...i, ...["teamId", "stateIds"].flatMap((t) => I(n.revision.content, r, e, t, void 0) ?? [])]) != null : await this.#O(i) != null;
3390
3539
  }
3391
3540
  async saveSubflowSettings(e, t) {
3392
3541
  let n = this.$.revision.value;
3393
3542
  if (n == null) return !1;
3394
3543
  let r = we(n, e, t);
3395
- return r != null && await this.#E(r) != null;
3544
+ return r != null && await this.#O(r) != null;
3396
3545
  }
3397
3546
  updateModuleSource(e) {
3398
3547
  let t = this.#l.value.moduleEditor;
3399
3548
  if (this.#d.applying || this.#d.failed || t == null || t.source == e) return;
3400
- this.#A();
3549
+ this.#N();
3401
3550
  let n = this.#u.get(t.moduleId)?.base ?? this.#l.value.draft?.content.modules[t.moduleId];
3402
3551
  n != null && (this.#u.set(t.moduleId, {
3403
3552
  base: n,
@@ -3406,14 +3555,14 @@ var lr = class {
3406
3555
  phase: void 0,
3407
3556
  source: e
3408
3557
  }
3409
- }), this.#B());
3558
+ }), this.#U());
3410
3559
  }
3411
3560
  discardModuleChanges() {
3412
3561
  let e = this.#l.value.moduleEditor;
3413
3562
  if (e == null || this.#p != null) return;
3414
3563
  this.#u.delete(e.moduleId);
3415
3564
  let t = this.#l.value.draft?.content.modules[e.moduleId];
3416
- this.#V({ moduleEditor: t == null ? void 0 : {
3565
+ this.#W({ moduleEditor: t == null ? void 0 : {
3417
3566
  moduleId: e.moduleId,
3418
3567
  source: t.source
3419
3568
  } });
@@ -3431,18 +3580,18 @@ var lr = class {
3431
3580
  ...e.editor,
3432
3581
  phase: void 0
3433
3582
  });
3434
- return this.#B(), await this.#C();
3583
+ return this.#U(), await this.#T();
3435
3584
  }
3436
- #C() {
3585
+ #T() {
3437
3586
  if (this.#p != null) return this.#p;
3438
3587
  if (this.#v) return Promise.resolve(!1);
3439
3588
  if (![...this.#u.values()].some((e) => e.editor.phase != "failed")) return Promise.resolve(this.#u.size == 0);
3440
3589
  let e = this.#n.capture();
3441
- return this.#p = this.#w(e).finally(() => {
3590
+ return this.#p = this.#E(e).finally(() => {
3442
3591
  this.#p = void 0;
3443
3592
  }), this.#p;
3444
3593
  }
3445
- async #w(e) {
3594
+ async #E(e) {
3446
3595
  for (; !this.#v && e();) {
3447
3596
  let t = [...this.#u.entries()].find(([, e]) => e.editor.phase != "failed");
3448
3597
  if (t == null) return this.#u.size == 0;
@@ -3450,20 +3599,20 @@ var lr = class {
3450
3599
  r.editor = {
3451
3600
  ...r.editor,
3452
3601
  phase: "saving"
3453
- }, this.#B();
3602
+ }, this.#U();
3454
3603
  try {
3455
- let t = await Kt(i);
3604
+ let t = await Wt(i);
3456
3605
  if (this.#v || !e()) return !1;
3457
3606
  let a = this.#l.value.draft?.content.modules[n];
3458
3607
  if (a == null || a.source != r.base.source || JSON.stringify(a.imports) != JSON.stringify(r.base.imports)) throw Error(this.#r.t("notice.moduleUpdated"));
3459
- let o = i == a.source && JSON.stringify(t) == JSON.stringify(a.imports) ? this.#l.value.draft : await this.#E(qt(n, r.base.source, r.base.imports, i, t), !1);
3608
+ let o = i == a.source && JSON.stringify(t) == JSON.stringify(a.imports) ? this.#l.value.draft : await this.#k(Gt(n, r.base.source, r.base.imports, i, t), !1);
3460
3609
  if (this.#v || !e()) return !1;
3461
3610
  let s = this.#u.get(n);
3462
3611
  if (s == null) continue;
3463
3612
  o == null ? s.editor = {
3464
3613
  ...s.editor,
3465
3614
  phase: "failed"
3466
- } : s.editor.source == i ? (this.#u.delete(n), this.#l.value.moduleEditor?.moduleId == n && this.#V({ moduleEditor: {
3615
+ } : s.editor.source == i ? (this.#u.delete(n), this.#l.value.moduleEditor?.moduleId == n && this.#W({ moduleEditor: {
3467
3616
  moduleId: n,
3468
3617
  source: i
3469
3618
  } })) : (s.base = {
@@ -3480,60 +3629,63 @@ var lr = class {
3480
3629
  r != null && (r.editor = {
3481
3630
  ...r.editor,
3482
3631
  phase: "failed"
3483
- }), this.#c(B(t, this.#r.t));
3632
+ }), this.#c(H(t, this.#r.t));
3484
3633
  }
3485
- this.#B();
3634
+ this.#U();
3486
3635
  }
3487
3636
  return !1;
3488
3637
  }
3489
3638
  async moveNodes(e) {
3490
3639
  let t = this.#l.value.target;
3491
- t != null && await this.#j("move", Object.keys(e).length, [], (n) => Be(n, t, e));
3640
+ t != null && await this.#P("move", Object.keys(e).length, [], (n) => k(n, t, e));
3492
3641
  }
3493
3642
  async moveViewport(e) {
3494
3643
  let t = this.#l.value.target;
3495
- t != null && await this.#k((n) => te(n, t, e), !0);
3644
+ t != null && await this.#M((n) => ce(n, t, e), !0);
3496
3645
  }
3497
3646
  async check() {
3498
- await this.#N();
3647
+ await this.#I();
3499
3648
  }
3500
3649
  async refreshFlows() {
3501
3650
  await this.reloadFlows();
3502
3651
  }
3503
3652
  updateLive(e) {
3504
- e.flowId == this.#l.value.flowId && this.#V({ live: e });
3653
+ e.flowId == this.#l.value.flowId && this.#W({ live: e });
3505
3654
  }
3506
- locateNode(e) {
3507
- let t = this.$.revision.value, n = this.#l.value.target;
3508
- return t == null || n == null || t.node(n, e) == null || !this.selectNodes([e]) ? !1 : (this.#V({ nodeFocus: {
3655
+ locateNode(e, { preserveSelection: t = !1 } = {}) {
3656
+ let n = this.$.revision.value, r = this.#l.value.target;
3657
+ return n == null || r == null || n.node(r, e) == null && !te(this.#l.value.presentation?.value ?? {}, r).has(e) || !t && !this.selectNodes([e]) ? !1 : (this.#W({ nodeFocus: {
3509
3658
  nodeId: e,
3510
- requestId: ++this.#b
3659
+ requestId: ++this.#x
3511
3660
  } }), !0);
3512
3661
  }
3513
3662
  locateDiagnostic(e) {
3514
- return e.location == null || !this.selectNodes([e.location.nodeId]) ? !1 : (this.#V({ diagnosticFocus: {
3663
+ return e.location == null || !this.selectNodes([e.location.nodeId]) ? !1 : (this.#W({ diagnosticFocus: {
3515
3664
  ...e.location,
3516
3665
  diagnostic: e.diagnostic,
3517
3666
  requestId: ++this.#h
3518
3667
  } }), !0);
3519
3668
  }
3520
- async #T(e, t, n) {
3521
- let r = Math.max(0, ...this.#I().nodes.flatMap((e) => {
3669
+ async #D(e, t, n) {
3670
+ let r = Math.max(0, ...this.#z().nodes.flatMap((e) => {
3522
3671
  if (e.kind != "comment") return [];
3523
3672
  let t = /#(\d+)$/.exec(e.title);
3524
3673
  return t == null ? [] : [Number(t[1])];
3525
3674
  }));
3526
- if (!(!await this.#j("add", 1, [], (i) => j(i, e, t, {
3675
+ if (!(!await this.#P("add", 1, [], (i) => P(i, e, t, {
3527
3676
  content: "",
3528
3677
  position: n,
3529
3678
  title: this.#r.t("addNode.commentName", { number: r + 1 })
3530
3679
  }), [t]) || this.#v)) return t;
3531
3680
  }
3532
- async #E(e, t = !0, n = !1) {
3681
+ async #O(e) {
3682
+ return await this.#P("edit", 1, e) ? this.#l.value.draft : void 0;
3683
+ }
3684
+ async #k(e, t = !0, n = !1) {
3533
3685
  if (this.#v || (this.#d.applying || this.#d.failed) && !n) return;
3534
3686
  let r = this.#l.value.flowId, i = this.#l.value.draft;
3535
3687
  if (r == null || i == null) return;
3536
- if (e.length == 0 || u(R(i, e).content, i.content)) return i;
3688
+ if (e.length == 0 || u(V(i, e).content, i.content)) return i;
3537
3689
  let a = !n && this.#d.clear(), o = this.#n.capture();
3538
3690
  this.#d.pending++, this.#d.publish();
3539
3691
  try {
@@ -3551,38 +3703,38 @@ var lr = class {
3551
3703
  this.#d.pending--, this.#v || this.#d.publish();
3552
3704
  }
3553
3705
  }
3554
- async #D(e) {
3706
+ async #A(e) {
3555
3707
  for (let t = 0; t < 2 && e(); t += 1) {
3556
3708
  let t = this.#l.value.draft;
3557
3709
  if (t == null) return;
3558
3710
  let n = Oe(t.content);
3559
3711
  if (n.length == 0) {
3560
- this.#N();
3712
+ this.#I();
3561
3713
  return;
3562
3714
  }
3563
- if (await this.#E(n, !1) != null || !e()) return;
3715
+ if (await this.#k(n, !1) != null || !e()) return;
3564
3716
  if (this.#l.value.draft?.revisionId == t.revisionId) break;
3565
3717
  }
3566
- e() && this.#N();
3718
+ e() && this.#I();
3567
3719
  }
3568
- #O(e, t) {
3569
- let n = this.#l.value.draft, { revision: r, selectedNodeIds: i, target: a } = this.#L(e), o = this.#l.value.moduleEditor, s = o != null && (t == "external" || n != null) && ir(n, o) != "saved", c;
3720
+ #j(e, t) {
3721
+ 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) && ar(n, o) != "saved", c;
3570
3722
  return c = s ? t == "external" ? {
3571
3723
  ...o,
3572
3724
  phase: "failed"
3573
- } : o : ar(r, a, i), this.#V({
3725
+ } : o : or(r, a, i), this.#W({
3574
3726
  draft: e,
3575
3727
  moduleEditor: c,
3576
3728
  selectedNodeIds: i,
3577
3729
  target: a
3578
3730
  }), s;
3579
3731
  }
3580
- async #k(e, t = !1) {
3732
+ async #M(e, t = !1) {
3581
3733
  if (this.#v || (this.#d.applying || this.#d.failed) && !t) return !1;
3582
3734
  let n = this.#l.value.flowId, r = this.#l.value.presentation;
3583
3735
  if (n == null || r == null) return !1;
3584
3736
  if (u(e(r.value), r.value)) return !0;
3585
- t || this.#A();
3737
+ t || this.#N();
3586
3738
  let i = this.#n.capture();
3587
3739
  this.#d.pending++, this.#d.publish();
3588
3740
  try {
@@ -3592,19 +3744,19 @@ var lr = class {
3592
3744
  this.#d.pending--, this.#v || this.#d.publish();
3593
3745
  }
3594
3746
  }
3595
- #A() {
3747
+ #N() {
3596
3748
  this.#d.clear() && this.#c({
3597
3749
  kind: "success",
3598
3750
  message: this.#r.t("history.cleared")
3599
3751
  });
3600
3752
  }
3601
- async #j(e, t, n, r, i = this.#l.value.selectedNodeIds) {
3753
+ async #P(e, t, n, r, i = this.#l.value.selectedNodeIds) {
3602
3754
  if (this.#v || this.#d.applying || this.#d.failed) return !1;
3603
3755
  let { draft: a, target: o, presentation: s, selectedNodeIds: c } = this.#l.value;
3604
3756
  if (a == null || o == null || s == null) return !1;
3605
- let l = r?.(s.value) ?? s.value, d = re(s.value, l, o);
3606
- if (u(R(a, n).content, a.content) && d.nodeIds.length == 0) return !0;
3607
- let f = this.#d.generation, p = Jn(a.content, n);
3757
+ let l = r?.(s.value) ?? s.value, d = D(s.value, l, o);
3758
+ if (u(V(a, n).content, a.content) && d.nodeIds.length == 0) return !0;
3759
+ let f = this.#d.generation, p = Yn(a.content, n);
3608
3760
  this.#d.pending++;
3609
3761
  let m = this.#d.record({
3610
3762
  action: e,
@@ -3617,7 +3769,7 @@ var lr = class {
3617
3769
  afterSelection: i
3618
3770
  });
3619
3771
  try {
3620
- let e = n.length == 0 ? Promise.resolve(a) : this.#E(n, !0, !0), t = r == null ? Promise.resolve(!0) : this.#k(r, !0);
3772
+ let e = n.length == 0 ? Promise.resolve(a) : this.#k(n, !0, !0), t = r == null ? Promise.resolve(!0) : this.#M(r, !0);
3621
3773
  this.selectNodes(i), m || this.#c({
3622
3774
  kind: "success",
3623
3775
  message: this.#r.t("history.tooLarge")
@@ -3625,18 +3777,18 @@ var lr = class {
3625
3777
  let [o, s] = await Promise.all([e, t]);
3626
3778
  return o != null && s && (!m || f == this.#d.generation);
3627
3779
  } catch (e) {
3628
- return this.#c(B(e, this.#r.t)), this.retryHistorySync(), !1;
3780
+ return this.#c(H(e, this.#r.t)), this.retryHistorySync(), !1;
3629
3781
  } finally {
3630
3782
  this.#d.pending--, this.#v || this.#d.publish();
3631
3783
  }
3632
3784
  }
3633
3785
  async undo() {
3634
- await this.#M(!1);
3786
+ await this.#F(!1);
3635
3787
  }
3636
3788
  async redo() {
3637
- await this.#M(!0);
3789
+ await this.#F(!0);
3638
3790
  }
3639
- async #M(e) {
3791
+ async #F(e) {
3640
3792
  let t = this.history$.value;
3641
3793
  if (!(e ? t.canRedo : t.canUndo)) return;
3642
3794
  let n = e ? t.redo : t.undo;
@@ -3644,10 +3796,10 @@ var lr = class {
3644
3796
  let r = this.#d.generation;
3645
3797
  this.#d.applying = !0, this.#d.publish();
3646
3798
  try {
3647
- let [t, i] = await Promise.all([this.#E(e ? n.forward : n.inverse, !0, !0), this.#k((t) => de(t, n.target, n.presentation, e), !0)]);
3799
+ let [t, i] = await Promise.all([this.#k(e ? n.forward : n.inverse, !0, !0), this.#M((t) => E(t, n.target, n.presentation, e), !0)]);
3648
3800
  t != null && i && r == this.#d.generation && (this.selectNodes(e ? n.afterSelection : n.beforeSelection), this.#d.complete(e));
3649
3801
  } catch (e) {
3650
- this.#c(B(e, this.#r.t)), this.retryHistorySync();
3802
+ this.#c(H(e, this.#r.t)), this.retryHistorySync();
3651
3803
  } finally {
3652
3804
  this.#d.applying = !1, this.#v || this.#d.publish();
3653
3805
  }
@@ -3662,10 +3814,10 @@ var lr = class {
3662
3814
  if (await Promise.allSettled([this.#t.settled(), this.#a.settled()]), !(!t() || this.#v)) try {
3663
3815
  let { draft: n, presentation: r } = await this.#e.getEditor(e);
3664
3816
  if (!t() || this.#v) return;
3665
- this.#t.reset(n), this.#a.reset(r), this.#O(n, "external"), this.#V({ presentation: r }), this.#o.advanceHead(e, n.revisionId), this.#d.failed = !1, this.#c({
3817
+ this.#t.reset(n), this.#a.reset(r), this.#j(n, "external"), this.#W({ presentation: r }), this.#o.advanceHead(e, n.revisionId), this.#d.failed = !1, this.#c({
3666
3818
  kind: "error",
3667
3819
  message: this.#r.t("history.resynced")
3668
- }), this.#N();
3820
+ }), this.#I();
3669
3821
  } catch {
3670
3822
  t() && !this.#v && this.#c({
3671
3823
  kind: "error",
@@ -3677,17 +3829,17 @@ var lr = class {
3677
3829
  this.#f = void 0, this.#v || this.#d.publish();
3678
3830
  }), this.#f;
3679
3831
  }
3680
- async #N() {
3832
+ async #I() {
3681
3833
  if (this.#v) return;
3682
3834
  let e = this.#l.value.flowId, t = this.#l.value.draft, n = this.#l.value.target;
3683
3835
  if (e == null || t == null || n == null) {
3684
- n ?? this.#V({
3836
+ n ?? this.#W({
3685
3837
  checkLoading: !1,
3686
3838
  diagnostics: void 0
3687
3839
  });
3688
3840
  return;
3689
3841
  }
3690
- this.#V({
3842
+ this.#W({
3691
3843
  checkLoading: !0,
3692
3844
  diagnosticFocus: void 0
3693
3845
  });
@@ -3695,7 +3847,7 @@ var lr = class {
3695
3847
  let n = await this.#e.checkFlow(e, t.revisionId);
3696
3848
  if (!this.#v && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId) {
3697
3849
  let e = this.#l.value.live;
3698
- this.#V({
3850
+ this.#W({
3699
3851
  diagnostics: n,
3700
3852
  live: e == null ? void 0 : {
3701
3853
  ...e,
@@ -3704,16 +3856,16 @@ var lr = class {
3704
3856
  });
3705
3857
  }
3706
3858
  } catch (n) {
3707
- !this.#v && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#c(B(n, this.#r.t));
3859
+ !this.#v && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#c(H(n, this.#r.t));
3708
3860
  } finally {
3709
- !this.#v && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#V({ checkLoading: !1 });
3861
+ !this.#v && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#W({ checkLoading: !1 });
3710
3862
  }
3711
3863
  }
3712
- async #P(e) {
3864
+ async #L(e) {
3713
3865
  if (this.#v) return;
3714
3866
  let t = this.#l.value.flowId;
3715
- if (t == null || (this.#g += 1, e != null && (this.#_ = !0), this.#y)) return;
3716
- this.#y = !0;
3867
+ if (t == null || (this.#g += 1, e != null && (this.#_ = !0), this.#b)) return;
3868
+ this.#b = !0;
3717
3869
  let n = {
3718
3870
  current: this.#n.capture(),
3719
3871
  flowId: t
@@ -3723,74 +3875,74 @@ var lr = class {
3723
3875
  do {
3724
3876
  e = this.#g;
3725
3877
  let t = this.#_;
3726
- this.#_ = !1, await this.#F(n, !1, t);
3727
- } while (this.#R(n) && e != this.#g);
3728
- }), this.#R(n) && (this.#y = !1);
3878
+ this.#_ = !1, await this.#R(n, !1, t);
3879
+ } while (this.#V(n) && e != this.#g);
3880
+ }), this.#V(n) && (this.#b = !1);
3729
3881
  }
3730
- async #F(e, t, n = !1) {
3882
+ async #R(e, t, n = !1) {
3731
3883
  try {
3732
3884
  let t = this.#t.committed;
3733
3885
  if (t == null) return !1;
3734
3886
  let r = await this.#e.syncDraft(e.flowId);
3735
- if (!this.#R(e)) return !1;
3887
+ if (!this.#V(e)) return !1;
3736
3888
  let i = r.draft;
3737
3889
  if (i.revisionId == t.revisionId) return !0;
3738
3890
  this.#d.clear() && this.#c({
3739
3891
  kind: "success",
3740
3892
  message: this.#r.t("history.external")
3741
3893
  });
3742
- let a = this.#t.replaceCommitted(i), o = this.#O(a, "external");
3894
+ let a = this.#t.replaceCommitted(i), o = this.#j(a, "external");
3743
3895
  return this.#o.advanceHead(e.flowId, i.revisionId), n && this.#c({
3744
3896
  kind: o ? "error" : "success",
3745
3897
  message: this.#r.t(o ? "notice.moduleUpdated" : "notice.draftUpdated")
3746
- }), this.#N(), !0;
3898
+ }), this.#I(), !0;
3747
3899
  } catch (n) {
3748
- return t && this.#R(e) && this.#c(B(n, this.#r.t)), !1;
3900
+ return t && this.#V(e) && this.#c(H(n, this.#r.t)), !1;
3749
3901
  }
3750
3902
  }
3751
- #I() {
3903
+ #z() {
3752
3904
  let e = this.#l.value;
3753
- return _(e.draft, e.target, e.presentation?.value, e.diagnostics?.diagnostics, {}, {}, this.#r.t);
3905
+ return Qe(e.draft, e.target, e.presentation?.value, e.diagnostics?.diagnostics, {}, {}, this.#r.t);
3754
3906
  }
3755
- #L(e) {
3756
- let t = z(e), n = cr(t, this.#l.value.target);
3907
+ #B(e) {
3908
+ let t = B(e), n = lr(t, this.#l.value.target);
3757
3909
  return {
3758
3910
  revision: t,
3759
3911
  selectedNodeIds: this.#l.value.selectedNodeIds.filter((e) => n != null && t.selection(n, e) != null),
3760
3912
  target: n
3761
3913
  };
3762
3914
  }
3763
- #R(e) {
3915
+ #V(e) {
3764
3916
  return !this.#v && e.flowId == this.#l.value.flowId && e.current();
3765
3917
  }
3766
- #z(e) {
3918
+ #H(e) {
3767
3919
  let t = e == null ? void 0 : this.#u.get(e.moduleId)?.editor ?? e, n;
3768
3920
  return [...this.#u.values()].some((e) => e.editor.phase == "failed") ? n = "failed" : this.#u.size > 0 && (n = "saving"), {
3769
3921
  moduleEditor: t,
3770
3922
  moduleSaveStatus: n
3771
3923
  };
3772
3924
  }
3773
- #B() {
3774
- this.#v || this.#l.set(this.#z(this.#l.value.moduleEditor));
3925
+ #U() {
3926
+ this.#v || this.#l.set(this.#H(this.#l.value.moduleEditor));
3775
3927
  }
3776
- #V(e) {
3928
+ #W(e) {
3777
3929
  if (this.#v) return;
3778
3930
  let t = Object.hasOwn(e, "moduleEditor") ? e.moduleEditor : this.#l.value.moduleEditor;
3779
3931
  this.#l.set({
3780
3932
  ...e,
3781
- ...this.#z(t)
3933
+ ...this.#H(t)
3782
3934
  });
3783
3935
  }
3784
3936
  };
3785
3937
  //#endregion
3786
3938
  //#region src/workbench/browser/runtime/stores/workbenchStore.ts
3787
- function ur(e) {
3939
+ function dr(e) {
3788
3940
  return new Map(e.nodes.map((e) => [e.id, e]));
3789
3941
  }
3790
- function dr(e, t) {
3791
- return e == null || t == null ? [] : z(e).designerInputs(t);
3942
+ function fr(e, t) {
3943
+ return e == null || t == null ? [] : B(e).designerInputs(t);
3792
3944
  }
3793
- function fr(e, t, n, r, i) {
3945
+ function pr(e, t, n, r, i) {
3794
3946
  if (e == null || t?.kind != "flow" || n?.revisionId != e.revisionId || n.flowId != e.flowId) return /* @__PURE__ */ new Map();
3795
3947
  let a = r.find((t) => t.kind == "run.started" && t.payload.flowId == e.flowId)?.payload.scopeId;
3796
3948
  return typeof a == "string" ? new Map(r.flatMap((t) => {
@@ -3798,7 +3950,7 @@ function fr(e, t, n, r, i) {
3798
3950
  return t.payload.scopeId == a && t.payload.flowId == e.flowId && typeof n == "string" && i.has(n) ? [[t.sequence, n]] : [];
3799
3951
  })) : /* @__PURE__ */ new Map();
3800
3952
  }
3801
- var pr = { openExternalPage: async () => !1 }, mr = class {
3953
+ var mr = { openExternalPage: async () => !1 }, hr = class {
3802
3954
  #e;
3803
3955
  #t;
3804
3956
  #n;
@@ -3813,16 +3965,17 @@ var pr = { openExternalPage: async () => !1 }, mr = class {
3813
3965
  #c;
3814
3966
  #l;
3815
3967
  #u;
3816
- constructor(r, i, a = P, o = p(), s = pr, c = !0) {
3817
- this.#t = new L(), this.#r = n(), this.#a = n([]), this.#o = n(!1), this.#s = n(!1), this.#c = !0, this.#u = !1, this.retryCatalog = () => {
3968
+ #d;
3969
+ constructor(r, i, a = L, o = p(), s = mr, c = !0) {
3970
+ this.#t = new z(), this.#r = n(), this.#a = n([]), this.#o = n(!1), this.#s = n(!1), this.#c = !0, this.#u = !1, this.#d = !1, this.retryCatalog = () => {
3818
3971
  this.connectors.retryCatalog(), this.triggers.catalog.retry();
3819
- }, this.provideAddNodeOptions = (e, t, n = t) => Me(t, [this.triggers.provideAddNodeOptions(e, t), this.connectors.provideAddNodeOptions(e, t, n)]), this.browseAddNodeOptions = (e) => Me(e, [this.triggers.browseAddNodeOptions(e), this.connectors.browseAddNodeOptions(e)]), this.provideAddNodeOptionChoices = (e, t) => this.connectors.provideAddNodeOptionChoices(e, t), this.#e = r, this.results = r, this.#n = o, this.#i = c;
3972
+ }, this.provideAddNodeOptions = (e, t, n = t) => j(t, [this.triggers.provideAddNodeOptions(e, t), this.connectors.provideAddNodeOptions(e, t, n)]), this.browseAddNodeOptions = (e) => j(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;
3820
3973
  let l = (e) => {
3821
3974
  this.#u || this.#r.set(e);
3822
3975
  };
3823
- this.runs = new We(r, l, o), this.workspace = new lr(r, l, Jt, o, (e) => {
3824
- e.kind == "run.created" ? this.#d(r, e) : this.runs.changed(e.runId);
3825
- }, new Mn(r, s.connectorCache)), this.connectors = new Bn(r, this.workspace, l, s, o), this.triggers = new qn(r, this.workspace, l, s, o), this.publications = new $t(r, this.workspace, l, i, a, o), this.runRequests = new ln(r, this.runs, l, async (e) => {
3976
+ this.runs = new Se(r, l, o), this.workspace = new ur(r, l, Kt, o, (e) => {
3977
+ e.kind == "run.created" ? this.#p(r, e) : this.runs.changed(e.runId);
3978
+ }, new Nn(r, s.connectorCache), (e) => void this.#f(e)), this.connectors = new Vn(r, this.workspace, l, s, o), this.triggers = new Jn(r, this.workspace, l, s, o), this.publications = new Qt(r, this.workspace, l, i, a, o), this.runRequests = new ln(r, this.runs, l, async (e) => {
3826
3979
  if (!(e != this.workspace.$.flowId.value || !await this.workspace.saveModuleEditor() || this.#u || e != this.workspace.$.flowId.value)) return this.workspace.$.draft.value?.revisionId;
3827
3980
  }, o, a);
3828
3981
  let u = t((e) => {
@@ -3837,9 +3990,9 @@ var pr = { openExternalPage: async () => !1 }, mr = class {
3837
3990
  }), d = /* @__PURE__ */ new Map(), f, m = t((e) => {
3838
3991
  let t = e(this.workspace.$.draft);
3839
3992
  f != t?.flowId && (d.clear(), f = t?.flowId);
3840
- 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(k(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}`, v = [
3841
- ...dr(t, n),
3842
- r == null || n == null ? void 0 : ne(r, n),
3993
+ 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(A(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}`, _ = [
3994
+ ...fr(t, n),
3995
+ r == null || n == null ? void 0 : ze(r, n),
3843
3996
  i,
3844
3997
  c,
3845
3998
  a,
@@ -3848,14 +4001,14 @@ var pr = { openExternalPage: async () => !1 }, mr = class {
3848
4001
  m,
3849
4002
  h,
3850
4003
  ...m == null ? [] : [t?.revisionId]
3851
- ], y = d.get(g);
3852
- if (y != null && y.inputs.length == v.length && y.inputs.every((e, t) => e === v[t])) return y.graph;
3853
- let b = _(t, n, r, i, c, l, p, m, h, s);
4004
+ ], v = d.get(g);
4005
+ if (v != null && v.inputs.length == _.length && v.inputs.every((e, t) => e === _[t])) return v.graph;
4006
+ let y = Qe(t, n, r, i, c, l, p, m, h, s);
3854
4007
  return d.set(g, {
3855
- graph: b,
3856
- inputs: v
3857
- }), b;
3858
- }), h = e(m, ur);
4008
+ graph: y,
4009
+ inputs: _
4010
+ }), y;
4011
+ }), h = e(m, dr);
3859
4012
  this.$ = {
3860
4013
  busy: t((e) => {
3861
4014
  let t = e(this.workspace.$.busy);
@@ -3866,13 +4019,13 @@ var pr = { openExternalPage: async () => !1 }, mr = class {
3866
4019
  if (e(this.publications.$.rollingBackPublicationId) != null) return "rollback";
3867
4020
  if (e(this.publications.$.changingTriggerId) != null) return "trigger";
3868
4021
  }),
3869
- diagnosticItems: t((e) => Se(e(this.workspace.$.revision), e(this.workspace.$.target), e(u))),
4022
+ diagnosticItems: t((e) => xe(e(this.workspace.$.revision), e(this.workspace.$.target), e(u))),
3870
4023
  diagnostics: u,
3871
4024
  designer: m,
3872
4025
  designerNodeById: h,
3873
- sourceNodeIcons: e(m, (e) => Object.fromEntries(e.nodes.flatMap((e) => "icon" in e ? [[e.id, e.icon]] : [])), { equal: Z }),
4026
+ sourceNodeIcons: e(m, (e) => Object.fromEntries(e.nodes.flatMap((e) => "icon" in e ? [[e.id, e.icon]] : [])), { equal: $ }),
3874
4027
  notice: this.#r,
3875
- runEventNodes: t((e) => fr(e(this.workspace.$.draft), e(this.workspace.$.target), e(this.runs.$.run), e(this.runs.$.events), e(h))),
4028
+ runEventNodes: t((e) => pr(e(this.workspace.$.draft), e(this.workspace.$.target), e(this.runs.$.run), e(this.runs.$.events), e(h))),
3876
4029
  selectedDesignerNode: t((e) => {
3877
4030
  let t = e(this.workspace.$.selectedNodeIds);
3878
4031
  return t.length == 1 ? e(h).get(t[0]) : void 0;
@@ -3908,7 +4061,7 @@ var pr = { openExternalPage: async () => !1 }, mr = class {
3908
4061
  if (this.#u) return;
3909
4062
  this.#a.set(e.map((e) => e.name)), this.#o.set(!0);
3910
4063
  } catch (e) {
3911
- this.#c = !0, this.#u || this.#r.set(B(e, this.#n.t));
4064
+ this.#c = !0, this.#u || this.#r.set(H(e, this.#n.t));
3912
4065
  } finally {
3913
4066
  this.#l = void 0, this.#u || this.#s.set(!1);
3914
4067
  }
@@ -3921,6 +4074,16 @@ var pr = { openExternalPage: async () => !1 }, mr = class {
3921
4074
  let t = this.workspace.$.flowId.value, n = this.#r.value;
3922
4075
  return !await this.workspace.selectFlow(e) || this.#u ? !1 : (e != t && this.#r.value === n && this.#r.set(void 0), this.connectors.reset(), this.triggers.reset(), this.publications.reset(), this.runRequests.reset(), this.runs.reset(), !0);
3923
4076
  }
4077
+ async #f(e) {
4078
+ if (!(this.#u || this.#d || this.workspace.$.flowId.value != null)) {
4079
+ this.#d = !0;
4080
+ try {
4081
+ await this.selectFlow(e);
4082
+ } finally {
4083
+ this.#d = !1;
4084
+ }
4085
+ }
4086
+ }
3924
4087
  async createFlow(e, t) {
3925
4088
  let n = await this.workspace.createFlow(e, t);
3926
4089
  return this.#u || n == null ? !1 : (await this.selectFlow(n.flowId), this.#u || this.#r.set({
@@ -3952,7 +4115,7 @@ var pr = { openExternalPage: async () => !1 }, mr = class {
3952
4115
  let r = await this.workspace.addNode(e, t, n);
3953
4116
  return r != null && e.kind == "connector" && this.connectors.refresh(), r != null && e.kind == "trigger" && this.triggers.refresh(), r;
3954
4117
  } catch (e) {
3955
- this.#u || this.#r.set(B(e, this.#n.t));
4118
+ this.#u || this.#r.set(H(e, this.#n.t));
3956
4119
  return;
3957
4120
  }
3958
4121
  }
@@ -3975,7 +4138,7 @@ var pr = { openExternalPage: async () => !1 }, mr = class {
3975
4138
  let e = this.workspace.$.targetFlow.value;
3976
4139
  return e == null ? "unavailable" : await this.runRequests.requestLive(e);
3977
4140
  }
3978
- async #d(e, t) {
4141
+ async #p(e, t) {
3979
4142
  let n = this.workspace.$.target.value;
3980
4143
  if (this.#u || this.runRequests.$.submitting.value != null || n?.kind != "flow" || this.workspace.$.flowId.value != t.flowId) return;
3981
4144
  let r = this.#t.begin();
@@ -3987,13 +4150,13 @@ var pr = { openExternalPage: async () => !1 }, mr = class {
3987
4150
  return;
3988
4151
  }
3989
4152
  }
3990
- }, hr = Tt(() => import("./flowWorkspace-CpMGzmfz.js").then((e) => e.t));
3991
- function gr({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i, pending: a = !1, title: o, token: c, tokenLabel: u }) {
3992
- let d = c != null && u != null && i != null, f = c ?? "", p = /* @__PURE__ */ q(Ct, { children: [
3993
- /* @__PURE__ */ K("div", {
4153
+ }, gr = Ct(() => import("./flowWorkspace-DCaVDqtY.js").then((e) => e.t));
4154
+ function _r({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i, pending: a = !1, title: o, token: c, tokenLabel: u }) {
4155
+ let d = c != null && u != null && i != null, f = c ?? "", p = /* @__PURE__ */ Y(xt, { children: [
4156
+ /* @__PURE__ */ J("div", {
3994
4157
  "aria-hidden": "true",
3995
4158
  className: "flex size-10 items-center justify-center rounded-lg bg-muted text-muted-foreground",
3996
- children: /* @__PURE__ */ q("svg", {
4159
+ children: /* @__PURE__ */ Y("svg", {
3997
4160
  className: "size-5",
3998
4161
  fill: "none",
3999
4162
  stroke: "currentColor",
@@ -4001,40 +4164,40 @@ function gr({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
4001
4164
  strokeLinejoin: "round",
4002
4165
  strokeWidth: "1.8",
4003
4166
  viewBox: "0 0 24 24",
4004
- children: [/* @__PURE__ */ K("rect", {
4167
+ children: [/* @__PURE__ */ J("rect", {
4005
4168
  height: "9",
4006
4169
  rx: "2",
4007
4170
  width: "14",
4008
4171
  x: "5",
4009
4172
  y: "11"
4010
- }), /* @__PURE__ */ K("path", { d: "M8 11V8a4 4 0 0 1 8 0v3" })]
4173
+ }), /* @__PURE__ */ J("path", { d: "M8 11V8a4 4 0 0 1 8 0v3" })]
4011
4174
  })
4012
4175
  }),
4013
- /* @__PURE__ */ q("header", {
4176
+ /* @__PURE__ */ Y("header", {
4014
4177
  className: "flex flex-col gap-2",
4015
- children: [/* @__PURE__ */ K("h1", {
4178
+ children: [/* @__PURE__ */ J("h1", {
4016
4179
  className: "text-xl font-semibold tracking-tight text-balance",
4017
4180
  children: o
4018
- }), /* @__PURE__ */ K("p", {
4181
+ }), /* @__PURE__ */ J("p", {
4019
4182
  className: "text-sm/relaxed text-muted-foreground text-pretty",
4020
4183
  children: t
4021
4184
  })]
4022
4185
  }),
4023
- d && /* @__PURE__ */ K(lt, { children: /* @__PURE__ */ q(st, {
4186
+ d && /* @__PURE__ */ J(st, { children: /* @__PURE__ */ Y(at, {
4024
4187
  "data-invalid": n != null,
4025
4188
  children: [
4026
- /* @__PURE__ */ K(ct, {
4189
+ /* @__PURE__ */ J(ot, {
4027
4190
  htmlFor: "session-token",
4028
4191
  children: u
4029
4192
  }),
4030
- /* @__PURE__ */ K(l, {
4193
+ /* @__PURE__ */ J(l, {
4031
4194
  autoComplete: "username",
4032
4195
  name: "username",
4033
4196
  type: "hidden",
4034
4197
  value: "open-flow",
4035
4198
  readOnly: !0
4036
4199
  }),
4037
- /* @__PURE__ */ K(l, {
4200
+ /* @__PURE__ */ J(l, {
4038
4201
  autoComplete: "current-password",
4039
4202
  "aria-invalid": n != null,
4040
4203
  autoFocus: !0,
@@ -4046,29 +4209,29 @@ function gr({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
4046
4209
  type: "password",
4047
4210
  value: f
4048
4211
  }),
4049
- n != null && /* @__PURE__ */ K(ft, { children: n })
4212
+ n != null && /* @__PURE__ */ J(ut, { children: n })
4050
4213
  ]
4051
4214
  }) }),
4052
- e != null && r != null && /* @__PURE__ */ q(s, {
4215
+ e != null && r != null && /* @__PURE__ */ Y(s, {
4053
4216
  disabled: a || d && f.length == 0,
4054
4217
  size: "lg",
4055
4218
  type: "submit",
4056
- children: [a && /* @__PURE__ */ K(ot, {
4219
+ children: [a && /* @__PURE__ */ J(it, {
4057
4220
  "aria-label": e,
4058
4221
  "data-icon": "inline-start"
4059
4222
  }), e]
4060
4223
  }),
4061
- a && e == null && /* @__PURE__ */ K(ot, { "aria-label": t })
4224
+ a && e == null && /* @__PURE__ */ J(it, { "aria-label": t })
4062
4225
  ] }), m = "m-auto flex w-full max-w-[420px] flex-col gap-5 rounded-xl bg-card p-6 shadow-lg shadow-black/10";
4063
- return /* @__PURE__ */ K("main", {
4226
+ return /* @__PURE__ */ J("main", {
4064
4227
  className: "open-flow-workbench",
4065
- children: /* @__PURE__ */ K("div", {
4228
+ children: /* @__PURE__ */ J("div", {
4066
4229
  className: "grid h-full overflow-auto bg-muted/20 p-4",
4067
- children: r == null ? /* @__PURE__ */ K("section", {
4230
+ children: r == null ? /* @__PURE__ */ J("section", {
4068
4231
  "aria-busy": a,
4069
4232
  className: m,
4070
4233
  children: p
4071
- }) : /* @__PURE__ */ K("form", {
4234
+ }) : /* @__PURE__ */ J("form", {
4072
4235
  "aria-busy": a,
4073
4236
  className: m,
4074
4237
  onSubmit: r,
@@ -4077,15 +4240,15 @@ function gr({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
4077
4240
  })
4078
4241
  });
4079
4242
  }
4080
- function _r({ host: e, store: t }) {
4081
- let [n] = Y(() => e.notify.bind(e)), i = r(t.$.notice);
4082
- return J(() => n(i), [n, i]), J(() => () => n(void 0), [n]), null;
4243
+ function vr({ host: e, store: t }) {
4244
+ let [n] = Z(() => e.notify.bind(e)), i = r(t.$.notice);
4245
+ return X(() => n(i), [n, i]), X(() => () => n(void 0), [n]), null;
4083
4246
  }
4084
- function vr({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowField: i, flowBadges: a, hrefFor: o, hostAction: s, hostTitle: c, language: l, navigation: u, onConfigureConnector: d, onHostAction: f, onLanguageChange: p, store: m, theme: h }) {
4247
+ function yr({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowField: i, flowBadges: a, hrefFor: o, hostAction: s, hostTitle: c, language: l, navigation: u, onConfigureConnector: d, onHostAction: f, onLanguageChange: p, store: m, theme: h }) {
4085
4248
  let g = r(m.workspace.$.flowId);
4086
- return /* @__PURE__ */ K("div", {
4249
+ return /* @__PURE__ */ J("div", {
4087
4250
  className: "app-shell",
4088
- children: g == null ? /* @__PURE__ */ K(Lt, {
4251
+ children: g == null ? /* @__PURE__ */ J(Ft, {
4089
4252
  catalogWidth: e,
4090
4253
  createFlowDisabled: n,
4091
4254
  createFlowField: i,
@@ -4102,12 +4265,12 @@ function vr({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowF
4102
4265
  onLanguageChange: p,
4103
4266
  onSelectFlow: (e) => void u.selectFlow(e),
4104
4267
  store: m
4105
- }) : /* @__PURE__ */ K(wt, {
4106
- fallback: /* @__PURE__ */ K("main", {
4268
+ }) : /* @__PURE__ */ J(St, {
4269
+ fallback: /* @__PURE__ */ J("main", {
4107
4270
  "aria-busy": "true",
4108
4271
  className: "workspace"
4109
4272
  }),
4110
- children: /* @__PURE__ */ K(hr, {
4273
+ children: /* @__PURE__ */ J(gr, {
4111
4274
  hostAction: s,
4112
4275
  hostTitle: c,
4113
4276
  hrefFor: o,
@@ -4120,18 +4283,18 @@ function vr({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowF
4120
4283
  })
4121
4284
  });
4122
4285
  }
4123
- function yr({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowField: r, flowBadges: i, host: a, hostAction: s, hostTitle: c, hrefFor: l, language: u, location: d, onConfigureConnector: f, onHostAction: m, onLanguageChange: h, onNavigate: g, preferences: _, theme: v, variables: y = !0 }) {
4124
- let b = Et(g);
4286
+ function br({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowField: r, flowBadges: i, host: a, hostAction: s, hostTitle: c, hrefFor: l, language: u, location: d, onConfigureConnector: f, onHostAction: m, onLanguageChange: h, onNavigate: g, preferences: _, theme: v, variables: y = !0 }) {
4287
+ let b = wt(g);
4125
4288
  b.current = g;
4126
- let [{ i18n: x, navigation: S, store: C }] = Y(() => {
4127
- let e = p(u), t = new mr(new xe((e, t) => a.request(e, t), (e, t) => a.subscribeFlow(e, t), (e) => a.subscribeFlowCatalog(e)), _, P, e, a, y);
4289
+ let [{ i18n: x, navigation: S, store: C }] = Z(() => {
4290
+ let e = p(u), t = new hr(new be((e, t) => a.request(e, t), (e, t) => a.subscribeFlow(e, t), (e) => a.subscribeFlowCatalog(e)), _, L, e, a, y);
4128
4291
  return {
4129
4292
  i18n: e,
4130
- navigation: new At(t, d, (e, t) => b.current(e, t)),
4293
+ navigation: new Ot(t, d, (e, t) => b.current(e, t)),
4131
4294
  store: t
4132
4295
  };
4133
4296
  });
4134
- return J(() => {
4297
+ return X(() => {
4135
4298
  S.start();
4136
4299
  let e = () => {
4137
4300
  C.connectors.refreshAfterAuthorization(), C.triggers.refreshAfterAuthorization(), C.invalidateVariableNames();
@@ -4143,21 +4306,21 @@ function yr({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowF
4143
4306
  x,
4144
4307
  S,
4145
4308
  C
4146
- ]), J(() => void S.apply(d), [d, S]), J(() => {
4309
+ ]), X(() => void S.apply(d), [d, S]), X(() => {
4147
4310
  C.triggers.catalog.setLanguage(u), C.connectors.setLanguage(u), x.lang != u && x.switchLang(u);
4148
4311
  }, [
4149
4312
  x,
4150
4313
  u,
4151
4314
  C
4152
- ]), /* @__PURE__ */ K(o, {
4315
+ ]), /* @__PURE__ */ J(o, {
4153
4316
  i18n: x,
4154
- children: /* @__PURE__ */ q("div", {
4317
+ children: /* @__PURE__ */ Y("div", {
4155
4318
  className: "open-flow-theme open-flow-workbench",
4156
4319
  "data-theme": v,
4157
- children: [/* @__PURE__ */ K(_r, {
4320
+ children: [/* @__PURE__ */ J(vr, {
4158
4321
  host: a,
4159
4322
  store: C
4160
- }), /* @__PURE__ */ K(vr, {
4323
+ }), /* @__PURE__ */ J(yr, {
4161
4324
  catalogWidth: e,
4162
4325
  createFlow: t,
4163
4326
  createFlowDisabled: n,
@@ -4177,8 +4340,8 @@ function yr({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowF
4177
4340
  })
4178
4341
  });
4179
4342
  }
4180
- function br({ sessionKey: e, ...t }) {
4181
- return /* @__PURE__ */ K(yr, { ...t }, e);
4343
+ function xr({ sessionKey: e, ...t }) {
4344
+ return /* @__PURE__ */ J(br, { ...t }, e);
4182
4345
  }
4183
4346
  //#endregion
4184
- export { ge as EventSourcesPage, gr as OpenFlowSessionGate, br as OpenFlowWorkbench, St as isWorkbenchLanguage, bt as resolveWorkbenchLanguage, xt as workbenchLanguageNames, yt as workbenchLanguages };
4347
+ export { pe as EventSourcesPage, _r as OpenFlowSessionGate, xr as OpenFlowWorkbench, bt as isWorkbenchLanguage, vt as resolveWorkbenchLanguage, yt as workbenchLanguageNames, _t as workbenchLanguages };