state-machine-cat 10.1.10 → 11.0.0
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/README.md +1 -1
- package/dist/esm/render/dot/index.mjs +1 -1
- package/dist/esm/render/dot/{render-dot-from-ast.js → render-dot-from-ast.mjs} +5 -7
- package/dist/esm/render/index-node.mjs +1 -1
- package/dist/esm/render/index.mjs +1 -1
- package/dist/esm/render/scjson/make-valid-event-names.mjs +1 -1
- package/dist/esm/render/scjson/make-valid-xml-name.mjs +2 -2
- package/dist/esm/render/scxml/index.mjs +1 -1
- package/dist/esm/render/scxml/render-from-scjson.mjs +7 -0
- package/dist/esm/render/smcat/{index.js → index.mjs} +5 -7
- package/dist/esm/version.mjs +1 -1
- package/package.json +56 -312
- package/dist/commonjs/bundle.js +0 -79
- package/dist/commonjs/index.js +0 -1
- package/dist/esm/render/scxml/render-from-scjson.js +0 -9
package/README.md
CHANGED
|
@@ -142,7 +142,7 @@ of thing you can read all about it in [State Machine Cat and SCXML](./docs/SCXML
|
|
|
142
142
|
After you `npm i` 'd `state-machine-cat`:
|
|
143
143
|
|
|
144
144
|
```javascript
|
|
145
|
-
|
|
145
|
+
import smcat from "state-machine-cat";
|
|
146
146
|
|
|
147
147
|
try {
|
|
148
148
|
const lSVGInAString = smcat.render(
|
|
@@ -5,7 +5,7 @@ import attributebuilder from "./attributebuilder.mjs";
|
|
|
5
5
|
import stateTransformers from "./state-transformers.mjs";
|
|
6
6
|
import transitionTransformers from "./transition-transformers.mjs";
|
|
7
7
|
import Counter from "./counter.mjs";
|
|
8
|
-
import renderDotFromAST from "./render-dot-from-ast.
|
|
8
|
+
import renderDotFromAST from "./render-dot-from-ast.mjs";
|
|
9
9
|
import utl from "./utl.mjs";
|
|
10
10
|
function addExternalSelfTransitions(pStateMachineModel) {
|
|
11
11
|
return (pState) => {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
require("./dot.template.js");
|
|
5
|
-
require("./dot.states.template.js");
|
|
1
|
+
import Handlebars from "handlebars/dist/handlebars.runtime.js";
|
|
2
|
+
await import("./dot.template.js");
|
|
3
|
+
await import("./dot.states.template.js");
|
|
6
4
|
Handlebars.registerPartial("dot.states.template.hbs", Handlebars.templates["dot.states.template.hbs"]);
|
|
7
5
|
Handlebars.registerHelper("stateSection", (pStateMachine) => Handlebars.templates["dot.states.template.hbs"](splitStates(pStateMachine)));
|
|
8
6
|
function isType(pString) {
|
|
@@ -24,6 +22,6 @@ function splitStates(pStateMachine) {
|
|
|
24
22
|
pStateMachine.compositeStates = pStateMachine.states.filter((pState) => pState.statemachine);
|
|
25
23
|
return pStateMachine;
|
|
26
24
|
}
|
|
27
|
-
|
|
25
|
+
export default function renderDotFromAST(pStateMachine) {
|
|
28
26
|
return Handlebars.templates["dot.template.hbs"](pStateMachine);
|
|
29
|
-
}
|
|
27
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import has from "lodash/has.js";
|
|
2
|
-
import smcatRendererAsImported from "./smcat/index.
|
|
2
|
+
import smcatRendererAsImported from "./smcat/index.mjs";
|
|
3
3
|
import renderDot from "./dot/index.mjs";
|
|
4
4
|
import vector from "./vector/vector-native-dot-with-fallback.mjs";
|
|
5
5
|
import oldVector from "./vector/vector-with-viz-js.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import has from "lodash/has.js";
|
|
2
|
-
import smcatRendererAsImported from "./smcat/index.
|
|
2
|
+
import smcatRendererAsImported from "./smcat/index.mjs";
|
|
3
3
|
import renderDot from "./dot/index.mjs";
|
|
4
4
|
import svg from "./vector/vector-with-viz-js.mjs";
|
|
5
5
|
import scjson from "./scjson/index.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const EVENT_CHAR_FORBIDDEN_RE = /[\u00B7
|
|
1
|
+
const EVENT_CHAR_FORBIDDEN_RE = /[\u00B7\u0300-\u036F\u203F-\u2040\u0000-\u0029\u002B-\u002C\u002F\u003B-\u0040\u005B-\u0060\u007B-\u00BF\u00D7\u00F7\u0300-\u036F\u037E\u2000-\u200B\u200E-\u206F\u2190-\u2BFF\u2FF0-\u3000\uD800-\uF8FF\uFDD0-\uFDEF\uFFFE-\uFFFF]/g;
|
|
2
2
|
const START_EVENT_CHAR_FORBIDDEN_EXTRA_RE = /[.]/g;
|
|
3
3
|
function makeValidEventChar(pCandidateEventStringTail) {
|
|
4
4
|
return pCandidateEventStringTail.replace(EVENT_CHAR_FORBIDDEN_RE, "_");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const NAME_CHAR_FORBIDDEN_RE = /[\u0000-\u002C
|
|
2
|
-
const START_NAME_CHAR_FORBIDDEN_EXTRA_RE = /[
|
|
1
|
+
const NAME_CHAR_FORBIDDEN_RE = /[\u0000-\u002C\u002F\u003B-\u0040\u005B-\u0060\u007B-\u00BF\u00D7\u00F7\u0300-\u036F\u037E\u2000-\u200B\u200E-\u206F\u2190-\u2BFF\u2FF0-\u3000\uD800-\uF8FF\uFDD0-\uFDEF\uFFFE-\uFFFF]/g;
|
|
2
|
+
const START_NAME_CHAR_FORBIDDEN_EXTRA_RE = /[-.0-9\u00B7\u0300-\u036F\u203F-\u2040]/g;
|
|
3
3
|
function makeValidNameChars(pCandidateNameTail) {
|
|
4
4
|
return pCandidateNameTail.replace(NAME_CHAR_FORBIDDEN_RE, "_");
|
|
5
5
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import ast2scjson from "../scjson/index.mjs";
|
|
2
|
-
import renderFomSCJSON from "./render-from-scjson.
|
|
2
|
+
import renderFomSCJSON from "./render-from-scjson.mjs";
|
|
3
3
|
const renderSCXML = (pStateMachine) => renderFomSCJSON(ast2scjson(pStateMachine));
|
|
4
4
|
export default renderSCXML;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import Handlebars from "handlebars/dist/handlebars.runtime.js";
|
|
2
|
+
await import("./scxml.template.js");
|
|
3
|
+
await import("./scxml.states.template.js");
|
|
4
|
+
Handlebars.registerPartial("scxml.states.template.hbs", Handlebars.templates["scxml.states.template.hbs"]);
|
|
5
|
+
export default function renderSCXML(pSCJSON) {
|
|
6
|
+
return Handlebars.templates["scxml.template.hbs"](pSCJSON);
|
|
7
|
+
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const cloneDeep = require("lodash/cloneDeep.js");
|
|
5
|
-
require("./smcat.template.js");
|
|
1
|
+
import Handlebars from "handlebars/dist/handlebars.runtime.js";
|
|
2
|
+
import cloneDeep from "lodash/cloneDeep.js";
|
|
3
|
+
await import("./smcat.template.js");
|
|
6
4
|
const NAME_QUOTABLE = /;|,|{| |\[/;
|
|
7
5
|
const ACTIONS_QUOTABLE = /;|,|{/;
|
|
8
6
|
const LABEL_QUOTABLE = /;|{/;
|
|
@@ -54,10 +52,10 @@ function transformTransitions(pTransitions) {
|
|
|
54
52
|
Handlebars.registerHelper("quotifyState", (pItem) => quoteIfNecessary(NAME_QUOTABLE, pItem));
|
|
55
53
|
Handlebars.registerHelper("quotifyLabel", (pItem) => quoteIfNecessary(LABEL_QUOTABLE, pItem));
|
|
56
54
|
Handlebars.registerHelper("quotifyActions", (pItem) => quoteIfNecessary(ACTIONS_QUOTABLE, pItem));
|
|
57
|
-
|
|
55
|
+
export default function renderSmcat(pStateMachine) {
|
|
58
56
|
return Handlebars.templates["smcat.template.hbs"]({
|
|
59
57
|
...pStateMachine,
|
|
60
58
|
states: transformStates(cloneDeep(pStateMachine.states)),
|
|
61
59
|
transitions: transformTransitions(cloneDeep(pStateMachine.transitions || [])),
|
|
62
60
|
});
|
|
63
|
-
}
|
|
61
|
+
}
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "
|
|
1
|
+
export const version = "11.0.0";
|
package/package.json
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "state-machine-cat",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"description": "write beautiful state charts",
|
|
5
|
-
"main": "./dist/
|
|
5
|
+
"main": "./dist/exm/index.js",
|
|
6
6
|
"module": "./dist/esm/index.mjs",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": [
|
|
9
9
|
{
|
|
10
|
-
"import": "./dist/esm/index.mjs"
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
"./dist/commonjs/index.js"
|
|
10
|
+
"import": "./dist/esm/index.mjs"
|
|
11
|
+
}
|
|
14
12
|
]
|
|
15
13
|
},
|
|
16
14
|
"sideEffects": [
|
|
@@ -21,38 +19,30 @@
|
|
|
21
19
|
"dist/esm/render/scxml/scxml.template.js"
|
|
22
20
|
],
|
|
23
21
|
"scripts": {
|
|
24
|
-
"build": "make clean dist pages",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"depcruise": "
|
|
30
|
-
"depcruise:
|
|
31
|
-
"depcruise:graph": "
|
|
32
|
-
"depcruise:graph:
|
|
33
|
-
"depcruise:
|
|
34
|
-
"depcruise:
|
|
35
|
-
"depcruise:
|
|
36
|
-
"depcruise:
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"depcruise:github-actions:mermaid:affected": "depcruise bin src test types tools --config config/dependency-cruiser.js --output-type mermaid --reaches \"$(watskeburt $SHA -T regex)\"",
|
|
45
|
-
"lint": "wireit",
|
|
46
|
-
"lint:eslint": "wireit",
|
|
47
|
-
"lint:prettier": "wireit",
|
|
48
|
-
"lint:types": "wireit",
|
|
49
|
-
"lint:types:tsc": "wireit",
|
|
50
|
-
"lint:types:eslint": "wireit",
|
|
22
|
+
"build": "make clean dist pages cli-build && rm -rf dist/esm && tsc",
|
|
23
|
+
"check": "run-s depcruise lint test:cover",
|
|
24
|
+
"depcruise": "dependency-cruise bin src test types tools --config config/dependency-cruiser/base.mjs",
|
|
25
|
+
"depcruise:graph": "run-s depcruise:graph:doc:archi depcruise:graph:doc:deps depcruise:graph:doc:flat-deps",
|
|
26
|
+
"depcruise:graph:doc:archi": "dependency-cruise bin src --config config/dependency-cruiser/graph.mjs --output-type archi | dot -T svg | tee docs/dependency-cruiser-archi-graph.svg | depcruise-wrap-stream-in-html > docs/dependency-cruiser-archi-graph.html",
|
|
27
|
+
"depcruise:graph:doc:deps": "dependency-cruise bin src --config config/dependency-cruiser/graph.mjs --output-type dot | dot -T svg | tee docs/dependency-cruiser-graph.svg | depcruise-wrap-stream-in-html > docs/dependency-cruiser-graph.html",
|
|
28
|
+
"depcruise:graph:doc:flat-deps": "dependency-cruise bin src --config config/dependency-cruiser/graph.mjs --output-type flat | dot -T svg | tee docs/dependency-cruiser-graph-flat-dot.svg | depcruise-wrap-stream-in-html > docs/dependency-cruiser-graph-flat-dot.html",
|
|
29
|
+
"depcruise:graph:dev": "dependency-cruise bin src --config config/dependency-cruiser/graph.mjs --output-type dot --prefix vscode://file/$(pwd)/ --highlight \"$(watskeburt develop)\"| dot -Tsvg | depcruise-wrap-stream-in-html | browser",
|
|
30
|
+
"depcruise:graph:dev:flat": "dependency-cruise bin src --config config/dependency-cruiser/graph.mjs --output-type flat --prefix vscode://file/$(pwd)/ --highlight \"$(watskeburt develop)\"| twopi -Tsvg | depcruise-wrap-stream-in-html | browser",
|
|
31
|
+
"depcruise:view-report": "dependency-cruise bin src test types tools --config config/dependency-cruiser/base.mjs --output-type err-html --prefix vscode://file/$(pwd)/ | browser",
|
|
32
|
+
"depcruise:github-actions:markdown": "dependency-cruise bin src test types tools --config config/dependency-cruiser/base.mjs --output-type markdown",
|
|
33
|
+
"depcruise:github-actions:mermaid": "dependency-cruise bin src --config config/dependency-cruiser/graph.mjs --output-type mermaid",
|
|
34
|
+
"depcruise:github-actions:mermaid:affected": "dependency-cruise bin src test types tools --no-cache --config config/dependency-cruiser/base.mjs --output-type mermaid --reaches \"$(watskeburt $SHA -T regex)\"",
|
|
35
|
+
"format": "prettier --cache --loglevel warn --write \"bin/*.mjs\" \"{src,test}/**/*.{js,mjs}\" \"{config,test}/**/*.{js,json}\" \"tools/*.{js,mjs,json}\" \"{src,types}/**/*.{ts,mts}\" \"*.{json,yml,md}\" \"docs/{smcat-online-interpreter.js,*.md}\"",
|
|
36
|
+
"format:check": "prettier --cache --check \"bin/*.mjs\" \"{src,test}/**/*.{js,mjs}\" \"{config,test}/**/*.{js,json}\" \"tools/*.{js,mjs,json}\" \"{src,types}/**/*.{ts,mts}\" \"*.{json,yml,md}\" \"docs/{smcat-online-interpreter.js,*.md}\"",
|
|
37
|
+
"lint": "run-p lint:eslint format:check lint:types",
|
|
38
|
+
"lint:eslint": "eslint --cache --cache-location node_modules/.cache/eslint/cache.json --color src test config",
|
|
39
|
+
"lint:types": "run-p lint:types:*",
|
|
40
|
+
"lint:types:tsc": "tsc --noEmit --strict --types --noUnusedLocals --noUnusedParameters --pretty types/*.d.ts src/cli/*.d.ts src/parse/scxml/*.d.ts",
|
|
41
|
+
"lint:types:eslint": "eslint types/*.d.ts src/cli/*.d.ts src/parse/scxml/*.d.ts",
|
|
51
42
|
"lint:eslint:clear-caches": "rm -rf node_modules/.cache/eslint/",
|
|
52
|
-
"lint:fix": "
|
|
53
|
-
"lint:fix:eslint": "
|
|
54
|
-
"lint:fix:
|
|
55
|
-
"lint:fix:types": "wireit",
|
|
43
|
+
"lint:fix": "run-s lint:fix:eslint format lint:fix:types",
|
|
44
|
+
"lint:fix:eslint": "eslint --cache --cache-location node_modules/.cache/eslint/cache.json --fix --color src test config",
|
|
45
|
+
"lint:fix:types": "eslint --fix types/*.d.ts src/cli/*.d.ts src/cli/*.d.ts src/parse/scxml/*.d.ts",
|
|
56
46
|
"prepare": "husky install",
|
|
57
47
|
"scm:push": "run-p --aggregate-output scm:push:*",
|
|
58
48
|
"scm:push:github": "run-p --aggregate-output scm:push:github:*",
|
|
@@ -65,13 +55,13 @@
|
|
|
65
55
|
"scm:push:bitbucket-mirror:commits": "git push bitbucket-mirror",
|
|
66
56
|
"scm:push:bitbucket-mirror:tags": "git push --tags bitbucket-mirror",
|
|
67
57
|
"scm:stage": "git add .",
|
|
68
|
-
"test": "
|
|
69
|
-
"test:cover": "
|
|
58
|
+
"test": "mocha --no-warnings",
|
|
59
|
+
"test:cover": "NODE_OPTIONS=--no-warnings c8 mocha",
|
|
70
60
|
"update-dependencies": "run-s upem:update upem:install lint:eslint:clear-caches lint:fix check",
|
|
71
61
|
"upem-outdated": "npm outdated --json --long | upem --dry-run",
|
|
72
62
|
"upem:install": "npm install",
|
|
73
63
|
"upem:update": "npm outdated --json --long | upem | pbcopy && pbpaste",
|
|
74
|
-
"version": "run-s build
|
|
64
|
+
"version": "run-s build depcruise:graph scm:stage"
|
|
75
65
|
},
|
|
76
66
|
"files": [
|
|
77
67
|
"bin/",
|
|
@@ -87,265 +77,14 @@
|
|
|
87
77
|
"package": "viz.js",
|
|
88
78
|
"policy": "pin",
|
|
89
79
|
"because": "viz.js >=2 ditched its async interface, which we use. Will need some code reshuffling which is not worth it a.t.m."
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"package": "dependency-cruiser",
|
|
83
|
+
"policy": "wanted",
|
|
84
|
+
"because": "we're beta testing dependency-cruiser v13 and the _latest_ policy would bump down to v12 again"
|
|
90
85
|
}
|
|
91
86
|
]
|
|
92
87
|
},
|
|
93
|
-
"wireit": {
|
|
94
|
-
"check": {
|
|
95
|
-
"dependencies": [
|
|
96
|
-
"depcruise",
|
|
97
|
-
"lint",
|
|
98
|
-
"test:cover"
|
|
99
|
-
]
|
|
100
|
-
},
|
|
101
|
-
"cachefolder": {
|
|
102
|
-
"command": "mkdir -p node_modules/.cache",
|
|
103
|
-
"clean": false,
|
|
104
|
-
"files": [],
|
|
105
|
-
"output": [
|
|
106
|
-
"node_modules/.cache"
|
|
107
|
-
],
|
|
108
|
-
"packageLocks": []
|
|
109
|
-
},
|
|
110
|
-
"depcruise:json": {
|
|
111
|
-
"command": "dependency-cruise --progress performance-log --output-type json --output-to node_modules/.cache/depcruise-cache.json --config config/dependency-cruiser.js src test bin",
|
|
112
|
-
"files": [
|
|
113
|
-
"src/**/*",
|
|
114
|
-
"test/**/*",
|
|
115
|
-
"bin/**/*",
|
|
116
|
-
"config/dependency-cruiser.js"
|
|
117
|
-
],
|
|
118
|
-
"dependencies": [
|
|
119
|
-
"cachefolder"
|
|
120
|
-
],
|
|
121
|
-
"clean": true,
|
|
122
|
-
"output": [
|
|
123
|
-
"node_modules/.cache/depcruise-cache.json"
|
|
124
|
-
]
|
|
125
|
-
},
|
|
126
|
-
"depcruise": {
|
|
127
|
-
"command": "depcruise-fmt node_modules/.cache/depcruise-cache.json --output-type err-long",
|
|
128
|
-
"files": [
|
|
129
|
-
"node_modules/.cache/depcruise-cache.json"
|
|
130
|
-
],
|
|
131
|
-
"dependencies": [
|
|
132
|
-
"depcruise:json"
|
|
133
|
-
],
|
|
134
|
-
"output": []
|
|
135
|
-
},
|
|
136
|
-
"depcruise:html-report": {
|
|
137
|
-
"command": "depcruise-fmt node_modules/.cache/depcruise-cache.json --output-type err-html --output-to dependency-violation-report.html",
|
|
138
|
-
"files": [
|
|
139
|
-
"node_modules/.cache/depcruise-cache.json"
|
|
140
|
-
],
|
|
141
|
-
"dependencies": [
|
|
142
|
-
"depcruise:json"
|
|
143
|
-
],
|
|
144
|
-
"clean": false,
|
|
145
|
-
"output": [
|
|
146
|
-
"dependency-violation-report.html"
|
|
147
|
-
]
|
|
148
|
-
},
|
|
149
|
-
"depcruise:graph:doc:deps-svg": {
|
|
150
|
-
"command": "depcruise-fmt node_modules/.cache/depcruise-cache.json --include-only '^(bin|src|package\\.json)' --output-type dot | dot -T svg -o docs/dependency-cruiser-graph.svg",
|
|
151
|
-
"files": [
|
|
152
|
-
"node_modules/.cache/depcruise-cache.json"
|
|
153
|
-
],
|
|
154
|
-
"dependencies": [
|
|
155
|
-
"depcruise:json"
|
|
156
|
-
],
|
|
157
|
-
"clean": false,
|
|
158
|
-
"output": [
|
|
159
|
-
"docs/dependency-cruiser-graph.svg"
|
|
160
|
-
]
|
|
161
|
-
},
|
|
162
|
-
"depcruise:graph:doc:deps-html": {
|
|
163
|
-
"command": "depcruise-wrap-stream-in-html < docs/dependency-cruiser-graph.svg > docs/dependency-cruiser-graph.html",
|
|
164
|
-
"files": [
|
|
165
|
-
"node_modules/.cache/depcruise-cache.json"
|
|
166
|
-
],
|
|
167
|
-
"dependencies": [
|
|
168
|
-
"depcruise:graph:doc:deps-svg"
|
|
169
|
-
],
|
|
170
|
-
"clean": false,
|
|
171
|
-
"output": [
|
|
172
|
-
"docs/dependency-cruiser-graph.html"
|
|
173
|
-
]
|
|
174
|
-
},
|
|
175
|
-
"depcruise:graph:doc:flat-deps-svg": {
|
|
176
|
-
"command": "depcruise-fmt node_modules/.cache/depcruise-cache.json --include-only '^(bin|src|package\\.json)' --output-type flat | dot -T svg -o docs/dependency-cruiser-graph-flat-dot.svg",
|
|
177
|
-
"files": [
|
|
178
|
-
"node_modules/.cache/depcruise-cache.json"
|
|
179
|
-
],
|
|
180
|
-
"dependencies": [
|
|
181
|
-
"depcruise:json"
|
|
182
|
-
],
|
|
183
|
-
"clean": false,
|
|
184
|
-
"output": [
|
|
185
|
-
"docs/dependency-cruiser-graph-flat-dot.svg"
|
|
186
|
-
]
|
|
187
|
-
},
|
|
188
|
-
"depcruise:graph:doc:flat-deps-html": {
|
|
189
|
-
"command": "depcruise-wrap-stream-in-html < docs/dependency-cruiser-graph-flat-dot.svg > docs/dependency-cruiser-graph-flat-dot.html",
|
|
190
|
-
"files": [
|
|
191
|
-
"node_modules/.cache/depcruise-cache.json"
|
|
192
|
-
],
|
|
193
|
-
"dependencies": [
|
|
194
|
-
"depcruise:graph:doc:flat-deps-svg"
|
|
195
|
-
],
|
|
196
|
-
"clean": false,
|
|
197
|
-
"output": [
|
|
198
|
-
"docs/dependency-cruiser-graph-flat-dot.html"
|
|
199
|
-
]
|
|
200
|
-
},
|
|
201
|
-
"depcruise:graph:doc:archi-svg": {
|
|
202
|
-
"command": "depcruise-fmt node_modules/.cache/depcruise-cache.json --include-only '^(bin|src|package\\.json)' --output-type archi | dot -T svg -o docs/dependency-cruiser-archi-graph.svg",
|
|
203
|
-
"files": [
|
|
204
|
-
"node_modules/.cache/depcruise-cache.json"
|
|
205
|
-
],
|
|
206
|
-
"dependencies": [
|
|
207
|
-
"depcruise:json"
|
|
208
|
-
],
|
|
209
|
-
"clean": false,
|
|
210
|
-
"output": [
|
|
211
|
-
"docs/dependency-cruiser-archi-graph.svg"
|
|
212
|
-
]
|
|
213
|
-
},
|
|
214
|
-
"depcruise:graph:doc:archi-html": {
|
|
215
|
-
"command": "depcruise-wrap-stream-in-html < docs/dependency-cruiser-archi-graph.svg > docs/dependency-cruiser-archi-graph.html",
|
|
216
|
-
"files": [
|
|
217
|
-
"node_modules/.cache/depcruise-cache.json"
|
|
218
|
-
],
|
|
219
|
-
"dependencies": [
|
|
220
|
-
"depcruise:graph:doc:archi-svg"
|
|
221
|
-
],
|
|
222
|
-
"clean": false,
|
|
223
|
-
"output": [
|
|
224
|
-
"docs/dependency-cruiser-archi-graph.html"
|
|
225
|
-
]
|
|
226
|
-
},
|
|
227
|
-
"depcruise:graph": {
|
|
228
|
-
"dependencies": [
|
|
229
|
-
"depcruise:graph:doc:archi-html",
|
|
230
|
-
"depcruise:graph:doc:deps-html",
|
|
231
|
-
"depcruise:graph:doc:flat-deps-html"
|
|
232
|
-
]
|
|
233
|
-
},
|
|
234
|
-
"depcruise:graph:dev": {
|
|
235
|
-
"command": "depcruise-fmt node_modules/.cache/depcruise-cache.json --output-type dot --include-only '^(bin|src|package\\.json)' --prefix vscode://file/$(pwd)/ --highlight \"$(watskeburt develop)\"| dot -Tsvg | depcruise-wrap-stream-in-html | browser",
|
|
236
|
-
"dependencies": [
|
|
237
|
-
"depcruise:json"
|
|
238
|
-
]
|
|
239
|
-
},
|
|
240
|
-
"depcruise:graph:dev:flat": {
|
|
241
|
-
"command": "depcruise-fmt node_modules/.cache/depcruise-cache.json --output-type flat --include-only '^(bin|src|package\\.json)' --prefix vscode://file/$(pwd)/ --highlight \"$(watskeburt develop)\"| twopi -Tsvg | depcruise-wrap-stream-in-html | browser",
|
|
242
|
-
"dependencies": [
|
|
243
|
-
"depcruise:json"
|
|
244
|
-
]
|
|
245
|
-
},
|
|
246
|
-
"depcruise:view-report": {
|
|
247
|
-
"command": "depcruise-fmt node_modules/.cache/depcruise-cache.json --output-type err-html --prefix vscode://file/$(pwd)/ | browser",
|
|
248
|
-
"dependencies": [
|
|
249
|
-
"depcruise:json"
|
|
250
|
-
]
|
|
251
|
-
},
|
|
252
|
-
"lint": {
|
|
253
|
-
"dependencies": [
|
|
254
|
-
"lint:eslint",
|
|
255
|
-
"lint:prettier",
|
|
256
|
-
"lint:types"
|
|
257
|
-
]
|
|
258
|
-
},
|
|
259
|
-
"lint:eslint": {
|
|
260
|
-
"command": "eslint --cache --cache-location node_modules/.cache/eslint/cache.json --color src test config",
|
|
261
|
-
"files": [
|
|
262
|
-
"{src,test}/**/*.{js,mjs}",
|
|
263
|
-
"config/**/*.{js,json}",
|
|
264
|
-
".eslintrc.json"
|
|
265
|
-
]
|
|
266
|
-
},
|
|
267
|
-
"lint:prettier": {
|
|
268
|
-
"command": "prettier --check \"bin/*.mjs\" \"{src,test}/**/*.{js,mjs}\" \"{config,test}/**/*.{js,json}\" \"tools/*.{js,mjs,json}\" \"{src,types}/**/*.{ts,mts}\" \"*.{json,yml,md}\" \"docs/{smcat-online-interpreter.js,*.md}\"",
|
|
269
|
-
"files": [
|
|
270
|
-
"bin/*.mjs",
|
|
271
|
-
"{src,test}/**/*.{js,mjs}",
|
|
272
|
-
"{config,test}/**/*.{js,json}",
|
|
273
|
-
"tools/*.{js,mjs,json}",
|
|
274
|
-
"types/*.ts",
|
|
275
|
-
"*.{json,yml,md}",
|
|
276
|
-
"docs/{smcat-online-interpreter.js,*.md}"
|
|
277
|
-
]
|
|
278
|
-
},
|
|
279
|
-
"lint:types": {
|
|
280
|
-
"dependencies": [
|
|
281
|
-
"lint:types:tsc",
|
|
282
|
-
"lint:types:eslint"
|
|
283
|
-
]
|
|
284
|
-
},
|
|
285
|
-
"lint:types:tsc": {
|
|
286
|
-
"command": "tsc --noEmit --strict --types --noUnusedLocals --noUnusedParameters --pretty types/*.d.ts src/cli/*.d.ts src/parse/scxml/*.d.ts",
|
|
287
|
-
"files": [
|
|
288
|
-
"types/*.d.ts"
|
|
289
|
-
]
|
|
290
|
-
},
|
|
291
|
-
"lint:types:eslint": {
|
|
292
|
-
"command": "eslint types/*.d.ts src/cli/*.d.ts src/parse/scxml/*.d.ts",
|
|
293
|
-
"files": [
|
|
294
|
-
"{src,types}/**/*.d.{ts,mts}",
|
|
295
|
-
".eslintrc.json"
|
|
296
|
-
]
|
|
297
|
-
},
|
|
298
|
-
"lint:fix": {
|
|
299
|
-
"dependencies": [
|
|
300
|
-
"lint:fix:eslint",
|
|
301
|
-
"lint:fix:prettier",
|
|
302
|
-
"lint:fix:types"
|
|
303
|
-
]
|
|
304
|
-
},
|
|
305
|
-
"lint:fix:eslint": {
|
|
306
|
-
"command": "eslint --cache --cache-location .cache --fix --color src test config",
|
|
307
|
-
"files": [
|
|
308
|
-
"{src,test}/**/*.{js,mjs}",
|
|
309
|
-
"config/**/*.{js,json}",
|
|
310
|
-
".eslintrc.json"
|
|
311
|
-
]
|
|
312
|
-
},
|
|
313
|
-
"lint:fix:prettier": {
|
|
314
|
-
"command": "prettier --loglevel warn --write \"bin/*.mjs\" \"{src,test}/**/*.{js,mjs}\" \"{config,test}/**/*.{js,json}\" \"tools/*.{js,mjs,json}\" \"{src,types}/**/*.{ts,mts}\" \"*.{json,yml,md}\" \"docs/{smcat-online-interpreter.js,*.md}\"",
|
|
315
|
-
"files": [
|
|
316
|
-
"bin/*.mjs",
|
|
317
|
-
"{src,test}/**/*.{js,mjs,ts,mts}",
|
|
318
|
-
"{config,test}/**/*.{js,json}",
|
|
319
|
-
"tools/*.{js,mjs,json}",
|
|
320
|
-
"types/*.ts",
|
|
321
|
-
"*.{json,yml,md}",
|
|
322
|
-
"docs/{smcat-online-interpreter.js,*.md}"
|
|
323
|
-
]
|
|
324
|
-
},
|
|
325
|
-
"lint:fix:types": {
|
|
326
|
-
"command": "eslint --fix types/*.d.ts src/cli/*.d.ts src/cli/*.d.ts src/parse/scxml/*.d.ts",
|
|
327
|
-
"files": [
|
|
328
|
-
"{src,types}/**/*.d.{ts,mts}",
|
|
329
|
-
".eslintrc.json"
|
|
330
|
-
]
|
|
331
|
-
},
|
|
332
|
-
"test": {
|
|
333
|
-
"command": "mocha --no-warnings",
|
|
334
|
-
"files": [
|
|
335
|
-
"{src,test}/**/*.{js,mjs,json,ts,mts,cts}"
|
|
336
|
-
]
|
|
337
|
-
},
|
|
338
|
-
"test:cover": {
|
|
339
|
-
"command": "NODE_OPTIONS=--no-warnings c8 mocha",
|
|
340
|
-
"output": [
|
|
341
|
-
"coverage/lcov.info",
|
|
342
|
-
"coverage/coverage-summary.json"
|
|
343
|
-
],
|
|
344
|
-
"files": [
|
|
345
|
-
"{src,test}/**/*.{js,mjs,json,ts,mts,cts}"
|
|
346
|
-
]
|
|
347
|
-
}
|
|
348
|
-
},
|
|
349
88
|
"keywords": [
|
|
350
89
|
"state",
|
|
351
90
|
"state chart",
|
|
@@ -368,7 +107,7 @@
|
|
|
368
107
|
"ajv": "8.12.0",
|
|
369
108
|
"chalk": "5.2.0",
|
|
370
109
|
"commander": "10.0.0",
|
|
371
|
-
"fast-xml-parser": "4.
|
|
110
|
+
"fast-xml-parser": "4.2.0",
|
|
372
111
|
"get-stream": "6.0.1",
|
|
373
112
|
"handlebars": "4.7.7",
|
|
374
113
|
"he": "1.2.0",
|
|
@@ -383,45 +122,50 @@
|
|
|
383
122
|
"@types/chai": "4.3.4",
|
|
384
123
|
"@types/chai-xml": "0.3.2",
|
|
385
124
|
"@types/he": "1.2.0",
|
|
386
|
-
"@types/lodash": "4.14.
|
|
125
|
+
"@types/lodash": "4.14.192",
|
|
387
126
|
"@types/mocha": "10.0.1",
|
|
388
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
389
|
-
"@typescript-eslint/parser": "5.
|
|
127
|
+
"@typescript-eslint/eslint-plugin": "5.57.1",
|
|
128
|
+
"@typescript-eslint/parser": "5.57.1",
|
|
390
129
|
"c8": "7.13.0",
|
|
391
130
|
"chai": "4.3.7",
|
|
392
131
|
"chai-as-promised": "7.1.1",
|
|
393
132
|
"chai-json-schema": "1.5.1",
|
|
394
133
|
"chai-xml": "0.4.0",
|
|
395
|
-
"dependency-cruiser": "
|
|
396
|
-
"esbuild": "0.17.
|
|
397
|
-
"eslint": "8.
|
|
134
|
+
"dependency-cruiser": "^13.0.0-beta-1",
|
|
135
|
+
"esbuild": "0.17.16",
|
|
136
|
+
"eslint": "8.38.0",
|
|
398
137
|
"eslint-config-moving-meadow": "4.0.2",
|
|
399
|
-
"eslint-config-prettier": "8.
|
|
138
|
+
"eslint-config-prettier": "8.8.0",
|
|
400
139
|
"eslint-plugin-budapestian": "5.0.1",
|
|
401
140
|
"eslint-plugin-eslint-comments": "3.2.0",
|
|
402
141
|
"eslint-plugin-import": "2.27.5",
|
|
403
142
|
"eslint-plugin-mocha": "10.1.0",
|
|
404
143
|
"eslint-plugin-node": "11.1.0",
|
|
405
144
|
"eslint-plugin-security": "1.7.1",
|
|
406
|
-
"eslint-plugin-unicorn": "
|
|
145
|
+
"eslint-plugin-unicorn": "46.0.0",
|
|
407
146
|
"husky": "8.0.3",
|
|
408
147
|
"is-pdf": "1.0.0",
|
|
409
148
|
"is-png": "3.0.1",
|
|
410
|
-
"lint-staged": "13.1
|
|
149
|
+
"lint-staged": "13.2.1",
|
|
411
150
|
"mocha": "10.2.0",
|
|
412
151
|
"npm-run-all": "4.1.5",
|
|
413
|
-
"peggy": "3.0.
|
|
414
|
-
"prettier": "2.8.
|
|
152
|
+
"peggy": "3.0.2",
|
|
153
|
+
"prettier": "2.8.7",
|
|
415
154
|
"query-string": "8.1.0",
|
|
416
155
|
"ts-node": "10.9.1",
|
|
417
|
-
"typescript": "
|
|
156
|
+
"typescript": "5.0.4",
|
|
418
157
|
"upem": "7.3.2",
|
|
419
|
-
"watskeburt": "0.10.
|
|
420
|
-
"wireit": "0.9.5",
|
|
158
|
+
"watskeburt": "0.10.1",
|
|
421
159
|
"xml-name-validator": "4.0.0"
|
|
422
160
|
},
|
|
161
|
+
"overrides": {
|
|
162
|
+
"xml2js": "^0.5.0"
|
|
163
|
+
},
|
|
164
|
+
"resolutions": {
|
|
165
|
+
"xml2js": "^0.5.0"
|
|
166
|
+
},
|
|
423
167
|
"engines": {
|
|
424
|
-
"node": "^14
|
|
168
|
+
"node": "^16.14||>=18"
|
|
425
169
|
},
|
|
426
170
|
"types": "types/state-machine-cat.d.ts",
|
|
427
171
|
"browserslist": [
|
package/dist/commonjs/bundle.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";var Ul=Object.create;var ve=Object.defineProperty;var Jl=Object.getOwnPropertyDescriptor;var Xl=Object.getOwnPropertyNames;var Gl=Object.getPrototypeOf,Wl=Object.prototype.hasOwnProperty;var q=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ql=(t,e)=>{for(var n in e)ve(t,n,{get:e[n],enumerable:!0})},rn=(t,e,n,m)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Xl(e))!Wl.call(t,a)&&a!==n&&ve(t,a,{get:()=>e[a],enumerable:!(m=Jl(e,a))||m.enumerable});return t};var F=(t,e,n)=>(n=t!=null?Ul(Gl(t)):{},rn(e||!t||!t.__esModule?ve(n,"default",{value:t,enumerable:!0}):n,t)),Yl=t=>rn(ve({},"__esModule",{value:!0}),t);var $n=q((fs,xn)=>{"use strict";function ee(t){return Object.prototype.toString.call(t)}function po(t){return ee(t)==="[object Date]"}function mo(t){return ee(t)==="[object RegExp]"}function ho(t){return ee(t)==="[object Error]"}function go(t){return ee(t)==="[object Boolean]"}function yo(t){return ee(t)==="[object Number]"}function vo(t){return ee(t)==="[object String]"}var gn=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};function be(t,e){if(t.forEach)return t.forEach(e);for(var n=0;n<t.length;n++)e(t[n],n,t)}var xe=Object.keys||function(e){var n=[];for(var m in e)n.push(m);return n},$e=Object.prototype.hasOwnProperty||function(t,e){return e in t};function yn(t){if(typeof t=="object"&&t!==null){var e;if(gn(t))e=[];else if(po(t))e=new Date(t.getTime?t.getTime():t);else if(mo(t))e=new RegExp(t);else if(ho(t))e={message:t.message};else if(go(t)||yo(t)||vo(t))e=Object(t);else if(Object.create&&Object.getPrototypeOf)e=Object.create(Object.getPrototypeOf(t));else if(t.constructor===Object)e={};else{var n=t.constructor&&t.constructor.prototype||t.__proto__||{},m=function(){};m.prototype=n,e=new m}return be(xe(t),function(a){e[a]=t[a]}),e}return t}function vn(t,e,n){var m=[],a=[],c=!0;return function i(f){var g=n?yn(f):f,p={},d=!0,l={node:g,node_:f,path:[].concat(m),parent:a[a.length-1],parents:a,key:m[m.length-1],isRoot:m.length===0,level:m.length,circular:null,update:function(I,x){l.isRoot||(l.parent.node[l.key]=I),l.node=I,x&&(d=!1)},delete:function(I){delete l.parent.node[l.key],I&&(d=!1)},remove:function(I){gn(l.parent.node)?l.parent.node.splice(l.key,1):delete l.parent.node[l.key],I&&(d=!1)},keys:null,before:function(I){p.before=I},after:function(I){p.after=I},pre:function(I){p.pre=I},post:function(I){p.post=I},stop:function(){c=!1},block:function(){d=!1}};if(!c)return l;function b(){if(typeof l.node=="object"&&l.node!==null){(!l.keys||l.node_!==l.node)&&(l.keys=xe(l.node)),l.isLeaf=l.keys.length===0;for(var I=0;I<a.length;I++)if(a[I].node_===f){l.circular=a[I];break}}else l.isLeaf=!0,l.keys=null;l.notLeaf=!l.isLeaf,l.notRoot=!l.isRoot}b();var u=e.call(l,l.node);return u!==void 0&&l.update&&l.update(u),p.before&&p.before.call(l,l.node),d&&(typeof l.node=="object"&&l.node!==null&&!l.circular&&(a.push(l),b(),be(l.keys,function(I,x){m.push(I),p.pre&&p.pre.call(l,l.node[I],I);var _=i(l.node[I]);n&&$e.call(l.node,I)&&(l.node[I]=_.node),_.isLast=x===l.keys.length-1,_.isFirst=x===0,p.post&&p.post.call(l,_),m.pop()}),a.pop()),p.after&&p.after.call(l,l.node)),l}(t).node}function V(t){this.value=t}V.prototype.get=function(t){for(var e=this.value,n=0;n<t.length;n++){var m=t[n];if(!e||!$e.call(e,m))return;e=e[m]}return e};V.prototype.has=function(t){for(var e=this.value,n=0;n<t.length;n++){var m=t[n];if(!e||!$e.call(e,m))return!1;e=e[m]}return!0};V.prototype.set=function(t,e){for(var n=this.value,m=0;m<t.length-1;m++){var a=t[m];$e.call(n,a)||(n[a]={}),n=n[a]}return n[t[m]]=e,e};V.prototype.map=function(t){return vn(this.value,t,!0)};V.prototype.forEach=function(t){return this.value=vn(this.value,t,!1),this.value};V.prototype.reduce=function(t,e){var n=arguments.length===1,m=n?this.value:e;return this.forEach(function(a){(!this.isRoot||!n)&&(m=t.call(this,m,a))}),m};V.prototype.paths=function(){var t=[];return this.forEach(function(){t.push(this.path)}),t};V.prototype.nodes=function(){var t=[];return this.forEach(function(){t.push(this.node)}),t};V.prototype.clone=function(){var t=[],e=[];return function n(m){for(var a=0;a<t.length;a++)if(t[a]===m)return e[a];if(typeof m=="object"&&m!==null){var c=yn(m);return t.push(m),e.push(c),be(xe(m),function(i){c[i]=n(m[i])}),t.pop(),e.pop(),c}return m}(this.value)};function bn(t){return new V(t)}be(xe(V.prototype),function(t){bn[t]=function(e){var n=[].slice.call(arguments,1),m=new V(e);return m[t].apply(m,n)}});xn.exports=bn});var Rn=q(()=>{"use strict";var Le=require("handlebars/dist/handlebars.runtime"),Ro=Le.template,No=Le.templates=Le.templates||{};No["smcat.template.hbs"]=Ro({1:function(t,e,n,m,a){var c=e??(t.nullContext||{}),i=t.hooks.helperMissing,f="function",g=t.hooks.blockHelperMissing,p=t.lookupProperty||function(I,x){if(Object.prototype.hasOwnProperty.call(I,x))return I[x]},d="",l=(l=p(n,"note")||(e!=null?p(e,"note"):e))!=null?l:i,b={name:"note",hash:{},fn:t.program(2,a,0),inverse:t.noop,data:a,loc:{start:{line:2,column:0},end:{line:4,column:9}}},u=typeof l==f?l.call(c,b):l;return(u=p(n,"note")?u:g.call(e,u,b))!=null&&(d+=u),d+=(u=(p(n,"quotifyState")||e&&p(e,"quotifyState")||i).call(c,e!=null?p(e,"name"):e,{name:"quotifyState",hash:{},fn:t.program(4,a,0),inverse:t.noop,data:a,loc:{start:{line:5,column:0},end:{line:5,column:40}}}))!=null?u:"",l=(l=p(n,"hasExtendedAttributes")||(e!=null?p(e,"hasExtendedAttributes"):e))!=null?l:i,b={name:"hasExtendedAttributes",hash:{},fn:t.program(6,a,0),inverse:t.noop,data:a,loc:{start:{line:6,column:4},end:{line:6,column:270}}},u=typeof l==f?l.call(c,b):l,(u=p(n,"hasExtendedAttributes")?u:g.call(e,u,b))!=null&&(d+=u),d+=(u=p(n,"if").call(c,e!=null?p(e,"actions"):e,{name:"if",hash:{},fn:t.program(18,a,0),inverse:t.noop,data:a,loc:{start:{line:7,column:4},end:{line:7,column:28}}}))!=null?u:"",l=(l=p(n,"actions")||(e!=null?p(e,"actions"):e))!=null?l:i,b={name:"actions",hash:{},fn:t.program(20,a,0),inverse:t.noop,data:a,loc:{start:{line:7,column:28},end:{line:7,column:93}}},u=typeof l==f?l.call(c,b):l,(u=p(n,"actions")?u:g.call(e,u,b))!=null&&(d+=u),l=(l=p(n,"statemachine")||(e!=null?p(e,"statemachine"):e))!=null?l:i,b={name:"statemachine",hash:{},fn:t.program(22,a,0),inverse:t.noop,data:a,loc:{start:{line:8,column:4},end:{line:10,column:19}}},u=typeof l==f?l.call(c,b):l,(u=p(n,"statemachine")?u:g.call(e,u,b))!=null&&(d+=u),d+((u=p(n,"if").call(c,a&&p(a,"last"),{name:"if",hash:{},fn:t.program(24,a,0),inverse:t.program(26,a,0),data:a,loc:{start:{line:11,column:0},end:{line:11,column:30}}}))!=null?u:"")+`
|
|
2
|
-
`},2:function(t,e,n,m,a){return"# "+((t=t.lambda(e,e))!=null?t:"")+`
|
|
3
|
-
`},4:function(t,e,n,m,a){return""},6:function(t,e,n,m,a){var c=e??(t.nullContext||{}),i=t.hooks.helperMissing,f="function",g=t.hooks.blockHelperMissing,p=t.lookupProperty||function(I,x){if(Object.prototype.hasOwnProperty.call(I,x))return I[x]},d=" [",l=(l=p(n,"typeExplicitlySet")||(e!=null?p(e,"typeExplicitlySet"):e))!=null?l:i,b={name:"typeExplicitlySet",hash:{},fn:t.program(7,a,0),inverse:t.noop,data:a,loc:{start:{line:6,column:32},end:{line:6,column:107}}},u=typeof l==f?l.call(c,b):l;return(u=p(n,"typeExplicitlySet")?u:g.call(e,u,b))!=null&&(d+=u),l=(l=p(n,"label")||(e!=null?p(e,"label"):e))!=null?l:i,b={name:"label",hash:{},fn:t.program(10,a,0),inverse:t.noop,data:a,loc:{start:{line:6,column:107},end:{line:6,column:142}}},u=typeof l==f?l.call(c,b):l,(u=p(n,"label")?u:g.call(e,u,b))!=null&&(d+=u),l=(l=p(n,"color")||(e!=null?p(e,"color"):e))!=null?l:i,b={name:"color",hash:{},fn:t.program(12,a,0),inverse:t.noop,data:a,loc:{start:{line:6,column:142},end:{line:6,column:178}}},u=typeof l==f?l.call(c,b):l,(u=p(n,"color")?u:g.call(e,u,b))!=null&&(d+=u),l=(l=p(n,"class")||(e!=null?p(e,"class"):e))!=null?l:i,b={name:"class",hash:{},fn:t.program(14,a,0),inverse:t.noop,data:a,loc:{start:{line:6,column:178},end:{line:6,column:214}}},u=typeof l==f?l.call(c,b):l,(u=p(n,"class")?u:g.call(e,u,b))!=null&&(d+=u),d+((u=p(n,"if").call(c,e!=null?p(e,"active"):e,{name:"if",hash:{},fn:t.program(16,a,0),inverse:t.noop,data:a,loc:{start:{line:6,column:214},end:{line:6,column:242}}}))!=null?u:"")+"]"},7:function(t,e,n,m,i){var c=t.lookupProperty||function(g,p){if(Object.prototype.hasOwnProperty.call(g,p))return g[p]},f=(f=c(n,"type")||(e!=null?c(e,"type"):e))!=null?f:t.hooks.helperMissing,i={name:"type",hash:{},fn:t.program(8,i,0),inverse:t.noop,data:i,loc:{start:{line:6,column:54},end:{line:6,column:85}}},f=typeof f=="function"?f.call(e??(t.nullContext||{}),i):f;return(f=c(n,"type")?f:t.hooks.blockHelperMissing.call(e,f,i))!=null?f:""},8:function(t,e,n,m,a){return"type="+((t=t.lambda(e,e))!=null?t:"")+" "},10:function(t,e,n,m,a){return'label="'+((t=t.lambda(e,e))!=null?t:"")+'"'},12:function(t,e,n,m,a){return' color="'+((t=t.lambda(e,e))!=null?t:"")+'"'},14:function(t,e,n,m,a){return' class="'+((t=t.lambda(e,e))!=null?t:"")+'"'},16:function(t,e,n,m,a){return" active"},18:function(t,e,n,m,a){return": "},20:function(t,e,n,m,a){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return(n=(c(n,"quotifyActions")||e&&c(e,"quotifyActions")||t.hooks.helperMissing).call(e??(t.nullContext||{}),e,{name:"quotifyActions",hash:{},fn:t.program(4,a,0),inverse:t.noop,data:a,loc:{start:{line:7,column:40},end:{line:7,column:80}}}))!=null?n:""},22:function(t,e,n,m,a){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return` {
|
|
4
|
-
`+((c=t.invokePartial(c(m,"smcat.template.hbs"),e,{name:"smcat.template.hbs",data:a,indent:" ",helpers:n,partials:m,decorators:t.decorators}))!=null?c:"")+"}"},24:function(t,e,n,m,a){return";"},26:function(t,e,n,m,a){return","},28:function(t,e,n,m,a){var c=e??(t.nullContext||{}),i=t.hooks.helperMissing,f="function",g=t.hooks.blockHelperMissing,p=t.lookupProperty||function(I,x){if(Object.prototype.hasOwnProperty.call(I,x))return I[x]},d="",l=(l=p(n,"note")||(e!=null?p(e,"note"):e))!=null?l:i,b={name:"note",hash:{},fn:t.program(2,a,0),inverse:t.noop,data:a,loc:{start:{line:15,column:0},end:{line:17,column:9}}},u=typeof l==f?l.call(c,b):l;return(u=p(n,"note")?u:g.call(e,u,b))!=null&&(d+=u),d+=((u=(p(n,"quotifyState")||e&&p(e,"quotifyState")||i).call(c,e!=null?p(e,"from"):e,{name:"quotifyState",hash:{},fn:t.program(4,a,0),inverse:t.noop,data:a,loc:{start:{line:18,column:0},end:{line:18,column:39}}}))!=null?u:"")+" => "+((u=(p(n,"quotifyState")||e&&p(e,"quotifyState")||i).call(c,e!=null?p(e,"to"):e,{name:"quotifyState",hash:{},fn:t.program(4,a,0),inverse:t.noop,data:a,loc:{start:{line:18,column:43},end:{line:18,column:81}}}))!=null?u:""),l=(l=p(n,"hasExtendedAttributes")||(e!=null?p(e,"hasExtendedAttributes"):e))!=null?l:i,b={name:"hasExtendedAttributes",hash:{},fn:t.program(29,a,0),inverse:t.noop,data:a,loc:{start:{line:19,column:4},end:{line:19,column:130}}},u=typeof l==f?l.call(c,b):l,(u=p(n,"hasExtendedAttributes")?u:g.call(e,u,b))!=null&&(d+=u),l=(l=p(n,"label")||(e!=null?p(e,"label"):e))!=null?l:i,b={name:"label",hash:{},fn:t.program(34,a,0),inverse:t.noop,data:a,loc:{start:{line:20,column:4},end:{line:20,column:62}}},u=typeof l==f?l.call(c,b):l,(u=p(n,"label")?u:g.call(e,u,b))!=null&&(d+=u),d+`;
|
|
5
|
-
`},29:function(t,e,n,m,a){var c=e??(t.nullContext||{}),i=t.hooks.helperMissing,f="function",g=t.hooks.blockHelperMissing,p=t.lookupProperty||function(I,x){if(Object.prototype.hasOwnProperty.call(I,x))return I[x]},d=" [",l=(l=p(n,"color")||(e!=null?p(e,"color"):e))!=null?l:i,b={name:"color",hash:{},fn:t.program(30,a,0),inverse:t.noop,data:a,loc:{start:{line:19,column:32},end:{line:19,column:68}}},u=typeof l==f?l.call(c,b):l;return(u=p(n,"color")?u:g.call(e,u,b))!=null&&(d+=u),l=(l=p(n,"type")||(e!=null?p(e,"type"):e))!=null?l:i,b={name:"type",hash:{},fn:t.program(32,a,0),inverse:t.noop,data:a,loc:{start:{line:19,column:69},end:{line:19,column:102}}},u=typeof l==f?l.call(c,b):l,(u=p(n,"type")?u:g.call(e,u,b))!=null&&(d+=u),d+"]"},30:function(t,e,n,m,a){return'color="'+((t=t.lambda(e,e))!=null?t:"")+'"'},32:function(t,e,n,m,a){return" type="+((t=t.lambda(e,e))!=null?t:"")},34:function(t,e,n,m,a){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return": "+((n=(c(n,"quotifyLabel")||e&&c(e,"quotifyLabel")||t.hooks.helperMissing).call(e??(t.nullContext||{}),e,{name:"quotifyLabel",hash:{},fn:t.program(4,a,0),inverse:t.noop,data:a,loc:{start:{line:20,column:16},end:{line:20,column:52}}}))!=null?n:"")},compiler:[8,">= 4.3.0"],main:function(t,e,n,m,p){var c=e??(t.nullContext||{}),i=t.lookupProperty||function(l,b){if(Object.prototype.hasOwnProperty.call(l,b))return l[b]},f=((d=i(n,"each").call(c,e!=null?i(e,"states"):e,{name:"each",hash:{},fn:t.program(1,p,0),inverse:t.noop,data:p,loc:{start:{line:1,column:0},end:{line:12,column:9}}}))!=null?d:"")+`
|
|
6
|
-
`,g=(g=i(n,"transitions")||(e!=null?i(e,"transitions"):e))!=null?g:t.hooks.helperMissing,p={name:"transitions",hash:{},fn:t.program(28,p,0),inverse:t.noop,data:p,loc:{start:{line:14,column:0},end:{line:21,column:16}}},d=typeof g=="function"?g.call(c,p):g;return(d=i(n,"transitions")?d:t.hooks.blockHelperMissing.call(e,d,p))!=null&&(f+=d),f},usePartial:!0,useData:!0})});var Bn=q((Os,Ln)=>{"use strict";var te=require("handlebars/dist/handlebars.runtime.js"),Nn=require("lodash/cloneDeep.js");Rn();var Vo=/;|,|{| |\[/,Lo=/;|,|{/,Bo=/;|{/;function Be(t,e){return t.test(e)?`"${e}"`:e}te.registerPartial("smcat.template.hbs",te.templates["smcat.template.hbs"]);function Do(t){return t==="activity"?"":`${t}/ `}function Ho(t){return{...t,actions:(t.actions||[]).map(e=>`${Do(e.type)}${e.body}`).join(`
|
|
7
|
-
`)}}function qo(t){return(Object.prototype.hasOwnProperty.call(t,"label")||Object.prototype.hasOwnProperty.call(t,"typeExplicitlySet")||Object.prototype.hasOwnProperty.call(t,"color")||Object.prototype.hasOwnProperty.call(t,"active")||Object.prototype.hasOwnProperty.call(t,"class"))&&(t.hasExtendedAttributes=!0),t}function Vn(t){return t.map(qo).filter(e=>e.statemachine).forEach(e=>{e.statemachine.states=Vn(e.statemachine.states)}),t.map(Ho)}function Mo(t){return(Object.prototype.hasOwnProperty.call(t,"type")||Object.prototype.hasOwnProperty.call(t,"color")||Object.prototype.hasOwnProperty.call(t,"class"))&&(t.hasExtendedAttributes=!0),t}function zo(t){return t.map(Mo)}te.registerHelper("quotifyState",t=>Be(Vo,t));te.registerHelper("quotifyLabel",t=>Be(Bo,t));te.registerHelper("quotifyActions",t=>Be(Lo,t));Ln.exports=function(e){return te.templates["smcat.template.hbs"]({...e,states:Vn(Nn(e.states)),transitions:zo(Nn(e.transitions||[]))})}});var qn=q(()=>{"use strict";var qe=require("handlebars/dist/handlebars.runtime"),mi=qe.template,di=qe.templates=qe.templates||{};di["dot.template.hbs"]=mi({1:function(t,e,n,m,a,c,i){var f=e??(t.nullContext||{}),g=t.hooks.helperMissing,p="function",d=t.hooks.blockHelperMissing,l=t.lookupProperty||function(_,B){if(Object.prototype.hasOwnProperty.call(_,B))return _[B]},b="",u=(u=l(n,"noteName")||(e!=null?l(e,"noteName"):e))!=null?u:g,I={name:"noteName",hash:{},fn:t.noop,inverse:t.program(2,a,0,c,i),data:a,loc:{start:{line:9,column:2},end:{line:26,column:15}}},x=typeof u==p?u.call(f,I):u;return(x=l(n,"noteName")?x:d.call(e,x,I))!=null&&(b+=x),u=(u=l(n,"noteName")||(e!=null?l(e,"noteName"):e))!=null?u:g,I={name:"noteName",hash:{},fn:t.program(19,a,0,c,i),inverse:t.noop,data:a,loc:{start:{line:27,column:2},end:{line:37,column:15}}},x=typeof u==p?u.call(f,I):u,(x=l(n,"noteName")?x:d.call(e,x,I))!=null&&(b+=x),b},2:function(t,e,n,m,a){var c=e??(t.nullContext||{}),i=t.hooks.helperMissing,f="function",g=t.hooks.blockHelperMissing,p=t.lookupProperty||function(I,x){if(Object.prototype.hasOwnProperty.call(I,x))return I[x]},d="",l=(l=p(n,"isCompositeSelf")||(e!=null?p(e,"isCompositeSelf"):e))!=null?l:i,b={name:"isCompositeSelf",hash:{},fn:t.noop,inverse:t.program(3,a,0),data:a,loc:{start:{line:10,column:4},end:{line:16,column:24}}},u=typeof l==f?l.call(c,b):l;return(u=p(n,"isCompositeSelf")?u:g.call(e,u,b))!=null&&(d+=u),l=(l=p(n,"isCompositeSelf")||(e!=null?p(e,"isCompositeSelf"):e))!=null?l:i,b={name:"isCompositeSelf",hash:{},fn:t.program(14,a,0),inverse:t.noop,data:a,loc:{start:{line:17,column:4},end:{line:25,column:24}}},u=typeof l==f?l.call(c,b):l,(u=p(n,"isCompositeSelf")?u:g.call(e,u,b))!=null&&(d+=u),d},3:function(t,e,n,m,a){var c=e??(t.nullContext||{}),i=t.hooks.helperMissing,f="function",g=t.hooks.blockHelperMissing,p=t.lookupProperty||function(I,x){if(Object.prototype.hasOwnProperty.call(I,x))return I[x]},d=' "'+((u=typeof(l=(l=p(n,"from")||(e!=null?p(e,"from"):e))!=null?l:i)==f?l.call(c,{name:"from",hash:{},data:a,loc:{start:{line:11,column:5},end:{line:11,column:15}}}):l)!=null?u:"")+'" -> "'+((u=typeof(l=(l=p(n,"to")||(e!=null?p(e,"to"):e))!=null?l:i)==f?l.call(c,{name:"to",hash:{},data:a,loc:{start:{line:11,column:21},end:{line:11,column:29}}}):l)!=null?u:"")+'" [label="',l=(l=p(n,"label")||(e!=null?p(e,"label"):e))!=null?l:i,b={name:"label",hash:{},fn:t.noop,inverse:t.program(4,a,0),data:a,loc:{start:{line:11,column:39},end:{line:11,column:60}}},u=typeof l==f?l.call(c,b):l;return(u=p(n,"label")?u:g.call(e,u,b))!=null&&(d+=u),d+=((u=typeof(l=(l=p(n,"label")||(e!=null?p(e,"label"):e))!=null?l:i)==f?l.call(c,{name:"label",hash:{},data:a,loc:{start:{line:11,column:60},end:{line:11,column:71}}}):l)!=null?u:"")+'"',l=(l=p(n,"fromComposite")||(e!=null?p(e,"fromComposite"):e))!=null?l:i,b={name:"fromComposite",hash:{},fn:t.program(6,a,0),inverse:t.noop,data:a,loc:{start:{line:12,column:28},end:{line:12,column:92}}},u=typeof l==f?l.call(c,b):l,(u=p(n,"fromComposite")?u:g.call(e,u,b))!=null&&(d+=u),l=(l=p(n,"toComposite")||(e!=null?p(e,"toComposite"):e))!=null?l:i,b={name:"toComposite",hash:{},fn:t.program(8,a,0),inverse:t.noop,data:a,loc:{start:{line:13,column:28},end:{line:13,column:86}}},u=typeof l==f?l.call(c,b):l,(u=p(n,"toComposite")?u:g.call(e,u,b))!=null&&(d+=u),l=(l=p(n,"color")||(e!=null?p(e,"color"):e))!=null?l:i,b={name:"color",hash:{},fn:t.program(10,a,0),inverse:t.noop,data:a,loc:{start:{line:14,column:28},end:{line:14,column:85}}},u=typeof l==f?l.call(c,b):l,(u=p(n,"color")?u:g.call(e,u,b))!=null&&(d+=u),l=(l=p(n,"width")||(e!=null?p(e,"width"):e))!=null?l:i,b={name:"width",hash:{},fn:t.program(12,a,0),inverse:t.noop,data:a,loc:{start:{line:15,column:28},end:{line:15,column:68}}},u=typeof l==f?l.call(c,b):l,(u=p(n,"width")?u:g.call(e,u,b))!=null&&(d+=u),d+' class="'+((u=typeof(l=(l=p(n,"class")||(e!=null?p(e,"class"):e))!=null?l:i)==f?l.call(c,{name:"class",hash:{},data:a,loc:{start:{line:15,column:76},end:{line:15,column:87}}}):l)!=null?u:"")+`"]
|
|
8
|
-
`},4:function(t,e,n,m,a){return" "},6:function(t,e,n,m,a){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return' ltail="cluster_'+((c=typeof(n=(n=c(n,"from")||(e!=null?c(e,"from"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"from",hash:{},data:a,loc:{start:{line:12,column:63},end:{line:12,column:73}}}):n)!=null?c:"")+'"'},8:function(t,e,n,m,a){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return' lhead="cluster_'+((c=typeof(n=(n=c(n,"to")||(e!=null?c(e,"to"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"to",hash:{},data:a,loc:{start:{line:13,column:61},end:{line:13,column:69}}}):n)!=null?c:"")+'"'},10:function(i,e,n,m,a){var c,i=i.lambda;return' color="'+((c=i(e,e))!=null?c:"")+'" fontcolor="'+((c=i(e,e))!=null?c:"")+'"'},12:function(t,e,n,m,a){return' penwidth="'+((t=t.lambda(e,e))!=null?t:"")+'"'},14:function(t,e,n,m,a){var c=e??(t.nullContext||{}),i=t.hooks.helperMissing,f="function",g=t.hooks.blockHelperMissing,p=t.lookupProperty||function(I,x){if(Object.prototype.hasOwnProperty.call(I,x))return I[x]},d=' "'+((u=typeof(l=(l=p(n,"from")||(e!=null?p(e,"from"):e))!=null?l:i)==f?l.call(c,{name:"from",hash:{},data:a,loc:{start:{line:18,column:7},end:{line:18,column:17}}}):l)!=null?u:"")+'" -> "self_'+((u=typeof(l=(l=p(n,"name")||(e!=null?p(e,"name"):e))!=null?l:i)==f?l.call(c,{name:"name",hash:{},data:a,loc:{start:{line:18,column:28},end:{line:18,column:38}}}):l)!=null?u:"")+'" [label="',l=(l=p(n,"label")||(e!=null?p(e,"label"):e))!=null?l:i,b={name:"label",hash:{},fn:t.noop,inverse:t.program(4,a,0),data:a,loc:{start:{line:18,column:48},end:{line:18,column:69}}},u=typeof l==f?l.call(c,b):l;return(u=p(n,"label")?u:g.call(e,u,b))!=null&&(d+=u),d+=((u=typeof(l=(l=p(n,"label")||(e!=null?p(e,"label"):e))!=null?l:i)==f?l.call(c,{name:"label",hash:{},data:a,loc:{start:{line:18,column:69},end:{line:18,column:80}}}):l)!=null?u:"")+'" arrowhead=none',l=(l=p(n,"tailportflags")||(e!=null?p(e,"tailportflags"):e))!=null?l:i,b={name:"tailportflags",hash:{},fn:t.program(15,a,0),inverse:t.noop,data:a,loc:{start:{line:19,column:28},end:{line:19,column:73}}},u=typeof l==f?l.call(c,b):l,(u=p(n,"tailportflags")?u:g.call(e,u,b))!=null&&(d+=u),d+=' ltail="cluster_'+((u=typeof(l=(l=p(n,"from")||(e!=null?p(e,"from"):e))!=null?l:i)==f?l.call(c,{name:"from",hash:{},data:a,loc:{start:{line:19,column:89},end:{line:19,column:99}}}):l)!=null?u:"")+'"',l=(l=p(n,"color")||(e!=null?p(e,"color"):e))!=null?l:i,b={name:"color",hash:{},fn:t.program(10,a,0),inverse:t.noop,data:a,loc:{start:{line:20,column:28},end:{line:20,column:85}}},u=typeof l==f?l.call(c,b):l,(u=p(n,"color")?u:g.call(e,u,b))!=null&&(d+=u),d+=' class="'+((u=typeof(l=(l=p(n,"class")||(e!=null?p(e,"class"):e))!=null?l:i)==f?l.call(c,{name:"class",hash:{},data:a,loc:{start:{line:20,column:93},end:{line:20,column:104}}}):l)!=null?u:"")+`"]
|
|
9
|
-
"self_`+((u=typeof(l=(l=p(n,"name")||(e!=null?p(e,"name"):e))!=null?l:i)==f?l.call(c,{name:"name",hash:{},data:a,loc:{start:{line:21,column:12},end:{line:21,column:22}}}):l)!=null?u:"")+'" -> "'+((u=typeof(l=(l=p(n,"from")||(e!=null?p(e,"from"):e))!=null?l:i)==f?l.call(c,{name:"from",hash:{},data:a,loc:{start:{line:21,column:28},end:{line:21,column:38}}}):l)!=null?u:"")+'" [lhead="cluster_'+((u=typeof(l=(l=p(n,"from")||(e!=null?p(e,"from"):e))!=null?l:i)==f?l.call(c,{name:"from",hash:{},data:a,loc:{start:{line:21,column:56},end:{line:21,column:66}}}):l)!=null?u:"")+'"',l=(l=p(n,"headportflags")||(e!=null?p(e,"headportflags"):e))!=null?l:i,b={name:"headportflags",hash:{},fn:t.program(15,a,0),inverse:t.noop,data:a,loc:{start:{line:22,column:28},end:{line:22,column:73}}},u=typeof l==f?l.call(c,b):l,(u=p(n,"headportflags")?u:g.call(e,u,b))!=null&&(d+=u),l=(l=p(n,"color")||(e!=null?p(e,"color"):e))!=null?l:i,b={name:"color",hash:{},fn:t.program(17,a,0),inverse:t.noop,data:a,loc:{start:{line:23,column:28},end:{line:23,column:65}}},u=typeof l==f?l.call(c,b):l,(u=p(n,"color")?u:g.call(e,u,b))!=null&&(d+=u),l=(l=p(n,"width")||(e!=null?p(e,"width"):e))!=null?l:i,b={name:"width",hash:{},fn:t.program(12,a,0),inverse:t.noop,data:a,loc:{start:{line:24,column:28},end:{line:24,column:68}}},u=typeof l==f?l.call(c,b):l,(u=p(n,"width")?u:g.call(e,u,b))!=null&&(d+=u),d+' class="'+((u=typeof(l=(l=p(n,"class")||(e!=null?p(e,"class"):e))!=null?l:i)==f?l.call(c,{name:"class",hash:{},data:a,loc:{start:{line:24,column:76},end:{line:24,column:87}}}):l)!=null?u:"")+`"]
|
|
10
|
-
`},15:function(t,e,n,m,a){return" "+((t=t.lambda(e,e))!=null?t:"")},17:function(t,e,n,m,a){return' color="'+((t=t.lambda(e,e))!=null?t:"")+'"'},19:function(t,e,n,m,a,c,i){var f,g=t.lambda,p=t.hooks.blockHelperMissing,d=t.lookupProperty||function(l,b){if(Object.prototype.hasOwnProperty.call(l,b))return l[b]};return' "i_'+((f=g(e,e))!=null?f:"")+`" [shape=point style=invis margin=0 width=0 height=0 fixedsize=true]
|
|
11
|
-
"`+((f=g(i[1]!=null?d(i[1],"from"):i[1],e))!=null?f:"")+'" -> "i_'+((f=g(e,e))!=null?f:"")+'" [arrowhead=none'+((f=p.call(e,g(i[1]!=null?d(i[1],"fromComposite"):i[1],e),{name:"../fromComposite",hash:{},fn:t.program(20,a,0,c,i),inverse:t.noop,data:a,loc:{start:{line:30,column:32},end:{line:30,column:105}}}))!=null?f:"")+((f=p.call(e,g(i[1]!=null?d(i[1],"color"):i[1],e),{name:"../color",hash:{},fn:t.program(17,a,0,c,i),inverse:t.noop,data:a,loc:{start:{line:31,column:32},end:{line:31,column:75}}}))!=null?f:"")+`]
|
|
12
|
-
"i_`+((f=g(e,e))!=null?f:"")+'" -> "'+((f=g(i[1]!=null?d(i[1],"to"):i[1],e))!=null?f:"")+'" [label="'+((f=p.call(e,g(i[1]!=null?d(i[1],"label"):i[1],e),{name:"../label",hash:{},fn:t.noop,inverse:t.program(4,a,0,c,i),data:a,loc:{start:{line:32,column:43},end:{line:32,column:70}}}))!=null?f:"")+((f=g(i[1]!=null?d(i[1],"label"):i[1],e))!=null?f:"")+'"'+((f=p.call(e,g(i[1]!=null?d(i[1],"toComposite"):i[1],e),{name:"../toComposite",hash:{},fn:t.program(22,a,0,c,i),inverse:t.noop,data:a,loc:{start:{line:33,column:32},end:{line:33,column:99}}}))!=null?f:"")+((f=p.call(e,g(i[1]!=null?d(i[1],"color"):i[1],e),{name:"../color",hash:{},fn:t.program(10,a,0,c,i),inverse:t.noop,data:a,loc:{start:{line:34,column:32},end:{line:34,column:95}}}))!=null?f:"")+`]
|
|
13
|
-
"i_`+((f=g(e,e))!=null?f:"")+'" -> "'+((f=g(e,e))!=null?f:"")+`" [style=dashed arrowtail=none arrowhead=none weight=0]
|
|
14
|
-
"`+((f=g(e,e))!=null?f:"")+'" [label="'+((f=g(i[1]!=null?d(i[1],"noteFlattened"):i[1],e))!=null?f:"")+`" shape=note fontsize=10 color=black fontcolor=black fillcolor="#ffffcc" penwidth=1.0]
|
|
15
|
-
`},20:function(t,e,n,m,a,c,i){var f=t.lookupProperty||function(g,p){if(Object.prototype.hasOwnProperty.call(g,p))return g[p]};return' ltail="cluster_'+((t=t.lambda(i[1]!=null?f(i[1],"from"):i[1],e))!=null?t:"")+'"'},22:function(t,e,n,m,a,c,i){var f=t.lookupProperty||function(g,p){if(Object.prototype.hasOwnProperty.call(g,p))return g[p]};return' lhead="cluster_'+((t=t.lambda(i[1]!=null?f(i[1],"to"):i[1],e))!=null?t:"")+'"'},compiler:[8,">= 4.3.0"],main:function(t,e,n,d,a,c,i){var f=e??(t.nullContext||{}),b=t.hooks.helperMissing,g="function",p=t.lookupProperty||function(I,x){if(Object.prototype.hasOwnProperty.call(I,x))return I[x]},d=`digraph "state transitions" {
|
|
16
|
-
`+((u=typeof(l=(l=p(n,"graphAttributes")||(e!=null?p(e,"graphAttributes"):e))!=null?l:b)==g?l.call(f,{name:"graphAttributes",hash:{},data:a,loc:{start:{line:2,column:2},end:{line:2,column:23}}}):l)!=null?u:"")+`
|
|
17
|
-
node [`+((u=typeof(l=(l=p(n,"nodeAttributes")||(e!=null?p(e,"nodeAttributes"):e))!=null?l:b)==g?l.call(f,{name:"nodeAttributes",hash:{},data:a,loc:{start:{line:3,column:8},end:{line:3,column:28}}}):l)!=null?u:"")+`]
|
|
18
|
-
edge [`+((u=typeof(l=(l=p(n,"edgeAttributes")||(e!=null?p(e,"edgeAttributes"):e))!=null?l:b)==g?l.call(f,{name:"edgeAttributes",hash:{},data:a,loc:{start:{line:4,column:8},end:{line:4,column:28}}}):l)!=null?u:"")+`]
|
|
19
|
-
|
|
20
|
-
`+((u=t.invokePartial(p(d,"dot.states.template.hbs"),e,{name:"dot.states.template.hbs",data:a,indent:" ",helpers:n,partials:d,decorators:t.decorators}))!=null?u:"")+`
|
|
21
|
-
`,l=(l=p(n,"transitions")||(e!=null?p(e,"transitions"):e))!=null?l:b,b={name:"transitions",hash:{},fn:t.program(1,a,0,c,i),inverse:t.noop,data:a,loc:{start:{line:8,column:2},end:{line:38,column:18}}},u=typeof l==g?l.call(f,b):l;return(u=p(n,"transitions")?u:t.hooks.blockHelperMissing.call(e,u,b))!=null&&(d+=u),d+`}
|
|
22
|
-
`},usePartial:!0,useData:!0,useDepths:!0})});var Mn=q(()=>{"use strict";var Me=require("handlebars/dist/handlebars.runtime"),hi=Me.template,gi=Me.templates=Me.templates||{};gi["dot.states.template.hbs"]=hi({1:function(t,e,n,m,f){var c=t.lookupProperty||function(p,d){if(Object.prototype.hasOwnProperty.call(p,d))return p[d]},i="",g=(g=c(n,"nestedExternalSelfTransitions")||(e!=null?c(e,"nestedExternalSelfTransitions"):e))!=null?g:t.hooks.helperMissing,f={name:"nestedExternalSelfTransitions",hash:{},fn:t.program(2,f,0),inverse:t.noop,data:f,loc:{start:{line:2,column:2},end:{line:4,column:36}}},g=typeof g=="function"?g.call(e??(t.nullContext||{}),f):g;return(g=c(n,"nestedExternalSelfTransitions")?g:t.hooks.blockHelperMissing.call(e,g,f))!=null&&(i+=g),i},2:function(t,e,n,m,a){return' "self_'+((t=t.lambda(e,e))!=null?t:"")+`" [shape=point style=invis width=0 height=0 fixedsize=true]
|
|
23
|
-
`},4:function(t,e,n,m,a){var c,i,f=e??(t.nullContext||{}),g=t.hooks.helperMissing,p="function",d=t.lookupProperty||function(l,b){if(Object.prototype.hasOwnProperty.call(l,b))return l[b]};return' "'+((c=typeof(i=(i=d(n,"name")||(e!=null?d(e,"name"):e))!=null?i:g)==p?i.call(f,{name:"name",hash:{},data:a,loc:{start:{line:7,column:3},end:{line:7,column:13}}}):i)!=null?c:"")+'" [shape=circle style=filled class="'+((c=typeof(i=(i=d(n,"class")||(e!=null?d(e,"class"):e))!=null?i:g)==p?i.call(f,{name:"class",hash:{},data:a,loc:{start:{line:7,column:49},end:{line:7,column:60}}}):i)!=null?c:"")+'" '+((c=d(n,"if").call(f,e!=null?d(e,"color"):e,{name:"if",hash:{},fn:t.program(5,a,0),inverse:t.program(7,a,0),data:a,loc:{start:{line:7,column:62},end:{line:7,column:150}}}))!=null?c:"")+((c=d(n,"if").call(f,e!=null?d(e,"active"):e,{name:"if",hash:{},fn:t.program(9,a,0),inverse:t.noop,data:a,loc:{start:{line:7,column:150},end:{line:7,column:184}}}))!=null?c:"")+`fixedsize=true height=0.15 label=""]
|
|
24
|
-
`},5:function(d,e,n,m,a){var c,i,f=e??(d.nullContext||{}),g=d.hooks.helperMissing,p="function",d=d.lookupProperty||function(l,b){if(Object.prototype.hasOwnProperty.call(l,b))return l[b]};return'color="'+((c=typeof(i=(i=d(n,"color")||(e!=null?d(e,"color"):e))!=null?i:g)==p?i.call(f,{name:"color",hash:{},data:a,loc:{start:{line:7,column:82},end:{line:7,column:93}}}):i)!=null?c:"")+'" fillcolor="'+((c=typeof(i=(i=d(n,"color")||(e!=null?d(e,"color"):e))!=null?i:g)==p?i.call(f,{name:"color",hash:{},data:a,loc:{start:{line:7,column:106},end:{line:7,column:117}}}):i)!=null?c:"")+'" '},7:function(t,e,n,m,a){return"fillcolor=black "},9:function(t,e,n,m,a){return"penwidth=3.0 "},11:function(t,e,n,m,a){var c=e??(t.nullContext||{}),d=t.hooks.helperMissing,i="function",f=t.lookupProperty||function(b,u){if(Object.prototype.hasOwnProperty.call(b,u))return b[u]},g=' "'+((l=typeof(p=(p=f(n,"name")||(e!=null?f(e,"name"):e))!=null?p:d)==i?p.call(c,{name:"name",hash:{},data:a,loc:{start:{line:10,column:3},end:{line:10,column:13}}}):p)!=null?l:"")+'" [margin=0 class="'+((l=typeof(p=(p=f(n,"class")||(e!=null?f(e,"class"):e))!=null?p:d)==i?p.call(c,{name:"class",hash:{},data:a,loc:{start:{line:10,column:32},end:{line:10,column:43}}}):p)!=null?l:"")+'" '+((l=f(n,"if").call(c,e!=null?f(e,"color"):e,{name:"if",hash:{},fn:t.program(12,a,0),inverse:t.noop,data:a,loc:{start:{line:10,column:45},end:{line:10,column:85}}}))!=null?l:"")+((l=f(n,"if").call(c,e!=null?f(e,"active"):e,{name:"if",hash:{},fn:t.program(14,a,0),inverse:t.noop,data:a,loc:{start:{line:10,column:85},end:{line:10,column:134}}}))!=null?l:"")+`label= <
|
|
25
|
-
<table align="center" cellborder="0" border="2" style="rounded" width="48">
|
|
26
|
-
<tr><td width="48"`+((l=f(n,"if").call(c,e!=null?f(e,"actionStrings"):e,{name:"if",hash:{},fn:t.program(16,a,0),inverse:t.program(18,a,0),data:a,loc:{start:{line:12,column:24},end:{line:12,column:92}}}))!=null?l:"")+">"+((l=f(n,"if").call(c,e!=null?f(e,"active"):e,{name:"if",hash:{},fn:t.program(20,a,0),inverse:t.program(22,a,0),data:a,loc:{start:{line:12,column:93},end:{line:12,column:147}}}))!=null?l:"")+`</td></tr>
|
|
27
|
-
`,p=(p=f(n,"actionStrings")||(e!=null?f(e,"actionStrings"):e))!=null?p:d,d={name:"actionStrings",hash:{},fn:t.program(24,a,0),inverse:t.noop,data:a,loc:{start:{line:13,column:6},end:{line:16,column:24}}},l=typeof p==i?p.call(c,d):p;return(l=f(n,"actionStrings")?l:t.hooks.blockHelperMissing.call(e,l,d))!=null&&(g+=l),g+` </table>
|
|
28
|
-
>]
|
|
29
|
-
`},12:function(t,e,n,m,a){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return'color="'+((c=typeof(n=(n=c(n,"color")||(e!=null?c(e,"color"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"color",hash:{},data:a,loc:{start:{line:10,column:65},end:{line:10,column:76}}}):n)!=null?c:"")+'" '},14:function(t,e,n,m,a){return"peripheries=1 style=rounded "},16:function(t,e,n,m,a){return' cellpadding="2"'},18:function(t,e,n,m,a){return' cellpadding="7"'},20:function(t,e,n,m,a){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return"<i>"+t.escapeExpression(typeof(n=(n=c(n,"label")||(e!=null?c(e,"label"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"label",hash:{},data:a,loc:{start:{line:12,column:110},end:{line:12,column:119}}}):n)+"</i>"},22:function(t,e,n,m,a){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return t.escapeExpression(typeof(n=(n=c(n,"label")||(e!=null?c(e,"label"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"label",hash:{},data:a,loc:{start:{line:12,column:131},end:{line:12,column:140}}}):n)},24:function(t,e,n,m,a){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return" "+((n=c(n,"if").call(e??(t.nullContext||{}),a&&c(a,"first"),{name:"if",hash:{},fn:t.program(25,a,0),inverse:t.noop,data:a,loc:{start:{line:14,column:8},end:{line:14,column:34}}}))!=null?n:"")+`
|
|
30
|
-
<tr><td align="left" cellpadding="2">`+t.escapeExpression(t.lambda(e,e))+`</td></tr>
|
|
31
|
-
`},25:function(t,e,n,m,a){return"<hr/>"},27:function(t,e,n,m,a){var c,i,f=e??(t.nullContext||{}),g=t.hooks.helperMissing,p="function",d=t.lookupProperty||function(l,b){if(Object.prototype.hasOwnProperty.call(l,b))return l[b]};return' "'+((c=typeof(i=(i=d(n,"name")||(e!=null?d(e,"name"):e))!=null?i:g)==p?i.call(f,{name:"name",hash:{},data:a,loc:{start:{line:21,column:3},end:{line:21,column:13}}}):i)!=null?c:"")+'" [shape=circle class="'+((c=typeof(i=(i=d(n,"class")||(e!=null?d(e,"class"):e))!=null?i:g)==p?i.call(f,{name:"class",hash:{},data:a,loc:{start:{line:21,column:36},end:{line:21,column:47}}}):i)!=null?c:"")+'" '+((c=d(n,"if").call(f,e!=null?d(e,"color"):e,{name:"if",hash:{},fn:t.program(12,a,0),inverse:t.noop,data:a,loc:{start:{line:21,column:49},end:{line:21,column:89}}}))!=null?c:"")+((c=d(n,"if").call(f,e!=null?d(e,"active"):e,{name:"if",hash:{},fn:t.program(9,a,0),inverse:t.noop,data:a,loc:{start:{line:21,column:89},end:{line:21,column:123}}}))!=null?c:"")+`label="H"]
|
|
32
|
-
`},29:function(t,e,n,m,a){var c,i,f=e??(t.nullContext||{}),g=t.hooks.helperMissing,p="function",d=t.lookupProperty||function(l,b){if(Object.prototype.hasOwnProperty.call(l,b))return l[b]};return' "'+((c=typeof(i=(i=d(n,"name")||(e!=null?d(e,"name"):e))!=null?i:g)==p?i.call(f,{name:"name",hash:{},data:a,loc:{start:{line:24,column:3},end:{line:24,column:13}}}):i)!=null?c:"")+'" [shape=circle class="'+((c=typeof(i=(i=d(n,"class")||(e!=null?d(e,"class"):e))!=null?i:g)==p?i.call(f,{name:"class",hash:{},data:a,loc:{start:{line:24,column:36},end:{line:24,column:47}}}):i)!=null?c:"")+'" '+((c=d(n,"if").call(f,e!=null?d(e,"color"):e,{name:"if",hash:{},fn:t.program(12,a,0),inverse:t.noop,data:a,loc:{start:{line:24,column:49},end:{line:24,column:89}}}))!=null?c:"")+((c=d(n,"if").call(f,e!=null?d(e,"active"):e,{name:"if",hash:{},fn:t.program(9,a,0),inverse:t.noop,data:a,loc:{start:{line:24,column:89},end:{line:24,column:123}}}))!=null?c:"")+`label="H*"]
|
|
33
|
-
`},31:function(t,e,n,m,a,c,i){var f=e??(t.nullContext||{}),g=t.hooks.helperMissing,p="function",d=t.hooks.blockHelperMissing,l=t.lookupProperty||function(_,B){if(Object.prototype.hasOwnProperty.call(_,B))return _[B]},b=' "'+((x=typeof(u=(u=l(n,"name")||(e!=null?l(e,"name"):e))!=null?u:g)==p?u.call(f,{name:"name",hash:{},data:a,loc:{start:{line:27,column:3},end:{line:27,column:13}}}):u)!=null?x:"")+'" [shape=diamond fixedsize=true width=0.35 height=0.35 fontsize=10 class="'+((x=typeof(u=(u=l(n,"class")||(e!=null?l(e,"class"):e))!=null?u:g)==p?u.call(f,{name:"class",hash:{},data:a,loc:{start:{line:27,column:87},end:{line:27,column:98}}}):u)!=null?x:"")+'" '+((x=l(n,"if").call(f,e!=null?l(e,"color"):e,{name:"if",hash:{},fn:t.program(12,a,0,c,i),inverse:t.noop,data:a,loc:{start:{line:27,column:100},end:{line:27,column:140}}}))!=null?x:"")+((x=l(n,"if").call(f,e!=null?l(e,"active"):e,{name:"if",hash:{},fn:t.program(9,a,0,c,i),inverse:t.noop,data:a,loc:{start:{line:27,column:140},end:{line:27,column:174}}}))!=null?x:"")+`label=" "]
|
|
34
|
-
"`+((x=typeof(u=(u=l(n,"name")||(e!=null?l(e,"name"):e))!=null?u:g)==p?u.call(f,{name:"name",hash:{},data:a,loc:{start:{line:28,column:3},end:{line:28,column:13}}}):u)!=null?x:"")+'" -> "'+((x=typeof(u=(u=l(n,"name")||(e!=null?l(e,"name"):e))!=null?u:g)==p?u.call(f,{name:"name",hash:{},data:a,loc:{start:{line:28,column:19},end:{line:28,column:29}}}):u)!=null?x:"")+'" [label=<',u=(u=l(n,"actionStrings")||(e!=null?l(e,"actionStrings"):e))!=null?u:g,I={name:"actionStrings",hash:{},fn:t.program(32,a,0,c,i),inverse:t.noop,data:a,loc:{start:{line:28,column:39},end:{line:28,column:156}}},x=typeof u==p?u.call(f,I):u;return(x=l(n,"actionStrings")?x:d.call(e,x,I))!=null&&(b+=x),b+='> color="#FFFFFF01"',u=(u=l(n,"color")||(e!=null?l(e,"color"):e))!=null?u:g,I={name:"color",hash:{},fn:t.program(41,a,0,c,i),inverse:t.noop,data:a,loc:{start:{line:28,column:175},end:{line:28,column:215}}},x=typeof u==p?u.call(f,I):u,(x=l(n,"color")?x:d.call(e,x,I))!=null&&(b+=x),b+' class="'+((x=typeof(u=(u=l(n,"class")||(e!=null?l(e,"class"):e))!=null?u:g)==p?u.call(f,{name:"class",hash:{},data:a,loc:{start:{line:28,column:223},end:{line:28,column:234}}}):u)!=null?x:"")+`"];
|
|
35
|
-
`},32:function(t,g,n,m,a,c,i){var f,g=g??(t.nullContext||{}),p=t.lookupProperty||function(d,l){if(Object.prototype.hasOwnProperty.call(d,l))return d[l]};return((f=p(n,"if").call(g,a&&p(a,"first"),{name:"if",hash:{},fn:t.program(33,a,0,c,i),inverse:t.program(35,a,0,c,i),data:a,loc:{start:{line:28,column:57},end:{line:28,column:88}}}))!=null?f:"")+((f=p(n,"if").call(g,i[1]!=null?p(i[1],"active"):i[1],{name:"if",hash:{},fn:t.program(37,a,0,c,i),inverse:t.program(39,a,0,c,i),data:a,loc:{start:{line:28,column:88},end:{line:28,column:137}}}))!=null?f:"")},33:function(t,e,n,m,a){return""},35:function(t,e,n,m,a){return"\\n"},37:function(t,e,n,m,a){return"<i>"+t.escapeExpression(t.lambda(e,e))+"</i>"},39:function(t,e,n,m,a){return t.escapeExpression(t.lambda(e,e))},41:function(t,e,n,m,a){return' fontcolor="'+((t=t.lambda(e,e))!=null?t:"")+'"'},43:function(t,e,n,m,a){var c,i,f=e??(t.nullContext||{}),g=t.hooks.helperMissing,p="function",d=t.lookupProperty||function(l,b){if(Object.prototype.hasOwnProperty.call(l,b))return l[b]};return' "'+((c=typeof(i=(i=d(n,"name")||(e!=null?d(e,"name"):e))!=null?i:g)==p?i.call(f,{name:"name",hash:{},data:a,loc:{start:{line:31,column:3},end:{line:31,column:13}}}):i)!=null?c:"")+'" [shape=rect class="'+((c=typeof(i=(i=d(n,"class")||(e!=null?d(e,"class"):e))!=null?i:g)==p?i.call(f,{name:"class",hash:{},data:a,loc:{start:{line:31,column:34},end:{line:31,column:45}}}):i)!=null?c:"")+'" '+((c=d(n,"if").call(f,e!=null?d(e,"color"):e,{name:"if",hash:{},fn:t.program(5,a,0),inverse:t.program(7,a,0),data:a,loc:{start:{line:31,column:47},end:{line:31,column:135}}}))!=null?c:"")+((c=d(n,"if").call(f,e!=null?d(e,"active"):e,{name:"if",hash:{},fn:t.program(9,a,0),inverse:t.noop,data:a,loc:{start:{line:31,column:135},end:{line:31,column:169}}}))!=null?c:"")+'label=" " fixedsize=true style=filled '+((c=typeof(i=(i=d(n,"sizingExtras")||(e!=null?d(e,"sizingExtras"):e))!=null?i:g)==p?i.call(f,{name:"sizingExtras",hash:{},data:a,loc:{start:{line:31,column:207},end:{line:31,column:225}}}):i)!=null?c:"")+`]
|
|
36
|
-
`},45:function(t,e,n,m,a){var c,i,f=e??(t.nullContext||{}),g=t.hooks.helperMissing,p="function",d=t.lookupProperty||function(l,b){if(Object.prototype.hasOwnProperty.call(l,b))return l[b]};return' "'+((c=typeof(i=(i=d(n,"name")||(e!=null?d(e,"name"):e))!=null?i:g)==p?i.call(f,{name:"name",hash:{},data:a,loc:{start:{line:37,column:3},end:{line:37,column:13}}}):i)!=null?c:"")+`" [label= <
|
|
37
|
-
<table align="center" cellborder="0" border="0">
|
|
38
|
-
<tr><td cellpadding="0"><font `+((c=d(n,"if").call(f,e!=null?d(e,"color"):e,{name:"if",hash:{},fn:t.program(12,a,0),inverse:t.noop,data:a,loc:{start:{line:39,column:38},end:{line:39,column:78}}}))!=null?c:"")+`point-size="20">X</font></td></tr>
|
|
39
|
-
<tr><td cellpadding="0"><font `+((c=d(n,"if").call(f,e!=null?d(e,"color"):e,{name:"if",hash:{},fn:t.program(46,a,0),inverse:t.noop,data:a,loc:{start:{line:40,column:38},end:{line:40,column:77}}}))!=null?c:"")+">"+t.escapeExpression(typeof(i=(i=d(n,"label")||(e!=null?d(e,"label"):e))!=null?i:g)==p?i.call(f,{name:"label",hash:{},data:a,loc:{start:{line:40,column:78},end:{line:40,column:87}}}):i)+`</font></td></tr>
|
|
40
|
-
</table>
|
|
41
|
-
> class="`+((c=typeof(i=(i=d(n,"class")||(e!=null?d(e,"class"):e))!=null?i:g)==p?i.call(f,{name:"class",hash:{},data:a,loc:{start:{line:42,column:13},end:{line:42,column:24}}}):i)!=null?c:"")+`"]
|
|
42
|
-
`},46:function(t,e,n,m,a){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return'color="'+((c=typeof(n=(n=c(n,"color")||(e!=null?c(e,"color"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"color",hash:{},data:a,loc:{start:{line:40,column:58},end:{line:40,column:69}}}):n)!=null?c:"")+'"'},48:function(t,e,n,m,a){var c,i,f=e??(t.nullContext||{}),g=t.hooks.helperMissing,p="function",d=t.lookupProperty||function(l,b){if(Object.prototype.hasOwnProperty.call(l,b))return l[b]};return' "'+((c=typeof(i=(i=d(n,"name")||(e!=null?d(e,"name"):e))!=null?i:g)==p?i.call(f,{name:"name",hash:{},data:a,loc:{start:{line:45,column:3},end:{line:45,column:13}}}):i)!=null?c:"")+'" [shape=circle style=filled class="'+((c=typeof(i=(i=d(n,"class")||(e!=null?d(e,"class"):e))!=null?i:g)==p?i.call(f,{name:"class",hash:{},data:a,loc:{start:{line:45,column:49},end:{line:45,column:60}}}):i)!=null?c:"")+'" '+((c=d(n,"if").call(f,e!=null?d(e,"color"):e,{name:"if",hash:{},fn:t.program(5,a,0),inverse:t.program(7,a,0),data:a,loc:{start:{line:45,column:62},end:{line:45,column:150}}}))!=null?c:"")+"fixedsize=true height=0.15 peripheries=2 "+((c=d(n,"if").call(f,e!=null?d(e,"active"):e,{name:"if",hash:{},fn:t.program(9,a,0),inverse:t.noop,data:a,loc:{start:{line:45,column:191},end:{line:45,column:225}}}))!=null?c:"")+`label=""]
|
|
43
|
-
`},50:function(t,e,n,m,a){var c=e??(t.nullContext||{}),i=t.hooks.helperMissing,f="function",g=t.lookupProperty||function(u,I){if(Object.prototype.hasOwnProperty.call(u,I))return u[I]},p=' subgraph "cluster_'+((b=typeof(d=(d=g(n,"name")||(e!=null?g(e,"name"):e))!=null?d:i)==f?d.call(c,{name:"name",hash:{},data:a,loc:{start:{line:48,column:20},end:{line:48,column:30}}}):d)!=null?b:"")+`" {
|
|
44
|
-
class="`+((b=typeof(d=(d=g(n,"class")||(e!=null?g(e,"class"):e))!=null?d:i)==f?d.call(c,{name:"class",hash:{},data:a,loc:{start:{line:49,column:11},end:{line:49,column:22}}}):d)!=null?b:"")+'" '+((b=g(n,"if").call(c,e!=null?g(e,"color"):e,{name:"if",hash:{},fn:t.program(12,a,0),inverse:t.noop,data:a,loc:{start:{line:49,column:24},end:{line:49,column:64}}}))!=null?b:"")+`label= <
|
|
45
|
-
<table cellborder="0" border="0">
|
|
46
|
-
<tr><td>`+((b=g(n,"if").call(c,e!=null?g(e,"active"):e,{name:"if",hash:{},fn:t.program(20,a,0),inverse:t.program(22,a,0),data:a,loc:{start:{line:51,column:14},end:{line:51,column:68}}}))!=null?b:"")+`</td></tr>
|
|
47
|
-
`,d=(d=g(n,"actionStrings")||(e!=null?g(e,"actionStrings"):e))!=null?d:i,l={name:"actionStrings",hash:{},fn:t.program(51,a,0),inverse:t.noop,data:a,loc:{start:{line:52,column:6},end:{line:55,column:24}}},b=typeof d==f?d.call(c,l):d;return(b=g(n,"actionStrings")?b:t.hooks.blockHelperMissing.call(e,b,l))!=null&&(p+=b),p+` </table>
|
|
48
|
-
> `+((b=g(n,"if").call(c,e!=null?g(e,"parentIsParallel"):e,{name:"if",hash:{},fn:t.program(53,a,0),inverse:t.program(55,a,0),data:a,loc:{start:{line:57,column:6},end:{line:57,column:137}}}))!=null?b:"")+`
|
|
49
|
-
"`+((b=typeof(d=(d=g(n,"name")||(e!=null?g(e,"name"):e))!=null?d:i)==f?d.call(c,{name:"name",hash:{},data:a,loc:{start:{line:58,column:5},end:{line:58,column:15}}}):d)!=null?b:"")+`" [shape=point style=invis margin=0 width=0 height=0 fixedsize=true]
|
|
50
|
-
`+((b=(g(n,"stateSection")||e&&g(e,"stateSection")||i).call(c,e!=null?g(e,"statemachine"):e,{name:"stateSection",hash:{},fn:t.program(33,a,0),inverse:t.noop,data:a,loc:{start:{line:59,column:4},end:{line:59,column:51}}}))!=null?b:"")+`
|
|
51
|
-
}
|
|
52
|
-
`},51:function(t,e,n,m,a){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return" "+((n=c(n,"if").call(e??(t.nullContext||{}),a&&c(a,"first"),{name:"if",hash:{},fn:t.program(25,a,0),inverse:t.noop,data:a,loc:{start:{line:53,column:8},end:{line:53,column:34}}}))!=null?n:"")+`
|
|
53
|
-
<tr><td align="left">`+t.escapeExpression(t.lambda(e,e))+`</td></tr>
|
|
54
|
-
`},53:function(t,e,n,m,a){return'style="dashed" penwidth=1'},55:function(t,e,n,m,a){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return"style=rounded "+((n=c(n,"if").call(e??(t.nullContext||{}),e!=null?c(e,"active"):e,{name:"if",hash:{},fn:t.program(56,a,0),inverse:t.program(58,a,0),data:a,loc:{start:{line:57,column:77},end:{line:57,column:130}}}))!=null?n:"")},56:function(t,e,n,m,a){return"penwidth=3.0"},58:function(t,e,n,m,a){return"penwidth=2.0"},60:function(t,e,n,m,a,d,l){var f=t.lookupProperty||function(b,u){if(Object.prototype.hasOwnProperty.call(b,u))return b[u]},g="",p=(p=f(n,"noteName")||(e!=null?f(e,"noteName"):e))!=null?p:t.hooks.helperMissing,d={name:"noteName",hash:{},fn:t.program(61,a,0,d,l),inverse:t.noop,data:a,loc:{start:{line:63,column:4},end:{line:66,column:17}}},l=typeof p=="function"?p.call(e??(t.nullContext||{}),d):p;return(l=f(n,"noteName")?l:t.hooks.blockHelperMissing.call(e,l,d))!=null&&(g+=l),g},61:function(p,e,n,m,a,c,i){var f,g=p.lambda,p=p.lookupProperty||function(d,l){if(Object.prototype.hasOwnProperty.call(d,l))return d[l]};return' "'+((f=g(e,e))!=null?f:"")+'" [color=black fontcolor=black label="'+((f=g(i[1]!=null?p(i[1],"noteFlattened"):i[1],e))!=null?f:"")+`" shape=note fontsize=10 fillcolor="#ffffcc" penwidth=1.0]
|
|
55
|
-
"`+((f=g(i[1]!=null?p(i[1],"name"):i[1],e))!=null?f:"")+'" -> "'+((f=g(e,e))!=null?f:"")+`" [style=dashed arrowtail=none arrowhead=none]
|
|
56
|
-
`},compiler:[8,">= 4.3.0"],main:function(t,e,n,m,a,c,i){var f=e??(t.nullContext||{}),g=t.hooks.helperMissing,p="function",d=t.hooks.blockHelperMissing,l=t.lookupProperty||function(_,B){if(Object.prototype.hasOwnProperty.call(_,B))return _[B]},b="",u=(u=l(n,"compositeStates")||(e!=null?l(e,"compositeStates"):e))!=null?u:g,I={name:"compositeStates",hash:{},fn:t.program(1,a,0,c,i),inverse:t.noop,data:a,loc:{start:{line:1,column:0},end:{line:5,column:20}}},x=typeof u==p?u.call(f,I):u;return(x=l(n,"compositeStates")?x:d.call(e,x,I))!=null&&(b+=x),u=(u=l(n,"initialStates")||(e!=null?l(e,"initialStates"):e))!=null?u:g,I={name:"initialStates",hash:{},fn:t.program(4,a,0,c,i),inverse:t.noop,data:a,loc:{start:{line:6,column:0},end:{line:8,column:18}}},x=typeof u==p?u.call(f,I):u,(x=l(n,"initialStates")?x:d.call(e,x,I))!=null&&(b+=x),u=(u=l(n,"regularStates")||(e!=null?l(e,"regularStates"):e))!=null?u:g,I={name:"regularStates",hash:{},fn:t.program(11,a,0,c,i),inverse:t.noop,data:a,loc:{start:{line:9,column:0},end:{line:19,column:18}}},x=typeof u==p?u.call(f,I):u,(x=l(n,"regularStates")?x:d.call(e,x,I))!=null&&(b+=x),u=(u=l(n,"historyStates")||(e!=null?l(e,"historyStates"):e))!=null?u:g,I={name:"historyStates",hash:{},fn:t.program(27,a,0,c,i),inverse:t.noop,data:a,loc:{start:{line:20,column:0},end:{line:22,column:18}}},x=typeof u==p?u.call(f,I):u,(x=l(n,"historyStates")?x:d.call(e,x,I))!=null&&(b+=x),u=(u=l(n,"deepHistoryStates")||(e!=null?l(e,"deepHistoryStates"):e))!=null?u:g,I={name:"deepHistoryStates",hash:{},fn:t.program(29,a,0,c,i),inverse:t.noop,data:a,loc:{start:{line:23,column:0},end:{line:25,column:22}}},x=typeof u==p?u.call(f,I):u,(x=l(n,"deepHistoryStates")?x:d.call(e,x,I))!=null&&(b+=x),u=(u=l(n,"choiceStates")||(e!=null?l(e,"choiceStates"):e))!=null?u:g,I={name:"choiceStates",hash:{},fn:t.program(31,a,0,c,i),inverse:t.noop,data:a,loc:{start:{line:26,column:0},end:{line:29,column:17}}},x=typeof u==p?u.call(f,I):u,(x=l(n,"choiceStates")?x:d.call(e,x,I))!=null&&(b+=x),u=(u=l(n,"forkjoinStates")||(e!=null?l(e,"forkjoinStates"):e))!=null?u:g,I={name:"forkjoinStates",hash:{},fn:t.program(43,a,0,c,i),inverse:t.noop,data:a,loc:{start:{line:30,column:0},end:{line:32,column:19}}},x=typeof u==p?u.call(f,I):u,(x=l(n,"forkjoinStates")?x:d.call(e,x,I))!=null&&(b+=x),u=(u=l(n,"junctionStates")||(e!=null?l(e,"junctionStates"):e))!=null?u:g,I={name:"junctionStates",hash:{},fn:t.program(4,a,0,c,i),inverse:t.noop,data:a,loc:{start:{line:33,column:0},end:{line:35,column:19}}},x=typeof u==p?u.call(f,I):u,(x=l(n,"junctionStates")?x:d.call(e,x,I))!=null&&(b+=x),u=(u=l(n,"terminateStates")||(e!=null?l(e,"terminateStates"):e))!=null?u:g,I={name:"terminateStates",hash:{},fn:t.program(45,a,0,c,i),inverse:t.noop,data:a,loc:{start:{line:36,column:0},end:{line:43,column:20}}},x=typeof u==p?u.call(f,I):u,(x=l(n,"terminateStates")?x:d.call(e,x,I))!=null&&(b+=x),u=(u=l(n,"finalStates")||(e!=null?l(e,"finalStates"):e))!=null?u:g,I={name:"finalStates",hash:{},fn:t.program(48,a,0,c,i),inverse:t.noop,data:a,loc:{start:{line:44,column:0},end:{line:46,column:16}}},x=typeof u==p?u.call(f,I):u,(x=l(n,"finalStates")?x:d.call(e,x,I))!=null&&(b+=x),u=(u=l(n,"compositeStates")||(e!=null?l(e,"compositeStates"):e))!=null?u:g,I={name:"compositeStates",hash:{},fn:t.program(50,a,0,c,i),inverse:t.noop,data:a,loc:{start:{line:47,column:0},end:{line:61,column:20}}},x=typeof u==p?u.call(f,I):u,(x=l(n,"compositeStates")?x:d.call(e,x,I))!=null&&(b+=x),u=(u=l(n,"states")||(e!=null?l(e,"states"):e))!=null?u:g,I={name:"states",hash:{},fn:t.program(60,a,0,c,i),inverse:t.noop,data:a,loc:{start:{line:62,column:0},end:{line:67,column:11}}},x=typeof u==p?u.call(f,I):u,(x=l(n,"states")?x:d.call(e,x,I))!=null&&(b+=x),b},useData:!0,useDepths:!0})});var Un=q((Hs,zn)=>{"use strict";var ue=require("handlebars/dist/handlebars.runtime.js");qn();Mn();ue.registerPartial("dot.states.template.hbs",ue.templates["dot.states.template.hbs"]);ue.registerHelper("stateSection",t=>ue.templates["dot.states.template.hbs"](vi(t)));function J(t){return e=>e.type===t}function yi(t){return e=>t.includes(e.type)}function vi(t){return t.initialStates=t.states.filter(J("initial")),t.regularStates=t.states.filter(e=>J("regular")(e)&&!e.statemachine),t.historyStates=t.states.filter(J("history")),t.deepHistoryStates=t.states.filter(J("deephistory")),t.choiceStates=t.states.filter(J("choice")),t.forkjoinStates=t.states.filter(yi(["fork","join","forkjoin"])),t.junctionStates=t.states.filter(J("junction")),t.terminateStates=t.states.filter(J("terminate")),t.finalStates=t.states.filter(J("final")),t.compositeStates=t.states.filter(e=>e.statemachine),t}zn.exports=function(e){return ue.templates["dot.template.hbs"](e)}});var Kn=q(()=>{"use strict";var Je=require("handlebars/dist/handlebars.runtime"),zi=Je.template,Ui=Je.templates=Je.templates||{};Ui["scxml.template.hbs"]=zi({1:function(t,e,n,m,a){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return'initial="'+t.escapeExpression(typeof(n=(n=c(n,"initial")||(e!=null?c(e,"initial"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"initial",hash:{},data:a,loc:{start:{line:2,column:71},end:{line:2,column:82}}}):n)+'" '},compiler:[8,">= 4.3.0"],main:function(t,e,n,m,a){var c,i=t.lookupProperty||function(f,g){if(Object.prototype.hasOwnProperty.call(f,g))return f[g]};return`<?xml version="1.0" encoding="UTF-8"?>
|
|
57
|
-
<scxml xmlns="http://www.w3.org/2005/07/scxml" `+((c=i(n,"if").call(e??(t.nullContext||{}),e!=null?i(e,"initial"):e,{name:"if",hash:{},fn:t.program(1,a,0),inverse:t.noop,data:a,loc:{start:{line:2,column:47},end:{line:2,column:91}}}))!=null?c:"")+`version="1.0">
|
|
58
|
-
`+((c=t.invokePartial(i(m,"scxml.states.template.hbs"),e,{name:"scxml.states.template.hbs",data:a,helpers:n,partials:m,decorators:t.decorators}))!=null?c:"")+`</scxml>
|
|
59
|
-
`},usePartial:!0,useData:!0})});var er=q(()=>{"use strict";var Xe=require("handlebars/dist/handlebars.runtime"),Ji=Xe.template,Xi=Xe.templates=Xe.templates||{};Xi["scxml.states.template.hbs"]=Ji({1:function(t,e,n,m,a){var c,i,f=e??(t.nullContext||{}),g=t.hooks.helperMissing,p="function",d=t.escapeExpression,l=t.lookupProperty||function(b,u){if(Object.prototype.hasOwnProperty.call(b,u))return b[u]};return" <"+d(typeof(i=(i=l(n,"kind")||(e!=null?l(e,"kind"):e))!=null?i:g)==p?i.call(f,{name:"kind",hash:{},data:a,loc:{start:{line:2,column:5},end:{line:2,column:13}}}):i)+' id="'+d(typeof(i=(i=l(n,"id")||(e!=null?l(e,"id"):e))!=null?i:g)==p?i.call(f,{name:"id",hash:{},data:a,loc:{start:{line:2,column:18},end:{line:2,column:24}}}):i)+'"'+((c=l(n,"if").call(f,e!=null?l(e,"initial"):e,{name:"if",hash:{},fn:t.program(2,a,0),inverse:t.noop,data:a,loc:{start:{line:2,column:25},end:{line:2,column:69}}}))!=null?c:"")+((c=l(n,"if").call(f,e!=null?l(e,"type"):e,{name:"if",hash:{},fn:t.program(4,a,0),inverse:t.noop,data:a,loc:{start:{line:2,column:69},end:{line:2,column:104}}}))!=null?c:"")+`>
|
|
60
|
-
`+((c=t.invokePartial(l(m,"scxml.states.template.hbs"),e,{name:"scxml.states.template.hbs",data:a,indent:" ",helpers:n,partials:m,decorators:t.decorators}))!=null?c:"")+((c=l(n,"each").call(f,e!=null?l(e,"onentries"):e,{name:"each",hash:{},fn:t.program(6,a,0),inverse:t.noop,data:a,loc:{start:{line:4,column:4},end:{line:6,column:13}}}))!=null?c:"")+((c=l(n,"each").call(f,e!=null?l(e,"onexits"):e,{name:"each",hash:{},fn:t.program(8,a,0),inverse:t.noop,data:a,loc:{start:{line:7,column:4},end:{line:9,column:13}}}))!=null?c:"")+((c=l(n,"each").call(f,e!=null?l(e,"transitions"):e,{name:"each",hash:{},fn:t.program(10,a,0),inverse:t.noop,data:a,loc:{start:{line:10,column:4},end:{line:18,column:13}}}))!=null?c:"")+" </"+d(typeof(i=(i=l(n,"kind")||(e!=null?l(e,"kind"):e))!=null?i:g)==p?i.call(f,{name:"kind",hash:{},data:a,loc:{start:{line:19,column:6},end:{line:19,column:14}}}):i)+`>
|
|
61
|
-
`},2:function(t,e,n,m,a){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return' initial="'+t.escapeExpression(typeof(n=(n=c(n,"initial")||(e!=null?c(e,"initial"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"initial",hash:{},data:a,loc:{start:{line:2,column:50},end:{line:2,column:61}}}):n)+'"'},4:function(t,e,n,m,a){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return' type="'+t.escapeExpression(typeof(n=(n=c(n,"type")||(e!=null?c(e,"type"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"type",hash:{},data:a,loc:{start:{line:2,column:88},end:{line:2,column:96}}}):n)+'"'},6:function(t,e,n,m,a){return" <onentry>"+t.escapeExpression(t.lambda(e,e))+`</onentry>
|
|
62
|
-
`},8:function(t,e,n,m,a){return" <onexit>"+t.escapeExpression(t.lambda(e,e))+`</onexit>
|
|
63
|
-
`},10:function(t,e,n,m,a){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return(n=c(n,"if").call(e??(t.nullContext||{}),e!=null?c(e,"action"):e,{name:"if",hash:{},fn:t.program(11,a,0),inverse:t.program(18,a,0),data:a,loc:{start:{line:11,column:8},end:{line:17,column:15}}}))!=null?n:""},11:function(t,e,n,m,a){var c,i=e??(t.nullContext||{}),f=t.hooks.helperMissing,g="function",p=t.escapeExpression,d=t.lookupProperty||function(l,b){if(Object.prototype.hasOwnProperty.call(l,b))return l[b]};return" <transition "+((c=d(n,"if").call(i,e!=null?d(e,"event"):e,{name:"if",hash:{},fn:t.program(12,a,0),inverse:t.noop,data:a,loc:{start:{line:12,column:20},end:{line:12,column:58}}}))!=null?c:"")+((c=d(n,"if").call(i,e!=null?d(e,"cond"):e,{name:"if",hash:{},fn:t.program(14,a,0),inverse:t.noop,data:a,loc:{start:{line:12,column:58},end:{line:12,column:93}}}))!=null?c:"")+((c=d(n,"if").call(i,e!=null?d(e,"type"):e,{name:"if",hash:{},fn:t.program(16,a,0),inverse:t.noop,data:a,loc:{start:{line:12,column:93},end:{line:12,column:128}}}))!=null?c:"")+'target="'+p(typeof(t=(t=d(n,"target")||(e!=null?d(e,"target"):e))!=null?t:f)==g?t.call(i,{name:"target",hash:{},data:a,loc:{start:{line:12,column:136},end:{line:12,column:146}}}):t)+`">
|
|
64
|
-
`+p(typeof(t=(t=d(n,"action")||(e!=null?d(e,"action"):e))!=null?t:f)==g?t.call(i,{name:"action",hash:{},data:a,loc:{start:{line:13,column:12},end:{line:13,column:22}}}):t)+`
|
|
65
|
-
</transition>
|
|
66
|
-
`},12:function(t,e,n,m,a){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return'event="'+t.escapeExpression(typeof(n=(n=c(n,"event")||(e!=null?c(e,"event"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"event",hash:{},data:a,loc:{start:{line:12,column:40},end:{line:12,column:49}}}):n)+'" '},14:function(t,e,n,m,a){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return'cond="'+t.escapeExpression(typeof(n=(n=c(n,"cond")||(e!=null?c(e,"cond"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"cond",hash:{},data:a,loc:{start:{line:12,column:76},end:{line:12,column:84}}}):n)+'" '},16:function(t,e,n,m,a){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return'type="'+t.escapeExpression(typeof(n=(n=c(n,"type")||(e!=null?c(e,"type"):e))!=null?n:t.hooks.helperMissing)=="function"?n.call(e??(t.nullContext||{}),{name:"type",hash:{},data:a,loc:{start:{line:12,column:111},end:{line:12,column:119}}}):n)+'" '},18:function(t,e,n,m,a){var c,i=e??(t.nullContext||{}),f=t.lookupProperty||function(g,p){if(Object.prototype.hasOwnProperty.call(g,p))return g[p]};return" <transition "+((c=f(n,"if").call(i,e!=null?f(e,"event"):e,{name:"if",hash:{},fn:t.program(12,a,0),inverse:t.noop,data:a,loc:{start:{line:16,column:20},end:{line:16,column:58}}}))!=null?c:"")+((c=f(n,"if").call(i,e!=null?f(e,"cond"):e,{name:"if",hash:{},fn:t.program(14,a,0),inverse:t.noop,data:a,loc:{start:{line:16,column:58},end:{line:16,column:93}}}))!=null?c:"")+((c=f(n,"if").call(i,e!=null?f(e,"type"):e,{name:"if",hash:{},fn:t.program(16,a,0),inverse:t.noop,data:a,loc:{start:{line:16,column:93},end:{line:16,column:128}}}))!=null?c:"")+'target="'+t.escapeExpression(typeof(c=(c=f(n,"target")||(e!=null?f(e,"target"):e))!=null?c:t.hooks.helperMissing)=="function"?c.call(i,{name:"target",hash:{},data:a,loc:{start:{line:16,column:136},end:{line:16,column:146}}}):c)+`"/>
|
|
67
|
-
`},compiler:[8,">= 4.3.0"],main:function(t,e,n,m,a){var c=t.lookupProperty||function(i,f){if(Object.prototype.hasOwnProperty.call(i,f))return i[f]};return(n=c(n,"each").call(e??(t.nullContext||{}),e!=null?c(e,"states"):e,{name:"each",hash:{},fn:t.program(1,a,0),inverse:t.noop,data:a,loc:{start:{line:1,column:0},end:{line:20,column:9}}}))!=null?n:""},usePartial:!0,useData:!0})});var nr=q((cc,tr)=>{"use strict";var Ge=require("handlebars/dist/handlebars.runtime.js");Kn();er();Ge.registerPartial("scxml.states.template.hbs",Ge.templates["scxml.states.template.hbs"]);tr.exports=function(e){return Ge.templates["scxml.template.hbs"](e)}});var Yi={};Ql(Yi,{default:()=>Qi,getAllowedValues:()=>ur,render:()=>sr,version:()=>cr});module.exports=Yl(Yi);var an=Object.freeze({inputType:{default:"smcat",values:[{name:"smcat"},{name:"json"},{name:"scxml"}]},outputType:{default:"svg",values:[{name:"ast"},{name:"dot"},{name:"eps"},{name:"json"},{name:"oldeps"},{name:"oldps"},{name:"oldps2"},{name:"oldsvg"},{name:"pdf"},{name:"png"},{name:"ps"},{name:"ps2"},{name:"scjson"},{name:"scxml"},{name:"smcat"},{name:"svg"}]},engine:{default:"dot",values:[{name:"dot"},{name:"circo"},{name:"fdp"},{name:"neato"},{name:"osage"},{name:"twopi"}]},direction:{default:"top-down",values:[{name:"top-down"},{name:"bottom-top"},{name:"left-right"},{name:"right-left"}]},desugar:{default:!1,values:[{name:!0},{name:!1}]}});function Zl(t,e){return(t==null?void 0:t[e])??an[e].default}function Kl(){return an}var N={getAllowedValues:Kl,getOptionValue:Zl};var Cn=F(require("ajv"),1);function ln(t,e=!1){let n=[];return t.filter(m=>Boolean(m.statemachine)).forEach(m=>{Object.prototype.hasOwnProperty.call(m.statemachine,"states")&&(n=n.concat(ln(m.statemachine.states,!0)))}),n.concat(t.map(m=>({name:m.name,type:m.type,statemachine:Boolean(m.statemachine),hasParent:e})))}function on(t){let e=[];return Object.prototype.hasOwnProperty.call(t,"transitions")&&(e=t.transitions),Object.prototype.hasOwnProperty.call(t,"states")&&t.states.filter(n=>Boolean(n.statemachine)).forEach(n=>{e=e.concat(on(n.statemachine))}),e}var L=class{_flattenedTransitions;_flattenedStates;constructor(e){this._flattenedStates=ln(e.states||[]),this._flattenedTransitions=on(e)}get flattenedTransitions(){return this._flattenedTransitions}findStateByName(e){return this._flattenedStates.find(n=>n.name===e)}findStatesByTypes(e){return this._flattenedStates.filter(n=>e.includes(n.type))}findExternalSelfTransitions(e){return this._flattenedTransitions.filter(n=>n.from===e&&n.to===e&&n.type!=="internal")}findTransitionsByFrom(e){return this._flattenedTransitions.filter(n=>n.from===e)}findTransitionsByTo(e){return this._flattenedTransitions.filter(n=>n.to===e)}};var eo="^(entry|activity|exit)\\s*/\\s*([^\\n$]*)(\\n|$)",to=new RegExp(eo);function sn(t,e){return t.includes(e)}var no=[{re:/initial/,stateType:"initial"},{re:/final/,stateType:"final"},{re:/parallel/,stateType:"parallel"},{re:/(deep.*history)|(history.*deep)/,stateType:"deephistory"},{re:/history/,stateType:"history"},{re:/^\^.*/,stateType:"choice"},{re:/^].*/,stateType:"forkjoin"}];function ro(t){return e=>e.re.test(t)}function cn(t){return(no.find(ro(t))||{stateType:"regular"}).stateType}function _e(t){return{name:t,type:cn(t)}}function un(t){return Boolean(t.statemachine)}function fn(t){let e=(t==null?void 0:t.states)??[];return e.filter(un).reduce((n,m)=>n.concat(fn(m.statemachine)),e.map(({name:n})=>n))}function pn(t,e){e=e||fn(t),t.states=(t==null?void 0:t.states)??[];let n=(t==null?void 0:t.transitions)??[];return t.states.filter(un).forEach(m=>{m.statemachine.states=pn(m.statemachine,e)}),n.forEach(m=>{sn(e,m.from)||(e.push(m.from),t.states.push(_e(m.from))),sn(e,m.to)||(e.push(m.to),t.states.push(_e(m.to)))}),t.states}function ao(t,e){let n="junction";return t<=1&&e>1&&(n="fork"),t>1&&e<=1&&(n="join"),n}function mn(t,e=new L(t)){return t.states=t.states.map(n=>{if(n.type==="forkjoin"&&!n.typeExplicitlySet){let m=e.findTransitionsByTo(n.name).length,a=e.findTransitionsByFrom(n.name).length;n.type=ao(m,a)}return n.statemachine&&(n.statemachine=mn(n.statemachine,e)),n}),t}function lo(t,e){return t.name===e.name}function oo(t,e){return t.reduce((n,m)=>{let a=n.findIndex(c=>e(c,m));return a>-1?(n[a]=m,n):n.concat(m)},[])}function io(t){let e=/([^[/]+)?(\[[^\]]+\])?[^/]*(\/.+)?/,n={},m=t.match(e),a=1,c=2,i=3;return m[a]&&(n.event=m[a].trim()),m[c]&&(n.cond=m[c].slice(1,-1).trim()),m[i]&&(n.action=m[i].slice(1,m[i].length).trim()),n}function dn(t,e,n,m=Boolean){m(n)&&(t[e]=n)}function so(t,e,n){dn(t,e,n,m=>m&&m.length>0)}function co(t){let e=t.match(to),n=1,m=2;return e?{type:e[n],body:e[m]}:{type:"activity",body:t}}function uo(t){return t.split(/\n\s*/g).map(e=>e.trim()).map(co)}var P={initState:_e,extractUndeclaredStates:pn,classifyForkJoins:mn,getStateType:cn,stateEqual:lo,uniq:oo,parseTransitionExpression:io,extractActions:uo,setIf:dn,setIfNotEmpty:so};function fo(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}function Q(t,e,n,m){var a=Error.call(this,t);return Object.setPrototypeOf&&Object.setPrototypeOf(a,Q.prototype),a.expected=e,a.found=n,a.location=m,a.name="SyntaxError",a}fo(Q,Error);function Fe(t,e,n){return n=n||" ",t.length>e?t:(e-=t.length,n+=n.repeat(e),t+n.slice(0,e))}Q.prototype.format=function(t){var e="Error: "+this.message;if(this.location){var n=null,m;for(m=0;m<t.length;m++)if(t[m].source===this.location.source){n=t[m].text.split(/\r\n|\n|\r/g);break}var a=this.location.start,c=this.location.source&&typeof this.location.source.offset=="function"?this.location.source.offset(a):a,i=this.location.source+":"+c.line+":"+c.column;if(n){var f=this.location.end,g=Fe("",c.line.toString().length," "),p=n[a.line-1],d=a.line===f.line?f.column:p.length+1,l=d-a.column||1;e+=`
|
|
68
|
-
--> `+i+`
|
|
69
|
-
`+g+` |
|
|
70
|
-
`+c.line+" | "+p+`
|
|
71
|
-
`+g+" | "+Fe("",a.column-1," ")+Fe("",l,"^")}else e+=`
|
|
72
|
-
at `+i}return e};Q.buildMessage=function(t,e){var n={literal:function(p){return'"'+a(p.text)+'"'},class:function(p){var d=p.parts.map(function(l){return Array.isArray(l)?c(l[0])+"-"+c(l[1]):c(l)});return"["+(p.inverted?"^":"")+d.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(p){return p.description}};function m(p){return p.charCodeAt(0).toString(16).toUpperCase()}function a(p){return p.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(d){return"\\x0"+m(d)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(d){return"\\x"+m(d)})}function c(p){return p.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(d){return"\\x0"+m(d)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(d){return"\\x"+m(d)})}function i(p){return n[p.type](p)}function f(p){var d=p.map(i),l,b;if(d.sort(),d.length>0){for(l=1,b=1;l<d.length;l++)d[l-1]!==d[l]&&(d[b]=d[l],b++);d.length=b}switch(d.length){case 1:return d[0];case 2:return d[0]+" or "+d[1];default:return d.slice(0,-1).join(", ")+", or "+d[d.length-1]}}function g(p){return p?'"'+a(p)+'"':"end of input"}return"Expected "+f(t)+" but "+g(e)+" found."};function hn(t,e){e=e!==void 0?e:{};var n={},m=e.grammarSource,a={program:Ut},c=Ut,i=",",f=";",g="[",p="]",d=":",l="{",b="}",u="=",I="label",x="color",_="class",B="active",Qe="type",Ye="regular",Ze="initial",Ke="terminate",et="final",tt="parallel",nt="history",rt="deephistory",at="choice",lt="forkjoin",ot="fork",it="join",st="junction",fr="width",ct="external",ut="internal",ft="->",pt="=>>",mt="=>",dt=">>",ht=":>",gt="--",yt="==",vt="<-",bt="<<=",xt="<=",$t="<<",It="<:",pr="#",mr=".",z='"',fe='\\"',Et="/*",pe="*/",kt="//",St=/^[0-9]/,Tt=/^[a-zA-Z0-9_\- ]/,At=/^[^;, "\t\n\r=\-><:{[]/,dr=/^[ \t]/,hr=/^[\r\n]/,gr=/^[^\r\n]/,yr=C("statemachine"),me=A(",",!1),Z=A(";",!1),vr=C("state"),wt=A("[",!1),Ot=A("]",!1),Ct=A(":",!1),re=A("{",!1),br=A("}",!1),xr=C("extended state attributes"),$r=C("extended state attribute"),X=A("=",!1),Ir=C("state attribute name"),Er=A("label",!0),jt=A("color",!0),kr=C("class attribute"),Sr=A("class",!0),Tr=C("state flag"),Ar=A("active",!0),wr=C("state type"),Pt=A("type",!0),Or=C("state type type"),Cr=A("regular",!1),jr=A("initial",!1),Pr=A("terminate",!1),_r=A("final",!1),Fr=A("parallel",!1),Rr=A("history",!1),Nr=A("deephistory",!1),Vr=A("choice",!1),Lr=A("forkjoin",!1),Br=A("fork",!1),Dr=A("join",!1),Hr=A("junction",!1),qr=C("transition"),Mr=C("extended transition attributes"),zr=C("extended transition attribute"),Ur=C("transition attribute name"),Jr=C("transition type name"),Xr=C("numeric transition attribute name"),Gr=A("width",!0),Wr=C("transition type value"),Qr=A("external",!1),Yr=A("internal",!1),Zr=C("left to right arrow"),Kr=A("->",!1),ea=A("=>>",!1),ta=A("=>",!1),na=A(">>",!1),ra=A(":>",!1),aa=A("--",!1),la=A("==",!1),oa=C("right to left arrow"),ia=A("<-",!1),sa=A("<<=",!1),ca=A("<=",!1),ua=A("<<",!1),fa=A("<:",!1),pa=A("#",!1),ma=A(".",!1),_t=K([["0","9"]],!1,!1),da=C("double quoted string"),U=A('"',!1),Ft=A('\\"',!1),G=pl(),ha=C("valid class string"),Rt=K([["a","z"],["A","Z"],["0","9"],"_","-"," "],!1,!1),ga=C("identifier"),Nt=K([";",","," ",'"'," ",`
|
|
73
|
-
`,"\r","=","-",">","<",":","{","["],!0,!1),ya=C("whitespace"),va=K([" "," "],!1,!1),ba=C("line end"),xa=K(["\r",`
|
|
74
|
-
`],!1,!1),$a=A("/*",!1),Vt=A("*/",!1),Ia=A("//",!1),Ea=K(["\r",`
|
|
75
|
-
`],!0,!1),ka=C("comment"),Sa=function(r){return r.states=P.extractUndeclaredStates(r),P.classifyForkJoins(r)},Ta=function(r,s){let v={};return P.setIf(v,"states",r),P.setIfNotEmpty(v,"transitions",s),v},Lt=function(r){return r},Aa=function(r){return r},wa=function(r){return P.uniq(r[0].concat(r[1]),P.stateEqual)},Oa=function(r,s,v){return v},Ca=function(r,s,v,h){return h},ja=function(r,s,v,h,E){return E},Pa=function(r,s,v,h,E){let S=P.initState(s);return(v||[]).forEach(w=>P.setIf(S,w.name,w.value)),P.setIf(S,"typeExplicitlySet",(v||[]).some(w=>w.typeExplicitlySet)),P.setIf(S,"statemachine",E),P.setIfNotEmpty(S,"note",r),Boolean(h)&&P.setIfNotEmpty(S,"actions",P.extractActions(h)),S},_a=function(r,s){return{name:r,value:s}},Fa=function(r,s){return{name:r,value:s}},Ra=function(r){return{name:r,value:!0}},Na=function(r,s){return{name:r,value:s,typeExplicitlySet:!0}},Va=function(r){return r.toLowerCase()},La=function(r){return r.toLowerCase()},Ba=function(r){return r.toLowerCase()},Da=function(r){return r.toLowerCase()},Ha=function(r,s,v){return v},qa=function(r,s,v,h){return h},Ma=function(r,s,v,h){return h&&(s.label=h,s=Object.assign(s,P.parseTransitionExpression(h))),(v||[]).forEach(E=>P.setIf(s,E.name,E.value)),P.setIfNotEmpty(s,"note",r),s},za=function(r,s){return{from:r,to:s}},Ua=function(r,s){return{from:s,to:r}},Ja=function(r,s){return{name:r,value:s}},Xa=function(r,s){return{name:r,value:s}},Ga=function(r,s){return{name:r,value:s}},Wa=function(r,s){return{name:r,value:s}},Qa=function(r){return r.toLowerCase()},Ya=function(r){return r.toLowerCase()},Za=function(r){return r},Ka=function(r){return r.join("").trim()},el=function(r){return parseFloat(r.join(""))},tl=function(r){return parseInt(r.join(""),10)},nl=function(r){return r.join("").replace(/\\\"/g,'"')},Bt=function(r){return r},rl=function(r){return r.join("")},Dt=function(r){return r},al=function(r){return r.join("").trim()},ll=function(r){return r.join("").trim()},Ht=function(r){return r},qt=function(r){return r},ol=function(r){return r.join("")},il=function(r){return r},sl=function(r){return r},cl=function(r){return r},ul=function(r,s,v){return r+s.join("")+v},fl=function(r,s){return r+s.join("")},o=0,k=0,de=[{line:1,column:1}],D=0,we=[],y=0,he;if("startRule"in e){if(!(e.startRule in a))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');c=a[e.startRule]}function Zi(){return t.substring(k,o)}function Ki(){return k}function es(){return{source:m,start:k,end:o}}function ts(){return ae(k,o)}function ns(r,s){throw s=s!==void 0?s:ae(k,o),zt([C(r)],t.substring(k,o),s)}function rs(r,s){throw s=s!==void 0?s:ae(k,o),dl(r,s)}function A(r,s){return{type:"literal",text:r,ignoreCase:s}}function K(r,s,v){return{type:"class",parts:r,inverted:s,ignoreCase:v}}function pl(){return{type:"any"}}function ml(){return{type:"end"}}function C(r){return{type:"other",description:r}}function Mt(r){var s=de[r],v;if(s)return s;for(v=r-1;!de[v];)v--;for(s=de[v],s={line:s.line,column:s.column};v<r;)t.charCodeAt(v)===10?(s.line++,s.column=1):s.column++,v++;return de[r]=s,s}function ae(r,s,v){var h=Mt(r),E=Mt(s),S={source:m,start:{offset:r,line:h.line,column:h.column},end:{offset:s,line:E.line,column:E.column}};return v&&m&&typeof m.offset=="function"&&(S.start=m.offset(S.start),S.end=m.offset(S.end)),S}function $(r){o<D||(o>D&&(D=o,we=[]),we.push(r))}function dl(r,s){return new Q(r,null,null,s)}function zt(r,s,v){return new Q(Q.buildMessage(r,s),r,s,v)}function Ut(){var r,s,v,h;return r=o,s=T(),v=Jt(),h=T(),k=r,r=Sa(v),r}function Jt(){var r,s,v,h;for(y++,r=o,s=hl(),s===n&&(s=null),v=[],h=Wt();h!==n;)v.push(h),h=Wt();return k=r,r=Ta(s,v),y--,s=n,y===0&&$(yr),r}function hl(){var r,s,v,h,E,S;for(r=o,s=o,v=[],h=o,E=Oe(),E!==n?(t.charCodeAt(o)===44?(S=i,o++):(S=n,y===0&&$(me)),S!==n?(k=h,h=Lt(E)):(o=h,h=n)):(o=h,h=n);h!==n;)v.push(h),h=o,E=Oe(),E!==n?(t.charCodeAt(o)===44?(S=i,o++):(S=n,y===0&&$(me)),S!==n?(k=h,h=Lt(E)):(o=h,h=n)):(o=h,h=n);return h=o,E=Oe(),E!==n?(t.charCodeAt(o)===59?(S=f,o++):(S=n,y===0&&$(Z)),S!==n?(k=h,h=Aa(E)):(o=h,h=n)):(o=h,h=n),h!==n?(v=[v,h],s=v):(o=s,s=n),s!==n&&(k=r,s=wa(s)),r=s,r}function Oe(){var r,s,v,h,E,S,w,O,H,R,W,nn,je,zl,Pe;for(y++,r=o,s=[],v=ge();v!==n;)s.push(v),v=ge();return v=T(),h=oe(),h!==n?(E=T(),S=o,t.charCodeAt(o)===91?(w=g,o++):(w=n,y===0&&$(wt)),w!==n?(O=gl(),t.charCodeAt(o)===93?(H=p,o++):(H=n,y===0&&$(Ot)),H!==n?(k=S,S=Oa(s,h,O)):(o=S,S=n)):(o=S,S=n),S===n&&(S=null),w=T(),O=o,t.charCodeAt(o)===58?(H=d,o++):(H=n,y===0&&$(Ct)),H!==n?(R=T(),W=Pl(),W!==n?(nn=T(),k=O,O=Ca(s,h,S,W)):(o=O,O=n)):(o=O,O=n),O===n&&(O=null),H=T(),R=o,t.charCodeAt(o)===123?(W=l,o++):(W=n,y===0&&$(re)),W!==n?(nn=T(),je=Jt(),je!==n?(zl=T(),t.charCodeAt(o)===125?(Pe=b,o++):(Pe=n,y===0&&$(br)),Pe!==n?(k=R,R=ja(s,h,S,O,je)):(o=R,R=n)):(o=R,R=n)):(o=R,R=n),R===n&&(R=null),W=T(),k=r,r=Pa(s,h,S,O,R)):(o=r,r=n),y--,r===n&&(s=n,y===0&&$(vr)),r}function gl(){var r,s;for(y++,r=[],s=Xt();s!==n;)r.push(s),s=Xt();return y--,s=n,y===0&&$(xr),r}function Xt(){var r,s,v,h,E,S,w,O;return y++,r=o,s=T(),v=yl(),v!==n?(h=T(),t.charCodeAt(o)===61?(E=u,o++):(E=n,y===0&&$(X)),E!==n?(S=T(),w=le(),w!==n?(O=T(),k=r,r=_a(v,w)):(o=r,r=n)):(o=r,r=n)):(o=r,r=n),r===n&&(r=o,s=T(),v=Gt(),v!==n?(h=T(),t.charCodeAt(o)===61?(E=u,o++):(E=n,y===0&&$(X)),E!==n?(S=T(),w=Yt(),w!==n?(O=T(),k=r,r=Fa(v,w)):(o=r,r=n)):(o=r,r=n)):(o=r,r=n),r===n&&(r=o,s=T(),v=vl(),v!==n?(h=T(),k=r,r=Ra(v)):(o=r,r=n),r===n&&(r=o,s=T(),v=bl(),v!==n?(h=T(),t.charCodeAt(o)===61?(E=u,o++):(E=n,y===0&&$(X)),E!==n?(S=T(),w=xl(),w!==n?(O=T(),k=r,r=Na(v,w)):(o=r,r=n)):(o=r,r=n)):(o=r,r=n)))),y--,r===n&&(s=n,y===0&&$($r)),r}function yl(){var r,s;return y++,r=o,t.substr(o,5).toLowerCase()===I?(s=t.substr(o,5),o+=5):(s=n,y===0&&$(Er)),s===n&&(t.substr(o,5).toLowerCase()===x?(s=t.substr(o,5),o+=5):(s=n,y===0&&$(jt))),s!==n&&(k=r,s=Va(s)),r=s,y--,r===n&&(s=n,y===0&&$(Ir)),r}function Gt(){var r,s;return y++,r=o,t.substr(o,5).toLowerCase()===_?(s=t.substr(o,5),o+=5):(s=n,y===0&&$(Sr)),s!==n&&(k=r,s=La(s)),r=s,y--,r===n&&(s=n,y===0&&$(kr)),r}function vl(){var r,s;return y++,r=o,t.substr(o,6).toLowerCase()===B?(s=t.substr(o,6),o+=6):(s=n,y===0&&$(Ar)),s!==n&&(k=r,s=Ba(s)),r=s,y--,r===n&&(s=n,y===0&&$(Tr)),r}function bl(){var r,s;return y++,r=o,t.substr(o,4).toLowerCase()===Qe?(s=t.substr(o,4),o+=4):(s=n,y===0&&$(Pt)),s!==n&&(k=r,s=Da(s)),r=s,y--,r===n&&(s=n,y===0&&$(wr)),r}function xl(){var r,s;return y++,t.substr(o,7)===Ye?(r=Ye,o+=7):(r=n,y===0&&$(Cr)),r===n&&(t.substr(o,7)===Ze?(r=Ze,o+=7):(r=n,y===0&&$(jr)),r===n&&(t.substr(o,9)===Ke?(r=Ke,o+=9):(r=n,y===0&&$(Pr)),r===n&&(t.substr(o,5)===et?(r=et,o+=5):(r=n,y===0&&$(_r)),r===n&&(t.substr(o,8)===tt?(r=tt,o+=8):(r=n,y===0&&$(Fr)),r===n&&(t.substr(o,7)===nt?(r=nt,o+=7):(r=n,y===0&&$(Rr)),r===n&&(t.substr(o,11)===rt?(r=rt,o+=11):(r=n,y===0&&$(Nr)),r===n&&(t.substr(o,6)===at?(r=at,o+=6):(r=n,y===0&&$(Vr)),r===n&&(t.substr(o,8)===lt?(r=lt,o+=8):(r=n,y===0&&$(Lr)),r===n&&(t.substr(o,4)===ot?(r=ot,o+=4):(r=n,y===0&&$(Br)),r===n&&(t.substr(o,4)===it?(r=it,o+=4):(r=n,y===0&&$(Dr)),r===n&&(t.substr(o,8)===st?(r=st,o+=8):(r=n,y===0&&$(Hr))))))))))))),y--,r===n&&(s=n,y===0&&$(Or)),r}function Wt(){var r,s,v,h,E,S,w,O,H;for(y++,r=o,s=[],v=ge();v!==n;)s.push(v),v=ge();return v=$l(),v!==n?(h=o,t.charCodeAt(o)===91?(E=g,o++):(E=n,y===0&&$(wt)),E!==n?(S=Il(),t.charCodeAt(o)===93?(w=p,o++):(w=n,y===0&&$(Ot)),w!==n?(O=T(),k=h,h=Ha(s,v,S)):(o=h,h=n)):(o=h,h=n),h===n&&(h=null),E=o,t.charCodeAt(o)===58?(S=d,o++):(S=n,y===0&&$(Ct)),S!==n?(w=T(),O=jl(),O!==n?(H=T(),k=E,E=qa(s,v,h,O)):(o=E,E=n)):(o=E,E=n),E===n&&(E=null),t.charCodeAt(o)===59?(S=f,o++):(S=n,y===0&&$(Z)),S!==n?(k=r,r=Ma(s,v,h,E)):(o=r,r=n)):(o=r,r=n),y--,r===n&&(s=n,y===0&&$(qr)),r}function $l(){var r,s,v,h,E,S,w,O;return r=o,s=T(),v=oe(),v!==n?(h=T(),E=Al(),E!==n?(S=T(),w=oe(),w!==n?(O=T(),k=r,r=za(v,w)):(o=r,r=n)):(o=r,r=n)):(o=r,r=n),r===n&&(r=o,s=T(),v=oe(),v!==n?(h=T(),E=wl(),E!==n?(S=T(),w=oe(),w!==n?(O=T(),k=r,r=Ua(v,w)):(o=r,r=n)):(o=r,r=n)):(o=r,r=n)),r}function Il(){var r,s;for(y++,r=[],s=Qt();s!==n;)r.push(s),s=Qt();return y--,s=n,y===0&&$(Mr),r}function Qt(){var r,s,v,h,E,S,w,O;return y++,r=o,s=T(),v=El(),v!==n?(h=T(),t.charCodeAt(o)===61?(E=u,o++):(E=n,y===0&&$(X)),E!==n?(S=T(),w=le(),w!==n?(O=T(),k=r,r=Ja(v,w)):(o=r,r=n)):(o=r,r=n)):(o=r,r=n),r===n&&(r=o,s=T(),v=Gt(),v!==n?(h=T(),t.charCodeAt(o)===61?(E=u,o++):(E=n,y===0&&$(X)),E!==n?(S=T(),w=Yt(),w!==n?(O=T(),k=r,r=Xa(v,w)):(o=r,r=n)):(o=r,r=n)):(o=r,r=n),r===n&&(r=o,s=T(),v=kl(),v!==n?(h=T(),t.charCodeAt(o)===61?(E=u,o++):(E=n,y===0&&$(X)),E!==n?(S=T(),w=Tl(),w!==n?(O=T(),k=r,r=Ga(v,w)):(o=r,r=n)):(o=r,r=n)):(o=r,r=n),r===n&&(r=o,s=T(),v=Sl(),v!==n?(h=T(),t.charCodeAt(o)===61?(E=u,o++):(E=n,y===0&&$(X)),E!==n?(S=T(),w=Ol(),w!==n?(O=T(),k=r,r=Wa(v,w)):(o=r,r=n)):(o=r,r=n)):(o=r,r=n)))),y--,r===n&&(s=n,y===0&&$(zr)),r}function El(){var r,s;return y++,r=o,t.substr(o,5).toLowerCase()===x?(s=t.substr(o,5),o+=5):(s=n,y===0&&$(jt)),s!==n&&(k=r,s=Qa(s)),r=s,y--,r===n&&(s=n,y===0&&$(Ur)),r}function kl(){var r,s;return y++,r=o,t.substr(o,4).toLowerCase()===Qe?(s=t.substr(o,4),o+=4):(s=n,y===0&&$(Pt)),s!==n&&(k=r,s=Ya(s)),r=s,y--,r===n&&(s=n,y===0&&$(Jr)),r}function Sl(){var r,s;return y++,r=o,t.substr(o,5).toLowerCase()===fr?(s=t.substr(o,5),o+=5):(s=n,y===0&&$(Gr)),s!==n&&(k=r,s=Za(s)),r=s,y--,r===n&&(s=n,y===0&&$(Xr)),r}function Tl(){var r,s;return y++,t.substr(o,8)===ct?(r=ct,o+=8):(r=n,y===0&&$(Qr)),r===n&&(t.substr(o,8)===ut?(r=ut,o+=8):(r=n,y===0&&$(Yr))),y--,r===n&&(s=n,y===0&&$(Wr)),r}function Al(){var r,s;return y++,t.substr(o,2)===ft?(r=ft,o+=2):(r=n,y===0&&$(Kr)),r===n&&(t.substr(o,3)===pt?(r=pt,o+=3):(r=n,y===0&&$(ea)),r===n&&(t.substr(o,2)===mt?(r=mt,o+=2):(r=n,y===0&&$(ta)),r===n&&(t.substr(o,2)===dt?(r=dt,o+=2):(r=n,y===0&&$(na)),r===n&&(t.substr(o,2)===ht?(r=ht,o+=2):(r=n,y===0&&$(ra)),r===n&&(t.substr(o,2)===gt?(r=gt,o+=2):(r=n,y===0&&$(aa)),r===n&&(t.substr(o,2)===yt?(r=yt,o+=2):(r=n,y===0&&$(la)))))))),y--,r===n&&(s=n,y===0&&$(Zr)),r}function wl(){var r,s;return y++,t.substr(o,2)===vt?(r=vt,o+=2):(r=n,y===0&&$(ia)),r===n&&(t.substr(o,3)===bt?(r=bt,o+=3):(r=n,y===0&&$(sa)),r===n&&(t.substr(o,2)===xt?(r=xt,o+=2):(r=n,y===0&&$(ca)),r===n&&(t.substr(o,2)===$t?(r=$t,o+=2):(r=n,y===0&&$(ua)),r===n&&(t.substr(o,2)===It?(r=It,o+=2):(r=n,y===0&&$(fa)))))),y--,r===n&&(s=n,y===0&&$(oa)),r}function ge(){var r,s,v,h,E;if(r=o,s=T(),t.charCodeAt(o)===35?(v=pr,o++):(v=n,y===0&&$(pa)),v!==n){for(h=[],E=ye();E!==n;)h.push(E),E=ye();k=r,r=Ka(h)}else o=r,r=n;return r}function Ol(){var r;return r=Cl(),r===n&&(r=Ce()),r}function Cl(){var r,s,v,h,E;return r=o,s=o,v=Ce(),v!==n?(t.charCodeAt(o)===46?(h=mr,o++):(h=n,y===0&&$(ma)),h!==n?(E=Ce(),E!==n?(v=[v,h,E],s=v):(o=s,s=n)):(o=s,s=n)):(o=s,s=n),s!==n&&(k=r,s=el(s)),r=s,r}function Ce(){var r,s,v;if(r=o,s=[],St.test(t.charAt(o))?(v=t.charAt(o),o++):(v=n,y===0&&$(_t)),v!==n)for(;v!==n;)s.push(v),St.test(t.charAt(o))?(v=t.charAt(o),o++):(v=n,y===0&&$(_t));else s=n;return s!==n&&(k=r,s=tl(s)),r=s,r}function jl(){var r;return r=le(),r===n&&(r=Rl()),r}function Pl(){var r;return r=le(),r===n&&(r=Nl()),r}function le(){var r,s,v,h;return y++,r=o,t.charCodeAt(o)===34?(s=z,o++):(s=n,y===0&&$(U)),s!==n?(v=_l(),t.charCodeAt(o)===34?(h=z,o++):(h=n,y===0&&$(U)),h!==n?(k=r,r=nl(v)):(o=r,r=n)):(o=r,r=n),y--,r===n&&(s=n,y===0&&$(da)),r}function _l(){var r,s,v,h;for(r=[],s=o,v=o,y++,t.charCodeAt(o)===34?(h=z,o++):(h=n,y===0&&$(U)),y--,h===n?v=void 0:(o=v,v=n),v!==n?(t.substr(o,2)===fe?(h=fe,o+=2):(h=n,y===0&&$(Ft)),h===n&&(t.length>o?(h=t.charAt(o),o++):(h=n,y===0&&$(G))),h!==n?(k=s,s=Bt(h)):(o=s,s=n)):(o=s,s=n);s!==n;)r.push(s),s=o,v=o,y++,t.charCodeAt(o)===34?(h=z,o++):(h=n,y===0&&$(U)),y--,h===n?v=void 0:(o=v,v=n),v!==n?(t.substr(o,2)===fe?(h=fe,o+=2):(h=n,y===0&&$(Ft)),h===n&&(t.length>o?(h=t.charAt(o),o++):(h=n,y===0&&$(G))),h!==n?(k=s,s=Bt(h)):(o=s,s=n)):(o=s,s=n);return r}function Yt(){var r,s,v,h;return y++,r=o,t.charCodeAt(o)===34?(s=z,o++):(s=n,y===0&&$(U)),s!==n?(v=Fl(),t.charCodeAt(o)===34?(h=z,o++):(h=n,y===0&&$(U)),h!==n?(k=r,r=rl(v)):(o=r,r=n)):(o=r,r=n),y--,r===n&&(s=n,y===0&&$(ha)),r}function Fl(){var r,s,v,h;for(r=[],s=o,v=o,y++,t.charCodeAt(o)===34?(h=z,o++):(h=n,y===0&&$(U)),y--,h===n?v=void 0:(o=v,v=n),v!==n?(Tt.test(t.charAt(o))?(h=t.charAt(o),o++):(h=n,y===0&&$(Rt)),h!==n?(k=s,s=Dt(h)):(o=s,s=n)):(o=s,s=n);s!==n;)r.push(s),s=o,v=o,y++,t.charCodeAt(o)===34?(h=z,o++):(h=n,y===0&&$(U)),y--,h===n?v=void 0:(o=v,v=n),v!==n?(Tt.test(t.charAt(o))?(h=t.charAt(o),o++):(h=n,y===0&&$(Rt)),h!==n?(k=s,s=Dt(h)):(o=s,s=n)):(o=s,s=n);return r}function Rl(){var r,s;return r=o,s=Ll(),k=r,s=al(s),r=s,r}function Nl(){var r,s;return r=o,s=Vl(),k=r,s=ll(s),r=s,r}function Vl(){var r,s,v,h;for(r=[],s=o,v=o,y++,t.charCodeAt(o)===44?(h=i,o++):(h=n,y===0&&$(me)),h===n&&(t.charCodeAt(o)===59?(h=f,o++):(h=n,y===0&&$(Z)),h===n&&(t.charCodeAt(o)===123?(h=l,o++):(h=n,y===0&&$(re)))),y--,h===n?v=void 0:(o=v,v=n),v!==n?(t.length>o?(h=t.charAt(o),o++):(h=n,y===0&&$(G)),h!==n?(k=s,s=Ht(h)):(o=s,s=n)):(o=s,s=n);s!==n;)r.push(s),s=o,v=o,y++,t.charCodeAt(o)===44?(h=i,o++):(h=n,y===0&&$(me)),h===n&&(t.charCodeAt(o)===59?(h=f,o++):(h=n,y===0&&$(Z)),h===n&&(t.charCodeAt(o)===123?(h=l,o++):(h=n,y===0&&$(re)))),y--,h===n?v=void 0:(o=v,v=n),v!==n?(t.length>o?(h=t.charAt(o),o++):(h=n,y===0&&$(G)),h!==n?(k=s,s=Ht(h)):(o=s,s=n)):(o=s,s=n);return r}function Ll(){var r,s,v,h;for(r=[],s=o,v=o,y++,t.charCodeAt(o)===59?(h=f,o++):(h=n,y===0&&$(Z)),h===n&&(t.charCodeAt(o)===123?(h=l,o++):(h=n,y===0&&$(re))),y--,h===n?v=void 0:(o=v,v=n),v!==n?(t.length>o?(h=t.charAt(o),o++):(h=n,y===0&&$(G)),h!==n?(k=s,s=qt(h)):(o=s,s=n)):(o=s,s=n);s!==n;)r.push(s),s=o,v=o,y++,t.charCodeAt(o)===59?(h=f,o++):(h=n,y===0&&$(Z)),h===n&&(t.charCodeAt(o)===123?(h=l,o++):(h=n,y===0&&$(re))),y--,h===n?v=void 0:(o=v,v=n),v!==n?(t.length>o?(h=t.charAt(o),o++):(h=n,y===0&&$(G)),h!==n?(k=s,s=qt(h)):(o=s,s=n)):(o=s,s=n);return r}function oe(){var r,s,v;if(y++,r=o,s=[],At.test(t.charAt(o))?(v=t.charAt(o),o++):(v=n,y===0&&$(Nt)),v!==n)for(;v!==n;)s.push(v),At.test(t.charAt(o))?(v=t.charAt(o),o++):(v=n,y===0&&$(Nt));else s=n;return s!==n&&(k=r,s=ol(s)),r=s,r===n&&(r=le()),y--,r===n&&(s=n,y===0&&$(ga)),r}function Zt(){var r,s;return y++,r=o,dr.test(t.charAt(o))?(s=t.charAt(o),o++):(s=n,y===0&&$(va)),s!==n&&(k=r,s=il(s)),r=s,y--,r===n&&(s=n,y===0&&$(ya)),r}function Kt(){var r,s;return y++,r=o,hr.test(t.charAt(o))?(s=t.charAt(o),o++):(s=n,y===0&&$(xa)),s!==n&&(k=r,s=sl(s)),r=s,y--,r===n&&(s=n,y===0&&$(ba)),r}function Bl(){var r;return t.substr(o,2)===Et?(r=Et,o+=2):(r=n,y===0&&$($a)),r}function Dl(){var r;return t.substr(o,2)===pe?(r=pe,o+=2):(r=n,y===0&&$(Vt)),r}function en(){var r,s,v;return r=o,s=o,y++,t.substr(o,2)===pe?(v=pe,o+=2):(v=n,y===0&&$(Vt)),y--,v===n?s=void 0:(o=s,s=n),s!==n?(t.length>o?(v=t.charAt(o),o++):(v=n,y===0&&$(G)),v!==n?(k=r,r=cl(v)):(o=r,r=n)):(o=r,r=n),r}function Hl(){var r,s,v,h;if(r=o,s=Bl(),s!==n){for(v=[],h=en();h!==n;)v.push(h),h=en();h=Dl(),h!==n?(k=r,r=ul(s,v,h)):(o=r,r=n)}else o=r,r=n;return r}function ql(){var r;return t.substr(o,2)===kt?(r=kt,o+=2):(r=n,y===0&&$(Ia)),r}function ye(){var r;return gr.test(t.charAt(o))?(r=t.charAt(o),o++):(r=n,y===0&&$(Ea)),r}function Ml(){var r,s,v,h;if(r=o,s=ql(),s!==n){for(v=[],h=ye();h!==n;)v.push(h),h=ye();k=r,r=fl(s,v)}else o=r,r=n;return r}function tn(){var r,s;return y++,r=Ml(),r===n&&(r=Hl()),y--,r===n&&(s=n,y===0&&$(ka)),r}function T(){var r,s;for(r=[],s=Zt(),s===n&&(s=Kt(),s===n&&(s=tn()));s!==n;)r.push(s),s=Zt(),s===n&&(s=Kt(),s===n&&(s=tn()));return r}if(he=c(),he!==n&&o===t.length)return he;throw he!==n&&o<t.length&&$(ml()),zt(we,D<t.length?t.charAt(D):null,D<t.length?ae(D,D+1):ae(D,D))}var kn=F(require("fast-xml-parser"),1),Y=F(require("he"),1),Ee=F(require("lodash/castArray.js"),1),Sn=F($n(),1);function bo(t,e,n){let m="";return t&&(m+=t),e&&(m+=` [${e}]`),n&&(m+=`/ ${n}`),m.trim()}var Ie={formatLabel:bo};var ie=F(require("lodash/castArray.js"),1);function xo(t,e){let n={id:e?`${e}.initial`:"initial"};return t.transition&&Object.assign(n,{transition:[t.transition]}),n}function $o(t){return{id:"initial",transition:[{target:t}]}}function Io(t){let e=[];return t.initial&&(typeof t.initial=="string"?e.push($o(t.initial)):e.push(xo(t.initial,t.id))),e}function In(t){return{...t,initial:Io(t),state:(0,ie.default)((t==null?void 0:t.state)??[]),parallel:(0,ie.default)((t==null?void 0:t.parallel)??[]),history:(0,ie.default)((t==null?void 0:t.history)??[]),final:(0,ie.default)((t==null?void 0:t.final)??[])}}var Eo=Ie.formatLabel;function En(t,e){return(0,Ee.default)(t[e]).map(n=>({type:e==="onexit"?"exit":"entry",body:Y.default.decode(n).trim()}))}function ko(t){return(0,Ee.default)(t).map(e=>({type:"activity",body:Y.default.decode(e.id||"").trim()||Y.default.decode(e||"").trim()}))}function So(t){let e=[];return t.onentry&&(e=e.concat(En(t,"onentry"))),t.invoke&&(e=e.concat(ko(t.invoke))),t.onexit&&(e=e.concat(En(t,"onexit"))),e}function To(t,e){return t==="history"&&e.type==="deep"?"deephistory":t}function se(t){return e=>{let n={name:e.id,type:To(t,e)};return P.getStateType(e.id)!==n.type&&(n.typeExplicitlySet=!0),(e.onentry||e.onexit||e.invoke)&&(n.actions=So(e)),Object.keys(e).some(m=>["initial","state","history","parallel","final"].includes(m))&&(n.statemachine=Tn(e)),n}}function Ao(t){let e={};return t.event&&(e.event=t.event.split(/\s+/).join(`
|
|
76
|
-
`)),t.cond&&(e.cond=t.cond),t["#text"]&&(e.action=Y.default.decode(t["#text"]).trim()),t.type&&(e.type=t.type),e}function wo(t){let e={};typeof t=="string"?e.action=Y.default.decode(t).trim():Object.assign(e,Ao(t));let n=Eo(e.event,e.cond,e.action);return n&&(e.label=n),e}function Oo(t){return(e,n)=>{let m=((n==null?void 0:n.target)??t.id).split(/\s+/),a=wo(n);return e.concat(m.map(c=>({from:t.id,to:c,...a})))}}function Re(t){return t.filter(e=>Object.prototype.hasOwnProperty.call(e,"transition")).reduce((e,n)=>e.concat((0,Ee.default)(n.transition).reduce(Oo(n),[])),[])}function Tn(t){let e=In(t),n={states:e.initial.map(se("initial")).concat(e.state.map(se("regular"))).concat(e.parallel.map(se("parallel"))).concat(e.history.map(se("history"))).concat(e.final.map(se("final")))},m=Re(e.initial).concat(Re(e.state)).concat(Re(e.parallel));return m.length>0&&(n.transitions=m),n}function Co(t,e){return(0,Sn.default)(t).map(function(){var m;if((m=this.key)!=null&&m.startsWith(e)){let a=this.key.slice(e.length);this.parent.keys.includes(a)?this.remove():(this.parent.node[a]=this.node,this.remove())}})}function An(t){let e=t.trim(),n="@_",m={},a=new kn.default.XMLParser({attributeNamePrefix:n,ignoreAttributes:!1,parseTagValue:!0,processEntities:!1,tagValueProcessor:(c,i)=>Y.default.decode(i),stopNodes:["*.onentry","*.onexit","*.transition"]});try{m=Co(a.parse(e,!0),n)}catch{throw new Error(`That doesn't look like valid xml ...
|
|
77
|
-
`)}return Tn((m==null?void 0:m.scxml)??{xmlns:"http://www.w3.org/2005/07/scxml",version:"1.0"})}var wn={$schema:"http://json-schema.org/draft-07/schema#",title:"state-machine-cat abstract syntax tree schema",$ref:"#/definitions/StateMachineType",$id:"org.js.state-machine-cat/v7.4.0",definitions:{StateType:{type:"string",enum:["regular","initial","terminate","final","parallel","history","deephistory","choice","forkjoin","fork","join","junction"]},TransitionType:{type:"string",enum:["internal","external"]},NoteType:{type:"array",items:{type:"string"}},ActionTypeType:{type:"string",enum:["entry","activity","exit"]},ActionType:{type:"object",required:["type","body"],additionalProperties:!1,properties:{type:{$ref:"#/definitions/ActionTypeType"},body:{type:"string"}}},ClassType:{type:"string",pattern:"^[a-zA-Z0-9_\\- ]*$"},StateMachineType:{type:"object",additionalProperties:!1,required:["states"],properties:{states:{type:"array",items:{type:"object",required:["name","type"],additionalProperties:!1,properties:{name:{description:"The name and identifier of the state. Unique within the root state machine.",type:"string"},type:{description:"What kind of state (or pseudo state) this state is. E.g. 'regular' for normal states or 'initial', 'final', 'choice' etc for pseudo states. Most UML (pseudo-) states are supported.",$ref:"#/definitions/StateType"},label:{description:"The display label of the state. If it's not present, most renderers will use the states' name in stead.",type:"string"},color:{description:'Color to use for rendering the state. Accepts all css color names ("blue") and hex notation - with ("#0000FF77") or without ("#0000FF") transparency.',type:"string"},class:{description:"Class name to give the state in dot and svg output.",$ref:"#/definitions/ClassType"},active:{description:"If true the state is considered to be active and rendered as such.",type:"boolean"},typeExplicitlySet:{description:"The default parser derives the `type` from the `name` with inband signaling. The user can override that behavior by explicitly setting the `type`. This attribute is there to express that (and make sure that on next parses & processing it doesn't get accidentily re-derived from the name again).",type:"boolean"},isComposite:{description:"convenience, derived attribute - set to true if there's a state machine inside the state; false in all other cases. For internal use - @deprecated",type:"boolean"},actions:{type:"array",description:"A series of actions and their types. The type describe when the action takes place (on entry, exit, or otherwise ('activity'))",items:{$ref:"#/definitions/ActionType"}},note:{description:"Comments related to this state. Some renderers will use the note attribute to render a note (i.e. as a post-it) attached to the state.",$ref:"#/definitions/NoteType"},statemachine:{description:"state machine nested within the state.",$ref:"#/definitions/StateMachineType"}}}},transitions:{type:"array",items:{type:"object",required:["from","to"],additionalProperties:!1,properties:{from:{description:"The name of the state this transition transitions from",type:"string"},to:{description:"The name of the state this transition transitions to",type:"string"},label:{description:"A display label to represent this transition. Parsers can parse this label into events conditions and actions.",type:"string"},event:{description:"Event triggering the transition",type:"string"},cond:{description:"Condition for the transition to occur.",type:"string"},action:{description:"Action to execute when the transition occurs.",type:"string"},note:{description:"Comments related to this transition",$ref:"#/definitions/NoteType"},color:{description:'Color to use for rendering the transition. Accepts all css color names ("blue") and hex notation - with ("#0000FF77") or without ("#0000FF") transparency.',type:"string"},width:{description:"The line width to use for rendering the transition",type:"number",minimum:0,maximum:30},class:{description:"Class name to give the state in dot and svg output.",$ref:"#/definitions/ClassType"},type:{description:"Whether the transition is external (default) or internal. See https://www.w3.org/TR/scxml/#transition for details.",$ref:"#/definitions/TransitionType"}}}}}}}};var On=new Cn.default;function jo(t,e){if(!On.validate(t,e))throw new Error(`The provided JSON is not a valid state-machine-cat AST: ${On.errorsText()}.
|
|
78
|
-
`)}var jn={getAST(t,e){let n=t;return N.getOptionValue(e,"inputType")==="smcat"?n=hn(t):N.getOptionValue(e,"inputType")==="scxml"?n=An(t):typeof t=="string"&&(n=JSON.parse(t)),jo(wn,n),n}};var Ve=F(require("lodash/cloneDeep.js"),1),Ne=F(require("lodash/reject.js"),1);function Po(t,e,n){return t?`${t}${n}${e}`:e}function _o(t,e){let n={...t,...e,from:t.from,to:e.to};return e.action&&(n.action=Po(t.action,e.action,`
|
|
79
|
-
`)),(n.event||n.cond||n.action)&&(n.label=Ie.formatLabel(n.event,n.cond,n.action)),n}function Fo(t,e,n){return t.reduce((m,a)=>(e.forEach((c,i)=>{c===a.to&&n[c]?m=m.concat(n[c].map(f=>_o(a,f))):m=i===0?m.concat(a):m}),m),[])}function Pn(t,e,n){let m=(0,Ve.default)(t);return m.transitions&&e.length>0&&(m.transitions=Fo(m.transitions,e,n)),m.states=m.states.map(a=>a.statemachine?{...a,statemachine:Pn(a.statemachine,e,n)}:a),m}function _n(t,e){let n=(0,Ve.default)(t);return n.transitions&&(n.transitions=(0,Ne.default)(n.transitions,m=>e.some(a=>a===m.from||a===m.to))),n.states=(0,Ne.default)(n.states,m=>e.includes(m.name)).map(m=>m.statemachine?{...m,statemachine:_n(m.statemachine,e)}:m),n}var Fn=(t,e=["fork","junction","choice"])=>{let n=new L(t),m=n.findStatesByTypes(e).map(({name:i})=>i),a=m.reduce((i,f)=>(i[f]=n.findTransitionsByFrom(f),i),{}),c=Pn(t,m,a);return _n(c,m)};var lr=F(require("lodash/has.js"),1),or=F(Bn(),1);var Jn=F(require("lodash/cloneDeep.js"),1);var Uo=[{name:"fontname",value:'"Helvetica"'},{name:"fontsize",value:"12"},{name:"penwidth",value:"2.0"}],Jo={dot:[{name:"splines",value:"true"},{name:"ordering",value:"out"},{name:"compound",value:"true"},{name:"overlap",value:"scale"},{name:"nodesep",value:"0.3"},{name:"ranksep",value:"0.1"}],fdp:[{name:"K",value:"0.9"}],osage:[{name:"pack",value:"42"}],neato:[{name:"epsilon",value:"0.9"}]},Xo={"bottom-top":[{name:"rankdir",value:"BT"}],"left-right":[{name:"rankdir",value:"LR"}],"right-left":[{name:"rankdir",value:"RL"}]},Go=[{name:"shape",value:"plaintext"},{name:"style",value:"filled"},{name:"fillcolor",value:'"#FFFFFF01"'},{name:"fontname",value:"Helvetica"},{name:"fontsize",value:12},{name:"penwidth",value:"2.0"}],Wo=[{name:"fontname",value:"Helvetica"},{name:"fontsize",value:10}];function De(t){return`${t.name}=${t.value}`}var ke={buildGraphAttributes:(t,e,n)=>Uo.concat(Jo[t]||[]).concat(Xo[e]||[]).concat(n||[]).map(De).join(" "),buildNodeAttributes:t=>Go.concat(t||[]).map(De).join(" "),buildEdgeAttributes:t=>Wo.concat(t||[]).map(De).join(" ")};var Dn=F(require("lodash/cloneDeep.js"),1);function Qo(t){return t.replace(/\\/g,"\\\\").replace(/\n\s*/g,"\\l").replace(/"/g,'\\"').concat("\\l")}function Yo(t){return t.replace(/\\/g,"\\\\").replace(/\n\s*/g," \\l").replace(/"/g,'\\"').concat(" \\l")}function Zo(t){let e=t||"top-down";return e==="top-down"||e==="bottom-top"}function Ko(t,e){return e.from===e.to&&t.findStateByName(e.from).statemachine&&e.type!=="internal"}var M={escapeString:Qo,escapeLabelString:Yo,isVertical:Zo,isCompositeSelf:Ko};function Hn(t){return e=>e.type===t}function He(t){return e=>t.includes(e.type)}function ei(t){let e=(0,Dn.default)(t);return e.label=t.label||t.name,e}function ti(t){return t.note?{noteName:`note_${t.name}`,...t}:t}function ni(t){let e={...t},n=["state",t.type];return t.class&&n.push(t.class.trim().replace(/[ ]{2,}/g," ")),e.class=n.join(" "),e}function ri(t){return t==="activity"?"":`${t}/ `}function ai(t){return t.actions?{...t,actionStrings:t.actions.map(e=>`${ri(e.type)}${e.body}`)}:t}function li(t){return t.note?{...t,noteFlattened:t.note.join("")}:t}function oi(t){return e=>{var m;let n=(m=(t||[]).find(a=>a.name==="color"))==null?void 0:m.value;return n&&!e.color&&He(["initial","fork","join","junction","forkjoin","final"])(e)&&(e.color=n),e}}function ii(t){return t.note?{...t,note:t.note.map(M.escapeString)}:t}function si(t){return e=>He(["fork","join","forkjoin"])(e)?{sizingExtras:M.isVertical(t)?"height=0.1":"width=0.1",...e}:e}function ci(t){return t.type==="parallel"&&t.statemachine&&t.statemachine.states&&(t.statemachine.states=t.statemachine.states.map(e=>Hn("regular")(e)?{...e,parentIsParallel:!0}:e)),t}var j={isType:Hn,isOneOfTypes:He,setLabel:ei,classifyState:ni,nameNote:ti,flattenActions:ai,flattenNote:li,recolor:oi,escapeStateStrings:ii,tipForkJoinStates:si,flagParallelChildren:ci};function ui(t){let e={...t};return e.note&&(e.note=e.note.map(M.escapeString)),e.label&&(e.label=M.escapeLabelString(e.label)),e}function fi(t){return e=>{let n={};return e.isCompositeSelf&&(M.isVertical(t)?n={tailportflags:'tailport="e" headport="e"',headportflags:'tailport="w"'}:e.hasParent?n={tailportflags:'tailport="n" headport="n"',headportflags:'tailport="s"'}:n={tailportflags:'tailport="s" headport="s"',headportflags:'tailport="n"'}),{...e,...n}}}function pi(t){let e=["transition"];return t.type&&e.push(t.type),t.class&&e.push(t.class.trim().replace(/[ ]{2,}/g," ")),t.class=e.join(" "),t}var Se={escapeTransitionStrings:ui,addPorts:fi,classifyTransition:pi};var ce=class{COUNTER=0;constructor(){this.reset()}reset(){this.COUNTER=0}next(){return++this.COUNTER}nextAsString(){return this.next().toString(10)}};var Xn=F(Un(),1);function bi(t){return e=>(Object.prototype.hasOwnProperty.call(e,"statemachine")&&(e.nestedExternalSelfTransitions=t.findExternalSelfTransitions(e.name).map(n=>n.name)),e)}function Gn(t,e,n,m){return t.filter(a=>a.statemachine).forEach(a=>{a.statemachine.states=Gn(a.statemachine.states,e,n,m)}),t.map(j.setLabel).map(j.nameNote).map(j.classifyState).map(j.escapeStateStrings).map(j.flattenNote).map(j.flattenActions).map(j.flagParallelChildren).map(j.tipForkJoinStates(e)).map(j.recolor(n)).map(bi(m))}function xi(t){return t.initialStates=t.states.filter(j.isType("initial")),t.regularStates=t.states.filter(e=>j.isType("regular")(e)&&!e.statemachine),t.historyStates=t.states.filter(j.isType("history")),t.deepHistoryStates=t.states.filter(j.isType("deephistory")),t.choiceStates=t.states.filter(j.isType("choice")),t.forkjoinStates=t.states.filter(j.isOneOfTypes(["fork","join","forkjoin"])),t.junctionStates=t.states.filter(j.isType("junction")),t.terminateStates=t.states.filter(j.isType("terminate")),t.finalStates=t.states.filter(j.isType("final")),t.compositeStates=t.states.filter(e=>e.statemachine),t}function $i(t){return e=>(t.findStateByName(e.from).statemachine&&(e.fromComposite=!0),t.findStateByName(e.to).statemachine&&(e.toComposite=!0),e)}function Ii(t){return e=>{let n={};return M.isCompositeSelf(t,e)&&(t.findStateByName(e.from).hasParent?n={hasParent:!0,isCompositeSelf:!0}:n={isCompositeSelf:!0}),{...e,...n}}}function Ei(t){return e=>(e.name=`tr_${e.from}_${e.to}_${t.nextAsString()}`,Boolean(e.note)&&(e.noteName=`note_${e.name}`),e)}function ki(t,e,n){return t.flattenedTransitions.map(Ei(n)).map(Se.escapeTransitionStrings).map(Se.classifyTransition).map(j.flattenNote).map($i(t)).map(Ii(t)).map(Se.addPorts(e))}var Te=(t,e)=>{e=e||{};let n=(0,Jn.default)(t),m=new L(n);return n.transitions=ki(m,e.direction,new ce),n.states=Gn(n.states,e.direction,e.dotNodeAttrs,m),n=xi(n),n.graphAttributes=ke.buildGraphAttributes(N.getOptionValue(e,"engine"),N.getOptionValue(e,"direction"),e.dotGraphAttrs),n.nodeAttributes=ke.buildNodeAttributes(e.dotNodeAttrs),n.edgeAttributes=ke.buildEdgeAttributes(e.dotEdgeAttrs),(0,Xn.default)(n)};var Wn=F(require("viz.js"),1);var Si={oldsvg:"svg",oldps2:"ps2",oldeps:"eps"},Ti=(t,e)=>(0,Wn.default)(Te(t,e),{engine:N.getOptionValue(e,"engine"),format:Si[N.getOptionValue(e,"outputType")]||"svg"}),ze=Ti;var Ai=/[\u0000-\u002C|\u002F|\u003B-\u0040|\u005B-\u0060|\u007B-\u00BF|\u00D7|\u00F7|\u0300-\u036F|\u037E|\u2000-\u200B|\u200E-\u206F|\u2190-\u2BFF|\u2FF0-\u3000|\uD800-\uF8FF|\uFDD0-\uFDEF|\uFFFE-\uFFFF]/g,wi=/[-|.|0-9|\u00B7|\u0300-\u036F|\u203F-\u2040]/g;function Qn(t){return t.replace(Ai,"_")}function Oi(t){let e=Qn(t);return e.match(wi)&&(e=`_${t}`),e}var Ae=t=>(t=t||"",t.length===0?"__empty":Oi(t[0]).concat(Qn(t.slice(1))));var Ci=/[\u00B7|\u0300-\u036F|\u203F-\u2040|\u0000-\u0029|\u002B-\u002C|\u002F|\u003B-\u0040|\u005B-\u0060|\u007B-\u00BF|\u00D7|\u00F7|\u0300-\u036F|\u037E|\u2000-\u200B|\u200E-\u206F|\u2190-\u2BFF|\u2FF0-\u3000|\uD800-\uF8FF|\uFDD0-\uFDEF|\uFFFE-\uFFFF]/g,ji=/[.]/g;function Yn(t){return t.replace(Ci,"_")}function Pi(t){let e=Yn(t);return e.match(ji)&&(e=`_${t}`),e}function _i(t){return t=t.replace(/\s+/g," ").trim(),Pi(t[0]).concat(Yn(t.slice(1)))}var Zn=t=>{let e=t||"";return e.length===0?"empty":e.split(/[\n\r]+/).filter(n=>n.length>0).map(_i).join(" ")};var Fi={regular:"state",initial:"initial",final:"final",terminate:"final",parallel:"parallel",history:"history",deephistory:"history"};function Ri(t){return Fi[t]||"state"}function Ni(t){let e={target:Ae(t.to)};return t.event&&(e.event=Zn(t.event)),t.cond&&(e.cond=t.cond),t.action&&(e.action=t.action),t.type&&(e.type=t.type),e}function Vi(t,e){return t.filter(n=>n.type===e).map(n=>n.body)}function Ue(t,e,n,m){let a=Vi(n,m);a.length>0&&(t[e]=(t[e]||[]).concat(a))}function Li(t,e){e.actions&&(Ue(t,"onentries",e.actions,"entry"),Ue(t,"onentries",e.actions,"activity"),Ue(t,"onexits",e.actions,"exit"))}function Bi(t,e,n){let m=n.filter(a=>a.from===e.name).map(Ni);m.length>0&&(t.transitions=m)}function Di(t,e,n){if(e.statemachine){let m=ne(e.statemachine,void 0,n);t.states=(t.states||[]).concat(m.states),m.initial&&(t.initial=m.initial)}}function Hi(t){return t=t||[],e=>{let n={kind:Ri(e.type),id:Ae(e.name)};return e.type==="deephistory"&&(n.type="deep"),Li(n,e),Bi(n,e,t),Di(n,e,t),n}}function qi(t){let e=t.states.filter(n=>n.type==="initial");if(e.length>0)return e[0].name}function Mi(t,e){let n=e;if(e&&t.transitions){let m=t.transitions.filter(a=>a.from===e);m.length>0&&!m[0].action&&(n=m[0].to)}return n}function ne(t,e,n){let m=qi(t),a=Mi(t,m),c={states:t.states.filter(i=>a&&a!==m?i.type!=="initial":!0).map(Hi(n||new L(t).flattenedTransitions))};return a&&(c.initial=Ae(a)),c}var rr=F(nr(),1),Gi=t=>(0,rr.default)(ne(t)),ar=Gi;var Wi=or.default;function We(t){let e={smcat:Wi,dot:Te,svg:ze,oldsvg:ze,scjson:ne,scxml:ar};return(0,lr.default)(e,t)?e[t]:n=>n}var ir="10.1.10";function sr(t,e){let n=jn.getAST(t,e),m=N.getOptionValue(e,"desugar");return We(N.getOptionValue(e,"outputType"))(m?Fn(n):n,e)}var cr=ir;function ur(){return N.getAllowedValues()}var Qi={render:sr,version:cr,getAllowedValues:ur};
|
package/dist/commonjs/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("./bundle.js").default;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const Handlebars = require("handlebars/dist/handlebars.runtime.js");
|
|
4
|
-
require("./scxml.template.js");
|
|
5
|
-
require("./scxml.states.template.js");
|
|
6
|
-
Handlebars.registerPartial("scxml.states.template.hbs", Handlebars.templates["scxml.states.template.hbs"]);
|
|
7
|
-
module.exports = function renderSCXML(pSCJSON) {
|
|
8
|
-
return Handlebars.templates["scxml.template.hbs"](pSCJSON);
|
|
9
|
-
};
|