@uipath/rules-tool 1.204.0-preview.249 → 1.204.0-preview.250

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 (154) hide show
  1. package/dist/DmnFactory-VWZOSZHH-jkpbxz3n.js +42 -0
  2. package/dist/DmnModelTypes-ATR7FVKZ-jp35cecy.js +18 -0
  3. package/dist/KieDmnMarshaller-6TTUU5B4-47q50gk4.js +20 -0
  4. package/dist/THIRD-PARTY-NOTICES.md +1054 -0
  5. package/dist/business-rules-bnr581tz.js +26 -0
  6. package/dist/{constants-za5vbzp8.js → constants-9pa118cj.js} +17 -10
  7. package/dist/{embedded-file-reader-wmsg31a8.js → embedded-file-reader-rf2g1kfj.js} +4 -1
  8. package/dist/first-party-service-sd8yaf73.js +27 -0
  9. package/dist/hitPolicyResult-4WDHTX4A-gk103w84.js +33 -0
  10. package/dist/index-2hzp9b97.js +116 -0
  11. package/dist/index-34pj9f36.js +48 -0
  12. package/dist/{index-zdwhfpt1.js → index-4c4exdzw.js} +370 -406
  13. package/dist/index-dqa169gp.js +25 -0
  14. package/dist/{index-we6zjs66.js → index-fs1nd5ap.js} +40 -4
  15. package/dist/{index-nzr4mx5p.js → index-sby22td6.js} +22 -2
  16. package/dist/{index-7wc0g78k.js → index-t4mx1a5e.js} +5 -2
  17. package/dist/index.js +9 -8
  18. package/dist/{jmespath-ab6tdc42.js → jmespath-231m3hyn.js} +1 -1
  19. package/dist/{js-yaml-a2bk27p6.js → js-yaml-88tdqrtd.js} +3 -1
  20. package/dist/rule-catalog-5gzpe93c.js +46 -0
  21. package/dist/rules-command-error-20gp2dv9.js +14 -0
  22. package/dist/{rules-debug-service-h1ahd6p3.js → rules-debug-service-cmgmbhyh.js} +36 -35
  23. package/dist/{rules-init-service-y678kjje.js → rules-init-service-b74thek5.js} +16 -12
  24. package/dist/{rules-refresh-service-btn64j8j.js → rules-refresh-service-jgk2kq9d.js} +14 -13
  25. package/dist/{rules-validate-service-sppr4x13.js → rules-validate-service-mr2fk58k.js} +13 -10
  26. package/dist/{tool-97x3zjcm.js → tool-19b4ect0.js} +158 -113
  27. package/dist/{tool-epsr41wx.js → tool-1de529jm.js} +3 -12
  28. package/dist/{tool-7xmarr97.js → tool-2cky8jwp.js} +2578 -1777
  29. package/dist/{tool-0bthsb3x.js → tool-4dfpdepw.js} +15 -15
  30. package/dist/tool-53w8skv5.js +262 -0
  31. package/dist/tool-7haj67tr.js +19 -0
  32. package/dist/{tool-e1mmqsjr.js → tool-8h4er38s.js} +411 -396
  33. package/dist/{tool-2trg1fpx.js → tool-8qy8pkp4.js} +8 -8
  34. package/dist/tool-av4mmsef.js +73 -0
  35. package/dist/{tool-8j9f6ns5.js → tool-eymjx05p.js} +11 -11
  36. package/dist/{tool-mm1x18d6.js → tool-gdtpsdn7.js} +28 -223
  37. package/dist/{tool-6sqt4zrx.js → tool-jxvk6306.js} +32 -29
  38. package/dist/tool-m41px07w.js +49 -0
  39. package/dist/{tool-k2s349kn.js → tool-mkn83w88.js} +17 -14
  40. package/dist/tool-pm3ewdxc.js +1115 -0
  41. package/dist/{tool-6rp0gx98.js → tool-tkcx6png.js} +107 -127
  42. package/dist/{tool-1dycs173.js → tool-wmh645tm.js} +202 -194
  43. package/dist/{tool-24mr6g8c.js → tool-x0z7hxqr.js} +9 -649
  44. package/dist/tool.js +8 -7
  45. package/package.json +2 -15
  46. package/dist/DmnFactory-SG3RP3T3-cr8e7mxz.js +0 -8
  47. package/dist/DmnFactory-VWZOSZHH-azx0zqcn.js +0 -8
  48. package/dist/DmnModelTypes-ATR7FVKZ-vkv7n0jn.js +0 -8
  49. package/dist/KieDmnMarshaller-6TTUU5B4-rsxhvw7a.js +0 -8
  50. package/dist/business-rules-d51977r1.js +0 -25
  51. package/dist/business-rules-dekge24t.js +0 -23
  52. package/dist/business-rules-ew76mbwg.js +0 -25
  53. package/dist/business-rules-jmwx05k2.js +0 -25
  54. package/dist/business-rules-zpzqxyce.js +0 -26
  55. package/dist/constants-4r8pfr16.js +0 -22
  56. package/dist/embedded-file-reader-0228j82a.js +0 -111
  57. package/dist/first-party-service-1qa6cp4d.js +0 -8
  58. package/dist/first-party-service-28dkctkz.js +0 -8
  59. package/dist/first-party-service-4fsz3cnj.js +0 -8
  60. package/dist/first-party-service-ahcc6xc6.js +0 -8
  61. package/dist/first-party-service-y1ccmsvp.js +0 -8
  62. package/dist/first-party-service-zpr1q3nd.js +0 -8
  63. package/dist/hitPolicyResult-4WDHTX4A-dbtkgpqp.js +0 -12
  64. package/dist/index-2zxy6zgp.js +0 -23
  65. package/dist/index-3nx77wfh.js +0 -23
  66. package/dist/index-43zg1wqe.js +0 -19621
  67. package/dist/index-47jera73.js +0 -23
  68. package/dist/index-70jn7cz1.js +0 -19631
  69. package/dist/index-8kb5kc5y.js +0 -24
  70. package/dist/index-97yad7ms.js +0 -8
  71. package/dist/index-dfn83hxf.js +0 -14
  72. package/dist/index-e301h23h.js +0 -24
  73. package/dist/index-frd259yv.js +0 -24
  74. package/dist/index-gc7cw2jh.js +0 -23
  75. package/dist/index-gya2v502.js +0 -8
  76. package/dist/index-hb3gk1wf.js +0 -24
  77. package/dist/index-nsnfdqd5.js +0 -24
  78. package/dist/index-vffktc0w.js +0 -166
  79. package/dist/index-xymrydfw.js +0 -3095
  80. package/dist/index-z2qk2qn6.js +0 -24
  81. package/dist/index-zecwgvg7.js +0 -23
  82. package/dist/rule-catalog-a5w86qns.js +0 -43
  83. package/dist/rule-catalog-etpf962f.js +0 -69
  84. package/dist/rule-catalog-q5cr17hf.js +0 -58
  85. package/dist/rule-catalog-vc98yg4n.js +0 -43
  86. package/dist/rule-catalog-z3h66kh5.js +0 -56
  87. package/dist/rules-command-error-10qmb5w7.js +0 -13
  88. package/dist/rules-command-error-5bdv4bcx.js +0 -13
  89. package/dist/rules-command-error-cmssf0w4.js +0 -13
  90. package/dist/rules-command-error-fsm3b1mv.js +0 -13
  91. package/dist/rules-debug-service-5rcdh3pj.js +0 -192
  92. package/dist/rules-debug-service-8q7mkd0r.js +0 -199
  93. package/dist/rules-debug-service-b9j29ejz.js +0 -192
  94. package/dist/rules-debug-service-v3jr3r1n.js +0 -192
  95. package/dist/rules-init-service-3c2yfa7p.js +0 -687
  96. package/dist/rules-init-service-3wgd9cqp.js +0 -100
  97. package/dist/rules-init-service-8fqytxq0.js +0 -685
  98. package/dist/rules-init-service-pspt7sje.js +0 -100
  99. package/dist/rules-init-service-sbtzw93j.js +0 -102
  100. package/dist/rules-init-service-x7paqa63.js +0 -687
  101. package/dist/rules-init-service-y7qzmxx0.js +0 -102
  102. package/dist/rules-refresh-service-4xxj6ex6.js +0 -65
  103. package/dist/rules-refresh-service-ba5jk1y9.js +0 -65
  104. package/dist/rules-refresh-service-qkmphj53.js +0 -65
  105. package/dist/rules-validate-service-dmgnfne7.js +0 -60
  106. package/dist/rules-validate-service-hk2d006t.js +0 -60
  107. package/dist/rules-validate-service-xp05n2d9.js +0 -60
  108. package/dist/tool-1pkqxwwd.js +0 -17472
  109. package/dist/tool-39fmkx2d.js +0 -611
  110. package/dist/tool-3e2q1x2y.js +0 -6578
  111. package/dist/tool-3j0747gg.js +0 -17077
  112. package/dist/tool-4z7zcq4z.js +0 -6058
  113. package/dist/tool-56smnjrh.js +0 -73
  114. package/dist/tool-5qygptrc.js +0 -6171
  115. package/dist/tool-5xx6x8pe.js +0 -6596
  116. package/dist/tool-7fkrd618.js +0 -1556
  117. package/dist/tool-89xzeteg.js +0 -361
  118. package/dist/tool-911s9czz.js +0 -570
  119. package/dist/tool-9bz2x04j.js +0 -40
  120. package/dist/tool-akh7nnqs.js +0 -704
  121. package/dist/tool-axfzew45.js +0 -1555
  122. package/dist/tool-b71jq9pt.js +0 -389
  123. package/dist/tool-bfj846v8.js +0 -141
  124. package/dist/tool-bvmc017m.js +0 -96
  125. package/dist/tool-bykz5ryf.js +0 -454
  126. package/dist/tool-c76qb8ap.js +0 -17052
  127. package/dist/tool-ca15515v.js +0 -570
  128. package/dist/tool-f9qs255w.js +0 -70
  129. package/dist/tool-ga79rety.js +0 -389
  130. package/dist/tool-gb547mcn.js +0 -141
  131. package/dist/tool-gta9rr4h.js +0 -68
  132. package/dist/tool-h2dfnxdq.js +0 -6486
  133. package/dist/tool-hg6vr5y9.js +0 -3769
  134. package/dist/tool-hgvnm4vh.js +0 -1843
  135. package/dist/tool-hjbf9aay.js +0 -571
  136. package/dist/tool-k5jm64n3.js +0 -5650
  137. package/dist/tool-ketztpgf.js +0 -73
  138. package/dist/tool-n1d88ryb.js +0 -6396
  139. package/dist/tool-nmqpwh9m.js +0 -6166
  140. package/dist/tool-pb80pswx.js +0 -73
  141. package/dist/tool-pcsgwpfw.js +0 -40
  142. package/dist/tool-q3c1bjyb.js +0 -454
  143. package/dist/tool-rwp1skmf.js +0 -40
  144. package/dist/tool-s3fbt22r.js +0 -454
  145. package/dist/tool-tmbst1r8.js +0 -68
  146. package/dist/tool-v6w109p0.js +0 -455
  147. package/dist/tool-w2js05qv.js +0 -389
  148. package/dist/tool-x67kek1m.js +0 -1838
  149. package/dist/tool-x89947ah.js +0 -17052
  150. package/dist/tool-xhksjdka.js +0 -4005
  151. package/dist/tool-yv3t4gg5.js +0 -108
  152. package/dist/tool-zbyb1ttx.js +0 -5650
  153. /package/dist/{tool-fbqnqf9k.js → tool-jd313s2x.js} +0 -0
  154. /package/dist/{tool-vyx8fpft.js → tool-qgqscsjc.js} +0 -0
