@uipath/rules-tool 1.205.0-preview.281 → 1.206.0-preview.282
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.
- package/dist/DmnFactory-L7MABUC6-q2sr3grz.js +10 -0
- package/dist/DmnModelTypes-ATR7FVKZ-h8srwcxk.js +8 -0
- package/dist/KieDmnMarshaller-LGE63WDG-nfkpv8f4.js +8 -0
- package/dist/THIRD-PARTY-NOTICES.md +4 -4
- package/dist/business-rules-z2zw35qd.js +25 -0
- package/dist/{constants-cnn0jfw6.js → constants-1sdwfz26.js} +7 -15
- package/dist/{embedded-file-reader-z4becc02.js → embedded-file-reader-0228j82a.js} +1 -4
- package/dist/first-party-service-hegqxm82.js +8 -0
- package/dist/hitPolicyResult-CGCR73CW-jz89f1aa.js +12 -0
- package/dist/index-4a4x1ygg.js +24 -0
- package/dist/{index-52h8rpew.js → index-egzwtc07.js} +2 -4
- package/dist/{index-sby22td6.js → index-nzr4mx5p.js} +2 -22
- package/dist/index-xaxgkfez.js +23 -0
- package/dist/{tool-tjcg2xje.js → index-y5yffb2s.js} +3525 -236
- package/dist/index-z4kt2kt6.js +8 -0
- package/dist/{index-bhjt1h5c.js → index-zeszs1ra.js} +23 -66
- package/dist/index.js +8 -9
- package/dist/{jmespath-231m3hyn.js → jmespath-ab6tdc42.js} +1 -1
- package/dist/{js-yaml-88tdqrtd.js → js-yaml-a2bk27p6.js} +1 -3
- package/dist/rule-catalog-5qnmp0xp.js +71 -0
- package/dist/rules-command-error-30c8a3n9.js +13 -0
- package/dist/{rules-debug-service-02zf7t4e.js → rules-debug-service-jf46j5g6.js} +37 -38
- package/dist/{rules-init-service-f990fgeb.js → rules-init-service-skes439c.js} +12 -16
- package/dist/{rules-refresh-service-jn6my893.js → rules-refresh-service-18hrs394.js} +13 -14
- package/dist/{rules-validate-service-hfw8m3dm.js → rules-validate-service-s787ehrr.js} +10 -13
- package/dist/{tool-f04pwp3c.js → tool-5exp6zh7.js} +659 -14
- package/dist/{tool-fk8rznma.js → tool-89e90qrm.js} +173 -223
- package/dist/{tool-fbxe48wd.js → tool-8cnhz30a.js} +13991 -15184
- package/dist/{tool-h7gn1rar.js → tool-93hqhaj3.js} +402 -417
- package/dist/{tool-wf2qkrye.js → tool-cs8nyk0r.js} +990 -514
- package/dist/{tool-txp5th7j.js → tool-e23cj2jx.js} +127 -42
- package/dist/{tool-1de529jm.js → tool-epsr41wx.js} +12 -3
- package/dist/{tool-gkbr01gc.js → tool-fkppxa9f.js} +14 -17
- package/dist/{tool-5hek0atf.js → tool-k55fs9aj.js} +32 -34
- package/dist/{tool-86f1xpxn.js → tool-m59a481n.js} +18 -20
- package/dist/tool-mst6a4dr.js +73 -0
- package/dist/{tool-t4k013ex.js → tool-njnhj05q.js} +8 -8
- package/dist/tool-p7hqn93n.js +455 -0
- package/dist/{tool-z1ay3csx.js → tool-sbtf80ft.js} +66 -24
- package/dist/{tool-yq5jph4h.js → tool-vqm4apm6.js} +207 -216
- package/dist/tool.js +7 -8
- package/package.json +2 -2
- package/dist/DmnFactory-L7MABUC6-98k17dkr.js +0 -46
- package/dist/DmnModelTypes-ATR7FVKZ-jp35cecy.js +0 -18
- package/dist/KieDmnMarshaller-LGE63WDG-3vemswef.js +0 -20
- package/dist/business-rules-pm96sefm.js +0 -26
- package/dist/first-party-service-sd8yaf73.js +0 -27
- package/dist/hitPolicyResult-CGCR73CW-9bmc4nsr.js +0 -36
- package/dist/index-cpm94vee.js +0 -132
- package/dist/index-dqa169gp.js +0 -25
- package/dist/index-x9msn1dj.js +0 -85
- package/dist/index-ybrgtfsg.js +0 -3326
- package/dist/rule-catalog-10fhgevc.js +0 -74
- package/dist/rules-command-error-k6kxwfn7.js +0 -14
- package/dist/tool-1pccj6q3.js +0 -1116
- package/dist/tool-53w8skv5.js +0 -262
- package/dist/tool-7haj67tr.js +0 -19
- package/dist/tool-fbmxx07c.js +0 -73
- package/dist/tool-gdtpsdn7.js +0 -342
- package/dist/tool-jd313s2x.js +0 -10
- package/dist/tool-qgqscsjc.js +0 -46
- /package/dist/{tool-cfrcyxgm.js → tool-2nmqvfmt.js} +0 -0
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
+
e,
|
|
2
3
|
v4_default
|
|
3
|
-
} from "./tool-
|
|
4
|
-
import {
|
|
5
|
-
e
|
|
6
|
-
} from "./tool-jd313s2x.js";
|
|
4
|
+
} from "./tool-sbtf80ft.js";
|
|
7
5
|
|
|
8
6
|
// ../../node_modules/@lezer/common/dist/index.js
|
|
9
7
|
var DefaultBufferLength = 1024;
|
|
@@ -154,12 +152,12 @@ class NodeSet {
|
|
|
154
152
|
var CachedNode = new WeakMap;
|
|
155
153
|
var CachedInnerNode = new WeakMap;
|
|
156
154
|
var IterMode;
|
|
157
|
-
(function(
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
155
|
+
(function(IterMode) {
|
|
156
|
+
IterMode[IterMode["ExcludeBuffers"] = 1] = "ExcludeBuffers";
|
|
157
|
+
IterMode[IterMode["IncludeAnonymous"] = 2] = "IncludeAnonymous";
|
|
158
|
+
IterMode[IterMode["IgnoreMounts"] = 4] = "IgnoreMounts";
|
|
159
|
+
IterMode[IterMode["IgnoreOverlays"] = 8] = "IgnoreOverlays";
|
|
160
|
+
IterMode[IterMode["EnterBracketed"] = 16] = "EnterBracketed";
|
|
163
161
|
})(IterMode || (IterMode = {}));
|
|
164
162
|
|
|
165
163
|
class Tree {
|
|
@@ -440,7 +438,7 @@ class TreeNode extends BaseNode {
|
|
|
440
438
|
}
|
|
441
439
|
nextChild(i, dir, pos, side, mode = 0) {
|
|
442
440
|
for (let parent = this;; ) {
|
|
443
|
-
for (let { children, positions } = parent._tree,
|
|
441
|
+
for (let { children, positions } = parent._tree, e = dir > 0 ? children.length : -1;i != e; i += dir) {
|
|
444
442
|
let next = children[i], start = positions[i] + parent.from, mounted;
|
|
445
443
|
if (!(mode & IterMode.EnterBracketed && next instanceof Tree && (mounted = MountedTree.get(next)) && !mounted.overlay && mounted.bracketed && pos >= start && pos <= start + next.length) && !checkSide(side, pos, start, start + next.length))
|
|
446
444
|
continue;
|
|
@@ -451,9 +449,9 @@ class TreeNode extends BaseNode {
|
|
|
451
449
|
if (index > -1)
|
|
452
450
|
return new BufferNode(new BufferContext(parent, next, i, start), null, index);
|
|
453
451
|
} else if (mode & IterMode.IncludeAnonymous || (!next.type.isAnonymous || hasChild(next))) {
|
|
454
|
-
let
|
|
455
|
-
if (!(mode & IterMode.IgnoreMounts) && (
|
|
456
|
-
return new TreeNode(
|
|
452
|
+
let mounted;
|
|
453
|
+
if (!(mode & IterMode.IgnoreMounts) && (mounted = MountedTree.get(next)) && !mounted.overlay)
|
|
454
|
+
return new TreeNode(mounted.tree, start, i, parent);
|
|
457
455
|
let inner = new TreeNode(next, start, i, parent);
|
|
458
456
|
return mode & IterMode.IncludeAnonymous || !inner.type.isAnonymous ? inner : inner.nextChild(dir < 0 ? next.children.length - 1 : 0, dir, pos, side, mode);
|
|
459
457
|
}
|
|
@@ -815,7 +813,7 @@ class TreeCursor {
|
|
|
815
813
|
}
|
|
816
814
|
for (;parent; { index, _parent: parent } = parent) {
|
|
817
815
|
if (index > -1)
|
|
818
|
-
for (let i = index + dir,
|
|
816
|
+
for (let i = index + dir, e = dir < 0 ? -1 : parent._tree.children.length;i != e; i += dir) {
|
|
819
817
|
let child = parent._tree.children[i];
|
|
820
818
|
if (this.mode & IterMode.IncludeAnonymous || child instanceof TreeBuffer || !child.type.isAnonymous || hasChild(child))
|
|
821
819
|
return false;
|
|
@@ -922,15 +920,15 @@ function buildTree(data) {
|
|
|
922
920
|
let cursor = Array.isArray(buffer) ? new FlatBufferCursor(buffer, buffer.length) : buffer;
|
|
923
921
|
let types = nodeSet.types;
|
|
924
922
|
let contextHash = 0, lookAhead = 0;
|
|
925
|
-
function takeNode(parentStart, minPos,
|
|
923
|
+
function takeNode(parentStart, minPos, children, positions, inRepeat, depth) {
|
|
926
924
|
let { id, start, end, size } = cursor;
|
|
927
925
|
let lookAheadAtStart = lookAhead, contextAtStart = contextHash;
|
|
928
926
|
if (size < 0) {
|
|
929
927
|
cursor.next();
|
|
930
928
|
if (size == -1) {
|
|
931
|
-
let
|
|
932
|
-
|
|
933
|
-
|
|
929
|
+
let node = reused[id];
|
|
930
|
+
children.push(node);
|
|
931
|
+
positions.push(start - parentStart);
|
|
934
932
|
return;
|
|
935
933
|
} else if (size == -3) {
|
|
936
934
|
contextHash = id;
|
|
@@ -942,15 +940,15 @@ function buildTree(data) {
|
|
|
942
940
|
throw new RangeError(`Unrecognized record size: ${size}`);
|
|
943
941
|
}
|
|
944
942
|
}
|
|
945
|
-
let type = types[id], node,
|
|
943
|
+
let type = types[id], node, buffer;
|
|
946
944
|
let startPos = start - parentStart;
|
|
947
|
-
if (end - start <= maxBufferLength && (
|
|
948
|
-
let
|
|
949
|
-
let endPos = cursor.pos -
|
|
945
|
+
if (end - start <= maxBufferLength && (buffer = findBufferSize(cursor.pos - minPos, inRepeat))) {
|
|
946
|
+
let data = new Uint16Array(buffer.size - buffer.skip);
|
|
947
|
+
let endPos = cursor.pos - buffer.size, index = data.length;
|
|
950
948
|
while (cursor.pos > endPos)
|
|
951
|
-
index = copyToBuffer(
|
|
952
|
-
node = new TreeBuffer(
|
|
953
|
-
startPos =
|
|
949
|
+
index = copyToBuffer(buffer.start, data, index);
|
|
950
|
+
node = new TreeBuffer(data, end - buffer.start, nodeSet);
|
|
951
|
+
startPos = buffer.start - parentStart;
|
|
954
952
|
} else {
|
|
955
953
|
let endPos = cursor.pos - size;
|
|
956
954
|
cursor.next();
|
|
@@ -982,10 +980,10 @@ function buildTree(data) {
|
|
|
982
980
|
node = makeTree(type, localChildren, localPositions, end - start, lookAheadAtStart - end, contextAtStart);
|
|
983
981
|
}
|
|
984
982
|
}
|
|
985
|
-
|
|
986
|
-
|
|
983
|
+
children.push(node);
|
|
984
|
+
positions.push(startPos);
|
|
987
985
|
}
|
|
988
|
-
function takeFlatNode(parentStart, minPos,
|
|
986
|
+
function takeFlatNode(parentStart, minPos, children, positions) {
|
|
989
987
|
let nodes = [];
|
|
990
988
|
let nodeCount = 0, stopAt = -1;
|
|
991
989
|
while (cursor.pos > minPos) {
|
|
@@ -1003,49 +1001,49 @@ function buildTree(data) {
|
|
|
1003
1001
|
}
|
|
1004
1002
|
}
|
|
1005
1003
|
if (nodeCount) {
|
|
1006
|
-
let
|
|
1004
|
+
let buffer = new Uint16Array(nodeCount * 4);
|
|
1007
1005
|
let start = nodes[nodes.length - 2];
|
|
1008
1006
|
for (let i = nodes.length - 3, j = 0;i >= 0; i -= 3) {
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1007
|
+
buffer[j++] = nodes[i];
|
|
1008
|
+
buffer[j++] = nodes[i + 1] - start;
|
|
1009
|
+
buffer[j++] = nodes[i + 2] - start;
|
|
1010
|
+
buffer[j++] = j;
|
|
1013
1011
|
}
|
|
1014
|
-
|
|
1015
|
-
|
|
1012
|
+
children.push(new TreeBuffer(buffer, nodes[2] - start, nodeSet));
|
|
1013
|
+
positions.push(start - parentStart);
|
|
1016
1014
|
}
|
|
1017
1015
|
}
|
|
1018
|
-
function makeBalanced(type,
|
|
1019
|
-
return (
|
|
1020
|
-
let
|
|
1021
|
-
if (lastI >= 0 && (last =
|
|
1022
|
-
if (!lastI && last.type == type && last.length ==
|
|
1016
|
+
function makeBalanced(type, contextHash) {
|
|
1017
|
+
return (children, positions, length) => {
|
|
1018
|
+
let lookAhead = 0, lastI = children.length - 1, last, lookAheadProp;
|
|
1019
|
+
if (lastI >= 0 && (last = children[lastI]) instanceof Tree) {
|
|
1020
|
+
if (!lastI && last.type == type && last.length == length)
|
|
1023
1021
|
return last;
|
|
1024
1022
|
if (lookAheadProp = last.prop(NodeProp.lookAhead))
|
|
1025
|
-
|
|
1023
|
+
lookAhead = positions[lastI] + last.length + lookAheadProp;
|
|
1026
1024
|
}
|
|
1027
|
-
return makeTree(type,
|
|
1025
|
+
return makeTree(type, children, positions, length, lookAhead, contextHash);
|
|
1028
1026
|
};
|
|
1029
1027
|
}
|
|
1030
|
-
function makeRepeatLeaf(
|
|
1028
|
+
function makeRepeatLeaf(children, positions, base, i, from, to, type, lookAhead, contextHash) {
|
|
1031
1029
|
let localChildren = [], localPositions = [];
|
|
1032
|
-
while (
|
|
1033
|
-
localChildren.push(
|
|
1034
|
-
localPositions.push(
|
|
1030
|
+
while (children.length > i) {
|
|
1031
|
+
localChildren.push(children.pop());
|
|
1032
|
+
localPositions.push(positions.pop() + base - from);
|
|
1035
1033
|
}
|
|
1036
|
-
|
|
1037
|
-
|
|
1034
|
+
children.push(makeTree(nodeSet.types[type], localChildren, localPositions, to - from, lookAhead - to, contextHash));
|
|
1035
|
+
positions.push(from - base);
|
|
1038
1036
|
}
|
|
1039
|
-
function makeTree(type,
|
|
1040
|
-
if (
|
|
1041
|
-
let pair = [NodeProp.contextHash,
|
|
1037
|
+
function makeTree(type, children, positions, length, lookAhead, contextHash, props) {
|
|
1038
|
+
if (contextHash) {
|
|
1039
|
+
let pair = [NodeProp.contextHash, contextHash];
|
|
1042
1040
|
props = props ? [pair].concat(props) : [pair];
|
|
1043
1041
|
}
|
|
1044
|
-
if (
|
|
1045
|
-
let pair = [NodeProp.lookAhead,
|
|
1042
|
+
if (lookAhead > 25) {
|
|
1043
|
+
let pair = [NodeProp.lookAhead, lookAhead];
|
|
1046
1044
|
props = props ? [pair].concat(props) : [pair];
|
|
1047
1045
|
}
|
|
1048
|
-
return new Tree(type,
|
|
1046
|
+
return new Tree(type, children, positions, length, props);
|
|
1049
1047
|
}
|
|
1050
1048
|
function findBufferSize(maxSize, inRepeat) {
|
|
1051
1049
|
let fork = cursor.fork();
|
|
@@ -1091,7 +1089,7 @@ function buildTree(data) {
|
|
|
1091
1089
|
}
|
|
1092
1090
|
return result.size > 4 ? result : undefined;
|
|
1093
1091
|
}
|
|
1094
|
-
function copyToBuffer(bufferStart,
|
|
1092
|
+
function copyToBuffer(bufferStart, buffer, index) {
|
|
1095
1093
|
let { id, start, end, size } = cursor;
|
|
1096
1094
|
cursor.next();
|
|
1097
1095
|
if (size >= 0 && id < minRepeatType) {
|
|
@@ -1099,12 +1097,12 @@ function buildTree(data) {
|
|
|
1099
1097
|
if (size > 4) {
|
|
1100
1098
|
let endPos = cursor.pos - (size - 4);
|
|
1101
1099
|
while (cursor.pos > endPos)
|
|
1102
|
-
index = copyToBuffer(bufferStart,
|
|
1100
|
+
index = copyToBuffer(bufferStart, buffer, index);
|
|
1103
1101
|
}
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1102
|
+
buffer[--index] = startIndex;
|
|
1103
|
+
buffer[--index] = end - bufferStart;
|
|
1104
|
+
buffer[--index] = start - bufferStart;
|
|
1105
|
+
buffer[--index] = id;
|
|
1108
1106
|
} else if (size == -3) {
|
|
1109
1107
|
contextHash = id;
|
|
1110
1108
|
} else if (size == -4) {
|
|
@@ -1142,26 +1140,26 @@ function balanceRange(balanceType, children, positions, from, to, start, length,
|
|
|
1142
1140
|
total += nodeSize(balanceType, children[i]);
|
|
1143
1141
|
let maxChild = Math.ceil(total * 1.5 / 8);
|
|
1144
1142
|
let localChildren = [], localPositions = [];
|
|
1145
|
-
function divide(
|
|
1146
|
-
for (let i =
|
|
1147
|
-
let groupFrom = i, groupStart =
|
|
1143
|
+
function divide(children, positions, from, to, offset) {
|
|
1144
|
+
for (let i = from;i < to; ) {
|
|
1145
|
+
let groupFrom = i, groupStart = positions[i], groupSize = nodeSize(balanceType, children[i]);
|
|
1148
1146
|
i++;
|
|
1149
|
-
for (;i <
|
|
1150
|
-
let nextSize = nodeSize(balanceType,
|
|
1147
|
+
for (;i < to; i++) {
|
|
1148
|
+
let nextSize = nodeSize(balanceType, children[i]);
|
|
1151
1149
|
if (groupSize + nextSize >= maxChild)
|
|
1152
1150
|
break;
|
|
1153
1151
|
groupSize += nextSize;
|
|
1154
1152
|
}
|
|
1155
1153
|
if (i == groupFrom + 1) {
|
|
1156
1154
|
if (groupSize > maxChild) {
|
|
1157
|
-
let only =
|
|
1158
|
-
divide(only.children, only.positions, 0, only.children.length,
|
|
1155
|
+
let only = children[groupFrom];
|
|
1156
|
+
divide(only.children, only.positions, 0, only.children.length, positions[groupFrom] + offset);
|
|
1159
1157
|
continue;
|
|
1160
1158
|
}
|
|
1161
|
-
localChildren.push(
|
|
1159
|
+
localChildren.push(children[groupFrom]);
|
|
1162
1160
|
} else {
|
|
1163
|
-
let
|
|
1164
|
-
localChildren.push(balanceRange(balanceType,
|
|
1161
|
+
let length = positions[i - 1] + children[i - 1].length - groupStart;
|
|
1162
|
+
localChildren.push(balanceRange(balanceType, children, positions, groupFrom, i, groupStart, length, null, mkTree));
|
|
1165
1163
|
}
|
|
1166
1164
|
localPositions.push(groupStart + offset - start);
|
|
1167
1165
|
}
|
|
@@ -1404,7 +1402,7 @@ class Stack {
|
|
|
1404
1402
|
if (this.stack.length < 120)
|
|
1405
1403
|
for (let i = 0;best.length < 4 << 1 && i < nextStates.length; i += 2) {
|
|
1406
1404
|
let s = nextStates[i + 1];
|
|
1407
|
-
if (!best.some((v,
|
|
1405
|
+
if (!best.some((v, i) => i & 1 && v == s))
|
|
1408
1406
|
best.push(nextStates[i], s);
|
|
1409
1407
|
}
|
|
1410
1408
|
nextStates = best;
|
|
@@ -2567,7 +2565,7 @@ class LRParser extends Parser {
|
|
|
2567
2565
|
}
|
|
2568
2566
|
if ((this.data[i + 2] & 65536 >> 16) == 0) {
|
|
2569
2567
|
let value = this.data[i + 1];
|
|
2570
|
-
if (!result.some((v,
|
|
2568
|
+
if (!result.some((v, i) => i & 1 && v == value))
|
|
2571
2569
|
result.push(this.data[i], value);
|
|
2572
2570
|
}
|
|
2573
2571
|
}
|
|
@@ -2631,15 +2629,15 @@ class LRParser extends Parser {
|
|
|
2631
2629
|
let values = Object.keys(this.dialects), flags = values.map(() => false);
|
|
2632
2630
|
if (dialect)
|
|
2633
2631
|
for (let part of dialect.split(" ")) {
|
|
2634
|
-
let
|
|
2635
|
-
if (
|
|
2636
|
-
flags[
|
|
2632
|
+
let id = values.indexOf(part);
|
|
2633
|
+
if (id >= 0)
|
|
2634
|
+
flags[id] = true;
|
|
2637
2635
|
}
|
|
2638
2636
|
let disabled = null;
|
|
2639
2637
|
for (let i = 0;i < values.length; i++)
|
|
2640
2638
|
if (!flags[i]) {
|
|
2641
|
-
for (let j = this.dialects[values[i]],
|
|
2642
|
-
(disabled || (disabled = new Uint8Array(this.maxTerm + 1)))[
|
|
2639
|
+
for (let j = this.dialects[values[i]], id;(id = this.data[j++]) != 65535; )
|
|
2640
|
+
(disabled || (disabled = new Uint8Array(this.maxTerm + 1)))[id] = 1;
|
|
2643
2641
|
}
|
|
2644
2642
|
return new Dialect(dialect, flags, disabled);
|
|
2645
2643
|
}
|
|
@@ -2747,7 +2745,7 @@ function sameArray(a, b) {
|
|
|
2747
2745
|
function powerSet(array) {
|
|
2748
2746
|
let sets = [[]];
|
|
2749
2747
|
for (let i = 0;i < array.length; i++) {
|
|
2750
|
-
for (let j = 0,
|
|
2748
|
+
for (let j = 0, e = sets.length;j < e; j++) {
|
|
2751
2749
|
sets.push(sets[j].concat(array[i]));
|
|
2752
2750
|
}
|
|
2753
2751
|
}
|
|
@@ -2853,9 +2851,9 @@ function tagHighlighter(tags, options) {
|
|
|
2853
2851
|
}
|
|
2854
2852
|
let { scope, all = null } = options || {};
|
|
2855
2853
|
return {
|
|
2856
|
-
style: (
|
|
2854
|
+
style: (tags) => {
|
|
2857
2855
|
let cls = all;
|
|
2858
|
-
for (let tag of
|
|
2856
|
+
for (let tag of tags) {
|
|
2859
2857
|
for (let sub of tag.set) {
|
|
2860
2858
|
let tagClass = map[sub.id];
|
|
2861
2859
|
if (tagClass) {
|
|
@@ -2970,10 +2968,10 @@ var tags = {
|
|
|
2970
2968
|
local: Tag.defineModifier("local"),
|
|
2971
2969
|
special: Tag.defineModifier("special")
|
|
2972
2970
|
};
|
|
2973
|
-
for (let
|
|
2974
|
-
let val = tags[
|
|
2971
|
+
for (let name in tags) {
|
|
2972
|
+
let val = tags[name];
|
|
2975
2973
|
if (val instanceof Tag)
|
|
2976
|
-
val.name =
|
|
2974
|
+
val.name = name;
|
|
2977
2975
|
}
|
|
2978
2976
|
var classHighlighter = tagHighlighter([
|
|
2979
2977
|
{ tag: tags.link, class: "tok-link" },
|
|
@@ -3122,17 +3120,17 @@ function parseAdditionalSymbol(input, offset = 0) {
|
|
|
3122
3120
|
return null;
|
|
3123
3121
|
}
|
|
3124
3122
|
function parseIdentifier(input, offset = 0, namePart = false) {
|
|
3125
|
-
for (let inside = false,
|
|
3123
|
+
for (let inside = false, chars = [], i = 0;; i++) {
|
|
3126
3124
|
const next = input.peek(offset + i);
|
|
3127
3125
|
if (isStartChar(next) || (inside || namePart) && isPartChar(next)) {
|
|
3128
3126
|
if (!inside) {
|
|
3129
3127
|
inside = true;
|
|
3130
3128
|
}
|
|
3131
|
-
|
|
3129
|
+
chars.push(next);
|
|
3132
3130
|
} else {
|
|
3133
|
-
if (
|
|
3131
|
+
if (chars.length) {
|
|
3134
3132
|
return {
|
|
3135
|
-
token: String.fromCharCode(...
|
|
3133
|
+
token: String.fromCharCode(...chars),
|
|
3136
3134
|
offset: i
|
|
3137
3135
|
};
|
|
3138
3136
|
}
|
|
@@ -3180,27 +3178,27 @@ function parseName(input, variables) {
|
|
|
3180
3178
|
continue;
|
|
3181
3179
|
}
|
|
3182
3180
|
tokens = [...tokens, token];
|
|
3183
|
-
const
|
|
3184
|
-
if (keys.has(
|
|
3185
|
-
const
|
|
3181
|
+
const name = [...start, ...tokens].join(" ");
|
|
3182
|
+
if (keys.has(name)) {
|
|
3183
|
+
const token = tokens[0];
|
|
3186
3184
|
nextMatch = {
|
|
3187
|
-
token
|
|
3188
|
-
offset:
|
|
3185
|
+
token,
|
|
3186
|
+
offset: token.length,
|
|
3189
3187
|
term: nameIdentifier
|
|
3190
3188
|
};
|
|
3191
3189
|
}
|
|
3192
|
-
if (prefixes.has(
|
|
3190
|
+
if (prefixes.has(name)) {
|
|
3193
3191
|
continue;
|
|
3194
3192
|
}
|
|
3195
|
-
if (dateTimeIdentifiers.some((el) => el ===
|
|
3196
|
-
const
|
|
3193
|
+
if (dateTimeIdentifiers.some((el) => el === name)) {
|
|
3194
|
+
const token = tokens[0];
|
|
3197
3195
|
nextMatch = {
|
|
3198
|
-
token
|
|
3199
|
-
offset:
|
|
3196
|
+
token,
|
|
3197
|
+
offset: token.length,
|
|
3200
3198
|
term: identifier
|
|
3201
3199
|
};
|
|
3202
3200
|
}
|
|
3203
|
-
if (dateTimeIdentifiers.some((el) => el.startsWith(
|
|
3201
|
+
if (dateTimeIdentifiers.some((el) => el.startsWith(name))) {
|
|
3204
3202
|
continue;
|
|
3205
3203
|
}
|
|
3206
3204
|
return nextMatch;
|
|
@@ -3246,9 +3244,9 @@ var insertSemicolon = new ExternalTokenizer((input, stack) => {
|
|
|
3246
3244
|
break;
|
|
3247
3245
|
}
|
|
3248
3246
|
if (insert) {
|
|
3249
|
-
const
|
|
3247
|
+
const identifier = parseIdentifier(input, offset + 1);
|
|
3250
3248
|
const spaces = parseSpaces(input, offset + 1);
|
|
3251
|
-
if (spaces ||
|
|
3249
|
+
if (spaces || identifier && /^(then|else|return|satisfies)$/.test(identifier.token)) {
|
|
3252
3250
|
return;
|
|
3253
3251
|
}
|
|
3254
3252
|
LOG_PARSE && console.log("%s: MATCH <insertSemi>", input.pos);
|
|
@@ -3397,7 +3395,7 @@ class VariableContext {
|
|
|
3397
3395
|
|
|
3398
3396
|
class Variables {
|
|
3399
3397
|
constructor({
|
|
3400
|
-
name
|
|
3398
|
+
name = "Expressions",
|
|
3401
3399
|
tokens = [],
|
|
3402
3400
|
children = [],
|
|
3403
3401
|
parent = null,
|
|
@@ -3406,7 +3404,7 @@ class Variables {
|
|
|
3406
3404
|
raw,
|
|
3407
3405
|
__cache
|
|
3408
3406
|
}) {
|
|
3409
|
-
this.name =
|
|
3407
|
+
this.name = name;
|
|
3410
3408
|
this.tokens = tokens;
|
|
3411
3409
|
this.children = children;
|
|
3412
3410
|
this.parent = parent;
|
|
@@ -3429,9 +3427,9 @@ class Variables {
|
|
|
3429
3427
|
}
|
|
3430
3428
|
return root.__cache;
|
|
3431
3429
|
}
|
|
3432
|
-
enterScope(
|
|
3430
|
+
enterScope(name) {
|
|
3433
3431
|
const childScope = this.of({
|
|
3434
|
-
name
|
|
3432
|
+
name,
|
|
3435
3433
|
parent: this
|
|
3436
3434
|
});
|
|
3437
3435
|
LOG_VARS && console.log("[%s] enter", childScope.path, childScope.context);
|
|
@@ -3494,19 +3492,19 @@ class Variables {
|
|
|
3494
3492
|
return val;
|
|
3495
3493
|
}
|
|
3496
3494
|
}
|
|
3497
|
-
resolveName(
|
|
3495
|
+
resolveName(name) {
|
|
3498
3496
|
const variable = this.tokens.join(" ");
|
|
3499
3497
|
const tokens = [];
|
|
3500
3498
|
const parentScope = this.assign({
|
|
3501
3499
|
tokens
|
|
3502
3500
|
});
|
|
3503
3501
|
const variableScope = this.of({
|
|
3504
|
-
name
|
|
3502
|
+
name,
|
|
3505
3503
|
parent: parentScope,
|
|
3506
3504
|
value: this.get(variable),
|
|
3507
3505
|
raw: variable
|
|
3508
3506
|
});
|
|
3509
|
-
LOG_VARS && console.log("[%s] resolve %s <%s=%s>",
|
|
3507
|
+
LOG_VARS && console.log("[%s] resolve %s <%s=%s>", name, variableScope.path, variable, variableScope.value);
|
|
3510
3508
|
return parentScope.pushChild(variableScope);
|
|
3511
3509
|
}
|
|
3512
3510
|
pushChild(child) {
|
|
@@ -3539,16 +3537,16 @@ class Variables {
|
|
|
3539
3537
|
value: variableName
|
|
3540
3538
|
}));
|
|
3541
3539
|
}
|
|
3542
|
-
define(
|
|
3543
|
-
if (typeof
|
|
3544
|
-
LOG_VARS && console.log("[%s] no define <%s=%s>", this.path,
|
|
3540
|
+
define(name, value) {
|
|
3541
|
+
if (typeof name !== "string") {
|
|
3542
|
+
LOG_VARS && console.log("[%s] no define <%s=%s>", this.path, name, value);
|
|
3545
3543
|
return this;
|
|
3546
3544
|
}
|
|
3547
|
-
LOG_VARS && console.log("[%s] define <%s=%s>", this.path,
|
|
3545
|
+
LOG_VARS && console.log("[%s] define <%s=%s>", this.path, name, value);
|
|
3548
3546
|
const oldContext = this.context;
|
|
3549
|
-
const newContext = oldContext.set(
|
|
3547
|
+
const newContext = oldContext.set(name, value);
|
|
3550
3548
|
const oldCache = this.cache.get(oldContext) || computeContextCache(oldContext);
|
|
3551
|
-
const newCache = cacheKey(
|
|
3549
|
+
const newCache = cacheKey(name, createContextCache(oldCache));
|
|
3552
3550
|
this.cache.set(newContext, newCache);
|
|
3553
3551
|
return this.assign({
|
|
3554
3552
|
context: newContext
|
|
@@ -3572,7 +3570,7 @@ class Variables {
|
|
|
3572
3570
|
}
|
|
3573
3571
|
static of(options) {
|
|
3574
3572
|
const {
|
|
3575
|
-
name
|
|
3573
|
+
name,
|
|
3576
3574
|
tokens = [],
|
|
3577
3575
|
children = [],
|
|
3578
3576
|
parent = null,
|
|
@@ -3585,7 +3583,7 @@ class Variables {
|
|
|
3585
3583
|
throw new Error("must provide <context>");
|
|
3586
3584
|
}
|
|
3587
3585
|
return new Variables({
|
|
3588
|
-
name
|
|
3586
|
+
name,
|
|
3589
3587
|
tokens: [...tokens],
|
|
3590
3588
|
children: [...children],
|
|
3591
3589
|
context,
|
|
@@ -3596,23 +3594,23 @@ class Variables {
|
|
|
3596
3594
|
});
|
|
3597
3595
|
}
|
|
3598
3596
|
}
|
|
3599
|
-
function normalizeContextKey(
|
|
3600
|
-
return
|
|
3597
|
+
function normalizeContextKey(name) {
|
|
3598
|
+
return name.replace(/\s*([./\-'+]|\*\*?)\s*/g, " $1 ").replace(/\s{2,}/g, " ").trim();
|
|
3601
3599
|
}
|
|
3602
3600
|
function wrap(variables, scopeName, code) {
|
|
3603
3601
|
const parts = variables.children.filter((c) => c.name !== scopeName);
|
|
3604
3602
|
const children = variables.children.filter((c) => c.name === scopeName);
|
|
3605
3603
|
const namePart = parts[0];
|
|
3606
3604
|
const valuePart = parts[Math.max(1, parts.length - 1)];
|
|
3607
|
-
const
|
|
3605
|
+
const name = namePart?.computedValue();
|
|
3608
3606
|
const value = valuePart?.computedValue() ?? null;
|
|
3609
3607
|
return variables.assign({
|
|
3610
3608
|
children
|
|
3611
|
-
}).enterScope(scopeName).pushChildren(parts).exitScope(code).define(
|
|
3609
|
+
}).enterScope(scopeName).pushChildren(parts).exitScope(code).define(name, value);
|
|
3612
3610
|
}
|
|
3613
|
-
function trackVariables(context = {},
|
|
3611
|
+
function trackVariables(context = {}, Context = VariableContext) {
|
|
3614
3612
|
const start = Variables.of({
|
|
3615
|
-
context:
|
|
3613
|
+
context: Context.of(context)
|
|
3616
3614
|
});
|
|
3617
3615
|
return new ContextTracker({
|
|
3618
3616
|
start,
|
|
@@ -3620,12 +3618,12 @@ function trackVariables(context = {}, Context2 = VariableContext) {
|
|
|
3620
3618
|
if (term === IfExpression) {
|
|
3621
3619
|
const [thenPart, elsePart] = variables.children.slice(-2);
|
|
3622
3620
|
variables = variables.assign({
|
|
3623
|
-
value:
|
|
3621
|
+
value: Context.of(thenPart?.computedValue(), elsePart?.computedValue())
|
|
3624
3622
|
});
|
|
3625
3623
|
}
|
|
3626
3624
|
if (term === List) {
|
|
3627
3625
|
variables = variables.assign({
|
|
3628
|
-
value:
|
|
3626
|
+
value: Context.of(...variables.children.map((c) => c?.computedValue()))
|
|
3629
3627
|
});
|
|
3630
3628
|
}
|
|
3631
3629
|
if (term === FilterExpression) {
|
|
@@ -3636,20 +3634,20 @@ function trackVariables(context = {}, Context2 = VariableContext) {
|
|
|
3636
3634
|
}
|
|
3637
3635
|
if (term === FunctionInvocation) {
|
|
3638
3636
|
const [
|
|
3639
|
-
|
|
3637
|
+
name,
|
|
3640
3638
|
...args
|
|
3641
3639
|
] = variables.children;
|
|
3642
|
-
if (
|
|
3640
|
+
if (name?.raw === "get value") {
|
|
3643
3641
|
variables = getContextValue(variables, args);
|
|
3644
3642
|
} else {
|
|
3645
3643
|
variables = variables.assign({
|
|
3646
|
-
value:
|
|
3644
|
+
value: name?.computedValue() || Context.of(undefined)
|
|
3647
3645
|
});
|
|
3648
3646
|
}
|
|
3649
3647
|
}
|
|
3650
|
-
const
|
|
3651
|
-
if (
|
|
3652
|
-
return variables.enterScope(
|
|
3648
|
+
const start = contextStarts[term];
|
|
3649
|
+
if (start) {
|
|
3650
|
+
return variables.enterScope(start);
|
|
3653
3651
|
}
|
|
3654
3652
|
const prefixedStart = prefixedContextStarts[term];
|
|
3655
3653
|
if (prefixedStart) {
|
|
@@ -3661,10 +3659,10 @@ function trackVariables(context = {}, Context2 = VariableContext) {
|
|
|
3661
3659
|
const lastChild = last(currentChildren);
|
|
3662
3660
|
let newContext = null;
|
|
3663
3661
|
if (term === pathExpressionStart) {
|
|
3664
|
-
newContext =
|
|
3662
|
+
newContext = Context.of(lastChild?.computedValue());
|
|
3665
3663
|
}
|
|
3666
3664
|
if (term === filterExpressionStart) {
|
|
3667
|
-
newContext =
|
|
3665
|
+
newContext = Context.of(currentContext, lastChild?.computedValue()).set("item", lastChild?.computedValue());
|
|
3668
3666
|
}
|
|
3669
3667
|
return variables.assign({ children }).enterScope(prefixedStart).pushChild(lastChild).assign({ context: newContext || currentContext });
|
|
3670
3668
|
}
|
|
@@ -3675,23 +3673,23 @@ function trackVariables(context = {}, Context2 = VariableContext) {
|
|
|
3675
3673
|
}
|
|
3676
3674
|
if (term === ContextEntry) {
|
|
3677
3675
|
const parts = variables.children.filter((c) => c.name !== "ContextEntry");
|
|
3678
|
-
const
|
|
3676
|
+
const name = parts[0];
|
|
3679
3677
|
const value = last(parts);
|
|
3680
3678
|
return wrap(variables, "ContextEntry", code).assign({
|
|
3681
|
-
value:
|
|
3679
|
+
value: Context.of(variables.value).set(name?.computedValue(), value?.computedValue())
|
|
3682
3680
|
});
|
|
3683
3681
|
}
|
|
3684
3682
|
if (term === ForInExpression || term === QuantifiedInExpression) {
|
|
3685
3683
|
return wrap(variables, "InExpression", code);
|
|
3686
3684
|
}
|
|
3687
3685
|
if (term === forExpressionBodyStart) {
|
|
3688
|
-
return variables.define("partial", ValueProducer.of((
|
|
3689
|
-
return last(
|
|
3686
|
+
return variables.define("partial", ValueProducer.of((variables) => {
|
|
3687
|
+
return last(variables.children)?.computedValue();
|
|
3690
3688
|
}));
|
|
3691
3689
|
}
|
|
3692
3690
|
if (term === ParameterName) {
|
|
3693
|
-
const
|
|
3694
|
-
return variables.define(
|
|
3691
|
+
const name = last(variables.children).computedValue();
|
|
3692
|
+
return variables.define(name, 1);
|
|
3695
3693
|
}
|
|
3696
3694
|
if (term === arithmeticPlusStart || term === arithmeticTimesStart || term === arithmeticExpStart) {
|
|
3697
3695
|
const children = variables.children.slice(0, -1);
|
|
@@ -3770,18 +3768,18 @@ function getContextValue(variables, args) {
|
|
|
3770
3768
|
});
|
|
3771
3769
|
}
|
|
3772
3770
|
return variables.assign({
|
|
3773
|
-
value: [normalizeContextKey(keyValue), keyValue].reduce((value,
|
|
3774
|
-
return contextValue.get(
|
|
3771
|
+
value: [normalizeContextKey(keyValue), keyValue].reduce((value, keyValue) => {
|
|
3772
|
+
return contextValue.get(keyValue) || value;
|
|
3775
3773
|
}, null)
|
|
3776
3774
|
});
|
|
3777
3775
|
}
|
|
3778
3776
|
function extractNamedArgs(args, argNames) {
|
|
3779
3777
|
const context = {};
|
|
3780
3778
|
for (let i = 0;i < args.length; i += 2) {
|
|
3781
|
-
const [
|
|
3782
|
-
context[
|
|
3779
|
+
const [name, value] = args.slice(i, i + 2);
|
|
3780
|
+
context[name.value] = value;
|
|
3783
3781
|
}
|
|
3784
|
-
return argNames.map((
|
|
3782
|
+
return argNames.map((name) => context[name]);
|
|
3785
3783
|
}
|
|
3786
3784
|
function last(arr) {
|
|
3787
3785
|
return arr[arr.length - 1];
|
|
@@ -3844,176 +3842,176 @@ var parser = LRParser.deserialize({
|
|
|
3844
3842
|
|
|
3845
3843
|
// ../../node_modules/@uipath/dmn-editor-utils/dist/chunks/chunk-EXAD3CI5.js
|
|
3846
3844
|
var R = parser.configure({ top: "UnaryTests" });
|
|
3847
|
-
var c = (e2,
|
|
3845
|
+
var c = (e2, t) => (t === "unaryTests" ? R : parser).parse(e2);
|
|
3848
3846
|
var I = new Set(["StringLiteral", "NumericLiteral", "BooleanLiteral", "DateTimeLiteral", "null"]);
|
|
3849
3847
|
var oe = (e2) => {
|
|
3850
|
-
let
|
|
3851
|
-
if (!
|
|
3848
|
+
let t = e2.trim();
|
|
3849
|
+
if (!t)
|
|
3852
3850
|
return false;
|
|
3853
3851
|
let i = false;
|
|
3854
|
-
return c(
|
|
3855
|
-
r.from === 0 && r.to ===
|
|
3852
|
+
return c(t, "unaryTests").iterate({ enter(r) {
|
|
3853
|
+
r.from === 0 && r.to === t.length && I.has(r.name) && (i = true);
|
|
3856
3854
|
} }), i;
|
|
3857
3855
|
};
|
|
3858
|
-
var ae = (e2,
|
|
3856
|
+
var ae = (e2, t) => {
|
|
3859
3857
|
let i = false;
|
|
3860
|
-
return c(e2,
|
|
3858
|
+
return c(e2, t).iterate({ enter(r) {
|
|
3861
3859
|
i ||= r.type.isError;
|
|
3862
3860
|
} }), i;
|
|
3863
3861
|
};
|
|
3864
3862
|
var g = (e2) => e2.parent?.name === "FunctionInvocation" && e2.parent.firstChild?.from === e2.from;
|
|
3865
|
-
var P = (e2,
|
|
3863
|
+
var P = (e2, t, i) => {
|
|
3866
3864
|
for (let r = e2.parent;r; r = r.parent)
|
|
3867
3865
|
if (!(r.name !== "ForExpression" && r.name !== "QuantifiedExpression"))
|
|
3868
3866
|
for (let n = r.getChild("InExpressions")?.firstChild;n; n = n.nextSibling) {
|
|
3869
3867
|
let s = n.getChild("Name");
|
|
3870
|
-
if (s && e2.from >= n.to && i.slice(s.from, s.to) ===
|
|
3868
|
+
if (s && e2.from >= n.to && i.slice(s.from, s.to) === t)
|
|
3871
3869
|
return true;
|
|
3872
3870
|
}
|
|
3873
3871
|
return false;
|
|
3874
3872
|
};
|
|
3875
|
-
var C = (e2,
|
|
3873
|
+
var C = (e2, t, i) => {
|
|
3876
3874
|
for (let r = e2.parent;r; r = r.parent)
|
|
3877
3875
|
if (r.name === "FunctionDefinition")
|
|
3878
3876
|
for (let n = r.getChild("FormalParameters")?.firstChild;n; n = n.nextSibling) {
|
|
3879
3877
|
let s = n.getChild("ParameterName")?.getChild("Name");
|
|
3880
|
-
if (s && i.slice(s.from, s.to) ===
|
|
3878
|
+
if (s && i.slice(s.from, s.to) === t)
|
|
3881
3879
|
return true;
|
|
3882
3880
|
}
|
|
3883
3881
|
return false;
|
|
3884
3882
|
};
|
|
3885
|
-
var _ = (e2,
|
|
3883
|
+
var _ = (e2, t, i) => {
|
|
3886
3884
|
for (let r = e2.parent;r; r = r.parent)
|
|
3887
3885
|
if (r.name === "Context")
|
|
3888
3886
|
for (let n = r.firstChild;n; n = n.nextSibling) {
|
|
3889
3887
|
if (n.name !== "ContextEntry" || n.to > e2.from)
|
|
3890
3888
|
continue;
|
|
3891
3889
|
let s = n.getChild("Key")?.getChild("Name");
|
|
3892
|
-
if (s && i.slice(s.from, s.to) ===
|
|
3890
|
+
if (s && i.slice(s.from, s.to) === t)
|
|
3893
3891
|
return true;
|
|
3894
3892
|
}
|
|
3895
3893
|
return false;
|
|
3896
3894
|
};
|
|
3897
|
-
var M = (e2,
|
|
3895
|
+
var M = (e2, t, i) => P(e2, t, i) || C(e2, t, i) || _(e2, t, i);
|
|
3898
3896
|
var A = (e2) => {
|
|
3899
|
-
for (let
|
|
3900
|
-
if (
|
|
3897
|
+
for (let t = e2.parent;t; t = t.parent)
|
|
3898
|
+
if (t.name === "FilterExpression" && t.firstChild && e2.from >= t.firstChild.to)
|
|
3901
3899
|
return true;
|
|
3902
3900
|
return false;
|
|
3903
3901
|
};
|
|
3904
|
-
var u = (e2,
|
|
3905
|
-
c(e2,
|
|
3902
|
+
var u = (e2, t, i) => {
|
|
3903
|
+
c(e2, t).iterate({ enter(n) {
|
|
3906
3904
|
if (n.name !== "VariableName")
|
|
3907
3905
|
return;
|
|
3908
3906
|
let s = n.node, o = e2.slice(s.from, s.to);
|
|
3909
3907
|
g(s) || M(s, o, e2) || i(s, o);
|
|
3910
3908
|
} });
|
|
3911
3909
|
};
|
|
3912
|
-
var T = (e2,
|
|
3913
|
-
if (!e2 || !e2.includes(
|
|
3910
|
+
var T = (e2, t, i) => {
|
|
3911
|
+
if (!e2 || !e2.includes(t))
|
|
3914
3912
|
return [];
|
|
3915
3913
|
let r = [];
|
|
3916
3914
|
return u(e2, i, (n, s) => {
|
|
3917
|
-
s ===
|
|
3915
|
+
s === t && r.push({ from: n.from, to: n.to });
|
|
3918
3916
|
}), r;
|
|
3919
3917
|
};
|
|
3920
|
-
var w = (e2,
|
|
3921
|
-
c(e2,
|
|
3918
|
+
var w = (e2, t, i) => {
|
|
3919
|
+
c(e2, t).iterate({ enter(n) {
|
|
3922
3920
|
if (n.name !== "VariableName")
|
|
3923
3921
|
return;
|
|
3924
3922
|
let s = n.node;
|
|
3925
3923
|
g(s) && i(s, e2.slice(s.from, s.to));
|
|
3926
3924
|
} });
|
|
3927
3925
|
};
|
|
3928
|
-
var L = (e2,
|
|
3929
|
-
if (!e2 || !e2.includes(
|
|
3926
|
+
var L = (e2, t, i) => {
|
|
3927
|
+
if (!e2 || !e2.includes(t))
|
|
3930
3928
|
return [];
|
|
3931
3929
|
let r = [];
|
|
3932
3930
|
return w(e2, i, (n, s) => {
|
|
3933
|
-
s ===
|
|
3931
|
+
s === t && r.push({ from: n.from, to: n.to });
|
|
3934
3932
|
}), r;
|
|
3935
3933
|
};
|
|
3936
|
-
var x = (e2,
|
|
3934
|
+
var x = (e2, t, i) => {
|
|
3937
3935
|
let r = "", n = 0;
|
|
3938
|
-
for (let s of
|
|
3936
|
+
for (let s of t)
|
|
3939
3937
|
r += e2.slice(n, s.from) + i, n = s.to;
|
|
3940
3938
|
return r + e2.slice(n);
|
|
3941
3939
|
};
|
|
3942
|
-
var pe = (e2,
|
|
3943
|
-
let n = L(e2,
|
|
3940
|
+
var pe = (e2, t, i, r) => {
|
|
3941
|
+
let n = L(e2, t, r);
|
|
3944
3942
|
return n.length === 0 ? e2 : x(e2, n, i);
|
|
3945
3943
|
};
|
|
3946
|
-
var b = (e2,
|
|
3944
|
+
var b = (e2, t) => {
|
|
3947
3945
|
if (!e2.trim())
|
|
3948
3946
|
return [];
|
|
3949
3947
|
let i = [];
|
|
3950
|
-
return u(e2,
|
|
3948
|
+
return u(e2, t, (r, n) => {
|
|
3951
3949
|
i.push({ name: n, path: D(r, e2, true), segments: F(r, e2, false), from: r.from, to: r.to, inFilterPredicate: A(r) });
|
|
3952
3950
|
}), i;
|
|
3953
3951
|
};
|
|
3954
|
-
var F = (e2,
|
|
3955
|
-
let r = [{ name:
|
|
3952
|
+
var F = (e2, t, i) => {
|
|
3953
|
+
let r = [{ name: t.slice(e2.from, e2.to), from: e2.from, to: e2.to }], n = e2, s = n.parent;
|
|
3956
3954
|
for (;s && (s.name === "PathExpression" || i && s.name === "FilterExpression") && s.from === n.from; ) {
|
|
3957
3955
|
let o = s.name === "PathExpression" ? s.getChild("PathName") : null;
|
|
3958
|
-
o && r.push({ name:
|
|
3956
|
+
o && r.push({ name: t.slice(o.from, o.to), from: o.from, to: o.to }), n = s, s = n.parent;
|
|
3959
3957
|
}
|
|
3960
3958
|
return r;
|
|
3961
3959
|
};
|
|
3962
|
-
var D = (e2,
|
|
3963
|
-
var me = (e2,
|
|
3960
|
+
var D = (e2, t, i) => F(e2, t, i).map((r) => r.name).join(".");
|
|
3961
|
+
var me = (e2, t, i = false) => {
|
|
3964
3962
|
if (!e2.trim())
|
|
3965
3963
|
return [];
|
|
3966
3964
|
let r = new Set, n = [];
|
|
3967
|
-
return u(e2,
|
|
3965
|
+
return u(e2, t, (s) => {
|
|
3968
3966
|
let o = D(s, e2, i);
|
|
3969
3967
|
r.has(o) || (r.add(o), n.push(o));
|
|
3970
3968
|
}), n;
|
|
3971
3969
|
};
|
|
3972
3970
|
var h = (e2) => {
|
|
3973
|
-
let
|
|
3974
|
-
if (!
|
|
3971
|
+
let t = e2.trim();
|
|
3972
|
+
if (!t)
|
|
3975
3973
|
return false;
|
|
3976
|
-
let i = T(
|
|
3977
|
-
return i.length === 1 && i[0].from === 0 && i[0].to ===
|
|
3974
|
+
let i = T(t, t, "expression");
|
|
3975
|
+
return i.length === 1 && i[0].from === 0 && i[0].to === t.length;
|
|
3978
3976
|
};
|
|
3979
|
-
var ue = (e2,
|
|
3980
|
-
let n = T(e2,
|
|
3977
|
+
var ue = (e2, t, i, r) => {
|
|
3978
|
+
let n = T(e2, t, r);
|
|
3981
3979
|
return n.length === 0 ? e2 : x(e2, n, i);
|
|
3982
3980
|
};
|
|
3983
3981
|
var a = (e2) => `${e2}_${v4_default()}`;
|
|
3984
3982
|
var v = { all: new Set, outsideFilterPredicates: new Set, paths: new Set };
|
|
3985
3983
|
var B = new WeakMap;
|
|
3986
3984
|
var U = { expression: new WeakMap, unaryTests: new WeakMap };
|
|
3987
|
-
var l = (e2,
|
|
3985
|
+
var l = (e2, t, i = B) => {
|
|
3988
3986
|
let r = i.get(e2);
|
|
3989
3987
|
if (r)
|
|
3990
3988
|
return r;
|
|
3991
|
-
let n =
|
|
3989
|
+
let n = t(e2);
|
|
3992
3990
|
return i.set(e2, n), n;
|
|
3993
3991
|
};
|
|
3994
|
-
var p = (e2,
|
|
3992
|
+
var p = (e2, t) => {
|
|
3995
3993
|
let i = e2?.trim();
|
|
3996
|
-
if (!i ||
|
|
3994
|
+
if (!i || t === "unaryTests" && i === "-")
|
|
3997
3995
|
return v;
|
|
3998
|
-
let r = b(i,
|
|
3996
|
+
let r = b(i, t);
|
|
3999
3997
|
return { all: new Set(r.map((n) => n.name)), outsideFilterPredicates: new Set(r.filter((n) => !n.inFilterPredicate).map((n) => n.name)), paths: new Set(r.map((n) => n.path)) };
|
|
4000
3998
|
};
|
|
4001
3999
|
var m = (e2) => {
|
|
4002
|
-
let
|
|
4000
|
+
let t = new Set, i = new Set, r = new Set;
|
|
4003
4001
|
for (let n of e2) {
|
|
4004
4002
|
for (let s of n.paths)
|
|
4005
4003
|
r.add(s);
|
|
4006
4004
|
for (let s of n.all)
|
|
4007
|
-
|
|
4005
|
+
t.add(s);
|
|
4008
4006
|
for (let s of n.outsideFilterPredicates)
|
|
4009
4007
|
i.add(s);
|
|
4010
4008
|
}
|
|
4011
|
-
return { all:
|
|
4009
|
+
return { all: t, outsideFilterPredicates: i, paths: r };
|
|
4012
4010
|
};
|
|
4013
|
-
var N = (e2,
|
|
4011
|
+
var N = (e2, t) => l(e2, () => p(e2.text, t), U[t]);
|
|
4014
4012
|
var V = (e2) => l(e2, () => m([p(e2.expressionText, "expression"), p(e2.allowedValues?.text, "unaryTests")]));
|
|
4015
4013
|
var k = (e2) => l(e2, () => p(e2.allowedValues?.text, "unaryTests"));
|
|
4016
|
-
var q = (e2) => l(e2, () => m([...e2.inputEntries.map((
|
|
4014
|
+
var q = (e2) => l(e2, () => m([...e2.inputEntries.map((t) => N(t, "unaryTests")), ...e2.outputEntries.map((t) => N(t, "expression"))]));
|
|
4017
4015
|
var $ = (e2) => l(e2, () => m(e2.map(q)));
|
|
4018
4016
|
var S = (e2) => l(e2, () => m([...e2.inputs.map(V), ...e2.outputs.map(k), $(e2.rules)]));
|
|
4019
4017
|
var E = (e2) => S(e2).all;
|
|
@@ -4025,38 +4023,31 @@ var z = "UiPath Maestro";
|
|
|
4025
4023
|
var K = () => ({ id: a("definitions"), namespace: `http://uipath.com/dmn/${a("ns")}`, exporter: z });
|
|
4026
4024
|
var X = "null";
|
|
4027
4025
|
var Re = (e2) => {
|
|
4028
|
-
let
|
|
4029
|
-
return
|
|
4026
|
+
let t = (e2 ?? "").trim();
|
|
4027
|
+
return t === "" || t === X;
|
|
4030
4028
|
};
|
|
4031
4029
|
var Y = (e2) => ({ ...K(), name: e2, decision: { id: a("decision"), name: H, label: W, variableId: a("variable"), variableTypeRef: "string", decisionTable: { id: a("decisionTable"), hitPolicy: e.First, inputs: [{ id: a("input"), label: "Input 1", expressionId: a("inputExpression"), expressionText: "", typeRef: "string" }], outputs: [ie()], annotations: [{ name: j }], rules: [{ id: a("rule"), inputEntries: [{ id: a("inputEntry"), text: "-" }], outputEntries: [{ id: a("outputEntry"), text: "" }], annotationEntries: [""] }] } }, inputData: [] });
|
|
4032
4030
|
var y = "input1";
|
|
4033
4031
|
var Ie = (e2) => {
|
|
4034
|
-
let
|
|
4035
|
-
return re({ ...
|
|
4032
|
+
let t = Y(e2), [i] = t.decision.decisionTable.inputs;
|
|
4033
|
+
return re({ ...t, inputData: [{ id: a("inputData"), variableId: a("variable"), name: y, typeRef: i.typeRef }], decision: { ...t.decision, decisionTable: { ...t.decision.decisionTable, inputs: [{ ...i, expressionText: y }] } } });
|
|
4036
4034
|
};
|
|
4037
|
-
var Pe = /[\p{L}\p{N}_]/u;
|
|
4038
|
-
var Q = /^[\p{L}_][\p{L}\p{N}_]*(\s*\.\s*[\p{L}_][\p{L}\p{N}_]*)*$/u;
|
|
4039
4035
|
var G = /^[\p{L}_][\p{L}\p{N}_]*$/u;
|
|
4040
4036
|
var J = (e2) => G.test(e2.trim()) && h(e2);
|
|
4041
|
-
var Z = (e2,
|
|
4042
|
-
let i = `output${
|
|
4037
|
+
var Z = (e2, t) => {
|
|
4038
|
+
let i = `output${t + 1}`, r = (e2 ?? "").replace(/[^\p{L}\p{N}_]+(.)?/gu, (s, o) => o ? o.toUpperCase() : "");
|
|
4043
4039
|
if (!/^[\p{L}_]/u.test(r))
|
|
4044
4040
|
return i;
|
|
4045
4041
|
let n = r.charAt(0).toLowerCase() + r.slice(1);
|
|
4046
4042
|
return J(n) ? n : i;
|
|
4047
4043
|
};
|
|
4048
|
-
var ee = (e2,
|
|
4044
|
+
var ee = (e2, t) => e2.name?.trim() || Z(e2.label, t);
|
|
4049
4045
|
var Ce = (e2) => e2 > 1;
|
|
4050
|
-
var _e = (e2) => e2.trim().split(".").map((
|
|
4051
|
-
var
|
|
4052
|
-
let t2 = e2.trim();
|
|
4053
|
-
if (!(!t2 || !Q.test(t2)))
|
|
4054
|
-
return t2.split(".")[0].trim() || undefined;
|
|
4055
|
-
};
|
|
4056
|
-
var te = (e2, t2) => e2?.trim() ? e2 : t2?.trim() ? t2 : "";
|
|
4046
|
+
var _e = (e2) => e2.trim().split(".").map((t) => t.trim()).join(".");
|
|
4047
|
+
var te = (e2, t) => e2?.trim() ? e2 : t?.trim() ? t : "";
|
|
4057
4048
|
var ne = (e2) => te(e2.variableName, e2.name);
|
|
4058
4049
|
var re = (e2) => {
|
|
4059
|
-
let
|
|
4050
|
+
let t = E(e2.decision.decisionTable), i = (n) => t.has(ne(n)) ? n.requirementId ?? a("informationRequirement") : n.requirementFromSource ? n.requirementId : undefined, r = e2.inputData.map((n) => {
|
|
4060
4051
|
let s = i(n);
|
|
4061
4052
|
return s === n.requirementId ? n : { ...n, requirementId: s };
|
|
4062
4053
|
});
|
|
@@ -4067,6 +4058,6 @@ function ie() {
|
|
|
4067
4058
|
return { ...e2, name: ee(e2, 0) };
|
|
4068
4059
|
}
|
|
4069
4060
|
|
|
4070
|
-
export { trackVariables, parser, c, oe, ae, pe, b, me, h, ue, a, E, xe, j, W,
|
|
4061
|
+
export { trackVariables, parser, c, oe, ae, pe, b, me, h, ue, a, E, xe, j, W, X, Re, Ie, J, ee, Ce, _e, te, ne };
|
|
4071
4062
|
|
|
4072
|
-
//# debugId=
|
|
4063
|
+
//# debugId=4BC0B306D672C55864756E2164756E21
|