@oomol-lab/open-flow 0.1.0-beta.2 → 0.1.0-beta.20

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 (93) hide show
  1. package/dist/browser/{_virtual_open-flow-twemoji-DJwKsM_w.js → _virtual_open-flow-twemoji-CpHJOEsk.js} +4028 -2
  2. package/dist/browser/carbon-Cn-DTyjG.js +54 -0
  3. package/dist/browser/createResourceDialog-DlrAMxmo.js +110 -0
  4. package/dist/browser/dist-B_T-OpQp.js +4 -0
  5. package/dist/browser/{dist-DWADUsVB.js → dist-By46o5UV.js} +47 -47
  6. package/dist/browser/{dist-CPuF50D9.js → dist-D1VYgicl.js} +426 -305
  7. package/dist/browser/dist-DSe6KRsr.js +1224 -0
  8. package/dist/browser/dist-DYjIVIZC.js +795 -0
  9. package/dist/browser/{dist-3Mj8q8Pr.js → dist-DmuE3M0R.js} +53 -54
  10. package/dist/browser/{dist-BN4ZCyOB.js → dist-DpDLsYtO.js} +14 -15
  11. package/dist/browser/{dist-CJpzJrLM.js → dist-DwvhuMxw.js} +894 -895
  12. package/dist/browser/dist-DxahK_I8.js +2688 -0
  13. package/dist/browser/{dist-C46JByB-.js → dist-Dz6Nglsd.js} +61 -61
  14. package/dist/browser/{dist-DUzA0Ukh.js → dist-TJfrvoIQ.js} +141 -142
  15. package/dist/browser/{esm-B_PbUobB.js → esm-B7A42FzW.js} +68 -59
  16. package/dist/browser/flow-authoring-module.d.ts +2 -2
  17. package/dist/browser/flow-authoring-node.d.ts +20 -6
  18. package/dist/browser/flow-authoring.d.ts +1 -1
  19. package/dist/browser/flow-authoring.js +5405 -286
  20. package/dist/browser/flow-change-schema.d.ts +6 -0
  21. package/dist/browser/flow-change.d.ts +173 -14
  22. package/dist/browser/flow-change.js +5271 -114
  23. package/dist/browser/flow-notifications.d.ts +5 -0
  24. package/dist/browser/flowChanges-jX3KYcb0.js +11020 -0
  25. package/dist/browser/{flowRunInputEditorStore-BeyUSWpO.js → flowRunInputEditorStore-BBqQIOCR.js} +1020 -4104
  26. package/dist/browser/flowWorkspace-BIYwslVl.js +148497 -0
  27. package/dist/browser/host-conformance.d.ts +7 -0
  28. package/dist/browser/host-conformance.js +33 -0
  29. package/dist/browser/{diagnostics-giPSzyMo.js → i18n-CVBh0Ni1.js} +3390 -5715
  30. package/dist/browser/inputValues-BWfRHJWC.js +43 -0
  31. package/dist/browser/{languages-DgJehE1g.js → languages-C0zQ4GSo.js} +5 -25
  32. package/dist/browser/licenses.md +149 -700
  33. package/dist/browser/main-BDnNHhkU.js +50 -0
  34. package/dist/browser/{markdownContent-DdlIRN3_.js → markdownContent-BBgH9ZIV.js} +41 -41
  35. package/dist/browser/theme.css +461 -34
  36. package/dist/browser/{typeScriptSession-mPCiA9sV.js → typeScriptSession-DnAmJCzu.js} +70 -71
  37. package/dist/browser/ui-input.d.ts +3 -0
  38. package/dist/browser/ui-label.d.ts +3 -0
  39. package/dist/browser/ui-textarea.d.ts +3 -0
  40. package/dist/browser/ui.css +2 -0
  41. package/dist/browser/ui.css.d.ts +1 -0
  42. package/dist/browser/ui.d.ts +12 -0
  43. package/dist/browser/ui.js +2598 -0
  44. package/dist/browser/useValueChanged-BY05Usw-.js +2944 -0
  45. package/dist/browser/workbench-contract.d.ts +8 -2
  46. package/dist/browser/workbench.css +1 -1
  47. package/dist/browser/workbench.d.ts +1 -0
  48. package/dist/browser/workbench.js +2043 -1327
  49. package/dist/browser/workbenchSelect-CwP6rphY.js +11666 -0
  50. package/dist/common/control-api-conformance.d.ts +7 -0
  51. package/dist/common/control-api-conformance.js +5568 -166
  52. package/dist/common/control-api-errors.d.ts +9 -0
  53. package/dist/common/control-api.d.ts +309 -38
  54. package/dist/common/control-api.js +5817 -576
  55. package/dist/common/control-requests.d.ts +68 -0
  56. package/dist/common/control-requests.js +4950 -0
  57. package/dist/common/engine-contract.d.ts +3 -1
  58. package/dist/common/flow-agent.d.ts +10 -0
  59. package/dist/common/flow-encoding.d.ts +5 -2
  60. package/dist/common/flow-encoding.js +4820 -66
  61. package/dist/common/flow-graph.d.ts +6 -0
  62. package/dist/common/flow-json.d.ts +2 -0
  63. package/dist/common/flow-modules.d.ts +20 -0
  64. package/dist/common/flow-notifications.d.ts +5 -0
  65. package/dist/common/flow-schema.d.ts +8 -0
  66. package/dist/common/flow-semantics.d.ts +10 -6
  67. package/dist/common/flow-semantics.js +9982 -1701
  68. package/dist/common/integration-trigger.d.ts +24 -1
  69. package/dist/common/integration-trigger.js +188 -52
  70. package/dist/common/mcp-conformance.d.ts +2 -0
  71. package/dist/common/mcp.d.ts +765 -0
  72. package/dist/common/mcp.js +6477 -0
  73. package/dist/common/provider-triggers.js +5996 -993
  74. package/dist/common/run-events.d.ts +2 -2
  75. package/dist/common/run-events.js +12 -17
  76. package/dist/common/run-lifecycle.d.ts +21 -2
  77. package/dist/common/run-lifecycle.js +83 -2
  78. package/dist/common/run-results.d.ts +57 -0
  79. package/dist/common/runtime-contract.d.ts +36 -3
  80. package/dist/common/runtime-contract.js +227 -19
  81. package/dist/common/scheduler.d.ts +77 -18
  82. package/dist/common/scheduler.js +8259 -248
  83. package/dist/index.d.ts +6 -5
  84. package/package.json +21 -1
  85. package/dist/browser/carbon-DMCVsjHo.js +0 -53
  86. package/dist/browser/createResourceDialog-BkZns-oZ.js +0 -504
  87. package/dist/browser/dist-BMqL-qR5.js +0 -1894
  88. package/dist/browser/dist-BpopSHwP.js +0 -1543
  89. package/dist/browser/dist-CUSrALSX.js +0 -1620
  90. package/dist/browser/flowWorkspace-DAMLVMcF.js +0 -47584
  91. package/dist/browser/getPseudoElementBounds-ESJExRFX.js +0 -7642
  92. package/dist/browser/main-DmjVyuWr.js +0 -76
  93. package/dist/browser/workbenchSelect-B2s1HV-Y.js +0 -1374
