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

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 (38) hide show
  1. package/dist/browser/{createResourceDialog-DRB0OEtr.js → createResourceDialog-DnlKSqIs.js} +1 -1
  2. package/dist/browser/{editorComponent-BUEAVBsL.js → editorComponent-T-GmTa-C.js} +332 -232
  3. package/dist/browser/flow-authoring-node.d.ts +5 -2
  4. package/dist/browser/flow-authoring.js +2560 -2447
  5. package/dist/browser/flow-change.d.ts +5 -4
  6. package/dist/browser/flow-change.js +1926 -1760
  7. package/dist/browser/{flowChanges-Bu_BEtpj.js → flowChanges-BXqN4jyH.js} +7078 -7070
  8. package/dist/browser/{flowWorkspace-etUB3NSN.js → flowWorkspace-a5QLISui.js} +7258 -6897
  9. package/dist/browser/{inputValues-CiSzEYeK.js → inputValues-Do4FrC_6.js} +1 -1
  10. package/dist/browser/licenses.md +1 -1
  11. package/dist/browser/ui.css +1 -1
  12. package/dist/browser/webhook-method.d.ts +3 -0
  13. package/dist/browser/workbench.css +1 -1
  14. package/dist/browser/workbench.js +486 -457
  15. package/dist/browser/{workbenchSelect-DNteZJYP.js → workbenchSelect-Dx2Y46cD.js} +1744 -1569
  16. package/dist/common/control-api-conformance.d.ts +44 -0
  17. package/dist/common/control-api-conformance.js +6105 -2076
  18. package/dist/common/control-api.d.ts +16 -5
  19. package/dist/common/control-api.js +4692 -2081
  20. package/dist/common/control-requests.d.ts +7 -0
  21. package/dist/common/control-requests.js +3141 -3028
  22. package/dist/common/flow-connectionUsage.d.ts +12 -0
  23. package/dist/common/flow-encoding.d.ts +0 -6
  24. package/dist/common/flow-encoding.js +1773 -1759
  25. package/dist/common/flow-semantics.d.ts +1 -0
  26. package/dist/common/flow-semantics.js +3434 -3247
  27. package/dist/common/flowInspection.d.ts +90 -1
  28. package/dist/common/integration-trigger.js +2396 -2229
  29. package/dist/common/mcp.d.ts +176 -7
  30. package/dist/common/mcp.js +4949 -2636
  31. package/dist/common/poll-trigger.js +1641 -1474
  32. package/dist/common/provider-triggers.js +2800 -2694
  33. package/dist/common/scheduler.js +2383 -2212
  34. package/dist/common/trigger-catalog.d.ts +2 -0
  35. package/dist/common/trigger-contract.d.ts +2 -0
  36. package/dist/common/webhook-trigger.d.ts +3 -1
  37. package/dist/common/webhook-trigger.js +7014 -78
  38. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
1
  import { a as e, i as t, l as n } from "./dist-Dz6Nglsd.js";
2
2
  import { a as r, i, r as a, t as o } from "./main-BDnNHhkU.js";
3
3
  import { Bn as s, Hn as c, kt as l, t as u } from "./lite-BA96NG4M.js";
4
- import { E as d, M as f, N as p, O as m, P as h, T as g, _, h as v, j as y, k as b, m as x, w as S } from "./editorComponent-BUEAVBsL.js";
5
- import { $ as C, $t as w, Bt as ee, E as T, Gt as te, H as E, Ht as D, J as ne, Lt as re, M as O, N as k, O as A, Q as ie, Qt as j, R as ae, Rt as M, S as oe, T as N, U as se, Ut as ce, V as P, Vt as le, W as ue, Wt as de, X as fe, Xt as F, Y as pe, Z as me, Zt as he, _ as ge, a as _e, an as ve, b as ye, c as be, cn as I, d as xe, en as Se, et as Ce, f as we, g as Te, h as Ee, i as De, in as L, j as R, k as Oe, l as ke, ln as Ae, lt as je, m as Me, nn as Ne, nt as Pe, o as Fe, on as Ie, ot as Le, p as Re, r as z, rn as ze, rt as Be, s as Ve, sn as B, st as He, t as Ue, tn as We, tt as Ge, u as Ke, ut as qe, v as Je, w as Ye, x as Xe, y as Ze, zt as Qe } from "./flowChanges-Bu_BEtpj.js";
6
- import { C as $e, D as et, O as tt, _ as nt, a as rt, c as it, d as at, f as ot, g as st, h as ct, i as lt, l as ut, m as dt, n as ft, o as pt, r as mt, s as ht, t as gt, v as _t, w as vt } from "./workbenchSelect-DNteZJYP.js";
7
- import { c as yt, d as bt, l as xt, u as St } from "./value-B_yE9ean.js";
4
+ import { E as d, M as f, N as p, O as m, P as h, T as g, _, h as v, j as y, k as b, m as x, w as S } from "./editorComponent-T-GmTa-C.js";
5
+ import { $ as C, At as w, E as T, Ft as E, Gt as ee, H as D, Ht as O, It as te, J as ne, Jt as re, Kt as k, Lt as ie, M as A, Mt as ae, N as j, Nt as oe, O as M, Pt as se, Q as N, R as ce, S as le, T as ue, U as de, Ut as fe, V as P, W as pe, Wt as F, X as me, Xt as he, Y as ge, Yt as _e, Z as ve, Zt as ye, _ as be, a as xe, an as Se, b as Ce, c as we, cn as I, d as Te, et as Ee, f as De, g as Oe, h as ke, i as Ae, in as L, j as R, jt as je, k as Me, kt as Ne, l as Pe, ln as Fe, m as Ie, nn as Le, nt as Re, o as ze, on as Be, p as Ve, qt as He, r as z, rn as Ue, s as We, sn as B, t as Ge, tn as Ke, tt as qe, u as Je, v as Ye, w as Xe, x as Ze, y as Qe } from "./flowChanges-BXqN4jyH.js";
6
+ import { C as $e, D as et, O as tt, _ as nt, a as rt, c as it, d as at, f as ot, g as st, h as ct, i as lt, l as ut, m as dt, n as ft, o as pt, r as mt, s as ht, t as gt, v as _t, w as vt } from "./workbenchSelect-Dx2Y46cD.js";
8
7
  import { a as V } from "./dist-CoszrK7m.js";
8
+ import { c as yt, d as bt, l as xt, u as St } from "./value-B_yE9ean.js";
9
9
  import { Fragment as Ct, jsx as H, jsxs as U } from "react/jsx-runtime";
10
10
  import { Suspense as wt, lazy as Tt, useEffect as Et, useRef as Dt, useState as W } from "react";
11
11
  import * as Ot from "effect/Cause";
@@ -96,7 +96,7 @@ function Mt(e, t) {
96
96
  }
97
97
  //#endregion
98
98
  //#region src/workbench/browser/runtime/shell/resourceBrowser.tsx
