state-machine-cat 12.0.15 → 12.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/normalize.mjs +1 -1
- package/dist/parse/scxml/index.mjs +1 -3
- package/dist/render/dot/index.mjs +1 -1
- package/dist/render/index-node.mjs +1 -1
- package/dist/render/index.mjs +1 -1
- package/dist/render/smcat.mjs +115 -0
- package/dist/state-machine-model.mjs +3 -3
- package/dist/version.mjs +1 -1
- package/package.json +2 -3
- package/dist/render/smcat/index.mjs +0 -75
- package/dist/render/smcat/smcat.template.cjs +0 -1
package/dist/cli/normalize.mjs
CHANGED
|
@@ -75,7 +75,7 @@ function determineOutputType(pOutputTo, pOutputType) {
|
|
|
75
75
|
return options.getAllowedValues().outputType.default;
|
|
76
76
|
}
|
|
77
77
|
function determineParameter(pOptions, pParameter) {
|
|
78
|
-
return Object.
|
|
78
|
+
return Object.hasOwn(pOptions, pParameter)
|
|
79
79
|
? pOptions[pParameter]
|
|
80
80
|
: options.getAllowedValues()[pParameter].default;
|
|
81
81
|
}
|
|
@@ -112,9 +112,7 @@ function reduceTransition(pState) {
|
|
|
112
112
|
}
|
|
113
113
|
function extractTransitions(pStates) {
|
|
114
114
|
return pStates
|
|
115
|
-
.filter((pState) =>
|
|
116
|
-
Object.prototype.hasOwnProperty.call(pState, "transition"),
|
|
117
|
-
)
|
|
115
|
+
.filter((pState) => Object.hasOwn(pState, "transition"))
|
|
118
116
|
.reduce((pAllTransitions, pThisState) => {
|
|
119
117
|
const lTransitionAsArray = castArray(pThisState.transition);
|
|
120
118
|
return pAllTransitions.concat(
|
|
@@ -8,7 +8,7 @@ import renderDotFromAST from "./render-dot-from-ast.mjs";
|
|
|
8
8
|
import utl from "./utl.mjs";
|
|
9
9
|
function addExternalSelfTransitions(pStateMachineModel) {
|
|
10
10
|
return (pState) => {
|
|
11
|
-
if (Object.
|
|
11
|
+
if (Object.hasOwn(pState, "statemachine")) {
|
|
12
12
|
pState.nestedExternalSelfTransitions = pStateMachineModel
|
|
13
13
|
.findExternalSelfTransitions(pState.name)
|
|
14
14
|
.map((pTransition) => pTransition.name);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import smcatRendererAsImported from "./smcat
|
|
1
|
+
import smcatRendererAsImported from "./smcat.mjs";
|
|
2
2
|
import renderDot from "./dot/index.mjs";
|
|
3
3
|
import vector from "./vector/vector-native-dot-with-fallback.mjs";
|
|
4
4
|
import oldVector from "./vector/vector-with-wasm.mjs";
|
package/dist/render/index.mjs
CHANGED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
const NAME_QUOTABLE = /;|,|{| |\[/;
|
|
2
|
+
const ACTIONS_QUOTABLE = /;|,|{/;
|
|
3
|
+
const LABEL_QUOTABLE = /;|{/;
|
|
4
|
+
const RENDERABLE_STATE_ATTRIBUTES = [
|
|
5
|
+
"label",
|
|
6
|
+
"type",
|
|
7
|
+
"color",
|
|
8
|
+
"active",
|
|
9
|
+
"class",
|
|
10
|
+
];
|
|
11
|
+
const RENDERABLE_TRANSITION_ATTRIBUTES = ["type", "color", "class"];
|
|
12
|
+
function quoteIfNecessary(pRegExp, pString) {
|
|
13
|
+
return pRegExp.test(pString) ? `"${pString}"` : pString;
|
|
14
|
+
}
|
|
15
|
+
function stateHasExtendedAttributes(pState) {
|
|
16
|
+
return (
|
|
17
|
+
Object.hasOwn(pState, "label") ||
|
|
18
|
+
Object.hasOwn(pState, "typeExplicitlySet") ||
|
|
19
|
+
Object.hasOwn(pState, "color") ||
|
|
20
|
+
Object.hasOwn(pState, "active") ||
|
|
21
|
+
Object.hasOwn(pState, "class")
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
function note(pNote, pIndent = "") {
|
|
25
|
+
return pNote.map((pNoteLine) => `${pIndent}# ${pNoteLine}`).join("\n");
|
|
26
|
+
}
|
|
27
|
+
function extendedAttribute(pKey, pValue) {
|
|
28
|
+
if (pKey === "type") {
|
|
29
|
+
return `${pKey}=${pValue}`;
|
|
30
|
+
}
|
|
31
|
+
if (pKey === "active") {
|
|
32
|
+
return pValue ? pKey : "";
|
|
33
|
+
}
|
|
34
|
+
return `${pKey}="${pValue}"`;
|
|
35
|
+
}
|
|
36
|
+
function extendedStateAttributes(pState) {
|
|
37
|
+
return Object.entries(pState)
|
|
38
|
+
.filter(([pKey]) => RENDERABLE_STATE_ATTRIBUTES.includes(pKey))
|
|
39
|
+
.filter(([pKey]) => pKey !== "type" || pState.typeExplicitlySet)
|
|
40
|
+
.map(([pKey, pValue]) => extendedAttribute(pKey, pValue))
|
|
41
|
+
.join(" ");
|
|
42
|
+
}
|
|
43
|
+
function actions(pActions) {
|
|
44
|
+
return pActions
|
|
45
|
+
.map(
|
|
46
|
+
(pAction) =>
|
|
47
|
+
`${pAction.type === "activity" ? "" : `${pAction.type}/ `}${pAction.body}`,
|
|
48
|
+
)
|
|
49
|
+
.map((pAction) => quoteIfNecessary(ACTIONS_QUOTABLE, pAction))
|
|
50
|
+
.join("\n ");
|
|
51
|
+
}
|
|
52
|
+
function state(pState, pIndent = "") {
|
|
53
|
+
let lReturnValue = pIndent + quoteIfNecessary(NAME_QUOTABLE, pState.name);
|
|
54
|
+
if (pState.note) {
|
|
55
|
+
lReturnValue = `${note(pState.note, pIndent)}\n${lReturnValue}`;
|
|
56
|
+
}
|
|
57
|
+
if (stateHasExtendedAttributes(pState)) {
|
|
58
|
+
lReturnValue += ` [${extendedStateAttributes(pState)}]`;
|
|
59
|
+
}
|
|
60
|
+
if (pState.actions) {
|
|
61
|
+
lReturnValue += `: ${actions(pState.actions)}`;
|
|
62
|
+
}
|
|
63
|
+
if (pState.statemachine) {
|
|
64
|
+
lReturnValue += " {\n";
|
|
65
|
+
lReturnValue += renderSmcat(pState.statemachine, null, `${pIndent} `);
|
|
66
|
+
lReturnValue += `${pIndent}}`;
|
|
67
|
+
}
|
|
68
|
+
return lReturnValue;
|
|
69
|
+
}
|
|
70
|
+
function states(pStates, pIndent = "") {
|
|
71
|
+
return pStates
|
|
72
|
+
.map((pState) => state(pState, pIndent))
|
|
73
|
+
.join(",\n")
|
|
74
|
+
.concat(pStates.length > 0 ? ";\n\n" : "");
|
|
75
|
+
}
|
|
76
|
+
function transitionHasExtendedAttributes(pTransition) {
|
|
77
|
+
return Object.entries(pTransition).some(([pKey]) =>
|
|
78
|
+
RENDERABLE_TRANSITION_ATTRIBUTES.includes(pKey),
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
function extendedTransitionAttributes(pTransition) {
|
|
82
|
+
return Object.entries(pTransition)
|
|
83
|
+
.filter(([pKey]) => RENDERABLE_TRANSITION_ATTRIBUTES.includes(pKey))
|
|
84
|
+
.map(([pKey, pValue]) => extendedAttribute(pKey, pValue))
|
|
85
|
+
.join(" ");
|
|
86
|
+
}
|
|
87
|
+
function transition(pTransition, pIndent = "") {
|
|
88
|
+
let lReturnValue = `${pIndent}${quoteIfNecessary(NAME_QUOTABLE, pTransition.from)} => ${quoteIfNecessary(NAME_QUOTABLE, pTransition.to)}`;
|
|
89
|
+
if (pTransition.note) {
|
|
90
|
+
lReturnValue = `${note(pTransition.note, pIndent)}\n${lReturnValue}`;
|
|
91
|
+
}
|
|
92
|
+
if (transitionHasExtendedAttributes(pTransition)) {
|
|
93
|
+
lReturnValue += ` [${extendedTransitionAttributes(pTransition)}]`;
|
|
94
|
+
}
|
|
95
|
+
if (pTransition.label) {
|
|
96
|
+
lReturnValue += `: ${quoteIfNecessary(LABEL_QUOTABLE, pTransition.label)}`;
|
|
97
|
+
}
|
|
98
|
+
return lReturnValue;
|
|
99
|
+
}
|
|
100
|
+
function transitions(pTransitions, pIndent = "") {
|
|
101
|
+
return pTransitions
|
|
102
|
+
.map((pTransition) => transition(pTransition, pIndent))
|
|
103
|
+
.join(";\n")
|
|
104
|
+
.concat(pTransitions.length > 0 ? ";\n" : "");
|
|
105
|
+
}
|
|
106
|
+
export default function renderSmcat(
|
|
107
|
+
pStateMachine,
|
|
108
|
+
_pOptions = {},
|
|
109
|
+
pIndent = "",
|
|
110
|
+
) {
|
|
111
|
+
return (
|
|
112
|
+
states(pStateMachine.states, pIndent) +
|
|
113
|
+
transitions(pStateMachine.transitions || [], pIndent)
|
|
114
|
+
);
|
|
115
|
+
}
|
|
@@ -3,7 +3,7 @@ function flattenStates(pStates, pHasParent = false) {
|
|
|
3
3
|
pStates
|
|
4
4
|
.filter((pState) => Boolean(pState.statemachine))
|
|
5
5
|
.forEach((pState) => {
|
|
6
|
-
if (Object.
|
|
6
|
+
if (Object.hasOwn(pState.statemachine, "states")) {
|
|
7
7
|
lReturnValue = lReturnValue.concat(
|
|
8
8
|
flattenStates(pState.statemachine.states, true),
|
|
9
9
|
);
|
|
@@ -20,10 +20,10 @@ function flattenStates(pStates, pHasParent = false) {
|
|
|
20
20
|
}
|
|
21
21
|
function flattenTransitions(pStateMachine) {
|
|
22
22
|
let lTransitions = [];
|
|
23
|
-
if (Object.
|
|
23
|
+
if (Object.hasOwn(pStateMachine, "transitions")) {
|
|
24
24
|
lTransitions = pStateMachine.transitions;
|
|
25
25
|
}
|
|
26
|
-
if (Object.
|
|
26
|
+
if (Object.hasOwn(pStateMachine, "states")) {
|
|
27
27
|
pStateMachine.states
|
|
28
28
|
.filter((pState) => Boolean(pState.statemachine))
|
|
29
29
|
.forEach((pState) => {
|
package/dist/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "12.0.
|
|
1
|
+
export const version = "12.0.16";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "state-machine-cat",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.16",
|
|
4
4
|
"description": "write beautiful state charts",
|
|
5
5
|
"main": "./dist/index.mjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
"#*": "./src/*"
|
|
18
18
|
},
|
|
19
19
|
"sideEffects": [
|
|
20
|
-
"dist/render/smcat/smcat.template.cjs",
|
|
21
20
|
"dist/render/dot/dot.states.template.cjs",
|
|
22
21
|
"dist/render/dot/dot.template.cjs"
|
|
23
22
|
],
|
|
@@ -45,7 +44,7 @@
|
|
|
45
44
|
"state-machine-cat": "dist/cli/main.mjs"
|
|
46
45
|
},
|
|
47
46
|
"dependencies": {
|
|
48
|
-
"@hpcc-js/wasm-graphviz": "1.
|
|
47
|
+
"@hpcc-js/wasm-graphviz": "1.6.1",
|
|
49
48
|
"ajv": "8.17.1",
|
|
50
49
|
"fast-xml-parser": "4.5.0",
|
|
51
50
|
"handlebars": "4.7.8",
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import Handlebars from "handlebars/dist/handlebars.runtime.js";
|
|
2
|
-
await import("./smcat.template.cjs");
|
|
3
|
-
const NAME_QUOTABLE = /;|,|{| |\[/;
|
|
4
|
-
const ACTIONS_QUOTABLE = /;|,|{/;
|
|
5
|
-
const LABEL_QUOTABLE = /;|{/;
|
|
6
|
-
function quoteIfNecessary(pRegExp, pString) {
|
|
7
|
-
return pRegExp.test(pString) ? `"${pString}"` : pString;
|
|
8
|
-
}
|
|
9
|
-
Handlebars.registerPartial(
|
|
10
|
-
"smcat.template.hbs",
|
|
11
|
-
Handlebars.templates["smcat.template.hbs"],
|
|
12
|
-
);
|
|
13
|
-
function formatActionType(pString) {
|
|
14
|
-
return pString === "activity" ? "" : `${pString}/ `;
|
|
15
|
-
}
|
|
16
|
-
function flattenActions(pState) {
|
|
17
|
-
return {
|
|
18
|
-
...pState,
|
|
19
|
-
actions: (pState.actions || [])
|
|
20
|
-
.map((pAction) => `${formatActionType(pAction.type)}${pAction.body}`)
|
|
21
|
-
.join("\n "),
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
function flagExtendedStateAttributes(pState) {
|
|
25
|
-
if (
|
|
26
|
-
Object.prototype.hasOwnProperty.call(pState, "label") ||
|
|
27
|
-
Object.prototype.hasOwnProperty.call(pState, "typeExplicitlySet") ||
|
|
28
|
-
Object.prototype.hasOwnProperty.call(pState, "color") ||
|
|
29
|
-
Object.prototype.hasOwnProperty.call(pState, "active") ||
|
|
30
|
-
Object.prototype.hasOwnProperty.call(pState, "class")
|
|
31
|
-
) {
|
|
32
|
-
pState.hasExtendedAttributes = true;
|
|
33
|
-
}
|
|
34
|
-
return pState;
|
|
35
|
-
}
|
|
36
|
-
function transformStates(pStates) {
|
|
37
|
-
pStates
|
|
38
|
-
.map(flagExtendedStateAttributes)
|
|
39
|
-
.filter((pState) => pState.statemachine)
|
|
40
|
-
.forEach((pState) => {
|
|
41
|
-
pState.statemachine.states = transformStates(pState.statemachine.states);
|
|
42
|
-
});
|
|
43
|
-
return pStates.map(flattenActions);
|
|
44
|
-
}
|
|
45
|
-
function flagExtendedTransitionAttributes(pTransition) {
|
|
46
|
-
if (
|
|
47
|
-
Object.prototype.hasOwnProperty.call(pTransition, "type") ||
|
|
48
|
-
Object.prototype.hasOwnProperty.call(pTransition, "color") ||
|
|
49
|
-
Object.prototype.hasOwnProperty.call(pTransition, "class")
|
|
50
|
-
) {
|
|
51
|
-
pTransition.hasExtendedAttributes = true;
|
|
52
|
-
}
|
|
53
|
-
return pTransition;
|
|
54
|
-
}
|
|
55
|
-
function transformTransitions(pTransitions) {
|
|
56
|
-
return pTransitions.map(flagExtendedTransitionAttributes);
|
|
57
|
-
}
|
|
58
|
-
Handlebars.registerHelper("quotifyState", (pItem) =>
|
|
59
|
-
quoteIfNecessary(NAME_QUOTABLE, pItem),
|
|
60
|
-
);
|
|
61
|
-
Handlebars.registerHelper("quotifyLabel", (pItem) =>
|
|
62
|
-
quoteIfNecessary(LABEL_QUOTABLE, pItem),
|
|
63
|
-
);
|
|
64
|
-
Handlebars.registerHelper("quotifyActions", (pItem) =>
|
|
65
|
-
quoteIfNecessary(ACTIONS_QUOTABLE, pItem),
|
|
66
|
-
);
|
|
67
|
-
export default function renderSmcat(pStateMachine) {
|
|
68
|
-
return Handlebars.templates["smcat.template.hbs"]({
|
|
69
|
-
...pStateMachine,
|
|
70
|
-
states: transformStates(structuredClone(pStateMachine.states)),
|
|
71
|
-
transitions: transformTransitions(
|
|
72
|
-
structuredClone(pStateMachine.transitions || []),
|
|
73
|
-
),
|
|
74
|
-
});
|
|
75
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var Handlebars=require("handlebars/dist/handlebars.runtime"),template=Handlebars.template,templates=Handlebars.templates=Handlebars.templates||{};templates["smcat.template.hbs"]=template({1:function(l,n,e,t,o){var a=null!=n?n:l.nullContext||{},r=l.hooks.helperMissing,u="function",i=l.hooks.blockHelperMissing,c=l.lookupProperty||function(l,n){if(Object.prototype.hasOwnProperty.call(l,n))return l[n]},s="",p=null!=(p=c(e,"note")||(null!=n?c(n,"note"):n))?p:r,m={name:"note",hash:{},fn:l.program(2,o,0),inverse:l.noop,data:o,loc:{start:{line:2,column:0},end:{line:4,column:9}}},f=typeof p==u?p.call(a,m):p;return null!=(f=c(e,"note")?f:i.call(n,f,m))&&(s+=f),s+=null!=(f=(c(e,"quotifyState")||n&&c(n,"quotifyState")||r).call(a,null!=n?c(n,"name"):n,{name:"quotifyState",hash:{},fn:l.program(4,o,0),inverse:l.noop,data:o,loc:{start:{line:5,column:0},end:{line:5,column:40}}}))?f:"",p=null!=(p=c(e,"hasExtendedAttributes")||(null!=n?c(n,"hasExtendedAttributes"):n))?p:r,m={name:"hasExtendedAttributes",hash:{},fn:l.program(6,o,0),inverse:l.noop,data:o,loc:{start:{line:6,column:4},end:{line:6,column:270}}},f=typeof p==u?p.call(a,m):p,null!=(f=c(e,"hasExtendedAttributes")?f:i.call(n,f,m))&&(s+=f),s+=null!=(f=c(e,"if").call(a,null!=n?c(n,"actions"):n,{name:"if",hash:{},fn:l.program(18,o,0),inverse:l.noop,data:o,loc:{start:{line:7,column:4},end:{line:7,column:28}}}))?f:"",p=null!=(p=c(e,"actions")||(null!=n?c(n,"actions"):n))?p:r,m={name:"actions",hash:{},fn:l.program(20,o,0),inverse:l.noop,data:o,loc:{start:{line:7,column:28},end:{line:7,column:93}}},f=typeof p==u?p.call(a,m):p,null!=(f=c(e,"actions")?f:i.call(n,f,m))&&(s+=f),p=null!=(p=c(e,"statemachine")||(null!=n?c(n,"statemachine"):n))?p:r,m={name:"statemachine",hash:{},fn:l.program(22,o,0),inverse:l.noop,data:o,loc:{start:{line:8,column:4},end:{line:10,column:19}}},f=typeof p==u?p.call(a,m):p,null!=(f=c(e,"statemachine")?f:i.call(n,f,m))&&(s+=f),s+(null!=(f=c(e,"if").call(a,o&&c(o,"last"),{name:"if",hash:{},fn:l.program(24,o,0),inverse:l.program(26,o,0),data:o,loc:{start:{line:11,column:0},end:{line:11,column:30}}}))?f:"")+"\n"},2:function(l,n,e,t,o){return"# "+(null!=(l=l.lambda(n,n))?l:"")+"\n"},4:function(l,n,e,t,o){return""},6:function(l,n,e,t,o){var a=null!=n?n:l.nullContext||{},r=l.hooks.helperMissing,u="function",i=l.hooks.blockHelperMissing,c=l.lookupProperty||function(l,n){if(Object.prototype.hasOwnProperty.call(l,n))return l[n]},s=" [",p=null!=(p=c(e,"typeExplicitlySet")||(null!=n?c(n,"typeExplicitlySet"):n))?p:r,m={name:"typeExplicitlySet",hash:{},fn:l.program(7,o,0),inverse:l.noop,data:o,loc:{start:{line:6,column:32},end:{line:6,column:107}}},f=typeof p==u?p.call(a,m):p;return null!=(f=c(e,"typeExplicitlySet")?f:i.call(n,f,m))&&(s+=f),p=null!=(p=c(e,"label")||(null!=n?c(n,"label"):n))?p:r,m={name:"label",hash:{},fn:l.program(10,o,0),inverse:l.noop,data:o,loc:{start:{line:6,column:107},end:{line:6,column:142}}},f=typeof p==u?p.call(a,m):p,null!=(f=c(e,"label")?f:i.call(n,f,m))&&(s+=f),p=null!=(p=c(e,"color")||(null!=n?c(n,"color"):n))?p:r,m={name:"color",hash:{},fn:l.program(12,o,0),inverse:l.noop,data:o,loc:{start:{line:6,column:142},end:{line:6,column:178}}},f=typeof p==u?p.call(a,m):p,null!=(f=c(e,"color")?f:i.call(n,f,m))&&(s+=f),p=null!=(p=c(e,"class")||(null!=n?c(n,"class"):n))?p:r,m={name:"class",hash:{},fn:l.program(14,o,0),inverse:l.noop,data:o,loc:{start:{line:6,column:178},end:{line:6,column:214}}},f=typeof p==u?p.call(a,m):p,null!=(f=c(e,"class")?f:i.call(n,f,m))&&(s+=f),s+(null!=(f=c(e,"if").call(a,null!=n?c(n,"active"):n,{name:"if",hash:{},fn:l.program(16,o,0),inverse:l.noop,data:o,loc:{start:{line:6,column:214},end:{line:6,column:242}}}))?f:"")+"]"},7:function(l,n,e,t,o){var a=l.lookupProperty||function(l,n){if(Object.prototype.hasOwnProperty.call(l,n))return l[n]},r=null!=(r=a(e,"type")||(null!=n?a(n,"type"):n))?r:l.hooks.helperMissing,o={name:"type",hash:{},fn:l.program(8,o,0),inverse:l.noop,data:o,loc:{start:{line:6,column:54},end:{line:6,column:85}}},r="function"==typeof r?r.call(null!=n?n:l.nullContext||{},o):r;return null!=(r=a(e,"type")?r:l.hooks.blockHelperMissing.call(n,r,o))?r:""},8:function(l,n,e,t,o){return"type="+(null!=(l=l.lambda(n,n))?l:"")+" "},10:function(l,n,e,t,o){return'label="'+(null!=(l=l.lambda(n,n))?l:"")+'"'},12:function(l,n,e,t,o){return' color="'+(null!=(l=l.lambda(n,n))?l:"")+'"'},14:function(l,n,e,t,o){return' class="'+(null!=(l=l.lambda(n,n))?l:"")+'"'},16:function(l,n,e,t,o){return" active"},18:function(l,n,e,t,o){return": "},20:function(l,n,e,t,o){var a=l.lookupProperty||function(l,n){if(Object.prototype.hasOwnProperty.call(l,n))return l[n]};return null!=(e=(a(e,"quotifyActions")||n&&a(n,"quotifyActions")||l.hooks.helperMissing).call(null!=n?n:l.nullContext||{},n,{name:"quotifyActions",hash:{},fn:l.program(4,o,0),inverse:l.noop,data:o,loc:{start:{line:7,column:40},end:{line:7,column:80}}}))?e:""},22:function(l,n,e,t,o){var a=l.lookupProperty||function(l,n){if(Object.prototype.hasOwnProperty.call(l,n))return l[n]};return" {\n"+(null!=(a=l.invokePartial(a(t,"smcat.template.hbs"),n,{name:"smcat.template.hbs",data:o,indent:" ",helpers:e,partials:t,decorators:l.decorators}))?a:"")+"}"},24:function(l,n,e,t,o){return";"},26:function(l,n,e,t,o){return","},28:function(l,n,e,t,o){var a=null!=n?n:l.nullContext||{},r=l.hooks.helperMissing,u="function",i=l.hooks.blockHelperMissing,c=l.lookupProperty||function(l,n){if(Object.prototype.hasOwnProperty.call(l,n))return l[n]},s="",p=null!=(p=c(e,"note")||(null!=n?c(n,"note"):n))?p:r,m={name:"note",hash:{},fn:l.program(2,o,0),inverse:l.noop,data:o,loc:{start:{line:15,column:0},end:{line:17,column:9}}},f=typeof p==u?p.call(a,m):p;return null!=(f=c(e,"note")?f:i.call(n,f,m))&&(s+=f),s+=(null!=(f=(c(e,"quotifyState")||n&&c(n,"quotifyState")||r).call(a,null!=n?c(n,"from"):n,{name:"quotifyState",hash:{},fn:l.program(4,o,0),inverse:l.noop,data:o,loc:{start:{line:18,column:0},end:{line:18,column:39}}}))?f:"")+" => "+(null!=(f=(c(e,"quotifyState")||n&&c(n,"quotifyState")||r).call(a,null!=n?c(n,"to"):n,{name:"quotifyState",hash:{},fn:l.program(4,o,0),inverse:l.noop,data:o,loc:{start:{line:18,column:43},end:{line:18,column:81}}}))?f:""),p=null!=(p=c(e,"hasExtendedAttributes")||(null!=n?c(n,"hasExtendedAttributes"):n))?p:r,m={name:"hasExtendedAttributes",hash:{},fn:l.program(29,o,0),inverse:l.noop,data:o,loc:{start:{line:19,column:4},end:{line:19,column:130}}},f=typeof p==u?p.call(a,m):p,null!=(f=c(e,"hasExtendedAttributes")?f:i.call(n,f,m))&&(s+=f),p=null!=(p=c(e,"label")||(null!=n?c(n,"label"):n))?p:r,m={name:"label",hash:{},fn:l.program(34,o,0),inverse:l.noop,data:o,loc:{start:{line:20,column:4},end:{line:20,column:62}}},f=typeof p==u?p.call(a,m):p,null!=(f=c(e,"label")?f:i.call(n,f,m))&&(s+=f),s+";\n"},29:function(l,n,e,t,o){var a=null!=n?n:l.nullContext||{},r=l.hooks.helperMissing,u="function",i=l.hooks.blockHelperMissing,c=l.lookupProperty||function(l,n){if(Object.prototype.hasOwnProperty.call(l,n))return l[n]},s=" [",p=null!=(p=c(e,"color")||(null!=n?c(n,"color"):n))?p:r,m={name:"color",hash:{},fn:l.program(30,o,0),inverse:l.noop,data:o,loc:{start:{line:19,column:32},end:{line:19,column:68}}},f=typeof p==u?p.call(a,m):p;return null!=(f=c(e,"color")?f:i.call(n,f,m))&&(s+=f),p=null!=(p=c(e,"type")||(null!=n?c(n,"type"):n))?p:r,m={name:"type",hash:{},fn:l.program(32,o,0),inverse:l.noop,data:o,loc:{start:{line:19,column:69},end:{line:19,column:102}}},f=typeof p==u?p.call(a,m):p,null!=(f=c(e,"type")?f:i.call(n,f,m))&&(s+=f),s+"]"},30:function(l,n,e,t,o){return'color="'+(null!=(l=l.lambda(n,n))?l:"")+'"'},32:function(l,n,e,t,o){return" type="+(null!=(l=l.lambda(n,n))?l:"")},34:function(l,n,e,t,o){var a=l.lookupProperty||function(l,n){if(Object.prototype.hasOwnProperty.call(l,n))return l[n]};return": "+(null!=(e=(a(e,"quotifyLabel")||n&&a(n,"quotifyLabel")||l.hooks.helperMissing).call(null!=n?n:l.nullContext||{},n,{name:"quotifyLabel",hash:{},fn:l.program(4,o,0),inverse:l.noop,data:o,loc:{start:{line:20,column:16},end:{line:20,column:52}}}))?e:"")},compiler:[8,">= 4.3.0"],main:function(l,n,e,t,o){var a=null!=n?n:l.nullContext||{},r=l.lookupProperty||function(l,n){if(Object.prototype.hasOwnProperty.call(l,n))return l[n]},u=(null!=(c=r(e,"each").call(a,null!=n?r(n,"states"):n,{name:"each",hash:{},fn:l.program(1,o,0),inverse:l.noop,data:o,loc:{start:{line:1,column:0},end:{line:12,column:9}}}))?c:"")+"\n",i=null!=(i=r(e,"transitions")||(null!=n?r(n,"transitions"):n))?i:l.hooks.helperMissing,o={name:"transitions",hash:{},fn:l.program(28,o,0),inverse:l.noop,data:o,loc:{start:{line:14,column:0},end:{line:21,column:16}}},c="function"==typeof i?i.call(a,o):i;return null!=(c=r(e,"transitions")?c:l.hooks.blockHelperMissing.call(n,c,o))&&(u+=c),u},usePartial:!0,useData:!0});
|