@@ -1,33 +1,42 @@
1
1
  import {
2
+ Ft,
3
+ Is,
4
+ Ot,
5
+ _t,
6
+ bs,
7
+ hs,
8
+ m
9
+ } from "./tool-8h4er38s.js";
10
+ import {
11
+ $,
12
+ A,
13
+ B,
14
+ C,
2
15
  K,
16
+ S,
3
17
  X,
18
+ _,
4
19
  j,
5
- s,
6
- C,
7
- S,
8
20
  re,
9
- B,
10
- se,
11
- $2
12
- } from "./tool-1dycs173.js";
13
- import {
14
- m,
15
- _t,
16
- Is,
17
- Ft,
18
- bs,
19
- Ot,
20
- hs
21
- } from "./tool-e1mmqsjr.js";
21
+ s,
22
+ se
23
+ } from "./tool-wmh645tm.js";
22
24
  import {
23
- x2
24
- } from "./tool-0bthsb3x.js";
25
+ x
26
+ } from "./tool-4dfpdepw.js";
25
27
  import {
26
28
  e,
27
29
  t
28
- } from "./tool-fbqnqf9k.js";
30
+ } from "./tool-jd313s2x.js";
29
31
 
30
32
  // ../../node_modules/@uipath/dmn-editor-utils/dist/chunks/chunk-DKARK3JU.js
33
+ var oe = { "dmn:decision": { element: "decision", name: _, prefix: "decision" }, "dmn:inputData": { element: "inputData", name: "Input data", prefix: "inputData" }, "dmn:businessKnowledgeModel": { element: "businessKnowledgeModel", name: "Knowledge model", prefix: "bkm" }, "dmn:knowledgeSource": { element: "knowledgeSource", name: "Knowledge source", prefix: "knowledgeSource" } };
34
+ function Pe(e2) {
35
+ return e2 in oe;
36
+ }
37
+ function se2(e2) {
38
+ return e2["@_label"] ?? e2["@_name"] ?? "";
39
+ }
31
40
  function M(e2) {
32
41
  return ("variable" in e2 ? e2.variable?.["@_name"] : undefined) || e2["@_name"];
33
42
  }
@@ -45,14 +54,22 @@ function O(e2, n) {
45
54
  return o;
46
55
  }
47
56
  }
