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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/browser/{createResourceDialog-BwI2JmPE.js → createResourceDialog-C2ZLGPla.js} +1 -1
  2. package/dist/browser/flow-authoring-node.d.ts +3 -2
  3. package/dist/browser/flow-authoring.js +933 -915
  4. package/dist/browser/flow-change-schema.d.ts +4 -0
  5. package/dist/browser/flow-change.d.ts +8 -7
  6. package/dist/browser/flow-change.js +1067 -1050
  7. package/dist/browser/flow-notifications.d.ts +6 -2
  8. package/dist/browser/{flowChanges-DhEjA0n5.js → flowChanges-Z49mslMz.js} +1096 -1014
  9. package/dist/browser/{flowWorkspace-zcweMsLS.js → flowWorkspace-DCaVDqtY.js} +40105 -43746
  10. package/dist/browser/host-conformance.js +7 -1
  11. package/dist/browser/{inputValues-C5ExCCf0.js → inputValues-CLnpqFAf.js} +1 -1
  12. package/dist/browser/{markdownContent-SIlWuHve.js → markdownContent-Bon8uhjM.js} +23 -23
  13. package/dist/browser/{switch-CyZ96-UF.js → switch-DuB8aovT.js} +5035 -513
  14. package/dist/browser/ui.css +1 -1
  15. package/dist/browser/workbench.css +1 -1
  16. package/dist/browser/workbench.js +890 -727
  17. package/dist/browser/{workbenchSelect-BUu7CjUA.js → workbenchSelect-DX9IFmX-.js} +1187 -1156
  18. package/dist/common/authoringExamples.d.ts +27 -0
  19. package/dist/common/control-api-conformance.js +838 -820
  20. package/dist/common/control-api-errors.d.ts +8 -0
  21. package/dist/common/control-api.d.ts +7 -3
  22. package/dist/common/control-api.js +1423 -1368
  23. package/dist/common/control-requests.d.ts +13 -6
  24. package/dist/common/control-requests.js +2034 -1510
  25. package/dist/common/cron-trigger.d.ts +2 -1
  26. package/dist/common/cron-trigger.js +27 -24
  27. package/dist/common/draftOperations.d.ts +14 -0
  28. package/dist/common/engine-contract.d.ts +2 -2
  29. package/dist/common/flow-encoding.d.ts +3 -0
  30. package/dist/common/flow-encoding.js +1067 -968
  31. package/dist/common/flow-notifications.d.ts +6 -2
  32. package/dist/common/flow-schema.d.ts +1 -2
  33. package/dist/common/flow-semantics.d.ts +2 -1
  34. package/dist/common/flow-semantics.js +7935 -7812
  35. package/dist/common/flowInspection.d.ts +16 -0
  36. package/dist/common/integration-trigger.d.ts +2 -2
  37. package/dist/common/integration-trigger.js +8 -8
  38. package/dist/common/mcp.d.ts +2 -1
  39. package/dist/common/mcp.js +138 -105
  40. package/dist/common/poll-trigger.d.ts +3 -0
  41. package/dist/common/poll-trigger.js +26 -22
  42. package/dist/common/provider-triggers.js +2704 -2599
  43. package/dist/common/runtime-contract.js +3 -3
  44. package/dist/common/scheduler.d.ts +4 -3
  45. package/dist/common/scheduler.js +1855 -1725
  46. package/dist/common/trigger-contract.d.ts +5 -0
  47. package/dist/common/webhook-trigger.d.ts +3 -3
  48. package/dist/common/webhook-trigger.js +64 -18
  49. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  import { a as e, i as t, l as n, t as r } from "./dist-Dz6Nglsd.js";
2
2
  import { i, t as a } from "./main-BDnNHhkU.js";
3
3
  import { $ as o, $n as s, $t as c, A as l, Bn as u, Ct as d, D as f, En as p, Et as m, F as h, Fn as g, G as _, Gn as v, H as y, Hn as b, I as x, J as ee, K as S, Kn as C, L as te, M as w, N as ne, O as T, Ot as re, P as ie, Pn as E, Q as ae, R as D, Sn as oe, St as se, U as O, Un as ce, V as le, Vn as k, W as ue, Wn as A, X as de, Xn as fe, Y as pe, Yn as me, Z as he, Zn as ge, a as _e, ar as ve, at as ye, c as be, cn as xe, ct as Se, d as Ce, dr as we, dt as Te, er as Ee, et as De, fn as Oe, ft as ke, gn as Ae, gt as je, hn as Me, ht as Ne, i as Pe, it as Fe, j as Ie, jt as Le, kt as Re, l as ze, ln as Be, lt as Ve, n as He, nr as Ue, nt as We, o as Ge, on as Ke, or as qe, ot as Je, q as Ye, qn as Xe, rn as Ze, rr as Qe, rt as $e, sn as et, sr as tt, st as nt, t as rt, tn as it, tr as at, tt as ot, u as st, un as ct, ur as lt, ut, v as dt, vt as ft, xn as pt, xt as mt, zn as ht } from "./lite-BuKZ8joP.js";
4
- import { a as gt, d as _t, f as vt, l as yt, m as bt, o as xt, u as St } from "./switch-CyZ96-UF.js";
5
- import { A as Ct, B as wt, C as Tt, D as Et, E as Dt, F as Ot, I as kt, L as At, M as jt, N as Mt, O as Nt, P as Pt, R as j, S as Ft, T as It, V as Lt, b as Rt, j as zt, k as Bt, n as Vt, v as Ht, y as Ut, z as Wt } from "./workbenchSelect-BUu7CjUA.js";
4
+ import { _ as gt, a as _t, g as vt, o as yt, v as bt, x as xt, y as St } from "./switch-DuB8aovT.js";
5
+ import { A as Ct, B as wt, C as Tt, D as Et, E as Dt, F as Ot, I as kt, L as At, M as jt, N as Mt, O as Nt, P as Pt, R as j, S as Ft, T as It, V as Lt, b as Rt, j as zt, k as Bt, n as Vt, v as Ht, y as Ut, z as Wt } from "./workbenchSelect-DX9IFmX-.js";
6
6
  import { t as Gt } from "./languages-C0zQ4GSo.js";
7
7
  import { a as Kt, o as qt, r as Jt } from "./dist-B_T-OpQp.js";
8
8
  import "./lib-C5Ipyfps.js";