99
- var Nt = Tt(() => import("./createResourceDialog-DRB0OEtr.js")), Pt = bt.map((e) => ({
99
+ var Nt = Tt(() => import("./createResourceDialog-DnlKSqIs.js")), Pt = bt.map((e) => ({
100
100
  label: St[e],
101
101
  value: e
102
102
  })), Ft = 44, It = -12, Lt = 8, Rt = "a, button, input, select, textarea, [data-slot=\"tooltip-trigger\"]";
@@ -134,7 +134,7 @@ function Ht(e) {
134
134
  return e.target instanceof Element && e.target.closest(Rt) != null;
135
135
  }
136
136
  function Ut({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
137
- let [f, p] = W(null), h = Dt(null), y = Dt(null), C = Dt(null), w = Dt(null), ee = a(), T = i(), [te, E] = W("idle"), [D, ne] = W(n.name), [O, k] = W(!1), [A, ie] = W(), j = n.live != null && n.live.revisionId != n.draftRevisionId, ae = n.status == "retiring" ? "resource.retiring" : n.live == null ? "resource.notPublished" : j ? "resource.unpublishedChanges" : "resource.isPublished", M = n.status == "retiring" ? "danger" : n.live == null ? "neutral" : j ? "running" : "success";
137
+ let [f, p] = W(null), h = Dt(null), y = Dt(null), C = Dt(null), w = Dt(null), T = a(), E = i(), [ee, D] = W("idle"), [O, te] = W(n.name), [ne, re] = W(!1), [k, ie] = W(), A = n.live != null && n.live.revisionId != n.draftRevisionId, ae = n.status == "retiring" ? "resource.retiring" : n.live == null ? "resource.notPublished" : A ? "resource.unpublishedChanges" : "resource.isPublished", j = n.status == "retiring" ? "danger" : n.live == null ? "neutral" : A ? "running" : "success";
138
138
  async function oe(e) {
139
139
  ie(e == "publish" ? "publish" : "enabled");
140
140
  try {
@@ -143,16 +143,16 @@ function Ut({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
143
143
  ie(void 0);
144
144
  }
145
145
  }
146
- let N = vt(D);
146
+ let M = vt(O);
147
147
  async function se(e) {
148
148
  e.preventDefault();
149
- let t = D.trim();
150
- vt(t) == null && await u.workspace.renameFlow(n.flowId, t) && E("idle");
149
+ let t = O.trim();
150
+ vt(t) == null && await u.workspace.renameFlow(n.flowId, t) && D("idle");
151
151
  }
152
- async function ce() {
153
- await u.workspace.deleteFlow(n.flowId) && E("idle");
152
+ async function N() {
153
+ await u.workspace.deleteFlow(n.flowId) && D("idle");
154
154
  }
155
- function P(e) {
155
+ function ce(e) {
156
156
  Ht(e) || o(n);
157
157
  }
158
158
  return /* @__PURE__ */ U("div", {
@@ -161,7 +161,7 @@ function Ut({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
161
161
  children: [
162
162
  /* @__PURE__ */ U("div", {
163
163
  className: "resource-list-row flow-columns",
164
- onClick: P,
164
+ onClick: ce,
165
165
  children: [
166
166
  /* @__PURE__ */ U("span", {
167
167
  className: "resource-primary-cell",
@@ -183,7 +183,7 @@ function Ut({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
183
183
  e.preventDefault();
184
184
  return;
185
185
  }
186
- re(e, () => o(n));
186
+ Ne(e, () => o(n));
187
187
  },
188
188
  render: /* @__PURE__ */ H("a", { href: n.status == "retiring" ? void 0 : r }),
189
189
  tabIndex: n.status == "retiring" ? -1 : void 0,
@@ -192,12 +192,12 @@ function Ut({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
192
192
  children: n.name
193
193
  }), n.status == "active" && /* @__PURE__ */ U(g, {
194
194
  onOpenChange: (e) => {
195
- E(e ? "rename" : "idle"), e && ne(n.name);
195
+ D(e ? "rename" : "idle"), e && te(n.name);
196
196
  },
197
- open: te == "rename",
197
+ open: ee == "rename",
198
198
  children: [/* @__PURE__ */ H(b, {
199
199
  render: /* @__PURE__ */ H(s, {
200
- "aria-label": T("sidebar.renameFlow", { name: n.name }),
200
+ "aria-label": E("sidebar.renameFlow", { name: n.name }),
201
201
  className: "resource-rename-trigger",
202
202
  size: "icon-xs",
203
203
  type: "button",
@@ -220,49 +220,49 @@ function Ut({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
220
220
  sideOffset: ({ anchor: e, positioner: t }) => -(e.height + t.height) / 2 - Lt,
221
221
  children: [/* @__PURE__ */ H(m, {
222
222
  className: "sr-only",
223
- children: T("sidebar.renameFlow", { name: n.name })
223
+ children: E("sidebar.renameFlow", { name: n.name })
224
224
  }), /* @__PURE__ */ U("form", {
225
225
  className: "resource-rename-form",
226
226
  onSubmit: (e) => void se(e),
227
227
  children: [
228
228
  /* @__PURE__ */ U(ot, {
229
229
  className: "min-w-0 flex-1",
230
- "data-invalid": D.length > 0 && N != null,
230
+ "data-invalid": O.length > 0 && M != null,
231
231
  children: [
232
232
  /* @__PURE__ */ H(st, {
233
233
  className: "sr-only",
234
234
  htmlFor: `rename-flow-${n.flowId}`,
235
- children: T("resource.flowName")
235
+ children: E("resource.flowName")
236
236
  }),
237
237
  /* @__PURE__ */ H(l, {
238
238
  autoComplete: "off",
239
- "aria-invalid": D.length > 0 && N != null,
240
- "aria-describedby": D.length > 0 && N != null ? `rename-error-${n.flowId}` : void 0,
239
+ "aria-invalid": O.length > 0 && M != null,
240
+ "aria-describedby": O.length > 0 && M != null ? `rename-error-${n.flowId}` : void 0,
241
241
  id: `rename-flow-${n.flowId}`,
242
242
  name: "flow-name",
243
- onChange: (e) => ne(e.target.value),
243
+ onChange: (e) => te(e.target.value),
244
244
  ref: C,
245
245
  required: !0,
246
- value: D
246
+ value: O
247
247
  }),
248
- D.length > 0 && N != null && /* @__PURE__ */ H(dt, {
248
+ O.length > 0 && M != null && /* @__PURE__ */ H(dt, {
249
249
  id: `rename-error-${n.flowId}`,
250
- children: T(`resource.nameIssue.${N}`, { max: 80 })
250
+ children: E(`resource.nameIssue.${M}`, { max: 80 })
251
251
  })
252
252
  ]
253
253
  }),
254
254
  /* @__PURE__ */ H(s, {
255
- onClick: () => E("idle"),
255
+ onClick: () => D("idle"),
256
256
  size: "sm",
257
257
  type: "button",
258
258
  variant: "ghost",
259
- children: T("common.cancel")
259
+ children: E("common.cancel")
260
260
  }),
261
261
  /* @__PURE__ */ H(s, {
262
- disabled: t != null || N != null,
262
+ disabled: t != null || M != null,
263
263
  size: "sm",
264
264
  type: "submit",
265
- children: T("common.save")
265
+ children: E("common.save")
266
266
  })
267
267
  ]
268
268
  })]
@@ -294,10 +294,10 @@ function Ut({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
294
294
  side: "top",
295
295
  sideOffset: 6,
296
296
  children: [/* @__PURE__ */ H(s, {
297
- "aria-label": T(O ? "resource.flowIdCopied" : "resource.copyFlowId"),
297
+ "aria-label": E(ne ? "resource.flowIdCopied" : "resource.copyFlowId"),
298
298
  className: "resource-tooltip-icon-button",
299
299
  onClick: () => {
300
- navigator.clipboard.writeText(n.flowId).then(() => k(!0));
300
+ navigator.clipboard.writeText(n.flowId).then(() => re(!0));
301
301
  },
302
302
  size: "icon-xs",
303
303
  type: "button",
@@ -318,7 +318,7 @@ function Ut({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
318
318
  dateTime: n.updatedAt,
319
319
  tabIndex: 0
320
320
  }),
321
- children: Vt(n.updatedAt, ee)
321
+ children: Vt(n.updatedAt, T)
322
322
  }), /* @__PURE__ */ H(v, {
323
323
  align: "center",
324
324
  collisionBoundary: [],
@@ -326,57 +326,57 @@ function Ut({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
326
326
  positionMethod: "fixed",
327
327
  side: "top",
328
328
  sideOffset: 6,
329
- children: new Date(n.updatedAt).toLocaleString(ee)
329
+ children: new Date(n.updatedAt).toLocaleString(T)
330
330
  })] }),
331
331
  /* @__PURE__ */ U("span", {
332
332
  className: "resource-status",
333
333
  children: [
334
334
  /* @__PURE__ */ H("span", {
335
335
  "aria-hidden": "true",
336
- className: c("status-dot", M)
336
+ className: c("status-dot", j)
337
337
  }),
338
- T(ae),
338
+ E(ae),
339
339
  n.live != null && /* @__PURE__ */ U(Ct, { children: [/* @__PURE__ */ H("span", {
340
340
  "aria-hidden": "true",
341
341
  className: "resource-status-separator",
342
342
  children: "·"
343
- }), /* @__PURE__ */ H("span", { children: T(n.live.enabled ? "resource.enabled" : "resource.disabled") })] })
343
+ }), /* @__PURE__ */ H("span", { children: E(n.live.enabled ? "resource.enabled" : "resource.disabled") })] })
344
344
  ]
345
345
  })
346
346
  ]
347
347
  }),
348
348
  /* @__PURE__ */ U("div", {
349
349
  className: "resource-live-controls",
350
- "aria-busy": A != null,
351
- onClick: P,
350
+ "aria-busy": k != null,
351
+ onClick: ce,
352
352
  children: [
353
353
  n.live != null && /* @__PURE__ */ H(S, {
354
- "aria-label": T("resource.enableFlow", { name: n.name }),
354
+ "aria-label": E("resource.enableFlow", { name: n.name }),
355
355
  checked: n.live.enabled,
356
- disabled: n.status != "active" || t != null || A != null,
356
+ disabled: n.status != "active" || t != null || k != null,
357
357
  onCheckedChange: (e) => void oe(e),
358
358
  size: "sm",
359
- title: T("resource.enabledHint")
359
+ title: E("resource.enabledHint")
360
360
  }),
361
361
  n.status == "active" && /* @__PURE__ */ H(s, {
362
362
  onClick: () => o(n),
363
363
  size: "sm",
364
364
  variant: "outline",
365
- children: T("resource.edit")
365
+ children: E("resource.edit")
366
366
  }),
367
367
  /* @__PURE__ */ H(s, {
368
- disabled: n.status != "active" || t != null || A != null || n.live != null && !j,
368
+ disabled: n.status != "active" || t != null || k != null || n.live != null && !A,
369
369
  onClick: () => void oe("publish"),
370
370
  size: "sm",
371
371
  variant: "outline",
372
- children: T(A == "publish" ? "workspace.publishing" : n.live == null ? "resource.publish" : "resource.publishUpdate")
372
+ children: E(k == "publish" ? "workspace.publishing" : n.live == null ? "resource.publish" : "resource.publishUpdate")
373
373
  }),
374
374
  n.status == "active" && /* @__PURE__ */ U(x, { children: [/* @__PURE__ */ H(_, {
375
375
  render: /* @__PURE__ */ H(s, {
376
- "aria-label": T("sidebar.deleteFlow", { name: n.name }),
376
+ "aria-label": E("sidebar.deleteFlow", { name: n.name }),
377
377
  ref: y,
378
- disabled: t != null || A != null,
379
- onClick: () => E("delete"),
378
+ disabled: t != null || k != null,
379
+ onClick: () => D("delete"),
380
380
  size: "icon-sm",
381
381
  variant: "destructive"
382
382
  }),
@@ -390,31 +390,31 @@ function Ut({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
390
390
  container: f,
391
391
  positionMethod: "fixed",
392
392
  side: "top",
393
- children: T("common.delete")
393
+ children: E("common.delete")
394
394
  })] })
395
395
  ]
396
396
  }),
397
397
  /* @__PURE__ */ H(mt, {
398
- open: te == "delete",
398
+ open: ee == "delete",
399
399
  onOpenChange: (e) => {
400
- e || E("idle");
400
+ e || D("idle");
401
401
  },
402
402
  children: /* @__PURE__ */ U(rt, {
403
403
  container: f,
404
404
  initialFocus: w,
405
405
  finalFocus: y,
406
406
  showCloseButton: !1,
407
- children: [/* @__PURE__ */ U(it, { children: [/* @__PURE__ */ H(ut, { children: T("sidebar.deleteFlowConfirm", { name: n.name }) }), /* @__PURE__ */ H(pt, { children: T("resource.deleteDescription") })] }), /* @__PURE__ */ U(ht, { children: [/* @__PURE__ */ H(lt, {
407
+ children: [/* @__PURE__ */ U(it, { children: [/* @__PURE__ */ H(ut, { children: E("sidebar.deleteFlowConfirm", { name: n.name }) }), /* @__PURE__ */ H(pt, { children: E("resource.deleteDescription") })] }), /* @__PURE__ */ U(ht, { children: [/* @__PURE__ */ H(lt, {
408
408
  render: /* @__PURE__ */ H(s, {
409
409
  ref: w,
410
410
  variant: "outline"
411
411
  }),
412
- children: T("common.cancel")
412
+ children: E("common.cancel")
413
413
  }), /* @__PURE__ */ H(s, {
414
414
  disabled: t != null,
415
- onClick: () => void ce(),
415
+ onClick: () => void N(),
416
416
  variant: "destructive",
417
- children: T(t == "flow" ? "common.deleting" : "common.delete")
417
+ children: E(t == "flow" ? "common.deleting" : "common.delete")
418
418
  })] })]
419
419
  })
420
420
  })
@@ -430,24 +430,24 @@ function Wt() {
430
430
  children: [
431
431
  /* @__PURE__ */ U("span", {
432
432
  className: "resource-skeleton-copy",
433
- children: [/* @__PURE__ */ H(M, { className: "h-3.5 w-36 max-w-full" }), /* @__PURE__ */ H(M, { className: "h-3 w-24 max-w-full" })]
433
+ children: [/* @__PURE__ */ H(w, { className: "h-3.5 w-36 max-w-full" }), /* @__PURE__ */ H(w, { className: "h-3 w-24 max-w-full" })]
434
434
  }),
435
- /* @__PURE__ */ H(M, { className: "h-3 w-36 max-w-full" }),
436
- /* @__PURE__ */ H(M, { className: "h-3 w-28 max-w-full" }),
437
- /* @__PURE__ */ H(M, { className: "h-3 w-16" })
435
+ /* @__PURE__ */ H(w, { className: "h-3 w-36 max-w-full" }),
436
+ /* @__PURE__ */ H(w, { className: "h-3 w-28 max-w-full" }),
437
+ /* @__PURE__ */ H(w, { className: "h-3 w-16" })
438
438
  ]
439
439
  }), /* @__PURE__ */ U("div", {
440
440
  className: "resource-live-controls",
441
- children: [/* @__PURE__ */ H(M, { className: "h-7 w-16" }), /* @__PURE__ */ H(M, { className: "h-7 w-14" })]
441
+ children: [/* @__PURE__ */ H(w, { className: "h-7 w-16" }), /* @__PURE__ */ H(w, { className: "h-7 w-14" })]
442
442
  })]
443
443
  });
444
444
  }
445
445
  function Gt({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBadges: a, hrefForFlow: o, hostAction: l, hostTitle: u, language: d, onCreateFlow: m, onHostAction: h, onLanguageChange: g, onSelectFlow: _, store: v }) {
446
- let b = i(), x = r(v.workspace.$.busy), S = r(v.workspace.$.flowLoadFailed), C = r(v.workspace.$.flowLoadMoreFailed), w = r(v.workspace.$.flowLoading), T = r(v.workspace.$.flowLoadingMore), te = r(v.workspace.$.flowNextCursor), E = r(v.workspace.$.flowRefreshing), ne = r(v.workspace.$.flows), re = r(v.workspace.$.flowTotal), [O, k] = W(!1), [A, ie] = W(""), [j, ae] = W(""), M = A.trim().toLocaleLowerCase(), oe = ne.filter((e) => e.name.toLocaleLowerCase().includes(M));
447
- async function N(e) {
446
+ let b = i(), x = r(v.workspace.$.busy), S = r(v.workspace.$.flowLoadFailed), C = r(v.workspace.$.flowLoadMoreFailed), w = r(v.workspace.$.flowLoading), T = r(v.workspace.$.flowLoadingMore), ee = r(v.workspace.$.flowNextCursor), D = r(v.workspace.$.flowRefreshing), O = r(v.workspace.$.flows), ne = r(v.workspace.$.flowTotal), [re, k] = W(!1), [ie, A] = W(""), [j, M] = W(""), N = ie.trim().toLocaleLowerCase(), ce = O.filter((e) => e.name.toLocaleLowerCase().includes(N));
447
+ async function le(e) {
448
448
  e.preventDefault();
449
449
  let t = j.trim();
450
- vt(t) != null || !await m(t) || (k(!1), ae(""));
450
+ vt(t) != null || !await m(t) || (k(!1), M(""));
451
451
  }
452
452
  return /* @__PURE__ */ H("main", {
453
453
  className: "resource-browser",
@@ -470,7 +470,7 @@ function Gt({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBa
470
470
  children: [/* @__PURE__ */ H("h2", {
471
471
  id: "flow-list-title",
472
472
  children: b("resource.all")
473
- }), !w && /* @__PURE__ */ H("span", { children: b("resource.flowCount", { count: re ?? ne.length }) })]
473
+ }), !w && /* @__PURE__ */ H("span", { children: b("resource.flowCount", { count: ne ?? O.length }) })]
474
474
  }), /* @__PURE__ */ U("div", {
475
475
  className: "resource-list-actions",
476
476
  children: [
@@ -487,9 +487,9 @@ function Gt({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBa
487
487
  autoComplete: "off",
488
488
  "aria-label": b("resource.searchByName"),
489
489
  name: "flow-search",
490
- onChange: (e) => ie(e.target.value),
490
+ onChange: (e) => A(e.target.value),
491
491
  placeholder: b("resource.searchByName"),
492
- value: A
492
+ value: ie
493
493
  })]
494
494
  }),
495
495
  /* @__PURE__ */ U(s, {
@@ -501,7 +501,7 @@ function Gt({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBa
501
501
  name: "plus"
502
502
  }), b("resource.newFlow")]
503
503
  }),
504
- l != null && u != null && h != null && /* @__PURE__ */ H(qe, {
504
+ l != null && u != null && h != null && /* @__PURE__ */ H(Re, {
505
505
  action: l,
506
506
  onAction: h,
507
507
  title: u
@@ -533,37 +533,37 @@ function Gt({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBa
533
533
  }),
534
534
  /* @__PURE__ */ H("div", {
535
535
  className: "resource-list",
536
- children: w ? Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ H(Wt, {}, t)) : S ? /* @__PURE__ */ U(Qe, {
536
+ children: w ? Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ H(Wt, {}, t)) : S ? /* @__PURE__ */ U(je, {
537
537
  className: "min-h-64",
538
538
  role: "alert",
539
- children: [/* @__PURE__ */ U(D, { children: [
540
- /* @__PURE__ */ H(ce, {
539
+ children: [/* @__PURE__ */ U(se, { children: [
540
+ /* @__PURE__ */ H(E, {
541
541
  variant: "icon",
542
542
  children: /* @__PURE__ */ H(ft, {
543
543
  name: "alert",
544
544
  size: 20
545
545
  })
546
546
  }),
547
- /* @__PURE__ */ H(de, { children: b("resource.flowsLoadFailed") }),
548
- /* @__PURE__ */ H(le, { children: b("resource.flowsLoadFailedDescription") })
549
- ] }), /* @__PURE__ */ H(ee, { children: /* @__PURE__ */ H(s, {
547
+ /* @__PURE__ */ H(te, { children: b("resource.flowsLoadFailed") }),
548
+ /* @__PURE__ */ H(oe, { children: b("resource.flowsLoadFailedDescription") })
549
+ ] }), /* @__PURE__ */ H(ae, { children: /* @__PURE__ */ H(s, {
550
550
  onClick: () => void v.retryFlows(),
551
551
  variant: "outline",
552
552
  children: b("empty.retry")
553
553
  }) })]
554
- }) : oe.length == 0 ? /* @__PURE__ */ U(Qe, {
554
+ }) : ce.length == 0 ? /* @__PURE__ */ U(je, {
555
555
  className: "min-h-64",
556
- children: [/* @__PURE__ */ U(D, { children: [
557
- /* @__PURE__ */ H(ce, {
556
+ children: [/* @__PURE__ */ U(se, { children: [
557
+ /* @__PURE__ */ H(E, {
558
558
  variant: "icon",
559
559
  children: /* @__PURE__ */ H(ft, {
560
560
  name: "flow",
561
561
  size: 20
562
562
  })
563
563
  }),
564
- /* @__PURE__ */ H(de, { children: b(M.length == 0 ? "resource.noFlows" : "resource.noMatchingFlows") }),
565
- /* @__PURE__ */ H(le, { children: b(M.length == 0 ? "resource.noFlowsDescription" : "resource.noMatchingDescription") })
566
- ] }), M.length == 0 && /* @__PURE__ */ H(ee, { children: /* @__PURE__ */ U(s, {
564
+ /* @__PURE__ */ H(te, { children: b(N.length == 0 ? "resource.noFlows" : "resource.noMatchingFlows") }),
565
+ /* @__PURE__ */ H(oe, { children: b(N.length == 0 ? "resource.noFlowsDescription" : "resource.noMatchingDescription") })
566
+ ] }), N.length == 0 && /* @__PURE__ */ H(ae, { children: /* @__PURE__ */ U(s, {
567
567
  onClick: () => k(!0),
568
568
  variant: "outline",
569
569
  children: [/* @__PURE__ */ H(ft, {
@@ -571,7 +571,7 @@ function Gt({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBa
571
571
  name: "plus"
572
572
  }), b("resource.newFlow")]
573
573
  }) })]
574
- }) : oe.map((e) => /* @__PURE__ */ H(Ut, {
574
+ }) : ce.map((e) => /* @__PURE__ */ H(Ut, {
575
575
  badge: a?.[e.flowId],
576
576
  busy: x,
577
577
  flow: e,
@@ -580,10 +580,10 @@ function Gt({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBa
580
580
  store: v
581
581
  }, e.flowId))
582
582
  }),
583
- te != null && /* @__PURE__ */ H("div", {
583
+ ee != null && /* @__PURE__ */ H("div", {
584
584
  className: "resource-list-footer",
585
585
  children: /* @__PURE__ */ H(s, {
586
- disabled: T || E,
586
+ disabled: T || D,
587
587
  onClick: () => void v.workspace.loadMoreFlows(),
588
588
  variant: "outline",
589
589
  children: b(T ? "resource.loadingMore" : C ? "resource.retryLoadMore" : "resource.loadMore")
@@ -591,7 +591,7 @@ function Gt({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBa
591
591
  })
592
592
  ]
593
593
  }),
594
- O && /* @__PURE__ */ H(wt, {
594
+ re && /* @__PURE__ */ H(wt, {
595
595
  fallback: null,
596
596
  children: /* @__PURE__ */ H(Nt, {
597
597
  disabled: t,
@@ -600,9 +600,9 @@ function Gt({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBa
600
600
  issue: vt(j),
601
601
  label: b("resource.flowName"),
602
602
  name: j,
603
- onNameChange: ae,
603
+ onNameChange: M,
604
604
  onOpenChange: k,
605
- onSubmit: (e) => void N(e),
605
+ onSubmit: (e) => void le(e),
606
606
  pending: x == "flow",
607
607
  title: b("resource.newFlow")
608
608
  })
@@ -935,8 +935,27 @@ function vn(e, t) {
935
935
  return q(J(e, t)?.hiddenNodeContent);
936
936
  }
937
937
  //#endregion
938
+ //#region src/workbench/browser/runtime/connectionCatalog.ts
939
+ function yn(e, t) {
940
+ let n = e.authenticated && t != null ? $(t).preferred : void 0;
941
+ return {
942
+ ...e,
943
+ ...n == null ? {} : { defaultConnection: n }
944
+ };
945
+ }
946
+ function $(e) {
947
+ let t = [], n = /* @__PURE__ */ new Map(), r;
948
+ for (let i of e) n.set(i.connectionId, i), i.status == "active" && (t.push(i), i.isDefault && (r = i));
949
+ return {
950
+ active: t,
951
+ all: e,
952
+ byId: n,
953
+ preferred: r ?? (t.length == 1 ? t[0] : void 0)
954
+ };
955
+ }
956
+ //#endregion
938
957
  //#region src/workbench/browser/runtime/publications/publicationStore.ts
939
- var yn = {
958
+ var bn = {
940
959
  activities: [],
941
960
  activitiesLoadFailed: !1,
942
961
  activitiesLoading: !1,
@@ -951,25 +970,25 @@ var yn = {
951
970
  publications: [],
952
971
  publishing: !1,
953
972
  refreshing: !1
954
- }, bn = 20, xn = 50, Sn = 750;
955
- function Cn(e, t) {
973
+ }, xn = 20, Sn = 50, Cn = 750;
974
+ function wn(e, t) {
956
975
  return e?.flowId == t.flowId;
957
976
  }
958
- var wn = class {
977
+ var Tn = class {
959
978
  #e;
960
979
  #t;
961
980
  #n;
962
- #r = new E();
963
- #i = new E();
981
+ #r = new D();
982
+ #i = new D();
964
983
  #a;
965
- #o = new E();
966
- #s = new E();
984
+ #o = new D();
985
+ #s = new D();
967
986
  #c;
968
- #l = n(yn);
987
+ #l = n(bn);
969
988
  #u;
970
989
  #d;
971
990
  #f;
972
- constructor(t, n, r, i, a = j, o = h()) {
991
+ constructor(t, n, r, i, a = F, o = h()) {
973
992
  this.#e = t, this.#t = a, this.#n = o, this.#a = i, this.#c = r, this.#u = n, this.$ = {
974
993
  activities: e(this.#l, (e) => e.activities),
975
994
  activitiesLoadFailed: e(this.#l, (e) => e.activitiesLoadFailed),
@@ -1003,17 +1022,17 @@ var wn = class {
1003
1022
  this.#l.dispose();
1004
1023
  }
1005
1024
  reset() {
1006
- this.#r.invalidate(), this.#i.invalidate(), this.#y(), this.#o.invalidate(), this.#s.invalidate(), this.#f = void 0, this.#l.set(yn);
1025
+ this.#r.invalidate(), this.#i.invalidate(), this.#y(), this.#o.invalidate(), this.#s.invalidate(), this.#f = void 0, this.#l.set(bn);
1007
1026
  }
1008
1027
  async load(e) {
1009
- let t = { flowId: e }, n = this.#l.value, r = n.loaded && Cn(n.target, t), i = this.#r.begin();
1010
- Cn(n.target, t) || (this.#i.invalidate(), this.#y(), this.#f = void 0), r ? this.#S({
1028
+ let t = { flowId: e }, n = this.#l.value, r = n.loaded && wn(n.target, t), i = this.#r.begin();
1029
+ wn(n.target, t) || (this.#i.invalidate(), this.#y(), this.#f = void 0), r ? this.#S({
1011
1030
  loadFailed: !1,
1012
1031
  loadingMore: !1,
1013
1032
  loadMoreFailed: !1,
1014
1033
  refreshing: !0
1015
1034
  }) : this.#l.set({
1016
- ...yn,
1035
+ ...bn,
1017
1036
  loading: !0,
1018
1037
  target: t
1019
1038
  });
@@ -1043,7 +1062,7 @@ var wn = class {
1043
1062
  loadFailed: !r,
1044
1063
  loading: !1,
1045
1064
  refreshing: !1
1046
- }), this.#c(F(e, this.#n.t));
1065
+ }), this.#c(O(e, this.#n.t));
1047
1066
  }
1048
1067
  }
1049
1068
  async loadMore() {
@@ -1057,7 +1076,7 @@ var wn = class {
1057
1076
  try {
1058
1077
  let e = await this.#e.listPublications(n.flowId, {
1059
1078
  cursor: t,
1060
- limit: xn
1079
+ limit: Sn
1061
1080
  });
1062
1081
  if (!r()) return;
1063
1082
  let i = new Set(this.#l.value.publications.map((e) => e.publicationId));
@@ -1072,7 +1091,7 @@ var wn = class {
1072
1091
  this.#S({
1073
1092
  loadMoreFailed: !0,
1074
1093
  loadingMore: !1
1075
- }), this.#c(F(e, this.#n.t));
1094
+ }), this.#c(O(e, this.#n.t));
1076
1095
  }
1077
1096
  }
1078
1097
  async publish() {
@@ -1099,7 +1118,7 @@ var wn = class {
1099
1118
  publishing: e.status == "pending"
1100
1119
  }), await this.#_(r, e, s, t.name)) : !1;
1101
1120
  } catch (e) {
1102
- return s() ? (e instanceof I && e.code == "live.conflict" && await this.#m(r), this.#c(F(e, this.#n.t)), !1) : !1;
1121
+ return s() ? (e instanceof I && e.code == "live.conflict" && await this.#m(r), this.#c(O(e, this.#n.t)), !1) : !1;
1103
1122
  } finally {
1104
1123
  s() && this.#S({ publishing: !1 });
1105
1124
  }
@@ -1125,7 +1144,7 @@ var wn = class {
1125
1144
  message: this.#n.t("notice.rolledBack", { revision: e.revisionId })
1126
1145
  }), !0);
1127
1146
  } catch (e) {
1128
- return s() ? (e instanceof I && e.code == "live.conflict" && await this.#m(r), this.#c(F(e, this.#n.t)), !1) : !1;
1147
+ return s() ? (e instanceof I && e.code == "live.conflict" && await this.#m(r), this.#c(O(e, this.#n.t)), !1) : !1;
1129
1148
  } finally {
1130
1149
  s() && this.#S({ rollingBackPublicationId: void 0 });
1131
1150
  }
@@ -1160,13 +1179,13 @@ var wn = class {
1160
1179
  testingTriggerId: void 0,
1161
1180
  testResult: void 0
1162
1181
  });
1163
- let [r, i] = await Promise.allSettled([this.#e.getFlowTriggerBinding(t.flowId, e), this.#e.listFlowTriggerActivities(t.flowId, e, { limit: bn })]);
1182
+ let [r, i] = await Promise.allSettled([this.#e.getFlowTriggerBinding(t.flowId, e), this.#e.listFlowTriggerActivities(t.flowId, e, { limit: xn })]);
1164
1183
  if (n()) {
1165
1184
  if (r.status == "rejected") {
1166
1185
  this.#S({
1167
1186
  activitiesLoading: !1,
1168
1187
  detailLoading: !1
1169
- }), this.#c(F(r.reason, this.#n.t));
1188
+ }), this.#c(O(r.reason, this.#n.t));
1170
1189
  return;
1171
1190
  }
1172
1191
  this.#S({
@@ -1180,7 +1199,7 @@ var wn = class {
1180
1199
  }) : (this.#S({
1181
1200
  activitiesLoadFailed: !0,
1182
1201
  activitiesLoading: !1
1183
- }), this.#c(F(i.reason, this.#n.t)));
1202
+ }), this.#c(O(i.reason, this.#n.t)));
1184
1203
  }
1185
1204
  }
1186
1205
  async loadMoreTriggerActivities() {
@@ -1194,7 +1213,7 @@ var wn = class {
1194
1213
  try {
1195
1214
  let e = await this.#e.listFlowTriggerActivities(r.flowId, n, {
1196
1215
  cursor: t,
1197
- limit: bn
1216
+ limit: xn
1198
1217
  });
1199
1218
  if (!i() || this.#l.value.selectedTriggerId != n) return;
1200
1219
  let a = new Set(this.#l.value.activities.map((e) => e.activityId));
@@ -1209,7 +1228,7 @@ var wn = class {
1209
1228
  this.#S({
1210
1229
  activitiesLoadFailed: !0,
1211
1230
  activitiesLoadingMore: !1
1212
- }), this.#c(F(e, this.#n.t));
1231
+ }), this.#c(O(e, this.#n.t));
1213
1232
  }
1214
1233
  }
1215
1234
  async testTrigger() {
@@ -1224,7 +1243,7 @@ var wn = class {
1224
1243
  let e = await this.#e.testFlowPollTrigger(n.flowId, t);
1225
1244
  return !i() || this.#l.value.selectedTriggerId != t ? !1 : (this.#S({ testResult: e }), !0);
1226
1245
  } catch (e) {
1227
- return i() && this.#l.value.selectedTriggerId == t && this.#c(F(e, this.#n.t)), !1;
1246
+ return i() && this.#l.value.selectedTriggerId == t && this.#c(O(e, this.#n.t)), !1;
1228
1247
  } finally {
1229
1248
  i() && this.#l.value.selectedTriggerId == t && this.#S({ testingTriggerId: void 0 });
1230
1249
  }
@@ -1243,16 +1262,16 @@ var wn = class {
1243
1262
  message: this.#n.t(e.operatorState == "active" ? "notice.triggerPaused" : "notice.triggerResumed")
1244
1263
  }), !0) : !1;
1245
1264
  } catch (e) {
1246
- return n() && this.#c(F(e, this.#n.t)), !1;
1265
+ return n() && this.#c(O(e, this.#n.t)), !1;
1247
1266
  } finally {
1248
1267
  n() && this.#S({ changingTriggerId: void 0 });
1249
1268
  }
1250
1269
  }
1251
1270
  async #p(e, t) {
1252
1271
  let n = this.#r.begin(), [r, i, a] = await this.#h(e, t).catch((t) => {
1253
- throw n() && Cn(this.#l.value.target, e) && this.#S({ refreshing: !1 }), t;
1272
+ throw n() && wn(this.#l.value.target, e) && this.#S({ refreshing: !1 }), t;
1254
1273
  });
1255
- t?.throwIfAborted(), n() && this.#u.updateLive(r), n() && Cn(this.#l.value.target, e) && this.#S({
1274
+ t?.throwIfAborted(), n() && this.#u.updateLive(r), n() && wn(this.#l.value.target, e) && this.#S({
1256
1275
  bindings: a,
1257
1276
  live: r,
1258
1277
  loaded: !0,
@@ -1276,7 +1295,7 @@ var wn = class {
1276
1295
  this.#e.getLive(e.flowId, t),
1277
1296
  this.#e.listPublications(e.flowId, {
1278
1297
  includeTotal: !0,
1279
- limit: xn
1298
+ limit: Sn
1280
1299
  }, t),
1281
1300
  this.#e.listFlowTriggerBindings(e.flowId, t)
1282
1301
  ]);
@@ -1309,7 +1328,7 @@ var wn = class {
1309
1328
  try: (t) => this.#p(e, t),
1310
1329
  catch: (e) => e
1311
1330
  }).pipe(G.match({
1312
- onFailure: (e) => (n() && this.#c(F(e, this.#n.t)), !1),
1331
+ onFailure: (e) => (n() && this.#c(O(e, this.#n.t)), !1),
1313
1332
  onSuccess: () => !0
1314
1333
  }));
1315
1334
  return n() ? (a && this.#c({
@@ -1327,7 +1346,7 @@ var wn = class {
1327
1346
  return G.gen({ self: this }, function* () {
1328
1347
  let r = t;
1329
1348
  for (; r.status == "pending";) {
1330
- if (yield* G.sleep(Sn), !n()) return;
1349
+ if (yield* G.sleep(Cn), !n()) return;
1331
1350
  let t = yield* G.tryPromise({
1332
1351
  try: (t) => this.#e.getPublishOperation(e.flowId, r.operationId, t),
1333
1352
  catch: (e) => e
@@ -1342,10 +1361,10 @@ var wn = class {
1342
1361
  this.#a.setItem(this.#b(e.flowId), ""), this.#x(e, {
1343
1362
  operation: void 0,
1344
1363
  publishing: !1
1345
- }), this.#c(F(n, this.#n.t));
1364
+ }), this.#c(O(n, this.#n.t));
1346
1365
  return;
1347
1366
  }
1348
- this.#c(F(n, this.#n.t));
1367
+ this.#c(O(n, this.#n.t));
1349
1368
  continue;
1350
1369
  }
1351
1370
  r = t.value, this.#x(e, { operation: r });
@@ -1360,8 +1379,8 @@ var wn = class {
1360
1379
  return `publish-operation:${e}`;
1361
1380
  }
1362
1381
  #x(e, t) {
1363
- Cn(this.#l.value.target, e) ? this.#S(t) : this.#l.set({
1364
- ...yn,
1382
+ wn(this.#l.value.target, e) ? this.#S(t) : this.#l.set({
1383
+ ...bn,
1365
1384
  ...t,
1366
1385
  target: e
1367
1386
  });
@@ -1372,8 +1391,8 @@ var wn = class {
1372
1391
  ...e
1373
1392
  });
1374
1393
  }
1375
- }, Tn = { starting: !1 };
1376
- function En(e) {
1394
+ }, En = { starting: !1 };
1395
+ function Dn(e) {
1377
1396
  switch (e.kind) {
1378
1397
  case "condition": return {};
1379
1398
  case "subflow": return $e(e.definition?.inputs ?? []);
@@ -1383,10 +1402,10 @@ function En(e) {
1383
1402
  case "wait": return $e(e.node.inputDefinitions);
1384
1403
  }
1385
1404
  }
1386
- function Dn(e) {
1405
+ function On(e) {
1387
1406
  return e.node.name == null ? e.kind == "task" || e.kind == "subflow" ? e.definition?.name ?? e.id : e.id : e.node.name;
1388
1407
  }
1389
- function On(e, t) {
1408
+ function kn(e, t) {
1390
1409
  let n = P(e), r = n.graph({ kind: "flow" });
1391
1410
  if (r == null) return [];
1392
1411
  let i = /* @__PURE__ */ new Set([t]), a = [t];
@@ -1397,11 +1416,11 @@ function On(e, t) {
1397
1416
  return Object.entries(r.nodes).filter(([e]) => i.has(e)).toSorted(([e], [t]) => e.localeCompare(t)).flatMap(([e, t]) => {
1398
1417
  let r = n.resolveNode(e, t);
1399
1418
  if (r.kind == "trigger") return r.trigger.kind == "manual" || r.trigger.kind == "cron" ? [] : [{
1400
- definitions: Le(r.trigger),
1419
+ definitions: _e(r.trigger),
1401
1420
  nodeId: e,
1402
1421
  title: r.trigger.name
1403
1422
  }];
1404
- 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({
1423
+ let i = Object.entries(Dn(r)).filter(([e, t]) => r.node.inputs[e] == null && !Object.hasOwn(t, "value")).toSorted(([e], [t]) => e.localeCompare(t)).map(([e, t]) => Object.assign({
1405
1424
  handle: e,
1406
1425
  jsonSchema: t.jsonSchema,
1407
1426
  nullable: t.nullable
@@ -1409,18 +1428,18 @@ function On(e, t) {
1409
1428
  return i.length == 0 ? [] : [{
1410
1429
  definitions: i,
1411
1430
  nodeId: e,
1412
- title: Dn(r)
1431
+ title: On(r)
1413
1432
  }];
1414
1433
  });
1415
1434
  }
1416
- function kn(e) {
1435
+ function An(e) {
1417
1436
  return JSON.stringify(e.map((e) => [e.nodeId, e.definitions.map((e) => [
1418
1437
  e.handle,
1419
1438
  e.jsonSchema,
1420
1439
  e.nullable
1421
1440
  ])]));
1422
1441
  }
1423
- async function An(e, t, n) {
1442
+ async function jn(e, t, n) {
1424
1443
  let { FlowRunInputEditorStore: r } = await import("./flowRunInputEditorStore-Bgb5vSeS.js").then((e) => e.n);
1425
1444
  return e.map((e) => {
1426
1445
  let i = new r(e.definitions, t);
@@ -1431,31 +1450,31 @@ async function An(e, t, n) {
1431
1450
  };
1432
1451
  });
1433
1452
  }
1434
- function jn(e) {
1453
+ function Mn(e) {
1435
1454
  return Object.fromEntries(e.map((e) => [e.nodeId, e.editor.values()]));
1436
1455
  }
1437
- function Mn(e, t) {
1456
+ function Nn(e, t) {
1438
1457
  return P(e).graph({ kind: "flow" })?.nodes[t]?.kind === "cron" ? { scheduledAt: (/* @__PURE__ */ new Date()).toISOString() } : {};
1439
1458
  }
1440
- function Nn(e, t, n) {
1459
+ function Pn(e, t, n) {
1441
1460
  return {
1442
1461
  inputs: Object.fromEntries(e.filter((e) => e.nodeId != t).map((e) => [e.nodeId, e.editor.values()])),
1443
- outputs: e.find((e) => e.nodeId == t)?.editor.values() ?? Mn(n, t)
1462
+ outputs: e.find((e) => e.nodeId == t)?.editor.values() ?? Nn(n, t)
1444
1463
  };
1445
1464
  }
1446
- var Pn = class {
1465
+ var Fn = class {
1447
1466
  #e;
1448
1467
  #t;
1449
1468
  #n;
1450
1469
  #r;
1451
- #i = new E();
1452
- #a = new E();
1470
+ #i = new D();
1471
+ #a = new D();
1453
1472
  #o;
1454
1473
  #s = /* @__PURE__ */ new Map();
1455
1474
  #c;
1456
- #l = n(Tn);
1475
+ #l = n(En);
1457
1476
  #u;
1458
- constructor(t, n, r, i, a = h(), o = j) {
1477
+ constructor(t, n, r, i, a = h(), o = F) {
1459
1478
  this.#e = i, this.#t = t, this.#o = n, this.#c = r, this.#r = a, this.#n = o, this.$ = {
1460
1479
  inputRequest: e(this.#l, (e) => e.inputRequest),
1461
1480
  starting: e(this.#l, (e) => e.starting),
@@ -1470,14 +1489,14 @@ var Pn = class {
1470
1489
  reset() {
1471
1490
  this.#i.invalidate(), this.#a.invalidate(), this.#u = void 0;
1472
1491
  let e = this.#l.value.inputRequest;
1473
- this.#h(e), this.#l.set(Tn), this.#p(e);
1492
+ this.#h(e), this.#l.set(En), this.#p(e);
1474
1493
  }
1475
1494
  async requestDraft(e, t, n) {
1476
1495
  let r = this.#a.begin();
1477
1496
  try {
1478
1497
  return await this.#d("draft", e, t, t.revisionId, r, void 0, n);
1479
1498
  } catch (e) {
1480
- return r() && this.#c(F(e, this.#r.t)), "unavailable";
1499
+ return r() && this.#c(O(e, this.#r.t)), "unavailable";
1481
1500
  } finally {
1482
1501
  r() && this.#g({ starting: !1 });
1483
1502
  }
@@ -1487,16 +1506,16 @@ var Pn = class {
1487
1506
  try {
1488
1507
  return await this.#d("draft", e, t, t.revisionId, r, void 0, n, !0);
1489
1508
  } catch (e) {
1490
- return r() && this.#c(F(e, this.#r.t)), "unavailable";
1509
+ return r() && this.#c(O(e, this.#r.t)), "unavailable";
1491
1510
  } finally {
1492
1511
  r() && this.#g({ starting: !1 });
1493
1512
  }
1494
1513
  }
1495
1514
  inputStatus(e, t, n) {
1496
- let r = On(t, n);
1515
+ let r = kn(t, n);
1497
1516
  if (r.length == 0) return "none";
1498
1517
  let i = this.#s.get(this.#m(e, n));
1499
- return i?.valid == 1 && i.signature == kn(r) ? "ready" : "missing";
1518
+ return i?.valid == 1 && i.signature == An(r) ? "ready" : "missing";
1500
1519
  }
1501
1520
  async requestLive(e) {
1502
1521
  let t = this.#a.begin();
@@ -1507,7 +1526,7 @@ var Pn = class {
1507
1526
  let r = await this.#t.getRevision(e.flowId, n.revisionId);
1508
1527
  return t() ? await this.#d("live", e, r, n.revisionId, t, n.publicationId) : "unavailable";
1509
1528
  } catch (e) {
1510
- return t() && this.#c(F(e, this.#r.t)), "unavailable";
1529
+ return t() && this.#c(O(e, this.#r.t)), "unavailable";
1511
1530
  } finally {
1512
1531
  t() && this.#g({ starting: !1 });
1513
1532
  }
@@ -1524,7 +1543,7 @@ var Pn = class {
1524
1543
  attempted: !0
1525
1544
  } }), !1;
1526
1545
  this.#h(e);
1527
- let { inputs: t, outputs: n } = Nn(e.groups, e.triggerId, e.revision), r = await this.#f(e.source, e.flow, e.revisionId, {
1546
+ let { inputs: t, outputs: n } = Pn(e.groups, e.triggerId, e.revision), r = await this.#f(e.source, e.flow, e.revisionId, {
1528
1547
  nodeId: e.triggerId,
1529
1548
  outputs: n
1530
1549
  }, t, e.publicationId);
@@ -1536,7 +1555,7 @@ var Pn = class {
1536
1555
  let r = this.#a.begin();
1537
1556
  this.#h(n), this.#g({ starting: !0 });
1538
1557
  try {
1539
- let i = On(n.revision, e), a = this.#s.get(this.#m(n.flow.flowId, e)), o = await An(i, this.#r.lang$, a?.values);
1558
+ let i = kn(n.revision, e), a = this.#s.get(this.#m(n.flow.flowId, e)), o = await jn(i, this.#r.lang$, a?.values);
1540
1559
  if (!r() || this.#l.value.inputRequest !== n) {
1541
1560
  for (let e of o) e.editor.dispose();
1542
1561
  return;
@@ -1550,7 +1569,7 @@ var Pn = class {
1550
1569
  valid: s
1551
1570
  } }), this.#p(n);
1552
1571
  } catch (e) {
1553
- r() && this.#c(F(e, this.#r.t));
1572
+ r() && this.#c(O(e, this.#r.t));
1554
1573
  } finally {
1555
1574
  r() && this.#g({ starting: !1 });
1556
1575
  }
@@ -1575,17 +1594,17 @@ var Pn = class {
1575
1594
  kind: "error",
1576
1595
  message: this.#r.t("runInput.selectTrigger")
1577
1596
  }), "unavailable";
1578
- let p = f == null ? [] : On(r, f.nodeId), m = kn(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);
1597
+ let p = f == null ? [] : kn(r, f.nodeId), m = An(p), h = f == null ? void 0 : this.#s.get(this.#m(n.flowId, f.nodeId)), g = f == null ? [] : await jn(p, this.#r.lang$, h?.values);
1579
1598
  if (!a()) {
1580
1599
  for (let e of g) e.editor.dispose();
1581
1600
  return "unavailable";
1582
1601
  }
1583
1602
  if (!c && f != null && g.length == 0) return await this.#f(e, n, i, {
1584
1603
  nodeId: f.nodeId,
1585
- outputs: Mn(r, f.nodeId)
1604
+ outputs: Nn(r, f.nodeId)
1586
1605
  }, {}, o) ? "started" : "unavailable";
1587
1606
  if (!c && f != null && h?.valid == 1 && h.signature == m && g.every((e) => e.editor.valid$.value)) {
1588
- let t = Nn(g, f.nodeId, r);
1607
+ let t = Pn(g, f.nodeId, r);
1589
1608
  for (let e of g) e.editor.dispose();
1590
1609
  return await this.#f(e, n, i, {
1591
1610
  nodeId: f.nodeId,
@@ -1647,7 +1666,7 @@ var Pn = class {
1647
1666
  });
1648
1667
  return !o() || !s() ? !1 : (this.#u = void 0, this.#o.follow(d, s));
1649
1668
  } catch (e) {
1650
- return o() && s() && this.#c(F(e, this.#r.t)), !1;
1669
+ return o() && s() && this.#c(O(e, this.#r.t)), !1;
1651
1670
  } finally {
1652
1671
  o() && this.#g({
1653
1672
  starting: !1,
@@ -1666,9 +1685,9 @@ var Pn = class {
1666
1685
  }
1667
1686
  #h(e) {
1668
1687
  e?.triggerId != null && e.groups.length != 0 && this.#s.set(this.#m(e.flow.flowId, e.triggerId), {
1669
- signature: kn(On(e.revision, e.triggerId)),
1688
+ signature: An(kn(e.revision, e.triggerId)),
1670
1689
  valid: e.valid.value,
1671
- values: jn(e.groups)
1690
+ values: Mn(e.groups)
1672
1691
  });
1673
1692
  }
1674
1693
  #g(e) {
@@ -1680,22 +1699,22 @@ var Pn = class {
1680
1699
  };
1681
1700
  //#endregion
1682
1701
  //#region src/workbench/browser/runtime/workspace.ts
1683
- function Fn(e, t) {
1702
+ function In(e, t) {
1684
1703
  if (e.node.icon != null) return e.node.icon;
1685
- if (e.kind != "task" || e.definition == null || !("executor" in e.definition) || e.definition.executor.kind != "connector") return Rn(e);
1704
+ if (e.kind != "task" || e.definition == null || !("executor" in e.definition) || e.definition.executor.kind != "connector") return zn(e);
1686
1705
  let n = t[e.definition.executor.action];
1687
- return n == null ? Rn(e) : k(n);
1706
+ return n == null ? zn(e) : j(n);
1688
1707
  }
1689
- function In(e, t) {
1708
+ function Ln(e, t) {
1690
1709
  return e.kind == "trigger" ? {
1691
- icon: qn(e.trigger, t.providers),
1710
+ icon: Jn(e.trigger, t.providers),
1692
1711
  title: e.trigger.name
1693
1712
  } : {
1694
- icon: Fn(e, t.connectorActions),
1695
- title: Ln(e, t.t)
1713
+ icon: In(e, t.connectorActions),
1714
+ title: Rn(e, t.t)
1696
1715
  };
1697
1716
  }
1698
- function Ln(e, t) {
1717
+ function Rn(e, t) {
1699
1718
  if (e.node.name != null) return e.node.name;
1700
1719
  switch (e.kind) {
1701
1720
  case "condition": return t?.("addNode.condition") ?? "Condition";
@@ -1706,7 +1725,7 @@ function Ln(e, t) {
1706
1725
  case "task": return e.definition?.name ?? (e.node.task == null ? e.node.taskId : e.node.task.moduleId);
1707
1726
  }
1708
1727
  }
1709
- function Rn(e) {
1728
+ function zn(e) {
1710
1729
  switch (e.kind) {
1711
1730
  case "condition": return ":carbon:child-node:";
1712
1731
  case "subflow": return ":carbon:subflow:";
@@ -1719,7 +1738,7 @@ function Rn(e) {
1719
1738
  }
1720
1739
  }
1721
1740
  }
1722
- function zn(e, t, n, r) {
1741
+ function Bn(e, t, n, r) {
1723
1742
  return JSON.stringify([
1724
1743
  e,
1725
1744
  t,
@@ -1727,10 +1746,10 @@ function zn(e, t, n, r) {
1727
1746
  r
1728
1747
  ]);
1729
1748
  }
1730
- function Bn(e) {
1749
+ function Vn(e) {
1731
1750
  if (e.kind == "trigger") return {
1732
1751
  inputs: /* @__PURE__ */ new Map(),
1733
- outputs: new Map(Object.entries(He(e.trigger)))
1752
+ outputs: new Map(Object.entries(he(e.trigger)))
1734
1753
  };
1735
1754
  let t = new Map(Object.keys(e.node.inputs).map((e) => [e, {}])), n = /* @__PURE__ */ new Map();
1736
1755
  switch (e.kind) {
@@ -1753,7 +1772,7 @@ function Bn(e) {
1753
1772
  jsonSchema: n.jsonSchema,
1754
1773
  nullable: n.nullable
1755
1774
  });
1756
- for (let [t, r] of Object.entries(Pe(e.node))) n.set(t, r);
1775
+ for (let [t, r] of Object.entries(He(e.node))) n.set(t, r);
1757
1776
  break;
1758
1777
  case "subflow": {
1759
1778
  let r = e.definition;
@@ -1799,7 +1818,7 @@ function Bn(e) {
1799
1818
  outputs: n
1800
1819
  };
1801
1820
  }
1802
- function Vn(e) {
1821
+ function Hn(e) {
1803
1822
  switch (e) {
1804
1823
  case "endsWith": return "ends with";
1805
1824
  case "hasKey": return "has key";
@@ -1823,7 +1842,7 @@ function Vn(e) {
1823
1842
  case "contains": return e;
1824
1843
  }
1825
1844
  }
1826
- function Hn(e, t) {
1845
+ function Un(e, t) {
1827
1846
  if (e.kind == "value") return JSON.stringify(e.value) ?? "…";
1828
1847
  let n = e.source;
1829
1848
  if (n.kind == "flow") return n.input;
@@ -1831,14 +1850,14 @@ function Hn(e, t) {
1831
1850
  kind: "environment",
1832
1851
  label: t.t?.("nodeInput.variable") ?? "Env"
1833
1852
  };
1834
- let r = t.nodes.get(n.nodeId), i = r == null ? void 0 : In(r, t);
1853
+ let r = t.nodes.get(n.nodeId), i = r == null ? void 0 : Ln(r, t);
1835
1854
  return {
1836
1855
  icon: i?.icon,
1837
1856
  kind: "node",
1838
- label: `${i?.title ?? n.nodeId} · ${Be(n)}`
1857
+ label: `${i?.title ?? n.nodeId} · ${re(n)}`
1839
1858
  };
1840
1859
  }
1841
- function Un(e, t, n) {
1860
+ function Wn(e, t, n) {
1842
1861
  let r = e.kind == "flow" ? `/document/graph/nodes/${t.id}` : `/document/subflows/${e.id}/graph/nodes/${t.id}`, i = [r];
1843
1862
  if (t.kind == "task") {
1844
1863
  t.node.task == null ? i.push(`/document/tasks/${t.node.taskId}`) : i.push(`${r}/task`);
@@ -1847,7 +1866,7 @@ function Un(e, t, n) {
1847
1866
  } else t.kind == "subflow" && i.push(`/document/subflows/${t.node.subflowId}`);
1848
1867
  return n.filter((e) => i.some((t) => e.path.startsWith(t))).length;
1849
1868
  }
1850
- function Wn(e, t, n, r) {
1869
+ function Gn(e, t, n, r) {
1851
1870
  if (t.kind != "flow" || n?.flowId != e.revision.flowId || n.revisionId != e.revision.revisionId) return { nodes: /* @__PURE__ */ new Map() };
1852
1871
  let i = n.status == "queued" || n.status == "starting" || n.status == "running" || n.status == "waiting", a = /* @__PURE__ */ new Map();
1853
1872
  if ("waits" in n) for (let e of n.waits) a.set(e.nodeId, {
@@ -1946,10 +1965,10 @@ function Wn(e, t, n, r) {
1946
1965
  status: i ? "running" : "idle"
1947
1966
  };
1948
1967
  }
1949
- function Gn(e, t, n) {
1968
+ function Kn(e, t, n) {
1950
1969
  if (e != null) return "moduleId" in e ? n?.("designer.executorJavaScript") ?? "javascript" : e.executor.kind == "agent" ? "Agent" : e.executor.kind == "llm" ? n?.("designer.executorLlm") ?? "llm" : `${n?.("designer.executorConnector") ?? "connector"} · ${t ?? e.executor.action.split(".")[0]}`;
1951
1970
  }
1952
- function Kn(e) {
1971
+ function qn(e) {
1953
1972
  switch (e.kind) {
1954
1973
  case "manual": return ":carbon:play:";
1955
1974
  case "cron": return ":carbon:time:";
@@ -1958,17 +1977,17 @@ function Kn(e) {
1958
1977
  case "webhook": return ":carbon:webhook:";
1959
1978
  }
1960
1979
  }
1961
- function qn(e, t) {
1962
- return e.icon == null ? e.kind != "integration" && e.kind != "poll" ? Kn(e) : k(t[e.definition.provider] ?? {
1980
+ function Jn(e, t) {
1981
+ return e.icon == null ? e.kind != "integration" && e.kind != "poll" ? qn(e) : j(t[e.definition.provider] ?? {
1963
1982
  serviceId: e.definition.provider,
1964
1983
  serviceName: e.definition.provider
1965
1984
  }) : e.icon;
1966
1985
  }
1967
- function Jn(e, t) {
1986
+ function Yn(e, t) {
1968
1987
  let n = `/document/graph/nodes/${e}`;
1969
1988
  return t.filter((e) => e.code != "trigger.config-incomplete" && (e.path == n || e.path.startsWith(`${n}/`)));
1970
1989
  }
1971
- function Yn(e, t) {
1990
+ function Xn(e, t) {
1972
1991
  let n = [], r = new Map([...t].map((e) => [e, /* @__PURE__ */ new Set()])), i = new Map([...t].map((e) => [e, /* @__PURE__ */ new Set()])), a = Array.isArray(e.edges) ? e.edges : [];
1973
1992
  for (let e of a) {
1974
1993
  if (typeof e != "object" || !e || Array.isArray(e)) continue;
@@ -1976,7 +1995,7 @@ function Yn(e, t) {
1976
1995
  if (typeof a.source != "string" || typeof a.target != "string" || a.sourceHandle != null && typeof a.sourceHandle != "string" || !t.has(a.source) || !t.has(a.target)) continue;
1977
1996
  let o = a.sourceHandle == null ? "$out" : `$branch:${a.sourceHandle}`;
1978
1997
  n.push({
1979
- id: zn(a.source, o, a.target, "$in"),
1998
+ id: Bn(a.source, o, a.target, "$in"),
1980
1999
  source: a.source,
1981
2000
  sourceHandle: o,
1982
2001
  target: a.target,
@@ -1989,7 +2008,7 @@ function Yn(e, t) {
1989
2008
  edges: n
1990
2009
  };
1991
2010
  }
1992
- function Xn(e, t, n) {
2011
+ function Zn(e, t, n) {
1993
2012
  let r = new Map([...t].map(([e, t]) => [e, t.size])), i = /* @__PURE__ */ new Map(), a = [], o = /* @__PURE__ */ new Set(), s = [...r].filter(([, e]) => e == 0).map(([e]) => e).toSorted();
1994
2013
  for (let e = 0; e < s.length; e += 1) {
1995
2014
  let t = s[e];
@@ -2008,14 +2027,14 @@ function Xn(e, t, n) {
2008
2027
  ordered: a
2009
2028
  };
2010
2029
  }
2011
- function Zn(e, t, n) {
2030
+ function Qn(e, t, n) {
2012
2031
  if (!("inputs" in t)) return [];
2013
2032
  let r = [];
2014
2033
  for (let [i, a] of n.inputs) {
2015
2034
  let n = t.inputs[i], o = [], s = /* @__PURE__ */ new Set();
2016
2035
  if (n?.kind == "sources") for (let t of n.sources) {
2017
2036
  if (t.kind != "node") continue;
2018
- let n = t.nodeId, r = t.output, a = zn(n, r, e, i);
2037
+ let n = t.nodeId, r = t.output, a = Bn(n, r, e, i);
2019
2038
  s.has(a) || (s.add(a), o.push({
2020
2039
  nodeId: n,
2021
2040
  output: r
@@ -2030,10 +2049,10 @@ function Zn(e, t, n) {
2030
2049
  }
2031
2050
  return r;
2032
2051
  }
2033
- function Qn(e) {
2052
+ function $n(e) {
2034
2053
  return [...e.outputs].map(([e, t]) => Object.assign({ handle: e }, t));
2035
2054
  }
2036
- function $n(e, t) {
2055
+ function er(e, t) {
2037
2056
  if (e.kind != "task" || e.definition == null) return t;
2038
2057
  let n = new Map(t.map((e) => [e.handle, e])), r = [];
2039
2058
  for (let t of e.definition.inputs) {
@@ -2046,7 +2065,7 @@ function $n(e, t) {
2046
2065
  }
2047
2066
  return r.push(...n.values()), r;
2048
2067
  }
2049
- function er(e, t) {
2068
+ function tr(e, t) {
2050
2069
  if (e.kind != "task" || e.definition == null) return t;
2051
2070
  let n = new Map(t.map((e) => [e.handle, e])), r = [];
2052
2071
  for (let t of e.definition.outputs) {
@@ -2059,8 +2078,8 @@ function er(e, t) {
2059
2078
  }
2060
2079
  return r.push(...n.values()), r;
2061
2080
  }
2062
- function tr(e, t, n, r, i) {
2063
- let a = Jn(e, r), o = a.some((e) => e.code == "trigger.connection-missing" || e.code == "trigger.connection-invalid"), s = t.kind == "integration" || t.kind == "poll" ? i[t.definition.provider] : void 0, c;
2081
+ function nr(e, t, n, r, i) {
2082
+ let a = Yn(e, r), o = a.some((e) => e.code == "trigger.connection-missing" || e.code == "trigger.connection-invalid"), s = t.kind == "integration" || t.kind == "poll" ? i[t.definition.provider] : void 0, c;
2064
2083
  switch (t.kind) {
2065
2084
  case "manual":
2066
2085
  c = {
@@ -2097,27 +2116,27 @@ function tr(e, t, n, r, i) {
2097
2116
  description: t.description,
2098
2117
  diagnostics: a.length,
2099
2118
  connectionRequired: o,
2100
- icon: qn(t, i),
2119
+ icon: Jn(t, i),
2101
2120
  id: e,
2102
2121
  inputs: [],
2103
2122
  kind: "trigger",
2104
- outputs: Object.entries(He(t)).map(([e, t]) => Object.assign({ handle: e }, t)),
2123
+ outputs: Object.entries(he(t)).map(([e, t]) => Object.assign({ handle: e }, t)),
2105
2124
  presentation: c,
2106
2125
  position: n,
2107
2126
  title: t.name
2108
2127
  };
2109
2128
  }
2110
- function nr(e, t, n, r, i) {
2111
- let a = t.node, o = $n(t, Zn(e, a, n)), s = er(t, Qn(n)), c = t.kind == "task" ? t.definition : void 0, l = c != null && "executor" in c && c.executor.kind == "connector" ? c.executor : void 0, u = l == null ? void 0 : i.connectorActions[l.action], d = u == null ? void 0 : i.connectionCatalogs[u.serviceId], f = l?.connectionId, p = f == null ? void 0 : d?.byId.get(f), m = u?.authenticated == 1 && (l?.connectionId == null || d != null && p?.status != "active"), h = i.runNodes.get(e), g = {
2129
+ function rr(e, t, n, r, i) {
2130
+ let a = t.node, o = er(t, Qn(e, a, n)), s = tr(t, $n(n)), c = t.kind == "task" ? t.definition : void 0, l = c != null && "executor" in c && c.executor.kind == "connector" ? c.executor : void 0, u = l == null ? void 0 : i.connectorActions[l.action], d = u == null ? void 0 : i.connectionCatalogs[u.serviceId], f = l?.connectionId, p = f == null ? void 0 : d?.byId.get(f), m = u?.authenticated == 1 && (l?.connectionId == null || d != null && p?.status != "active"), h = i.runNodes.get(e), g = {
2112
2131
  description: a.description,
2113
- diagnostics: Un(i.target, t, i.diagnostics),
2114
- icon: Fn(t, i.connectorActions),
2132
+ diagnostics: Wn(i.target, t, i.diagnostics),
2133
+ icon: In(t, i.connectorActions),
2115
2134
  id: e,
2116
2135
  inputs: o,
2117
2136
  outputs: s,
2118
2137
  position: r,
2119
2138
  ...h == null ? {} : { run: h },
2120
- title: Ln(t, i.t)
2139
+ title: Rn(t, i.t)
2121
2140
  };
2122
2141
  switch (a.kind) {
2123
2142
  case "condition": return {
@@ -2126,9 +2145,9 @@ function nr(e, t, n, r, i) {
2126
2145
  cases: a.cases.map((e) => ({
2127
2146
  ...e.description == null ? {} : { description: e.description },
2128
2147
  groups: e.groups.map((e) => ({ expressions: e.expressions.map((e) => ({
2129
- left: Hn(e.left, i),
2130
- operator: Vn(e.operator),
2131
- right: e.right == null ? void 0 : Hn(e.right, i)
2148
+ left: Un(e.left, i),
2149
+ operator: Hn(e.operator),
2150
+ right: e.right == null ? void 0 : Un(e.right, i)
2132
2151
  })) })),
2133
2152
  output: e.output
2134
2153
  })),
@@ -2147,13 +2166,13 @@ function nr(e, t, n, r, i) {
2147
2166
  return t == null || "group" in t ? [] : [t];
2148
2167
  }),
2149
2168
  kind: a.kind,
2150
- executorName: Gn(c, u?.serviceName, i.t),
2169
+ executorName: Kn(c, u?.serviceName, i.t),
2151
2170
  connectionRequired: m,
2152
2171
  ...c != null && "executor" in c && c.executor.kind == "agent" ? { tools: c.executor.tools.map((e) => {
2153
2172
  let t = i.connectorActions[e.action], n = t?.serviceId ?? e.action.split(".")[0], r = t?.serviceName ?? n;
2154
2173
  return {
2155
2174
  id: e.id,
2156
- icon: k(t ?? {
2175
+ icon: j(t ?? {
2157
2176
  serviceId: n,
2158
2177
  serviceName: r
2159
2178
  }),
@@ -2174,7 +2193,7 @@ function nr(e, t, n, r, i) {
2174
2193
  };
2175
2194
  }
2176
2195
  }
2177
- function rr(e, t, n = {}, r = [], i = {}, a = {}, o, s, c = [], l = {}) {
2196
+ function ir(e, t, n = {}, r = [], i = {}, a = {}, o, s, c = [], l = {}) {
2178
2197
  let u = e == null ? void 0 : P(e), d = u == null || t == null ? void 0 : u.graph(t);
2179
2198
  if (u == null || t == null || d == null) return {
2180
2199
  edges: [],
@@ -2185,7 +2204,7 @@ function rr(e, t, n = {}, r = [], i = {}, a = {}, o, s, c = [], l = {}) {
2185
2204
  zoom: 1
2186
2205
  }
2187
2206
  };
2188
- let f = Wn(u, t, s, c), p = Object.entries(d.nodes), m = new Map(p.map(([e, t]) => [e, u.resolveNode(e, t)])), h = new Set(p.map(([e]) => e)), g = new Map([...m].map(([e, t]) => [e, Bn(t)])), _ = Yn(d, h), v = Xn(h, _.dependencies, _.dependents), y = an(n, t), b = vn(n, t), x = {
2207
+ let f = Gn(u, t, s, c), p = Object.entries(d.nodes), m = new Map(p.map(([e, t]) => [e, u.resolveNode(e, t)])), h = new Set(p.map(([e]) => e)), g = new Map([...m].map(([e, t]) => [e, Vn(t)])), _ = Xn(d, h), v = Zn(h, _.dependencies, _.dependents), y = an(n, t), b = vn(n, t), x = {
2189
2208
  connectionCatalogs: a,
2190
2209
  connectorActions: i,
2191
2210
  diagnostics: r,
@@ -2205,12 +2224,12 @@ function rr(e, t, n = {}, r = [], i = {}, a = {}, o, s, c = [], l = {}) {
2205
2224
  }, a = m.get(e);
2206
2225
  if (a.kind == "trigger") {
2207
2226
  C.push({
2208
- ...tr(e, a.trigger, i, r, l),
2227
+ ...nr(e, a.trigger, i, r, l),
2209
2228
  contentHidden: b?.[e] === !0
2210
2229
  });
2211
2230
  continue;
2212
2231
  }
2213
- let o = nr(e, a, g.get(e), i, x);
2232
+ let o = rr(e, a, g.get(e), i, x);
2214
2233
  C.push({
2215
2234
  ...o,
2216
2235
  contentHidden: b?.[e] === !0
@@ -2232,83 +2251,83 @@ function rr(e, t, n = {}, r = [], i = {}, a = {}, o, s, c = [], l = {}) {
2232
2251
  }
2233
2252
  //#endregion
2234
2253
  //#region src/connector/common/actionSchema.ts
2235
- function ir(e, t) {
2236
- let n = ar(e);
2254
+ function ar(e, t) {
2255
+ let n = or(e);
2237
2256
  return {
2238
2257
  inputs: n,
2239
2258
  initialInputs: n.flatMap((e) => e.value === void 0 ? [] : [{
2240
2259
  handle: e.handle,
2241
2260
  value: e.value
2242
2261
  }]),
2243
- outputs: or(t)
2262
+ outputs: sr(t)
2244
2263
  };
2245
2264
  }
2246
- function ar(e) {
2265
+ function or(e) {
2247
2266
  let t = V(e);
2248
2267
  if (t == null || t.type != "object" && t.properties == null) throw Error("Connector action inputSchema must be an object schema.");
2249
2268
  let n = V(t.properties);
2250
2269
  if (n == null) return [];
2251
- let r = ur(t.required);
2270
+ let r = dr(t.required);
2252
2271
  return Object.entries(n).map(([e, n]) => {
2253
- let i = !r.has(e) || dr(n, t);
2272
+ let i = !r.has(e) || fr(n, t);
2254
2273
  return {
2255
- description: cr(t, n),
2274
+ description: lr(t, n),
2256
2275
  handle: e,
2257
- json_schema: sr(t, n),
2276
+ json_schema: cr(t, n),
2258
2277
  nullable: i,
2259
- value: lr(t, n, i)
2278
+ value: ur(t, n, i)
2260
2279
  };
2261
2280
  });
2262
2281
  }
2263
- function or(e) {
2282
+ function sr(e) {
2264
2283
  let t = V(e), n = V(t?.properties);
2265
2284
  if (t != null && (t.type == "object" || n != null)) {
2266
2285
  if (n == null) return [];
2267
- let e = ur(t.required);
2286
+ let e = dr(t.required);
2268
2287
  return Object.entries(n).map(([n, r]) => ({
2269
- description: cr(t, r),
2288
+ description: lr(t, r),
2270
2289
  handle: n,
2271
- json_schema: sr(t, r),
2272
- nullable: !e.has(n) || dr(r, t)
2290
+ json_schema: cr(t, r),
2291
+ nullable: !e.has(n) || fr(r, t)
2273
2292
  }));
2274
2293
  }
2275
2294
  return [{
2276
- description: cr(t, e),
2295
+ description: lr(t, e),
2277
2296
  handle: "output",
2278
2297
  json_schema: e,
2279
- nullable: dr(e)
2298
+ nullable: fr(e)
2280
2299
  }];
2281
2300
  }
2282
- function sr(e, t) {
2301
+ function cr(e, t) {
2283
2302
  let n = V(t);
2284
2303
  if (n == null) return t;
2285
2304
  let r = Object.assign({}, n);
2286
2305
  return r.$defs == null && e.$defs != null && (r.$defs = e.$defs), r.definitions == null && e.definitions != null && (r.definitions = e.definitions), r;
2287
2306
  }
2288
- function cr(e, t) {
2289
- for (let n of fr(e, t)) if (typeof n.description == "string") return n.description;
2307
+ function lr(e, t) {
2308
+ for (let n of pr(e, t)) if (typeof n.description == "string") return n.description;
2290
2309
  }
2291
- function lr(e, t, n) {
2292
- for (let n of fr(e, t)) if (Object.hasOwn(n, "default")) return n.default;
2310
+ function ur(e, t, n) {
2311
+ for (let n of pr(e, t)) if (Object.hasOwn(n, "default")) return n.default;
2293
2312
  return n ? null : void 0;
2294
2313
  }
2295
- function ur(e) {
2314
+ function dr(e) {
2296
2315
  return Array.isArray(e) ? new Set(e.filter((e) => typeof e == "string")) : /* @__PURE__ */ new Set();
2297
2316
  }
2298
- function dr(e, t = e, n = /* @__PURE__ */ new Set()) {
2317
+ function fr(e, t = e, n = /* @__PURE__ */ new Set()) {
2299
2318
  let r = V(e);
2300
2319
  if (r == null) return !1;
2301
2320
  if (Object.hasOwn(r, "type")) return r.type == "null" || Array.isArray(r.type) && r.type.includes("null");
2302
2321
  if (Object.hasOwn(r, "enum")) return Array.isArray(r.enum) && r.enum.includes(null);
2303
- for (let e of ["anyOf", "oneOf"]) if (Object.hasOwn(r, e)) return Array.isArray(r[e]) && r[e].some((e) => dr(e, t, n));
2322
+ for (let e of ["anyOf", "oneOf"]) if (Object.hasOwn(r, e)) return Array.isArray(r[e]) && r[e].some((e) => fr(e, t, n));
2304
2323
  let i = typeof r.$ref == "string" ? r.$ref : void 0;
2305
2324
  if (i == null || n.has(i)) return !1;
2306
- let a = pr(t, i);
2325
+ let a = mr(t, i);
2307
2326
  if (a === void 0) return !1;
2308
2327
  let o = new Set(n);
2309
- return o.add(i), dr(a, t, o);
2328
+ return o.add(i), fr(a, t, o);
2310
2329
  }
2311
- function fr(e, t) {
2330
+ function pr(e, t) {
2312
2331
  let n = [], r = /* @__PURE__ */ new Set(), i = t;
2313
2332
  for (;;) {
2314
2333
  let t = V(i);
@@ -2316,12 +2335,12 @@ function fr(e, t) {
2316
2335
  n.push(t);
2317
2336
  let a = typeof t.$ref == "string" ? t.$ref : void 0;
2318
2337
  if (a == null || r.has(a)) return n;
2319
- let o = pr(e, a);
2338
+ let o = mr(e, a);
2320
2339
  if (o === void 0) return n;
2321
2340
  r.add(a), i = o;
2322
2341
  }
2323
2342
  }
2324
- function pr(e, t) {
2343
+ function mr(e, t) {
2325
2344
  if (t == "#") return e;
2326
2345
  if (!t.startsWith("#/")) return;
2327
2346
  let n = e;
@@ -2334,14 +2353,14 @@ function pr(e, t) {
2334
2353
  }
2335
2354
  //#endregion
2336
2355
  //#region src/workbench/browser/runtime/stores/proxyCatalog.ts
2337
- function mr(e, t) {
2338
- let n = Ie(e);
2356
+ function hr(e, t) {
2357
+ let n = Be(e);
2339
2358
  if (n.success === !1) throw new I(502, typeof n.errorCode == "string" ? n.errorCode : "connector.unavailable", typeof n.message == "string" ? n.message : "Connector request failed.");
2340
2359
  if (n.success !== !0 || !Array.isArray(n.data)) return L();
2341
- if (t != null) for (let e of n.data) t(Ie(e));
2360
+ if (t != null) for (let e of n.data) t(Be(e));
2342
2361
  return n;
2343
2362
  }
2344
- function hr(e) {
2363
+ function gr(e) {
2345
2364
  return !Array.isArray(e.authTypes) || e.authTypes.some((e) => typeof e != "string") ? L() : {
2346
2365
  serviceId: B(e.service),
2347
2366
  serviceName: B(e.displayName),
@@ -2350,22 +2369,22 @@ function hr(e) {
2350
2369
  ...e.homepageUrl == null || e.homepageUrl === "" ? {} : { homepageUrl: B(e.homepageUrl) }
2351
2370
  };
2352
2371
  }
2353
- function gr(e) {
2372
+ function _r(e) {
2354
2373
  if (B(e.id), B(e.service), B(e.name), typeof e.description != "string") return L();
2355
- ir(e.inputSchema, e.outputSchema);
2374
+ ar(e.inputSchema, e.outputSchema);
2356
2375
  }
2357
- function _r(e) {
2376
+ function vr(e) {
2358
2377
  return {
2359
2378
  nullable: e.nullable,
2360
- jsonSchema: ve(e.json_schema),
2379
+ jsonSchema: Se(e.json_schema),
2361
2380
  ...e.description == null ? {} : { description: e.description },
2362
- ...e.value === void 0 ? {} : { value: ve(e.value) }
2381
+ ...e.value === void 0 ? {} : { value: Se(e.value) }
2363
2382
  };
2364
2383
  }
2365
- function vr(e, t) {
2384
+ function yr(e, t) {
2366
2385
  let n = t.data.find((t) => t.service == e.service);
2367
2386
  if (n == null) return L();
2368
- let r = hr(n), i = ir(e.inputSchema, e.outputSchema);
2387
+ let r = gr(n), i = ar(e.inputSchema, e.outputSchema);
2369
2388
  return {
2370
2389
  serviceId: r.serviceId,
2371
2390
  serviceName: r.serviceName,
@@ -2376,19 +2395,19 @@ function vr(e, t) {
2376
2395
  name: B(e.name),
2377
2396
  description: e.description,
2378
2397
  authenticated: !n.authTypes.includes("no_auth"),
2379
- inputSchema: ve(e.inputSchema),
2380
- outputSchema: ve(e.outputSchema),
2381
- inputs: Object.fromEntries(i.inputs.map((e) => [e.handle, _r(e)])),
2382
- outputs: Object.fromEntries(i.outputs.map((e) => [e.handle, _r(e)]))
2398
+ inputSchema: Se(e.inputSchema),
2399
+ outputSchema: Se(e.outputSchema),
2400
+ inputs: Object.fromEntries(i.inputs.map((e) => [e.handle, vr(e)])),
2401
+ outputs: Object.fromEntries(i.outputs.map((e) => [e.handle, vr(e)]))
2383
2402
  };
2384
2403
  }
2385
2404
  //#endregion
2386
2405
  //#region src/workbench/browser/runtime/stores/catalogStores.ts
2387
- function yr(e) {
2388
- let t = Ie(e);
2389
- return t.version != 1 || !Array.isArray(t.actions) ? L() : t.actions.map(Ne);
2406
+ function br(e) {
2407
+ let t = Be(e);
2408
+ return t.version != 1 || !Array.isArray(t.actions) ? L() : t.actions.map(Le);
2390
2409
  }
2391
- var br = (...e) => JSON.stringify(e), xr = class {
2410
+ var xr = (...e) => JSON.stringify(e), Sr = class {
2392
2411
  constructor(e, t, n) {
2393
2412
  this.client = e, this.kind = t, this.options = n, this.entries = /* @__PURE__ */ new Map();
2394
2413
  }
@@ -2399,8 +2418,8 @@ var br = (...e) => JSON.stringify(e), xr = class {
2399
2418
  ...t == null ? {} : { locale: t }
2400
2419
  }), a = `/v1/connector/proxy/${this.kind}${i.size ? `?${i}` : ""}`, o = this.entries.get(a);
2401
2420
  if (o == null) {
2402
- let e = (e) => mr(e, this.kind == "providers" ? hr : void 0);
2403
- o = new Oe((t, n) => this.client.readProxyCatalog({
2421
+ let e = (e) => hr(e, this.kind == "providers" ? gr : void 0);
2422
+ o = new Me((t, n) => this.client.readProxyCatalog({
2404
2423
  path: a,
2405
2424
  decode: e
2406
2425
  }, t, n), this.kind == "providers" ? 3e5 : 3e4, this.options == null ? void 0 : {
@@ -2421,7 +2440,7 @@ var br = (...e) => JSON.stringify(e), xr = class {
2421
2440
  for (let e of this.entries.values()) e.dispose();
2422
2441
  this.entries.clear();
2423
2442
  }
2424
- }, Sr = class {
2443
+ }, Cr = class {
2425
2444
  constructor() {
2426
2445
  this.entries = /* @__PURE__ */ new Map();
2427
2446
  }
@@ -2459,13 +2478,13 @@ var br = (...e) => JSON.stringify(e), xr = class {
2459
2478
  for (let e of this.entries.values()) e.dispose();
2460
2479
  this.entries.clear();
2461
2480
  }
2462
- }, Cr = class {
2463
- #e = new Sr();
2481
+ }, wr = class {
2482
+ #e = new Cr();
2464
2483
  constructor(e, t) {
2465
- this.raw = new xr(e, "providers", t);
2484
+ this.raw = new Sr(e, "providers", t);
2466
2485
  }
2467
2486
  get(e, t = "en", n = !1) {
2468
- return this.#e.get(br(e, t), [this.raw.get(e, t, void 0, n)], (e) => e.data.map(hr));
2487
+ return this.#e.get(xr(e, t), [this.raw.get(e, t, void 0, n)], (e) => e.data.map(gr));
2469
2488
  }
2470
2489
  retryFailed() {
2471
2490
  this.raw.retryFailed();
@@ -2476,7 +2495,7 @@ var br = (...e) => JSON.stringify(e), xr = class {
2476
2495
  dispose() {
2477
2496
  this.#e.dispose(), this.raw.dispose();
2478
2497
  }
2479
- }, wr = class {
2498
+ }, Tr = class {
2480
2499
  #e = /* @__PURE__ */ new Map();
2481
2500
  #t = /* @__PURE__ */ new Map();
2482
2501
  constructor(e, t) {
@@ -2485,16 +2504,16 @@ var br = (...e) => JSON.stringify(e), xr = class {
2485
2504
  get(t, n, r = !1) {
2486
2505
  let i = this.#e.get(n);
2487
2506
  if (i == null) {
2488
- let e = w(n);
2489
- i = new Oe((t, n) => this.client.readCatalog(e, t, n), 3e4, this.options == null ? void 0 : {
2507
+ let e = ee(n);
2508
+ i = new Me((t, n) => this.client.readCatalog(e, t, n), 3e4, this.options == null ? void 0 : {
2490
2509
  key: `open-flow:connections:v1:${encodeURIComponent(this.options.namespace)}:${e.path}`,
2491
2510
  storage: () => this.options.sessionStorage ?? window.sessionStorage,
2492
- decode: (e) => Array.isArray(e) ? e.map(We) : L()
2511
+ decode: (e) => Array.isArray(e) ? e.map(Ke) : L()
2493
2512
  }), this.#e.set(n, i);
2494
2513
  }
2495
2514
  let a = i.get(r);
2496
2515
  if (t == null) return a;
2497
- let o = br(n, t), s = this.#t.get(o);
2516
+ let o = xr(n, t), s = this.#t.get(o);
2498
2517
  return s ?? (s = e(a, (e) => ({
2499
2518
  ...e,
2500
2519
  data: e.data?.filter((e) => e.serviceId == t)
@@ -2512,20 +2531,20 @@ var br = (...e) => JSON.stringify(e), xr = class {
2512
2531
  for (let e of this.#e.values()) e.dispose();
2513
2532
  this.#e.clear();
2514
2533
  }
2515
- }, Tr = class {
2534
+ }, Er = class {
2516
2535
  #e;
2517
- #t = new Sr();
2536
+ #t = new Cr();
2518
2537
  #n = /* @__PURE__ */ new Map();
2519
2538
  #r = /* @__PURE__ */ new Set();
2520
2539
  #i = /* @__PURE__ */ new WeakMap();
2521
2540
  constructor(e, t, n) {
2522
- this.client = e, this.providers = t, this.#e = new xr(e, "actions", n);
2541
+ this.client = e, this.providers = t, this.#e = new Sr(e, "actions", n);
2523
2542
  }
2524
2543
  get(e, t, n = "en", r = !1) {
2525
- return this.#t.get(br(t, e, n), [this.#e.get(t, n, e, r), this.providers.raw.get(t, n)], (t, n) => t.data.flatMap((t) => {
2544
+ return this.#t.get(xr(t, e, n), [this.#e.get(t, n, e, r), this.providers.raw.get(t, n)], (t, n) => t.data.flatMap((t) => {
2526
2545
  try {
2527
- let r = Ie(t);
2528
- return gr(r), r.service == e ? [vr(r, n)] : L();
2546
+ let r = Be(t);
2547
+ return _r(r), r.service == e ? [yr(r, n)] : L();
2529
2548
  } catch (n) {
2530
2549
  return console.warn("Could not load Connector Action.", {
2531
2550
  serviceId: e,
@@ -2536,7 +2555,7 @@ var br = (...e) => JSON.stringify(e), xr = class {
2536
2555
  }));
2537
2556
  }
2538
2557
  detail(t, n, r = "en", i = !1) {
2539
- let a = t.split(".")[0], o = this.get(a, n, r, i), s = br(n, t, r), c = this.#n.get(s);
2558
+ let a = t.split(".")[0], o = this.get(a, n, r, i), s = xr(n, t, r), c = this.#n.get(s);
2540
2559
  if (c == null) {
2541
2560
  let n = new I(404, "connector.action-not-found", `Connector Action "${t}" was not found.`);
2542
2561
  c = e(o, (e) => {
@@ -2566,9 +2585,9 @@ var br = (...e) => JSON.stringify(e), xr = class {
2566
2585
  }
2567
2586
  let s = o.get(a);
2568
2587
  if (s != null) return s.refresh(), s;
2569
- let c = new Oe((e, t) => this.client.readCatalog({
2588
+ let c = new Me((e, t) => this.client.readCatalog({
2570
2589
  path: `/v1/connector/action-metadata?${i}`,
2571
- decode: yr
2590
+ decode: br
2572
2591
  }, null, t), 3e4);
2573
2592
  return r.aborted ? c.dispose() : (o.set(a, c), this.#r.add(c)), c;
2574
2593
  }
@@ -2584,9 +2603,9 @@ var br = (...e) => JSON.stringify(e), xr = class {
2584
2603
  for (let e of this.#n.values()) e.dispose();
2585
2604
  this.#n.clear(), this.#t.dispose(), this.#e.dispose();
2586
2605
  }
2587
- }, Er = class {
2606
+ }, Dr = class {
2588
2607
  constructor(e, t) {
2589
- this.providers = new Cr(e, t), this.actions = new Tr(e, this.providers, t), this.connections = new wr(e, t);
2608
+ this.providers = new wr(e, t), this.actions = new Er(e, this.providers, t), this.connections = new Tr(e, t);
2590
2609
  }
2591
2610
  dispose() {
2592
2611
  this.actions.dispose(), this.connections.dispose(), this.providers.dispose();
@@ -2594,24 +2613,25 @@ var br = (...e) => JSON.stringify(e), xr = class {
2594
2613
  refreshFlow(e) {
2595
2614
  this.actions.refreshFlow(e), this.connections.refreshFlow(e), this.providers.refreshFlow(e);
2596
2615
  }
2597
- }, Dr = {
2616
+ }, Or = {
2598
2617
  candidates: {},
2599
2618
  candidateErrors: [],
2600
2619
  loading: !1,
2601
2620
  loadingCandidates: []
2602
- }, Or = class {
2621
+ }, kr = class {
2603
2622
  #e;
2604
2623
  #t;
2605
2624
  #n;
2606
2625
  #r;
2607
2626
  #i;
2627
+ #a;
2608
2628
  constructor(e, t, r = h(), i = () => {}) {
2609
- this.client = e, this.setNotice = t, this.i18n = r, this.onSaved = i, this.#e = n(Dr), this.#n = 0, this.#r = !1, this.#i = new AbortController(), this.$ = this.#e;
2629
+ this.client = e, this.setNotice = t, this.i18n = r, this.onSaved = i, this.#e = n(Or), this.#n = 0, this.#r = !1, this.#i = new AbortController(), this.#a = /* @__PURE__ */ new Map(), this.$ = this.#e;
2610
2630
  }
2611
2631
  async load(e) {
2612
2632
  let t = e != null && e == this.#t && this.#e.value.access != null, n = ++this.#n;
2613
- if (this.#t = e, t || (this.#i.abort(), this.#i = new AbortController(), this.#e.set(e == null ? Dr : {
2614
- ...Dr,
2633
+ if (this.#t = e, t || (this.#i.abort(), this.#i = new AbortController(), this.#a.clear(), this.#e.set(e == null ? Or : {
2634
+ ...Or,
2615
2635
  loading: !0
2616
2636
  })), e != null) try {
2617
2637
  let t = await this.client.getConnectorAccess(e);
@@ -2624,7 +2644,7 @@ var br = (...e) => JSON.stringify(e), xr = class {
2624
2644
  });
2625
2645
  }
2626
2646
  } catch (e) {
2627
- !this.#r && n == this.#n && (t || this.#e.set(Dr), this.setNotice(F(e, this.i18n.t)));
2647
+ !this.#r && n == this.#n && (t || this.#e.set(Or), this.setNotice(O(e, this.i18n.t)));
2628
2648
  }
2629
2649
  }
2630
2650
  changed(e) {
@@ -2636,39 +2656,54 @@ var br = (...e) => JSON.stringify(e), xr = class {
2636
2656
  configuration: e == null ? {} : { providerId: e }
2637
2657
  }), e != null && this.loadCandidates([e], !0));
2638
2658
  }
2659
+ closeConfiguration() {
2660
+ this.#e.set({
2661
+ ...this.#e.value,
2662
+ configuration: void 0
2663
+ });
2664
+ }
2639
2665
  async loadCandidates(e, t = !1) {
2640
2666
  let n = this.#t, r = this.#e.value;
2641
2667
  if (this.#r || n == null || r.access?.mode != "selectable") return;
2642
- let i = [...new Set(e)].filter((e) => !r.loadingCandidates.includes(e) && (t || r.candidates[e] == null && !r.candidateErrors.includes(e)));
2643
- if (i.length == 0) return;
2644
- let a = this.#i.signal;
2668
+ let i = e.flatMap((e) => this.#a.get(e) ?? []), a = [...new Set(e)].filter((e) => !this.#a.has(e) && (t || r.candidates[e] == null && !r.candidateErrors.includes(e)));
2669
+ if (a.length == 0) {
2670
+ await Promise.all(i);
2671
+ return;
2672
+ }
2673
+ let o = Promise.withResolvers();
2674
+ for (let e of a) this.#a.set(e, o.promise);
2675
+ let s = this.#i.signal;
2645
2676
  this.#e.set({
2646
2677
  ...r,
2647
- candidateErrors: r.candidateErrors.filter((e) => !i.includes(e)),
2648
- loadingCandidates: [...r.loadingCandidates, ...i]
2678
+ candidateErrors: r.candidateErrors.filter((e) => !a.includes(e)),
2679
+ loadingCandidates: [...r.loadingCandidates, ...a]
2649
2680
  });
2650
2681
  try {
2651
- let e = await this.client.listProviderAccessBindingCandidates(n, i, a);
2652
- if (a.aborted) return;
2653
- let t = this.#e.value, r = { ...t.candidates }, o = [...t.candidateErrors];
2654
- for (let t of e.results) "error" in t ? o.push(t.providerId) : r[t.providerId] = t;
2682
+ let e = await this.client.listProviderAccessBindingCandidates(n, a, s);
2683
+ if (s.aborted) return;
2684
+ let t = this.#e.value, r = { ...t.candidates }, i = [...t.candidateErrors];
2685
+ for (let t of e.results) "error" in t ? i.push(t.providerId) : r[t.providerId] = t;
2655
2686
  this.#e.set({
2656
2687
  ...t,
2657
2688
  candidates: r,
2658
- candidateErrors: o,
2659
- loadingCandidates: t.loadingCandidates.filter((e) => !i.includes(e))
2689
+ candidateErrors: i,
2690
+ loadingCandidates: t.loadingCandidates.filter((e) => !a.includes(e))
2660
2691
  });
2661
- let s = e.results.find((e) => "error" in e);
2662
- s != null && "error" in s && this.setNotice(F(new I(502, s.error.code, s.error.message), this.i18n.t));
2692
+ let o = e.results.find((e) => "error" in e);
2693
+ o != null && "error" in o && this.setNotice(O(new I(502, o.error.code, o.error.message), this.i18n.t));
2663
2694
  } catch (e) {
2664
- if (a.aborted) return;
2695
+ if (s.aborted) return;
2665
2696
  let t = this.#e.value;
2666
2697
  this.#e.set({
2667
2698
  ...t,
2668
- candidateErrors: [...t.candidateErrors, ...i],
2669
- loadingCandidates: t.loadingCandidates.filter((e) => !i.includes(e))
2670
- }), this.setNotice(F(e, this.i18n.t));
2699
+ candidateErrors: [...t.candidateErrors, ...a],
2700
+ loadingCandidates: t.loadingCandidates.filter((e) => !a.includes(e))
2701
+ }), this.setNotice(O(e, this.i18n.t));
2702
+ } finally {
2703
+ for (let e of a) this.#a.get(e) == o.promise && this.#a.delete(e);
2704
+ o.resolve();
2671
2705
  }
2706
+ await Promise.all(i);
2672
2707
  }
2673
2708
  async select(e, t, n = !0) {
2674
2709
  let r = this.#t, i = this.#e.value.access;
@@ -2699,7 +2734,7 @@ var br = (...e) => JSON.stringify(e), xr = class {
2699
2734
  ...this.#e.value,
2700
2735
  savingProviderId: void 0,
2701
2736
  pendingSelection: void 0
2702
- }), this.setNotice(F(e, this.i18n.t)), await this.load(r);
2737
+ }), this.setNotice(O(e, this.i18n.t)), await this.load(r);
2703
2738
  }
2704
2739
  return !1;
2705
2740
  }
@@ -2711,12 +2746,19 @@ var br = (...e) => JSON.stringify(e), xr = class {
2711
2746
  savingProviderId: e
2712
2747
  });
2713
2748
  try {
2714
- let i = await this.client.setConnectorService(n, e, t, r.accessRevision);
2749
+ if (t) {
2750
+ if (await this.loadCandidates([e], !0), this.#r || n != this.#t) return !1;
2751
+ if (this.#e.value.candidateErrors.includes(e)) return this.#e.set({
2752
+ ...this.#e.value,
2753
+ savingProviderId: void 0
2754
+ }), !1;
2755
+ }
2756
+ let i = t && !r.bindings.some((t) => t.providerId == e) ? this.#e.value.candidates[e]?.candidates.find((e) => e.isDefault) : void 0, a = i == null ? await this.client.setConnectorService(n, e, t, r.accessRevision) : await this.client.addProviderAccessBinding(n, e, i.accessBindingId, r.accessRevision);
2715
2757
  if (this.#r || n != this.#t) return !1;
2716
- let a = this.#e.value.access;
2758
+ let o = this.#e.value.access;
2717
2759
  return this.#e.set({
2718
2760
  ...this.#e.value,
2719
- access: a != null && a.accessRevision > i.accessRevision ? a : i,
2761
+ access: o != null && o.accessRevision > a.accessRevision ? o : a,
2720
2762
  savingProviderId: void 0,
2721
2763
  ...!t && this.#e.value.configuration?.providerId == e ? { configuration: {} } : {}
2722
2764
  }), this.onSaved(n), t && this.configure(e), !0;
@@ -2725,35 +2767,13 @@ var br = (...e) => JSON.stringify(e), xr = class {
2725
2767
  ...this.#e.value,
2726
2768
  savingProviderId: void 0,
2727
2769
  pendingSelection: void 0
2728
- }), this.setNotice(F(e, this.i18n.t)), await this.load(n), !1);
2770
+ }), this.setNotice(O(e, this.i18n.t)), await this.load(n), !1);
2729
2771
  }
2730
2772
  }
2731
2773
  dispose() {
2732
- this.#r = !0, this.#i.abort(), this.#n += 1, this.#e.dispose();
2774
+ this.#r = !0, this.#i.abort(), this.#a.clear(), this.#n += 1, this.#e.dispose();
2733
2775
  }
2734
- };
2735
- //#endregion
2736
- //#region src/workbench/browser/runtime/connectionCatalog.ts
2737
- function kr(e, t) {
2738
- let n = e.authenticated && t != null ? $(t).preferred : void 0;
2739
- return {
2740
- ...e,
2741
- ...n == null ? {} : { defaultConnection: n }
2742
- };
2743
- }
2744
- function $(e) {
2745
- let t = [], n = /* @__PURE__ */ new Map(), r;
2746
- for (let i of e) n.set(i.connectionId, i), i.status == "active" && (t.push(i), i.isDefault && (r = i));
2747
- return {
2748
- active: t,
2749
- all: e,
2750
- byId: n,
2751
- preferred: r ?? (t.length == 1 ? t[0] : void 0)
2752
- };
2753
- }
2754
- //#endregion
2755
- //#region src/workbench/browser/runtime/stores/connectorStore.ts
2756
- var Ar = {};
2776
+ }, Ar = {};
2757
2777
  function jr(e) {
2758
2778
  return Object.entries(e).map(([e, t]) => ({
2759
2779
  description: t.description,
@@ -2769,7 +2789,7 @@ function Mr(e, t) {
2769
2789
  service: e.serviceName
2770
2790
  }) : e.description,
2771
2791
  group: t("addNode.connectorActions"),
2772
- icon: k(e),
2792
+ icon: j(e),
2773
2793
  id: `connector:${e.actionId}`,
2774
2794
  inputs: jr(e.inputs),
2775
2795
  kind: "connector",
@@ -2796,7 +2816,7 @@ function Nr(e, t) {
2796
2816
  choices: r,
2797
2817
  description: t(r.length == 1 ? "addNode.connectorActionCountOne" : "addNode.connectorActionCount", { count: r.length }),
2798
2818
  group: t("addNode.connectorActions"),
2799
- icon: k(n),
2819
+ icon: j(n),
2800
2820
  id: `connector-provider:${n.serviceId}`,
2801
2821
  inputs: [],
2802
2822
  kind: "connector-group",
@@ -2811,7 +2831,7 @@ function Pr(e, t) {
2811
2831
  choices: [],
2812
2832
  description: t("addNode.connectorBrowseActions"),
2813
2833
  group: t("addNode.connectorActions"),
2814
- icon: k(e),
2834
+ icon: j(e),
2815
2835
  id: `connector-provider:${e.serviceId}`,
2816
2836
  inputs: [],
2817
2837
  kind: "connector-group",
@@ -2836,7 +2856,7 @@ function Fr(e, t) {
2836
2856
  function Ir(e, t, n) {
2837
2857
  if (e == null) return [];
2838
2858
  let r = [];
2839
- for (let i of [...Ge(e.revision.content).tasks].toSorted()) {
2859
+ for (let i of [...qe(e.revision.content).tasks].toSorted()) {
2840
2860
  let a = e.task(i);
2841
2861
  if (a?.executor.kind != "connector") continue;
2842
2862
  let o = t[a.executor.action];
@@ -2872,12 +2892,12 @@ var Lr = class {
2872
2892
  #h;
2873
2893
  #g;
2874
2894
  constructor(r, i, a, o, s = h(), c = i.catalogs) {
2875
- this.data = c, this.#i = /* @__PURE__ */ new Set(), this.#a = new E(), this.#o = new E(), this.#d = n(Ar), this.#f = n([]), this.#p = n([]), this.#g = !1, this.loadConnections = async (e) => {
2895
+ this.data = c, this.#i = /* @__PURE__ */ new Set(), this.#a = new D(), this.#o = new D(), this.#d = n(Ar), this.#f = n([]), this.#p = n([]), this.#g = !1, this.loadConnections = async (e) => {
2876
2896
  let t = this.#m.$.flowId.value;
2877
- this.#g || t == null || await O(this.data.connections.get(void 0), e);
2897
+ this.#g || t == null || await A(this.data.connections.get(void 0), e);
2878
2898
  }, this.browseAddNodeOptions = (e) => {
2879
2899
  let t = this.data.providers.get(void 0, this.#n);
2880
- return A(e, (e) => {
2900
+ return M(e, (e) => {
2881
2901
  let n = e(t), r = e(this.#t.t$);
2882
2902
  return {
2883
2903
  ...n,
@@ -2886,11 +2906,11 @@ var Lr = class {
2886
2906
  });
2887
2907
  }, this.provideAddNodeOptionChoices = (e, t) => {
2888
2908
  let n = e.slice(19), r = this.data.actions.get(n, void 0, this.#n), i = this.data.providers.get(void 0, this.#n);
2889
- return A(t, (e) => {
2909
+ return M(t, (e) => {
2890
2910
  let t = e(r), a = e(i).data?.find((e) => e.serviceId == n), o = e(this.#t.t$);
2891
2911
  return {
2892
2912
  ...t,
2893
- data: t.data?.map((e) => Mr(kr({
2913
+ data: t.data?.map((e) => Mr(yn({
2894
2914
  ...e,
2895
2915
  ...a == null ? {} : {
2896
2916
  serviceName: a.serviceName,
@@ -2901,17 +2921,17 @@ var Lr = class {
2901
2921
  });
2902
2922
  }, this.provideAddNodeOptions = (e, t, n = t) => {
2903
2923
  let r = e.trim();
2904
- if (r.length == 0) return A(t, (e) => ({
2924
+ if (r.length == 0) return M(t, (e) => ({
2905
2925
  data: Nr(Object.values(e(this.$.actions)), e(this.#t.t$)),
2906
2926
  refreshing: !1,
2907
2927
  error: void 0
2908
2928
  }));
2909
2929
  let i = this.data.actions.search(r, void 0, this.#n, n).get();
2910
- return A(t, (e) => {
2930
+ return M(t, (e) => {
2911
2931
  let t = e(i), n = e(this.#t.t$);
2912
2932
  return {
2913
2933
  ...t,
2914
- data: t.data?.map((e) => Mr(kr(e, void 0), n))
2934
+ data: t.data?.map((e) => Mr(yn(e, void 0), n))
2915
2935
  };
2916
2936
  });
2917
2937
  }, this.retryCatalog = () => {
@@ -2921,7 +2941,7 @@ var Lr = class {
2921
2941
  let t = e(i.$.flowId);
2922
2942
  return Object.fromEntries(e(this.#f).flatMap((n) => {
2923
2943
  let r = e(R(this.data.actions.detail(n, t, this.#n)));
2924
- return r == null ? [] : [[n, kr(r, e(R(this.data.connections.get(r.serviceId, t))))]];
2944
+ return r == null ? [] : [[n, yn(r, e(R(this.data.connections.get(r.serviceId, t))))]];
2925
2945
  }));
2926
2946
  }), u = t((e) => {
2927
2947
  let t = e(i.$.flowId);
@@ -2938,12 +2958,12 @@ var Lr = class {
2938
2958
  action: r,
2939
2959
  actionError: o == null ? void 0 : {
2940
2960
  ...o instanceof I ? { code: o.code } : {},
2941
- message: F(o, this.#t.t).message
2961
+ message: O(o, this.#t.t).message
2942
2962
  },
2943
2963
  activeConnections: a?.active,
2944
2964
  authorizationPending: r != null && n.authorizationServiceId == r.serviceId,
2945
2965
  connection: c,
2946
- connectionError: s == null ? void 0 : F(s, this.#t.t).message
2966
+ connectionError: s == null ? void 0 : O(s, this.#t.t).message
2947
2967
  };
2948
2968
  }), this.$ = {
2949
2969
  pickerConnections: t((e) => e(i.$.flowId) == null ? [] : e(R(this.data.connections.get(void 0))) ?? []),
@@ -2979,9 +2999,9 @@ var Lr = class {
2979
2999
  let t = this.#m.$.flowId.value;
2980
3000
  if (t == null || this.#g) throw Error("Connector Action cannot be resolved without an active Flow.");
2981
3001
  await Promise.resolve();
2982
- let n = await O(this.data.actions.detail(e, t, this.#n), void 0, !0), r = n.authenticated ? await O(this.data.connections.get(n.serviceId, t), void 0, !0) : [];
3002
+ let n = await A(this.data.actions.detail(e, t, this.#n), void 0, !0), r = n.authenticated ? await A(this.data.connections.get(n.serviceId, t), void 0, !0) : [];
2983
3003
  return this.#b(this.#f, [e]), n.authenticated && this.#b(this.#p, [n.serviceId]), {
2984
- action: kr(n, r),
3004
+ action: yn(n, r),
2985
3005
  connections: $(r).active
2986
3006
  };
2987
3007
  }
@@ -3004,13 +3024,13 @@ var Lr = class {
3004
3024
  });
3005
3025
  try {
3006
3026
  await Promise.resolve();
3007
- let a = await O(i, void 0, e);
3027
+ let a = await A(i, void 0, e);
3008
3028
  if (!this.#S(t, n)) return;
3009
3029
  this.#b(this.#f, [a.actionId]), a.authenticated && await this.#_(n, r, a.serviceId, e, t);
3010
3030
  } catch (e) {
3011
3031
  this.#S(t, n) && this.#x({ actionError: {
3012
3032
  actionId: r.actionId,
3013
- message: F(e, this.#t.t).message
3033
+ message: O(e, this.#t.t).message
3014
3034
  } });
3015
3035
  } finally {
3016
3036
  this.#S(t, n) && this.#d.value.actionLoading == r.actionId && this.#x({ actionLoading: void 0 });
@@ -3018,11 +3038,11 @@ var Lr = class {
3018
3038
  }
3019
3039
  async loadCodeConnections(e, t) {
3020
3040
  let n = this.#m.$.flowId.value;
3021
- n == null || this.#g || (await O(this.data.connections.get(e, n), t), !(t.aborted || this.#g || n != this.#m.$.flowId.value) && this.#b(this.#p, [e]));
3041
+ n == null || this.#g || (await A(this.data.connections.get(e, n), t), !(t.aborted || this.#g || n != this.#m.$.flowId.value) && this.#b(this.#p, [e]));
3022
3042
  }
3023
3043
  async loadCodeAction(e, t) {
3024
3044
  let n = this.#n, r = this.#m.$.flowId.value;
3025
- r == null || this.#g || (await O(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]));
3045
+ r == null || this.#g || (await A(this.data.actions.detail(e, r, n), t), !(t.aborted || this.#g || n != this.#n || r != this.#m.$.flowId.value) && this.#b(this.#f, [e]));
3026
3046
  }
3027
3047
  async connect(e) {
3028
3048
  if (this.#g) return;
@@ -3043,7 +3063,7 @@ var Lr = class {
3043
3063
  serviceId: e
3044
3064
  }, this.#x({ authorizationServiceId: e });
3045
3065
  } catch (e) {
3046
- this.#g || this.#u(F(e, this.#t.t));
3066
+ this.#g || this.#u(O(e, this.#t.t));
3047
3067
  }
3048
3068
  }
3049
3069
  async setConnection(e, t) {
@@ -3069,10 +3089,10 @@ var Lr = class {
3069
3089
  let i;
3070
3090
  try {
3071
3091
  let r = this.data.connections.get(t, e, n);
3072
- await Promise.resolve(), i = await O(r, void 0, n);
3092
+ await Promise.resolve(), i = await A(r, void 0, n);
3073
3093
  } catch (n) {
3074
3094
  this.#S(r, e) && this.#x({ connectionError: {
3075
- message: F(n, this.#t.t).message,
3095
+ message: O(n, this.#t.t).message,
3076
3096
  serviceId: t
3077
3097
  } });
3078
3098
  return;
@@ -3106,7 +3126,7 @@ var Lr = class {
3106
3126
  if (r.length > 0) {
3107
3127
  for (let e of r) this.#i.add(e);
3108
3128
  try {
3109
- let n = await Promise.all(r.map((e) => O(this.data.actions.detail(e, t, this.#n))));
3129
+ let n = await Promise.all(r.map((e) => A(this.data.actions.detail(e, t, this.#n))));
3110
3130
  if (!this.#S(e, t)) return;
3111
3131
  this.#b(this.#f, n.map((e) => e.actionId));
3112
3132
  } catch {
@@ -3117,7 +3137,7 @@ var Lr = class {
3117
3137
  }
3118
3138
  if (!this.#S(e, t)) return;
3119
3139
  let i = /* @__PURE__ */ new Set();
3120
- for (let e of Ge(n.revision.content).tasks) {
3140
+ for (let e of qe(n.revision.content).tasks) {
3121
3141
  let t = n.task(e);
3122
3142
  if (t?.executor.kind != "connector") continue;
3123
3143
  let r = this.$.actions.value[t.executor.action];
@@ -3147,11 +3167,11 @@ var zr = class {
3147
3167
  let t = this.#t.get(e);
3148
3168
  if (t == null) {
3149
3169
  let n = (t) => {
3150
- let n = Se(t);
3170
+ let n = k(t);
3151
3171
  if (n.locale != e) throw Error("Unexpected Trigger catalog language.");
3152
3172
  return n;
3153
3173
  }, r = this.host.triggerCatalogCache;
3154
- t = new Oe((t, r) => this.client.readCatalog({
3174
+ t = new Me((t, r) => this.client.readCatalog({
3155
3175
  path: `/v1/trigger-keys/catalog?locale=${encodeURIComponent(e)}`,
3156
3176
  decode: n
3157
3177
  }, t, r), 3e5, r == null ? void 0 : {
@@ -3192,7 +3212,7 @@ function Ur(e, t, n) {
3192
3212
  return {
3193
3213
  description: n?.description ?? e.description,
3194
3214
  group: t.t("addNode.integrationTriggers"),
3195
- icon: k({
3215
+ icon: j({
3196
3216
  serviceId: e.provider,
3197
3217
  serviceName: e.provider
3198
3218
  }),
@@ -3225,7 +3245,7 @@ var Wr = class {
3225
3245
  #c;
3226
3246
  #l;
3227
3247
  constructor(r, i, a, o, s = h()) {
3228
- this.#r = new E(), this.#i = /* @__PURE__ */ new Set(), this.#s = n(Br), this.#l = !1, this.browseAddNodeOptions = (e) => this.#u("", e), this.provideAddNodeOptions = (e, t) => this.#u(e, t), this.catalog = new zr(r, xt([s.lang]), o), this.#e = r, this.#t = o, this.#n = s, this.#o = a, this.#c = i, this.#a = t((e) => {
3248
+ this.#r = new D(), this.#i = /* @__PURE__ */ new Set(), this.#s = n(Br), this.#l = !1, this.browseAddNodeOptions = (e) => this.#u("", e), this.provideAddNodeOptions = (e, t) => this.#u(e, t), this.catalog = new zr(r, xt([s.lang]), o), this.#e = r, this.#t = o, this.#n = s, this.#o = a, this.#c = i, this.#a = t((e) => {
3229
3249
  let t = e(i.$.selection), n = Hr(t, i), r = e(this.#s);
3230
3250
  if (t?.kind != "trigger") return { authorizationPending: !1 };
3231
3251
  let a = t.trigger;
@@ -3235,7 +3255,7 @@ var Wr = class {
3235
3255
  activeConnections: s?.active,
3236
3256
  authorizationPending: r.authorizationProvider == n?.provider,
3237
3257
  connection: n?.connectionId == null ? void 0 : s?.byId.get(n.connectionId),
3238
- connectionError: c == null ? void 0 : F(c, this.#n.t).message,
3258
+ connectionError: c == null ? void 0 : O(c, this.#n.t).message,
3239
3259
  definition: a.definition
3240
3260
  };
3241
3261
  }), this.$ = {
@@ -3257,7 +3277,7 @@ var Wr = class {
3257
3277
  }
3258
3278
  #u(e, t) {
3259
3279
  let n = this.catalog.get(), r = e.trim().toLowerCase();
3260
- return A(t, (e) => {
3280
+ return M(t, (e) => {
3261
3281
  let t = e(n);
3262
3282
  e(this.#n.t$);
3263
3283
  let i = e(this.#c.$.flowId) != null && e(this.#c.$.target)?.kind == "flow", a = t.data, o = a?.definitions.filter((e) => !r || [
@@ -3289,11 +3309,11 @@ var Wr = class {
3289
3309
  });
3290
3310
  try {
3291
3311
  let i = this.#c.catalogs.connections.get(r.provider, n, e || this.#i.has(r.provider));
3292
- if (await Promise.resolve(), await O(i, void 0, e || this.#i.has(r.provider)), !this.#f(t, n)) return;
3312
+ if (await Promise.resolve(), await A(i, void 0, e || this.#i.has(r.provider)), !this.#f(t, n)) return;
3293
3313
  this.#i.delete(r.provider);
3294
3314
  } catch (e) {
3295
3315
  this.#f(t, n) && this.#d({ connectionError: {
3296
- message: F(e, this.#n.t).message,
3316
+ message: O(e, this.#n.t).message,
3297
3317
  provider: r.provider
3298
3318
  } });
3299
3319
  } finally {
@@ -3312,7 +3332,7 @@ var Wr = class {
3312
3332
  }
3313
3333
  !this.#l && t == this.#c.$.flowId.value && this.#d({ authorizationProvider: e });
3314
3334
  } catch (e) {
3315
- this.#l || this.#o(F(e, this.#n.t));
3335
+ this.#l || this.#o(O(e, this.#n.t));
3316
3336
  }
3317
3337
  }
3318
3338
  async setConnection(e, t) {
@@ -3739,7 +3759,7 @@ function qr(e, t, n, r) {
3739
3759
  });
3740
3760
  }
3741
3761
  return {
3742
- changes: Fe(e, t, c),
3762
+ changes: ze(e, t, c),
3743
3763
  nodeIds: [...s.values()],
3744
3764
  sourceIds: o
3745
3765
  };
@@ -3865,7 +3885,7 @@ var Xr = class {
3865
3885
  let o = {
3866
3886
  ...e,
3867
3887
  active: !0,
3868
- changeId: j(),
3888
+ changeId: F(),
3869
3889
  changes: n,
3870
3890
  started: !1
3871
3891
  };
@@ -3892,7 +3912,7 @@ var Xr = class {
3892
3912
  } catch (n) {
3893
3913
  if (n instanceof I && n.code == "flow.revision-conflict") {
3894
3914
  if (!t && await this.#t.recover(e)) {
3895
- t = !0, e.changeId = j();
3915
+ t = !0, e.changeId = F();
3896
3916
  continue;
3897
3917
  }
3898
3918
  t && await this.#t.recover(e), this.#u(e);
@@ -3900,11 +3920,11 @@ var Xr = class {
3900
3920
  if (!(n instanceof I) && !t) {
3901
3921
  let n = this.#a?.revisionId;
3902
3922
  if (await this.#t.recover(e)) {
3903
- t = !0, e.active && this.#a?.revisionId != n && (e.changeId = j());
3923
+ t = !0, e.active && this.#a?.revisionId != n && (e.changeId = F());
3904
3924
  continue;
3905
3925
  }
3906
3926
  }
3907
- this.#u(e), this.#t.current(e) && this.#r(F(n, this.#n.t));
3927
+ this.#u(e), this.#t.current(e) && this.#r(O(n, this.#n.t));
3908
3928
  }
3909
3929
  return;
3910
3930
  }
@@ -3931,7 +3951,7 @@ var Xr = class {
3931
3951
  }, $r = class {
3932
3952
  #e;
3933
3953
  #t;
3934
- #n = new E();
3954
+ #n = new D();
3935
3955
  #r;
3936
3956
  #i = n(Qr);
3937
3957
  #a = new AbortController();
@@ -3997,7 +4017,7 @@ var Xr = class {
3997
4017
  failed: !t,
3998
4018
  loading: !1,
3999
4019
  refreshing: !1
4000
- }), this.#r(F(n, this.#t.t));
4020
+ }), this.#r(O(n, this.#t.t));
4001
4021
  }
4002
4022
  }
4003
4023
  async loadMore() {
@@ -4025,7 +4045,7 @@ var Xr = class {
4025
4045
  this.#c({
4026
4046
  loadingMore: !1,
4027
4047
  loadMoreFailed: !0
4028
- }), this.#r(F(e, this.#t.t));
4048
+ }), this.#r(O(e, this.#t.t));
4029
4049
  }
4030
4050
  }
4031
4051
  async setEnabled(e, t) {
@@ -4035,7 +4055,7 @@ var Xr = class {
4035
4055
  let n = await this.#e.setFlowEnabled(e.flowId, e.live.publicationId, t);
4036
4056
  this.#s || this.include(n);
4037
4057
  } catch (e) {
4038
- this.#s || (this.#r(F(e, this.#t.t)), await this.reload());
4058
+ this.#s || (this.#r(O(e, this.#t.t)), await this.reload());
4039
4059
  } finally {
4040
4060
  this.#o.delete(e.flowId);
4041
4061
  }
@@ -4061,7 +4081,7 @@ var Xr = class {
4061
4081
  message: this.#t.t("notice.published", { name: e.name })
4062
4082
  }), this.include(await this.#e.getFlow(e.flowId));
4063
4083
  } catch (e) {
4064
- this.#s || this.#r(F(e, this.#t.t));
4084
+ this.#s || this.#r(O(e, this.#t.t));
4065
4085
  } finally {
4066
4086
  this.#o.delete(e.flowId);
4067
4087
  }
@@ -4198,7 +4218,7 @@ var Xr = class {
4198
4218
  r != null && (r.editor = {
4199
4219
  ...r.editor,
4200
4220
  phase: "failed"
4201
- }), this.#a(F(t, this.#o.t));
4221
+ }), this.#a(O(t, this.#o.t));
4202
4222
  }
4203
4223
  this.#c();
4204
4224
  }
@@ -4270,9 +4290,9 @@ var Xr = class {
4270
4290
  message: this.#t.t("notice.layoutConflict")
4271
4291
  });
4272
4292
  } catch (e) {
4273
- !this.#o && n() && this.#c(a, t), !this.#o && n() && this.#n(F(e, this.#t.t));
4293
+ !this.#o && n() && this.#c(a, t), !this.#o && n() && this.#n(O(e, this.#t.t));
4274
4294
  }
4275
- else this.#c(a, t), this.#n(F(r, this.#t.t));
4295
+ else this.#c(a, t), this.#n(O(r, this.#t.t));
4276
4296
  }
4277
4297
  }), await this.#i, o;
4278
4298
  }
@@ -4330,12 +4350,12 @@ var oi = class {
4330
4350
  this.$ = {
4331
4351
  addNodeOptions: t((e) => {
4332
4352
  let { revision: t, target: r } = e(this.#e);
4333
- return oe(t?.revision, r, e(n.t$));
4353
+ return le(t?.revision, r, e(n.t$));
4334
4354
  }),
4335
4355
  busy: i,
4336
4356
  checkLoading: a,
4337
4357
  diagnosticFocus: o,
4338
- diagnosticItems: e(this.#t, (e) => ue(e.draft == null ? void 0 : P(e.draft), e.target, e.diagnostics)),
4358
+ diagnosticItems: e(this.#t, (e) => pe(e.draft == null ? void 0 : P(e.draft), e.target, e.diagnostics)),
4339
4359
  diagnostics: s,
4340
4360
  draft: c,
4341
4361
  flow: t((e) => {
@@ -4351,7 +4371,7 @@ var oi = class {
4351
4371
  flowRefreshing: r.$.refreshing,
4352
4372
  flowTotal: r.$.total,
4353
4373
  flows: r.$.flows,
4354
- inspectorDiagnostics: e(this.#t, (e) => se(e.draft == null ? void 0 : P(e.draft), e.target, e.diagnostics, x.value)),
4374
+ inspectorDiagnostics: e(this.#t, (e) => de(e.draft == null ? void 0 : P(e.draft), e.target, e.diagnostics, x.value)),
4355
4375
  live: p,
4356
4376
  moduleEditor: l,
4357
4377
  nodeFocus: u,
@@ -4395,7 +4415,8 @@ var oi = class {
4395
4415
  option: "history.deleted.option",
4396
4416
  case: "history.deleted.case",
4397
4417
  condition: "history.deleted.condition",
4398
- conditionGroup: "history.deleted.conditionGroup"
4418
+ conditionGroup: "history.deleted.conditionGroup",
4419
+ webhookBody: "history.deleted.webhookBody"
4399
4420
  };
4400
4421
  function li(e, t) {
4401
4422
  if (t != null) return t.kind == "flow" || e.subflow(t.id) != null ? t : { kind: "flow" };
@@ -4425,8 +4446,8 @@ var ui = class {
4425
4446
  #x;
4426
4447
  #S;
4427
4448
  #C;
4428
- constructor(e, t, n = nn, r = h(), i = () => {}, a = new Er(e), o = () => {}, s = () => {}) {
4429
- this.catalogs = a, this.flowCreated = o, this.accessChanged = s, this.#n = new E(), this.#d = new Jr(), this.history$ = this.#d.state$, this.#m = 0, this.#h = 0, this.#g = !1, this.#_ = !1, this.#v = !1, this.#y = !1, this.#b = 0, this.#e = e, this.#c = t, this.#i = n, this.#r = r, this.#s = i, this.#o = new $r(e, t, r), this.#l = new oi(r, this.#o), this.#u = new ei(this.#l, this.#n, (e) => this.#O(e, !1), t, r), this.#t = new Xr(e, t, r, {
4449
+ constructor(e, t, n = nn, r = h(), i = () => {}, a = new Dr(e), o = () => {}, s = () => {}) {
4450
+ this.catalogs = a, this.flowCreated = o, this.accessChanged = s, this.#n = new D(), this.#d = new Jr(), this.history$ = this.#d.state$, this.#m = 0, this.#h = 0, this.#g = !1, this.#_ = !1, this.#v = !1, this.#y = !1, this.#b = 0, this.#e = e, this.#c = t, this.#i = n, this.#r = r, this.#s = i, this.#o = new $r(e, t, r), this.#l = new oi(r, this.#o), this.#u = new ei(this.#l, this.#n, (e) => this.#O(e, !1), t, r), this.#t = new Xr(e, t, r, {
4430
4451
  apply: (e) => this.#A(e, "local"),
4431
4452
  beforeChange: (e) => {
4432
4453
  e && this.#V({ busy: "designer" });
@@ -4508,12 +4529,12 @@ var ui = class {
4508
4529
  } catch (e) {
4509
4530
  if (!t()) return !1;
4510
4531
  this.#C?.(), this.#C = void 0;
4511
- let n = e instanceof I && e.code == Ae.flowUpgradeRequired ? "upgrade" : e instanceof I && (e.code == Ae.flowRepairRequired || e.code == Ae.flowInvalid) ? "repair" : "failed";
4532
+ let n = e instanceof I && e.code == Fe.flowUpgradeRequired ? "upgrade" : e instanceof I && (e.code == Fe.flowRepairRequired || e.code == Fe.flowInvalid) ? "repair" : "failed";
4512
4533
  return this.#V({
4513
4534
  workspaceLoadFailed: !0,
4514
4535
  workspaceLoadProblem: {
4515
4536
  kind: n,
4516
- ...n == "failed" ? { message: F(e, this.#r.t).message } : {}
4537
+ ...n == "failed" ? { message: O(e, this.#r.t).message } : {}
4517
4538
  },
4518
4539
  workspaceLoading: !1
4519
4540
  }), !1;
@@ -4535,14 +4556,14 @@ var ui = class {
4535
4556
  await this.#e.repairDraft(e, n.expectedRevisionId, n.changeId), this.#x = void 0, await this.selectFlow(e);
4536
4557
  } catch (t) {
4537
4558
  if (this.#_) return;
4538
- if (t instanceof I && t.code == Ae.flowRevisionConflict) {
4559
+ if (t instanceof I && t.code == Fe.flowRevisionConflict) {
4539
4560
  this.#x = void 0, await this.selectFlow(e);
4540
4561
  return;
4541
4562
  }
4542
4563
  this.#V({
4543
4564
  workspaceLoadProblem: {
4544
4565
  kind: this.#l.value.workspaceLoadProblem?.kind == "upgrade" ? "upgrade" : "repair",
4545
- message: F(t, this.#r.t).message
4566
+ message: O(t, this.#r.t).message
4546
4567
  },
4547
4568
  workspaceRepairing: !1
4548
4569
  });
@@ -4553,7 +4574,7 @@ var ui = class {
4553
4574
  let n = await this.#e.getLive(e);
4554
4575
  t() && this.#l.value.flowId == e && this.#V({ live: n });
4555
4576
  } catch (n) {
4556
- t() && this.#l.value.flowId == e && this.#c(F(n, this.#r.t));
4577
+ t() && this.#l.value.flowId == e && this.#c(O(n, this.#r.t));
4557
4578
  }
4558
4579
  }
4559
4580
  selectTarget(e) {
@@ -4582,7 +4603,7 @@ var ui = class {
4582
4603
  let n = await this.#e.getFlow(await t(e));
4583
4604
  return this.#o.insert(n), n;
4584
4605
  } catch (e) {
4585
- this.#_ || this.#c(F(e, this.#r.t));
4606
+ this.#_ || this.#c(O(e, this.#r.t));
4586
4607
  } finally {
4587
4608
  this.#V({ busy: void 0 });
4588
4609
  }
@@ -4599,7 +4620,7 @@ var ui = class {
4599
4620
  message: this.#r.t("notice.flowDeleteAccepted", { name: t.name })
4600
4621
  }), !0);
4601
4622
  } catch (e) {
4602
- return this.#_ || this.#c(F(e, this.#r.t)), !1;
4623
+ return this.#_ || this.#c(O(e, this.#r.t)), !1;
4603
4624
  } finally {
4604
4625
  this.#V({ busy: void 0 });
4605
4626
  }
@@ -4608,7 +4629,7 @@ var ui = class {
4608
4629
  if (!await this.saveModuleEditor() || this.#l.value.draft == null) return !1;
4609
4630
  let t = this.#i();
4610
4631
  this.#V({ busy: "resource" });
4611
- let n = await this.#O(De(t, e), !1);
4632
+ let n = await this.#O(Ae(t, e), !1);
4612
4633
  return this.#V({ busy: void 0 }), n != null && (this.selectTarget({
4613
4634
  id: t,
4614
4635
  kind: "subflow"
@@ -4626,7 +4647,7 @@ var ui = class {
4626
4647
  try {
4627
4648
  i = await this.#e.renameFlow(e, r), i != null && this.#o.include(i);
4628
4649
  } catch (e) {
4629
- this.#_ || this.#c(F(e, this.#r.t));
4650
+ this.#_ || this.#c(O(e, this.#r.t));
4630
4651
  }
4631
4652
  return this.#V({ busy: void 0 }), i != null && (this.#c({
4632
4653
  kind: "success",
@@ -4639,21 +4660,21 @@ var ui = class {
4639
4660
  if (r == null || i == null) return;
4640
4661
  let a = this.#i();
4641
4662
  if (e.kind == "comment") return await this.#T(i, a, t);
4642
- let o = P(r), s = Xe(e, o, i, this.#r.t);
4663
+ let o = P(r), s = Ze(e, o, i, this.#r.t);
4643
4664
  if (s == null) return;
4644
4665
  if (s.kind == "provider-trigger" && s.connectionId == null && s.definition.key != "feishu_app_bot.on_event") {
4645
4666
  try {
4646
- let e = await O(this.catalogs.connections.get(s.definition.provider, r.flowId));
4667
+ let e = await A(this.catalogs.connections.get(s.definition.provider, r.flowId));
4647
4668
  s = {
4648
4669
  ...s,
4649
4670
  connectionId: $(e).preferred?.connectionId
4650
4671
  };
4651
4672
  } catch (e) {
4652
- !this.#_ && this.#l.value.draft == r && this.#c(F(e, this.#r.t));
4673
+ !this.#_ && this.#l.value.draft == r && this.#c(O(e, this.#r.t));
4653
4674
  }
4654
4675
  if (this.#_ || this.#l.value.draft != r || this.#l.value.target != i) return;
4655
4676
  }
4656
- let c = n?.(a), l = Ue(o, i, a, s, this.#i);
4677
+ let c = n?.(a), l = Ge(o, i, a, s, this.#i);
4657
4678
  if (l == null) return;
4658
4679
  let u = c == null ? l : [...l, ...Zt(z(r, l).content, i, {
4659
4680
  source: c.source,
@@ -4689,7 +4710,7 @@ var ui = class {
4689
4710
  if (!await this.saveModuleEditor()) return;
4690
4711
  let e = this.$.revision.value, t = this.#l.value.target;
4691
4712
  if (e == null || t == null || this.#l.value.selectedNodeIds.length == 0) return;
4692
- let n = [...this.#l.value.selectedNodeIds], r = mn(this.#l.value.presentation?.value ?? {}, t), i = new Set(this.#l.value.selectedNodeIds.filter((e) => r.has(e))), a = _e(e, t, this.#l.value.selectedNodeIds);
4713
+ let n = [...this.#l.value.selectedNodeIds], r = mn(this.#l.value.presentation?.value ?? {}, t), i = new Set(this.#l.value.selectedNodeIds.filter((e) => r.has(e))), a = xe(e, t, this.#l.value.selectedNodeIds);
4693
4714
  await this.#N("delete", this.#l.value.selectedNodeIds.length, a, (e) => {
4694
4715
  let r = i.size == 0 ? e : pn(e, t, i);
4695
4716
  for (let e of n) r = dn(r, t, e, !1);
@@ -4752,36 +4773,36 @@ var ui = class {
4752
4773
  async saveNodeSettings(e, t) {
4753
4774
  let n = this.$.revision.value, r = this.#l.value.target;
4754
4775
  if (n == null || r == null) return !1;
4755
- let i = Re(n, r, e, t);
4776
+ let i = Ve(n, r, e, t);
4756
4777
  return i != null && await this.#E(i) != null;
4757
4778
  }
4758
4779
  async saveNodeDescription(e, t) {
4759
4780
  let n = this.$.revision.value, r = this.#l.value.target;
4760
4781
  if (n == null || r == null) return !1;
4761
- let i = Ke(n, r, e, t);
4782
+ let i = Je(n, r, e, t);
4762
4783
  return i != null && await this.#E(i) != null;
4763
4784
  }
4764
4785
  async saveNodeIcon(e, t) {
4765
4786
  let n = this.$.revision.value, r = this.#l.value.target;
4766
4787
  if (n == null || r == null) return !1;
4767
- let i = xe(n, r, e, t);
4788
+ let i = Te(n, r, e, t);
4768
4789
  return i != null && await this.#E(i) != null;
4769
4790
  }
4770
4791
  async saveNodeTitle(e, t) {
4771
4792
  let n = this.$.revision.value, r = this.#l.value.target;
4772
4793
  if (n == null || r == null) return !1;
4773
- let i = we(n, r, e, t);
4794
+ let i = De(n, r, e, t);
4774
4795
  return i != null && await this.#E(i) != null;
4775
4796
  }
4776
4797
  async setInputValue(e, t, n, r) {
4777
4798
  let i = this.$.revision.value, a = this.#l.value.target;
4778
4799
  if (i == null || a == null) return !1;
4779
- let o = Ve(i, a, e, t, n);
4800
+ let o = We(i, a, e, t, n);
4780
4801
  return o != null && await this.#E(o, r) != null;
4781
4802
  }
4782
4803
  async resetInputs(e, t) {
4783
4804
  let n = this.$.revision.value, r = this.#l.value.target;
4784
- return n == null || r == null ? !1 : await this.#E(pe(n.revision.content, r, e, t)) != null;
4805
+ return n == null || r == null ? !1 : await this.#E(ge(n.revision.content, r, e, t)) != null;
4785
4806
  }
4786
4807
  async resetTriggerConfig(e, t) {
4787
4808
  let n = this.$.revision.value, r = this.#l.value.target;
@@ -4799,7 +4820,7 @@ var ui = class {
4799
4820
  }
4800
4821
  async setInputSource(e, t, n) {
4801
4822
  let r = this.$.revision.value, i = this.#l.value.target;
4802
- return r == null || i == null ? !1 : await this.#E(me(r.revision.content, i, e, t, [{
4823
+ return r == null || i == null ? !1 : await this.#E(ve(r.revision.content, i, e, t, [{
4803
4824
  kind: "node",
4804
4825
  ...n
4805
4826
  }])) != null;
@@ -4807,25 +4828,25 @@ var ui = class {
4807
4828
  async setInputVariable(e, t, n) {
4808
4829
  let r = this.$.revision.value, i = this.#l.value.target;
4809
4830
  if (r == null || i == null) return !1;
4810
- let a = n == null ? Ve(r, i, e, t, void 0) : be(r, i, e, t, n, this.#i());
4831
+ let a = n == null ? We(r, i, e, t, void 0) : we(r, i, e, t, n, this.#i());
4811
4832
  return a != null && await this.#E(a) != null;
4812
4833
  }
4813
4834
  async saveCondition(e, t, n) {
4814
4835
  let r = this.$.revision.value, i = this.#l.value.target;
4815
4836
  if (r == null || i == null) return !1;
4816
- let a = ke(r, i, e, t);
4837
+ let a = Pe(r, i, e, t);
4817
4838
  return a != null && await this.#E(a, n) != null;
4818
4839
  }
4819
4840
  async saveValue(e, t, n) {
4820
4841
  let r = this.$.revision.value, i = this.#l.value.target;
4821
4842
  if (r == null || i == null) return !1;
4822
- let a = Ze(r, i, e, t);
4843
+ let a = Qe(r, i, e, t);
4823
4844
  return a != null && await this.#E(a, n) != null;
4824
4845
  }
4825
4846
  async saveResolution(e, t, n, r) {
4826
4847
  let i = this.$.revision.value, a = this.#l.value.target;
4827
4848
  if (i == null || a?.kind != "flow") return !1;
4828
- let o = Me(i, a, e, t, r);
4849
+ let o = Ie(i, a, e, t, r);
4829
4850
  return o != null && await this.#E(o, n) != null;
4830
4851
  }
4831
4852
  async saveNodeContentHidden(e, t) {
@@ -4844,25 +4865,25 @@ var ui = class {
4844
4865
  async saveTaskSettings(e, t) {
4845
4866
  let n = this.$.revision.value, r = this.#l.value.target;
4846
4867
  if (n == null || r == null) return !1;
4847
- let i = Te(n, r, e, t);
4868
+ let i = Oe(n, r, e, t);
4848
4869
  return i != null && await this.#E(i) != null;
4849
4870
  }
4850
4871
  async saveTaskPorts(e, t, n, r) {
4851
4872
  let i = this.$.revision.value, a = this.#l.value.target;
4852
4873
  if (i == null || a == null) return !1;
4853
- let o = Je(i, a, e, t, r);
4874
+ let o = Ye(i, a, e, t, r);
4854
4875
  return o != null && await this.#E(o, n) != null;
4855
4876
  }
4856
4877
  async saveTaskAdditionalInputs(e, t, n, r) {
4857
4878
  let i = this.$.revision.value, a = this.#l.value.target;
4858
4879
  if (i == null || a == null) return !1;
4859
- let o = ge(i, a, e, t, r);
4880
+ let o = be(i, a, e, t, r);
4860
4881
  return o != null && await this.#E(o, n) != null;
4861
4882
  }
4862
4883
  async setConnectorConnection(e, t) {
4863
4884
  let n = this.$.revision.value;
4864
4885
  if (n == null) return !1;
4865
- let r = fe(n.revision.content, e, t);
4886
+ let r = me(n.revision.content, e, t);
4866
4887
  return r != null && await this.#E(r) != null;
4867
4888
  }
4868
4889
  get eventSourceClient() {
@@ -4878,9 +4899,9 @@ var ui = class {
4878
4899
  if (n == null || r?.kind != "flow") return !1;
4879
4900
  let i = n.graph(r)?.nodes[e];
4880
4901
  if (i?.kind != "integration" || i.definition.key != "feishu_app_bot.on_event" || t.provider != i.definition.provider) return !1;
4881
- let a = ie(n.revision.content, r, e, t.connectionId);
4902
+ let a = N(n.revision.content, r, e, t.connectionId);
4882
4903
  if (a == null) return !1;
4883
- let o = ze(i.config.sourceId, void 0) != t.sourceId;
4904
+ let o = Ue(i.config.sourceId, void 0) != t.sourceId;
4884
4905
  return await this.#E([
4885
4906
  ...a,
4886
4907
  ...C(n.revision.content, r, e, "sourceId", t.sourceId) ?? [],
@@ -4902,28 +4923,28 @@ var ui = class {
4902
4923
  let o = r.graph(i)?.nodes[e];
4903
4924
  if (a.length > 0 && o?.kind == "integration" && o.definition.key == "feishu_app_bot.on_event" && t == "eventTypes") {
4904
4925
  let t = Array.isArray(n) ? n.filter((e) => typeof e == "string") : [];
4905
- N(t) || (a = [...a, ...C(r.revision.content, i, e, "chatIds", void 0) ?? []]);
4906
- let s = ze(o.config.resource, void 0);
4907
- je(s) && s.kind != Ye(t) && (a = [...a, ...C(r.revision.content, i, e, "resource", void 0) ?? []]);
4926
+ ue(t) || (a = [...a, ...C(r.revision.content, i, e, "chatIds", void 0) ?? []]);
4927
+ let s = Ue(o.config.resource, void 0);
4928
+ ye(s) && s.kind != Xe(t) && (a = [...a, ...C(r.revision.content, i, e, "resource", void 0) ?? []]);
4908
4929
  }
4909
4930
  return a.length > 0 && o?.kind == "poll" && o.definition.key == "linear.on_issue_changed" && t == "teamId" ? await this.#E([...a, ...C(r.revision.content, i, e, "stateIds", void 0) ?? []]) != null : await this.#E(a) != null;
4910
4931
  }
4911
4932
  async saveTriggerSchedule(e, t) {
4912
4933
  let n = this.$.revision.value, r = this.#l.value.target;
4913
4934
  if (n == null || r?.kind != "flow") return !1;
4914
- let i = Ce(n.revision.content, r, e, t);
4935
+ let i = Ee(n.revision.content, r, e, t);
4915
4936
  return i != null && await this.#E(i) != null;
4916
4937
  }
4917
4938
  async saveWebhook(e, t, n) {
4918
4939
  let r = this.$.revision.value, i = this.#l.value.target;
4919
4940
  if (r == null || i?.kind != "flow") return !1;
4920
- let a = ye(r, i, e, t);
4941
+ let a = Ce(r, i, e, t);
4921
4942
  return a != null && await this.#E(a, n) != null;
4922
4943
  }
4923
4944
  async setTriggerConnection(e, t) {
4924
4945
  let n = this.$.revision.value, r = this.#l.value.target;
4925
4946
  if (n == null || r?.kind != "flow") return !1;
4926
- let i = ie(n.revision.content, r, e, t);
4947
+ let i = N(n.revision.content, r, e, t);
4927
4948
  if (i == null) return !1;
4928
4949
  let a = n.graph(r)?.nodes[e];
4929
4950
  return i.length > 0 && a?.kind == "poll" && a.definition.key == "linear.on_issue_changed" ? await this.#E([...i, ...["teamId", "stateIds"].flatMap((t) => C(n.revision.content, r, e, t, void 0) ?? [])]) != null : await this.#E(i) != null;
@@ -4931,7 +4952,7 @@ var ui = class {
4931
4952
  async saveSubflowSettings(e, t) {
4932
4953
  let n = this.$.revision.value;
4933
4954
  if (n == null) return !1;
4934
- let r = Ee(n, e, t);
4955
+ let r = ke(n, e, t);
4935
4956
  return r != null && await this.#E(r) != null;
4936
4957
  }
4937
4958
  updateModuleSource(e) {
@@ -5105,7 +5126,7 @@ var ui = class {
5105
5126
  let [s, c] = await Promise.all([e, t]), l = s != null && c && (!g || p == this.#d.generation);
5106
5127
  return l && g && a != null && this.history$.value.undo === h && this.#D(a, h), l;
5107
5128
  } catch (e) {
5108
- return this.#c(F(e, this.#r.t)), this.retryHistorySync(), !1;
5129
+ return this.#c(O(e, this.#r.t)), this.retryHistorySync(), !1;
5109
5130
  } finally {
5110
5131
  this.#d.pending--, this.#_ || this.#d.publish();
5111
5132
  }
@@ -5127,7 +5148,7 @@ var ui = class {
5127
5148
  let [t, i] = await Promise.all([this.#O(e ? n.forward : n.inverse, !0, !0), this.#j((t) => _n(t, n.target, n.presentation, e), !0)]);
5128
5149
  t != null && i && r == this.#d.generation && (this.selectNodes(e ? n.afterSelection : n.beforeSelection), this.#d.complete(e));
5129
5150
  } catch (e) {
5130
- this.#c(F(e, this.#r.t)), this.retryHistorySync();
5151
+ this.#c(O(e, this.#r.t)), this.retryHistorySync();
5131
5152
  } finally {
5132
5153
  this.#d.applying = !1, this.#_ || this.#d.publish();
5133
5154
  }
@@ -5184,7 +5205,7 @@ var ui = class {
5184
5205
  });
5185
5206
  }
5186
5207
  } catch (n) {
5187
- !this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#c(F(n, this.#r.t));
5208
+ !this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#c(O(n, this.#r.t));
5188
5209
  } finally {
5189
5210
  !this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#V({ checkLoading: !1 });
5190
5211
  }
@@ -5225,12 +5246,12 @@ var ui = class {
5225
5246
  message: this.#r.t(o ? "notice.moduleUpdated" : "notice.draftUpdated")
5226
5247
  }), this.#F(), !0;
5227
5248
  } catch (n) {
5228
- return t && this.#B(e) && this.#c(F(n, this.#r.t)), !1;
5249
+ return t && this.#B(e) && this.#c(O(n, this.#r.t)), !1;
5229
5250
  }
5230
5251
  }
5231
5252
  #R() {
5232
5253
  let e = this.#l.value;
5233
- return rr(e.draft, e.target, e.presentation?.value, e.diagnostics?.diagnostics, {}, {}, this.#r.t);
5254
+ return ir(e.draft, e.target, e.presentation?.value, e.diagnostics?.diagnostics, {}, {}, this.#r.t);
5234
5255
  }
5235
5256
  #z(e) {
5236
5257
  let t = P(e), n = li(t, this.#l.value.target);
@@ -5287,20 +5308,20 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5287
5308
  #f;
5288
5309
  #p;
5289
5310
  #m;
5290
- constructor(r, i, a = j, o = h(), s = mi, c = !0) {
5291
- this.#t = new E(), this.#r = n(), this.#a = n([]), this.#o = n(!1), this.#s = n(!1), this.#c = !0, this.#u = n([]), this.#d = !1, this.#f = !1, this.#m = Promise.resolve(), this.retryCatalog = () => {
5311
+ constructor(r, i, a = F, o = h(), s = mi, c = !0) {
5312
+ this.#t = new D(), this.#r = n(), this.#a = n([]), this.#o = n(!1), this.#s = n(!1), this.#c = !0, this.#u = n([]), this.#d = !1, this.#f = !1, this.#m = Promise.resolve(), this.retryCatalog = () => {
5292
5313
  this.connectors.retryCatalog(), this.triggers.catalog.retry();
5293
5314
  }, this.provideAddNodeOptions = (e, t, n = t) => T(t, [this.triggers.provideAddNodeOptions(e, t), this.connectors.provideAddNodeOptions(e, t, n)]), this.browseAddNodeOptions = (e) => T(e, [this.triggers.browseAddNodeOptions(e), this.connectors.browseAddNodeOptions(e)]), this.provideAddNodeOptionChoices = (e, t) => this.connectors.provideAddNodeOptionChoices(e, t), this.preferences = i, this.#e = r, this.results = r, this.#n = o, this.#i = c;
5294
5315
  let l = (e) => {
5295
5316
  this.#d || this.#r.set(e);
5296
5317
  };
5297
- this.connectorAccess = new Or(r, l, o, (e) => this.workspace.catalogs.refreshFlow(e)), this.runs = new ae(r, l, o), this.workspace = new ui(r, l, nn, o, (e) => {
5318
+ this.connectorAccess = new kr(r, l, o, (e) => this.workspace.catalogs.refreshFlow(e)), this.runs = new ce(r, l, o), this.workspace = new ui(r, l, nn, o, (e) => {
5298
5319
  e.kind == "run.created" ? this.#_(r, e) : this.runs.changed(e.runId);
5299
- }, new Er(r, s.connectorCache), (e) => void this.#h(e), (e) => {
5320
+ }, new Dr(r, s.connectorCache), (e) => void this.#h(e), (e) => {
5300
5321
  this.connectorAccess.changed(e), this.workspace.catalogs.refreshFlow(e);
5301
5322
  }), this.#p = this.workspace.$.flowId.reaction((e) => {
5302
5323
  this.#m = this.connectorAccess.load(e);
5303
- }), this.connectors = new Lr(r, this.workspace, l, s, o), this.triggers = new Wr(r, this.workspace, l, s, o), this.publications = new wn(r, this.workspace, l, i, a, o), this.runRequests = new Pn(r, this.runs, l, async (e) => {
5324
+ }), this.connectors = new Lr(r, this.workspace, l, s, o), this.triggers = new Wr(r, this.workspace, l, s, o), this.publications = new Tn(r, this.workspace, l, i, a, o), this.runRequests = new Fn(r, this.runs, l, async (e) => {
5304
5325
  if (!(e != this.workspace.$.flowId.value || !await this.workspace.saveModuleEditor() || this.#d || e != this.workspace.$.flowId.value)) return this.workspace.$.draft.value?.revisionId;
5305
5326
  }, o, a);
5306
5327
  let u = t((e) => {
@@ -5328,7 +5349,7 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5328
5349
  ...m == null ? [] : [t?.revisionId]
5329
5350
  ], v = d.get(g);
5330
5351
  if (v != null && v.inputs.length == _.length && v.inputs.every((e, t) => e === _[t])) return v.graph;
5331
- let y = rr(t, n, r, i, c, l, p, m, h, s);
5352
+ let y = ir(t, n, r, i, c, l, p, m, h, s);
5332
5353
  return d.set(g, {
5333
5354
  graph: y,
5334
5355
  inputs: _
@@ -5350,7 +5371,7 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5350
5371
  if (e(this.publications.$.rollingBackPublicationId) != null) return "rollback";
5351
5372
  if (e(this.publications.$.changingTriggerId) != null) return "trigger";
5352
5373
  }),
5353
- diagnosticItems: t((e) => ue(e(this.workspace.$.revision), e(this.workspace.$.target), e(u))),
5374
+ diagnosticItems: t((e) => pe(e(this.workspace.$.revision), e(this.workspace.$.target), e(u))),
5354
5375
  diagnostics: u,
5355
5376
  designer: p,
5356
5377
  designerNodeById: m,
@@ -5392,7 +5413,7 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5392
5413
  if (this.#d) return;
5393
5414
  this.#a.set(e.map((e) => e.name)), this.#o.set(!0);
5394
5415
  } catch (e) {
5395
- this.#c = !0, this.#d || this.#r.set(F(e, this.#n.t));
5416
+ this.#c = !0, this.#d || this.#r.set(O(e, this.#n.t));
5396
5417
  } finally {
5397
5418
  this.#l = void 0, this.#d || this.#s.set(!1);
5398
5419
  }
@@ -5462,7 +5483,7 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5462
5483
  let s = await this.workspace.addNode(e, t, n);
5463
5484
  return s != null && e.kind == "connector" && o != null && (o.nodeId = s, this.#u.set([...this.#u.value]), this.#g(o.flowId, o.target, s, e.connector).finally(r), r = void 0), s != null && e.kind == "trigger" && this.triggers.refresh(), s;
5464
5485
  } catch (e) {
5465
- this.#d || this.#r.set(F(e, this.#n.t));
5486
+ this.#d || this.#r.set(O(e, this.#n.t));
5466
5487
  return;
5467
5488
  } finally {
5468
5489
  r?.();
@@ -5480,7 +5501,7 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5480
5501
  let s = i.action.defaultConnection;
5481
5502
  s != null && await this.workspace.setConnectorConnection(a.node.taskId, s.connectionId), !this.#d && e == this.workspace.$.flowId.value && await this.connectors.refresh();
5482
5503
  } catch (t) {
5483
- !this.#d && e == this.workspace.$.flowId.value && this.#r.set(F(t, this.#n.t));
5504
+ !this.#d && e == this.workspace.$.flowId.value && this.#r.set(O(t, this.#n.t));
5484
5505
  }
5485
5506
  }
5486
5507
  async prepareConnectorAction(e) {
@@ -5497,29 +5518,37 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5497
5518
  if (this.connectorAccess.$.value.access ?? await this.connectorAccess.load(t), this.#d || t != this.workspace.$.flowId.value) return;
5498
5519
  let a = this.connectorAccess.$.value.access;
5499
5520
  if (a == null) return i;
5500
- let o;
5501
- if (a?.mode == "selectable") {
5502
- if (this.connectorAccess.$.value.candidates[e.serviceId] ?? await this.connectorAccess.loadCandidates([e.serviceId]), this.#d || t != this.workspace.$.flowId.value) return;
5503
- let n = this.connectorAccess.$.value.candidates[e.serviceId]?.candidates.filter((t) => t.permissions == null || t.permissions.allActions || t.permissions.actionIds.includes(e.actionId));
5504
- if (n == null) return i;
5505
- let r = new Set(a.bindings.filter((t) => t.providerId == e.serviceId && t.status == "active").map((e) => e.accessBindingId));
5506
- if (n != null && !n.some((e) => r.has(e.accessBindingId))) {
5507
- let r = n.find((e) => e.isDefault) ?? (n.length == 1 ? n[0] : void 0);
5508
- if (r != null) {
5509
- if (!await this.connectorAccess.select(e.serviceId, r.accessBindingId)) return this.#d || t != this.workspace.$.flowId.value ? void 0 : i;
5510
- a = this.connectorAccess.$.value.access;
5511
- }
5521
+ let o = await this.connectors.resolveAction(e.actionId);
5522
+ if (!(this.#d || t != this.workspace.$.flowId.value)) {
5523
+ if (a.mode == "selectable") {
5524
+ if (await this.connectorAccess.loadCandidates([e.serviceId]), this.#d || t != this.workspace.$.flowId.value) return;
5525
+ let n = this.connectorAccess.$.value.candidates[e.serviceId]?.candidates;
5526
+ if (n == null) return i;
5527
+ let r = new Set(n.filter((t) => t.permissions == null || t.permissions.allActions || t.permissions.actionIds.includes(e.actionId)).map((e) => e.connectionId)), a = o.connections.filter((e) => r.has(e.connectionId));
5528
+ return {
5529
+ action: yn(o.action, a),
5530
+ connections: a
5531
+ };
5512
5532
  }
5513
- o = n?.some((e) => a?.bindings.some((t) => t.accessBindingId == e.accessBindingId && t.status == "active"));
5533
+ return o;
5514
5534
  }
5515
- if (this.#d || t != this.workspace.$.flowId.value) return;
5516
- let s = a?.bindings.some((t) => t.providerId == e.serviceId && t.status == "active") ?? !1;
5517
- if (a?.mode != "implicit" && !(o ?? s)) return i;
5518
- this.workspace.catalogs.refreshFlow(t);
5519
- let c = await this.connectors.resolveAction(e.actionId);
5520
- if (!(this.#d || t != this.workspace.$.flowId.value)) {
5521
- if (c.action.serviceId != e.serviceId) throw Error("Connector Action Provider changed while access was being configured.");
5522
- return c;
5535
+ }
5536
+ async publishedConnectionUsage(e, t, n, r) {
5537
+ let [i, a] = await Promise.all([this.#e.getConnectorAccess(e, r, t), this.#e.getRevision(e, n, r)]);
5538
+ return {
5539
+ publicationId: t,
5540
+ access: i,
5541
+ revision: P(a)
5542
+ };
5543
+ }
5544
+ async removeConnectionUsage(e) {
5545
+ if (!await this.workspace.saveModuleEditor()) return !1;
5546
+ let t = this.workspace.$.flowId.value, n = this.workspace.$.revision.value, r = this.connectorAccess.$.value.access;
5547
+ if (t == null || n == null || r == null) return !1;
5548
+ try {
5549
+ return await this.#e.removeConnectionUsage(t, e, n.revision.revisionId, r.accessRevision, F()), t != this.workspace.$.flowId.value || this.#d ? !1 : (await this.workspace.selectFlow(t), await this.connectorAccess.load(t), !0);
5550
+ } catch (e) {
5551
+ return this.#r.set(O(e, this.#n.t)), !1;
5523
5552
  }
5524
5553
  }
5525
5554
  async refreshSelectedConnector(e = !1) {
@@ -5553,7 +5582,7 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5553
5582
  return;
5554
5583
  }
5555
5584
  }
5556
- }, gi = Tt(() => import("./flowWorkspace-etUB3NSN.js").then((e) => e.t));
5585
+ }, gi = Tt(() => import("./flowWorkspace-a5QLISui.js").then((e) => e.t));
5557
5586
  function _i({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i, pending: a = !1, title: o, token: c, tokenLabel: u }) {
5558
5587
  let d = c != null && u != null && i != null, f = c ?? "", p = /* @__PURE__ */ U(Ct, { children: [
5559
5588
  /* @__PURE__ */ H("div", {
@@ -5691,7 +5720,7 @@ function bi({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowF
5691
5720
  let x = Dt(_);
5692
5721
  x.current = _;
5693
5722
  let [{ i18n: S, navigation: C, store: w }] = W(() => {
5694
- let e = h(u), t = new hi(new he((e, t) => a.request(e, t), (e, t) => a.subscribeFlow(e, t), (e) => a.subscribeFlowCatalog(e)), v, j, e, a, b);
5723
+ let e = h(u), t = new hi(new fe((e, t) => a.request(e, t), (e, t) => a.subscribeFlow(e, t), (e) => a.subscribeFlowCatalog(e)), v, F, e, a, b);
5695
5724
  return {
5696
5725
  i18n: e,
5697
5726
  navigation: new jt(t, d, (e, t) => x.current(e, t)),
@@ -5749,4 +5778,4 @@ function xi({ sessionKey: e, ...t }) {
5749
5778
  return /* @__PURE__ */ H(bi, { ...t }, e);
5750
5779
  }
5751
5780
  //#endregion
5752
- export { te as EventSourcesPage, _i as OpenFlowSessionGate, xi as OpenFlowWorkbench, yt as isWorkbenchLanguage, xt as resolveWorkbenchLanguage, St as workbenchLanguageNames, bt as workbenchLanguages };
5781
+ export { ie as EventSourcesPage, _i as OpenFlowSessionGate, xi as OpenFlowWorkbench, yt as isWorkbenchLanguage, xt as resolveWorkbenchLanguage, St as workbenchLanguageNames, bt as workbenchLanguages };