@@ -0,0 +1,110 @@
1
+ import { i as e } from "./main-BDnNHhkU.js";
2
+ import { c as t, q as n } from "./useValueChanged-BY05Usw-.js";
3
+ import { $t as r, Dn as i, E as a, En as o, On as s, S as c, T as l, Tn as u, b as d, kn as f, l as p, t as m, w as h, x as g } from "./workbenchSelect-CwP6rphY.js";
4
+ import { useEffect as _, useRef as v, useState as y } from "react";
5
+ import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
6
+ //#region src/workbench/browser/runtime/shell/createResourceDialog.tsx
7
+ function C({ disabled: C, field: w, id: T, issue: E, label: D, name: O, onNameChange: k, onOpenChange: A, onSubmit: j, pending: M, title: N }) {
8
+ let P = e(), F = v(null), I = v(null), [L, R] = y(!1), z = O.length > 0 && E != null, B = P(z ? `resource.nameIssue.${E}` : "resource.nameHint", { max: 80 }), V = `${T}-message`, H = `${T}-option`;
9
+ return _(() => R(!0), []), /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x("div", { ref: I }), /* @__PURE__ */ x(d, {
10
+ onOpenChange: R,
11
+ onOpenChangeComplete: (e) => {
12
+ e || A(!1);
13
+ },
14
+ open: L,
15
+ children: /* @__PURE__ */ x(c, {
16
+ container: I.current,
17
+ initialFocus: () => F.current,
18
+ showCloseButton: !1,
19
+ children: /* @__PURE__ */ S("form", {
20
+ className: "flex flex-col gap-4",
21
+ onSubmit: j,
22
+ children: [
23
+ /* @__PURE__ */ S(l, {
24
+ className: "flex-row items-center justify-between",
25
+ children: [/* @__PURE__ */ x(a, { children: N }), /* @__PURE__ */ x(g, {
26
+ "aria-label": P("common.cancel"),
27
+ render: /* @__PURE__ */ x(n, {
28
+ size: "icon-sm",
29
+ variant: "ghost"
30
+ }),
31
+ type: "button",
32
+ children: /* @__PURE__ */ x(p, { name: "close" })
33
+ })]
34
+ }),
35
+ /* @__PURE__ */ S(s, {
36
+ className: "gap-4",
37
+ children: [/* @__PURE__ */ S(u, {
38
+ "data-invalid": z,
39
+ children: [
40
+ /* @__PURE__ */ x(f, {
41
+ htmlFor: T,
42
+ children: D
43
+ }),
44
+ /* @__PURE__ */ x(t, {
45
+ autoComplete: "off",
46
+ "aria-describedby": V,
47
+ "aria-invalid": z,
48
+ id: T,
49
+ name: "resource-name",
50
+ onChange: (e) => k(e.target.value),
51
+ ref: F,
52
+ required: !0,
53
+ value: O
54
+ }),
55
+ x(z ? i : o, {
56
+ id: V,
57
+ children: B
58
+ })
59
+ ]
60
+ }), w != null && /* @__PURE__ */ S(u, { children: [
61
+ /* @__PURE__ */ x(f, {
62
+ htmlFor: w.state == "ready" ? H : void 0,
63
+ children: w.label
64
+ }),
65
+ w.state == "ready" ? /* @__PURE__ */ x(m, {
66
+ ariaLabel: w.ariaLabel,
67
+ className: "w-full",
68
+ id: H,
69
+ onValueChange: w.onValueChange,
70
+ options: w.options,
71
+ portalRoot: I.current,
72
+ value: w.value
73
+ }) : /* @__PURE__ */ S("div", {
74
+ className: "flex min-h-9 items-center gap-2 rounded-lg border bg-muted/30 px-3 py-2 text-sm text-muted-foreground",
75
+ role: w.state == "error" ? "alert" : "status",
76
+ children: [
77
+ w.state == "loading" && /* @__PURE__ */ x(r, { "aria-hidden": "true" }),
78
+ /* @__PURE__ */ x("span", { children: w.status }),
79
+ w.state == "error" && /* @__PURE__ */ x(n, {
80
+ className: "ml-auto bg-background",
81
+ onClick: w.onRetry,
82
+ size: "sm",
83
+ type: "button",
84
+ variant: "outline",
85
+ children: w.retry
86
+ })
87
+ ]
88
+ }),
89
+ /* @__PURE__ */ x(o, { children: w.description })
90
+ ] })]
91
+ }),
92
+ /* @__PURE__ */ S(h, {
93
+ className: "mx-0 mb-0 border-0 bg-transparent p-0 pt-1",
94
+ children: [/* @__PURE__ */ x(g, {
95
+ render: /* @__PURE__ */ x(n, { variant: "outline" }),
96
+ type: "button",
97
+ children: P("common.cancel")
98
+ }), /* @__PURE__ */ x(n, {
99
+ disabled: C || M || E != null,
100
+ type: "submit",
101
+ children: P(M ? "common.creating" : "common.create")
102
+ })]
103
+ })
104
+ ]
105
+ })
106
+ })
107
+ })] });
108
+ }
109
+ //#endregion
110
+ export { C as default };
@@ -0,0 +1,4 @@
1
+ //#region ../../node_modules/.bun/@wopjs+cast@0.1.16/node_modules/@wopjs/cast/dist/index.mjs
2
+ var e = (e) => e !== void 0, t = (e) => e === !0 || e === !1, n = (e) => typeof e == "string", r = Array.isArray, i = (e) => typeof e == "object" && !!e, a = (e) => i(e) && !r(e), o = (e) => a(e) ? e : void 0;
3
+ //#endregion
4
+ export { n as a, a as i, t as n, o, e as r, r as t };
@@ -1,4 +1,4 @@
1
- import { c as e, d as t, f as n, h as r, l as i, m as a, u as o } from "./dist-BpopSHwP.js";
1
+ import { B as e, L as t, R as n, U as r, V as i, W as a, z as o } from "./dist-DxahK_I8.js";
2
2
  //#region ../../node_modules/.bun/@lezer+lr@1.4.10/node_modules/@lezer/lr/dist/index.js