@@ -30,6 +30,8 @@ var sn = et("ChevronRight", [["path", {
30
30
  eventSourceNotFound: "event-source.not-found",
31
31
  eventSourceConflict: "event-source.conflict",
32
32
  flowInvalid: "flow.invalid",
33
+ flowRepairRequired: "flow.repair-required",
34
+ flowUpgradeRequired: "flow.upgrade-required",
33
35
  flowNotFound: "flow.not-found",
34
36
  flowBusy: "flow.busy",
35
37
  flowConflict: "flow.conflict",
@@ -57,7 +59,7 @@ var sn = et("ChevronRight", [["path", {
57
59
  variableLimitReached: "variable.limit-reached",
58
60
  variableNotFound: "variable.not-found"
59
61
  };
60
- I.eventSourceInvalid, I.eventSourceIdentityUnavailable, I.eventSourceNotFound, I.eventSourceConflict, I.authenticationRequired, I.authorizationDenied, I.bindingUnresolved, I.connectorActionNotFound, I.connectorUnconfigured, I.connectorUnavailable, I.connectorConsoleUnconfigured, I.engineUnavailable, I.engineUnsupported, I.flowInvalid, I.flowNotFound, I.flowBusy, I.flowConflict, I.flowPresentationConflict, I.flowRevisionConflict, I.liveConflict, I.liveNotFound, I.pageInvalidCursor, I.publicationConflict, I.publicationNotFound, I.publicationUnsupported, I.publishOperationNotFound, I.routeNotFound, I.runConflict, I.runEventsExpired, I.runInvalid, I.runNotFound, I.runNotTerminal, I.runOverloaded, I.runWaitNotFound, I.triggerKeyInvalid, I.triggerKeyNotFound, I.triggerNotFound, I.variableInvalid, I.variableLimitReached, I.variableNotFound;
62
+ I.eventSourceInvalid, I.eventSourceIdentityUnavailable, I.eventSourceNotFound, I.eventSourceConflict, I.authenticationRequired, I.authorizationDenied, I.bindingUnresolved, I.connectorActionNotFound, I.connectorUnconfigured, I.connectorUnavailable, I.connectorConsoleUnconfigured, I.engineUnavailable, I.engineUnsupported, I.flowInvalid, I.flowRepairRequired, I.flowUpgradeRequired, I.flowNotFound, I.flowBusy, I.flowConflict, I.flowPresentationConflict, I.flowRevisionConflict, I.liveConflict, I.liveNotFound, I.pageInvalidCursor, I.publicationConflict, I.publicationNotFound, I.publicationUnsupported, I.publishOperationNotFound, I.routeNotFound, I.runConflict, I.runEventsExpired, I.runInvalid, I.runNotFound, I.runNotTerminal, I.runOverloaded, I.runWaitNotFound, I.triggerKeyInvalid, I.triggerKeyNotFound, I.triggerNotFound, I.variableInvalid, I.variableLimitReached, I.variableNotFound;
61
63
  var cn = class extends Error {
62
64
  constructor(e, t, n) {
63
65
  super(n), this.code = t, this.name = "ApiError", this.status = e;
@@ -140,12 +142,19 @@ function vn(e) {
140
142
  function yn(e) {
141
143
  let t = R(e), n = vn(t), r = {
142
144
  configSchema: gn(t.configSchema),
143
- definitionVersion: hn(t.definitionVersion),
145
+ definitionVersion: t.definitionVersion === 2 ? 2 : L(),
144
146
  description: n.description,
145
147
  displayName: n.displayName,
146
148
  key: n.key,
147
149
  name: n.name,
148
- payloadSchema: gn(t.payloadSchema),
150
+ outputs: (Array.isArray(t.outputs) ? t.outputs : L()).map((e) => {
151
+ let t = R(e);
152
+ return Object.assign({
153
+ handle: z(t.handle),
154
+ jsonSchema: gn(t.jsonSchema),
155
+ nullable: typeof t.nullable == "boolean" ? t.nullable : L()
156
+ }, t.description == null ? {} : { description: z(t.description) });
157
+ }),
149
158
  provider: n.provider
150
159
  };
151
160
  if (n.type == "poll") return {
@@ -748,7 +757,7 @@ Ot({
748
757
  }).strict(), Ot({
749
758
  kind: Mt("open-flow-project-revision"),
750
759
  version: Mt(1),
751
- modelVersion: Mt(1),
760
+ modelVersion: Wt([Mt(1), Mt(2)]),
752
761
  modules: kt(j(), Ot({
753
762
  name: j(),
754
763
  source: j(),
@@ -1444,10 +1453,20 @@ var Nr = class {
1444
1453
  method: "POST"
1445
1454
  }));
1446
1455
  }
1456
+ async repairDraft(e, t, n = Mr("repair")) {
1457
+ return hr(await this.request(`/v1/flows/${V(e)}/draft/repair`, {
1458
+ body: JSON.stringify({
1459
+ expectedRevisionId: t,
1460
+ version: 1
1461
+ }),
1462
+ headers: { "idempotency-key": n },
1463
+ method: "POST"
1464
+ }));
1465
+ }
1447
1466
  async checkFlow(e, t) {
1448
1467
  return Bn(await this.request(`/v1/flows/${V(e)}/revisions/${V(t)}/check`, {
1449
1468
  body: JSON.stringify({
1450
- engineContract: "open-flow-engine/v4",
1469
+ engineContract: "open-flow-engine/v5",
1451
1470
  version: 1
1452
1471
  }),
1453
1472
  method: "POST"
@@ -1465,10 +1484,10 @@ var Nr = class {
1465
1484
  async createDraftRun(e, t, n) {
1466
1485
  let r = Cr(await this.request(`/v1/flows/${V(e)}/revisions/${V(t)}/runs`, {
1467
1486
  body: JSON.stringify({
1468
- engineContract: "open-flow-engine/v4",
1487
+ engineContract: "open-flow-engine/v5",
1469
1488
  inputs: n.inputs ?? {},
1470
1489
  trigger: n.trigger,
1471
- version: 1
1490
+ version: 2
1472
1491
  }),
1473
1492
  headers: { "idempotency-key": n.idempotencyKey ?? Mr("run") },
1474
1493
  method: "POST"
@@ -1481,7 +1500,7 @@ var Nr = class {
1481
1500
  inputs: t.inputs ?? {},
1482
1501
  trigger: t.trigger,
1483
1502
  publicationId: e,
1484
- version: 1
1503
+ version: 2
1485
1504
  }),
1486
1505
  headers: { "idempotency-key": t.idempotencyKey ?? Mr("run") },
1487
1506
  method: "POST"
@@ -1501,7 +1520,7 @@ var Nr = class {
1501
1520
  async publishFlow(e, t, n, r = {}) {
1502
1521
  return rr(await this.request(`/v1/flows/${V(e)}/revisions/${V(t)}/publications`, {
1503
1522
  body: JSON.stringify({
1504
- engineContract: "open-flow-engine/v4",
1523
+ engineContract: "open-flow-engine/v5",
1505
1524
  expectedLivePublicationId: n,
1506
1525
  version: 1
1507
1526
  }),
@@ -1668,6 +1687,8 @@ var Nr = class {
1668
1687
  [I.engineUnavailable]: "notice.error.engineUnavailable",
1669
1688
  [I.engineUnsupported]: "notice.error.engineUnsupported",
1670
1689
  [I.flowInvalid]: "notice.error.flowInvalid",
1690
+ [I.flowRepairRequired]: "notice.error.flowInvalid",
1691
+ [I.flowUpgradeRequired]: "notice.error.flowInvalid",
1671
1692
  [I.flowNotFound]: "notice.error.flowNotFound",
1672
1693
  [I.flowBusy]: "notice.error.flowBusy",
1673
1694
  [I.flowConflict]: "notice.error.flowConflict",
@@ -1992,7 +2013,7 @@ function Br({ value: e, onChange: t, disabled: n = !1, allowedEvents: r }) {
1992
2013
  children: a(`eventSources.eventGroups.${r}`)
1993
2014
  }), g.filter((e) => e.group == r).map((r) => /* @__PURE__ */ N(Lt, {
1994
2015
  className: "flex cursor-pointer items-start gap-2 rounded-md px-2 py-2 font-normal hover:bg-muted",
1995
- children: [/* @__PURE__ */ M(bt, {
2016
+ children: [/* @__PURE__ */ M(xt, {
1996
2017
  className: "mt-0.5",
1997
2018
  checked: e.includes(r.id),
1998
2019
  disabled: n || !e.includes(r.id) && e.length >= 200,
@@ -2066,7 +2087,7 @@ function Br({ value: e, onChange: t, disabled: n = !1, allowedEvents: r }) {
2066
2087
  //#endregion
2067
2088
  //#region src/workbench/browser/runtime/eventSources.tsx
2068
2089
  function Vr(e) {
2069
- let t = nn(() => xt(e.language), [e.language]);
2090
+ let t = nn(() => yt(e.language), [e.language]);
2070
2091
  return /* @__PURE__ */ M(a, {
2071
2092
  i18n: t,
2072
2093
  children: /* @__PURE__ */ M(Hr, { ...e })
@@ -2545,7 +2566,7 @@ function Ur({ source: e, existingNames: t = [], fixedTeamId: n, onPendingChange:
2545
2566
  children: l("eventSources.resourceManagement")
2546
2567
  }), /* @__PURE__ */ N(Lt, {
2547
2568
  className: "mt-3 flex items-start gap-2 font-normal",
2548
- children: [/* @__PURE__ */ M(bt, {
2569
+ children: [/* @__PURE__ */ M(xt, {
2549
2570
  checked: le,
2550
2571
  onCheckedChange: (e) => ue(e === !0),
2551
2572
  disabled: A
@@ -2938,7 +2959,7 @@ var mi = {
2938
2959
  };
2939
2960
  }, [S.events, s]);
2940
2961
  let ne = s.useState("hoverEnabled"), T = s.useState("disabled");
2941
- _t(ee, {
2962
+ bt(ee, {
2942
2963
  enabled: ne && !T && !w && y.type !== "menubar",
2943
2964
  closeDelay: C
2944
2965
  });
@@ -3713,9 +3734,9 @@ var Bi = 2, Vi = d(function(e, t) {
3713
3734
  fe,
3714
3735
  _
3715
3736
  ]);
3716
- let pe = O && w.context.hasSubmenuOpen, me = St(S, {
3737
+ let pe = O && w.context.hasSubmenuOpen, me = gt(S, {
3717
3738
  enabled: (l ?? pe) && !le && w.type !== "context-menu" && (!O || pe && !se),
3718
- handleClose: yt({ blockPointerEvents: !O }),
3739
+ handleClose: vt({ blockPointerEvents: !O }),
3719
3740
  mouseOnly: !0,
3720
3741
  move: !1,
3721
3742
  restMs: w.type === void 0 ? u : void 0,
@@ -3730,7 +3751,7 @@ var Bi = 2, Vi = d(function(e, t) {
3730
3751
  toggle: !0,
3731
3752
  ignoreMouse: !1,
3732
3753
  stickIfOpen: w.type === void 0 && he
3733
- }), ye = vt(S, { enabled: !le && pe }), be = zi({
3754
+ }), ye = St(S, { enabled: !le && pe }), be = zi({
3734
3755
  open: C,
3735
3756
  enabled: O,
3736
3757
  mouseDownAction: "open"
@@ -3760,7 +3781,7 @@ var Bi = 2, Vi = d(function(e, t) {
3760
3781
  be,
3761
3782
  h,
3762
3783
  k
3763
- ], { preFocusGuardRef: ke, handlePreFocusGuardFocus: je, handleFocusTargetFocus: Me } = gt(_, te), Ne = v("button", e, {
3784
+ ], { preFocusGuardRef: ke, handlePreFocusGuardFocus: je, handleFocusTargetFocus: Me } = _t(_, te), Ne = v("button", e, {
3764
3785
  enabled: !O,
3765
3786
  stateAttributesMapping: y,
3766
3787
  state: Ce,
@@ -3863,9 +3884,9 @@ var Gi = /*#__PURE__*/ P.forwardRef(function(e, t) {
3863
3884
  nativeButton: o,
3864
3885
  itemMetadata: ie,
3865
3886
  nodeId: m?.context.nodeId
3866
- }), ce = h.useState("hoverEnabled"), le = ne.useState("allowMouseEnter"), k = St(y, {
3887
+ }), ce = h.useState("hoverEnabled"), le = ne.useState("allowMouseEnter"), k = gt(y, {
3867
3888
  enabled: ce && s && !D,
3868
- handleClose: yt({ blockPointerEvents: !0 }),
3889
+ handleClose: vt({ blockPointerEvents: !0 }),
3869
3890
  mouseOnly: !0,
3870
3891
  move: !0,
3871
3892
  restMs: c,
@@ -4504,6 +4525,13 @@ function Ma(e, t, n, r) {
4504
4525
  nodeId: n,
4505
4526
  target: t,
4506
4527
  value: r.name
4528
+ }), i.maxExecutions != r.maxExecutions && a.push({
4529
+ before: i.maxExecutions,
4530
+ field: "maxExecutions",
4531
+ kind: "graph.node.field.set",
4532
+ nodeId: n,
4533
+ target: t,
4534
+ value: r.maxExecutions
4507
4535
  }), i.timeoutMs != r.timeoutMs && a.push({
4508
4536
  before: i.timeoutMs,
4509
4537
  field: "timeoutMs",
@@ -4841,7 +4869,70 @@ var oo = class {
4841
4869
  invalidate() {
4842
4870
  this.#e = Symbol();
4843
4871
  }
4844
- }, so = /^(\d\d\d\d)-(\d\d)-(\d\d)$/, co = [
4872
+ };
4873
+ //#endregion
4874
+ //#region src/base/common/json.ts
4875
+ function so(e) {
4876
+ if (e === null || typeof e == "boolean" || typeof e == "string") return !0;
4877
+ if (typeof e == "number") return Number.isFinite(e);
4878
+ if (typeof e != "object") return !1;
4879
+ let t = /* @__PURE__ */ new Set(), n = [], r = e;
4880
+ traversal: for (;;) {
4881
+ let e, i;
4882
+ if (Array.isArray(r)) {
4883
+ if (i = r.length, e = Reflect.ownKeys(r), e.length != i + 1) return !1;
4884
+ } else {
4885
+ let t = Reflect.getPrototypeOf(r);
4886
+ if (t != Object.prototype && t != null) return !1;
4887
+ e = Reflect.ownKeys(r), i = void 0;
4888
+ }
4889
+ t.add(r);
4890
+ let a = 0;
4891
+ for (;;) {
4892
+ if (a >= e.length) {
4893
+ t.delete(r);
4894
+ let o = n.pop();
4895
+ if (o === void 0) return !0;
4896
+ r = o.value, e = o.keys, i = o.arrayLength, a = o.index;
4897
+ continue;
4898
+ }
4899
+ let o = e[a++];
4900
+ if (i !== void 0) {
4901
+ if (o == "length") continue;
4902
+ if (typeof o != "string") return !1;
4903
+ let e = Number(o);
4904
+ if (!Number.isSafeInteger(e) || e < 0 || e >= i || String(e) != o) return !1;
4905
+ } else if (typeof o != "string") return !1;
4906
+ let s = Reflect.getOwnPropertyDescriptor(r, o);
4907
+ if (s?.enumerable != 1 || !Object.hasOwn(s, "value")) return !1;
4908
+ let c = s.value;
4909
+ if (c !== null && typeof c != "boolean" && typeof c != "string") {
4910
+ if (typeof c == "number") {
4911
+ if (!Number.isFinite(c)) return !1;
4912
+ continue;
4913
+ }
4914
+ if (typeof c != "object" || t.has(c)) return !1;
4915
+ n.push({
4916
+ value: r,
4917
+ keys: e,
4918
+ arrayLength: i,
4919
+ index: a
4920
+ }), r = c;
4921
+ continue traversal;
4922
+ }
4923
+ }
4924
+ }
4925
+ }
4926
+ function co(e) {
4927
+ try {
4928
+ return typeof e == "object" && !!e && !Array.isArray(e) && so(e);
4929
+ } catch {
4930
+ return !1;
4931
+ }
4932
+ }
4933
+ //#endregion
4934
+ //#region ../../node_modules/.bun/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/format.js
4935
+ var lo = /^(\d\d\d\d)-(\d\d)-(\d\d)$/, uo = [
4845
4936
  0,
4846
4937
  31,
4847
4938
  28,
@@ -4855,60 +4946,60 @@ var oo = class {
4855
4946
  31,
4856
4947
  30,
4857
4948
  31
4858
- ], lo = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i, uo = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i, fo = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i, po = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i, mo = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu, ho = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i, go = /^(?:\/(?:[^~/]|~0|~1)*)*$/, _o = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i, vo = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/, yo = (e) => {
4949
+ ], fo = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i, po = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i, mo = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i, ho = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i, go = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu, _o = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i, vo = /^(?:\/(?:[^~/]|~0|~1)*)*$/, yo = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i, bo = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/, xo = (e) => {
4859
4950
  if (e[0] === "\"") return !1;
4860
4951
  let [t, n, ...r] = e.split("@");
4861
4952
  return !t || !n || r.length !== 0 || t.length > 64 || n.length > 253 || t[0] === "." || t.endsWith(".") || t.includes("..") || !/^[a-z0-9.-]+$/i.test(n) || !/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(t) ? !1 : n.split(".").every((e) => /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e));
4862
- }, bo = /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, xo = /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i, So = (e) => e.length > 1 && e.length < 80 && (/^P\d+([.,]\d+)?W$/.test(e) || /^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(e) && /^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(e));
4863
- function Co(e) {
4953
+ }, So = /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, Co = /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i, wo = (e) => e.length > 1 && e.length < 80 && (/^P\d+([.,]\d+)?W$/.test(e) || /^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(e) && /^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(e));
4954
+ function To(e) {
4864
4955
  return e.test.bind(e);
4865
4956
  }
4866
- var wo = {
4867
- date: Eo,
4868
- time: Do.bind(void 0, !1),
4869
- "date-time": ko,
4870
- duration: So,
4871
- uri: Mo,
4872
- "uri-reference": Co(fo),
4873
- "uri-template": Co(po),
4874
- url: Co(mo),
4875
- email: yo,
4876
- hostname: Co(uo),
4877
- ipv4: Co(bo),
4878
- ipv6: Co(xo),
4879
- regex: Po,
4880
- uuid: Co(ho),
4881
- "json-pointer": Co(go),
4882
- "json-pointer-uri-fragment": Co(_o),
4883
- "relative-json-pointer": Co(vo)
4957
+ var Eo = {
4958
+ date: Oo,
4959
+ time: ko.bind(void 0, !1),
4960
+ "date-time": jo,
4961
+ duration: wo,
4962
+ uri: Po,
4963
+ "uri-reference": To(mo),
4964
+ "uri-template": To(ho),
4965
+ url: To(go),
4966
+ email: xo,
4967
+ hostname: To(po),
4968
+ ipv4: To(So),
4969
+ ipv6: To(Co),
4970
+ regex: Io,
4971
+ uuid: To(_o),
4972
+ "json-pointer": To(vo),
4973
+ "json-pointer-uri-fragment": To(yo),
4974
+ "relative-json-pointer": To(bo)
4884
4975
  };
4885
- function To(e) {
4976
+ function Do(e) {
4886
4977
  return e % 4 == 0 && (e % 100 != 0 || e % 400 == 0);
4887
4978
  }
4888
- function Eo(e) {
4889
- let t = e.match(so);
4979
+ function Oo(e) {
4980
+ let t = e.match(lo);
4890
4981
  if (!t) return !1;
4891
4982
  let n = +t[1], r = +t[2], i = +t[3];
4892
- return r >= 1 && r <= 12 && i >= 1 && i <= (r == 2 && To(n) ? 29 : co[r]);
4983
+ return r >= 1 && r <= 12 && i >= 1 && i <= (r == 2 && Do(n) ? 29 : uo[r]);
4893
4984
  }
4894
- function Do(e, t) {
4895
- let n = t.match(lo);
4985
+ function ko(e, t) {
4986
+ let n = t.match(fo);
4896
4987
  if (!n) return !1;
4897
4988
  let r = +n[1], i = +n[2], a = +n[3], o = !!n[5];
4898
4989
  return (r <= 23 && i <= 59 && a <= 59 || r == 23 && i == 59 && a == 60) && (!e || o);
4899
4990
  }
4900
- var Oo = /t|\s/i;
4901
- function ko(e) {
4902
- let t = e.split(Oo);
4903
- return t.length == 2 && Eo(t[0]) && Do(!0, t[1]);
4991
+ var Ao = /t|\s/i;
4992
+ function jo(e) {
4993
+ let t = e.split(Ao);
4994
+ return t.length == 2 && Oo(t[0]) && ko(!0, t[1]);
4904
4995
  }
4905
- var Ao = /\/|:/, jo = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
4906
- function Mo(e) {
4907
- return Ao.test(e) && jo.test(e);
4908
- }
4909
- var No = /[^\\]\\Z/;
4996
+ var Mo = /\/|:/, No = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
4910
4997
  function Po(e) {
4911
- if (No.test(e)) return !1;
4998
+ return Mo.test(e) && No.test(e);
4999
+ }
5000
+ var Fo = /[^\\]\\Z/;
5001
+ function Io(e) {
5002
+ if (Fo.test(e)) return !1;
4912
5003
  try {
4913
5004
  return new RegExp(e, "u"), !0;
4914
5005
  } catch {
@@ -4917,45 +5008,45 @@ function Po(e) {
4917
5008
  }
4918
5009
  //#endregion
4919
5010
  //#region src/json-schema-subset/utils.ts
4920
- var Fo = 0;
4921
- function Io() {
4922
- let e = Fo;
4923
- return Fo += 1, e;
5011
+ var Lo = 0;
5012
+ function Ro() {
5013
+ let e = Lo;
5014
+ return Lo += 1, e;
4924
5015
  }
4925
- function Lo(e) {
5016
+ function zo(e) {
4926
5017
  if (typeof e == "object" && e && !Object.isFrozen(e)) {
4927
- for (let t of Object.getOwnPropertyNames(e)) Lo(Reflect.get(e, t));
5018
+ for (let t of Object.getOwnPropertyNames(e)) zo(Reflect.get(e, t));
4928
5019
  Object.freeze(e);
4929
5020
  }
4930
5021
  return e;
4931
5022
  }
4932
- function Ro(e, t) {
5023
+ function Bo(e, t) {
4933
5024
  let n = {};
4934
5025
  for (let r of t) r in e && (n[r] = e[r]);
4935
5026
  return n;
4936
5027
  }
4937
- function zo(e) {
5028
+ function Vo(e) {
4938
5029
  if (typeof e != "object" || !e) return e;
4939
5030
  if (Array.isArray(e)) {
4940
5031
  let t = [];
4941
- for (let [n, r] of e.entries()) t[n] = zo(r);
5032
+ for (let [n, r] of e.entries()) t[n] = Vo(r);
4942
5033
  return t;
4943
5034
  }
4944
5035
  {
4945
5036
  let t = {};
4946
- for (let n in e) t[n] = zo(e[n]);
5037
+ for (let n in e) t[n] = Vo(e[n]);
4947
5038
  return t;
4948
5039
  }
4949
5040
  }
4950
- function Bo(e, t) {
5041
+ function Ho(e, t) {
4951
5042
  if (e === t) return !0;
4952
5043
  if (typeof e != "object" || !e || typeof e != typeof t) return !1;
4953
5044
  if (Array.isArray(e)) {
4954
5045
  if (!Array.isArray(t) || e.length !== t.length) return !1;
4955
- for (let [n, r] of e.entries()) if (!Bo(r, t[n])) return !1;
5046
+ for (let [n, r] of e.entries()) if (!Ho(r, t[n])) return !1;
4956
5047
  } else {
4957
5048
  if (Array.isArray(t)) return !1;
4958
- for (let n in e) if (!(n in t) || !Bo(e[n], t[n])) return !1;
5049
+ for (let n in e) if (!(n in t) || !Ho(e[n], t[n])) return !1;
4959
5050
  for (let n in t) if (!(n in e)) return !1;
4960
5051
  }
4961
5052
  return !0;
@@ -4968,48 +5059,48 @@ var H = Object.freeze({
4968
5059
  ContainedBy: 2,
4969
5060
  Rejection: 3,
4970
5061
  Intersection: 4
4971
- }), U = Jo(H.Equals), W = Jo(H.Containing), G = Jo(H.ContainedBy), K = Jo(H.Rejection), q = Jo(H.Intersection), Vo = Lo([
5062
+ }), U = Xo(H.Equals), W = Xo(H.Containing), G = Xo(H.ContainedBy), K = Xo(H.Rejection), q = Xo(H.Intersection), Uo = zo([
4972
5063
  [H.Equals, U],
4973
5064
  [H.Containing, W],
4974
5065
  [H.ContainedBy, G],
4975
5066
  [H.Rejection, K],
4976
5067
  [H.Intersection, q]
4977
- ]), Ho = (() => {
5068
+ ]), Wo = (() => {
4978
5069
  let e = 0;
4979
- for (let [t, n] of Vo) e |= n;
5070
+ for (let [t, n] of Uo) e |= n;
4980
5071
  return e;
4981
5072
  })();
4982
- function Uo(e) {
5073
+ function Go(e) {
4983
5074
  return !!(e & U);
4984
5075
  }
4985
- function Wo(e) {
5076
+ function Ko(e) {
4986
5077
  return !!(e & W);
4987
5078
  }
4988
- function Go(e) {
5079
+ function qo(e) {
4989
5080
  return !!(e & G);
4990
5081
  }
4991
- function Ko(e) {
5082
+ function Jo(e) {
4992
5083
  return !!(e & K);
4993
5084
  }
4994
- function qo(e) {
5085
+ function Yo(e) {
4995
5086
  return !!(e & q);
4996
5087
  }
4997
- function Jo(e) {
5088
+ function Xo(e) {
4998
5089
  return 1 << e;
4999
5090
  }
5000
5091
  //#endregion
5001
5092
  //#region src/json-schema-subset/expression/combination.ts
5002
- function Yo(e) {
5003
- let t = 0, n = 0, r = { push: (r) => (t = n === 0 ? r : Xo(t, r, e), n += 1, t) };
5093
+ function Zo(e) {
5094
+ let t = 0, n = 0, r = { push: (r) => (t = n === 0 ? r : Qo(t, r, e), n += 1, t) };
5004
5095
  return Object.defineProperties(r, {
5005
5096
  result: { get: () => t },
5006
5097
  count: { get: () => n }
5007
5098
  }), r;
5008
5099
  }
5009
- function Xo(e, t, n) {
5100
+ function Qo(e, t, n) {
5010
5101
  let r = 0;
5011
- for (let [i, a] of Vo) if (a & e) {
5012
- for (let [e, a] of Vo) if (a & t && (r |= n(i, e), r === Ho)) return r;
5102
+ for (let [i, a] of Uo) if (a & e) {
5103
+ for (let [e, a] of Uo) if (a & t && (r |= n(i, e), r === Wo)) return r;
5013
5104
  }
5014
5105
  return r;
5015
5106
  }
@@ -5023,59 +5114,59 @@ var J = Object.freeze({
5023
5114
  Not: 4,
5024
5115
  Swap: 5
5025
5116
  });
5026
- function Zo(e, t) {
5117
+ function $o(e, t) {
5027
5118
  switch (e) {
5028
5119
  case J.Save: return t[0];
5029
- case J.OneOf: return $o(t);
5120
+ case J.OneOf: return ts(t);
5030
5121
  case J.AllOf:
5031
- case J.AnyOf: return es(e, t);
5122
+ case J.AnyOf: return ns(e, t);
5032
5123
  case J.Not:
5033
- case J.Swap: return ts(e, t[0]);
5124
+ case J.Swap: return rs(e, t[0]);
5034
5125
  }
5035
5126
  }
5036
- function Qo(e) {
5037
- return ts(J.Swap, e);
5127
+ function es(e) {
5128
+ return rs(J.Swap, e);
5038
5129
  }
5039
- function $o(e) {
5130
+ function ts(e) {
5040
5131
  if (e.length === 1) return e[0];
5041
- let t = es(J.AnyOf, e), n = [];
5132
+ let t = ns(J.AnyOf, e), n = [];
5042
5133
  for (let t = 0; t < e.length; ++t) for (let r = t + 1; r < e.length; ++r) {
5043
- let i = e[t], a = e[r], o = es(J.AllOf, [i, a]);
5134
+ let i = e[t], a = e[r], o = ns(J.AllOf, [i, a]);
5044
5135
  n.push(o);
5045
5136
  }
5046
- let r = es(J.AnyOf, n), i = ts(J.Not, r);
5047
- return es(J.AllOf, [t, i]);
5137
+ let r = ns(J.AnyOf, n), i = rs(J.Not, r);
5138
+ return ns(J.AllOf, [t, i]);
5048
5139
  }
5049
- function es(e, t) {
5140
+ function ns(e, t) {
5050
5141
  if (t.length < 0) throw Error("invalid expressions: empty array");
5051
5142
  let n;
5052
5143
  switch (e) {
5053
5144
  case J.AllOf:
5054
- n = Yo(ns);
5145
+ n = Zo(is);
5055
5146
  break;
5056
5147
  case J.AnyOf:
5057
- n = Yo(rs);
5148
+ n = Zo(as);
5058
5149
  break;
5059
5150
  default: throw Error(`invalid operator ${e}`);
5060
5151
  }
5061
5152
  for (let e of t) n.push(e);
5062
5153
  return n.result;
5063
5154
  }
5064
- function ts(e, t) {
5155
+ function rs(e, t) {
5065
5156
  let n, r = 0;
5066
5157
  switch (e) {
5067
5158
  case J.Not:
5068
- n = is;
5159
+ n = os;
5069
5160
  break;
5070
5161
  case J.Swap:
5071
- n = as;
5162
+ n = ss;
5072
5163
  break;
5073
5164
  default: throw Error(`invalid operator ${e}`);
5074
5165
  }
5075
- for (let [e, i] of Vo) i & t && (r |= n(e));
5166
+ for (let [e, i] of Uo) i & t && (r |= n(e));
5076
5167
  return r;
5077
5168
  }
5078
- function ns(e, t) {
5169
+ function is(e, t) {
5079
5170
  let n = 0;
5080
5171
  switch (e) {
5081
5172
  case H.Equals:
@@ -5164,7 +5255,7 @@ function ns(e, t) {
5164
5255
  }
5165
5256
  return n;
5166
5257
  }
5167
- function rs(e, t) {
5258
+ function as(e, t) {
5168
5259
  let n = 0;
5169
5260
  switch (e) {
5170
5261
  case H.Equals:
@@ -5253,7 +5344,7 @@ function rs(e, t) {
5253
5344
  }
5254
5345
  return n;
5255
5346
  }
5256
- function is(e) {
5347
+ function os(e) {
5257
5348
  let t = 0;
5258
5349
  switch (e) {
5259
5350
  case H.Equals:
@@ -5272,7 +5363,7 @@ function is(e) {
5272
5363
  }
5273
5364
  return t;
5274
5365
  }
5275
- function as(e) {
5366
+ function ss(e) {
5276
5367
  let t = 0;
5277
5368
  switch (e) {
5278
5369
  case H.Equals:
@@ -5293,13 +5384,13 @@ function as(e) {
5293
5384
  }
5294
5385
  //#endregion
5295
5386
  //#region src/json-schema-subset/expression/types.ts
5296
- var os = Object.freeze({
5387
+ var cs = Object.freeze({
5297
5388
  Leaf: 0,
5298
5389
  Not: 1,
5299
5390
  AllOf: 2,
5300
5391
  AnyOf: 3,
5301
5392
  OneOf: 4
5302
- }), ss = (e) => (t, n) => {
5393
+ }), ls = (e) => (t, n) => {
5303
5394
  let r = {
5304
5395
  parent: null,
5305
5396
  swapped: !1,
@@ -5327,7 +5418,7 @@ var os = Object.freeze({
5327
5418
  let n = U, [r, o] = t.expressions;
5328
5419
  if (!e.equals(r, o)) {
5329
5420
  let a = e.describe(r);
5330
- if (a.kind !== os.Leaf) {
5421
+ if (a.kind !== cs.Leaf) {
5331
5422
  let [e, n] = s(a, !1);
5332
5423
  t.expressions = null, t.calculation = e;
5333
5424
  for (let [e, r] of n.entries()) i.push({
@@ -5342,7 +5433,7 @@ var os = Object.freeze({
5342
5433
  return;
5343
5434
  }
5344
5435
  let c = e.describe(o);
5345
- if (c.kind !== os.Leaf) {
5436
+ if (c.kind !== cs.Leaf) {
5346
5437
  let [e, n] = s(c, !0);
5347
5438
  t.expressions = null, t.calculation = e;
5348
5439
  for (let [e, a] of n.entries()) i.push({
@@ -5368,16 +5459,16 @@ var os = Object.freeze({
5368
5459
  function s(e, t) {
5369
5460
  let n = J.Save, r;
5370
5461
  switch (e.kind) {
5371
- case os.Not:
5462
+ case cs.Not:
5372
5463
  n = J.Not, r = [e.expression];
5373
5464
  break;
5374
- case os.AllOf:
5465
+ case cs.AllOf:
5375
5466
  n = J.AllOf, r = [...e.expressions];
5376
5467
  break;
5377
- case os.AnyOf:
5468
+ case cs.AnyOf:
5378
5469
  n = J.AnyOf, r = [...e.expressions];
5379
5470
  break;
5380
- case os.OneOf:
5471
+ case cs.OneOf:
5381
5472
  n = J.OneOf, r = [...e.expressions];
5382
5473
  break;
5383
5474
  default: throw Error(`invalid kind ${e.kind}`);
@@ -5390,8 +5481,8 @@ var os = Object.freeze({
5390
5481
  }, r];
5391
5482
  }
5392
5483
  function c(e) {
5393
- let t = e.calculation, n = e.parent, r = Zo(t.operator, t.results);
5394
- if (r === 0 && (r = G), t.willSwap && (r = Qo(r)), n) {
5484
+ let t = e.calculation, n = e.parent, r = $o(t.operator, t.results);
5485
+ if (r === 0 && (r = G), t.willSwap && (r = es(r)), n) {
5395
5486
  let e = n.node.calculation, t = e.results;
5396
5487
  t[n.index] = r, e.count += 1, e.count >= t.length && a.push(n.node);
5397
5488
  }
@@ -5399,79 +5490,79 @@ var os = Object.freeze({
5399
5490
  let l = r.calculation.results[0];
5400
5491
  if (l === 0) throw Error("cannot find result of root");
5401
5492
  return l;
5402
- }, cs = class extends Error {
5493
+ }, us = class extends Error {
5403
5494
  constructor(e = []) {
5404
- super(ds(e)), this.name = "SchemaError", this.items = e;
5495
+ super(ps(e)), this.name = "SchemaError", this.items = e;
5405
5496
  }
5406
- }, ls = Object.freeze({
5497
+ }, ds = Object.freeze({
5407
5498
  Compiled: 0,
5408
5499
  External: 1
5409
5500
  });
5410
- function us(e) {
5501
+ function fs(e) {
5411
5502
  switch (e.kind) {
5412
- case ls.Compiled: {
5503
+ case ds.Compiled: {
5413
5504
  let { message: t, path: n } = e;
5414
5505
  return `${t} (at ${n.length > 0 ? n.join(".") : "$root"})`;
5415
5506
  }
5416
- case ls.External: return String(e.error);
5507
+ case ds.External: return String(e.error);
5417
5508
  }
5418
5509
  }
5419
- function ds(e) {
5510
+ function ps(e) {
5420
5511
  switch (e.length) {
5421
5512
  case 0: return "without any items";
5422
- case 1: return us(e[0]);
5423
- default: return `${us(e[0])} ... omit the rest ${e.length - 1} items`;
5513
+ case 1: return fs(e[0]);
5514
+ default: return `${fs(e[0])} ... omit the rest ${e.length - 1} items`;
5424
5515
  }
5425
5516
  }
5426
5517
  //#endregion
5427
5518
  //#region src/json-schema-subset/compiler/common.ts
5428
- var fs = /* @__PURE__ */ new Set(/* @__PURE__ */ "type.enum.const.multipleOf.maximum.exclusiveMaximum.minimum.exclusiveMinimum.maxLength.minLength.pattern.items.additionalItems.maxItems.minItems.uniqueItems.contains.maxProperties.minProperties.required.properties.patternProperties.additionalProperties.dependencies.propertyNames.if.then.else.allOf.anyOf.oneOf.not.format.contentMediaType.contentEncoding.definitions".split("."));
5429
- function ps(e) {
5430
- return fs.has(e);
5519
+ var ms = /* @__PURE__ */ new Set(/* @__PURE__ */ "type.enum.const.multipleOf.maximum.exclusiveMaximum.minimum.exclusiveMinimum.maxLength.minLength.pattern.items.additionalItems.maxItems.minItems.uniqueItems.contains.maxProperties.minProperties.required.properties.patternProperties.additionalProperties.dependencies.propertyNames.if.then.else.allOf.anyOf.oneOf.not.format.contentMediaType.contentEncoding.definitions".split("."));
5520
+ function hs(e) {
5521
+ return ms.has(e);
5431
5522
  }
5432
- function ms(e) {
5433
- for (let t in e) if (ps(t)) return !1;
5523
+ function gs(e) {
5524
+ for (let t in e) if (hs(t)) return !1;
5434
5525
  return !0;
5435
5526
  }
5436
- function hs(e, ...t) {
5527
+ function _s(e, ...t) {
5437
5528
  return {
5438
5529
  ...e,
5439
5530
  path: [...e.path, ...t]
5440
5531
  };
5441
5532
  }
5442
- function gs(e) {
5533
+ function vs(e) {
5443
5534
  if (typeof e == "boolean") throw Error("JSONSchema7Definition cannot be boolean");
5444
5535
  return e;
5445
5536
  }
5446
- function _s({ path: e, errors: t }, n, ...r) {
5447
- t.push(vs(e, r, n));
5537
+ function ys({ path: e, errors: t }, n, ...r) {
5538
+ t.push(bs(e, r, n));
5448
5539
  }
5449
5540
  function Y({ path: e, warns: t }, n, ...r) {
5450
- t.push(vs(e, r, n));
5541
+ t.push(bs(e, r, n));
5451
5542
  }
5452
- function vs(e, t, n) {
5543
+ function bs(e, t, n) {
5453
5544
  return {
5454
- kind: ls.Compiled,
5545
+ kind: ds.Compiled,
5455
5546
  message: n,
5456
5547
  path: [...e, ...t]
5457
5548
  };
5458
5549
  }
5459
5550
  //#endregion
5460
5551
  //#region src/json-schema-subset/compiler/utils.ts
5461
- function ys(e) {
5552
+ function xs(e) {
5462
5553
  for (let t in e) {
5463
5554
  let n = e[t];
5464
- n === void 0 ? delete e[t] : n && typeof n == "object" && (Array.isArray(n) ? n.length === 0 && delete e[t] : bs(n) && delete e[t]);
5555
+ n === void 0 ? delete e[t] : n && typeof n == "object" && (Array.isArray(n) ? n.length === 0 && delete e[t] : Ss(n) && delete e[t]);
5465
5556
  }
5466
5557
  return e;
5467
5558
  }
5468
- function bs(e) {
5559
+ function Ss(e) {
5469
5560
  for (let t in e) return !1;
5470
5561
  return !0;
5471
5562
  }
5472
5563
  //#endregion
5473
5564
  //#region src/json-schema-subset/compiler/wrapper.ts
5474
- var xs = Symbol("compiledId"), Ss = Symbol("compiledKind"), Cs = Symbol("compiledPath"), ws = Symbol("validatorLoader"), X = Object.freeze({
5565
+ var Cs = Symbol("compiledId"), ws = Symbol("compiledKind"), Ts = Symbol("compiledPath"), Es = Symbol("validatorLoader"), X = Object.freeze({
5475
5566
  Extends: 0,
5476
5567
  Never: 1,
5477
5568
  Any: 2,
@@ -5484,62 +5575,62 @@ var xs = Symbol("compiledId"), Ss = Symbol("compiledKind"), Cs = Symbol("compile
5484
5575
  Not: 9,
5485
5576
  Combination: 10,
5486
5577
  EnumOrConst: 11
5487
- }), Ts = Lo(Ps(X.Any, Io(), {}, () => () => !0)), Es = Lo(Ps(X.Never, Io(), {
5578
+ }), Ds = zo(Is(X.Any, Ro(), {}, () => () => !0)), Os = zo(Is(X.Never, Ro(), {
5488
5579
  type: "string",
5489
5580
  maxLength: 0,
5490
5581
  minLength: 1
5491
5582
  }, () => () => !1));
5492
- function Ds(e) {
5493
- return typeof e != "object" || !e ? !1 : xs in e;
5583
+ function ks(e) {
5584
+ return typeof e != "object" || !e ? !1 : Cs in e;
5494
5585
  }
5495
- function Os(e) {
5496
- return typeof e != "object" || !e ? !1 : xs in e && Ss in e;
5586
+ function As(e) {
5587
+ return typeof e != "object" || !e ? !1 : Cs in e && ws in e;
5497
5588
  }
5498
5589
  function Z(e) {
5499
- return Os(e) ? e[Ss] : X.Extends;
5590
+ return As(e) ? e[ws] : X.Extends;
5500
5591
  }
5501
- function ks(e) {
5502
- return Os(e) || Ds(e) ? e[xs] : e.id;
5592
+ function js(e) {
5593
+ return As(e) || ks(e) ? e[Cs] : e.id;
5503
5594
  }
5504
- function As(e) {
5505
- return Os(e) ? e[Cs] : void 0;
5595
+ function Ms(e) {
5596
+ return As(e) ? e[Ts] : void 0;
5506
5597
  }
5507
- function js(e) {
5508
- return typeof e != "object" || !e || Object.defineProperty(e, xs, {
5509
- value: Io(),
5598
+ function Ns(e) {
5599
+ return typeof e != "object" || !e || Object.defineProperty(e, Cs, {
5600
+ value: Ro(),
5510
5601
  configurable: !1,
5511
5602
  writable: !1,
5512
5603
  enumerable: !1
5513
5604
  }), e;
5514
5605
  }
5515
- function Ms(e, t, n, r = []) {
5516
- return Ps(e, Io(), t, n && (() => n.compile(t)), r);
5606
+ function Ps(e, t, n, r = []) {
5607
+ return Is(e, Ro(), t, n && (() => n.compile(t)), r);
5517
5608
  }
5518
- function Ns(e) {
5519
- return Ps(X.Never, Io(), { ...e }, e[ws], e[Cs]);
5609
+ function Fs(e) {
5610
+ return Is(X.Never, Ro(), { ...e }, e[Es], e[Ts]);
5520
5611
  }
5521
- function Ps(e, t, n, r, i = []) {
5612
+ function Is(e, t, n, r, i = []) {
5522
5613
  let a = null;
5523
5614
  return Object.defineProperties(n, {
5524
- [Ss]: {
5615
+ [ws]: {
5525
5616
  value: e,
5526
5617
  configurable: !1,
5527
5618
  writable: !1,
5528
5619
  enumerable: !1
5529
5620
  },
5530
- [xs]: {
5621
+ [Cs]: {
5531
5622
  value: t,
5532
5623
  configurable: !1,
5533
5624
  writable: !1,
5534
5625
  enumerable: !1
5535
5626
  },
5536
- [Cs]: {
5627
+ [Ts]: {
5537
5628
  value: i,
5538
5629
  configurable: !1,
5539
5630
  writable: !1,
5540
5631
  enumerable: !1
5541
5632
  },
5542
- [ws]: {
5633
+ [Es]: {
5543
5634
  value: r,
5544
5635
  configurable: !1,
5545
5636
  writable: !1,
@@ -5556,16 +5647,16 @@ function Ps(e, t, n, r, i = []) {
5556
5647
  }
5557
5648
  //#endregion
5558
5649
  //#region src/json-schema-subset/compiler/array.ts
5559
- function Fs(e, t) {
5560
- let n = Is(e, t), r = Ls(e, "maxItems", t), i = Ls(e, "minItems", t), a = Rs(e, t), o = t.uniqueItems, s;
5561
- if (Array.isArray(n) ? s = zs(e, t) : t.additionalItems && Y(e, "it is needless when items is not array", "additionalItems"), !n || !a || s === null) return null;
5650
+ function Ls(e, t) {
5651
+ let n = Rs(e, t), r = zs(e, "maxItems", t), i = zs(e, "minItems", t), a = Bs(e, t), o = t.uniqueItems, s;
5652
+ if (Array.isArray(n) ? s = Vs(e, t) : t.additionalItems && Y(e, "it is needless when items is not array", "additionalItems"), !n || !a || s === null) return null;
5562
5653
  let c = !1, l = !1;
5563
5654
  if (Array.isArray(n)) {
5564
- r !== void 0 && r <= n.length && (n = n.splice(r), s = Bs(s, e.delegate));
5655
+ r !== void 0 && r <= n.length && (n = n.splice(r), s = Hs(s, e.delegate));
5565
5656
  let t = n.findIndex((e) => Z(e) === X.Never);
5566
- t !== -1 && (n = n.splice(t), s = Bs(s, e.delegate), r === void 0 && (r = n.length, l = !0)), i !== void 0 && n.length < i && (Y(e, `length(${n.length}) of items if less than minItems(${i})`), c = !0), n.length === 0 && s && Z(s) === X.Never && (c = !0);
5657
+ t !== -1 && (n = n.splice(t), s = Hs(s, e.delegate), r === void 0 && (r = n.length, l = !0)), i !== void 0 && n.length < i && (Y(e, `length(${n.length}) of items if less than minItems(${i})`), c = !0), n.length === 0 && s && Z(s) === X.Never && (c = !0);
5567
5658
  } else Z(n) === X.Never && (c = !0);
5568
- return r !== void 0 && i !== void 0 && r < i && (l || Y(e, `maxItems(${r}) is less than minItems(${i})`), c = !0), Ms(c ? X.Never : X.Array, ys({
5659
+ return r !== void 0 && i !== void 0 && r < i && (l || Y(e, `maxItems(${r}) is less than minItems(${i})`), c = !0), Ps(c ? X.Never : X.Array, xs({
5569
5660
  type: "array",
5570
5661
  items: n,
5571
5662
  contains: a,
@@ -5575,12 +5666,12 @@ function Fs(e, t) {
5575
5666
  additionalItems: s
5576
5667
  }), e.delegate, e.path);
5577
5668
  }
5578
- function Is(e, { items: t }) {
5579
- if (!t) return Ms(X.Any, {}, e.delegate, e.path);
5669
+ function Rs(e, { items: t }) {
5670
+ if (!t) return Ps(X.Any, {}, e.delegate, e.path);
5580
5671
  if (Array.isArray(t)) {
5581
5672
  let n = [], r = !1;
5582
5673
  for (let [i, a] of t.entries()) {
5583
- let t = bc(hs(e, "items", i), gs(a));
5674
+ let t = Sc(_s(e, "items", i), vs(a));
5584
5675
  if (!t) {
5585
5676
  r = !0;
5586
5677
  continue;
@@ -5589,9 +5680,9 @@ function Is(e, { items: t }) {
5589
5680
  }
5590
5681
  return r ? null : n;
5591
5682
  }
5592
- return bc(hs(e, "items"), gs(t));
5683
+ return Sc(_s(e, "items"), vs(t));
5593
5684
  }
5594
- function Ls(e, t, n) {
5685
+ function zs(e, t, n) {
5595
5686
  let r = n[t];
5596
5687
  if (r !== void 0) {
5597
5688
  if (Number.isNaN(r)) {
@@ -5605,35 +5696,35 @@ function Ls(e, t, n) {
5605
5696
  return r;
5606
5697
  }
5607
5698
  }
5608
- function Rs(e, { contains: t }) {
5609
- return t ? bc(hs(e, "contains"), gs(t)) : Ms(X.Any, {}, e.delegate, e.path);
5699
+ function Bs(e, { contains: t }) {
5700
+ return t ? Sc(_s(e, "contains"), vs(t)) : Ps(X.Any, {}, e.delegate, e.path);
5610
5701
  }
5611
- function zs(e, { additionalItems: t }) {
5702
+ function Vs(e, { additionalItems: t }) {
5612
5703
  switch (typeof t) {
5613
- case "boolean": return t ? Ms(X.Any, {}, e.delegate, e.path) : !1;
5614
- case "object": return bc(hs(e, "additionalItems"), t);
5615
- default: return Ms(X.Any, {}, e.delegate, e.path);
5704
+ case "boolean": return t ? Ps(X.Any, {}, e.delegate, e.path) : !1;
5705
+ case "object": return Sc(_s(e, "additionalItems"), t);
5706
+ default: return Ps(X.Any, {}, e.delegate, e.path);
5616
5707
  }
5617
5708
  }
5618
- function Bs(e, t) {
5619
- return e === void 0 ? Ms(X.Never, {
5709
+ function Hs(e, t) {
5710
+ return e === void 0 ? Ps(X.Never, {
5620
5711
  type: "string",
5621
5712
  maxLength: 0,
5622
5713
  minLength: 1
5623
- }, t) : Os(e) ? Z(e) === X.Never ? e : Ns(e) : e;
5714
+ }, t) : As(e) ? Z(e) === X.Never ? e : Fs(e) : e;
5624
5715
  }
5625
5716
  //#endregion
5626
5717
  //#region src/json-schema-subset/compiler/combination.ts
5627
- var Vs = Object.freeze([
5718
+ var Us = Object.freeze([
5628
5719
  "allOf",
5629
5720
  "anyOf",
5630
5721
  "oneOf"
5631
5722
  ]);
5632
- function Hs(e, t, n, r) {
5633
- if (n.length === 0) return _s(e, "disable empty list", t), null;
5723
+ function Ws(e, t, n, r) {
5724
+ if (n.length === 0) return ys(e, "disable empty list", t), null;
5634
5725
  let i = [];
5635
5726
  for (let [r, a] of n.entries()) {
5636
- let n = bc(hs(e, t, r), gs(a));
5727
+ let n = Sc(_s(e, t, r), vs(a));
5637
5728
  n && i.push(n);
5638
5729
  }
5639
5730
  if (i.length < n.length) return null;
@@ -5647,16 +5738,16 @@ function Hs(e, t, n, r) {
5647
5738
  let s = X.Combination;
5648
5739
  switch (t) {
5649
5740
  case "allOf":
5650
- o > 0 ? s = X.Never : a === i.length ? s = X.Any : Us(i) || (s = X.Never);
5741
+ o > 0 ? s = X.Never : a === i.length ? s = X.Any : Gs(i) || (s = X.Never);
5651
5742
  break;
5652
5743
  case "anyOf":
5653
5744
  a > 0 ? s = X.Any : o === i.length && (s = X.Never);
5654
5745
  break;
5655
5746
  case "oneOf": a > 1 || o === i.length ? s = X.Never : a === 1 && o === i.length - 1 && (s = X.Any);
5656
5747
  }
5657
- return Ms(s, { [t]: i }, r, e.path);
5748
+ return Ps(s, { [t]: i }, r, e.path);
5658
5749
  }
5659
- function Us(e) {
5750
+ function Gs(e) {
5660
5751
  let t = null;
5661
5752
  for (let n of e) {
5662
5753
  let e = Z(n);
@@ -5671,35 +5762,35 @@ function Us(e) {
5671
5762
  }
5672
5763
  //#endregion
5673
5764
  //#region src/json-schema-subset/checker/validator.ts
5674
- var Ws = Object.freeze({
5765
+ var Ks = Object.freeze({
5675
5766
  Valid: 0,
5676
5767
  Invalid: 1,
5677
5768
  Unknown: 2
5678
5769
  });
5679
- function Gs(e, t) {
5770
+ function qs(e, t) {
5680
5771
  let n = e.isValid;
5681
- return n ? n(t) === !0 ? Ws.Valid : Ws.Invalid : Ws.Unknown;
5772
+ return n ? n(t) === !0 ? Ks.Valid : Ks.Invalid : Ks.Unknown;
5682
5773
  }
5683
5774
  //#endregion
5684
5775
  //#region src/json-schema-subset/compiler/enumAndConst.ts
5685
- function Ks(e, t, n, r) {
5776
+ function Js(e, t, n, r) {
5686
5777
  let i, a = !1;
5687
5778
  if (t) {
5688
- if (t.length === 0) return _s(e, "disable empty list", "enum"), null;
5779
+ if (t.length === 0) return ys(e, "disable empty list", "enum"), null;
5689
5780
  i = [];
5690
- for (let [n, a] of t.entries()) switch (Gs(r, a)) {
5691
- case Ws.Valid:
5692
- i.push(js(a));
5781
+ for (let [n, a] of t.entries()) switch (qs(r, a)) {
5782
+ case Ks.Valid:
5783
+ i.push(Ns(a));
5693
5784
  break;
5694
- case Ws.Invalid: Y(e, "cannot pass JSON schema of currently schema object", "enum", n);
5785
+ case Ks.Invalid: Y(e, "cannot pass JSON schema of currently schema object", "enum", n);
5695
5786
  }
5696
5787
  i.length === 0 && Y(e, "all of elements from list is rejected by currently schema object", "enum");
5697
5788
  }
5698
- if (n && Gs(r, n) === Ws.Invalid && (a = !0), i) {
5789
+ if (n && qs(r, n) === Ks.Invalid && (a = !0), i) {
5699
5790
  if (i.length === 0) a = !0;
5700
5791
  else if (n) {
5701
5792
  let e = !1;
5702
- for (let t of i) if (Bo(t, n)) {
5793
+ for (let t of i) if (Ho(t, n)) {
5703
5794
  e = !0;
5704
5795
  break;
5705
5796
  }
@@ -5707,11 +5798,11 @@ function Ks(e, t, n, r) {
5707
5798
  }
5708
5799
  }
5709
5800
  let o = a ? X.Never : X.EnumOrConst, s = {};
5710
- return r.type && (s.type = r.type), i && (s.enum = i), n && (s.const = js(zo(n))), Ms(o, s, e.delegate, e.path);
5801
+ return r.type && (s.type = r.type), i && (s.enum = i), n && (s.const = Ns(Vo(n))), Ps(o, s, e.delegate, e.path);
5711
5802
  }
5712
5803
  //#endregion
5713
5804
  //#region src/json-schema-subset/compiler/object.ts
5714
- var qs = /* @__PURE__ */ new Set([
5805
+ var Ys = /* @__PURE__ */ new Set([
5715
5806
  "type",
5716
5807
  "maxProperties",
5717
5808
  "minProperties",
@@ -5722,27 +5813,27 @@ var qs = /* @__PURE__ */ new Set([
5722
5813
  "dependencies",
5723
5814
  "propertyNames"
5724
5815
  ]);
5725
- function Js(e, t) {
5726
- let n = Object.keys(t).filter((e) => !qs.has(e) && ps(e));
5816
+ function Xs(e, t) {
5817
+ let n = Object.keys(t).filter((e) => !Ys.has(e) && hs(e));
5727
5818
  n.length > 0 && Y(e, `type="object" will exclude other keys: ${n.toSorted().join(", ")}`);
5728
- let r = Ys(e, "maxProperties", t), i = Ys(e, "minProperties", t), a = Xs(e, t), o = Zs(e, t), s = Qs(e, t), c = ec(e, t);
5819
+ let r = Zs(e, "maxProperties", t), i = Zs(e, "minProperties", t), a = Qs(e, t), o = $s(e, t), s = ec(e, t), c = nc(e, t);
5729
5820
  if (!a || !o || !s || !c) return null;
5730
- let l = $s(e, o, s, t);
5821
+ let l = tc(e, o, s, t);
5731
5822
  if (!l) return null;
5732
- let u = nc(e, tc(a, o, s, l), c, t);
5733
- return Ms(rc(e, a, l, u, r, i) ? X.Never : X.Object, ys({
5823
+ let u = ic(e, rc(a, o, s, l), c, t);
5824
+ return Ps(ac(e, a, l, u, r, i) ? X.Never : X.Object, xs({
5734
5825
  type: "object",
5735
5826
  required: u,
5736
5827
  properties: l,
5737
5828
  minProperties: i,
5738
5829
  maxProperties: r,
5739
5830
  additionalProperties: a,
5740
- patternProperties: cc(o),
5741
- dependencies: lc(c, t),
5831
+ patternProperties: uc(o),
5832
+ dependencies: dc(c, t),
5742
5833
  propertyNames: s
5743
5834
  }), e.delegate, e.path);
5744
5835
  }
5745
- function Ys(e, t, n) {
5836
+ function Zs(e, t, n) {
5746
5837
  let r = n[t];
5747
5838
  if (r !== void 0) {
5748
5839
  if (Number.isNaN(r)) {
@@ -5756,22 +5847,22 @@ function Ys(e, t, n) {
5756
5847
  return r;
5757
5848
  }
5758
5849
  }
5759
- function Xs(e, { additionalProperties: t }) {
5760
- return t === !1 ? Ms(X.Never, {
5850
+ function Qs(e, { additionalProperties: t }) {
5851
+ return t === !1 ? Ps(X.Never, {
5761
5852
  type: "string",
5762
5853
  maxLength: 0,
5763
5854
  minLength: 1
5764
- }, e.delegate, e.path) : typeof t == "object" ? bc(hs(e, "additionalProperties"), gs(t)) : Ms(X.Any, {}, e.delegate, e.path);
5855
+ }, e.delegate, e.path) : typeof t == "object" ? Sc(_s(e, "additionalProperties"), vs(t)) : Ps(X.Any, {}, e.delegate, e.path);
5765
5856
  }
5766
- function Zs(e, { patternProperties: t }) {
5857
+ function $s(e, { patternProperties: t }) {
5767
5858
  let n = !1, r = {};
5768
5859
  for (let i in t) {
5769
- let a = sc(i);
5860
+ let a = lc(i);
5770
5861
  if (a instanceof Error) {
5771
5862
  Y(e, `property name invalid. ${i}`, "patternProperties", i);
5772
5863
  continue;
5773
5864
  }
5774
- let o = gs(t[i]), s = bc(hs(e, "patternProperties", i), o);
5865
+ let o = vs(t[i]), s = Sc(_s(e, "patternProperties", i), o);
5775
5866
  if (!s) {
5776
5867
  n = !0;
5777
5868
  continue;
@@ -5780,29 +5871,29 @@ function Zs(e, { patternProperties: t }) {
5780
5871
  }
5781
5872
  return n ? null : r;
5782
5873
  }
5783
- function Qs(e, { propertyNames: t }) {
5784
- if (!t) return Ms(X.Any, {}, e.delegate, e.path);
5785
- t = gs(t);
5786
- let n = bc(hs(e, "propertyNames"), t);
5874
+ function ec(e, { propertyNames: t }) {
5875
+ if (!t) return Ps(X.Any, {}, e.delegate, e.path);
5876
+ t = vs(t);
5877
+ let n = Sc(_s(e, "propertyNames"), t);
5787
5878
  if (!n) return null;
5788
5879
  let r = Z(n);
5789
- return r !== X.String && r !== X.Any ? Ns(n) : n;
5880
+ return r !== X.String && r !== X.Any ? Fs(n) : n;
5790
5881
  }
5791
- function $s(e, t, n, { properties: r }) {
5882
+ function tc(e, t, n, { properties: r }) {
5792
5883
  let i = !1;
5793
5884
  if (!r) return {};
5794
5885
  let a = {};
5795
5886
  for (let o in r) {
5796
- if (Gs(n, o) === Ws.Invalid) {
5887
+ if (qs(n, o) === Ks.Invalid) {
5797
5888
  Y(e, `key ${JSON.stringify(o)} cannot pass JSON schema from propertyNames`, "properties");
5798
5889
  continue;
5799
5890
  }
5800
- let s = oc(t, o);
5891
+ let s = cc(t, o);
5801
5892
  if (s && Z(s) === X.Never) {
5802
5893
  Y(e, `key ${JSON.stringify(o)} matches a pattern that has a impossible(never) schema`, "properties");
5803
5894
  continue;
5804
5895
  }
5805
- let c = gs(r[o]), l = bc(hs(e, "properties", o), c);
5896
+ let c = vs(r[o]), l = Sc(_s(e, "properties", o), c);
5806
5897
  if (!l) {
5807
5898
  i = !0;
5808
5899
  continue;
@@ -5811,40 +5902,40 @@ function $s(e, t, n, { properties: r }) {
5811
5902
  }
5812
5903
  return i ? null : a;
5813
5904
  }
5814
- function ec(e, { dependencies: t }) {
5905
+ function nc(e, { dependencies: t }) {
5815
5906
  if (!t) return [{}, {}];
5816
5907
  let n = {}, r = {};
5817
5908
  for (let i in t) {
5818
- let a = gs(t[i]);
5909
+ let a = vs(t[i]);
5819
5910
  if (Array.isArray(a)) {
5820
- let { keys: t, duplicated: r } = ac(a);
5911
+ let { keys: t, duplicated: r } = sc(a);
5821
5912
  r && Y(e, `found duplicated property names: ${r.join(", ")}`, "dependencies", i), n[i] = t;
5822
5913
  } else {
5823
- let t = bc(hs(e, "dependencies", i), a);
5914
+ let t = Sc(_s(e, "dependencies", i), a);
5824
5915
  if (t) {
5825
5916
  let e = Z(t);
5826
- r[i] = e === X.Object || e === X.Any ? t : e === X.Extends ? Es : Ns(t);
5917
+ r[i] = e === X.Object || e === X.Any ? t : e === X.Extends ? Os : Fs(t);
5827
5918
  }
5828
5919
  }
5829
5920
  }
5830
5921
  return [n, r];
5831
5922
  }
5832
- function tc(e, t, n, r) {
5923
+ function rc(e, t, n, r) {
5833
5924
  return (i) => {
5834
- if (Gs(n, i) === Ws.Invalid) return !0;
5835
- let a = oc(t, i);
5925
+ if (qs(n, i) === Ks.Invalid) return !0;
5926
+ let a = cc(t, i);
5836
5927
  return !!(a && Z(a) === X.Never || Z(r[i] ?? e) === X.Never);
5837
5928
  };
5838
5929
  }
5839
- function nc(e, t, n, { required: r }) {
5930
+ function ic(e, t, n, { required: r }) {
5840
5931
  if (!r) return [];
5841
- let i = ac(r);
5932
+ let i = sc(r);
5842
5933
  i.duplicated && Y(e, `found duplicated required keys: ${i.duplicated.join(", ")}`, "required");
5843
5934
  let a = [], o = [];
5844
- for (let e of i.keys) ic(n, e).some((e) => t(e)) ? o.push(e) : a.push(e);
5935
+ for (let e of i.keys) oc(n, e).some((e) => t(e)) ? o.push(e) : a.push(e);
5845
5936
  return o.length > 0 && Y(e, `key ${o.map((e) => JSON.stringify(e)).join(", ")} will ban by another condition`, "required"), a;
5846
5937
  }
5847
- function rc(e, t, n, r, i, a) {
5938
+ function ac(e, t, n, r, i, a) {
5848
5939
  if (i !== void 0 && a !== void 0 && i < a) return Y(e, `maxProperties(${i}) is less than minProperties(${a})`), !0;
5849
5940
  if (i !== void 0 && r.length > i) return Y(e, `length(${r.length}) of required is greater than maxProperties(${i})`), !0;
5850
5941
  if (a !== void 0 && r.length < a) return Y(e, `length(${r.length}) of required is less than minProperties(${a})`), !0;
@@ -5855,7 +5946,7 @@ function rc(e, t, n, r, i, a) {
5855
5946
  }
5856
5947
  return !0;
5857
5948
  }
5858
- function ic([e, t], n) {
5949
+ function oc([e, t], n) {
5859
5950
  let r = [n], i = new Set(r);
5860
5951
  for (; r.length > 0;) {
5861
5952
  let n = r.pop(), i = t[n], o = e[n];
@@ -5866,7 +5957,7 @@ function ic([e, t], n) {
5866
5957
  }
5867
5958
  return [...i];
5868
5959
  }
5869
- function ac(e) {
5960
+ function sc(e) {
5870
5961
  let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
5871
5962
  for (let r of e) t.has(r) ? n.add(r) : t.add(r);
5872
5963
  return n.size === 0 ? {
@@ -5877,14 +5968,14 @@ function ac(e) {
5877
5968
  duplicated: [...n]
5878
5969
  };
5879
5970
  }
5880
- function oc(e, t) {
5971
+ function cc(e, t) {
5881
5972
  for (let n in e) {
5882
5973
  let [r, i] = e[n];
5883
5974
  if (i.test(t)) return r;
5884
5975
  }
5885
5976
  return null;
5886
5977
  }
5887
- function sc(e) {
5978
+ function lc(e) {
5888
5979
  try {
5889
5980
  return new RegExp(e, "i");
5890
5981
  } catch (e) {
@@ -5892,12 +5983,12 @@ function sc(e) {
5892
5983
  throw e;
5893
5984
  }
5894
5985
  }
5895
- function cc(e) {
5986
+ function uc(e) {
5896
5987
  let t = {};
5897
5988
  for (let n in e) t[n] = e[n][0];
5898
5989
  return t;
5899
5990
  }
5900
- function lc([e, t], { dependencies: n }) {
5991
+ function dc([e, t], { dependencies: n }) {
5901
5992
  let r = {};
5902
5993
  for (let i in n) {
5903
5994
  let n = e[i], a = t[i];
@@ -5907,38 +5998,38 @@ function lc([e, t], { dependencies: n }) {
5907
5998
  }
5908
5999
  //#endregion
5909
6000
  //#region src/json-schema-subset/compiler/primitive.ts
5910
- var uc = /* @__PURE__ */ new Set([
6001
+ var fc = /* @__PURE__ */ new Set([
5911
6002
  "type",
5912
6003
  "multipleOf",
5913
6004
  "maximum",
5914
6005
  "exclusiveMaximum",
5915
6006
  "minimum",
5916
6007
  "exclusiveMinimum"
5917
- ]), dc = /* @__PURE__ */ new Set([
6008
+ ]), pc = /* @__PURE__ */ new Set([
5918
6009
  "type",
5919
6010
  "maxLength",
5920
6011
  "minLength",
5921
6012
  "pattern"
5922
6013
  ]);
5923
- function fc(e, t) {
6014
+ function mc(e, t) {
5924
6015
  let { type: n } = t;
5925
6016
  switch (n) {
5926
6017
  case "number":
5927
- case "integer": return pc(e, t);
5928
- case "string": return hc(e, t);
6018
+ case "integer": return hc(e, t);
6019
+ case "string": return _c(e, t);
5929
6020
  case "boolean":
5930
6021
  case "null": {
5931
- let r = Object.keys(t).filter((e) => ps(e) && e !== "type");
5932
- return r.length > 0 && Y(e, `key "type" will exclude other keys: ${r.toSorted().join(", ")}`), Ms(n === "null" ? X.Null : X.Boolean, { type: n }, e.delegate, e.path);
6022
+ let r = Object.keys(t).filter((e) => hs(e) && e !== "type");
6023
+ return r.length > 0 && Y(e, `key "type" will exclude other keys: ${r.toSorted().join(", ")}`), Ps(n === "null" ? X.Null : X.Boolean, { type: n }, e.delegate, e.path);
5933
6024
  }
5934
- default: return _s(e, `invalid type ${JSON.stringify(n)}`), null;
6025
+ default: return ys(e, `invalid type ${JSON.stringify(n)}`), null;
5935
6026
  }
5936
6027
  }
5937
- function pc(e, t) {
5938
- let n = Object.keys(t).filter((e) => !uc.has(e) && ps(e));
6028
+ function hc(e, t) {
6029
+ let n = Object.keys(t).filter((e) => !fc.has(e) && hs(e));
5939
6030
  n.length > 0 && Y(e, `type=${JSON.stringify(t.type)} will exclude other keys: ${n.toSorted().join(", ")}`);
5940
- let r = Ro(t, uc);
5941
- for (let t of uc) {
6031
+ let r = Bo(t, fc);
6032
+ for (let t of fc) {
5942
6033
  let n = r[t];
5943
6034
  t !== "type" && n !== void 0 && Number.isNaN(n) && (Y(e, "found NaN", t), delete r[t]);
5944
6035
  }
@@ -5947,38 +6038,38 @@ function pc(e, t) {
5947
6038
  let { multipleOf: c } = r;
5948
6039
  c === 0 && (delete r.multipleOf, r.type = "number", Y(e, "cannot be 0", "multipleOf"));
5949
6040
  let l = X.Numeric;
5950
- return mc(r) || (l = X.Never), Ms(l, r, e.delegate, e.path);
6041
+ return gc(r) || (l = X.Never), Ps(l, r, e.delegate, e.path);
5951
6042
  }
5952
- function mc(e) {
6043
+ function gc(e) {
5953
6044
  let { maximum: t, exclusiveMaximum: n, minimum: r, exclusiveMinimum: i } = e;
5954
6045
  return t !== void 0 && r !== void 0 ? t >= r : n !== void 0 && r !== void 0 ? n > r : t !== void 0 && i !== void 0 ? t > i : n !== void 0 && i !== void 0 ? n > i : !0;
5955
6046
  }
5956
- function hc(e, t) {
5957
- let n = Object.keys(t).filter((e) => !dc.has(e) && ps(e));
6047
+ function _c(e, t) {
6048
+ let n = Object.keys(t).filter((e) => !pc.has(e) && hs(e));
5958
6049
  n.length > 0 && Y(e, `type="string" will exclude other keys: ${n.toSorted().join(", ")}`);
5959
- let r = Ro(t, dc);
5960
- gc(e, r, "maxLength"), gc(e, r, "minLength");
6050
+ let r = Bo(t, pc);
6051
+ vc(e, r, "maxLength"), vc(e, r, "minLength");
5961
6052
  let i = r.maxLength, a = r.minLength, o = X.String;
5962
- return i !== void 0 && (i < 0 || i !== void 0 && a !== void 0 && i < a) && (o = X.Never), Ms(o, r, e.delegate, e.path);
6053
+ return i !== void 0 && (i < 0 || i !== void 0 && a !== void 0 && i < a) && (o = X.Never), Ps(o, r, e.delegate, e.path);
5963
6054
  }
5964
- function gc(e, t, n) {
6055
+ function vc(e, t, n) {
5965
6056
  let r = t[n];
5966
6057
  r !== void 0 && Number.isNaN(r) && (Y(e, "found NaN", n), delete t[n]);
5967
6058
  }
5968
6059
  //#endregion
5969
6060
  //#region src/json-schema-subset/compiler/compiler.ts
5970
- var _c = Object.freeze([]);
5971
- function vc(e, t, n, r) {
5972
- if (Os(e) || t.isExtendsSchema(e)) return {
6061
+ var yc = Object.freeze([]);
6062
+ function bc(e, t, n, r) {
6063
+ if (As(e) || t.isExtendsSchema(e)) return {
5973
6064
  schema: e,
5974
- warns: _c
6065
+ warns: yc
5975
6066
  };
5976
6067
  if (r) {
5977
6068
  let t = r.isSchema(e);
5978
6069
  if (typeof t == "object") {
5979
6070
  let e = [];
5980
6071
  for (let n of t) e.push({
5981
- kind: ls.External,
6072
+ kind: ds.External,
5982
6073
  error: n
5983
6074
  });
5984
6075
  if (e.length > 0) return e;
@@ -5991,19 +6082,19 @@ function vc(e, t, n, r) {
5991
6082
  path: [],
5992
6083
  errors: [],
5993
6084
  warns: []
5994
- }, a = bc(i, e);
5995
- if (a) yc(i.errors.length === 0, "found errors (it should be empty)");
5996
- else return yc(i.errors.length > 0, "cannot found any errors"), i.errors;
6085
+ }, a = Sc(i, e);
6086
+ if (a) xc(i.errors.length === 0, "found errors (it should be empty)");
6087
+ else return xc(i.errors.length > 0, "cannot found any errors"), i.errors;
5997
6088
  return {
5998
6089
  schema: a,
5999
6090
  warns: i.warns
6000
6091
  };
6001
6092
  }
6002
- function yc(e, t) {
6093
+ function xc(e, t) {
6003
6094
  if (!e) throw Error(t);
6004
6095
  }
6005
- function bc(e, t) {
6006
- if (e.extends.isExtendsSchema(t) || Os(t)) return t;
6096
+ function Sc(e, t) {
6097
+ if (e.extends.isExtendsSchema(t) || As(t)) return t;
6007
6098
  let n = e.extends.tryCompiledExtendsSchema(t, e.payload);
6008
6099
  if (n) return n;
6009
6100
  let r = t, i = !1, { enum: a, const: o } = t;
@@ -6011,23 +6102,23 @@ function bc(e, t) {
6011
6102
  let { enum: e, const: n, ...a } = t;
6012
6103
  r = a, i = !0;
6013
6104
  }
6014
- let s = xc(e, r);
6015
- return s && i && (s = Ks(e, a, o, s)), s || null;
6105
+ let s = Cc(e, r);
6106
+ return s && i && (s = Js(e, a, o, s)), s || null;
6016
6107
  }
6017
- function xc(e, t) {
6018
- for (let n of Vs) {
6108
+ function Cc(e, t) {
6109
+ for (let n of Us) {
6019
6110
  let r = t[n];
6020
6111
  if (r) {
6021
- let i = Object.keys(t).filter((e) => ps(e) && e !== n);
6022
- return i.length > 0 && Y(e, `composition key ${JSON.stringify(n)} will exclude other keys: ${i.toSorted().join(", ")}`), Hs(e, n, r) || null;
6112
+ let i = Object.keys(t).filter((e) => hs(e) && e !== n);
6113
+ return i.length > 0 && Y(e, `composition key ${JSON.stringify(n)} will exclude other keys: ${i.toSorted().join(", ")}`), Ws(e, n, r) || null;
6023
6114
  }
6024
6115
  }
6025
6116
  {
6026
- let n = gs(t.not);
6117
+ let n = vs(t.not);
6027
6118
  if (n) {
6028
- let r = Object.keys(t).filter((e) => ps(e) && e !== "not");
6119
+ let r = Object.keys(t).filter((e) => hs(e) && e !== "not");
6029
6120
  r.length > 0 && Y(e, `key "not" will exclude other keys: ${r.toSorted().join(", ")}`);
6030
- let i = bc(hs(e, "not"), n);
6121
+ let i = Sc(_s(e, "not"), n);
6031
6122
  if (!i) return null;
6032
6123
  let a = X.Not;
6033
6124
  switch (Z(i)) {
@@ -6036,33 +6127,33 @@ function xc(e, t) {
6036
6127
  break;
6037
6128
  case X.Any: a = X.Never;
6038
6129
  }
6039
- return Ms(a, { not: i }, e.delegate, e.path);
6130
+ return Ps(a, { not: i }, e.delegate, e.path);
6040
6131
  }
6041
6132
  }
6042
6133
  if (t.type) {
6043
6134
  let { type: n } = t;
6044
6135
  if (Array.isArray(n)) {
6045
6136
  let { type: r, ...i } = t;
6046
- return Hs(e, "anyOf", n.map((e) => ({
6137
+ return Ws(e, "anyOf", n.map((e) => ({
6047
6138
  ...i,
6048
6139
  type: e
6049
6140
  })));
6050
6141
  }
6051
6142
  switch (n) {
6052
- case "object": return Js(e, t);
6053
- case "array": return Fs(e, t);
6054
- default: return fc(e, t);
6143
+ case "object": return Xs(e, t);
6144
+ case "array": return Ls(e, t);
6145
+ default: return mc(e, t);
6055
6146
  }
6056
6147
  }
6057
- return ms(t) ? Ms(X.Any, {}, e.delegate, e.path) : (_s(e, "unrecognized"), null);
6148
+ return gs(t) ? Ps(X.Any, {}, e.delegate, e.path) : (ys(e, "unrecognized"), null);
6058
6149
  }
6059
6150
  //#endregion
6060
6151
  //#region src/json-schema-subset/checker/tools/mark.ts
6061
- var Sc = class {
6152
+ var wc = class {
6062
6153
  constructor(e) {
6063
6154
  let t = Object.freeze(e.toSorted());
6064
6155
  if (t.length > 32) throw Error(`cannot define ${t.length} keys which is greater than 32`);
6065
- this.keys = t, this.clazz = class extends Cc {
6156
+ this.keys = t, this.clazz = class extends Tc {
6066
6157
  constructor(e) {
6067
6158
  super(t, e);
6068
6159
  }
@@ -6086,7 +6177,7 @@ var Sc = class {
6086
6177
  else if (e) for (let [n, r] of this.keys.entries()) e[r] && (t |= 1 << n);
6087
6178
  return new this.clazz(t);
6088
6179
  }
6089
- }, Cc = class {
6180
+ }, Tc = class {
6090
6181
  constructor(e, t) {
6091
6182
  this.keys = e, this.int32 = t;
6092
6183
  }
@@ -6101,21 +6192,21 @@ var Sc = class {
6101
6192
  };
6102
6193
  //#endregion
6103
6194
  //#region src/json-schema-subset/checker/tools/quantum.ts
6104
- function wc(e) {
6105
- return new Tc(e);
6195
+ function Ec(e) {
6196
+ return new Dc(e);
6106
6197
  }
6107
- var Tc = class {
6198
+ var Dc = class {
6108
6199
  constructor(e) {
6109
- this.description = new Sc(e);
6200
+ this.description = new wc(e);
6110
6201
  }
6111
6202
  get keys() {
6112
6203
  return this.description.keys;
6113
6204
  }
6114
6205
  variable(e) {
6115
6206
  let t;
6116
- return e && (t = this.description.toBundle(e).toInt32()), new Ec(this.description, t);
6207
+ return e && (t = this.description.toBundle(e).toInt32()), new Oc(this.description, t);
6117
6208
  }
6118
- }, Ec = class {
6209
+ }, Oc = class {
6119
6210
  constructor(e, t) {
6120
6211
  this.values = /* @__PURE__ */ new Set(), this.description = e, t !== void 0 && this.values.add(t);
6121
6212
  }
@@ -6136,7 +6227,7 @@ var Tc = class {
6136
6227
  }
6137
6228
  push(e, t) {
6138
6229
  let n = /* @__PURE__ */ new Set();
6139
- for (let r of this.values) for (let [i, a] of Vo) if (e & a) {
6230
+ for (let r of this.values) for (let [i, a] of Uo) if (e & a) {
6140
6231
  let e = this.description.toBundle(r);
6141
6232
  t(i, e), n.add(e.toInt32());
6142
6233
  }
@@ -6153,11 +6244,11 @@ var Tc = class {
6153
6244
  };
6154
6245
  //#endregion
6155
6246
  //#region src/json-schema-subset/checker/tools/range.ts
6156
- function Dc(e, t) {
6247
+ function kc(e, t) {
6157
6248
  let [n] = e, [r] = t;
6158
- return n.num < r.num ? Oc(e, t) : n.num > r.num ? kc(e, t) : Ac(e, t);
6249
+ return n.num < r.num ? Ac(e, t) : n.num > r.num ? jc(e, t) : Mc(e, t);
6159
6250
  }
6160
- function Oc(e, t) {
6251
+ function Ac(e, t) {
6161
6252
  let [n, r] = e, [i, a] = t;
6162
6253
  if (r.num <= i.num) {
6163
6254
  let n = r.exclusive, a = i.exclusive;
@@ -6182,11 +6273,11 @@ function Oc(e, t) {
6182
6273
  let t;
6183
6274
  return e && (t = {
6184
6275
  fromLeft: !1,
6185
- range: [jc(r), a]
6276
+ range: [Nc(r), a]
6186
6277
  }), {
6187
6278
  left: {
6188
6279
  fromLeft: !0,
6189
- range: [n, jc(i)]
6280
+ range: [n, Nc(i)]
6190
6281
  },
6191
6282
  center: [i, r],
6192
6283
  right: t
@@ -6196,16 +6287,16 @@ function Oc(e, t) {
6196
6287
  return {
6197
6288
  left: {
6198
6289
  fromLeft: !0,
6199
- range: [n, jc(i)]
6290
+ range: [n, Nc(i)]
6200
6291
  },
6201
6292
  center: [i, a],
6202
6293
  right: {
6203
6294
  fromLeft: !0,
6204
- range: [jc(a), r]
6295
+ range: [Nc(a), r]
6205
6296
  }
6206
6297
  };
6207
6298
  }
6208
- function kc(e, t) {
6299
+ function jc(e, t) {
6209
6300
  let [n, r] = e, [i, a] = t;
6210
6301
  if (n.num >= a.num) {
6211
6302
  let r = a.exclusive, i = n.exclusive;
@@ -6230,11 +6321,11 @@ function kc(e, t) {
6230
6321
  let t;
6231
6322
  return e && (t = {
6232
6323
  fromLeft: !0,
6233
- range: [jc(a), r]
6324
+ range: [Nc(a), r]
6234
6325
  }), {
6235
6326
  left: {
6236
6327
  fromLeft: !1,
6237
- range: [i, jc(n)]
6328
+ range: [i, Nc(n)]
6238
6329
  },
6239
6330
  center: [n, a],
6240
6331
  right: t
@@ -6244,23 +6335,23 @@ function kc(e, t) {
6244
6335
  return {
6245
6336
  left: {
6246
6337
  fromLeft: !1,
6247
- range: [i, jc(n)]
6338
+ range: [i, Nc(n)]
6248
6339
  },
6249
6340
  center: [n, r],
6250
6341
  right: {
6251
6342
  fromLeft: !1,
6252
- range: [jc(r), a]
6343
+ range: [Nc(r), a]
6253
6344
  }
6254
6345
  };
6255
6346
  }
6256
- function Ac(e, t) {
6347
+ function Mc(e, t) {
6257
6348
  let [n, r] = e, [i, a] = t, o = n.exclusive, s = i.exclusive, c, l = n;
6258
6349
  if (!o && s ? (l = i, c = {
6259
6350
  fromLeft: !0,
6260
- range: [n, jc(i)]
6351
+ range: [n, Nc(i)]
6261
6352
  }) : o && !s && (c = {
6262
6353
  fromLeft: !1,
6263
- range: [i, jc(n)]
6354
+ range: [i, Nc(n)]
6264
6355
  }), r.num <= a.num) {
6265
6356
  let e = !0, t = !1;
6266
6357
  if (r.num === a.num) {
@@ -6271,7 +6362,7 @@ function Ac(e, t) {
6271
6362
  let t;
6272
6363
  return e && (t = {
6273
6364
  fromLeft: !1,
6274
- range: [jc(r), a]
6365
+ range: [Nc(r), a]
6275
6366
  }), {
6276
6367
  left: c,
6277
6368
  center: [l, r],
@@ -6284,11 +6375,11 @@ function Ac(e, t) {
6284
6375
  center: [l, a],
6285
6376
  right: {
6286
6377
  fromLeft: !0,
6287
- range: [jc(a), r]
6378
+ range: [Nc(a), r]
6288
6379
  }
6289
6380
  };
6290
6381
  }
6291
- function jc(e) {
6382
+ function Nc(e) {
6292
6383
  return {
6293
6384
  num: e.num,
6294
6385
  exclusive: !e.exclusive
@@ -6296,8 +6387,8 @@ function jc(e) {
6296
6387
  }
6297
6388
  //#endregion
6298
6389
  //#region src/json-schema-subset/checker/range.ts
6299
- var Mc = (e) => (t = e, n = Infinity, r = e, i = Infinity) => {
6300
- let { left: a, center: o, right: s } = Dc([{
6390
+ var Pc = (e) => (t = e, n = Infinity, r = e, i = Infinity) => {
6391
+ let { left: a, center: o, right: s } = kc([{
6301
6392
  num: t,
6302
6393
  exclusive: !1
6303
6394
  }, {
@@ -6327,24 +6418,24 @@ var Mc = (e) => (t = e, n = Infinity, r = e, i = Infinity) => {
6327
6418
  intersection: u
6328
6419
  };
6329
6420
  };
6330
- function Nc({ left: e, right: t, intersection: n }) {
6421
+ function Fc({ left: e, right: t, intersection: n }) {
6331
6422
  if (!n) return H.Rejection;
6332
6423
  let r = !1, i = !1;
6333
6424
  return e && (e.isFrom1 ? r = !0 : i = !0), t && (t.isFrom1 ? r = !0 : i = !0), r && i ? H.Intersection : r ? H.Containing : i ? H.ContainedBy : H.Equals;
6334
6425
  }
6335
6426
  //#endregion
6336
6427
  //#region src/json-schema-subset/checker/array.ts
6337
- var Pc = Mc(0), Fc = wc([
6428
+ var Ic = Pc(0), Lc = Ec([
6338
6429
  "hasCommon",
6339
6430
  "hasExtra1",
6340
6431
  "hasExtra2",
6341
6432
  "hasRejection",
6342
6433
  "hasCommonBroken"
6343
6434
  ]);
6344
- function Ic({ calculate: e }, t, n) {
6345
- let r = Pc(t.minItems, t.maxItems, n.minItems, n.maxItems), i = Nc(r);
6435
+ function Rc({ calculate: e }, t, n) {
6436
+ let r = Ic(t.minItems, t.maxItems, n.minItems, n.maxItems), i = Fc(r);
6346
6437
  if (i === H.Rejection) return K;
6347
- let [a, o] = Lc(t), [s, c] = Lc(n), l = Math.max(a.length, s.length) + 1, u = Math.min(l, r.intersection.max), d = Fc.variable({}), f = Math.min(t.minItems ?? 0, n.minItems ?? 0);
6438
+ let [a, o] = zc(t), [s, c] = zc(n), l = Math.max(a.length, s.length) + 1, u = Math.min(l, r.intersection.max), d = Lc.variable({}), f = Math.min(t.minItems ?? 0, n.minItems ?? 0);
6348
6439
  for (let t = 0; t < u; t++) {
6349
6440
  let n = e(a[t] ?? o, s[t] ?? c);
6350
6441
  d.push(n, (e, n) => {
@@ -6384,69 +6475,69 @@ function Ic({ calculate: e }, t, n) {
6384
6475
  }
6385
6476
  return p;
6386
6477
  }
6387
- function Lc({ items: e, additionalItems: t }) {
6388
- return Array.isArray(e) ? [e, t ?? Ts] : [[], e ?? Ts];
6478
+ function zc({ items: e, additionalItems: t }) {
6479
+ return Array.isArray(e) ? [e, t ?? Ds] : [[], e ?? Ds];
6389
6480
  }
6390
6481
  //#endregion
6391
6482
  //#region src/json-schema-subset/checker/cache.ts
6392
- function Rc(e) {
6483
+ function Bc(e) {
6393
6484
  let t = /* @__PURE__ */ new Map();
6394
6485
  return (n, r) => {
6395
- let i = Ds(n);
6396
- return i === Ds(r) ? i ? Bc(t, n, r, e) : n === r : !1;
6486
+ let i = ks(n);
6487
+ return i === ks(r) ? i ? Hc(t, n, r, e) : n === r : !1;
6397
6488
  };
6398
6489
  }
6399
- function zc(e) {
6490
+ function Vc(e) {
6400
6491
  let t = /* @__PURE__ */ new Map();
6401
- return (n, r) => Bc(t, n, r, e);
6492
+ return (n, r) => Hc(t, n, r, e);
6402
6493
  }
6403
- function Bc(e, t, n, r) {
6404
- let i = `${ks(t)}/${ks(n)}`, a = e.get(i);
6494
+ function Hc(e, t, n, r) {
6495
+ let i = `${js(t)}/${js(n)}`, a = e.get(i);
6405
6496
  return a === void 0 && e.set(i, a = r(t, n)), a;
6406
6497
  }
6407
6498
  //#endregion
6408
6499
  //#region src/json-schema-subset/checker/enumAndConst.ts
6409
- function Vc(e, t, n) {
6410
- let r = Uc(t), i = Uc(n), a = !1, o = !1, s = !1;
6411
- for (let t of r) if (Wc(e, i, t) ? s = !0 : a = !0, a && s) break;
6412
- for (let t of i) if (Wc(e, r, t) ? s = !0 : o = !0, o && s) break;
6500
+ function Uc(e, t, n) {
6501
+ let r = Gc(t), i = Gc(n), a = !1, o = !1, s = !1;
6502
+ for (let t of r) if (Kc(e, i, t) ? s = !0 : a = !0, a && s) break;
6503
+ for (let t of i) if (Kc(e, r, t) ? s = !0 : o = !0, o && s) break;
6413
6504
  return s ? a && o ? q : a ? W : o ? G : U : K;
6414
6505
  }
6415
- function Hc(e, t) {
6506
+ function Wc(e, t) {
6416
6507
  let n = !1, r = !1;
6417
- for (let i of Uc(e)) {
6418
- switch (Gs(t, i)) {
6419
- case Ws.Valid:
6508
+ for (let i of Gc(e)) {
6509
+ switch (qs(t, i)) {
6510
+ case Ks.Valid:
6420
6511
  n = !0;
6421
6512
  break;
6422
- case Ws.Invalid:
6513
+ case Ks.Invalid:
6423
6514
  r = !0;
6424
6515
  break;
6425
- case Ws.Unknown: return Ho;
6516
+ case Ks.Unknown: return Wo;
6426
6517
  }
6427
6518
  if (n && r) break;
6428
6519
  }
6429
6520
  return n && r ? q : n ? U | G : r ? K : Z(t) === X.Never ? U : G;
6430
6521
  }
6431
- function Uc({ const: e, enum: t }) {
6522
+ function Gc({ const: e, enum: t }) {
6432
6523
  if (e !== void 0) return [e];
6433
6524
  if (t) return t;
6434
6525
  throw Error("invalid branch");
6435
6526
  }
6436
- function Wc({ isEquals: e }, t, n) {
6527
+ function Kc({ isEquals: e }, t, n) {
6437
6528
  for (let r of t) if (e(r, n)) return !0;
6438
6529
  return !1;
6439
6530
  }
6440
6531
  //#endregion
6441
6532
  //#region src/json-schema-subset/checker/equals.ts
6442
- function Gc(e) {
6533
+ function qc(e) {
6443
6534
  function t(t, n) {
6444
6535
  let i = e.isExtendsSchema(t), a = e.isExtendsSchema(n);
6445
6536
  return i || a ? e.equals(t, n) : r(t, n);
6446
6537
  }
6447
6538
  let n = /* @__PURE__ */ new Map();
6448
6539
  function r(e, t) {
6449
- let r = ks(e), a = ks(t);
6540
+ let r = js(e), a = js(t);
6450
6541
  if (r === a) return !0;
6451
6542
  let o = `${r}/${a}`, s = n.get(o);
6452
6543
  return s === void 0 && (s = i(e, t), n.set(o, s)), s;
@@ -6463,25 +6554,25 @@ function Gc(e) {
6463
6554
  return !0;
6464
6555
  }
6465
6556
  function a(e, t) {
6466
- return e === t ? !0 : typeof e != "object" || !e || typeof e != typeof t ? !1 : Os(e) && Os(t) ? r(e, t) : i(e, t);
6557
+ return e === t ? !0 : typeof e != "object" || !e || typeof e != typeof t ? !1 : As(e) && As(t) ? r(e, t) : i(e, t);
6467
6558
  }
6468
6559
  return t;
6469
6560
  }
6470
6561
  //#endregion
6471
6562
  //#region src/json-schema-subset/checker/numeric/integerNormalizer.ts
6472
- function Kc(e) {
6473
- let t = $c(e), n = e.multipleOf ?? 1, r = Jc(t, n);
6563
+ function Jc(e) {
6564
+ let t = tl(e), n = e.multipleOf ?? 1, r = Xc(t, n);
6474
6565
  return r ? {
6475
6566
  multipleOf: n,
6476
6567
  range: r
6477
6568
  } : null;
6478
6569
  }
6479
- function qc([e, t]) {
6570
+ function Yc([e, t]) {
6480
6571
  return !(e.num !== t.num || e.exclusive || t.exclusive);
6481
6572
  }
6482
- function Jc(e, t) {
6573
+ function Xc(e, t) {
6483
6574
  if (!e) return;
6484
- let [n, r] = e, i = Yc(n.num, t), a = Xc(r.num, t);
6575
+ let [n, r] = e, i = Zc(n.num, t), a = Qc(r.num, t);
6485
6576
  if (i === n.num && n.exclusive && (i += t), a === r.num && r.exclusive && (a -= t), !(i > a) && (i !== a || i !== Infinity && i !== -Infinity)) return [{
6486
6577
  num: i,
6487
6578
  exclusive: !1
@@ -6490,29 +6581,29 @@ function Jc(e, t) {
6490
6581
  exclusive: !1
6491
6582
  }];
6492
6583
  }
6493
- function Yc(e, t) {
6584
+ function Zc(e, t) {
6494
6585
  return Math.ceil(e / t) * t;
6495
6586
  }
6496
- function Xc(e, t) {
6587
+ function Qc(e, t) {
6497
6588
  return Math.floor(e / t) * t;
6498
6589
  }
6499
6590
  //#endregion
6500
6591
  //#region src/json-schema-subset/checker/numeric/float.ts
6501
- function Zc(e, t) {
6502
- let { left: n, right: r, center: i } = Dc($c(e), $c(t));
6592
+ function $c(e, t) {
6593
+ let { left: n, right: r, center: i } = kc(tl(e), tl(t));
6503
6594
  if (!i) return K;
6504
6595
  let a = !1, o = !1;
6505
6596
  return n && (n.fromLeft ? a = !0 : o = !0), r && (r.fromLeft ? a = !0 : o = !0), a && o ? q : a ? W : o ? G : U;
6506
6597
  }
6507
- function Qc(e, t) {
6508
- let n = $c(e), r = Kc(t);
6598
+ function el(e, t) {
6599
+ let n = tl(e), r = Jc(t);
6509
6600
  if (!r) return W;
6510
- let i = Dc(n, r.range), a = Jc(i.center, r.multipleOf), o = el(i.left, r.multipleOf), s = el(i.right, r.multipleOf);
6601
+ let i = kc(n, r.range), a = Xc(i.center, r.multipleOf), o = nl(i.left, r.multipleOf), s = nl(i.right, r.multipleOf);
6511
6602
  if (!i.center) return K;
6512
6603
  let c = !1, l = !1;
6513
- return i.left?.fromLeft && (c = !0), i.right?.fromLeft && (c = !0), (!a || !qc(i.center)) && (c = !0), o && (l = !0), s && (l = !0), c && l ? q : c ? W : l ? G : U;
6604
+ return i.left?.fromLeft && (c = !0), i.right?.fromLeft && (c = !0), (!a || !Yc(i.center)) && (c = !0), o && (l = !0), s && (l = !0), c && l ? q : c ? W : l ? G : U;
6514
6605
  }
6515
- function $c(e) {
6606
+ function tl(e) {
6516
6607
  let t, n;
6517
6608
  return t = e.exclusiveMinimum === void 0 ? e.minimum === void 0 ? {
6518
6609
  num: -Infinity,
@@ -6534,84 +6625,84 @@ function $c(e) {
6534
6625
  exclusive: !0
6535
6626
  }, [t, n];
6536
6627
  }
6537
- function el(e, t) {
6538
- if (e && !e.fromLeft) return Jc(e.range, t);
6628
+ function nl(e, t) {
6629
+ if (e && !e.fromLeft) return Xc(e.range, t);
6539
6630
  }
6540
6631
  //#endregion
6541
6632
  //#region src/json-schema-subset/checker/numeric/integer.ts
6542
- function tl(e, t) {
6543
- let n = Kc(e), r = Kc(t);
6633
+ function rl(e, t) {
6634
+ let n = Jc(e), r = Jc(t);
6544
6635
  if (!n && !r) return U;
6545
6636
  if (!n) return G;
6546
6637
  if (!r) return W;
6547
- let { range: i, multipleOf: a } = n, { range: o, multipleOf: s } = r, c = Dc(i, o), l, u = 0;
6548
- if (c.center && (u = rl(a, s), l = Jc(c.center, u)), !l) return K;
6638
+ let { range: i, multipleOf: a } = n, { range: o, multipleOf: s } = r, c = kc(i, o), l, u = 0;
6639
+ if (c.center && (u = al(a, s), l = Xc(c.center, u)), !l) return K;
6549
6640
  let d = !1, f = !1, { left: p, right: m } = c;
6550
- return p && Jc(p.range, p.fromLeft ? a : s) && (p.fromLeft ? d = !0 : f = !0), m && Jc(m.range, m.fromLeft ? a : s) && (m.fromLeft ? d = !0 : f = !0), d ||= nl(n, l, u), f ||= nl(r, l, u), d && f ? q : d ? W : f ? G : U;
6641
+ return p && Xc(p.range, p.fromLeft ? a : s) && (p.fromLeft ? d = !0 : f = !0), m && Xc(m.range, m.fromLeft ? a : s) && (m.fromLeft ? d = !0 : f = !0), d ||= il(n, l, u), f ||= il(r, l, u), d && f ? q : d ? W : f ? G : U;
6551
6642
  }
6552
- function nl({ range: e, multipleOf: t }, n, r) {
6553
- let i = Dc(e, n);
6554
- if (Jc(i.left?.range, t) || Jc(i.right?.range, t)) return !0;
6555
- let a = Jc(i.center, t);
6643
+ function il({ range: e, multipleOf: t }, n, r) {
6644
+ let i = kc(e, n);
6645
+ if (Xc(i.left?.range, t) || Xc(i.right?.range, t)) return !0;
6646
+ let a = Xc(i.center, t);
6556
6647
  if (!a) return !1;
6557
- let o = al(n);
6558
- return al(a) > o || o !== 1 && t < r;
6648
+ let o = sl(n);
6649
+ return sl(a) > o || o !== 1 && t < r;
6559
6650
  }
6560
- function rl(e, t) {
6561
- return e * t / il(e, t);
6651
+ function al(e, t) {
6652
+ return e * t / ol(e, t);
6562
6653
  }
6563
- function il(e, t) {
6564
- return e === 0 ? t : il(t % e, e);
6654
+ function ol(e, t) {
6655
+ return e === 0 ? t : ol(t % e, e);
6565
6656
  }
6566
- function al(e) {
6657
+ function sl(e) {
6567
6658
  if (!e) return 0;
6568
6659
  let [t, n] = e;
6569
6660
  return n.num - t.num + 1;
6570
6661
  }
6571
6662
  //#endregion
6572
6663
  //#region src/json-schema-subset/checker/numeric/checker.ts
6573
- function ol(e, t) {
6574
- if (sl(e) || sl(t)) return Ho;
6575
- let n = cl(e), r = cl(t);
6576
- return n && r ? Zc(e, t) : n ? Qc(e, t) : r ? Qo(Qc(t, e)) : tl(e, t);
6664
+ function cl(e, t) {
6665
+ if (ll(e) || ll(t)) return Wo;
6666
+ let n = ul(e), r = ul(t);
6667
+ return n && r ? $c(e, t) : n ? el(e, t) : r ? es(el(t, e)) : rl(e, t);
6577
6668
  }
6578
- function sl(e) {
6669
+ function ll(e) {
6579
6670
  let { multipleOf: t } = e;
6580
6671
  return t === void 0 ? !1 : !Number.isInteger(t) || t < 0;
6581
6672
  }
6582
- function cl(e) {
6673
+ function ul(e) {
6583
6674
  let { multipleOf: t } = e;
6584
6675
  return !(t !== void 0 && Number.isInteger(t) || e.type === "integer");
6585
6676
  }
6586
6677
  //#endregion
6587
6678
  //#region src/json-schema-subset/checker/object.ts
6588
- var ll = Mc(0), ul = wc([
6679
+ var dl = Pc(0), fl = Ec([
6589
6680
  "hasCommonInRequired",
6590
6681
  "hasCommonOutRequired",
6591
6682
  "hasExtra1",
6592
6683
  "hasExtra2",
6593
6684
  "hasRejection"
6594
6685
  ]);
6595
- function dl(e, t, n) {
6596
- if (fl(t, n)) return K;
6597
- let r = pl(t, n);
6686
+ function pl(e, t, n) {
6687
+ if (ml(t, n)) return K;
6688
+ let r = hl(t, n);
6598
6689
  if (!r) return K;
6599
- let i = yl(t), a = yl(n), o = (t) => {
6690
+ let i = xl(t), a = xl(n), o = (t) => {
6600
6691
  let n = i(t), r = a(t);
6601
- return bl(n, r) ? e.calculate(n, r) : 0;
6602
- }, { commonRequired: s, extraRequired1: c, extraRequired2: l } = r, u = ul.variable({});
6603
- for (let e of [...s].toSorted()) u.push(o(e), hl);
6604
- for (let e of [...c].toSorted()) u.push(o(e), gl);
6605
- for (let e of [...l].toSorted()) u.push(o(e), _l);
6692
+ return Sl(n, r) ? e.calculate(n, r) : 0;
6693
+ }, { commonRequired: s, extraRequired1: c, extraRequired2: l } = r, u = fl.variable({});
6694
+ for (let e of [...s].toSorted()) u.push(o(e), _l);
6695
+ for (let e of [...c].toSorted()) u.push(o(e), vl);
6696
+ for (let e of [...l].toSorted()) u.push(o(e), yl);
6606
6697
  let { hasOptional1: d, hasOptional2: f } = r;
6607
6698
  if (d || f) {
6608
- let r = vl(d, f);
6609
- for (let e of [...ml(t, n)].toSorted()) {
6699
+ let r = bl(d, f);
6700
+ for (let e of [...gl(t, n)].toSorted()) {
6610
6701
  let t = o(e);
6611
6702
  t !== 0 && u.push(t, r);
6612
6703
  }
6613
- let i = t.additionalProperties ?? Ts, a = n.additionalProperties ?? Ts;
6614
- if (bl(i, a)) {
6704
+ let i = t.additionalProperties ?? Ds, a = n.additionalProperties ?? Ds;
6705
+ if (Sl(i, a)) {
6615
6706
  let t = e.calculate(i, a);
6616
6707
  u.push(t, r);
6617
6708
  }
@@ -6623,10 +6714,10 @@ function dl(e, t, n) {
6623
6714
  for (let { hasExtra1: e, hasExtra2: t, hasCommonInRequired: n, hasCommonOutRequired: r, hasRejection: i } of u) m |= !n && p > 0 || !r && p === 0 || i ? K : e && t ? q : e ? W : t ? G : U;
6624
6715
  return m;
6625
6716
  }
6626
- function fl(e, t) {
6627
- return Nc(ll(e.minProperties, e.maxProperties, t.minProperties, t.maxProperties)) === H.Rejection;
6717
+ function ml(e, t) {
6718
+ return Fc(dl(e.minProperties, e.maxProperties, t.minProperties, t.maxProperties)) === H.Rejection;
6628
6719
  }
6629
- function pl(e, t) {
6720
+ function hl(e, t) {
6630
6721
  let n = new Set(e.required), r = new Set(t.required), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), o = n.size, s = r.size;
6631
6722
  for (let e of n) r.has(e) && i.add(e), a.add(e);
6632
6723
  for (let e of r) n.has(e) && i.add(e), a.add(e);
@@ -6642,7 +6733,7 @@ function pl(e, t) {
6642
6733
  hasOptional2: u > s
6643
6734
  };
6644
6735
  }
6645
- function ml(e, t) {
6736
+ function gl(e, t) {
6646
6737
  let n = new Set(e.required), r = e.properties, i = t.properties, a = e.required, o = t.required;
6647
6738
  if (r) for (let e in r) n.add(e);
6648
6739
  if (i) for (let e in i) n.add(e);
@@ -6650,7 +6741,7 @@ function ml(e, t) {
6650
6741
  if (o) for (let e of o) n.delete(e);
6651
6742
  return n;
6652
6743
  }
6653
- var hl = (e, t) => {
6744
+ var _l = (e, t) => {
6654
6745
  switch (e) {
6655
6746
  case H.Equals:
6656
6747
  t.hasCommonInRequired = !0;
@@ -6666,7 +6757,7 @@ var hl = (e, t) => {
6666
6757
  break;
6667
6758
  case H.Rejection: t.hasRejection = !0;
6668
6759
  }
6669
- }, gl = (e, t) => {
6760
+ }, vl = (e, t) => {
6670
6761
  switch (e) {
6671
6762
  case H.Equals:
6672
6763
  case H.ContainedBy:
@@ -6678,7 +6769,7 @@ var hl = (e, t) => {
6678
6769
  break;
6679
6770
  case H.Rejection: t.hasRejection = !0;
6680
6771
  }
6681
- }, _l = (e, t) => {
6772
+ }, yl = (e, t) => {
6682
6773
  switch (e) {
6683
6774
  case H.Equals:
6684
6775
  case H.Containing:
@@ -6690,7 +6781,7 @@ var hl = (e, t) => {
6690
6781
  break;
6691
6782
  case H.Rejection: t.hasRejection = !0;
6692
6783
  }
6693
- }, vl = (e, t) => (n, r) => {
6784
+ }, bl = (e, t) => (n, r) => {
6694
6785
  if (r.hasRejection) return;
6695
6786
  let i = !1, a = !1, o = !1;
6696
6787
  switch (n) {
@@ -6710,7 +6801,7 @@ var hl = (e, t) => {
6710
6801
  }
6711
6802
  e && i && (r.hasExtra1 = !0), t && a && (r.hasExtra2 = !0), e && t && o && (r.hasCommonOutRequired = !0);
6712
6803
  };
6713
- function yl(e) {
6804
+ function xl(e) {
6714
6805
  let t = e.properties, n = e.propertyNames, r = e.additionalProperties, i = [];
6715
6806
  if (e.patternProperties) for (let t in e.patternProperties) {
6716
6807
  let n = e.patternProperties[t], r = new RegExp(t, "i");
@@ -6720,39 +6811,39 @@ function yl(e) {
6720
6811
  });
6721
6812
  }
6722
6813
  return (e) => {
6723
- if (n && Gs(n, e) === Ws.Invalid) return Es;
6814
+ if (n && qs(n, e) === Ks.Invalid) return Os;
6724
6815
  for (let { pattern: t, schema: n } of i) if (t.test(e)) return n;
6725
- return ((t && t[e]) ?? r) || Ts;
6816
+ return ((t && t[e]) ?? r) || Ds;
6726
6817
  };
6727
6818
  }
6728
- function bl(e, t) {
6819
+ function Sl(e, t) {
6729
6820
  let n = Z(e), r = Z(t);
6730
6821
  return n !== X.Never || r !== X.Never;
6731
6822
  }
6732
6823
  //#endregion
6733
6824
  //#region src/json-schema-subset/checker/string.ts
6734
- var xl = Mc(0);
6735
- function Sl(e, t) {
6736
- let n = Nc(xl(e.minLength, e.maxLength, t.minLength, t.maxLength)), r = !!e.pattern, i = !!t.pattern;
6825
+ var Cl = Pc(0);
6826
+ function wl(e, t) {
6827
+ let n = Fc(Cl(e.minLength, e.maxLength, t.minLength, t.maxLength)), r = !!e.pattern, i = !!t.pattern;
6737
6828
  switch (n) {
6738
6829
  case H.Rejection: return K;
6739
- case H.Containing: return r ? Ho : W;
6740
- case H.ContainedBy: return i ? Ho : G;
6741
- case H.Equals: return r && i ? e.pattern === t.pattern ? U : Ho : r ? U | G : i ? U | W : U;
6742
- case H.Intersection: return r && i ? Ho : r ? q | K | G : i ? q | K | W : q;
6830
+ case H.Containing: return r ? Wo : W;
6831
+ case H.ContainedBy: return i ? Wo : G;
6832
+ case H.Equals: return r && i ? e.pattern === t.pattern ? U : Wo : r ? U | G : i ? U | W : U;
6833
+ case H.Intersection: return r && i ? Wo : r ? q | K | G : i ? q | K | W : q;
6743
6834
  }
6744
6835
  }
6745
6836
  //#endregion
6746
6837
  //#region src/json-schema-subset/checker/checker.ts
6747
- function Cl(e, t, n) {
6748
- let r = {}, i = [], a = zc(Tl(e, r)), o = wl(), s = Gc(e);
6749
- r.isEquals = Rc(Bo), r.calculate = ss({
6838
+ function Tl(e, t, n) {
6839
+ let r = {}, i = [], a = Vc(Dl(e, r)), o = El(), s = qc(e);
6840
+ r.isEquals = Bc(Ho), r.calculate = ls({
6750
6841
  describe: o,
6751
6842
  equals: s,
6752
6843
  calculate: a,
6753
6844
  observeCalculation: (e, t, n, r) => {
6754
- if (!Dl(r ? Qo(n) : n)) return;
6755
- let a = r ? Ol(t, e) : Ol(e, t);
6845
+ if (!kl(r ? es(n) : n)) return;
6846
+ let a = r ? Al(t, e) : Al(e, t);
6756
6847
  a && i.push(a);
6757
6848
  }
6758
6849
  }), Object.freeze(r);
@@ -6762,34 +6853,34 @@ function Cl(e, t, n) {
6762
6853
  expression: c
6763
6854
  };
6764
6855
  }
6765
- var wl = () => (e) => {
6856
+ var El = () => (e) => {
6766
6857
  let t;
6767
6858
  switch (Z(e)) {
6768
6859
  case X.Not:
6769
6860
  t = {
6770
- kind: os.Not,
6861
+ kind: cs.Not,
6771
6862
  expression: e.not
6772
6863
  };
6773
6864
  break;
6774
6865
  case X.Combination:
6775
6866
  if ("allOf" in e) t = {
6776
- kind: os.AllOf,
6777
- expressions: El(e.allOf, X.Any)
6867
+ kind: cs.AllOf,
6868
+ expressions: Ol(e.allOf, X.Any)
6778
6869
  };
6779
6870
  else if ("anyOf" in e) t = {
6780
- kind: os.AnyOf,
6781
- expressions: El(e.anyOf, X.Never)
6871
+ kind: cs.AnyOf,
6872
+ expressions: Ol(e.anyOf, X.Never)
6782
6873
  };
6783
6874
  else if ("oneOf" in e) t = {
6784
- kind: os.OneOf,
6785
- expressions: El(e.oneOf, X.Never)
6875
+ kind: cs.OneOf,
6876
+ expressions: Ol(e.oneOf, X.Never)
6786
6877
  };
6787
6878
  else throw Error(`invalid combination JSON Schema: ${JSON.stringify(e)}`);
6788
6879
  break;
6789
- default: t = { kind: os.Leaf };
6880
+ default: t = { kind: cs.Leaf };
6790
6881
  }
6791
6882
  return t;
6792
- }, Tl = (e, t) => (n, r) => {
6883
+ }, Dl = (e, t) => (n, r) => {
6793
6884
  let i = Z(n), a = Z(r);
6794
6885
  if (i === X.Extends || a === X.Extends) return e.calculate(n, r);
6795
6886
  switch (i) {
@@ -6800,28 +6891,28 @@ var wl = () => (e) => {
6800
6891
  case X.Any: return G;
6801
6892
  case X.Never: return W;
6802
6893
  }
6803
- if (i === X.EnumOrConst && a === X.EnumOrConst) return Vc(t, n, r);
6804
- if (i === X.EnumOrConst) return Hc(n, r);
6805
- if (a === X.EnumOrConst) return Qo(Hc(r, n));
6894
+ if (i === X.EnumOrConst && a === X.EnumOrConst) return Uc(t, n, r);
6895
+ if (i === X.EnumOrConst) return Wc(n, r);
6896
+ if (a === X.EnumOrConst) return es(Wc(r, n));
6806
6897
  if (i !== a) return K;
6807
6898
  switch (i) {
6808
6899
  case X.Null: return U;
6809
- case X.Numeric: return ol(n, r);
6810
- case X.String: return Sl(n, r);
6900
+ case X.Numeric: return cl(n, r);
6901
+ case X.String: return wl(n, r);
6811
6902
  case X.Boolean: return U;
6812
- case X.Object: return dl(t, n, r);
6813
- case X.Array: return Ic(t, n, r);
6903
+ case X.Object: return pl(t, n, r);
6904
+ case X.Array: return Rc(t, n, r);
6814
6905
  default: throw Error(`invalid kind ${i}`);
6815
6906
  }
6816
6907
  };
6817
- function El(e, t) {
6908
+ function Ol(e, t) {
6818
6909
  return e.filter((e) => Z(e) !== t);
6819
6910
  }
6820
- function Dl(e) {
6821
- return !Uo(e) && !Go(e) && (Wo(e) || qo(e) || Ko(e));
6911
+ function kl(e) {
6912
+ return !Go(e) && !qo(e) && (Ko(e) || Yo(e) || Jo(e));
6822
6913
  }
6823
- function Ol(e, t) {
6824
- let n = As(t);
6914
+ function Al(e, t) {
6915
+ let n = Ms(t);
6825
6916
  if (!n) return;
6826
6917
  let r = Z(e), i = Z(t);
6827
6918
  if (r !== i) return [...n, "type"];
@@ -6854,12 +6945,12 @@ function Ol(e, t) {
6854
6945
  }
6855
6946
  //#endregion
6856
6947
  //#region src/json-schema-subset/extends/extendsContext.ts
6857
- var kl = class e {
6948
+ var jl = class e {
6858
6949
  constructor(e = []) {
6859
6950
  this.extendsSchemaClasses = Object.freeze([...e]);
6860
6951
  }
6861
6952
  tryCompiledExtendsSchema(e, t) {
6862
- for (let n of this.extendsSchemaClasses) if (n.isMatch(e)) return new n(Io(), e, t);
6953
+ for (let n of this.extendsSchemaClasses) if (n.isMatch(e)) return new n(Ro(), e, t);
6863
6954
  return null;
6864
6955
  }
6865
6956
  isExtendsSchema(e) {
@@ -6869,7 +6960,7 @@ var kl = class e {
6869
6960
  calculate(t, n) {
6870
6961
  let r = !(t instanceof this.findMatchedClass(t, n)), i = 0, a;
6871
6962
  a = r ? n.compare(t) : t.compare(n);
6872
- for (let t of a) r && (t = e.swap(t)), i |= Jo(t);
6963
+ for (let t of a) r && (t = e.swap(t)), i |= Xo(t);
6873
6964
  return i;
6874
6965
  }
6875
6966
  equals(e, t) {
@@ -6889,35 +6980,35 @@ var kl = class e {
6889
6980
  };
6890
6981
  //#endregion
6891
6982
  //#region src/json-schema-subset/preprocessing.ts
6892
- function Al(e, t, n = !1) {
6983
+ function Ml(e, t, n = !1) {
6893
6984
  let r = t(e);
6894
6985
  if (Array.isArray(r)) {
6895
6986
  let e = [];
6896
- throw Ml(e, r, "$"), new cs(e);
6987
+ throw Pl(e, r, "$"), new us(e);
6897
6988
  }
6898
6989
  let { schema: i, warns: a } = r;
6899
6990
  if (n && a.length > 0) {
6900
6991
  console.warn(`found ${a.length} warns after compile schema`);
6901
- for (let e of a) console.warn(us(e));
6992
+ for (let e of a) console.warn(fs(e));
6902
6993
  }
6903
6994
  return i;
6904
6995
  }
6905
- function jl(e, t, n, r = !1) {
6996
+ function Nl(e, t, n, r = !1) {
6906
6997
  let i = n(e), a = n(t);
6907
6998
  if (Array.isArray(i) || Array.isArray(a)) {
6908
6999
  let e = [];
6909
- throw Array.isArray(i) && Ml(e, i, "$1"), Array.isArray(a) && Ml(e, a, "$2"), new cs(e);
7000
+ throw Array.isArray(i) && Pl(e, i, "$1"), Array.isArray(a) && Pl(e, a, "$2"), new us(e);
6910
7001
  }
6911
7002
  let { schema: o, warns: s } = i, { schema: c, warns: l } = a;
6912
7003
  if (r) {
6913
7004
  s.length > 0 && console.warn(`found ${s.length} warns after compile superSchema`);
6914
- for (let e of s) console.warn(us(e));
7005
+ for (let e of s) console.warn(fs(e));
6915
7006
  l.length > 0 && console.warn(`found ${l.length} warns after compile subSchema`);
6916
- for (let e of l) console.warn(us(e));
7007
+ for (let e of l) console.warn(fs(e));
6917
7008
  }
6918
7009
  return [o, c];
6919
7010
  }
6920
- function Ml(e, t, n) {
7011
+ function Pl(e, t, n) {
6921
7012
  for (let r of t) {
6922
7013
  let t = {
6923
7014
  ...r,
@@ -6928,61 +7019,61 @@ function Ml(e, t, n) {
6928
7019
  }
6929
7020
  //#endregion
6930
7021
  //#region src/json-schema-subset/global.ts
6931
- var Nl = Object.freeze({
7022
+ var Fl = Object.freeze({
6932
7023
  True: 0,
6933
7024
  False: 1,
6934
7025
  Unknown: 2
6935
7026
  });
6936
- function Pl({ extendsSchemaClasses: e, delegate: t } = {}) {
6937
- let n = new kl(e);
7027
+ function Il({ extendsSchemaClasses: e, delegate: t } = {}) {
7028
+ let n = new jl(e);
6938
7029
  return Object.freeze({
6939
- compile: (e, r, i) => Al(e, (e) => vc(e, n, r, t), i),
7030
+ compile: (e, r, i) => Ml(e, (e) => bc(e, n, r, t), i),
6940
7031
  isSubset: (e, r, i = !1) => {
6941
- let [a, o] = jl(e, r, (e) => vc(e, n, void 0, t), i), { errorPath: s, expression: c } = Cl(n, a, o), l = Uo(c) || Go(c), u = Wo(c) || qo(c) || Ko(c);
6942
- return l && !u ? { result: Nl.True } : !l && u ? {
7032
+ let [a, o] = Nl(e, r, (e) => bc(e, n, void 0, t), i), { errorPath: s, expression: c } = Tl(n, a, o), l = Go(c) || qo(c), u = Ko(c) || Yo(c) || Jo(c);
7033
+ return l && !u ? { result: Fl.True } : !l && u ? {
6943
7034
  errorPath: s,
6944
- result: Nl.False
6945
- } : { result: Nl.Unknown };
7035
+ result: Fl.False
7036
+ } : { result: Fl.Unknown };
6946
7037
  }
6947
7038
  });
6948
7039
  }
6949
7040
  //#endregion
6950
7041
  //#region src/manifest/common/schemaComparer.ts
6951
- function Fl(e) {
7042
+ function Ll(e) {
6952
7043
  return qt(e)?.type === "string";
6953
7044
  }
6954
- function Il(e) {
6955
- return e instanceof Ul || qt(e)?.type === "array";
7045
+ function Rl(e) {
7046
+ return e instanceof Gl || qt(e)?.type === "array";
6956
7047
  }
6957
- function Ll(e) {
7048
+ function zl(e) {
6958
7049
  let t = qt(e);
6959
7050
  return t?.type === "array" && qt(t.items)?.type === "string";
6960
7051
  }
6961
- function Rl(e) {
7052
+ function Bl(e) {
6962
7053
  let t = qt(e);
6963
7054
  return t != null && Object.keys(t).length === 0;
6964
7055
  }
6965
- function zl(e) {
7056
+ function Vl(e) {
6966
7057
  let t = qt(e), n = qt(t?.error);
6967
7058
  if (t == null || n == null || t.packageId != null && !Kt(t.packageId) || n.message != null && !Kt(n.message)) throw TypeError("Invalid schema comparison context.");
6968
7059
  }
6969
- function Bl(e) {
6970
- return e == null ? { error: {} } : (zl(e), e);
7060
+ function Hl(e) {
7061
+ return e == null ? { error: {} } : (Vl(e), e);
6971
7062
  }
6972
- var Vl = class e {
7063
+ var Ul = class e {
6973
7064
  static setError(t, n, r) {
6974
7065
  t instanceof e ? t.context.error.message = r : n instanceof e && (n.context.error.message = r);
6975
7066
  }
6976
7067
  constructor(e, t, n) {
6977
- this.id = e, this.value = t, this.context = Bl(n);
7068
+ this.id = e, this.value = t, this.context = Hl(n);
6978
7069
  }
6979
7070
  compare(e) {
6980
7071
  return this.passThrough(e) || this.compareImpl(e);
6981
7072
  }
6982
7073
  passThrough(e) {
6983
- if (e instanceof Gl) return [H.Equals];
7074
+ if (e instanceof ql) return [H.Equals];
6984
7075
  }
6985
- }, Hl = class e extends Vl {
7076
+ }, Wl = class e extends Ul {
6986
7077
  static isMatch(e) {
6987
7078
  let t = qt(e)?.enum;
6988
7079
  return Array.isArray(t) && t.every((e) => Kt(e));
@@ -6992,7 +7083,7 @@ var Vl = class e {
6992
7083
  super(t, n, r);
6993
7084
  }
6994
7085
  compareImpl(t) {
6995
- if (Fl(t)) return [H.ContainedBy];
7086
+ if (Ll(t)) return [H.ContainedBy];
6996
7087
  if (t instanceof e) {
6997
7088
  let e = new Set(this.value.enum), n = H.Equals;
6998
7089
  for (let r of t.value.enum) e.has(r) || (n = H.ContainedBy), e.delete(r);
@@ -7011,7 +7102,7 @@ var Vl = class e {
7011
7102
  }
7012
7103
  return !1;
7013
7104
  }
7014
- }, Ul = class e extends Vl {
7105
+ }, Gl = class e extends Ul {
7015
7106
  static isMatch(e) {
7016
7107
  let t = qt(e), n = qt(t?.items)?.enum;
7017
7108
  return t?.type === "array" && t.uniqueItems === !0 && Array.isArray(n) && n.every((e) => Kt(e));
@@ -7021,7 +7112,7 @@ var Vl = class e {
7021
7112
  super(t, n, r);
7022
7113
  }
7023
7114
  compareImpl(t) {
7024
- if (t instanceof Wl || Ll(t)) return [H.ContainedBy];
7115
+ if (t instanceof Kl || zl(t)) return [H.ContainedBy];
7025
7116
  if (t instanceof e) {
7026
7117
  let e = new Set(this.value.items.enum), n = H.Equals;
7027
7118
  for (let r of t.value.items.enum) e.has(r) || (n = H.ContainedBy), e.delete(r);
@@ -7040,24 +7131,24 @@ var Vl = class e {
7040
7131
  }
7041
7132
  return !1;
7042
7133
  }
7043
- }, Wl = class e extends Vl {
7134
+ }, Kl = class e extends Ul {
7044
7135
  static isMatch(e) {
7045
7136
  let t = qt(e);
7046
- return t?.type === "array" && !t.uniqueItems && (!Jt(t.items) || Rl(t.items));
7137
+ return t?.type === "array" && !t.uniqueItems && (!Jt(t.items) || Bl(t.items));
7047
7138
  }
7048
7139
  constructor(t, n, r) {
7049
7140
  if (!e.isMatch(n)) throw TypeError("Invalid array schema.");
7050
7141
  super(t, n, r);
7051
7142
  }
7052
7143
  compareImpl(t) {
7053
- return t instanceof e || Il(t) ? [H.Equals] : [H.Rejection];
7144
+ return t instanceof e || Rl(t) ? [H.Equals] : [H.Rejection];
7054
7145
  }
7055
7146
  equals(t) {
7056
7147
  return t instanceof e;
7057
7148
  }
7058
- }, Gl = class e extends Vl {
7149
+ }, ql = class e extends Ul {
7059
7150
  static isMatch(e) {
7060
- return Rl(e);
7151
+ return Bl(e);
7061
7152
  }
7062
7153
  constructor(t, n, r) {
7063
7154
  if (!e.isMatch(n)) throw TypeError("Invalid empty schema.");
@@ -7069,7 +7160,7 @@ var Vl = class e {
7069
7160
  equals(e) {
7070
7161
  return !0;
7071
7162
  }
7072
- }, Kl = class e extends Vl {
7163
+ }, Jl = class e extends Ul {
7073
7164
  static isMatch(e) {
7074
7165
  return qt(e)?.contentMediaType === "oomol/bin";
7075
7166
  }
@@ -7078,12 +7169,12 @@ var Vl = class e {
7078
7169
  super(t, n, r);
7079
7170
  }
7080
7171
  compareImpl(t) {
7081
- return t instanceof e ? [H.Equals] : (Vl.setError(this, t, "edgeError.binDiffType"), [H.Rejection]);
7172
+ return t instanceof e ? [H.Equals] : (Ul.setError(this, t, "edgeError.binDiffType"), [H.Rejection]);
7082
7173
  }
7083
7174
  equals(t) {
7084
7175
  return t instanceof e;
7085
7176
  }
7086
- }, ql = class e extends Vl {
7177
+ }, Yl = class e extends Ul {
7087
7178
  static isMatch(e) {
7088
7179
  return qt(e)?.contentMediaType === "oomol/artifact";
7089
7180
  }
@@ -7092,41 +7183,41 @@ var Vl = class e {
7092
7183
  super(t, n, r);
7093
7184
  }
7094
7185
  compareImpl(t) {
7095
- return t instanceof e ? [H.Equals] : (Vl.setError(this, t, "edgeError.artifactDiffType"), [H.Rejection]);
7186
+ return t instanceof e ? [H.Equals] : (Ul.setError(this, t, "edgeError.artifactDiffType"), [H.Rejection]);
7096
7187
  }
7097
7188
  equals(t) {
7098
7189
  return t instanceof e;
7099
7190
  }
7100
7191
  };
7101
- function Jl() {
7102
- return Pl({ extendsSchemaClasses: [
7192
+ function Xl() {
7193
+ return Il({ extendsSchemaClasses: [
7194
+ Kl,
7195
+ ql,
7103
7196
  Wl,
7104
7197
  Gl,
7105
- Hl,
7106
- Ul,
7107
- Kl,
7108
- ql
7198
+ Jl,
7199
+ Yl
7109
7200
  ] });
7110
7201
  }
7111
7202
  //#endregion
7112
7203
  //#region src/manifest/common/schemaCompare.ts
7113
- var Yl = Jl();
7114
- function Xl(e, t) {
7204
+ var Zl = Xl();
7205
+ function Ql(e, t) {
7115
7206
  return t ? { anyOf: [e, { type: "null" }] } : e;
7116
7207
  }
7117
- function Zl(e, t) {
7208
+ function $l(e, t) {
7118
7209
  return e == null || !t || e.length === 0 || e[0] !== "anyOf" ? e : e[1] === 0 ? e.slice(2) : void 0;
7119
7210
  }
7120
- function Ql(e, t) {
7211
+ function eu(e, t) {
7121
7212
  try {
7122
- let n = {}, r = Yl.compile(Xl($l(e.schema), e.nullable), {
7213
+ let n = {}, r = Zl.compile(Ql(tu(e.schema), e.nullable), {
7123
7214
  ...e,
7124
7215
  error: n
7125
- }), i = Yl.compile(Xl($l(t.schema), t.nullable), {
7216
+ }), i = Zl.compile(Ql(tu(t.schema), t.nullable), {
7126
7217
  ...t,
7127
7218
  error: n
7128
- }), { result: a, errorPath: o } = Yl.isSubset(r, i);
7129
- return a == Nl.True ? { kind: "compatible" } : {
7219
+ }), { result: a, errorPath: o } = Zl.isSubset(r, i);
7220
+ return a == Fl.True ? { kind: "compatible" } : {
7130
7221
  kind: "incompatible",
7131
7222
  error: n.message,
7132
7223
  errorPath: o
@@ -7138,7 +7229,7 @@ function Ql(e, t) {
7138
7229
  };
7139
7230
  }
7140
7231
  }
7141
- function $l(e) {
7232
+ function tu(e) {
7142
7233
  function t(t) {
7143
7234
  if (!t.startsWith("#")) return;
7144
7235
  let n = decodeURIComponent(t.slice(1));
@@ -7191,46 +7282,28 @@ function $l(e) {
7191
7282
  }
7192
7283
  //#endregion
7193
7284
  //#region src/flow/common/schema.ts
7194
- function eu(e) {
7195
- return e.kind == "poll" || e.kind == "integration" ? e.definition.payloadSchema : e.kind == "manual" ? {
7196
- additionalProperties: !1,
7197
- type: "object"
7198
- } : e.kind == "cron" ? {
7199
- additionalProperties: !1,
7200
- properties: { scheduledAt: {
7201
- format: "date-time",
7202
- type: "string"
7203
- } },
7204
- type: "object"
7205
- } : {
7206
- additionalProperties: !1,
7207
- properties: Object.fromEntries(e.inputsDef.map((e) => [e.handle, e.jsonSchema])),
7208
- required: e.inputsDef.filter((e) => !e.nullable && !Object.hasOwn(e, "value")).map((e) => e.handle),
7209
- type: "object"
7210
- };
7211
- }
7212
- function tu(e, t) {
7285
+ function nu(e, t) {
7213
7286
  if (e === t) return !0;
7214
7287
  if (e == null || t == null || typeof e != "object" || typeof t != "object") return !1;
7215
- if (Array.isArray(e) || Array.isArray(t)) return Array.isArray(e) && Array.isArray(t) && e.length == t.length && e.every((e, n) => tu(e, t[n]));
7288
+ if (Array.isArray(e) || Array.isArray(t)) return Array.isArray(e) && Array.isArray(t) && e.length == t.length && e.every((e, n) => nu(e, t[n]));
7216
7289
  let n = Object.entries(e), r = t;
7217
- return n.length == Object.keys(r).length && n.every(([e, t]) => Object.hasOwn(r, e) && tu(t, r[e]));
7290
+ return n.length == Object.keys(r).length && n.every(([e, t]) => Object.hasOwn(r, e) && nu(t, r[e]));
7218
7291
  }
7219
- function nu(e) {
7292
+ function ru(e) {
7220
7293
  return typeof e == "object" && e && !Array.isArray(e) ? e : void 0;
7221
7294
  }
7222
- function ru(e) {
7295
+ function iu(e) {
7223
7296
  return Array.isArray(e) ? e : void 0;
7224
7297
  }
7225
- function iu(e, t, n = !1, r = !1) {
7226
- if (t === !0 || tu(t, {})) return { kind: "compatible" };
7227
- if (e === !0 || tu(e, {}) || e === !1 || t === !1) return { kind: "incompatible" };
7228
- let i = nu(e), a = nu(t);
7298
+ function au(e, t, n = !1, r = !1) {
7299
+ if (t === !0 || nu(t, {})) return { kind: "compatible" };
7300
+ if (e === !0 || nu(e, {}) || e === !1 || t === !1) return { kind: "incompatible" };
7301
+ let i = ru(e), a = ru(t);
7229
7302
  if (i == null || a == null) return {
7230
7303
  kind: "compare-error",
7231
7304
  message: "Port schema must be an object or boolean."
7232
7305
  };
7233
- let o = Ql({
7306
+ let o = eu({
7234
7307
  nullable: n,
7235
7308
  packageId: void 0,
7236
7309
  schema: i
@@ -7241,22 +7314,22 @@ function iu(e, t, n = !1, r = !1) {
7241
7314
  });
7242
7315
  return o.kind == "incompatible" ? {
7243
7316
  ...o,
7244
- errorPath: Zl(o.errorPath, r)
7317
+ errorPath: $l(o.errorPath, r)
7245
7318
  } : o;
7246
7319
  }
7247
- function au(e, t) {
7320
+ function ou(e, t) {
7248
7321
  let n = e;
7249
7322
  for (let e of t) {
7250
7323
  if (typeof n != "object" || !n) return;
7251
- n = Array.isArray(n) ? n[Number(e)] : nu(n)?.[String(e)];
7324
+ n = Array.isArray(n) ? n[Number(e)] : ru(n)?.[String(e)];
7252
7325
  }
7253
7326
  return n;
7254
7327
  }
7255
- function ou(e, t, n) {
7328
+ function su(e, t, n) {
7256
7329
  if (e.nullable && !t.nullable) return { kind: "nullable" };
7257
7330
  if (n.error == "edgeError.binDiffType") return { kind: "binary" };
7258
7331
  if (n.error == "edgeError.artifactDiffType") return { kind: "artifact" };
7259
- let r = nu(e.jsonSchema), i = nu(t.jsonSchema), a = n.errorPath == null && r != null && i != null ? su(r, i) : void 0, o = a == null ? n.errorPath : [a], s = o?.at(-1);
7332
+ let r = ru(e.jsonSchema), i = ru(t.jsonSchema), a = n.errorPath == null && r != null && i != null ? cu(r, i) : void 0, o = a == null ? n.errorPath : [a], s = o?.at(-1);
7260
7333
  if (typeof s != "string" || !Ut(s)) return {
7261
7334
  kind: "schema",
7262
7335
  path: o
@@ -7266,19 +7339,19 @@ function ou(e, t, n) {
7266
7339
  kind: "keyword",
7267
7340
  keyword: s,
7268
7341
  path: c,
7269
- source: au(e.jsonSchema, [...c, s]),
7270
- target: au(t.jsonSchema, [...c, s])
7342
+ source: ou(e.jsonSchema, [...c, s]),
7343
+ target: ou(t.jsonSchema, [...c, s])
7271
7344
  };
7272
7345
  }
7273
- function su(e, t) {
7274
- if (!tu(e.type, t.type)) return "type";
7275
- if (t.const !== void 0 && !tu(e.const, t.const)) return "const";
7276
- if (t.enum !== void 0 && !tu(e.enum, t.enum)) return "enum";
7346
+ function cu(e, t) {
7347
+ if (!nu(e.type, t.type)) return "type";
7348
+ if (t.const !== void 0 && !nu(e.const, t.const)) return "const";
7349
+ if (t.enum !== void 0 && !nu(e.enum, t.enum)) return "enum";
7277
7350
  let n = new Set(Array.isArray(e.required) ? e.required : []);
7278
7351
  if (Array.isArray(t.required) && t.required.some((e) => typeof e == "string" && !n.has(e))) return "required";
7279
- for (let n of cu) if (t[n] !== void 0 && !tu(e[n], t[n])) return n;
7352
+ for (let n of lu) if (t[n] !== void 0 && !nu(e[n], t[n])) return n;
7280
7353
  }
7281
- var cu = [
7354
+ var lu = [
7282
7355
  "minLength",
7283
7356
  "maxLength",
7284
7357
  "pattern",
@@ -7292,26 +7365,87 @@ var cu = [
7292
7365
  "minProperties",
7293
7366
  "maxProperties"
7294
7367
  ];
7295
- function lu(e, t) {
7296
- let n = iu(e.jsonSchema, t.jsonSchema, e.nullable, t.nullable);
7368
+ function uu(e, t) {
7369
+ let n = au(e.jsonSchema, t.jsonSchema, e.nullable, t.nullable);
7297
7370
  return n.kind == "incompatible" ? {
7298
7371
  kind: "incompatible",
7299
- mismatch: ou(e, t, n)
7372
+ mismatch: su(e, t, n)
7300
7373
  } : n;
7301
7374
  }
7302
- function uu(e, t) {
7303
- return lu(e, t).kind == "compatible";
7375
+ function du(e, t) {
7376
+ return uu(e, t).kind == "compatible";
7304
7377
  }
7305
- function du(e) {
7306
- let t = nu(e), n = ru(t?.type);
7307
- return t != null && n?.includes("string") ? iu({ type: "string" }, {
7378
+ function fu(e) {
7379
+ let t = ru(e), n = iu(t?.type);
7380
+ return t != null && n?.includes("string") ? au({ type: "string" }, {
7308
7381
  ...t,
7309
7382
  type: "string"
7310
- }).kind == "compatible" : iu({ type: "string" }, e).kind == "compatible";
7383
+ }).kind == "compatible" : au({ type: "string" }, e).kind == "compatible";
7384
+ }
7385
+ //#endregion
7386
+ //#region src/trigger/common/contract.ts
7387
+ var pu = [
7388
+ {
7389
+ handle: "headers",
7390
+ jsonSchema: {
7391
+ type: "object",
7392
+ additionalProperties: { type: "string" }
7393
+ },
7394
+ nullable: !1
7395
+ },
7396
+ {
7397
+ handle: "query",
7398
+ jsonSchema: {
7399
+ type: "object",
7400
+ additionalProperties: {
7401
+ type: ["string", "array"],
7402
+ items: { type: "string" }
7403
+ }
7404
+ },
7405
+ nullable: !1
7406
+ },
7407
+ {
7408
+ handle: "body",
7409
+ jsonSchema: {
7410
+ type: "object",
7411
+ additionalProperties: !0
7412
+ },
7413
+ nullable: !1
7414
+ },
7415
+ {
7416
+ handle: "webhookUrl",
7417
+ jsonSchema: { type: "string" },
7418
+ nullable: !1
7419
+ }
7420
+ ], mu = [{
7421
+ description: "The scheduled time that triggered this run, in ISO 8601 format.",
7422
+ handle: "scheduledAt",
7423
+ jsonSchema: {
7424
+ type: "string",
7425
+ format: "date-time"
7426
+ },
7427
+ nullable: !1
7428
+ }];
7429
+ function hu(e) {
7430
+ switch (e.kind) {
7431
+ case "manual": return [];
7432
+ case "cron": return mu;
7433
+ case "poll":
7434
+ case "integration": return e.definition.outputs;
7435
+ case "webhook": return pu.map((t) => t.handle === "body" ? Object.assign({}, t, { jsonSchema: {
7436
+ type: "object",
7437
+ additionalProperties: !1,
7438
+ properties: Object.fromEntries(e.bodyFields.map((e) => [e.handle, e.jsonSchema])),
7439
+ required: e.bodyFields.filter((e) => !e.nullable && !Object.hasOwn(e, "value")).map((e) => e.handle)
7440
+ } }) : t);
7441
+ }
7442
+ }
7443
+ function gu(e) {
7444
+ return Object.fromEntries(hu(e).map(({ handle: e, ...t }) => [e, t]));
7311
7445
  }
7312
7446
  //#endregion
7313
7447
  //#region src/flow/common/graph.ts
7314
- function fu(e, t) {
7448
+ function _u(e, t) {
7315
7449
  switch (t.kind) {
7316
7450
  case "condition": return { [t.input.handle]: t.input };
7317
7451
  case "value": return {};
@@ -7325,7 +7459,7 @@ function fu(e, t) {
7325
7459
  case "webhook": return {};
7326
7460
  }
7327
7461
  }
7328
- function pu(e) {
7462
+ function vu(e) {
7329
7463
  return {
7330
7464
  notification: {
7331
7465
  nullable: !1,
@@ -7364,7 +7498,7 @@ function pu(e) {
7364
7498
  }]))
7365
7499
  };
7366
7500
  }
7367
- function mu(e, t) {
7501
+ function yu(e, t) {
7368
7502
  switch (t.kind) {
7369
7503
  case "condition": {
7370
7504
  let e = [...t.cases.map((e) => e.output), ...t.defaultOutput == null ? [] : [t.defaultOutput]];
@@ -7373,18 +7507,15 @@ function mu(e, t) {
7373
7507
  case "value": return Tt(t.values);
7374
7508
  case "subflow": return Tt(e.subflows[t.subflowId]?.outputs ?? []);
7375
7509
  case "task": return Tt(t.task == null ? e.tasks[t.taskId]?.outputs ?? [] : t.task.outputs);
7376
- case "wait": return pu(t);
7510
+ case "wait": return vu(t);
7377
7511
  case "cron":
7378
7512
  case "integration":
7379
7513
  case "poll":
7380
7514
  case "manual":
7381
- case "webhook": return { payload: {
7382
- jsonSchema: eu(t),
7383
- nullable: !1
7384
- } };
7515
+ case "webhook": return gu(t);
7385
7516
  }
7386
7517
  }
7387
- function hu(e) {
7518
+ function bu(e) {
7388
7519
  let t = new Map(Object.keys(e.nodes).map((e) => [e, /* @__PURE__ */ new Set()])), n = /* @__PURE__ */ new Map();
7389
7520
  for (let r of e.edges) {
7390
7521
  if (!t.has(r.source) || !t.has(r.target)) continue;
@@ -7401,51 +7532,56 @@ function hu(e) {
7401
7532
  n?.delete(i), n?.size == 0 && r.push(e);
7402
7533
  }
7403
7534
  }
7404
- return r;
7535
+ return [...r, ...[...t.keys()].toSorted()];
7405
7536
  }
7406
- var gu = /* @__PURE__ */ new WeakMap();
7407
- function _u(e, t) {
7537
+ var xu = /* @__PURE__ */ new WeakMap();
7538
+ function Su(e, t) {
7408
7539
  return Object.entries(e).every(([e, n]) => t[e] == n);
7409
7540
  }
7410
- function vu(e, t) {
7541
+ function Cu(e, t) {
7411
7542
  return Object.entries(e).every(([e, n]) => t[e] == null || t[e] == n);
7412
7543
  }
7413
- function yu(e) {
7414
- let t = gu.get(e);
7544
+ function wu(e) {
7545
+ let t = xu.get(e);
7415
7546
  if (t != null) return t;
7416
7547
  let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
7417
7548
  for (let t of e.edges) {
7418
7549
  let e = a.get(t.target) ?? [];
7419
7550
  e.push(t), a.set(t.target, e);
7420
7551
  }
7421
- for (let t of hu(e)) {
7422
- let o = e.nodes[t], s = a.get(t) ?? [], c = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set(), u = [];
7423
- for (let t of s) {
7424
- c.add(t.source);
7425
- for (let e of i.get(t.source) ?? []) l.add(e);
7426
- e.nodes[t.source]?.kind == "wait" && t.sourceHandle != "notification" && l.add(t.source);
7427
- for (let e of r.get(t.source) ?? []) c.add(e);
7428
- for (let r of n.get(t.source) ?? []) {
7429
- let n = t.sourceHandle == null || e.nodes[t.source]?.kind == "wait" && t.sourceHandle == "notification" ? r : {
7430
- ...r,
7431
- [t.source]: t.sourceHandle
7432
- };
7433
- if (!u.some((e) => _u(e, n))) {
7434
- for (let e = u.length - 1; e >= 0; e--) _u(n, u[e]) && u.splice(e, 1);
7435
- u.push(n);
7552
+ let o = bu(e), s = !0;
7553
+ for (; s;) {
7554
+ s = !1;
7555
+ for (let t of o) {
7556
+ let o = e.nodes[t], c = a.get(t) ?? [], l = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), d = [];
7557
+ for (let t of c) {
7558
+ l.add(t.source);
7559
+ for (let e of i.get(t.source) ?? []) u.add(e);
7560
+ e.nodes[t.source]?.kind == "wait" && t.sourceHandle != "notification" && u.add(t.source);
7561
+ for (let e of r.get(t.source) ?? []) l.add(e);
7562
+ for (let r of n.get(t.source) ?? []) {
7563
+ let n = t.sourceHandle == null || e.nodes[t.source]?.kind == "wait" && t.sourceHandle == "notification" ? r : {
7564
+ ...r,
7565
+ [t.source]: t.sourceHandle
7566
+ };
7567
+ if (!d.some((e) => Su(e, n))) {
7568
+ for (let e = d.length - 1; e >= 0; e--) Su(n, d[e]) && d.splice(e, 1);
7569
+ d.push(n);
7570
+ }
7436
7571
  }
7437
7572
  }
7573
+ let f = c.length == 0 ? "inputs" in o ? [{}] : [{ $trigger: t }] : d, p = n.get(t) ?? [];
7574
+ (l.size != (r.get(t)?.size ?? 0) || u.size != (i.get(t)?.size ?? 0) || f.length != p.length || f.some((e) => !p.some((t) => Su(t, e) && Su(e, t)))) && (s = !0), r.set(t, l), i.set(t, u), n.set(t, f);
7438
7575
  }
7439
- r.set(t, c), i.set(t, l), n.set(t, s.length == 0 ? "inputs" in o ? [{}] : [{ $trigger: t }] : u);
7440
7576
  }
7441
- let o = {
7577
+ let c = {
7442
7578
  ancestors: r,
7443
7579
  paths: n,
7444
7580
  resolvedWaits: i
7445
7581
  };
7446
- return gu.set(e, o), o;
7582
+ return xu.set(e, c), c;
7447
7583
  }
7448
- function bu(e, t, n) {
7584
+ function Tu(e, t, n) {
7449
7585
  if (n.kind != "node") return [{}];
7450
7586
  let r = e.nodes[n.nodeId], i = t.get(n.nodeId) ?? [];
7451
7587
  return r?.kind == "condition" || r?.kind == "wait" && n.output != "notification" ? i.map((e) => ({
@@ -7453,66 +7589,69 @@ function bu(e, t, n) {
7453
7589
  [n.nodeId]: n.output
7454
7590
  })) : i;
7455
7591
  }
7456
- function xu(e, t, n, r) {
7592
+ function Eu(e, t, n, r) {
7457
7593
  if (n.kind == "value") return !0;
7458
7594
  let { ancestors: i, paths: a } = r;
7459
7595
  if (t != null && n.sources.some((e) => e.kind == "node" && !i.get(t)?.has(e.nodeId)) || t != null && n.sources.some((n) => n.kind == "node" && e.nodes[n.nodeId]?.kind == "wait" && n.output != "notification" && !r.resolvedWaits.get(t)?.has(n.nodeId))) return !1;
7460
- let o = n.sources.map((t) => bu(e, a, t)), s = t == null ? [{}] : a.get(t) ?? [];
7461
- for (let [e, t] of o.entries()) for (let n of o.slice(e + 1)) for (let e of t) for (let t of s) {
7462
- if (!vu(e, t)) continue;
7463
- let r = {
7464
- ...t,
7465
- ...e
7466
- };
7467
- if (n.some((e) => vu(e, r))) return !1;
7596
+ let o = n.sources.map((t) => Tu(e, a, t)), s = t == null ? [{}] : a.get(t) ?? [];
7597
+ for (let [e, r] of o.entries()) for (let [a, c] of o.slice(e + 1).entries()) {
7598
+ let o = n.sources[e], l = n.sources[e + a + 1];
7599
+ if (!(t != null && o.kind == "node" && l.kind == "node" && o.nodeId != l.nodeId && !i.get(o.nodeId)?.has(l.nodeId) && !i.get(l.nodeId)?.has(o.nodeId))) for (let e of r) for (let t of s) {
7600
+ if (!Cu(e, t)) continue;
7601
+ let n = {
7602
+ ...t,
7603
+ ...e
7604
+ };
7605
+ if (c.some((e) => Cu(e, n))) return !1;
7606
+ }
7468
7607
  }
7469
7608
  return !0;
7470
7609
  }
7471
- function Su(e, t, n, r, i) {
7610
+ function Du(e, t, n, r, i) {
7472
7611
  let a = t.nodes[i.nodeId], o = t.nodes[n];
7473
7612
  if (a == null) return { kind: "source-missing" };
7474
7613
  if (o == null) return { kind: "not-ready" };
7475
- let s = mu(e, a)[i.output], c = fu(e, o)[r];
7614
+ let s = yu(e, a)[i.output], c = _u(e, o)[r];
7476
7615
  if (s == null) return { kind: "output-missing" };
7477
7616
  if (c == null) return { kind: "not-ready" };
7478
- let l = yu(t);
7617
+ let l = wu(t);
7479
7618
  if (l.ancestors.get(n)?.has(i.nodeId) !== !0 || a.kind == "wait" && i.output != "notification" && !l.resolvedWaits.get(n)?.has(i.nodeId)) return { kind: "not-ready" };
7480
- let u = lu(s, c);
7619
+ let u = uu(s, c);
7481
7620
  return u.kind == "compatible" ? { kind: "available" } : u.kind == "incompatible" ? {
7482
7621
  kind: "schema",
7483
7622
  mismatch: u.mismatch
7484
7623
  } : { kind: "schema-error" };
7485
7624
  }
7486
- function Cu(e, t, n, r, i) {
7487
- let a = i.map((i) => Su(e, t, n, r, i));
7625
+ function Ou(e, t, n, r, i) {
7626
+ let a = i.map((i) => Du(e, t, n, r, i));
7488
7627
  return {
7489
- conflict: a.length > 1 && a.every((e) => e.kind == "available") && !xu(t, n, {
7628
+ conflict: a.length > 1 && a.every((e) => e.kind == "available") && !Eu(t, n, {
7490
7629
  kind: "sources",
7491
7630
  sources: i.map((e) => ({
7492
7631
  kind: "node",
7493
7632
  ...e
7494
7633
  }))
7495
- }, yu(t)),
7634
+ }, wu(t)),
7496
7635
  sources: a
7497
7636
  };
7498
7637
  }
7499
- function wu(e, t, n, r) {
7500
- let i = yu(t);
7638
+ function ku(e, t, n, r) {
7639
+ let i = wu(t);
7501
7640
  return Object.fromEntries([...i.ancestors.get(n) ?? []].flatMap((a) => {
7502
7641
  let o = t.nodes[a];
7503
7642
  if (o == null) return [];
7504
- let s = Object.keys(mu(e, o)).filter((s) => xu(t, n, {
7643
+ let s = Object.keys(yu(e, o)).filter((s) => Eu(t, n, {
7505
7644
  kind: "sources",
7506
7645
  sources: [{
7507
7646
  kind: "node",
7508
7647
  nodeId: a,
7509
7648
  output: s
7510
7649
  }]
7511
- }, i) && (r == null || uu(mu(e, o)[s], fu(e, t.nodes[n])[r])));
7650
+ }, i) && (r == null || du(yu(e, o)[s], _u(e, t.nodes[n])[r])));
7512
7651
  return s.length == 0 ? [] : [[a, s]];
7513
7652
  }));
7514
7653
  }
7515
- `${JSON.stringify("open-flow-engine/v4")}`, new Set([
7654
+ `${JSON.stringify("open-flow-engine/v5")}`, new Set([
7516
7655
  "assert",
7517
7656
  "assert/strict",
7518
7657
  "buffer",
@@ -7537,7 +7676,7 @@ function wu(e, t, n, r) {
7537
7676
  "url",
7538
7677
  "util",
7539
7678
  "zlib"
7540
- ].flatMap((e) => [e, `node:${e}`])), `${JSON.stringify("open-flow-engine/v4/nodejs-compat-v1")}`;
7679
+ ].flatMap((e) => [e, `node:${e}`])), `${JSON.stringify("open-flow-engine/v5/nodejs-compat-v1")}`;
7541
7680
  //#endregion
7542
7681
  //#region src/flow/common/agent.ts
7543
7682
  var Q = jt(() => Wt([Nt(), At({
@@ -7582,7 +7721,7 @@ var Q = jt(() => Wt([Nt(), At({
7582
7721
  return !1;
7583
7722
  }
7584
7723
  }, "Invalid regular expression.").optional(),
7585
- format: j().refine((e) => Object.hasOwn(wo, e), "Unsupported string format.").optional(),
7724
+ format: j().refine((e) => Object.hasOwn(Eo, e), "Unsupported string format.").optional(),
7586
7725
  multipleOf: Pt().positive().optional(),
7587
7726
  uniqueItems: Nt().optional(),
7588
7727
  contains: Q.optional(),
@@ -7629,11 +7768,11 @@ var Q = jt(() => Wt([Nt(), At({
7629
7768
  }).transform(({ title: e, default: t, examples: n, readOnly: r, writeOnly: i, deprecated: a, $comment: o, ...s }) => s)]));
7630
7769
  //#endregion
7631
7770
  //#region src/flow/common/semantics.ts
7632
- function Tu(e) {
7771
+ function Au(e) {
7633
7772
  return Object.keys(e).toSorted().map((t) => [t, e[t]]);
7634
7773
  }
7635
- function Eu(e, t) {
7636
- if (t != null) return Eu(Du(e, t));
7774
+ function ju(e, t) {
7775
+ if (t != null) return ju(Mu(e, t));
7637
7776
  let n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
7638
7777
  function s(e) {
7639
7778
  n.add(e);
@@ -7648,7 +7787,7 @@ function Eu(e, t) {
7648
7787
  for (let t of Object.values(e)) if (t.kind == "sources") for (let e of t.sources) e.kind == "binding" && (r.add(e.bindingId), s(e.bindingId));
7649
7788
  }
7650
7789
  function u(t) {
7651
- for (let [, n] of Tu(t.nodes)) switch ("inputs" in n && l(n.inputs), n.kind) {
7790
+ for (let [, n] of Au(t.nodes)) switch ("inputs" in n && l(n.inputs), n.kind) {
7652
7791
  case "condition": break;
7653
7792
  case "subflow":
7654
7793
  d(n.subflowId);
@@ -7681,7 +7820,7 @@ function Eu(e, t) {
7681
7820
  tasks: o
7682
7821
  };
7683
7822
  }
7684
- function Du(e, t) {
7823
+ function Mu(e, t) {
7685
7824
  let n = e.document.graph, r = /* @__PURE__ */ new Set([t]);
7686
7825
  for (let e of r) for (let t of n.edges) t.source == e && r.add(t.target);
7687
7826
  function i(e, t) {
@@ -7710,7 +7849,7 @@ function Du(e, t) {
7710
7849
  edges: n.edges.filter((e) => r.has(e.source))
7711
7850
  }
7712
7851
  }
7713
- }, { bindings: s } = Eu(o);
7852
+ }, { bindings: s } = ju(o);
7714
7853
  return {
7715
7854
  ...o,
7716
7855
  document: {
@@ -7719,7 +7858,7 @@ function Du(e, t) {
7719
7858
  }
7720
7859
  };
7721
7860
  }
7722
- function Ou(e) {
7861
+ function Nu(e) {
7723
7862
  return Object.values(e.tasks).flatMap((t) => {
7724
7863
  if (t.executor.kind != "agent") return [];
7725
7864
  let n = t.executor.notification == null ? void 0 : e.tasks[t.executor.notification.taskId]?.executor;
@@ -7730,12 +7869,12 @@ function Ou(e) {
7730
7869
  }));
7731
7870
  });
7732
7871
  }
7733
- function ku(e) {
7872
+ function Pu(e) {
7734
7873
  return [e.graph, ...Object.values(e.subflows).map((e) => e.graph)].flatMap((e) => Object.values(e.nodes).flatMap((e) => e.kind == "task" && e.task != null ? e.task.capabilities ?? [] : []));
7735
7874
  }
7736
7875
  //#endregion
7737
7876
  //#region src/workbench/browser/runtime/revisionView.ts
7738
- var Au = /* @__PURE__ */ new WeakMap(), ju = class {
7877
+ var Fu = /* @__PURE__ */ new WeakMap(), Iu = class {
7739
7878
  #e;
7740
7879
  #t;
7741
7880
  #n = /* @__PURE__ */ new WeakMap();
@@ -7745,7 +7884,7 @@ var Au = /* @__PURE__ */ new WeakMap(), ju = class {
7745
7884
  this.revision = e, this.#e = e.content.document, this.#t = e.content.modules;
7746
7885
  let t = /* @__PURE__ */ new Set();
7747
7886
  for (let e of Object.values(this.#e.tasks)) e.executor.kind == "connector" && t.add(e.executor.action);
7748
- for (let e of [...ku(this.#e), ...Ou(this.#e)]) t.add(e.action);
7887
+ for (let e of [...Pu(this.#e), ...Nu(this.#e)]) t.add(e.action);
7749
7888
  this.connectorActionIds = t;
7750
7889
  }
7751
7890
  subflow(e) {
@@ -7764,8 +7903,8 @@ var Au = /* @__PURE__ */ new WeakMap(), ju = class {
7764
7903
  conflict: !1,
7765
7904
  sources: []
7766
7905
  } : void 0, d, f = {
7767
- check: () => u ??= Cu(this.#e, r, t, n, l),
7768
- candidates: () => d ??= wu(this.#e, r, t, n)
7906
+ check: () => u ??= Ou(this.#e, r, t, n, l),
7907
+ candidates: () => d ??= ku(this.#e, r, t, n)
7769
7908
  };
7770
7909
  return i ?? this.#r.set(r, i = /* @__PURE__ */ new Map()), i.set(a, f), f;
7771
7910
  }
@@ -7887,13 +8026,13 @@ var Au = /* @__PURE__ */ new WeakMap(), ju = class {
7887
8026
  return !1;
7888
8027
  }
7889
8028
  };
7890
- function Mu(e) {
7891
- let t = Au.get(e);
7892
- return t ?? (t = new ju(e), Au.set(e, t)), t;
8029
+ function Lu(e) {
8030
+ let t = Fu.get(e);
8031
+ return t ?? (t = new Iu(e), Fu.set(e, t)), t;
7893
8032
  }
7894
8033
  //#endregion
7895
8034
  //#region src/workbench/browser/runtime/runs/runStore.ts
7896
- var Nu = {
8035
+ var Ru = {
7897
8036
  eventCursor: 0,
7898
8037
  eventFilter: "all",
7899
8038
  events: [],
@@ -7908,33 +8047,33 @@ var Nu = {
7908
8047
  resolvingActions: /* @__PURE__ */ new Map(),
7909
8048
  runById: /* @__PURE__ */ new Map(),
7910
8049
  runIds: []
7911
- }, Pu = 100, Fu = 500, Iu = 1200, Lu = 6e4;
7912
- function Ru(e) {
8050
+ }, zu = 100, Bu = 500, Vu = 1200, Hu = 6e4;
8051
+ function Uu(e) {
7913
8052
  return e?.status == "queued" || e?.status == "starting" || e?.status == "running" || e?.status == "waiting";
7914
8053
  }
7915
- function zu(e) {
8054
+ function Wu(e) {
7916
8055
  return e.selectedRunId == null ? void 0 : e.runById.get(e.selectedRunId);
7917
8056
  }
7918
- function Bu(e, t) {
7919
- let n = new Map(t.map((e) => [e.runId, e])), r = t.map((e) => e.runId), i = zu(e);
8057
+ function Gu(e, t) {
8058
+ let n = new Map(t.map((e) => [e.runId, e])), r = t.map((e) => e.runId), i = Wu(e);
7920
8059
  return i != null && (n.has(i.runId) || r.unshift(i.runId), n.set(i.runId, i)), {
7921
8060
  runById: n,
7922
8061
  runIds: r
7923
8062
  };
7924
8063
  }
7925
- function Vu(e, t) {
8064
+ function Ku(e, t) {
7926
8065
  return new Map(e.runById).set(t.runId, t);
7927
8066
  }
7928
- var Hu = class {
8067
+ var qu = class {
7929
8068
  #e = new oo();
7930
8069
  #t;
7931
8070
  #n;
7932
8071
  #r = new oo();
7933
8072
  #i = new oo();
7934
8073
  #a;
7935
- #o = n(Nu);
8074
+ #o = n(Ru);
7936
8075
  #s;
7937
- constructor(t, n, i = xt()) {
8076
+ constructor(t, n, i = yt()) {
7938
8077
  this.#t = t, this.#n = i, this.#a = n, this.$ = {
7939
8078
  cancelingRunId: e(this.#o, (e) => e.cancelingRunId),
7940
8079
  eventFilter: e(this.#o, (e) => e.eventFilter),
@@ -7951,7 +8090,7 @@ var Hu = class {
7951
8090
  refreshing: e(this.#o, (e) => e.refreshing),
7952
8091
  result: e(this.#o, (e) => e.result),
7953
8092
  resolvingActions: e(this.#o, (e) => e.resolvingActions),
7954
- run: e(this.#o, zu),
8093
+ run: e(this.#o, Wu),
7955
8094
  runs: e(this.#o, (e) => e.runIds.flatMap((t) => {
7956
8095
  let n = e.runById.get(t);
7957
8096
  return n == null ? [] : [n];
@@ -7964,7 +8103,7 @@ var Hu = class {
7964
8103
  this.#o.dispose();
7965
8104
  }
7966
8105
  reset() {
7967
- this.#e.invalidate(), this.#r.invalidate(), this.#i.invalidate(), this.#f(), this.#o.set(Nu);
8106
+ this.#e.invalidate(), this.#r.invalidate(), this.#i.invalidate(), this.#f(), this.#o.set(Ru);
7968
8107
  }
7969
8108
  async load(e) {
7970
8109
  let t = this.#o.value, n = t.loaded && t.target?.flowId == e, r = this.#r.begin();
@@ -7979,7 +8118,7 @@ var Hu = class {
7979
8118
  let t = await this.#t.listRuns(e, { limit: 50 });
7980
8119
  if (!r() || this.#o.value.target?.flowId != e) return;
7981
8120
  this.#p({
7982
- ...Bu(this.#o.value, t.runs),
8121
+ ...Gu(this.#o.value, t.runs),
7983
8122
  nextCursor: t.nextCursor,
7984
8123
  refreshing: !1
7985
8124
  });
@@ -7990,9 +8129,9 @@ var Hu = class {
7990
8129
  return;
7991
8130
  }
7992
8131
  this.#i.invalidate(), this.#f();
7993
- let i = zu(t)?.flowId == e ? t.cancelingRunId : void 0;
8132
+ let i = Wu(t)?.flowId == e ? t.cancelingRunId : void 0;
7994
8133
  t.cancelingRunId != null && i == null && this.#e.invalidate(), this.#o.set({
7995
- ...Nu,
8134
+ ...Ru,
7996
8135
  ...i == null ? {} : { cancelingRunId: i },
7997
8136
  eventFilter: t.eventFilter,
7998
8137
  loading: !0,
@@ -8002,7 +8141,7 @@ var Hu = class {
8002
8141
  let t = await this.#t.listRuns(e, { limit: 50 });
8003
8142
  if (!r()) return;
8004
8143
  this.#p({
8005
- ...Bu(this.#o.value, t.runs),
8144
+ ...Gu(this.#o.value, t.runs),
8006
8145
  loaded: !0,
8007
8146
  loadFailed: !1,
8008
8147
  loading: !1,
@@ -8062,7 +8201,7 @@ var Hu = class {
8062
8201
  e != null && await this.load(e.flowId);
8063
8202
  }
8064
8203
  retryObservation() {
8065
- let e = zu(this.#o.value);
8204
+ let e = Wu(this.#o.value);
8066
8205
  if (e == null) return;
8067
8206
  let t = this.#i.begin();
8068
8207
  this.#f(), this.#p({ observationFailed: !1 }), this.#l(e, t);
@@ -8071,8 +8210,8 @@ var Hu = class {
8071
8210
  this.#p({ eventFilter: e });
8072
8211
  }
8073
8212
  async cancel() {
8074
- let e = zu(this.#o.value);
8075
- if (!Ru(e) || this.#o.value.cancelingRunId != null || this.#o.value.resolvingActions.size > 0) return;
8213
+ let e = Wu(this.#o.value);
8214
+ if (!Uu(e) || this.#o.value.cancelingRunId != null || this.#o.value.resolvingActions.size > 0) return;
8076
8215
  let t = this.#e.begin();
8077
8216
  this.#p({ cancelingRunId: e.runId });
8078
8217
  try {
@@ -8084,7 +8223,7 @@ var Hu = class {
8084
8223
  ...i,
8085
8224
  status: n.status
8086
8225
  };
8087
- if (this.#p({ runById: Vu(r, a) }), r.selectedRunId != e.runId) return;
8226
+ if (this.#p({ runById: Ku(r, a) }), r.selectedRunId != e.runId) return;
8088
8227
  let o = this.#i.begin();
8089
8228
  this.#f(), await this.#l(a, o);
8090
8229
  } catch (e) {
@@ -8094,18 +8233,18 @@ var Hu = class {
8094
8233
  }
8095
8234
  }
8096
8235
  async resolve(e, t) {
8097
- let n = zu(this.#o.value), r = n != null && "waits" in n ? n.waits.find((t) => t.waitId == e) : void 0;
8236
+ let n = Wu(this.#o.value), r = n != null && "waits" in n ? n.waits.find((t) => t.waitId == e) : void 0;
8098
8237
  if (!(n == null || r == null || this.#o.value.cancelingRunId != null || this.#o.value.resolvingActions.has(e) || !r.actions.some((e) => e == t))) {
8099
8238
  this.#p({ resolvingActions: new Map(this.#o.value.resolvingActions).set(e, t) });
8100
8239
  try {
8101
- let i = await this.#t.resolveRunWait(n.runId, r.waitId, t), a = this.#o.value, o = zu(a);
8240
+ let i = await this.#t.resolveRunWait(n.runId, r.waitId, t), a = this.#o.value, o = Wu(a);
8102
8241
  if (o?.runId != n.runId || !("waits" in o)) return;
8103
8242
  let s = {
8104
8243
  ...o,
8105
8244
  waits: o.waits.filter((t) => t.waitId != e),
8106
8245
  status: i.status
8107
8246
  };
8108
- this.#p({ runById: Vu(a, s) }), this.retryObservation();
8247
+ this.#p({ runById: Ku(a, s) }), this.retryObservation();
8109
8248
  let c = this.#o.value.target;
8110
8249
  c != null && this.#u(c.flowId);
8111
8250
  } catch (e) {
@@ -8139,7 +8278,7 @@ var Hu = class {
8139
8278
  externalRunId: void 0,
8140
8279
  loaded: !0,
8141
8280
  result: void 0,
8142
- runById: Vu(n, e),
8281
+ runById: Ku(n, e),
8143
8282
  runIds: [e.runId, ...n.runIds.filter((t) => t != e.runId)],
8144
8283
  selectedRunId: e.runId,
8145
8284
  target: { flowId: e.flowId }
@@ -8162,7 +8301,7 @@ var Hu = class {
8162
8301
  observationFailed: !1,
8163
8302
  resolvingActions: /* @__PURE__ */ new Map(),
8164
8303
  result: void 0,
8165
- runById: Vu(n, e),
8304
+ runById: Ku(n, e),
8166
8305
  selectedRunId: e.runId
8167
8306
  }), this.#l(e, t);
8168
8307
  }
@@ -8174,7 +8313,7 @@ var Hu = class {
8174
8313
  let a = this.#o.value.eventCursor, [o, s] = yield* an.tryPromise({
8175
8314
  try: (t) => Promise.allSettled([this.#t.getRun(e.runId, t), this.#t.getRunEvents(e.runId, {
8176
8315
  after: a,
8177
- limit: Pu
8316
+ limit: zu
8178
8317
  }, t)]),
8179
8318
  catch: (e) => e
8180
8319
  });
@@ -8186,7 +8325,7 @@ var Hu = class {
8186
8325
  this.#p({
8187
8326
  eventsExpiresAt: void 0,
8188
8327
  historyComplete: !1,
8189
- runById: Vu(this.#o.value, c)
8328
+ runById: Ku(this.#o.value, c)
8190
8329
  }), yield* an.tryPromise({
8191
8330
  try: (e) => this.#d(c, t, e),
8192
8331
  catch: (e) => e
@@ -8199,14 +8338,14 @@ var Hu = class {
8199
8338
  events: [...this.#o.value.events, ...l.events],
8200
8339
  eventsExpiresAt: l.eventsExpiresAt,
8201
8340
  historyComplete: l.historyComplete,
8202
- runById: Vu(this.#o.value, c)
8341
+ runById: Ku(this.#o.value, c)
8203
8342
  }), yield* an.tryPromise({
8204
8343
  try: (e) => this.#d(c, t, e),
8205
8344
  catch: (e) => e
8206
8345
  }), yield* on.succeed(n, void 0), vr(c.status) && l.done) return;
8207
8346
  let u = c.status == "queued" || c.status == "starting";
8208
8347
  i = u && c.status == r.status ? i + 1 : 0;
8209
- let d = vr(c.status) || l.events.length == Pu ? 0 : c.status == "waiting" ? Lu : u ? Math.min(Iu, Fu * 2 ** Math.max(0, i - 1)) : Iu;
8348
+ let d = vr(c.status) || l.events.length == zu ? 0 : c.status == "waiting" ? Hu : u ? Math.min(Vu, Bu * 2 ** Math.max(0, i - 1)) : Vu;
8210
8349
  r = c, yield* an.sleep(d);
8211
8350
  }
8212
8351
  }).pipe(an.catch((n) => an.sync(() => {
@@ -8223,7 +8362,7 @@ var Hu = class {
8223
8362
  let n = await this.#t.listRuns(e, { limit: 50 });
8224
8363
  if (!t() || this.#o.value.target?.flowId != e) return;
8225
8364
  this.#p({
8226
- ...Bu(this.#o.value, n.runs),
8365
+ ...Gu(this.#o.value, n.runs),
8227
8366
  loaded: !0,
8228
8367
  loadingMore: !1,
8229
8368
  nextCursor: n.nextCursor,
@@ -8247,7 +8386,7 @@ var Hu = class {
8247
8386
  ...e
8248
8387
  });
8249
8388
  }
8250
- }, Uu = {
8389
+ }, Ju = {
8251
8390
  "17track": "https://static.oomol.com/logo/third-party/17track.svg",
8252
8391
  "7_shifts": "https://static.oomol.com/logo/third-party/7_shifts.png",
8253
8392
  ably: "https://static.oomol.com/logo/third-party/ably.svg",
@@ -8538,6 +8677,7 @@ var Hu = class {
8538
8677
  ipgeolocation_io: "https://static.oomol.com/logo/third-party/ipgeolocation_io.svg",
8539
8678
  openalex: "https://static.oomol.com/logo/third-party/openalex.svg",
8540
8679
  orcid: "https://static.oomol.com/logo/third-party/orcid.svg",
8680
+ orimon: "https://static.oomol.com/logo/third-party/orimon.svg",
8541
8681
  mendeley: "https://static.oomol.com/logo/third-party/mendeley.svg",
8542
8682
  crossref: "https://static.oomol.com/logo/third-party/crossref.svg",
8543
8683
  datacite: "https://static.oomol.com/logo/third-party/datacite.svg",
@@ -8850,6 +8990,7 @@ var Hu = class {
8850
8990
  myotp_app: "https://static.oomol.com/logo/third-party/myotp_app.png",
8851
8991
  "fusion-api": "https://static.oomol.com/logo/logo.png",
8852
8992
  oomol_console: "https://static.oomol.com/logo/third-party/oomol_console.svg",
8993
+ oomol_rag: "https://static.oomol.com/logo/third-party/oomol_rag.svg",
8853
8994
  indeed: "https://static.oomol.com/logo/third-party/indeed.svg",
8854
8995
  pi_hole: "https://static.oomol.com/logo/third-party/pi_hole.svg",
8855
8996
  firecrawl: "https://static.oomol.com/logo/third-party/Firecrawl.svg",
@@ -9760,25 +9901,25 @@ var Hu = class {
9760
9901
  speedtest_tracker: "https://static.oomol.com/logo/third-party/speedtest_tracker.png",
9761
9902
  bloomerang: "https://static.oomol.com/logo/third-party/bloomerang.png",
9762
9903
  coupontools: "https://static.oomol.com/logo/third-party/coupontools.png"
9763
- }, Wu = {
9904
+ }, Yu = {
9764
9905
  img: "ContentIcon_img_eb462",
9765
9906
  initials: "ContentIcon_initials_eb462"
9766
- }, Gu = {
9907
+ }, Xu = {
9767
9908
  icon: "IconifyIcon_icon_e957a",
9768
9909
  external: "IconifyIcon_external_e957a"
9769
9910
  };
9770
9911
  //#endregion
9771
9912
  //#region ../../node_modules/.bun/@iconify+utils@3.1.4/node_modules/@iconify/utils/lib/svg/url.js
9772
- function Ku(e) {
9913
+ function Zu(e) {
9773
9914
  return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
9774
9915
  }
9775
9916
  //#endregion
9776
9917
  //#region ../../node_modules/.bun/@iconify+utils@3.1.4/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.js
9777
- function qu(e) {
9918
+ function Qu(e) {
9778
9919
  let t = e.startsWith("<svg>") ? e.replace("<svg>", "<svg >") : e;
9779
- return !t.includes(" xmlns:xlink=") && t.includes(" xlink:") && (t = t.replace("<svg ", "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" ")), t.includes(" xmlns=") || (t = t.replace("<svg ", "<svg xmlns=\"http://www.w3.org/2000/svg\" ")), Ku(t);
9920
+ return !t.includes(" xmlns:xlink=") && t.includes(" xlink:") && (t = t.replace("<svg ", "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" ")), t.includes(" xmlns=") || (t = t.replace("<svg ", "<svg xmlns=\"http://www.w3.org/2000/svg\" ")), Zu(t);
9780
9921
  }
9781
- var Ju = {
9922
+ var $u = {
9782
9923
  "skill-icons": {
9783
9924
  prefix: "skill-icons",
9784
9925
  icons: {
@@ -9794,29 +9935,29 @@ var Ju = {
9794
9935
  width: 36,
9795
9936
  height: 36
9796
9937
  }
9797
- }, Yu = null, Xu = /* @__PURE__ */ new Map();
9798
- function Zu(e) {
9799
- let t = Xu.get(e);
9938
+ }, ed = null, td = /* @__PURE__ */ new Map();
9939
+ function nd(e) {
9940
+ let t = td.get(e);
9800
9941
  return t || (t = (e == "carbon" ? import("./carbon-Cn-DTyjG.js").then(({ default: e }) => ({
9801
9942
  icons: e,
9802
9943
  chars: {},
9803
9944
  info: e.info,
9804
9945
  metadata: { categories: e.categories }
9805
9946
  })) : import("./_virtual_open-flow-twemoji-CpHJOEsk.js").then((e) => e.default)).catch((t) => {
9806
- throw Xu.delete(e), t;
9807
- }), Xu.set(e, t)), t;
9947
+ throw td.delete(e), t;
9948
+ }), td.set(e, t)), t;
9808
9949
  }
9809
- var Qu = Xt(null), $u = ({ children: e }) => {
9810
- let [t, n] = F(Yu), r = rn(!0), i = Zt(async (e) => {
9811
- if (Yu?.[e]) {
9812
- r.current && n(Yu);
9950
+ var rd = Xt(null), id = ({ children: e }) => {
9951
+ let [t, n] = F(ed), r = rn(!0), i = Zt(async (e) => {
9952
+ if (ed?.[e]) {
9953
+ r.current && n(ed);
9813
9954
  return;
9814
9955
  }
9815
- let t = await Zu(e);
9816
- Yu = {
9817
- ...Yu,
9956
+ let t = await nd(e);
9957
+ ed = {
9958
+ ...ed,
9818
9959
  [e]: t
9819
- }, r.current && n(Yu);
9960
+ }, r.current && n(ed);
9820
9961
  }, []);
9821
9962
  $t(() => (r.current = !0, () => {
9822
9963
  r.current = !1;
@@ -9825,24 +9966,24 @@ var Qu = Xt(null), $u = ({ children: e }) => {
9825
9966
  data: t,
9826
9967
  loadCollection: i
9827
9968
  }), [t, i]);
9828
- return /* @__PURE__ */ M(Qu.Provider, {
9969
+ return /* @__PURE__ */ M(rd.Provider, {
9829
9970
  value: a,
9830
9971
  children: e
9831
9972
  });
9832
9973
  };
9833
- function ed() {
9834
- return Qt(Qu)?.data ?? null;
9974
+ function ad() {
9975
+ return Qt(rd)?.data ?? null;
9835
9976
  }
9836
- function td() {
9837
- return Qt(Qu)?.loadCollection;
9977
+ function od() {
9978
+ return Qt(rd)?.loadCollection;
9838
9979
  }
9839
9980
  //#endregion
9840
9981
  //#region src/ui/browser/icons/IconifyIcon.tsx
9841
- function nd(e) {
9982
+ function sd(e) {
9842
9983
  return e == "carbon" || e == "twemoji";
9843
9984
  }
9844
- var rd = ({ collection: e, icon: t, color: n, className: r, onError: i }) => {
9845
- let a = ed(!0), o = td(), s = nd(e) ? e : void 0, c = s != null && !a?.[s];
9985
+ var cd = ({ collection: e, icon: t, color: n, className: r, onError: i }) => {
9986
+ let a = ad(!0), o = od(), s = sd(e) ? e : void 0, c = s != null && !a?.[s];
9846
9987
  $t(() => {
9847
9988
  c && s && o?.(s).catch((e) => i?.(e));
9848
9989
  }, [
@@ -9851,52 +9992,52 @@ var rd = ({ collection: e, icon: t, color: n, className: r, onError: i }) => {
9851
9992
  o,
9852
9993
  i
9853
9994
  ]);
9854
- let l = nn(() => dd(e, t, void 0, a), [
9995
+ let l = nn(() => gd(e, t, void 0, a), [
9855
9996
  a,
9856
9997
  e,
9857
9998
  t
9858
9999
  ]);
9859
- return l ? /* @__PURE__ */ M(ud, {
10000
+ return l ? /* @__PURE__ */ M(hd, {
9860
10001
  url: l,
9861
10002
  collection: e,
9862
10003
  icon: t,
9863
10004
  color: n,
9864
10005
  className: r
9865
- }) : c ? /* @__PURE__ */ M("i", {}) : /* @__PURE__ */ M(id, {
10006
+ }) : c ? /* @__PURE__ */ M("i", {}) : /* @__PURE__ */ M(ld, {
9866
10007
  collection: e,
9867
10008
  icon: t,
9868
10009
  color: n,
9869
10010
  className: r,
9870
10011
  onError: i
9871
10012
  });
9872
- }, id = ({ collection: e, icon: t, color: n, className: r, onError: i }) => {
10013
+ }, ld = ({ collection: e, icon: t, color: n, className: r, onError: i }) => {
9873
10014
  let [a, o] = F(void 0);
9874
10015
  return tn(() => {
9875
10016
  let n = !1;
9876
- return sd(e, t).then((e) => {
9877
- n || o(fd(e.width, e.height, e));
10017
+ return fd(e, t).then((e) => {
10018
+ n || o(_d(e.width, e.height, e));
9878
10019
  }).catch((e) => {
9879
10020
  n || (o(void 0), i?.(e));
9880
10021
  }), () => {
9881
10022
  n = !0;
9882
10023
  };
9883
10024
  }, [e, t]), a ? /* @__PURE__ */ M("i", {
9884
- className: A(r, Gu.icon, !a.includes("currentColor") && "is-colored"),
10025
+ className: A(r, Xu.icon, !a.includes("currentColor") && "is-colored"),
9885
10026
  style: {
9886
10027
  color: n,
9887
10028
  "--icon": `url("${a}")`
9888
10029
  }
9889
10030
  }) : /* @__PURE__ */ M("i", {});
9890
- }, ad = /* @__PURE__ */ new Map(), od = /* @__PURE__ */ new Map(), sd = (e, t) => {
9891
- let n = `${e}:${t}`, r = ad.get(n);
10031
+ }, ud = /* @__PURE__ */ new Map(), dd = /* @__PURE__ */ new Map(), fd = (e, t) => {
10032
+ let n = `${e}:${t}`, r = ud.get(n);
9892
10033
  if (r) return Promise.resolve(r);
9893
- let i = od.get(n);
10034
+ let i = dd.get(n);
9894
10035
  if (i) return i;
9895
- let a = ld(e, t).then((e) => (ad.set(n, e), e)).finally(() => od.delete(n));
9896
- return od.set(n, a), a;
9897
- }, cd = new URL("https://api.iconify.design/codicon.json?icons=close"), ld = async (e, t) => {
9898
- cd.pathname = `/${e}.json`, cd.searchParams.set("icons", t);
9899
- let n = await fetch(cd.href);
10036
+ let a = md(e, t).then((e) => (ud.set(n, e), e)).finally(() => dd.delete(n));
10037
+ return dd.set(n, a), a;
10038
+ }, pd = new URL("https://api.iconify.design/codicon.json?icons=close"), md = async (e, t) => {
10039
+ pd.pathname = `/${e}.json`, pd.searchParams.set("icons", t);
10040
+ let n = await fetch(pd.href);
9900
10041
  if (!n.ok) throw Error(`Failed to fetch ${e}:${t}: ${n.statusText}. Status: ${n.status}`);
9901
10042
  let r = await n.json();
9902
10043
  if (typeof r == "number") throw Error(`Failed to fetch ${e}:${t}: ${n.statusText}. Status: ${r}`);
@@ -9907,53 +10048,53 @@ var rd = ({ collection: e, icon: t, color: n, className: r, onError: i }) => {
9907
10048
  i.width ||= e, i.height ||= t;
9908
10049
  }
9909
10050
  return i;
9910
- }, ud = ({ url: e, color: t, className: n }) => /* @__PURE__ */ M("i", {
9911
- className: A(n, Gu.icon, !e.includes("currentColor") && "is-colored"),
10051
+ }, hd = ({ url: e, color: t, className: n }) => /* @__PURE__ */ M("i", {
10052
+ className: A(n, Xu.icon, !e.includes("currentColor") && "is-colored"),
9912
10053
  style: {
9913
10054
  color: t,
9914
10055
  "--icon": `url("${e}")`
9915
10056
  }
9916
- }), dd = (e, t, n, r) => {
9917
- r ||= Yu;
10057
+ }), gd = (e, t, n, r) => {
10058
+ r ||= ed;
9918
10059
  let i, a;
9919
10060
  if (r) {
9920
10061
  let n = r[e];
9921
10062
  n && (a = n.icons, i = a.icons[t]);
9922
10063
  }
9923
- if (a || (a = Ju[e], i = a && a.icons[t]), !i) {
9924
- let r = ad.get(`${e}:${t}`);
9925
- if (r) return fd(r.width, r.height, r, n);
10064
+ if (a || (a = $u[e], i = a && a.icons[t]), !i) {
10065
+ let r = ud.get(`${e}:${t}`);
10066
+ if (r) return _d(r.width, r.height, r, n);
9926
10067
  }
9927
- if (i && a) return fd(i.width || a.width, i.height || a.height, i, n);
10068
+ if (i && a) return _d(i.width || a.width, i.height || a.height, i, n);
9928
10069
  };
9929
- function fd(e, t, n, r) {
10070
+ function _d(e, t, n, r) {
9930
10071
  e ||= 16, t ||= 16;
9931
10072
  let i = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="${`0 0 ${e} ${t}`}" width="1em" height="1em">${n.body}</svg>`;
9932
- return r && (i = i.replace(/currentColor/g, r)), `data:image/svg+xml;utf8,${qu(i)}`;
10073
+ return r && (i = i.replace(/currentColor/g, r)), `data:image/svg+xml;utf8,${Qu(i)}`;
9933
10074
  }
9934
10075
  //#endregion
9935
10076
  //#region src/ui/browser/icons/ContentIcon.tsx
9936
- var pd = ({ src: e, className: t, fallback: n = null, loading: r = "lazy", decoding: i = "async" }) => {
9937
- let a = nn(() => vd(e), [e]), o = a?.source ?? e, s = nn(() => yd(o), [o]), [c, l] = F(), u = () => l(o);
9938
- return o?.startsWith(md) ? /* @__PURE__ */ M("span", {
10077
+ var vd = ({ src: e, className: t, fallback: n = null, loading: r = "lazy", decoding: i = "async" }) => {
10078
+ let a = nn(() => Cd(e), [e]), o = a?.source ?? e, s = nn(() => wd(o), [o]), [c, l] = F(), u = () => l(o);
10079
+ return o?.startsWith(yd) ? /* @__PURE__ */ M("span", {
9939
10080
  "data-icon-kind": "initials",
9940
10081
  "aria-hidden": "true",
9941
- className: A(Wu.initials, t),
9942
- children: /* @__PURE__ */ M("span", { children: o.slice(md.length) })
9943
- }) : o ? o === c ? a == null ? n : /* @__PURE__ */ M(pd, {
10082
+ className: A(Yu.initials, t),
10083
+ children: /* @__PURE__ */ M("span", { children: o.slice(yd.length) })
10084
+ }) : o ? o === c ? a == null ? n : /* @__PURE__ */ M(vd, {
9944
10085
  className: t,
9945
10086
  fallback: n,
9946
10087
  src: a.fallback,
9947
10088
  loading: r,
9948
10089
  decoding: i
9949
- }) : s ? /* @__PURE__ */ M(rd, {
10090
+ }) : s ? /* @__PURE__ */ M(cd, {
9950
10091
  collection: s.collection,
9951
10092
  icon: s.icon,
9952
10093
  color: s.color,
9953
10094
  className: t,
9954
10095
  onError: u
9955
10096
  }) : /* @__PURE__ */ M("img", {
9956
- className: A(Wu.img, t),
10097
+ className: A(Yu.img, t),
9957
10098
  src: o,
9958
10099
  alt: "",
9959
10100
  decoding: i,
@@ -9961,19 +10102,19 @@ var pd = ({ src: e, className: t, fallback: n = null, loading: r = "lazy", decod
9961
10102
  referrerPolicy: "no-referrer",
9962
10103
  onError: u
9963
10104
  }) : n;
9964
- }, md = "data:application/vnd.open-flow.initials,";
9965
- function hd(e) {
9966
- return `${md}${e}`;
10105
+ }, yd = "data:application/vnd.open-flow.initials,";
10106
+ function bd(e) {
10107
+ return `${yd}${e}`;
9967
10108
  }
9968
- var gd = "data:application/vnd.open-flow.image-icon+json,";
9969
- function _d(e, t) {
9970
- return `${gd}${encodeURIComponent(JSON.stringify({
10109
+ var xd = "data:application/vnd.open-flow.image-icon+json,";
10110
+ function Sd(e, t) {
10111
+ return `${xd}${encodeURIComponent(JSON.stringify({
9971
10112
  fallback: t,
9972
10113
  source: e
9973
10114
  }))}`;
9974
10115
  }
9975
- function vd(e) {
9976
- if (e?.startsWith(gd)) try {
10116
+ function Cd(e) {
10117
+ if (e?.startsWith(xd)) try {
9977
10118
  let t = JSON.parse(decodeURIComponent(e.slice(47)));
9978
10119
  if (typeof t.fallback == "string" && typeof t.source == "string") return {
9979
10120
  fallback: t.fallback,
@@ -9983,7 +10124,7 @@ function vd(e) {
9983
10124
  return;
9984
10125
  }
9985
10126
  }
9986
- function yd(e) {
10127
+ function wd(e) {
9987
10128
  if (e && e.length > 2 && e[0] === ":" && e.endsWith(":")) {
9988
10129
  let [, t, n, r] = e.split(":");
9989
10130
  if (t && n) return {
@@ -9996,22 +10137,22 @@ function yd(e) {
9996
10137
  }
9997
10138
  //#endregion
9998
10139
  //#region src/workbench/browser/runtime/providerIcon.ts
9999
- function bd(e, t = Uu) {
10000
- let n = hd(Sd(e.serviceName)), r = xd(e, t);
10001
- return r == null ? n : _d(r, n);
10140
+ function Td(e, t = Ju) {
10141
+ let n = bd(Dd(e.serviceName)), r = Ed(e, t);
10142
+ return r == null ? n : Sd(r, n);
10002
10143
  }
10003
- function xd(e, t = Uu) {
10144
+ function Ed(e, t = Ju) {
10004
10145
  let n = e.icon?.trim();
10005
10146
  if (n) return n;
10006
10147
  let r = t[e.serviceId]?.trim();
10007
10148
  if (r) return r;
10008
- let i = Cd(e.homepageUrl);
10149
+ let i = Od(e.homepageUrl);
10009
10150
  return i == null ? void 0 : `https://www.google.com/s2/favicons?sz=64&domain=${encodeURIComponent(i)}`;
10010
10151
  }
10011
- function Sd(e) {
10152
+ function Dd(e) {
10012
10153
  return e.split(/\s+/).map((e) => e[0]).join("").slice(0, 2).toUpperCase() || "?";
10013
10154
  }
10014
- function Cd(e) {
10155
+ function Od(e) {
10015
10156
  if (e) try {
10016
10157
  return new URL(e).hostname || void 0;
10017
10158
  } catch {
@@ -10020,14 +10161,14 @@ function Cd(e) {
10020
10161
  }
10021
10162
  //#endregion
10022
10163
  //#region src/workbench/browser/runtime/workspace.ts
10023
- function wd(e, t) {
10024
- let n = e.authenticated && t != null ? Td(t).preferred : void 0;
10164
+ function kd(e, t) {
10165
+ let n = e.authenticated && t != null ? Ad(t).preferred : void 0;
10025
10166
  return {
10026
10167
  ...e,
10027
10168
  ...n == null ? {} : { defaultConnection: n }
10028
10169
  };
10029
10170
  }
10030
- function Td(e) {
10171
+ function Ad(e) {
10031
10172
  let t = [], n = /* @__PURE__ */ new Map(), r;
10032
10173
  for (let i of e) n.set(i.connectionId, i), i.status == "active" && (t.push(i), i.isDefault && (r = i));
10033
10174
  return {
@@ -10037,7 +10178,7 @@ function Td(e) {
10037
10178
  preferred: r ?? (t.length == 1 ? t[0] : void 0)
10038
10179
  };
10039
10180
  }
10040
- function Ed(e, t) {
10181
+ function jd(e, t) {
10041
10182
  if (e.node.name != null) return e.node.name;
10042
10183
  switch (e.kind) {
10043
10184
  case "condition": return t?.("addNode.condition") ?? "Condition";
@@ -10047,7 +10188,7 @@ function Ed(e, t) {
10047
10188
  case "task": return e.definition?.name ?? (e.node.task == null ? e.node.taskId : e.node.task.moduleId);
10048
10189
  }
10049
10190
  }
10050
- function Dd(e) {
10191
+ function Md(e) {
10051
10192
  switch (e.kind) {
10052
10193
  case "condition": return ":carbon:child-node:";
10053
10194
  case "subflow": return ":carbon:subflow:";
@@ -10062,43 +10203,43 @@ function Dd(e) {
10062
10203
  function $(e) {
10063
10204
  if (!(typeof e != "object" || !e || Array.isArray(e))) return e;
10064
10205
  }
10065
- function Od(e) {
10206
+ function Nd(e) {
10066
10207
  return typeof e == "number" && Number.isFinite(e) ? e : void 0;
10067
10208
  }
10068
- function kd(e, t) {
10209
+ function Pd(e, t) {
10069
10210
  let n = $(e.designer);
10070
- if (n?.version == 1) return $d(n, t);
10211
+ if (n?.version == 1) return af(n, t);
10071
10212
  }
10072
- function Ad(e, t) {
10213
+ function Fd(e, t) {
10073
10214
  return ((e) => Object.fromEntries(Object.entries($(e) ?? {}).flatMap(([e, t]) => {
10074
- let n = $(t), r = Od(n?.x), i = Od(n?.y);
10215
+ let n = $(t), r = Nd(n?.x), i = Nd(n?.y);
10075
10216
  return r == null || i == null ? [] : [[e, {
10076
10217
  x: r,
10077
10218
  y: i
10078
10219
  }]];
10079
- })))(kd(e, t)?.nodes);
10220
+ })))(Pd(e, t)?.nodes);
10080
10221
  }
10081
- function jd(e, t) {
10082
- let n = Ad(e, t), r = kd(e, t)?.order, i = Array.isArray(r) ? r.flatMap((e) => typeof e == "string" && n[e] != null ? [e] : []) : [];
10222
+ function Id(e, t) {
10223
+ let n = Fd(e, t), r = Pd(e, t)?.order, i = Array.isArray(r) ? r.flatMap((e) => typeof e == "string" && n[e] != null ? [e] : []) : [];
10083
10224
  return [.../* @__PURE__ */ new Set([...i, ...Object.keys(n)])];
10084
10225
  }
10085
- function Md(e, t) {
10086
- let n = $(kd(e, t)?.viewport), r = Od(n?.x), i = Od(n?.y), a = Od(n?.zoom);
10226
+ function Ld(e, t) {
10227
+ let n = $(Pd(e, t)?.viewport), r = Nd(n?.x), i = Nd(n?.y), a = Nd(n?.zoom);
10087
10228
  return r == null || i == null || a == null || a <= 0 ? void 0 : {
10088
10229
  x: r,
10089
10230
  y: i,
10090
10231
  zoom: a
10091
10232
  };
10092
10233
  }
10093
- function Nd(e, t) {
10094
- return Md(e, t) ?? {
10234
+ function Rd(e, t) {
10235
+ return Ld(e, t) ?? {
10095
10236
  x: 0,
10096
10237
  y: 0,
10097
10238
  zoom: 1
10098
10239
  };
10099
10240
  }
10100
- function Pd(e, t, n) {
10101
- let r = $(kd(e, t)?.comments) ?? {};
10241
+ function zd(e, t, n) {
10242
+ let r = $(Pd(e, t)?.comments) ?? {};
10102
10243
  return Object.fromEntries(Object.entries(r).flatMap(([e, t]) => {
10103
10244
  let r = $(t), i = typeof r?.title == "string" ? r.title : void 0, a = typeof r?.content == "string" ? r.content : void 0;
10104
10245
  return i == null || a == null ? [] : [[e, {
@@ -10111,7 +10252,7 @@ function Pd(e, t, n) {
10111
10252
  }]];
10112
10253
  }));
10113
10254
  }
10114
- function Fd(e, t, n, r) {
10255
+ function Bd(e, t, n, r) {
10115
10256
  return JSON.stringify([
10116
10257
  e,
10117
10258
  t,
@@ -10119,13 +10260,10 @@ function Fd(e, t, n, r) {
10119
10260
  r
10120
10261
  ]);
10121
10262
  }
10122
- function Id(e) {
10263
+ function Vd(e) {
10123
10264
  if (e.kind == "trigger") return {
10124
10265
  inputs: /* @__PURE__ */ new Map(),
10125
- outputs: /* @__PURE__ */ new Map([["payload", {
10126
- jsonSchema: eu(e.trigger),
10127
- nullable: !1
10128
- }]])
10266
+ outputs: new Map(Object.entries(gu(e.trigger)))
10129
10267
  };
10130
10268
  let t = new Map(Object.keys(e.node.inputs).map((e) => [e, {}])), n = /* @__PURE__ */ new Map();
10131
10269
  switch (e.kind) {
@@ -10160,7 +10298,7 @@ function Id(e) {
10160
10298
  jsonSchema: e.node.input.jsonSchema,
10161
10299
  nullable: e.node.input.nullable
10162
10300
  });
10163
- for (let [t, r] of Object.entries(pu(e.node))) n.set(t, r);
10301
+ for (let [t, r] of Object.entries(vu(e.node))) n.set(t, r);
10164
10302
  break;
10165
10303
  case "subflow": {
10166
10304
  let r = e.definition;
@@ -10206,7 +10344,7 @@ function Id(e) {
10206
10344
  outputs: n
10207
10345
  };
10208
10346
  }
10209
- function Ld(e) {
10347
+ function Hd(e) {
10210
10348
  switch (e) {
10211
10349
  case "endsWith": return "ends with";
10212
10350
  case "hasKey": return "has key";
@@ -10230,7 +10368,7 @@ function Ld(e) {
10230
10368
  case "contains": return e;
10231
10369
  }
10232
10370
  }
10233
- function Rd(e, t, n) {
10371
+ function Ud(e, t, n) {
10234
10372
  let r = e.kind == "flow" ? `/document/graph/nodes/${t.id}` : `/document/subflows/${e.id}/graph/nodes/${t.id}`, i = [r];
10235
10373
  if (t.kind == "task") {
10236
10374
  t.node.task == null ? i.push(`/document/tasks/${t.node.taskId}`) : i.push(`${r}/task`);
@@ -10239,7 +10377,7 @@ function Rd(e, t, n) {
10239
10377
  } else t.kind == "subflow" && i.push(`/document/subflows/${t.node.subflowId}`);
10240
10378
  return n.filter((e) => i.some((t) => e.path.startsWith(t))).length;
10241
10379
  }
10242
- function zd(e, t, n, r) {
10380
+ function Wd(e, t, n, r) {
10243
10381
  if (t.kind != "flow" || n?.flowId != e.revision.flowId || n.revisionId != e.revision.revisionId) return { nodes: /* @__PURE__ */ new Map() };
10244
10382
  let i = n.status == "queued" || n.status == "starting" || n.status == "running" || n.status == "waiting", a = /* @__PURE__ */ new Map();
10245
10383
  if ("waits" in n) for (let e of n.waits) a.set(e.nodeId, {
@@ -10251,6 +10389,7 @@ function zd(e, t, n, r) {
10251
10389
  nodes: a,
10252
10390
  status: i ? "running" : "idle"
10253
10391
  };
10392
+ let s = /* @__PURE__ */ new Map();
10254
10393
  for (let t of r) {
10255
10394
  if (t.payload.scopeId != o || t.payload.flowId != e.revision.flowId) continue;
10256
10395
  let r = t.payload.nodeId;
@@ -10258,7 +10397,7 @@ function zd(e, t, n, r) {
10258
10397
  let i = a.get(r);
10259
10398
  switch (t.kind) {
10260
10399
  case "node.started":
10261
- a.set(r, {
10400
+ s.set(t.payload.executionId, r), a.set(r, {
10262
10401
  ...i,
10263
10402
  runId: n.runId,
10264
10403
  startedAt: t.createdAt,
@@ -10275,7 +10414,7 @@ function zd(e, t, n, r) {
10275
10414
  break;
10276
10415
  }
10277
10416
  case "node.completed":
10278
- a.set(r, {
10417
+ s.delete(t.payload.executionId), a.set(r, {
10279
10418
  ...i,
10280
10419
  runId: n.runId,
10281
10420
  finishedAt: t.createdAt,
@@ -10286,7 +10425,7 @@ function zd(e, t, n, r) {
10286
10425
  });
10287
10426
  break;
10288
10427
  case "node.failed":
10289
- a.set(r, {
10428
+ s.delete(t.payload.executionId), a.set(r, {
10290
10429
  ...i,
10291
10430
  runId: n.runId,
10292
10431
  finishedAt: t.createdAt,
@@ -10314,7 +10453,21 @@ function zd(e, t, n, r) {
10314
10453
  });
10315
10454
  }
10316
10455
  }
10317
- if (!i) for (let [e, t] of a) (t.status == "running" || t.status == "waiting") && a.set(e, {
10456
+ if (i) {
10457
+ let e = /* @__PURE__ */ new Map();
10458
+ for (let t of s.values()) e.set(t, (e.get(t) ?? 0) + 1), a.set(t, {
10459
+ ...a.get(t),
10460
+ runId: n.runId,
10461
+ status: "running"
10462
+ });
10463
+ let t = /* @__PURE__ */ new Map();
10464
+ if ("waits" in n) for (let e of n.waits) t.set(e.nodeId, (t.get(e.nodeId) ?? 0) + 1);
10465
+ for (let [r, i] of t) (e.get(r) ?? 0) <= i && a.set(r, {
10466
+ ...a.get(r),
10467
+ runId: n.runId,
10468
+ status: "waiting"
10469
+ });
10470
+ } else for (let [e, t] of a) (t.status == "running" || t.status == "waiting") && a.set(e, {
10318
10471
  ...t,
10319
10472
  status: "idle"
10320
10473
  });
@@ -10323,10 +10476,10 @@ function zd(e, t, n, r) {
10323
10476
  status: i ? "running" : "idle"
10324
10477
  };
10325
10478
  }
10326
- function Bd(e, t, n) {
10479
+ function Gd(e, t, n) {
10327
10480
  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]}`;
10328
10481
  }
10329
- function Vd(e) {
10482
+ function Kd(e) {
10330
10483
  switch (e.kind) {
10331
10484
  case "manual": return ":carbon:play:";
10332
10485
  case "cron": return ":carbon:time:";
@@ -10335,11 +10488,11 @@ function Vd(e) {
10335
10488
  case "webhook": return ":carbon:webhook:";
10336
10489
  }
10337
10490
  }
10338
- function Hd(e, t) {
10491
+ function qd(e, t) {
10339
10492
  let n = `/document/graph/nodes/${e}`;
10340
10493
  return t.filter((e) => e.code != "trigger.config-incomplete" && (e.path == n || e.path.startsWith(`${n}/`)));
10341
10494
  }
10342
- function Ud(e, t) {
10495
+ function Jd(e, t) {
10343
10496
  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 : [];
10344
10497
  for (let e of a) {
10345
10498
  if (typeof e != "object" || !e || Array.isArray(e)) continue;
@@ -10347,7 +10500,7 @@ function Ud(e, t) {
10347
10500
  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;
10348
10501
  let o = a.sourceHandle == null ? "$out" : `$branch:${a.sourceHandle}`;
10349
10502
  n.push({
10350
- id: Fd(a.source, o, a.target, "$in"),
10503
+ id: Bd(a.source, o, a.target, "$in"),
10351
10504
  source: a.source,
10352
10505
  sourceHandle: o,
10353
10506
  target: a.target,
@@ -10360,7 +10513,7 @@ function Ud(e, t) {
10360
10513
  edges: n
10361
10514
  };
10362
10515
  }
10363
- function Wd(e, t, n) {
10516
+ function Yd(e, t, n) {
10364
10517
  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();
10365
10518
  for (let e = 0; e < s.length; e += 1) {
10366
10519
  let t = s[e];
@@ -10379,14 +10532,14 @@ function Wd(e, t, n) {
10379
10532
  ordered: a
10380
10533
  };
10381
10534
  }
10382
- function Gd(e, t, n) {
10535
+ function Xd(e, t, n) {
10383
10536
  if (!("inputs" in t)) return [];
10384
10537
  let r = [];
10385
10538
  for (let [i, a] of n.inputs) {
10386
10539
  let n = t.inputs[i], o = [], s = /* @__PURE__ */ new Set();
10387
10540
  if (n?.kind == "sources") for (let t of n.sources) {
10388
10541
  if (t.kind != "node") continue;
10389
- let n = t.nodeId, r = t.output, a = Fd(n, r, e, i);
10542
+ let n = t.nodeId, r = t.output, a = Bd(n, r, e, i);
10390
10543
  s.has(a) || (s.add(a), o.push({
10391
10544
  nodeId: n,
10392
10545
  output: r
@@ -10401,10 +10554,10 @@ function Gd(e, t, n) {
10401
10554
  }
10402
10555
  return r;
10403
10556
  }
10404
- function Kd(e) {
10557
+ function Zd(e) {
10405
10558
  return [...e.outputs].map(([e, t]) => Object.assign({ handle: e }, t));
10406
10559
  }
10407
- function qd(e, t) {
10560
+ function Qd(e, t) {
10408
10561
  if (e.kind != "task" || e.definition == null) return t;
10409
10562
  let n = new Map(t.map((e) => [e.handle, e])), r = [];
10410
10563
  for (let t of e.definition.inputs) {
@@ -10417,7 +10570,7 @@ function qd(e, t) {
10417
10570
  }
10418
10571
  return r.push(...n.values()), r;
10419
10572
  }
10420
- function Jd(e, t) {
10573
+ function $d(e, t) {
10421
10574
  if (e.kind != "task" || e.definition == null) return t;
10422
10575
  let n = new Map(t.map((e) => [e.handle, e])), r = [];
10423
10576
  for (let t of e.definition.outputs) {
@@ -10430,8 +10583,8 @@ function Jd(e, t) {
10430
10583
  }
10431
10584
  return r.push(...n.values()), r;
10432
10585
  }
10433
- function Yd(e, t, n, r, i) {
10434
- let a = Hd(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;
10586
+ function ef(e, t, n, r, i) {
10587
+ let a = qd(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;
10435
10588
  switch (t.kind) {
10436
10589
  case "manual":
10437
10590
  c = {
@@ -10468,34 +10621,30 @@ function Yd(e, t, n, r, i) {
10468
10621
  description: t.description,
10469
10622
  diagnostics: a.length,
10470
10623
  connectionRequired: o,
10471
- icon: t.icon ?? (t.kind == "integration" || t.kind == "poll" ? bd(s ?? {
10624
+ icon: t.icon ?? (t.kind == "integration" || t.kind == "poll" ? Td(s ?? {
10472
10625
  serviceId: t.definition.provider,
10473
10626
  serviceName: t.definition.provider
10474
- }) : Vd(t)),
10627
+ }) : Kd(t)),
10475
10628
  id: e,
10476
10629
  inputs: [],
10477
10630
  kind: "trigger",
10478
- outputs: [{
10479
- handle: "payload",
10480
- jsonSchema: eu(t),
10481
- nullable: !1
10482
- }],
10631
+ outputs: Object.entries(gu(t)).map(([e, t]) => Object.assign({ handle: e }, t)),
10483
10632
  presentation: c,
10484
10633
  position: n,
10485
10634
  title: t.name
10486
10635
  };
10487
10636
  }
10488
- function Xd(e, t, n, r, i) {
10489
- let a = t.node, o = qd(t, Gd(e, a, n)), s = Jd(t, Kd(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 = {
10637
+ function tf(e, t, n, r, i) {
10638
+ let a = t.node, o = Qd(t, Xd(e, a, n)), s = $d(t, Zd(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 = {
10490
10639
  description: a.description,
10491
- diagnostics: Rd(i.target, t, i.diagnostics),
10492
- icon: a.icon ?? (u == null ? Dd(t) : bd(u)),
10640
+ diagnostics: Ud(i.target, t, i.diagnostics),
10641
+ icon: a.icon ?? (u == null ? Md(t) : Td(u)),
10493
10642
  id: e,
10494
10643
  inputs: o,
10495
10644
  outputs: s,
10496
10645
  position: r,
10497
10646
  ...h == null ? {} : { run: h },
10498
- title: Ed(t, i.t)
10647
+ title: jd(t, i.t)
10499
10648
  };
10500
10649
  switch (a.kind) {
10501
10650
  case "condition": return {
@@ -10504,7 +10653,7 @@ function Xd(e, t, n, r, i) {
10504
10653
  cases: a.cases.map((e) => ({
10505
10654
  expressions: e.expressions.map((e) => ({
10506
10655
  input: e.input,
10507
- operator: Ld(e.operator),
10656
+ operator: Hd(e.operator),
10508
10657
  value: e.value
10509
10658
  })),
10510
10659
  output: e.output,
@@ -10524,13 +10673,13 @@ function Xd(e, t, n, r, i) {
10524
10673
  return t == null || "group" in t ? [] : [t];
10525
10674
  }),
10526
10675
  kind: a.kind,
10527
- executorName: Bd(c, u?.serviceName, i.t),
10676
+ executorName: Gd(c, u?.serviceName, i.t),
10528
10677
  connectionRequired: m,
10529
10678
  ...c != null && "executor" in c && c.executor.kind == "agent" ? { tools: c.executor.tools.map((e) => {
10530
10679
  let t = i.connectorActions[e.action], n = t?.serviceId ?? e.action.split(".")[0], r = t?.serviceName ?? n;
10531
10680
  return {
10532
10681
  id: e.id,
10533
- icon: bd(t ?? {
10682
+ icon: Td(t ?? {
10534
10683
  serviceId: n,
10535
10684
  serviceName: r
10536
10685
  }),
@@ -10550,8 +10699,8 @@ function Xd(e, t, n, r, i) {
10550
10699
  };
10551
10700
  }
10552
10701
  }
10553
- function Zd(e, t, n = {}, r = [], i = {}, a = {}, o, s, c = [], l = {}) {
10554
- let u = e == null ? void 0 : Mu(e), d = u == null || t == null ? void 0 : u.graph(t);
10702
+ function nf(e, t, n = {}, r = [], i = {}, a = {}, o, s, c = [], l = {}) {
10703
+ let u = e == null ? void 0 : Lu(e), d = u == null || t == null ? void 0 : u.graph(t);
10555
10704
  if (u == null || t == null || d == null) return {
10556
10705
  edges: [],
10557
10706
  nodes: [],
@@ -10561,7 +10710,7 @@ function Zd(e, t, n = {}, r = [], i = {}, a = {}, o, s, c = [], l = {}) {
10561
10710
  zoom: 1
10562
10711
  }
10563
10712
  };
10564
- let f = zd(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, Id(t)])), _ = Ud(d, h), v = Wd(h, _.dependencies, _.dependents), y = Ad(n, t), b = $(kd(n, t)?.hiddenNodeContent), x = {
10713
+ let f = Wd(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, Vd(t)])), _ = Jd(d, h), v = Yd(h, _.dependencies, _.dependents), y = Fd(n, t), b = $(Pd(n, t)?.hiddenNodeContent), x = {
10565
10714
  connectionCatalogs: a,
10566
10715
  connectorActions: i,
10567
10716
  diagnostics: r,
@@ -10579,39 +10728,39 @@ function Zd(e, t, n = {}, r = [], i = {}, a = {}, o, s, c = [], l = {}) {
10579
10728
  }, a = m.get(e);
10580
10729
  if (a.kind == "trigger") {
10581
10730
  S.push({
10582
- ...Yd(e, a.trigger, i, r, l),
10731
+ ...ef(e, a.trigger, i, r, l),
10583
10732
  contentHidden: b?.[e] === !0
10584
10733
  });
10585
10734
  continue;
10586
10735
  }
10587
- let o = Xd(e, a, g.get(e), i, x);
10736
+ let o = tf(e, a, g.get(e), i, x);
10588
10737
  S.push({
10589
10738
  ...o,
10590
10739
  contentHidden: b?.[e] === !0
10591
10740
  });
10592
10741
  }
10593
- for (let [e, r] of Object.entries(Pd(n, t, y)).toSorted(([e], [t]) => e.localeCompare(t))) S.push({
10742
+ for (let [e, r] of Object.entries(zd(n, t, y)).toSorted(([e], [t]) => e.localeCompare(t))) S.push({
10594
10743
  ...r,
10595
10744
  id: e,
10596
10745
  kind: "comment",
10597
10746
  contentHidden: b?.[e] === !0
10598
10747
  });
10599
- let C = new Map(jd(n, t).map((e, t) => [e, t]));
10748
+ let C = new Map(Id(n, t).map((e, t) => [e, t]));
10600
10749
  return S.sort((e, t) => (C.get(e.id) ?? -1) - (C.get(t.id) ?? -1)), {
10601
10750
  edges: _.edges,
10602
10751
  nodes: S,
10603
10752
  ...f.status == null ? {} : { runStatus: f.status },
10604
- viewport: Nd(n, t)
10753
+ viewport: Rd(n, t)
10605
10754
  };
10606
10755
  }
10607
- function Qd(e) {
10756
+ function rf(e) {
10608
10757
  let t = $(e.designer);
10609
10758
  return t?.version == 1 ? t : { version: 1 };
10610
10759
  }
10611
- function $d(e, t) {
10760
+ function af(e, t) {
10612
10761
  return t.kind == "flow" ? $(e.flow) : $($(e.subflows)?.[t.id]);
10613
10762
  }
10614
- function ef(e, t, n) {
10763
+ function of(e, t, n) {
10615
10764
  if (t.kind == "flow") return {
10616
10765
  ...e,
10617
10766
  flow: n,
@@ -10627,17 +10776,17 @@ function ef(e, t, n) {
10627
10776
  version: 1
10628
10777
  };
10629
10778
  }
10630
- function tf(e, t) {
10779
+ function sf(e, t) {
10631
10780
  let n = {
10632
- ...kd(e, t),
10633
- viewport: { ...Nd(e, t) },
10634
- nodes: Ad(e, t),
10635
- order: jd(e, t)
10781
+ ...Pd(e, t),
10782
+ viewport: { ...Rd(e, t) },
10783
+ nodes: Fd(e, t),
10784
+ order: Id(e, t)
10636
10785
  };
10637
10786
  return delete n.layouts, n;
10638
10787
  }
10639
- function nf(e, t, n) {
10640
- let r = Qd(e), i = tf(e, t), a = $(i.nodes) ?? {}, o = [...jd(e, t)];
10788
+ function cf(e, t, n) {
10789
+ let r = rf(e), i = sf(e, t), a = $(i.nodes) ?? {}, o = [...Id(e, t)];
10641
10790
  for (let e of Object.keys(n)) o.includes(e) || o.push(e);
10642
10791
  let s = {
10643
10792
  ...a,
@@ -10648,29 +10797,29 @@ function nf(e, t, n) {
10648
10797
  };
10649
10798
  return {
10650
10799
  ...e,
10651
- designer: ef(r, t, {
10800
+ designer: of(r, t, {
10652
10801
  ...i,
10653
10802
  nodes: s,
10654
10803
  order: o
10655
10804
  })
10656
10805
  };
10657
10806
  }
10658
- function rf(e, t, n, r) {
10659
- if ($(kd(e, t)?.hiddenNodeContent)?.[n] === !0 === r) return e;
10660
- let i = tf(e, t), a = { ...$(i.hiddenNodeContent) };
10807
+ function lf(e, t, n, r) {
10808
+ if ($(Pd(e, t)?.hiddenNodeContent)?.[n] === !0 === r) return e;
10809
+ let i = sf(e, t), a = { ...$(i.hiddenNodeContent) };
10661
10810
  return r ? a[n] = !0 : delete a[n], {
10662
10811
  ...e,
10663
- designer: ef(Qd(e), t, {
10812
+ designer: of(rf(e), t, {
10664
10813
  ...i,
10665
10814
  hiddenNodeContent: a
10666
10815
  })
10667
10816
  };
10668
10817
  }
10669
- function af(e, t, n, r) {
10670
- let i = nf(e, t, { [n]: r.position }), a = Qd(i), o = $d(a, t) ?? {}, s = $(o.comments) ?? {};
10818
+ function uf(e, t, n, r) {
10819
+ let i = cf(e, t, { [n]: r.position }), a = rf(i), o = af(a, t) ?? {}, s = $(o.comments) ?? {};
10671
10820
  return {
10672
10821
  ...i,
10673
- designer: ef(a, t, {
10822
+ designer: of(a, t, {
10674
10823
  ...o,
10675
10824
  comments: {
10676
10825
  ...s,
@@ -10682,13 +10831,13 @@ function af(e, t, n, r) {
10682
10831
  })
10683
10832
  };
10684
10833
  }
10685
- function of(e, t, n) {
10686
- let r = Qd(e), i = tf(e, t), a = { ...$(i.comments) }, o = { ...$(i.nodes) };
10834
+ function df(e, t, n) {
10835
+ let r = rf(e), i = sf(e, t), a = { ...$(i.comments) }, o = { ...$(i.nodes) };
10687
10836
  for (let e of n) delete a[e], delete o[e];
10688
- let s = jd(e, t).filter((e) => !n.has(e));
10837
+ let s = Id(e, t).filter((e) => !n.has(e));
10689
10838
  return {
10690
10839
  ...e,
10691
- designer: ef(r, t, {
10840
+ designer: of(r, t, {
10692
10841
  ...i,
10693
10842
  comments: a,
10694
10843
  nodes: o,
@@ -10696,16 +10845,16 @@ function of(e, t, n) {
10696
10845
  })
10697
10846
  };
10698
10847
  }
10699
- function sf(e, t) {
10700
- return new Set(Object.keys($(kd(e, t)?.comments) ?? {}));
10848
+ function ff(e, t) {
10849
+ return new Set(Object.keys($(Pd(e, t)?.comments) ?? {}));
10701
10850
  }
10702
- function cf(e, t, n) {
10703
- let r = Md(e, t);
10851
+ function pf(e, t, n) {
10852
+ let r = Ld(e, t);
10704
10853
  if (r?.x == n.x && r.y == n.y && r.zoom == n.zoom) return e;
10705
- let i = Qd(e), a = tf(e, t);
10854
+ let i = rf(e), a = sf(e, t);
10706
10855
  return {
10707
10856
  ...e,
10708
- designer: ef(i, t, {
10857
+ designer: of(i, t, {
10709
10858
  ...a,
10710
10859
  viewport: {
10711
10860
  x: n.x,
@@ -10715,7 +10864,7 @@ function cf(e, t, n) {
10715
10864
  })
10716
10865
  };
10717
10866
  }
10718
- function lf(e, t, n) {
10867
+ function mf(e, t, n) {
10719
10868
  let r = e.kind == "node.started" ? e.payload.nodeTitle : void 0;
10720
10869
  if (typeof r == "string") return r;
10721
10870
  let i = "executionId" in e.payload ? e.payload.executionId : void 0;
@@ -10726,8 +10875,8 @@ function lf(e, t, n) {
10726
10875
  let a = e.payload.nodeId;
10727
10876
  return typeof a == "string" ? n?.get(a) ?? a : e.kind.startsWith("run.") ? t?.("run.flowSubject") ?? "Flow run" : t?.("run.nodeSubject") ?? "Node";
10728
10877
  }
10729
- function uf(e, t, n) {
10730
- let r = tf(e, n), i = tf(t, n), a = /* @__PURE__ */ new Set();
10878
+ function hf(e, t, n) {
10879
+ let r = sf(e, n), i = sf(t, n), a = /* @__PURE__ */ new Set();
10731
10880
  for (let e of [
10732
10881
  "nodes",
10733
10882
  "comments",
@@ -10745,13 +10894,13 @@ function uf(e, t, n) {
10745
10894
  before: o(r),
10746
10895
  after: o(i),
10747
10896
  nodeIds: [...a],
10748
- beforeOrder: jd(e, n),
10749
- afterOrder: jd(t, n)
10897
+ beforeOrder: Id(e, n),
10898
+ afterOrder: Id(t, n)
10750
10899
  };
10751
10900
  }
10752
- function df(e, t, n, r) {
10901
+ function gf(e, t, n, r) {
10753
10902
  if (n.nodeIds.length == 0) return e;
10754
- let i = tf(e, t), a = r ? n.after : n.before;
10903
+ let i = sf(e, t), a = r ? n.after : n.before;
10755
10904
  for (let e of [
10756
10905
  "nodes",
10757
10906
  "comments",
@@ -10763,17 +10912,17 @@ function df(e, t, n, r) {
10763
10912
  }
10764
10913
  return i.order = [...r ? n.afterOrder : n.beforeOrder], {
10765
10914
  ...e,
10766
- designer: ef(Qd(e), t, i)
10915
+ designer: of(rf(e), t, i)
10767
10916
  };
10768
10917
  }
10769
10918
  //#endregion
10770
10919
  //#region src/workbench/browser/runtime/stores/resource.ts
10771
- var ff = /* @__PURE__ */ new WeakMap();
10772
- function pf(t) {
10773
- let n = ff.get(t);
10774
- return n ?? (n = e(t, (e) => e.data), ff.set(t, n)), n;
10920
+ var _f = /* @__PURE__ */ new WeakMap();
10921
+ function vf(t) {
10922
+ let n = _f.get(t);
10923
+ return n ?? (n = e(t, (e) => e.data), _f.set(t, n)), n;
10775
10924
  }
10776
- var mf = class {
10925
+ var yf = class {
10777
10926
  #e;
10778
10927
  #t;
10779
10928
  #n;
@@ -10863,7 +11012,7 @@ var mf = class {
10863
11012
  }), this.#e.dispose();
10864
11013
  }
10865
11014
  };
10866
- function hf(e, t, n = !1) {
11015
+ function bf(e, t, n = !1) {
10867
11016
  return new Promise((r, i) => {
10868
11017
  let a, o = () => {
10869
11018
  a?.(), t?.removeEventListener("abort", s);
@@ -10876,7 +11025,7 @@ function hf(e, t, n = !1) {
10876
11025
  c() || (a = e.subscribe(c), t?.addEventListener("abort", s, { once: !0 }), c());
10877
11026
  });
10878
11027
  }
10879
- function gf(e, t, n) {
11028
+ function xf(e, t, n) {
10880
11029
  if (!t.aborted) {
10881
11030
  if ("then" in e) n({
10882
11031
  data: void 0,
@@ -10905,8 +11054,8 @@ function gf(e, t, n) {
10905
11054
  }
10906
11055
  //#endregion
10907
11056
  //#region src/workbench/browser/runtime/stores/optionSource.ts
10908
- function _f(e, t, n) {
10909
- return "then" in e ? e.then((e) => e === void 0 ? void 0 : n(e)) : vf(t, (t) => {
11057
+ function Sf(e, t, n) {
11058
+ return "then" in e ? e.then((e) => e === void 0 ? void 0 : n(e)) : Cf(t, (t) => {
10910
11059
  let r = t(e);
10911
11060
  return {
10912
11061
  ...r,
@@ -10914,12 +11063,12 @@ function _f(e, t, n) {
10914
11063
  };
10915
11064
  });
10916
11065
  }
10917
- function vf(e, n) {
11066
+ function Cf(e, n) {
10918
11067
  let r = t(n);
10919
11068
  return e.addEventListener("abort", () => r.dispose(), { once: !0 }), r;
10920
11069
  }
10921
- function yf(e, t) {
10922
- return vf(e, (e) => {
11070
+ function wf(e, t) {
11071
+ return Cf(e, (e) => {
10923
11072
  let n = t.map((t) => e(t));
10924
11073
  return {
10925
11074
  data: n.every((e) => e.data === void 0) ? void 0 : n.flatMap((e) => e.data ?? []),
@@ -10929,68 +11078,8 @@ function yf(e, t) {
10929
11078
  });
10930
11079
  }
10931
11080
  //#endregion
10932
- //#region src/base/common/json.ts
10933
- function bf(e) {
10934
- if (e === null || typeof e == "boolean" || typeof e == "string") return !0;
10935
- if (typeof e == "number") return Number.isFinite(e);
10936
- if (typeof e != "object") return !1;
10937
- let t = /* @__PURE__ */ new Set(), n = [], r = e;
10938
- traversal: for (;;) {
10939
- let e, i;
10940
- if (Array.isArray(r)) {
10941
- if (i = r.length, e = Reflect.ownKeys(r), e.length != i + 1) return !1;
10942
- } else {
10943
- let t = Reflect.getPrototypeOf(r);
10944
- if (t != Object.prototype && t != null) return !1;
10945
- e = Reflect.ownKeys(r), i = void 0;
10946
- }
10947
- t.add(r);
10948
- let a = 0;
10949
- for (;;) {
10950
- if (a >= e.length) {
10951
- t.delete(r);
10952
- let o = n.pop();
10953
- if (o === void 0) return !0;
10954
- r = o.value, e = o.keys, i = o.arrayLength, a = o.index;
10955
- continue;
10956
- }
10957
- let o = e[a++];
10958
- if (i !== void 0) {
10959
- if (o == "length") continue;
10960
- if (typeof o != "string") return !1;
10961
- let e = Number(o);
10962
- if (!Number.isSafeInteger(e) || e < 0 || e >= i || String(e) != o) return !1;
10963
- } else if (typeof o != "string") return !1;
10964
- let s = Reflect.getOwnPropertyDescriptor(r, o);
10965
- if (s?.enumerable != 1 || !Object.hasOwn(s, "value")) return !1;
10966
- let c = s.value;
10967
- if (c !== null && typeof c != "boolean" && typeof c != "string") {
10968
- if (typeof c == "number") {
10969
- if (!Number.isFinite(c)) return !1;
10970
- continue;
10971
- }
10972
- if (typeof c != "object" || t.has(c)) return !1;
10973
- n.push({
10974
- value: r,
10975
- keys: e,
10976
- arrayLength: i,
10977
- index: a
10978
- }), r = c;
10979
- continue traversal;
10980
- }
10981
- }
10982
- }
10983
- }
10984
- function xf(e) {
10985
- try {
10986
- return typeof e == "object" && !!e && !Array.isArray(e) && bf(e);
10987
- } catch {
10988
- return !1;
10989
- }
10990
- }
10991
- //#endregion
10992
11081
  //#region src/trigger/providers/feishu/config.ts
10993
- function Sf(e) {
11082
+ function Tf(e) {
10994
11083
  if (e.length != 0) {
10995
11084
  if (e.every((e) => e.startsWith("drive.file."))) return "document";
10996
11085
  if (e.every((e) => e == "calendar.calendar.event.changed_v4")) return "calendar";
@@ -11002,12 +11091,12 @@ function Sf(e) {
11002
11091
  ].includes(e))) return "approval";
11003
11092
  }
11004
11093
  }
11005
- function Cf(e) {
11094
+ function Ef(e) {
11006
11095
  return e.length > 0 && e.every((e) => ["im.message.receive_v1", "im.chat.member.bot.added_v1"].includes(e));
11007
11096
  }
11008
11097
  //#endregion
11009
11098
  //#region src/workbench/browser/runtime/editor/addNodeOptions.ts
11010
- function wf(e) {
11099
+ function Df(e) {
11011
11100
  let t = /* @__PURE__ */ new Map(), n = (e) => {
11012
11101
  t.set(e.id, e);
11013
11102
  for (let t of e.choices ?? []) n(t.option);
@@ -11015,7 +11104,7 @@ function wf(e) {
11015
11104
  for (let t of e) n(t);
11016
11105
  return t;
11017
11106
  }
11018
- function Tf(e) {
11107
+ function Of(e) {
11019
11108
  let t = e("addNode.blocks");
11020
11109
  return [
11021
11110
  {
@@ -11154,9 +11243,9 @@ function Tf(e) {
11154
11243
  }
11155
11244
  ];
11156
11245
  }
11157
- function Ef(e, t, n) {
11246
+ function kf(e, t, n) {
11158
11247
  if (e == null || t == null) return [];
11159
- let r = Tf(n);
11248
+ let r = Of(n);
11160
11249
  if (t.kind != "flow") return r.filter((e) => e.kind != "agent");
11161
11250
  let i = n("addNode.triggers"), a = [
11162
11251
  {
@@ -11167,13 +11256,7 @@ function Ef(e, t, n) {
11167
11256
  inputs: [],
11168
11257
  kind: "trigger",
11169
11258
  label: n("addNode.manual"),
11170
- outputs: [{
11171
- handle: "payload",
11172
- jsonSchema: {
11173
- additionalProperties: !1,
11174
- type: "object"
11175
- }
11176
- }],
11259
+ outputs: [],
11177
11260
  trigger: { kind: "manual" }
11178
11261
  },
11179
11262
  {
@@ -11184,10 +11267,11 @@ function Ef(e, t, n) {
11184
11267
  inputs: [],
11185
11268
  kind: "trigger",
11186
11269
  label: n("addNode.webhook"),
11187
- outputs: [{
11188
- handle: "payload",
11189
- jsonSchema: {}
11190
- }],
11270
+ outputs: hu({
11271
+ kind: "webhook",
11272
+ name: "Webhook",
11273
+ bodyFields: []
11274
+ }),
11191
11275
  trigger: { kind: "webhook" }
11192
11276
  },
11193
11277
  {
@@ -11198,13 +11282,11 @@ function Ef(e, t, n) {
11198
11282
  inputs: [],
11199
11283
  kind: "trigger",
11200
11284
  label: n("addNode.cron"),
11201
- outputs: [{
11202
- handle: "payload",
11203
- jsonSchema: {
11204
- additionalProperties: !1,
11205
- type: "object"
11206
- }
11207
- }],
11285
+ outputs: hu({
11286
+ kind: "cron",
11287
+ name: "Cron",
11288
+ cronTimes: []
11289
+ }),
11208
11290
  trigger: { kind: "cron" }
11209
11291
  },
11210
11292
  {
@@ -11225,9 +11307,9 @@ function Ef(e, t, n) {
11225
11307
  },
11226
11308
  ...r
11227
11309
  ];
11228
- return Object.values(Mu(e).graph(t)?.nodes ?? {}).some((e) => e.kind == "manual") ? a.filter((e) => e.id != "trigger:manual") : a;
11310
+ return Object.values(Lu(e).graph(t)?.nodes ?? {}).some((e) => e.kind == "manual") ? a.filter((e) => e.id != "trigger:manual") : a;
11229
11311
  }
11230
- function Df(e, t, n, r) {
11312
+ function Af(e, t, n, r) {
11231
11313
  switch (e.kind) {
11232
11314
  case "new-task": return {
11233
11315
  kind: "code",
@@ -11293,41 +11375,41 @@ function Df(e, t, n, r) {
11293
11375
  }
11294
11376
  //#endregion
11295
11377
  //#region src/manifest/common/meta/block/generateTyping.ts
11296
- function Of(e, t, n) {
11297
- return e === "typescript" ? Nf(t, n) + "\n" : Pf(t, n) + "\n";
11378
+ function jf(e, t, n) {
11379
+ return e === "typescript" ? If(t, n) + "\n" : Lf(t, n) + "\n";
11298
11380
  }
11299
- var kf = /* @__PURE__ */ new Set(["color", "text"]), Af = (e) => e.includes(" | ") ? `(${e})` : e;
11300
- function jf(e) {
11301
- return !e || typeof e != "object" ? !1 : e.contentMediaType === "oomol/artifact" ? !0 : Array.isArray(e.anyOf) ? e.anyOf.some(jf) : e.type === "object" ? Object.values(e.properties || {}).some(jf) : e.type === "array" && jf(e.items);
11381
+ var Mf = /* @__PURE__ */ new Set(["color", "text"]), Nf = (e) => e.includes(" | ") ? `(${e})` : e;
11382
+ function Pf(e) {
11383
+ return !e || typeof e != "object" ? !1 : e.contentMediaType === "oomol/artifact" ? !0 : Array.isArray(e.anyOf) ? e.anyOf.some(Pf) : e.type === "object" ? Object.values(e.properties || {}).some(Pf) : e.type === "array" && Pf(e.items);
11302
11384
  }
11303
- function Mf(e, t) {
11304
- return [...e, ...t].some((e) => jf(e.json_schema));
11385
+ function Ff(e, t) {
11386
+ return [...e, ...t].some((e) => Pf(e.json_schema));
11305
11387
  }
11306
- function Nf(e = [], t = []) {
11388
+ function If(e = [], t = []) {
11307
11389
  let n = ["type Inputs = {"];
11308
- for (let t of e) n.push(` ${t.handle}: ${Ff(t.json_schema, t.nullable)};`);
11390
+ for (let t of e) n.push(` ${t.handle}: ${Rf(t.json_schema, t.nullable)};`);
11309
11391
  n.push("};"), n.push("type Outputs = {");
11310
- for (let e of t) n.push(` ${e.handle}: ${Ff(e.json_schema, e.nullable)};`);
11311
- return n.push("};"), Mf(e, t) && n.unshift("import type { ArtifactRef } from '@oomol-lab/open-flow'", ""), n.join("\n");
11392
+ for (let e of t) n.push(` ${e.handle}: ${Rf(e.json_schema, e.nullable)};`);
11393
+ return n.push("};"), Ff(e, t) && n.unshift("import type { ArtifactRef } from '@oomol-lab/open-flow'", ""), n.join("\n");
11312
11394
  }
11313
- function Pf(e = [], t = []) {
11395
+ function Lf(e = [], t = []) {
11314
11396
  let n = ["@typedef {{"];
11315
- for (let t of e) n.push(` ${t.handle}: ${Ff(t.json_schema, t.nullable)};`);
11397
+ for (let t of e) n.push(` ${t.handle}: ${Rf(t.json_schema, t.nullable)};`);
11316
11398
  n.push("}} Inputs;"), n.push("@typedef {{");
11317
- for (let e of t) n.push(` ${e.handle}: ${Ff(e.json_schema, e.nullable)};`);
11318
- n.push("}} Outputs;"), Mf(e, t) && n.unshift("@import { ArtifactRef } from \"@oomol-lab/open-flow\"");
11399
+ for (let e of t) n.push(` ${e.handle}: ${Rf(e.json_schema, e.nullable)};`);
11400
+ n.push("}} Outputs;"), Ff(e, t) && n.unshift("@import { ArtifactRef } from \"@oomol-lab/open-flow\"");
11319
11401
  let r = n.map((e) => ` * ${e}`);
11320
11402
  return r.unshift("/**"), r.push(" */"), r.join("\n");
11321
11403
  }
11322
- function Ff(e, t) {
11404
+ function Rf(e, t) {
11323
11405
  if (!e) return "unknown";
11324
11406
  switch (e.contentMediaType) {
11325
11407
  case "oomol/bin": return t ? "Uint8Array | null" : "Uint8Array";
11326
11408
  case "oomol/artifact": return t ? "ArtifactRef | null" : "ArtifactRef";
11327
11409
  }
11328
- if (kf.has(e["ui:widget"])) return t ? "string | null" : "string";
11329
- if (Array.isArray(e.anyOf)) return If((t ? e.anyOf.concat({ type: "null" }) : e.anyOf).map((e) => Af(Ff(e, !1)))) || "unknown";
11330
- if (Array.isArray(e.enum)) return If((t ? e.enum.concat(null) : e.enum).map((e) => JSON.stringify(e))) || "unknown";
11410
+ if (Mf.has(e["ui:widget"])) return t ? "string | null" : "string";
11411
+ if (Array.isArray(e.anyOf)) return zf((t ? e.anyOf.concat({ type: "null" }) : e.anyOf).map((e) => Nf(Rf(e, !1)))) || "unknown";
11412
+ if (Array.isArray(e.enum)) return zf((t ? e.enum.concat(null) : e.enum).map((e) => JSON.stringify(e))) || "unknown";
11331
11413
  switch (e.type) {
11332
11414
  case "null": return "null";
11333
11415
  case "boolean": return t ? "boolean | null" : "boolean";
@@ -11337,35 +11419,35 @@ function Ff(e, t) {
11337
11419
  case "object": {
11338
11420
  let n = Object.keys(e.properties || {});
11339
11421
  if (n.length === 0) return "Record<string, unknown>";
11340
- let r = Array.isArray(e?.required) ? new Set(e.required) : /* @__PURE__ */ new Set(), i = `{ ${n.map((t) => `${JSON.stringify(t)}${r.has(t) ? "" : "?"}: ${Ff(e.properties[t], !1)}`).join("; ")} }`;
11422
+ let r = Array.isArray(e?.required) ? new Set(e.required) : /* @__PURE__ */ new Set(), i = `{ ${n.map((t) => `${JSON.stringify(t)}${r.has(t) ? "" : "?"}: ${Rf(e.properties[t], !1)}`).join("; ")} }`;
11341
11423
  return t ? `${i} | null` : i;
11342
11424
  }
11343
11425
  case "array":
11344
11426
  if (e.uniqueItems && Array.isArray(e.items?.enum)) {
11345
- let n = `${Af(Ff(e.items, !1))}[]`;
11427
+ let n = `${Nf(Rf(e.items, !1))}[]`;
11346
11428
  return t ? `${n} | null` : n;
11347
11429
  }
11348
11430
  {
11349
- let n = `${Af(Ff(e.items, !1))}[]`;
11431
+ let n = `${Nf(Rf(e.items, !1))}[]`;
11350
11432
  return t ? `${n} | null` : n;
11351
11433
  }
11352
11434
  default: return "unknown";
11353
11435
  }
11354
11436
  }
11355
- function If(e) {
11437
+ function zf(e) {
11356
11438
  let t = Array.from(new Set(e.filter((e) => !!e)));
11357
11439
  return t.length === 0 || t.includes("unknown") ? "unknown" : t.join(" | ");
11358
11440
  }
11359
11441
  //#endregion
11360
11442
  //#region src/workbench/browser/runtime/editor/flowChanges.ts
11361
- function Lf(e, t) {
11443
+ function Bf(e, t) {
11362
11444
  return {
11363
11445
  ...e,
11364
11446
  content: Ht(e.content, t)
11365
11447
  };
11366
11448
  }
11367
- function Rf(e, t = [], n = {}) {
11368
- let r = Of("javascript", e.inputs.flatMap((e) => "handle" in e ? [{
11449
+ function Vf(e, t = [], n = {}) {
11450
+ let r = jf("javascript", e.inputs.flatMap((e) => "handle" in e ? [{
11369
11451
  handle: e.handle,
11370
11452
  json_schema: e.jsonSchema,
11371
11453
  nullable: e.nullable
@@ -11375,7 +11457,7 @@ function Rf(e, t = [], n = {}) {
11375
11457
  nullable: e.nullable
11376
11458
  }] : [])), i = [], a = /* @__PURE__ */ new Map();
11377
11459
  for (let e of t) {
11378
- let t = n[e.action], r = t?.inputSchema == null ? "Record<string, unknown>" : Ff(t.inputSchema, !1), o = t?.outputSchema == null ? "unknown" : Ff(t.outputSchema, !1), s = `{ connectionId: ${e.connections.map((e) => JSON.stringify(e.connectionId)).join(" | ") || "never"}; connectionAlias?: never } | { connectionAlias: ${e.connections.flatMap((e) => e.alias == null ? [] : [JSON.stringify(e.alias)]).join(" | ") || "never"}; connectionId?: never }`, c = `(...args: ${e.connections.length > 0 && e.connectionId == null ? `[input: {} extends ${r} ? ${r} | undefined : ${r}, options: ${s}]` : `{} extends ${r} ? [input?: ${r}, options?: ${s}] : [input: ${r}, options?: ${s}]`}) => Promise<${o}>`;
11460
+ let t = n[e.action], r = t?.inputSchema == null ? "Record<string, unknown>" : Rf(t.inputSchema, !1), o = t?.outputSchema == null ? "unknown" : Rf(t.outputSchema, !1), s = `{ connectionId: ${e.connections.map((e) => JSON.stringify(e.connectionId)).join(" | ") || "never"}; connectionAlias?: never } | { connectionAlias: ${e.connections.flatMap((e) => e.alias == null ? [] : [JSON.stringify(e.alias)]).join(" | ") || "never"}; connectionId?: never }`, c = `(...args: ${e.connections.length > 0 && e.connectionId == null ? `[input: {} extends ${r} ? ${r} | undefined : ${r}, options: ${s}]` : `{} extends ${r} ? [input?: ${r}, options?: ${s}] : [input: ${r}, options?: ${s}]`}) => Promise<${o}>`;
11379
11461
  i.push(`${JSON.stringify(e.action)}: ${c}`);
11380
11462
  let l = e.action.indexOf("."), u = e.action.slice(0, l), d = a.get(u) ?? [];
11381
11463
  d.push(`${JSON.stringify(e.action.slice(l + 1))}: ${c}`), a.set(u, d);
@@ -11383,7 +11465,7 @@ function Rf(e, t = [], n = {}) {
11383
11465
  for (let [e, t] of a) i.push(`${JSON.stringify(e)}: { ${t.join("; ")} }`);
11384
11466
  return `${r}/** @typedef {import("@oomol-lab/open-flow").TaskContext<{ ${i.join("; ").replaceAll("*/", "*\\/")} }>} TaskContext */\n`;
11385
11467
  }
11386
- function zf(e) {
11468
+ function Hf(e) {
11387
11469
  return {
11388
11470
  executor: {
11389
11471
  action: e.actionId,
@@ -11395,7 +11477,7 @@ function zf(e) {
11395
11477
  outputs: Object.entries(e.outputs).map(([e, t]) => Object.assign({ handle: e }, t))
11396
11478
  };
11397
11479
  }
11398
- function Bf(e, t, n) {
11480
+ function Uf(e, t, n) {
11399
11481
  return {
11400
11482
  id: n,
11401
11483
  name: `${e.actionId.replace(/[^a-zA-Z0-9_]/g, "_").slice(0, 48)}_${n.slice(0, 8)}`,
@@ -11406,7 +11488,7 @@ function Bf(e, t, n) {
11406
11488
  inputs: Object.entries(e.inputs).map(([e, { value: t, ...n }]) => Object.assign({ handle: e }, n, { source: { kind: "model" } }))
11407
11489
  };
11408
11490
  }
11409
- function Vf(e, t) {
11491
+ function Wf(e, t) {
11410
11492
  return [{
11411
11493
  kind: "subflow.create",
11412
11494
  subflow: {
@@ -11434,7 +11516,7 @@ function Vf(e, t) {
11434
11516
  subflowId: e
11435
11517
  }];
11436
11518
  }
11437
- function Hf(e, t, n) {
11519
+ function Gf(e, t, n) {
11438
11520
  let r = e.graph(t);
11439
11521
  if (r == null) return n;
11440
11522
  let i = new Set(Object.values(r.nodes).flatMap((e) => e.name == null ? [] : [e.name]));
@@ -11450,7 +11532,7 @@ function Hf(e, t, n) {
11450
11532
  };
11451
11533
  });
11452
11534
  }
11453
- function Uf(e, t, n, r, i) {
11535
+ function Kf(e, t, n, r, i) {
11454
11536
  let a;
11455
11537
  switch (r.kind) {
11456
11538
  case "code":
@@ -11475,7 +11557,7 @@ function Uf(e, t, n, r, i) {
11475
11557
  a = Ca(t, {
11476
11558
  nodeId: n,
11477
11559
  taskId: i()
11478
- }, zf(r.action));
11560
+ }, Hf(r.action));
11479
11561
  break;
11480
11562
  case "condition":
11481
11563
  a = Ea(t, n, r.name);
@@ -11489,7 +11571,7 @@ function Uf(e, t, n, r, i) {
11489
11571
  case "subflow": {
11490
11572
  let i = e.subflow(r.subflowId);
11491
11573
  if (i == null) return;
11492
- a = sp(t, n, r.subflowId, i.inputs);
11574
+ a = up(t, n, r.subflowId, i.inputs);
11493
11575
  break;
11494
11576
  }
11495
11577
  case "manual":
@@ -11500,7 +11582,7 @@ function Uf(e, t, n, r, i) {
11500
11582
  break;
11501
11583
  case "webhook":
11502
11584
  a = t.kind == "flow" ? ka(t, n, {
11503
- inputsDef: [],
11585
+ bodyFields: [],
11504
11586
  kind: "webhook",
11505
11587
  name: r.name
11506
11588
  }) : void 0;
@@ -11526,12 +11608,12 @@ function Uf(e, t, n, r, i) {
11526
11608
  ...r.connectionId == null ? {} : { connectionId: r.connectionId }
11527
11609
  });
11528
11610
  }
11529
- return a == null ? void 0 : Hf(e, t, a);
11611
+ return a == null ? void 0 : Gf(e, t, a);
11530
11612
  }
11531
- function Wf(e, t, n) {
11613
+ function qf(e, t, n) {
11532
11614
  return ja(e.revision.content, t, n);
11533
11615
  }
11534
- function Gf(e, t, n) {
11616
+ function Jf(e, t, n) {
11535
11617
  let r = e.graph(t)?.nodes ?? {}, i = Object.fromEntries(n.flatMap((e) => r[e] == null ? [] : [[e, r[e]]]));
11536
11618
  return {
11537
11619
  edges: (e.graph(t)?.edges ?? []).filter((e) => i[e.source] != null && i[e.target] != null),
@@ -11548,7 +11630,7 @@ function Gf(e, t, n) {
11548
11630
  nodes: i
11549
11631
  };
11550
11632
  }
11551
- function Kf(e, t, n, r) {
11633
+ function Yf(e, t, n, r) {
11552
11634
  if (e.graph(t) == null) return {
11553
11635
  changes: [],
11554
11636
  nodeIds: [],
@@ -11671,15 +11753,15 @@ function Kf(e, t, n, r) {
11671
11753
  });
11672
11754
  }
11673
11755
  return {
11674
- changes: Hf(e, t, c),
11756
+ changes: Gf(e, t, c),
11675
11757
  nodeIds: [...s.values()],
11676
11758
  sourceIds: o
11677
11759
  };
11678
11760
  }
11679
- function qf(e, t, n, r) {
11761
+ function Xf(e, t, n, r) {
11680
11762
  return Ma(e.revision.content, t, n, r);
11681
11763
  }
11682
- function Jf(e, t, n, r) {
11764
+ function Zf(e, t, n, r) {
11683
11765
  let i = e.node(t, n)?.node;
11684
11766
  if (i != null) return i.description == r ? [] : [{
11685
11767
  before: i.description,
@@ -11690,7 +11772,7 @@ function Jf(e, t, n, r) {
11690
11772
  value: r
11691
11773
  }];
11692
11774
  }
11693
- function Yf(e, t, n, r) {
11775
+ function Qf(e, t, n, r) {
11694
11776
  let i = e.node(t, n)?.node;
11695
11777
  if (i != null) return i.icon == r ? [] : [{
11696
11778
  before: i.icon,
@@ -11701,7 +11783,7 @@ function Yf(e, t, n, r) {
11701
11783
  value: r
11702
11784
  }];
11703
11785
  }
11704
- function Xf(e, t, n, r) {
11786
+ function $f(e, t, n, r) {
11705
11787
  let i = e.node(t, n)?.node;
11706
11788
  if (i == null || i.kind == "manual") return;
11707
11789
  let a = "inputs" in i ? r : r ?? i.name;
@@ -11714,17 +11796,17 @@ function Xf(e, t, n, r) {
11714
11796
  value: a
11715
11797
  }];
11716
11798
  }
11717
- function Zf(e, t, n, r, i) {
11799
+ function ep(e, t, n, r, i) {
11718
11800
  let a = e.graph(t)?.nodes[n];
11719
11801
  if (!(i === void 0 && a != null && "inputs" in a && a.inputs[r] == null)) return Na(e.revision.content, t, n, r, i);
11720
11802
  }
11721
- function Qf(e, t, n, r, i, a) {
11803
+ function tp(e, t, n, r, i, a) {
11722
11804
  return Ia(e.revision.content, t, n, r, i, a);
11723
11805
  }
11724
- function $f(e, t, n, r) {
11806
+ function np(e, t, n, r) {
11725
11807
  let i = e.graph(t), a = i?.nodes[n];
11726
11808
  if (i == null || a?.kind != "condition") return;
11727
- let o = Object.fromEntries([...a.cases.map((e) => [e.output, !0]), ...a.defaultOutput == null ? [] : [[a.defaultOutput, !0]]]), s = Object.fromEntries([...r.cases.map((e) => [e.output, !0]), ...r.defaultOutput == null ? [] : [[r.defaultOutput, !0]]]), c = a.input.handle == r.input.handle ? void 0 : [a.input.handle, r.input.handle], l = lp(Object.keys(o).map((e) => ({ handle: e })), Object.keys(s).map((e) => ({ handle: e }))), u = new Set(Object.keys(s)), d = [];
11809
+ let o = Object.fromEntries([...a.cases.map((e) => [e.output, !0]), ...a.defaultOutput == null ? [] : [[a.defaultOutput, !0]]]), s = Object.fromEntries([...r.cases.map((e) => [e.output, !0]), ...r.defaultOutput == null ? [] : [[r.defaultOutput, !0]]]), c = a.input.handle == r.input.handle ? void 0 : [a.input.handle, r.input.handle], l = fp(Object.keys(o).map((e) => ({ handle: e })), Object.keys(s).map((e) => ({ handle: e }))), u = new Set(Object.keys(s)), d = [];
11728
11810
  for (let e of i.edges) {
11729
11811
  if (e.source != n || e.sourceHandle == null) continue;
11730
11812
  let r = l != null && e.sourceHandle == l[0] ? l[1] : e.sourceHandle;
@@ -11773,11 +11855,11 @@ function $f(e, t, n, r) {
11773
11855
  value: r
11774
11856
  });
11775
11857
  }
11776
- d.push(...up(o.inputs, i, t, e));
11858
+ d.push(...pp(o.inputs, i, t, e));
11777
11859
  }
11778
11860
  return La(e.revision.content, d);
11779
11861
  }
11780
- function ep(e, t, n, r) {
11862
+ function rp(e, t, n, r) {
11781
11863
  let i = e.node(t, n)?.node;
11782
11864
  if (i?.kind != "value") return;
11783
11865
  let a = r.map((e) => ({
@@ -11795,7 +11877,7 @@ function ep(e, t, n, r) {
11795
11877
  value: a
11796
11878
  }];
11797
11879
  }
11798
- function tp(e, t, n, r) {
11880
+ function ip(e, t, n, r) {
11799
11881
  if (t.kind != "flow") return;
11800
11882
  let i = e.graph(t), a = i?.nodes[n];
11801
11883
  if (i == null || a?.kind != "wait") return;
@@ -11842,7 +11924,7 @@ function tp(e, t, n, r) {
11842
11924
  }
11843
11925
  return l.length == 0 ? [] : La(e.revision.content, l);
11844
11926
  }
11845
- function np(e, t, n, r) {
11927
+ function ap(e, t, n, r) {
11846
11928
  let i = e.graph(t)?.nodes[n];
11847
11929
  if (i?.kind == "task") switch (r.kind) {
11848
11930
  case "agent": return i.taskId == null || !rt(e.task(i.taskId), r.before) ? void 0 : [{
@@ -11851,7 +11933,7 @@ function np(e, t, n, r) {
11851
11933
  before: r.before,
11852
11934
  value: r.task
11853
11935
  }];
11854
- case "code": return i.task == null ? void 0 : dp(e, t, n, {
11936
+ case "code": return i.task == null ? void 0 : mp(e, t, n, {
11855
11937
  ...i.task,
11856
11938
  name: r.name
11857
11939
  });
@@ -11884,28 +11966,28 @@ function np(e, t, n, r) {
11884
11966
  }
11885
11967
  }
11886
11968
  }
11887
- function rp(e, t, n, r) {
11969
+ function op(e, t, n, r) {
11888
11970
  let i = e.node(t, n);
11889
11971
  if (i?.kind == "task" && i.node.taskId != null && i.definition != null && "executor" in i.definition && i.definition.executor.kind == "agent") {
11890
- let a = dp(e, t, n, {
11972
+ let a = mp(e, t, n, {
11891
11973
  ...i.definition,
11892
11974
  ...r
11893
11975
  });
11894
11976
  return a == null ? void 0 : La(e.revision.content, a);
11895
11977
  }
11896
11978
  if (i?.kind != "task" || i.node.task == null || i.module == null || rt(i.node.task.inputs, r.inputs) && rt(i.node.task.outputs, r.outputs)) return;
11897
- let a = dp(e, t, n, {
11979
+ let a = mp(e, t, n, {
11898
11980
  ...i.node.task,
11899
11981
  ...r
11900
11982
  });
11901
11983
  if (a != null) return La(e.revision.content, a);
11902
11984
  }
11903
- function ip(e, t, n, r) {
11985
+ function sp(e, t, n, r) {
11904
11986
  let i = e.node(t, n);
11905
11987
  if (i?.kind != "task" || i.node.task != null || i.definition == null) return;
11906
11988
  let a = i.node;
11907
11989
  if (rt(a.additionalInputs ?? [], r)) return;
11908
- let o = lp(a.additionalInputs ?? [], r), s = new Set(i.definition.inputs.flatMap((e) => "handle" in e ? [e.handle] : []).concat(r.map((e) => e.handle))), c = Object.assign({}, a.inputs);
11990
+ let o = fp(a.additionalInputs ?? [], r), s = new Set(i.definition.inputs.flatMap((e) => "handle" in e ? [e.handle] : []).concat(r.map((e) => e.handle))), c = Object.assign({}, a.inputs);
11909
11991
  o != null && Object.hasOwn(c, o[0]) && (c[o[1]] = c[o[0]], delete c[o[0]]);
11910
11992
  for (let e of Object.keys(c)) s.has(e) || delete c[e];
11911
11993
  let l = r.length == 0 ? void 0 : r;
@@ -11915,19 +11997,19 @@ function ip(e, t, n, r) {
11915
11997
  nodeId: n,
11916
11998
  target: t,
11917
11999
  value: l
11918
- }, ...up(a.inputs, c, t, n)]);
12000
+ }, ...pp(a.inputs, c, t, n)]);
11919
12001
  }
11920
- function ap(e, t, n, r) {
12002
+ function cp(e, t, n, r) {
11921
12003
  let i = e.trigger(n);
11922
12004
  if (i == null || i.kind != "webhook") return;
11923
12005
  let a = {
11924
- inputsDef: i.inputsDef,
12006
+ bodyFields: i.bodyFields,
11925
12007
  options: i.options
11926
12008
  }, o = {
11927
- inputsDef: r.inputs,
12009
+ bodyFields: r.bodyFields,
11928
12010
  options: Object.keys(r.options).length == 0 ? void 0 : r.options
11929
12011
  };
11930
- return rt(a.inputsDef, o.inputsDef) && rt(a.options, o.options) ? [] : [{
12012
+ return rt(a.bodyFields, o.bodyFields) && rt(a.options, o.options) ? [] : [{
11931
12013
  before: a,
11932
12014
  kind: "graph.node.webhook.set",
11933
12015
  nodeId: n,
@@ -11935,7 +12017,7 @@ function ap(e, t, n, r) {
11935
12017
  value: o
11936
12018
  }];
11937
12019
  }
11938
- function op(e, t, n) {
12020
+ function lp(e, t, n) {
11939
12021
  let r = e.subflow(t);
11940
12022
  if (r == null) return;
11941
12023
  let i = {
@@ -11950,11 +12032,11 @@ function op(e, t, n) {
11950
12032
  subflowId: t
11951
12033
  }];
11952
12034
  }
11953
- function sp(e, t, n, r) {
12035
+ function up(e, t, n, r) {
11954
12036
  return [{
11955
12037
  kind: "graph.node.create",
11956
12038
  node: {
11957
- inputs: cp(r),
12039
+ inputs: dp(r),
11958
12040
  kind: "subflow",
11959
12041
  subflowId: n
11960
12042
  },
@@ -11962,17 +12044,17 @@ function sp(e, t, n, r) {
11962
12044
  target: e
11963
12045
  }];
11964
12046
  }
11965
- function cp(e) {
12047
+ function dp(e) {
11966
12048
  return Object.fromEntries(e.flatMap((e) => "handle" in e && Object.hasOwn(e, "value") ? [[e.handle, {
11967
12049
  kind: "value",
11968
12050
  value: e.value
11969
12051
  }]] : []));
11970
12052
  }
11971
- function lp(e, t) {
12053
+ function fp(e, t) {
11972
12054
  let n = new Set(e.flatMap((e) => "handle" in e ? [e.handle] : [])), r = new Set(t.flatMap((e) => "handle" in e ? [e.handle] : [])), i = [...n].filter((e) => !r.has(e)), a = [...r].filter((e) => !n.has(e));
11973
12055
  return i.length == 1 && a.length == 1 ? [i[0], a[0]] : void 0;
11974
12056
  }
11975
- function up(e, t, n, r) {
12057
+ function pp(e, t, n, r) {
11976
12058
  let i = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)]), a = [];
11977
12059
  for (let o of i) rt(e[o], t[o]) || a.push({
11978
12060
  before: e[o],
@@ -11984,12 +12066,12 @@ function up(e, t, n, r) {
11984
12066
  });
11985
12067
  return a;
11986
12068
  }
11987
- function dp(e, t, n, r) {
12069
+ function mp(e, t, n, r) {
11988
12070
  let i = e.graph(t), a = i?.nodes[n];
11989
12071
  if (i == null || a?.kind != "task") return;
11990
12072
  let o = a.task ?? e.task(a.taskId);
11991
12073
  if (o == null) return;
11992
- let s = lp(o.inputs, r.inputs), c = lp(o.outputs, r.outputs), l = new Set(r.inputs.flatMap((e) => "handle" in e ? [e.handle] : [])), u = new Set(r.outputs.flatMap((e) => "handle" in e ? [e.handle] : [])), d = [];
12074
+ let s = fp(o.inputs, r.inputs), c = fp(o.outputs, r.outputs), l = new Set(r.inputs.flatMap((e) => "handle" in e ? [e.handle] : [])), u = new Set(r.outputs.flatMap((e) => "handle" in e ? [e.handle] : [])), d = [];
11993
12075
  for (let e of i.edges) {
11994
12076
  if (e.source != n || e.sourceHandle == null) continue;
11995
12077
  let r = c != null && e.sourceHandle == c[0] ? c[1] : e.sourceHandle;
@@ -12047,7 +12129,7 @@ function dp(e, t, n, r) {
12047
12129
  value: i
12048
12130
  });
12049
12131
  }
12050
- d.push(...up(o.inputs, i, t, e));
12132
+ d.push(...pp(o.inputs, i, t, e));
12051
12133
  }
12052
12134
  if (a.task == null && "executor" in r && r.executor.kind == "agent" && "executor" in o) {
12053
12135
  let e = r.executor, t = (e) => e.kind == "input" ? s != null && e.input == s[0] ? {
@@ -12084,4 +12166,4 @@ function dp(e, t, n, r) {
12084
12166
  return d;
12085
12167
  }
12086
12168
  //#endregion
12087
- export { td as $, di as $t, _f as A, fa as At, Zd as B, ta as Bt, Df as C, ga as Ct, Cf as D, pa as Dt, Sf as E, ma as Et, hf as F, ea as Ft, cf as G, Ri as Gt, of as H, na as Ht, wd as I, $i as It, kd as J, Pi as Jt, rf as K, Li as Kt, uf as L, aa as Lt, mf as M, ia as Mt, gf as N, Zi as Nt, xf as O, la as Ot, pf as P, Qi as Pt, $u as Q, pi as Qt, sf as R, oa as Rt, ap as S, _a as St, wf as T, ca as Tt, df as U, Xi as Ut, lf as V, ra as Vt, af as W, Wi as Wt, pd as X, vi as Xt, bd as Y, yi as Yt, rd as Z, hi as Zt, np as _, R as _n, za as _t, Gf as a, Vr as an, pu as at, ep as b, I as bn, Ba as bt, Kf as c, Br as cn, du as ct, $f as d, Fr as dn, io as dt, Qr as en, ed as et, Jf as f, Or as fn, Qa as ft, op as g, gn, Ka as gt, qf as h, L as hn, xa as ht, Rf as i, qr as in, Eu as it, vf as j, Yi as jt, yf as k, da as kt, Zf as l, Rr as ln, oo as lt, Xf as m, On as mn, Xa as mt, Bf as n, Xr as nn, Ru as nt, Vf as o, Ur as on, nu as ot, Yf as p, Gn as pn, Za as pt, nf as q, Ii as qt, Lf as r, Zr as rn, Mu as rt, Wf as s, Wr as sn, eu as st, Uf as t, $r as tn, Hu as tt, Qf as u, Lr as un, eo as ut, ip as v, z as vn, Fa as vt, Ef as w, ha as wt, tp as x, sn as xn, Va as xt, rp as y, cn as yn, Ha as yt, Td as z, sa as zt };
12169
+ export { ad as $, di as $t, Cf as A, fa as At, mf as B, ta as Bt, Af as C, ga as Ct, Ef as D, pa as Dt, Tf as E, ma as Et, kd as F, ea as Ft, lf as G, Ri as Gt, gf as H, na as Ht, hf as I, $i as It, Td as J, Pi as Jt, cf as K, Li as Kt, ff as L, aa as Lt, xf as M, ia as Mt, vf as N, Zi as Nt, wf as O, la as Ot, bf as P, Qi as Pt, od as Q, pi as Qt, Ad as R, oa as Rt, cp as S, _a as St, Df as T, ca as Tt, uf as U, Xi as Ut, df as V, ra as Vt, pf as W, Wi as Wt, cd as X, vi as Xt, vd as Y, yi as Yt, id as Z, hi as Zt, ap as _, R as _n, za as _t, Jf as a, Vr as an, hu as at, rp as b, I as bn, Ba as bt, Yf as c, Br as cn, co as ct, np as d, Fr as dn, io as dt, Qr as en, qu as et, Zf as f, Or as fn, Qa as ft, lp as g, gn, Ka as gt, Xf as h, L as hn, xa as ht, Vf as i, qr as in, vu as it, yf as j, Yi as jt, Sf as k, da as kt, ep as l, Rr as ln, oo as lt, $f as m, On as mn, Xa as mt, Uf as n, Xr as nn, Lu as nt, Wf as o, Ur as on, ru as ot, Qf as p, Gn as pn, Za as pt, Pd as q, Ii as qt, Bf as r, Zr as rn, ju as rt, qf as s, Wr as sn, fu as st, Kf as t, $r as tn, Uu as tt, tp as u, Lr as un, eo as ut, sp as v, z as vn, Fa as vt, kf as w, ha as wt, ip as x, sn as xn, Va as xt, op as y, cn as yn, Ha as yt, nf as z, sa as zt };