57
+ function qe(e2, n) {
58
+ let r = new Set((e2.drgElement ?? []).map(M)), t2 = ae(n);
59
+ for (let i = 1;; i++) {
60
+ let o = `${t2}${i}`;
61
+ if (!r.has(o))
62
+ return o;
63
+ }
64
+ }
48
65
  function de(e2, n) {
49
66
  if (n.length === 0)
50
67
  return;
51
68
  let r = "expression" in e2 ? e2.expression : undefined, t2 = (i, o) => {
52
69
  if (i === undefined)
53
70
  return;
54
- let s = n.reduce((a, [l, f, c]) => c === "callee" ? K(a, l, f, o) : j(a, l, f, o), i);
55
- return s === i ? undefined : s;
71
+ let s2 = n.reduce((a, [l, f, c]) => c === "callee" ? K(a, l, f, o) : j(a, l, f, o), i);
72
+ return s2 === i ? undefined : s2;
56
73
  };
57
74
  if (r?.__$$element === "literalExpression") {
58
75
  let i = t2(r.text?.__$$text, "expression");
@@ -63,8 +80,8 @@ function de(e2, n) {
63
80
  for (let i of r.input ?? []) {
64
81
  let o = t2(i.inputExpression.text?.__$$text, "expression");
65
82
  o !== undefined && (i.inputExpression.text = { ...i.inputExpression.text, __$$text: o });
66
- let s = i.inputValues && t2(i.inputValues.text?.__$$text, "unaryTests");
67
- i.inputValues && s !== undefined && (i.inputValues.text = { ...i.inputValues.text, __$$text: s });
83
+ let s2 = i.inputValues && t2(i.inputValues.text?.__$$text, "unaryTests");
84
+ i.inputValues && s2 !== undefined && (i.inputValues.text = { ...i.inputValues.text, __$$text: s2 });
68
85
  }
69
86
  for (let i of r.output ?? []) {
70
87
  let o = i.outputValues && t2(i.outputValues.text?.__$$text, "unaryTests");
@@ -72,16 +89,40 @@ function de(e2, n) {
72
89
  }
73
90
  for (let i of r.rule ?? []) {
74
91
  for (let o of i.inputEntry ?? []) {
75
- let s = t2(o.text?.__$$text, "unaryTests");
76
- s !== undefined && (o.text = { ...o.text, __$$text: s });
92
+ let s2 = t2(o.text?.__$$text, "unaryTests");
93
+ s2 !== undefined && (o.text = { ...o.text, __$$text: s2 });
77
94
  }
78
95
  for (let o of i.outputEntry ?? []) {
79
- let s = t2(o.text?.__$$text, "expression");
80
- s !== undefined && (o.text = { ...o.text, __$$text: s });
96
+ let s2 = t2(o.text?.__$$text, "expression");
97
+ s2 !== undefined && (o.text = { ...o.text, __$$text: s2 });
81
98
  }
82
99
  }
83
100
  }
84
101
  }
102
+ function an(e2) {
103
+ if (e2.definitions["@_exporter"] === A || (e2.definitions.drgElement ?? []).length === 0)
104
+ return e2;
105
+ let n = structuredClone(e2), r = [], t2 = new Set((e2.definitions.drgElement ?? []).map(M).filter((i) => !!i));
106
+ for (let i of n.definitions.drgElement ?? []) {
107
+ if (i["@_label"] !== undefined)
108
+ continue;
109
+ let o = `dmn:${i.__$$element}`;
110
+ if (!Pe(o))
111
+ continue;
112
+ let s2 = M(i);
113
+ if (!s2 || [s2, i["@_name"]].every((f) => !f || ae(f) === f))
114
+ continue;
115
+ let a = oe[o], l = qe(n.definitions, a.name);
116
+ i["@_label"] = se2(i), i["@_name"] = l, "variable" in i && i.variable && (i.variable["@_name"] = l), r.push([s2, l, i.__$$element === "businessKnowledgeModel" ? "callee" : "reference"]);
117
+ }
118
+ for (let i of n.definitions.drgElement ?? []) {
119
+ let o = i["@_id"], s2 = M(i);
120
+ !o || !s2 || o === s2 || t2.has(o) || r.push([o, s2, i.__$$element === "businessKnowledgeModel" ? "callee" : "reference"]);
121
+ }
122
+ for (let i of n.definitions.drgElement ?? [])
123
+ de(i, r);
124
+ return n.definitions["@_exporter"] = A, n;
125
+ }
85
126
  var ue = "http://uipath.com/schema/1.0/business-rules/uninitialized";
86
127
  var ce = "business-rule-uninitialized";
87
128
  var at = `<?xml version="1.0" encoding="UTF-8"?>
@@ -148,8 +189,8 @@ function mn(e2, n) {
148
189
  function Be(e2, n, r, t2) {
149
190
  let i = Ve(e2, n), o = n.extensionElements ?? {};
150
191
  n.extensionElements = o;
151
- let s = i?.key ?? mn(e2, o), a = o[s], f = { ...Array.isArray(a) ? a[0] : a, [r]: t2 };
152
- Array.isArray(a) ? a[0] = f : o[s] = f;
192
+ let s2 = i?.key ?? mn(e2, o), a = o[s2], f = { ...Array.isArray(a) ? a[0] : a, [r]: t2 };
193
+ Array.isArray(a) ? a[0] = f : o[s2] = f;
153
194
  }
154
195
  function Ue(e2) {
155
196
  let n = me(e2, e2.definitions)?.["@_surface"];
@@ -177,10 +218,10 @@ function fn(e2, n) {
177
218
  return !(e2.x + e2.width + E.horizontalGap <= n.x || n.x + n.width + E.horizontalGap <= e2.x || e2.y + e2.height + E.verticalGap <= n.y || n.y + n.height + E.verticalGap <= e2.y);
178
219
  }
179
220
  function pn(e2, n) {
180
- let r = ({ x: o, y: s }) => [Math.abs(o) + Math.abs(s), Math.abs(s), -o, -s], [t2, i] = [r(e2), r(n)];
181
- for (let [o, s] of t2.entries())
182
- if (s !== i[o])
183
- return s - i[o];
221
+ let r = ({ x: o, y: s2 }) => [Math.abs(o) + Math.abs(s2), Math.abs(s2), -o, -s2], [t2, i] = [r(e2), r(n)];
222
+ for (let [o, s2] of t2.entries())
223
+ if (s2 !== i[o])
224
+ return s2 - i[o];
184
225
  return 0;
185
226
  }
186
227
  function Dn(e2) {
@@ -209,13 +250,13 @@ function gn(e2) {
209
250
  function R(e2) {
210
251
  return (e2.drgElement ?? []).filter(gn);
211
252
  }
212
- function _(e2) {
253
+ function _2(e2) {
213
254
  return e2["@_id"] ?? "";
214
255
  }
215
256
  function D(e2, n) {
216
257
  return e2["@_id"] || (e2["@_id"] = s(n)), e2["@_id"];
217
258
  }
218
- function $(e2) {
259
+ function $2(e2) {
219
260
  if (e2)
220
261
  return e2.startsWith("#") ? e2.slice(1) : e2.includes("#") || e2.includes(":") || e2.includes("/") ? undefined : e2;
221
262
  }
@@ -227,7 +268,7 @@ function pe(e2, n, r) {
227
268
  let [t2, i, ...o] = e2.split(":");
228
269
  if (!t2 || !i || o.length > 0)
229
270
  return;
230
- let s = `@_xmlns:${t2}`, a = r.map((l) => l[s]).find((l) => typeof l == "string");
271
+ let s2 = `@_xmlns:${t2}`, a = r.map((l) => l[s2]).find((l) => typeof l == "string");
231
272
  return a === _n || a === n["@_namespace"] ? i : undefined;
232
273
  }
233
274
  function xn(e2, n, r) {
@@ -240,21 +281,21 @@ function xn(e2, n, r) {
240
281
  let o = Object.entries(n).find(([l, f]) => l.startsWith("@_xmlns:") && f === i)?.[0];
241
282
  if (o)
242
283
  return `${o.slice(8)}:${e2}`;
243
- let s = "tns", a = 2;
244
- for (;n[`@_xmlns:${s}`]; )
245
- s = `tns${a++}`;
246
- return n[`@_xmlns:${s}`] = i, `${s}:${e2}`;
284
+ let s2 = "tns", a = 2;
285
+ for (;n[`@_xmlns:${s2}`]; )
286
+ s2 = `tns${a++}`;
287
+ return n[`@_xmlns:${s2}`] = i, `${s2}:${e2}`;
247
288
  }
248
289
  function We(e2, n, r) {
249
290
  let t2 = e2["dmndi:DMNDI"];
250
291
  if (t2)
251
292
  for (let i of t2["dmndi:DMNDiagram"] ?? [])
252
293
  i["dmndi:DMNDiagramElement"] = i["dmndi:DMNDiagramElement"]?.flatMap((o) => {
253
- let s = o["@_dmnElementRef"], a = pe(s, e2, [o, i, t2, e2]);
294
+ let s2 = o["@_dmnElementRef"], a = pe(s2, e2, [o, i, t2, e2]);
254
295
  if (!a)
255
296
  return [o];
256
297
  let l = r?.get(a);
257
- return l ? [{ ...o, "@_dmnElementRef": xn(l, e2, s ?? "") }] : n.has(a) ? [] : [o];
298
+ return l ? [{ ...o, "@_dmnElementRef": xn(l, e2, s2 ?? "") }] : n.has(a) ? [] : [o];
258
299
  });
259
300
  }
260
301
  function Ye(e2, n) {
@@ -272,8 +313,8 @@ function yn(e2) {
272
313
  function bn(e2, n) {
273
314
  let r = e2["dmndi:DMNDI"];
274
315
  return r ? (r["dmndi:DMNDiagram"] ?? []).flatMap((t2) => (t2["dmndi:DMNDiagramElement"] ?? []).flatMap((i) => {
275
- let o = yn(i), s = pe(i["@_dmnElementRef"], e2, [i, t2, r, e2]);
276
- return !o || n && s === n ? [] : [{ x: o["@_x"], y: o["@_y"], width: Ye(e2, s ?? ""), height: Math.max(o["@_height"] ?? 0, E.nodeHeight), kind: s ? Xe(e2, s) : undefined }];
316
+ let o = yn(i), s2 = pe(i["@_dmnElementRef"], e2, [i, t2, r, e2]);
317
+ return !o || n && s2 === n ? [] : [{ x: o["@_x"], y: o["@_y"], width: Ye(e2, s2 ?? ""), height: Math.max(o["@_height"] ?? 0, E.nodeHeight), kind: s2 ? Xe(e2, s2) : undefined }];
277
318
  })) : [];
278
319
  }
279
320
  function $n(e2, n) {
@@ -284,7 +325,7 @@ function hn(e2, n, r) {
284
325
  if (r && Xe(e2, r) === "inputData") {
285
326
  let t2 = n.filter((i) => i.kind === "inputData");
286
327
  if (t2.length > 0) {
287
- let i = t2.reduce((o, s) => s.x > o.x ? s : o, t2[0]);
328
+ let i = t2.reduce((o, s2) => s2.x > o.x ? s2 : o, t2[0]);
288
329
  return { x: i.x + V, y: i.y };
289
330
  }
290
331
  return { x: Math.min(...n.map((i) => i.x)), y: Math.max(...n.map((i) => i.y)) + fe };
@@ -326,9 +367,9 @@ function Je(e2, n) {
326
367
  let o = r.get(i.shift() ?? "");
327
368
  if (!o)
328
369
  continue;
329
- let s = [...o.informationRequirement ?? [], ...o.knowledgeRequirement ?? [], ...o.authorityRequirement ?? []];
330
- for (let a of s) {
331
- let l = a.requiredInput?.["@_href"] ?? a.requiredDecision?.["@_href"] ?? a.requiredKnowledge?.["@_href"] ?? a.requiredAuthority?.["@_href"], f = $(l);
370
+ let s2 = [...o.informationRequirement ?? [], ...o.knowledgeRequirement ?? [], ...o.authorityRequirement ?? []];
371
+ for (let a of s2) {
372
+ let l = a.requiredInput?.["@_href"] ?? a.requiredDecision?.["@_href"] ?? a.requiredKnowledge?.["@_href"] ?? a.requiredAuthority?.["@_href"], f = $2(l);
332
373
  !f || t2.has(f) || (t2.add(f), i.push(f));
333
374
  }
334
375
  }
@@ -341,7 +382,7 @@ function N(e2) {
341
382
  function I(e2) {
342
383
  return e2?.__$$text ?? "";
343
384
  }
344
- function x(e2, n) {
385
+ function x2(e2, n) {
345
386
  return { ...e2, __$$text: n };
346
387
  }
347
388
  function U(e2, n, r) {
@@ -361,15 +402,15 @@ function Sn(e2) {
361
402
  }
362
403
  function j2(e2, n) {
363
404
  let r = new Set([...(n.informationRequirement ?? []).map((i) => i.requiredDecision?.["@_href"]), ...(n.knowledgeRequirement ?? []).map((i) => i.requiredKnowledge?.["@_href"])].flatMap((i) => {
364
- let o = $(i);
405
+ let o = $2(i);
365
406
  return o ? [o] : [];
366
- })), t2 = _(n);
407
+ })), t2 = _2(n);
367
408
  return (e2.drgElement ?? []).flatMap((i) => {
368
- let o = _(i), s = !r.has(o) && o !== t2 && i.__$$element === "decision" && !Je(e2, o).has(t2);
369
- if (!r.has(o) && !s)
409
+ let o = _2(i), s2 = !r.has(o) && o !== t2 && i.__$$element === "decision" && !Je(e2, o).has(t2);
410
+ if (!r.has(o) && !s2)
370
411
  return [];
371
412
  let a = i.variable, l = a?.["@_name"] ?? i["@_name"];
372
- return l ? [{ name: l, ...i["@_label"] && i["@_label"] !== l ? { label: i["@_label"] } : {}, typeRef: a?.["@_typeRef"], ...s ? { requirableId: o } : {}, members: Sn(i) }] : [];
413
+ return l ? [{ name: l, ...i["@_label"] && i["@_label"] !== l ? { label: i["@_label"] } : {}, typeRef: a?.["@_typeRef"], ...s2 ? { requirableId: o } : {}, members: Sn(i) }] : [];
373
414
  });
374
415
  }
375
416
  function A2(e2) {
@@ -392,24 +433,24 @@ function z(e2, n, r) {
392
433
  function v(e2) {
393
434
  let n = new Map;
394
435
  for (let r of e2.informationRequirement ?? []) {
395
- let t2 = $(r.requiredInput?.["@_href"]);
436
+ let t2 = $2(r.requiredInput?.["@_href"]);
396
437
  t2 && n.set(t2, r);
397
438
  }
398
439
  return n;
399
440
  }
400
441
  function An(e2, n) {
401
442
  let r = e2?.variable || n.variableId || n.variableName !== undefined || n.typeRef !== undefined ? { ...e2?.variable, "@_id": n.variableId, "@_name": n.variableName ?? n.name, "@_typeRef": n.typeRef } : undefined;
402
- return { ...e2 ?? { __$$element: "inputData", "@_name": n.name }, __$$element: "inputData", "@_id": n.id, "@_name": n.name, "@_label": n.label, description: n.description ? x(e2?.description, n.description) : undefined, variable: r };
443
+ return { ...e2 ?? { __$$element: "inputData", "@_name": n.name }, __$$element: "inputData", "@_id": n.id, "@_name": n.name, "@_label": n.label, description: n.description ? x2(e2?.description, n.description) : undefined, variable: r };
403
444
  }
404
445
  function H(e2, n) {
405
446
  return e2.variable || n.variableId || n.variableName !== undefined || n.variableTypeRef !== undefined ? { ...e2.variable, "@_id": n.variableId, "@_name": n.variableName ?? n.name, "@_typeRef": n.variableTypeRef } : undefined;
406
447
  }
407
448
  function K2(e2, n, r) {
408
- let t2 = new Map(e2.informationRequirement?.map((u) => [_(u), u]) ?? []), i = v(e2), o = (e2.informationRequirement ?? []).filter((u) => u.requiredDecision), s2 = (n.scopeVariables ?? []).filter((u) => u.requirableId), a = s2.length > 0 ? r() : new Set, l = new Set(o.flatMap((u) => $(u.requiredDecision?.["@_href"]) ?? [])), f = s2.flatMap((u) => a.has(u.name) && !l.has(u.requirableId ?? "") ? [{ "@_id": s("informationRequirement"), requiredDecision: { "@_href": `#${u.requirableId}` } }] : []), c = n.inputData.flatMap((u) => {
449
+ let t2 = new Map(e2.informationRequirement?.map((u) => [_2(u), u]) ?? []), i = v(e2), o = (e2.informationRequirement ?? []).filter((u) => u.requiredDecision), s2 = (n.scopeVariables ?? []).filter((u) => u.requirableId), a = s2.length > 0 ? r() : new Set, l = new Set(o.flatMap((u) => $2(u.requiredDecision?.["@_href"]) ?? [])), f = s2.flatMap((u) => a.has(u.name) && !l.has(u.requirableId ?? "") ? [{ "@_id": s("informationRequirement"), requiredDecision: { "@_href": `#${u.requirableId}` } }] : []), c = n.inputData.flatMap((u) => {
409
450
  if (!u.requirementId)
410
451
  return [];
411
- let m = t2.get(u.requirementId) ?? i.get(u.id);
412
- return [{ ...m, "@_id": u.requirementId, requiredDecision: undefined, requiredInput: { ...m?.requiredInput, "@_href": `#${u.id}` } }];
452
+ let m2 = t2.get(u.requirementId) ?? i.get(u.id);
453
+ return [{ ...m2, "@_id": u.requirementId, requiredDecision: undefined, requiredInput: { ...m2?.requiredInput, "@_href": `#${u.id}` } }];
413
454
  });
414
455
  return [...o, ...f, ...c];
415
456
  }
@@ -419,8 +460,8 @@ function G(e2) {
419
460
  let t2 = r, i = t2["@_name"];
420
461
  if (!i || t2["@_label"] || !/\s/.test(i))
421
462
  continue;
422
- let o = t2.variable?.["@_name"], s = o && !/\s/.test(o) ? o : O(e2, i);
423
- t2["@_label"] = i, t2["@_name"] = s, t2.variable && (t2.variable["@_name"] = s), i !== s && n.set(i, s);
463
+ let o = t2.variable?.["@_name"], s2 = o && !/\s/.test(o) ? o : O(e2, i);
464
+ t2["@_label"] = i, t2["@_name"] = s2, t2.variable && (t2.variable["@_name"] = s2), i !== s2 && n.set(i, s2);
424
465
  }
425
466
  for (let r of e2.drgElement ?? []) {
426
467
  let t2 = r, i = t2["@_name"], o = t2.variable?.["@_name"];
@@ -433,33 +474,33 @@ function vn(e2, n, r, t2) {
433
474
  if (r.size === 0 && t2.size === 0 || (t2.size > 0 && De(e2, n, t2), r.size === 0))
434
475
  return i;
435
476
  for (let o of e2.drgElement ?? [])
436
- o.__$$element !== "decision" || _(o) === n || !o.informationRequirement || (o.informationRequirement = o.informationRequirement.filter((s) => {
437
- let a = $(s.requiredInput?.["@_href"]);
438
- return !a || !r.has(a) ? true : (i.push(_(s)), false);
477
+ o.__$$element !== "decision" || _2(o) === n || !o.informationRequirement || (o.informationRequirement = o.informationRequirement.filter((s2) => {
478
+ let a = $2(s2.requiredInput?.["@_href"]);
479
+ return !a || !r.has(a) ? true : (i.push(_2(s2)), false);
439
480
  }));
440
481
  return i;
441
482
  }
442
483
  function W(e2, n, r) {
443
- let t2 = structuredClone(e2.document), i = t2.definitions, o = i.drgElement?.find((d) => d.__$$element === "decision" && _(d) === e2.sourceDecisionId);
484
+ let t2 = structuredClone(e2.document), i = t2.definitions, o = i.drgElement?.find((d) => d.__$$element === "decision" && _2(d) === e2.sourceDecisionId);
444
485
  if (!o)
445
486
  throw new Error("Business rule decision is missing");
446
- let s = new Set(e2.sourceInputDataIds), a = i.drgElement?.filter((d) => d.__$$element === "inputData" && s.has(_(d))) ?? [], l = new Map(a.map((d) => [_(d), d])), f = new Map(a.flatMap((d) => d.variable?.["@_id"] ? [[d.variable["@_id"], d]] : [])), c = n.inputData.map((d) => {
487
+ let s2 = new Set(e2.sourceInputDataIds), a = i.drgElement?.filter((d) => d.__$$element === "inputData" && s2.has(_2(d))) ?? [], l = new Map(a.map((d) => [_2(d), d])), f = new Map(a.flatMap((d) => d.variable?.["@_id"] ? [[d.variable["@_id"], d]] : [])), c = n.inputData.map((d) => {
447
488
  let y = l.get(d.id) ?? (d.variableId ? f.get(d.variableId) : undefined);
448
489
  return { current: y, inputId: d.id, updated: An(y, d) };
449
- }), u = new Map(c.flatMap(({ current: d, updated: y }) => d?.["@_id"] ? [[d["@_id"], y]] : [])), m = c.flatMap(({ current: d, updated: y }) => d ? [] : [y]), b = r(o, n), q = new Set((o.informationRequirement ?? []).filter((d) => !d.requiredDecision).map(_)), ge = new Set(n.inputData.map((d) => d.requirementId).filter((d) => !!d)), xe = new Set([...[...q].filter((d) => !ge.has(d)), ...a.map(_).filter((d) => !u.has(d))]), p = new Map;
490
+ }), u = new Map(c.flatMap(({ current: d, updated: y }) => d?.["@_id"] ? [[d["@_id"], y]] : [])), m2 = c.flatMap(({ current: d, updated: y }) => d ? [] : [y]), b = r(o, n), q = new Set((o.informationRequirement ?? []).filter((d) => !d.requiredDecision).map(_2)), ge = new Set(n.inputData.map((d) => d.requirementId).filter((d) => !!d)), xe = new Set([...[...q].filter((d) => !ge.has(d)), ...a.map(_2).filter((d) => !u.has(d))]), p = new Map;
450
491
  o["@_id"] && o["@_id"] !== n.decision.id && p.set(o["@_id"], n.decision.id);
451
492
  for (let { current: d, inputId: y } of c)
452
493
  d?.["@_id"] && d["@_id"] !== y && p.set(d["@_id"], y);
453
494
  i["@_id"] = n.id, i["@_name"] = n.name, i["@_namespace"] = n.namespace, i["@_exporter"] = n.exporter, i["@_exporterVersion"] = n.exporterVersion;
454
- let h = new Set(a.map(_).filter((d) => !u.has(d))), Ee = new Map(c.flatMap(({ current: d, updated: y }) => {
495
+ let h = new Set(a.map(_2).filter((d) => !u.has(d))), Ee = new Map(c.flatMap(({ current: d, updated: y }) => {
455
496
  let T = d && B2(d), Q = B2(y);
456
497
  return T && Q && T !== Q ? [[T, Q]] : [];
457
- })), X = B2(o), Z = B2(b);
458
- X && Z && X !== Z && Ee.set(X, Z), i.drgElement = i.drgElement?.flatMap((d) => {
459
- let y = _(d);
498
+ })), X2 = B2(o), Z = B2(b);
499
+ X2 && Z && X2 !== Z && Ee.set(X2, Z), i.drgElement = i.drgElement?.flatMap((d) => {
500
+ let y = _2(d);
460
501
  if (y === e2.sourceDecisionId)
461
- return [...m, b];
462
- if (s.has(y)) {
502
+ return [...m2, b];
503
+ if (s2.has(y)) {
463
504
  let T = u.get(y);
464
505
  return T ? [T] : [];
465
506
  }
@@ -467,8 +508,8 @@ function W(e2, n, r) {
467
508
  });
468
509
  let sn = vn(i, e2.sourceDecisionId, h, Ee);
469
510
  We(i, new Set([...xe, ...sn]), p);
470
- for (let d of m)
471
- Ze(i, _(d));
511
+ for (let d of m2)
512
+ Ze(i, _2(d));
472
513
  return t2;
473
514
  }
474
515
  function Pn(e2) {
@@ -492,20 +533,20 @@ function On(e2, n) {
492
533
  let i = R(r), o = r.drgElement?.filter((p) => p.__$$element === "inputData") ?? [];
493
534
  if (!t2 && (i.length !== 1 || i.length + o.length !== (r.drgElement?.length ?? 0)))
494
535
  return;
495
- let s = t2 ? i.find((p) => _(p) === n) : i[0];
496
- if (!s)
536
+ let s2 = t2 ? i.find((p) => _2(p) === n) : i[0];
537
+ if (!s2)
497
538
  return;
498
- let a = s.expression?.__$$element === "decisionTable" ? s.expression : undefined, l = new Set(o.map(_)), f = new Set;
499
- if (!a || !t2 && (s.knowledgeRequirement?.length || s.authorityRequirement?.length) || !F(s) || s.informationRequirement?.some((p) => {
539
+ let a = s2.expression?.__$$element === "decisionTable" ? s2.expression : undefined, l = new Set(o.map(_2)), f = new Set;
540
+ if (!a || !t2 && (s2.knowledgeRequirement?.length || s2.authorityRequirement?.length) || !F(s2) || s2.informationRequirement?.some((p) => {
500
541
  if (p.requiredDecision)
501
542
  return !t2;
502
- let h = $(p.requiredInput?.["@_href"]);
543
+ let h = $2(p.requiredInput?.["@_href"]);
503
544
  return !h || !l.has(h) || f.has(h) ? true : (f.add(h), false);
504
545
  }))
505
546
  return;
506
- let c = a["@_hitPolicy"] ?? e.Unique, u = a["@_aggregation"], m = a.input?.length ?? 0, b = a.output.length, q = a.annotation?.length ?? 0;
507
- if (!(!Pn(c) || u !== undefined && (c !== e.Collect || !x2(u)) || b === 0 || a.output.some((p) => p.defaultOutputEntry) || q > 1 || a.rule?.some((p) => (p.inputEntry?.length ?? 0) !== m || p.outputEntry.length !== b || (p.annotationEntry?.length ?? 0) !== q) || [...(a.input ?? []).flatMap((p) => [p.inputExpression["@_expressionLanguage"], p.inputValues?.["@_expressionLanguage"]]), ...a.output.map((p) => p.outputValues?.["@_expressionLanguage"]), ...a.rule?.flatMap((p) => [...p.inputEntry?.map((h) => h["@_expressionLanguage"]) ?? [], ...p.outputEntry.map((h) => h["@_expressionLanguage"])]) ?? []].some(N) || [...(a.input ?? []).map((p) => p.inputValues), ...a.output.map((p) => p.outputValues)].some((p) => p?.extensionElements !== undefined)))
508
- return { definitions: r, decision: s, table: a, inputData: o, scopeVariables: t2 ? j2(r, s) : [], hitPolicy: c };
547
+ let c = a["@_hitPolicy"] ?? e.Unique, u = a["@_aggregation"], m2 = a.input?.length ?? 0, b = a.output.length, q = a.annotation?.length ?? 0;
548
+ if (!(!Pn(c) || u !== undefined && (c !== e.Collect || !x(u)) || b === 0 || a.output.some((p) => p.defaultOutputEntry) || q > 1 || a.rule?.some((p) => (p.inputEntry?.length ?? 0) !== m2 || p.outputEntry.length !== b || (p.annotationEntry?.length ?? 0) !== q) || [...(a.input ?? []).flatMap((p) => [p.inputExpression["@_expressionLanguage"], p.inputValues?.["@_expressionLanguage"]]), ...a.output.map((p) => p.outputValues?.["@_expressionLanguage"]), ...a.rule?.flatMap((p) => [...p.inputEntry?.map((h) => h["@_expressionLanguage"]) ?? [], ...p.outputEntry.map((h) => h["@_expressionLanguage"])]) ?? []].some(N) || [...(a.input ?? []).map((p) => p.inputValues), ...a.output.map((p) => p.outputValues)].some((p) => p?.extensionElements !== undefined)))
549
+ return { definitions: r, decision: s2, table: a, inputData: o, scopeVariables: t2 ? j2(r, s2) : [], hitPolicy: c };
509
550
  }
510
551
  function kn(e2) {
511
552
  let n = e2.decision.decisionTable, r = [...n.inputs.flatMap((t2) => [[t2.expressionText, "expression"], [t2.allowedValues?.text, "unaryTests"]]), ...n.outputs.map((t2) => [t2.allowedValues?.text, "unaryTests"]), ...n.rules.flatMap((t2) => [...t2.inputEntries.map((i) => [i.text, "unaryTests"]), ...t2.outputEntries.map((i) => [i.text, "expression"])])];
@@ -515,15 +556,15 @@ function Cn(e2, n) {
515
556
  let r = On(e2, n);
516
557
  if (!r)
517
558
  return;
518
- let { definitions: t2, decision: i, table: o, inputData: s2, hitPolicy: a } = r, l = new Set, f = new Set, c = o.input?.map((m) => ({ id: U(l, m, "input"), label: m["@_label"], expressionId: D(m.inputExpression, "inputExpression"), expressionText: I(m.inputExpression.text), typeRef: m.inputExpression["@_typeRef"], allowedValues: en(m.inputValues, "inputValues") })) ?? [], u = $2(c);
519
- return { id: D(t2, "definitions"), name: t2["@_name"], ...r.scopeVariables.length ? { scopeVariables: r.scopeVariables } : {}, namespace: t2["@_namespace"], exporter: t2["@_exporter"], exporterVersion: t2["@_exporterVersion"], itemDefinitions: t2.itemDefinition?.map((m) => ({ name: m["@_name"], isCollection: m["@_isCollection"] === true, typeRef: m.typeRef?.__$$text, allowedValues: m.allowedValues?.text?.__$$text })), inputData: z(s2, v(i), u), decision: { id: D(i, "decision"), name: i["@_name"] ?? "", label: i["@_label"], variableId: i.variable ? D(i.variable, "variable") : s("variable"), variableName: i.variable?.["@_name"], variableTypeRef: i.variable?.["@_typeRef"], description: i.description?.__$$text, question: i.question?.__$$text, allowedAnswers: i.allowedAnswers?.__$$text, decisionTable: { id: D(o, "decisionTable"), label: o["@_label"], typeRef: o["@_typeRef"], outputLabel: o["@_outputLabel"], preferredOrientation: o["@_preferredOrientation"], hitPolicy: a, aggregation: x2(o["@_aggregation"]) ? o["@_aggregation"] : undefined, inputs: c, outputs: o.output.map((m) => ({ id: U(l, m, "output"), label: m["@_label"], name: m["@_name"], typeRef: m["@_typeRef"], allowedValues: en(m.outputValues, "outputValues"), description: m.description?.__$$text })), annotations: o.annotation?.length ? o.annotation.map((m) => ({ name: m["@_name"] })) : [{ name: C }], rules: o.rule?.map((m) => ({ id: U(f, m, "rule"), description: m.description?.__$$text, inputEntries: m.inputEntry?.map((b) => ({ id: D(b, "inputEntry"), text: I(b.text) })) ?? [], outputEntries: m.outputEntry.map((b) => ({ id: D(b, "outputEntry"), text: zn(I(b.text)) })), annotationEntries: o.annotation?.length ? m.annotationEntry?.map((b) => I(b.text)) ?? [] : [""] })) ?? [] } } };
559
+ let { definitions: t2, decision: i, table: o, inputData: s2, hitPolicy: a } = r, l = new Set, f = new Set, c = o.input?.map((m2) => ({ id: U(l, m2, "input"), label: m2["@_label"], expressionId: D(m2.inputExpression, "inputExpression"), expressionText: I(m2.inputExpression.text), typeRef: m2.inputExpression["@_typeRef"], allowedValues: en(m2.inputValues, "inputValues") })) ?? [], u = $(c);
560
+ return { id: D(t2, "definitions"), name: t2["@_name"], ...r.scopeVariables.length ? { scopeVariables: r.scopeVariables } : {}, namespace: t2["@_namespace"], exporter: t2["@_exporter"], exporterVersion: t2["@_exporterVersion"], itemDefinitions: t2.itemDefinition?.map((m2) => ({ name: m2["@_name"], isCollection: m2["@_isCollection"] === true, typeRef: m2.typeRef?.__$$text, allowedValues: m2.allowedValues?.text?.__$$text })), inputData: z(s2, v(i), u), decision: { id: D(i, "decision"), name: i["@_name"] ?? "", label: i["@_label"], variableId: i.variable ? D(i.variable, "variable") : s("variable"), variableName: i.variable?.["@_name"], variableTypeRef: i.variable?.["@_typeRef"], description: i.description?.__$$text, question: i.question?.__$$text, allowedAnswers: i.allowedAnswers?.__$$text, decisionTable: { id: D(o, "decisionTable"), label: o["@_label"], typeRef: o["@_typeRef"], outputLabel: o["@_outputLabel"], preferredOrientation: o["@_preferredOrientation"], hitPolicy: a, aggregation: x(o["@_aggregation"]) ? o["@_aggregation"] : undefined, inputs: c, outputs: o.output.map((m2) => ({ id: U(l, m2, "output"), label: m2["@_label"], name: m2["@_name"], typeRef: m2["@_typeRef"], allowedValues: en(m2.outputValues, "outputValues"), description: m2.description?.__$$text })), annotations: o.annotation?.length ? o.annotation.map((m2) => ({ name: m2["@_name"] })) : [{ name: C }], rules: o.rule?.map((m2) => ({ id: U(f, m2, "rule"), description: m2.description?.__$$text, inputEntries: m2.inputEntry?.map((b) => ({ id: D(b, "inputEntry"), text: I(b.text) })) ?? [], outputEntries: m2.outputEntry.map((b) => ({ id: D(b, "outputEntry"), text: zn(I(b.text)) })), annotationEntries: o.annotation?.length ? m2.annotationEntry?.map((b) => I(b.text)) ?? [] : [""] })) ?? [] } } };
520
561
  }
521
562
  function Vn(e2, n) {
522
563
  let r = structuredClone(e2), t2 = Cn(r, n);
523
564
  return t2 ? { document: r, model: t2, sourceDecisionId: t2.decision.id, sourceInputDataIds: t2.inputData.map((i) => i.id) } : undefined;
524
565
  }
525
566
  function nn(e2, n) {
526
- return n ? { ...e2, "@_id": n.id, text: x(e2?.text, n.text) } : undefined;
567
+ return n ? { ...e2, "@_id": n.id, text: x2(e2?.text, n.text) } : undefined;
527
568
  }
528
569
  function Bn(e2) {
529
570
  switch (e2) {
@@ -536,29 +577,29 @@ function Bn(e2) {
536
577
  }
537
578
  }
538
579
  function Un(e2, n) {
539
- let r = !e2.annotation?.length && n.annotations.length === 1 && n.annotations[0].name === C && n.rules.every((s) => s.annotationEntries.length === 1 && s.annotationEntries[0] === ""), t2 = new Map(e2.input?.map((s) => [s["@_id"], s]) ?? []), i = new Map(e2.output.map((s) => [s["@_id"], s])), o = new Map(e2.rule?.map((s) => [s["@_id"], s]) ?? []);
540
- return { ...e2, "@_id": n.id, "@_label": n.label, "@_typeRef": n.typeRef, "@_outputLabel": n.outputLabel, "@_preferredOrientation": Bn(n.preferredOrientation), "@_hitPolicy": n.hitPolicy === e.Unique ? undefined : n.hitPolicy, "@_aggregation": n.hitPolicy === e.Collect ? n.aggregation : undefined, input: n.inputs.map((s) => {
541
- let a = t2.get(s.id);
542
- return { ...a, "@_id": s.id, "@_label": s.label, inputExpression: { ...a?.inputExpression, "@_id": s.expressionId, "@_typeRef": s.typeRef, text: x(a?.inputExpression.text, s.expressionText) }, inputValues: nn(a?.inputValues, s.allowedValues) };
543
- }), output: n.outputs.map((s) => {
544
- let a = i.get(s.id);
545
- return { ...a, "@_id": s.id, "@_label": s.label, "@_name": s.name, "@_typeRef": s.typeRef, description: s.description ? x(a?.description, s.description) : undefined, outputValues: nn(a?.outputValues, s.allowedValues) };
546
- }), annotation: r ? undefined : n.annotations.map((s, a) => ({ ...e2.annotation?.[a], "@_name": s.name })), rule: n.rules.map((s) => {
547
- let a = o.get(s.id), l = new Map(a?.inputEntry?.map((c) => [c["@_id"], c]) ?? []), f = new Map(a?.outputEntry.map((c) => [c["@_id"], c]) ?? []);
548
- return { ...a, "@_id": s.id, description: s.description === undefined ? undefined : x(a?.description, s.description), inputEntry: s.inputEntries.map((c) => {
580
+ let r = !e2.annotation?.length && n.annotations.length === 1 && n.annotations[0].name === C && n.rules.every((s2) => s2.annotationEntries.length === 1 && s2.annotationEntries[0] === ""), t2 = new Map(e2.input?.map((s2) => [s2["@_id"], s2]) ?? []), i = new Map(e2.output.map((s2) => [s2["@_id"], s2])), o = new Map(e2.rule?.map((s2) => [s2["@_id"], s2]) ?? []);
581
+ return { ...e2, "@_id": n.id, "@_label": n.label, "@_typeRef": n.typeRef, "@_outputLabel": n.outputLabel, "@_preferredOrientation": Bn(n.preferredOrientation), "@_hitPolicy": n.hitPolicy === e.Unique ? undefined : n.hitPolicy, "@_aggregation": n.hitPolicy === e.Collect ? n.aggregation : undefined, input: n.inputs.map((s2) => {
582
+ let a = t2.get(s2.id);
583
+ return { ...a, "@_id": s2.id, "@_label": s2.label, inputExpression: { ...a?.inputExpression, "@_id": s2.expressionId, "@_typeRef": s2.typeRef, text: x2(a?.inputExpression.text, s2.expressionText) }, inputValues: nn(a?.inputValues, s2.allowedValues) };
584
+ }), output: n.outputs.map((s2) => {
585
+ let a = i.get(s2.id);
586
+ return { ...a, "@_id": s2.id, "@_label": s2.label, "@_name": s2.name, "@_typeRef": s2.typeRef, description: s2.description ? x2(a?.description, s2.description) : undefined, outputValues: nn(a?.outputValues, s2.allowedValues) };
587
+ }), annotation: r ? undefined : n.annotations.map((s2, a) => ({ ...e2.annotation?.[a], "@_name": s2.name })), rule: n.rules.map((s2) => {
588
+ let a = o.get(s2.id), l = new Map(a?.inputEntry?.map((c) => [c["@_id"], c]) ?? []), f = new Map(a?.outputEntry.map((c) => [c["@_id"], c]) ?? []);
589
+ return { ...a, "@_id": s2.id, description: s2.description === undefined ? undefined : x2(a?.description, s2.description), inputEntry: s2.inputEntries.map((c) => {
549
590
  let u = l.get(c.id);
550
- return { ...u, "@_id": c.id, text: x(u?.text, c.text) };
551
- }), outputEntry: s.outputEntries.map((c) => {
591
+ return { ...u, "@_id": c.id, text: x2(u?.text, c.text) };
592
+ }), outputEntry: s2.outputEntries.map((c) => {
552
593
  let u = f.get(c.id);
553
- return { ...u, "@_id": c.id, text: x(u?.text, jn(c.text)) };
554
- }), annotationEntry: r ? undefined : s.annotationEntries.map((c, u) => ({ ...a?.annotationEntry?.[u], text: x(a?.annotationEntry?.[u]?.text, c) })) };
594
+ return { ...u, "@_id": c.id, text: x2(u?.text, jn(c.text)) };
595
+ }), annotationEntry: r ? undefined : s2.annotationEntries.map((c, u) => ({ ...a?.annotationEntry?.[u], text: x2(a?.annotationEntry?.[u]?.text, c) })) };
555
596
  }) };
556
597
  }
557
598
  function Fn(e2, n) {
558
599
  let r = e2.expression?.__$$element === "decisionTable" ? e2.expression : undefined;
559
600
  if (!r)
560
601
  throw new Error("Business rule decision table is missing");
561
- return { ...e2, __$$element: "decision", "@_id": n.decision.id, "@_name": n.decision.name, "@_label": n.decision.label, description: n.decision.description === undefined ? undefined : x(e2.description, n.decision.description), question: n.decision.question === undefined ? undefined : x(e2.question, n.decision.question), allowedAnswers: n.decision.allowedAnswers === undefined ? undefined : x(e2.allowedAnswers, n.decision.allowedAnswers), variable: H(e2, n.decision), informationRequirement: K2(e2, n, () => kn(n)), expression: Un(r, n.decision.decisionTable) };
602
+ return { ...e2, __$$element: "decision", "@_id": n.decision.id, "@_name": n.decision.name, "@_label": n.decision.label, description: n.decision.description === undefined ? undefined : x2(e2.description, n.decision.description), question: n.decision.question === undefined ? undefined : x2(e2.question, n.decision.question), allowedAnswers: n.decision.allowedAnswers === undefined ? undefined : x2(e2.allowedAnswers, n.decision.allowedAnswers), variable: H(e2, n.decision), informationRequirement: K2(e2, n, () => kn(n)), expression: Un(r, n.decision.decisionTable) };
562
603
  }
563
604
  var jn = (e2) => e2.trim() ? e2 : S;
564
605
  var zn = (e2) => re(e2) ? "" : e2;
@@ -575,20 +616,20 @@ function Kn(e2, n) {
575
616
  let i = R(r), o = r.drgElement?.filter((c) => c.__$$element === "inputData") ?? [];
576
617
  if (!t2 && (i.length !== 1 || i.length + o.length !== (r.drgElement?.length ?? 0)))
577
618
  return;
578
- let s = t2 ? i.find((c) => _(c) === n) : i[0];
579
- if (!s || !F(s))
619
+ let s2 = t2 ? i.find((c) => _2(c) === n) : i[0];
620
+ if (!s2 || !F(s2))
580
621
  return;
581
- let a = new Set(o.map(_)), l = new Set;
582
- if (!t2 && (s.knowledgeRequirement?.length || s.authorityRequirement?.length) || s.informationRequirement?.some((c) => {
622
+ let a = new Set(o.map(_2)), l = new Set;
623
+ if (!t2 && (s2.knowledgeRequirement?.length || s2.authorityRequirement?.length) || s2.informationRequirement?.some((c) => {
583
624
  if (c.requiredDecision)
584
625
  return !t2;
585
- let u = $(c.requiredInput?.["@_href"]);
626
+ let u = $2(c.requiredInput?.["@_href"]);
586
627
  return !u || !a.has(u) || l.has(u) ? true : (l.add(u), false);
587
628
  }))
588
629
  return;
589
- let f = s.expression?.__$$element === "literalExpression" ? s.expression : undefined;
630
+ let f = s2.expression?.__$$element === "literalExpression" ? s2.expression : undefined;
590
631
  if (f && f.importedValues === undefined && !N(f["@_expressionLanguage"]))
591
- return { definitions: r, decision: s, expression: f, inputData: o, scopeVariables: j2(r, s) };
632
+ return { definitions: r, decision: s2, expression: f, inputData: o, scopeVariables: j2(r, s2) };
592
633
  }
593
634
  function Gn(e2, n) {
594
635
  let r = Kn(e2, n);
@@ -602,13 +643,13 @@ function Wn(e2, n) {
602
643
  return t2 ? { document: r, model: t2, sourceDecisionId: t2.decision.id, sourceInputDataIds: t2.inputData.map((i) => i.id) } : undefined;
603
644
  }
604
645
  function Yn(e2, n) {
605
- return { ...e2, "@_id": n.id, "@_label": n.label, "@_typeRef": n.typeRef, "@_expressionLanguage": n.expressionLanguage, text: x(e2.text, n.text) };
646
+ return { ...e2, "@_id": n.id, "@_label": n.label, "@_typeRef": n.typeRef, "@_expressionLanguage": n.expressionLanguage, text: x2(e2.text, n.text) };
606
647
  }
607
648
  function Xn(e2, n) {
608
649
  let r = e2.expression?.__$$element === "literalExpression" ? e2.expression : undefined;
609
650
  if (!r)
610
651
  throw new Error("Business rule literal expression is missing");
611
- return { ...e2, __$$element: "decision", "@_id": n.decision.id, "@_name": n.decision.name, "@_label": n.decision.label, description: n.decision.description === undefined ? undefined : x(e2.description, n.decision.description), question: n.decision.question === undefined ? undefined : x(e2.question, n.decision.question), allowedAnswers: n.decision.allowedAnswers === undefined ? undefined : x(e2.allowedAnswers, n.decision.allowedAnswers), variable: H(e2, n.decision), informationRequirement: K2(e2, n, () => A2([[n.decision.literalExpression.text, "expression"]])), expression: Yn(r, n.decision.literalExpression) };
652
+ return { ...e2, __$$element: "decision", "@_id": n.decision.id, "@_name": n.decision.name, "@_label": n.decision.label, description: n.decision.description === undefined ? undefined : x2(e2.description, n.decision.description), question: n.decision.question === undefined ? undefined : x2(e2.question, n.decision.question), allowedAnswers: n.decision.allowedAnswers === undefined ? undefined : x2(e2.allowedAnswers, n.decision.allowedAnswers), variable: H(e2, n.decision), informationRequirement: K2(e2, n, () => A2([[n.decision.literalExpression.text, "expression"]])), expression: Yn(r, n.decision.literalExpression) };
612
653
  }
613
654
  function Zn(e2) {
614
655
  if (e2.inputData.every((t2) => t2.requirementId))
@@ -683,8 +724,12 @@ async function tt(e2, n = {}) {
683
724
  return console.error("DMN: could not project a well-formed document", i), { kind: "unsupported", reason: "invalid-xml" };
684
725
  }
685
726
  }
727
+ async function Wt(e2, n = {}) {
728
+ let r = await tt(e2, n);
729
+ return P = { xml: e2, allowDrdDocuments: !!n.allowDrdDocuments, result: r }, { supported: r.kind !== "unsupported" };
730
+ }
686
731
  function it(e2, n, r) {
687
- let t2 = R(e2.definitions).find((i) => _(i) === n);
732
+ let t2 = R(e2.definitions).find((i) => _2(i) === n);
688
733
  t2 && je(e2, t2) && He(e2, t2, r);
689
734
  }
690
735
  function Yt(e2) {
@@ -704,6 +749,6 @@ function Qt(e2, n, r = "decision-table") {
704
749
  return Fe(t2) && ze(t2, r), it(t2, e2.decision.id, "decision-table"), { document: t2, xml: hs(t2) };
705
750
  }
706
751
 
707
- export { R, _, $, tt, Yt, Xt, Zt, Qt };
752
+ export { an, at, R, _2 as _, $2 as $, tt, Wt, Yt, Xt, Zt, Qt };
708
753
 
709
- //# debugId=12D4C079D1D7CE1C64756E2164756E21
754
+ //# debugId=CC70D3EE5D8623A664756E2164756E21
@@ -18,7 +18,7 @@ var __toESM = (mod, isNodeMode, target) => {
18
18
  return cached;
19
19
  }
20
20
  target = mod != null ? __create(__getProtoOf(mod)) : {};
21
- const to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
21
+ const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
22
22
  if (mod && typeof mod === "object" || typeof mod === "function") {
23
23
  for (let key of __getOwnPropNames(mod))
24
24
  if (!__hasOwnProp.call(to, key))
@@ -32,17 +32,8 @@ var __toESM = (mod, isNodeMode, target) => {
32
32
  return to;
33
33
  };
34
34
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
35
- var __exportCjs = (target, getters, setters) => {
36
- for (var name in getters)
37
- __defProp(target, name, {
38
- get: getters[name],
39
- set: setters[name],
40
- enumerable: true,
41
- configurable: true
42
- });
43
- };
44
35
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
45
36
 
46
- export { __toESM, __commonJS, __exportCjs, __require };
37
+ export { __toESM, __commonJS, __require };
47
38
 
48
- //# debugId=6692E9B4C735B07364756E2164756E21
39
+ //# debugId=4A15A0D6FCDB684764756E2164756E21