3
3
  var s = class e {
4
4
  constructor(e, t, n, r, i, a, o, s, c, l = 0, u) {
@@ -435,12 +435,12 @@ function b(e, t, n, r) {
435
435
  return i < 0 || y(n, r, e) < i;
436
436
  }
437
437
  var x = typeof process < "u" && /\bparse\b/.test({}.LOG), S = null;
438
- function C(e, t, n) {
439
- let r = e.cursor(i.IncludeAnonymous);
440
- for (r.moveTo(t);;) if (!(n < 0 ? r.childBefore(t) : r.childAfter(t))) for (;;) {
441
- if ((n < 0 ? r.to < t : r.from > t) && !r.type.isError) return n < 0 ? Math.max(0, Math.min(r.to - 1, t - 25)) : Math.min(e.length, Math.max(r.from + 1, t + 25));
442
- if (n < 0 ? r.prevSibling() : r.nextSibling()) break;
443
- if (!r.parent()) return n < 0 ? 0 : e.length;
438
+ function C(e, t, r) {
439
+ let i = e.cursor(n.IncludeAnonymous);
440
+ for (i.moveTo(t);;) if (!(r < 0 ? i.childBefore(t) : i.childAfter(t))) for (;;) {
441
+ if ((r < 0 ? i.to < t : i.from > t) && !i.type.isError) return r < 0 ? Math.max(0, Math.min(i.to - 1, t - 25)) : Math.min(e.length, Math.max(i.from + 1, t + 25));
442
+ if (r < 0 ? i.prevSibling() : i.nextSibling()) break;
443
+ if (!i.parent()) return r < 0 ? 0 : e.length;
444
444
  }
445
445
  }
446
446
  var w = class {
@@ -461,24 +461,24 @@ var w = class {
461
461
  for (;;) {
462
462
  let t = this.trees.length - 1;
463
463
  if (t < 0) return this.nextFragment(), null;
464
- let n = this.trees[t], i = this.index[t];
465
- if (i == n.children.length) {
464
+ let n = this.trees[t], r = this.index[t];
465
+ if (r == n.children.length) {
466
466
  this.trees.pop(), this.start.pop(), this.index.pop();
467
467
  continue;
468
468
  }
469
- let a = n.children[i], s = this.start[t] + n.positions[i];
469
+ let i = n.children[r], s = this.start[t] + n.positions[r];
470
470
  if (s > e) return this.nextStart = s, null;
471
- if (a instanceof r) {
471
+ if (i instanceof a) {
472
472
  if (s == e) {
473
473
  if (s < this.safeFrom) return null;
474
- let e = s + a.length;
474
+ let e = s + i.length;
475
475
  if (e <= this.safeTo) {
476
- let t = a.prop(o.lookAhead);
477
- if (!t || e + t < this.fragment.to) return a;
476
+ let t = i.prop(o.lookAhead);
477
+ if (!t || e + t < this.fragment.to) return i;
478
478
  }
479
479
  }
480
- this.index[t]++, s + a.length >= Math.max(this.safeFrom, e) && (this.trees.push(a), this.start.push(s), this.index.push(0));
481
- } else this.index[t]++, this.nextStart = s + a.length;
480
+ this.index[t]++, s + i.length >= Math.max(this.safeFrom, e) && (this.trees.push(i), this.start.push(s), this.index.push(0));
481
+ } else this.index[t]++, this.nextStart = s + i.length;
482
482
  }
483
483
  }
484
484
  }, T = class {
@@ -602,27 +602,27 @@ var w = class {
602
602
  this.stoppedAt = e;
603
603
  }
604
604
  advanceStack(e, t, n) {
605
- let i = e.pos, { parser: a } = this, s = x ? this.stackID(e) + " -> " : "";
606
- if (this.stoppedAt != null && i > this.stoppedAt) return e.forceReduce() ? e : null;
605
+ let r = e.pos, { parser: i } = this, s = x ? this.stackID(e) + " -> " : "";
606
+ if (this.stoppedAt != null && r > this.stoppedAt) return e.forceReduce() ? e : null;
607
607
  if (this.fragments) {
608
608
  let t = e.curContext && e.curContext.tracker.strict, n = t ? e.curContext.hash : 0;
609
- for (let c = this.fragments.nodeAt(i); c;) {
610
- let i = this.parser.nodeSet.types[c.type.id] == c.type ? a.getGoto(e.state, c.type.id) : -1;
611
- if (i > -1 && c.length && (!t || (c.prop(o.contextHash) || 0) == n)) return e.useNode(c, i), x && console.log(s + this.stackID(e) + ` (via reuse of ${a.getName(c.type.id)})`), !0;
612
- if (!(c instanceof r) || c.children.length == 0 || c.positions[0] > 0) break;
609
+ for (let c = this.fragments.nodeAt(r); c;) {
610
+ let r = this.parser.nodeSet.types[c.type.id] == c.type ? i.getGoto(e.state, c.type.id) : -1;
611
+ if (r > -1 && c.length && (!t || (c.prop(o.contextHash) || 0) == n)) return e.useNode(c, r), x && console.log(s + this.stackID(e) + ` (via reuse of ${i.getName(c.type.id)})`), !0;
612
+ if (!(c instanceof a) || c.children.length == 0 || c.positions[0] > 0) break;
613
613
  let l = c.children[0];
614
- if (l instanceof r && c.positions[0] == 0) c = l;
614
+ if (l instanceof a && c.positions[0] == 0) c = l;
615
615
  else break;
616
616
  }
617
617
  }
618
- let c = a.stateSlot(e.state, 4);
619
- if (c > 0) return e.reduce(c), x && console.log(s + this.stackID(e) + ` (via always-reduce ${a.getName(c & 65535)})`), !0;
618
+ let c = i.stateSlot(e.state, 4);
619
+ if (c > 0) return e.reduce(c), x && console.log(s + this.stackID(e) + ` (via always-reduce ${i.getName(c & 65535)})`), !0;
620
620
  if (e.stack.length >= 8400) for (; e.stack.length > 6e3 && e.forceReduce(););
621
621
  let l = this.tokens.getActions(e);
622
- for (let r = 0; r < l.length;) {
623
- let o = l[r++], c = l[r++], u = l[r++], d = r == l.length || !n, f = d ? e : e.split(), p = this.tokens.mainToken;
624
- if (f.apply(o, c, p ? p.start : f.pos, u), x && console.log(s + this.stackID(f) + ` (via ${o & 65536 ? `reduce of ${a.getName(o & 65535)}` : "shift"} for ${a.getName(c)} @ ${i}${f == e ? "" : ", split"})`), d) return !0;
625
- f.pos > i ? t.push(f) : n.push(f);
622
+ for (let a = 0; a < l.length;) {
623
+ let o = l[a++], c = l[a++], u = l[a++], d = a == l.length || !n, f = d ? e : e.split(), p = this.tokens.mainToken;
624
+ if (f.apply(o, c, p ? p.start : f.pos, u), x && console.log(s + this.stackID(f) + ` (via ${o & 65536 ? `reduce of ${i.getName(o & 65535)}` : "shift"} for ${i.getName(c)} @ ${r}${f == e ? "" : ", split"})`), d) return !0;
625
+ f.pos > r ? t.push(f) : n.push(f);
626
626
  }
627
627
  return !1;
628
628
  }
@@ -646,7 +646,7 @@ var w = class {
646
646
  return r;
647
647
  }
648
648
  stackToTree(e) {
649
- return e.close(), r.build({
649
+ return e.close(), a.build({
650
650
  buffer: u.create(e),
651
651
  nodeSet: this.parser.nodeSet,
652
652
  topID: this.topTerm,
@@ -683,18 +683,18 @@ var O = class {
683
683
  constructor(e) {
684
684
  this.start = e.start, this.shift = e.shift || k, this.reduce = e.reduce || k, this.reuse = e.reuse || k, this.hash = e.hash || (() => 0), this.strict = e.strict !== !1;
685
685
  }
686
- }, j = class r extends a {
687
- constructor(r) {
688
- if (super(), this.wrappers = [], r.version != 14) throw RangeError(`Parser version (${r.version}) doesn't match runtime version (14)`);
689
- let i = r.nodeNames.split(" ");
690
- this.minRepeatTerm = i.length;
691
- for (let e = 0; e < r.repeatNodeCount; e++) i.push("");
692
- let a = Object.keys(r.topRules).map((e) => r.topRules[e][1]), s = [];
693
- for (let e = 0; e < i.length; e++) s.push([]);
686
+ }, j = class n extends r {
687
+ constructor(n) {
688
+ if (super(), this.wrappers = [], n.version != 14) throw RangeError(`Parser version (${n.version}) doesn't match runtime version (14)`);
689
+ let r = n.nodeNames.split(" ");
690
+ this.minRepeatTerm = r.length;
691
+ for (let e = 0; e < n.repeatNodeCount; e++) r.push("");
692
+ let a = Object.keys(n.topRules).map((e) => n.topRules[e][1]), s = [];
693
+ for (let e = 0; e < r.length; e++) s.push([]);
694
694
  function c(e, t, n) {
695
695
  s[e].push([t, t.deserialize(String(n))]);
696
696
  }
697
- if (r.nodeProps) for (let e of r.nodeProps) {
697
+ if (n.nodeProps) for (let e of n.nodeProps) {
698
698
  let t = e[0];
699
699
  typeof t == "string" && (t = o[t]);
700
700
  for (let n = 1; n < e.length;) {
@@ -707,18 +707,18 @@ var O = class {
707
707
  }
708
708
  }
709
709
  }
710
- this.nodeSet = new t(i.map((e, t) => n.define({
710
+ this.nodeSet = new e(r.map((e, t) => i.define({
711
711
  name: t >= this.minRepeatTerm ? void 0 : e,
712
712
  id: t,
713
713
  props: s[t],
714
714
  top: a.indexOf(t) > -1,
715
715
  error: t == 0,
716
- skipped: r.skippedNodes && r.skippedNodes.indexOf(t) > -1
717
- }))), r.propSources && (this.nodeSet = this.nodeSet.extend(...r.propSources)), this.strict = !1, this.bufferLength = e;
718
- let l = d(r.tokenData);
719
- this.context = r.context, this.specializerSpecs = r.specialized || [], this.specialized = new Uint16Array(this.specializerSpecs.length);
716
+ skipped: n.skippedNodes && n.skippedNodes.indexOf(t) > -1
717
+ }))), n.propSources && (this.nodeSet = this.nodeSet.extend(...n.propSources)), this.strict = !1, this.bufferLength = t;
718
+ let l = d(n.tokenData);
719
+ this.context = n.context, this.specializerSpecs = n.specialized || [], this.specialized = new Uint16Array(this.specializerSpecs.length);
720
720
  for (let e = 0; e < this.specializerSpecs.length; e++) this.specialized[e] = this.specializerSpecs[e].term;
721
- this.specializers = this.specializerSpecs.map(P), this.states = d(r.states, Uint32Array), this.data = d(r.stateData), this.goto = d(r.goto), this.maxTerm = r.maxTerm, this.tokenizers = r.tokenizers.map((e) => typeof e == "number" ? new h(l, e) : e), this.topRules = r.topRules, this.dialects = r.dialects || {}, this.dynamicPrecedences = r.dynamicPrecedences || null, this.tokenPrecTable = r.tokenPrec, this.termNames = r.termNames || null, this.maxNode = this.nodeSet.types.length - 1, this.dialect = this.parseDialect(), this.top = this.topRules[Object.keys(this.topRules)[0]];
721
+ this.specializers = this.specializerSpecs.map(P), this.states = d(n.states, Uint32Array), this.data = d(n.stateData), this.goto = d(n.goto), this.maxTerm = n.maxTerm, this.tokenizers = n.tokenizers.map((e) => typeof e == "number" ? new h(l, e) : e), this.topRules = n.topRules, this.dialects = n.dialects || {}, this.dynamicPrecedences = n.dynamicPrecedences || null, this.tokenPrecTable = n.tokenPrec, this.termNames = n.termNames || null, this.maxNode = this.nodeSet.types.length - 1, this.dialect = this.parseDialect(), this.top = this.topRules[Object.keys(this.topRules)[0]];
722
722
  }
723
723
  createParse(e, t, n) {
724
724
  let r = new E(this, e, t, n);
@@ -782,7 +782,7 @@ var O = class {
782
782
  return t;
783
783
  }
784
784
  configure(e) {
785
- let t = Object.assign(Object.create(r.prototype), this);
785
+ let t = Object.assign(Object.create(n.prototype), this);
786
786
  if (e.props && (t.nodeSet = this.nodeSet.extend(...e.props)), e.top) {
787
787
  let n = this.topRules[e.top];
788
788
  if (!n) throw RangeError(`Invalid top rule name ${e.top}`);
@@ -825,7 +825,7 @@ var O = class {
825
825
  return new O(e, n, r);
826
826
  }
827
827
  static deserialize(e) {
828
- return new r(e);
828
+ return new n(e);
829
829
  }
830
830
  };
831
831
  function M(e, t) {