1 | (function webpackUniversalModuleDefinition(root, factory) {
|
2 | if(typeof exports === 'object' && typeof module === 'object')
|
3 | module.exports = factory();
|
4 | else if(typeof define === 'function' && define.amd)
|
5 | define([], factory);
|
6 | else if(typeof exports === 'object')
|
7 | exports["mermaid"] = factory();
|
8 | else
|
9 | root["mermaid"] = factory();
|
10 | })(window, function() {
|
11 | return (function(modules) {
|
12 |
|
13 | var installedModules = {};
|
14 |
|
15 |
|
16 | function __webpack_require__(moduleId) {
|
17 |
|
18 |
|
19 | if(installedModules[moduleId]) {
|
20 | return installedModules[moduleId].exports;
|
21 | }
|
22 |
|
23 | var module = installedModules[moduleId] = {
|
24 | i: moduleId,
|
25 | l: false,
|
26 | exports: {}
|
27 | };
|
28 |
|
29 |
|
30 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
31 |
|
32 |
|
33 | module.l = true;
|
34 |
|
35 |
|
36 | return module.exports;
|
37 | }
|
38 |
|
39 |
|
40 |
|
41 | __webpack_require__.m = modules;
|
42 |
|
43 |
|
44 | __webpack_require__.c = installedModules;
|
45 |
|
46 |
|
47 | __webpack_require__.d = function(exports, name, getter) {
|
48 | if(!__webpack_require__.o(exports, name)) {
|
49 | Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
50 | }
|
51 | };
|
52 |
|
53 |
|
54 | __webpack_require__.r = function(exports) {
|
55 | if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
56 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
57 | }
|
58 | Object.defineProperty(exports, '__esModule', { value: true });
|
59 | };
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 | __webpack_require__.t = function(value, mode) {
|
67 | if(mode & 1) value = __webpack_require__(value);
|
68 | if(mode & 8) return value;
|
69 | if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
70 | var ns = Object.create(null);
|
71 | __webpack_require__.r(ns);
|
72 | Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
73 | if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
74 | return ns;
|
75 | };
|
76 |
|
77 |
|
78 | __webpack_require__.n = function(module) {
|
79 | var getter = module && module.__esModule ?
|
80 | function getDefault() { return module['default']; } :
|
81 | function getModuleExports() { return module; };
|
82 | __webpack_require__.d(getter, 'a', getter);
|
83 | return getter;
|
84 | };
|
85 |
|
86 |
|
87 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
88 |
|
89 |
|
90 | __webpack_require__.p = "";
|
91 |
|
92 |
|
93 |
|
94 | return __webpack_require__(__webpack_require__.s = "./src/mermaid.js");
|
95 | })
|
96 |
|
97 | ({
|
98 |
|
99 | "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/dark/index.scss":
|
100 |
|
101 |
|
102 |
|
103 |
|
104 | (function(module, exports, __webpack_require__) {
|
105 |
|
106 | exports = module.exports = __webpack_require__( "./node_modules/css-loader/dist/runtime/api.js")(false);
|
107 |
|
108 | exports.push([module.i, "/* Flowchart variables */\n/* Sequence Diagram variables */\n/* Gantt chart variables */\n.label {\n font-family: 'trebuchet ms', verdana, arial;\n color: #333; }\n\n.label text {\n fill: #333; }\n\n.node rect,\n.node circle,\n.node ellipse,\n.node polygon {\n fill: #BDD5EA;\n stroke: purple;\n stroke-width: 1px; }\n\n.node.clickable {\n cursor: pointer; }\n\n.arrowheadPath {\n fill: lightgrey; }\n\n.edgePath .path {\n stroke: lightgrey;\n stroke-width: 1.5px; }\n\n.edgeLabel {\n background-color: #e8e8e8; }\n\n.cluster rect {\n fill: #6D6D65;\n stroke: rgba(255, 255, 255, 0.25);\n stroke-width: 1px; }\n\n.cluster text {\n fill: #F9FFFE; }\n\ndiv.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 12px;\n background: #6D6D65;\n border: 1px solid rgba(255, 255, 255, 0.25);\n border-radius: 2px;\n pointer-events: none;\n z-index: 100; }\n\n.actor {\n stroke: #81B1DB;\n fill: #BDD5EA; }\n\ntext.actor {\n fill: black;\n stroke: none; }\n\n.actor-line {\n stroke: lightgrey; }\n\n.messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: lightgrey; }\n\n.messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: lightgrey; }\n\n#arrowhead {\n fill: lightgrey; }\n\n.sequenceNumber {\n fill: white; }\n\n#sequencenumber {\n fill: lightgrey; }\n\n#crosshead path {\n fill: lightgrey !important;\n stroke: lightgrey !important; }\n\n.messageText {\n fill: lightgrey;\n stroke: none; }\n\n.labelBox {\n stroke: #81B1DB;\n fill: #BDD5EA; }\n\n.labelText {\n fill: #323D47;\n stroke: none; }\n\n.loopText {\n fill: lightgrey;\n stroke: none; }\n\n.loopLine {\n stroke-width: 2;\n stroke-dasharray: '2 2';\n stroke: #81B1DB; }\n\n.note {\n stroke: rgba(255, 255, 255, 0.25);\n fill: #fff5ad; }\n\n.noteText {\n fill: black;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 14px; }\n\n.activation0 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation1 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation2 {\n fill: #f4f4f4;\n stroke: #666; }\n\n/** Section styling */\n.section {\n stroke: none;\n opacity: 0.2; }\n\n.section0 {\n fill: rgba(255, 255, 255, 0.3); }\n\n.section2 {\n fill: #EAE8B9; }\n\n.section1,\n.section3 {\n fill: white;\n opacity: 0.2; }\n\n.sectionTitle0 {\n fill: #F9FFFE; }\n\n.sectionTitle1 {\n fill: #F9FFFE; }\n\n.sectionTitle2 {\n fill: #F9FFFE; }\n\n.sectionTitle3 {\n fill: #F9FFFE; }\n\n.sectionTitle {\n text-anchor: start;\n font-size: 11px;\n text-height: 14px; }\n\n/* Grid and axis */\n.grid .tick {\n stroke: lightgrey;\n opacity: 0.3;\n shape-rendering: crispEdges; }\n\n.grid path {\n stroke-width: 0; }\n\n/* Today line */\n.today {\n fill: none;\n stroke: #DB5757;\n stroke-width: 2px; }\n\n/* Task styling */\n/* Default task */\n.task {\n stroke-width: 2; }\n\n.taskText {\n text-anchor: middle;\n font-size: 11px; }\n\n.taskTextOutsideRight {\n fill: #323D47;\n text-anchor: start;\n font-size: 11px; }\n\n.taskTextOutsideLeft {\n fill: #323D47;\n text-anchor: end;\n font-size: 11px; }\n\n/* Special case clickable */\n.task.clickable {\n cursor: pointer; }\n\n.taskText.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n/* Specific task settings for the sections*/\n.taskText0,\n.taskText1,\n.taskText2,\n.taskText3 {\n fill: #323D47; }\n\n.task0,\n.task1,\n.task2,\n.task3 {\n fill: #BDD5EA;\n stroke: rgba(255, 255, 255, 0.5); }\n\n.taskTextOutside0,\n.taskTextOutside2 {\n fill: lightgrey; }\n\n.taskTextOutside1,\n.taskTextOutside3 {\n fill: lightgrey; }\n\n/* Active task */\n.active0,\n.active1,\n.active2,\n.active3 {\n fill: #81B1DB;\n stroke: rgba(255, 255, 255, 0.5); }\n\n.activeText0,\n.activeText1,\n.activeText2,\n.activeText3 {\n fill: #323D47 !important; }\n\n/* Completed task */\n.done0,\n.done1,\n.done2,\n.done3 {\n stroke: grey;\n fill: lightgrey;\n stroke-width: 2; }\n\n.doneText0,\n.doneText1,\n.doneText2,\n.doneText3 {\n fill: #323D47 !important; }\n\n/* Tasks on the critical line */\n.crit0,\n.crit1,\n.crit2,\n.crit3 {\n stroke: #E83737;\n fill: #E83737;\n stroke-width: 2; }\n\n.activeCrit0,\n.activeCrit1,\n.activeCrit2,\n.activeCrit3 {\n stroke: #E83737;\n fill: #81B1DB;\n stroke-width: 2; }\n\n.doneCrit0,\n.doneCrit1,\n.doneCrit2,\n.doneCrit3 {\n stroke: #E83737;\n fill: lightgrey;\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges; }\n\n.milestone {\n transform: rotate(45deg) scale(0.8, 0.8); }\n\n.milestoneText {\n font-style: italic; }\n\n.doneCritText0,\n.doneCritText1,\n.doneCritText2,\n.doneCritText3 {\n fill: #323D47 !important; }\n\n.activeCritText0,\n.activeCritText1,\n.activeCritText2,\n.activeCritText3 {\n fill: #323D47 !important; }\n\n.titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: #323D47; }\n\ng.classGroup text {\n fill: purple;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 10px; }\n\ng.classGroup rect {\n fill: #BDD5EA;\n stroke: purple; }\n\ng.classGroup line {\n stroke: purple;\n stroke-width: 1; }\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #BDD5EA;\n opacity: 0.5; }\n\n.classLabel .label {\n fill: purple;\n font-size: 10px; }\n\n.relation {\n stroke: purple;\n stroke-width: 1;\n fill: none; }\n\n#compositionStart {\n fill: purple;\n stroke: purple;\n stroke-width: 1; }\n\n#compositionEnd {\n fill: purple;\n stroke: purple;\n stroke-width: 1; }\n\n#aggregationStart {\n fill: #BDD5EA;\n stroke: purple;\n stroke-width: 1; }\n\n#aggregationEnd {\n fill: #BDD5EA;\n stroke: purple;\n stroke-width: 1; }\n\n#dependencyStart {\n fill: purple;\n stroke: purple;\n stroke-width: 1; }\n\n#dependencyEnd {\n fill: purple;\n stroke: purple;\n stroke-width: 1; }\n\n#extensionStart {\n fill: purple;\n stroke: purple;\n stroke-width: 1; }\n\n#extensionEnd {\n fill: purple;\n stroke: purple;\n stroke-width: 1; }\n\n.commit-id,\n.commit-msg,\n.branch-label {\n fill: lightgrey;\n color: lightgrey; }\n\n.pieTitleText {\n text-anchor: middle;\n font-size: 25px;\n fill: #323D47; }\n", ""]);
|
109 |
|
110 |
|
111 |
|
112 | }),
|
113 |
|
114 | "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/default/index.scss":
|
115 |
|
116 |
|
117 |
|
118 |
|
119 | (function(module, exports, __webpack_require__) {
|
120 |
|
121 | exports = module.exports = __webpack_require__( "./node_modules/css-loader/dist/runtime/api.js")(false);
|
122 |
|
123 | exports.push([module.i, "/* Flowchart variables */\n/* Sequence Diagram variables */\n/* Gantt chart variables */\n.label {\n font-family: 'trebuchet ms', verdana, arial;\n color: #333; }\n\n.label text {\n fill: #333; }\n\n.node rect,\n.node circle,\n.node ellipse,\n.node polygon {\n fill: #ECECFF;\n stroke: #9370DB;\n stroke-width: 1px; }\n\n.node.clickable {\n cursor: pointer; }\n\n.arrowheadPath {\n fill: #333333; }\n\n.edgePath .path {\n stroke: #333333;\n stroke-width: 1.5px; }\n\n.edgeLabel {\n background-color: #e8e8e8; }\n\n.cluster rect {\n fill: #ffffde;\n stroke: #aaaa33;\n stroke-width: 1px; }\n\n.cluster text {\n fill: #333; }\n\ndiv.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 12px;\n background: #ffffde;\n border: 1px solid #aaaa33;\n border-radius: 2px;\n pointer-events: none;\n z-index: 100; }\n\n.actor {\n stroke: #CCCCFF;\n fill: #ECECFF; }\n\ntext.actor {\n fill: black;\n stroke: none; }\n\n.actor-line {\n stroke: grey; }\n\n.messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: #333; }\n\n.messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: #333; }\n\n#arrowhead {\n fill: #333; }\n\n.sequenceNumber {\n fill: white; }\n\n#sequencenumber {\n fill: #333; }\n\n#crosshead path {\n fill: #333 !important;\n stroke: #333 !important; }\n\n.messageText {\n fill: #333;\n stroke: none; }\n\n.labelBox {\n stroke: #CCCCFF;\n fill: #ECECFF; }\n\n.labelText {\n fill: black;\n stroke: none; }\n\n.loopText {\n fill: black;\n stroke: none; }\n\n.loopLine {\n stroke-width: 2;\n stroke-dasharray: '2 2';\n stroke: #CCCCFF; }\n\n.note {\n stroke: #aaaa33;\n fill: #fff5ad; }\n\n.noteText {\n fill: black;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 14px; }\n\n.activation0 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation1 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation2 {\n fill: #f4f4f4;\n stroke: #666; }\n\n/** Section styling */\n.section {\n stroke: none;\n opacity: 0.2; }\n\n.section0 {\n fill: rgba(102, 102, 255, 0.49); }\n\n.section2 {\n fill: #fff400; }\n\n.section1,\n.section3 {\n fill: white;\n opacity: 0.2; }\n\n.sectionTitle0 {\n fill: #333; }\n\n.sectionTitle1 {\n fill: #333; }\n\n.sectionTitle2 {\n fill: #333; }\n\n.sectionTitle3 {\n fill: #333; }\n\n.sectionTitle {\n text-anchor: start;\n font-size: 11px;\n text-height: 14px; }\n\n/* Grid and axis */\n.grid .tick {\n stroke: lightgrey;\n opacity: 0.3;\n shape-rendering: crispEdges; }\n\n.grid path {\n stroke-width: 0; }\n\n/* Today line */\n.today {\n fill: none;\n stroke: red;\n stroke-width: 2px; }\n\n/* Task styling */\n/* Default task */\n.task {\n stroke-width: 2; }\n\n.taskText {\n text-anchor: middle;\n font-size: 11px; }\n\n.taskTextOutsideRight {\n fill: black;\n text-anchor: start;\n font-size: 11px; }\n\n.taskTextOutsideLeft {\n fill: black;\n text-anchor: end;\n font-size: 11px; }\n\n/* Special case clickable */\n.task.clickable {\n cursor: pointer; }\n\n.taskText.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n/* Specific task settings for the sections*/\n.taskText0,\n.taskText1,\n.taskText2,\n.taskText3 {\n fill: white; }\n\n.task0,\n.task1,\n.task2,\n.task3 {\n fill: #8a90dd;\n stroke: #534fbc; }\n\n.taskTextOutside0,\n.taskTextOutside2 {\n fill: black; }\n\n.taskTextOutside1,\n.taskTextOutside3 {\n fill: black; }\n\n/* Active task */\n.active0,\n.active1,\n.active2,\n.active3 {\n fill: #bfc7ff;\n stroke: #534fbc; }\n\n.activeText0,\n.activeText1,\n.activeText2,\n.activeText3 {\n fill: black !important; }\n\n/* Completed task */\n.done0,\n.done1,\n.done2,\n.done3 {\n stroke: grey;\n fill: lightgrey;\n stroke-width: 2; }\n\n.doneText0,\n.doneText1,\n.doneText2,\n.doneText3 {\n fill: black !important; }\n\n/* Tasks on the critical line */\n.crit0,\n.crit1,\n.crit2,\n.crit3 {\n stroke: #ff8888;\n fill: red;\n stroke-width: 2; }\n\n.activeCrit0,\n.activeCrit1,\n.activeCrit2,\n.activeCrit3 {\n stroke: #ff8888;\n fill: #bfc7ff;\n stroke-width: 2; }\n\n.doneCrit0,\n.doneCrit1,\n.doneCrit2,\n.doneCrit3 {\n stroke: #ff8888;\n fill: lightgrey;\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges; }\n\n.milestone {\n transform: rotate(45deg) scale(0.8, 0.8); }\n\n.milestoneText {\n font-style: italic; }\n\n.doneCritText0,\n.doneCritText1,\n.doneCritText2,\n.doneCritText3 {\n fill: black !important; }\n\n.activeCritText0,\n.activeCritText1,\n.activeCritText2,\n.activeCritText3 {\n fill: black !important; }\n\n.titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: black; }\n\ng.classGroup text {\n fill: #9370DB;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 10px; }\n\ng.classGroup rect {\n fill: #ECECFF;\n stroke: #9370DB; }\n\ng.classGroup line {\n stroke: #9370DB;\n stroke-width: 1; }\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #ECECFF;\n opacity: 0.5; }\n\n.classLabel .label {\n fill: #9370DB;\n font-size: 10px; }\n\n.relation {\n stroke: #9370DB;\n stroke-width: 1;\n fill: none; }\n\n#compositionStart {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#compositionEnd {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#aggregationStart {\n fill: #ECECFF;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#aggregationEnd {\n fill: #ECECFF;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#dependencyStart {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#dependencyEnd {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#extensionStart {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#extensionEnd {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1; }\n\n.commit-id,\n.commit-msg,\n.branch-label {\n fill: lightgrey;\n color: lightgrey; }\n\n.pieTitleText {\n text-anchor: middle;\n font-size: 25px;\n fill: black; }\n", ""]);
|
124 |
|
125 |
|
126 |
|
127 | }),
|
128 |
|
129 | "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/forest/index.scss":
|
130 |
|
131 |
|
132 |
|
133 |
|
134 | (function(module, exports, __webpack_require__) {
|
135 |
|
136 | exports = module.exports = __webpack_require__( "./node_modules/css-loader/dist/runtime/api.js")(false);
|
137 |
|
138 | exports.push([module.i, "/* Flowchart variables */\n/* Sequence Diagram variables */\n/* Gantt chart variables */\n.label {\n font-family: 'trebuchet ms', verdana, arial;\n color: #333; }\n\n.label text {\n fill: #333; }\n\n.node rect,\n.node circle,\n.node ellipse,\n.node polygon {\n fill: #cde498;\n stroke: #13540c;\n stroke-width: 1px; }\n\n.node.clickable {\n cursor: pointer; }\n\n.arrowheadPath {\n fill: green; }\n\n.edgePath .path {\n stroke: green;\n stroke-width: 1.5px; }\n\n.edgeLabel {\n background-color: #e8e8e8; }\n\n.cluster rect {\n fill: #cdffb2;\n stroke: #6eaa49;\n stroke-width: 1px; }\n\n.cluster text {\n fill: #333; }\n\ndiv.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 12px;\n background: #cdffb2;\n border: 1px solid #6eaa49;\n border-radius: 2px;\n pointer-events: none;\n z-index: 100; }\n\n.actor {\n stroke: #13540c;\n fill: #cde498; }\n\ntext.actor {\n fill: black;\n stroke: none; }\n\n.actor-line {\n stroke: grey; }\n\n.messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: #333; }\n\n.messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: #333; }\n\n#arrowhead {\n fill: #333; }\n\n.sequenceNumber {\n fill: white; }\n\n#sequencenumber {\n fill: #333; }\n\n#crosshead path {\n fill: #333 !important;\n stroke: #333 !important; }\n\n.messageText {\n fill: #333;\n stroke: none; }\n\n.labelBox {\n stroke: #326932;\n fill: #cde498; }\n\n.labelText {\n fill: black;\n stroke: none; }\n\n.loopText {\n fill: black;\n stroke: none; }\n\n.loopLine {\n stroke-width: 2;\n stroke-dasharray: '2 2';\n stroke: #326932; }\n\n.note {\n stroke: #6eaa49;\n fill: #fff5ad; }\n\n.noteText {\n fill: black;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 14px; }\n\n.activation0 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation1 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation2 {\n fill: #f4f4f4;\n stroke: #666; }\n\n/** Section styling */\n.section {\n stroke: none;\n opacity: 0.2; }\n\n.section0 {\n fill: #6eaa49; }\n\n.section2 {\n fill: #6eaa49; }\n\n.section1,\n.section3 {\n fill: white;\n opacity: 0.2; }\n\n.sectionTitle0 {\n fill: #333; }\n\n.sectionTitle1 {\n fill: #333; }\n\n.sectionTitle2 {\n fill: #333; }\n\n.sectionTitle3 {\n fill: #333; }\n\n.sectionTitle {\n text-anchor: start;\n font-size: 11px;\n text-height: 14px; }\n\n/* Grid and axis */\n.grid .tick {\n stroke: lightgrey;\n opacity: 0.3;\n shape-rendering: crispEdges; }\n\n.grid path {\n stroke-width: 0; }\n\n/* Today line */\n.today {\n fill: none;\n stroke: red;\n stroke-width: 2px; }\n\n/* Task styling */\n/* Default task */\n.task {\n stroke-width: 2; }\n\n.taskText {\n text-anchor: middle;\n font-size: 11px; }\n\n.taskTextOutsideRight {\n fill: black;\n text-anchor: start;\n font-size: 11px; }\n\n.taskTextOutsideLeft {\n fill: black;\n text-anchor: end;\n font-size: 11px; }\n\n/* Special case clickable */\n.task.clickable {\n cursor: pointer; }\n\n.taskText.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n/* Specific task settings for the sections*/\n.taskText0,\n.taskText1,\n.taskText2,\n.taskText3 {\n fill: white; }\n\n.task0,\n.task1,\n.task2,\n.task3 {\n fill: #487e3a;\n stroke: #13540c; }\n\n.taskTextOutside0,\n.taskTextOutside2 {\n fill: black; }\n\n.taskTextOutside1,\n.taskTextOutside3 {\n fill: black; }\n\n/* Active task */\n.active0,\n.active1,\n.active2,\n.active3 {\n fill: #cde498;\n stroke: #13540c; }\n\n.activeText0,\n.activeText1,\n.activeText2,\n.activeText3 {\n fill: black !important; }\n\n/* Completed task */\n.done0,\n.done1,\n.done2,\n.done3 {\n stroke: grey;\n fill: lightgrey;\n stroke-width: 2; }\n\n.doneText0,\n.doneText1,\n.doneText2,\n.doneText3 {\n fill: black !important; }\n\n/* Tasks on the critical line */\n.crit0,\n.crit1,\n.crit2,\n.crit3 {\n stroke: #ff8888;\n fill: red;\n stroke-width: 2; }\n\n.activeCrit0,\n.activeCrit1,\n.activeCrit2,\n.activeCrit3 {\n stroke: #ff8888;\n fill: #cde498;\n stroke-width: 2; }\n\n.doneCrit0,\n.doneCrit1,\n.doneCrit2,\n.doneCrit3 {\n stroke: #ff8888;\n fill: lightgrey;\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges; }\n\n.milestone {\n transform: rotate(45deg) scale(0.8, 0.8); }\n\n.milestoneText {\n font-style: italic; }\n\n.doneCritText0,\n.doneCritText1,\n.doneCritText2,\n.doneCritText3 {\n fill: black !important; }\n\n.activeCritText0,\n.activeCritText1,\n.activeCritText2,\n.activeCritText3 {\n fill: black !important; }\n\n.titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: black; }\n\ng.classGroup text {\n fill: #13540c;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 10px; }\n\ng.classGroup rect {\n fill: #cde498;\n stroke: #13540c; }\n\ng.classGroup line {\n stroke: #13540c;\n stroke-width: 1; }\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #cde498;\n opacity: 0.5; }\n\n.classLabel .label {\n fill: #13540c;\n font-size: 10px; }\n\n.relation {\n stroke: #13540c;\n stroke-width: 1;\n fill: none; }\n\n#compositionStart {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1; }\n\n#compositionEnd {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1; }\n\n#aggregationStart {\n fill: #cde498;\n stroke: #13540c;\n stroke-width: 1; }\n\n#aggregationEnd {\n fill: #cde498;\n stroke: #13540c;\n stroke-width: 1; }\n\n#dependencyStart {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1; }\n\n#dependencyEnd {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1; }\n\n#extensionStart {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1; }\n\n#extensionEnd {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1; }\n\n.commit-id,\n.commit-msg,\n.branch-label {\n fill: lightgrey;\n color: lightgrey; }\n\n.pieTitleText {\n text-anchor: middle;\n font-size: 25px;\n fill: black; }\n", ""]);
|
139 |
|
140 |
|
141 |
|
142 | }),
|
143 |
|
144 | "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/neutral/index.scss":
|
145 |
|
146 |
|
147 |
|
148 |
|
149 | (function(module, exports, __webpack_require__) {
|
150 |
|
151 | exports = module.exports = __webpack_require__( "./node_modules/css-loader/dist/runtime/api.js")(false);
|
152 |
|
153 | exports.push([module.i, "/* Flowchart variables */\n/* Sequence Diagram variables */\n/* Gantt chart variables */\n.label {\n font-family: 'trebuchet ms', verdana, arial;\n color: #333; }\n\n.label text {\n fill: #333; }\n\n.node rect,\n.node circle,\n.node ellipse,\n.node polygon {\n fill: #eee;\n stroke: #999;\n stroke-width: 1px; }\n\n.node.clickable {\n cursor: pointer; }\n\n.arrowheadPath {\n fill: #333333; }\n\n.edgePath .path {\n stroke: #666;\n stroke-width: 1.5px; }\n\n.edgeLabel {\n background-color: white; }\n\n.cluster rect {\n fill: #eaf2fb;\n stroke: #26a;\n stroke-width: 1px; }\n\n.cluster text {\n fill: #333; }\n\ndiv.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 12px;\n background: #eaf2fb;\n border: 1px solid #26a;\n border-radius: 2px;\n pointer-events: none;\n z-index: 100; }\n\n.actor {\n stroke: #999;\n fill: #eee; }\n\ntext.actor {\n fill: #333;\n stroke: none; }\n\n.actor-line {\n stroke: #666; }\n\n.messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: #333; }\n\n.messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: #333; }\n\n#arrowhead {\n fill: #333; }\n\n.sequenceNumber {\n fill: white; }\n\n#sequencenumber {\n fill: #333; }\n\n#crosshead path {\n fill: #333 !important;\n stroke: #333 !important; }\n\n.messageText {\n fill: #333;\n stroke: none; }\n\n.labelBox {\n stroke: #999;\n fill: #eee; }\n\n.labelText {\n fill: #333;\n stroke: none; }\n\n.loopText {\n fill: #333;\n stroke: none; }\n\n.loopLine {\n stroke-width: 2;\n stroke-dasharray: '2 2';\n stroke: #999; }\n\n.note {\n stroke: #777700;\n fill: #ffa; }\n\n.noteText {\n fill: black;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 14px; }\n\n.activation0 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation1 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation2 {\n fill: #f4f4f4;\n stroke: #666; }\n\n/** Section styling */\n.section {\n stroke: none;\n opacity: 0.2; }\n\n.section0 {\n fill: #80b3e6; }\n\n.section2 {\n fill: #80b3e6; }\n\n.section1,\n.section3 {\n fill: white;\n opacity: 0.2; }\n\n.sectionTitle0 {\n fill: #333; }\n\n.sectionTitle1 {\n fill: #333; }\n\n.sectionTitle2 {\n fill: #333; }\n\n.sectionTitle3 {\n fill: #333; }\n\n.sectionTitle {\n text-anchor: start;\n font-size: 11px;\n text-height: 14px; }\n\n/* Grid and axis */\n.grid .tick {\n stroke: #e6e6e6;\n opacity: 0.3;\n shape-rendering: crispEdges; }\n\n.grid path {\n stroke-width: 0; }\n\n/* Today line */\n.today {\n fill: none;\n stroke: #d42;\n stroke-width: 2px; }\n\n/* Task styling */\n/* Default task */\n.task {\n stroke-width: 2; }\n\n.taskText {\n text-anchor: middle;\n font-size: 11px; }\n\n.taskTextOutsideRight {\n fill: #333;\n text-anchor: start;\n font-size: 11px; }\n\n.taskTextOutsideLeft {\n fill: #333;\n text-anchor: end;\n font-size: 11px; }\n\n/* Special case clickable */\n.task.clickable {\n cursor: pointer; }\n\n.taskText.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n/* Specific task settings for the sections*/\n.taskText0,\n.taskText1,\n.taskText2,\n.taskText3 {\n fill: white; }\n\n.task0,\n.task1,\n.task2,\n.task3 {\n fill: #26a;\n stroke: #1a4d80; }\n\n.taskTextOutside0,\n.taskTextOutside2 {\n fill: #333; }\n\n.taskTextOutside1,\n.taskTextOutside3 {\n fill: #333; }\n\n/* Active task */\n.active0,\n.active1,\n.active2,\n.active3 {\n fill: #eee;\n stroke: #1a4d80; }\n\n.activeText0,\n.activeText1,\n.activeText2,\n.activeText3 {\n fill: #333 !important; }\n\n/* Completed task */\n.done0,\n.done1,\n.done2,\n.done3 {\n stroke: #666;\n fill: #bbb;\n stroke-width: 2; }\n\n.doneText0,\n.doneText1,\n.doneText2,\n.doneText3 {\n fill: #333 !important; }\n\n/* Tasks on the critical line */\n.crit0,\n.crit1,\n.crit2,\n.crit3 {\n stroke: #b1361b;\n fill: #d42;\n stroke-width: 2; }\n\n.activeCrit0,\n.activeCrit1,\n.activeCrit2,\n.activeCrit3 {\n stroke: #b1361b;\n fill: #eee;\n stroke-width: 2; }\n\n.doneCrit0,\n.doneCrit1,\n.doneCrit2,\n.doneCrit3 {\n stroke: #b1361b;\n fill: #bbb;\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges; }\n\n.milestone {\n transform: rotate(45deg) scale(0.8, 0.8); }\n\n.milestoneText {\n font-style: italic; }\n\n.doneCritText0,\n.doneCritText1,\n.doneCritText2,\n.doneCritText3 {\n fill: #333 !important; }\n\n.activeCritText0,\n.activeCritText1,\n.activeCritText2,\n.activeCritText3 {\n fill: #333 !important; }\n\n.titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: #333; }\n\ng.classGroup text {\n fill: #999;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-size: 10px; }\n\ng.classGroup rect {\n fill: #eee;\n stroke: #999; }\n\ng.classGroup line {\n stroke: #999;\n stroke-width: 1; }\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #eee;\n opacity: 0.5; }\n\n.classLabel .label {\n fill: #999;\n font-size: 10px; }\n\n.relation {\n stroke: #999;\n stroke-width: 1;\n fill: none; }\n\n#compositionStart {\n fill: #999;\n stroke: #999;\n stroke-width: 1; }\n\n#compositionEnd {\n fill: #999;\n stroke: #999;\n stroke-width: 1; }\n\n#aggregationStart {\n fill: #eee;\n stroke: #999;\n stroke-width: 1; }\n\n#aggregationEnd {\n fill: #eee;\n stroke: #999;\n stroke-width: 1; }\n\n#dependencyStart {\n fill: #999;\n stroke: #999;\n stroke-width: 1; }\n\n#dependencyEnd {\n fill: #999;\n stroke: #999;\n stroke-width: 1; }\n\n#extensionStart {\n fill: #999;\n stroke: #999;\n stroke-width: 1; }\n\n#extensionEnd {\n fill: #999;\n stroke: #999;\n stroke-width: 1; }\n\n.commit-id,\n.commit-msg,\n.branch-label {\n fill: lightgrey;\n color: lightgrey; }\n\n.pieTitleText {\n text-anchor: middle;\n font-size: 25px;\n fill: #333; }\n", ""]);
|
154 |
|
155 |
|
156 |
|
157 | }),
|
158 |
|
159 | "./node_modules/css-loader/dist/runtime/api.js":
|
160 |
|
161 |
|
162 |
|
163 |
|
164 | (function(module, exports, __webpack_require__) {
|
165 |
|
166 | "use strict";
|
167 |
|
168 |
|
169 |
|
170 |
|
171 |
|
172 |
|
173 |
|
174 | module.exports = function (useSourceMap) {
|
175 | var list = [];
|
176 |
|
177 | list.toString = function toString() {
|
178 | return this.map(function (item) {
|
179 | var content = cssWithMappingToString(item, useSourceMap);
|
180 |
|
181 | if (item[2]) {
|
182 | return '@media ' + item[2] + '{' + content + '}';
|
183 | } else {
|
184 | return content;
|
185 | }
|
186 | }).join('');
|
187 | };
|
188 |
|
189 |
|
190 | list.i = function (modules, mediaQuery) {
|
191 | if (typeof modules === 'string') {
|
192 | modules = [[null, modules, '']];
|
193 | }
|
194 |
|
195 | var alreadyImportedModules = {};
|
196 |
|
197 | for (var i = 0; i < this.length; i++) {
|
198 | var id = this[i][0];
|
199 |
|
200 | if (id != null) {
|
201 | alreadyImportedModules[id] = true;
|
202 | }
|
203 | }
|
204 |
|
205 | for (i = 0; i < modules.length; i++) {
|
206 | var item = modules[i];
|
207 |
|
208 |
|
209 |
|
210 |
|
211 | if (item[0] == null || !alreadyImportedModules[item[0]]) {
|
212 | if (mediaQuery && !item[2]) {
|
213 | item[2] = mediaQuery;
|
214 | } else if (mediaQuery) {
|
215 | item[2] = '(' + item[2] + ') and (' + mediaQuery + ')';
|
216 | }
|
217 |
|
218 | list.push(item);
|
219 | }
|
220 | }
|
221 | };
|
222 |
|
223 | return list;
|
224 | };
|
225 |
|
226 | function cssWithMappingToString(item, useSourceMap) {
|
227 | var content = item[1] || '';
|
228 | var cssMapping = item[3];
|
229 |
|
230 | if (!cssMapping) {
|
231 | return content;
|
232 | }
|
233 |
|
234 | if (useSourceMap && typeof btoa === 'function') {
|
235 | var sourceMapping = toComment(cssMapping);
|
236 | var sourceURLs = cssMapping.sources.map(function (source) {
|
237 | return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';
|
238 | });
|
239 | return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
|
240 | }
|
241 |
|
242 | return [content].join('\n');
|
243 | }
|
244 |
|
245 |
|
246 | function toComment(sourceMap) {
|
247 |
|
248 | var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
|
249 | var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
|
250 | return '/*# ' + data + ' */';
|
251 | }
|
252 |
|
253 | }),
|
254 |
|
255 | "./node_modules/node-libs-browser/mock/empty.js":
|
256 |
|
257 |
|
258 |
|
259 |
|
260 | (function(module, exports) {
|
261 |
|
262 |
|
263 |
|
264 | }),
|
265 |
|
266 | "./node_modules/path-browserify/index.js":
|
267 |
|
268 |
|
269 |
|
270 |
|
271 | (function(module, exports, __webpack_require__) {
|
272 |
|
273 | (function(process) {
|
274 |
|
275 |
|
276 |
|
277 |
|
278 |
|
279 |
|
280 |
|
281 |
|
282 |
|
283 |
|
284 |
|
285 |
|
286 |
|
287 |
|
288 |
|
289 |
|
290 |
|
291 |
|
292 |
|
293 |
|
294 |
|
295 |
|
296 |
|
297 |
|
298 | function normalizeArray(parts, allowAboveRoot) {
|
299 |
|
300 | var up = 0;
|
301 | for (var i = parts.length - 1; i >= 0; i--) {
|
302 | var last = parts[i];
|
303 | if (last === '.') {
|
304 | parts.splice(i, 1);
|
305 | } else if (last === '..') {
|
306 | parts.splice(i, 1);
|
307 | up++;
|
308 | } else if (up) {
|
309 | parts.splice(i, 1);
|
310 | up--;
|
311 | }
|
312 | }
|
313 |
|
314 |
|
315 | if (allowAboveRoot) {
|
316 | for (; up--; up) {
|
317 | parts.unshift('..');
|
318 | }
|
319 | }
|
320 |
|
321 | return parts;
|
322 | }
|
323 |
|
324 |
|
325 |
|
326 | var splitPathRe =
|
327 | /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
|
328 | var splitPath = function(filename) {
|
329 | return splitPathRe.exec(filename).slice(1);
|
330 | };
|
331 |
|
332 |
|
333 |
|
334 | exports.resolve = function() {
|
335 | var resolvedPath = '',
|
336 | resolvedAbsolute = false;
|
337 |
|
338 | for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
339 | var path = (i >= 0) ? arguments[i] : process.cwd();
|
340 |
|
341 |
|
342 | if (typeof path !== 'string') {
|
343 | throw new TypeError('Arguments to path.resolve must be strings');
|
344 | } else if (!path) {
|
345 | continue;
|
346 | }
|
347 |
|
348 | resolvedPath = path + '/' + resolvedPath;
|
349 | resolvedAbsolute = path.charAt(0) === '/';
|
350 | }
|
351 |
|
352 |
|
353 |
|
354 |
|
355 |
|
356 | resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
|
357 | return !!p;
|
358 | }), !resolvedAbsolute).join('/');
|
359 |
|
360 | return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
|
361 | };
|
362 |
|
363 |
|
364 |
|
365 | exports.normalize = function(path) {
|
366 | var isAbsolute = exports.isAbsolute(path),
|
367 | trailingSlash = substr(path, -1) === '/';
|
368 |
|
369 |
|
370 | path = normalizeArray(filter(path.split('/'), function(p) {
|
371 | return !!p;
|
372 | }), !isAbsolute).join('/');
|
373 |
|
374 | if (!path && !isAbsolute) {
|
375 | path = '.';
|
376 | }
|
377 | if (path && trailingSlash) {
|
378 | path += '/';
|
379 | }
|
380 |
|
381 | return (isAbsolute ? '/' : '') + path;
|
382 | };
|
383 |
|
384 |
|
385 | exports.isAbsolute = function(path) {
|
386 | return path.charAt(0) === '/';
|
387 | };
|
388 |
|
389 |
|
390 | exports.join = function() {
|
391 | var paths = Array.prototype.slice.call(arguments, 0);
|
392 | return exports.normalize(filter(paths, function(p, index) {
|
393 | if (typeof p !== 'string') {
|
394 | throw new TypeError('Arguments to path.join must be strings');
|
395 | }
|
396 | return p;
|
397 | }).join('/'));
|
398 | };
|
399 |
|
400 |
|
401 |
|
402 |
|
403 | exports.relative = function(from, to) {
|
404 | from = exports.resolve(from).substr(1);
|
405 | to = exports.resolve(to).substr(1);
|
406 |
|
407 | function trim(arr) {
|
408 | var start = 0;
|
409 | for (; start < arr.length; start++) {
|
410 | if (arr[start] !== '') break;
|
411 | }
|
412 |
|
413 | var end = arr.length - 1;
|
414 | for (; end >= 0; end--) {
|
415 | if (arr[end] !== '') break;
|
416 | }
|
417 |
|
418 | if (start > end) return [];
|
419 | return arr.slice(start, end - start + 1);
|
420 | }
|
421 |
|
422 | var fromParts = trim(from.split('/'));
|
423 | var toParts = trim(to.split('/'));
|
424 |
|
425 | var length = Math.min(fromParts.length, toParts.length);
|
426 | var samePartsLength = length;
|
427 | for (var i = 0; i < length; i++) {
|
428 | if (fromParts[i] !== toParts[i]) {
|
429 | samePartsLength = i;
|
430 | break;
|
431 | }
|
432 | }
|
433 |
|
434 | var outputParts = [];
|
435 | for (var i = samePartsLength; i < fromParts.length; i++) {
|
436 | outputParts.push('..');
|
437 | }
|
438 |
|
439 | outputParts = outputParts.concat(toParts.slice(samePartsLength));
|
440 |
|
441 | return outputParts.join('/');
|
442 | };
|
443 |
|
444 | exports.sep = '/';
|
445 | exports.delimiter = ':';
|
446 |
|
447 | exports.dirname = function(path) {
|
448 | var result = splitPath(path),
|
449 | root = result[0],
|
450 | dir = result[1];
|
451 |
|
452 | if (!root && !dir) {
|
453 |
|
454 | return '.';
|
455 | }
|
456 |
|
457 | if (dir) {
|
458 |
|
459 | dir = dir.substr(0, dir.length - 1);
|
460 | }
|
461 |
|
462 | return root + dir;
|
463 | };
|
464 |
|
465 |
|
466 | exports.basename = function(path, ext) {
|
467 | var f = splitPath(path)[2];
|
468 |
|
469 | if (ext && f.substr(-1 * ext.length) === ext) {
|
470 | f = f.substr(0, f.length - ext.length);
|
471 | }
|
472 | return f;
|
473 | };
|
474 |
|
475 |
|
476 | exports.extname = function(path) {
|
477 | return splitPath(path)[3];
|
478 | };
|
479 |
|
480 | function filter (xs, f) {
|
481 | if (xs.filter) return xs.filter(f);
|
482 | var res = [];
|
483 | for (var i = 0; i < xs.length; i++) {
|
484 | if (f(xs[i], i, xs)) res.push(xs[i]);
|
485 | }
|
486 | return res;
|
487 | }
|
488 |
|
489 |
|
490 | var substr = 'ab'.substr(-1) === 'b'
|
491 | ? function (str, start, len) { return str.substr(start, len) }
|
492 | : function (str, start, len) {
|
493 | if (start < 0) start = str.length + start;
|
494 | return str.substr(start, len);
|
495 | }
|
496 | ;
|
497 |
|
498 | }.call(this, __webpack_require__( "./node_modules/process/browser.js")))
|
499 |
|
500 | }),
|
501 |
|
502 | "./node_modules/process/browser.js":
|
503 |
|
504 |
|
505 |
|
506 |
|
507 | (function(module, exports) {
|
508 |
|
509 |
|
510 | var process = module.exports = {};
|
511 |
|
512 |
|
513 |
|
514 |
|
515 |
|
516 |
|
517 | var cachedSetTimeout;
|
518 | var cachedClearTimeout;
|
519 |
|
520 | function defaultSetTimout() {
|
521 | throw new Error('setTimeout has not been defined');
|
522 | }
|
523 | function defaultClearTimeout () {
|
524 | throw new Error('clearTimeout has not been defined');
|
525 | }
|
526 | (function () {
|
527 | try {
|
528 | if (typeof setTimeout === 'function') {
|
529 | cachedSetTimeout = setTimeout;
|
530 | } else {
|
531 | cachedSetTimeout = defaultSetTimout;
|
532 | }
|
533 | } catch (e) {
|
534 | cachedSetTimeout = defaultSetTimout;
|
535 | }
|
536 | try {
|
537 | if (typeof clearTimeout === 'function') {
|
538 | cachedClearTimeout = clearTimeout;
|
539 | } else {
|
540 | cachedClearTimeout = defaultClearTimeout;
|
541 | }
|
542 | } catch (e) {
|
543 | cachedClearTimeout = defaultClearTimeout;
|
544 | }
|
545 | } ())
|
546 | function runTimeout(fun) {
|
547 | if (cachedSetTimeout === setTimeout) {
|
548 |
|
549 | return setTimeout(fun, 0);
|
550 | }
|
551 |
|
552 | if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
553 | cachedSetTimeout = setTimeout;
|
554 | return setTimeout(fun, 0);
|
555 | }
|
556 | try {
|
557 |
|
558 | return cachedSetTimeout(fun, 0);
|
559 | } catch(e){
|
560 | try {
|
561 |
|
562 | return cachedSetTimeout.call(null, fun, 0);
|
563 | } catch(e){
|
564 |
|
565 | return cachedSetTimeout.call(this, fun, 0);
|
566 | }
|
567 | }
|
568 |
|
569 |
|
570 | }
|
571 | function runClearTimeout(marker) {
|
572 | if (cachedClearTimeout === clearTimeout) {
|
573 |
|
574 | return clearTimeout(marker);
|
575 | }
|
576 |
|
577 | if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
578 | cachedClearTimeout = clearTimeout;
|
579 | return clearTimeout(marker);
|
580 | }
|
581 | try {
|
582 |
|
583 | return cachedClearTimeout(marker);
|
584 | } catch (e){
|
585 | try {
|
586 |
|
587 | return cachedClearTimeout.call(null, marker);
|
588 | } catch (e){
|
589 |
|
590 |
|
591 | return cachedClearTimeout.call(this, marker);
|
592 | }
|
593 | }
|
594 |
|
595 |
|
596 |
|
597 | }
|
598 | var queue = [];
|
599 | var draining = false;
|
600 | var currentQueue;
|
601 | var queueIndex = -1;
|
602 |
|
603 | function cleanUpNextTick() {
|
604 | if (!draining || !currentQueue) {
|
605 | return;
|
606 | }
|
607 | draining = false;
|
608 | if (currentQueue.length) {
|
609 | queue = currentQueue.concat(queue);
|
610 | } else {
|
611 | queueIndex = -1;
|
612 | }
|
613 | if (queue.length) {
|
614 | drainQueue();
|
615 | }
|
616 | }
|
617 |
|
618 | function drainQueue() {
|
619 | if (draining) {
|
620 | return;
|
621 | }
|
622 | var timeout = runTimeout(cleanUpNextTick);
|
623 | draining = true;
|
624 |
|
625 | var len = queue.length;
|
626 | while(len) {
|
627 | currentQueue = queue;
|
628 | queue = [];
|
629 | while (++queueIndex < len) {
|
630 | if (currentQueue) {
|
631 | currentQueue[queueIndex].run();
|
632 | }
|
633 | }
|
634 | queueIndex = -1;
|
635 | len = queue.length;
|
636 | }
|
637 | currentQueue = null;
|
638 | draining = false;
|
639 | runClearTimeout(timeout);
|
640 | }
|
641 |
|
642 | process.nextTick = function (fun) {
|
643 | var args = new Array(arguments.length - 1);
|
644 | if (arguments.length > 1) {
|
645 | for (var i = 1; i < arguments.length; i++) {
|
646 | args[i - 1] = arguments[i];
|
647 | }
|
648 | }
|
649 | queue.push(new Item(fun, args));
|
650 | if (queue.length === 1 && !draining) {
|
651 | runTimeout(drainQueue);
|
652 | }
|
653 | };
|
654 |
|
655 |
|
656 | function Item(fun, array) {
|
657 | this.fun = fun;
|
658 | this.array = array;
|
659 | }
|
660 | Item.prototype.run = function () {
|
661 | this.fun.apply(null, this.array);
|
662 | };
|
663 | process.title = 'browser';
|
664 | process.browser = true;
|
665 | process.env = {};
|
666 | process.argv = [];
|
667 | process.version = '';
|
668 | process.versions = {};
|
669 |
|
670 | function noop() {}
|
671 |
|
672 | process.on = noop;
|
673 | process.addListener = noop;
|
674 | process.once = noop;
|
675 | process.off = noop;
|
676 | process.removeListener = noop;
|
677 | process.removeAllListeners = noop;
|
678 | process.emit = noop;
|
679 | process.prependListener = noop;
|
680 | process.prependOnceListener = noop;
|
681 |
|
682 | process.listeners = function (name) { return [] }
|
683 |
|
684 | process.binding = function (name) {
|
685 | throw new Error('process.binding is not supported');
|
686 | };
|
687 |
|
688 | process.cwd = function () { return '/' };
|
689 | process.chdir = function (dir) {
|
690 | throw new Error('process.chdir is not supported');
|
691 | };
|
692 | process.umask = function() { return 0; };
|
693 |
|
694 |
|
695 | }),
|
696 |
|
697 | "./node_modules/webpack/buildin/module.js":
|
698 |
|
699 |
|
700 |
|
701 |
|
702 | (function(module, exports) {
|
703 |
|
704 | module.exports = function(module) {
|
705 | if (!module.webpackPolyfill) {
|
706 | module.deprecate = function() {};
|
707 | module.paths = [];
|
708 |
|
709 | if (!module.children) module.children = [];
|
710 | Object.defineProperty(module, "loaded", {
|
711 | enumerable: true,
|
712 | get: function() {
|
713 | return module.l;
|
714 | }
|
715 | });
|
716 | Object.defineProperty(module, "id", {
|
717 | enumerable: true,
|
718 | get: function() {
|
719 | return module.i;
|
720 | }
|
721 | });
|
722 | module.webpackPolyfill = 1;
|
723 | }
|
724 | return module;
|
725 | };
|
726 |
|
727 |
|
728 | }),
|
729 |
|
730 | "./package.json":
|
731 |
|
732 |
|
733 |
|
734 |
|
735 | (function(module) {
|
736 |
|
737 | module.exports = {"name":"mermaid","version":"8.3.1","description":"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.","main":"dist/mermaid.core.js","keywords":["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph"],"scripts":{"build":"webpack --progress --colors","postbuild":"documentation build src/mermaidAPI.js --shallow -f md --markdown-toc false -o docs/mermaidAPI.md","build:watch":"yarn build --watch","minify":"minify ./dist/mermaid.js > ./dist/mermaid.min.js","release":"yarn build -p --config webpack.config.prod.babel.js","lint":"eslint src","e2e:depr":"yarn lint && jest e2e --config e2e/jest.config.js","cypress":"percy exec -- cypress run","e2e":"start-server-and-test dev http://localhost:9000/ cypress","e2e-upd":"yarn lint && jest e2e -u --config e2e/jest.config.js","dev":"webpack-dev-server --config webpack.config.e2e.js","test":"yarn lint && jest src","test:watch":"jest --watch src","prepublishOnly":"yarn build && yarn release && yarn test","prepush":"yarn test"},"repository":{"type":"git","url":"https://github.com/knsv/mermaid"},"author":"Knut Sveidqvist","license":"MIT","standard":{"ignore":["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],"globals":["page"]},"dependencies":{"@braintree/sanitize-url":"^3.1.0","d3":"^5.7.0","dagre-d3-renderer":"^0.5.8","dagre-layout":"^0.8.8","graphlibrary":"^2.2.0","he":"^1.2.0","lodash":"^4.17.11","minify":"^4.1.1","moment-mini":"^2.22.1","prettier":"^1.18.2","scope-css":"^1.2.1"},"devDependencies":{"documentation":"^12.0.1","eslint":"^6.3.0","eslint-config-prettier":"^6.3.0","eslint-plugin-prettier":"^3.1.0","@babel/core":"^7.2.2","@babel/preset-env":"^7.2.0","@babel/register":"^7.0.0","@percy/cypress":"^2.0.1","babel-core":"7.0.0-bridge.0","babel-jest":"^23.6.0","babel-loader":"^8.0.4","coveralls":"^3.0.2","css-loader":"^2.0.1","css-to-string-loader":"^0.1.3","cypress":"3.4.0","husky":"^1.2.1","identity-obj-proxy":"^3.0.0","jest":"^23.6.0","jest-environment-puppeteer":"^4.2.0","jest-image-snapshot":"^2.8.2","jest-puppeteer":"^4.2.0","jison":"^0.4.18","moment":"^2.23.0","node-sass":"^4.11.0","puppeteer":"^1.17.0","sass-loader":"^7.1.0","start-server-and-test":"^1.10.0","webpack":"^4.27.1","webpack-cli":"^3.1.2","webpack-dev-server":"^3.4.1","webpack-node-externals":"^1.7.2","yarn-upgrade-all":"^0.5.0"},"files":["dist"],"yarn-upgrade-all":{"ignore":["babel-core"]}};
|
738 |
|
739 | }),
|
740 |
|
741 | "./src/config.js":
|
742 |
|
743 |
|
744 |
|
745 |
|
746 | (function(module, __webpack_exports__, __webpack_require__) {
|
747 |
|
748 | "use strict";
|
749 | __webpack_require__.r(__webpack_exports__);
|
750 | __webpack_require__.d(__webpack_exports__, "setConfig", function() { return setConfig; });
|
751 | __webpack_require__.d(__webpack_exports__, "getConfig", function() { return getConfig; });
|
752 | let config = {};
|
753 |
|
754 | const setConf = function (cnf) {
|
755 |
|
756 | const lvl1Keys = Object.keys(cnf);
|
757 |
|
758 | for (let i = 0; i < lvl1Keys.length; i++) {
|
759 | if (typeof cnf[lvl1Keys[i]] === 'object' && cnf[lvl1Keys[i]] != null) {
|
760 | const lvl2Keys = Object.keys(cnf[lvl1Keys[i]]);
|
761 |
|
762 | for (let j = 0; j < lvl2Keys.length; j++) {
|
763 |
|
764 | if (typeof config[lvl1Keys[i]] === 'undefined') {
|
765 | config[lvl1Keys[i]] = {};
|
766 | }
|
767 |
|
768 |
|
769 | config[lvl1Keys[i]][lvl2Keys[j]] = cnf[lvl1Keys[i]][lvl2Keys[j]];
|
770 | }
|
771 | } else {
|
772 | config[lvl1Keys[i]] = cnf[lvl1Keys[i]];
|
773 | }
|
774 | }
|
775 | };
|
776 |
|
777 | const setConfig = conf => {
|
778 | setConf(conf);
|
779 | };
|
780 | const getConfig = () => config;
|
781 |
|
782 | }),
|
783 |
|
784 | "./src/diagrams/class/classDb.js":
|
785 |
|
786 |
|
787 |
|
788 |
|
789 | (function(module, __webpack_exports__, __webpack_require__) {
|
790 |
|
791 | "use strict";
|
792 | __webpack_require__.r(__webpack_exports__);
|
793 | __webpack_require__.d(__webpack_exports__, "addClass", function() { return addClass; });
|
794 | __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
|
795 | __webpack_require__.d(__webpack_exports__, "getClass", function() { return getClass; });
|
796 | __webpack_require__.d(__webpack_exports__, "getClasses", function() { return getClasses; });
|
797 | __webpack_require__.d(__webpack_exports__, "getRelations", function() { return getRelations; });
|
798 | __webpack_require__.d(__webpack_exports__, "addRelation", function() { return addRelation; });
|
799 | __webpack_require__.d(__webpack_exports__, "addMember", function() { return addMember; });
|
800 | __webpack_require__.d(__webpack_exports__, "addMembers", function() { return addMembers; });
|
801 | __webpack_require__.d(__webpack_exports__, "cleanupLabel", function() { return cleanupLabel; });
|
802 | __webpack_require__.d(__webpack_exports__, "lineType", function() { return lineType; });
|
803 | __webpack_require__.d(__webpack_exports__, "relationType", function() { return relationType; });
|
804 | var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "./src/logger.js");
|
805 |
|
806 | let relations = [];
|
807 | let classes = {};
|
808 |
|
809 |
|
810 |
|
811 |
|
812 |
|
813 |
|
814 |
|
815 |
|
816 | const addClass = function (id) {
|
817 | if (typeof classes[id] === 'undefined') {
|
818 | classes[id] = {
|
819 | id: id,
|
820 | methods: [],
|
821 | members: []
|
822 | };
|
823 | }
|
824 | };
|
825 | const clear = function () {
|
826 | relations = [];
|
827 | classes = {};
|
828 | };
|
829 | const getClass = function (id) {
|
830 | return classes[id];
|
831 | };
|
832 | const getClasses = function () {
|
833 | return classes;
|
834 | };
|
835 | const getRelations = function () {
|
836 | return relations;
|
837 | };
|
838 | const addRelation = function (relation) {
|
839 | _logger__WEBPACK_IMPORTED_MODULE_0__["logger"].debug('Adding relation: ' + JSON.stringify(relation));
|
840 | addClass(relation.id1);
|
841 | addClass(relation.id2);
|
842 | relations.push(relation);
|
843 | };
|
844 | const addMember = function (className, member) {
|
845 | const theClass = classes[className];
|
846 |
|
847 | if (typeof member === 'string') {
|
848 | if (member.substr(-1) === ')') {
|
849 | theClass.methods.push(member);
|
850 | } else {
|
851 | theClass.members.push(member);
|
852 | }
|
853 | }
|
854 | };
|
855 | const addMembers = function (className, MembersArr) {
|
856 | if (Array.isArray(MembersArr)) {
|
857 | MembersArr.forEach(member => addMember(className, member));
|
858 | }
|
859 | };
|
860 | const cleanupLabel = function (label) {
|
861 | if (label.substring(0, 1) === ':') {
|
862 | return label.substr(2).trim();
|
863 | } else {
|
864 | return label.trim();
|
865 | }
|
866 | };
|
867 | const lineType = {
|
868 | LINE: 0,
|
869 | DOTTED_LINE: 1
|
870 | };
|
871 | const relationType = {
|
872 | AGGREGATION: 0,
|
873 | EXTENSION: 1,
|
874 | COMPOSITION: 2,
|
875 | DEPENDENCY: 3
|
876 | };
|
877 | __webpack_exports__["default"] = ({
|
878 | addClass,
|
879 | clear,
|
880 | getClass,
|
881 | getClasses,
|
882 | getRelations,
|
883 | addRelation,
|
884 | addMember,
|
885 | addMembers,
|
886 | cleanupLabel,
|
887 | lineType,
|
888 | relationType
|
889 | });
|
890 |
|
891 | }),
|
892 |
|
893 | "./src/diagrams/class/classRenderer.js":
|
894 |
|
895 |
|
896 |
|
897 |
|
898 | (function(module, __webpack_exports__, __webpack_require__) {
|
899 |
|
900 | "use strict";
|
901 | __webpack_require__.r(__webpack_exports__);
|
902 | __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
|
903 | __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
|
904 | var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "d3");
|
905 | var d3__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
|
906 | var dagre_layout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "dagre-layout");
|
907 | var dagre_layout__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(dagre_layout__WEBPACK_IMPORTED_MODULE_1__);
|
908 | var graphlibrary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "graphlibrary");
|
909 | var graphlibrary__WEBPACK_IMPORTED_MODULE_2___default = __webpack_require__.n(graphlibrary__WEBPACK_IMPORTED_MODULE_2__);
|
910 | var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./src/logger.js");
|
911 | var _classDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./src/diagrams/class/classDb.js");
|
912 | var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__( "./src/diagrams/class/parser/classDiagram.jison");
|
913 | var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5___default = __webpack_require__.n(_parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__);
|
914 |
|
915 |
|
916 |
|
917 |
|
918 |
|
919 |
|
920 | _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].yy = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"];
|
921 | const idCache = {};
|
922 | let classCnt = 0;
|
923 | const conf = {
|
924 | dividerMargin: 10,
|
925 | padding: 5,
|
926 | textHeight: 10
|
927 | };
|
928 |
|
929 | const getGraphId = function (label) {
|
930 | const keys = Object.keys(idCache);
|
931 |
|
932 | for (let i = 0; i < keys.length; i++) {
|
933 | if (idCache[keys[i]].label === label) {
|
934 | return keys[i];
|
935 | }
|
936 | }
|
937 |
|
938 | return undefined;
|
939 | };
|
940 |
|
941 |
|
942 |
|
943 |
|
944 |
|
945 | const insertMarkers = function (elem) {
|
946 | elem.append('defs').append('marker').attr('id', 'extensionStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 1,7 L18,13 V 1 Z');
|
947 | elem.append('defs').append('marker').attr('id', 'extensionEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 1,1 V 13 L18,7 Z');
|
948 |
|
949 | elem.append('defs').append('marker').attr('id', 'compositionStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');
|
950 | elem.append('defs').append('marker').attr('id', 'compositionEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');
|
951 | elem.append('defs').append('marker').attr('id', 'aggregationStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');
|
952 | elem.append('defs').append('marker').attr('id', 'aggregationEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');
|
953 | elem.append('defs').append('marker').attr('id', 'dependencyStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z');
|
954 | elem.append('defs').append('marker').attr('id', 'dependencyEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');
|
955 | };
|
956 |
|
957 | let edgeCount = 0;
|
958 | let total = 0;
|
959 |
|
960 | const drawEdge = function (elem, path, relation) {
|
961 | const getRelationType = function (type) {
|
962 | switch (type) {
|
963 | case _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].relationType.AGGREGATION:
|
964 | return 'aggregation';
|
965 |
|
966 | case _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].relationType.EXTENSION:
|
967 | return 'extension';
|
968 |
|
969 | case _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].relationType.COMPOSITION:
|
970 | return 'composition';
|
971 |
|
972 | case _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].relationType.DEPENDENCY:
|
973 | return 'dependency';
|
974 | }
|
975 | };
|
976 |
|
977 | path.points = path.points.filter(p => !Number.isNaN(p.y));
|
978 |
|
979 | const lineData = path.points;
|
980 |
|
981 | const lineFunction = d3__WEBPACK_IMPORTED_MODULE_0__["line"]().x(function (d) {
|
982 | return d.x;
|
983 | }).y(function (d) {
|
984 | return d.y;
|
985 | }).curve(d3__WEBPACK_IMPORTED_MODULE_0__["curveBasis"]);
|
986 | const svgPath = elem.append('path').attr('d', lineFunction(lineData)).attr('id', 'edge' + edgeCount).attr('class', 'relation');
|
987 | let url = '';
|
988 |
|
989 | if (conf.arrowMarkerAbsolute) {
|
990 | url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;
|
991 | url = url.replace(/\(/g, '\\(');
|
992 | url = url.replace(/\)/g, '\\)');
|
993 | }
|
994 |
|
995 | if (relation.relation.type1 !== 'none') {
|
996 | svgPath.attr('marker-start', 'url(' + url + '#' + getRelationType(relation.relation.type1) + 'Start' + ')');
|
997 | }
|
998 |
|
999 | if (relation.relation.type2 !== 'none') {
|
1000 | svgPath.attr('marker-end', 'url(' + url + '#' + getRelationType(relation.relation.type2) + 'End' + ')');
|
1001 | }
|
1002 |
|
1003 | let x, y;
|
1004 | const l = path.points.length;
|
1005 |
|
1006 | if (l % 2 !== 0 && l > 1) {
|
1007 | const p1 = path.points[Math.floor(l / 2)];
|
1008 | const p2 = path.points[Math.ceil(l / 2)];
|
1009 | x = (p1.x + p2.x) / 2;
|
1010 | y = (p1.y + p2.y) / 2;
|
1011 | } else {
|
1012 | const p = path.points[Math.floor(l / 2)];
|
1013 | x = p.x;
|
1014 | y = p.y;
|
1015 | }
|
1016 |
|
1017 | if (typeof relation.title !== 'undefined') {
|
1018 | const g = elem.append('g').attr('class', 'classLabel');
|
1019 | const label = g.append('text').attr('class', 'label').attr('x', x).attr('y', y).attr('fill', 'red').attr('text-anchor', 'middle').text(relation.title);
|
1020 | window.label = label;
|
1021 | const bounds = label.node().getBBox();
|
1022 | g.insert('rect', ':first-child').attr('class', 'box').attr('x', bounds.x - conf.padding / 2).attr('y', bounds.y - conf.padding / 2).attr('width', bounds.width + conf.padding).attr('height', bounds.height + conf.padding);
|
1023 | }
|
1024 |
|
1025 | edgeCount++;
|
1026 | };
|
1027 |
|
1028 | const drawClass = function (elem, classDef) {
|
1029 | _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('Rendering class ' + classDef);
|
1030 |
|
1031 | const addTspan = function (textEl, txt, isFirst) {
|
1032 | const tSpan = textEl.append('tspan').attr('x', conf.padding).text(txt);
|
1033 |
|
1034 | if (!isFirst) {
|
1035 | tSpan.attr('dy', conf.textHeight);
|
1036 | }
|
1037 | };
|
1038 |
|
1039 | const id = 'classId' + classCnt % total;
|
1040 | const classInfo = {
|
1041 | id: id,
|
1042 | label: classDef.id,
|
1043 | width: 0,
|
1044 | height: 0
|
1045 | };
|
1046 | const g = elem.append('g').attr('id', id).attr('class', 'classGroup');
|
1047 | const title = g.append('text').attr('x', conf.padding).attr('y', conf.textHeight + conf.padding).text(classDef.id);
|
1048 | const titleHeight = title.node().getBBox().height;
|
1049 | const membersLine = g.append('line')
|
1050 | .attr('x1', 0).attr('y1', conf.padding + titleHeight + conf.dividerMargin / 2).attr('y2', conf.padding + titleHeight + conf.dividerMargin / 2);
|
1051 | const members = g.append('text')
|
1052 | .attr('x', conf.padding).attr('y', titleHeight + conf.dividerMargin + conf.textHeight).attr('fill', 'white').attr('class', 'classText');
|
1053 | let isFirst = true;
|
1054 | classDef.members.forEach(function (member) {
|
1055 | addTspan(members, member, isFirst);
|
1056 | isFirst = false;
|
1057 | });
|
1058 | const membersBox = members.node().getBBox();
|
1059 | const methodsLine = g.append('line')
|
1060 | .attr('x1', 0).attr('y1', conf.padding + titleHeight + conf.dividerMargin + membersBox.height).attr('y2', conf.padding + titleHeight + conf.dividerMargin + membersBox.height);
|
1061 | const methods = g.append('text')
|
1062 | .attr('x', conf.padding).attr('y', titleHeight + 2 * conf.dividerMargin + membersBox.height + conf.textHeight).attr('fill', 'white').attr('class', 'classText');
|
1063 | isFirst = true;
|
1064 | classDef.methods.forEach(function (method) {
|
1065 | addTspan(methods, method, isFirst);
|
1066 | isFirst = false;
|
1067 | });
|
1068 | const classBox = g.node().getBBox();
|
1069 | g.insert('rect', ':first-child').attr('x', 0).attr('y', 0).attr('width', classBox.width + 2 * conf.padding).attr('height', classBox.height + conf.padding + 0.5 * conf.dividerMargin);
|
1070 | membersLine.attr('x2', classBox.width + 2 * conf.padding);
|
1071 | methodsLine.attr('x2', classBox.width + 2 * conf.padding);
|
1072 | classInfo.width = classBox.width + 2 * conf.padding;
|
1073 | classInfo.height = classBox.height + conf.padding + 0.5 * conf.dividerMargin;
|
1074 | idCache[id] = classInfo;
|
1075 | classCnt++;
|
1076 | return classInfo;
|
1077 | };
|
1078 |
|
1079 | const setConf = function (cnf) {
|
1080 | const keys = Object.keys(cnf);
|
1081 | keys.forEach(function (key) {
|
1082 | conf[key] = cnf[key];
|
1083 | });
|
1084 | };
|
1085 |
|
1086 |
|
1087 |
|
1088 |
|
1089 |
|
1090 |
|
1091 | const draw = function (text, id) {
|
1092 | _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].yy.clear();
|
1093 | _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].parse(text);
|
1094 | _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('Rendering diagram ' + text);
|
1095 |
|
1096 | const diagram = d3__WEBPACK_IMPORTED_MODULE_0__["select"](`[id='${id}']`);
|
1097 | insertMarkers(diagram);
|
1098 |
|
1099 | const g = new graphlibrary__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({
|
1100 | multigraph: true
|
1101 | });
|
1102 |
|
1103 | g.setGraph({
|
1104 | isMultiGraph: true
|
1105 | });
|
1106 |
|
1107 | g.setDefaultEdgeLabel(function () {
|
1108 | return {};
|
1109 | });
|
1110 | const classes = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getClasses();
|
1111 | const keys = Object.keys(classes);
|
1112 | total = keys.length;
|
1113 |
|
1114 | for (let i = 0; i < keys.length; i++) {
|
1115 | const classDef = classes[keys[i]];
|
1116 | const node = drawClass(diagram, classDef);
|
1117 |
|
1118 |
|
1119 |
|
1120 | g.setNode(node.id, node);
|
1121 | _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('Org height: ' + node.height);
|
1122 | }
|
1123 |
|
1124 | const relations = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getRelations();
|
1125 | relations.forEach(function (relation) {
|
1126 | _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('tjoho' + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation));
|
1127 | g.setEdge(getGraphId(relation.id1), getGraphId(relation.id2), {
|
1128 | relation: relation
|
1129 | });
|
1130 | });
|
1131 | dagre_layout__WEBPACK_IMPORTED_MODULE_1___default.a.layout(g);
|
1132 | g.nodes().forEach(function (v) {
|
1133 | if (typeof v !== 'undefined' && typeof g.node(v) !== 'undefined') {
|
1134 | _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Node ' + v + ': ' + JSON.stringify(g.node(v)));
|
1135 | d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#' + v).attr('transform', 'translate(' + (g.node(v).x - g.node(v).width / 2) + ',' + (g.node(v).y - g.node(v).height / 2) + ' )');
|
1136 | }
|
1137 | });
|
1138 | g.edges().forEach(function (e) {
|
1139 | if (typeof e !== 'undefined' && typeof g.edge(e) !== 'undefined') {
|
1140 | _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(g.edge(e)));
|
1141 | drawEdge(diagram, g.edge(e), g.edge(e).relation);
|
1142 | }
|
1143 | });
|
1144 | diagram.attr('height', '100%');
|
1145 | diagram.attr('width', '100%');
|
1146 | diagram.attr('viewBox', '0 0 ' + (g.graph().width + 20) + ' ' + (g.graph().height + 20));
|
1147 | };
|
1148 | __webpack_exports__["default"] = ({
|
1149 | setConf,
|
1150 | draw
|
1151 | });
|
1152 |
|
1153 | }),
|
1154 |
|
1155 | "./src/diagrams/class/parser/classDiagram.jison":
|
1156 |
|
1157 |
|
1158 |
|
1159 |
|
1160 | (function(module, exports, __webpack_require__) {
|
1161 |
|
1162 | (function(process, module) {
|
1163 |
|
1164 |
|
1165 |
|
1166 |
|
1167 |
|
1168 |
|
1169 |
|
1170 |
|
1171 |
|
1172 |
|
1173 |
|
1174 |
|
1175 |
|
1176 |
|
1177 |
|
1178 |
|
1179 |
|
1180 |
|
1181 |
|
1182 |
|
1183 |
|
1184 |
|
1185 |
|
1186 |
|
1187 |
|
1188 |
|
1189 |
|
1190 |
|
1191 |
|
1192 |
|
1193 |
|
1194 |
|
1195 |
|
1196 |
|
1197 |
|
1198 |
|
1199 |
|
1200 |
|
1201 |
|
1202 |
|
1203 |
|
1204 |
|
1205 |
|
1206 |
|
1207 |
|
1208 |
|
1209 |
|
1210 |
|
1211 |
|
1212 |
|
1213 |
|
1214 |
|
1215 |
|
1216 |
|
1217 |
|
1218 |
|
1219 |
|
1220 |
|
1221 |
|
1222 |
|
1223 |
|
1224 |
|
1225 |
|
1226 |
|
1227 |
|
1228 |
|
1229 |
|
1230 |
|
1231 |
|
1232 |
|
1233 |
|
1234 |
|
1235 | var parser = (function(){
|
1236 | var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,11],$V1=[1,12],$V2=[1,13],$V3=[1,15],$V4=[1,16],$V5=[1,17],$V6=[6,8],$V7=[1,26],$V8=[1,27],$V9=[1,28],$Va=[1,29],$Vb=[1,30],$Vc=[1,31],$Vd=[6,8,13,17,23,26,27,28,29,30,31],$Ve=[6,8,13,17,23,26,27,28,29,30,31,45,46,47],$Vf=[23,45,46,47],$Vg=[23,30,31,45,46,47],$Vh=[23,26,27,28,29,45,46,47],$Vi=[6,8,13],$Vj=[1,46];
|
1237 | var parser = {trace: function trace () { },
|
1238 | yy: {},
|
1239 | symbols_: {"error":2,"mermaidDoc":3,"graphConfig":4,"CLASS_DIAGRAM":5,"NEWLINE":6,"statements":7,"EOF":8,"statement":9,"className":10,"alphaNumToken":11,"relationStatement":12,"LABEL":13,"classStatement":14,"methodStatement":15,"CLASS":16,"STRUCT_START":17,"members":18,"STRUCT_STOP":19,"MEMBER":20,"SEPARATOR":21,"relation":22,"STR":23,"relationType":24,"lineType":25,"AGGREGATION":26,"EXTENSION":27,"COMPOSITION":28,"DEPENDENCY":29,"LINE":30,"DOTTED_LINE":31,"commentToken":32,"textToken":33,"graphCodeTokens":34,"textNoTagsToken":35,"TAGSTART":36,"TAGEND":37,"==":38,"--":39,"PCT":40,"DEFAULT":41,"SPACE":42,"MINUS":43,"keywords":44,"UNICODE_TEXT":45,"NUM":46,"ALPHA":47,"$accept":0,"$end":1},
|
1240 | terminals_: {2:"error",5:"CLASS_DIAGRAM",6:"NEWLINE",8:"EOF",13:"LABEL",16:"CLASS",17:"STRUCT_START",19:"STRUCT_STOP",20:"MEMBER",21:"SEPARATOR",23:"STR",26:"AGGREGATION",27:"EXTENSION",28:"COMPOSITION",29:"DEPENDENCY",30:"LINE",31:"DOTTED_LINE",34:"graphCodeTokens",36:"TAGSTART",37:"TAGEND",38:"==",39:"--",40:"PCT",41:"DEFAULT",42:"SPACE",43:"MINUS",44:"keywords",45:"UNICODE_TEXT",46:"NUM",47:"ALPHA"},
|
1241 | productions_: [0,[3,1],[4,4],[7,1],[7,2],[7,3],[10,2],[10,1],[9,1],[9,2],[9,1],[9,1],[14,2],[14,5],[18,1],[18,2],[15,1],[15,2],[15,1],[15,1],[12,3],[12,4],[12,4],[12,5],[22,3],[22,2],[22,2],[22,1],[24,1],[24,1],[24,1],[24,1],[25,1],[25,1],[32,1],[32,1],[33,1],[33,1],[33,1],[33,1],[33,1],[33,1],[33,1],[35,1],[35,1],[35,1],[35,1],[11,1],[11,1],[11,1]],
|
1242 | performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
|
1243 |
|
1244 |
|
1245 | var $0 = $$.length - 1;
|
1246 | switch (yystate) {
|
1247 | case 6:
|
1248 | this.$=$$[$0-1]+$$[$0];
|
1249 | break;
|
1250 | case 7:
|
1251 | this.$=$$[$0];
|
1252 | break;
|
1253 | case 8:
|
1254 | yy.addRelation($$[$0]);
|
1255 | break;
|
1256 | case 9:
|
1257 | $$[$0-1].title = yy.cleanupLabel($$[$0]); yy.addRelation($$[$0-1]);
|
1258 | break;
|
1259 | case 12:
|
1260 | yy.addClass($$[$0]);
|
1261 | break;
|
1262 | case 13:
|
1263 | yy.addClass($$[$0-3]);yy.addMembers($$[$0-3],$$[$0-1]);
|
1264 | break;
|
1265 | case 14:
|
1266 | this.$ = [$$[$0]];
|
1267 | break;
|
1268 | case 15:
|
1269 | $$[$0].push($$[$0-1]);this.$=$$[$0];
|
1270 | break;
|
1271 | case 16:
|
1272 |
|
1273 | break;
|
1274 | case 17:
|
1275 | yy.addMember($$[$0-1],yy.cleanupLabel($$[$0]));
|
1276 | break;
|
1277 | case 18:
|
1278 | console.warn('Member',$$[$0]);
|
1279 | break;
|
1280 | case 19:
|
1281 |
|
1282 | break;
|
1283 | case 20:
|
1284 | this.$ = {'id1':$$[$0-2],'id2':$$[$0], relation:$$[$0-1], relationTitle1:'none', relationTitle2:'none'};
|
1285 | break;
|
1286 | case 21:
|
1287 | this.$ = {id1:$$[$0-3], id2:$$[$0], relation:$$[$0-1], relationTitle1:$$[$0-2], relationTitle2:'none'}
|
1288 | break;
|
1289 | case 22:
|
1290 | this.$ = {id1:$$[$0-3], id2:$$[$0], relation:$$[$0-2], relationTitle1:'none', relationTitle2:$$[$0-1]};
|
1291 | break;
|
1292 | case 23:
|
1293 | this.$ = {id1:$$[$0-4], id2:$$[$0], relation:$$[$0-2], relationTitle1:$$[$0-3], relationTitle2:$$[$0-1]}
|
1294 | break;
|
1295 | case 24:
|
1296 | this.$={type1:$$[$0-2],type2:$$[$0],lineType:$$[$0-1]};
|
1297 | break;
|
1298 | case 25:
|
1299 | this.$={type1:'none',type2:$$[$0],lineType:$$[$0-1]};
|
1300 | break;
|
1301 | case 26:
|
1302 | this.$={type1:$$[$0-1],type2:'none',lineType:$$[$0]};
|
1303 | break;
|
1304 | case 27:
|
1305 | this.$={type1:'none',type2:'none',lineType:$$[$0]};
|
1306 | break;
|
1307 | case 28:
|
1308 | this.$=yy.relationType.AGGREGATION;
|
1309 | break;
|
1310 | case 29:
|
1311 | this.$=yy.relationType.EXTENSION;
|
1312 | break;
|
1313 | case 30:
|
1314 | this.$=yy.relationType.COMPOSITION;
|
1315 | break;
|
1316 | case 31:
|
1317 | this.$=yy.relationType.DEPENDENCY;
|
1318 | break;
|
1319 | case 32:
|
1320 | this.$=yy.lineType.LINE;
|
1321 | break;
|
1322 | case 33:
|
1323 | this.$=yy.lineType.DOTTED_LINE;
|
1324 | break;
|
1325 | }
|
1326 | },
|
1327 | table: [{3:1,4:2,5:[1,3]},{1:[3]},{1:[2,1]},{6:[1,4]},{7:5,9:6,10:10,11:14,12:7,14:8,15:9,16:$V0,20:$V1,21:$V2,45:$V3,46:$V4,47:$V5},{8:[1,18]},{6:[1,19],8:[2,3]},o($V6,[2,8],{13:[1,20]}),o($V6,[2,10]),o($V6,[2,11]),o($V6,[2,16],{22:21,24:24,25:25,13:[1,23],23:[1,22],26:$V7,27:$V8,28:$V9,29:$Va,30:$Vb,31:$Vc}),{10:32,11:14,45:$V3,46:$V4,47:$V5},o($V6,[2,18]),o($V6,[2,19]),o($Vd,[2,7],{11:14,10:33,45:$V3,46:$V4,47:$V5}),o($Ve,[2,47]),o($Ve,[2,48]),o($Ve,[2,49]),{1:[2,2]},{7:34,8:[2,4],9:6,10:10,11:14,12:7,14:8,15:9,16:$V0,20:$V1,21:$V2,45:$V3,46:$V4,47:$V5},o($V6,[2,9]),{10:35,11:14,23:[1,36],45:$V3,46:$V4,47:$V5},{22:37,24:24,25:25,26:$V7,27:$V8,28:$V9,29:$Va,30:$Vb,31:$Vc},o($V6,[2,17]),{25:38,30:$Vb,31:$Vc},o($Vf,[2,27],{24:39,26:$V7,27:$V8,28:$V9,29:$Va}),o($Vg,[2,28]),o($Vg,[2,29]),o($Vg,[2,30]),o($Vg,[2,31]),o($Vh,[2,32]),o($Vh,[2,33]),o($V6,[2,12],{17:[1,40]}),o($Vd,[2,6]),{8:[2,5]},o($Vi,[2,20]),{10:41,11:14,45:$V3,46:$V4,47:$V5},{10:42,11:14,23:[1,43],45:$V3,46:$V4,47:$V5},o($Vf,[2,26],{24:44,26:$V7,27:$V8,28:$V9,29:$Va}),o($Vf,[2,25]),{18:45,20:$Vj},o($Vi,[2,22]),o($Vi,[2,21]),{10:47,11:14,45:$V3,46:$V4,47:$V5},o($Vf,[2,24]),{19:[1,48]},{18:49,19:[2,14],20:$Vj},o($Vi,[2,23]),o($V6,[2,13]),{19:[2,15]}],
|
1328 | defaultActions: {2:[2,1],18:[2,2],34:[2,5],49:[2,15]},
|
1329 | parseError: function parseError (str, hash) {
|
1330 | if (hash.recoverable) {
|
1331 | this.trace(str);
|
1332 | } else {
|
1333 | var error = new Error(str);
|
1334 | error.hash = hash;
|
1335 | throw error;
|
1336 | }
|
1337 | },
|
1338 | parse: function parse(input) {
|
1339 | var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
|
1340 | var args = lstack.slice.call(arguments, 1);
|
1341 | var lexer = Object.create(this.lexer);
|
1342 | var sharedState = { yy: {} };
|
1343 | for (var k in this.yy) {
|
1344 | if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
1345 | sharedState.yy[k] = this.yy[k];
|
1346 | }
|
1347 | }
|
1348 | lexer.setInput(input, sharedState.yy);
|
1349 | sharedState.yy.lexer = lexer;
|
1350 | sharedState.yy.parser = this;
|
1351 | if (typeof lexer.yylloc == 'undefined') {
|
1352 | lexer.yylloc = {};
|
1353 | }
|
1354 | var yyloc = lexer.yylloc;
|
1355 | lstack.push(yyloc);
|
1356 | var ranges = lexer.options && lexer.options.ranges;
|
1357 | if (typeof sharedState.yy.parseError === 'function') {
|
1358 | this.parseError = sharedState.yy.parseError;
|
1359 | } else {
|
1360 | this.parseError = Object.getPrototypeOf(this).parseError;
|
1361 | }
|
1362 | function popStack(n) {
|
1363 | stack.length = stack.length - 2 * n;
|
1364 | vstack.length = vstack.length - n;
|
1365 | lstack.length = lstack.length - n;
|
1366 | }
|
1367 | function lex() {
|
1368 | var token;
|
1369 | token = tstack.pop() || lexer.lex() || EOF;
|
1370 | if (typeof token !== 'number') {
|
1371 | if (token instanceof Array) {
|
1372 | tstack = token;
|
1373 | token = tstack.pop();
|
1374 | }
|
1375 | token = self.symbols_[token] || token;
|
1376 | }
|
1377 | return token;
|
1378 | }
|
1379 | var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
|
1380 | while (true) {
|
1381 | state = stack[stack.length - 1];
|
1382 | if (this.defaultActions[state]) {
|
1383 | action = this.defaultActions[state];
|
1384 | } else {
|
1385 | if (symbol === null || typeof symbol == 'undefined') {
|
1386 | symbol = lex();
|
1387 | }
|
1388 | action = table[state] && table[state][symbol];
|
1389 | }
|
1390 | if (typeof action === 'undefined' || !action.length || !action[0]) {
|
1391 | var errStr = '';
|
1392 | expected = [];
|
1393 | for (p in table[state]) {
|
1394 | if (this.terminals_[p] && p > TERROR) {
|
1395 | expected.push('\'' + this.terminals_[p] + '\'');
|
1396 | }
|
1397 | }
|
1398 | if (lexer.showPosition) {
|
1399 | errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
|
1400 | } else {
|
1401 | errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
|
1402 | }
|
1403 | this.parseError(errStr, {
|
1404 | text: lexer.match,
|
1405 | token: this.terminals_[symbol] || symbol,
|
1406 | line: lexer.yylineno,
|
1407 | loc: yyloc,
|
1408 | expected: expected
|
1409 | });
|
1410 | }
|
1411 | if (action[0] instanceof Array && action.length > 1) {
|
1412 | throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
|
1413 | }
|
1414 | switch (action[0]) {
|
1415 | case 1:
|
1416 | stack.push(symbol);
|
1417 | vstack.push(lexer.yytext);
|
1418 | lstack.push(lexer.yylloc);
|
1419 | stack.push(action[1]);
|
1420 | symbol = null;
|
1421 | if (!preErrorSymbol) {
|
1422 | yyleng = lexer.yyleng;
|
1423 | yytext = lexer.yytext;
|
1424 | yylineno = lexer.yylineno;
|
1425 | yyloc = lexer.yylloc;
|
1426 | if (recovering > 0) {
|
1427 | recovering--;
|
1428 | }
|
1429 | } else {
|
1430 | symbol = preErrorSymbol;
|
1431 | preErrorSymbol = null;
|
1432 | }
|
1433 | break;
|
1434 | case 2:
|
1435 | len = this.productions_[action[1]][1];
|
1436 | yyval.$ = vstack[vstack.length - len];
|
1437 | yyval._$ = {
|
1438 | first_line: lstack[lstack.length - (len || 1)].first_line,
|
1439 | last_line: lstack[lstack.length - 1].last_line,
|
1440 | first_column: lstack[lstack.length - (len || 1)].first_column,
|
1441 | last_column: lstack[lstack.length - 1].last_column
|
1442 | };
|
1443 | if (ranges) {
|
1444 | yyval._$.range = [
|
1445 | lstack[lstack.length - (len || 1)].range[0],
|
1446 | lstack[lstack.length - 1].range[1]
|
1447 | ];
|
1448 | }
|
1449 | r = this.performAction.apply(yyval, [
|
1450 | yytext,
|
1451 | yyleng,
|
1452 | yylineno,
|
1453 | sharedState.yy,
|
1454 | action[1],
|
1455 | vstack,
|
1456 | lstack
|
1457 | ].concat(args));
|
1458 | if (typeof r !== 'undefined') {
|
1459 | return r;
|
1460 | }
|
1461 | if (len) {
|
1462 | stack = stack.slice(0, -1 * len * 2);
|
1463 | vstack = vstack.slice(0, -1 * len);
|
1464 | lstack = lstack.slice(0, -1 * len);
|
1465 | }
|
1466 | stack.push(this.productions_[action[1]][0]);
|
1467 | vstack.push(yyval.$);
|
1468 | lstack.push(yyval._$);
|
1469 | newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
1470 | stack.push(newState);
|
1471 | break;
|
1472 | case 3:
|
1473 | return true;
|
1474 | }
|
1475 | }
|
1476 | return true;
|
1477 | }};
|
1478 |
|
1479 |
|
1480 | var lexer = (function(){
|
1481 | var lexer = ({
|
1482 |
|
1483 | EOF:1,
|
1484 |
|
1485 | parseError:function parseError(str, hash) {
|
1486 | if (this.yy.parser) {
|
1487 | this.yy.parser.parseError(str, hash);
|
1488 | } else {
|
1489 | throw new Error(str);
|
1490 | }
|
1491 | },
|
1492 |
|
1493 |
|
1494 | setInput:function (input, yy) {
|
1495 | this.yy = yy || this.yy || {};
|
1496 | this._input = input;
|
1497 | this._more = this._backtrack = this.done = false;
|
1498 | this.yylineno = this.yyleng = 0;
|
1499 | this.yytext = this.matched = this.match = '';
|
1500 | this.conditionStack = ['INITIAL'];
|
1501 | this.yylloc = {
|
1502 | first_line: 1,
|
1503 | first_column: 0,
|
1504 | last_line: 1,
|
1505 | last_column: 0
|
1506 | };
|
1507 | if (this.options.ranges) {
|
1508 | this.yylloc.range = [0,0];
|
1509 | }
|
1510 | this.offset = 0;
|
1511 | return this;
|
1512 | },
|
1513 |
|
1514 |
|
1515 | input:function () {
|
1516 | var ch = this._input[0];
|
1517 | this.yytext += ch;
|
1518 | this.yyleng++;
|
1519 | this.offset++;
|
1520 | this.match += ch;
|
1521 | this.matched += ch;
|
1522 | var lines = ch.match(/(?:\r\n?|\n).*/g);
|
1523 | if (lines) {
|
1524 | this.yylineno++;
|
1525 | this.yylloc.last_line++;
|
1526 | } else {
|
1527 | this.yylloc.last_column++;
|
1528 | }
|
1529 | if (this.options.ranges) {
|
1530 | this.yylloc.range[1]++;
|
1531 | }
|
1532 |
|
1533 | this._input = this._input.slice(1);
|
1534 | return ch;
|
1535 | },
|
1536 |
|
1537 |
|
1538 | unput:function (ch) {
|
1539 | var len = ch.length;
|
1540 | var lines = ch.split(/(?:\r\n?|\n)/g);
|
1541 |
|
1542 | this._input = ch + this._input;
|
1543 | this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
1544 |
|
1545 | this.offset -= len;
|
1546 | var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
1547 | this.match = this.match.substr(0, this.match.length - 1);
|
1548 | this.matched = this.matched.substr(0, this.matched.length - 1);
|
1549 |
|
1550 | if (lines.length - 1) {
|
1551 | this.yylineno -= lines.length - 1;
|
1552 | }
|
1553 | var r = this.yylloc.range;
|
1554 |
|
1555 | this.yylloc = {
|
1556 | first_line: this.yylloc.first_line,
|
1557 | last_line: this.yylineno + 1,
|
1558 | first_column: this.yylloc.first_column,
|
1559 | last_column: lines ?
|
1560 | (lines.length === oldLines.length ? this.yylloc.first_column : 0)
|
1561 | + oldLines[oldLines.length - lines.length].length - lines[0].length :
|
1562 | this.yylloc.first_column - len
|
1563 | };
|
1564 |
|
1565 | if (this.options.ranges) {
|
1566 | this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
1567 | }
|
1568 | this.yyleng = this.yytext.length;
|
1569 | return this;
|
1570 | },
|
1571 |
|
1572 |
|
1573 | more:function () {
|
1574 | this._more = true;
|
1575 | return this;
|
1576 | },
|
1577 |
|
1578 |
|
1579 | reject:function () {
|
1580 | if (this.options.backtrack_lexer) {
|
1581 | this._backtrack = true;
|
1582 | } else {
|
1583 | return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), {
|
1584 | text: "",
|
1585 | token: null,
|
1586 | line: this.yylineno
|
1587 | });
|
1588 |
|
1589 | }
|
1590 | return this;
|
1591 | },
|
1592 |
|
1593 |
|
1594 | less:function (n) {
|
1595 | this.unput(this.match.slice(n));
|
1596 | },
|
1597 |
|
1598 |
|
1599 | pastInput:function () {
|
1600 | var past = this.matched.substr(0, this.matched.length - this.match.length);
|
1601 | return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
|
1602 | },
|
1603 |
|
1604 |
|
1605 | upcomingInput:function () {
|
1606 | var next = this.match;
|
1607 | if (next.length < 20) {
|
1608 | next += this._input.substr(0, 20-next.length);
|
1609 | }
|
1610 | return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
|
1611 | },
|
1612 |
|
1613 |
|
1614 | showPosition:function () {
|
1615 | var pre = this.pastInput();
|
1616 | var c = new Array(pre.length + 1).join("-");
|
1617 | return pre + this.upcomingInput() + "\n" + c + "^";
|
1618 | },
|
1619 |
|
1620 |
|
1621 | test_match:function(match, indexed_rule) {
|
1622 | var token,
|
1623 | lines,
|
1624 | backup;
|
1625 |
|
1626 | if (this.options.backtrack_lexer) {
|
1627 |
|
1628 | backup = {
|
1629 | yylineno: this.yylineno,
|
1630 | yylloc: {
|
1631 | first_line: this.yylloc.first_line,
|
1632 | last_line: this.last_line,
|
1633 | first_column: this.yylloc.first_column,
|
1634 | last_column: this.yylloc.last_column
|
1635 | },
|
1636 | yytext: this.yytext,
|
1637 | match: this.match,
|
1638 | matches: this.matches,
|
1639 | matched: this.matched,
|
1640 | yyleng: this.yyleng,
|
1641 | offset: this.offset,
|
1642 | _more: this._more,
|
1643 | _input: this._input,
|
1644 | yy: this.yy,
|
1645 | conditionStack: this.conditionStack.slice(0),
|
1646 | done: this.done
|
1647 | };
|
1648 | if (this.options.ranges) {
|
1649 | backup.yylloc.range = this.yylloc.range.slice(0);
|
1650 | }
|
1651 | }
|
1652 |
|
1653 | lines = match[0].match(/(?:\r\n?|\n).*/g);
|
1654 | if (lines) {
|
1655 | this.yylineno += lines.length;
|
1656 | }
|
1657 | this.yylloc = {
|
1658 | first_line: this.yylloc.last_line,
|
1659 | last_line: this.yylineno + 1,
|
1660 | first_column: this.yylloc.last_column,
|
1661 | last_column: lines ?
|
1662 | lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
|
1663 | this.yylloc.last_column + match[0].length
|
1664 | };
|
1665 | this.yytext += match[0];
|
1666 | this.match += match[0];
|
1667 | this.matches = match;
|
1668 | this.yyleng = this.yytext.length;
|
1669 | if (this.options.ranges) {
|
1670 | this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
1671 | }
|
1672 | this._more = false;
|
1673 | this._backtrack = false;
|
1674 | this._input = this._input.slice(match[0].length);
|
1675 | this.matched += match[0];
|
1676 | token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
1677 | if (this.done && this._input) {
|
1678 | this.done = false;
|
1679 | }
|
1680 | if (token) {
|
1681 | return token;
|
1682 | } else if (this._backtrack) {
|
1683 |
|
1684 | for (var k in backup) {
|
1685 | this[k] = backup[k];
|
1686 | }
|
1687 | return false;
|
1688 | }
|
1689 | return false;
|
1690 | },
|
1691 |
|
1692 |
|
1693 | next:function () {
|
1694 | if (this.done) {
|
1695 | return this.EOF;
|
1696 | }
|
1697 | if (!this._input) {
|
1698 | this.done = true;
|
1699 | }
|
1700 |
|
1701 | var token,
|
1702 | match,
|
1703 | tempMatch,
|
1704 | index;
|
1705 | if (!this._more) {
|
1706 | this.yytext = '';
|
1707 | this.match = '';
|
1708 | }
|
1709 | var rules = this._currentRules();
|
1710 | for (var i = 0; i < rules.length; i++) {
|
1711 | tempMatch = this._input.match(this.rules[rules[i]]);
|
1712 | if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
1713 | match = tempMatch;
|
1714 | index = i;
|
1715 | if (this.options.backtrack_lexer) {
|
1716 | token = this.test_match(tempMatch, rules[i]);
|
1717 | if (token !== false) {
|
1718 | return token;
|
1719 | } else if (this._backtrack) {
|
1720 | match = false;
|
1721 | continue;
|
1722 | } else {
|
1723 |
|
1724 | return false;
|
1725 | }
|
1726 | } else if (!this.options.flex) {
|
1727 | break;
|
1728 | }
|
1729 | }
|
1730 | }
|
1731 | if (match) {
|
1732 | token = this.test_match(match, rules[index]);
|
1733 | if (token !== false) {
|
1734 | return token;
|
1735 | }
|
1736 |
|
1737 | return false;
|
1738 | }
|
1739 | if (this._input === "") {
|
1740 | return this.EOF;
|
1741 | } else {
|
1742 | return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
|
1743 | text: "",
|
1744 | token: null,
|
1745 | line: this.yylineno
|
1746 | });
|
1747 | }
|
1748 | },
|
1749 |
|
1750 |
|
1751 | lex:function lex () {
|
1752 | var r = this.next();
|
1753 | if (r) {
|
1754 | return r;
|
1755 | } else {
|
1756 | return this.lex();
|
1757 | }
|
1758 | },
|
1759 |
|
1760 |
|
1761 | begin:function begin (condition) {
|
1762 | this.conditionStack.push(condition);
|
1763 | },
|
1764 |
|
1765 |
|
1766 | popState:function popState () {
|
1767 | var n = this.conditionStack.length - 1;
|
1768 | if (n > 0) {
|
1769 | return this.conditionStack.pop();
|
1770 | } else {
|
1771 | return this.conditionStack[0];
|
1772 | }
|
1773 | },
|
1774 |
|
1775 |
|
1776 | _currentRules:function _currentRules () {
|
1777 | if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
1778 | return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
1779 | } else {
|
1780 | return this.conditions["INITIAL"].rules;
|
1781 | }
|
1782 | },
|
1783 |
|
1784 |
|
1785 | topState:function topState (n) {
|
1786 | n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
1787 | if (n >= 0) {
|
1788 | return this.conditionStack[n];
|
1789 | } else {
|
1790 | return "INITIAL";
|
1791 | }
|
1792 | },
|
1793 |
|
1794 |
|
1795 | pushState:function pushState (condition) {
|
1796 | this.begin(condition);
|
1797 | },
|
1798 |
|
1799 |
|
1800 | stateStackSize:function stateStackSize() {
|
1801 | return this.conditionStack.length;
|
1802 | },
|
1803 | options: {},
|
1804 | performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
|
1805 | var YYSTATE=YY_START;
|
1806 | switch($avoiding_name_collisions) {
|
1807 | case 0:
|
1808 | break;
|
1809 | case 1:return 6;
|
1810 | break;
|
1811 | case 2:
|
1812 | break;
|
1813 | case 3:return 5;
|
1814 | break;
|
1815 | case 4: this.begin("struct"); return 17;
|
1816 | break;
|
1817 | case 5: this.popState(); return 19;
|
1818 | break;
|
1819 | case 6:
|
1820 | break;
|
1821 | case 7: return "MEMBER";
|
1822 | break;
|
1823 | case 8:return 16;
|
1824 | break;
|
1825 | case 9:this.begin("string");
|
1826 | break;
|
1827 | case 10:this.popState();
|
1828 | break;
|
1829 | case 11:return "STR";
|
1830 | break;
|
1831 | case 12:return 27;
|
1832 | break;
|
1833 | case 13:return 27;
|
1834 | break;
|
1835 | case 14:return 29;
|
1836 | break;
|
1837 | case 15:return 29;
|
1838 | break;
|
1839 | case 16:return 28;
|
1840 | break;
|
1841 | case 17:return 26;
|
1842 | break;
|
1843 | case 18:return 30;
|
1844 | break;
|
1845 | case 19:return 31;
|
1846 | break;
|
1847 | case 20:return 13;
|
1848 | break;
|
1849 | case 21:return 43;
|
1850 | break;
|
1851 | case 22:return 'DOT';
|
1852 | break;
|
1853 | case 23:return 'PLUS';
|
1854 | break;
|
1855 | case 24:return 40;
|
1856 | break;
|
1857 | case 25:return 'EQUALS';
|
1858 | break;
|
1859 | case 26:return 'EQUALS';
|
1860 | break;
|
1861 | case 27:return 47;
|
1862 | break;
|
1863 | case 28:return 'PUNCTUATION';
|
1864 | break;
|
1865 | case 29:return 46;
|
1866 | break;
|
1867 | case 30:return 45;
|
1868 | break;
|
1869 | case 31:return 42;
|
1870 | break;
|
1871 | case 32:return 8;
|
1872 | break;
|
1873 | }
|
1874 | },
|
1875 | rules: [/^(?:%%[^\n]*)/,/^(?:\n+)/,/^(?:\s+)/,/^(?:classDiagram\b)/,/^(?:[\{])/,/^(?:\})/,/^(?:[\n])/,/^(?:[^\{\}\n]*)/,/^(?:class\b)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::[^#\n;]+)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:[A-Za-z]+)/,/^(?:[!"#$%&'*+,-.`?\\_\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],
|
1876 | conditions: {"string":{"rules":[10,11],"inclusive":false},"struct":{"rules":[5,6,7],"inclusive":false},"INITIAL":{"rules":[0,1,2,3,4,8,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],"inclusive":true}}
|
1877 | });
|
1878 | return lexer;
|
1879 | })();
|
1880 | parser.lexer = lexer;
|
1881 | function Parser () {
|
1882 | this.yy = {};
|
1883 | }
|
1884 | Parser.prototype = parser;parser.Parser = Parser;
|
1885 | return new Parser;
|
1886 | })();
|
1887 |
|
1888 |
|
1889 | if (true) {
|
1890 | exports.parser = parser;
|
1891 | exports.Parser = parser.Parser;
|
1892 | exports.parse = function () { return parser.parse.apply(parser, arguments); };
|
1893 | exports.main = function commonjsMain (args) {
|
1894 | if (!args[1]) {
|
1895 | console.log('Usage: '+args[0]+' FILE');
|
1896 | process.exit(1);
|
1897 | }
|
1898 | var source = __webpack_require__( "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__( "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
|
1899 | return exports.parser.parse(source);
|
1900 | };
|
1901 | if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
|
1902 | exports.main(process.argv.slice(1));
|
1903 | }
|
1904 | }
|
1905 | }.call(this, __webpack_require__( "./node_modules/process/browser.js"), __webpack_require__( "./node_modules/webpack/buildin/module.js")(module)))
|
1906 |
|
1907 | }),
|
1908 |
|
1909 | "./src/diagrams/flowchart/flowDb.js":
|
1910 |
|
1911 |
|
1912 |
|
1913 |
|
1914 | (function(module, __webpack_exports__, __webpack_require__) {
|
1915 |
|
1916 | "use strict";
|
1917 | __webpack_require__.r(__webpack_exports__);
|
1918 | __webpack_require__.d(__webpack_exports__, "addVertex", function() { return addVertex; });
|
1919 | __webpack_require__.d(__webpack_exports__, "addLink", function() { return addLink; });
|
1920 | __webpack_require__.d(__webpack_exports__, "updateLinkInterpolate", function() { return updateLinkInterpolate; });
|
1921 | __webpack_require__.d(__webpack_exports__, "updateLink", function() { return updateLink; });
|
1922 | __webpack_require__.d(__webpack_exports__, "addClass", function() { return addClass; });
|
1923 | __webpack_require__.d(__webpack_exports__, "setDirection", function() { return setDirection; });
|
1924 | __webpack_require__.d(__webpack_exports__, "setClass", function() { return setClass; });
|
1925 | __webpack_require__.d(__webpack_exports__, "setLink", function() { return setLink; });
|
1926 | __webpack_require__.d(__webpack_exports__, "getTooltip", function() { return getTooltip; });
|
1927 | __webpack_require__.d(__webpack_exports__, "setClickEvent", function() { return setClickEvent; });
|
1928 | __webpack_require__.d(__webpack_exports__, "bindFunctions", function() { return bindFunctions; });
|
1929 | __webpack_require__.d(__webpack_exports__, "getDirection", function() { return getDirection; });
|
1930 | __webpack_require__.d(__webpack_exports__, "getVertices", function() { return getVertices; });
|
1931 | __webpack_require__.d(__webpack_exports__, "getEdges", function() { return getEdges; });
|
1932 | __webpack_require__.d(__webpack_exports__, "getClasses", function() { return getClasses; });
|
1933 | __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
|
1934 | __webpack_require__.d(__webpack_exports__, "defaultStyle", function() { return defaultStyle; });
|
1935 | __webpack_require__.d(__webpack_exports__, "addSubGraph", function() { return addSubGraph; });
|
1936 | __webpack_require__.d(__webpack_exports__, "getDepthFirstPos", function() { return getDepthFirstPos; });
|
1937 | __webpack_require__.d(__webpack_exports__, "indexNodes", function() { return indexNodes; });
|
1938 | __webpack_require__.d(__webpack_exports__, "getSubGraphs", function() { return getSubGraphs; });
|
1939 | __webpack_require__.d(__webpack_exports__, "firstGraph", function() { return firstGraph; });
|
1940 | var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "d3");
|
1941 | var d3__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
|
1942 | var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "@braintree/sanitize-url");
|
1943 | var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__);
|
1944 | var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./src/logger.js");
|
1945 | var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./src/utils.js");
|
1946 | var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./src/config.js");
|
1947 |
|
1948 |
|
1949 |
|
1950 |
|
1951 |
|
1952 | const config = Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])();
|
1953 | let vertices = {};
|
1954 | let edges = [];
|
1955 | let classes = [];
|
1956 | let subGraphs = [];
|
1957 | let subGraphLookup = {};
|
1958 | let tooltips = {};
|
1959 | let subCount = 0;
|
1960 | let firstGraphFlag = true;
|
1961 | let direction;
|
1962 |
|
1963 | let funs = [];
|
1964 |
|
1965 | const sanitize = text => {
|
1966 | let txt = text;
|
1967 |
|
1968 | if (config.securityLevel !== 'loose') {
|
1969 | txt = txt.replace(/<br>/g, '#br#');
|
1970 | txt = txt.replace(/<br\S*?\/>/g, '#br#');
|
1971 | txt = txt.replace(/</g, '<').replace(/>/g, '>');
|
1972 | txt = txt.replace(/=/g, '=');
|
1973 | txt = txt.replace(/#br#/g, '<br/>');
|
1974 | }
|
1975 |
|
1976 | return txt;
|
1977 | };
|
1978 |
|
1979 |
|
1980 |
|
1981 |
|
1982 |
|
1983 |
|
1984 |
|
1985 |
|
1986 |
|
1987 |
|
1988 | const addVertex = function (_id, text, type, style, classes) {
|
1989 | let txt;
|
1990 | let id = _id;
|
1991 |
|
1992 | if (typeof id === 'undefined') {
|
1993 | return;
|
1994 | }
|
1995 |
|
1996 | if (id.trim().length === 0) {
|
1997 | return;
|
1998 | }
|
1999 |
|
2000 | if (id[0].match(/\d/)) id = 's' + id;
|
2001 |
|
2002 | if (typeof vertices[id] === 'undefined') {
|
2003 | vertices[id] = {
|
2004 | id: id,
|
2005 | styles: [],
|
2006 | classes: []
|
2007 | };
|
2008 | }
|
2009 |
|
2010 | if (typeof text !== 'undefined') {
|
2011 | txt = sanitize(text.trim());
|
2012 |
|
2013 | if (txt[0] === '"' && txt[txt.length - 1] === '"') {
|
2014 | txt = txt.substring(1, txt.length - 1);
|
2015 | }
|
2016 |
|
2017 | vertices[id].text = txt;
|
2018 | } else {
|
2019 | if (!vertices[id].text) {
|
2020 | vertices[id].text = _id;
|
2021 | }
|
2022 | }
|
2023 |
|
2024 | if (typeof type !== 'undefined') {
|
2025 | vertices[id].type = type;
|
2026 | }
|
2027 |
|
2028 | if (typeof style !== 'undefined') {
|
2029 | if (style !== null) {
|
2030 | style.forEach(function (s) {
|
2031 | vertices[id].styles.push(s);
|
2032 | });
|
2033 | }
|
2034 | }
|
2035 |
|
2036 | if (typeof classes !== 'undefined') {
|
2037 | if (classes !== null) {
|
2038 | classes.forEach(function (s) {
|
2039 | vertices[id].classes.push(s);
|
2040 | });
|
2041 | }
|
2042 | }
|
2043 | };
|
2044 |
|
2045 |
|
2046 |
|
2047 |
|
2048 |
|
2049 |
|
2050 |
|
2051 |
|
2052 | const addLink = function (_start, _end, type, linktext) {
|
2053 | let start = _start;
|
2054 | let end = _end;
|
2055 | if (start[0].match(/\d/)) start = 's' + start;
|
2056 | if (end[0].match(/\d/)) end = 's' + end;
|
2057 | _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].info('Got edge...', start, end);
|
2058 | const edge = {
|
2059 | start: start,
|
2060 | end: end,
|
2061 | type: undefined,
|
2062 | text: ''
|
2063 | };
|
2064 | linktext = type.text;
|
2065 |
|
2066 | if (typeof linktext !== 'undefined') {
|
2067 | edge.text = sanitize(linktext.trim());
|
2068 |
|
2069 | if (edge.text[0] === '"' && edge.text[edge.text.length - 1] === '"') {
|
2070 | edge.text = edge.text.substring(1, edge.text.length - 1);
|
2071 | }
|
2072 | }
|
2073 |
|
2074 | if (typeof type !== 'undefined') {
|
2075 | edge.type = type.type;
|
2076 | edge.stroke = type.stroke;
|
2077 | }
|
2078 |
|
2079 | edges.push(edge);
|
2080 | };
|
2081 |
|
2082 |
|
2083 |
|
2084 |
|
2085 |
|
2086 |
|
2087 | const updateLinkInterpolate = function (positions, interp) {
|
2088 | positions.forEach(function (pos) {
|
2089 | if (pos === 'default') {
|
2090 | edges.defaultInterpolate = interp;
|
2091 | } else {
|
2092 | edges[pos].interpolate = interp;
|
2093 | }
|
2094 | });
|
2095 | };
|
2096 |
|
2097 |
|
2098 |
|
2099 |
|
2100 |
|
2101 |
|
2102 | const updateLink = function (positions, style) {
|
2103 | positions.forEach(function (pos) {
|
2104 | if (pos === 'default') {
|
2105 | edges.defaultStyle = style;
|
2106 | } else {
|
2107 | if (_utils__WEBPACK_IMPORTED_MODULE_3__["default"].isSubstringInArray('fill', style) === -1) {
|
2108 | style.push('fill:none');
|
2109 | }
|
2110 |
|
2111 | edges[pos].style = style;
|
2112 | }
|
2113 | });
|
2114 | };
|
2115 | const addClass = function (id, style) {
|
2116 | if (typeof classes[id] === 'undefined') {
|
2117 | classes[id] = {
|
2118 | id: id,
|
2119 | styles: []
|
2120 | };
|
2121 | }
|
2122 |
|
2123 | if (typeof style !== 'undefined') {
|
2124 | if (style !== null) {
|
2125 | style.forEach(function (s) {
|
2126 | classes[id].styles.push(s);
|
2127 | });
|
2128 | }
|
2129 | }
|
2130 | };
|
2131 |
|
2132 |
|
2133 |
|
2134 |
|
2135 |
|
2136 | const setDirection = function (dir) {
|
2137 | direction = dir;
|
2138 |
|
2139 | if (direction.match(/.*</)) {
|
2140 | direction = 'RL';
|
2141 | }
|
2142 |
|
2143 | if (direction.match(/.*\^/)) {
|
2144 | direction = 'BT';
|
2145 | }
|
2146 |
|
2147 | if (direction.match(/.*>/)) {
|
2148 | direction = 'LR';
|
2149 | }
|
2150 |
|
2151 | if (direction.match(/.*v/)) {
|
2152 | direction = 'TB';
|
2153 | }
|
2154 | };
|
2155 |
|
2156 |
|
2157 |
|
2158 |
|
2159 |
|
2160 |
|
2161 | const setClass = function (ids, className) {
|
2162 | ids.split(',').forEach(function (_id) {
|
2163 | let id = _id;
|
2164 | if (_id[0].match(/\d/)) id = 's' + id;
|
2165 |
|
2166 | if (typeof vertices[id] !== 'undefined') {
|
2167 | vertices[id].classes.push(className);
|
2168 | }
|
2169 |
|
2170 | if (typeof subGraphLookup[id] !== 'undefined') {
|
2171 | subGraphLookup[id].classes.push(className);
|
2172 | }
|
2173 | });
|
2174 | };
|
2175 |
|
2176 | const setTooltip = function (ids, tooltip) {
|
2177 | ids.split(',').forEach(function (id) {
|
2178 | if (typeof tooltip !== 'undefined') {
|
2179 | tooltips[id] = sanitize(tooltip);
|
2180 | }
|
2181 | });
|
2182 | };
|
2183 |
|
2184 | const setClickFun = function (_id, functionName) {
|
2185 | let id = _id;
|
2186 | if (_id[0].match(/\d/)) id = 's' + id;
|
2187 |
|
2188 | if (config.securityLevel !== 'loose') {
|
2189 | return;
|
2190 | }
|
2191 |
|
2192 | if (typeof functionName === 'undefined') {
|
2193 | return;
|
2194 | }
|
2195 |
|
2196 | if (typeof vertices[id] !== 'undefined') {
|
2197 | funs.push(function (element) {
|
2198 | const elem = document.querySelector(`[id="${id}"]`);
|
2199 |
|
2200 | if (elem !== null) {
|
2201 | elem.addEventListener('click', function () {
|
2202 | window[functionName](id);
|
2203 | }, false);
|
2204 | }
|
2205 | });
|
2206 | }
|
2207 | };
|
2208 |
|
2209 |
|
2210 |
|
2211 |
|
2212 |
|
2213 |
|
2214 |
|
2215 |
|
2216 | const setLink = function (ids, linkStr, tooltip) {
|
2217 | ids.split(',').forEach(function (_id) {
|
2218 | let id = _id;
|
2219 | if (_id[0].match(/\d/)) id = 's' + id;
|
2220 |
|
2221 | if (typeof vertices[id] !== 'undefined') {
|
2222 | if (config.securityLevel !== 'loose') {
|
2223 | vertices[id].link = Object(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__["sanitizeUrl"])(linkStr);
|
2224 | } else {
|
2225 | vertices[id].link = linkStr;
|
2226 | }
|
2227 | }
|
2228 | });
|
2229 | setTooltip(ids, tooltip);
|
2230 | setClass(ids, 'clickable');
|
2231 | };
|
2232 | const getTooltip = function (id) {
|
2233 | return tooltips[id];
|
2234 | };
|
2235 |
|
2236 |
|
2237 |
|
2238 |
|
2239 |
|
2240 |
|
2241 |
|
2242 | const setClickEvent = function (ids, functionName, tooltip) {
|
2243 | ids.split(',').forEach(function (id) {
|
2244 | setClickFun(id, functionName);
|
2245 | });
|
2246 | setTooltip(ids, tooltip);
|
2247 | setClass(ids, 'clickable');
|
2248 | };
|
2249 | const bindFunctions = function (element) {
|
2250 | funs.forEach(function (fun) {
|
2251 | fun(element);
|
2252 | });
|
2253 | };
|
2254 | const getDirection = function () {
|
2255 | return direction.trim();
|
2256 | };
|
2257 |
|
2258 |
|
2259 |
|
2260 |
|
2261 |
|
2262 | const getVertices = function () {
|
2263 | return vertices;
|
2264 | };
|
2265 |
|
2266 |
|
2267 |
|
2268 |
|
2269 |
|
2270 | const getEdges = function () {
|
2271 | return edges;
|
2272 | };
|
2273 |
|
2274 |
|
2275 |
|
2276 |
|
2277 |
|
2278 | const getClasses = function () {
|
2279 | return classes;
|
2280 | };
|
2281 |
|
2282 | const setupToolTips = function (element) {
|
2283 | let tooltipElem = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('.mermaidTooltip');
|
2284 |
|
2285 | if ((tooltipElem._groups || tooltipElem)[0][0] === null) {
|
2286 | tooltipElem = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('body').append('div').attr('class', 'mermaidTooltip').style('opacity', 0);
|
2287 | }
|
2288 |
|
2289 | const svg = d3__WEBPACK_IMPORTED_MODULE_0__["select"](element).select('svg');
|
2290 | const nodes = svg.selectAll('g.node');
|
2291 | nodes.on('mouseover', function () {
|
2292 | const el = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this);
|
2293 | const title = el.attr('title');
|
2294 |
|
2295 | if (title === null) {
|
2296 | return;
|
2297 | }
|
2298 |
|
2299 | const rect = this.getBoundingClientRect();
|
2300 | tooltipElem.transition().duration(200).style('opacity', '.9');
|
2301 | tooltipElem.html(el.attr('title')).style('left', rect.left + (rect.right - rect.left) / 2 + 'px').style('top', rect.top - 14 + document.body.scrollTop + 'px');
|
2302 | el.classed('hover', true);
|
2303 | }).on('mouseout', function () {
|
2304 | tooltipElem.transition().duration(500).style('opacity', 0);
|
2305 | const el = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this);
|
2306 | el.classed('hover', false);
|
2307 | });
|
2308 | };
|
2309 |
|
2310 | funs.push(setupToolTips);
|
2311 |
|
2312 |
|
2313 |
|
2314 |
|
2315 | const clear = function () {
|
2316 | vertices = {};
|
2317 | classes = {};
|
2318 | edges = [];
|
2319 | funs = [];
|
2320 | funs.push(setupToolTips);
|
2321 | subGraphs = [];
|
2322 | subGraphLookup = {};
|
2323 | subCount = 0;
|
2324 | tooltips = [];
|
2325 | firstGraphFlag = true;
|
2326 | };
|
2327 |
|
2328 |
|
2329 |
|
2330 |
|
2331 |
|
2332 | const defaultStyle = function () {
|
2333 | return 'fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;';
|
2334 | };
|
2335 |
|
2336 |
|
2337 |
|
2338 |
|
2339 | const addSubGraph = function (_id, list, _title) {
|
2340 | let id = _id;
|
2341 | let title = _title;
|
2342 |
|
2343 | if (_id === _title && _title.match(/\s/)) {
|
2344 | id = undefined;
|
2345 | }
|
2346 |
|
2347 | function uniq(a) {
|
2348 | const prims = {
|
2349 | boolean: {},
|
2350 | number: {},
|
2351 | string: {}
|
2352 | };
|
2353 | const objs = [];
|
2354 | return a.filter(function (item) {
|
2355 | const type = typeof item;
|
2356 |
|
2357 | if (item.trim() === '') {
|
2358 | return false;
|
2359 | }
|
2360 |
|
2361 | if (type in prims) {
|
2362 | return prims[type].hasOwnProperty(item) ? false : prims[type][item] = true;
|
2363 | } else {
|
2364 | return objs.indexOf(item) >= 0 ? false : objs.push(item);
|
2365 | }
|
2366 | });
|
2367 | }
|
2368 |
|
2369 | let nodeList = [];
|
2370 | nodeList = uniq(nodeList.concat.apply(nodeList, list));
|
2371 |
|
2372 | for (let i = 0; i < nodeList.length; i++) {
|
2373 | if (nodeList[i][0].match(/\d/)) nodeList[i] = 's' + nodeList[i];
|
2374 | }
|
2375 |
|
2376 | id = id || 'subGraph' + subCount;
|
2377 | if (id[0].match(/\d/)) id = 's' + id;
|
2378 | title = title || '';
|
2379 | title = sanitize(title);
|
2380 | subCount = subCount + 1;
|
2381 | const subGraph = {
|
2382 | id: id,
|
2383 | nodes: nodeList,
|
2384 | title: title.trim(),
|
2385 | classes: []
|
2386 | };
|
2387 | subGraphs.push(subGraph);
|
2388 | subGraphLookup[id] = subGraph;
|
2389 | return id;
|
2390 | };
|
2391 |
|
2392 | const getPosForId = function (id) {
|
2393 | for (let i = 0; i < subGraphs.length; i++) {
|
2394 | if (subGraphs[i].id === id) {
|
2395 | return i;
|
2396 | }
|
2397 | }
|
2398 |
|
2399 | return -1;
|
2400 | };
|
2401 |
|
2402 | let secCount = -1;
|
2403 | const posCrossRef = [];
|
2404 |
|
2405 | const indexNodes2 = function (id, pos) {
|
2406 | const nodes = subGraphs[pos].nodes;
|
2407 | secCount = secCount + 1;
|
2408 |
|
2409 | if (secCount > 2000) {
|
2410 | return;
|
2411 | }
|
2412 |
|
2413 | posCrossRef[secCount] = pos;
|
2414 |
|
2415 | if (subGraphs[pos].id === id) {
|
2416 | return {
|
2417 | result: true,
|
2418 | count: 0
|
2419 | };
|
2420 | }
|
2421 |
|
2422 | let count = 0;
|
2423 | let posCount = 1;
|
2424 |
|
2425 | while (count < nodes.length) {
|
2426 | const childPos = getPosForId(nodes[count]);
|
2427 |
|
2428 | if (childPos >= 0) {
|
2429 | const res = indexNodes2(id, childPos);
|
2430 |
|
2431 | if (res.result) {
|
2432 | return {
|
2433 | result: true,
|
2434 | count: posCount + res.count
|
2435 | };
|
2436 | } else {
|
2437 | posCount = posCount + res.count;
|
2438 | }
|
2439 | }
|
2440 |
|
2441 | count = count + 1;
|
2442 | }
|
2443 |
|
2444 | return {
|
2445 | result: false,
|
2446 | count: posCount
|
2447 | };
|
2448 | };
|
2449 |
|
2450 | const getDepthFirstPos = function (pos) {
|
2451 | return posCrossRef[pos];
|
2452 | };
|
2453 | const indexNodes = function () {
|
2454 | secCount = -1;
|
2455 |
|
2456 | if (subGraphs.length > 0) {
|
2457 | indexNodes2('none', subGraphs.length - 1, 0);
|
2458 | }
|
2459 | };
|
2460 | const getSubGraphs = function () {
|
2461 | return subGraphs;
|
2462 | };
|
2463 | const firstGraph = () => {
|
2464 | if (firstGraphFlag) {
|
2465 | firstGraphFlag = false;
|
2466 | return true;
|
2467 | }
|
2468 |
|
2469 | return false;
|
2470 | };
|
2471 | __webpack_exports__["default"] = ({
|
2472 | addVertex,
|
2473 | addLink,
|
2474 | updateLinkInterpolate,
|
2475 | updateLink,
|
2476 | addClass,
|
2477 | setDirection,
|
2478 | setClass,
|
2479 | getTooltip,
|
2480 | setClickEvent,
|
2481 | setLink,
|
2482 | bindFunctions,
|
2483 | getDirection,
|
2484 | getVertices,
|
2485 | getEdges,
|
2486 | getClasses,
|
2487 | clear,
|
2488 | defaultStyle,
|
2489 | addSubGraph,
|
2490 | getDepthFirstPos,
|
2491 | indexNodes,
|
2492 | getSubGraphs,
|
2493 | lex: {
|
2494 | firstGraph
|
2495 | }
|
2496 | });
|
2497 |
|
2498 | }),
|
2499 |
|
2500 | "./src/diagrams/flowchart/flowRenderer.js":
|
2501 |
|
2502 |
|
2503 |
|
2504 |
|
2505 | (function(module, __webpack_exports__, __webpack_require__) {
|
2506 |
|
2507 | "use strict";
|
2508 | __webpack_require__.r(__webpack_exports__);
|
2509 | __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
|
2510 | __webpack_require__.d(__webpack_exports__, "addVertices", function() { return addVertices; });
|
2511 | __webpack_require__.d(__webpack_exports__, "addEdges", function() { return addEdges; });
|
2512 | __webpack_require__.d(__webpack_exports__, "getClasses", function() { return getClasses; });
|
2513 | __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
|
2514 | var graphlibrary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "graphlibrary");
|
2515 | var graphlibrary__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(graphlibrary__WEBPACK_IMPORTED_MODULE_0__);
|
2516 | var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "d3");
|
2517 | var d3__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_1__);
|
2518 | var _flowDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./src/diagrams/flowchart/flowDb.js");
|
2519 | var _parser_flow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./src/diagrams/flowchart/parser/flow.jison");
|
2520 | var _parser_flow__WEBPACK_IMPORTED_MODULE_3___default = __webpack_require__.n(_parser_flow__WEBPACK_IMPORTED_MODULE_3__);
|
2521 | var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./src/config.js");
|
2522 | var dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__( "dagre-d3-renderer");
|
2523 | var dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default = __webpack_require__.n(dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5__);
|
2524 | var dagre_d3_renderer_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__( "dagre-d3-renderer/lib/label/add-html-label.js");
|
2525 | var dagre_d3_renderer_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6___default = __webpack_require__.n(dagre_d3_renderer_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6__);
|
2526 | var _logger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__( "./src/logger.js");
|
2527 | var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__( "./src/utils.js");
|
2528 |
|
2529 |
|
2530 |
|
2531 |
|
2532 |
|
2533 |
|
2534 |
|
2535 |
|
2536 |
|
2537 | const conf = {};
|
2538 | const setConf = function (cnf) {
|
2539 | const keys = Object.keys(cnf);
|
2540 |
|
2541 | for (let i = 0; i < keys.length; i++) {
|
2542 | conf[keys[i]] = cnf[keys[i]];
|
2543 | }
|
2544 | };
|
2545 |
|
2546 |
|
2547 |
|
2548 |
|
2549 |
|
2550 |
|
2551 | const addVertices = function (vert, g, svgId) {
|
2552 | const svg = d3__WEBPACK_IMPORTED_MODULE_1__["select"](`[id="${svgId}"]`);
|
2553 | const keys = Object.keys(vert);
|
2554 |
|
2555 | const styleFromStyleArr = function (styleStr, arr, {
|
2556 | label
|
2557 | }) {
|
2558 | if (!label) {
|
2559 |
|
2560 | for (let i = 0; i < arr.length; i++) {
|
2561 | if (typeof arr[i] !== 'undefined') {
|
2562 | styleStr = styleStr + arr[i] + ';';
|
2563 | }
|
2564 | }
|
2565 | } else {
|
2566 | for (let i = 0; i < arr.length; i++) {
|
2567 | if (typeof arr[i] !== 'undefined') {
|
2568 | if (arr[i].match('^color:')) styleStr = styleStr + arr[i] + ';';
|
2569 | }
|
2570 | }
|
2571 | }
|
2572 |
|
2573 | return styleStr;
|
2574 | };
|
2575 |
|
2576 |
|
2577 | keys.forEach(function (id) {
|
2578 | const vertex = vert[id];
|
2579 | |
2580 |
|
2581 |
|
2582 |
|
2583 |
|
2584 | let classStr = '';
|
2585 |
|
2586 | if (vertex.classes.length > 0) {
|
2587 | classStr = vertex.classes.join(' ');
|
2588 | }
|
2589 | |
2590 |
|
2591 |
|
2592 |
|
2593 |
|
2594 |
|
2595 | let style = '';
|
2596 |
|
2597 | style = styleFromStyleArr(style, vertex.styles, {
|
2598 | label: false
|
2599 | });
|
2600 | let labelStyle = '';
|
2601 | labelStyle = styleFromStyleArr(labelStyle, vertex.styles, {
|
2602 | label: true
|
2603 | });
|
2604 |
|
2605 | let vertexText = vertex.text !== undefined ? vertex.text : vertex.id;
|
2606 |
|
2607 | let vertexNode;
|
2608 |
|
2609 | if (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels) {
|
2610 |
|
2611 | const node = {
|
2612 | label: vertexText.replace(/fa[lrsb]?:fa-[\w-]+/g, s => `<i class='${s.replace(':', ' ')}'></i>`)
|
2613 | };
|
2614 | vertexNode = dagre_d3_renderer_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6___default()(svg, node).node();
|
2615 | vertexNode.parentNode.removeChild(vertexNode);
|
2616 | } else {
|
2617 | const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');
|
2618 | const rows = vertexText.split(/<br[/]{0,1}>/);
|
2619 |
|
2620 | for (let j = 0; j < rows.length; j++) {
|
2621 | const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');
|
2622 | tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
|
2623 | tspan.setAttribute('dy', '1em');
|
2624 | tspan.setAttribute('x', '1');
|
2625 | tspan.textContent = rows[j];
|
2626 | svgLabel.appendChild(tspan);
|
2627 | }
|
2628 |
|
2629 | vertexNode = svgLabel;
|
2630 | }
|
2631 |
|
2632 |
|
2633 | if (vertex.link) {
|
2634 | const link = document.createElementNS('http://www.w3.org/2000/svg', 'a');
|
2635 | link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link);
|
2636 | link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener');
|
2637 | link.appendChild(vertexNode);
|
2638 | vertexNode = link;
|
2639 | }
|
2640 |
|
2641 | let radious = 0;
|
2642 | let _shape = '';
|
2643 |
|
2644 | switch (vertex.type) {
|
2645 | case 'round':
|
2646 | radious = 5;
|
2647 | _shape = 'rect';
|
2648 | break;
|
2649 |
|
2650 | case 'square':
|
2651 | _shape = 'rect';
|
2652 | break;
|
2653 |
|
2654 | case 'diamond':
|
2655 | _shape = 'question';
|
2656 | break;
|
2657 |
|
2658 | case 'odd':
|
2659 | _shape = 'rect_left_inv_arrow';
|
2660 | break;
|
2661 |
|
2662 | case 'lean_right':
|
2663 | _shape = 'lean_right';
|
2664 | break;
|
2665 |
|
2666 | case 'lean_left':
|
2667 | _shape = 'lean_left';
|
2668 | break;
|
2669 |
|
2670 | case 'trapezoid':
|
2671 | _shape = 'trapezoid';
|
2672 | break;
|
2673 |
|
2674 | case 'inv_trapezoid':
|
2675 | _shape = 'inv_trapezoid';
|
2676 | break;
|
2677 |
|
2678 | case 'odd_right':
|
2679 | _shape = 'rect_left_inv_arrow';
|
2680 | break;
|
2681 |
|
2682 | case 'circle':
|
2683 | _shape = 'circle';
|
2684 | break;
|
2685 |
|
2686 | case 'ellipse':
|
2687 | _shape = 'ellipse';
|
2688 | break;
|
2689 |
|
2690 | case 'group':
|
2691 | _shape = 'rect';
|
2692 | break;
|
2693 |
|
2694 | default:
|
2695 | _shape = 'rect';
|
2696 | }
|
2697 |
|
2698 |
|
2699 | g.setNode(vertex.id, {
|
2700 | labelType: 'svg',
|
2701 | labelStyle: labelStyle,
|
2702 | shape: _shape,
|
2703 | label: vertexNode,
|
2704 | rx: radious,
|
2705 | ry: radious,
|
2706 | class: classStr,
|
2707 | style: style,
|
2708 | id: vertex.id
|
2709 | });
|
2710 | });
|
2711 | };
|
2712 |
|
2713 |
|
2714 |
|
2715 |
|
2716 |
|
2717 |
|
2718 | const addEdges = function (edges, g) {
|
2719 | let cnt = 0;
|
2720 | let defaultStyle;
|
2721 |
|
2722 | if (typeof edges.defaultStyle !== 'undefined') {
|
2723 | defaultStyle = edges.defaultStyle.toString().replace(/,/g, ';');
|
2724 | }
|
2725 |
|
2726 | edges.forEach(function (edge) {
|
2727 | cnt++;
|
2728 | const edgeData = {};
|
2729 |
|
2730 | if (edge.type === 'arrow_open') {
|
2731 | edgeData.arrowhead = 'none';
|
2732 | } else {
|
2733 | edgeData.arrowhead = 'normal';
|
2734 | }
|
2735 |
|
2736 | let style = '';
|
2737 |
|
2738 | if (typeof edge.style !== 'undefined') {
|
2739 | edge.style.forEach(function (s) {
|
2740 | style = style + s + ';';
|
2741 | });
|
2742 | } else {
|
2743 | switch (edge.stroke) {
|
2744 | case 'normal':
|
2745 | style = 'fill:none';
|
2746 |
|
2747 | if (typeof defaultStyle !== 'undefined') {
|
2748 | style = defaultStyle;
|
2749 | }
|
2750 |
|
2751 | break;
|
2752 |
|
2753 | case 'dotted':
|
2754 | style = 'stroke: #333; fill:none;stroke-width:2px;stroke-dasharray:3;';
|
2755 | break;
|
2756 |
|
2757 | case 'thick':
|
2758 | style = 'stroke: #333; stroke-width: 3.5px;fill:none';
|
2759 | break;
|
2760 | }
|
2761 | }
|
2762 |
|
2763 | edgeData.style = style;
|
2764 |
|
2765 | if (typeof edge.interpolate !== 'undefined') {
|
2766 | edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_8__["interpolateToCurve"])(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]);
|
2767 | } else if (typeof edges.defaultInterpolate !== 'undefined') {
|
2768 | edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_8__["interpolateToCurve"])(edges.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]);
|
2769 | } else {
|
2770 | edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_8__["interpolateToCurve"])(conf.curve, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]);
|
2771 | }
|
2772 |
|
2773 | if (typeof edge.text === 'undefined') {
|
2774 | if (typeof edge.style !== 'undefined') {
|
2775 | edgeData.arrowheadStyle = 'fill: #333';
|
2776 | }
|
2777 | } else {
|
2778 | edgeData.arrowheadStyle = 'fill: #333';
|
2779 |
|
2780 | if (typeof edge.style === 'undefined') {
|
2781 | edgeData.labelpos = 'c';
|
2782 |
|
2783 | if (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels) {
|
2784 | edgeData.labelType = 'html';
|
2785 | edgeData.label = '<span class="edgeLabel">' + edge.text + '</span>';
|
2786 | } else {
|
2787 | edgeData.labelType = 'text';
|
2788 | edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none';
|
2789 | edgeData.label = edge.text.replace(/<br>/g, '\n');
|
2790 | }
|
2791 | } else {
|
2792 | edgeData.label = edge.text.replace(/<br>/g, '\n');
|
2793 | }
|
2794 | }
|
2795 |
|
2796 |
|
2797 | g.setEdge(edge.start, edge.end, edgeData, cnt);
|
2798 | });
|
2799 | };
|
2800 |
|
2801 |
|
2802 |
|
2803 |
|
2804 |
|
2805 | const getClasses = function (text) {
|
2806 | _logger__WEBPACK_IMPORTED_MODULE_7__["logger"].info('Extracting classes');
|
2807 | _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].clear();
|
2808 | const parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser;
|
2809 | parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"];
|
2810 |
|
2811 | parser.parse(text);
|
2812 | return _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getClasses();
|
2813 | };
|
2814 |
|
2815 |
|
2816 |
|
2817 |
|
2818 |
|
2819 |
|
2820 | const draw = function (text, id) {
|
2821 | _logger__WEBPACK_IMPORTED_MODULE_7__["logger"].info('Drawing flowchart');
|
2822 | _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].clear();
|
2823 | const parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser;
|
2824 | parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"];
|
2825 |
|
2826 | try {
|
2827 | parser.parse(text);
|
2828 | } catch (err) {
|
2829 | _logger__WEBPACK_IMPORTED_MODULE_7__["logger"].debug('Parsing failed');
|
2830 | }
|
2831 |
|
2832 |
|
2833 | let dir = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getDirection();
|
2834 |
|
2835 | if (typeof dir === 'undefined') {
|
2836 | dir = 'TD';
|
2837 | }
|
2838 |
|
2839 |
|
2840 | const g = new graphlibrary__WEBPACK_IMPORTED_MODULE_0___default.a.Graph({
|
2841 | multigraph: true,
|
2842 | compound: true
|
2843 | }).setGraph({
|
2844 | rankdir: dir,
|
2845 | marginx: 20,
|
2846 | marginy: 20
|
2847 | }).setDefaultEdgeLabel(function () {
|
2848 | return {};
|
2849 | });
|
2850 | let subG;
|
2851 | const subGraphs = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getSubGraphs();
|
2852 |
|
2853 | for (let i = subGraphs.length - 1; i >= 0; i--) {
|
2854 | subG = subGraphs[i];
|
2855 | _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].addVertex(subG.id, subG.title, 'group', undefined, subG.classes);
|
2856 | }
|
2857 |
|
2858 |
|
2859 | const vert = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getVertices();
|
2860 | const edges = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getEdges();
|
2861 | let i = 0;
|
2862 |
|
2863 | for (i = subGraphs.length - 1; i >= 0; i--) {
|
2864 | subG = subGraphs[i];
|
2865 | d3__WEBPACK_IMPORTED_MODULE_1__["selectAll"]('cluster').append('text');
|
2866 |
|
2867 | for (let j = 0; j < subG.nodes.length; j++) {
|
2868 | g.setParent(subG.nodes[j], subG.id);
|
2869 | }
|
2870 | }
|
2871 |
|
2872 | addVertices(vert, g, id);
|
2873 | addEdges(edges, g);
|
2874 |
|
2875 | const Render = dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.render;
|
2876 | const render = new Render();
|
2877 |
|
2878 | render.shapes().question = function (parent, bbox, node) {
|
2879 | const w = bbox.width;
|
2880 | const h = bbox.height;
|
2881 | const s = (w + h) * 0.9;
|
2882 | const points = [{
|
2883 | x: s / 2,
|
2884 | y: 0
|
2885 | }, {
|
2886 | x: s,
|
2887 | y: -s / 2
|
2888 | }, {
|
2889 | x: s / 2,
|
2890 | y: -s
|
2891 | }, {
|
2892 | x: 0,
|
2893 | y: -s / 2
|
2894 | }];
|
2895 | const shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
|
2896 | return d.x + ',' + d.y;
|
2897 | }).join(' ')).attr('rx', 5).attr('ry', 5).attr('transform', 'translate(' + -s / 2 + ',' + s * 2 / 4 + ')');
|
2898 |
|
2899 | node.intersect = function (point) {
|
2900 | return dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.intersect.polygon(node, points, point);
|
2901 | };
|
2902 |
|
2903 | return shapeSvg;
|
2904 | };
|
2905 |
|
2906 |
|
2907 | render.shapes().rect_left_inv_arrow = function (parent, bbox, node) {
|
2908 | const w = bbox.width;
|
2909 | const h = bbox.height;
|
2910 | const points = [{
|
2911 | x: -h / 2,
|
2912 | y: 0
|
2913 | }, {
|
2914 | x: w,
|
2915 | y: 0
|
2916 | }, {
|
2917 | x: w,
|
2918 | y: -h
|
2919 | }, {
|
2920 | x: -h / 2,
|
2921 | y: -h
|
2922 | }, {
|
2923 | x: 0,
|
2924 | y: -h / 2
|
2925 | }];
|
2926 | const shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
|
2927 | return d.x + ',' + d.y;
|
2928 | }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h * 2 / 4 + ')');
|
2929 |
|
2930 | node.intersect = function (point) {
|
2931 | return dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.intersect.polygon(node, points, point);
|
2932 | };
|
2933 |
|
2934 | return shapeSvg;
|
2935 | };
|
2936 |
|
2937 |
|
2938 | render.shapes().lean_right = function (parent, bbox, node) {
|
2939 | const w = bbox.width;
|
2940 | const h = bbox.height;
|
2941 | const points = [{
|
2942 | x: -2 * h / 6,
|
2943 | y: 0
|
2944 | }, {
|
2945 | x: w - h / 6,
|
2946 | y: 0
|
2947 | }, {
|
2948 | x: w + 2 * h / 6,
|
2949 | y: -h
|
2950 | }, {
|
2951 | x: h / 6,
|
2952 | y: -h
|
2953 | }];
|
2954 | const shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
|
2955 | return d.x + ',' + d.y;
|
2956 | }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h * 2 / 4 + ')');
|
2957 |
|
2958 | node.intersect = function (point) {
|
2959 | return dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.intersect.polygon(node, points, point);
|
2960 | };
|
2961 |
|
2962 | return shapeSvg;
|
2963 | };
|
2964 |
|
2965 |
|
2966 | render.shapes().lean_left = function (parent, bbox, node) {
|
2967 | const w = bbox.width;
|
2968 | const h = bbox.height;
|
2969 | const points = [{
|
2970 | x: 2 * h / 6,
|
2971 | y: 0
|
2972 | }, {
|
2973 | x: w + h / 6,
|
2974 | y: 0
|
2975 | }, {
|
2976 | x: w - 2 * h / 6,
|
2977 | y: -h
|
2978 | }, {
|
2979 | x: -h / 6,
|
2980 | y: -h
|
2981 | }];
|
2982 | const shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
|
2983 | return d.x + ',' + d.y;
|
2984 | }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h * 2 / 4 + ')');
|
2985 |
|
2986 | node.intersect = function (point) {
|
2987 | return dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.intersect.polygon(node, points, point);
|
2988 | };
|
2989 |
|
2990 | return shapeSvg;
|
2991 | };
|
2992 |
|
2993 |
|
2994 | render.shapes().trapezoid = function (parent, bbox, node) {
|
2995 | const w = bbox.width;
|
2996 | const h = bbox.height;
|
2997 | const points = [{
|
2998 | x: -2 * h / 6,
|
2999 | y: 0
|
3000 | }, {
|
3001 | x: w + 2 * h / 6,
|
3002 | y: 0
|
3003 | }, {
|
3004 | x: w - h / 6,
|
3005 | y: -h
|
3006 | }, {
|
3007 | x: h / 6,
|
3008 | y: -h
|
3009 | }];
|
3010 | const shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
|
3011 | return d.x + ',' + d.y;
|
3012 | }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h * 2 / 4 + ')');
|
3013 |
|
3014 | node.intersect = function (point) {
|
3015 | return dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.intersect.polygon(node, points, point);
|
3016 | };
|
3017 |
|
3018 | return shapeSvg;
|
3019 | };
|
3020 |
|
3021 |
|
3022 | render.shapes().inv_trapezoid = function (parent, bbox, node) {
|
3023 | const w = bbox.width;
|
3024 | const h = bbox.height;
|
3025 | const points = [{
|
3026 | x: h / 6,
|
3027 | y: 0
|
3028 | }, {
|
3029 | x: w - h / 6,
|
3030 | y: 0
|
3031 | }, {
|
3032 | x: w + 2 * h / 6,
|
3033 | y: -h
|
3034 | }, {
|
3035 | x: -2 * h / 6,
|
3036 | y: -h
|
3037 | }];
|
3038 | const shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
|
3039 | return d.x + ',' + d.y;
|
3040 | }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h * 2 / 4 + ')');
|
3041 |
|
3042 | node.intersect = function (point) {
|
3043 | return dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.intersect.polygon(node, points, point);
|
3044 | };
|
3045 |
|
3046 | return shapeSvg;
|
3047 | };
|
3048 |
|
3049 |
|
3050 | render.shapes().rect_right_inv_arrow = function (parent, bbox, node) {
|
3051 | const w = bbox.width;
|
3052 | const h = bbox.height;
|
3053 | const points = [{
|
3054 | x: 0,
|
3055 | y: 0
|
3056 | }, {
|
3057 | x: w + h / 2,
|
3058 | y: 0
|
3059 | }, {
|
3060 | x: w,
|
3061 | y: -h / 2
|
3062 | }, {
|
3063 | x: w + h / 2,
|
3064 | y: -h
|
3065 | }, {
|
3066 | x: 0,
|
3067 | y: -h
|
3068 | }];
|
3069 | const shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
|
3070 | return d.x + ',' + d.y;
|
3071 | }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h * 2 / 4 + ')');
|
3072 |
|
3073 | node.intersect = function (point) {
|
3074 | return dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.intersect.polygon(node, points, point);
|
3075 | };
|
3076 |
|
3077 | return shapeSvg;
|
3078 | };
|
3079 |
|
3080 |
|
3081 | render.arrows().none = function normal(parent, id, edge, type) {
|
3082 | const marker = parent.append('marker').attr('id', id).attr('viewBox', '0 0 10 10').attr('refX', 9).attr('refY', 5).attr('markerUnits', 'strokeWidth').attr('markerWidth', 8).attr('markerHeight', 6).attr('orient', 'auto');
|
3083 | const path = marker.append('path').attr('d', 'M 0 0 L 0 0 L 0 0 z');
|
3084 | dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_5___default.a.util.applyStyle(path, edge[type + 'Style']);
|
3085 | };
|
3086 |
|
3087 |
|
3088 | render.arrows().normal = function normal(parent, id, edge, type) {
|
3089 | const marker = parent.append('marker').attr('id', id).attr('viewBox', '0 0 10 10').attr('refX', 9).attr('refY', 5).attr('markerUnits', 'strokeWidth').attr('markerWidth', 8).attr('markerHeight', 6).attr('orient', 'auto');
|
3090 | marker.append('path').attr('d', 'M 0 0 L 10 5 L 0 10 z').attr('class', 'arrowheadPath').style('stroke-width', 1).style('stroke-dasharray', '1,0');
|
3091 | };
|
3092 |
|
3093 |
|
3094 | const svg = d3__WEBPACK_IMPORTED_MODULE_1__["select"](`[id="${id}"]`);
|
3095 |
|
3096 | const element = d3__WEBPACK_IMPORTED_MODULE_1__["select"]('#' + id + ' g');
|
3097 | render(element, g);
|
3098 | element.selectAll('g.node').attr('title', function () {
|
3099 | return _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getTooltip(this.id);
|
3100 | });
|
3101 | const padding = 8;
|
3102 | const width = g.maxX - g.minX + padding * 2;
|
3103 | const height = g.maxY - g.minY + padding * 2;
|
3104 | svg.attr('width', '100%');
|
3105 | svg.attr('style', `max-width: ${width}px;`);
|
3106 | svg.attr('viewBox', `0 0 ${width} ${height}`);
|
3107 | svg.select('g').attr('transform', `translate(${padding - g.minX}, ${padding - g.minY})`);
|
3108 |
|
3109 | _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].indexNodes('subGraph' + i);
|
3110 |
|
3111 | for (i = 0; i < subGraphs.length; i++) {
|
3112 | subG = subGraphs[i];
|
3113 |
|
3114 | if (subG.title !== 'undefined') {
|
3115 | const clusterRects = document.querySelectorAll('#' + id + ' #' + subG.id + ' rect');
|
3116 | const clusterEl = document.querySelectorAll('#' + id + ' #' + subG.id);
|
3117 | const xPos = clusterRects[0].x.baseVal.value;
|
3118 | const yPos = clusterRects[0].y.baseVal.value;
|
3119 | const width = clusterRects[0].width.baseVal.value;
|
3120 | const cluster = d3__WEBPACK_IMPORTED_MODULE_1__["select"](clusterEl[0]);
|
3121 | const te = cluster.select('.label');
|
3122 | te.attr('transform', `translate(${xPos + width / 2}, ${yPos + 14})`);
|
3123 | te.attr('id', id + 'Text');
|
3124 | }
|
3125 | }
|
3126 |
|
3127 |
|
3128 | if (!Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels) {
|
3129 | const labels = document.querySelectorAll('#' + id + ' .edgeLabel .label');
|
3130 |
|
3131 | for (let k = 0; k < labels.length; k++) {
|
3132 | const label = labels[k];
|
3133 |
|
3134 | const dim = label.getBBox();
|
3135 | const rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
|
3136 | rect.setAttribute('rx', 0);
|
3137 | rect.setAttribute('ry', 0);
|
3138 | rect.setAttribute('width', dim.width);
|
3139 | rect.setAttribute('height', dim.height);
|
3140 | rect.setAttribute('style', 'fill:#e8e8e8;');
|
3141 | label.insertBefore(rect, label.firstChild);
|
3142 | }
|
3143 | }
|
3144 | };
|
3145 | __webpack_exports__["default"] = ({
|
3146 | setConf,
|
3147 | addVertices,
|
3148 | addEdges,
|
3149 | getClasses,
|
3150 | draw
|
3151 | });
|
3152 |
|
3153 | }),
|
3154 |
|
3155 | "./src/diagrams/flowchart/parser/flow.jison":
|
3156 |
|
3157 |
|
3158 |
|
3159 |
|
3160 | (function(module, exports, __webpack_require__) {
|
3161 |
|
3162 | (function(process, module) {
|
3163 |
|
3164 |
|
3165 |
|
3166 |
|
3167 |
|
3168 |
|
3169 |
|
3170 |
|
3171 |
|
3172 |
|
3173 |
|
3174 |
|
3175 |
|
3176 |
|
3177 |
|
3178 |
|
3179 |
|
3180 |
|
3181 |
|
3182 |
|
3183 |
|
3184 |
|
3185 |
|
3186 |
|
3187 |
|
3188 |
|
3189 |
|
3190 |
|
3191 |
|
3192 |
|
3193 |
|
3194 |
|
3195 |
|
3196 |
|
3197 |
|
3198 |
|
3199 |
|
3200 |
|
3201 |
|
3202 |
|
3203 |
|
3204 |
|
3205 |
|
3206 |
|
3207 |
|
3208 |
|
3209 |
|
3210 |
|
3211 |
|
3212 |
|
3213 |
|
3214 |
|
3215 |
|
3216 |
|
3217 |
|
3218 |
|
3219 |
|
3220 |
|
3221 |
|
3222 |
|
3223 |
|
3224 |
|
3225 |
|
3226 |
|
3227 |
|
3228 |
|
3229 |
|
3230 |
|
3231 |
|
3232 |
|
3233 |
|
3234 |
|
3235 | var parser = (function(){
|
3236 | var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,4],$V1=[1,3],$V2=[1,5],$V3=[1,8,9,10,11,26,89,90,91,92,93,94,106,107,110,111,112,114,115,121,122,123,124,125,126],$V4=[2,2],$V5=[1,12],$V6=[1,13],$V7=[1,14],$V8=[1,15],$V9=[1,22],$Va=[1,24],$Vb=[1,25],$Vc=[1,26],$Vd=[1,27],$Ve=[1,28],$Vf=[1,40],$Vg=[1,35],$Vh=[1,37],$Vi=[1,32],$Vj=[1,36],$Vk=[1,39],$Vl=[1,43],$Vm=[1,44],$Vn=[1,45],$Vo=[1,34],$Vp=[1,38],$Vq=[1,41],$Vr=[1,42],$Vs=[1,33],$Vt=[1,50],$Vu=[1,8,9,10,11,26,30,89,90,91,92,93,94,106,107,110,111,112,114,115,121,122,123,124,125,126],$Vv=[1,54],$Vw=[1,53],$Vx=[1,55],$Vy=[8,9,11,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82],$Vz=[8,9,11,34,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82],$VA=[8,9,10,11,28,34,36,38,40,42,43,45,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,94,106,107,110,111,112,114,115,121,122,123,124,125,126],$VB=[94,106,107,110,111,112,114,115,121,122,123,124,125,126],$VC=[1,129],$VD=[1,149],$VE=[1,150],$VF=[1,151],$VG=[1,152],$VH=[1,123],$VI=[1,125],$VJ=[1,124],$VK=[1,120],$VL=[1,144],$VM=[1,145],$VN=[1,146],$VO=[1,147],$VP=[1,148],$VQ=[1,153],$VR=[1,154],$VS=[1,127],$VT=[1,126],$VU=[1,134],$VV=[1,137],$VW=[1,135],$VX=[1,136],$VY=[1,130],$VZ=[1,142],$V_=[1,141],$V$=[1,122],$V01=[1,132],$V11=[1,133],$V21=[1,138],$V31=[1,139],$V41=[1,140],$V51=[1,143],$V61=[49,83,94,106,107,110,111,112,114,115,121,122,123,124,125,126],$V71=[8,9,10,11,26,30,89,90,91,92,93,94,106,107,110,111,112,114,115,121,122,123,124,125,126],$V81=[1,171],$V91=[1,173],$Va1=[1,174],$Vb1=[8,9,10,11,12,13,26,28,29,30,37,39,41,42,44,46,50,51,53,55,57,59,61,63,65,66,67,69,71,73,83,89,90,91,92,93,94,95,98,105,106,107,110,111,112,114,115,117,121,122,123,124,125,126],$Vc1=[8,9,10,11,13,94,106,107,110,111,112,114,115,121,122,123,124,125,126],$Vd1=[10,107],$Ve1=[1,250],$Vf1=[1,254],$Vg1=[1,251],$Vh1=[1,255],$Vi1=[1,248],$Vj1=[1,245],$Vk1=[1,246],$Vl1=[1,247],$Vm1=[1,249],$Vn1=[1,252],$Vo1=[1,253],$Vp1=[8,9,11],$Vq1=[1,279],$Vr1=[8,9,11,107],$Vs1=[8,9,10,11,89,101,105,106,107,110,111,112,113,114,115];
|
3237 | var parser = {trace: function trace () { },
|
3238 | yy: {},
|
3239 | symbols_: {"error":2,"mermaidDoc":3,"graphConfig":4,"document":5,"line":6,"statement":7,"SEMI":8,"NEWLINE":9,"SPACE":10,"EOF":11,"GRAPH":12,"DIR":13,"FirstStmtSeperator":14,"ending":15,"endToken":16,"spaceList":17,"spaceListNewline":18,"verticeStatement":19,"separator":20,"styleStatement":21,"linkStyleStatement":22,"classDefStatement":23,"classStatement":24,"clickStatement":25,"subgraph":26,"text":27,"SQS":28,"SQE":29,"end":30,"link":31,"node":32,"vertex":33,"STYLE_SEPARATOR":34,"idString":35,"PS":36,"PE":37,"(-":38,"-)":39,"DIAMOND_START":40,"DIAMOND_STOP":41,"TAGEND":42,"TRAPSTART":43,"TRAPEND":44,"INVTRAPSTART":45,"INVTRAPEND":46,"linkStatement":47,"arrowText":48,"TESTSTR":49,"--":50,"ARROW_POINT":51,"START_DOUBLE_ARROW_POINT":52,"ARROW_CIRCLE":53,"START_DOUBLE_ARROW_CIRCLE":54,"ARROW_CROSS":55,"START_DOUBLE_ARROW_CROSS":56,"ARROW_OPEN":57,"-.":58,"DOTTED_ARROW_POINT":59,"START_DOUBLE_DOTTED_ARROW_POINT":60,"DOTTED_ARROW_CIRCLE":61,"START_DOUBLE_DOTTED_ARROW_CIRCLE":62,"DOTTED_ARROW_CROSS":63,"START_DOUBLE_DOTTED_ARROW_CROSS":64,"DOTTED_ARROW_OPEN":65,"==":66,"THICK_ARROW_POINT":67,"START_DOUBLE_THICK_ARROW_POINT":68,"THICK_ARROW_CIRCLE":69,"START_DOUBLE_THICK_ARROW_CIRCLE":70,"THICK_ARROW_CROSS":71,"START_DOUBLE_THICK_ARROW_CROSS":72,"THICK_ARROW_OPEN":73,"DOUBLE_ARROW_POINT":74,"DOUBLE_ARROW_CIRCLE":75,"DOUBLE_ARROW_CROSS":76,"DOUBLE_DOTTED_ARROW_POINT":77,"DOUBLE_DOTTED_ARROW_CIRCLE":78,"DOUBLE_DOTTED_ARROW_CROSS":79,"DOUBLE_THICK_ARROW_POINT":80,"DOUBLE_THICK_ARROW_CIRCLE":81,"DOUBLE_THICK_ARROW_CROSS":82,"PIPE":83,"textToken":84,"STR":85,"commentText":86,"commentToken":87,"keywords":88,"STYLE":89,"LINKSTYLE":90,"CLASSDEF":91,"CLASS":92,"CLICK":93,"DOWN":94,"UP":95,"textNoTags":96,"textNoTagsToken":97,"DEFAULT":98,"stylesOpt":99,"alphaNum":100,"HEX":101,"numList":102,"INTERPOLATE":103,"commentStatement":104,"PCT":105,"NUM":106,"COMMA":107,"style":108,"styleComponent":109,"ALPHA":110,"COLON":111,"MINUS":112,"UNIT":113,"BRKT":114,"DOT":115,"graphCodeTokens":116,"TAGSTART":117,"alphaNumToken":118,"idStringToken":119,"alphaNumStatement":120,"PUNCTUATION":121,"UNICODE_TEXT":122,"PLUS":123,"EQUALS":124,"MULT":125,"UNDERSCORE":126,"QUOTE":127,"$accept":0,"$end":1},
|
3240 | terminals_: {2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"DIR",26:"subgraph",28:"SQS",29:"SQE",30:"end",34:"STYLE_SEPARATOR",36:"PS",37:"PE",38:"(-",39:"-)",40:"DIAMOND_START",41:"DIAMOND_STOP",42:"TAGEND",43:"TRAPSTART",44:"TRAPEND",45:"INVTRAPSTART",46:"INVTRAPEND",49:"TESTSTR",50:"--",51:"ARROW_POINT",52:"START_DOUBLE_ARROW_POINT",53:"ARROW_CIRCLE",54:"START_DOUBLE_ARROW_CIRCLE",55:"ARROW_CROSS",56:"START_DOUBLE_ARROW_CROSS",57:"ARROW_OPEN",58:"-.",59:"DOTTED_ARROW_POINT",60:"START_DOUBLE_DOTTED_ARROW_POINT",61:"DOTTED_ARROW_CIRCLE",62:"START_DOUBLE_DOTTED_ARROW_CIRCLE",63:"DOTTED_ARROW_CROSS",64:"START_DOUBLE_DOTTED_ARROW_CROSS",65:"DOTTED_ARROW_OPEN",66:"==",67:"THICK_ARROW_POINT",68:"START_DOUBLE_THICK_ARROW_POINT",69:"THICK_ARROW_CIRCLE",70:"START_DOUBLE_THICK_ARROW_CIRCLE",71:"THICK_ARROW_CROSS",72:"START_DOUBLE_THICK_ARROW_CROSS",73:"THICK_ARROW_OPEN",74:"DOUBLE_ARROW_POINT",75:"DOUBLE_ARROW_CIRCLE",76:"DOUBLE_ARROW_CROSS",77:"DOUBLE_DOTTED_ARROW_POINT",78:"DOUBLE_DOTTED_ARROW_CIRCLE",79:"DOUBLE_DOTTED_ARROW_CROSS",80:"DOUBLE_THICK_ARROW_POINT",81:"DOUBLE_THICK_ARROW_CIRCLE",82:"DOUBLE_THICK_ARROW_CROSS",83:"PIPE",85:"STR",89:"STYLE",90:"LINKSTYLE",91:"CLASSDEF",92:"CLASS",93:"CLICK",94:"DOWN",95:"UP",98:"DEFAULT",101:"HEX",103:"INTERPOLATE",105:"PCT",106:"NUM",107:"COMMA",110:"ALPHA",111:"COLON",112:"MINUS",113:"UNIT",114:"BRKT",115:"DOT",117:"TAGSTART",121:"PUNCTUATION",122:"UNICODE_TEXT",123:"PLUS",124:"EQUALS",125:"MULT",126:"UNDERSCORE",127:"QUOTE"},
|
3241 | productions_: [0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,3],[15,2],[15,1],[16,1],[16,1],[16,1],[14,1],[14,1],[14,2],[18,2],[18,2],[18,1],[18,1],[17,2],[17,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[20,1],[20,1],[20,1],[19,3],[19,1],[32,1],[32,3],[33,4],[33,5],[33,6],[33,7],[33,4],[33,5],[33,4],[33,5],[33,4],[33,5],[33,4],[33,5],[33,4],[33,5],[33,4],[33,5],[33,4],[33,5],[33,4],[33,5],[33,1],[33,2],[31,2],[31,3],[31,3],[31,1],[31,3],[31,3],[31,3],[31,3],[31,3],[31,3],[31,3],[31,3],[31,3],[31,3],[31,3],[31,3],[31,3],[31,3],[31,3],[31,3],[31,3],[31,3],[31,3],[31,3],[31,3],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[48,3],[27,1],[27,2],[27,1],[86,1],[86,2],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[96,1],[96,2],[23,5],[23,5],[24,5],[25,5],[25,7],[25,5],[25,7],[21,5],[21,5],[22,5],[22,5],[22,9],[22,9],[22,7],[22,7],[104,3],[102,1],[102,3],[99,1],[99,3],[108,1],[108,2],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[109,1],[87,1],[87,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[97,1],[97,1],[97,1],[97,1],[35,1],[35,2],[100,1],[100,2],[120,1],[120,1],[120,1],[120,1],[118,1],[118,1],[118,1],[118,1],[118,1],[118,1],[118,1],[118,1],[118,1],[118,1],[118,1],[118,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1]],
|
3242 | performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
|
3243 |
|
3244 |
|
3245 | var $0 = $$.length - 1;
|
3246 | switch (yystate) {
|
3247 | case 2:
|
3248 | this.$ = [];
|
3249 | break;
|
3250 | case 3:
|
3251 |
|
3252 | if($$[$0] !== []){
|
3253 | $$[$0-1].push($$[$0]);
|
3254 | }
|
3255 | this.$=$$[$0-1];
|
3256 | break;
|
3257 | case 4: case 111: case 113: case 114: case 127: case 177: case 179: case 180:
|
3258 | this.$=$$[$0];
|
3259 | break;
|
3260 | case 11:
|
3261 | yy.setDirection($$[$0-1]);this.$ = $$[$0-1];
|
3262 | break;
|
3263 | case 26:
|
3264 | this.$=$$[$0-1]
|
3265 | break;
|
3266 | case 27: case 28: case 29: case 30: case 31:
|
3267 | this.$=[];
|
3268 | break;
|
3269 | case 32:
|
3270 | this.$=yy.addSubGraph($$[$0-6],$$[$0-1],$$[$0-4]);
|
3271 | break;
|
3272 | case 33:
|
3273 | this.$=yy.addSubGraph($$[$0-3],$$[$0-1],$$[$0-3]);
|
3274 | break;
|
3275 | case 34:
|
3276 | this.$=yy.addSubGraph(undefined,$$[$0-1],undefined);
|
3277 | break;
|
3278 | case 38:
|
3279 | yy.addLink($$[$0-2][0],$$[$0][0],$$[$0-1]); this.$ = $$[$0].concat($$[$0-2])
|
3280 | break;
|
3281 | case 39:
|
3282 | this.$ = $$[$0]
|
3283 | break;
|
3284 | case 40:
|
3285 | this.$ = [$$[$0]];
|
3286 | break;
|
3287 | case 41:
|
3288 | this.$ = [$$[$0-2]];yy.setClass($$[$0-2],$$[$0])
|
3289 | break;
|
3290 | case 42:
|
3291 | this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'square');
|
3292 | break;
|
3293 | case 43:
|
3294 | this.$ = $$[$0-4];yy.addVertex($$[$0-4],$$[$0-2],'square');
|
3295 | break;
|
3296 | case 44:
|
3297 | this.$ = $$[$0-5];yy.addVertex($$[$0-5],$$[$0-2],'circle');
|
3298 | break;
|
3299 | case 45:
|
3300 | this.$ = $$[$0-6];yy.addVertex($$[$0-6],$$[$0-3],'circle');
|
3301 | break;
|
3302 | case 46:
|
3303 | this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'ellipse');
|
3304 | break;
|
3305 | case 47:
|
3306 | this.$ = $$[$0-4];yy.addVertex($$[$0-4],$$[$0-2],'ellipse');
|
3307 | break;
|
3308 | case 48:
|
3309 | this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'round');
|
3310 | break;
|
3311 | case 49:
|
3312 | this.$ = $$[$0-4];yy.addVertex($$[$0-4],$$[$0-2],'round');
|
3313 | break;
|
3314 | case 50:
|
3315 | this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'diamond');
|
3316 | break;
|
3317 | case 51:
|
3318 | this.$ = $$[$0-4];yy.addVertex($$[$0-4],$$[$0-2],'diamond');
|
3319 | break;
|
3320 | case 52:
|
3321 | this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'odd');
|
3322 | break;
|
3323 | case 53:
|
3324 | this.$ = $$[$0-4];yy.addVertex($$[$0-4],$$[$0-2],'odd');
|
3325 | break;
|
3326 | case 54:
|
3327 | this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'trapezoid');
|
3328 | break;
|
3329 | case 55:
|
3330 | this.$ = $$[$0-4];yy.addVertex($$[$0-4],$$[$0-2],'trapezoid');
|
3331 | break;
|
3332 | case 56:
|
3333 | this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'inv_trapezoid');
|
3334 | break;
|
3335 | case 57:
|
3336 | this.$ = $$[$0-4];yy.addVertex($$[$0-4],$$[$0-2],'inv_trapezoid');
|
3337 | break;
|
3338 | case 58:
|
3339 | this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'lean_right');
|
3340 | break;
|
3341 | case 59:
|
3342 | this.$ = $$[$0-4];yy.addVertex($$[$0-4],$$[$0-2],'lean_right');
|
3343 | break;
|
3344 | case 60:
|
3345 | this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'lean_left');
|
3346 | break;
|
3347 | case 61:
|
3348 | this.$ = $$[$0-4];yy.addVertex($$[$0-4],$$[$0-2],'lean_left');
|
3349 | break;
|
3350 | case 62:
|
3351 | this.$ = $$[$0];yy.addVertex($$[$0]);
|
3352 | break;
|
3353 | case 63:
|
3354 | this.$ = $$[$0-1];yy.addVertex($$[$0-1]);
|
3355 | break;
|
3356 | case 64:
|
3357 | $$[$0-1].text = $$[$0];this.$ = $$[$0-1];
|
3358 | break;
|
3359 | case 65: case 66:
|
3360 | $$[$0-2].text = $$[$0-1];this.$ = $$[$0-2];
|
3361 | break;
|
3362 | case 67:
|
3363 | this.$ = $$[$0];
|
3364 | break;
|
3365 | case 68:
|
3366 | this.$ = {"type":"arrow","stroke":"normal","text":$$[$0-1]};
|
3367 | break;
|
3368 | case 69:
|
3369 | this.$ = {"type":"double_arrow_point","stroke":"normal","text":$$[$0-1]};
|
3370 | break;
|
3371 | case 70:
|
3372 | this.$ = {"type":"arrow_circle","stroke":"normal","text":$$[$0-1]};
|
3373 | break;
|
3374 | case 71:
|
3375 | this.$ = {"type":"double_arrow_circle","stroke":"normal","text":$$[$0-1]};
|
3376 | break;
|
3377 | case 72:
|
3378 | this.$ = {"type":"arrow_cross","stroke":"normal","text":$$[$0-1]};
|
3379 | break;
|
3380 | case 73:
|
3381 | this.$ = {"type":"double_arrow_cross","stroke":"normal","text":$$[$0-1]};
|
3382 | break;
|
3383 | case 74:
|
3384 | this.$ = {"type":"arrow_open","stroke":"normal","text":$$[$0-1]};
|
3385 | break;
|
3386 | case 75:
|
3387 | this.$ = {"type":"arrow","stroke":"dotted","text":$$[$0-1]};
|
3388 | break;
|
3389 | case 76:
|
3390 | this.$ = {"type":"double_arrow_point","stroke":"dotted","text":$$[$0-1]};
|
3391 | break;
|
3392 | case 77:
|
3393 | this.$ = {"type":"arrow_circle","stroke":"dotted","text":$$[$0-1]};
|
3394 | break;
|
3395 | case 78:
|
3396 | this.$ = {"type":"double_arrow_circle","stroke":"dotted","text":$$[$0-1]};
|
3397 | break;
|
3398 | case 79:
|
3399 | this.$ = {"type":"arrow_cross","stroke":"dotted","text":$$[$0-1]};
|
3400 | break;
|
3401 | case 80:
|
3402 | this.$ = {"type":"double_arrow_cross","stroke":"dotted","text":$$[$0-1]};
|
3403 | break;
|
3404 | case 81:
|
3405 | this.$ = {"type":"arrow_open","stroke":"dotted","text":$$[$0-1]};
|
3406 | break;
|
3407 | case 82:
|
3408 | this.$ = {"type":"arrow","stroke":"thick","text":$$[$0-1]};
|
3409 | break;
|
3410 | case 83:
|
3411 | this.$ = {"type":"double_arrow_point","stroke":"thick","text":$$[$0-1]};
|
3412 | break;
|
3413 | case 84:
|
3414 | this.$ = {"type":"arrow_circle","stroke":"thick","text":$$[$0-1]};
|
3415 | break;
|
3416 | case 85:
|
3417 | this.$ = {"type":"double_arrow_circle","stroke":"thick","text":$$[$0-1]};
|
3418 | break;
|
3419 | case 86:
|
3420 | this.$ = {"type":"arrow_cross","stroke":"thick","text":$$[$0-1]};
|
3421 | break;
|
3422 | case 87:
|
3423 | this.$ = {"type":"double_arrow_cross","stroke":"thick","text":$$[$0-1]};
|
3424 | break;
|
3425 | case 88:
|
3426 | this.$ = {"type":"arrow_open","stroke":"thick","text":$$[$0-1]};
|
3427 | break;
|
3428 | case 89:
|
3429 | this.$ = {"type":"arrow","stroke":"normal"};
|
3430 | break;
|
3431 | case 90:
|
3432 | this.$ = {"type":"double_arrow_point","stroke":"normal"};
|
3433 | break;
|
3434 | case 91:
|
3435 | this.$ = {"type":"arrow_circle","stroke":"normal"};
|
3436 | break;
|
3437 | case 92:
|
3438 | this.$ = {"type":"double_arrow_circle","stroke":"normal"};
|
3439 | break;
|
3440 | case 93:
|
3441 | this.$ = {"type":"arrow_cross","stroke":"normal"};
|
3442 | break;
|
3443 | case 94:
|
3444 | this.$ = {"type":"double_arrow_cross","stroke":"normal"};
|
3445 | break;
|
3446 | case 95:
|
3447 | this.$ = {"type":"arrow_open","stroke":"normal"};
|
3448 | break;
|
3449 | case 96:
|
3450 | this.$ = {"type":"arrow","stroke":"dotted"};
|
3451 | break;
|
3452 | case 97:
|
3453 | this.$ = {"type":"double_arrow_point","stroke":"dotted"};
|
3454 | break;
|
3455 | case 98:
|
3456 | this.$ = {"type":"arrow_circle","stroke":"dotted"};
|
3457 | break;
|
3458 | case 99:
|
3459 | this.$ = {"type":"double_arrow_circle","stroke":"dotted"};
|
3460 | break;
|
3461 | case 100:
|
3462 | this.$ = {"type":"arrow_cross","stroke":"dotted"};
|
3463 | break;
|
3464 | case 101:
|
3465 | this.$ = {"type":"double_arrow_cross","stroke":"dotted"};
|
3466 | break;
|
3467 | case 102:
|
3468 | this.$ = {"type":"arrow_open","stroke":"dotted"};
|
3469 | break;
|
3470 | case 103:
|
3471 | this.$ = {"type":"arrow","stroke":"thick"};
|
3472 | break;
|
3473 | case 104:
|
3474 | this.$ = {"type":"double_arrow_point","stroke":"thick"};
|
3475 | break;
|
3476 | case 105:
|
3477 | this.$ = {"type":"arrow_circle","stroke":"thick"};
|
3478 | break;
|
3479 | case 106:
|
3480 | this.$ = {"type":"double_arrow_circle","stroke":"thick"};
|
3481 | break;
|
3482 | case 107:
|
3483 | this.$ = {"type":"arrow_cross","stroke":"thick"};
|
3484 | break;
|
3485 | case 108:
|
3486 | this.$ = {"type":"double_arrow_cross","stroke":"thick"};
|
3487 | break;
|
3488 | case 109:
|
3489 | this.$ = {"type":"arrow_open","stroke":"thick"};
|
3490 | break;
|
3491 | case 110:
|
3492 | this.$ = $$[$0-1];
|
3493 | break;
|
3494 | case 112: case 115: case 128: case 178:
|
3495 | this.$=$$[$0-1]+''+$$[$0];
|
3496 | break;
|
3497 | case 129: case 130:
|
3498 | this.$ = $$[$0-4];yy.addClass($$[$0-2],$$[$0]);
|
3499 | break;
|
3500 | case 131:
|
3501 | this.$ = $$[$0-4];yy.setClass($$[$0-2], $$[$0]);
|
3502 | break;
|
3503 | case 132:
|
3504 | this.$ = $$[$0-4];yy.setClickEvent($$[$0-2], $$[$0], undefined);
|
3505 | break;
|
3506 | case 133:
|
3507 | this.$ = $$[$0-6];yy.setClickEvent($$[$0-4], $$[$0-2], $$[$0]) ;
|
3508 | break;
|
3509 | case 134:
|
3510 | this.$ = $$[$0-4];yy.setLink($$[$0-2], $$[$0], undefined);
|
3511 | break;
|
3512 | case 135:
|
3513 | this.$ = $$[$0-6];yy.setLink($$[$0-4], $$[$0-2], $$[$0] );
|
3514 | break;
|
3515 | case 136:
|
3516 | this.$ = $$[$0-4];yy.addVertex($$[$0-2],undefined,undefined,$$[$0]);
|
3517 | break;
|
3518 | case 137: case 139:
|
3519 | this.$ = $$[$0-4];yy.updateLink($$[$0-2],$$[$0]);
|
3520 | break;
|
3521 | case 138:
|
3522 | this.$ = $$[$0-4];yy.updateLink([$$[$0-2]],$$[$0]);
|
3523 | break;
|
3524 | case 140:
|
3525 | this.$ = $$[$0-8];yy.updateLinkInterpolate([$$[$0-6]],$$[$0-2]);yy.updateLink([$$[$0-6]],$$[$0]);
|
3526 | break;
|
3527 | case 141:
|
3528 | this.$ = $$[$0-8];yy.updateLinkInterpolate($$[$0-6],$$[$0-2]);yy.updateLink($$[$0-6],$$[$0]);
|
3529 | break;
|
3530 | case 142:
|
3531 | this.$ = $$[$0-6];yy.updateLinkInterpolate([$$[$0-4]],$$[$0]);
|
3532 | break;
|
3533 | case 143:
|
3534 | this.$ = $$[$0-6];yy.updateLinkInterpolate($$[$0-4],$$[$0]);
|
3535 | break;
|
3536 | case 145: case 147:
|
3537 | this.$ = [$$[$0]]
|
3538 | break;
|
3539 | case 146: case 148:
|
3540 | $$[$0-2].push($$[$0]);this.$ = $$[$0-2];
|
3541 | break;
|
3542 | case 150:
|
3543 | this.$ = $$[$0-1] + $$[$0];
|
3544 | break;
|
3545 | case 175:
|
3546 | this.$=$$[$0]
|
3547 | break;
|
3548 | case 176:
|
3549 | this.$=$$[$0-1]+''+$$[$0]
|
3550 | break;
|
3551 | case 181:
|
3552 | this.$='v';
|
3553 | break;
|
3554 | case 182:
|
3555 | this.$='-';
|
3556 | break;
|
3557 | }
|
3558 | },
|
3559 | table: [{3:1,4:2,9:$V0,10:$V1,12:$V2},{1:[3]},o($V3,$V4,{5:6}),{4:7,9:$V0,10:$V1,12:$V2},{4:8,9:$V0,10:$V1,12:$V2},{13:[1,9]},{1:[2,1],6:10,7:11,8:$V5,9:$V6,10:$V7,11:$V8,19:16,21:17,22:18,23:19,24:20,25:21,26:$V9,32:23,33:29,35:30,89:$Va,90:$Vb,91:$Vc,92:$Vd,93:$Ve,94:$Vf,106:$Vg,107:$Vh,110:$Vi,111:$Vj,112:$Vk,114:$Vl,115:$Vm,119:31,121:$Vn,122:$Vo,123:$Vp,124:$Vq,125:$Vr,126:$Vs},o($V3,[2,9]),o($V3,[2,10]),{8:[1,47],9:[1,48],10:$Vt,14:46,17:49},o($Vu,[2,3]),o($Vu,[2,4]),o($Vu,[2,5]),o($Vu,[2,6]),o($Vu,[2,7]),o($Vu,[2,8]),{8:$Vv,9:$Vw,11:$Vx,20:51,31:52,47:56,50:[1,57],51:[1,69],52:[1,58],53:[1,71],54:[1,59],55:[1,73],56:[1,60],57:[1,75],58:[1,61],59:[1,76],60:[1,62],61:[1,78],62:[1,63],63:[1,80],64:[1,64],65:[1,82],66:[1,65],67:[1,83],68:[1,66],69:[1,85],70:[1,67],71:[1,87],72:[1,68],73:[1,89],74:[1,70],75:[1,72],76:[1,74],77:[1,77],78:[1,79],79:[1,81],80:[1,84],81:[1,86],82:[1,88]},{8:$Vv,9:$Vw,11:$Vx,20:90},{8:$Vv,9:$Vw,11:$Vx,20:91},{8:$Vv,9:$Vw,11:$Vx,20:92},{8:$Vv,9:$Vw,11:$Vx,20:93},{8:$Vv,9:$Vw,11:$Vx,20:94},{8:$Vv,9:$Vw,10:[1,95],11:$Vx,20:96},o($Vy,[2,39]),{10:[1,97]},{10:[1,98]},{10:[1,99]},{10:[1,100]},{10:[1,101]},o($Vy,[2,40],{34:[1,102]}),o($Vz,[2,62],{17:110,119:111,10:$Vt,28:[1,103],36:[1,104],38:[1,105],40:[1,106],42:[1,107],43:[1,108],45:[1,109],94:$Vf,106:$Vg,107:$Vh,110:$Vi,111:$Vj,112:$Vk,114:$Vl,115:$Vm,121:$Vn,122:$Vo,123:$Vp,124:$Vq,125:$Vr,126:$Vs}),o($VA,[2,175]),o($VA,[2,195]),o($VA,[2,196]),o($VA,[2,197]),o($VA,[2,198]),o($VA,[2,199]),o($VA,[2,200]),o($VA,[2,201]),o($VA,[2,202]),o($VA,[2,203]),o($VA,[2,204]),o($VA,[2,205]),o($VA,[2,206]),o($VA,[2,207]),o($VA,[2,208]),o($V3,[2,11]),o($V3,[2,17]),o($V3,[2,18]),{9:[1,112]},o($Vz,[2,25],{17:113,10:$Vt}),o($Vu,[2,26]),{32:114,33:29,35:30,94:$Vf,106:$Vg,107:$Vh,110:$Vi,111:$Vj,112:$Vk,114:$Vl,115:$Vm,119:31,121:$Vn,122:$Vo,123:$Vp,124:$Vq,125:$Vr,126:$Vs},o($Vu,[2,35]),o($Vu,[2,36]),o($Vu,[2,37]),o($VB,[2,67],{48:115,49:[1,116],83:[1,117]}),{10:$VC,12:$VD,13:$VE,26:$VF,27:118,30:$VG,42:$VH,50:$VI,66:$VJ,84:119,85:$VK,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,27:155,30:$VG,42:$VH,50:$VI,66:$VJ,84:119,85:$VK,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,27:156,30:$VG,42:$VH,50:$VI,66:$VJ,84:119,85:$VK,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,27:157,30:$VG,42:$VH,50:$VI,66:$VJ,84:119,85:$VK,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,27:158,30:$VG,42:$VH,50:$VI,66:$VJ,84:119,85:$VK,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,27:159,30:$VG,42:$VH,50:$VI,66:$VJ,84:119,85:$VK,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,27:160,30:$VG,42:$VH,50:$VI,66:$VJ,84:119,85:$VK,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,27:161,30:$VG,42:$VH,50:$VI,66:$VJ,84:119,85:$VK,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,27:162,30:$VG,42:$VH,50:$VI,66:$VJ,84:119,85:$VK,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,27:163,30:$VG,42:$VH,50:$VI,66:$VJ,84:119,85:$VK,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,27:164,30:$VG,42:$VH,50:$VI,66:$VJ,84:119,85:$VK,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,27:165,30:$VG,42:$VH,50:$VI,66:$VJ,84:119,85:$VK,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},o($V61,[2,89]),o($V61,[2,90]),o($V61,[2,91]),o($V61,[2,92]),o($V61,[2,93]),o($V61,[2,94]),o($V61,[2,95]),o($V61,[2,96]),o($V61,[2,97]),o($V61,[2,98]),o($V61,[2,99]),o($V61,[2,100]),o($V61,[2,101]),o($V61,[2,102]),o($V61,[2,103]),o($V61,[2,104]),o($V61,[2,105]),o($V61,[2,106]),o($V61,[2,107]),o($V61,[2,108]),o($V61,[2,109]),o($Vu,[2,27]),o($Vu,[2,28]),o($Vu,[2,29]),o($Vu,[2,30]),o($Vu,[2,31]),{10:$VC,12:$VD,13:$VE,26:$VF,27:166,30:$VG,42:$VH,50:$VI,66:$VJ,84:119,85:$VK,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},o($V71,$V4,{5:167}),{13:$V81,94:$V91,100:168,101:[1,169],106:$VU,107:$VV,110:$VW,111:$VX,112:$Va1,114:$VZ,115:$V_,118:172,120:170,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{98:[1,175],102:176,106:[1,177]},{13:$V81,94:$V91,98:[1,178],100:179,106:$VU,107:$VV,110:$VW,111:$VX,112:$Va1,114:$VZ,115:$V_,118:172,120:170,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{13:$V81,94:$V91,100:180,106:$VU,107:$VV,110:$VW,111:$VX,112:$Va1,114:$VZ,115:$V_,118:172,120:170,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{13:$V81,94:$V91,100:181,106:$VU,107:$VV,110:$VW,111:$VX,112:$Va1,114:$VZ,115:$V_,118:172,120:170,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{35:182,94:$Vf,106:$Vg,107:$Vh,110:$Vi,111:$Vj,112:$Vk,114:$Vl,115:$Vm,119:31,121:$Vn,122:$Vo,123:$Vp,124:$Vq,125:$Vr,126:$Vs},{10:$VC,12:$VD,13:$VE,26:$VF,27:183,30:$VG,42:$VH,50:$VI,66:$VJ,84:119,85:$VK,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,27:185,30:$VG,36:[1,184],42:$VH,50:$VI,66:$VJ,84:119,85:$VK,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,27:186,30:$VG,42:$VH,50:$VI,66:$VJ,84:119,85:$VK,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,27:187,30:$VG,42:$VH,50:$VI,66:$VJ,84:119,85:$VK,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,27:188,30:$VG,42:$VH,50:$VI,66:$VJ,84:119,85:$VK,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,27:189,30:$VG,42:$VH,50:$VI,66:$VJ,84:119,85:$VK,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,27:190,30:$VG,42:$VH,50:$VI,66:$VJ,84:119,85:$VK,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},o($Vz,[2,63]),o($VA,[2,176]),o($V3,[2,19]),o($Vz,[2,24]),o($Vy,[2,38]),o($VB,[2,64],{10:[1,191]}),{10:[1,192]},{10:$VC,12:$VD,13:$VE,26:$VF,27:193,30:$VG,42:$VH,50:$VI,66:$VJ,84:119,85:$VK,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,30:$VG,42:$VH,50:$VI,51:[1,194],53:[1,195],55:[1,196],57:[1,197],66:$VJ,84:198,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},o($Vb1,[2,111]),o($Vb1,[2,113]),o($Vb1,[2,164]),o($Vb1,[2,165]),o($Vb1,[2,166]),o($Vb1,[2,167]),o($Vb1,[2,168]),o($Vb1,[2,169]),o($Vb1,[2,170]),o($Vb1,[2,171]),o($Vb1,[2,172]),o($Vb1,[2,173]),o($Vb1,[2,174]),o($Vb1,[2,183]),o($Vb1,[2,184]),o($Vb1,[2,185]),o($Vb1,[2,186]),o($Vb1,[2,187]),o($Vb1,[2,188]),o($Vb1,[2,189]),o($Vb1,[2,190]),o($Vb1,[2,191]),o($Vb1,[2,192]),o($Vb1,[2,193]),o($Vb1,[2,194]),o($Vb1,[2,116]),o($Vb1,[2,117]),o($Vb1,[2,118]),o($Vb1,[2,119]),o($Vb1,[2,120]),o($Vb1,[2,121]),o($Vb1,[2,122]),o($Vb1,[2,123]),o($Vb1,[2,124]),o($Vb1,[2,125]),o($Vb1,[2,126]),{10:$VC,12:$VD,13:$VE,26:$VF,30:$VG,42:$VH,50:$VI,51:[1,199],66:$VJ,84:198,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,30:$VG,42:$VH,50:$VI,53:[1,200],66:$VJ,84:198,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,30:$VG,42:$VH,50:$VI,55:[1,201],66:$VJ,84:198,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,30:$VG,42:$VH,50:$VI,59:[1,202],61:[1,203],63:[1,204],65:[1,205],66:$VJ,84:198,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,30:$VG,42:$VH,50:$VI,59:[1,206],66:$VJ,84:198,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,30:$VG,42:$VH,50:$VI,61:[1,207],66:$VJ,84:198,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,30:$VG,42:$VH,50:$VI,63:[1,208],66:$VJ,84:198,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,30:$VG,42:$VH,50:$VI,66:$VJ,67:[1,209],69:[1,210],71:[1,211],73:[1,212],84:198,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,30:$VG,42:$VH,50:$VI,66:$VJ,67:[1,213],84:198,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,30:$VG,42:$VH,50:$VI,66:$VJ,69:[1,214],84:198,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,30:$VG,42:$VH,50:$VI,66:$VJ,71:[1,215],84:198,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{8:$Vv,9:$Vw,10:$VC,11:$Vx,12:$VD,13:$VE,20:217,26:$VF,28:[1,216],30:$VG,42:$VH,50:$VI,66:$VJ,84:198,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{6:10,7:11,8:$V5,9:$V6,10:$V7,11:$V8,19:16,21:17,22:18,23:19,24:20,25:21,26:$V9,30:[1,218],32:23,33:29,35:30,89:$Va,90:$Vb,91:$Vc,92:$Vd,93:$Ve,94:$Vf,106:$Vg,107:$Vh,110:$Vi,111:$Vj,112:$Vk,114:$Vl,115:$Vm,119:31,121:$Vn,122:$Vo,123:$Vp,124:$Vq,125:$Vr,126:$Vs},{10:[1,219],13:$V81,94:$V91,106:$VU,107:$VV,110:$VW,111:$VX,112:$Va1,114:$VZ,115:$V_,118:172,120:220,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:[1,221]},o($Vc1,[2,177]),o($Vc1,[2,179]),o($Vc1,[2,180]),o($Vc1,[2,181]),o($Vc1,[2,182]),{10:[1,222]},{10:[1,223],107:[1,224]},o($Vd1,[2,145]),{10:[1,225]},{10:[1,226],13:$V81,94:$V91,106:$VU,107:$VV,110:$VW,111:$VX,112:$Va1,114:$VZ,115:$V_,118:172,120:220,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:[1,227],13:$V81,94:$V91,106:$VU,107:$VV,110:$VW,111:$VX,112:$Va1,114:$VZ,115:$V_,118:172,120:220,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:[1,228],13:$V81,94:$V91,106:$VU,107:$VV,110:$VW,111:$VX,112:$Va1,114:$VZ,115:$V_,118:172,120:220,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},o($Vy,[2,41],{119:111,94:$Vf,106:$Vg,107:$Vh,110:$Vi,111:$Vj,112:$Vk,114:$Vl,115:$Vm,121:$Vn,122:$Vo,123:$Vp,124:$Vq,125:$Vr,126:$Vs}),{10:$VC,12:$VD,13:$VE,26:$VF,29:[1,229],30:$VG,42:$VH,50:$VI,66:$VJ,84:198,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,27:230,30:$VG,42:$VH,50:$VI,66:$VJ,84:119,85:$VK,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,30:$VG,37:[1,231],42:$VH,50:$VI,66:$VJ,84:198,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,30:$VG,39:[1,232],42:$VH,50:$VI,66:$VJ,84:198,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,30:$VG,41:[1,233],42:$VH,50:$VI,66:$VJ,84:198,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,29:[1,234],30:$VG,42:$VH,50:$VI,66:$VJ,84:198,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,30:$VG,42:$VH,44:[1,235],46:[1,236],50:$VI,66:$VJ,84:198,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{10:$VC,12:$VD,13:$VE,26:$VF,30:$VG,42:$VH,44:[1,238],46:[1,237],50:$VI,66:$VJ,84:198,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},o($VB,[2,66]),o($VB,[2,65]),{10:$VC,12:$VD,13:$VE,26:$VF,30:$VG,42:$VH,50:$VI,66:$VJ,83:[1,239],84:198,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},o($VB,[2,68]),o($VB,[2,70]),o($VB,[2,72]),o($VB,[2,74]),o($Vb1,[2,112]),o($VB,[2,69]),o($VB,[2,71]),o($VB,[2,73]),o($VB,[2,75]),o($VB,[2,77]),o($VB,[2,79]),o($VB,[2,81]),o($VB,[2,76]),o($VB,[2,78]),o($VB,[2,80]),o($VB,[2,82]),o($VB,[2,84]),o($VB,[2,86]),o($VB,[2,88]),o($VB,[2,83]),o($VB,[2,85]),o($VB,[2,87]),{10:$VC,12:$VD,13:$VE,26:$VF,27:240,30:$VG,42:$VH,50:$VI,66:$VJ,84:119,85:$VK,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},o($V71,$V4,{5:241}),o($Vu,[2,34]),{10:$Ve1,89:$Vf1,99:242,101:$Vg1,105:$Vh1,106:$Vi1,108:243,109:244,110:$Vj1,111:$Vk1,112:$Vl1,113:$Vm1,114:$Vn1,115:$Vo1},o($Vc1,[2,178]),{10:$Ve1,89:$Vf1,99:256,101:$Vg1,105:$Vh1,106:$Vi1,108:243,109:244,110:$Vj1,111:$Vk1,112:$Vl1,113:$Vm1,114:$Vn1,115:$Vo1},{10:$Ve1,89:$Vf1,99:257,101:$Vg1,103:[1,258],105:$Vh1,106:$Vi1,108:243,109:244,110:$Vj1,111:$Vk1,112:$Vl1,113:$Vm1,114:$Vn1,115:$Vo1},{10:$Ve1,89:$Vf1,99:259,101:$Vg1,103:[1,260],105:$Vh1,106:$Vi1,108:243,109:244,110:$Vj1,111:$Vk1,112:$Vl1,113:$Vm1,114:$Vn1,115:$Vo1},{106:[1,261]},{10:$Ve1,89:$Vf1,99:262,101:$Vg1,105:$Vh1,106:$Vi1,108:243,109:244,110:$Vj1,111:$Vk1,112:$Vl1,113:$Vm1,114:$Vn1,115:$Vo1},{10:$Ve1,89:$Vf1,99:263,101:$Vg1,105:$Vh1,106:$Vi1,108:243,109:244,110:$Vj1,111:$Vk1,112:$Vl1,113:$Vm1,114:$Vn1,115:$Vo1},{13:$V81,94:$V91,100:264,106:$VU,107:$VV,110:$VW,111:$VX,112:$Va1,114:$VZ,115:$V_,118:172,120:170,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{13:$V81,85:[1,266],94:$V91,100:265,106:$VU,107:$VV,110:$VW,111:$VX,112:$Va1,114:$VZ,115:$V_,118:172,120:170,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},o($Vz,[2,42],{17:267,10:$Vt}),{10:$VC,12:$VD,13:$VE,26:$VF,30:$VG,37:[1,268],42:$VH,50:$VI,66:$VJ,84:198,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},o($Vz,[2,48],{17:269,10:$Vt}),o($Vz,[2,46],{17:270,10:$Vt}),o($Vz,[2,50],{17:271,10:$Vt}),o($Vz,[2,52],{17:272,10:$Vt}),o($Vz,[2,54],{17:273,10:$Vt}),o($Vz,[2,58],{17:274,10:$Vt}),o($Vz,[2,56],{17:275,10:$Vt}),o($Vz,[2,60],{17:276,10:$Vt}),o([10,94,106,107,110,111,112,114,115,121,122,123,124,125,126],[2,110]),{10:$VC,12:$VD,13:$VE,26:$VF,29:[1,277],30:$VG,42:$VH,50:$VI,66:$VJ,84:198,88:131,89:$VL,90:$VM,91:$VN,92:$VO,93:$VP,94:$VQ,95:$VR,97:121,98:$VS,105:$VT,106:$VU,107:$VV,110:$VW,111:$VX,112:$VY,114:$VZ,115:$V_,117:$V$,118:128,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{6:10,7:11,8:$V5,9:$V6,10:$V7,11:$V8,19:16,21:17,22:18,23:19,24:20,25:21,26:$V9,30:[1,278],32:23,33:29,35:30,89:$Va,90:$Vb,91:$Vc,92:$Vd,93:$Ve,94:$Vf,106:$Vg,107:$Vh,110:$Vi,111:$Vj,112:$Vk,114:$Vl,115:$Vm,119:31,121:$Vn,122:$Vo,123:$Vp,124:$Vq,125:$Vr,126:$Vs},o($Vp1,[2,136],{107:$Vq1}),o($Vr1,[2,147],{109:280,10:$Ve1,89:$Vf1,101:$Vg1,105:$Vh1,106:$Vi1,110:$Vj1,111:$Vk1,112:$Vl1,113:$Vm1,114:$Vn1,115:$Vo1}),o($Vs1,[2,149]),o($Vs1,[2,151]),o($Vs1,[2,152]),o($Vs1,[2,153]),o($Vs1,[2,154]),o($Vs1,[2,155]),o($Vs1,[2,156]),o($Vs1,[2,157]),o($Vs1,[2,158]),o($Vs1,[2,159]),o($Vs1,[2,160]),o($Vs1,[2,161]),o($Vp1,[2,137],{107:$Vq1}),o($Vp1,[2,138],{107:$Vq1}),{10:[1,281]},o($Vp1,[2,139],{107:$Vq1}),{10:[1,282]},o($Vd1,[2,146]),o($Vp1,[2,129],{107:$Vq1}),o($Vp1,[2,130],{107:$Vq1}),o($Vp1,[2,131],{118:172,120:220,13:$V81,94:$V91,106:$VU,107:$VV,110:$VW,111:$VX,112:$Va1,114:$VZ,115:$V_,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51}),o($Vp1,[2,132],{118:172,120:220,10:[1,283],13:$V81,94:$V91,106:$VU,107:$VV,110:$VW,111:$VX,112:$Va1,114:$VZ,115:$V_,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51}),o($Vp1,[2,134],{10:[1,284]}),o($Vz,[2,43]),{37:[1,285]},o($Vz,[2,49]),o($Vz,[2,47]),o($Vz,[2,51]),o($Vz,[2,53]),o($Vz,[2,55]),o($Vz,[2,59]),o($Vz,[2,57]),o($Vz,[2,61]),{8:$Vv,9:$Vw,11:$Vx,20:286},o($Vu,[2,33]),{10:$Ve1,89:$Vf1,101:$Vg1,105:$Vh1,106:$Vi1,108:287,109:244,110:$Vj1,111:$Vk1,112:$Vl1,113:$Vm1,114:$Vn1,115:$Vo1},o($Vs1,[2,150]),{13:$V81,94:$V91,100:288,106:$VU,107:$VV,110:$VW,111:$VX,112:$Va1,114:$VZ,115:$V_,118:172,120:170,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{13:$V81,94:$V91,100:289,106:$VU,107:$VV,110:$VW,111:$VX,112:$Va1,114:$VZ,115:$V_,118:172,120:170,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51},{85:[1,290]},{85:[1,291]},o($Vz,[2,44],{17:292,10:$Vt}),o($V71,$V4,{5:293}),o($Vr1,[2,148],{109:280,10:$Ve1,89:$Vf1,101:$Vg1,105:$Vh1,106:$Vi1,110:$Vj1,111:$Vk1,112:$Vl1,113:$Vm1,114:$Vn1,115:$Vo1}),o($Vp1,[2,142],{118:172,120:220,10:[1,294],13:$V81,94:$V91,106:$VU,107:$VV,110:$VW,111:$VX,112:$Va1,114:$VZ,115:$V_,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51}),o($Vp1,[2,143],{118:172,120:220,10:[1,295],13:$V81,94:$V91,106:$VU,107:$VV,110:$VW,111:$VX,112:$Va1,114:$VZ,115:$V_,121:$V01,122:$V11,123:$V21,124:$V31,125:$V41,126:$V51}),o($Vp1,[2,133]),o($Vp1,[2,135]),o($Vz,[2,45]),{6:10,7:11,8:$V5,9:$V6,10:$V7,11:$V8,19:16,21:17,22:18,23:19,24:20,25:21,26:$V9,30:[1,296],32:23,33:29,35:30,89:$Va,90:$Vb,91:$Vc,92:$Vd,93:$Ve,94:$Vf,106:$Vg,107:$Vh,110:$Vi,111:$Vj,112:$Vk,114:$Vl,115:$Vm,119:31,121:$Vn,122:$Vo,123:$Vp,124:$Vq,125:$Vr,126:$Vs},{10:$Ve1,89:$Vf1,99:297,101:$Vg1,105:$Vh1,106:$Vi1,108:243,109:244,110:$Vj1,111:$Vk1,112:$Vl1,113:$Vm1,114:$Vn1,115:$Vo1},{10:$Ve1,89:$Vf1,99:298,101:$Vg1,105:$Vh1,106:$Vi1,108:243,109:244,110:$Vj1,111:$Vk1,112:$Vl1,113:$Vm1,114:$Vn1,115:$Vo1},o($Vu,[2,32]),o($Vp1,[2,140],{107:$Vq1}),o($Vp1,[2,141],{107:$Vq1})],
|
3560 | defaultActions: {},
|
3561 | parseError: function parseError (str, hash) {
|
3562 | if (hash.recoverable) {
|
3563 | this.trace(str);
|
3564 | } else {
|
3565 | var error = new Error(str);
|
3566 | error.hash = hash;
|
3567 | throw error;
|
3568 | }
|
3569 | },
|
3570 | parse: function parse(input) {
|
3571 | var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
|
3572 | var args = lstack.slice.call(arguments, 1);
|
3573 | var lexer = Object.create(this.lexer);
|
3574 | var sharedState = { yy: {} };
|
3575 | for (var k in this.yy) {
|
3576 | if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
3577 | sharedState.yy[k] = this.yy[k];
|
3578 | }
|
3579 | }
|
3580 | lexer.setInput(input, sharedState.yy);
|
3581 | sharedState.yy.lexer = lexer;
|
3582 | sharedState.yy.parser = this;
|
3583 | if (typeof lexer.yylloc == 'undefined') {
|
3584 | lexer.yylloc = {};
|
3585 | }
|
3586 | var yyloc = lexer.yylloc;
|
3587 | lstack.push(yyloc);
|
3588 | var ranges = lexer.options && lexer.options.ranges;
|
3589 | if (typeof sharedState.yy.parseError === 'function') {
|
3590 | this.parseError = sharedState.yy.parseError;
|
3591 | } else {
|
3592 | this.parseError = Object.getPrototypeOf(this).parseError;
|
3593 | }
|
3594 | function popStack(n) {
|
3595 | stack.length = stack.length - 2 * n;
|
3596 | vstack.length = vstack.length - n;
|
3597 | lstack.length = lstack.length - n;
|
3598 | }
|
3599 | function lex() {
|
3600 | var token;
|
3601 | token = tstack.pop() || lexer.lex() || EOF;
|
3602 | if (typeof token !== 'number') {
|
3603 | if (token instanceof Array) {
|
3604 | tstack = token;
|
3605 | token = tstack.pop();
|
3606 | }
|
3607 | token = self.symbols_[token] || token;
|
3608 | }
|
3609 | return token;
|
3610 | }
|
3611 | var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
|
3612 | while (true) {
|
3613 | state = stack[stack.length - 1];
|
3614 | if (this.defaultActions[state]) {
|
3615 | action = this.defaultActions[state];
|
3616 | } else {
|
3617 | if (symbol === null || typeof symbol == 'undefined') {
|
3618 | symbol = lex();
|
3619 | }
|
3620 | action = table[state] && table[state][symbol];
|
3621 | }
|
3622 | if (typeof action === 'undefined' || !action.length || !action[0]) {
|
3623 | var errStr = '';
|
3624 | expected = [];
|
3625 | for (p in table[state]) {
|
3626 | if (this.terminals_[p] && p > TERROR) {
|
3627 | expected.push('\'' + this.terminals_[p] + '\'');
|
3628 | }
|
3629 | }
|
3630 | if (lexer.showPosition) {
|
3631 | errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
|
3632 | } else {
|
3633 | errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
|
3634 | }
|
3635 | this.parseError(errStr, {
|
3636 | text: lexer.match,
|
3637 | token: this.terminals_[symbol] || symbol,
|
3638 | line: lexer.yylineno,
|
3639 | loc: yyloc,
|
3640 | expected: expected
|
3641 | });
|
3642 | }
|
3643 | if (action[0] instanceof Array && action.length > 1) {
|
3644 | throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
|
3645 | }
|
3646 | switch (action[0]) {
|
3647 | case 1:
|
3648 | stack.push(symbol);
|
3649 | vstack.push(lexer.yytext);
|
3650 | lstack.push(lexer.yylloc);
|
3651 | stack.push(action[1]);
|
3652 | symbol = null;
|
3653 | if (!preErrorSymbol) {
|
3654 | yyleng = lexer.yyleng;
|
3655 | yytext = lexer.yytext;
|
3656 | yylineno = lexer.yylineno;
|
3657 | yyloc = lexer.yylloc;
|
3658 | if (recovering > 0) {
|
3659 | recovering--;
|
3660 | }
|
3661 | } else {
|
3662 | symbol = preErrorSymbol;
|
3663 | preErrorSymbol = null;
|
3664 | }
|
3665 | break;
|
3666 | case 2:
|
3667 | len = this.productions_[action[1]][1];
|
3668 | yyval.$ = vstack[vstack.length - len];
|
3669 | yyval._$ = {
|
3670 | first_line: lstack[lstack.length - (len || 1)].first_line,
|
3671 | last_line: lstack[lstack.length - 1].last_line,
|
3672 | first_column: lstack[lstack.length - (len || 1)].first_column,
|
3673 | last_column: lstack[lstack.length - 1].last_column
|
3674 | };
|
3675 | if (ranges) {
|
3676 | yyval._$.range = [
|
3677 | lstack[lstack.length - (len || 1)].range[0],
|
3678 | lstack[lstack.length - 1].range[1]
|
3679 | ];
|
3680 | }
|
3681 | r = this.performAction.apply(yyval, [
|
3682 | yytext,
|
3683 | yyleng,
|
3684 | yylineno,
|
3685 | sharedState.yy,
|
3686 | action[1],
|
3687 | vstack,
|
3688 | lstack
|
3689 | ].concat(args));
|
3690 | if (typeof r !== 'undefined') {
|
3691 | return r;
|
3692 | }
|
3693 | if (len) {
|
3694 | stack = stack.slice(0, -1 * len * 2);
|
3695 | vstack = vstack.slice(0, -1 * len);
|
3696 | lstack = lstack.slice(0, -1 * len);
|
3697 | }
|
3698 | stack.push(this.productions_[action[1]][0]);
|
3699 | vstack.push(yyval.$);
|
3700 | lstack.push(yyval._$);
|
3701 | newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
3702 | stack.push(newState);
|
3703 | break;
|
3704 | case 3:
|
3705 | return true;
|
3706 | }
|
3707 | }
|
3708 | return true;
|
3709 | }};
|
3710 |
|
3711 |
|
3712 | var lexer = (function(){
|
3713 | var lexer = ({
|
3714 |
|
3715 | EOF:1,
|
3716 |
|
3717 | parseError:function parseError(str, hash) {
|
3718 | if (this.yy.parser) {
|
3719 | this.yy.parser.parseError(str, hash);
|
3720 | } else {
|
3721 | throw new Error(str);
|
3722 | }
|
3723 | },
|
3724 |
|
3725 |
|
3726 | setInput:function (input, yy) {
|
3727 | this.yy = yy || this.yy || {};
|
3728 | this._input = input;
|
3729 | this._more = this._backtrack = this.done = false;
|
3730 | this.yylineno = this.yyleng = 0;
|
3731 | this.yytext = this.matched = this.match = '';
|
3732 | this.conditionStack = ['INITIAL'];
|
3733 | this.yylloc = {
|
3734 | first_line: 1,
|
3735 | first_column: 0,
|
3736 | last_line: 1,
|
3737 | last_column: 0
|
3738 | };
|
3739 | if (this.options.ranges) {
|
3740 | this.yylloc.range = [0,0];
|
3741 | }
|
3742 | this.offset = 0;
|
3743 | return this;
|
3744 | },
|
3745 |
|
3746 |
|
3747 | input:function () {
|
3748 | var ch = this._input[0];
|
3749 | this.yytext += ch;
|
3750 | this.yyleng++;
|
3751 | this.offset++;
|
3752 | this.match += ch;
|
3753 | this.matched += ch;
|
3754 | var lines = ch.match(/(?:\r\n?|\n).*/g);
|
3755 | if (lines) {
|
3756 | this.yylineno++;
|
3757 | this.yylloc.last_line++;
|
3758 | } else {
|
3759 | this.yylloc.last_column++;
|
3760 | }
|
3761 | if (this.options.ranges) {
|
3762 | this.yylloc.range[1]++;
|
3763 | }
|
3764 |
|
3765 | this._input = this._input.slice(1);
|
3766 | return ch;
|
3767 | },
|
3768 |
|
3769 |
|
3770 | unput:function (ch) {
|
3771 | var len = ch.length;
|
3772 | var lines = ch.split(/(?:\r\n?|\n)/g);
|
3773 |
|
3774 | this._input = ch + this._input;
|
3775 | this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
3776 |
|
3777 | this.offset -= len;
|
3778 | var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
3779 | this.match = this.match.substr(0, this.match.length - 1);
|
3780 | this.matched = this.matched.substr(0, this.matched.length - 1);
|
3781 |
|
3782 | if (lines.length - 1) {
|
3783 | this.yylineno -= lines.length - 1;
|
3784 | }
|
3785 | var r = this.yylloc.range;
|
3786 |
|
3787 | this.yylloc = {
|
3788 | first_line: this.yylloc.first_line,
|
3789 | last_line: this.yylineno + 1,
|
3790 | first_column: this.yylloc.first_column,
|
3791 | last_column: lines ?
|
3792 | (lines.length === oldLines.length ? this.yylloc.first_column : 0)
|
3793 | + oldLines[oldLines.length - lines.length].length - lines[0].length :
|
3794 | this.yylloc.first_column - len
|
3795 | };
|
3796 |
|
3797 | if (this.options.ranges) {
|
3798 | this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
3799 | }
|
3800 | this.yyleng = this.yytext.length;
|
3801 | return this;
|
3802 | },
|
3803 |
|
3804 |
|
3805 | more:function () {
|
3806 | this._more = true;
|
3807 | return this;
|
3808 | },
|
3809 |
|
3810 |
|
3811 | reject:function () {
|
3812 | if (this.options.backtrack_lexer) {
|
3813 | this._backtrack = true;
|
3814 | } else {
|
3815 | return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), {
|
3816 | text: "",
|
3817 | token: null,
|
3818 | line: this.yylineno
|
3819 | });
|
3820 |
|
3821 | }
|
3822 | return this;
|
3823 | },
|
3824 |
|
3825 |
|
3826 | less:function (n) {
|
3827 | this.unput(this.match.slice(n));
|
3828 | },
|
3829 |
|
3830 |
|
3831 | pastInput:function () {
|
3832 | var past = this.matched.substr(0, this.matched.length - this.match.length);
|
3833 | return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
|
3834 | },
|
3835 |
|
3836 |
|
3837 | upcomingInput:function () {
|
3838 | var next = this.match;
|
3839 | if (next.length < 20) {
|
3840 | next += this._input.substr(0, 20-next.length);
|
3841 | }
|
3842 | return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
|
3843 | },
|
3844 |
|
3845 |
|
3846 | showPosition:function () {
|
3847 | var pre = this.pastInput();
|
3848 | var c = new Array(pre.length + 1).join("-");
|
3849 | return pre + this.upcomingInput() + "\n" + c + "^";
|
3850 | },
|
3851 |
|
3852 |
|
3853 | test_match:function(match, indexed_rule) {
|
3854 | var token,
|
3855 | lines,
|
3856 | backup;
|
3857 |
|
3858 | if (this.options.backtrack_lexer) {
|
3859 |
|
3860 | backup = {
|
3861 | yylineno: this.yylineno,
|
3862 | yylloc: {
|
3863 | first_line: this.yylloc.first_line,
|
3864 | last_line: this.last_line,
|
3865 | first_column: this.yylloc.first_column,
|
3866 | last_column: this.yylloc.last_column
|
3867 | },
|
3868 | yytext: this.yytext,
|
3869 | match: this.match,
|
3870 | matches: this.matches,
|
3871 | matched: this.matched,
|
3872 | yyleng: this.yyleng,
|
3873 | offset: this.offset,
|
3874 | _more: this._more,
|
3875 | _input: this._input,
|
3876 | yy: this.yy,
|
3877 | conditionStack: this.conditionStack.slice(0),
|
3878 | done: this.done
|
3879 | };
|
3880 | if (this.options.ranges) {
|
3881 | backup.yylloc.range = this.yylloc.range.slice(0);
|
3882 | }
|
3883 | }
|
3884 |
|
3885 | lines = match[0].match(/(?:\r\n?|\n).*/g);
|
3886 | if (lines) {
|
3887 | this.yylineno += lines.length;
|
3888 | }
|
3889 | this.yylloc = {
|
3890 | first_line: this.yylloc.last_line,
|
3891 | last_line: this.yylineno + 1,
|
3892 | first_column: this.yylloc.last_column,
|
3893 | last_column: lines ?
|
3894 | lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
|
3895 | this.yylloc.last_column + match[0].length
|
3896 | };
|
3897 | this.yytext += match[0];
|
3898 | this.match += match[0];
|
3899 | this.matches = match;
|
3900 | this.yyleng = this.yytext.length;
|
3901 | if (this.options.ranges) {
|
3902 | this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
3903 | }
|
3904 | this._more = false;
|
3905 | this._backtrack = false;
|
3906 | this._input = this._input.slice(match[0].length);
|
3907 | this.matched += match[0];
|
3908 | token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
3909 | if (this.done && this._input) {
|
3910 | this.done = false;
|
3911 | }
|
3912 | if (token) {
|
3913 | return token;
|
3914 | } else if (this._backtrack) {
|
3915 |
|
3916 | for (var k in backup) {
|
3917 | this[k] = backup[k];
|
3918 | }
|
3919 | return false;
|
3920 | }
|
3921 | return false;
|
3922 | },
|
3923 |
|
3924 |
|
3925 | next:function () {
|
3926 | if (this.done) {
|
3927 | return this.EOF;
|
3928 | }
|
3929 | if (!this._input) {
|
3930 | this.done = true;
|
3931 | }
|
3932 |
|
3933 | var token,
|
3934 | match,
|
3935 | tempMatch,
|
3936 | index;
|
3937 | if (!this._more) {
|
3938 | this.yytext = '';
|
3939 | this.match = '';
|
3940 | }
|
3941 | var rules = this._currentRules();
|
3942 | for (var i = 0; i < rules.length; i++) {
|
3943 | tempMatch = this._input.match(this.rules[rules[i]]);
|
3944 | if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
3945 | match = tempMatch;
|
3946 | index = i;
|
3947 | if (this.options.backtrack_lexer) {
|
3948 | token = this.test_match(tempMatch, rules[i]);
|
3949 | if (token !== false) {
|
3950 | return token;
|
3951 | } else if (this._backtrack) {
|
3952 | match = false;
|
3953 | continue;
|
3954 | } else {
|
3955 |
|
3956 | return false;
|
3957 | }
|
3958 | } else if (!this.options.flex) {
|
3959 | break;
|
3960 | }
|
3961 | }
|
3962 | }
|
3963 | if (match) {
|
3964 | token = this.test_match(match, rules[index]);
|
3965 | if (token !== false) {
|
3966 | return token;
|
3967 | }
|
3968 |
|
3969 | return false;
|
3970 | }
|
3971 | if (this._input === "") {
|
3972 | return this.EOF;
|
3973 | } else {
|
3974 | return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
|
3975 | text: "",
|
3976 | token: null,
|
3977 | line: this.yylineno
|
3978 | });
|
3979 | }
|
3980 | },
|
3981 |
|
3982 |
|
3983 | lex:function lex () {
|
3984 | var r = this.next();
|
3985 | if (r) {
|
3986 | return r;
|
3987 | } else {
|
3988 | return this.lex();
|
3989 | }
|
3990 | },
|
3991 |
|
3992 |
|
3993 | begin:function begin (condition) {
|
3994 | this.conditionStack.push(condition);
|
3995 | },
|
3996 |
|
3997 |
|
3998 | popState:function popState () {
|
3999 | var n = this.conditionStack.length - 1;
|
4000 | if (n > 0) {
|
4001 | return this.conditionStack.pop();
|
4002 | } else {
|
4003 | return this.conditionStack[0];
|
4004 | }
|
4005 | },
|
4006 |
|
4007 |
|
4008 | _currentRules:function _currentRules () {
|
4009 | if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
4010 | return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
4011 | } else {
|
4012 | return this.conditions["INITIAL"].rules;
|
4013 | }
|
4014 | },
|
4015 |
|
4016 |
|
4017 | topState:function topState (n) {
|
4018 | n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
4019 | if (n >= 0) {
|
4020 | return this.conditionStack[n];
|
4021 | } else {
|
4022 | return "INITIAL";
|
4023 | }
|
4024 | },
|
4025 |
|
4026 |
|
4027 | pushState:function pushState (condition) {
|
4028 | this.begin(condition);
|
4029 | },
|
4030 |
|
4031 |
|
4032 | stateStackSize:function stateStackSize() {
|
4033 | return this.conditionStack.length;
|
4034 | },
|
4035 | options: {},
|
4036 | performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
|
4037 | var YYSTATE=YY_START;
|
4038 | switch($avoiding_name_collisions) {
|
4039 | case 0:
|
4040 | break;
|
4041 | case 1:this.begin("string");
|
4042 | break;
|
4043 | case 2:this.popState();
|
4044 | break;
|
4045 | case 3:return "STR";
|
4046 | break;
|
4047 | case 4:return 89;
|
4048 | break;
|
4049 | case 5:return 98;
|
4050 | break;
|
4051 | case 6:return 90;
|
4052 | break;
|
4053 | case 7:return 103;
|
4054 | break;
|
4055 | case 8:return 91;
|
4056 | break;
|
4057 | case 9:return 92;
|
4058 | break;
|
4059 | case 10:return 93;
|
4060 | break;
|
4061 | case 11:if(yy.lex.firstGraph()){this.begin("dir");} return 12;
|
4062 | break;
|
4063 | case 12:return 26;
|
4064 | break;
|
4065 | case 13:return 30;
|
4066 | break;
|
4067 | case 14: this.popState(); return 13;
|
4068 | break;
|
4069 | case 15: this.popState(); return 13;
|
4070 | break;
|
4071 | case 16: this.popState(); return 13;
|
4072 | break;
|
4073 | case 17: this.popState(); return 13;
|
4074 | break;
|
4075 | case 18: this.popState(); return 13;
|
4076 | break;
|
4077 | case 19: this.popState(); return 13;
|
4078 | break;
|
4079 | case 20: this.popState(); return 13;
|
4080 | break;
|
4081 | case 21: this.popState(); return 13;
|
4082 | break;
|
4083 | case 22: this.popState(); return 13;
|
4084 | break;
|
4085 | case 23: this.popState(); return 13;
|
4086 | break;
|
4087 | case 24: return 106;
|
4088 | break;
|
4089 | case 25:return 114;
|
4090 | break;
|
4091 | case 26:return 34;
|
4092 | break;
|
4093 | case 27:return 111;
|
4094 | break;
|
4095 | case 28:return 8;
|
4096 | break;
|
4097 | case 29:return 107;
|
4098 | break;
|
4099 | case 30:return 125;
|
4100 | break;
|
4101 | case 31:return 55;
|
4102 | break;
|
4103 | case 32:return 51;
|
4104 | break;
|
4105 | case 33:return 74;
|
4106 | break;
|
4107 | case 34:return 76;
|
4108 | break;
|
4109 | case 35:return 75;
|
4110 | break;
|
4111 | case 36:return 78;
|
4112 | break;
|
4113 | case 37:return 80;
|
4114 | break;
|
4115 | case 38:return 81;
|
4116 | break;
|
4117 | case 39:return 82;
|
4118 | break;
|
4119 | case 40:return 79;
|
4120 | break;
|
4121 | case 41:return 79;
|
4122 | break;
|
4123 | case 42:return 77;
|
4124 | break;
|
4125 | case 43:return 77;
|
4126 | break;
|
4127 | case 44:return 78;
|
4128 | break;
|
4129 | case 45:return 53;
|
4130 | break;
|
4131 | case 46:return 57;
|
4132 | break;
|
4133 | case 47:return 63;
|
4134 | break;
|
4135 | case 48:return 59;
|
4136 | break;
|
4137 | case 49:return 61;
|
4138 | break;
|
4139 | case 50:return 65;
|
4140 | break;
|
4141 | case 51:return 63;
|
4142 | break;
|
4143 | case 52:return 59;
|
4144 | break;
|
4145 | case 53:return 61;
|
4146 | break;
|
4147 | case 54:return 65;
|
4148 | break;
|
4149 | case 55:return 71;
|
4150 | break;
|
4151 | case 56:return 67;
|
4152 | break;
|
4153 | case 57:return 69;
|
4154 | break;
|
4155 | case 58:return 73;
|
4156 | break;
|
4157 | case 59:return 52;
|
4158 | break;
|
4159 | case 60:return 56;
|
4160 | break;
|
4161 | case 61:return 54;
|
4162 | break;
|
4163 | case 62:return 60;
|
4164 | break;
|
4165 | case 63:return 64;
|
4166 | break;
|
4167 | case 64:return 62;
|
4168 | break;
|
4169 | case 65:return 68;
|
4170 | break;
|
4171 | case 66:return 72;
|
4172 | break;
|
4173 | case 67:return 70;
|
4174 | break;
|
4175 | case 68:return 50;
|
4176 | break;
|
4177 | case 69:return 58;
|
4178 | break;
|
4179 | case 70:return 66;
|
4180 | break;
|
4181 | case 71:return 38;
|
4182 | break;
|
4183 | case 72:return 39;
|
4184 | break;
|
4185 | case 73:return 112;
|
4186 | break;
|
4187 | case 74:return 115;
|
4188 | break;
|
4189 | case 75:return 126;
|
4190 | break;
|
4191 | case 76:return 123;
|
4192 | break;
|
4193 | case 77:return 105;
|
4194 | break;
|
4195 | case 78:return 124;
|
4196 | break;
|
4197 | case 79:return 124;
|
4198 | break;
|
4199 | case 80:return 117;
|
4200 | break;
|
4201 | case 81:return 42;
|
4202 | break;
|
4203 | case 82:return 95;
|
4204 | break;
|
4205 | case 83:return 94;
|
4206 | break;
|
4207 | case 84:return 110;
|
4208 | break;
|
4209 | case 85:return 44;
|
4210 | break;
|
4211 | case 86:return 43;
|
4212 | break;
|
4213 | case 87:return 46;
|
4214 | break;
|
4215 | case 88:return 45;
|
4216 | break;
|
4217 | case 89:return 121;
|
4218 | break;
|
4219 | case 90:return 122;
|
4220 | break;
|
4221 | case 91:return 83;
|
4222 | break;
|
4223 | case 92:return 36;
|
4224 | break;
|
4225 | case 93:return 37;
|
4226 | break;
|
4227 | case 94:return 28;
|
4228 | break;
|
4229 | case 95:return 29;
|
4230 | break;
|
4231 | case 96:return 40
|
4232 | break;
|
4233 | case 97:return 41
|
4234 | break;
|
4235 | case 98:return 127;
|
4236 | break;
|
4237 | case 99:return 9;
|
4238 | break;
|
4239 | case 100:return 10;
|
4240 | break;
|
4241 | case 101:return 11;
|
4242 | break;
|
4243 | }
|
4244 | },
|
4245 | rules: [/^(?:%%[^\n]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*--[x]\s*)/,/^(?:\s*-->\s*)/,/^(?:\s*<-->\s*)/,/^(?:\s*[x]--[x]\s*)/,/^(?:\s*[o]--[o]\s*)/,/^(?:\s*[o]\.-[o]\s*)/,/^(?:\s*<==>\s*)/,/^(?:\s*[o]==[o]\s*)/,/^(?:\s*[x]==[x]\s*)/,/^(?:\s*[x].-[x]\s*)/,/^(?:\s*[x]-\.-[x]\s*)/,/^(?:\s*<\.->\s*)/,/^(?:\s*<-\.->\s*)/,/^(?:\s*[o]-\.-[o]\s*)/,/^(?:\s*--[o]\s*)/,/^(?:\s*---\s*)/,/^(?:\s*-\.-[x]\s*)/,/^(?:\s*-\.->\s*)/,/^(?:\s*-\.-[o]\s*)/,/^(?:\s*-\.-\s*)/,/^(?:\s*.-[x]\s*)/,/^(?:\s*\.->\s*)/,/^(?:\s*\.-[o]\s*)/,/^(?:\s*\.-\s*)/,/^(?:\s*==[x]\s*)/,/^(?:\s*==>\s*)/,/^(?:\s*==[o]\s*)/,/^(?:\s*==[\=]\s*)/,/^(?:\s*<--\s*)/,/^(?:\s*[x]--\s*)/,/^(?:\s*[o]--\s*)/,/^(?:\s*<-\.\s*)/,/^(?:\s*[x]-\.\s*)/,/^(?:\s*[o]-\.\s*)/,/^(?:\s*<==\s*)/,/^(?:\s*[x]==\s*)/,/^(?:\s*[o]==\s*)/,/^(?:\s*--\s*)/,/^(?:\s*-\.\s*)/,/^(?:\s*==\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_\/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:\n+)/,/^(?:\s)/,/^(?:$)/],
|
4246 | conditions: {"dir":{"rules":[14,15,16,17,18,19,20,21,22,23],"inclusive":false},"string":{"rules":[2,3],"inclusive":false},"INITIAL":{"rules":[0,1,4,5,6,7,8,9,10,11,12,13,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101],"inclusive":true}}
|
4247 | });
|
4248 | return lexer;
|
4249 | })();
|
4250 | parser.lexer = lexer;
|
4251 | function Parser () {
|
4252 | this.yy = {};
|
4253 | }
|
4254 | Parser.prototype = parser;parser.Parser = Parser;
|
4255 | return new Parser;
|
4256 | })();
|
4257 |
|
4258 |
|
4259 | if (true) {
|
4260 | exports.parser = parser;
|
4261 | exports.Parser = parser.Parser;
|
4262 | exports.parse = function () { return parser.parse.apply(parser, arguments); };
|
4263 | exports.main = function commonjsMain (args) {
|
4264 | if (!args[1]) {
|
4265 | console.log('Usage: '+args[0]+' FILE');
|
4266 | process.exit(1);
|
4267 | }
|
4268 | var source = __webpack_require__( "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__( "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
|
4269 | return exports.parser.parse(source);
|
4270 | };
|
4271 | if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
|
4272 | exports.main(process.argv.slice(1));
|
4273 | }
|
4274 | }
|
4275 | }.call(this, __webpack_require__( "./node_modules/process/browser.js"), __webpack_require__( "./node_modules/webpack/buildin/module.js")(module)))
|
4276 |
|
4277 | }),
|
4278 |
|
4279 | "./src/diagrams/gantt/ganttDb.js":
|
4280 |
|
4281 |
|
4282 |
|
4283 |
|
4284 | (function(module, __webpack_exports__, __webpack_require__) {
|
4285 |
|
4286 | "use strict";
|
4287 | __webpack_require__.r(__webpack_exports__);
|
4288 | __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
|
4289 | __webpack_require__.d(__webpack_exports__, "setAxisFormat", function() { return setAxisFormat; });
|
4290 | __webpack_require__.d(__webpack_exports__, "getAxisFormat", function() { return getAxisFormat; });
|
4291 | __webpack_require__.d(__webpack_exports__, "setDateFormat", function() { return setDateFormat; });
|
4292 | __webpack_require__.d(__webpack_exports__, "enableInclusiveEndDates", function() { return enableInclusiveEndDates; });
|
4293 | __webpack_require__.d(__webpack_exports__, "endDatesAreInclusive", function() { return endDatesAreInclusive; });
|
4294 | __webpack_require__.d(__webpack_exports__, "getDateFormat", function() { return getDateFormat; });
|
4295 | __webpack_require__.d(__webpack_exports__, "setExcludes", function() { return setExcludes; });
|
4296 | __webpack_require__.d(__webpack_exports__, "getExcludes", function() { return getExcludes; });
|
4297 | __webpack_require__.d(__webpack_exports__, "setTitle", function() { return setTitle; });
|
4298 | __webpack_require__.d(__webpack_exports__, "getTitle", function() { return getTitle; });
|
4299 | __webpack_require__.d(__webpack_exports__, "addSection", function() { return addSection; });
|
4300 | __webpack_require__.d(__webpack_exports__, "getSections", function() { return getSections; });
|
4301 | __webpack_require__.d(__webpack_exports__, "getTasks", function() { return getTasks; });
|
4302 | __webpack_require__.d(__webpack_exports__, "addTask", function() { return addTask; });
|
4303 | __webpack_require__.d(__webpack_exports__, "findTaskById", function() { return findTaskById; });
|
4304 | __webpack_require__.d(__webpack_exports__, "addTaskOrg", function() { return addTaskOrg; });
|
4305 | __webpack_require__.d(__webpack_exports__, "setLink", function() { return setLink; });
|
4306 | __webpack_require__.d(__webpack_exports__, "setClass", function() { return setClass; });
|
4307 | __webpack_require__.d(__webpack_exports__, "setClickEvent", function() { return setClickEvent; });
|
4308 | __webpack_require__.d(__webpack_exports__, "bindFunctions", function() { return bindFunctions; });
|
4309 | var moment_mini__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "moment-mini");
|
4310 | var moment_mini__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(moment_mini__WEBPACK_IMPORTED_MODULE_0__);
|
4311 | var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "@braintree/sanitize-url");
|
4312 | var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__);
|
4313 | var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./src/logger.js");
|
4314 | var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./src/config.js");
|
4315 |
|
4316 |
|
4317 |
|
4318 |
|
4319 | const config = Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])();
|
4320 | let dateFormat = '';
|
4321 | let axisFormat = '';
|
4322 | let excludes = [];
|
4323 | let title = '';
|
4324 | let sections = [];
|
4325 | let tasks = [];
|
4326 | let currentSection = '';
|
4327 | const tags = ['active', 'done', 'crit', 'milestone'];
|
4328 | let funs = [];
|
4329 | let inclusiveEndDates = false;
|
4330 | const clear = function () {
|
4331 | sections = [];
|
4332 | tasks = [];
|
4333 | currentSection = '';
|
4334 | funs = [];
|
4335 | title = '';
|
4336 | taskCnt = 0;
|
4337 | lastTask = undefined;
|
4338 | lastTaskID = undefined;
|
4339 | rawTasks = [];
|
4340 | dateFormat = '';
|
4341 | axisFormat = '';
|
4342 | excludes = [];
|
4343 | inclusiveEndDates = false;
|
4344 | };
|
4345 | const setAxisFormat = function (txt) {
|
4346 | axisFormat = txt;
|
4347 | };
|
4348 | const getAxisFormat = function () {
|
4349 | return axisFormat;
|
4350 | };
|
4351 | const setDateFormat = function (txt) {
|
4352 | dateFormat = txt;
|
4353 | };
|
4354 | const enableInclusiveEndDates = function () {
|
4355 | inclusiveEndDates = true;
|
4356 | };
|
4357 | const endDatesAreInclusive = function () {
|
4358 | return inclusiveEndDates;
|
4359 | };
|
4360 | const getDateFormat = function () {
|
4361 | return dateFormat;
|
4362 | };
|
4363 | const setExcludes = function (txt) {
|
4364 | excludes = txt.toLowerCase().split(/[\s,]+/);
|
4365 | };
|
4366 | const getExcludes = function () {
|
4367 | return excludes;
|
4368 | };
|
4369 | const setTitle = function (txt) {
|
4370 | title = txt;
|
4371 | };
|
4372 | const getTitle = function () {
|
4373 | return title;
|
4374 | };
|
4375 | const addSection = function (txt) {
|
4376 | currentSection = txt;
|
4377 | sections.push(txt);
|
4378 | };
|
4379 | const getSections = function () {
|
4380 | return sections;
|
4381 | };
|
4382 | const getTasks = function () {
|
4383 | let allItemsPricessed = compileTasks();
|
4384 | const maxDepth = 10;
|
4385 | let iterationCount = 0;
|
4386 |
|
4387 | while (!allItemsPricessed && iterationCount < maxDepth) {
|
4388 | allItemsPricessed = compileTasks();
|
4389 | iterationCount++;
|
4390 | }
|
4391 |
|
4392 | tasks = rawTasks;
|
4393 | return tasks;
|
4394 | };
|
4395 |
|
4396 | const isInvalidDate = function (date, dateFormat, excludes) {
|
4397 | if (date.isoWeekday() >= 6 && excludes.indexOf('weekends') >= 0) {
|
4398 | return true;
|
4399 | }
|
4400 |
|
4401 | if (excludes.indexOf(date.format('dddd').toLowerCase()) >= 0) {
|
4402 | return true;
|
4403 | }
|
4404 |
|
4405 | return excludes.indexOf(date.format(dateFormat.trim())) >= 0;
|
4406 | };
|
4407 |
|
4408 | const checkTaskDates = function (task, dateFormat, excludes) {
|
4409 | if (!excludes.length || task.manualEndTime) return;
|
4410 | let startTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(task.startTime, dateFormat, true);
|
4411 | startTime.add(1, 'd');
|
4412 | let endTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(task.endTime, dateFormat, true);
|
4413 | let renderEndTime = fixTaskDates(startTime, endTime, dateFormat, excludes);
|
4414 | task.endTime = endTime.toDate();
|
4415 | task.renderEndTime = renderEndTime;
|
4416 | };
|
4417 |
|
4418 | const fixTaskDates = function (startTime, endTime, dateFormat, excludes) {
|
4419 | let invalid = false;
|
4420 | let renderEndTime = null;
|
4421 |
|
4422 | while (startTime.date() <= endTime.date()) {
|
4423 | if (!invalid) {
|
4424 | renderEndTime = endTime.toDate();
|
4425 | }
|
4426 |
|
4427 | invalid = isInvalidDate(startTime, dateFormat, excludes);
|
4428 |
|
4429 | if (invalid) {
|
4430 | endTime.add(1, 'd');
|
4431 | }
|
4432 |
|
4433 | startTime.add(1, 'd');
|
4434 | }
|
4435 |
|
4436 | return renderEndTime;
|
4437 | };
|
4438 |
|
4439 | const getStartDate = function (prevTime, dateFormat, str) {
|
4440 | str = str.trim();
|
4441 |
|
4442 | const re = /^after\s+([\d\w-]+)/;
|
4443 | const afterStatement = re.exec(str.trim());
|
4444 |
|
4445 | if (afterStatement !== null) {
|
4446 | const task = findTaskById(afterStatement[1]);
|
4447 |
|
4448 | if (typeof task === 'undefined') {
|
4449 | const dt = new Date();
|
4450 | dt.setHours(0, 0, 0, 0);
|
4451 | return dt;
|
4452 | }
|
4453 |
|
4454 | return task.endTime;
|
4455 | }
|
4456 |
|
4457 |
|
4458 | let mDate = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(str, dateFormat.trim(), true);
|
4459 |
|
4460 | if (mDate.isValid()) {
|
4461 | return mDate.toDate();
|
4462 | } else {
|
4463 | _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Invalid date:' + str);
|
4464 | _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('With date format:' + dateFormat.trim());
|
4465 | }
|
4466 |
|
4467 |
|
4468 | return new Date();
|
4469 | };
|
4470 |
|
4471 | const durationToDate = function (durationStatement, relativeTime) {
|
4472 | if (durationStatement !== null) {
|
4473 | switch (durationStatement[2]) {
|
4474 | case 's':
|
4475 | relativeTime.add(durationStatement[1], 'seconds');
|
4476 | break;
|
4477 |
|
4478 | case 'm':
|
4479 | relativeTime.add(durationStatement[1], 'minutes');
|
4480 | break;
|
4481 |
|
4482 | case 'h':
|
4483 | relativeTime.add(durationStatement[1], 'hours');
|
4484 | break;
|
4485 |
|
4486 | case 'd':
|
4487 | relativeTime.add(durationStatement[1], 'days');
|
4488 | break;
|
4489 |
|
4490 | case 'w':
|
4491 | relativeTime.add(durationStatement[1], 'weeks');
|
4492 | break;
|
4493 | }
|
4494 | }
|
4495 |
|
4496 |
|
4497 | return relativeTime.toDate();
|
4498 | };
|
4499 |
|
4500 | const getEndDate = function (prevTime, dateFormat, str, inclusive) {
|
4501 | inclusive = inclusive || false;
|
4502 | str = str.trim();
|
4503 |
|
4504 | let mDate = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(str, dateFormat.trim(), true);
|
4505 |
|
4506 | if (mDate.isValid()) {
|
4507 | if (inclusive) {
|
4508 | mDate.add(1, 'd');
|
4509 | }
|
4510 |
|
4511 | return mDate.toDate();
|
4512 | }
|
4513 |
|
4514 | return durationToDate(/^([\d]+)([wdhms])/.exec(str.trim()), moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(prevTime));
|
4515 | };
|
4516 |
|
4517 | let taskCnt = 0;
|
4518 |
|
4519 | const parseId = function (idStr) {
|
4520 | if (typeof idStr === 'undefined') {
|
4521 | taskCnt = taskCnt + 1;
|
4522 | return 'task' + taskCnt;
|
4523 | }
|
4524 |
|
4525 | return idStr;
|
4526 | };
|
4527 |
|
4528 |
|
4529 |
|
4530 |
|
4531 |
|
4532 |
|
4533 |
|
4534 |
|
4535 |
|
4536 |
|
4537 |
|
4538 | const compileData = function (prevTask, dataStr) {
|
4539 | let ds;
|
4540 |
|
4541 | if (dataStr.substr(0, 1) === ':') {
|
4542 | ds = dataStr.substr(1, dataStr.length);
|
4543 | } else {
|
4544 | ds = dataStr;
|
4545 | }
|
4546 |
|
4547 | const data = ds.split(',');
|
4548 | const task = {};
|
4549 |
|
4550 | getTaskTags(data, task, tags);
|
4551 |
|
4552 | for (let i = 0; i < data.length; i++) {
|
4553 | data[i] = data[i].trim();
|
4554 | }
|
4555 |
|
4556 | let endTimeData = '';
|
4557 |
|
4558 | switch (data.length) {
|
4559 | case 1:
|
4560 | task.id = parseId();
|
4561 | task.startTime = prevTask.endTime;
|
4562 | endTimeData = data[0];
|
4563 | break;
|
4564 |
|
4565 | case 2:
|
4566 | task.id = parseId();
|
4567 | task.startTime = getStartDate(undefined, dateFormat, data[0]);
|
4568 | endTimeData = data[1];
|
4569 | break;
|
4570 |
|
4571 | case 3:
|
4572 | task.id = parseId(data[0]);
|
4573 | task.startTime = getStartDate(undefined, dateFormat, data[1]);
|
4574 | endTimeData = data[2];
|
4575 | break;
|
4576 |
|
4577 | default:
|
4578 | }
|
4579 |
|
4580 | if (endTimeData) {
|
4581 | task.endTime = getEndDate(task.startTime, dateFormat, endTimeData, inclusiveEndDates);
|
4582 | task.manualEndTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(endTimeData, 'YYYY-MM-DD', true).isValid();
|
4583 | checkTaskDates(task, dateFormat, excludes);
|
4584 | }
|
4585 |
|
4586 | return task;
|
4587 | };
|
4588 |
|
4589 | const parseData = function (prevTaskId, dataStr) {
|
4590 | let ds;
|
4591 |
|
4592 | if (dataStr.substr(0, 1) === ':') {
|
4593 | ds = dataStr.substr(1, dataStr.length);
|
4594 | } else {
|
4595 | ds = dataStr;
|
4596 | }
|
4597 |
|
4598 | const data = ds.split(',');
|
4599 | const task = {};
|
4600 |
|
4601 | getTaskTags(data, task, tags);
|
4602 |
|
4603 | for (let i = 0; i < data.length; i++) {
|
4604 | data[i] = data[i].trim();
|
4605 | }
|
4606 |
|
4607 | switch (data.length) {
|
4608 | case 1:
|
4609 | task.id = parseId();
|
4610 | task.startTime = {
|
4611 | type: 'prevTaskEnd',
|
4612 | id: prevTaskId
|
4613 | };
|
4614 | task.endTime = {
|
4615 | data: data[0]
|
4616 | };
|
4617 | break;
|
4618 |
|
4619 | case 2:
|
4620 | task.id = parseId();
|
4621 | task.startTime = {
|
4622 | type: 'getStartDate',
|
4623 | startData: data[0]
|
4624 | };
|
4625 | task.endTime = {
|
4626 | data: data[1]
|
4627 | };
|
4628 | break;
|
4629 |
|
4630 | case 3:
|
4631 | task.id = parseId(data[0]);
|
4632 | task.startTime = {
|
4633 | type: 'getStartDate',
|
4634 | startData: data[1]
|
4635 | };
|
4636 | task.endTime = {
|
4637 | data: data[2]
|
4638 | };
|
4639 | break;
|
4640 |
|
4641 | default:
|
4642 | }
|
4643 |
|
4644 | return task;
|
4645 | };
|
4646 |
|
4647 | let lastTask;
|
4648 | let lastTaskID;
|
4649 | let rawTasks = [];
|
4650 | const taskDb = {};
|
4651 | const addTask = function (descr, data) {
|
4652 | const rawTask = {
|
4653 | section: currentSection,
|
4654 | type: currentSection,
|
4655 | processed: false,
|
4656 | manualEndTime: false,
|
4657 | renderEndTime: null,
|
4658 | raw: {
|
4659 | data: data
|
4660 | },
|
4661 | task: descr,
|
4662 | classes: []
|
4663 | };
|
4664 | const taskInfo = parseData(lastTaskID, data);
|
4665 | rawTask.raw.startTime = taskInfo.startTime;
|
4666 | rawTask.raw.endTime = taskInfo.endTime;
|
4667 | rawTask.id = taskInfo.id;
|
4668 | rawTask.prevTaskId = lastTaskID;
|
4669 | rawTask.active = taskInfo.active;
|
4670 | rawTask.done = taskInfo.done;
|
4671 | rawTask.crit = taskInfo.crit;
|
4672 | rawTask.milestone = taskInfo.milestone;
|
4673 | const pos = rawTasks.push(rawTask);
|
4674 | lastTaskID = rawTask.id;
|
4675 |
|
4676 | taskDb[rawTask.id] = pos - 1;
|
4677 | };
|
4678 | const findTaskById = function (id) {
|
4679 | const pos = taskDb[id];
|
4680 | return rawTasks[pos];
|
4681 | };
|
4682 | const addTaskOrg = function (descr, data) {
|
4683 | const newTask = {
|
4684 | section: currentSection,
|
4685 | type: currentSection,
|
4686 | description: descr,
|
4687 | task: descr,
|
4688 | classes: []
|
4689 | };
|
4690 | const taskInfo = compileData(lastTask, data);
|
4691 | newTask.startTime = taskInfo.startTime;
|
4692 | newTask.endTime = taskInfo.endTime;
|
4693 | newTask.id = taskInfo.id;
|
4694 | newTask.active = taskInfo.active;
|
4695 | newTask.done = taskInfo.done;
|
4696 | newTask.crit = taskInfo.crit;
|
4697 | newTask.milestone = taskInfo.milestone;
|
4698 | lastTask = newTask;
|
4699 | tasks.push(newTask);
|
4700 | };
|
4701 |
|
4702 | const compileTasks = function () {
|
4703 | const compileTask = function (pos) {
|
4704 | const task = rawTasks[pos];
|
4705 | let startTime = '';
|
4706 |
|
4707 | switch (rawTasks[pos].raw.startTime.type) {
|
4708 | case 'prevTaskEnd':
|
4709 | const prevTask = findTaskById(task.prevTaskId);
|
4710 | task.startTime = prevTask.endTime;
|
4711 | break;
|
4712 |
|
4713 | case 'getStartDate':
|
4714 | startTime = getStartDate(undefined, dateFormat, rawTasks[pos].raw.startTime.startData);
|
4715 |
|
4716 | if (startTime) {
|
4717 | rawTasks[pos].startTime = startTime;
|
4718 | }
|
4719 |
|
4720 | break;
|
4721 | }
|
4722 |
|
4723 | if (rawTasks[pos].startTime) {
|
4724 | rawTasks[pos].endTime = getEndDate(rawTasks[pos].startTime, dateFormat, rawTasks[pos].raw.endTime.data, inclusiveEndDates);
|
4725 |
|
4726 | if (rawTasks[pos].endTime) {
|
4727 | rawTasks[pos].processed = true;
|
4728 | rawTasks[pos].manualEndTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(rawTasks[pos].raw.endTime.data, 'YYYY-MM-DD', true).isValid();
|
4729 | checkTaskDates(rawTasks[pos], dateFormat, excludes);
|
4730 | }
|
4731 | }
|
4732 |
|
4733 | return rawTasks[pos].processed;
|
4734 | };
|
4735 |
|
4736 | let allProcessed = true;
|
4737 |
|
4738 | for (let i = 0; i < rawTasks.length; i++) {
|
4739 | compileTask(i);
|
4740 | allProcessed = allProcessed && rawTasks[i].processed;
|
4741 | }
|
4742 |
|
4743 | return allProcessed;
|
4744 | };
|
4745 |
|
4746 |
|
4747 |
|
4748 |
|
4749 |
|
4750 |
|
4751 |
|
4752 | const setLink = function (ids, _linkStr) {
|
4753 | let linkStr = _linkStr;
|
4754 |
|
4755 | if (config.securityLevel !== 'loose') {
|
4756 | linkStr = Object(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__["sanitizeUrl"])(_linkStr);
|
4757 | }
|
4758 |
|
4759 | ids.split(',').forEach(function (id) {
|
4760 | let rawTask = findTaskById(id);
|
4761 |
|
4762 | if (typeof rawTask !== 'undefined') {
|
4763 | pushFun(id, () => {
|
4764 | window.open(linkStr, '_self');
|
4765 | });
|
4766 | }
|
4767 | });
|
4768 | setClass(ids, 'clickable');
|
4769 | };
|
4770 |
|
4771 |
|
4772 |
|
4773 |
|
4774 |
|
4775 |
|
4776 | const setClass = function (ids, className) {
|
4777 | ids.split(',').forEach(function (id) {
|
4778 | let rawTask = findTaskById(id);
|
4779 |
|
4780 | if (typeof rawTask !== 'undefined') {
|
4781 | rawTask.classes.push(className);
|
4782 | }
|
4783 | });
|
4784 | };
|
4785 |
|
4786 | const setClickFun = function (id, functionName, functionArgs) {
|
4787 | if (config.securityLevel !== 'loose') {
|
4788 | return;
|
4789 | }
|
4790 |
|
4791 | if (typeof functionName === 'undefined') {
|
4792 | return;
|
4793 | }
|
4794 |
|
4795 | let argList = [];
|
4796 |
|
4797 | if (typeof functionArgs === 'string') {
|
4798 |
|
4799 | argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
|
4800 |
|
4801 | for (let i = 0; i < argList.length; i++) {
|
4802 | let item = argList[i].trim();
|
4803 |
|
4804 |
|
4805 |
|
4806 |
|
4807 | if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') {
|
4808 | item = item.substr(1, item.length - 2);
|
4809 | }
|
4810 |
|
4811 | argList[i] = item;
|
4812 | }
|
4813 | }
|
4814 |
|
4815 | let rawTask = findTaskById(id);
|
4816 |
|
4817 | if (typeof rawTask !== 'undefined') {
|
4818 | pushFun(id, () => {
|
4819 | window[functionName](...argList);
|
4820 | });
|
4821 | }
|
4822 | };
|
4823 |
|
4824 |
|
4825 |
|
4826 |
|
4827 |
|
4828 |
|
4829 |
|
4830 | const pushFun = function (id, callbackFunction) {
|
4831 | funs.push(function (element) {
|
4832 |
|
4833 | const elem = document.querySelector(`[id="${id}"]`);
|
4834 |
|
4835 | if (elem !== null) {
|
4836 | elem.addEventListener('click', function () {
|
4837 | callbackFunction();
|
4838 | });
|
4839 | }
|
4840 | });
|
4841 | funs.push(function (element) {
|
4842 |
|
4843 | const elem = document.querySelector(`[id="${id}-text"]`);
|
4844 |
|
4845 | if (elem !== null) {
|
4846 | elem.addEventListener('click', function () {
|
4847 | callbackFunction();
|
4848 | });
|
4849 | }
|
4850 | });
|
4851 | };
|
4852 |
|
4853 |
|
4854 |
|
4855 |
|
4856 |
|
4857 |
|
4858 |
|
4859 |
|
4860 | const setClickEvent = function (ids, functionName, functionArgs) {
|
4861 | ids.split(',').forEach(function (id) {
|
4862 | setClickFun(id, functionName, functionArgs);
|
4863 | });
|
4864 | setClass(ids, 'clickable');
|
4865 | };
|
4866 |
|
4867 |
|
4868 |
|
4869 |
|
4870 |
|
4871 | const bindFunctions = function (element) {
|
4872 | funs.forEach(function (fun) {
|
4873 | fun(element);
|
4874 | });
|
4875 | };
|
4876 | __webpack_exports__["default"] = ({
|
4877 | clear,
|
4878 | setDateFormat,
|
4879 | getDateFormat,
|
4880 | enableInclusiveEndDates,
|
4881 | endDatesAreInclusive,
|
4882 | setAxisFormat,
|
4883 | getAxisFormat,
|
4884 | setTitle,
|
4885 | getTitle,
|
4886 | addSection,
|
4887 | getSections,
|
4888 | getTasks,
|
4889 | addTask,
|
4890 | findTaskById,
|
4891 | addTaskOrg,
|
4892 | setExcludes,
|
4893 | getExcludes,
|
4894 | setClickEvent,
|
4895 | setLink,
|
4896 | bindFunctions,
|
4897 | durationToDate
|
4898 | });
|
4899 |
|
4900 | function getTaskTags(data, task, tags) {
|
4901 | let matchFound = true;
|
4902 |
|
4903 | while (matchFound) {
|
4904 | matchFound = false;
|
4905 | tags.forEach(function (t) {
|
4906 | const pattern = '^\\s*' + t + '\\s*$';
|
4907 | const regex = new RegExp(pattern);
|
4908 |
|
4909 | if (data[0].match(regex)) {
|
4910 | task[t] = true;
|
4911 | data.shift(1);
|
4912 | matchFound = true;
|
4913 | }
|
4914 | });
|
4915 | }
|
4916 | }
|
4917 |
|
4918 | }),
|
4919 |
|
4920 | "./src/diagrams/gantt/ganttRenderer.js":
|
4921 |
|
4922 |
|
4923 |
|
4924 |
|
4925 | (function(module, __webpack_exports__, __webpack_require__) {
|
4926 |
|
4927 | "use strict";
|
4928 | __webpack_require__.r(__webpack_exports__);
|
4929 | __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
|
4930 | __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
|
4931 | var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "d3");
|
4932 | var d3__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
|
4933 | var _parser_gantt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./src/diagrams/gantt/parser/gantt.jison");
|
4934 | var _parser_gantt__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(_parser_gantt__WEBPACK_IMPORTED_MODULE_1__);
|
4935 | var _ganttDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./src/diagrams/gantt/ganttDb.js");
|
4936 |
|
4937 |
|
4938 |
|
4939 | _parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy = _ganttDb__WEBPACK_IMPORTED_MODULE_2__["default"];
|
4940 | const conf = {
|
4941 | titleTopMargin: 25,
|
4942 | barHeight: 20,
|
4943 | barGap: 4,
|
4944 | topPadding: 50,
|
4945 | rightPadding: 75,
|
4946 | leftPadding: 75,
|
4947 | gridLineStartPadding: 35,
|
4948 | fontSize: 11,
|
4949 | fontFamily: '"Open-Sans", "sans-serif"'
|
4950 | };
|
4951 | const setConf = function (cnf) {
|
4952 | const keys = Object.keys(cnf);
|
4953 | keys.forEach(function (key) {
|
4954 | conf[key] = cnf[key];
|
4955 | });
|
4956 | };
|
4957 | let w;
|
4958 | const draw = function (text, id) {
|
4959 | _parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.clear();
|
4960 | _parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].parse(text);
|
4961 | const elem = document.getElementById(id);
|
4962 | w = elem.parentElement.offsetWidth;
|
4963 |
|
4964 | if (typeof w === 'undefined') {
|
4965 | w = 1200;
|
4966 | }
|
4967 |
|
4968 | if (typeof conf.useWidth !== 'undefined') {
|
4969 | w = conf.useWidth;
|
4970 | }
|
4971 |
|
4972 | const taskArray = _parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.getTasks();
|
4973 |
|
4974 | const h = taskArray.length * (conf.barHeight + conf.barGap) + 2 * conf.topPadding;
|
4975 | elem.setAttribute('height', '100%');
|
4976 |
|
4977 | elem.setAttribute('viewBox', '0 0 ' + w + ' ' + h);
|
4978 | const svg = d3__WEBPACK_IMPORTED_MODULE_0__["select"](`[id="${id}"]`);
|
4979 |
|
4980 | const timeScale = d3__WEBPACK_IMPORTED_MODULE_0__["scaleTime"]().domain([d3__WEBPACK_IMPORTED_MODULE_0__["min"](taskArray, function (d) {
|
4981 | return d.startTime;
|
4982 | }), d3__WEBPACK_IMPORTED_MODULE_0__["max"](taskArray, function (d) {
|
4983 | return d.endTime;
|
4984 | })]).rangeRound([0, w - conf.leftPadding - conf.rightPadding]);
|
4985 | let categories = [];
|
4986 |
|
4987 | for (let i = 0; i < taskArray.length; i++) {
|
4988 | categories.push(taskArray[i].type);
|
4989 | }
|
4990 |
|
4991 | const catsUnfiltered = categories;
|
4992 |
|
4993 | categories = checkUnique(categories);
|
4994 | makeGant(taskArray, w, h);
|
4995 |
|
4996 | if (typeof conf.useWidth !== 'undefined') {
|
4997 | elem.setAttribute('width', w);
|
4998 | }
|
4999 |
|
5000 | svg.append('text').text(_parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.getTitle()).attr('x', w / 2).attr('y', conf.titleTopMargin).attr('class', 'titleText');
|
5001 |
|
5002 | function makeGant(tasks, pageWidth, pageHeight) {
|
5003 | const barHeight = conf.barHeight;
|
5004 | const gap = barHeight + conf.barGap;
|
5005 | const topPadding = conf.topPadding;
|
5006 | const leftPadding = conf.leftPadding;
|
5007 | const colorScale = d3__WEBPACK_IMPORTED_MODULE_0__["scaleLinear"]().domain([0, categories.length]).range(['#00B9FA', '#F95002']).interpolate(d3__WEBPACK_IMPORTED_MODULE_0__["interpolateHcl"]);
|
5008 | makeGrid(leftPadding, topPadding, pageWidth, pageHeight);
|
5009 | drawRects(tasks, gap, topPadding, leftPadding, barHeight, colorScale, pageWidth, pageHeight);
|
5010 | vertLabels(gap, topPadding, leftPadding, barHeight, colorScale);
|
5011 | drawToday(leftPadding, topPadding, pageWidth, pageHeight);
|
5012 | }
|
5013 |
|
5014 | function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w, h) {
|
5015 |
|
5016 | svg.append('g').selectAll('rect').data(theArray).enter().append('rect').attr('x', 0).attr('y', function (d, i) {
|
5017 | return i * theGap + theTopPad - 2;
|
5018 | }).attr('width', function () {
|
5019 | return w - conf.rightPadding / 2;
|
5020 | }).attr('height', theGap).attr('class', function (d) {
|
5021 | for (let i = 0; i < categories.length; i++) {
|
5022 | if (d.type === categories[i]) {
|
5023 | return 'section section' + i % conf.numberSectionStyles;
|
5024 | }
|
5025 | }
|
5026 |
|
5027 | return 'section section0';
|
5028 | });
|
5029 |
|
5030 | const rectangles = svg.append('g').selectAll('rect').data(theArray).enter();
|
5031 | rectangles.append('rect').attr('id', function (d) {
|
5032 | return d.id;
|
5033 | }).attr('rx', 3).attr('ry', 3).attr('x', function (d) {
|
5034 | if (d.milestone) {
|
5035 | return timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;
|
5036 | }
|
5037 |
|
5038 | return timeScale(d.startTime) + theSidePad;
|
5039 | }).attr('y', function (d, i) {
|
5040 | return i * theGap + theTopPad;
|
5041 | }).attr('width', function (d) {
|
5042 | if (d.milestone) {
|
5043 | return theBarHeight;
|
5044 | }
|
5045 |
|
5046 | return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime);
|
5047 | }).attr('height', theBarHeight).attr('transform-origin', function (d, i) {
|
5048 | return (timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime))).toString() + 'px ' + (i * theGap + theTopPad + 0.5 * theBarHeight).toString() + 'px';
|
5049 | }).attr('class', function (d) {
|
5050 | const res = 'task';
|
5051 | let classStr = '';
|
5052 |
|
5053 | if (d.classes.length > 0) {
|
5054 | classStr = d.classes.join(' ');
|
5055 | }
|
5056 |
|
5057 | let secNum = 0;
|
5058 |
|
5059 | for (let i = 0; i < categories.length; i++) {
|
5060 | if (d.type === categories[i]) {
|
5061 | secNum = i % conf.numberSectionStyles;
|
5062 | }
|
5063 | }
|
5064 |
|
5065 | let taskClass = '';
|
5066 |
|
5067 | if (d.active) {
|
5068 | if (d.crit) {
|
5069 | taskClass += ' activeCrit';
|
5070 | } else {
|
5071 | taskClass = ' active';
|
5072 | }
|
5073 | } else if (d.done) {
|
5074 | if (d.crit) {
|
5075 | taskClass = ' doneCrit';
|
5076 | } else {
|
5077 | taskClass = ' done';
|
5078 | }
|
5079 | } else {
|
5080 | if (d.crit) {
|
5081 | taskClass += ' crit';
|
5082 | }
|
5083 | }
|
5084 |
|
5085 | if (taskClass.length === 0) {
|
5086 | taskClass = ' task';
|
5087 | }
|
5088 |
|
5089 | if (d.milestone) {
|
5090 | taskClass = ' milestone ' + taskClass;
|
5091 | }
|
5092 |
|
5093 | taskClass += secNum;
|
5094 | taskClass += ' ' + classStr;
|
5095 | return res + taskClass;
|
5096 | });
|
5097 |
|
5098 | rectangles.append('text').attr('id', function (d) {
|
5099 | return d.id + '-text';
|
5100 | }).text(function (d) {
|
5101 | return d.task;
|
5102 | }).attr('font-size', conf.fontSize).attr('x', function (d) {
|
5103 | let startX = timeScale(d.startTime);
|
5104 | let endX = timeScale(d.renderEndTime || d.endTime);
|
5105 |
|
5106 | if (d.milestone) {
|
5107 | startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;
|
5108 | }
|
5109 |
|
5110 | if (d.milestone) {
|
5111 | endX = startX + theBarHeight;
|
5112 | }
|
5113 |
|
5114 | const textWidth = this.getBBox().width;
|
5115 |
|
5116 | if (textWidth > endX - startX) {
|
5117 | if (endX + textWidth + 1.5 * conf.leftPadding > w) {
|
5118 | return startX + theSidePad - 5;
|
5119 | } else {
|
5120 | return endX + theSidePad + 5;
|
5121 | }
|
5122 | } else {
|
5123 | return (endX - startX) / 2 + startX + theSidePad;
|
5124 | }
|
5125 | }).attr('y', function (d, i) {
|
5126 | return i * theGap + conf.barHeight / 2 + (conf.fontSize / 2 - 2) + theTopPad;
|
5127 | }).attr('text-height', theBarHeight).attr('class', function (d) {
|
5128 | const startX = timeScale(d.startTime);
|
5129 | let endX = timeScale(d.endTime);
|
5130 |
|
5131 | if (d.milestone) {
|
5132 | endX = startX + theBarHeight;
|
5133 | }
|
5134 |
|
5135 | const textWidth = this.getBBox().width;
|
5136 | let classStr = '';
|
5137 |
|
5138 | if (d.classes.length > 0) {
|
5139 | classStr = d.classes.join(' ');
|
5140 | }
|
5141 |
|
5142 | let secNum = 0;
|
5143 |
|
5144 | for (let i = 0; i < categories.length; i++) {
|
5145 | if (d.type === categories[i]) {
|
5146 | secNum = i % conf.numberSectionStyles;
|
5147 | }
|
5148 | }
|
5149 |
|
5150 | let taskType = '';
|
5151 |
|
5152 | if (d.active) {
|
5153 | if (d.crit) {
|
5154 | taskType = 'activeCritText' + secNum;
|
5155 | } else {
|
5156 | taskType = 'activeText' + secNum;
|
5157 | }
|
5158 | }
|
5159 |
|
5160 | if (d.done) {
|
5161 | if (d.crit) {
|
5162 | taskType = taskType + ' doneCritText' + secNum;
|
5163 | } else {
|
5164 | taskType = taskType + ' doneText' + secNum;
|
5165 | }
|
5166 | } else {
|
5167 | if (d.crit) {
|
5168 | taskType = taskType + ' critText' + secNum;
|
5169 | }
|
5170 | }
|
5171 |
|
5172 | if (d.milestone) {
|
5173 | taskType += ' milestoneText';
|
5174 | }
|
5175 |
|
5176 |
|
5177 | if (textWidth > endX - startX) {
|
5178 | if (endX + textWidth + 1.5 * conf.leftPadding > w) {
|
5179 | return classStr + ' taskTextOutsideLeft taskTextOutside' + secNum + ' ' + taskType;
|
5180 | } else {
|
5181 | return classStr + ' taskTextOutsideRight taskTextOutside' + secNum + ' ' + taskType;
|
5182 | }
|
5183 | } else {
|
5184 | return classStr + ' taskText taskText' + secNum + ' ' + taskType;
|
5185 | }
|
5186 | });
|
5187 | }
|
5188 |
|
5189 | function makeGrid(theSidePad, theTopPad, w, h) {
|
5190 | let xAxis = d3__WEBPACK_IMPORTED_MODULE_0__["axisBottom"](timeScale).tickSize(-h + theTopPad + conf.gridLineStartPadding).tickFormat(d3__WEBPACK_IMPORTED_MODULE_0__["timeFormat"](_parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.getAxisFormat() || conf.axisFormat || '%Y-%m-%d'));
|
5191 | svg.append('g').attr('class', 'grid').attr('transform', 'translate(' + theSidePad + ', ' + (h - 50) + ')').call(xAxis).selectAll('text').style('text-anchor', 'middle').attr('fill', '#000').attr('stroke', 'none').attr('font-size', 10).attr('dy', '1em');
|
5192 | }
|
5193 |
|
5194 | function vertLabels(theGap, theTopPad) {
|
5195 | const numOccurances = [];
|
5196 | let prevGap = 0;
|
5197 |
|
5198 | for (let i = 0; i < categories.length; i++) {
|
5199 | numOccurances[i] = [categories[i], getCount(categories[i], catsUnfiltered)];
|
5200 | }
|
5201 |
|
5202 | svg.append('g')
|
5203 | .selectAll('text').data(numOccurances).enter().append('text').text(function (d) {
|
5204 | return d[0];
|
5205 | }).attr('x', 10).attr('y', function (d, i) {
|
5206 | if (i > 0) {
|
5207 | for (let j = 0; j < i; j++) {
|
5208 | prevGap += numOccurances[i - 1][1];
|
5209 | return d[1] * theGap / 2 + prevGap * theGap + theTopPad;
|
5210 | }
|
5211 | } else {
|
5212 | return d[1] * theGap / 2 + theTopPad;
|
5213 | }
|
5214 | }).attr('class', function (d) {
|
5215 | for (let i = 0; i < categories.length; i++) {
|
5216 | if (d[0] === categories[i]) {
|
5217 | return 'sectionTitle sectionTitle' + i % conf.numberSectionStyles;
|
5218 | }
|
5219 | }
|
5220 |
|
5221 | return 'sectionTitle';
|
5222 | });
|
5223 | }
|
5224 |
|
5225 | function drawToday(theSidePad, theTopPad, w, h) {
|
5226 | const todayG = svg.append('g').attr('class', 'today');
|
5227 | const today = new Date();
|
5228 | todayG.append('line').attr('x1', timeScale(today) + theSidePad).attr('x2', timeScale(today) + theSidePad).attr('y1', conf.titleTopMargin).attr('y2', h - conf.titleTopMargin).attr('class', 'today');
|
5229 | }
|
5230 |
|
5231 |
|
5232 | function checkUnique(arr) {
|
5233 | const hash = {};
|
5234 | const result = [];
|
5235 |
|
5236 | for (let i = 0, l = arr.length; i < l; ++i) {
|
5237 | if (!hash.hasOwnProperty(arr[i])) {
|
5238 |
|
5239 | hash[arr[i]] = true;
|
5240 | result.push(arr[i]);
|
5241 | }
|
5242 | }
|
5243 |
|
5244 | return result;
|
5245 | }
|
5246 |
|
5247 |
|
5248 | function getCounts(arr) {
|
5249 | let i = arr.length;
|
5250 |
|
5251 | const obj = {};
|
5252 |
|
5253 | while (i) {
|
5254 | obj[arr[--i]] = (obj[arr[i]] || 0) + 1;
|
5255 | }
|
5256 |
|
5257 | return obj;
|
5258 | }
|
5259 |
|
5260 |
|
5261 | function getCount(word, arr) {
|
5262 | return getCounts(arr)[word] || 0;
|
5263 | }
|
5264 | };
|
5265 | __webpack_exports__["default"] = ({
|
5266 | setConf,
|
5267 | draw
|
5268 | });
|
5269 |
|
5270 | }),
|
5271 |
|
5272 | "./src/diagrams/gantt/parser/gantt.jison":
|
5273 |
|
5274 |
|
5275 |
|
5276 |
|
5277 | (function(module, exports, __webpack_require__) {
|
5278 |
|
5279 | (function(process, module) {
|
5280 |
|
5281 |
|
5282 |
|
5283 |
|
5284 |
|
5285 |
|
5286 |
|
5287 |
|
5288 |
|
5289 |
|
5290 |
|
5291 |
|
5292 |
|
5293 |
|
5294 |
|
5295 |
|
5296 |
|
5297 |
|
5298 |
|
5299 |
|
5300 |
|
5301 |
|
5302 |
|
5303 |
|
5304 |
|
5305 |
|
5306 |
|
5307 |
|
5308 |
|
5309 |
|
5310 |
|
5311 |
|
5312 |
|
5313 |
|
5314 |
|
5315 |
|
5316 |
|
5317 |
|
5318 |
|
5319 |
|
5320 |
|
5321 |
|
5322 |
|
5323 |
|
5324 |
|
5325 |
|
5326 |
|
5327 |
|
5328 |
|
5329 |
|
5330 |
|
5331 |
|
5332 |
|
5333 |
|
5334 |
|
5335 |
|
5336 |
|
5337 |
|
5338 |
|
5339 |
|
5340 |
|
5341 |
|
5342 |
|
5343 |
|
5344 |
|
5345 |
|
5346 |
|
5347 |
|
5348 |
|
5349 |
|
5350 |
|
5351 |
|
5352 | var parser = (function(){
|
5353 | var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,8,10,11,12,13,14,15,16,18,20],$V1=[1,9],$V2=[1,10],$V3=[1,11],$V4=[1,12],$V5=[1,13],$V6=[1,14],$V7=[1,16],$V8=[1,17];
|
5354 | var parser = {trace: function trace () { },
|
5355 | yy: {},
|
5356 | symbols_: {"error":2,"start":3,"gantt":4,"document":5,"EOF":6,"line":7,"SPACE":8,"statement":9,"NL":10,"dateFormat":11,"inclusiveEndDates":12,"axisFormat":13,"excludes":14,"title":15,"section":16,"clickStatement":17,"taskTxt":18,"taskData":19,"click":20,"callbackname":21,"callbackargs":22,"href":23,"clickStatementDebug":24,"$accept":0,"$end":1},
|
5357 | terminals_: {2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",11:"dateFormat",12:"inclusiveEndDates",13:"axisFormat",14:"excludes",15:"title",16:"section",18:"taskTxt",19:"taskData",20:"click",21:"callbackname",22:"callbackargs",23:"href"},
|
5358 | productions_: [0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[17,2],[17,3],[17,3],[17,4],[17,3],[17,4],[17,2],[24,2],[24,3],[24,3],[24,4],[24,3],[24,4],[24,2]],
|
5359 | performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
|
5360 |
|
5361 |
|
5362 | var $0 = $$.length - 1;
|
5363 | switch (yystate) {
|
5364 | case 1:
|
5365 | return $$[$0-1];
|
5366 | break;
|
5367 | case 2:
|
5368 | this.$ = []
|
5369 | break;
|
5370 | case 3:
|
5371 | $$[$0-1].push($$[$0]);this.$ = $$[$0-1]
|
5372 | break;
|
5373 | case 4: case 5:
|
5374 | this.$ = $$[$0]
|
5375 | break;
|
5376 | case 6: case 7:
|
5377 | this.$=[];
|
5378 | break;
|
5379 | case 8:
|
5380 | yy.setDateFormat($$[$0].substr(11));this.$=$$[$0].substr(11);
|
5381 | break;
|
5382 | case 9:
|
5383 | yy.enableInclusiveEndDates();this.$=$$[$0].substr(18);
|
5384 | break;
|
5385 | case 10:
|
5386 | yy.setAxisFormat($$[$0].substr(11));this.$=$$[$0].substr(11);
|
5387 | break;
|
5388 | case 11:
|
5389 | yy.setExcludes($$[$0].substr(9));this.$=$$[$0].substr(9);
|
5390 | break;
|
5391 | case 12:
|
5392 | yy.setTitle($$[$0].substr(6));this.$=$$[$0].substr(6);
|
5393 | break;
|
5394 | case 13:
|
5395 | yy.addSection($$[$0].substr(8));this.$=$$[$0].substr(8);
|
5396 | break;
|
5397 | case 15:
|
5398 | yy.addTask($$[$0-1],$$[$0]);this.$='task';
|
5399 | break;
|
5400 | case 16:
|
5401 | this.$ = $$[$0-1];yy.setClickEvent($$[$0-1], $$[$0], null);
|
5402 | break;
|
5403 | case 17:
|
5404 | this.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0-1], $$[$0]);
|
5405 | break;
|
5406 | case 18:
|
5407 | this.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0-1], null);yy.setLink($$[$0-2],$$[$0]);
|
5408 | break;
|
5409 | case 19:
|
5410 | this.$ = $$[$0-3];yy.setClickEvent($$[$0-3], $$[$0-2], $$[$0-1]);yy.setLink($$[$0-3],$$[$0]);
|
5411 | break;
|
5412 | case 20:
|
5413 | this.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0], null);yy.setLink($$[$0-2],$$[$0-1]);
|
5414 | break;
|
5415 | case 21:
|
5416 | this.$ = $$[$0-3];yy.setClickEvent($$[$0-3], $$[$0-1], $$[$0]);yy.setLink($$[$0-3],$$[$0-2]);
|
5417 | break;
|
5418 | case 22:
|
5419 | this.$ = $$[$0-1];yy.setLink($$[$0-1], $$[$0]);
|
5420 | break;
|
5421 | case 23: case 29:
|
5422 | this.$=$$[$0-1] + ' ' + $$[$0];
|
5423 | break;
|
5424 | case 24: case 25: case 27:
|
5425 | this.$=$$[$0-2] + ' ' + $$[$0-1] + ' ' + $$[$0];
|
5426 | break;
|
5427 | case 26: case 28:
|
5428 | this.$=$$[$0-3] + ' ' + $$[$0-2] + ' ' + $$[$0-1] + ' ' + $$[$0];
|
5429 | break;
|
5430 | }
|
5431 | },
|
5432 | table: [{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:$V1,12:$V2,13:$V3,14:$V4,15:$V5,16:$V6,17:15,18:$V7,20:$V8},o($V0,[2,7],{1:[2,1]}),o($V0,[2,3]),{9:18,11:$V1,12:$V2,13:$V3,14:$V4,15:$V5,16:$V6,17:15,18:$V7,20:$V8},o($V0,[2,5]),o($V0,[2,6]),o($V0,[2,8]),o($V0,[2,9]),o($V0,[2,10]),o($V0,[2,11]),o($V0,[2,12]),o($V0,[2,13]),o($V0,[2,14]),{19:[1,19]},{21:[1,20],23:[1,21]},o($V0,[2,4]),o($V0,[2,15]),o($V0,[2,16],{22:[1,22],23:[1,23]}),o($V0,[2,22],{21:[1,24]}),o($V0,[2,17],{23:[1,25]}),o($V0,[2,18]),o($V0,[2,20],{22:[1,26]}),o($V0,[2,19]),o($V0,[2,21])],
|
5433 | defaultActions: {},
|
5434 | parseError: function parseError (str, hash) {
|
5435 | if (hash.recoverable) {
|
5436 | this.trace(str);
|
5437 | } else {
|
5438 | var error = new Error(str);
|
5439 | error.hash = hash;
|
5440 | throw error;
|
5441 | }
|
5442 | },
|
5443 | parse: function parse(input) {
|
5444 | var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
|
5445 | var args = lstack.slice.call(arguments, 1);
|
5446 | var lexer = Object.create(this.lexer);
|
5447 | var sharedState = { yy: {} };
|
5448 | for (var k in this.yy) {
|
5449 | if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
5450 | sharedState.yy[k] = this.yy[k];
|
5451 | }
|
5452 | }
|
5453 | lexer.setInput(input, sharedState.yy);
|
5454 | sharedState.yy.lexer = lexer;
|
5455 | sharedState.yy.parser = this;
|
5456 | if (typeof lexer.yylloc == 'undefined') {
|
5457 | lexer.yylloc = {};
|
5458 | }
|
5459 | var yyloc = lexer.yylloc;
|
5460 | lstack.push(yyloc);
|
5461 | var ranges = lexer.options && lexer.options.ranges;
|
5462 | if (typeof sharedState.yy.parseError === 'function') {
|
5463 | this.parseError = sharedState.yy.parseError;
|
5464 | } else {
|
5465 | this.parseError = Object.getPrototypeOf(this).parseError;
|
5466 | }
|
5467 | function popStack(n) {
|
5468 | stack.length = stack.length - 2 * n;
|
5469 | vstack.length = vstack.length - n;
|
5470 | lstack.length = lstack.length - n;
|
5471 | }
|
5472 | function lex() {
|
5473 | var token;
|
5474 | token = tstack.pop() || lexer.lex() || EOF;
|
5475 | if (typeof token !== 'number') {
|
5476 | if (token instanceof Array) {
|
5477 | tstack = token;
|
5478 | token = tstack.pop();
|
5479 | }
|
5480 | token = self.symbols_[token] || token;
|
5481 | }
|
5482 | return token;
|
5483 | }
|
5484 | var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
|
5485 | while (true) {
|
5486 | state = stack[stack.length - 1];
|
5487 | if (this.defaultActions[state]) {
|
5488 | action = this.defaultActions[state];
|
5489 | } else {
|
5490 | if (symbol === null || typeof symbol == 'undefined') {
|
5491 | symbol = lex();
|
5492 | }
|
5493 | action = table[state] && table[state][symbol];
|
5494 | }
|
5495 | if (typeof action === 'undefined' || !action.length || !action[0]) {
|
5496 | var errStr = '';
|
5497 | expected = [];
|
5498 | for (p in table[state]) {
|
5499 | if (this.terminals_[p] && p > TERROR) {
|
5500 | expected.push('\'' + this.terminals_[p] + '\'');
|
5501 | }
|
5502 | }
|
5503 | if (lexer.showPosition) {
|
5504 | errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
|
5505 | } else {
|
5506 | errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
|
5507 | }
|
5508 | this.parseError(errStr, {
|
5509 | text: lexer.match,
|
5510 | token: this.terminals_[symbol] || symbol,
|
5511 | line: lexer.yylineno,
|
5512 | loc: yyloc,
|
5513 | expected: expected
|
5514 | });
|
5515 | }
|
5516 | if (action[0] instanceof Array && action.length > 1) {
|
5517 | throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
|
5518 | }
|
5519 | switch (action[0]) {
|
5520 | case 1:
|
5521 | stack.push(symbol);
|
5522 | vstack.push(lexer.yytext);
|
5523 | lstack.push(lexer.yylloc);
|
5524 | stack.push(action[1]);
|
5525 | symbol = null;
|
5526 | if (!preErrorSymbol) {
|
5527 | yyleng = lexer.yyleng;
|
5528 | yytext = lexer.yytext;
|
5529 | yylineno = lexer.yylineno;
|
5530 | yyloc = lexer.yylloc;
|
5531 | if (recovering > 0) {
|
5532 | recovering--;
|
5533 | }
|
5534 | } else {
|
5535 | symbol = preErrorSymbol;
|
5536 | preErrorSymbol = null;
|
5537 | }
|
5538 | break;
|
5539 | case 2:
|
5540 | len = this.productions_[action[1]][1];
|
5541 | yyval.$ = vstack[vstack.length - len];
|
5542 | yyval._$ = {
|
5543 | first_line: lstack[lstack.length - (len || 1)].first_line,
|
5544 | last_line: lstack[lstack.length - 1].last_line,
|
5545 | first_column: lstack[lstack.length - (len || 1)].first_column,
|
5546 | last_column: lstack[lstack.length - 1].last_column
|
5547 | };
|
5548 | if (ranges) {
|
5549 | yyval._$.range = [
|
5550 | lstack[lstack.length - (len || 1)].range[0],
|
5551 | lstack[lstack.length - 1].range[1]
|
5552 | ];
|
5553 | }
|
5554 | r = this.performAction.apply(yyval, [
|
5555 | yytext,
|
5556 | yyleng,
|
5557 | yylineno,
|
5558 | sharedState.yy,
|
5559 | action[1],
|
5560 | vstack,
|
5561 | lstack
|
5562 | ].concat(args));
|
5563 | if (typeof r !== 'undefined') {
|
5564 | return r;
|
5565 | }
|
5566 | if (len) {
|
5567 | stack = stack.slice(0, -1 * len * 2);
|
5568 | vstack = vstack.slice(0, -1 * len);
|
5569 | lstack = lstack.slice(0, -1 * len);
|
5570 | }
|
5571 | stack.push(this.productions_[action[1]][0]);
|
5572 | vstack.push(yyval.$);
|
5573 | lstack.push(yyval._$);
|
5574 | newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
5575 | stack.push(newState);
|
5576 | break;
|
5577 | case 3:
|
5578 | return true;
|
5579 | }
|
5580 | }
|
5581 | return true;
|
5582 | }};
|
5583 |
|
5584 |
|
5585 | var lexer = (function(){
|
5586 | var lexer = ({
|
5587 |
|
5588 | EOF:1,
|
5589 |
|
5590 | parseError:function parseError(str, hash) {
|
5591 | if (this.yy.parser) {
|
5592 | this.yy.parser.parseError(str, hash);
|
5593 | } else {
|
5594 | throw new Error(str);
|
5595 | }
|
5596 | },
|
5597 |
|
5598 |
|
5599 | setInput:function (input, yy) {
|
5600 | this.yy = yy || this.yy || {};
|
5601 | this._input = input;
|
5602 | this._more = this._backtrack = this.done = false;
|
5603 | this.yylineno = this.yyleng = 0;
|
5604 | this.yytext = this.matched = this.match = '';
|
5605 | this.conditionStack = ['INITIAL'];
|
5606 | this.yylloc = {
|
5607 | first_line: 1,
|
5608 | first_column: 0,
|
5609 | last_line: 1,
|
5610 | last_column: 0
|
5611 | };
|
5612 | if (this.options.ranges) {
|
5613 | this.yylloc.range = [0,0];
|
5614 | }
|
5615 | this.offset = 0;
|
5616 | return this;
|
5617 | },
|
5618 |
|
5619 |
|
5620 | input:function () {
|
5621 | var ch = this._input[0];
|
5622 | this.yytext += ch;
|
5623 | this.yyleng++;
|
5624 | this.offset++;
|
5625 | this.match += ch;
|
5626 | this.matched += ch;
|
5627 | var lines = ch.match(/(?:\r\n?|\n).*/g);
|
5628 | if (lines) {
|
5629 | this.yylineno++;
|
5630 | this.yylloc.last_line++;
|
5631 | } else {
|
5632 | this.yylloc.last_column++;
|
5633 | }
|
5634 | if (this.options.ranges) {
|
5635 | this.yylloc.range[1]++;
|
5636 | }
|
5637 |
|
5638 | this._input = this._input.slice(1);
|
5639 | return ch;
|
5640 | },
|
5641 |
|
5642 |
|
5643 | unput:function (ch) {
|
5644 | var len = ch.length;
|
5645 | var lines = ch.split(/(?:\r\n?|\n)/g);
|
5646 |
|
5647 | this._input = ch + this._input;
|
5648 | this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
5649 |
|
5650 | this.offset -= len;
|
5651 | var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
5652 | this.match = this.match.substr(0, this.match.length - 1);
|
5653 | this.matched = this.matched.substr(0, this.matched.length - 1);
|
5654 |
|
5655 | if (lines.length - 1) {
|
5656 | this.yylineno -= lines.length - 1;
|
5657 | }
|
5658 | var r = this.yylloc.range;
|
5659 |
|
5660 | this.yylloc = {
|
5661 | first_line: this.yylloc.first_line,
|
5662 | last_line: this.yylineno + 1,
|
5663 | first_column: this.yylloc.first_column,
|
5664 | last_column: lines ?
|
5665 | (lines.length === oldLines.length ? this.yylloc.first_column : 0)
|
5666 | + oldLines[oldLines.length - lines.length].length - lines[0].length :
|
5667 | this.yylloc.first_column - len
|
5668 | };
|
5669 |
|
5670 | if (this.options.ranges) {
|
5671 | this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
5672 | }
|
5673 | this.yyleng = this.yytext.length;
|
5674 | return this;
|
5675 | },
|
5676 |
|
5677 |
|
5678 | more:function () {
|
5679 | this._more = true;
|
5680 | return this;
|
5681 | },
|
5682 |
|
5683 |
|
5684 | reject:function () {
|
5685 | if (this.options.backtrack_lexer) {
|
5686 | this._backtrack = true;
|
5687 | } else {
|
5688 | return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), {
|
5689 | text: "",
|
5690 | token: null,
|
5691 | line: this.yylineno
|
5692 | });
|
5693 |
|
5694 | }
|
5695 | return this;
|
5696 | },
|
5697 |
|
5698 |
|
5699 | less:function (n) {
|
5700 | this.unput(this.match.slice(n));
|
5701 | },
|
5702 |
|
5703 |
|
5704 | pastInput:function () {
|
5705 | var past = this.matched.substr(0, this.matched.length - this.match.length);
|
5706 | return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
|
5707 | },
|
5708 |
|
5709 |
|
5710 | upcomingInput:function () {
|
5711 | var next = this.match;
|
5712 | if (next.length < 20) {
|
5713 | next += this._input.substr(0, 20-next.length);
|
5714 | }
|
5715 | return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
|
5716 | },
|
5717 |
|
5718 |
|
5719 | showPosition:function () {
|
5720 | var pre = this.pastInput();
|
5721 | var c = new Array(pre.length + 1).join("-");
|
5722 | return pre + this.upcomingInput() + "\n" + c + "^";
|
5723 | },
|
5724 |
|
5725 |
|
5726 | test_match:function(match, indexed_rule) {
|
5727 | var token,
|
5728 | lines,
|
5729 | backup;
|
5730 |
|
5731 | if (this.options.backtrack_lexer) {
|
5732 |
|
5733 | backup = {
|
5734 | yylineno: this.yylineno,
|
5735 | yylloc: {
|
5736 | first_line: this.yylloc.first_line,
|
5737 | last_line: this.last_line,
|
5738 | first_column: this.yylloc.first_column,
|
5739 | last_column: this.yylloc.last_column
|
5740 | },
|
5741 | yytext: this.yytext,
|
5742 | match: this.match,
|
5743 | matches: this.matches,
|
5744 | matched: this.matched,
|
5745 | yyleng: this.yyleng,
|
5746 | offset: this.offset,
|
5747 | _more: this._more,
|
5748 | _input: this._input,
|
5749 | yy: this.yy,
|
5750 | conditionStack: this.conditionStack.slice(0),
|
5751 | done: this.done
|
5752 | };
|
5753 | if (this.options.ranges) {
|
5754 | backup.yylloc.range = this.yylloc.range.slice(0);
|
5755 | }
|
5756 | }
|
5757 |
|
5758 | lines = match[0].match(/(?:\r\n?|\n).*/g);
|
5759 | if (lines) {
|
5760 | this.yylineno += lines.length;
|
5761 | }
|
5762 | this.yylloc = {
|
5763 | first_line: this.yylloc.last_line,
|
5764 | last_line: this.yylineno + 1,
|
5765 | first_column: this.yylloc.last_column,
|
5766 | last_column: lines ?
|
5767 | lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
|
5768 | this.yylloc.last_column + match[0].length
|
5769 | };
|
5770 | this.yytext += match[0];
|
5771 | this.match += match[0];
|
5772 | this.matches = match;
|
5773 | this.yyleng = this.yytext.length;
|
5774 | if (this.options.ranges) {
|
5775 | this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
5776 | }
|
5777 | this._more = false;
|
5778 | this._backtrack = false;
|
5779 | this._input = this._input.slice(match[0].length);
|
5780 | this.matched += match[0];
|
5781 | token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
5782 | if (this.done && this._input) {
|
5783 | this.done = false;
|
5784 | }
|
5785 | if (token) {
|
5786 | return token;
|
5787 | } else if (this._backtrack) {
|
5788 |
|
5789 | for (var k in backup) {
|
5790 | this[k] = backup[k];
|
5791 | }
|
5792 | return false;
|
5793 | }
|
5794 | return false;
|
5795 | },
|
5796 |
|
5797 |
|
5798 | next:function () {
|
5799 | if (this.done) {
|
5800 | return this.EOF;
|
5801 | }
|
5802 | if (!this._input) {
|
5803 | this.done = true;
|
5804 | }
|
5805 |
|
5806 | var token,
|
5807 | match,
|
5808 | tempMatch,
|
5809 | index;
|
5810 | if (!this._more) {
|
5811 | this.yytext = '';
|
5812 | this.match = '';
|
5813 | }
|
5814 | var rules = this._currentRules();
|
5815 | for (var i = 0; i < rules.length; i++) {
|
5816 | tempMatch = this._input.match(this.rules[rules[i]]);
|
5817 | if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
5818 | match = tempMatch;
|
5819 | index = i;
|
5820 | if (this.options.backtrack_lexer) {
|
5821 | token = this.test_match(tempMatch, rules[i]);
|
5822 | if (token !== false) {
|
5823 | return token;
|
5824 | } else if (this._backtrack) {
|
5825 | match = false;
|
5826 | continue;
|
5827 | } else {
|
5828 |
|
5829 | return false;
|
5830 | }
|
5831 | } else if (!this.options.flex) {
|
5832 | break;
|
5833 | }
|
5834 | }
|
5835 | }
|
5836 | if (match) {
|
5837 | token = this.test_match(match, rules[index]);
|
5838 | if (token !== false) {
|
5839 | return token;
|
5840 | }
|
5841 |
|
5842 | return false;
|
5843 | }
|
5844 | if (this._input === "") {
|
5845 | return this.EOF;
|
5846 | } else {
|
5847 | return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
|
5848 | text: "",
|
5849 | token: null,
|
5850 | line: this.yylineno
|
5851 | });
|
5852 | }
|
5853 | },
|
5854 |
|
5855 |
|
5856 | lex:function lex () {
|
5857 | var r = this.next();
|
5858 | if (r) {
|
5859 | return r;
|
5860 | } else {
|
5861 | return this.lex();
|
5862 | }
|
5863 | },
|
5864 |
|
5865 |
|
5866 | begin:function begin (condition) {
|
5867 | this.conditionStack.push(condition);
|
5868 | },
|
5869 |
|
5870 |
|
5871 | popState:function popState () {
|
5872 | var n = this.conditionStack.length - 1;
|
5873 | if (n > 0) {
|
5874 | return this.conditionStack.pop();
|
5875 | } else {
|
5876 | return this.conditionStack[0];
|
5877 | }
|
5878 | },
|
5879 |
|
5880 |
|
5881 | _currentRules:function _currentRules () {
|
5882 | if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
5883 | return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
5884 | } else {
|
5885 | return this.conditions["INITIAL"].rules;
|
5886 | }
|
5887 | },
|
5888 |
|
5889 |
|
5890 | topState:function topState (n) {
|
5891 | n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
5892 | if (n >= 0) {
|
5893 | return this.conditionStack[n];
|
5894 | } else {
|
5895 | return "INITIAL";
|
5896 | }
|
5897 | },
|
5898 |
|
5899 |
|
5900 | pushState:function pushState (condition) {
|
5901 | this.begin(condition);
|
5902 | },
|
5903 |
|
5904 |
|
5905 | stateStackSize:function stateStackSize() {
|
5906 | return this.conditionStack.length;
|
5907 | },
|
5908 | options: {"case-insensitive":true},
|
5909 | performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
|
5910 | var YYSTATE=YY_START;
|
5911 | switch($avoiding_name_collisions) {
|
5912 | case 0:return 10;
|
5913 | break;
|
5914 | case 1:
|
5915 | break;
|
5916 | case 2:
|
5917 | break;
|
5918 | case 3:
|
5919 | break;
|
5920 | case 4:this.begin("href");
|
5921 | break;
|
5922 | case 5:this.popState();
|
5923 | break;
|
5924 | case 6:return 23;
|
5925 | break;
|
5926 | case 7:this.begin("callbackname");
|
5927 | break;
|
5928 | case 8:this.popState();
|
5929 | break;
|
5930 | case 9:this.popState(); this.begin("callbackargs");
|
5931 | break;
|
5932 | case 10:return 21;
|
5933 | break;
|
5934 | case 11:this.popState();
|
5935 | break;
|
5936 | case 12:return 22;
|
5937 | break;
|
5938 | case 13:this.begin("click");
|
5939 | break;
|
5940 | case 14:this.popState();
|
5941 | break;
|
5942 | case 15:return 20;
|
5943 | break;
|
5944 | case 16:return 4;
|
5945 | break;
|
5946 | case 17:return 11;
|
5947 | break;
|
5948 | case 18:return 12;
|
5949 | break;
|
5950 | case 19:return 13;
|
5951 | break;
|
5952 | case 20:return 14;
|
5953 | break;
|
5954 | case 21:return 'date';
|
5955 | break;
|
5956 | case 22:return 15;
|
5957 | break;
|
5958 | case 23:return 16;
|
5959 | break;
|
5960 | case 24:return 18;
|
5961 | break;
|
5962 | case 25:return 19;
|
5963 | break;
|
5964 | case 26:return ':';
|
5965 | break;
|
5966 | case 27:return 6;
|
5967 | break;
|
5968 | case 28:return 'INVALID';
|
5969 | break;
|
5970 | }
|
5971 | },
|
5972 | rules: [/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],
|
5973 | conditions: {"callbackargs":{"rules":[11,12],"inclusive":false},"callbackname":{"rules":[8,9,10],"inclusive":false},"href":{"rules":[5,6],"inclusive":false},"click":{"rules":[14,15],"inclusive":false},"INITIAL":{"rules":[0,1,2,3,4,7,13,16,17,18,19,20,21,22,23,24,25,26,27,28],"inclusive":true}}
|
5974 | });
|
5975 | return lexer;
|
5976 | })();
|
5977 | parser.lexer = lexer;
|
5978 | function Parser () {
|
5979 | this.yy = {};
|
5980 | }
|
5981 | Parser.prototype = parser;parser.Parser = Parser;
|
5982 | return new Parser;
|
5983 | })();
|
5984 |
|
5985 |
|
5986 | if (true) {
|
5987 | exports.parser = parser;
|
5988 | exports.Parser = parser.Parser;
|
5989 | exports.parse = function () { return parser.parse.apply(parser, arguments); };
|
5990 | exports.main = function commonjsMain (args) {
|
5991 | if (!args[1]) {
|
5992 | console.log('Usage: '+args[0]+' FILE');
|
5993 | process.exit(1);
|
5994 | }
|
5995 | var source = __webpack_require__( "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__( "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
|
5996 | return exports.parser.parse(source);
|
5997 | };
|
5998 | if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
|
5999 | exports.main(process.argv.slice(1));
|
6000 | }
|
6001 | }
|
6002 | }.call(this, __webpack_require__( "./node_modules/process/browser.js"), __webpack_require__( "./node_modules/webpack/buildin/module.js")(module)))
|
6003 |
|
6004 | }),
|
6005 |
|
6006 | "./src/diagrams/git/gitGraphAst.js":
|
6007 |
|
6008 |
|
6009 |
|
6010 |
|
6011 | (function(module, __webpack_exports__, __webpack_require__) {
|
6012 |
|
6013 | "use strict";
|
6014 | __webpack_require__.r(__webpack_exports__);
|
6015 | __webpack_require__.d(__webpack_exports__, "setDirection", function() { return setDirection; });
|
6016 | __webpack_require__.d(__webpack_exports__, "setOptions", function() { return setOptions; });
|
6017 | __webpack_require__.d(__webpack_exports__, "getOptions", function() { return getOptions; });
|
6018 | __webpack_require__.d(__webpack_exports__, "commit", function() { return commit; });
|
6019 | __webpack_require__.d(__webpack_exports__, "branch", function() { return branch; });
|
6020 | __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
|
6021 | __webpack_require__.d(__webpack_exports__, "checkout", function() { return checkout; });
|
6022 | __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; });
|
6023 | __webpack_require__.d(__webpack_exports__, "prettyPrint", function() { return prettyPrint; });
|
6024 | __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
|
6025 | __webpack_require__.d(__webpack_exports__, "getBranchesAsObjArray", function() { return getBranchesAsObjArray; });
|
6026 | __webpack_require__.d(__webpack_exports__, "getBranches", function() { return getBranches; });
|
6027 | __webpack_require__.d(__webpack_exports__, "getCommits", function() { return getCommits; });
|
6028 | __webpack_require__.d(__webpack_exports__, "getCommitsArray", function() { return getCommitsArray; });
|
6029 | __webpack_require__.d(__webpack_exports__, "getCurrentBranch", function() { return getCurrentBranch; });
|
6030 | __webpack_require__.d(__webpack_exports__, "getDirection", function() { return getDirection; });
|
6031 | __webpack_require__.d(__webpack_exports__, "getHead", function() { return getHead; });
|
6032 | var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "lodash");
|
6033 | var lodash__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);
|
6034 | var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./src/logger.js");
|
6035 |
|
6036 |
|
6037 | let commits = {};
|
6038 | let head = null;
|
6039 | let branches = {
|
6040 | master: head
|
6041 | };
|
6042 | let curBranch = 'master';
|
6043 | let direction = 'LR';
|
6044 | let seq = 0;
|
6045 |
|
6046 | function getRandomInt(min, max) {
|
6047 | return Math.floor(Math.random() * (max - min)) + min;
|
6048 | }
|
6049 |
|
6050 | function getId() {
|
6051 | const pool = '0123456789abcdef';
|
6052 | let id = '';
|
6053 |
|
6054 | for (let i = 0; i < 7; i++) {
|
6055 | id += pool[getRandomInt(0, 16)];
|
6056 | }
|
6057 |
|
6058 | return id;
|
6059 | }
|
6060 |
|
6061 | function isfastforwardable(currentCommit, otherCommit) {
|
6062 | _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('Entering isfastforwardable:', currentCommit.id, otherCommit.id);
|
6063 |
|
6064 | while (currentCommit.seq <= otherCommit.seq && currentCommit !== otherCommit) {
|
6065 |
|
6066 | if (otherCommit.parent == null) break;
|
6067 |
|
6068 | if (Array.isArray(otherCommit.parent)) {
|
6069 | _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('In merge commit:', otherCommit.parent);
|
6070 | return isfastforwardable(currentCommit, commits[otherCommit.parent[0]]) || isfastforwardable(currentCommit, commits[otherCommit.parent[1]]);
|
6071 | } else {
|
6072 | otherCommit = commits[otherCommit.parent];
|
6073 | }
|
6074 | }
|
6075 |
|
6076 | _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug(currentCommit.id, otherCommit.id);
|
6077 | return currentCommit.id === otherCommit.id;
|
6078 | }
|
6079 |
|
6080 | function isReachableFrom(currentCommit, otherCommit) {
|
6081 | const currentSeq = currentCommit.seq;
|
6082 | const otherSeq = otherCommit.seq;
|
6083 | if (currentSeq > otherSeq) return isfastforwardable(otherCommit, currentCommit);
|
6084 | return false;
|
6085 | }
|
6086 |
|
6087 | const setDirection = function (dir) {
|
6088 | direction = dir;
|
6089 | };
|
6090 | let options = {};
|
6091 | const setOptions = function (rawOptString) {
|
6092 | _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('options str', rawOptString);
|
6093 | rawOptString = rawOptString && rawOptString.trim();
|
6094 | rawOptString = rawOptString || '{}';
|
6095 |
|
6096 | try {
|
6097 | options = JSON.parse(rawOptString);
|
6098 | } catch (e) {
|
6099 | _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].error('error while parsing gitGraph options', e.message);
|
6100 | }
|
6101 | };
|
6102 | const getOptions = function () {
|
6103 | return options;
|
6104 | };
|
6105 | const commit = function (msg) {
|
6106 | const commit = {
|
6107 | id: getId(),
|
6108 | message: msg,
|
6109 | seq: seq++,
|
6110 | parent: head == null ? null : head.id
|
6111 | };
|
6112 | head = commit;
|
6113 | commits[commit.id] = commit;
|
6114 | branches[curBranch] = commit.id;
|
6115 | _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('in pushCommit ' + commit.id);
|
6116 | };
|
6117 | const branch = function (name) {
|
6118 | branches[name] = head != null ? head.id : null;
|
6119 | _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('in createBranch');
|
6120 | };
|
6121 | const merge = function (otherBranch) {
|
6122 | const currentCommit = commits[branches[curBranch]];
|
6123 | const otherCommit = commits[branches[otherBranch]];
|
6124 |
|
6125 | if (isReachableFrom(currentCommit, otherCommit)) {
|
6126 | _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('Already merged');
|
6127 | return;
|
6128 | }
|
6129 |
|
6130 | if (isfastforwardable(currentCommit, otherCommit)) {
|
6131 | branches[curBranch] = branches[otherBranch];
|
6132 | head = commits[branches[curBranch]];
|
6133 | } else {
|
6134 |
|
6135 | const commit = {
|
6136 | id: getId(),
|
6137 | message: 'merged branch ' + otherBranch + ' into ' + curBranch,
|
6138 | seq: seq++,
|
6139 | parent: [head == null ? null : head.id, branches[otherBranch]]
|
6140 | };
|
6141 | head = commit;
|
6142 | commits[commit.id] = commit;
|
6143 | branches[curBranch] = commit.id;
|
6144 | }
|
6145 |
|
6146 | _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug(branches);
|
6147 | _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('in mergeBranch');
|
6148 | };
|
6149 | const checkout = function (branch) {
|
6150 | _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('in checkout');
|
6151 | curBranch = branch;
|
6152 | const id = branches[curBranch];
|
6153 | head = commits[id];
|
6154 | };
|
6155 | const reset = function (commitRef) {
|
6156 | _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('in reset', commitRef);
|
6157 | const ref = commitRef.split(':')[0];
|
6158 | let parentCount = parseInt(commitRef.split(':')[1]);
|
6159 | let commit = ref === 'HEAD' ? head : commits[branches[ref]];
|
6160 | _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug(commit, parentCount);
|
6161 |
|
6162 | while (parentCount > 0) {
|
6163 | commit = commits[commit.parent];
|
6164 | parentCount--;
|
6165 |
|
6166 | if (!commit) {
|
6167 | const err = 'Critical error - unique parent commit not found during reset';
|
6168 | _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].error(err);
|
6169 | throw err;
|
6170 | }
|
6171 | }
|
6172 |
|
6173 | head = commit;
|
6174 | branches[curBranch] = commit.id;
|
6175 | };
|
6176 |
|
6177 | function upsert(arr, key, newval) {
|
6178 | const index = arr.indexOf(key);
|
6179 |
|
6180 | if (index === -1) {
|
6181 | arr.push(newval);
|
6182 | } else {
|
6183 | arr.splice(index, 1, newval);
|
6184 | }
|
6185 | }
|
6186 |
|
6187 | function prettyPrintCommitHistory(commitArr) {
|
6188 | const commit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.maxBy(commitArr, 'seq');
|
6189 |
|
6190 | let line = '';
|
6191 | commitArr.forEach(function (c) {
|
6192 | if (c === commit) {
|
6193 | line += '\t*';
|
6194 | } else {
|
6195 | line += '\t|';
|
6196 | }
|
6197 | });
|
6198 | const label = [line, commit.id, commit.seq];
|
6199 |
|
6200 | for (let branch in branches) {
|
6201 | if (branches[branch] === commit.id) label.push(branch);
|
6202 | }
|
6203 |
|
6204 | _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug(label.join(' '));
|
6205 |
|
6206 | if (Array.isArray(commit.parent)) {
|
6207 | const newCommit = commits[commit.parent[0]];
|
6208 | upsert(commitArr, commit, newCommit);
|
6209 | commitArr.push(commits[commit.parent[1]]);
|
6210 | } else if (commit.parent == null) {
|
6211 | return;
|
6212 | } else {
|
6213 | const nextCommit = commits[commit.parent];
|
6214 | upsert(commitArr, commit, nextCommit);
|
6215 | }
|
6216 |
|
6217 | commitArr = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniqBy(commitArr, 'id');
|
6218 | prettyPrintCommitHistory(commitArr);
|
6219 | }
|
6220 |
|
6221 | const prettyPrint = function () {
|
6222 | _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug(commits);
|
6223 | const node = getCommitsArray()[0];
|
6224 | prettyPrintCommitHistory([node]);
|
6225 | };
|
6226 | const clear = function () {
|
6227 | commits = {};
|
6228 | head = null;
|
6229 | branches = {
|
6230 | master: head
|
6231 | };
|
6232 | curBranch = 'master';
|
6233 | seq = 0;
|
6234 | };
|
6235 | const getBranchesAsObjArray = function () {
|
6236 | const branchArr = [];
|
6237 |
|
6238 | for (let branch in branches) {
|
6239 | branchArr.push({
|
6240 | name: branch,
|
6241 | commit: commits[branches[branch]]
|
6242 | });
|
6243 | }
|
6244 |
|
6245 | return branchArr;
|
6246 | };
|
6247 | const getBranches = function () {
|
6248 | return branches;
|
6249 | };
|
6250 | const getCommits = function () {
|
6251 | return commits;
|
6252 | };
|
6253 | const getCommitsArray = function () {
|
6254 | const commitArr = Object.keys(commits).map(function (key) {
|
6255 | return commits[key];
|
6256 | });
|
6257 | commitArr.forEach(function (o) {
|
6258 | _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug(o.id);
|
6259 | });
|
6260 | return lodash__WEBPACK_IMPORTED_MODULE_0___default.a.orderBy(commitArr, ['seq'], ['desc']);
|
6261 | };
|
6262 | const getCurrentBranch = function () {
|
6263 | return curBranch;
|
6264 | };
|
6265 | const getDirection = function () {
|
6266 | return direction;
|
6267 | };
|
6268 | const getHead = function () {
|
6269 | return head;
|
6270 | };
|
6271 | __webpack_exports__["default"] = ({
|
6272 | setDirection,
|
6273 | setOptions,
|
6274 | getOptions,
|
6275 | commit,
|
6276 | branch,
|
6277 | merge,
|
6278 | checkout,
|
6279 | reset,
|
6280 | prettyPrint,
|
6281 | clear,
|
6282 | getBranchesAsObjArray,
|
6283 | getBranches,
|
6284 | getCommits,
|
6285 | getCommitsArray,
|
6286 | getCurrentBranch,
|
6287 | getDirection,
|
6288 | getHead
|
6289 | });
|
6290 |
|
6291 | }),
|
6292 |
|
6293 | "./src/diagrams/git/gitGraphRenderer.js":
|
6294 |
|
6295 |
|
6296 |
|
6297 |
|
6298 | (function(module, __webpack_exports__, __webpack_require__) {
|
6299 |
|
6300 | "use strict";
|
6301 | __webpack_require__.r(__webpack_exports__);
|
6302 | __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
|
6303 | __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
|
6304 | var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "d3");
|
6305 | var d3__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
|
6306 | var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "lodash");
|
6307 | var lodash__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);
|
6308 | var _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./src/diagrams/git/gitGraphAst.js");
|
6309 | var _parser_gitGraph__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./src/diagrams/git/parser/gitGraph.jison");
|
6310 | var _parser_gitGraph__WEBPACK_IMPORTED_MODULE_3___default = __webpack_require__.n(_parser_gitGraph__WEBPACK_IMPORTED_MODULE_3__);
|
6311 | var _logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./src/logger.js");
|
6312 | var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__( "./src/utils.js");
|
6313 |
|
6314 |
|
6315 |
|
6316 |
|
6317 |
|
6318 |
|
6319 | let allCommitsDict = {};
|
6320 | let branchNum;
|
6321 | let config = {
|
6322 | nodeSpacing: 150,
|
6323 | nodeFillColor: 'yellow',
|
6324 | nodeStrokeWidth: 2,
|
6325 | nodeStrokeColor: 'grey',
|
6326 | lineStrokeWidth: 4,
|
6327 | branchOffset: 50,
|
6328 | lineColor: 'grey',
|
6329 | leftMargin: 50,
|
6330 | branchColors: ['#442f74', '#983351', '#609732', '#AA9A39'],
|
6331 | nodeRadius: 10,
|
6332 | nodeLabel: {
|
6333 | width: 75,
|
6334 | height: 100,
|
6335 | x: -25,
|
6336 | y: 0
|
6337 | }
|
6338 | };
|
6339 | let apiConfig = {};
|
6340 | const setConf = function (c) {
|
6341 | apiConfig = c;
|
6342 | };
|
6343 |
|
6344 | function svgCreateDefs(svg) {
|
6345 | svg.append('defs').append('g').attr('id', 'def-commit').append('circle').attr('r', config.nodeRadius).attr('cx', 0).attr('cy', 0);
|
6346 | svg.select('#def-commit').append('foreignObject').attr('width', config.nodeLabel.width).attr('height', config.nodeLabel.height).attr('x', config.nodeLabel.x).attr('y', config.nodeLabel.y).attr('class', 'node-label').attr('requiredFeatures', 'http://www.w3.org/TR/SVG11/feature#Extensibility').append('p').html('');
|
6347 | }
|
6348 |
|
6349 | function svgDrawLine(svg, points, colorIdx, interpolate) {
|
6350 | const curve = Object(_utils__WEBPACK_IMPORTED_MODULE_5__["interpolateToCurve"])(interpolate, d3__WEBPACK_IMPORTED_MODULE_0__["curveBasis"]);
|
6351 | const color = config.branchColors[colorIdx % config.branchColors.length];
|
6352 | const lineGen = d3__WEBPACK_IMPORTED_MODULE_0__["line"]().x(function (d) {
|
6353 | return Math.round(d.x);
|
6354 | }).y(function (d) {
|
6355 | return Math.round(d.y);
|
6356 | }).curve(curve);
|
6357 | svg.append('svg:path').attr('d', lineGen(points)).style('stroke', color).style('stroke-width', config.lineStrokeWidth).style('fill', 'none');
|
6358 | }
|
6359 |
|
6360 |
|
6361 | function getElementCoords(element, coords) {
|
6362 | coords = coords || element.node().getBBox();
|
6363 | const ctm = element.node().getCTM();
|
6364 | const xn = ctm.e + coords.x * ctm.a;
|
6365 | const yn = ctm.f + coords.y * ctm.d;
|
6366 | return {
|
6367 | left: xn,
|
6368 | top: yn,
|
6369 | width: coords.width,
|
6370 | height: coords.height
|
6371 | };
|
6372 | }
|
6373 |
|
6374 | function svgDrawLineForCommits(svg, fromId, toId, direction, color) {
|
6375 | _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('svgDrawLineForCommits: ', fromId, toId);
|
6376 | const fromBbox = getElementCoords(svg.select('#node-' + fromId + ' circle'));
|
6377 | const toBbox = getElementCoords(svg.select('#node-' + toId + ' circle'));
|
6378 |
|
6379 | switch (direction) {
|
6380 | case 'LR':
|
6381 |
|
6382 |
|
6383 |
|
6384 | if (fromBbox.left - toBbox.left > config.nodeSpacing) {
|
6385 | const lineStart = {
|
6386 | x: fromBbox.left - config.nodeSpacing,
|
6387 | y: toBbox.top + toBbox.height / 2
|
6388 | };
|
6389 | const lineEnd = {
|
6390 | x: toBbox.left + toBbox.width,
|
6391 | y: toBbox.top + toBbox.height / 2
|
6392 | };
|
6393 | svgDrawLine(svg, [lineStart, lineEnd], color, 'linear');
|
6394 | svgDrawLine(svg, [{
|
6395 | x: fromBbox.left,
|
6396 | y: fromBbox.top + fromBbox.height / 2
|
6397 | }, {
|
6398 | x: fromBbox.left - config.nodeSpacing / 2,
|
6399 | y: fromBbox.top + fromBbox.height / 2
|
6400 | }, {
|
6401 | x: fromBbox.left - config.nodeSpacing / 2,
|
6402 | y: lineStart.y
|
6403 | }, lineStart], color);
|
6404 | } else {
|
6405 | svgDrawLine(svg, [{
|
6406 | x: fromBbox.left,
|
6407 | y: fromBbox.top + fromBbox.height / 2
|
6408 | }, {
|
6409 | x: fromBbox.left - config.nodeSpacing / 2,
|
6410 | y: fromBbox.top + fromBbox.height / 2
|
6411 | }, {
|
6412 | x: fromBbox.left - config.nodeSpacing / 2,
|
6413 | y: toBbox.top + toBbox.height / 2
|
6414 | }, {
|
6415 | x: toBbox.left + toBbox.width,
|
6416 | y: toBbox.top + toBbox.height / 2
|
6417 | }], color);
|
6418 | }
|
6419 |
|
6420 | break;
|
6421 |
|
6422 | case 'BT':
|
6423 |
|
6424 |
|
6425 |
|
6426 |
|
6427 | if (toBbox.top - fromBbox.top > config.nodeSpacing) {
|
6428 | const lineStart = {
|
6429 | x: toBbox.left + toBbox.width / 2,
|
6430 | y: fromBbox.top + fromBbox.height + config.nodeSpacing
|
6431 | };
|
6432 | const lineEnd = {
|
6433 | x: toBbox.left + toBbox.width / 2,
|
6434 | y: toBbox.top
|
6435 | };
|
6436 | svgDrawLine(svg, [lineStart, lineEnd], color, 'linear');
|
6437 | svgDrawLine(svg, [{
|
6438 | x: fromBbox.left + fromBbox.width / 2,
|
6439 | y: fromBbox.top + fromBbox.height
|
6440 | }, {
|
6441 | x: fromBbox.left + fromBbox.width / 2,
|
6442 | y: fromBbox.top + fromBbox.height + config.nodeSpacing / 2
|
6443 | }, {
|
6444 | x: toBbox.left + toBbox.width / 2,
|
6445 | y: lineStart.y - config.nodeSpacing / 2
|
6446 | }, lineStart], color);
|
6447 | } else {
|
6448 | svgDrawLine(svg, [{
|
6449 | x: fromBbox.left + fromBbox.width / 2,
|
6450 | y: fromBbox.top + fromBbox.height
|
6451 | }, {
|
6452 | x: fromBbox.left + fromBbox.width / 2,
|
6453 | y: fromBbox.top + config.nodeSpacing / 2
|
6454 | }, {
|
6455 | x: toBbox.left + toBbox.width / 2,
|
6456 | y: toBbox.top - config.nodeSpacing / 2
|
6457 | }, {
|
6458 | x: toBbox.left + toBbox.width / 2,
|
6459 | y: toBbox.top
|
6460 | }], color);
|
6461 | }
|
6462 |
|
6463 | break;
|
6464 | }
|
6465 | }
|
6466 |
|
6467 | function cloneNode(svg, selector) {
|
6468 | return svg.select(selector).node().cloneNode(true);
|
6469 | }
|
6470 |
|
6471 | function renderCommitHistory(svg, commitid, branches, direction) {
|
6472 | let commit;
|
6473 | const numCommits = Object.keys(allCommitsDict).length;
|
6474 |
|
6475 | if (typeof commitid === 'string') {
|
6476 | do {
|
6477 | commit = allCommitsDict[commitid];
|
6478 | _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('in renderCommitHistory', commit.id, commit.seq);
|
6479 |
|
6480 | if (svg.select('#node-' + commitid).size() > 0) {
|
6481 | return;
|
6482 | }
|
6483 |
|
6484 | svg.append(function () {
|
6485 | return cloneNode(svg, '#def-commit');
|
6486 | }).attr('class', 'commit').attr('id', function () {
|
6487 | return 'node-' + commit.id;
|
6488 | }).attr('transform', function () {
|
6489 | switch (direction) {
|
6490 | case 'LR':
|
6491 | return 'translate(' + (commit.seq * config.nodeSpacing + config.leftMargin) + ', ' + branchNum * config.branchOffset + ')';
|
6492 |
|
6493 | case 'BT':
|
6494 | return 'translate(' + (branchNum * config.branchOffset + config.leftMargin) + ', ' + (numCommits - commit.seq) * config.nodeSpacing + ')';
|
6495 | }
|
6496 | }).attr('fill', config.nodeFillColor).attr('stroke', config.nodeStrokeColor).attr('stroke-width', config.nodeStrokeWidth);
|
6497 | let branch;
|
6498 |
|
6499 | for (let branchName in branches) {
|
6500 | if (branches[branchName].commit === commit) {
|
6501 | branch = branches[branchName];
|
6502 | break;
|
6503 | }
|
6504 | }
|
6505 |
|
6506 | if (branch) {
|
6507 | _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('found branch ', branch.name);
|
6508 | svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'branch-label').text(branch.name + ', ');
|
6509 | }
|
6510 |
|
6511 | svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'commit-id').text(commit.id);
|
6512 |
|
6513 | if (commit.message !== '' && direction === 'BT') {
|
6514 | svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'commit-msg').text(', ' + commit.message);
|
6515 | }
|
6516 |
|
6517 | commitid = commit.parent;
|
6518 | } while (commitid && allCommitsDict[commitid]);
|
6519 | }
|
6520 |
|
6521 | if (Array.isArray(commitid)) {
|
6522 | _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('found merge commmit', commitid);
|
6523 | renderCommitHistory(svg, commitid[0], branches, direction);
|
6524 | branchNum++;
|
6525 | renderCommitHistory(svg, commitid[1], branches, direction);
|
6526 | branchNum--;
|
6527 | }
|
6528 | }
|
6529 |
|
6530 | function renderLines(svg, commit, direction, branchColor) {
|
6531 | branchColor = branchColor || 0;
|
6532 |
|
6533 | while (commit.seq > 0 && !commit.lineDrawn) {
|
6534 | if (typeof commit.parent === 'string') {
|
6535 | svgDrawLineForCommits(svg, commit.id, commit.parent, direction, branchColor);
|
6536 | commit.lineDrawn = true;
|
6537 | commit = allCommitsDict[commit.parent];
|
6538 | } else if (Array.isArray(commit.parent)) {
|
6539 | svgDrawLineForCommits(svg, commit.id, commit.parent[0], direction, branchColor);
|
6540 | svgDrawLineForCommits(svg, commit.id, commit.parent[1], direction, branchColor + 1);
|
6541 | renderLines(svg, allCommitsDict[commit.parent[1]], direction, branchColor + 1);
|
6542 | commit.lineDrawn = true;
|
6543 | commit = allCommitsDict[commit.parent[0]];
|
6544 | }
|
6545 | }
|
6546 | }
|
6547 |
|
6548 | const draw = function (txt, id, ver) {
|
6549 | try {
|
6550 | const parser = _parser_gitGraph__WEBPACK_IMPORTED_MODULE_3___default.a.parser;
|
6551 | parser.yy = _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"];
|
6552 | _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('in gitgraph renderer', txt, id, ver);
|
6553 |
|
6554 | parser.parse(txt + '\n');
|
6555 | config = lodash__WEBPACK_IMPORTED_MODULE_1___default.a.assign(config, apiConfig, _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"].getOptions());
|
6556 | _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('effective options', config);
|
6557 | const direction = _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"].getDirection();
|
6558 | allCommitsDict = _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"].getCommits();
|
6559 | const branches = _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"].getBranchesAsObjArray();
|
6560 |
|
6561 | if (direction === 'BT') {
|
6562 | config.nodeLabel.x = branches.length * config.branchOffset;
|
6563 | config.nodeLabel.width = '100%';
|
6564 | config.nodeLabel.y = -1 * 2 * config.nodeRadius;
|
6565 | }
|
6566 |
|
6567 | const svg = d3__WEBPACK_IMPORTED_MODULE_0__["select"](`[id="${id}"]`);
|
6568 | svgCreateDefs(svg);
|
6569 | branchNum = 1;
|
6570 |
|
6571 | for (let branch in branches) {
|
6572 | const v = branches[branch];
|
6573 | renderCommitHistory(svg, v.commit.id, branches, direction);
|
6574 | renderLines(svg, v.commit, direction);
|
6575 | branchNum++;
|
6576 | }
|
6577 |
|
6578 | svg.attr('height', function () {
|
6579 | if (direction === 'BT') return Object.keys(allCommitsDict).length * config.nodeSpacing;
|
6580 | return (branches.length + 1) * config.branchOffset;
|
6581 | });
|
6582 | } catch (e) {
|
6583 | _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].error('Error while rendering gitgraph');
|
6584 | _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].error(e.message);
|
6585 | }
|
6586 | };
|
6587 | __webpack_exports__["default"] = ({
|
6588 | setConf,
|
6589 | draw
|
6590 | });
|
6591 |
|
6592 | }),
|
6593 |
|
6594 | "./src/diagrams/git/parser/gitGraph.jison":
|
6595 |
|
6596 |
|
6597 |
|
6598 |
|
6599 | (function(module, exports, __webpack_require__) {
|
6600 |
|
6601 | (function(process, module) {
|
6602 |
|
6603 |
|
6604 |
|
6605 |
|
6606 |
|
6607 |
|
6608 |
|
6609 |
|
6610 |
|
6611 |
|
6612 |
|
6613 |
|
6614 |
|
6615 |
|
6616 |
|
6617 |
|
6618 |
|
6619 |
|
6620 |
|
6621 |
|
6622 |
|
6623 |
|
6624 |
|
6625 |
|
6626 |
|
6627 |
|
6628 |
|
6629 |
|
6630 |
|
6631 |
|
6632 |
|
6633 |
|
6634 |
|
6635 |
|
6636 |
|
6637 |
|
6638 |
|
6639 |
|
6640 |
|
6641 |
|
6642 |
|
6643 |
|
6644 |
|
6645 |
|
6646 |
|
6647 |
|
6648 |
|
6649 |
|
6650 |
|
6651 |
|
6652 |
|
6653 |
|
6654 |
|
6655 |
|
6656 |
|
6657 |
|
6658 |
|
6659 |
|
6660 |
|
6661 |
|
6662 |
|
6663 |
|
6664 |
|
6665 |
|
6666 |
|
6667 |
|
6668 |
|
6669 |
|
6670 |
|
6671 |
|
6672 |
|
6673 |
|
6674 | var parser = (function(){
|
6675 | var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[2,3],$V1=[1,7],$V2=[7,12,15,17,19,20,21],$V3=[7,11,12,15,17,19,20,21],$V4=[2,20],$V5=[1,32];
|
6676 | var parser = {trace: function trace () { },
|
6677 | yy: {},
|
6678 | symbols_: {"error":2,"start":3,"GG":4,":":5,"document":6,"EOF":7,"DIR":8,"options":9,"body":10,"OPT":11,"NL":12,"line":13,"statement":14,"COMMIT":15,"commit_arg":16,"BRANCH":17,"ID":18,"CHECKOUT":19,"MERGE":20,"RESET":21,"reset_arg":22,"STR":23,"HEAD":24,"reset_parents":25,"CARET":26,"$accept":0,"$end":1},
|
6679 | terminals_: {2:"error",4:"GG",5:":",7:"EOF",8:"DIR",11:"OPT",12:"NL",15:"COMMIT",17:"BRANCH",18:"ID",19:"CHECKOUT",20:"MERGE",21:"RESET",23:"STR",24:"HEAD",26:"CARET"},
|
6680 | productions_: [0,[3,4],[3,5],[6,0],[6,2],[9,2],[9,1],[10,0],[10,2],[13,2],[13,1],[14,2],[14,2],[14,2],[14,2],[14,2],[16,0],[16,1],[22,2],[22,2],[25,0],[25,2]],
|
6681 | performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
|
6682 |
|
6683 |
|
6684 | var $0 = $$.length - 1;
|
6685 | switch (yystate) {
|
6686 | case 1:
|
6687 | return $$[$0-1];
|
6688 | break;
|
6689 | case 2:
|
6690 | yy.setDirection($$[$0-3]); return $$[$0-1];
|
6691 | break;
|
6692 | case 4:
|
6693 | yy.setOptions($$[$0-1]); this.$ = $$[$0]
|
6694 | break;
|
6695 | case 5:
|
6696 | $$[$0-1] +=$$[$0]; this.$=$$[$0-1]
|
6697 | break;
|
6698 | case 7:
|
6699 | this.$ = []
|
6700 | break;
|
6701 | case 8:
|
6702 | $$[$0-1].push($$[$0]); this.$=$$[$0-1];
|
6703 | break;
|
6704 | case 9:
|
6705 | this.$ =$$[$0-1]
|
6706 | break;
|
6707 | case 11:
|
6708 | yy.commit($$[$0])
|
6709 | break;
|
6710 | case 12:
|
6711 | yy.branch($$[$0])
|
6712 | break;
|
6713 | case 13:
|
6714 | yy.checkout($$[$0])
|
6715 | break;
|
6716 | case 14:
|
6717 | yy.merge($$[$0])
|
6718 | break;
|
6719 | case 15:
|
6720 | yy.reset($$[$0])
|
6721 | break;
|
6722 | case 16:
|
6723 | this.$ = ""
|
6724 | break;
|
6725 | case 17:
|
6726 | this.$=$$[$0]
|
6727 | break;
|
6728 | case 18:
|
6729 | this.$ = $$[$0-1]+ ":" + $$[$0]
|
6730 | break;
|
6731 | case 19:
|
6732 | this.$ = $$[$0-1]+ ":" + yy.count; yy.count = 0
|
6733 | break;
|
6734 | case 20:
|
6735 | yy.count = 0
|
6736 | break;
|
6737 | case 21:
|
6738 | yy.count += 1
|
6739 | break;
|
6740 | }
|
6741 | },
|
6742 | table: [{3:1,4:[1,2]},{1:[3]},{5:[1,3],8:[1,4]},{6:5,7:$V0,9:6,12:$V1},{5:[1,8]},{7:[1,9]},o($V2,[2,7],{10:10,11:[1,11]}),o($V3,[2,6]),{6:12,7:$V0,9:6,12:$V1},{1:[2,1]},{7:[2,4],12:[1,15],13:13,14:14,15:[1,16],17:[1,17],19:[1,18],20:[1,19],21:[1,20]},o($V3,[2,5]),{7:[1,21]},o($V2,[2,8]),{12:[1,22]},o($V2,[2,10]),{12:[2,16],16:23,23:[1,24]},{18:[1,25]},{18:[1,26]},{18:[1,27]},{18:[1,30],22:28,24:[1,29]},{1:[2,2]},o($V2,[2,9]),{12:[2,11]},{12:[2,17]},{12:[2,12]},{12:[2,13]},{12:[2,14]},{12:[2,15]},{12:$V4,25:31,26:$V5},{12:$V4,25:33,26:$V5},{12:[2,18]},{12:$V4,25:34,26:$V5},{12:[2,19]},{12:[2,21]}],
|
6743 | defaultActions: {9:[2,1],21:[2,2],23:[2,11],24:[2,17],25:[2,12],26:[2,13],27:[2,14],28:[2,15],31:[2,18],33:[2,19],34:[2,21]},
|
6744 | parseError: function parseError (str, hash) {
|
6745 | if (hash.recoverable) {
|
6746 | this.trace(str);
|
6747 | } else {
|
6748 | var error = new Error(str);
|
6749 | error.hash = hash;
|
6750 | throw error;
|
6751 | }
|
6752 | },
|
6753 | parse: function parse(input) {
|
6754 | var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
|
6755 | var args = lstack.slice.call(arguments, 1);
|
6756 | var lexer = Object.create(this.lexer);
|
6757 | var sharedState = { yy: {} };
|
6758 | for (var k in this.yy) {
|
6759 | if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
6760 | sharedState.yy[k] = this.yy[k];
|
6761 | }
|
6762 | }
|
6763 | lexer.setInput(input, sharedState.yy);
|
6764 | sharedState.yy.lexer = lexer;
|
6765 | sharedState.yy.parser = this;
|
6766 | if (typeof lexer.yylloc == 'undefined') {
|
6767 | lexer.yylloc = {};
|
6768 | }
|
6769 | var yyloc = lexer.yylloc;
|
6770 | lstack.push(yyloc);
|
6771 | var ranges = lexer.options && lexer.options.ranges;
|
6772 | if (typeof sharedState.yy.parseError === 'function') {
|
6773 | this.parseError = sharedState.yy.parseError;
|
6774 | } else {
|
6775 | this.parseError = Object.getPrototypeOf(this).parseError;
|
6776 | }
|
6777 | function popStack(n) {
|
6778 | stack.length = stack.length - 2 * n;
|
6779 | vstack.length = vstack.length - n;
|
6780 | lstack.length = lstack.length - n;
|
6781 | }
|
6782 | function lex() {
|
6783 | var token;
|
6784 | token = tstack.pop() || lexer.lex() || EOF;
|
6785 | if (typeof token !== 'number') {
|
6786 | if (token instanceof Array) {
|
6787 | tstack = token;
|
6788 | token = tstack.pop();
|
6789 | }
|
6790 | token = self.symbols_[token] || token;
|
6791 | }
|
6792 | return token;
|
6793 | }
|
6794 | var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
|
6795 | while (true) {
|
6796 | state = stack[stack.length - 1];
|
6797 | if (this.defaultActions[state]) {
|
6798 | action = this.defaultActions[state];
|
6799 | } else {
|
6800 | if (symbol === null || typeof symbol == 'undefined') {
|
6801 | symbol = lex();
|
6802 | }
|
6803 | action = table[state] && table[state][symbol];
|
6804 | }
|
6805 | if (typeof action === 'undefined' || !action.length || !action[0]) {
|
6806 | var errStr = '';
|
6807 | expected = [];
|
6808 | for (p in table[state]) {
|
6809 | if (this.terminals_[p] && p > TERROR) {
|
6810 | expected.push('\'' + this.terminals_[p] + '\'');
|
6811 | }
|
6812 | }
|
6813 | if (lexer.showPosition) {
|
6814 | errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
|
6815 | } else {
|
6816 | errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
|
6817 | }
|
6818 | this.parseError(errStr, {
|
6819 | text: lexer.match,
|
6820 | token: this.terminals_[symbol] || symbol,
|
6821 | line: lexer.yylineno,
|
6822 | loc: yyloc,
|
6823 | expected: expected
|
6824 | });
|
6825 | }
|
6826 | if (action[0] instanceof Array && action.length > 1) {
|
6827 | throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
|
6828 | }
|
6829 | switch (action[0]) {
|
6830 | case 1:
|
6831 | stack.push(symbol);
|
6832 | vstack.push(lexer.yytext);
|
6833 | lstack.push(lexer.yylloc);
|
6834 | stack.push(action[1]);
|
6835 | symbol = null;
|
6836 | if (!preErrorSymbol) {
|
6837 | yyleng = lexer.yyleng;
|
6838 | yytext = lexer.yytext;
|
6839 | yylineno = lexer.yylineno;
|
6840 | yyloc = lexer.yylloc;
|
6841 | if (recovering > 0) {
|
6842 | recovering--;
|
6843 | }
|
6844 | } else {
|
6845 | symbol = preErrorSymbol;
|
6846 | preErrorSymbol = null;
|
6847 | }
|
6848 | break;
|
6849 | case 2:
|
6850 | len = this.productions_[action[1]][1];
|
6851 | yyval.$ = vstack[vstack.length - len];
|
6852 | yyval._$ = {
|
6853 | first_line: lstack[lstack.length - (len || 1)].first_line,
|
6854 | last_line: lstack[lstack.length - 1].last_line,
|
6855 | first_column: lstack[lstack.length - (len || 1)].first_column,
|
6856 | last_column: lstack[lstack.length - 1].last_column
|
6857 | };
|
6858 | if (ranges) {
|
6859 | yyval._$.range = [
|
6860 | lstack[lstack.length - (len || 1)].range[0],
|
6861 | lstack[lstack.length - 1].range[1]
|
6862 | ];
|
6863 | }
|
6864 | r = this.performAction.apply(yyval, [
|
6865 | yytext,
|
6866 | yyleng,
|
6867 | yylineno,
|
6868 | sharedState.yy,
|
6869 | action[1],
|
6870 | vstack,
|
6871 | lstack
|
6872 | ].concat(args));
|
6873 | if (typeof r !== 'undefined') {
|
6874 | return r;
|
6875 | }
|
6876 | if (len) {
|
6877 | stack = stack.slice(0, -1 * len * 2);
|
6878 | vstack = vstack.slice(0, -1 * len);
|
6879 | lstack = lstack.slice(0, -1 * len);
|
6880 | }
|
6881 | stack.push(this.productions_[action[1]][0]);
|
6882 | vstack.push(yyval.$);
|
6883 | lstack.push(yyval._$);
|
6884 | newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
6885 | stack.push(newState);
|
6886 | break;
|
6887 | case 3:
|
6888 | return true;
|
6889 | }
|
6890 | }
|
6891 | return true;
|
6892 | }};
|
6893 |
|
6894 | var lexer = (function(){
|
6895 | var lexer = ({
|
6896 |
|
6897 | EOF:1,
|
6898 |
|
6899 | parseError:function parseError(str, hash) {
|
6900 | if (this.yy.parser) {
|
6901 | this.yy.parser.parseError(str, hash);
|
6902 | } else {
|
6903 | throw new Error(str);
|
6904 | }
|
6905 | },
|
6906 |
|
6907 |
|
6908 | setInput:function (input, yy) {
|
6909 | this.yy = yy || this.yy || {};
|
6910 | this._input = input;
|
6911 | this._more = this._backtrack = this.done = false;
|
6912 | this.yylineno = this.yyleng = 0;
|
6913 | this.yytext = this.matched = this.match = '';
|
6914 | this.conditionStack = ['INITIAL'];
|
6915 | this.yylloc = {
|
6916 | first_line: 1,
|
6917 | first_column: 0,
|
6918 | last_line: 1,
|
6919 | last_column: 0
|
6920 | };
|
6921 | if (this.options.ranges) {
|
6922 | this.yylloc.range = [0,0];
|
6923 | }
|
6924 | this.offset = 0;
|
6925 | return this;
|
6926 | },
|
6927 |
|
6928 |
|
6929 | input:function () {
|
6930 | var ch = this._input[0];
|
6931 | this.yytext += ch;
|
6932 | this.yyleng++;
|
6933 | this.offset++;
|
6934 | this.match += ch;
|
6935 | this.matched += ch;
|
6936 | var lines = ch.match(/(?:\r\n?|\n).*/g);
|
6937 | if (lines) {
|
6938 | this.yylineno++;
|
6939 | this.yylloc.last_line++;
|
6940 | } else {
|
6941 | this.yylloc.last_column++;
|
6942 | }
|
6943 | if (this.options.ranges) {
|
6944 | this.yylloc.range[1]++;
|
6945 | }
|
6946 |
|
6947 | this._input = this._input.slice(1);
|
6948 | return ch;
|
6949 | },
|
6950 |
|
6951 |
|
6952 | unput:function (ch) {
|
6953 | var len = ch.length;
|
6954 | var lines = ch.split(/(?:\r\n?|\n)/g);
|
6955 |
|
6956 | this._input = ch + this._input;
|
6957 | this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
6958 |
|
6959 | this.offset -= len;
|
6960 | var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
6961 | this.match = this.match.substr(0, this.match.length - 1);
|
6962 | this.matched = this.matched.substr(0, this.matched.length - 1);
|
6963 |
|
6964 | if (lines.length - 1) {
|
6965 | this.yylineno -= lines.length - 1;
|
6966 | }
|
6967 | var r = this.yylloc.range;
|
6968 |
|
6969 | this.yylloc = {
|
6970 | first_line: this.yylloc.first_line,
|
6971 | last_line: this.yylineno + 1,
|
6972 | first_column: this.yylloc.first_column,
|
6973 | last_column: lines ?
|
6974 | (lines.length === oldLines.length ? this.yylloc.first_column : 0)
|
6975 | + oldLines[oldLines.length - lines.length].length - lines[0].length :
|
6976 | this.yylloc.first_column - len
|
6977 | };
|
6978 |
|
6979 | if (this.options.ranges) {
|
6980 | this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
6981 | }
|
6982 | this.yyleng = this.yytext.length;
|
6983 | return this;
|
6984 | },
|
6985 |
|
6986 |
|
6987 | more:function () {
|
6988 | this._more = true;
|
6989 | return this;
|
6990 | },
|
6991 |
|
6992 |
|
6993 | reject:function () {
|
6994 | if (this.options.backtrack_lexer) {
|
6995 | this._backtrack = true;
|
6996 | } else {
|
6997 | return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), {
|
6998 | text: "",
|
6999 | token: null,
|
7000 | line: this.yylineno
|
7001 | });
|
7002 |
|
7003 | }
|
7004 | return this;
|
7005 | },
|
7006 |
|
7007 |
|
7008 | less:function (n) {
|
7009 | this.unput(this.match.slice(n));
|
7010 | },
|
7011 |
|
7012 |
|
7013 | pastInput:function () {
|
7014 | var past = this.matched.substr(0, this.matched.length - this.match.length);
|
7015 | return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
|
7016 | },
|
7017 |
|
7018 |
|
7019 | upcomingInput:function () {
|
7020 | var next = this.match;
|
7021 | if (next.length < 20) {
|
7022 | next += this._input.substr(0, 20-next.length);
|
7023 | }
|
7024 | return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
|
7025 | },
|
7026 |
|
7027 |
|
7028 | showPosition:function () {
|
7029 | var pre = this.pastInput();
|
7030 | var c = new Array(pre.length + 1).join("-");
|
7031 | return pre + this.upcomingInput() + "\n" + c + "^";
|
7032 | },
|
7033 |
|
7034 |
|
7035 | test_match:function(match, indexed_rule) {
|
7036 | var token,
|
7037 | lines,
|
7038 | backup;
|
7039 |
|
7040 | if (this.options.backtrack_lexer) {
|
7041 |
|
7042 | backup = {
|
7043 | yylineno: this.yylineno,
|
7044 | yylloc: {
|
7045 | first_line: this.yylloc.first_line,
|
7046 | last_line: this.last_line,
|
7047 | first_column: this.yylloc.first_column,
|
7048 | last_column: this.yylloc.last_column
|
7049 | },
|
7050 | yytext: this.yytext,
|
7051 | match: this.match,
|
7052 | matches: this.matches,
|
7053 | matched: this.matched,
|
7054 | yyleng: this.yyleng,
|
7055 | offset: this.offset,
|
7056 | _more: this._more,
|
7057 | _input: this._input,
|
7058 | yy: this.yy,
|
7059 | conditionStack: this.conditionStack.slice(0),
|
7060 | done: this.done
|
7061 | };
|
7062 | if (this.options.ranges) {
|
7063 | backup.yylloc.range = this.yylloc.range.slice(0);
|
7064 | }
|
7065 | }
|
7066 |
|
7067 | lines = match[0].match(/(?:\r\n?|\n).*/g);
|
7068 | if (lines) {
|
7069 | this.yylineno += lines.length;
|
7070 | }
|
7071 | this.yylloc = {
|
7072 | first_line: this.yylloc.last_line,
|
7073 | last_line: this.yylineno + 1,
|
7074 | first_column: this.yylloc.last_column,
|
7075 | last_column: lines ?
|
7076 | lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
|
7077 | this.yylloc.last_column + match[0].length
|
7078 | };
|
7079 | this.yytext += match[0];
|
7080 | this.match += match[0];
|
7081 | this.matches = match;
|
7082 | this.yyleng = this.yytext.length;
|
7083 | if (this.options.ranges) {
|
7084 | this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
7085 | }
|
7086 | this._more = false;
|
7087 | this._backtrack = false;
|
7088 | this._input = this._input.slice(match[0].length);
|
7089 | this.matched += match[0];
|
7090 | token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
7091 | if (this.done && this._input) {
|
7092 | this.done = false;
|
7093 | }
|
7094 | if (token) {
|
7095 | return token;
|
7096 | } else if (this._backtrack) {
|
7097 |
|
7098 | for (var k in backup) {
|
7099 | this[k] = backup[k];
|
7100 | }
|
7101 | return false;
|
7102 | }
|
7103 | return false;
|
7104 | },
|
7105 |
|
7106 |
|
7107 | next:function () {
|
7108 | if (this.done) {
|
7109 | return this.EOF;
|
7110 | }
|
7111 | if (!this._input) {
|
7112 | this.done = true;
|
7113 | }
|
7114 |
|
7115 | var token,
|
7116 | match,
|
7117 | tempMatch,
|
7118 | index;
|
7119 | if (!this._more) {
|
7120 | this.yytext = '';
|
7121 | this.match = '';
|
7122 | }
|
7123 | var rules = this._currentRules();
|
7124 | for (var i = 0; i < rules.length; i++) {
|
7125 | tempMatch = this._input.match(this.rules[rules[i]]);
|
7126 | if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
7127 | match = tempMatch;
|
7128 | index = i;
|
7129 | if (this.options.backtrack_lexer) {
|
7130 | token = this.test_match(tempMatch, rules[i]);
|
7131 | if (token !== false) {
|
7132 | return token;
|
7133 | } else if (this._backtrack) {
|
7134 | match = false;
|
7135 | continue;
|
7136 | } else {
|
7137 |
|
7138 | return false;
|
7139 | }
|
7140 | } else if (!this.options.flex) {
|
7141 | break;
|
7142 | }
|
7143 | }
|
7144 | }
|
7145 | if (match) {
|
7146 | token = this.test_match(match, rules[index]);
|
7147 | if (token !== false) {
|
7148 | return token;
|
7149 | }
|
7150 |
|
7151 | return false;
|
7152 | }
|
7153 | if (this._input === "") {
|
7154 | return this.EOF;
|
7155 | } else {
|
7156 | return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
|
7157 | text: "",
|
7158 | token: null,
|
7159 | line: this.yylineno
|
7160 | });
|
7161 | }
|
7162 | },
|
7163 |
|
7164 |
|
7165 | lex:function lex () {
|
7166 | var r = this.next();
|
7167 | if (r) {
|
7168 | return r;
|
7169 | } else {
|
7170 | return this.lex();
|
7171 | }
|
7172 | },
|
7173 |
|
7174 |
|
7175 | begin:function begin (condition) {
|
7176 | this.conditionStack.push(condition);
|
7177 | },
|
7178 |
|
7179 |
|
7180 | popState:function popState () {
|
7181 | var n = this.conditionStack.length - 1;
|
7182 | if (n > 0) {
|
7183 | return this.conditionStack.pop();
|
7184 | } else {
|
7185 | return this.conditionStack[0];
|
7186 | }
|
7187 | },
|
7188 |
|
7189 |
|
7190 | _currentRules:function _currentRules () {
|
7191 | if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
7192 | return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
7193 | } else {
|
7194 | return this.conditions["INITIAL"].rules;
|
7195 | }
|
7196 | },
|
7197 |
|
7198 |
|
7199 | topState:function topState (n) {
|
7200 | n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
7201 | if (n >= 0) {
|
7202 | return this.conditionStack[n];
|
7203 | } else {
|
7204 | return "INITIAL";
|
7205 | }
|
7206 | },
|
7207 |
|
7208 |
|
7209 | pushState:function pushState (condition) {
|
7210 | this.begin(condition);
|
7211 | },
|
7212 |
|
7213 |
|
7214 | stateStackSize:function stateStackSize() {
|
7215 | return this.conditionStack.length;
|
7216 | },
|
7217 | options: {"case-insensitive":true},
|
7218 | performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
|
7219 | var YYSTATE=YY_START;
|
7220 | switch($avoiding_name_collisions) {
|
7221 | case 0:return 12;
|
7222 | break;
|
7223 | case 1:
|
7224 | break;
|
7225 | case 2:
|
7226 | break;
|
7227 | case 3:
|
7228 | break;
|
7229 | case 4:return 4;
|
7230 | break;
|
7231 | case 5:return 15;
|
7232 | break;
|
7233 | case 6:return 17;
|
7234 | break;
|
7235 | case 7:return 20;
|
7236 | break;
|
7237 | case 8:return 21;
|
7238 | break;
|
7239 | case 9:return 19;
|
7240 | break;
|
7241 | case 10:return 8;
|
7242 | break;
|
7243 | case 11:return 8;
|
7244 | break;
|
7245 | case 12:return 5;
|
7246 | break;
|
7247 | case 13:return 26
|
7248 | break;
|
7249 | case 14:this.begin("options");
|
7250 | break;
|
7251 | case 15:this.popState();
|
7252 | break;
|
7253 | case 16:return 11;
|
7254 | break;
|
7255 | case 17:this.begin("string");
|
7256 | break;
|
7257 | case 18:this.popState();
|
7258 | break;
|
7259 | case 19:return 23;
|
7260 | break;
|
7261 | case 20:return 18;
|
7262 | break;
|
7263 | case 21:return 7;
|
7264 | break;
|
7265 | }
|
7266 | },
|
7267 | rules: [/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit\b)/i,/^(?:branch\b)/i,/^(?:merge\b)/i,/^(?:reset\b)/i,/^(?:checkout\b)/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:end\r?\n)/i,/^(?:[^\n]+\r?\n)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[a-zA-Z][a-zA-Z0-9_]+)/i,/^(?:$)/i],
|
7268 | conditions: {"options":{"rules":[15,16],"inclusive":false},"string":{"rules":[18,19],"inclusive":false},"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,20,21],"inclusive":true}}
|
7269 | });
|
7270 | return lexer;
|
7271 | })();
|
7272 | parser.lexer = lexer;
|
7273 | function Parser () {
|
7274 | this.yy = {};
|
7275 | }
|
7276 | Parser.prototype = parser;parser.Parser = Parser;
|
7277 | return new Parser;
|
7278 | })();
|
7279 |
|
7280 |
|
7281 | if (true) {
|
7282 | exports.parser = parser;
|
7283 | exports.Parser = parser.Parser;
|
7284 | exports.parse = function () { return parser.parse.apply(parser, arguments); };
|
7285 | exports.main = function commonjsMain (args) {
|
7286 | if (!args[1]) {
|
7287 | console.log('Usage: '+args[0]+' FILE');
|
7288 | process.exit(1);
|
7289 | }
|
7290 | var source = __webpack_require__( "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__( "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
|
7291 | return exports.parser.parse(source);
|
7292 | };
|
7293 | if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
|
7294 | exports.main(process.argv.slice(1));
|
7295 | }
|
7296 | }
|
7297 | }.call(this, __webpack_require__( "./node_modules/process/browser.js"), __webpack_require__( "./node_modules/webpack/buildin/module.js")(module)))
|
7298 |
|
7299 | }),
|
7300 |
|
7301 | "./src/diagrams/info/infoDb.js":
|
7302 |
|
7303 |
|
7304 |
|
7305 |
|
7306 | (function(module, __webpack_exports__, __webpack_require__) {
|
7307 |
|
7308 | "use strict";
|
7309 | __webpack_require__.r(__webpack_exports__);
|
7310 | __webpack_require__.d(__webpack_exports__, "setMessage", function() { return setMessage; });
|
7311 | __webpack_require__.d(__webpack_exports__, "getMessage", function() { return getMessage; });
|
7312 | __webpack_require__.d(__webpack_exports__, "setInfo", function() { return setInfo; });
|
7313 | __webpack_require__.d(__webpack_exports__, "getInfo", function() { return getInfo; });
|
7314 | var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "./src/logger.js");
|
7315 |
|
7316 |
|
7317 |
|
7318 |
|
7319 | var message = '';
|
7320 | var info = false;
|
7321 | const setMessage = txt => {
|
7322 | _logger__WEBPACK_IMPORTED_MODULE_0__["logger"].debug('Setting message to: ' + txt);
|
7323 | message = txt;
|
7324 | };
|
7325 | const getMessage = () => {
|
7326 | return message;
|
7327 | };
|
7328 | const setInfo = inf => {
|
7329 | info = inf;
|
7330 | };
|
7331 | const getInfo = () => {
|
7332 | return info;
|
7333 | };
|
7334 |
|
7335 |
|
7336 |
|
7337 | __webpack_exports__["default"] = ({
|
7338 | setMessage,
|
7339 | getMessage,
|
7340 | setInfo,
|
7341 | getInfo
|
7342 |
|
7343 | });
|
7344 |
|
7345 | }),
|
7346 |
|
7347 | "./src/diagrams/info/infoRenderer.js":
|
7348 |
|
7349 |
|
7350 |
|
7351 |
|
7352 | (function(module, __webpack_exports__, __webpack_require__) {
|
7353 |
|
7354 | "use strict";
|
7355 | __webpack_require__.r(__webpack_exports__);
|
7356 | __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
|
7357 | __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
|
7358 | var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "d3");
|
7359 | var d3__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
|
7360 | var _infoDb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./src/diagrams/info/infoDb.js");
|
7361 | var _parser_info__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./src/diagrams/info/parser/info.jison");
|
7362 | var _parser_info__WEBPACK_IMPORTED_MODULE_2___default = __webpack_require__.n(_parser_info__WEBPACK_IMPORTED_MODULE_2__);
|
7363 | var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./src/logger.js");
|
7364 |
|
7365 |
|
7366 |
|
7367 |
|
7368 |
|
7369 |
|
7370 |
|
7371 | const conf = {};
|
7372 | const setConf = function (cnf) {
|
7373 | const keys = Object.keys(cnf);
|
7374 | keys.forEach(function (key) {
|
7375 | conf[key] = cnf[key];
|
7376 | });
|
7377 | };
|
7378 |
|
7379 |
|
7380 |
|
7381 |
|
7382 |
|
7383 |
|
7384 | const draw = (txt, id, ver) => {
|
7385 | try {
|
7386 | const parser = _parser_info__WEBPACK_IMPORTED_MODULE_2___default.a.parser;
|
7387 | parser.yy = _infoDb__WEBPACK_IMPORTED_MODULE_1__["default"];
|
7388 | _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Renering info diagram\n' + txt);
|
7389 |
|
7390 | parser.parse(txt);
|
7391 | _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Parsed info diagram');
|
7392 |
|
7393 | const svg = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#' + id);
|
7394 | const g = svg.append('g');
|
7395 | g.append('text')
|
7396 | .attr('x', 100).attr('y', 40).attr('class', 'version').attr('font-size', '32px').style('text-anchor', 'middle').text('v ' + ver);
|
7397 | svg.attr('height', 100);
|
7398 | svg.attr('width', 400);
|
7399 | } catch (e) {
|
7400 | _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].error('Error while rendering info diagram');
|
7401 | _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].error(e.message);
|
7402 | }
|
7403 | };
|
7404 | __webpack_exports__["default"] = ({
|
7405 | setConf,
|
7406 | draw
|
7407 | });
|
7408 |
|
7409 | }),
|
7410 |
|
7411 | "./src/diagrams/info/parser/info.jison":
|
7412 |
|
7413 |
|
7414 |
|
7415 |
|
7416 | (function(module, exports, __webpack_require__) {
|
7417 |
|
7418 | (function(process, module) {
|
7419 |
|
7420 |
|
7421 |
|
7422 |
|
7423 |
|
7424 |
|
7425 |
|
7426 |
|
7427 |
|
7428 |
|
7429 |
|
7430 |
|
7431 |
|
7432 |
|
7433 |
|
7434 |
|
7435 |
|
7436 |
|
7437 |
|
7438 |
|
7439 |
|
7440 |
|
7441 |
|
7442 |
|
7443 |
|
7444 |
|
7445 |
|
7446 |
|
7447 |
|
7448 |
|
7449 |
|
7450 |
|
7451 |
|
7452 |
|
7453 |
|
7454 |
|
7455 |
|
7456 |
|
7457 |
|
7458 |
|
7459 |
|
7460 |
|
7461 |
|
7462 |
|
7463 |
|
7464 |
|
7465 |
|
7466 |
|
7467 |
|
7468 |
|
7469 |
|
7470 |
|
7471 |
|
7472 |
|
7473 |
|
7474 |
|
7475 |
|
7476 |
|
7477 |
|
7478 |
|
7479 |
|
7480 |
|
7481 |
|
7482 |
|
7483 |
|
7484 |
|
7485 |
|
7486 |
|
7487 |
|
7488 |
|
7489 |
|
7490 |
|
7491 | var parser = (function(){
|
7492 | var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,9,10];
|
7493 | var parser = {trace: function trace () { },
|
7494 | yy: {},
|
7495 | symbols_: {"error":2,"start":3,"info":4,"document":5,"EOF":6,"line":7,"statement":8,"NL":9,"showInfo":10,"$accept":0,"$end":1},
|
7496 | terminals_: {2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},
|
7497 | productions_: [0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],
|
7498 | performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
|
7499 |
|
7500 |
|
7501 | var $0 = $$.length - 1;
|
7502 | switch (yystate) {
|
7503 | case 1:
|
7504 | return yy;
|
7505 | break;
|
7506 | case 4:
|
7507 |
|
7508 | break;
|
7509 | case 6:
|
7510 | yy.setInfo(true);
|
7511 | break;
|
7512 | }
|
7513 | },
|
7514 | table: [{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},o($V0,[2,3]),o($V0,[2,4]),o($V0,[2,5]),o($V0,[2,6])],
|
7515 | defaultActions: {4:[2,1]},
|
7516 | parseError: function parseError (str, hash) {
|
7517 | if (hash.recoverable) {
|
7518 | this.trace(str);
|
7519 | } else {
|
7520 | var error = new Error(str);
|
7521 | error.hash = hash;
|
7522 | throw error;
|
7523 | }
|
7524 | },
|
7525 | parse: function parse(input) {
|
7526 | var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
|
7527 | var args = lstack.slice.call(arguments, 1);
|
7528 | var lexer = Object.create(this.lexer);
|
7529 | var sharedState = { yy: {} };
|
7530 | for (var k in this.yy) {
|
7531 | if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
7532 | sharedState.yy[k] = this.yy[k];
|
7533 | }
|
7534 | }
|
7535 | lexer.setInput(input, sharedState.yy);
|
7536 | sharedState.yy.lexer = lexer;
|
7537 | sharedState.yy.parser = this;
|
7538 | if (typeof lexer.yylloc == 'undefined') {
|
7539 | lexer.yylloc = {};
|
7540 | }
|
7541 | var yyloc = lexer.yylloc;
|
7542 | lstack.push(yyloc);
|
7543 | var ranges = lexer.options && lexer.options.ranges;
|
7544 | if (typeof sharedState.yy.parseError === 'function') {
|
7545 | this.parseError = sharedState.yy.parseError;
|
7546 | } else {
|
7547 | this.parseError = Object.getPrototypeOf(this).parseError;
|
7548 | }
|
7549 | function popStack(n) {
|
7550 | stack.length = stack.length - 2 * n;
|
7551 | vstack.length = vstack.length - n;
|
7552 | lstack.length = lstack.length - n;
|
7553 | }
|
7554 | function lex() {
|
7555 | var token;
|
7556 | token = tstack.pop() || lexer.lex() || EOF;
|
7557 | if (typeof token !== 'number') {
|
7558 | if (token instanceof Array) {
|
7559 | tstack = token;
|
7560 | token = tstack.pop();
|
7561 | }
|
7562 | token = self.symbols_[token] || token;
|
7563 | }
|
7564 | return token;
|
7565 | }
|
7566 | var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
|
7567 | while (true) {
|
7568 | state = stack[stack.length - 1];
|
7569 | if (this.defaultActions[state]) {
|
7570 | action = this.defaultActions[state];
|
7571 | } else {
|
7572 | if (symbol === null || typeof symbol == 'undefined') {
|
7573 | symbol = lex();
|
7574 | }
|
7575 | action = table[state] && table[state][symbol];
|
7576 | }
|
7577 | if (typeof action === 'undefined' || !action.length || !action[0]) {
|
7578 | var errStr = '';
|
7579 | expected = [];
|
7580 | for (p in table[state]) {
|
7581 | if (this.terminals_[p] && p > TERROR) {
|
7582 | expected.push('\'' + this.terminals_[p] + '\'');
|
7583 | }
|
7584 | }
|
7585 | if (lexer.showPosition) {
|
7586 | errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
|
7587 | } else {
|
7588 | errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
|
7589 | }
|
7590 | this.parseError(errStr, {
|
7591 | text: lexer.match,
|
7592 | token: this.terminals_[symbol] || symbol,
|
7593 | line: lexer.yylineno,
|
7594 | loc: yyloc,
|
7595 | expected: expected
|
7596 | });
|
7597 | }
|
7598 | if (action[0] instanceof Array && action.length > 1) {
|
7599 | throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
|
7600 | }
|
7601 | switch (action[0]) {
|
7602 | case 1:
|
7603 | stack.push(symbol);
|
7604 | vstack.push(lexer.yytext);
|
7605 | lstack.push(lexer.yylloc);
|
7606 | stack.push(action[1]);
|
7607 | symbol = null;
|
7608 | if (!preErrorSymbol) {
|
7609 | yyleng = lexer.yyleng;
|
7610 | yytext = lexer.yytext;
|
7611 | yylineno = lexer.yylineno;
|
7612 | yyloc = lexer.yylloc;
|
7613 | if (recovering > 0) {
|
7614 | recovering--;
|
7615 | }
|
7616 | } else {
|
7617 | symbol = preErrorSymbol;
|
7618 | preErrorSymbol = null;
|
7619 | }
|
7620 | break;
|
7621 | case 2:
|
7622 | len = this.productions_[action[1]][1];
|
7623 | yyval.$ = vstack[vstack.length - len];
|
7624 | yyval._$ = {
|
7625 | first_line: lstack[lstack.length - (len || 1)].first_line,
|
7626 | last_line: lstack[lstack.length - 1].last_line,
|
7627 | first_column: lstack[lstack.length - (len || 1)].first_column,
|
7628 | last_column: lstack[lstack.length - 1].last_column
|
7629 | };
|
7630 | if (ranges) {
|
7631 | yyval._$.range = [
|
7632 | lstack[lstack.length - (len || 1)].range[0],
|
7633 | lstack[lstack.length - 1].range[1]
|
7634 | ];
|
7635 | }
|
7636 | r = this.performAction.apply(yyval, [
|
7637 | yytext,
|
7638 | yyleng,
|
7639 | yylineno,
|
7640 | sharedState.yy,
|
7641 | action[1],
|
7642 | vstack,
|
7643 | lstack
|
7644 | ].concat(args));
|
7645 | if (typeof r !== 'undefined') {
|
7646 | return r;
|
7647 | }
|
7648 | if (len) {
|
7649 | stack = stack.slice(0, -1 * len * 2);
|
7650 | vstack = vstack.slice(0, -1 * len);
|
7651 | lstack = lstack.slice(0, -1 * len);
|
7652 | }
|
7653 | stack.push(this.productions_[action[1]][0]);
|
7654 | vstack.push(yyval.$);
|
7655 | lstack.push(yyval._$);
|
7656 | newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
7657 | stack.push(newState);
|
7658 | break;
|
7659 | case 3:
|
7660 | return true;
|
7661 | }
|
7662 | }
|
7663 | return true;
|
7664 | }};
|
7665 |
|
7666 | var lexer = (function(){
|
7667 | var lexer = ({
|
7668 |
|
7669 | EOF:1,
|
7670 |
|
7671 | parseError:function parseError(str, hash) {
|
7672 | if (this.yy.parser) {
|
7673 | this.yy.parser.parseError(str, hash);
|
7674 | } else {
|
7675 | throw new Error(str);
|
7676 | }
|
7677 | },
|
7678 |
|
7679 |
|
7680 | setInput:function (input, yy) {
|
7681 | this.yy = yy || this.yy || {};
|
7682 | this._input = input;
|
7683 | this._more = this._backtrack = this.done = false;
|
7684 | this.yylineno = this.yyleng = 0;
|
7685 | this.yytext = this.matched = this.match = '';
|
7686 | this.conditionStack = ['INITIAL'];
|
7687 | this.yylloc = {
|
7688 | first_line: 1,
|
7689 | first_column: 0,
|
7690 | last_line: 1,
|
7691 | last_column: 0
|
7692 | };
|
7693 | if (this.options.ranges) {
|
7694 | this.yylloc.range = [0,0];
|
7695 | }
|
7696 | this.offset = 0;
|
7697 | return this;
|
7698 | },
|
7699 |
|
7700 |
|
7701 | input:function () {
|
7702 | var ch = this._input[0];
|
7703 | this.yytext += ch;
|
7704 | this.yyleng++;
|
7705 | this.offset++;
|
7706 | this.match += ch;
|
7707 | this.matched += ch;
|
7708 | var lines = ch.match(/(?:\r\n?|\n).*/g);
|
7709 | if (lines) {
|
7710 | this.yylineno++;
|
7711 | this.yylloc.last_line++;
|
7712 | } else {
|
7713 | this.yylloc.last_column++;
|
7714 | }
|
7715 | if (this.options.ranges) {
|
7716 | this.yylloc.range[1]++;
|
7717 | }
|
7718 |
|
7719 | this._input = this._input.slice(1);
|
7720 | return ch;
|
7721 | },
|
7722 |
|
7723 |
|
7724 | unput:function (ch) {
|
7725 | var len = ch.length;
|
7726 | var lines = ch.split(/(?:\r\n?|\n)/g);
|
7727 |
|
7728 | this._input = ch + this._input;
|
7729 | this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
7730 |
|
7731 | this.offset -= len;
|
7732 | var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
7733 | this.match = this.match.substr(0, this.match.length - 1);
|
7734 | this.matched = this.matched.substr(0, this.matched.length - 1);
|
7735 |
|
7736 | if (lines.length - 1) {
|
7737 | this.yylineno -= lines.length - 1;
|
7738 | }
|
7739 | var r = this.yylloc.range;
|
7740 |
|
7741 | this.yylloc = {
|
7742 | first_line: this.yylloc.first_line,
|
7743 | last_line: this.yylineno + 1,
|
7744 | first_column: this.yylloc.first_column,
|
7745 | last_column: lines ?
|
7746 | (lines.length === oldLines.length ? this.yylloc.first_column : 0)
|
7747 | + oldLines[oldLines.length - lines.length].length - lines[0].length :
|
7748 | this.yylloc.first_column - len
|
7749 | };
|
7750 |
|
7751 | if (this.options.ranges) {
|
7752 | this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
7753 | }
|
7754 | this.yyleng = this.yytext.length;
|
7755 | return this;
|
7756 | },
|
7757 |
|
7758 |
|
7759 | more:function () {
|
7760 | this._more = true;
|
7761 | return this;
|
7762 | },
|
7763 |
|
7764 |
|
7765 | reject:function () {
|
7766 | if (this.options.backtrack_lexer) {
|
7767 | this._backtrack = true;
|
7768 | } else {
|
7769 | return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), {
|
7770 | text: "",
|
7771 | token: null,
|
7772 | line: this.yylineno
|
7773 | });
|
7774 |
|
7775 | }
|
7776 | return this;
|
7777 | },
|
7778 |
|
7779 |
|
7780 | less:function (n) {
|
7781 | this.unput(this.match.slice(n));
|
7782 | },
|
7783 |
|
7784 |
|
7785 | pastInput:function () {
|
7786 | var past = this.matched.substr(0, this.matched.length - this.match.length);
|
7787 | return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
|
7788 | },
|
7789 |
|
7790 |
|
7791 | upcomingInput:function () {
|
7792 | var next = this.match;
|
7793 | if (next.length < 20) {
|
7794 | next += this._input.substr(0, 20-next.length);
|
7795 | }
|
7796 | return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
|
7797 | },
|
7798 |
|
7799 |
|
7800 | showPosition:function () {
|
7801 | var pre = this.pastInput();
|
7802 | var c = new Array(pre.length + 1).join("-");
|
7803 | return pre + this.upcomingInput() + "\n" + c + "^";
|
7804 | },
|
7805 |
|
7806 |
|
7807 | test_match:function(match, indexed_rule) {
|
7808 | var token,
|
7809 | lines,
|
7810 | backup;
|
7811 |
|
7812 | if (this.options.backtrack_lexer) {
|
7813 |
|
7814 | backup = {
|
7815 | yylineno: this.yylineno,
|
7816 | yylloc: {
|
7817 | first_line: this.yylloc.first_line,
|
7818 | last_line: this.last_line,
|
7819 | first_column: this.yylloc.first_column,
|
7820 | last_column: this.yylloc.last_column
|
7821 | },
|
7822 | yytext: this.yytext,
|
7823 | match: this.match,
|
7824 | matches: this.matches,
|
7825 | matched: this.matched,
|
7826 | yyleng: this.yyleng,
|
7827 | offset: this.offset,
|
7828 | _more: this._more,
|
7829 | _input: this._input,
|
7830 | yy: this.yy,
|
7831 | conditionStack: this.conditionStack.slice(0),
|
7832 | done: this.done
|
7833 | };
|
7834 | if (this.options.ranges) {
|
7835 | backup.yylloc.range = this.yylloc.range.slice(0);
|
7836 | }
|
7837 | }
|
7838 |
|
7839 | lines = match[0].match(/(?:\r\n?|\n).*/g);
|
7840 | if (lines) {
|
7841 | this.yylineno += lines.length;
|
7842 | }
|
7843 | this.yylloc = {
|
7844 | first_line: this.yylloc.last_line,
|
7845 | last_line: this.yylineno + 1,
|
7846 | first_column: this.yylloc.last_column,
|
7847 | last_column: lines ?
|
7848 | lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
|
7849 | this.yylloc.last_column + match[0].length
|
7850 | };
|
7851 | this.yytext += match[0];
|
7852 | this.match += match[0];
|
7853 | this.matches = match;
|
7854 | this.yyleng = this.yytext.length;
|
7855 | if (this.options.ranges) {
|
7856 | this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
7857 | }
|
7858 | this._more = false;
|
7859 | this._backtrack = false;
|
7860 | this._input = this._input.slice(match[0].length);
|
7861 | this.matched += match[0];
|
7862 | token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
7863 | if (this.done && this._input) {
|
7864 | this.done = false;
|
7865 | }
|
7866 | if (token) {
|
7867 | return token;
|
7868 | } else if (this._backtrack) {
|
7869 |
|
7870 | for (var k in backup) {
|
7871 | this[k] = backup[k];
|
7872 | }
|
7873 | return false;
|
7874 | }
|
7875 | return false;
|
7876 | },
|
7877 |
|
7878 |
|
7879 | next:function () {
|
7880 | if (this.done) {
|
7881 | return this.EOF;
|
7882 | }
|
7883 | if (!this._input) {
|
7884 | this.done = true;
|
7885 | }
|
7886 |
|
7887 | var token,
|
7888 | match,
|
7889 | tempMatch,
|
7890 | index;
|
7891 | if (!this._more) {
|
7892 | this.yytext = '';
|
7893 | this.match = '';
|
7894 | }
|
7895 | var rules = this._currentRules();
|
7896 | for (var i = 0; i < rules.length; i++) {
|
7897 | tempMatch = this._input.match(this.rules[rules[i]]);
|
7898 | if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
7899 | match = tempMatch;
|
7900 | index = i;
|
7901 | if (this.options.backtrack_lexer) {
|
7902 | token = this.test_match(tempMatch, rules[i]);
|
7903 | if (token !== false) {
|
7904 | return token;
|
7905 | } else if (this._backtrack) {
|
7906 | match = false;
|
7907 | continue;
|
7908 | } else {
|
7909 |
|
7910 | return false;
|
7911 | }
|
7912 | } else if (!this.options.flex) {
|
7913 | break;
|
7914 | }
|
7915 | }
|
7916 | }
|
7917 | if (match) {
|
7918 | token = this.test_match(match, rules[index]);
|
7919 | if (token !== false) {
|
7920 | return token;
|
7921 | }
|
7922 |
|
7923 | return false;
|
7924 | }
|
7925 | if (this._input === "") {
|
7926 | return this.EOF;
|
7927 | } else {
|
7928 | return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
|
7929 | text: "",
|
7930 | token: null,
|
7931 | line: this.yylineno
|
7932 | });
|
7933 | }
|
7934 | },
|
7935 |
|
7936 |
|
7937 | lex:function lex () {
|
7938 | var r = this.next();
|
7939 | if (r) {
|
7940 | return r;
|
7941 | } else {
|
7942 | return this.lex();
|
7943 | }
|
7944 | },
|
7945 |
|
7946 |
|
7947 | begin:function begin (condition) {
|
7948 | this.conditionStack.push(condition);
|
7949 | },
|
7950 |
|
7951 |
|
7952 | popState:function popState () {
|
7953 | var n = this.conditionStack.length - 1;
|
7954 | if (n > 0) {
|
7955 | return this.conditionStack.pop();
|
7956 | } else {
|
7957 | return this.conditionStack[0];
|
7958 | }
|
7959 | },
|
7960 |
|
7961 |
|
7962 | _currentRules:function _currentRules () {
|
7963 | if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
7964 | return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
7965 | } else {
|
7966 | return this.conditions["INITIAL"].rules;
|
7967 | }
|
7968 | },
|
7969 |
|
7970 |
|
7971 | topState:function topState (n) {
|
7972 | n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
7973 | if (n >= 0) {
|
7974 | return this.conditionStack[n];
|
7975 | } else {
|
7976 | return "INITIAL";
|
7977 | }
|
7978 | },
|
7979 |
|
7980 |
|
7981 | pushState:function pushState (condition) {
|
7982 | this.begin(condition);
|
7983 | },
|
7984 |
|
7985 |
|
7986 | stateStackSize:function stateStackSize() {
|
7987 | return this.conditionStack.length;
|
7988 | },
|
7989 | options: {"case-insensitive":true},
|
7990 | performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
|
7991 |
|
7992 |
|
7993 | var YYSTATE=YY_START;
|
7994 | switch($avoiding_name_collisions) {
|
7995 | case 0:return 4 ;
|
7996 | break;
|
7997 | case 1:return 9 ;
|
7998 | break;
|
7999 | case 2:return 'space';
|
8000 | break;
|
8001 | case 3:return 10;
|
8002 | break;
|
8003 | case 4:return 6 ;
|
8004 | break;
|
8005 | case 5:return 'TXT' ;
|
8006 | break;
|
8007 | }
|
8008 | },
|
8009 | rules: [/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],
|
8010 | conditions: {"INITIAL":{"rules":[0,1,2,3,4,5],"inclusive":true}}
|
8011 | });
|
8012 | return lexer;
|
8013 | })();
|
8014 | parser.lexer = lexer;
|
8015 | function Parser () {
|
8016 | this.yy = {};
|
8017 | }
|
8018 | Parser.prototype = parser;parser.Parser = Parser;
|
8019 | return new Parser;
|
8020 | })();
|
8021 |
|
8022 |
|
8023 | if (true) {
|
8024 | exports.parser = parser;
|
8025 | exports.Parser = parser.Parser;
|
8026 | exports.parse = function () { return parser.parse.apply(parser, arguments); };
|
8027 | exports.main = function commonjsMain (args) {
|
8028 | if (!args[1]) {
|
8029 | console.log('Usage: '+args[0]+' FILE');
|
8030 | process.exit(1);
|
8031 | }
|
8032 | var source = __webpack_require__( "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__( "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
|
8033 | return exports.parser.parse(source);
|
8034 | };
|
8035 | if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
|
8036 | exports.main(process.argv.slice(1));
|
8037 | }
|
8038 | }
|
8039 | }.call(this, __webpack_require__( "./node_modules/process/browser.js"), __webpack_require__( "./node_modules/webpack/buildin/module.js")(module)))
|
8040 |
|
8041 | }),
|
8042 |
|
8043 | "./src/diagrams/pie/parser/pie.jison":
|
8044 |
|
8045 |
|
8046 |
|
8047 |
|
8048 | (function(module, exports, __webpack_require__) {
|
8049 |
|
8050 | (function(process, module) {
|
8051 |
|
8052 |
|
8053 |
|
8054 |
|
8055 |
|
8056 |
|
8057 |
|
8058 |
|
8059 |
|
8060 |
|
8061 |
|
8062 |
|
8063 |
|
8064 |
|
8065 |
|
8066 |
|
8067 |
|
8068 |
|
8069 |
|
8070 |
|
8071 |
|
8072 |
|
8073 |
|
8074 |
|
8075 |
|
8076 |
|
8077 |
|
8078 |
|
8079 |
|
8080 |
|
8081 |
|
8082 |
|
8083 |
|
8084 |
|
8085 |
|
8086 |
|
8087 |
|
8088 |
|
8089 |
|
8090 |
|
8091 |
|
8092 |
|
8093 |
|
8094 |
|
8095 |
|
8096 |
|
8097 |
|
8098 |
|
8099 |
|
8100 |
|
8101 |
|
8102 |
|
8103 |
|
8104 |
|
8105 |
|
8106 |
|
8107 |
|
8108 |
|
8109 |
|
8110 |
|
8111 |
|
8112 |
|
8113 |
|
8114 |
|
8115 |
|
8116 |
|
8117 |
|
8118 |
|
8119 |
|
8120 |
|
8121 |
|
8122 |
|
8123 | var parser = (function(){
|
8124 | var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,9,10,12];
|
8125 | var parser = {trace: function trace () { },
|
8126 | yy: {},
|
8127 | symbols_: {"error":2,"start":3,"pie":4,"document":5,"EOF":6,"line":7,"statement":8,"NL":9,"STR":10,"VALUE":11,"title":12,"$accept":0,"$end":1},
|
8128 | terminals_: {2:"error",4:"pie",6:"EOF",9:"NL",10:"STR",11:"VALUE",12:"title"},
|
8129 | productions_: [0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,2],[8,1]],
|
8130 | performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
|
8131 |
|
8132 |
|
8133 | var $0 = $$.length - 1;
|
8134 | switch (yystate) {
|
8135 | case 4:
|
8136 |
|
8137 | break;
|
8138 | case 6:
|
8139 |
|
8140 | console.log('str:'+$$[$0-1]+' value: '+$$[$0])
|
8141 | yy.addSection($$[$0-1],yy.cleanupValue($$[$0]));
|
8142 | break;
|
8143 | case 7:
|
8144 | yy.setTitle($$[$0].substr(6));this.$=$$[$0].substr(6);
|
8145 | break;
|
8146 | }
|
8147 | },
|
8148 | table: [{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8],12:[1,9]},{1:[2,1]},o($V0,[2,3]),o($V0,[2,4]),o($V0,[2,5]),{11:[1,10]},o($V0,[2,7]),o($V0,[2,6])],
|
8149 | defaultActions: {4:[2,1]},
|
8150 | parseError: function parseError (str, hash) {
|
8151 | if (hash.recoverable) {
|
8152 | this.trace(str);
|
8153 | } else {
|
8154 | var error = new Error(str);
|
8155 | error.hash = hash;
|
8156 | throw error;
|
8157 | }
|
8158 | },
|
8159 | parse: function parse(input) {
|
8160 | var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
|
8161 | var args = lstack.slice.call(arguments, 1);
|
8162 | var lexer = Object.create(this.lexer);
|
8163 | var sharedState = { yy: {} };
|
8164 | for (var k in this.yy) {
|
8165 | if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
8166 | sharedState.yy[k] = this.yy[k];
|
8167 | }
|
8168 | }
|
8169 | lexer.setInput(input, sharedState.yy);
|
8170 | sharedState.yy.lexer = lexer;
|
8171 | sharedState.yy.parser = this;
|
8172 | if (typeof lexer.yylloc == 'undefined') {
|
8173 | lexer.yylloc = {};
|
8174 | }
|
8175 | var yyloc = lexer.yylloc;
|
8176 | lstack.push(yyloc);
|
8177 | var ranges = lexer.options && lexer.options.ranges;
|
8178 | if (typeof sharedState.yy.parseError === 'function') {
|
8179 | this.parseError = sharedState.yy.parseError;
|
8180 | } else {
|
8181 | this.parseError = Object.getPrototypeOf(this).parseError;
|
8182 | }
|
8183 | function popStack(n) {
|
8184 | stack.length = stack.length - 2 * n;
|
8185 | vstack.length = vstack.length - n;
|
8186 | lstack.length = lstack.length - n;
|
8187 | }
|
8188 | function lex() {
|
8189 | var token;
|
8190 | token = tstack.pop() || lexer.lex() || EOF;
|
8191 | if (typeof token !== 'number') {
|
8192 | if (token instanceof Array) {
|
8193 | tstack = token;
|
8194 | token = tstack.pop();
|
8195 | }
|
8196 | token = self.symbols_[token] || token;
|
8197 | }
|
8198 | return token;
|
8199 | }
|
8200 | var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
|
8201 | while (true) {
|
8202 | state = stack[stack.length - 1];
|
8203 | if (this.defaultActions[state]) {
|
8204 | action = this.defaultActions[state];
|
8205 | } else {
|
8206 | if (symbol === null || typeof symbol == 'undefined') {
|
8207 | symbol = lex();
|
8208 | }
|
8209 | action = table[state] && table[state][symbol];
|
8210 | }
|
8211 | if (typeof action === 'undefined' || !action.length || !action[0]) {
|
8212 | var errStr = '';
|
8213 | expected = [];
|
8214 | for (p in table[state]) {
|
8215 | if (this.terminals_[p] && p > TERROR) {
|
8216 | expected.push('\'' + this.terminals_[p] + '\'');
|
8217 | }
|
8218 | }
|
8219 | if (lexer.showPosition) {
|
8220 | errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
|
8221 | } else {
|
8222 | errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
|
8223 | }
|
8224 | this.parseError(errStr, {
|
8225 | text: lexer.match,
|
8226 | token: this.terminals_[symbol] || symbol,
|
8227 | line: lexer.yylineno,
|
8228 | loc: yyloc,
|
8229 | expected: expected
|
8230 | });
|
8231 | }
|
8232 | if (action[0] instanceof Array && action.length > 1) {
|
8233 | throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
|
8234 | }
|
8235 | switch (action[0]) {
|
8236 | case 1:
|
8237 | stack.push(symbol);
|
8238 | vstack.push(lexer.yytext);
|
8239 | lstack.push(lexer.yylloc);
|
8240 | stack.push(action[1]);
|
8241 | symbol = null;
|
8242 | if (!preErrorSymbol) {
|
8243 | yyleng = lexer.yyleng;
|
8244 | yytext = lexer.yytext;
|
8245 | yylineno = lexer.yylineno;
|
8246 | yyloc = lexer.yylloc;
|
8247 | if (recovering > 0) {
|
8248 | recovering--;
|
8249 | }
|
8250 | } else {
|
8251 | symbol = preErrorSymbol;
|
8252 | preErrorSymbol = null;
|
8253 | }
|
8254 | break;
|
8255 | case 2:
|
8256 | len = this.productions_[action[1]][1];
|
8257 | yyval.$ = vstack[vstack.length - len];
|
8258 | yyval._$ = {
|
8259 | first_line: lstack[lstack.length - (len || 1)].first_line,
|
8260 | last_line: lstack[lstack.length - 1].last_line,
|
8261 | first_column: lstack[lstack.length - (len || 1)].first_column,
|
8262 | last_column: lstack[lstack.length - 1].last_column
|
8263 | };
|
8264 | if (ranges) {
|
8265 | yyval._$.range = [
|
8266 | lstack[lstack.length - (len || 1)].range[0],
|
8267 | lstack[lstack.length - 1].range[1]
|
8268 | ];
|
8269 | }
|
8270 | r = this.performAction.apply(yyval, [
|
8271 | yytext,
|
8272 | yyleng,
|
8273 | yylineno,
|
8274 | sharedState.yy,
|
8275 | action[1],
|
8276 | vstack,
|
8277 | lstack
|
8278 | ].concat(args));
|
8279 | if (typeof r !== 'undefined') {
|
8280 | return r;
|
8281 | }
|
8282 | if (len) {
|
8283 | stack = stack.slice(0, -1 * len * 2);
|
8284 | vstack = vstack.slice(0, -1 * len);
|
8285 | lstack = lstack.slice(0, -1 * len);
|
8286 | }
|
8287 | stack.push(this.productions_[action[1]][0]);
|
8288 | vstack.push(yyval.$);
|
8289 | lstack.push(yyval._$);
|
8290 | newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
8291 | stack.push(newState);
|
8292 | break;
|
8293 | case 3:
|
8294 | return true;
|
8295 | }
|
8296 | }
|
8297 | return true;
|
8298 | }};
|
8299 |
|
8300 | var lexer = (function(){
|
8301 | var lexer = ({
|
8302 |
|
8303 | EOF:1,
|
8304 |
|
8305 | parseError:function parseError(str, hash) {
|
8306 | if (this.yy.parser) {
|
8307 | this.yy.parser.parseError(str, hash);
|
8308 | } else {
|
8309 | throw new Error(str);
|
8310 | }
|
8311 | },
|
8312 |
|
8313 |
|
8314 | setInput:function (input, yy) {
|
8315 | this.yy = yy || this.yy || {};
|
8316 | this._input = input;
|
8317 | this._more = this._backtrack = this.done = false;
|
8318 | this.yylineno = this.yyleng = 0;
|
8319 | this.yytext = this.matched = this.match = '';
|
8320 | this.conditionStack = ['INITIAL'];
|
8321 | this.yylloc = {
|
8322 | first_line: 1,
|
8323 | first_column: 0,
|
8324 | last_line: 1,
|
8325 | last_column: 0
|
8326 | };
|
8327 | if (this.options.ranges) {
|
8328 | this.yylloc.range = [0,0];
|
8329 | }
|
8330 | this.offset = 0;
|
8331 | return this;
|
8332 | },
|
8333 |
|
8334 |
|
8335 | input:function () {
|
8336 | var ch = this._input[0];
|
8337 | this.yytext += ch;
|
8338 | this.yyleng++;
|
8339 | this.offset++;
|
8340 | this.match += ch;
|
8341 | this.matched += ch;
|
8342 | var lines = ch.match(/(?:\r\n?|\n).*/g);
|
8343 | if (lines) {
|
8344 | this.yylineno++;
|
8345 | this.yylloc.last_line++;
|
8346 | } else {
|
8347 | this.yylloc.last_column++;
|
8348 | }
|
8349 | if (this.options.ranges) {
|
8350 | this.yylloc.range[1]++;
|
8351 | }
|
8352 |
|
8353 | this._input = this._input.slice(1);
|
8354 | return ch;
|
8355 | },
|
8356 |
|
8357 |
|
8358 | unput:function (ch) {
|
8359 | var len = ch.length;
|
8360 | var lines = ch.split(/(?:\r\n?|\n)/g);
|
8361 |
|
8362 | this._input = ch + this._input;
|
8363 | this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
8364 |
|
8365 | this.offset -= len;
|
8366 | var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
8367 | this.match = this.match.substr(0, this.match.length - 1);
|
8368 | this.matched = this.matched.substr(0, this.matched.length - 1);
|
8369 |
|
8370 | if (lines.length - 1) {
|
8371 | this.yylineno -= lines.length - 1;
|
8372 | }
|
8373 | var r = this.yylloc.range;
|
8374 |
|
8375 | this.yylloc = {
|
8376 | first_line: this.yylloc.first_line,
|
8377 | last_line: this.yylineno + 1,
|
8378 | first_column: this.yylloc.first_column,
|
8379 | last_column: lines ?
|
8380 | (lines.length === oldLines.length ? this.yylloc.first_column : 0)
|
8381 | + oldLines[oldLines.length - lines.length].length - lines[0].length :
|
8382 | this.yylloc.first_column - len
|
8383 | };
|
8384 |
|
8385 | if (this.options.ranges) {
|
8386 | this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
8387 | }
|
8388 | this.yyleng = this.yytext.length;
|
8389 | return this;
|
8390 | },
|
8391 |
|
8392 |
|
8393 | more:function () {
|
8394 | this._more = true;
|
8395 | return this;
|
8396 | },
|
8397 |
|
8398 |
|
8399 | reject:function () {
|
8400 | if (this.options.backtrack_lexer) {
|
8401 | this._backtrack = true;
|
8402 | } else {
|
8403 | return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), {
|
8404 | text: "",
|
8405 | token: null,
|
8406 | line: this.yylineno
|
8407 | });
|
8408 |
|
8409 | }
|
8410 | return this;
|
8411 | },
|
8412 |
|
8413 |
|
8414 | less:function (n) {
|
8415 | this.unput(this.match.slice(n));
|
8416 | },
|
8417 |
|
8418 |
|
8419 | pastInput:function () {
|
8420 | var past = this.matched.substr(0, this.matched.length - this.match.length);
|
8421 | return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
|
8422 | },
|
8423 |
|
8424 |
|
8425 | upcomingInput:function () {
|
8426 | var next = this.match;
|
8427 | if (next.length < 20) {
|
8428 | next += this._input.substr(0, 20-next.length);
|
8429 | }
|
8430 | return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
|
8431 | },
|
8432 |
|
8433 |
|
8434 | showPosition:function () {
|
8435 | var pre = this.pastInput();
|
8436 | var c = new Array(pre.length + 1).join("-");
|
8437 | return pre + this.upcomingInput() + "\n" + c + "^";
|
8438 | },
|
8439 |
|
8440 |
|
8441 | test_match:function(match, indexed_rule) {
|
8442 | var token,
|
8443 | lines,
|
8444 | backup;
|
8445 |
|
8446 | if (this.options.backtrack_lexer) {
|
8447 |
|
8448 | backup = {
|
8449 | yylineno: this.yylineno,
|
8450 | yylloc: {
|
8451 | first_line: this.yylloc.first_line,
|
8452 | last_line: this.last_line,
|
8453 | first_column: this.yylloc.first_column,
|
8454 | last_column: this.yylloc.last_column
|
8455 | },
|
8456 | yytext: this.yytext,
|
8457 | match: this.match,
|
8458 | matches: this.matches,
|
8459 | matched: this.matched,
|
8460 | yyleng: this.yyleng,
|
8461 | offset: this.offset,
|
8462 | _more: this._more,
|
8463 | _input: this._input,
|
8464 | yy: this.yy,
|
8465 | conditionStack: this.conditionStack.slice(0),
|
8466 | done: this.done
|
8467 | };
|
8468 | if (this.options.ranges) {
|
8469 | backup.yylloc.range = this.yylloc.range.slice(0);
|
8470 | }
|
8471 | }
|
8472 |
|
8473 | lines = match[0].match(/(?:\r\n?|\n).*/g);
|
8474 | if (lines) {
|
8475 | this.yylineno += lines.length;
|
8476 | }
|
8477 | this.yylloc = {
|
8478 | first_line: this.yylloc.last_line,
|
8479 | last_line: this.yylineno + 1,
|
8480 | first_column: this.yylloc.last_column,
|
8481 | last_column: lines ?
|
8482 | lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
|
8483 | this.yylloc.last_column + match[0].length
|
8484 | };
|
8485 | this.yytext += match[0];
|
8486 | this.match += match[0];
|
8487 | this.matches = match;
|
8488 | this.yyleng = this.yytext.length;
|
8489 | if (this.options.ranges) {
|
8490 | this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
8491 | }
|
8492 | this._more = false;
|
8493 | this._backtrack = false;
|
8494 | this._input = this._input.slice(match[0].length);
|
8495 | this.matched += match[0];
|
8496 | token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
8497 | if (this.done && this._input) {
|
8498 | this.done = false;
|
8499 | }
|
8500 | if (token) {
|
8501 | return token;
|
8502 | } else if (this._backtrack) {
|
8503 |
|
8504 | for (var k in backup) {
|
8505 | this[k] = backup[k];
|
8506 | }
|
8507 | return false;
|
8508 | }
|
8509 | return false;
|
8510 | },
|
8511 |
|
8512 |
|
8513 | next:function () {
|
8514 | if (this.done) {
|
8515 | return this.EOF;
|
8516 | }
|
8517 | if (!this._input) {
|
8518 | this.done = true;
|
8519 | }
|
8520 |
|
8521 | var token,
|
8522 | match,
|
8523 | tempMatch,
|
8524 | index;
|
8525 | if (!this._more) {
|
8526 | this.yytext = '';
|
8527 | this.match = '';
|
8528 | }
|
8529 | var rules = this._currentRules();
|
8530 | for (var i = 0; i < rules.length; i++) {
|
8531 | tempMatch = this._input.match(this.rules[rules[i]]);
|
8532 | if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
8533 | match = tempMatch;
|
8534 | index = i;
|
8535 | if (this.options.backtrack_lexer) {
|
8536 | token = this.test_match(tempMatch, rules[i]);
|
8537 | if (token !== false) {
|
8538 | return token;
|
8539 | } else if (this._backtrack) {
|
8540 | match = false;
|
8541 | continue;
|
8542 | } else {
|
8543 |
|
8544 | return false;
|
8545 | }
|
8546 | } else if (!this.options.flex) {
|
8547 | break;
|
8548 | }
|
8549 | }
|
8550 | }
|
8551 | if (match) {
|
8552 | token = this.test_match(match, rules[index]);
|
8553 | if (token !== false) {
|
8554 | return token;
|
8555 | }
|
8556 |
|
8557 | return false;
|
8558 | }
|
8559 | if (this._input === "") {
|
8560 | return this.EOF;
|
8561 | } else {
|
8562 | return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
|
8563 | text: "",
|
8564 | token: null,
|
8565 | line: this.yylineno
|
8566 | });
|
8567 | }
|
8568 | },
|
8569 |
|
8570 |
|
8571 | lex:function lex () {
|
8572 | var r = this.next();
|
8573 | if (r) {
|
8574 | return r;
|
8575 | } else {
|
8576 | return this.lex();
|
8577 | }
|
8578 | },
|
8579 |
|
8580 |
|
8581 | begin:function begin (condition) {
|
8582 | this.conditionStack.push(condition);
|
8583 | },
|
8584 |
|
8585 |
|
8586 | popState:function popState () {
|
8587 | var n = this.conditionStack.length - 1;
|
8588 | if (n > 0) {
|
8589 | return this.conditionStack.pop();
|
8590 | } else {
|
8591 | return this.conditionStack[0];
|
8592 | }
|
8593 | },
|
8594 |
|
8595 |
|
8596 | _currentRules:function _currentRules () {
|
8597 | if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
8598 | return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
8599 | } else {
|
8600 | return this.conditions["INITIAL"].rules;
|
8601 | }
|
8602 | },
|
8603 |
|
8604 |
|
8605 | topState:function topState (n) {
|
8606 | n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
8607 | if (n >= 0) {
|
8608 | return this.conditionStack[n];
|
8609 | } else {
|
8610 | return "INITIAL";
|
8611 | }
|
8612 | },
|
8613 |
|
8614 |
|
8615 | pushState:function pushState (condition) {
|
8616 | this.begin(condition);
|
8617 | },
|
8618 |
|
8619 |
|
8620 | stateStackSize:function stateStackSize() {
|
8621 | return this.conditionStack.length;
|
8622 | },
|
8623 | options: {"case-insensitive":true},
|
8624 | performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
|
8625 |
|
8626 |
|
8627 | var YYSTATE=YY_START;
|
8628 | switch($avoiding_name_collisions) {
|
8629 | case 0:
|
8630 | break;
|
8631 | case 1:
|
8632 | break;
|
8633 | case 2:return 4 ;
|
8634 | break;
|
8635 | case 3:return 9 ;
|
8636 | break;
|
8637 | case 4:return 'space';
|
8638 | break;
|
8639 | case 5:return 12;
|
8640 | break;
|
8641 | case 6:this.begin("string");
|
8642 | break;
|
8643 | case 7:this.popState();
|
8644 | break;
|
8645 | case 8:return "STR";
|
8646 | break;
|
8647 | case 9:return "VALUE";
|
8648 | break;
|
8649 | case 10:return 6 ;
|
8650 | break;
|
8651 | }
|
8652 | },
|
8653 | rules: [/^(?:%%[^\n]*)/i,/^(?:\s+)/i,/^(?:pie\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:title\s[^#\n;]+)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],
|
8654 | conditions: {"string":{"rules":[7,8],"inclusive":false},"INITIAL":{"rules":[0,1,2,3,4,5,6,9,10],"inclusive":true}}
|
8655 | });
|
8656 | return lexer;
|
8657 | })();
|
8658 | parser.lexer = lexer;
|
8659 | function Parser () {
|
8660 | this.yy = {};
|
8661 | }
|
8662 | Parser.prototype = parser;parser.Parser = Parser;
|
8663 | return new Parser;
|
8664 | })();
|
8665 |
|
8666 |
|
8667 | if (true) {
|
8668 | exports.parser = parser;
|
8669 | exports.Parser = parser.Parser;
|
8670 | exports.parse = function () { return parser.parse.apply(parser, arguments); };
|
8671 | exports.main = function commonjsMain (args) {
|
8672 | if (!args[1]) {
|
8673 | console.log('Usage: '+args[0]+' FILE');
|
8674 | process.exit(1);
|
8675 | }
|
8676 | var source = __webpack_require__( "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__( "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
|
8677 | return exports.parser.parse(source);
|
8678 | };
|
8679 | if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
|
8680 | exports.main(process.argv.slice(1));
|
8681 | }
|
8682 | }
|
8683 | }.call(this, __webpack_require__( "./node_modules/process/browser.js"), __webpack_require__( "./node_modules/webpack/buildin/module.js")(module)))
|
8684 |
|
8685 | }),
|
8686 |
|
8687 | "./src/diagrams/pie/pieDb.js":
|
8688 |
|
8689 |
|
8690 |
|
8691 |
|
8692 | (function(module, __webpack_exports__, __webpack_require__) {
|
8693 |
|
8694 | "use strict";
|
8695 | __webpack_require__.r(__webpack_exports__);
|
8696 | var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "./src/logger.js");
|
8697 |
|
8698 |
|
8699 |
|
8700 |
|
8701 | let sections = {};
|
8702 | let title = '';
|
8703 |
|
8704 | const addSection = function (id, value) {
|
8705 | if (typeof sections[id] === 'undefined') {
|
8706 | sections[id] = value;
|
8707 | _logger__WEBPACK_IMPORTED_MODULE_0__["logger"].debug('Added new section :', id);
|
8708 | }
|
8709 | };
|
8710 |
|
8711 | const getSections = () => sections;
|
8712 |
|
8713 | const setTitle = function (txt) {
|
8714 | title = txt;
|
8715 | };
|
8716 |
|
8717 | const getTitle = function () {
|
8718 | return title;
|
8719 | };
|
8720 |
|
8721 | const cleanupValue = function (value) {
|
8722 | if (value.substring(0, 1) === ':') {
|
8723 | value = value.substring(1).trim();
|
8724 | return Number(value.trim());
|
8725 | } else {
|
8726 | return Number(value.trim());
|
8727 | }
|
8728 | };
|
8729 |
|
8730 | const clear = function () {
|
8731 | sections = {};
|
8732 | title = '';
|
8733 | };
|
8734 |
|
8735 |
|
8736 |
|
8737 |
|
8738 | __webpack_exports__["default"] = ({
|
8739 | addSection,
|
8740 | getSections,
|
8741 | cleanupValue,
|
8742 | clear,
|
8743 | setTitle,
|
8744 | getTitle
|
8745 |
|
8746 | });
|
8747 |
|
8748 | }),
|
8749 |
|
8750 | "./src/diagrams/pie/pieRenderer.js":
|
8751 |
|
8752 |
|
8753 |
|
8754 |
|
8755 | (function(module, __webpack_exports__, __webpack_require__) {
|
8756 |
|
8757 | "use strict";
|
8758 | __webpack_require__.r(__webpack_exports__);
|
8759 | __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
|
8760 | __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
|
8761 | var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "d3");
|
8762 | var d3__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
|
8763 | var _pieDb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./src/diagrams/pie/pieDb.js");
|
8764 | var _parser_pie__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./src/diagrams/pie/parser/pie.jison");
|
8765 | var _parser_pie__WEBPACK_IMPORTED_MODULE_2___default = __webpack_require__.n(_parser_pie__WEBPACK_IMPORTED_MODULE_2__);
|
8766 | var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./src/logger.js");
|
8767 |
|
8768 |
|
8769 |
|
8770 |
|
8771 |
|
8772 |
|
8773 |
|
8774 | const conf = {};
|
8775 | const setConf = function (cnf) {
|
8776 | const keys = Object.keys(cnf);
|
8777 | keys.forEach(function (key) {
|
8778 | conf[key] = cnf[key];
|
8779 | });
|
8780 | };
|
8781 |
|
8782 |
|
8783 |
|
8784 |
|
8785 |
|
8786 |
|
8787 | let w;
|
8788 | const draw = (txt, id, ver) => {
|
8789 | try {
|
8790 | const parser = _parser_pie__WEBPACK_IMPORTED_MODULE_2___default.a.parser;
|
8791 | parser.yy = _pieDb__WEBPACK_IMPORTED_MODULE_1__["default"];
|
8792 | _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Rendering info diagram\n' + txt);
|
8793 |
|
8794 | parser.yy.clear();
|
8795 | parser.parse(txt);
|
8796 | _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Parsed info diagram');
|
8797 | const elem = document.getElementById(id);
|
8798 | w = elem.parentElement.offsetWidth;
|
8799 |
|
8800 | if (typeof w === 'undefined') {
|
8801 | w = 1200;
|
8802 | }
|
8803 |
|
8804 | if (typeof conf.useWidth !== 'undefined') {
|
8805 | w = conf.useWidth;
|
8806 | }
|
8807 |
|
8808 | const h = 450;
|
8809 | elem.setAttribute('height', '100%');
|
8810 |
|
8811 | elem.setAttribute('viewBox', '0 0 ' + w + ' ' + h);
|
8812 |
|
8813 | var width = w;
|
8814 |
|
8815 | var height = 450;
|
8816 | var margin = 40;
|
8817 | var radius = Math.min(width, height) / 2 - margin;
|
8818 | var svg = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#' + id).append('svg').attr('width', width).attr('height', height).append('g').attr('transform', 'translate(' + width / 2 + ',' + height / 2 + ')');
|
8819 | var data = _pieDb__WEBPACK_IMPORTED_MODULE_1__["default"].getSections();
|
8820 | _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info(data);
|
8821 |
|
8822 | var color = d3__WEBPACK_IMPORTED_MODULE_0__["scaleOrdinal"]().domain(data).range(d3__WEBPACK_IMPORTED_MODULE_0__["schemeSet2"]);
|
8823 |
|
8824 | var pie = d3__WEBPACK_IMPORTED_MODULE_0__["pie"]().value(function (d) {
|
8825 | return d.value;
|
8826 | });
|
8827 | var dataReady = pie(d3__WEBPACK_IMPORTED_MODULE_0__["entries"](data));
|
8828 |
|
8829 |
|
8830 | var arcGenerator = d3__WEBPACK_IMPORTED_MODULE_0__["arc"]().innerRadius(0).outerRadius(radius);
|
8831 |
|
8832 | svg.selectAll('mySlices').data(dataReady).enter().append('path').attr('d', arcGenerator).attr('fill', function (d) {
|
8833 | return color(d.data.key);
|
8834 | }).attr('stroke', 'black').style('stroke-width', '2px').style('opacity', 0.7);
|
8835 |
|
8836 | svg.selectAll('mySlices').data(dataReady).enter().append('text').text(function (d) {
|
8837 | return d.data.key;
|
8838 | }).attr('transform', function (d) {
|
8839 | return 'translate(' + arcGenerator.centroid(d) + ')';
|
8840 | }).style('text-anchor', 'middle').style('font-size', 17);
|
8841 | svg.append('text').text(parser.yy.getTitle()).attr('x', 0).attr('y', -(h - 50) / 2).attr('class', 'pieTitleText');
|
8842 | } catch (e) {
|
8843 | _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].error('Error while rendering info diagram');
|
8844 | _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].error(e.message);
|
8845 | }
|
8846 | };
|
8847 | __webpack_exports__["default"] = ({
|
8848 | setConf,
|
8849 | draw
|
8850 | });
|
8851 |
|
8852 | }),
|
8853 |
|
8854 | "./src/diagrams/sequence/parser/sequenceDiagram.jison":
|
8855 |
|
8856 |
|
8857 |
|
8858 |
|
8859 | (function(module, exports, __webpack_require__) {
|
8860 |
|
8861 | (function(process, module) {
|
8862 |
|
8863 |
|
8864 |
|
8865 |
|
8866 |
|
8867 |
|
8868 |
|
8869 |
|
8870 |
|
8871 |
|
8872 |
|
8873 |
|
8874 |
|
8875 |
|
8876 |
|
8877 |
|
8878 |
|
8879 |
|
8880 |
|
8881 |
|
8882 |
|
8883 |
|
8884 |
|
8885 |
|
8886 |
|
8887 |
|
8888 |
|
8889 |
|
8890 |
|
8891 |
|
8892 |
|
8893 |
|
8894 |
|
8895 |
|
8896 |
|
8897 |
|
8898 |
|
8899 |
|
8900 |
|
8901 |
|
8902 |
|
8903 |
|
8904 |
|
8905 |
|
8906 |
|
8907 |
|
8908 |
|
8909 |
|
8910 |
|
8911 |
|
8912 |
|
8913 |
|
8914 |
|
8915 |
|
8916 |
|
8917 |
|
8918 |
|
8919 |
|
8920 |
|
8921 |
|
8922 |
|
8923 |
|
8924 |
|
8925 |
|
8926 |
|
8927 |
|
8928 |
|
8929 |
|
8930 |
|
8931 |
|
8932 |
|
8933 |
|
8934 | var parser = (function(){
|
8935 | var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,2],$V1=[1,3],$V2=[1,4],$V3=[2,4],$V4=[1,9],$V5=[1,11],$V6=[1,12],$V7=[1,14],$V8=[1,15],$V9=[1,17],$Va=[1,18],$Vb=[1,19],$Vc=[1,20],$Vd=[1,21],$Ve=[1,22],$Vf=[1,24],$Vg=[1,25],$Vh=[1,4,5,10,15,16,18,20,21,22,23,24,26,28,29,30,41],$Vi=[1,33],$Vj=[4,5,10,15,16,18,20,21,22,23,24,26,30,41],$Vk=[4,5,10,15,16,18,20,21,22,23,24,26,29,30,41],$Vl=[4,5,10,15,16,18,20,21,22,23,24,26,28,30,41],$Vm=[39,40,41];
|
8936 | var parser = {trace: function trace () { },
|
8937 | yy: {},
|
8938 | symbols_: {"error":2,"start":3,"SPACE":4,"NL":5,"SD":6,"document":7,"line":8,"statement":9,"participant":10,"actor":11,"AS":12,"restOfLine":13,"signal":14,"activate":15,"deactivate":16,"note_statement":17,"title":18,"text2":19,"loop":20,"end":21,"rect":22,"opt":23,"alt":24,"else_sections":25,"par":26,"par_sections":27,"and":28,"else":29,"note":30,"placement":31,"over":32,"actor_pair":33,"spaceList":34,",":35,"left_of":36,"right_of":37,"signaltype":38,"+":39,"-":40,"ACTOR":41,"SOLID_OPEN_ARROW":42,"DOTTED_OPEN_ARROW":43,"SOLID_ARROW":44,"DOTTED_ARROW":45,"SOLID_CROSS":46,"DOTTED_CROSS":47,"TXT":48,"$accept":0,"$end":1},
|
8939 | terminals_: {2:"error",4:"SPACE",5:"NL",6:"SD",10:"participant",12:"AS",13:"restOfLine",15:"activate",16:"deactivate",18:"title",20:"loop",21:"end",22:"rect",23:"opt",24:"alt",26:"par",28:"and",29:"else",30:"note",32:"over",35:",",36:"left_of",37:"right_of",39:"+",40:"-",41:"ACTOR",42:"SOLID_OPEN_ARROW",43:"DOTTED_OPEN_ARROW",44:"SOLID_ARROW",45:"DOTTED_ARROW",46:"SOLID_CROSS",47:"DOTTED_CROSS",48:"TXT"},
|
8940 | productions_: [0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,5],[9,3],[9,2],[9,3],[9,3],[9,2],[9,3],[9,4],[9,4],[9,4],[9,4],[9,4],[27,1],[27,4],[25,1],[25,4],[17,4],[17,4],[34,2],[34,1],[33,3],[33,1],[31,1],[31,1],[14,5],[14,5],[14,4],[11,1],[38,1],[38,1],[38,1],[38,1],[38,1],[38,1],[19,1]],
|
8941 | performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
|
8942 |
|
8943 |
|
8944 | var $0 = $$.length - 1;
|
8945 | switch (yystate) {
|
8946 | case 3:
|
8947 | yy.apply($$[$0]);return $$[$0];
|
8948 | break;
|
8949 | case 4:
|
8950 | this.$ = []
|
8951 | break;
|
8952 | case 5:
|
8953 | $$[$0-1].push($$[$0]);this.$ = $$[$0-1]
|
8954 | break;
|
8955 | case 6: case 7:
|
8956 | this.$ = $$[$0]
|
8957 | break;
|
8958 | case 8:
|
8959 | this.$=[];
|
8960 | break;
|
8961 | case 9:
|
8962 | $$[$0-3].description=$$[$0-1]; this.$=$$[$0-3];
|
8963 | break;
|
8964 | case 10:
|
8965 | this.$=$$[$0-1];
|
8966 | break;
|
8967 | case 12:
|
8968 | this.$={type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0-1]};
|
8969 | break;
|
8970 | case 13:
|
8971 | this.$={type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0-1]};
|
8972 | break;
|
8973 | case 15:
|
8974 | this.$=[{type:'setTitle', text:$$[$0-1]}]
|
8975 | break;
|
8976 | case 16:
|
8977 |
|
8978 | $$[$0-1].unshift({type: 'loopStart', loopText:$$[$0-2], signalType: yy.LINETYPE.LOOP_START});
|
8979 | $$[$0-1].push({type: 'loopEnd', loopText:$$[$0-2], signalType: yy.LINETYPE.LOOP_END});
|
8980 | this.$=$$[$0-1];
|
8981 | break;
|
8982 | case 17:
|
8983 |
|
8984 | $$[$0-1].unshift({type: 'rectStart', color:$$[$0-2], signalType: yy.LINETYPE.RECT_START });
|
8985 | $$[$0-1].push({type: 'rectEnd', color:$$[$0-2], signalType: yy.LINETYPE.RECT_END });
|
8986 | this.$=$$[$0-1];
|
8987 | break;
|
8988 | case 18:
|
8989 |
|
8990 | $$[$0-1].unshift({type: 'optStart', optText:$$[$0-2], signalType: yy.LINETYPE.OPT_START});
|
8991 | $$[$0-1].push({type: 'optEnd', optText:$$[$0-2], signalType: yy.LINETYPE.OPT_END});
|
8992 | this.$=$$[$0-1];
|
8993 | break;
|
8994 | case 19:
|
8995 |
|
8996 |
|
8997 | $$[$0-1].unshift({type: 'altStart', altText:$$[$0-2], signalType: yy.LINETYPE.ALT_START});
|
8998 |
|
8999 |
|
9000 | $$[$0-1].push({type: 'altEnd', signalType: yy.LINETYPE.ALT_END});
|
9001 | this.$=$$[$0-1];
|
9002 | break;
|
9003 | case 20:
|
9004 |
|
9005 |
|
9006 | $$[$0-1].unshift({type: 'parStart', parText:$$[$0-2], signalType: yy.LINETYPE.PAR_START});
|
9007 |
|
9008 |
|
9009 | $$[$0-1].push({type: 'parEnd', signalType: yy.LINETYPE.PAR_END});
|
9010 | this.$=$$[$0-1];
|
9011 | break;
|
9012 | case 22:
|
9013 | this.$ = $$[$0-3].concat([{type: 'and', parText:$$[$0-1], signalType: yy.LINETYPE.PAR_AND}, $$[$0]]);
|
9014 | break;
|
9015 | case 24:
|
9016 | this.$ = $$[$0-3].concat([{type: 'else', altText:$$[$0-1], signalType: yy.LINETYPE.ALT_ELSE}, $$[$0]]);
|
9017 | break;
|
9018 | case 25:
|
9019 |
|
9020 | this.$ = [$$[$0-1], {type:'addNote', placement:$$[$0-2], actor:$$[$0-1].actor, text:$$[$0]}];
|
9021 | break;
|
9022 | case 26:
|
9023 |
|
9024 |
|
9025 | $$[$0-2] = [].concat($$[$0-1], $$[$0-1]).slice(0, 2);
|
9026 | $$[$0-2][0] = $$[$0-2][0].actor;
|
9027 | $$[$0-2][1] = $$[$0-2][1].actor;
|
9028 | this.$ = [$$[$0-1], {type:'addNote', placement:yy.PLACEMENT.OVER, actor:$$[$0-2].slice(0, 2), text:$$[$0]}];
|
9029 | break;
|
9030 | case 29:
|
9031 | this.$ = [$$[$0-2], $$[$0]];
|
9032 | break;
|
9033 | case 30:
|
9034 | this.$ = $$[$0];
|
9035 | break;
|
9036 | case 31:
|
9037 | this.$ = yy.PLACEMENT.LEFTOF;
|
9038 | break;
|
9039 | case 32:
|
9040 | this.$ = yy.PLACEMENT.RIGHTOF;
|
9041 | break;
|
9042 | case 33:
|
9043 | this.$ = [$$[$0-4],$$[$0-1],{type: 'addMessage', from:$$[$0-4].actor, to:$$[$0-1].actor, signalType:$$[$0-3], msg:$$[$0]},
|
9044 | {type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0-1]}
|
9045 | ]
|
9046 | break;
|
9047 | case 34:
|
9048 | this.$ = [$$[$0-4],$$[$0-1],{type: 'addMessage', from:$$[$0-4].actor, to:$$[$0-1].actor, signalType:$$[$0-3], msg:$$[$0]},
|
9049 | {type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0-4]}
|
9050 | ]
|
9051 | break;
|
9052 | case 35:
|
9053 | this.$ = [$$[$0-3],$$[$0-1],{type: 'addMessage', from:$$[$0-3].actor, to:$$[$0-1].actor, signalType:$$[$0-2], msg:$$[$0]}]
|
9054 | break;
|
9055 | case 36:
|
9056 | this.$={type: 'addActor', actor:$$[$0]}
|
9057 | break;
|
9058 | case 37:
|
9059 | this.$ = yy.LINETYPE.SOLID_OPEN;
|
9060 | break;
|
9061 | case 38:
|
9062 | this.$ = yy.LINETYPE.DOTTED_OPEN;
|
9063 | break;
|
9064 | case 39:
|
9065 | this.$ = yy.LINETYPE.SOLID;
|
9066 | break;
|
9067 | case 40:
|
9068 | this.$ = yy.LINETYPE.DOTTED;
|
9069 | break;
|
9070 | case 41:
|
9071 | this.$ = yy.LINETYPE.SOLID_CROSS;
|
9072 | break;
|
9073 | case 42:
|
9074 | this.$ = yy.LINETYPE.DOTTED_CROSS;
|
9075 | break;
|
9076 | case 43:
|
9077 | this.$ = $$[$0].substring(1).trim().replace(/\\n/gm, "\n");
|
9078 | break;
|
9079 | }
|
9080 | },
|
9081 | table: [{3:1,4:$V0,5:$V1,6:$V2},{1:[3]},{3:5,4:$V0,5:$V1,6:$V2},{3:6,4:$V0,5:$V1,6:$V2},o([1,4,5,10,15,16,18,20,22,23,24,26,30,41],$V3,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:$V4,5:$V5,8:8,9:10,10:$V6,11:23,14:13,15:$V7,16:$V8,17:16,18:$V9,20:$Va,22:$Vb,23:$Vc,24:$Vd,26:$Ve,30:$Vf,41:$Vg},o($Vh,[2,5]),{9:26,10:$V6,11:23,14:13,15:$V7,16:$V8,17:16,18:$V9,20:$Va,22:$Vb,23:$Vc,24:$Vd,26:$Ve,30:$Vf,41:$Vg},o($Vh,[2,7]),o($Vh,[2,8]),{11:27,41:$Vg},{5:[1,28]},{11:29,41:$Vg},{11:30,41:$Vg},{5:[1,31]},{19:32,48:$Vi},{13:[1,34]},{13:[1,35]},{13:[1,36]},{13:[1,37]},{13:[1,38]},{38:39,42:[1,40],43:[1,41],44:[1,42],45:[1,43],46:[1,44],47:[1,45]},{31:46,32:[1,47],36:[1,48],37:[1,49]},o([5,12,35,42,43,44,45,46,47,48],[2,36]),o($Vh,[2,6]),{5:[1,51],12:[1,50]},o($Vh,[2,11]),{5:[1,52]},{5:[1,53]},o($Vh,[2,14]),{5:[1,54]},{5:[2,43]},o($Vj,$V3,{7:55}),o($Vj,$V3,{7:56}),o($Vj,$V3,{7:57}),o($Vk,$V3,{25:58,7:59}),o($Vl,$V3,{27:60,7:61}),{11:64,39:[1,62],40:[1,63],41:$Vg},o($Vm,[2,37]),o($Vm,[2,38]),o($Vm,[2,39]),o($Vm,[2,40]),o($Vm,[2,41]),o($Vm,[2,42]),{11:65,41:$Vg},{11:67,33:66,41:$Vg},{41:[2,31]},{41:[2,32]},{13:[1,68]},o($Vh,[2,10]),o($Vh,[2,12]),o($Vh,[2,13]),o($Vh,[2,15]),{4:$V4,5:$V5,8:8,9:10,10:$V6,11:23,14:13,15:$V7,16:$V8,17:16,18:$V9,20:$Va,21:[1,69],22:$Vb,23:$Vc,24:$Vd,26:$Ve,30:$Vf,41:$Vg},{4:$V4,5:$V5,8:8,9:10,10:$V6,11:23,14:13,15:$V7,16:$V8,17:16,18:$V9,20:$Va,21:[1,70],22:$Vb,23:$Vc,24:$Vd,26:$Ve,30:$Vf,41:$Vg},{4:$V4,5:$V5,8:8,9:10,10:$V6,11:23,14:13,15:$V7,16:$V8,17:16,18:$V9,20:$Va,21:[1,71],22:$Vb,23:$Vc,24:$Vd,26:$Ve,30:$Vf,41:$Vg},{21:[1,72]},{4:$V4,5:$V5,8:8,9:10,10:$V6,11:23,14:13,15:$V7,16:$V8,17:16,18:$V9,20:$Va,21:[2,23],22:$Vb,23:$Vc,24:$Vd,26:$Ve,29:[1,73],30:$Vf,41:$Vg},{21:[1,74]},{4:$V4,5:$V5,8:8,9:10,10:$V6,11:23,14:13,15:$V7,16:$V8,17:16,18:$V9,20:$Va,21:[2,21],22:$Vb,23:$Vc,24:$Vd,26:$Ve,28:[1,75],30:$Vf,41:$Vg},{11:76,41:$Vg},{11:77,41:$Vg},{19:78,48:$Vi},{19:79,48:$Vi},{19:80,48:$Vi},{35:[1,81],48:[2,30]},{5:[1,82]},o($Vh,[2,16]),o($Vh,[2,17]),o($Vh,[2,18]),o($Vh,[2,19]),{13:[1,83]},o($Vh,[2,20]),{13:[1,84]},{19:85,48:$Vi},{19:86,48:$Vi},{5:[2,35]},{5:[2,25]},{5:[2,26]},{11:87,41:$Vg},o($Vh,[2,9]),o($Vk,$V3,{7:59,25:88}),o($Vl,$V3,{7:61,27:89}),{5:[2,33]},{5:[2,34]},{48:[2,29]},{21:[2,24]},{21:[2,22]}],
|
9082 | defaultActions: {5:[2,1],6:[2,2],33:[2,43],48:[2,31],49:[2,32],78:[2,35],79:[2,25],80:[2,26],85:[2,33],86:[2,34],87:[2,29],88:[2,24],89:[2,22]},
|
9083 | parseError: function parseError (str, hash) {
|
9084 | if (hash.recoverable) {
|
9085 | this.trace(str);
|
9086 | } else {
|
9087 | var error = new Error(str);
|
9088 | error.hash = hash;
|
9089 | throw error;
|
9090 | }
|
9091 | },
|
9092 | parse: function parse(input) {
|
9093 | var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
|
9094 | var args = lstack.slice.call(arguments, 1);
|
9095 | var lexer = Object.create(this.lexer);
|
9096 | var sharedState = { yy: {} };
|
9097 | for (var k in this.yy) {
|
9098 | if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
9099 | sharedState.yy[k] = this.yy[k];
|
9100 | }
|
9101 | }
|
9102 | lexer.setInput(input, sharedState.yy);
|
9103 | sharedState.yy.lexer = lexer;
|
9104 | sharedState.yy.parser = this;
|
9105 | if (typeof lexer.yylloc == 'undefined') {
|
9106 | lexer.yylloc = {};
|
9107 | }
|
9108 | var yyloc = lexer.yylloc;
|
9109 | lstack.push(yyloc);
|
9110 | var ranges = lexer.options && lexer.options.ranges;
|
9111 | if (typeof sharedState.yy.parseError === 'function') {
|
9112 | this.parseError = sharedState.yy.parseError;
|
9113 | } else {
|
9114 | this.parseError = Object.getPrototypeOf(this).parseError;
|
9115 | }
|
9116 | function popStack(n) {
|
9117 | stack.length = stack.length - 2 * n;
|
9118 | vstack.length = vstack.length - n;
|
9119 | lstack.length = lstack.length - n;
|
9120 | }
|
9121 | function lex() {
|
9122 | var token;
|
9123 | token = tstack.pop() || lexer.lex() || EOF;
|
9124 | if (typeof token !== 'number') {
|
9125 | if (token instanceof Array) {
|
9126 | tstack = token;
|
9127 | token = tstack.pop();
|
9128 | }
|
9129 | token = self.symbols_[token] || token;
|
9130 | }
|
9131 | return token;
|
9132 | }
|
9133 | var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
|
9134 | while (true) {
|
9135 | state = stack[stack.length - 1];
|
9136 | if (this.defaultActions[state]) {
|
9137 | action = this.defaultActions[state];
|
9138 | } else {
|
9139 | if (symbol === null || typeof symbol == 'undefined') {
|
9140 | symbol = lex();
|
9141 | }
|
9142 | action = table[state] && table[state][symbol];
|
9143 | }
|
9144 | if (typeof action === 'undefined' || !action.length || !action[0]) {
|
9145 | var errStr = '';
|
9146 | expected = [];
|
9147 | for (p in table[state]) {
|
9148 | if (this.terminals_[p] && p > TERROR) {
|
9149 | expected.push('\'' + this.terminals_[p] + '\'');
|
9150 | }
|
9151 | }
|
9152 | if (lexer.showPosition) {
|
9153 | errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
|
9154 | } else {
|
9155 | errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
|
9156 | }
|
9157 | this.parseError(errStr, {
|
9158 | text: lexer.match,
|
9159 | token: this.terminals_[symbol] || symbol,
|
9160 | line: lexer.yylineno,
|
9161 | loc: yyloc,
|
9162 | expected: expected
|
9163 | });
|
9164 | }
|
9165 | if (action[0] instanceof Array && action.length > 1) {
|
9166 | throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
|
9167 | }
|
9168 | switch (action[0]) {
|
9169 | case 1:
|
9170 | stack.push(symbol);
|
9171 | vstack.push(lexer.yytext);
|
9172 | lstack.push(lexer.yylloc);
|
9173 | stack.push(action[1]);
|
9174 | symbol = null;
|
9175 | if (!preErrorSymbol) {
|
9176 | yyleng = lexer.yyleng;
|
9177 | yytext = lexer.yytext;
|
9178 | yylineno = lexer.yylineno;
|
9179 | yyloc = lexer.yylloc;
|
9180 | if (recovering > 0) {
|
9181 | recovering--;
|
9182 | }
|
9183 | } else {
|
9184 | symbol = preErrorSymbol;
|
9185 | preErrorSymbol = null;
|
9186 | }
|
9187 | break;
|
9188 | case 2:
|
9189 | len = this.productions_[action[1]][1];
|
9190 | yyval.$ = vstack[vstack.length - len];
|
9191 | yyval._$ = {
|
9192 | first_line: lstack[lstack.length - (len || 1)].first_line,
|
9193 | last_line: lstack[lstack.length - 1].last_line,
|
9194 | first_column: lstack[lstack.length - (len || 1)].first_column,
|
9195 | last_column: lstack[lstack.length - 1].last_column
|
9196 | };
|
9197 | if (ranges) {
|
9198 | yyval._$.range = [
|
9199 | lstack[lstack.length - (len || 1)].range[0],
|
9200 | lstack[lstack.length - 1].range[1]
|
9201 | ];
|
9202 | }
|
9203 | r = this.performAction.apply(yyval, [
|
9204 | yytext,
|
9205 | yyleng,
|
9206 | yylineno,
|
9207 | sharedState.yy,
|
9208 | action[1],
|
9209 | vstack,
|
9210 | lstack
|
9211 | ].concat(args));
|
9212 | if (typeof r !== 'undefined') {
|
9213 | return r;
|
9214 | }
|
9215 | if (len) {
|
9216 | stack = stack.slice(0, -1 * len * 2);
|
9217 | vstack = vstack.slice(0, -1 * len);
|
9218 | lstack = lstack.slice(0, -1 * len);
|
9219 | }
|
9220 | stack.push(this.productions_[action[1]][0]);
|
9221 | vstack.push(yyval.$);
|
9222 | lstack.push(yyval._$);
|
9223 | newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
9224 | stack.push(newState);
|
9225 | break;
|
9226 | case 3:
|
9227 | return true;
|
9228 | }
|
9229 | }
|
9230 | return true;
|
9231 | }};
|
9232 |
|
9233 |
|
9234 | var lexer = (function(){
|
9235 | var lexer = ({
|
9236 |
|
9237 | EOF:1,
|
9238 |
|
9239 | parseError:function parseError(str, hash) {
|
9240 | if (this.yy.parser) {
|
9241 | this.yy.parser.parseError(str, hash);
|
9242 | } else {
|
9243 | throw new Error(str);
|
9244 | }
|
9245 | },
|
9246 |
|
9247 |
|
9248 | setInput:function (input, yy) {
|
9249 | this.yy = yy || this.yy || {};
|
9250 | this._input = input;
|
9251 | this._more = this._backtrack = this.done = false;
|
9252 | this.yylineno = this.yyleng = 0;
|
9253 | this.yytext = this.matched = this.match = '';
|
9254 | this.conditionStack = ['INITIAL'];
|
9255 | this.yylloc = {
|
9256 | first_line: 1,
|
9257 | first_column: 0,
|
9258 | last_line: 1,
|
9259 | last_column: 0
|
9260 | };
|
9261 | if (this.options.ranges) {
|
9262 | this.yylloc.range = [0,0];
|
9263 | }
|
9264 | this.offset = 0;
|
9265 | return this;
|
9266 | },
|
9267 |
|
9268 |
|
9269 | input:function () {
|
9270 | var ch = this._input[0];
|
9271 | this.yytext += ch;
|
9272 | this.yyleng++;
|
9273 | this.offset++;
|
9274 | this.match += ch;
|
9275 | this.matched += ch;
|
9276 | var lines = ch.match(/(?:\r\n?|\n).*/g);
|
9277 | if (lines) {
|
9278 | this.yylineno++;
|
9279 | this.yylloc.last_line++;
|
9280 | } else {
|
9281 | this.yylloc.last_column++;
|
9282 | }
|
9283 | if (this.options.ranges) {
|
9284 | this.yylloc.range[1]++;
|
9285 | }
|
9286 |
|
9287 | this._input = this._input.slice(1);
|
9288 | return ch;
|
9289 | },
|
9290 |
|
9291 |
|
9292 | unput:function (ch) {
|
9293 | var len = ch.length;
|
9294 | var lines = ch.split(/(?:\r\n?|\n)/g);
|
9295 |
|
9296 | this._input = ch + this._input;
|
9297 | this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
9298 |
|
9299 | this.offset -= len;
|
9300 | var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
9301 | this.match = this.match.substr(0, this.match.length - 1);
|
9302 | this.matched = this.matched.substr(0, this.matched.length - 1);
|
9303 |
|
9304 | if (lines.length - 1) {
|
9305 | this.yylineno -= lines.length - 1;
|
9306 | }
|
9307 | var r = this.yylloc.range;
|
9308 |
|
9309 | this.yylloc = {
|
9310 | first_line: this.yylloc.first_line,
|
9311 | last_line: this.yylineno + 1,
|
9312 | first_column: this.yylloc.first_column,
|
9313 | last_column: lines ?
|
9314 | (lines.length === oldLines.length ? this.yylloc.first_column : 0)
|
9315 | + oldLines[oldLines.length - lines.length].length - lines[0].length :
|
9316 | this.yylloc.first_column - len
|
9317 | };
|
9318 |
|
9319 | if (this.options.ranges) {
|
9320 | this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
9321 | }
|
9322 | this.yyleng = this.yytext.length;
|
9323 | return this;
|
9324 | },
|
9325 |
|
9326 |
|
9327 | more:function () {
|
9328 | this._more = true;
|
9329 | return this;
|
9330 | },
|
9331 |
|
9332 |
|
9333 | reject:function () {
|
9334 | if (this.options.backtrack_lexer) {
|
9335 | this._backtrack = true;
|
9336 | } else {
|
9337 | return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), {
|
9338 | text: "",
|
9339 | token: null,
|
9340 | line: this.yylineno
|
9341 | });
|
9342 |
|
9343 | }
|
9344 | return this;
|
9345 | },
|
9346 |
|
9347 |
|
9348 | less:function (n) {
|
9349 | this.unput(this.match.slice(n));
|
9350 | },
|
9351 |
|
9352 |
|
9353 | pastInput:function () {
|
9354 | var past = this.matched.substr(0, this.matched.length - this.match.length);
|
9355 | return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
|
9356 | },
|
9357 |
|
9358 |
|
9359 | upcomingInput:function () {
|
9360 | var next = this.match;
|
9361 | if (next.length < 20) {
|
9362 | next += this._input.substr(0, 20-next.length);
|
9363 | }
|
9364 | return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
|
9365 | },
|
9366 |
|
9367 |
|
9368 | showPosition:function () {
|
9369 | var pre = this.pastInput();
|
9370 | var c = new Array(pre.length + 1).join("-");
|
9371 | return pre + this.upcomingInput() + "\n" + c + "^";
|
9372 | },
|
9373 |
|
9374 |
|
9375 | test_match:function(match, indexed_rule) {
|
9376 | var token,
|
9377 | lines,
|
9378 | backup;
|
9379 |
|
9380 | if (this.options.backtrack_lexer) {
|
9381 |
|
9382 | backup = {
|
9383 | yylineno: this.yylineno,
|
9384 | yylloc: {
|
9385 | first_line: this.yylloc.first_line,
|
9386 | last_line: this.last_line,
|
9387 | first_column: this.yylloc.first_column,
|
9388 | last_column: this.yylloc.last_column
|
9389 | },
|
9390 | yytext: this.yytext,
|
9391 | match: this.match,
|
9392 | matches: this.matches,
|
9393 | matched: this.matched,
|
9394 | yyleng: this.yyleng,
|
9395 | offset: this.offset,
|
9396 | _more: this._more,
|
9397 | _input: this._input,
|
9398 | yy: this.yy,
|
9399 | conditionStack: this.conditionStack.slice(0),
|
9400 | done: this.done
|
9401 | };
|
9402 | if (this.options.ranges) {
|
9403 | backup.yylloc.range = this.yylloc.range.slice(0);
|
9404 | }
|
9405 | }
|
9406 |
|
9407 | lines = match[0].match(/(?:\r\n?|\n).*/g);
|
9408 | if (lines) {
|
9409 | this.yylineno += lines.length;
|
9410 | }
|
9411 | this.yylloc = {
|
9412 | first_line: this.yylloc.last_line,
|
9413 | last_line: this.yylineno + 1,
|
9414 | first_column: this.yylloc.last_column,
|
9415 | last_column: lines ?
|
9416 | lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
|
9417 | this.yylloc.last_column + match[0].length
|
9418 | };
|
9419 | this.yytext += match[0];
|
9420 | this.match += match[0];
|
9421 | this.matches = match;
|
9422 | this.yyleng = this.yytext.length;
|
9423 | if (this.options.ranges) {
|
9424 | this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
9425 | }
|
9426 | this._more = false;
|
9427 | this._backtrack = false;
|
9428 | this._input = this._input.slice(match[0].length);
|
9429 | this.matched += match[0];
|
9430 | token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
9431 | if (this.done && this._input) {
|
9432 | this.done = false;
|
9433 | }
|
9434 | if (token) {
|
9435 | return token;
|
9436 | } else if (this._backtrack) {
|
9437 |
|
9438 | for (var k in backup) {
|
9439 | this[k] = backup[k];
|
9440 | }
|
9441 | return false;
|
9442 | }
|
9443 | return false;
|
9444 | },
|
9445 |
|
9446 |
|
9447 | next:function () {
|
9448 | if (this.done) {
|
9449 | return this.EOF;
|
9450 | }
|
9451 | if (!this._input) {
|
9452 | this.done = true;
|
9453 | }
|
9454 |
|
9455 | var token,
|
9456 | match,
|
9457 | tempMatch,
|
9458 | index;
|
9459 | if (!this._more) {
|
9460 | this.yytext = '';
|
9461 | this.match = '';
|
9462 | }
|
9463 | var rules = this._currentRules();
|
9464 | for (var i = 0; i < rules.length; i++) {
|
9465 | tempMatch = this._input.match(this.rules[rules[i]]);
|
9466 | if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
9467 | match = tempMatch;
|
9468 | index = i;
|
9469 | if (this.options.backtrack_lexer) {
|
9470 | token = this.test_match(tempMatch, rules[i]);
|
9471 | if (token !== false) {
|
9472 | return token;
|
9473 | } else if (this._backtrack) {
|
9474 | match = false;
|
9475 | continue;
|
9476 | } else {
|
9477 |
|
9478 | return false;
|
9479 | }
|
9480 | } else if (!this.options.flex) {
|
9481 | break;
|
9482 | }
|
9483 | }
|
9484 | }
|
9485 | if (match) {
|
9486 | token = this.test_match(match, rules[index]);
|
9487 | if (token !== false) {
|
9488 | return token;
|
9489 | }
|
9490 |
|
9491 | return false;
|
9492 | }
|
9493 | if (this._input === "") {
|
9494 | return this.EOF;
|
9495 | } else {
|
9496 | return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
|
9497 | text: "",
|
9498 | token: null,
|
9499 | line: this.yylineno
|
9500 | });
|
9501 | }
|
9502 | },
|
9503 |
|
9504 |
|
9505 | lex:function lex () {
|
9506 | var r = this.next();
|
9507 | if (r) {
|
9508 | return r;
|
9509 | } else {
|
9510 | return this.lex();
|
9511 | }
|
9512 | },
|
9513 |
|
9514 |
|
9515 | begin:function begin (condition) {
|
9516 | this.conditionStack.push(condition);
|
9517 | },
|
9518 |
|
9519 |
|
9520 | popState:function popState () {
|
9521 | var n = this.conditionStack.length - 1;
|
9522 | if (n > 0) {
|
9523 | return this.conditionStack.pop();
|
9524 | } else {
|
9525 | return this.conditionStack[0];
|
9526 | }
|
9527 | },
|
9528 |
|
9529 |
|
9530 | _currentRules:function _currentRules () {
|
9531 | if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
9532 | return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
9533 | } else {
|
9534 | return this.conditions["INITIAL"].rules;
|
9535 | }
|
9536 | },
|
9537 |
|
9538 |
|
9539 | topState:function topState (n) {
|
9540 | n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
9541 | if (n >= 0) {
|
9542 | return this.conditionStack[n];
|
9543 | } else {
|
9544 | return "INITIAL";
|
9545 | }
|
9546 | },
|
9547 |
|
9548 |
|
9549 | pushState:function pushState (condition) {
|
9550 | this.begin(condition);
|
9551 | },
|
9552 |
|
9553 |
|
9554 | stateStackSize:function stateStackSize() {
|
9555 | return this.conditionStack.length;
|
9556 | },
|
9557 | options: {"case-insensitive":true},
|
9558 | performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
|
9559 | var YYSTATE=YY_START;
|
9560 | switch($avoiding_name_collisions) {
|
9561 | case 0:return 5;
|
9562 | break;
|
9563 | case 1:
|
9564 | break;
|
9565 | case 2:
|
9566 | break;
|
9567 | case 3:
|
9568 | break;
|
9569 | case 4:
|
9570 | break;
|
9571 | case 5: this.begin('ID'); return 10;
|
9572 | break;
|
9573 | case 6: yy_.yytext = yy_.yytext.trim(); this.begin('ALIAS'); return 41;
|
9574 | break;
|
9575 | case 7: this.popState(); this.popState(); this.begin('LINE'); return 12;
|
9576 | break;
|
9577 | case 8: this.popState(); this.popState(); return 5;
|
9578 | break;
|
9579 | case 9: this.begin('LINE'); return 20;
|
9580 | break;
|
9581 | case 10: this.begin('LINE'); return 22;
|
9582 | break;
|
9583 | case 11: this.begin('LINE'); return 23;
|
9584 | break;
|
9585 | case 12: this.begin('LINE'); return 24;
|
9586 | break;
|
9587 | case 13: this.begin('LINE'); return 29;
|
9588 | break;
|
9589 | case 14: this.begin('LINE'); return 26;
|
9590 | break;
|
9591 | case 15: this.begin('LINE'); return 28;
|
9592 | break;
|
9593 | case 16: this.popState(); return 13;
|
9594 | break;
|
9595 | case 17:return 21;
|
9596 | break;
|
9597 | case 18:return 36;
|
9598 | break;
|
9599 | case 19:return 37;
|
9600 | break;
|
9601 | case 20:return 32;
|
9602 | break;
|
9603 | case 21:return 30;
|
9604 | break;
|
9605 | case 22: this.begin('ID'); return 15;
|
9606 | break;
|
9607 | case 23: this.begin('ID'); return 16;
|
9608 | break;
|
9609 | case 24:return 18;
|
9610 | break;
|
9611 | case 25:return 6;
|
9612 | break;
|
9613 | case 26:return 35;
|
9614 | break;
|
9615 | case 27:return 5;
|
9616 | break;
|
9617 | case 28: yy_.yytext = yy_.yytext.trim(); return 41;
|
9618 | break;
|
9619 | case 29:return 44;
|
9620 | break;
|
9621 | case 30:return 45;
|
9622 | break;
|
9623 | case 31:return 42;
|
9624 | break;
|
9625 | case 32:return 43;
|
9626 | break;
|
9627 | case 33:return 46;
|
9628 | break;
|
9629 | case 34:return 47;
|
9630 | break;
|
9631 | case 35:return 48;
|
9632 | break;
|
9633 | case 36:return 39;
|
9634 | break;
|
9635 | case 37:return 40;
|
9636 | break;
|
9637 | case 38:return 5;
|
9638 | break;
|
9639 | case 39:return 'INVALID';
|
9640 | break;
|
9641 | }
|
9642 | },
|
9643 | rules: [/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:participant\b)/i,/^(?:[^\->:\n,;]+?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?::[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],
|
9644 | conditions: {"LINE":{"rules":[2,3,16],"inclusive":false},"ALIAS":{"rules":[2,3,7,8],"inclusive":false},"ID":{"rules":[2,3,6],"inclusive":false},"INITIAL":{"rules":[0,1,3,4,5,9,10,11,12,13,14,15,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39],"inclusive":true}}
|
9645 | });
|
9646 | return lexer;
|
9647 | })();
|
9648 | parser.lexer = lexer;
|
9649 | function Parser () {
|
9650 | this.yy = {};
|
9651 | }
|
9652 | Parser.prototype = parser;parser.Parser = Parser;
|
9653 | return new Parser;
|
9654 | })();
|
9655 |
|
9656 |
|
9657 | if (true) {
|
9658 | exports.parser = parser;
|
9659 | exports.Parser = parser.Parser;
|
9660 | exports.parse = function () { return parser.parse.apply(parser, arguments); };
|
9661 | exports.main = function commonjsMain (args) {
|
9662 | if (!args[1]) {
|
9663 | console.log('Usage: '+args[0]+' FILE');
|
9664 | process.exit(1);
|
9665 | }
|
9666 | var source = __webpack_require__( "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__( "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
|
9667 | return exports.parser.parse(source);
|
9668 | };
|
9669 | if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
|
9670 | exports.main(process.argv.slice(1));
|
9671 | }
|
9672 | }
|
9673 | }.call(this, __webpack_require__( "./node_modules/process/browser.js"), __webpack_require__( "./node_modules/webpack/buildin/module.js")(module)))
|
9674 |
|
9675 | }),
|
9676 |
|
9677 | "./src/diagrams/sequence/sequenceDb.js":
|
9678 |
|
9679 |
|
9680 |
|
9681 |
|
9682 | (function(module, __webpack_exports__, __webpack_require__) {
|
9683 |
|
9684 | "use strict";
|
9685 | __webpack_require__.r(__webpack_exports__);
|
9686 | __webpack_require__.d(__webpack_exports__, "addActor", function() { return addActor; });
|
9687 | __webpack_require__.d(__webpack_exports__, "addMessage", function() { return addMessage; });
|
9688 | __webpack_require__.d(__webpack_exports__, "addSignal", function() { return addSignal; });
|
9689 | __webpack_require__.d(__webpack_exports__, "getMessages", function() { return getMessages; });
|
9690 | __webpack_require__.d(__webpack_exports__, "getActors", function() { return getActors; });
|
9691 | __webpack_require__.d(__webpack_exports__, "getActor", function() { return getActor; });
|
9692 | __webpack_require__.d(__webpack_exports__, "getActorKeys", function() { return getActorKeys; });
|
9693 | __webpack_require__.d(__webpack_exports__, "getTitle", function() { return getTitle; });
|
9694 | __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
|
9695 | __webpack_require__.d(__webpack_exports__, "LINETYPE", function() { return LINETYPE; });
|
9696 | __webpack_require__.d(__webpack_exports__, "ARROWTYPE", function() { return ARROWTYPE; });
|
9697 | __webpack_require__.d(__webpack_exports__, "PLACEMENT", function() { return PLACEMENT; });
|
9698 | __webpack_require__.d(__webpack_exports__, "addNote", function() { return addNote; });
|
9699 | __webpack_require__.d(__webpack_exports__, "setTitle", function() { return setTitle; });
|
9700 | __webpack_require__.d(__webpack_exports__, "apply", function() { return apply; });
|
9701 | var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "./src/logger.js");
|
9702 |
|
9703 | let actors = {};
|
9704 | let messages = [];
|
9705 | const notes = [];
|
9706 | let title = '';
|
9707 | const addActor = function (id, name, description) {
|
9708 |
|
9709 | const old = actors[id];
|
9710 | if (old && name === old.name && description == null) return;
|
9711 |
|
9712 | if (description == null) description = name;
|
9713 | actors[id] = {
|
9714 | name: name,
|
9715 | description: description
|
9716 | };
|
9717 | };
|
9718 | const addMessage = function (idFrom, idTo, message, answer) {
|
9719 | messages.push({
|
9720 | from: idFrom,
|
9721 | to: idTo,
|
9722 | message: message,
|
9723 | answer: answer
|
9724 | });
|
9725 | };
|
9726 | const addSignal = function (idFrom, idTo, message, messageType) {
|
9727 | _logger__WEBPACK_IMPORTED_MODULE_0__["logger"].debug('Adding message from=' + idFrom + ' to=' + idTo + ' message=' + message + ' type=' + messageType);
|
9728 | messages.push({
|
9729 | from: idFrom,
|
9730 | to: idTo,
|
9731 | message: message,
|
9732 | type: messageType
|
9733 | });
|
9734 | };
|
9735 | const getMessages = function () {
|
9736 | return messages;
|
9737 | };
|
9738 | const getActors = function () {
|
9739 | return actors;
|
9740 | };
|
9741 | const getActor = function (id) {
|
9742 | return actors[id];
|
9743 | };
|
9744 | const getActorKeys = function () {
|
9745 | return Object.keys(actors);
|
9746 | };
|
9747 | const getTitle = function () {
|
9748 | return title;
|
9749 | };
|
9750 | const clear = function () {
|
9751 | actors = {};
|
9752 | messages = [];
|
9753 | };
|
9754 | const LINETYPE = {
|
9755 | SOLID: 0,
|
9756 | DOTTED: 1,
|
9757 | NOTE: 2,
|
9758 | SOLID_CROSS: 3,
|
9759 | DOTTED_CROSS: 4,
|
9760 | SOLID_OPEN: 5,
|
9761 | DOTTED_OPEN: 6,
|
9762 | LOOP_START: 10,
|
9763 | LOOP_END: 11,
|
9764 | ALT_START: 12,
|
9765 | ALT_ELSE: 13,
|
9766 | ALT_END: 14,
|
9767 | OPT_START: 15,
|
9768 | OPT_END: 16,
|
9769 | ACTIVE_START: 17,
|
9770 | ACTIVE_END: 18,
|
9771 | PAR_START: 19,
|
9772 | PAR_AND: 20,
|
9773 | PAR_END: 21,
|
9774 | RECT_START: 22,
|
9775 | RECT_END: 23
|
9776 | };
|
9777 | const ARROWTYPE = {
|
9778 | FILLED: 0,
|
9779 | OPEN: 1
|
9780 | };
|
9781 | const PLACEMENT = {
|
9782 | LEFTOF: 0,
|
9783 | RIGHTOF: 1,
|
9784 | OVER: 2
|
9785 | };
|
9786 | const addNote = function (actor, placement, message) {
|
9787 | const note = {
|
9788 | actor: actor,
|
9789 | placement: placement,
|
9790 | message: message
|
9791 | };
|
9792 |
|
9793 | const actors = [].concat(actor, actor);
|
9794 | notes.push(note);
|
9795 | messages.push({
|
9796 | from: actors[0],
|
9797 | to: actors[1],
|
9798 | message: message,
|
9799 | type: LINETYPE.NOTE,
|
9800 | placement: placement
|
9801 | });
|
9802 | };
|
9803 | const setTitle = function (titleText) {
|
9804 | title = titleText;
|
9805 | };
|
9806 | const apply = function (param) {
|
9807 | if (param instanceof Array) {
|
9808 | param.forEach(function (item) {
|
9809 | apply(item);
|
9810 | });
|
9811 | } else {
|
9812 | switch (param.type) {
|
9813 | case 'addActor':
|
9814 | addActor(param.actor, param.actor, param.description);
|
9815 | break;
|
9816 |
|
9817 | case 'activeStart':
|
9818 | addSignal(param.actor, undefined, undefined, param.signalType);
|
9819 | break;
|
9820 |
|
9821 | case 'activeEnd':
|
9822 | addSignal(param.actor, undefined, undefined, param.signalType);
|
9823 | break;
|
9824 |
|
9825 | case 'addNote':
|
9826 | addNote(param.actor, param.placement, param.text);
|
9827 | break;
|
9828 |
|
9829 | case 'addMessage':
|
9830 | addSignal(param.from, param.to, param.msg, param.signalType);
|
9831 | break;
|
9832 |
|
9833 | case 'loopStart':
|
9834 | addSignal(undefined, undefined, param.loopText, param.signalType);
|
9835 | break;
|
9836 |
|
9837 | case 'loopEnd':
|
9838 | addSignal(undefined, undefined, undefined, param.signalType);
|
9839 | break;
|
9840 |
|
9841 | case 'rectStart':
|
9842 | addSignal(undefined, undefined, param.color, param.signalType);
|
9843 | break;
|
9844 |
|
9845 | case 'rectEnd':
|
9846 | addSignal(undefined, undefined, undefined, param.signalType);
|
9847 | break;
|
9848 |
|
9849 | case 'optStart':
|
9850 | addSignal(undefined, undefined, param.optText, param.signalType);
|
9851 | break;
|
9852 |
|
9853 | case 'optEnd':
|
9854 | addSignal(undefined, undefined, undefined, param.signalType);
|
9855 | break;
|
9856 |
|
9857 | case 'altStart':
|
9858 | addSignal(undefined, undefined, param.altText, param.signalType);
|
9859 | break;
|
9860 |
|
9861 | case 'else':
|
9862 | addSignal(undefined, undefined, param.altText, param.signalType);
|
9863 | break;
|
9864 |
|
9865 | case 'altEnd':
|
9866 | addSignal(undefined, undefined, undefined, param.signalType);
|
9867 | break;
|
9868 |
|
9869 | case 'setTitle':
|
9870 | setTitle(param.text);
|
9871 | break;
|
9872 |
|
9873 | case 'parStart':
|
9874 | addSignal(undefined, undefined, param.parText, param.signalType);
|
9875 | break;
|
9876 |
|
9877 | case 'and':
|
9878 | addSignal(undefined, undefined, param.parText, param.signalType);
|
9879 | break;
|
9880 |
|
9881 | case 'parEnd':
|
9882 | addSignal(undefined, undefined, undefined, param.signalType);
|
9883 | break;
|
9884 | }
|
9885 | }
|
9886 | };
|
9887 | __webpack_exports__["default"] = ({
|
9888 | addActor,
|
9889 | addMessage,
|
9890 | addSignal,
|
9891 | getMessages,
|
9892 | getActors,
|
9893 | getActor,
|
9894 | getActorKeys,
|
9895 | getTitle,
|
9896 | clear,
|
9897 | LINETYPE,
|
9898 | ARROWTYPE,
|
9899 | PLACEMENT,
|
9900 | addNote,
|
9901 | setTitle,
|
9902 | apply
|
9903 | });
|
9904 |
|
9905 | }),
|
9906 |
|
9907 | "./src/diagrams/sequence/sequenceRenderer.js":
|
9908 |
|
9909 |
|
9910 |
|
9911 |
|
9912 | (function(module, __webpack_exports__, __webpack_require__) {
|
9913 |
|
9914 | "use strict";
|
9915 | __webpack_require__.r(__webpack_exports__);
|
9916 | __webpack_require__.d(__webpack_exports__, "bounds", function() { return bounds; });
|
9917 | __webpack_require__.d(__webpack_exports__, "drawActors", function() { return drawActors; });
|
9918 | __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
|
9919 | __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
|
9920 | var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "d3");
|
9921 | var d3__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
|
9922 | var _svgDraw__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./src/diagrams/sequence/svgDraw.js");
|
9923 | var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./src/logger.js");
|
9924 | var _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./src/diagrams/sequence/parser/sequenceDiagram.jison");
|
9925 | var _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3___default = __webpack_require__.n(_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__);
|
9926 | var _sequenceDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./src/diagrams/sequence/sequenceDb.js");
|
9927 |
|
9928 |
|
9929 |
|
9930 |
|
9931 |
|
9932 | _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy = _sequenceDb__WEBPACK_IMPORTED_MODULE_4__["default"];
|
9933 | const conf = {
|
9934 | diagramMarginX: 50,
|
9935 | diagramMarginY: 30,
|
9936 |
|
9937 | actorMargin: 50,
|
9938 |
|
9939 | width: 150,
|
9940 |
|
9941 | height: 65,
|
9942 | actorFontSize: 14,
|
9943 | actorFontFamily: '"Open-Sans", "sans-serif"',
|
9944 |
|
9945 | boxMargin: 10,
|
9946 | boxTextMargin: 5,
|
9947 | noteMargin: 10,
|
9948 |
|
9949 | messageMargin: 35,
|
9950 |
|
9951 | mirrorActors: false,
|
9952 |
|
9953 |
|
9954 | bottomMarginAdj: 1,
|
9955 |
|
9956 | activationWidth: 10,
|
9957 |
|
9958 | textPlacement: 'tspan',
|
9959 | showSequenceNumbers: false
|
9960 | };
|
9961 | const bounds = {
|
9962 | data: {
|
9963 | startx: undefined,
|
9964 | stopx: undefined,
|
9965 | starty: undefined,
|
9966 | stopy: undefined
|
9967 | },
|
9968 | verticalPos: 0,
|
9969 | sequenceItems: [],
|
9970 | activations: [],
|
9971 | init: function () {
|
9972 | this.sequenceItems = [];
|
9973 | this.activations = [];
|
9974 | this.data = {
|
9975 | startx: undefined,
|
9976 | stopx: undefined,
|
9977 | starty: undefined,
|
9978 | stopy: undefined
|
9979 | };
|
9980 | this.verticalPos = 0;
|
9981 | },
|
9982 | updateVal: function (obj, key, val, fun) {
|
9983 | if (typeof obj[key] === 'undefined') {
|
9984 | obj[key] = val;
|
9985 | } else {
|
9986 | obj[key] = fun(val, obj[key]);
|
9987 | }
|
9988 | },
|
9989 | updateBounds: function (startx, starty, stopx, stopy) {
|
9990 | const _self = this;
|
9991 |
|
9992 | let cnt = 0;
|
9993 |
|
9994 | function updateFn(type) {
|
9995 | return function updateItemBounds(item) {
|
9996 | cnt++;
|
9997 |
|
9998 | const n = _self.sequenceItems.length - cnt + 1;
|
9999 |
|
10000 | _self.updateVal(item, 'starty', starty - n * conf.boxMargin, Math.min);
|
10001 |
|
10002 | _self.updateVal(item, 'stopy', stopy + n * conf.boxMargin, Math.max);
|
10003 |
|
10004 | _self.updateVal(bounds.data, 'startx', startx - n * conf.boxMargin, Math.min);
|
10005 |
|
10006 | _self.updateVal(bounds.data, 'stopx', stopx + n * conf.boxMargin, Math.max);
|
10007 |
|
10008 | if (!(type === 'activation')) {
|
10009 | _self.updateVal(item, 'startx', startx - n * conf.boxMargin, Math.min);
|
10010 |
|
10011 | _self.updateVal(item, 'stopx', stopx + n * conf.boxMargin, Math.max);
|
10012 |
|
10013 | _self.updateVal(bounds.data, 'starty', starty - n * conf.boxMargin, Math.min);
|
10014 |
|
10015 | _self.updateVal(bounds.data, 'stopy', stopy + n * conf.boxMargin, Math.max);
|
10016 | }
|
10017 | };
|
10018 | }
|
10019 |
|
10020 | this.sequenceItems.forEach(updateFn());
|
10021 | this.activations.forEach(updateFn('activation'));
|
10022 | },
|
10023 | insert: function (startx, starty, stopx, stopy) {
|
10024 | const _startx = Math.min(startx, stopx);
|
10025 |
|
10026 | const _stopx = Math.max(startx, stopx);
|
10027 |
|
10028 | const _starty = Math.min(starty, stopy);
|
10029 |
|
10030 | const _stopy = Math.max(starty, stopy);
|
10031 |
|
10032 | this.updateVal(bounds.data, 'startx', _startx, Math.min);
|
10033 | this.updateVal(bounds.data, 'starty', _starty, Math.min);
|
10034 | this.updateVal(bounds.data, 'stopx', _stopx, Math.max);
|
10035 | this.updateVal(bounds.data, 'stopy', _stopy, Math.max);
|
10036 | this.updateBounds(_startx, _starty, _stopx, _stopy);
|
10037 | },
|
10038 | newActivation: function (message, diagram) {
|
10039 | const actorRect = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getActors()[message.from.actor];
|
10040 | const stackedSize = actorActivations(message.from.actor).length;
|
10041 | const x = actorRect.x + conf.width / 2 + (stackedSize - 1) * conf.activationWidth / 2;
|
10042 | this.activations.push({
|
10043 | startx: x,
|
10044 | starty: this.verticalPos + 2,
|
10045 | stopx: x + conf.activationWidth,
|
10046 | stopy: undefined,
|
10047 | actor: message.from.actor,
|
10048 | anchored: _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].anchorElement(diagram)
|
10049 | });
|
10050 | },
|
10051 | endActivation: function (message) {
|
10052 |
|
10053 | const lastActorActivationIdx = this.activations.map(function (activation) {
|
10054 | return activation.actor;
|
10055 | }).lastIndexOf(message.from.actor);
|
10056 | const activation = this.activations.splice(lastActorActivationIdx, 1)[0];
|
10057 | return activation;
|
10058 | },
|
10059 | newLoop: function (title, fill) {
|
10060 | this.sequenceItems.push({
|
10061 | startx: undefined,
|
10062 | starty: this.verticalPos,
|
10063 | stopx: undefined,
|
10064 | stopy: undefined,
|
10065 | title: title,
|
10066 | fill: fill
|
10067 | });
|
10068 | },
|
10069 | endLoop: function () {
|
10070 | const loop = this.sequenceItems.pop();
|
10071 | return loop;
|
10072 | },
|
10073 | addSectionToLoop: function (message) {
|
10074 | const loop = this.sequenceItems.pop();
|
10075 | loop.sections = loop.sections || [];
|
10076 | loop.sectionTitles = loop.sectionTitles || [];
|
10077 | loop.sections.push(bounds.getVerticalPos());
|
10078 | loop.sectionTitles.push(message);
|
10079 | this.sequenceItems.push(loop);
|
10080 | },
|
10081 | bumpVerticalPos: function (bump) {
|
10082 | this.verticalPos = this.verticalPos + bump;
|
10083 | this.data.stopy = this.verticalPos;
|
10084 | },
|
10085 | getVerticalPos: function () {
|
10086 | return this.verticalPos;
|
10087 | },
|
10088 | getBounds: function () {
|
10089 | return this.data;
|
10090 | }
|
10091 | };
|
10092 |
|
10093 | const _drawLongText = (text, x, y, g, width) => {
|
10094 | let textHeight = 0;
|
10095 | const lines = text.split(/<br\/?>/gi);
|
10096 |
|
10097 | for (const line of lines) {
|
10098 | const textObj = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].getTextObj();
|
10099 | textObj.x = x;
|
10100 | textObj.y = y + textHeight;
|
10101 | textObj.textMargin = conf.noteMargin;
|
10102 | textObj.dy = '1em';
|
10103 | textObj.text = line;
|
10104 | textObj.class = 'noteText';
|
10105 | const textElem = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawText(g, textObj, width);
|
10106 | textHeight += (textElem._groups || textElem)[0][0].getBBox().height;
|
10107 | }
|
10108 |
|
10109 | return textHeight;
|
10110 | };
|
10111 |
|
10112 |
|
10113 |
|
10114 |
|
10115 |
|
10116 |
|
10117 |
|
10118 |
|
10119 | const drawNote = function (elem, startx, verticalPos, msg, forceWidth) {
|
10120 | const rect = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].getNoteRect();
|
10121 | rect.x = startx;
|
10122 | rect.y = verticalPos;
|
10123 | rect.width = forceWidth || conf.width;
|
10124 | rect.class = 'note';
|
10125 | let g = elem.append('g');
|
10126 | const rectElem = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawRect(g, rect);
|
10127 |
|
10128 | const textHeight = _drawLongText(msg.message, startx - 4, verticalPos + 24, g, rect.width - conf.noteMargin);
|
10129 |
|
10130 | bounds.insert(startx, verticalPos, startx + rect.width, verticalPos + 2 * conf.noteMargin + textHeight);
|
10131 | rectElem.attr('height', textHeight + 2 * conf.noteMargin);
|
10132 | bounds.bumpVerticalPos(textHeight + 2 * conf.noteMargin);
|
10133 | };
|
10134 |
|
10135 |
|
10136 |
|
10137 |
|
10138 |
|
10139 |
|
10140 |
|
10141 |
|
10142 |
|
10143 |
|
10144 |
|
10145 | const drawMessage = function (elem, startx, stopx, verticalPos, msg, sequenceIndex) {
|
10146 | const g = elem.append('g');
|
10147 | const txtCenter = startx + (stopx - startx) / 2;
|
10148 | const textElem = g.append('text')
|
10149 | .attr('x', txtCenter).attr('y', verticalPos - 7).style('text-anchor', 'middle').attr('class', 'messageText').text(msg.message);
|
10150 | let textWidth = (textElem._groups || textElem)[0][0].getBBox().width;
|
10151 | let line;
|
10152 |
|
10153 | if (startx === stopx) {
|
10154 | if (conf.rightAngles) {
|
10155 | line = g.append('path').attr('d', `M ${startx},${verticalPos} H ${startx + conf.width / 2} V ${verticalPos + 25} H ${startx}`);
|
10156 | } else {
|
10157 | line = g.append('path').attr('d', 'M ' + startx + ',' + verticalPos + ' C ' + (startx + 60) + ',' + (verticalPos - 10) + ' ' + (startx + 60) + ',' + (verticalPos + 30) + ' ' + startx + ',' + (verticalPos + 20));
|
10158 | }
|
10159 |
|
10160 | bounds.bumpVerticalPos(30);
|
10161 | const dx = Math.max(textWidth / 2, 100);
|
10162 | bounds.insert(startx - dx, bounds.getVerticalPos() - 10, stopx + dx, bounds.getVerticalPos());
|
10163 | } else {
|
10164 | line = g.append('line');
|
10165 | line.attr('x1', startx);
|
10166 | line.attr('y1', verticalPos);
|
10167 | line.attr('x2', stopx);
|
10168 | line.attr('y2', verticalPos);
|
10169 | bounds.insert(startx, bounds.getVerticalPos() - 10, stopx, bounds.getVerticalPos());
|
10170 | }
|
10171 |
|
10172 |
|
10173 |
|
10174 | if (msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED || msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_CROSS || msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_OPEN) {
|
10175 | line.style('stroke-dasharray', '3, 3');
|
10176 | line.attr('class', 'messageLine1');
|
10177 | } else {
|
10178 | line.attr('class', 'messageLine0');
|
10179 | }
|
10180 |
|
10181 | let url = '';
|
10182 |
|
10183 | if (conf.arrowMarkerAbsolute) {
|
10184 | url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;
|
10185 | url = url.replace(/\(/g, '\\(');
|
10186 | url = url.replace(/\)/g, '\\)');
|
10187 | }
|
10188 |
|
10189 | line.attr('stroke-width', 2);
|
10190 | line.attr('stroke', 'black');
|
10191 | line.style('fill', 'none');
|
10192 |
|
10193 | if (msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID || msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED) {
|
10194 | line.attr('marker-end', 'url(' + url + '#arrowhead)');
|
10195 | }
|
10196 |
|
10197 | if (msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_CROSS || msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_CROSS) {
|
10198 | line.attr('marker-end', 'url(' + url + '#crosshead)');
|
10199 | }
|
10200 |
|
10201 |
|
10202 | if (conf.showSequenceNumbers) {
|
10203 | line.attr('marker-start', 'url(' + url + '#sequencenumber)');
|
10204 | g.append('text').attr('x', startx).attr('y', verticalPos + 4).attr('font-family', 'sans-serif').attr('font-size', '12px').attr('text-anchor', 'middle').attr('textLength', '16px').attr('class', 'sequenceNumber').text(sequenceIndex);
|
10205 | }
|
10206 | };
|
10207 |
|
10208 | const drawActors = function (diagram, actors, actorKeys, verticalPos) {
|
10209 |
|
10210 | for (let i = 0; i < actorKeys.length; i++) {
|
10211 | const key = actorKeys[i];
|
10212 |
|
10213 | actors[key].x = i * conf.actorMargin + i * conf.width;
|
10214 | actors[key].y = verticalPos;
|
10215 | actors[key].width = conf.diagramMarginX;
|
10216 | actors[key].height = conf.diagramMarginY;
|
10217 |
|
10218 | _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawActor(diagram, actors[key].x, verticalPos, actors[key].description, conf);
|
10219 | bounds.insert(actors[key].x, verticalPos, actors[key].x + conf.width, conf.height);
|
10220 | }
|
10221 |
|
10222 |
|
10223 | bounds.bumpVerticalPos(conf.height);
|
10224 | };
|
10225 | const setConf = function (cnf) {
|
10226 | const keys = Object.keys(cnf);
|
10227 | keys.forEach(function (key) {
|
10228 | conf[key] = cnf[key];
|
10229 | });
|
10230 | };
|
10231 |
|
10232 | const actorActivations = function (actor) {
|
10233 | return bounds.activations.filter(function (activation) {
|
10234 | return activation.actor === actor;
|
10235 | });
|
10236 | };
|
10237 |
|
10238 | const actorFlowVerticaBounds = function (actor) {
|
10239 |
|
10240 | const actors = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getActors();
|
10241 | const activations = actorActivations(actor);
|
10242 | const left = activations.reduce(function (acc, activation) {
|
10243 | return Math.min(acc, activation.startx);
|
10244 | }, actors[actor].x + conf.width / 2);
|
10245 | const right = activations.reduce(function (acc, activation) {
|
10246 | return Math.max(acc, activation.stopx);
|
10247 | }, actors[actor].x + conf.width / 2);
|
10248 | return [left, right];
|
10249 | };
|
10250 |
|
10251 |
|
10252 |
|
10253 |
|
10254 |
|
10255 |
|
10256 |
|
10257 | const draw = function (text, id) {
|
10258 | _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.clear();
|
10259 | _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].parse(text + '\n');
|
10260 | bounds.init();
|
10261 | const diagram = d3__WEBPACK_IMPORTED_MODULE_0__["select"](`[id="${id}"]`);
|
10262 | let startx;
|
10263 | let stopx;
|
10264 | let forceWidth;
|
10265 |
|
10266 | const actors = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getActors();
|
10267 | const actorKeys = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getActorKeys();
|
10268 | const messages = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getMessages();
|
10269 | const title = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getTitle();
|
10270 | drawActors(diagram, actors, actorKeys, 0);
|
10271 |
|
10272 | _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].insertArrowHead(diagram);
|
10273 | _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].insertArrowCrossHead(diagram);
|
10274 | _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].insertSequenceNumber(diagram);
|
10275 |
|
10276 | function activeEnd(msg, verticalPos) {
|
10277 | const activationData = bounds.endActivation(msg);
|
10278 |
|
10279 | if (activationData.starty + 18 > verticalPos) {
|
10280 | activationData.starty = verticalPos - 6;
|
10281 | verticalPos += 12;
|
10282 | }
|
10283 |
|
10284 | _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawActivation(diagram, activationData, verticalPos, conf, actorActivations(msg.from.actor).length);
|
10285 | bounds.insert(activationData.startx, verticalPos - 10, activationData.stopx, verticalPos);
|
10286 | }
|
10287 |
|
10288 |
|
10289 |
|
10290 | let sequenceIndex = 1;
|
10291 | messages.forEach(function (msg) {
|
10292 | let loopData;
|
10293 |
|
10294 | switch (msg.type) {
|
10295 | case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.NOTE:
|
10296 | bounds.bumpVerticalPos(conf.boxMargin);
|
10297 | startx = actors[msg.from].x;
|
10298 | stopx = actors[msg.to].x;
|
10299 |
|
10300 | if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.PLACEMENT.RIGHTOF) {
|
10301 | drawNote(diagram, startx + (conf.width + conf.actorMargin) / 2, bounds.getVerticalPos(), msg);
|
10302 | } else if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.PLACEMENT.LEFTOF) {
|
10303 | drawNote(diagram, startx - (conf.width + conf.actorMargin) / 2, bounds.getVerticalPos(), msg);
|
10304 | } else if (msg.to === msg.from) {
|
10305 |
|
10306 | drawNote(diagram, startx, bounds.getVerticalPos(), msg);
|
10307 | } else {
|
10308 |
|
10309 | forceWidth = Math.abs(startx - stopx) + conf.actorMargin;
|
10310 | drawNote(diagram, (startx + stopx + conf.width - forceWidth) / 2, bounds.getVerticalPos(), msg, forceWidth);
|
10311 | }
|
10312 |
|
10313 | break;
|
10314 |
|
10315 | case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ACTIVE_START:
|
10316 | bounds.newActivation(msg, diagram);
|
10317 | break;
|
10318 |
|
10319 | case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ACTIVE_END:
|
10320 | activeEnd(msg, bounds.getVerticalPos());
|
10321 | break;
|
10322 |
|
10323 | case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.LOOP_START:
|
10324 | bounds.bumpVerticalPos(conf.boxMargin);
|
10325 | bounds.newLoop(msg.message);
|
10326 | bounds.bumpVerticalPos(conf.boxMargin + conf.boxTextMargin);
|
10327 | break;
|
10328 |
|
10329 | case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.LOOP_END:
|
10330 | loopData = bounds.endLoop();
|
10331 | _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopData, 'loop', conf);
|
10332 | bounds.bumpVerticalPos(conf.boxMargin);
|
10333 | break;
|
10334 |
|
10335 | case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.RECT_START:
|
10336 | bounds.bumpVerticalPos(conf.boxMargin);
|
10337 | bounds.newLoop(undefined, msg.message);
|
10338 | bounds.bumpVerticalPos(conf.boxMargin);
|
10339 | break;
|
10340 |
|
10341 | case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.RECT_END:
|
10342 | const rectData = bounds.endLoop();
|
10343 | _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawBackgroundRect(diagram, rectData);
|
10344 | bounds.bumpVerticalPos(conf.boxMargin);
|
10345 | break;
|
10346 |
|
10347 | case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.OPT_START:
|
10348 | bounds.bumpVerticalPos(conf.boxMargin);
|
10349 | bounds.newLoop(msg.message);
|
10350 | bounds.bumpVerticalPos(conf.boxMargin + conf.boxTextMargin);
|
10351 | break;
|
10352 |
|
10353 | case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.OPT_END:
|
10354 | loopData = bounds.endLoop();
|
10355 | _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopData, 'opt', conf);
|
10356 | bounds.bumpVerticalPos(conf.boxMargin);
|
10357 | break;
|
10358 |
|
10359 | case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_START:
|
10360 | bounds.bumpVerticalPos(conf.boxMargin);
|
10361 | bounds.newLoop(msg.message);
|
10362 | bounds.bumpVerticalPos(conf.boxMargin + conf.boxTextMargin);
|
10363 | break;
|
10364 |
|
10365 | case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_ELSE:
|
10366 | bounds.bumpVerticalPos(conf.boxMargin);
|
10367 | loopData = bounds.addSectionToLoop(msg.message);
|
10368 | bounds.bumpVerticalPos(conf.boxMargin);
|
10369 | break;
|
10370 |
|
10371 | case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_END:
|
10372 | loopData = bounds.endLoop();
|
10373 | _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopData, 'alt', conf);
|
10374 | bounds.bumpVerticalPos(conf.boxMargin);
|
10375 | break;
|
10376 |
|
10377 | case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_START:
|
10378 | bounds.bumpVerticalPos(conf.boxMargin);
|
10379 | bounds.newLoop(msg.message);
|
10380 | bounds.bumpVerticalPos(conf.boxMargin + conf.boxTextMargin);
|
10381 | break;
|
10382 |
|
10383 | case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_AND:
|
10384 | bounds.bumpVerticalPos(conf.boxMargin);
|
10385 | loopData = bounds.addSectionToLoop(msg.message);
|
10386 | bounds.bumpVerticalPos(conf.boxMargin);
|
10387 | break;
|
10388 |
|
10389 | case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_END:
|
10390 | loopData = bounds.endLoop();
|
10391 | _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopData, 'par', conf);
|
10392 | bounds.bumpVerticalPos(conf.boxMargin);
|
10393 | break;
|
10394 |
|
10395 | default:
|
10396 | try {
|
10397 |
|
10398 | bounds.bumpVerticalPos(conf.messageMargin);
|
10399 | const fromBounds = actorFlowVerticaBounds(msg.from);
|
10400 | const toBounds = actorFlowVerticaBounds(msg.to);
|
10401 | const fromIdx = fromBounds[0] <= toBounds[0] ? 1 : 0;
|
10402 | const toIdx = fromBounds[0] < toBounds[0] ? 0 : 1;
|
10403 | startx = fromBounds[fromIdx];
|
10404 | stopx = toBounds[toIdx];
|
10405 | const verticalPos = bounds.getVerticalPos();
|
10406 | drawMessage(diagram, startx, stopx, verticalPos, msg, sequenceIndex);
|
10407 | const allBounds = fromBounds.concat(toBounds);
|
10408 | bounds.insert(Math.min.apply(null, allBounds), verticalPos, Math.max.apply(null, allBounds), verticalPos);
|
10409 | } catch (e) {
|
10410 | _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].error('error while drawing message', e);
|
10411 | }
|
10412 |
|
10413 | }
|
10414 |
|
10415 |
|
10416 | if ([_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_OPEN, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_OPEN, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_CROSS, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_CROSS].includes(msg.type)) {
|
10417 | sequenceIndex++;
|
10418 | }
|
10419 | });
|
10420 |
|
10421 | if (conf.mirrorActors) {
|
10422 |
|
10423 | bounds.bumpVerticalPos(conf.boxMargin * 2);
|
10424 | drawActors(diagram, actors, actorKeys, bounds.getVerticalPos());
|
10425 | }
|
10426 |
|
10427 | const box = bounds.getBounds();
|
10428 |
|
10429 | _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('For line height fix Querying: #' + id + ' .actor-line');
|
10430 | const actorLines = d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"]('#' + id + ' .actor-line');
|
10431 | actorLines.attr('y2', box.stopy);
|
10432 | let height = box.stopy - box.starty + 2 * conf.diagramMarginY;
|
10433 |
|
10434 | if (conf.mirrorActors) {
|
10435 | height = height - conf.boxMargin + conf.bottomMarginAdj;
|
10436 | }
|
10437 |
|
10438 | const width = box.stopx - box.startx + 2 * conf.diagramMarginX;
|
10439 |
|
10440 | if (title) {
|
10441 | diagram.append('text').text(title).attr('x', (box.stopx - box.startx) / 2 - 2 * conf.diagramMarginX).attr('y', -25);
|
10442 | }
|
10443 |
|
10444 | if (conf.useMaxWidth) {
|
10445 | diagram.attr('height', '100%');
|
10446 | diagram.attr('width', '100%');
|
10447 | diagram.attr('style', 'max-width:' + width + 'px;');
|
10448 | } else {
|
10449 | diagram.attr('height', height);
|
10450 | diagram.attr('width', width);
|
10451 | }
|
10452 |
|
10453 | const extraVertForTitle = title ? 40 : 0;
|
10454 | diagram.attr('viewBox', box.startx - conf.diagramMarginX + ' -' + (conf.diagramMarginY + extraVertForTitle) + ' ' + width + ' ' + (height + extraVertForTitle));
|
10455 | };
|
10456 | __webpack_exports__["default"] = ({
|
10457 | bounds,
|
10458 | drawActors,
|
10459 | setConf,
|
10460 | draw
|
10461 | });
|
10462 |
|
10463 | }),
|
10464 |
|
10465 | "./src/diagrams/sequence/svgDraw.js":
|
10466 |
|
10467 |
|
10468 |
|
10469 |
|
10470 | (function(module, __webpack_exports__, __webpack_require__) {
|
10471 |
|
10472 | "use strict";
|
10473 | __webpack_require__.r(__webpack_exports__);
|
10474 | __webpack_require__.d(__webpack_exports__, "drawRect", function() { return drawRect; });
|
10475 | __webpack_require__.d(__webpack_exports__, "drawText", function() { return drawText; });
|
10476 | __webpack_require__.d(__webpack_exports__, "drawLabel", function() { return drawLabel; });
|
10477 | __webpack_require__.d(__webpack_exports__, "drawActor", function() { return drawActor; });
|
10478 | __webpack_require__.d(__webpack_exports__, "anchorElement", function() { return anchorElement; });
|
10479 | __webpack_require__.d(__webpack_exports__, "drawActivation", function() { return drawActivation; });
|
10480 | __webpack_require__.d(__webpack_exports__, "drawLoop", function() { return drawLoop; });
|
10481 | __webpack_require__.d(__webpack_exports__, "drawBackgroundRect", function() { return drawBackgroundRect; });
|
10482 | __webpack_require__.d(__webpack_exports__, "insertArrowHead", function() { return insertArrowHead; });
|
10483 | __webpack_require__.d(__webpack_exports__, "insertSequenceNumber", function() { return insertSequenceNumber; });
|
10484 | __webpack_require__.d(__webpack_exports__, "insertArrowCrossHead", function() { return insertArrowCrossHead; });
|
10485 | __webpack_require__.d(__webpack_exports__, "getTextObj", function() { return getTextObj; });
|
10486 | __webpack_require__.d(__webpack_exports__, "getNoteRect", function() { return getNoteRect; });
|
10487 | const drawRect = function (elem, rectData) {
|
10488 | const rectElem = elem.append('rect');
|
10489 | rectElem.attr('x', rectData.x);
|
10490 | rectElem.attr('y', rectData.y);
|
10491 | rectElem.attr('fill', rectData.fill);
|
10492 | rectElem.attr('stroke', rectData.stroke);
|
10493 | rectElem.attr('width', rectData.width);
|
10494 | rectElem.attr('height', rectData.height);
|
10495 | rectElem.attr('rx', rectData.rx);
|
10496 | rectElem.attr('ry', rectData.ry);
|
10497 |
|
10498 | if (typeof rectData.class !== 'undefined') {
|
10499 | rectElem.attr('class', rectData.class);
|
10500 | }
|
10501 |
|
10502 | return rectElem;
|
10503 | };
|
10504 | const drawText = function (elem, textData, width) {
|
10505 |
|
10506 | const nText = textData.text.replace(/<br\/?>/gi, ' ');
|
10507 | const textElem = elem.append('text');
|
10508 | textElem.attr('x', textData.x);
|
10509 | textElem.attr('y', textData.y);
|
10510 | textElem.style('text-anchor', textData.anchor);
|
10511 | textElem.attr('fill', textData.fill);
|
10512 |
|
10513 | if (typeof textData.class !== 'undefined') {
|
10514 | textElem.attr('class', textData.class);
|
10515 | }
|
10516 |
|
10517 | const span = textElem.append('tspan');
|
10518 | span.attr('x', textData.x + textData.textMargin * 2);
|
10519 | span.attr('fill', textData.fill);
|
10520 | span.text(nText);
|
10521 | return textElem;
|
10522 | };
|
10523 | const drawLabel = function (elem, txtObject) {
|
10524 | function genPoints(x, y, width, height, cut) {
|
10525 | return x + ',' + y + ' ' + (x + width) + ',' + y + ' ' + (x + width) + ',' + (y + height - cut) + ' ' + (x + width - cut * 1.2) + ',' + (y + height) + ' ' + x + ',' + (y + height);
|
10526 | }
|
10527 |
|
10528 | const polygon = elem.append('polygon');
|
10529 | polygon.attr('points', genPoints(txtObject.x, txtObject.y, 50, 20, 7));
|
10530 | polygon.attr('class', 'labelBox');
|
10531 | txtObject.y = txtObject.y + txtObject.labelMargin;
|
10532 | txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;
|
10533 | drawText(elem, txtObject);
|
10534 | };
|
10535 | let actorCnt = -1;
|
10536 |
|
10537 |
|
10538 |
|
10539 |
|
10540 |
|
10541 |
|
10542 |
|
10543 | const drawActor = function (elem, left, verticalPos, description, conf) {
|
10544 | const center = left + conf.width / 2;
|
10545 | const g = elem.append('g');
|
10546 |
|
10547 | if (verticalPos === 0) {
|
10548 | actorCnt++;
|
10549 | g.append('line').attr('id', 'actor' + actorCnt).attr('x1', center).attr('y1', 5).attr('x2', center).attr('y2', 2000).attr('class', 'actor-line').attr('stroke-width', '0.5px').attr('stroke', '#999');
|
10550 | }
|
10551 |
|
10552 | const rect = getNoteRect();
|
10553 | rect.x = left;
|
10554 | rect.y = verticalPos;
|
10555 | rect.fill = '#eaeaea';
|
10556 | rect.width = conf.width;
|
10557 | rect.height = conf.height;
|
10558 | rect.class = 'actor';
|
10559 | rect.rx = 3;
|
10560 | rect.ry = 3;
|
10561 | drawRect(g, rect);
|
10562 |
|
10563 | _drawTextCandidateFunc(conf)(description, g, rect.x, rect.y, rect.width, rect.height, {
|
10564 | class: 'actor'
|
10565 | }, conf);
|
10566 | };
|
10567 | const anchorElement = function (elem) {
|
10568 | return elem.append('g');
|
10569 | };
|
10570 |
|
10571 |
|
10572 |
|
10573 |
|
10574 |
|
10575 |
|
10576 |
|
10577 | const drawActivation = function (elem, bounds, verticalPos, conf, actorActivations) {
|
10578 | const rect = getNoteRect();
|
10579 | const g = bounds.anchored;
|
10580 | rect.x = bounds.startx;
|
10581 | rect.y = bounds.starty;
|
10582 | rect.class = 'activation' + actorActivations % 3;
|
10583 |
|
10584 | rect.width = bounds.stopx - bounds.startx;
|
10585 | rect.height = verticalPos - bounds.starty;
|
10586 | drawRect(g, rect);
|
10587 | };
|
10588 |
|
10589 |
|
10590 |
|
10591 |
|
10592 |
|
10593 |
|
10594 |
|
10595 | const drawLoop = function (elem, bounds, labelText, conf) {
|
10596 | const g = elem.append('g');
|
10597 |
|
10598 | const drawLoopLine = function (startx, starty, stopx, stopy) {
|
10599 | return g.append('line').attr('x1', startx).attr('y1', starty).attr('x2', stopx).attr('y2', stopy).attr('class', 'loopLine');
|
10600 | };
|
10601 |
|
10602 | drawLoopLine(bounds.startx, bounds.starty, bounds.stopx, bounds.starty);
|
10603 | drawLoopLine(bounds.stopx, bounds.starty, bounds.stopx, bounds.stopy);
|
10604 | drawLoopLine(bounds.startx, bounds.stopy, bounds.stopx, bounds.stopy);
|
10605 | drawLoopLine(bounds.startx, bounds.starty, bounds.startx, bounds.stopy);
|
10606 |
|
10607 | if (typeof bounds.sections !== 'undefined') {
|
10608 | bounds.sections.forEach(function (item) {
|
10609 | drawLoopLine(bounds.startx, item, bounds.stopx, item).style('stroke-dasharray', '3, 3');
|
10610 | });
|
10611 | }
|
10612 |
|
10613 | let txt = getTextObj();
|
10614 | txt.text = labelText;
|
10615 | txt.x = bounds.startx;
|
10616 | txt.y = bounds.starty;
|
10617 | txt.labelMargin = 1.5 * 10;
|
10618 |
|
10619 | txt.class = 'labelText';
|
10620 |
|
10621 | drawLabel(g, txt);
|
10622 | txt = getTextObj();
|
10623 | txt.text = '[ ' + bounds.title + ' ]';
|
10624 | txt.x = bounds.startx + (bounds.stopx - bounds.startx) / 2;
|
10625 | txt.y = bounds.starty + 1.5 * conf.boxMargin;
|
10626 | txt.anchor = 'middle';
|
10627 | txt.class = 'loopText';
|
10628 | drawText(g, txt);
|
10629 |
|
10630 | if (typeof bounds.sectionTitles !== 'undefined') {
|
10631 | bounds.sectionTitles.forEach(function (item, idx) {
|
10632 | if (item !== '') {
|
10633 | txt.text = '[ ' + item + ' ]';
|
10634 | txt.y = bounds.sections[idx] + 1.5 * conf.boxMargin;
|
10635 | drawText(g, txt);
|
10636 | }
|
10637 | });
|
10638 | }
|
10639 | };
|
10640 |
|
10641 |
|
10642 |
|
10643 |
|
10644 |
|
10645 | const drawBackgroundRect = function (elem, bounds) {
|
10646 | const rectElem = drawRect(elem, {
|
10647 | x: bounds.startx,
|
10648 | y: bounds.starty,
|
10649 | width: bounds.stopx - bounds.startx,
|
10650 | height: bounds.stopy - bounds.starty,
|
10651 | fill: bounds.fill,
|
10652 | class: 'rect'
|
10653 | });
|
10654 | rectElem.lower();
|
10655 | };
|
10656 |
|
10657 |
|
10658 |
|
10659 |
|
10660 | const insertArrowHead = function (elem) {
|
10661 | elem.append('defs').append('marker').attr('id', 'arrowhead').attr('refX', 5).attr('refY', 2).attr('markerWidth', 6).attr('markerHeight', 4).attr('orient', 'auto').append('path').attr('d', 'M 0,0 V 4 L6,2 Z');
|
10662 | };
|
10663 |
|
10664 |
|
10665 |
|
10666 |
|
10667 | const insertSequenceNumber = function (elem) {
|
10668 | elem.append('defs').append('marker').attr('id', 'sequencenumber').attr('refX', 15).attr('refY', 15).attr('markerWidth', 60).attr('markerHeight', 40).attr('orient', 'auto').append('circle').attr('cx', 15).attr('cy', 15).attr('r', 6);
|
10669 | };
|
10670 |
|
10671 |
|
10672 |
|
10673 |
|
10674 | const insertArrowCrossHead = function (elem) {
|
10675 | const defs = elem.append('defs');
|
10676 | const marker = defs.append('marker').attr('id', 'crosshead').attr('markerWidth', 15).attr('markerHeight', 8).attr('orient', 'auto').attr('refX', 16).attr('refY', 4);
|
10677 |
|
10678 | marker.append('path').attr('fill', 'black').attr('stroke', '#000000').style('stroke-dasharray', '0, 0').attr('stroke-width', '1px').attr('d', 'M 9,2 V 6 L16,4 Z');
|
10679 |
|
10680 | marker.append('path').attr('fill', 'none').attr('stroke', '#000000').style('stroke-dasharray', '0, 0').attr('stroke-width', '1px').attr('d', 'M 0,1 L 6,7 M 6,1 L 0,7');
|
10681 | };
|
10682 | const getTextObj = function () {
|
10683 | const txt = {
|
10684 | x: 0,
|
10685 | y: 0,
|
10686 | fill: undefined,
|
10687 | 'text-anchor': 'start',
|
10688 | style: '#666',
|
10689 | width: 100,
|
10690 | height: 100,
|
10691 | textMargin: 0,
|
10692 | rx: 0,
|
10693 | ry: 0
|
10694 | };
|
10695 | return txt;
|
10696 | };
|
10697 | const getNoteRect = function () {
|
10698 | const rect = {
|
10699 | x: 0,
|
10700 | y: 0,
|
10701 | fill: '#EDF2AE',
|
10702 | stroke: '#666',
|
10703 | width: 100,
|
10704 | anchor: 'start',
|
10705 | height: 100,
|
10706 | rx: 0,
|
10707 | ry: 0
|
10708 | };
|
10709 | return rect;
|
10710 | };
|
10711 |
|
10712 | const _drawTextCandidateFunc = function () {
|
10713 | function byText(content, g, x, y, width, height, textAttrs) {
|
10714 | const text = g.append('text').attr('x', x + width / 2).attr('y', y + height / 2 + 5).style('text-anchor', 'middle').text(content);
|
10715 |
|
10716 | _setTextAttrs(text, textAttrs);
|
10717 | }
|
10718 |
|
10719 | function byTspan(content, g, x, y, width, height, textAttrs, conf) {
|
10720 | const {
|
10721 | actorFontSize,
|
10722 | actorFontFamily
|
10723 | } = conf;
|
10724 | const lines = content.split(/<br\/?>/gi);
|
10725 |
|
10726 | for (let i = 0; i < lines.length; i++) {
|
10727 | const dy = i * actorFontSize - actorFontSize * (lines.length - 1) / 2;
|
10728 | const text = g.append('text').attr('x', x + width / 2).attr('y', y).style('text-anchor', 'middle').style('font-size', actorFontSize).style('font-family', actorFontFamily);
|
10729 | text.append('tspan').attr('x', x + width / 2).attr('dy', dy).text(lines[i]);
|
10730 | text.attr('y', y + height / 2.0).attr('dominant-baseline', 'central').attr('alignment-baseline', 'central');
|
10731 |
|
10732 | _setTextAttrs(text, textAttrs);
|
10733 | }
|
10734 | }
|
10735 |
|
10736 | function byFo(content, g, x, y, width, height, textAttrs, conf) {
|
10737 | const s = g.append('switch');
|
10738 | const f = s.append('foreignObject').attr('x', x).attr('y', y).attr('width', width).attr('height', height);
|
10739 | const text = f.append('div').style('display', 'table').style('height', '100%').style('width', '100%');
|
10740 | text.append('div').style('display', 'table-cell').style('text-align', 'center').style('vertical-align', 'middle').text(content);
|
10741 | byTspan(content, s, x, y, width, height, textAttrs, conf);
|
10742 |
|
10743 | _setTextAttrs(text, textAttrs);
|
10744 | }
|
10745 |
|
10746 | function _setTextAttrs(toText, fromTextAttrsDict) {
|
10747 | for (const key in fromTextAttrsDict) {
|
10748 | if (fromTextAttrsDict.hasOwnProperty(key)) {
|
10749 | toText.attr(key, fromTextAttrsDict[key]);
|
10750 | }
|
10751 | }
|
10752 | }
|
10753 |
|
10754 | return function (conf) {
|
10755 | return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;
|
10756 | };
|
10757 | }();
|
10758 |
|
10759 | __webpack_exports__["default"] = ({
|
10760 | drawRect,
|
10761 | drawText,
|
10762 | drawLabel,
|
10763 | drawActor,
|
10764 | anchorElement,
|
10765 | drawActivation,
|
10766 | drawLoop,
|
10767 | drawBackgroundRect,
|
10768 | insertArrowHead,
|
10769 | insertSequenceNumber,
|
10770 | insertArrowCrossHead,
|
10771 | getTextObj,
|
10772 | getNoteRect
|
10773 | });
|
10774 |
|
10775 | }),
|
10776 |
|
10777 | "./src/logger.js":
|
10778 |
|
10779 |
|
10780 |
|
10781 |
|
10782 | (function(module, __webpack_exports__, __webpack_require__) {
|
10783 |
|
10784 | "use strict";
|
10785 | __webpack_require__.r(__webpack_exports__);
|
10786 | __webpack_require__.d(__webpack_exports__, "LEVELS", function() { return LEVELS; });
|
10787 | __webpack_require__.d(__webpack_exports__, "logger", function() { return logger; });
|
10788 | __webpack_require__.d(__webpack_exports__, "setLogLevel", function() { return setLogLevel; });
|
10789 | var moment_mini__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "moment-mini");
|
10790 | var moment_mini__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(moment_mini__WEBPACK_IMPORTED_MODULE_0__);
|
10791 |
|
10792 | const LEVELS = {
|
10793 | debug: 1,
|
10794 | info: 2,
|
10795 | warn: 3,
|
10796 | error: 4,
|
10797 | fatal: 5
|
10798 | };
|
10799 | const logger = {
|
10800 | debug: () => {},
|
10801 | info: () => {},
|
10802 | warn: () => {},
|
10803 | error: () => {},
|
10804 | fatal: () => {}
|
10805 | };
|
10806 | const setLogLevel = function (level) {
|
10807 | logger.debug = () => {};
|
10808 |
|
10809 | logger.info = () => {};
|
10810 |
|
10811 | logger.warn = () => {};
|
10812 |
|
10813 | logger.error = () => {};
|
10814 |
|
10815 | logger.fatal = () => {};
|
10816 |
|
10817 | if (level <= LEVELS.fatal) {
|
10818 | logger.fatal = console.log.bind(console, '\x1b[35m', format('FATAL'));
|
10819 | }
|
10820 |
|
10821 | if (level <= LEVELS.error) {
|
10822 | logger.error = console.log.bind(console, '\x1b[31m', format('ERROR'));
|
10823 | }
|
10824 |
|
10825 | if (level <= LEVELS.warn) {
|
10826 | logger.warn = console.log.bind(console, `\x1b[33m`, format('WARN'));
|
10827 | }
|
10828 |
|
10829 | if (level <= LEVELS.info) {
|
10830 | logger.info = console.log.bind(console, '\x1b[34m', format('INFO'));
|
10831 | }
|
10832 |
|
10833 | if (level <= LEVELS.debug) {
|
10834 | logger.debug = console.log.bind(console, '\x1b[32m', format('DEBUG'));
|
10835 | }
|
10836 | };
|
10837 |
|
10838 | const format = level => {
|
10839 | const time = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()().format('HH:mm:ss.SSS');
|
10840 | return `${time} : ${level} : `;
|
10841 | };
|
10842 |
|
10843 | }),
|
10844 |
|
10845 | "./src/mermaid.js":
|
10846 |
|
10847 |
|
10848 |
|
10849 |
|
10850 | (function(module, __webpack_exports__, __webpack_require__) {
|
10851 |
|
10852 | "use strict";
|
10853 | __webpack_require__.r(__webpack_exports__);
|
10854 | var he__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "he");
|
10855 | var he__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(he__WEBPACK_IMPORTED_MODULE_0__);
|
10856 | var _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./src/mermaidAPI.js");
|
10857 | var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./src/logger.js");
|
10858 |
|
10859 |
|
10860 |
|
10861 |
|
10862 |
|
10863 |
|
10864 |
|
10865 |
|
10866 |
|
10867 |
|
10868 |
|
10869 |
|
10870 |
|
10871 |
|
10872 |
|
10873 |
|
10874 |
|
10875 |
|
10876 |
|
10877 |
|
10878 |
|
10879 |
|
10880 |
|
10881 |
|
10882 |
|
10883 |
|
10884 |
|
10885 |
|
10886 |
|
10887 | const init = function () {
|
10888 | const conf = _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].getConfig();
|
10889 | _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Starting rendering diagrams');
|
10890 | let nodes;
|
10891 |
|
10892 | if (arguments.length >= 2) {
|
10893 |
|
10894 | if (typeof arguments[0] !== 'undefined') {
|
10895 | mermaid.sequenceConfig = arguments[0];
|
10896 | }
|
10897 |
|
10898 | nodes = arguments[1];
|
10899 | } else {
|
10900 | nodes = arguments[0];
|
10901 | }
|
10902 |
|
10903 |
|
10904 | let callback;
|
10905 |
|
10906 | if (typeof arguments[arguments.length - 1] === 'function') {
|
10907 | callback = arguments[arguments.length - 1];
|
10908 | _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Callback function found');
|
10909 | } else {
|
10910 | if (typeof conf.mermaid !== 'undefined') {
|
10911 | if (typeof conf.mermaid.callback === 'function') {
|
10912 | callback = conf.mermaid.callback;
|
10913 | _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Callback function found');
|
10914 | } else {
|
10915 | _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('No Callback function found');
|
10916 | }
|
10917 | }
|
10918 | }
|
10919 |
|
10920 | nodes = nodes === undefined ? document.querySelectorAll('.mermaid') : typeof nodes === 'string' ? document.querySelectorAll(nodes) : nodes instanceof window.Node ? [nodes] : nodes;
|
10921 |
|
10922 | _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Start On Load before: ' + mermaid.startOnLoad);
|
10923 |
|
10924 | if (typeof mermaid.startOnLoad !== 'undefined') {
|
10925 | _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Start On Load inner: ' + mermaid.startOnLoad);
|
10926 | _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].initialize({
|
10927 | startOnLoad: mermaid.startOnLoad
|
10928 | });
|
10929 | }
|
10930 |
|
10931 | if (typeof mermaid.ganttConfig !== 'undefined') {
|
10932 | _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].initialize({
|
10933 | gantt: mermaid.ganttConfig
|
10934 | });
|
10935 | }
|
10936 |
|
10937 | let txt;
|
10938 |
|
10939 | for (let i = 0; i < nodes.length; i++) {
|
10940 | const element = nodes[i];
|
10941 |
|
10942 |
|
10943 | if (!element.getAttribute('data-processed')) {
|
10944 | element.setAttribute('data-processed', true);
|
10945 | } else {
|
10946 | continue;
|
10947 | }
|
10948 |
|
10949 | const id = `mermaid-${Date.now()}`;
|
10950 |
|
10951 | txt = element.innerHTML;
|
10952 |
|
10953 | txt = he__WEBPACK_IMPORTED_MODULE_0___default.a.decode(txt).trim().replace(/<br>/gi, '<br/>');
|
10954 | _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].render(id, txt, (svgCode, bindFunctions) => {
|
10955 | element.innerHTML = svgCode;
|
10956 |
|
10957 | if (typeof callback !== 'undefined') {
|
10958 | callback(id);
|
10959 | }
|
10960 |
|
10961 | if (bindFunctions) bindFunctions(element);
|
10962 | }, element);
|
10963 | }
|
10964 | };
|
10965 |
|
10966 | const initialize = function (config) {
|
10967 | _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Initializing mermaid ');
|
10968 |
|
10969 | if (typeof config.mermaid !== 'undefined') {
|
10970 | if (typeof config.mermaid.startOnLoad !== 'undefined') {
|
10971 | mermaid.startOnLoad = config.mermaid.startOnLoad;
|
10972 | }
|
10973 |
|
10974 | if (typeof config.mermaid.htmlLabels !== 'undefined') {
|
10975 | mermaid.htmlLabels = config.mermaid.htmlLabels;
|
10976 | }
|
10977 | }
|
10978 |
|
10979 | _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].initialize(config);
|
10980 | };
|
10981 |
|
10982 |
|
10983 |
|
10984 |
|
10985 |
|
10986 |
|
10987 |
|
10988 | const contentLoaded = function () {
|
10989 | let config;
|
10990 |
|
10991 | if (mermaid.startOnLoad) {
|
10992 |
|
10993 | config = _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].getConfig();
|
10994 |
|
10995 | if (config.startOnLoad) {
|
10996 | mermaid.init();
|
10997 | }
|
10998 | } else {
|
10999 | if (typeof mermaid.startOnLoad === 'undefined') {
|
11000 | _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('In start, no config');
|
11001 | config = _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].getConfig();
|
11002 |
|
11003 | if (config.startOnLoad) {
|
11004 | mermaid.init();
|
11005 | }
|
11006 | }
|
11007 | }
|
11008 | };
|
11009 |
|
11010 | if (typeof document !== 'undefined') {
|
11011 | |
11012 |
|
11013 |
|
11014 | window.addEventListener('load', function () {
|
11015 | contentLoaded();
|
11016 | }, false);
|
11017 | }
|
11018 |
|
11019 | const mermaid = {
|
11020 | startOnLoad: true,
|
11021 | htmlLabels: true,
|
11022 | mermaidAPI: _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"],
|
11023 | parse: _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].parse,
|
11024 | render: _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].render,
|
11025 | init,
|
11026 | initialize,
|
11027 | contentLoaded
|
11028 | };
|
11029 | __webpack_exports__["default"] = (mermaid);
|
11030 |
|
11031 | }),
|
11032 |
|
11033 | "./src/mermaidAPI.js":
|
11034 |
|
11035 |
|
11036 |
|
11037 |
|
11038 | (function(module, __webpack_exports__, __webpack_require__) {
|
11039 |
|
11040 | "use strict";
|
11041 | __webpack_require__.r(__webpack_exports__);
|
11042 | __webpack_require__.d(__webpack_exports__, "encodeEntities", function() { return encodeEntities; });
|
11043 | __webpack_require__.d(__webpack_exports__, "decodeEntities", function() { return decodeEntities; });
|
11044 | var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "d3");
|
11045 | var d3__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
|
11046 | var scope_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "scope-css");
|
11047 | var scope_css__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(scope_css__WEBPACK_IMPORTED_MODULE_1__);
|
11048 | var _package_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./package.json");
|
11049 | var _package_json__WEBPACK_IMPORTED_MODULE_2___namespace = __webpack_require__.t( "./package.json", 1);
|
11050 | var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./src/config.js");
|
11051 | var _logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./src/logger.js");
|
11052 | var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__( "./src/utils.js");
|
11053 | var _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__( "./src/diagrams/flowchart/flowRenderer.js");
|
11054 | var _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__( "./src/diagrams/flowchart/parser/flow.jison");
|
11055 | var _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7___default = __webpack_require__.n(_diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7__);
|
11056 | var _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__( "./src/diagrams/flowchart/flowDb.js");
|
11057 | var _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__( "./src/diagrams/sequence/sequenceRenderer.js");
|
11058 | var _diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__( "./src/diagrams/sequence/parser/sequenceDiagram.jison");
|
11059 | var _diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_10___default = __webpack_require__.n(_diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_10__);
|
11060 | var _diagrams_sequence_sequenceDb__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__( "./src/diagrams/sequence/sequenceDb.js");
|
11061 | var _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__( "./src/diagrams/gantt/ganttRenderer.js");
|
11062 | var _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__( "./src/diagrams/gantt/parser/gantt.jison");
|
11063 | var _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_13___default = __webpack_require__.n(_diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_13__);
|
11064 | var _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__( "./src/diagrams/gantt/ganttDb.js");
|
11065 | var _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__( "./src/diagrams/class/classRenderer.js");
|
11066 | var _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__( "./src/diagrams/class/parser/classDiagram.jison");
|
11067 | var _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_16___default = __webpack_require__.n(_diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_16__);
|
11068 | var _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__( "./src/diagrams/class/classDb.js");
|
11069 | var _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__( "./src/diagrams/git/gitGraphRenderer.js");
|
11070 | var _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__( "./src/diagrams/git/parser/gitGraph.jison");
|
11071 | var _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_19___default = __webpack_require__.n(_diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_19__);
|
11072 | var _diagrams_git_gitGraphAst__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__( "./src/diagrams/git/gitGraphAst.js");
|
11073 | var _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__( "./src/diagrams/info/infoRenderer.js");
|
11074 | var _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__( "./src/diagrams/info/parser/info.jison");
|
11075 | var _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_22___default = __webpack_require__.n(_diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_22__);
|
11076 | var _diagrams_info_infoDb__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__( "./src/diagrams/info/infoDb.js");
|
11077 | var _diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__( "./src/diagrams/pie/pieRenderer.js");
|
11078 | var _diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__( "./src/diagrams/pie/parser/pie.jison");
|
11079 | var _diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_25___default = __webpack_require__.n(_diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_25__);
|
11080 | var _diagrams_pie_pieDb__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__( "./src/diagrams/pie/pieDb.js");
|
11081 |
|
11082 |
|
11083 |
|
11084 |
|
11085 |
|
11086 |
|
11087 |
|
11088 |
|
11089 |
|
11090 |
|
11091 |
|
11092 |
|
11093 |
|
11094 |
|
11095 |
|
11096 |
|
11097 |
|
11098 |
|
11099 |
|
11100 |
|
11101 |
|
11102 |
|
11103 |
|
11104 |
|
11105 |
|
11106 |
|
11107 |
|
11108 |
|
11109 |
|
11110 |
|
11111 |
|
11112 |
|
11113 |
|
11114 |
|
11115 |
|
11116 |
|
11117 |
|
11118 |
|
11119 |
|
11120 | const themes = {};
|
11121 |
|
11122 | for (const themeName of ['default', 'forest', 'dark', 'neutral']) {
|
11123 | themes[themeName] = __webpack_require__("./src/themes sync recursive ^\\.\\/.*\\/index\\.scss$")(`./${themeName}/index.scss`);
|
11124 | }
|
11125 |
|
11126 |
|
11127 |
|
11128 |
|
11129 |
|
11130 |
|
11131 |
|
11132 |
|
11133 |
|
11134 |
|
11135 |
|
11136 |
|
11137 |
|
11138 |
|
11139 |
|
11140 |
|
11141 |
|
11142 |
|
11143 |
|
11144 |
|
11145 |
|
11146 |
|
11147 |
|
11148 |
|
11149 |
|
11150 |
|
11151 |
|
11152 |
|
11153 |
|
11154 |
|
11155 |
|
11156 |
|
11157 |
|
11158 | const config = {
|
11159 | |
11160 |
|
11161 |
|
11162 |
|
11163 |
|
11164 |
|
11165 |
|
11166 |
|
11167 |
|
11168 |
|
11169 |
|
11170 |
|
11171 |
|
11172 |
|
11173 |
|
11174 | theme: 'default',
|
11175 | themeCSS: undefined,
|
11176 |
|
11177 | |
11178 |
|
11179 |
|
11180 |
|
11181 |
|
11182 |
|
11183 |
|
11184 |
|
11185 | logLevel: 5,
|
11186 |
|
11187 | |
11188 |
|
11189 |
|
11190 |
|
11191 |
|
11192 | securityLevel: 'strict',
|
11193 |
|
11194 | |
11195 |
|
11196 |
|
11197 |
|
11198 | startOnLoad: true,
|
11199 |
|
11200 | |
11201 |
|
11202 |
|
11203 |
|
11204 |
|
11205 | arrowMarkerAbsolute: false,
|
11206 |
|
11207 | |
11208 |
|
11209 |
|
11210 | flowchart: {
|
11211 | |
11212 |
|
11213 |
|
11214 |
|
11215 |
|
11216 | htmlLabels: true,
|
11217 |
|
11218 | |
11219 |
|
11220 |
|
11221 |
|
11222 |
|
11223 |
|
11224 | curve: 'linear'
|
11225 | },
|
11226 |
|
11227 | |
11228 |
|
11229 |
|
11230 | sequence: {
|
11231 | |
11232 |
|
11233 |
|
11234 |
|
11235 | diagramMarginX: 50,
|
11236 |
|
11237 | |
11238 |
|
11239 |
|
11240 |
|
11241 | diagramMarginY: 10,
|
11242 |
|
11243 | |
11244 |
|
11245 |
|
11246 |
|
11247 | actorMargin: 50,
|
11248 |
|
11249 | |
11250 |
|
11251 |
|
11252 |
|
11253 | width: 150,
|
11254 |
|
11255 | |
11256 |
|
11257 |
|
11258 |
|
11259 | height: 65,
|
11260 |
|
11261 | |
11262 |
|
11263 |
|
11264 |
|
11265 | boxMargin: 10,
|
11266 |
|
11267 | |
11268 |
|
11269 |
|
11270 |
|
11271 | boxTextMargin: 5,
|
11272 |
|
11273 | |
11274 |
|
11275 |
|
11276 |
|
11277 | noteMargin: 10,
|
11278 |
|
11279 | |
11280 |
|
11281 |
|
11282 |
|
11283 | messageMargin: 35,
|
11284 |
|
11285 | |
11286 |
|
11287 |
|
11288 |
|
11289 | mirrorActors: true,
|
11290 |
|
11291 | |
11292 |
|
11293 |
|
11294 |
|
11295 |
|
11296 | bottomMarginAdj: 1,
|
11297 |
|
11298 | |
11299 |
|
11300 |
|
11301 |
|
11302 |
|
11303 | useMaxWidth: true,
|
11304 |
|
11305 | |
11306 |
|
11307 |
|
11308 |
|
11309 | rightAngles: false,
|
11310 |
|
11311 | |
11312 |
|
11313 |
|
11314 |
|
11315 | showSequenceNumbers: false
|
11316 | },
|
11317 |
|
11318 | |
11319 |
|
11320 |
|
11321 | gantt: {
|
11322 | |
11323 |
|
11324 |
|
11325 |
|
11326 | titleTopMargin: 25,
|
11327 |
|
11328 | |
11329 |
|
11330 |
|
11331 |
|
11332 | barHeight: 20,
|
11333 |
|
11334 | |
11335 |
|
11336 |
|
11337 |
|
11338 | barGap: 4,
|
11339 |
|
11340 | |
11341 |
|
11342 |
|
11343 |
|
11344 | topPadding: 50,
|
11345 |
|
11346 | |
11347 |
|
11348 |
|
11349 |
|
11350 | leftPadding: 75,
|
11351 |
|
11352 | |
11353 |
|
11354 |
|
11355 |
|
11356 | gridLineStartPadding: 35,
|
11357 |
|
11358 | |
11359 |
|
11360 |
|
11361 |
|
11362 | fontSize: 11,
|
11363 |
|
11364 | |
11365 |
|
11366 |
|
11367 |
|
11368 | fontFamily: '"Open-Sans", "sans-serif"',
|
11369 |
|
11370 | |
11371 |
|
11372 |
|
11373 |
|
11374 | numberSectionStyles: 4,
|
11375 |
|
11376 | |
11377 |
|
11378 |
|
11379 |
|
11380 | axisFormat: '%Y-%m-%d'
|
11381 | },
|
11382 | class: {},
|
11383 | git: {}
|
11384 | };
|
11385 | Object(_logger__WEBPACK_IMPORTED_MODULE_4__["setLogLevel"])(config.logLevel);
|
11386 | Object(_config__WEBPACK_IMPORTED_MODULE_3__["setConfig"])(config);
|
11387 |
|
11388 | function parse(text) {
|
11389 | const graphType = _utils__WEBPACK_IMPORTED_MODULE_5__["default"].detectType(text);
|
11390 | let parser;
|
11391 | _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('Type ' + graphType);
|
11392 |
|
11393 | switch (graphType) {
|
11394 | case 'git':
|
11395 | parser = _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_19___default.a;
|
11396 | parser.parser.yy = _diagrams_git_gitGraphAst__WEBPACK_IMPORTED_MODULE_20__["default"];
|
11397 | break;
|
11398 |
|
11399 | case 'flowchart':
|
11400 | _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__["default"].clear();
|
11401 | parser = _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7___default.a;
|
11402 | parser.parser.yy = _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__["default"];
|
11403 | break;
|
11404 |
|
11405 | case 'sequence':
|
11406 | parser = _diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_10___default.a;
|
11407 | parser.parser.yy = _diagrams_sequence_sequenceDb__WEBPACK_IMPORTED_MODULE_11__["default"];
|
11408 | break;
|
11409 |
|
11410 | case 'gantt':
|
11411 | parser = _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_13___default.a;
|
11412 | parser.parser.yy = _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_14__["default"];
|
11413 | break;
|
11414 |
|
11415 | case 'class':
|
11416 | parser = _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_16___default.a;
|
11417 | parser.parser.yy = _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_17__["default"];
|
11418 | break;
|
11419 |
|
11420 | case 'info':
|
11421 | _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('info info info');
|
11422 | console.warn('In API', _package_json__WEBPACK_IMPORTED_MODULE_2__.version);
|
11423 | parser = _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_22___default.a;
|
11424 | parser.parser.yy = _diagrams_info_infoDb__WEBPACK_IMPORTED_MODULE_23__["default"];
|
11425 | break;
|
11426 |
|
11427 | case 'pie':
|
11428 | _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('pie');
|
11429 | parser = _diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_25___default.a;
|
11430 | parser.parser.yy = _diagrams_pie_pieDb__WEBPACK_IMPORTED_MODULE_26__["default"];
|
11431 | break;
|
11432 | }
|
11433 |
|
11434 | parser.parser.yy.parseError = (str, hash) => {
|
11435 | const error = {
|
11436 | str,
|
11437 | hash
|
11438 | };
|
11439 | throw error;
|
11440 | };
|
11441 |
|
11442 | parser.parse(text);
|
11443 | }
|
11444 |
|
11445 | const encodeEntities = function (text) {
|
11446 | let txt = text;
|
11447 | txt = txt.replace(/style.*:\S*#.*;/g, function (s) {
|
11448 | const innerTxt = s.substring(0, s.length - 1);
|
11449 | return innerTxt;
|
11450 | });
|
11451 | txt = txt.replace(/classDef.*:\S*#.*;/g, function (s) {
|
11452 | const innerTxt = s.substring(0, s.length - 1);
|
11453 | return innerTxt;
|
11454 | });
|
11455 | txt = txt.replace(/#\w+;/g, function (s) {
|
11456 | const innerTxt = s.substring(1, s.length - 1);
|
11457 | const isInt = /^\+?\d+$/.test(innerTxt);
|
11458 |
|
11459 | if (isInt) {
|
11460 | return 'fl°°' + innerTxt + '¶ß';
|
11461 | } else {
|
11462 | return 'fl°' + innerTxt + '¶ß';
|
11463 | }
|
11464 | });
|
11465 | return txt;
|
11466 | };
|
11467 | const decodeEntities = function (text) {
|
11468 | let txt = text;
|
11469 | txt = txt.replace(/fl°°/g, function () {
|
11470 | return '&#';
|
11471 | });
|
11472 | txt = txt.replace(/fl°/g, function () {
|
11473 | return '&';
|
11474 | });
|
11475 | txt = txt.replace(/¶ß/g, function () {
|
11476 | return ';';
|
11477 | });
|
11478 | return txt;
|
11479 | };
|
11480 |
|
11481 |
|
11482 |
|
11483 |
|
11484 |
|
11485 |
|
11486 |
|
11487 |
|
11488 |
|
11489 |
|
11490 |
|
11491 |
|
11492 |
|
11493 |
|
11494 |
|
11495 |
|
11496 |
|
11497 |
|
11498 |
|
11499 |
|
11500 |
|
11501 |
|
11502 |
|
11503 | const render = function (id, txt, cb, container) {
|
11504 | if (typeof container !== 'undefined') {
|
11505 | container.innerHTML = '';
|
11506 | d3__WEBPACK_IMPORTED_MODULE_0__["select"](container).append('div').attr('id', 'd' + id).append('svg').attr('id', id).attr('width', '100%').attr('xmlns', 'http://www.w3.org/2000/svg').append('g');
|
11507 | } else {
|
11508 | const element = document.querySelector('#' + 'd' + id);
|
11509 |
|
11510 | if (element) {
|
11511 | element.innerHTML = '';
|
11512 | }
|
11513 |
|
11514 | d3__WEBPACK_IMPORTED_MODULE_0__["select"]('body').append('div').attr('id', 'd' + id).append('svg').attr('id', id).attr('width', '100%').attr('xmlns', 'http://www.w3.org/2000/svg').append('g');
|
11515 | }
|
11516 |
|
11517 | window.txt = txt;
|
11518 | txt = encodeEntities(txt);
|
11519 | const element = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#d' + id).node();
|
11520 | const graphType = _utils__WEBPACK_IMPORTED_MODULE_5__["default"].detectType(txt);
|
11521 |
|
11522 | const svg = element.firstChild;
|
11523 | const firstChild = svg.firstChild;
|
11524 |
|
11525 | let style = themes[config.theme];
|
11526 |
|
11527 | if (style === undefined) {
|
11528 | style = '';
|
11529 | }
|
11530 |
|
11531 |
|
11532 | if (config.themeCSS !== undefined) {
|
11533 | style += `\n${config.themeCSS}`;
|
11534 | }
|
11535 |
|
11536 |
|
11537 | if (graphType === 'flowchart') {
|
11538 | const classes = _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_6__["default"].getClasses(txt);
|
11539 |
|
11540 | for (const className in classes) {
|
11541 | style += `\n.${className} > * { ${classes[className].styles.join(' !important; ')} !important; }`;
|
11542 | }
|
11543 | }
|
11544 |
|
11545 | const style1 = document.createElement('style');
|
11546 | style1.innerHTML = scope_css__WEBPACK_IMPORTED_MODULE_1___default()(style, `#${id}`);
|
11547 | svg.insertBefore(style1, firstChild);
|
11548 | const style2 = document.createElement('style');
|
11549 | const cs = window.getComputedStyle(svg);
|
11550 | style2.innerHTML = `#${id} {
|
11551 | color: ${cs.color};
|
11552 | font: ${cs.font};
|
11553 | }`;
|
11554 | svg.insertBefore(style2, firstChild);
|
11555 |
|
11556 | switch (graphType) {
|
11557 | case 'git':
|
11558 | config.flowchart.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
|
11559 | _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_18__["default"].setConf(config.git);
|
11560 | _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_18__["default"].draw(txt, id, false);
|
11561 | break;
|
11562 |
|
11563 | case 'flowchart':
|
11564 | config.flowchart.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
|
11565 | _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_6__["default"].setConf(config.flowchart);
|
11566 | _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_6__["default"].draw(txt, id, false);
|
11567 | break;
|
11568 |
|
11569 | case 'sequence':
|
11570 | config.sequence.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
|
11571 |
|
11572 | if (config.sequenceDiagram) {
|
11573 |
|
11574 | _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__["default"].setConf(Object.assign(config.sequence, config.sequenceDiagram));
|
11575 | console.error('`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.');
|
11576 | } else {
|
11577 | _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__["default"].setConf(config.sequence);
|
11578 | }
|
11579 |
|
11580 | _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__["default"].draw(txt, id);
|
11581 | break;
|
11582 |
|
11583 | case 'gantt':
|
11584 | config.gantt.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
|
11585 | _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_12__["default"].setConf(config.gantt);
|
11586 | _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_12__["default"].draw(txt, id);
|
11587 | break;
|
11588 |
|
11589 | case 'class':
|
11590 | config.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
|
11591 | _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_15__["default"].setConf(config.class);
|
11592 | _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_15__["default"].draw(txt, id);
|
11593 | break;
|
11594 |
|
11595 | case 'info':
|
11596 | config.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
|
11597 | _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_21__["default"].setConf(config.class);
|
11598 | _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_21__["default"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);
|
11599 | break;
|
11600 |
|
11601 | case 'pie':
|
11602 | config.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
|
11603 | _diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_24__["default"].setConf(config.class);
|
11604 | _diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_24__["default"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);
|
11605 | break;
|
11606 | }
|
11607 |
|
11608 | d3__WEBPACK_IMPORTED_MODULE_0__["select"](`[id="${id}"]`).selectAll('foreignobject > *').attr('xmlns', 'http://www.w3.org/1999/xhtml');
|
11609 | let url = '';
|
11610 |
|
11611 | if (config.arrowMarkerAbsolute) {
|
11612 | url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;
|
11613 | url = url.replace(/\(/g, '\\(');
|
11614 | url = url.replace(/\)/g, '\\)');
|
11615 | }
|
11616 |
|
11617 |
|
11618 | let svgCode = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#d' + id).node().innerHTML.replace(/url\(#arrowhead/g, 'url(' + url + '#arrowhead', 'g');
|
11619 | svgCode = decodeEntities(svgCode);
|
11620 |
|
11621 | if (typeof cb !== 'undefined') {
|
11622 | switch (graphType) {
|
11623 | case 'flowchart':
|
11624 | cb(svgCode, _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__["default"].bindFunctions);
|
11625 | break;
|
11626 |
|
11627 | case 'gantt':
|
11628 | cb(svgCode, _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_14__["default"].bindFunctions);
|
11629 | break;
|
11630 |
|
11631 | default:
|
11632 | cb(svgCode);
|
11633 | }
|
11634 | } else {
|
11635 | _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('CB = undefined!');
|
11636 | }
|
11637 |
|
11638 | const node = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#d' + id).node();
|
11639 |
|
11640 | if (node !== null && typeof node.remove === 'function') {
|
11641 | d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#d' + id).node().remove();
|
11642 | }
|
11643 |
|
11644 | return svgCode;
|
11645 | };
|
11646 |
|
11647 | const setConf = function (cnf) {
|
11648 |
|
11649 | const lvl1Keys = Object.keys(cnf);
|
11650 |
|
11651 | for (let i = 0; i < lvl1Keys.length; i++) {
|
11652 | if (typeof cnf[lvl1Keys[i]] === 'object' && cnf[lvl1Keys[i]] != null) {
|
11653 | const lvl2Keys = Object.keys(cnf[lvl1Keys[i]]);
|
11654 |
|
11655 | for (let j = 0; j < lvl2Keys.length; j++) {
|
11656 | _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('Setting conf ', lvl1Keys[i], '-', lvl2Keys[j]);
|
11657 |
|
11658 | if (typeof config[lvl1Keys[i]] === 'undefined') {
|
11659 | config[lvl1Keys[i]] = {};
|
11660 | }
|
11661 |
|
11662 | _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('Setting config: ' + lvl1Keys[i] + ' ' + lvl2Keys[j] + ' to ' + cnf[lvl1Keys[i]][lvl2Keys[j]]);
|
11663 | config[lvl1Keys[i]][lvl2Keys[j]] = cnf[lvl1Keys[i]][lvl2Keys[j]];
|
11664 | }
|
11665 | } else {
|
11666 | config[lvl1Keys[i]] = cnf[lvl1Keys[i]];
|
11667 | }
|
11668 | }
|
11669 | };
|
11670 |
|
11671 | function initialize(options) {
|
11672 | _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('Initializing mermaidAPI ', _package_json__WEBPACK_IMPORTED_MODULE_2__.version);
|
11673 |
|
11674 | if (typeof options === 'object') {
|
11675 | setConf(options);
|
11676 | }
|
11677 |
|
11678 | Object(_config__WEBPACK_IMPORTED_MODULE_3__["setConfig"])(config);
|
11679 | Object(_logger__WEBPACK_IMPORTED_MODULE_4__["setLogLevel"])(config.logLevel);
|
11680 | }
|
11681 |
|
11682 |
|
11683 |
|
11684 |
|
11685 |
|
11686 | const mermaidAPI = {
|
11687 | render,
|
11688 | parse,
|
11689 | initialize,
|
11690 | getConfig: _config__WEBPACK_IMPORTED_MODULE_3__["getConfig"]
|
11691 | };
|
11692 | __webpack_exports__["default"] = (mermaidAPI);
|
11693 |
|
11694 |
|
11695 |
|
11696 |
|
11697 |
|
11698 |
|
11699 |
|
11700 |
|
11701 |
|
11702 |
|
11703 |
|
11704 |
|
11705 |
|
11706 |
|
11707 |
|
11708 |
|
11709 |
|
11710 |
|
11711 |
|
11712 |
|
11713 |
|
11714 |
|
11715 |
|
11716 |
|
11717 |
|
11718 |
|
11719 |
|
11720 |
|
11721 |
|
11722 |
|
11723 |
|
11724 |
|
11725 |
|
11726 |
|
11727 |
|
11728 |
|
11729 |
|
11730 |
|
11731 |
|
11732 |
|
11733 |
|
11734 |
|
11735 |
|
11736 |
|
11737 |
|
11738 |
|
11739 |
|
11740 |
|
11741 |
|
11742 |
|
11743 | }),
|
11744 |
|
11745 | "./src/themes sync recursive ^\\.\\/.*\\/index\\.scss$":
|
11746 |
|
11747 |
|
11748 |
|
11749 |
|
11750 | (function(module, exports, __webpack_require__) {
|
11751 |
|
11752 | var map = {
|
11753 | "./dark/index.scss": "./src/themes/dark/index.scss",
|
11754 | "./default/index.scss": "./src/themes/default/index.scss",
|
11755 | "./forest/index.scss": "./src/themes/forest/index.scss",
|
11756 | "./neutral/index.scss": "./src/themes/neutral/index.scss"
|
11757 | };
|
11758 |
|
11759 |
|
11760 | function webpackContext(req) {
|
11761 | var id = webpackContextResolve(req);
|
11762 | return __webpack_require__(id);
|
11763 | }
|
11764 | function webpackContextResolve(req) {
|
11765 | var id = map[req];
|
11766 | if(!(id + 1)) {
|
11767 | var e = new Error("Cannot find module '" + req + "'");
|
11768 | e.code = 'MODULE_NOT_FOUND';
|
11769 | throw e;
|
11770 | }
|
11771 | return id;
|
11772 | }
|
11773 | webpackContext.keys = function webpackContextKeys() {
|
11774 | return Object.keys(map);
|
11775 | };
|
11776 | webpackContext.resolve = webpackContextResolve;
|
11777 | module.exports = webpackContext;
|
11778 | webpackContext.id = "./src/themes sync recursive ^\\.\\/.*\\/index\\.scss$";
|
11779 |
|
11780 | }),
|
11781 |
|
11782 | "./src/themes/dark/index.scss":
|
11783 |
|
11784 |
|
11785 |
|
11786 |
|
11787 | (function(module, exports, __webpack_require__) {
|
11788 |
|
11789 |
|
11790 |
|
11791 |
|
11792 | var styles = __webpack_require__( "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/dark/index.scss");
|
11793 |
|
11794 | if (typeof styles === 'string') {
|
11795 |
|
11796 | module.exports = styles;
|
11797 | } else {
|
11798 |
|
11799 | module.exports = styles.toString();
|
11800 | }
|
11801 |
|
11802 | }),
|
11803 |
|
11804 | "./src/themes/default/index.scss":
|
11805 |
|
11806 |
|
11807 |
|
11808 |
|
11809 | (function(module, exports, __webpack_require__) {
|
11810 |
|
11811 |
|
11812 |
|
11813 |
|
11814 | var styles = __webpack_require__( "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/default/index.scss");
|
11815 |
|
11816 | if (typeof styles === 'string') {
|
11817 |
|
11818 | module.exports = styles;
|
11819 | } else {
|
11820 |
|
11821 | module.exports = styles.toString();
|
11822 | }
|
11823 |
|
11824 | }),
|
11825 |
|
11826 | "./src/themes/forest/index.scss":
|
11827 |
|
11828 |
|
11829 |
|
11830 |
|
11831 | (function(module, exports, __webpack_require__) {
|
11832 |
|
11833 |
|
11834 |
|
11835 |
|
11836 | var styles = __webpack_require__( "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/forest/index.scss");
|
11837 |
|
11838 | if (typeof styles === 'string') {
|
11839 |
|
11840 | module.exports = styles;
|
11841 | } else {
|
11842 |
|
11843 | module.exports = styles.toString();
|
11844 | }
|
11845 |
|
11846 | }),
|
11847 |
|
11848 | "./src/themes/neutral/index.scss":
|
11849 |
|
11850 |
|
11851 |
|
11852 |
|
11853 | (function(module, exports, __webpack_require__) {
|
11854 |
|
11855 |
|
11856 |
|
11857 |
|
11858 | var styles = __webpack_require__( "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/neutral/index.scss");
|
11859 |
|
11860 | if (typeof styles === 'string') {
|
11861 |
|
11862 | module.exports = styles;
|
11863 | } else {
|
11864 |
|
11865 | module.exports = styles.toString();
|
11866 | }
|
11867 |
|
11868 | }),
|
11869 |
|
11870 | "./src/utils.js":
|
11871 |
|
11872 |
|
11873 |
|
11874 |
|
11875 | (function(module, __webpack_exports__, __webpack_require__) {
|
11876 |
|
11877 | "use strict";
|
11878 | __webpack_require__.r(__webpack_exports__);
|
11879 | __webpack_require__.d(__webpack_exports__, "detectType", function() { return detectType; });
|
11880 | __webpack_require__.d(__webpack_exports__, "isSubstringInArray", function() { return isSubstringInArray; });
|
11881 | __webpack_require__.d(__webpack_exports__, "interpolateToCurve", function() { return interpolateToCurve; });
|
11882 | var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "d3");
|
11883 | var d3__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
|
11884 | var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./src/logger.js");
|
11885 |
|
11886 |
|
11887 |
|
11888 |
|
11889 |
|
11890 |
|
11891 |
|
11892 |
|
11893 |
|
11894 |
|
11895 |
|
11896 |
|
11897 |
|
11898 |
|
11899 |
|
11900 |
|
11901 |
|
11902 |
|
11903 |
|
11904 |
|
11905 | const detectType = function (text) {
|
11906 | text = text.replace(/^\s*%%.*\n/g, '\n');
|
11907 | _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('Detecting diagram type based on the text ' + text);
|
11908 |
|
11909 | if (text.match(/^\s*sequenceDiagram/)) {
|
11910 | return 'sequence';
|
11911 | }
|
11912 |
|
11913 | if (text.match(/^\s*gantt/)) {
|
11914 | return 'gantt';
|
11915 | }
|
11916 |
|
11917 | if (text.match(/^\s*classDiagram/)) {
|
11918 | return 'class';
|
11919 | }
|
11920 |
|
11921 | if (text.match(/^\s*gitGraph/)) {
|
11922 | return 'git';
|
11923 | }
|
11924 |
|
11925 | if (text.match(/^\s*info/)) {
|
11926 | return 'info';
|
11927 | }
|
11928 |
|
11929 | if (text.match(/^\s*pie/)) {
|
11930 | return 'pie';
|
11931 | }
|
11932 |
|
11933 | return 'flowchart';
|
11934 | };
|
11935 |
|
11936 |
|
11937 |
|
11938 |
|
11939 |
|
11940 |
|
11941 |
|
11942 |
|
11943 | const isSubstringInArray = function (str, arr) {
|
11944 | for (let i = 0; i < arr.length; i++) {
|
11945 | if (arr[i].match(str)) return i;
|
11946 | }
|
11947 |
|
11948 | return -1;
|
11949 | };
|
11950 | const interpolateToCurve = (interpolate, defaultCurve) => {
|
11951 | if (!interpolate) {
|
11952 | return defaultCurve;
|
11953 | }
|
11954 |
|
11955 | const curveName = `curve${interpolate.charAt(0).toUpperCase() + interpolate.slice(1)}`;
|
11956 | return d3__WEBPACK_IMPORTED_MODULE_0__[curveName] || defaultCurve;
|
11957 | };
|
11958 | __webpack_exports__["default"] = ({
|
11959 | detectType,
|
11960 | isSubstringInArray,
|
11961 | interpolateToCurve
|
11962 | });
|
11963 |
|
11964 | }),
|
11965 |
|
11966 | "@braintree/sanitize-url":
|
11967 |
|
11968 |
|
11969 |
|
11970 |
|
11971 | (function(module, exports) {
|
11972 |
|
11973 | module.exports = require("@braintree/sanitize-url");
|
11974 |
|
11975 | }),
|
11976 |
|
11977 | "d3":
|
11978 |
|
11979 |
|
11980 |
|
11981 |
|
11982 | (function(module, exports) {
|
11983 |
|
11984 | module.exports = require("d3");
|
11985 |
|
11986 | }),
|
11987 |
|
11988 | "dagre-d3-renderer":
|
11989 |
|
11990 |
|
11991 |
|
11992 |
|
11993 | (function(module, exports) {
|
11994 |
|
11995 | module.exports = require("dagre-d3-renderer");
|
11996 |
|
11997 | }),
|
11998 |
|
11999 | "dagre-d3-renderer/lib/label/add-html-label.js":
|
12000 |
|
12001 |
|
12002 |
|
12003 |
|
12004 | (function(module, exports) {
|
12005 |
|
12006 | module.exports = require("dagre-d3-renderer/lib/label/add-html-label.js");
|
12007 |
|
12008 | }),
|
12009 |
|
12010 | "dagre-layout":
|
12011 |
|
12012 |
|
12013 |
|
12014 |
|
12015 | (function(module, exports) {
|
12016 |
|
12017 | module.exports = require("dagre-layout");
|
12018 |
|
12019 | }),
|
12020 |
|
12021 | "graphlibrary":
|
12022 |
|
12023 |
|
12024 |
|
12025 |
|
12026 | (function(module, exports) {
|
12027 |
|
12028 | module.exports = require("graphlibrary");
|
12029 |
|
12030 | }),
|
12031 |
|
12032 | "he":
|
12033 |
|
12034 |
|
12035 |
|
12036 |
|
12037 | (function(module, exports) {
|
12038 |
|
12039 | module.exports = require("he");
|
12040 |
|
12041 | }),
|
12042 |
|
12043 | "lodash":
|
12044 |
|
12045 |
|
12046 |
|
12047 |
|
12048 | (function(module, exports) {
|
12049 |
|
12050 | module.exports = require("lodash");
|
12051 |
|
12052 | }),
|
12053 |
|
12054 | "moment-mini":
|
12055 |
|
12056 |
|
12057 |
|
12058 |
|
12059 | (function(module, exports) {
|
12060 |
|
12061 | module.exports = require("moment-mini");
|
12062 |
|
12063 | }),
|
12064 |
|
12065 | "scope-css":
|
12066 |
|
12067 |
|
12068 |
|
12069 |
|
12070 | (function(module, exports) {
|
12071 |
|
12072 | module.exports = require("scope-css");
|
12073 |
|
12074 | })
|
12075 |
|
12076 | })["default"];
|
12077 | });
|
12078 |
|
\ | No newline at end of file |