UNPKG

463 kB JavaScript View Raw
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() {
11return /******/ (function(modules) { // webpackBootstrap
12/******/ // The module cache
13/******/ var installedModules = {};
14/******/
15/******/ // The require function
16/******/ function __webpack_require__(moduleId) {
17/******/
18/******/ // Check if module is in cache
19/******/ if(installedModules[moduleId]) {
20/******/ return installedModules[moduleId].exports;
21/******/ }
22/******/ // Create a new module (and put it into the cache)
23/******/ var module = installedModules[moduleId] = {
24/******/ i: moduleId,
25/******/ l: false,
26/******/ exports: {}
27/******/ };
28/******/
29/******/ // Execute the module function
30/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31/******/
32/******/ // Flag the module as loaded
33/******/ module.l = true;
34/******/
35/******/ // Return the exports of the module
36/******/ return module.exports;
37/******/ }
38/******/
39/******/
40/******/ // expose the modules object (__webpack_modules__)
41/******/ __webpack_require__.m = modules;
42/******/
43/******/ // expose the module cache
44/******/ __webpack_require__.c = installedModules;
45/******/
46/******/ // define getter function for harmony exports
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/******/ // define __esModule on exports
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/******/ // create a fake namespace object
62/******/ // mode & 1: value is a module id, require it
63/******/ // mode & 2: merge all properties of value into the ns
64/******/ // mode & 4: return value when already ns object
65/******/ // mode & 8|1: behave like require
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/******/ // getDefaultExport function for compatibility with non-harmony modules
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/******/ // Object.prototype.hasOwnProperty.call
87/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
88/******/
89/******/ // __webpack_public_path__
90/******/ __webpack_require__.p = "";
91/******/
92/******/
93/******/ // Load entry module and return exports
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 !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/dark/index.scss ***!
102 \*******************************************************************************************************************/
103/*! no static exports found */
104/***/ (function(module, exports, __webpack_require__) {
105
106exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
107// Module
108exports.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.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#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", ""]);
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 !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/default/index.scss ***!
117 \**********************************************************************************************************************/
118/*! no static exports found */
119/***/ (function(module, exports, __webpack_require__) {
120
121exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
122// Module
123exports.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.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#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", ""]);
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 !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/forest/index.scss ***!
132 \*********************************************************************************************************************/
133/*! no static exports found */
134/***/ (function(module, exports, __webpack_require__) {
135
136exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
137// Module
138exports.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.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#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", ""]);
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 !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/neutral/index.scss ***!
147 \**********************************************************************************************************************/
148/*! no static exports found */
149/***/ (function(module, exports, __webpack_require__) {
150
151exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
152// Module
153exports.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.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#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", ""]);
154
155
156
157/***/ }),
158
159/***/ "./node_modules/css-loader/dist/runtime/api.js":
160/*!*****************************************************!*\
161 !*** ./node_modules/css-loader/dist/runtime/api.js ***!
162 \*****************************************************/
163/*! no static exports found */
164/***/ (function(module, exports, __webpack_require__) {
165
166"use strict";
167
168
169/*
170 MIT License http://www.opensource.org/licenses/mit-license.php
171 Author Tobias Koppers @sokra
172*/
173// css base code, injected by the css-loader
174module.exports = function (useSourceMap) {
175 var list = []; // return the list of modules as css string
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 }; // import a list of modules into the list
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]; // skip already imported module
207 // this implementation is not 100% perfect for weird media query combinations
208 // when a module is imported multiple times with different media queries.
209 // I hope this will never occur (Hey this way we have smaller bundles)
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
226function 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} // Adapted from convert-source-map (MIT)
244
245
246function toComment(sourceMap) {
247 // eslint-disable-next-line no-undef
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 !*** ./node_modules/node-libs-browser/mock/empty.js ***!
258 \******************************************************/
259/*! no static exports found */
260/***/ (function(module, exports) {
261
262
263
264/***/ }),
265
266/***/ "./node_modules/path-browserify/index.js":
267/*!***********************************************!*\
268 !*** ./node_modules/path-browserify/index.js ***!
269 \***********************************************/
270/*! no static exports found */
271/***/ (function(module, exports, __webpack_require__) {
272
273/* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
274//
275// Permission is hereby granted, free of charge, to any person obtaining a
276// copy of this software and associated documentation files (the
277// "Software"), to deal in the Software without restriction, including
278// without limitation the rights to use, copy, modify, merge, publish,
279// distribute, sublicense, and/or sell copies of the Software, and to permit
280// persons to whom the Software is furnished to do so, subject to the
281// following conditions:
282//
283// The above copyright notice and this permission notice shall be included
284// in all copies or substantial portions of the Software.
285//
286// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
287// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
288// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
289// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
290// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
291// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
292// USE OR OTHER DEALINGS IN THE SOFTWARE.
293
294// resolves . and .. elements in a path array with directory names there
295// must be no slashes, empty elements, or device names (c:\) in the array
296// (so also no leading and trailing slashes - it does not distinguish
297// relative and absolute paths)
298function normalizeArray(parts, allowAboveRoot) {
299 // if the path tries to go above the root, `up` ends up > 0
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 // if the path is allowed to go above the root, restore leading ..s
315 if (allowAboveRoot) {
316 for (; up--; up) {
317 parts.unshift('..');
318 }
319 }
320
321 return parts;
322}
323
324// Split a filename into [root, dir, basename, ext], unix version
325// 'root' is just a slash, or nothing.
326var splitPathRe =
327 /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
328var splitPath = function(filename) {
329 return splitPathRe.exec(filename).slice(1);
330};
331
332// path.resolve([from ...], to)
333// posix version
334exports.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 // Skip empty and invalid entries
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 // At this point the path should be resolved to a full absolute path, but
353 // handle relative paths to be safe (might happen when process.cwd() fails)
354
355 // Normalize the path
356 resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
357 return !!p;
358 }), !resolvedAbsolute).join('/');
359
360 return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
361};
362
363// path.normalize(path)
364// posix version
365exports.normalize = function(path) {
366 var isAbsolute = exports.isAbsolute(path),
367 trailingSlash = substr(path, -1) === '/';
368
369 // Normalize the path
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// posix version
385exports.isAbsolute = function(path) {
386 return path.charAt(0) === '/';
387};
388
389// posix version
390exports.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// path.relative(from, to)
402// posix version
403exports.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
444exports.sep = '/';
445exports.delimiter = ':';
446
447exports.dirname = function(path) {
448 var result = splitPath(path),
449 root = result[0],
450 dir = result[1];
451
452 if (!root && !dir) {
453 // No dirname whatsoever
454 return '.';
455 }
456
457 if (dir) {
458 // It has a dirname, strip trailing slash
459 dir = dir.substr(0, dir.length - 1);
460 }
461
462 return root + dir;
463};
464
465
466exports.basename = function(path, ext) {
467 var f = splitPath(path)[2];
468 // TODO: make this comparison case-insensitive on windows?
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
476exports.extname = function(path) {
477 return splitPath(path)[3];
478};
479
480function 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// String.prototype.substr - negative index don't work in IE8
490var 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/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../process/browser.js */ "./node_modules/process/browser.js")))
499
500/***/ }),
501
502/***/ "./node_modules/process/browser.js":
503/*!*****************************************!*\
504 !*** ./node_modules/process/browser.js ***!
505 \*****************************************/
506/*! no static exports found */
507/***/ (function(module, exports) {
508
509// shim for using process in browser
510var process = module.exports = {};
511
512// cached from whatever global is present so that test runners that stub it
513// don't break things. But we need to wrap it in a try catch in case it is
514// wrapped in strict mode code which doesn't define any globals. It's inside a
515// function because try/catches deoptimize in certain engines.
516
517var cachedSetTimeout;
518var cachedClearTimeout;
519
520function defaultSetTimout() {
521 throw new Error('setTimeout has not been defined');
522}
523function 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} ())
546function runTimeout(fun) {
547 if (cachedSetTimeout === setTimeout) {
548 //normal enviroments in sane situations
549 return setTimeout(fun, 0);
550 }
551 // if setTimeout wasn't available but was latter defined
552 if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
553 cachedSetTimeout = setTimeout;
554 return setTimeout(fun, 0);
555 }
556 try {
557 // when when somebody has screwed with setTimeout but no I.E. maddness
558 return cachedSetTimeout(fun, 0);
559 } catch(e){
560 try {
561 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
562 return cachedSetTimeout.call(null, fun, 0);
563 } catch(e){
564 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
565 return cachedSetTimeout.call(this, fun, 0);
566 }
567 }
568
569
570}
571function runClearTimeout(marker) {
572 if (cachedClearTimeout === clearTimeout) {
573 //normal enviroments in sane situations
574 return clearTimeout(marker);
575 }
576 // if clearTimeout wasn't available but was latter defined
577 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
578 cachedClearTimeout = clearTimeout;
579 return clearTimeout(marker);
580 }
581 try {
582 // when when somebody has screwed with setTimeout but no I.E. maddness
583 return cachedClearTimeout(marker);
584 } catch (e){
585 try {
586 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
587 return cachedClearTimeout.call(null, marker);
588 } catch (e){
589 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
590 // Some versions of I.E. have different rules for clearTimeout vs setTimeout
591 return cachedClearTimeout.call(this, marker);
592 }
593 }
594
595
596
597}
598var queue = [];
599var draining = false;
600var currentQueue;
601var queueIndex = -1;
602
603function 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
618function 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
642process.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// v8 likes predictible objects
656function Item(fun, array) {
657 this.fun = fun;
658 this.array = array;
659}
660Item.prototype.run = function () {
661 this.fun.apply(null, this.array);
662};
663process.title = 'browser';
664process.browser = true;
665process.env = {};
666process.argv = [];
667process.version = ''; // empty string to avoid regexp issues
668process.versions = {};
669
670function noop() {}
671
672process.on = noop;
673process.addListener = noop;
674process.once = noop;
675process.off = noop;
676process.removeListener = noop;
677process.removeAllListeners = noop;
678process.emit = noop;
679process.prependListener = noop;
680process.prependOnceListener = noop;
681
682process.listeners = function (name) { return [] }
683
684process.binding = function (name) {
685 throw new Error('process.binding is not supported');
686};
687
688process.cwd = function () { return '/' };
689process.chdir = function (dir) {
690 throw new Error('process.chdir is not supported');
691};
692process.umask = function() { return 0; };
693
694
695/***/ }),
696
697/***/ "./node_modules/webpack/buildin/module.js":
698/*!***********************************!*\
699 !*** (webpack)/buildin/module.js ***!
700 \***********************************/
701/*! no static exports found */
702/***/ (function(module, exports) {
703
704module.exports = function(module) {
705 if (!module.webpackPolyfill) {
706 module.deprecate = function() {};
707 module.paths = [];
708 // module.parent = undefined by default
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 !*** ./package.json ***!
733 \**********************/
734/*! exports provided: name, version, description, main, keywords, scripts, repository, author, license, standard, dependencies, devDependencies, files, yarn-upgrade-all, default */
735/***/ (function(module) {
736
737module.exports = {"name":"mermaid","version":"8.1.0","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","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":"standard","e2e":"yarn lint && jest e2e --config e2e/jest.config.js","dev":"yarn lint && webpack-dev-server --config webpack.config.e2e.js","test":"yarn lint && jest src","test:watch":"jest --watch src","jison":"node -r @babel/register node_modules/.bin/gulp jison","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"],"globals":["page"]},"dependencies":{"d3":"^5.7.0","dagre-d3-renderer":"^0.5.8","dagre-layout":"^0.8.8","graphlibrary":"^2.2.0","he":"^1.2.0","moment-mini":"^2.22.1","lodash":"^4.17.11","minify":"^4.1.1","scope-css":"^1.2.1"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.2.0","@babel/register":"^7.0.0","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","gulp":"^4.0.0","gulp-filelog":"^0.4.1","gulp-jison":"^1.2.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","standard":"^12.0.1","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/diagrams/class/classDb.js":
742/*!***************************************!*\
743 !*** ./src/diagrams/class/classDb.js ***!
744 \***************************************/
745/*! exports provided: addClass, clear, getClass, getClasses, getRelations, addRelation, addMember, addMembers, cleanupLabel, lineType, relationType, default */
746/***/ (function(module, __webpack_exports__, __webpack_require__) {
747
748"use strict";
749__webpack_require__.r(__webpack_exports__);
750/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addClass", function() { return addClass; });
751/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
752/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClass", function() { return getClass; });
753/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClasses", function() { return getClasses; });
754/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRelations", function() { return getRelations; });
755/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addRelation", function() { return addRelation; });
756/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addMember", function() { return addMember; });
757/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addMembers", function() { return addMembers; });
758/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cleanupLabel", function() { return cleanupLabel; });
759/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineType", function() { return lineType; });
760/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "relationType", function() { return relationType; });
761/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
762
763let relations = [];
764let classes = {};
765/**
766 * Function called by parser when a node definition has been found.
767 * @param id
768 * @param text
769 * @param type
770 * @param style
771 */
772
773const addClass = function (id) {
774 if (typeof classes[id] === 'undefined') {
775 classes[id] = {
776 id: id,
777 methods: [],
778 members: []
779 };
780 }
781};
782const clear = function () {
783 relations = [];
784 classes = {};
785};
786const getClass = function (id) {
787 return classes[id];
788};
789const getClasses = function () {
790 return classes;
791};
792const getRelations = function () {
793 return relations;
794};
795const addRelation = function (relation) {
796 _logger__WEBPACK_IMPORTED_MODULE_0__["logger"].debug('Adding relation: ' + JSON.stringify(relation));
797 addClass(relation.id1);
798 addClass(relation.id2);
799 relations.push(relation);
800};
801const addMember = function (className, member) {
802 const theClass = classes[className];
803
804 if (typeof member === 'string') {
805 if (member.substr(-1) === ')') {
806 theClass.methods.push(member);
807 } else {
808 theClass.members.push(member);
809 }
810 }
811};
812const addMembers = function (className, MembersArr) {
813 if (Array.isArray(MembersArr)) {
814 MembersArr.forEach(member => addMember(className, member));
815 }
816};
817const cleanupLabel = function (label) {
818 if (label.substring(0, 1) === ':') {
819 return label.substr(2).trim();
820 } else {
821 return label.trim();
822 }
823};
824const lineType = {
825 LINE: 0,
826 DOTTED_LINE: 1
827};
828const relationType = {
829 AGGREGATION: 0,
830 EXTENSION: 1,
831 COMPOSITION: 2,
832 DEPENDENCY: 3
833};
834/* harmony default export */ __webpack_exports__["default"] = ({
835 addClass,
836 clear,
837 getClass,
838 getClasses,
839 getRelations,
840 addRelation,
841 addMember,
842 addMembers,
843 cleanupLabel,
844 lineType,
845 relationType
846});
847
848/***/ }),
849
850/***/ "./src/diagrams/class/classRenderer.js":
851/*!*********************************************!*\
852 !*** ./src/diagrams/class/classRenderer.js ***!
853 \*********************************************/
854/*! exports provided: setConf, draw, default */
855/***/ (function(module, __webpack_exports__, __webpack_require__) {
856
857"use strict";
858__webpack_require__.r(__webpack_exports__);
859/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
860/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
861/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
862/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
863/* harmony import */ var dagre_layout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dagre-layout */ "dagre-layout");
864/* harmony import */ var dagre_layout__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dagre_layout__WEBPACK_IMPORTED_MODULE_1__);
865/* harmony import */ var graphlibrary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! graphlibrary */ "graphlibrary");
866/* harmony import */ var graphlibrary__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(graphlibrary__WEBPACK_IMPORTED_MODULE_2__);
867/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
868/* harmony import */ var _classDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./classDb */ "./src/diagrams/class/classDb.js");
869/* harmony import */ var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./parser/classDiagram */ "./src/diagrams/class/parser/classDiagram.js");
870/* harmony import */ var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__);
871
872
873
874
875
876
877_parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].yy = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"];
878const idCache = {};
879let classCnt = 0;
880const conf = {
881 dividerMargin: 10,
882 padding: 5,
883 textHeight: 10 // Todo optimize
884
885};
886
887const getGraphId = function (label) {
888 const keys = Object.keys(idCache);
889
890 for (let i = 0; i < keys.length; i++) {
891 if (idCache[keys[i]].label === label) {
892 return keys[i];
893 }
894 }
895
896 return undefined;
897};
898/**
899 * Setup arrow head and define the marker. The result is appended to the svg.
900 */
901
902
903const insertMarkers = function (elem) {
904 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');
905 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'); // this is actual shape for arrowhead
906
907 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');
908 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');
909 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');
910 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');
911 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');
912 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');
913};
914
915let edgeCount = 0;
916let total = 0;
917
918const drawEdge = function (elem, path, relation) {
919 const getRelationType = function (type) {
920 switch (type) {
921 case _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].relationType.AGGREGATION:
922 return 'aggregation';
923
924 case _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].relationType.EXTENSION:
925 return 'extension';
926
927 case _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].relationType.COMPOSITION:
928 return 'composition';
929
930 case _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].relationType.DEPENDENCY:
931 return 'dependency';
932 }
933 };
934
935 path.points = path.points.filter(p => !Number.isNaN(p.y)); // The data for our line
936
937 const lineData = path.points; // This is the accessor function we talked about above
938
939 const lineFunction = d3__WEBPACK_IMPORTED_MODULE_0__["line"]().x(function (d) {
940 return d.x;
941 }).y(function (d) {
942 return d.y;
943 }).curve(d3__WEBPACK_IMPORTED_MODULE_0__["curveBasis"]);
944 const svgPath = elem.append('path').attr('d', lineFunction(lineData)).attr('id', 'edge' + edgeCount).attr('class', 'relation');
945 let url = '';
946
947 if (conf.arrowMarkerAbsolute) {
948 url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;
949 url = url.replace(/\(/g, '\\(');
950 url = url.replace(/\)/g, '\\)');
951 }
952
953 if (relation.relation.type1 !== 'none') {
954 svgPath.attr('marker-start', 'url(' + url + '#' + getRelationType(relation.relation.type1) + 'Start' + ')');
955 }
956
957 if (relation.relation.type2 !== 'none') {
958 svgPath.attr('marker-end', 'url(' + url + '#' + getRelationType(relation.relation.type2) + 'End' + ')');
959 }
960
961 let x, y;
962 const l = path.points.length;
963
964 if (l % 2 !== 0 && l > 1) {
965 const p1 = path.points[Math.floor(l / 2)];
966 const p2 = path.points[Math.ceil(l / 2)];
967 x = (p1.x + p2.x) / 2;
968 y = (p1.y + p2.y) / 2;
969 } else {
970 const p = path.points[Math.floor(l / 2)];
971 x = p.x;
972 y = p.y;
973 }
974
975 if (typeof relation.title !== 'undefined') {
976 const g = elem.append('g').attr('class', 'classLabel');
977 const label = g.append('text').attr('class', 'label').attr('x', x).attr('y', y).attr('fill', 'red').attr('text-anchor', 'middle').text(relation.title);
978 window.label = label;
979 const bounds = label.node().getBBox();
980 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);
981 }
982
983 edgeCount++;
984};
985
986const drawClass = function (elem, classDef) {
987 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('Rendering class ' + classDef);
988
989 const addTspan = function (textEl, txt, isFirst) {
990 const tSpan = textEl.append('tspan').attr('x', conf.padding).text(txt);
991
992 if (!isFirst) {
993 tSpan.attr('dy', conf.textHeight);
994 }
995 };
996
997 const id = 'classId' + classCnt % total;
998 const classInfo = {
999 id: id,
1000 label: classDef.id,
1001 width: 0,
1002 height: 0
1003 };
1004 const g = elem.append('g').attr('id', id).attr('class', 'classGroup');
1005 const title = g.append('text').attr('x', conf.padding).attr('y', conf.textHeight + conf.padding).text(classDef.id);
1006 const titleHeight = title.node().getBBox().height;
1007 const membersLine = g.append('line') // text label for the x axis
1008 .attr('x1', 0).attr('y1', conf.padding + titleHeight + conf.dividerMargin / 2).attr('y2', conf.padding + titleHeight + conf.dividerMargin / 2);
1009 const members = g.append('text') // text label for the x axis
1010 .attr('x', conf.padding).attr('y', titleHeight + conf.dividerMargin + conf.textHeight).attr('fill', 'white').attr('class', 'classText');
1011 let isFirst = true;
1012 classDef.members.forEach(function (member) {
1013 addTspan(members, member, isFirst);
1014 isFirst = false;
1015 });
1016 const membersBox = members.node().getBBox();
1017 const methodsLine = g.append('line') // text label for the x axis
1018 .attr('x1', 0).attr('y1', conf.padding + titleHeight + conf.dividerMargin + membersBox.height).attr('y2', conf.padding + titleHeight + conf.dividerMargin + membersBox.height);
1019 const methods = g.append('text') // text label for the x axis
1020 .attr('x', conf.padding).attr('y', titleHeight + 2 * conf.dividerMargin + membersBox.height + conf.textHeight).attr('fill', 'white').attr('class', 'classText');
1021 isFirst = true;
1022 classDef.methods.forEach(function (method) {
1023 addTspan(methods, method, isFirst);
1024 isFirst = false;
1025 });
1026 const classBox = g.node().getBBox();
1027 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);
1028 membersLine.attr('x2', classBox.width + 2 * conf.padding);
1029 methodsLine.attr('x2', classBox.width + 2 * conf.padding);
1030 classInfo.width = classBox.width + 2 * conf.padding;
1031 classInfo.height = classBox.height + conf.padding + 0.5 * conf.dividerMargin;
1032 idCache[id] = classInfo;
1033 classCnt++;
1034 return classInfo;
1035};
1036
1037const setConf = function (cnf) {
1038 const keys = Object.keys(cnf);
1039 keys.forEach(function (key) {
1040 conf[key] = cnf[key];
1041 });
1042};
1043/**
1044 * Draws a flowchart in the tag with id: id based on the graph definition in text.
1045 * @param text
1046 * @param id
1047 */
1048
1049const draw = function (text, id) {
1050 _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].yy.clear();
1051 _parser_classDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].parse(text);
1052 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('Rendering diagram ' + text); /// / Fetch the default direction, use TD if none was found
1053
1054 const diagram = d3__WEBPACK_IMPORTED_MODULE_0__["select"](`[id='${id}']`);
1055 insertMarkers(diagram); // Layout graph, Create a new directed graph
1056
1057 const g = new graphlibrary__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({
1058 multigraph: true
1059 }); // Set an object for the graph label
1060
1061 g.setGraph({
1062 isMultiGraph: true
1063 }); // Default to assigning a new object as a label for each new edge.
1064
1065 g.setDefaultEdgeLabel(function () {
1066 return {};
1067 });
1068 const classes = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getClasses();
1069 const keys = Object.keys(classes);
1070 total = keys.length;
1071
1072 for (let i = 0; i < keys.length; i++) {
1073 const classDef = classes[keys[i]];
1074 const node = drawClass(diagram, classDef); // Add nodes to the graph. The first argument is the node id. The second is
1075 // metadata about the node. In this case we're going to add labels to each of
1076 // our nodes.
1077
1078 g.setNode(node.id, node);
1079 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('Org height: ' + node.height);
1080 }
1081
1082 const relations = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getRelations();
1083 relations.forEach(function (relation) {
1084 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('tjoho' + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation));
1085 g.setEdge(getGraphId(relation.id1), getGraphId(relation.id2), {
1086 relation: relation
1087 });
1088 });
1089 dagre_layout__WEBPACK_IMPORTED_MODULE_1___default.a.layout(g);
1090 g.nodes().forEach(function (v) {
1091 if (typeof v !== 'undefined' && typeof g.node(v) !== 'undefined') {
1092 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Node ' + v + ': ' + JSON.stringify(g.node(v)));
1093 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) + ' )');
1094 }
1095 });
1096 g.edges().forEach(function (e) {
1097 if (typeof e !== 'undefined' && typeof g.edge(e) !== 'undefined') {
1098 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(g.edge(e)));
1099 drawEdge(diagram, g.edge(e), g.edge(e).relation);
1100 }
1101 });
1102 diagram.attr('height', '100%');
1103 diagram.attr('width', '100%');
1104 diagram.attr('viewBox', '0 0 ' + (g.graph().width + 20) + ' ' + (g.graph().height + 20));
1105};
1106/* harmony default export */ __webpack_exports__["default"] = ({
1107 setConf,
1108 draw
1109});
1110
1111/***/ }),
1112
1113/***/ "./src/diagrams/class/parser/classDiagram.js":
1114/*!***************************************************!*\
1115 !*** ./src/diagrams/class/parser/classDiagram.js ***!
1116 \***************************************************/
1117/*! no static exports found */
1118/***/ (function(module, exports, __webpack_require__) {
1119
1120/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
1121
1122/*
1123 Returns a Parser object of the following structure:
1124
1125 Parser: {
1126 yy: {}
1127 }
1128
1129 Parser.prototype: {
1130 yy: {},
1131 trace: function(),
1132 symbols_: {associative list: name ==> number},
1133 terminals_: {associative list: number ==> name},
1134 productions_: [...],
1135 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
1136 table: [...],
1137 defaultActions: {...},
1138 parseError: function(str, hash),
1139 parse: function(input),
1140
1141 lexer: {
1142 EOF: 1,
1143 parseError: function(str, hash),
1144 setInput: function(input),
1145 input: function(),
1146 unput: function(str),
1147 more: function(),
1148 less: function(n),
1149 pastInput: function(),
1150 upcomingInput: function(),
1151 showPosition: function(),
1152 test_match: function(regex_match_array, rule_index),
1153 next: function(),
1154 lex: function(),
1155 begin: function(condition),
1156 popState: function(),
1157 _currentRules: function(),
1158 topState: function(),
1159 pushState: function(condition),
1160
1161 options: {
1162 ranges: boolean (optional: true ==> token location info will include a .range[] member)
1163 flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
1164 backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
1165 },
1166
1167 performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
1168 rules: [...],
1169 conditions: {associative list: name ==> set},
1170 }
1171 }
1172
1173
1174 token location info (@$, _$, etc.): {
1175 first_line: n,
1176 last_line: n,
1177 first_column: n,
1178 last_column: n,
1179 range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
1180 }
1181
1182
1183 the parseError function receives a 'hash' object with these members for lexer and parser errors: {
1184 text: (matched text)
1185 token: (the produced terminal token, if any)
1186 line: (yylineno)
1187 }
1188 while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
1189 loc: (yylloc)
1190 expected: (string describing the set of expected tokens)
1191 recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
1192 }
1193*/
1194var parser = function () {
1195 var o = function (k, v, o, l) {
1196 for (o = o || {}, l = k.length; l--; o[k[l]] = v);
1197
1198 return o;
1199 },
1200 $V0 = [1, 11],
1201 $V1 = [1, 12],
1202 $V2 = [1, 13],
1203 $V3 = [1, 15],
1204 $V4 = [1, 16],
1205 $V5 = [1, 17],
1206 $V6 = [6, 8],
1207 $V7 = [1, 26],
1208 $V8 = [1, 27],
1209 $V9 = [1, 28],
1210 $Va = [1, 29],
1211 $Vb = [1, 30],
1212 $Vc = [1, 31],
1213 $Vd = [6, 8, 13, 17, 23, 26, 27, 28, 29, 30, 31],
1214 $Ve = [6, 8, 13, 17, 23, 26, 27, 28, 29, 30, 31, 45, 46, 47],
1215 $Vf = [23, 45, 46, 47],
1216 $Vg = [23, 30, 31, 45, 46, 47],
1217 $Vh = [23, 26, 27, 28, 29, 45, 46, 47],
1218 $Vi = [6, 8, 13],
1219 $Vj = [1, 46];
1220
1221 var parser = {
1222 trace: function trace() {},
1223 yy: {},
1224 symbols_: {
1225 "error": 2,
1226 "mermaidDoc": 3,
1227 "graphConfig": 4,
1228 "CLASS_DIAGRAM": 5,
1229 "NEWLINE": 6,
1230 "statements": 7,
1231 "EOF": 8,
1232 "statement": 9,
1233 "className": 10,
1234 "alphaNumToken": 11,
1235 "relationStatement": 12,
1236 "LABEL": 13,
1237 "classStatement": 14,
1238 "methodStatement": 15,
1239 "CLASS": 16,
1240 "STRUCT_START": 17,
1241 "members": 18,
1242 "STRUCT_STOP": 19,
1243 "MEMBER": 20,
1244 "SEPARATOR": 21,
1245 "relation": 22,
1246 "STR": 23,
1247 "relationType": 24,
1248 "lineType": 25,
1249 "AGGREGATION": 26,
1250 "EXTENSION": 27,
1251 "COMPOSITION": 28,
1252 "DEPENDENCY": 29,
1253 "LINE": 30,
1254 "DOTTED_LINE": 31,
1255 "commentToken": 32,
1256 "textToken": 33,
1257 "graphCodeTokens": 34,
1258 "textNoTagsToken": 35,
1259 "TAGSTART": 36,
1260 "TAGEND": 37,
1261 "==": 38,
1262 "--": 39,
1263 "PCT": 40,
1264 "DEFAULT": 41,
1265 "SPACE": 42,
1266 "MINUS": 43,
1267 "keywords": 44,
1268 "UNICODE_TEXT": 45,
1269 "NUM": 46,
1270 "ALPHA": 47,
1271 "$accept": 0,
1272 "$end": 1
1273 },
1274 terminals_: {
1275 2: "error",
1276 5: "CLASS_DIAGRAM",
1277 6: "NEWLINE",
1278 8: "EOF",
1279 13: "LABEL",
1280 16: "CLASS",
1281 17: "STRUCT_START",
1282 19: "STRUCT_STOP",
1283 20: "MEMBER",
1284 21: "SEPARATOR",
1285 23: "STR",
1286 26: "AGGREGATION",
1287 27: "EXTENSION",
1288 28: "COMPOSITION",
1289 29: "DEPENDENCY",
1290 30: "LINE",
1291 31: "DOTTED_LINE",
1292 34: "graphCodeTokens",
1293 36: "TAGSTART",
1294 37: "TAGEND",
1295 38: "==",
1296 39: "--",
1297 40: "PCT",
1298 41: "DEFAULT",
1299 42: "SPACE",
1300 43: "MINUS",
1301 44: "keywords",
1302 45: "UNICODE_TEXT",
1303 46: "NUM",
1304 47: "ALPHA"
1305 },
1306 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]],
1307 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate
1308 /* action[1] */
1309 , $$
1310 /* vstack */
1311 , _$
1312 /* lstack */
1313 ) {
1314 /* this == yyval */
1315 var $0 = $$.length - 1;
1316
1317 switch (yystate) {
1318 case 6:
1319 this.$ = $$[$0 - 1] + $$[$0];
1320 break;
1321
1322 case 7:
1323 this.$ = $$[$0];
1324 break;
1325
1326 case 8:
1327 yy.addRelation($$[$0]);
1328 break;
1329
1330 case 9:
1331 $$[$0 - 1].title = yy.cleanupLabel($$[$0]);
1332 yy.addRelation($$[$0 - 1]);
1333 break;
1334
1335 case 12:
1336 yy.addClass($$[$0]);
1337 break;
1338
1339 case 13:
1340 /*console.log($$[$0-3],JSON.stringify($$[$0-1]));*/
1341 yy.addClass($$[$0 - 3]);
1342 yy.addMembers($$[$0 - 3], $$[$0 - 1]);
1343 break;
1344
1345 case 14:
1346 this.$ = [$$[$0]];
1347 break;
1348
1349 case 15:
1350 $$[$0].push($$[$0 - 1]);
1351 this.$ = $$[$0];
1352 break;
1353
1354 case 16:
1355 /*console.log('Rel found',$$[$0]);*/
1356 break;
1357
1358 case 17:
1359 yy.addMember($$[$0 - 1], yy.cleanupLabel($$[$0]));
1360 break;
1361
1362 case 18:
1363 console.warn('Member', $$[$0]);
1364 break;
1365
1366 case 19:
1367 /*console.log('sep found',$$[$0]);*/
1368 break;
1369
1370 case 20:
1371 this.$ = {
1372 'id1': $$[$0 - 2],
1373 'id2': $$[$0],
1374 relation: $$[$0 - 1],
1375 relationTitle1: 'none',
1376 relationTitle2: 'none'
1377 };
1378 break;
1379
1380 case 21:
1381 this.$ = {
1382 id1: $$[$0 - 3],
1383 id2: $$[$0],
1384 relation: $$[$0 - 1],
1385 relationTitle1: $$[$0 - 2],
1386 relationTitle2: 'none'
1387 };
1388 break;
1389
1390 case 22:
1391 this.$ = {
1392 id1: $$[$0 - 3],
1393 id2: $$[$0],
1394 relation: $$[$0 - 2],
1395 relationTitle1: 'none',
1396 relationTitle2: $$[$0 - 1]
1397 };
1398 break;
1399
1400 case 23:
1401 this.$ = {
1402 id1: $$[$0 - 4],
1403 id2: $$[$0],
1404 relation: $$[$0 - 2],
1405 relationTitle1: $$[$0 - 3],
1406 relationTitle2: $$[$0 - 1]
1407 };
1408 break;
1409
1410 case 24:
1411 this.$ = {
1412 type1: $$[$0 - 2],
1413 type2: $$[$0],
1414 lineType: $$[$0 - 1]
1415 };
1416 break;
1417
1418 case 25:
1419 this.$ = {
1420 type1: 'none',
1421 type2: $$[$0],
1422 lineType: $$[$0 - 1]
1423 };
1424 break;
1425
1426 case 26:
1427 this.$ = {
1428 type1: $$[$0 - 1],
1429 type2: 'none',
1430 lineType: $$[$0]
1431 };
1432 break;
1433
1434 case 27:
1435 this.$ = {
1436 type1: 'none',
1437 type2: 'none',
1438 lineType: $$[$0]
1439 };
1440 break;
1441
1442 case 28:
1443 this.$ = yy.relationType.AGGREGATION;
1444 break;
1445
1446 case 29:
1447 this.$ = yy.relationType.EXTENSION;
1448 break;
1449
1450 case 30:
1451 this.$ = yy.relationType.COMPOSITION;
1452 break;
1453
1454 case 31:
1455 this.$ = yy.relationType.DEPENDENCY;
1456 break;
1457
1458 case 32:
1459 this.$ = yy.lineType.LINE;
1460 break;
1461
1462 case 33:
1463 this.$ = yy.lineType.DOTTED_LINE;
1464 break;
1465 }
1466 },
1467 table: [{
1468 3: 1,
1469 4: 2,
1470 5: [1, 3]
1471 }, {
1472 1: [3]
1473 }, {
1474 1: [2, 1]
1475 }, {
1476 6: [1, 4]
1477 }, {
1478 7: 5,
1479 9: 6,
1480 10: 10,
1481 11: 14,
1482 12: 7,
1483 14: 8,
1484 15: 9,
1485 16: $V0,
1486 20: $V1,
1487 21: $V2,
1488 45: $V3,
1489 46: $V4,
1490 47: $V5
1491 }, {
1492 8: [1, 18]
1493 }, {
1494 6: [1, 19],
1495 8: [2, 3]
1496 }, o($V6, [2, 8], {
1497 13: [1, 20]
1498 }), o($V6, [2, 10]), o($V6, [2, 11]), o($V6, [2, 16], {
1499 22: 21,
1500 24: 24,
1501 25: 25,
1502 13: [1, 23],
1503 23: [1, 22],
1504 26: $V7,
1505 27: $V8,
1506 28: $V9,
1507 29: $Va,
1508 30: $Vb,
1509 31: $Vc
1510 }), {
1511 10: 32,
1512 11: 14,
1513 45: $V3,
1514 46: $V4,
1515 47: $V5
1516 }, o($V6, [2, 18]), o($V6, [2, 19]), o($Vd, [2, 7], {
1517 11: 14,
1518 10: 33,
1519 45: $V3,
1520 46: $V4,
1521 47: $V5
1522 }), o($Ve, [2, 47]), o($Ve, [2, 48]), o($Ve, [2, 49]), {
1523 1: [2, 2]
1524 }, {
1525 7: 34,
1526 8: [2, 4],
1527 9: 6,
1528 10: 10,
1529 11: 14,
1530 12: 7,
1531 14: 8,
1532 15: 9,
1533 16: $V0,
1534 20: $V1,
1535 21: $V2,
1536 45: $V3,
1537 46: $V4,
1538 47: $V5
1539 }, o($V6, [2, 9]), {
1540 10: 35,
1541 11: 14,
1542 23: [1, 36],
1543 45: $V3,
1544 46: $V4,
1545 47: $V5
1546 }, {
1547 22: 37,
1548 24: 24,
1549 25: 25,
1550 26: $V7,
1551 27: $V8,
1552 28: $V9,
1553 29: $Va,
1554 30: $Vb,
1555 31: $Vc
1556 }, o($V6, [2, 17]), {
1557 25: 38,
1558 30: $Vb,
1559 31: $Vc
1560 }, o($Vf, [2, 27], {
1561 24: 39,
1562 26: $V7,
1563 27: $V8,
1564 28: $V9,
1565 29: $Va
1566 }), 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], {
1567 17: [1, 40]
1568 }), o($Vd, [2, 6]), {
1569 8: [2, 5]
1570 }, o($Vi, [2, 20]), {
1571 10: 41,
1572 11: 14,
1573 45: $V3,
1574 46: $V4,
1575 47: $V5
1576 }, {
1577 10: 42,
1578 11: 14,
1579 23: [1, 43],
1580 45: $V3,
1581 46: $V4,
1582 47: $V5
1583 }, o($Vf, [2, 26], {
1584 24: 44,
1585 26: $V7,
1586 27: $V8,
1587 28: $V9,
1588 29: $Va
1589 }), o($Vf, [2, 25]), {
1590 18: 45,
1591 20: $Vj
1592 }, o($Vi, [2, 22]), o($Vi, [2, 21]), {
1593 10: 47,
1594 11: 14,
1595 45: $V3,
1596 46: $V4,
1597 47: $V5
1598 }, o($Vf, [2, 24]), {
1599 19: [1, 48]
1600 }, {
1601 18: 49,
1602 19: [2, 14],
1603 20: $Vj
1604 }, o($Vi, [2, 23]), o($V6, [2, 13]), {
1605 19: [2, 15]
1606 }],
1607 defaultActions: {
1608 2: [2, 1],
1609 18: [2, 2],
1610 34: [2, 5],
1611 49: [2, 15]
1612 },
1613 parseError: function parseError(str, hash) {
1614 if (hash.recoverable) {
1615 this.trace(str);
1616 } else {
1617 var error = new Error(str);
1618 error.hash = hash;
1619 throw error;
1620 }
1621 },
1622 parse: function parse(input) {
1623 var self = this,
1624 stack = [0],
1625 tstack = [],
1626 vstack = [null],
1627 lstack = [],
1628 table = this.table,
1629 yytext = '',
1630 yylineno = 0,
1631 yyleng = 0,
1632 recovering = 0,
1633 TERROR = 2,
1634 EOF = 1;
1635 var args = lstack.slice.call(arguments, 1);
1636 var lexer = Object.create(this.lexer);
1637 var sharedState = {
1638 yy: {}
1639 };
1640
1641 for (var k in this.yy) {
1642 if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
1643 sharedState.yy[k] = this.yy[k];
1644 }
1645 }
1646
1647 lexer.setInput(input, sharedState.yy);
1648 sharedState.yy.lexer = lexer;
1649 sharedState.yy.parser = this;
1650
1651 if (typeof lexer.yylloc == 'undefined') {
1652 lexer.yylloc = {};
1653 }
1654
1655 var yyloc = lexer.yylloc;
1656 lstack.push(yyloc);
1657 var ranges = lexer.options && lexer.options.ranges;
1658
1659 if (typeof sharedState.yy.parseError === 'function') {
1660 this.parseError = sharedState.yy.parseError;
1661 } else {
1662 this.parseError = Object.getPrototypeOf(this).parseError;
1663 }
1664
1665 function popStack(n) {
1666 stack.length = stack.length - 2 * n;
1667 vstack.length = vstack.length - n;
1668 lstack.length = lstack.length - n;
1669 }
1670
1671 function lex() {
1672 var token;
1673 token = tstack.pop() || lexer.lex() || EOF;
1674
1675 if (typeof token !== 'number') {
1676 if (token instanceof Array) {
1677 tstack = token;
1678 token = tstack.pop();
1679 }
1680
1681 token = self.symbols_[token] || token;
1682 }
1683
1684 return token;
1685 }
1686
1687 var symbol,
1688 preErrorSymbol,
1689 state,
1690 action,
1691 a,
1692 r,
1693 yyval = {},
1694 p,
1695 len,
1696 newState,
1697 expected;
1698
1699 while (true) {
1700 state = stack[stack.length - 1];
1701
1702 if (this.defaultActions[state]) {
1703 action = this.defaultActions[state];
1704 } else {
1705 if (symbol === null || typeof symbol == 'undefined') {
1706 symbol = lex();
1707 }
1708
1709 action = table[state] && table[state][symbol];
1710 }
1711
1712 if (typeof action === 'undefined' || !action.length || !action[0]) {
1713 var errStr = '';
1714 expected = [];
1715
1716 for (p in table[state]) {
1717 if (this.terminals_[p] && p > TERROR) {
1718 expected.push('\'' + this.terminals_[p] + '\'');
1719 }
1720 }
1721
1722 if (lexer.showPosition) {
1723 errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
1724 } else {
1725 errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
1726 }
1727
1728 this.parseError(errStr, {
1729 text: lexer.match,
1730 token: this.terminals_[symbol] || symbol,
1731 line: lexer.yylineno,
1732 loc: yyloc,
1733 expected: expected
1734 });
1735 }
1736
1737 if (action[0] instanceof Array && action.length > 1) {
1738 throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
1739 }
1740
1741 switch (action[0]) {
1742 case 1:
1743 stack.push(symbol);
1744 vstack.push(lexer.yytext);
1745 lstack.push(lexer.yylloc);
1746 stack.push(action[1]);
1747 symbol = null;
1748
1749 if (!preErrorSymbol) {
1750 yyleng = lexer.yyleng;
1751 yytext = lexer.yytext;
1752 yylineno = lexer.yylineno;
1753 yyloc = lexer.yylloc;
1754
1755 if (recovering > 0) {
1756 recovering--;
1757 }
1758 } else {
1759 symbol = preErrorSymbol;
1760 preErrorSymbol = null;
1761 }
1762
1763 break;
1764
1765 case 2:
1766 len = this.productions_[action[1]][1];
1767 yyval.$ = vstack[vstack.length - len];
1768 yyval._$ = {
1769 first_line: lstack[lstack.length - (len || 1)].first_line,
1770 last_line: lstack[lstack.length - 1].last_line,
1771 first_column: lstack[lstack.length - (len || 1)].first_column,
1772 last_column: lstack[lstack.length - 1].last_column
1773 };
1774
1775 if (ranges) {
1776 yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
1777 }
1778
1779 r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));
1780
1781 if (typeof r !== 'undefined') {
1782 return r;
1783 }
1784
1785 if (len) {
1786 stack = stack.slice(0, -1 * len * 2);
1787 vstack = vstack.slice(0, -1 * len);
1788 lstack = lstack.slice(0, -1 * len);
1789 }
1790
1791 stack.push(this.productions_[action[1]][0]);
1792 vstack.push(yyval.$);
1793 lstack.push(yyval._$);
1794 newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
1795 stack.push(newState);
1796 break;
1797
1798 case 3:
1799 return true;
1800 }
1801 }
1802
1803 return true;
1804 }
1805 };
1806 /* generated by jison-lex 0.3.4 */
1807
1808 var lexer = function () {
1809 var lexer = {
1810 EOF: 1,
1811 parseError: function parseError(str, hash) {
1812 if (this.yy.parser) {
1813 this.yy.parser.parseError(str, hash);
1814 } else {
1815 throw new Error(str);
1816 }
1817 },
1818 // resets the lexer, sets new input
1819 setInput: function (input, yy) {
1820 this.yy = yy || this.yy || {};
1821 this._input = input;
1822 this._more = this._backtrack = this.done = false;
1823 this.yylineno = this.yyleng = 0;
1824 this.yytext = this.matched = this.match = '';
1825 this.conditionStack = ['INITIAL'];
1826 this.yylloc = {
1827 first_line: 1,
1828 first_column: 0,
1829 last_line: 1,
1830 last_column: 0
1831 };
1832
1833 if (this.options.ranges) {
1834 this.yylloc.range = [0, 0];
1835 }
1836
1837 this.offset = 0;
1838 return this;
1839 },
1840 // consumes and returns one char from the input
1841 input: function () {
1842 var ch = this._input[0];
1843 this.yytext += ch;
1844 this.yyleng++;
1845 this.offset++;
1846 this.match += ch;
1847 this.matched += ch;
1848 var lines = ch.match(/(?:\r\n?|\n).*/g);
1849
1850 if (lines) {
1851 this.yylineno++;
1852 this.yylloc.last_line++;
1853 } else {
1854 this.yylloc.last_column++;
1855 }
1856
1857 if (this.options.ranges) {
1858 this.yylloc.range[1]++;
1859 }
1860
1861 this._input = this._input.slice(1);
1862 return ch;
1863 },
1864 // unshifts one char (or a string) into the input
1865 unput: function (ch) {
1866 var len = ch.length;
1867 var lines = ch.split(/(?:\r\n?|\n)/g);
1868 this._input = ch + this._input;
1869 this.yytext = this.yytext.substr(0, this.yytext.length - len); //this.yyleng -= len;
1870
1871 this.offset -= len;
1872 var oldLines = this.match.split(/(?:\r\n?|\n)/g);
1873 this.match = this.match.substr(0, this.match.length - 1);
1874 this.matched = this.matched.substr(0, this.matched.length - 1);
1875
1876 if (lines.length - 1) {
1877 this.yylineno -= lines.length - 1;
1878 }
1879
1880 var r = this.yylloc.range;
1881 this.yylloc = {
1882 first_line: this.yylloc.first_line,
1883 last_line: this.yylineno + 1,
1884 first_column: this.yylloc.first_column,
1885 last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
1886 };
1887
1888 if (this.options.ranges) {
1889 this.yylloc.range = [r[0], r[0] + this.yyleng - len];
1890 }
1891
1892 this.yyleng = this.yytext.length;
1893 return this;
1894 },
1895 // When called from action, caches matched text and appends it on next action
1896 more: function () {
1897 this._more = true;
1898 return this;
1899 },
1900 // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
1901 reject: function () {
1902 if (this.options.backtrack_lexer) {
1903 this._backtrack = true;
1904 } else {
1905 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(), {
1906 text: "",
1907 token: null,
1908 line: this.yylineno
1909 });
1910 }
1911
1912 return this;
1913 },
1914 // retain first n characters of the match
1915 less: function (n) {
1916 this.unput(this.match.slice(n));
1917 },
1918 // displays already matched input, i.e. for error messages
1919 pastInput: function () {
1920 var past = this.matched.substr(0, this.matched.length - this.match.length);
1921 return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
1922 },
1923 // displays upcoming input, i.e. for error messages
1924 upcomingInput: function () {
1925 var next = this.match;
1926
1927 if (next.length < 20) {
1928 next += this._input.substr(0, 20 - next.length);
1929 }
1930
1931 return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
1932 },
1933 // displays the character position where the lexing error occurred, i.e. for error messages
1934 showPosition: function () {
1935 var pre = this.pastInput();
1936 var c = new Array(pre.length + 1).join("-");
1937 return pre + this.upcomingInput() + "\n" + c + "^";
1938 },
1939 // test the lexed token: return FALSE when not a match, otherwise return token
1940 test_match: function (match, indexed_rule) {
1941 var token, lines, backup;
1942
1943 if (this.options.backtrack_lexer) {
1944 // save context
1945 backup = {
1946 yylineno: this.yylineno,
1947 yylloc: {
1948 first_line: this.yylloc.first_line,
1949 last_line: this.last_line,
1950 first_column: this.yylloc.first_column,
1951 last_column: this.yylloc.last_column
1952 },
1953 yytext: this.yytext,
1954 match: this.match,
1955 matches: this.matches,
1956 matched: this.matched,
1957 yyleng: this.yyleng,
1958 offset: this.offset,
1959 _more: this._more,
1960 _input: this._input,
1961 yy: this.yy,
1962 conditionStack: this.conditionStack.slice(0),
1963 done: this.done
1964 };
1965
1966 if (this.options.ranges) {
1967 backup.yylloc.range = this.yylloc.range.slice(0);
1968 }
1969 }
1970
1971 lines = match[0].match(/(?:\r\n?|\n).*/g);
1972
1973 if (lines) {
1974 this.yylineno += lines.length;
1975 }
1976
1977 this.yylloc = {
1978 first_line: this.yylloc.last_line,
1979 last_line: this.yylineno + 1,
1980 first_column: this.yylloc.last_column,
1981 last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
1982 };
1983 this.yytext += match[0];
1984 this.match += match[0];
1985 this.matches = match;
1986 this.yyleng = this.yytext.length;
1987
1988 if (this.options.ranges) {
1989 this.yylloc.range = [this.offset, this.offset += this.yyleng];
1990 }
1991
1992 this._more = false;
1993 this._backtrack = false;
1994 this._input = this._input.slice(match[0].length);
1995 this.matched += match[0];
1996 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
1997
1998 if (this.done && this._input) {
1999 this.done = false;
2000 }
2001
2002 if (token) {
2003 return token;
2004 } else if (this._backtrack) {
2005 // recover context
2006 for (var k in backup) {
2007 this[k] = backup[k];
2008 }
2009
2010 return false; // rule action called reject() implying the next rule should be tested instead.
2011 }
2012
2013 return false;
2014 },
2015 // return next match in input
2016 next: function () {
2017 if (this.done) {
2018 return this.EOF;
2019 }
2020
2021 if (!this._input) {
2022 this.done = true;
2023 }
2024
2025 var token, match, tempMatch, index;
2026
2027 if (!this._more) {
2028 this.yytext = '';
2029 this.match = '';
2030 }
2031
2032 var rules = this._currentRules();
2033
2034 for (var i = 0; i < rules.length; i++) {
2035 tempMatch = this._input.match(this.rules[rules[i]]);
2036
2037 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
2038 match = tempMatch;
2039 index = i;
2040
2041 if (this.options.backtrack_lexer) {
2042 token = this.test_match(tempMatch, rules[i]);
2043
2044 if (token !== false) {
2045 return token;
2046 } else if (this._backtrack) {
2047 match = false;
2048 continue; // rule action called reject() implying a rule MISmatch.
2049 } else {
2050 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
2051 return false;
2052 }
2053 } else if (!this.options.flex) {
2054 break;
2055 }
2056 }
2057 }
2058
2059 if (match) {
2060 token = this.test_match(match, rules[index]);
2061
2062 if (token !== false) {
2063 return token;
2064 } // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
2065
2066
2067 return false;
2068 }
2069
2070 if (this._input === "") {
2071 return this.EOF;
2072 } else {
2073 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
2074 text: "",
2075 token: null,
2076 line: this.yylineno
2077 });
2078 }
2079 },
2080 // return next match that has a token
2081 lex: function lex() {
2082 var r = this.next();
2083
2084 if (r) {
2085 return r;
2086 } else {
2087 return this.lex();
2088 }
2089 },
2090 // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
2091 begin: function begin(condition) {
2092 this.conditionStack.push(condition);
2093 },
2094 // pop the previously active lexer condition state off the condition stack
2095 popState: function popState() {
2096 var n = this.conditionStack.length - 1;
2097
2098 if (n > 0) {
2099 return this.conditionStack.pop();
2100 } else {
2101 return this.conditionStack[0];
2102 }
2103 },
2104 // produce the lexer rule set which is active for the currently active lexer condition state
2105 _currentRules: function _currentRules() {
2106 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
2107 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
2108 } else {
2109 return this.conditions["INITIAL"].rules;
2110 }
2111 },
2112 // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
2113 topState: function topState(n) {
2114 n = this.conditionStack.length - 1 - Math.abs(n || 0);
2115
2116 if (n >= 0) {
2117 return this.conditionStack[n];
2118 } else {
2119 return "INITIAL";
2120 }
2121 },
2122 // alias for begin(condition)
2123 pushState: function pushState(condition) {
2124 this.begin(condition);
2125 },
2126 // return the number of states currently on the stack
2127 stateStackSize: function stateStackSize() {
2128 return this.conditionStack.length;
2129 },
2130 options: {},
2131 performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
2132 var YYSTATE = YY_START;
2133
2134 switch ($avoiding_name_collisions) {
2135 case 0:
2136 /* do nothing */
2137 break;
2138
2139 case 1:
2140 return 6;
2141 break;
2142
2143 case 2:
2144 /* skip whitespace */
2145 break;
2146
2147 case 3:
2148 return 5;
2149 break;
2150
2151 case 4:
2152 this.begin("struct");
2153 /*console.log('Starting struct');*/
2154
2155 return 17;
2156 break;
2157
2158 case 5:
2159 /*console.log('Ending struct');*/
2160 this.popState();
2161 return 19;
2162 break;
2163
2164 case 6:
2165 /* nothing */
2166 break;
2167
2168 case 7:
2169 /*console.log('lex-member: ' + yy_.yytext);*/
2170 return "MEMBER";
2171 break;
2172
2173 case 8:
2174 return 16;
2175 break;
2176
2177 case 9:
2178 this.begin("string");
2179 break;
2180
2181 case 10:
2182 this.popState();
2183 break;
2184
2185 case 11:
2186 return "STR";
2187 break;
2188
2189 case 12:
2190 return 27;
2191 break;
2192
2193 case 13:
2194 return 27;
2195 break;
2196
2197 case 14:
2198 return 29;
2199 break;
2200
2201 case 15:
2202 return 29;
2203 break;
2204
2205 case 16:
2206 return 28;
2207 break;
2208
2209 case 17:
2210 return 26;
2211 break;
2212
2213 case 18:
2214 return 30;
2215 break;
2216
2217 case 19:
2218 return 31;
2219 break;
2220
2221 case 20:
2222 return 13;
2223 break;
2224
2225 case 21:
2226 return 43;
2227 break;
2228
2229 case 22:
2230 return 'DOT';
2231 break;
2232
2233 case 23:
2234 return 'PLUS';
2235 break;
2236
2237 case 24:
2238 return 40;
2239 break;
2240
2241 case 25:
2242 return 'EQUALS';
2243 break;
2244
2245 case 26:
2246 return 'EQUALS';
2247 break;
2248
2249 case 27:
2250 return 47;
2251 break;
2252
2253 case 28:
2254 return 'PUNCTUATION';
2255 break;
2256
2257 case 29:
2258 return 46;
2259 break;
2260
2261 case 30:
2262 return 45;
2263 break;
2264
2265 case 31:
2266 return 42;
2267 break;
2268
2269 case 32:
2270 return 8;
2271 break;
2272 }
2273 },
2274 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)/, /^(?:$)/],
2275 conditions: {
2276 "string": {
2277 "rules": [10, 11],
2278 "inclusive": false
2279 },
2280 "struct": {
2281 "rules": [5, 6, 7],
2282 "inclusive": false
2283 },
2284 "INITIAL": {
2285 "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],
2286 "inclusive": true
2287 }
2288 }
2289 };
2290 return lexer;
2291 }();
2292
2293 parser.lexer = lexer;
2294
2295 function Parser() {
2296 this.yy = {};
2297 }
2298
2299 Parser.prototype = parser;
2300 parser.Parser = Parser;
2301 return new Parser();
2302}();
2303
2304if (true) {
2305 exports.parser = parser;
2306 exports.Parser = parser.Parser;
2307
2308 exports.parse = function () {
2309 return parser.parse.apply(parser, arguments);
2310 };
2311
2312 exports.main = function commonjsMain(args) {
2313 if (!args[1]) {
2314 console.log('Usage: ' + args[0] + ' FILE');
2315 process.exit(1);
2316 }
2317
2318 var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
2319
2320 return exports.parser.parse(source);
2321 };
2322
2323 if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
2324 exports.main(process.argv.slice(1));
2325 }
2326}
2327/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
2328
2329/***/ }),
2330
2331/***/ "./src/diagrams/flowchart/flowDb.js":
2332/*!******************************************!*\
2333 !*** ./src/diagrams/flowchart/flowDb.js ***!
2334 \******************************************/
2335/*! exports provided: addVertex, addLink, updateLinkInterpolate, updateLink, addClass, setDirection, setClass, setLink, getTooltip, setClickEvent, bindFunctions, getDirection, getVertices, getEdges, getClasses, clear, defaultStyle, addSubGraph, getDepthFirstPos, indexNodes, getSubGraphs, default */
2336/***/ (function(module, __webpack_exports__, __webpack_require__) {
2337
2338"use strict";
2339__webpack_require__.r(__webpack_exports__);
2340/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addVertex", function() { return addVertex; });
2341/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addLink", function() { return addLink; });
2342/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateLinkInterpolate", function() { return updateLinkInterpolate; });
2343/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateLink", function() { return updateLink; });
2344/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addClass", function() { return addClass; });
2345/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDirection", function() { return setDirection; });
2346/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setClass", function() { return setClass; });
2347/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLink", function() { return setLink; });
2348/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTooltip", function() { return getTooltip; });
2349/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setClickEvent", function() { return setClickEvent; });
2350/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindFunctions", function() { return bindFunctions; });
2351/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDirection", function() { return getDirection; });
2352/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getVertices", function() { return getVertices; });
2353/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getEdges", function() { return getEdges; });
2354/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClasses", function() { return getClasses; });
2355/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
2356/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultStyle", function() { return defaultStyle; });
2357/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addSubGraph", function() { return addSubGraph; });
2358/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDepthFirstPos", function() { return getDepthFirstPos; });
2359/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "indexNodes", function() { return indexNodes; });
2360/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSubGraphs", function() { return getSubGraphs; });
2361/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
2362/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
2363/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
2364/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ "./src/utils.js");
2365
2366
2367
2368let vertices = {};
2369let edges = [];
2370let classes = [];
2371let subGraphs = [];
2372let subGraphLookup = {};
2373let tooltips = {};
2374let subCount = 0;
2375let direction; // Functions to be run after graph rendering
2376
2377let funs = [];
2378/**
2379 * Function called by parser when a node definition has been found
2380 * @param id
2381 * @param text
2382 * @param type
2383 * @param style
2384 * @param classes
2385 */
2386
2387const addVertex = function (id, text, type, style, classes) {
2388 let txt;
2389
2390 if (typeof id === 'undefined') {
2391 return;
2392 }
2393
2394 if (id.trim().length === 0) {
2395 return;
2396 }
2397
2398 if (typeof vertices[id] === 'undefined') {
2399 vertices[id] = {
2400 id: id,
2401 styles: [],
2402 classes: []
2403 };
2404 }
2405
2406 if (typeof text !== 'undefined') {
2407 txt = text.trim(); // strip quotes if string starts and exnds with a quote
2408
2409 if (txt[0] === '"' && txt[txt.length - 1] === '"') {
2410 txt = txt.substring(1, txt.length - 1);
2411 }
2412
2413 vertices[id].text = txt;
2414 }
2415
2416 if (typeof type !== 'undefined') {
2417 vertices[id].type = type;
2418 }
2419
2420 if (typeof style !== 'undefined') {
2421 if (style !== null) {
2422 style.forEach(function (s) {
2423 vertices[id].styles.push(s);
2424 });
2425 }
2426 }
2427
2428 if (typeof classes !== 'undefined') {
2429 if (classes !== null) {
2430 classes.forEach(function (s) {
2431 vertices[id].classes.push(s);
2432 });
2433 }
2434 }
2435};
2436/**
2437 * Function called by parser when a link/edge definition has been found
2438 * @param start
2439 * @param end
2440 * @param type
2441 * @param linktext
2442 */
2443
2444const addLink = function (start, end, type, linktext) {
2445 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].info('Got edge...', start, end);
2446 const edge = {
2447 start: start,
2448 end: end,
2449 type: undefined,
2450 text: ''
2451 };
2452 linktext = type.text;
2453
2454 if (typeof linktext !== 'undefined') {
2455 edge.text = linktext.trim(); // strip quotes if string starts and exnds with a quote
2456
2457 if (edge.text[0] === '"' && edge.text[edge.text.length - 1] === '"') {
2458 edge.text = edge.text.substring(1, edge.text.length - 1);
2459 }
2460 }
2461
2462 if (typeof type !== 'undefined') {
2463 edge.type = type.type;
2464 edge.stroke = type.stroke;
2465 }
2466
2467 edges.push(edge);
2468};
2469/**
2470 * Updates a link's line interpolation algorithm
2471 * @param pos
2472 * @param interpolate
2473 */
2474
2475const updateLinkInterpolate = function (positions, interp) {
2476 positions.forEach(function (pos) {
2477 if (pos === 'default') {
2478 edges.defaultInterpolate = interp;
2479 } else {
2480 edges[pos].interpolate = interp;
2481 }
2482 });
2483};
2484/**
2485 * Updates a link with a style
2486 * @param pos
2487 * @param style
2488 */
2489
2490const updateLink = function (positions, style) {
2491 positions.forEach(function (pos) {
2492 if (pos === 'default') {
2493 edges.defaultStyle = style;
2494 } else {
2495 if (_utils__WEBPACK_IMPORTED_MODULE_2__["default"].isSubstringInArray('fill', style) === -1) {
2496 style.push('fill:none');
2497 }
2498
2499 edges[pos].style = style;
2500 }
2501 });
2502};
2503const addClass = function (id, style) {
2504 if (typeof classes[id] === 'undefined') {
2505 classes[id] = {
2506 id: id,
2507 styles: []
2508 };
2509 }
2510
2511 if (typeof style !== 'undefined') {
2512 if (style !== null) {
2513 style.forEach(function (s) {
2514 classes[id].styles.push(s);
2515 });
2516 }
2517 }
2518};
2519/**
2520 * Called by parser when a graph definition is found, stores the direction of the chart.
2521 * @param dir
2522 */
2523
2524const setDirection = function (dir) {
2525 direction = dir;
2526};
2527/**
2528 * Called by parser when a special node is found, e.g. a clickable element.
2529 * @param ids Comma separated list of ids
2530 * @param className Class to add
2531 */
2532
2533const setClass = function (ids, className) {
2534 ids.split(',').forEach(function (id) {
2535 if (typeof vertices[id] !== 'undefined') {
2536 vertices[id].classes.push(className);
2537 }
2538
2539 if (typeof subGraphLookup[id] !== 'undefined') {
2540 subGraphLookup[id].classes.push(className);
2541 }
2542 });
2543};
2544
2545const setTooltip = function (ids, tooltip) {
2546 ids.split(',').forEach(function (id) {
2547 if (typeof tooltip !== 'undefined') {
2548 tooltips[id] = tooltip;
2549 }
2550 });
2551};
2552
2553const setClickFun = function (id, functionName) {
2554 if (typeof functionName === 'undefined') {
2555 return;
2556 }
2557
2558 if (typeof vertices[id] !== 'undefined') {
2559 funs.push(function (element) {
2560 const elem = d3__WEBPACK_IMPORTED_MODULE_0__["select"](element).select(`[id="${id}"]`);
2561
2562 if (elem !== null) {
2563 elem.on('click', function () {
2564 window[functionName](id);
2565 });
2566 }
2567 });
2568 }
2569};
2570/**
2571 * Called by parser when a link is found. Adds the URL to the vertex data.
2572 * @param ids Comma separated list of ids
2573 * @param linkStr URL to create a link for
2574 * @param tooltip Tooltip for the clickable element
2575 */
2576
2577
2578const setLink = function (ids, linkStr, tooltip) {
2579 ids.split(',').forEach(function (id) {
2580 if (typeof vertices[id] !== 'undefined') {
2581 vertices[id].link = linkStr;
2582 }
2583 });
2584 setTooltip(ids, tooltip);
2585 setClass(ids, 'clickable');
2586};
2587const getTooltip = function (id) {
2588 return tooltips[id];
2589};
2590/**
2591 * Called by parser when a click definition is found. Registers an event handler.
2592 * @param ids Comma separated list of ids
2593 * @param functionName Function to be called on click
2594 * @param tooltip Tooltip for the clickable element
2595 */
2596
2597const setClickEvent = function (ids, functionName, tooltip) {
2598 ids.split(',').forEach(function (id) {
2599 setClickFun(id, functionName);
2600 });
2601 setTooltip(ids, tooltip);
2602 setClass(ids, 'clickable');
2603};
2604const bindFunctions = function (element) {
2605 funs.forEach(function (fun) {
2606 fun(element);
2607 });
2608};
2609const getDirection = function () {
2610 return direction;
2611};
2612/**
2613 * Retrieval function for fetching the found nodes after parsing has completed.
2614 * @returns {{}|*|vertices}
2615 */
2616
2617const getVertices = function () {
2618 return vertices;
2619};
2620/**
2621 * Retrieval function for fetching the found links after parsing has completed.
2622 * @returns {{}|*|edges}
2623 */
2624
2625const getEdges = function () {
2626 return edges;
2627};
2628/**
2629 * Retrieval function for fetching the found class definitions after parsing has completed.
2630 * @returns {{}|*|classes}
2631 */
2632
2633const getClasses = function () {
2634 return classes;
2635};
2636
2637const setupToolTips = function (element) {
2638 let tooltipElem = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('.mermaidTooltip');
2639
2640 if ((tooltipElem._groups || tooltipElem)[0][0] === null) {
2641 tooltipElem = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('body').append('div').attr('class', 'mermaidTooltip').style('opacity', 0);
2642 }
2643
2644 const svg = d3__WEBPACK_IMPORTED_MODULE_0__["select"](element).select('svg');
2645 const nodes = svg.selectAll('g.node');
2646 nodes.on('mouseover', function () {
2647 const el = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this);
2648 const title = el.attr('title'); // Dont try to draw a tooltip if no data is provided
2649
2650 if (title === null) {
2651 return;
2652 }
2653
2654 const rect = this.getBoundingClientRect();
2655 tooltipElem.transition().duration(200).style('opacity', '.9');
2656 tooltipElem.html(el.attr('title')).style('left', rect.left + (rect.right - rect.left) / 2 + 'px').style('top', rect.top - 14 + document.body.scrollTop + 'px');
2657 el.classed('hover', true);
2658 }).on('mouseout', function () {
2659 tooltipElem.transition().duration(500).style('opacity', 0);
2660 const el = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this);
2661 el.classed('hover', false);
2662 });
2663};
2664
2665funs.push(setupToolTips);
2666/**
2667 * Clears the internal graph db so that a new graph can be parsed.
2668 */
2669
2670const clear = function () {
2671 vertices = {};
2672 classes = {};
2673 edges = [];
2674 funs = [];
2675 funs.push(setupToolTips);
2676 subGraphs = [];
2677 subGraphLookup = {};
2678 subCount = 0;
2679 tooltips = [];
2680};
2681/**
2682 *
2683 * @returns {string}
2684 */
2685
2686const defaultStyle = function () {
2687 return 'fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;';
2688};
2689/**
2690 * Clears the internal graph db so that a new graph can be parsed.
2691 */
2692
2693const addSubGraph = function (id, list, title) {
2694 function uniq(a) {
2695 const prims = {
2696 'boolean': {},
2697 'number': {},
2698 'string': {}
2699 };
2700 const objs = [];
2701 return a.filter(function (item) {
2702 const type = typeof item;
2703
2704 if (item.trim() === '') {
2705 return false;
2706 }
2707
2708 if (type in prims) {
2709 return prims[type].hasOwnProperty(item) ? false : prims[type][item] = true;
2710 } else {
2711 return objs.indexOf(item) >= 0 ? false : objs.push(item);
2712 }
2713 });
2714 }
2715
2716 let nodeList = [];
2717 nodeList = uniq(nodeList.concat.apply(nodeList, list));
2718 id = id || 'subGraph' + subCount;
2719 title = title || '';
2720 subCount = subCount + 1;
2721 const subGraph = {
2722 id: id,
2723 nodes: nodeList,
2724 title: title.trim(),
2725 classes: []
2726 };
2727 subGraphs.push(subGraph);
2728 subGraphLookup[id] = subGraph;
2729 return id;
2730};
2731
2732const getPosForId = function (id) {
2733 for (let i = 0; i < subGraphs.length; i++) {
2734 if (subGraphs[i].id === id) {
2735 return i;
2736 }
2737 }
2738
2739 return -1;
2740};
2741
2742let secCount = -1;
2743const posCrossRef = [];
2744
2745const indexNodes2 = function (id, pos) {
2746 const nodes = subGraphs[pos].nodes;
2747 secCount = secCount + 1;
2748
2749 if (secCount > 2000) {
2750 return;
2751 }
2752
2753 posCrossRef[secCount] = pos; // Check if match
2754
2755 if (subGraphs[pos].id === id) {
2756 return {
2757 result: true,
2758 count: 0
2759 };
2760 }
2761
2762 let count = 0;
2763 let posCount = 1;
2764
2765 while (count < nodes.length) {
2766 const childPos = getPosForId(nodes[count]); // Ignore regular nodes (pos will be -1)
2767
2768 if (childPos >= 0) {
2769 const res = indexNodes2(id, childPos);
2770
2771 if (res.result) {
2772 return {
2773 result: true,
2774 count: posCount + res.count
2775 };
2776 } else {
2777 posCount = posCount + res.count;
2778 }
2779 }
2780
2781 count = count + 1;
2782 }
2783
2784 return {
2785 result: false,
2786 count: posCount
2787 };
2788};
2789
2790const getDepthFirstPos = function (pos) {
2791 return posCrossRef[pos];
2792};
2793const indexNodes = function () {
2794 secCount = -1;
2795
2796 if (subGraphs.length > 0) {
2797 indexNodes2('none', subGraphs.length - 1, 0);
2798 }
2799};
2800const getSubGraphs = function () {
2801 return subGraphs;
2802};
2803/* harmony default export */ __webpack_exports__["default"] = ({
2804 addVertex,
2805 addLink,
2806 updateLinkInterpolate,
2807 updateLink,
2808 addClass,
2809 setDirection,
2810 setClass,
2811 getTooltip,
2812 setClickEvent,
2813 setLink,
2814 bindFunctions,
2815 getDirection,
2816 getVertices,
2817 getEdges,
2818 getClasses,
2819 clear,
2820 defaultStyle,
2821 addSubGraph,
2822 getDepthFirstPos,
2823 indexNodes,
2824 getSubGraphs
2825});
2826
2827/***/ }),
2828
2829/***/ "./src/diagrams/flowchart/flowRenderer.js":
2830/*!************************************************!*\
2831 !*** ./src/diagrams/flowchart/flowRenderer.js ***!
2832 \************************************************/
2833/*! exports provided: setConf, addVertices, addEdges, getClasses, draw, default */
2834/***/ (function(module, __webpack_exports__, __webpack_require__) {
2835
2836"use strict";
2837__webpack_require__.r(__webpack_exports__);
2838/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
2839/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addVertices", function() { return addVertices; });
2840/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addEdges", function() { return addEdges; });
2841/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClasses", function() { return getClasses; });
2842/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
2843/* harmony import */ var graphlibrary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! graphlibrary */ "graphlibrary");
2844/* harmony import */ var graphlibrary__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphlibrary__WEBPACK_IMPORTED_MODULE_0__);
2845/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3 */ "d3");
2846/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_1__);
2847/* harmony import */ var _flowDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./flowDb */ "./src/diagrams/flowchart/flowDb.js");
2848/* harmony import */ var _parser_flow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/flow */ "./src/diagrams/flowchart/parser/flow.js");
2849/* harmony import */ var _parser_flow__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_flow__WEBPACK_IMPORTED_MODULE_3__);
2850/* harmony import */ var dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! dagre-d3-renderer */ "dagre-d3-renderer");
2851/* harmony import */ var dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_4__);
2852/* harmony import */ var dagre_d3_renderer_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! dagre-d3-renderer/lib/label/add-html-label.js */ "dagre-d3-renderer/lib/label/add-html-label.js");
2853/* harmony import */ var dagre_d3_renderer_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(dagre_d3_renderer_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_5__);
2854/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
2855/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils */ "./src/utils.js");
2856
2857
2858
2859
2860
2861
2862
2863
2864const conf = {};
2865const setConf = function (cnf) {
2866 const keys = Object.keys(cnf);
2867
2868 for (let i = 0; i < keys.length; i++) {
2869 conf[keys[i]] = cnf[keys[i]];
2870 }
2871};
2872/**
2873 * Function that adds the vertices found in the graph definition to the graph to be rendered.
2874 * @param vert Object containing the vertices.
2875 * @param g The graph that is to be drawn.
2876 */
2877
2878const addVertices = function (vert, g, svgId) {
2879 const svg = d3__WEBPACK_IMPORTED_MODULE_1__["select"](`[id="${svgId}"]`);
2880 const keys = Object.keys(vert);
2881
2882 const styleFromStyleArr = function (styleStr, arr) {
2883 // Create a compound style definition from the style definitions found for the node in the graph definition
2884 for (let i = 0; i < arr.length; i++) {
2885 if (typeof arr[i] !== 'undefined') {
2886 styleStr = styleStr + arr[i] + ';';
2887 }
2888 }
2889
2890 return styleStr;
2891 }; // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition
2892
2893
2894 keys.forEach(function (id) {
2895 const vertex = vert[id];
2896 /**
2897 * Variable for storing the classes for the vertex
2898 * @type {string}
2899 */
2900
2901 let classStr = '';
2902
2903 if (vertex.classes.length > 0) {
2904 classStr = vertex.classes.join(' ');
2905 }
2906 /**
2907 * Variable for storing the extracted style for the vertex
2908 * @type {string}
2909 */
2910
2911
2912 let style = ''; // Create a compound style definition from the style definitions found for the node in the graph definition
2913
2914 style = styleFromStyleArr(style, vertex.styles); // Use vertex id as text in the box if no text is provided by the graph definition
2915
2916 let vertexText = vertex.text !== undefined ? vertex.text : vertex.id; // We create a SVG label, either by delegating to addHtmlLabel or manually
2917
2918 let vertexNode;
2919
2920 if (conf.htmlLabels) {
2921 // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?
2922 const node = {
2923 label: vertexText.replace(/fa[lrsb]?:fa-[\w-]+/g, s => `<i class='${s.replace(':', ' ')}'></i>`)
2924 };
2925 vertexNode = dagre_d3_renderer_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_5___default()(svg, node).node();
2926 vertexNode.parentNode.removeChild(vertexNode);
2927 } else {
2928 const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');
2929 const rows = vertexText.split(/<br[/]{0,1}>/);
2930
2931 for (let j = 0; j < rows.length; j++) {
2932 const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');
2933 tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
2934 tspan.setAttribute('dy', '1em');
2935 tspan.setAttribute('x', '1');
2936 tspan.textContent = rows[j];
2937 svgLabel.appendChild(tspan);
2938 }
2939
2940 vertexNode = svgLabel;
2941 } // If the node has a link, we wrap it in a SVG link
2942
2943
2944 if (vertex.link) {
2945 const link = document.createElementNS('http://www.w3.org/2000/svg', 'a');
2946 link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link);
2947 link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener');
2948 link.appendChild(vertexNode);
2949 vertexNode = link;
2950 }
2951
2952 let radious = 0;
2953 let _shape = ''; // Set the shape based parameters
2954
2955 switch (vertex.type) {
2956 case 'round':
2957 radious = 5;
2958 _shape = 'rect';
2959 break;
2960
2961 case 'square':
2962 _shape = 'rect';
2963 break;
2964
2965 case 'diamond':
2966 _shape = 'question';
2967 break;
2968
2969 case 'odd':
2970 _shape = 'rect_left_inv_arrow';
2971 break;
2972
2973 case 'odd_right':
2974 _shape = 'rect_left_inv_arrow';
2975 break;
2976
2977 case 'circle':
2978 _shape = 'circle';
2979 break;
2980
2981 case 'ellipse':
2982 _shape = 'ellipse';
2983 break;
2984
2985 case 'group':
2986 _shape = 'rect';
2987 break;
2988
2989 default:
2990 _shape = 'rect';
2991 } // Add the node
2992
2993
2994 g.setNode(vertex.id, {
2995 labelType: 'svg',
2996 shape: _shape,
2997 label: vertexNode,
2998 rx: radious,
2999 ry: radious,
3000 'class': classStr,
3001 style: style,
3002 id: vertex.id
3003 });
3004 });
3005};
3006/**
3007 * Add edges to graph based on parsed graph defninition
3008 * @param {Object} edges The edges to add to the graph
3009 * @param {Object} g The graph object
3010 */
3011
3012const addEdges = function (edges, g) {
3013 let cnt = 0;
3014 let defaultStyle;
3015
3016 if (typeof edges.defaultStyle !== 'undefined') {
3017 defaultStyle = edges.defaultStyle.toString().replace(/,/g, ';');
3018 }
3019
3020 edges.forEach(function (edge) {
3021 cnt++;
3022 const edgeData = {}; // Set link type for rendering
3023
3024 if (edge.type === 'arrow_open') {
3025 edgeData.arrowhead = 'none';
3026 } else {
3027 edgeData.arrowhead = 'normal';
3028 }
3029
3030 let style = '';
3031
3032 if (typeof edge.style !== 'undefined') {
3033 edge.style.forEach(function (s) {
3034 style = style + s + ';';
3035 });
3036 } else {
3037 switch (edge.stroke) {
3038 case 'normal':
3039 style = 'fill:none';
3040
3041 if (typeof defaultStyle !== 'undefined') {
3042 style = defaultStyle;
3043 }
3044
3045 break;
3046
3047 case 'dotted':
3048 style = 'stroke: #333; fill:none;stroke-width:2px;stroke-dasharray:3;';
3049 break;
3050
3051 case 'thick':
3052 style = 'stroke: #333; stroke-width: 3.5px;fill:none';
3053 break;
3054 }
3055 }
3056
3057 edgeData.style = style;
3058
3059 if (typeof edge.interpolate !== 'undefined') {
3060 edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_7__["interpolateToCurve"])(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]);
3061 } else if (typeof edges.defaultInterpolate !== 'undefined') {
3062 edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_7__["interpolateToCurve"])(edges.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]);
3063 } else {
3064 edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_7__["interpolateToCurve"])(conf.curve, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]);
3065 }
3066
3067 if (typeof edge.text === 'undefined') {
3068 if (typeof edge.style !== 'undefined') {
3069 edgeData.arrowheadStyle = 'fill: #333';
3070 }
3071 } else {
3072 edgeData.arrowheadStyle = 'fill: #333';
3073
3074 if (typeof edge.style === 'undefined') {
3075 edgeData.labelpos = 'c';
3076
3077 if (conf.htmlLabels) {
3078 edgeData.labelType = 'html';
3079 edgeData.label = '<span class="edgeLabel">' + edge.text + '</span>';
3080 } else {
3081 edgeData.labelType = 'text';
3082 edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none';
3083 edgeData.label = edge.text.replace(/<br>/g, '\n');
3084 }
3085 } else {
3086 edgeData.label = edge.text.replace(/<br>/g, '\n');
3087 }
3088 } // Add the edge to the graph
3089
3090
3091 g.setEdge(edge.start, edge.end, edgeData, cnt);
3092 });
3093};
3094/**
3095 * Returns the all the styles from classDef statements in the graph definition.
3096 * @returns {object} classDef styles
3097 */
3098
3099const getClasses = function (text) {
3100 _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].clear();
3101 const parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser;
3102 parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"]; // Parse the graph definition
3103
3104 parser.parse(text);
3105 return _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getClasses();
3106};
3107/**
3108 * Draws a flowchart in the tag with id: id based on the graph definition in text.
3109 * @param text
3110 * @param id
3111 */
3112
3113const draw = function (text, id) {
3114 _logger__WEBPACK_IMPORTED_MODULE_6__["logger"].debug('Drawing flowchart');
3115 _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].clear();
3116 const parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser;
3117 parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"]; // Parse the graph definition
3118
3119 try {
3120 parser.parse(text);
3121 } catch (err) {
3122 _logger__WEBPACK_IMPORTED_MODULE_6__["logger"].debug('Parsing failed');
3123 } // Fetch the default direction, use TD if none was found
3124
3125
3126 let dir = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getDirection();
3127
3128 if (typeof dir === 'undefined') {
3129 dir = 'TD';
3130 } // Create the input mermaid.graph
3131
3132
3133 const g = new graphlibrary__WEBPACK_IMPORTED_MODULE_0___default.a.Graph({
3134 multigraph: true,
3135 compound: true
3136 }).setGraph({
3137 rankdir: dir,
3138 marginx: 20,
3139 marginy: 20
3140 }).setDefaultEdgeLabel(function () {
3141 return {};
3142 });
3143 let subG;
3144 const subGraphs = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getSubGraphs();
3145
3146 for (let i = subGraphs.length - 1; i >= 0; i--) {
3147 subG = subGraphs[i];
3148 _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].addVertex(subG.id, subG.title, 'group', undefined, subG.classes);
3149 } // Fetch the verices/nodes and edges/links from the parsed graph definition
3150
3151
3152 const vert = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getVertices();
3153 const edges = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getEdges();
3154 let i = 0;
3155
3156 for (i = subGraphs.length - 1; i >= 0; i--) {
3157 subG = subGraphs[i];
3158 d3__WEBPACK_IMPORTED_MODULE_1__["selectAll"]('cluster').append('text');
3159
3160 for (let j = 0; j < subG.nodes.length; j++) {
3161 g.setParent(subG.nodes[j], subG.id);
3162 }
3163 }
3164
3165 addVertices(vert, g, id);
3166 addEdges(edges, g); // Create the renderer
3167
3168 const Render = dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_4___default.a.render;
3169 const render = new Render(); // Add custom shape for rhombus type of boc (decision)
3170
3171 render.shapes().question = function (parent, bbox, node) {
3172 const w = bbox.width;
3173 const h = bbox.height;
3174 const s = (w + h) * 0.9;
3175 const points = [{
3176 x: s / 2,
3177 y: 0
3178 }, {
3179 x: s,
3180 y: -s / 2
3181 }, {
3182 x: s / 2,
3183 y: -s
3184 }, {
3185 x: 0,
3186 y: -s / 2
3187 }];
3188 const shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
3189 return d.x + ',' + d.y;
3190 }).join(' ')).attr('rx', 5).attr('ry', 5).attr('transform', 'translate(' + -s / 2 + ',' + s * 2 / 4 + ')');
3191
3192 node.intersect = function (point) {
3193 return dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_4___default.a.intersect.polygon(node, points, point);
3194 };
3195
3196 return shapeSvg;
3197 }; // Add custom shape for box with inverted arrow on left side
3198
3199
3200 render.shapes().rect_left_inv_arrow = function (parent, bbox, node) {
3201 const w = bbox.width;
3202 const h = bbox.height;
3203 const points = [{
3204 x: -h / 2,
3205 y: 0
3206 }, {
3207 x: w,
3208 y: 0
3209 }, {
3210 x: w,
3211 y: -h
3212 }, {
3213 x: -h / 2,
3214 y: -h
3215 }, {
3216 x: 0,
3217 y: -h / 2
3218 }];
3219 const shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
3220 return d.x + ',' + d.y;
3221 }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h * 2 / 4 + ')');
3222
3223 node.intersect = function (point) {
3224 return dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_4___default.a.intersect.polygon(node, points, point);
3225 };
3226
3227 return shapeSvg;
3228 }; // Add custom shape for box with inverted arrow on right side
3229
3230
3231 render.shapes().rect_right_inv_arrow = function (parent, bbox, node) {
3232 const w = bbox.width;
3233 const h = bbox.height;
3234 const points = [{
3235 x: 0,
3236 y: 0
3237 }, {
3238 x: w + h / 2,
3239 y: 0
3240 }, {
3241 x: w,
3242 y: -h / 2
3243 }, {
3244 x: w + h / 2,
3245 y: -h
3246 }, {
3247 x: 0,
3248 y: -h
3249 }];
3250 const shapeSvg = parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
3251 return d.x + ',' + d.y;
3252 }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h * 2 / 4 + ')');
3253
3254 node.intersect = function (point) {
3255 return dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_4___default.a.intersect.polygon(node, points, point);
3256 };
3257
3258 return shapeSvg;
3259 }; // Add our custom arrow - an empty arrowhead
3260
3261
3262 render.arrows().none = function normal(parent, id, edge, type) {
3263 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');
3264 const path = marker.append('path').attr('d', 'M 0 0 L 0 0 L 0 0 z');
3265 dagre_d3_renderer__WEBPACK_IMPORTED_MODULE_4___default.a.util.applyStyle(path, edge[type + 'Style']);
3266 }; // Override normal arrowhead defined in d3. Remove style & add class to allow css styling.
3267
3268
3269 render.arrows().normal = function normal(parent, id, edge, type) {
3270 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');
3271 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');
3272 }; // Set up an SVG group so that we can translate the final graph.
3273
3274
3275 const svg = d3__WEBPACK_IMPORTED_MODULE_1__["select"](`[id="${id}"]`); // Run the renderer. This is what draws the final graph.
3276
3277 const element = d3__WEBPACK_IMPORTED_MODULE_1__["select"]('#' + id + ' g');
3278 render(element, g);
3279 element.selectAll('g.node').attr('title', function () {
3280 return _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getTooltip(this.id);
3281 });
3282 const padding = 8;
3283 const width = g.maxX - g.minX + padding * 2;
3284 const height = g.maxY - g.minY + padding * 2;
3285 svg.attr('width', '100%');
3286 svg.attr('style', `max-width: ${width}px;`);
3287 svg.attr('viewBox', `0 0 ${width} ${height}`);
3288 svg.select('g').attr('transform', `translate(${padding - g.minX}, ${padding - g.minY})`); // Index nodes
3289
3290 _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].indexNodes('subGraph' + i); // reposition labels
3291
3292 for (i = 0; i < subGraphs.length; i++) {
3293 subG = subGraphs[i];
3294
3295 if (subG.title !== 'undefined') {
3296 const clusterRects = document.querySelectorAll('#' + id + ' #' + subG.id + ' rect');
3297 const clusterEl = document.querySelectorAll('#' + id + ' #' + subG.id);
3298 const xPos = clusterRects[0].x.baseVal.value;
3299 const yPos = clusterRects[0].y.baseVal.value;
3300 const width = clusterRects[0].width.baseVal.value;
3301 const cluster = d3__WEBPACK_IMPORTED_MODULE_1__["select"](clusterEl[0]);
3302 const te = cluster.select('.label');
3303 te.attr('transform', `translate(${xPos + width / 2}, ${yPos + 14})`);
3304 te.attr('id', id + 'Text');
3305 }
3306 } // Add label rects for non html labels
3307
3308
3309 if (!conf.htmlLabels) {
3310 const labels = document.querySelectorAll('#' + id + ' .edgeLabel .label');
3311
3312 for (let k = 0; k < labels.length; k++) {
3313 const label = labels[k]; // Get dimensions of label
3314
3315 const dim = label.getBBox();
3316 const rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
3317 rect.setAttribute('rx', 0);
3318 rect.setAttribute('ry', 0);
3319 rect.setAttribute('width', dim.width);
3320 rect.setAttribute('height', dim.height);
3321 rect.setAttribute('style', 'fill:#e8e8e8;');
3322 label.insertBefore(rect, label.firstChild);
3323 }
3324 }
3325};
3326/* harmony default export */ __webpack_exports__["default"] = ({
3327 setConf,
3328 addVertices,
3329 addEdges,
3330 getClasses,
3331 draw
3332});
3333
3334/***/ }),
3335
3336/***/ "./src/diagrams/flowchart/parser/flow.js":
3337/*!***********************************************!*\
3338 !*** ./src/diagrams/flowchart/parser/flow.js ***!
3339 \***********************************************/
3340/*! no static exports found */
3341/***/ (function(module, exports, __webpack_require__) {
3342
3343/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
3344
3345/*
3346 Returns a Parser object of the following structure:
3347
3348 Parser: {
3349 yy: {}
3350 }
3351
3352 Parser.prototype: {
3353 yy: {},
3354 trace: function(),
3355 symbols_: {associative list: name ==> number},
3356 terminals_: {associative list: number ==> name},
3357 productions_: [...],
3358 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
3359 table: [...],
3360 defaultActions: {...},
3361 parseError: function(str, hash),
3362 parse: function(input),
3363
3364 lexer: {
3365 EOF: 1,
3366 parseError: function(str, hash),
3367 setInput: function(input),
3368 input: function(),
3369 unput: function(str),
3370 more: function(),
3371 less: function(n),
3372 pastInput: function(),
3373 upcomingInput: function(),
3374 showPosition: function(),
3375 test_match: function(regex_match_array, rule_index),
3376 next: function(),
3377 lex: function(),
3378 begin: function(condition),
3379 popState: function(),
3380 _currentRules: function(),
3381 topState: function(),
3382 pushState: function(condition),
3383
3384 options: {
3385 ranges: boolean (optional: true ==> token location info will include a .range[] member)
3386 flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
3387 backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
3388 },
3389
3390 performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
3391 rules: [...],
3392 conditions: {associative list: name ==> set},
3393 }
3394 }
3395
3396
3397 token location info (@$, _$, etc.): {
3398 first_line: n,
3399 last_line: n,
3400 first_column: n,
3401 last_column: n,
3402 range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
3403 }
3404
3405
3406 the parseError function receives a 'hash' object with these members for lexer and parser errors: {
3407 text: (matched text)
3408 token: (the produced terminal token, if any)
3409 line: (yylineno)
3410 }
3411 while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
3412 loc: (yylloc)
3413 expected: (string describing the set of expected tokens)
3414 recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
3415 }
3416*/
3417var parser = function () {
3418 var o = function (k, v, o, l) {
3419 for (o = o || {}, l = k.length; l--; o[k[l]] = v);
3420
3421 return o;
3422 },
3423 $V0 = [1, 4],
3424 $V1 = [1, 3],
3425 $V2 = [1, 5],
3426 $V3 = [1, 8, 9, 10, 11, 13, 18, 30, 47, 71, 72, 73, 74, 75, 85, 86, 89, 90, 92, 93, 95, 96, 97, 98, 99],
3427 $V4 = [2, 2],
3428 $V5 = [1, 12],
3429 $V6 = [1, 13],
3430 $V7 = [1, 14],
3431 $V8 = [1, 15],
3432 $V9 = [1, 31],
3433 $Va = [1, 33],
3434 $Vb = [1, 22],
3435 $Vc = [1, 34],
3436 $Vd = [1, 24],
3437 $Ve = [1, 25],
3438 $Vf = [1, 26],
3439 $Vg = [1, 27],
3440 $Vh = [1, 28],
3441 $Vi = [1, 38],
3442 $Vj = [1, 40],
3443 $Vk = [1, 35],
3444 $Vl = [1, 39],
3445 $Vm = [1, 45],
3446 $Vn = [1, 44],
3447 $Vo = [1, 36],
3448 $Vp = [1, 37],
3449 $Vq = [1, 41],
3450 $Vr = [1, 42],
3451 $Vs = [1, 43],
3452 $Vt = [1, 8, 9, 10, 11, 13, 18, 30, 35, 47, 71, 72, 73, 74, 75, 85, 86, 89, 90, 92, 93, 95, 96, 97, 98, 99],
3453 $Vu = [1, 53],
3454 $Vv = [1, 52],
3455 $Vw = [1, 54],
3456 $Vx = [8, 9, 11],
3457 $Vy = [8, 9, 11, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65],
3458 $Vz = [1, 91],
3459 $VA = [8, 9, 10, 11, 13, 15, 18, 32, 39, 41, 43, 47, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 85, 86, 89, 90, 92, 93, 95, 96, 97, 98, 99],
3460 $VB = [8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 30, 32, 34, 35, 39, 40, 41, 42, 43, 44, 47, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 71, 72, 73, 74, 75, 78, 84, 85, 86, 89, 90, 92, 93, 95, 96, 97, 98, 99],
3461 $VC = [1, 93],
3462 $VD = [1, 94],
3463 $VE = [8, 9, 10, 11, 13, 18, 30, 35, 47, 71, 72, 73, 74, 75, 85, 86, 89, 90, 92, 93, 95, 96, 97, 98, 99],
3464 $VF = [13, 18, 47, 85, 86, 89, 90, 92, 93, 95, 96, 97, 98, 99],
3465 $VG = [1, 118],
3466 $VH = [1, 126],
3467 $VI = [1, 127],
3468 $VJ = [1, 112],
3469 $VK = [1, 111],
3470 $VL = [1, 131],
3471 $VM = [1, 130],
3472 $VN = [1, 128],
3473 $VO = [1, 129],
3474 $VP = [1, 109],
3475 $VQ = [1, 119],
3476 $VR = [1, 114],
3477 $VS = [1, 113],
3478 $VT = [1, 121],
3479 $VU = [1, 122],
3480 $VV = [1, 123],
3481 $VW = [1, 124],
3482 $VX = [1, 125],
3483 $VY = [1, 116],
3484 $VZ = [1, 115],
3485 $V_ = [13, 18, 47, 50, 66, 85, 86, 89, 90, 92, 93, 95, 96, 97, 98, 99],
3486 $V$ = [10, 12, 13, 15, 16, 17, 18, 30, 34, 35, 40, 42, 44, 47, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 71, 72, 73, 74, 75, 78, 84, 85, 86, 89, 90, 92, 93, 95, 96, 97, 98, 99],
3487 $V01 = [10, 86],
3488 $V11 = [1, 198],
3489 $V21 = [1, 195],
3490 $V31 = [1, 202],
3491 $V41 = [1, 199],
3492 $V51 = [1, 203],
3493 $V61 = [1, 196],
3494 $V71 = [1, 193],
3495 $V81 = [1, 194],
3496 $V91 = [1, 197],
3497 $Va1 = [1, 200],
3498 $Vb1 = [1, 201],
3499 $Vc1 = [1, 224],
3500 $Vd1 = [8, 9, 11, 86],
3501 $Ve1 = [8, 9, 10, 11, 47, 71, 80, 84, 85, 86, 89, 90, 91, 92, 93];
3502
3503 var parser = {
3504 trace: function trace() {},
3505 yy: {},
3506 symbols_: {
3507 "error": 2,
3508 "mermaidDoc": 3,
3509 "graphConfig": 4,
3510 "document": 5,
3511 "line": 6,
3512 "statement": 7,
3513 "SEMI": 8,
3514 "NEWLINE": 9,
3515 "SPACE": 10,
3516 "EOF": 11,
3517 "GRAPH": 12,
3518 "DIR": 13,
3519 "FirstStmtSeperator": 14,
3520 "TAGEND": 15,
3521 "TAGSTART": 16,
3522 "UP": 17,
3523 "DOWN": 18,
3524 "ending": 19,
3525 "endToken": 20,
3526 "spaceList": 21,
3527 "spaceListNewline": 22,
3528 "verticeStatement": 23,
3529 "separator": 24,
3530 "styleStatement": 25,
3531 "linkStyleStatement": 26,
3532 "classDefStatement": 27,
3533 "classStatement": 28,
3534 "clickStatement": 29,
3535 "subgraph": 30,
3536 "alphaNum": 31,
3537 "SQS": 32,
3538 "text": 33,
3539 "SQE": 34,
3540 "end": 35,
3541 "STR": 36,
3542 "vertex": 37,
3543 "link": 38,
3544 "PS": 39,
3545 "PE": 40,
3546 "(-": 41,
3547 "-)": 42,
3548 "DIAMOND_START": 43,
3549 "DIAMOND_STOP": 44,
3550 "alphaNumStatement": 45,
3551 "alphaNumToken": 46,
3552 "MINUS": 47,
3553 "linkStatement": 48,
3554 "arrowText": 49,
3555 "TESTSTR": 50,
3556 "--": 51,
3557 "ARROW_POINT": 52,
3558 "ARROW_CIRCLE": 53,
3559 "ARROW_CROSS": 54,
3560 "ARROW_OPEN": 55,
3561 "-.": 56,
3562 "DOTTED_ARROW_POINT": 57,
3563 "DOTTED_ARROW_CIRCLE": 58,
3564 "DOTTED_ARROW_CROSS": 59,
3565 "DOTTED_ARROW_OPEN": 60,
3566 "==": 61,
3567 "THICK_ARROW_POINT": 62,
3568 "THICK_ARROW_CIRCLE": 63,
3569 "THICK_ARROW_CROSS": 64,
3570 "THICK_ARROW_OPEN": 65,
3571 "PIPE": 66,
3572 "textToken": 67,
3573 "commentText": 68,
3574 "commentToken": 69,
3575 "keywords": 70,
3576 "STYLE": 71,
3577 "LINKSTYLE": 72,
3578 "CLASSDEF": 73,
3579 "CLASS": 74,
3580 "CLICK": 75,
3581 "textNoTags": 76,
3582 "textNoTagsToken": 77,
3583 "DEFAULT": 78,
3584 "stylesOpt": 79,
3585 "HEX": 80,
3586 "numList": 81,
3587 "INTERPOLATE": 82,
3588 "commentStatement": 83,
3589 "PCT": 84,
3590 "NUM": 85,
3591 "COMMA": 86,
3592 "style": 87,
3593 "styleComponent": 88,
3594 "ALPHA": 89,
3595 "COLON": 90,
3596 "UNIT": 91,
3597 "BRKT": 92,
3598 "DOT": 93,
3599 "graphCodeTokens": 94,
3600 "PUNCTUATION": 95,
3601 "UNICODE_TEXT": 96,
3602 "PLUS": 97,
3603 "EQUALS": 98,
3604 "MULT": 99,
3605 "TAG_START": 100,
3606 "TAG_END": 101,
3607 "QUOTE": 102,
3608 "$accept": 0,
3609 "$end": 1
3610 },
3611 terminals_: {
3612 2: "error",
3613 8: "SEMI",
3614 9: "NEWLINE",
3615 10: "SPACE",
3616 11: "EOF",
3617 12: "GRAPH",
3618 13: "DIR",
3619 15: "TAGEND",
3620 16: "TAGSTART",
3621 17: "UP",
3622 18: "DOWN",
3623 30: "subgraph",
3624 32: "SQS",
3625 34: "SQE",
3626 35: "end",
3627 36: "STR",
3628 39: "PS",
3629 40: "PE",
3630 41: "(-",
3631 42: "-)",
3632 43: "DIAMOND_START",
3633 44: "DIAMOND_STOP",
3634 47: "MINUS",
3635 50: "TESTSTR",
3636 51: "--",
3637 52: "ARROW_POINT",
3638 53: "ARROW_CIRCLE",
3639 54: "ARROW_CROSS",
3640 55: "ARROW_OPEN",
3641 56: "-.",
3642 57: "DOTTED_ARROW_POINT",
3643 58: "DOTTED_ARROW_CIRCLE",
3644 59: "DOTTED_ARROW_CROSS",
3645 60: "DOTTED_ARROW_OPEN",
3646 61: "==",
3647 62: "THICK_ARROW_POINT",
3648 63: "THICK_ARROW_CIRCLE",
3649 64: "THICK_ARROW_CROSS",
3650 65: "THICK_ARROW_OPEN",
3651 66: "PIPE",
3652 71: "STYLE",
3653 72: "LINKSTYLE",
3654 73: "CLASSDEF",
3655 74: "CLASS",
3656 75: "CLICK",
3657 78: "DEFAULT",
3658 80: "HEX",
3659 82: "INTERPOLATE",
3660 84: "PCT",
3661 85: "NUM",
3662 86: "COMMA",
3663 89: "ALPHA",
3664 90: "COLON",
3665 91: "UNIT",
3666 92: "BRKT",
3667 93: "DOT",
3668 95: "PUNCTUATION",
3669 96: "UNICODE_TEXT",
3670 97: "PLUS",
3671 98: "EQUALS",
3672 99: "MULT",
3673 100: "TAG_START",
3674 101: "TAG_END",
3675 102: "QUOTE"
3676 },
3677 productions_: [0, [3, 2], [5, 0], [5, 2], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [4, 2], [4, 2], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [19, 2], [19, 1], [20, 1], [20, 1], [20, 1], [14, 1], [14, 1], [14, 2], [22, 2], [22, 2], [22, 1], [22, 1], [21, 2], [21, 1], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [7, 9], [7, 6], [7, 6], [7, 4], [24, 1], [24, 1], [24, 1], [23, 3], [23, 1], [37, 4], [37, 5], [37, 6], [37, 7], [37, 4], [37, 5], [37, 4], [37, 5], [37, 4], [37, 5], [37, 4], [37, 5], [37, 1], [37, 2], [31, 1], [31, 2], [45, 1], [45, 1], [45, 1], [45, 1], [38, 2], [38, 3], [38, 3], [38, 1], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [38, 3], [48, 1], [48, 1], [48, 1], [48, 1], [48, 1], [48, 1], [48, 1], [48, 1], [48, 1], [48, 1], [48, 1], [48, 1], [49, 3], [33, 1], [33, 2], [33, 1], [68, 1], [68, 2], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [76, 1], [76, 2], [27, 5], [27, 5], [28, 5], [29, 5], [29, 7], [29, 5], [29, 7], [25, 5], [25, 5], [26, 5], [26, 5], [26, 9], [26, 9], [26, 7], [26, 7], [83, 3], [81, 1], [81, 3], [79, 1], [79, 3], [87, 1], [87, 2], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [88, 1], [69, 1], [69, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [77, 1], [77, 1], [77, 1], [77, 1], [46, 1], [46, 1], [46, 1], [46, 1], [46, 1], [46, 1], [46, 1], [46, 1], [46, 1], [46, 1], [46, 1], [94, 1], [94, 1], [94, 1], [94, 1], [94, 1], [94, 1], [94, 1], [94, 1], [94, 1], [94, 1], [94, 1], [94, 1], [94, 1], [94, 1], [94, 1]],
3678 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate
3679 /* action[1] */
3680 , $$
3681 /* vstack */
3682 , _$
3683 /* lstack */
3684 ) {
3685 /* this == yyval */
3686 var $0 = $$.length - 1;
3687
3688 switch (yystate) {
3689 case 2:
3690 this.$ = [];
3691 break;
3692
3693 case 3:
3694 if ($$[$0] !== []) {
3695 $$[$0 - 1].push($$[$0]);
3696 }
3697
3698 this.$ = $$[$0 - 1];
3699 break;
3700
3701 case 4:
3702 case 59:
3703 case 61:
3704 case 62:
3705 case 94:
3706 case 96:
3707 case 97:
3708 case 110:
3709 this.$ = $$[$0];
3710 break;
3711
3712 case 11:
3713 yy.setDirection($$[$0 - 1]);
3714 this.$ = $$[$0 - 1];
3715 break;
3716
3717 case 12:
3718 yy.setDirection("LR");
3719 this.$ = $$[$0 - 1];
3720 break;
3721
3722 case 13:
3723 yy.setDirection("RL");
3724 this.$ = $$[$0 - 1];
3725 break;
3726
3727 case 14:
3728 yy.setDirection("BT");
3729 this.$ = $$[$0 - 1];
3730 break;
3731
3732 case 15:
3733 yy.setDirection("TB");
3734 this.$ = $$[$0 - 1];
3735 break;
3736
3737 case 30:
3738 this.$ = $$[$0 - 1];
3739 break;
3740
3741 case 31:
3742 case 32:
3743 case 33:
3744 case 34:
3745 case 35:
3746 this.$ = [];
3747 break;
3748
3749 case 36:
3750 this.$ = yy.addSubGraph($$[$0 - 6], $$[$0 - 1], $$[$0 - 4]);
3751 break;
3752
3753 case 37:
3754 this.$ = yy.addSubGraph(undefined, $$[$0 - 1], $$[$0 - 3]);
3755 break;
3756
3757 case 38:
3758 this.$ = yy.addSubGraph($$[$0 - 3], $$[$0 - 1], $$[$0 - 3]);
3759 break;
3760
3761 case 39:
3762 this.$ = yy.addSubGraph(undefined, $$[$0 - 1], undefined);
3763 break;
3764
3765 case 43:
3766 yy.addLink($$[$0 - 2], $$[$0], $$[$0 - 1]);
3767 this.$ = [$$[$0 - 2], $$[$0]];
3768 break;
3769
3770 case 44:
3771 this.$ = [$$[$0]];
3772 break;
3773
3774 case 45:
3775 this.$ = $$[$0 - 3];
3776 yy.addVertex($$[$0 - 3], $$[$0 - 1], 'square');
3777 break;
3778
3779 case 46:
3780 this.$ = $$[$0 - 4];
3781 yy.addVertex($$[$0 - 4], $$[$0 - 2], 'square');
3782 break;
3783
3784 case 47:
3785 this.$ = $$[$0 - 5];
3786 yy.addVertex($$[$0 - 5], $$[$0 - 2], 'circle');
3787 break;
3788
3789 case 48:
3790 this.$ = $$[$0 - 6];
3791 yy.addVertex($$[$0 - 6], $$[$0 - 3], 'circle');
3792 break;
3793
3794 case 49:
3795 this.$ = $$[$0 - 3];
3796 yy.addVertex($$[$0 - 3], $$[$0 - 1], 'ellipse');
3797 break;
3798
3799 case 50:
3800 this.$ = $$[$0 - 4];
3801 yy.addVertex($$[$0 - 4], $$[$0 - 2], 'ellipse');
3802 break;
3803
3804 case 51:
3805 this.$ = $$[$0 - 3];
3806 yy.addVertex($$[$0 - 3], $$[$0 - 1], 'round');
3807 break;
3808
3809 case 52:
3810 this.$ = $$[$0 - 4];
3811 yy.addVertex($$[$0 - 4], $$[$0 - 2], 'round');
3812 break;
3813
3814 case 53:
3815 this.$ = $$[$0 - 3];
3816 yy.addVertex($$[$0 - 3], $$[$0 - 1], 'diamond');
3817 break;
3818
3819 case 54:
3820 this.$ = $$[$0 - 4];
3821 yy.addVertex($$[$0 - 4], $$[$0 - 2], 'diamond');
3822 break;
3823
3824 case 55:
3825 this.$ = $$[$0 - 3];
3826 yy.addVertex($$[$0 - 3], $$[$0 - 1], 'odd');
3827 break;
3828
3829 case 56:
3830 this.$ = $$[$0 - 4];
3831 yy.addVertex($$[$0 - 4], $$[$0 - 2], 'odd');
3832 break;
3833
3834 case 57:
3835 this.$ = $$[$0];
3836 yy.addVertex($$[$0]);
3837 break;
3838
3839 case 58:
3840 this.$ = $$[$0 - 1];
3841 yy.addVertex($$[$0 - 1]);
3842 break;
3843
3844 case 60:
3845 case 95:
3846 case 98:
3847 case 111:
3848 this.$ = $$[$0 - 1] + '' + $$[$0];
3849 break;
3850
3851 case 63:
3852 this.$ = 'v';
3853 break;
3854
3855 case 64:
3856 this.$ = '-';
3857 break;
3858
3859 case 65:
3860 $$[$0 - 1].text = $$[$0];
3861 this.$ = $$[$0 - 1];
3862 break;
3863
3864 case 66:
3865 case 67:
3866 $$[$0 - 2].text = $$[$0 - 1];
3867 this.$ = $$[$0 - 2];
3868 break;
3869
3870 case 68:
3871 this.$ = $$[$0];
3872 break;
3873
3874 case 69:
3875 this.$ = {
3876 "type": "arrow",
3877 "stroke": "normal",
3878 "text": $$[$0 - 1]
3879 };
3880 break;
3881
3882 case 70:
3883 this.$ = {
3884 "type": "arrow_circle",
3885 "stroke": "normal",
3886 "text": $$[$0 - 1]
3887 };
3888 break;
3889
3890 case 71:
3891 this.$ = {
3892 "type": "arrow_cross",
3893 "stroke": "normal",
3894 "text": $$[$0 - 1]
3895 };
3896 break;
3897
3898 case 72:
3899 this.$ = {
3900 "type": "arrow_open",
3901 "stroke": "normal",
3902 "text": $$[$0 - 1]
3903 };
3904 break;
3905
3906 case 73:
3907 this.$ = {
3908 "type": "arrow",
3909 "stroke": "dotted",
3910 "text": $$[$0 - 1]
3911 };
3912 break;
3913
3914 case 74:
3915 this.$ = {
3916 "type": "arrow_circle",
3917 "stroke": "dotted",
3918 "text": $$[$0 - 1]
3919 };
3920 break;
3921
3922 case 75:
3923 this.$ = {
3924 "type": "arrow_cross",
3925 "stroke": "dotted",
3926 "text": $$[$0 - 1]
3927 };
3928 break;
3929
3930 case 76:
3931 this.$ = {
3932 "type": "arrow_open",
3933 "stroke": "dotted",
3934 "text": $$[$0 - 1]
3935 };
3936 break;
3937
3938 case 77:
3939 this.$ = {
3940 "type": "arrow",
3941 "stroke": "thick",
3942 "text": $$[$0 - 1]
3943 };
3944 break;
3945
3946 case 78:
3947 this.$ = {
3948 "type": "arrow_circle",
3949 "stroke": "thick",
3950 "text": $$[$0 - 1]
3951 };
3952 break;
3953
3954 case 79:
3955 this.$ = {
3956 "type": "arrow_cross",
3957 "stroke": "thick",
3958 "text": $$[$0 - 1]
3959 };
3960 break;
3961
3962 case 80:
3963 this.$ = {
3964 "type": "arrow_open",
3965 "stroke": "thick",
3966 "text": $$[$0 - 1]
3967 };
3968 break;
3969
3970 case 81:
3971 this.$ = {
3972 "type": "arrow",
3973 "stroke": "normal"
3974 };
3975 break;
3976
3977 case 82:
3978 this.$ = {
3979 "type": "arrow_circle",
3980 "stroke": "normal"
3981 };
3982 break;
3983
3984 case 83:
3985 this.$ = {
3986 "type": "arrow_cross",
3987 "stroke": "normal"
3988 };
3989 break;
3990
3991 case 84:
3992 this.$ = {
3993 "type": "arrow_open",
3994 "stroke": "normal"
3995 };
3996 break;
3997
3998 case 85:
3999 this.$ = {
4000 "type": "arrow",
4001 "stroke": "dotted"
4002 };
4003 break;
4004
4005 case 86:
4006 this.$ = {
4007 "type": "arrow_circle",
4008 "stroke": "dotted"
4009 };
4010 break;
4011
4012 case 87:
4013 this.$ = {
4014 "type": "arrow_cross",
4015 "stroke": "dotted"
4016 };
4017 break;
4018
4019 case 88:
4020 this.$ = {
4021 "type": "arrow_open",
4022 "stroke": "dotted"
4023 };
4024 break;
4025
4026 case 89:
4027 this.$ = {
4028 "type": "arrow",
4029 "stroke": "thick"
4030 };
4031 break;
4032
4033 case 90:
4034 this.$ = {
4035 "type": "arrow_circle",
4036 "stroke": "thick"
4037 };
4038 break;
4039
4040 case 91:
4041 this.$ = {
4042 "type": "arrow_cross",
4043 "stroke": "thick"
4044 };
4045 break;
4046
4047 case 92:
4048 this.$ = {
4049 "type": "arrow_open",
4050 "stroke": "thick"
4051 };
4052 break;
4053
4054 case 93:
4055 this.$ = $$[$0 - 1];
4056 break;
4057
4058 case 112:
4059 case 113:
4060 this.$ = $$[$0 - 4];
4061 yy.addClass($$[$0 - 2], $$[$0]);
4062 break;
4063
4064 case 114:
4065 this.$ = $$[$0 - 4];
4066 yy.setClass($$[$0 - 2], $$[$0]);
4067 break;
4068
4069 case 115:
4070 this.$ = $$[$0 - 4];
4071 yy.setClickEvent($$[$0 - 2], $$[$0], undefined);
4072 break;
4073
4074 case 116:
4075 this.$ = $$[$0 - 6];
4076 yy.setClickEvent($$[$0 - 4], $$[$0 - 2], $$[$0]);
4077 break;
4078
4079 case 117:
4080 this.$ = $$[$0 - 4];
4081 yy.setLink($$[$0 - 2], $$[$0], undefined);
4082 break;
4083
4084 case 118:
4085 this.$ = $$[$0 - 6];
4086 yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]);
4087 break;
4088
4089 case 119:
4090 this.$ = $$[$0 - 4];
4091 yy.addVertex($$[$0 - 2], undefined, undefined, $$[$0]);
4092 break;
4093
4094 case 120:
4095 case 122:
4096 this.$ = $$[$0 - 4];
4097 yy.updateLink($$[$0 - 2], $$[$0]);
4098 break;
4099
4100 case 121:
4101 this.$ = $$[$0 - 4];
4102 yy.updateLink([$$[$0 - 2]], $$[$0]);
4103 break;
4104
4105 case 123:
4106 this.$ = $$[$0 - 8];
4107 yy.updateLinkInterpolate([$$[$0 - 6]], $$[$0 - 2]);
4108 yy.updateLink([$$[$0 - 6]], $$[$0]);
4109 break;
4110
4111 case 124:
4112 this.$ = $$[$0 - 8];
4113 yy.updateLinkInterpolate($$[$0 - 6], $$[$0 - 2]);
4114 yy.updateLink($$[$0 - 6], $$[$0]);
4115 break;
4116
4117 case 125:
4118 this.$ = $$[$0 - 6];
4119 yy.updateLinkInterpolate([$$[$0 - 4]], $$[$0]);
4120 break;
4121
4122 case 126:
4123 this.$ = $$[$0 - 6];
4124 yy.updateLinkInterpolate($$[$0 - 4], $$[$0]);
4125 break;
4126
4127 case 128:
4128 case 130:
4129 this.$ = [$$[$0]];
4130 break;
4131
4132 case 129:
4133 case 131:
4134 $$[$0 - 2].push($$[$0]);
4135 this.$ = $$[$0 - 2];
4136 break;
4137
4138 case 133:
4139 this.$ = $$[$0 - 1] + $$[$0];
4140 break;
4141 }
4142 },
4143 table: [{
4144 3: 1,
4145 4: 2,
4146 9: $V0,
4147 10: $V1,
4148 12: $V2
4149 }, {
4150 1: [3]
4151 }, o($V3, $V4, {
4152 5: 6
4153 }), {
4154 4: 7,
4155 9: $V0,
4156 10: $V1,
4157 12: $V2
4158 }, {
4159 4: 8,
4160 9: $V0,
4161 10: $V1,
4162 12: $V2
4163 }, {
4164 10: [1, 9]
4165 }, {
4166 1: [2, 1],
4167 6: 10,
4168 7: 11,
4169 8: $V5,
4170 9: $V6,
4171 10: $V7,
4172 11: $V8,
4173 13: $V9,
4174 18: $Va,
4175 23: 16,
4176 25: 17,
4177 26: 18,
4178 27: 19,
4179 28: 20,
4180 29: 21,
4181 30: $Vb,
4182 31: 29,
4183 37: 23,
4184 45: 30,
4185 46: 32,
4186 47: $Vc,
4187 71: $Vd,
4188 72: $Ve,
4189 73: $Vf,
4190 74: $Vg,
4191 75: $Vh,
4192 85: $Vi,
4193 86: $Vj,
4194 89: $Vk,
4195 90: $Vl,
4196 92: $Vm,
4197 93: $Vn,
4198 95: $Vo,
4199 96: $Vp,
4200 97: $Vq,
4201 98: $Vr,
4202 99: $Vs
4203 }, o($V3, [2, 9]), o($V3, [2, 10]), {
4204 13: [1, 46],
4205 15: [1, 47],
4206 16: [1, 48],
4207 17: [1, 49],
4208 18: [1, 50]
4209 }, o($Vt, [2, 3]), o($Vt, [2, 4]), o($Vt, [2, 5]), o($Vt, [2, 6]), o($Vt, [2, 7]), o($Vt, [2, 8]), {
4210 8: $Vu,
4211 9: $Vv,
4212 11: $Vw,
4213 24: 51
4214 }, {
4215 8: $Vu,
4216 9: $Vv,
4217 11: $Vw,
4218 24: 55
4219 }, {
4220 8: $Vu,
4221 9: $Vv,
4222 11: $Vw,
4223 24: 56
4224 }, {
4225 8: $Vu,
4226 9: $Vv,
4227 11: $Vw,
4228 24: 57
4229 }, {
4230 8: $Vu,
4231 9: $Vv,
4232 11: $Vw,
4233 24: 58
4234 }, {
4235 8: $Vu,
4236 9: $Vv,
4237 11: $Vw,
4238 24: 59
4239 }, {
4240 8: $Vu,
4241 9: $Vv,
4242 10: [1, 60],
4243 11: $Vw,
4244 24: 61
4245 }, o($Vx, [2, 44], {
4246 38: 62,
4247 48: 63,
4248 51: [1, 64],
4249 52: [1, 67],
4250 53: [1, 68],
4251 54: [1, 69],
4252 55: [1, 70],
4253 56: [1, 65],
4254 57: [1, 71],
4255 58: [1, 72],
4256 59: [1, 73],
4257 60: [1, 74],
4258 61: [1, 66],
4259 62: [1, 75],
4260 63: [1, 76],
4261 64: [1, 77],
4262 65: [1, 78]
4263 }), {
4264 10: [1, 79]
4265 }, {
4266 10: [1, 80]
4267 }, {
4268 10: [1, 81]
4269 }, {
4270 10: [1, 82]
4271 }, {
4272 10: [1, 83]
4273 }, o($Vy, [2, 57], {
4274 46: 32,
4275 21: 89,
4276 45: 90,
4277 10: $Vz,
4278 13: $V9,
4279 15: [1, 88],
4280 18: $Va,
4281 32: [1, 84],
4282 39: [1, 85],
4283 41: [1, 86],
4284 43: [1, 87],
4285 47: $Vc,
4286 85: $Vi,
4287 86: $Vj,
4288 89: $Vk,
4289 90: $Vl,
4290 92: $Vm,
4291 93: $Vn,
4292 95: $Vo,
4293 96: $Vp,
4294 97: $Vq,
4295 98: $Vr,
4296 99: $Vs
4297 }), o($VA, [2, 59]), o($VA, [2, 61]), o($VA, [2, 62]), o($VA, [2, 63]), o($VA, [2, 64]), o($VB, [2, 158]), o($VB, [2, 159]), o($VB, [2, 160]), o($VB, [2, 161]), o($VB, [2, 162]), o($VB, [2, 163]), o($VB, [2, 164]), o($VB, [2, 165]), o($VB, [2, 166]), o($VB, [2, 167]), o($VB, [2, 168]), {
4298 8: $VC,
4299 9: $VD,
4300 10: $Vz,
4301 14: 92,
4302 21: 95
4303 }, {
4304 8: $VC,
4305 9: $VD,
4306 10: $Vz,
4307 14: 96,
4308 21: 95
4309 }, {
4310 8: $VC,
4311 9: $VD,
4312 10: $Vz,
4313 14: 97,
4314 21: 95
4315 }, {
4316 8: $VC,
4317 9: $VD,
4318 10: $Vz,
4319 14: 98,
4320 21: 95
4321 }, {
4322 8: $VC,
4323 9: $VD,
4324 10: $Vz,
4325 14: 99,
4326 21: 95
4327 }, o($Vt, [2, 30]), o($Vt, [2, 40]), o($Vt, [2, 41]), o($Vt, [2, 42]), o($Vt, [2, 31]), o($Vt, [2, 32]), o($Vt, [2, 33]), o($Vt, [2, 34]), o($Vt, [2, 35]), {
4328 13: $V9,
4329 18: $Va,
4330 31: 100,
4331 36: [1, 101],
4332 45: 30,
4333 46: 32,
4334 47: $Vc,
4335 85: $Vi,
4336 86: $Vj,
4337 89: $Vk,
4338 90: $Vl,
4339 92: $Vm,
4340 93: $Vn,
4341 95: $Vo,
4342 96: $Vp,
4343 97: $Vq,
4344 98: $Vr,
4345 99: $Vs
4346 }, o($VE, $V4, {
4347 5: 102
4348 }), {
4349 13: $V9,
4350 18: $Va,
4351 31: 29,
4352 37: 103,
4353 45: 30,
4354 46: 32,
4355 47: $Vc,
4356 85: $Vi,
4357 86: $Vj,
4358 89: $Vk,
4359 90: $Vl,
4360 92: $Vm,
4361 93: $Vn,
4362 95: $Vo,
4363 96: $Vp,
4364 97: $Vq,
4365 98: $Vr,
4366 99: $Vs
4367 }, o($VF, [2, 68], {
4368 49: 104,
4369 50: [1, 105],
4370 66: [1, 106]
4371 }), {
4372 10: $VG,
4373 12: $VH,
4374 13: $VI,
4375 15: $VJ,
4376 16: $VK,
4377 17: $VL,
4378 18: $VM,
4379 30: $VN,
4380 33: 107,
4381 35: $VO,
4382 36: $VP,
4383 46: 117,
4384 47: $VQ,
4385 51: $VR,
4386 61: $VS,
4387 67: 108,
4388 70: 120,
4389 71: $VT,
4390 72: $VU,
4391 73: $VV,
4392 74: $VW,
4393 75: $VX,
4394 77: 110,
4395 78: $VY,
4396 84: $VZ,
4397 85: $Vi,
4398 86: $Vj,
4399 89: $Vk,
4400 90: $Vl,
4401 92: $Vm,
4402 93: $Vn,
4403 95: $Vo,
4404 96: $Vp,
4405 97: $Vq,
4406 98: $Vr,
4407 99: $Vs
4408 }, {
4409 10: $VG,
4410 12: $VH,
4411 13: $VI,
4412 15: $VJ,
4413 16: $VK,
4414 17: $VL,
4415 18: $VM,
4416 30: $VN,
4417 33: 132,
4418 35: $VO,
4419 36: $VP,
4420 46: 117,
4421 47: $VQ,
4422 51: $VR,
4423 61: $VS,
4424 67: 108,
4425 70: 120,
4426 71: $VT,
4427 72: $VU,
4428 73: $VV,
4429 74: $VW,
4430 75: $VX,
4431 77: 110,
4432 78: $VY,
4433 84: $VZ,
4434 85: $Vi,
4435 86: $Vj,
4436 89: $Vk,
4437 90: $Vl,
4438 92: $Vm,
4439 93: $Vn,
4440 95: $Vo,
4441 96: $Vp,
4442 97: $Vq,
4443 98: $Vr,
4444 99: $Vs
4445 }, {
4446 10: $VG,
4447 12: $VH,
4448 13: $VI,
4449 15: $VJ,
4450 16: $VK,
4451 17: $VL,
4452 18: $VM,
4453 30: $VN,
4454 33: 133,
4455 35: $VO,
4456 36: $VP,
4457 46: 117,
4458 47: $VQ,
4459 51: $VR,
4460 61: $VS,
4461 67: 108,
4462 70: 120,
4463 71: $VT,
4464 72: $VU,
4465 73: $VV,
4466 74: $VW,
4467 75: $VX,
4468 77: 110,
4469 78: $VY,
4470 84: $VZ,
4471 85: $Vi,
4472 86: $Vj,
4473 89: $Vk,
4474 90: $Vl,
4475 92: $Vm,
4476 93: $Vn,
4477 95: $Vo,
4478 96: $Vp,
4479 97: $Vq,
4480 98: $Vr,
4481 99: $Vs
4482 }, o($V_, [2, 81]), o($V_, [2, 82]), o($V_, [2, 83]), o($V_, [2, 84]), o($V_, [2, 85]), o($V_, [2, 86]), o($V_, [2, 87]), o($V_, [2, 88]), o($V_, [2, 89]), o($V_, [2, 90]), o($V_, [2, 91]), o($V_, [2, 92]), {
4483 13: $V9,
4484 18: $Va,
4485 31: 134,
4486 45: 30,
4487 46: 32,
4488 47: $Vc,
4489 80: [1, 135],
4490 85: $Vi,
4491 86: $Vj,
4492 89: $Vk,
4493 90: $Vl,
4494 92: $Vm,
4495 93: $Vn,
4496 95: $Vo,
4497 96: $Vp,
4498 97: $Vq,
4499 98: $Vr,
4500 99: $Vs
4501 }, {
4502 78: [1, 136],
4503 81: 137,
4504 85: [1, 138]
4505 }, {
4506 13: $V9,
4507 18: $Va,
4508 31: 140,
4509 45: 30,
4510 46: 32,
4511 47: $Vc,
4512 78: [1, 139],
4513 85: $Vi,
4514 86: $Vj,
4515 89: $Vk,
4516 90: $Vl,
4517 92: $Vm,
4518 93: $Vn,
4519 95: $Vo,
4520 96: $Vp,
4521 97: $Vq,
4522 98: $Vr,
4523 99: $Vs
4524 }, {
4525 13: $V9,
4526 18: $Va,
4527 31: 141,
4528 45: 30,
4529 46: 32,
4530 47: $Vc,
4531 85: $Vi,
4532 86: $Vj,
4533 89: $Vk,
4534 90: $Vl,
4535 92: $Vm,
4536 93: $Vn,
4537 95: $Vo,
4538 96: $Vp,
4539 97: $Vq,
4540 98: $Vr,
4541 99: $Vs
4542 }, {
4543 13: $V9,
4544 18: $Va,
4545 31: 142,
4546 45: 30,
4547 46: 32,
4548 47: $Vc,
4549 85: $Vi,
4550 86: $Vj,
4551 89: $Vk,
4552 90: $Vl,
4553 92: $Vm,
4554 93: $Vn,
4555 95: $Vo,
4556 96: $Vp,
4557 97: $Vq,
4558 98: $Vr,
4559 99: $Vs
4560 }, {
4561 10: $VG,
4562 12: $VH,
4563 13: $VI,
4564 15: $VJ,
4565 16: $VK,
4566 17: $VL,
4567 18: $VM,
4568 30: $VN,
4569 33: 143,
4570 35: $VO,
4571 36: $VP,
4572 46: 117,
4573 47: $VQ,
4574 51: $VR,
4575 61: $VS,
4576 67: 108,
4577 70: 120,
4578 71: $VT,
4579 72: $VU,
4580 73: $VV,
4581 74: $VW,
4582 75: $VX,
4583 77: 110,
4584 78: $VY,
4585 84: $VZ,
4586 85: $Vi,
4587 86: $Vj,
4588 89: $Vk,
4589 90: $Vl,
4590 92: $Vm,
4591 93: $Vn,
4592 95: $Vo,
4593 96: $Vp,
4594 97: $Vq,
4595 98: $Vr,
4596 99: $Vs
4597 }, {
4598 10: $VG,
4599 12: $VH,
4600 13: $VI,
4601 15: $VJ,
4602 16: $VK,
4603 17: $VL,
4604 18: $VM,
4605 30: $VN,
4606 33: 145,
4607 35: $VO,
4608 36: $VP,
4609 39: [1, 144],
4610 46: 117,
4611 47: $VQ,
4612 51: $VR,
4613 61: $VS,
4614 67: 108,
4615 70: 120,
4616 71: $VT,
4617 72: $VU,
4618 73: $VV,
4619 74: $VW,
4620 75: $VX,
4621 77: 110,
4622 78: $VY,
4623 84: $VZ,
4624 85: $Vi,
4625 86: $Vj,
4626 89: $Vk,
4627 90: $Vl,
4628 92: $Vm,
4629 93: $Vn,
4630 95: $Vo,
4631 96: $Vp,
4632 97: $Vq,
4633 98: $Vr,
4634 99: $Vs
4635 }, {
4636 10: $VG,
4637 12: $VH,
4638 13: $VI,
4639 15: $VJ,
4640 16: $VK,
4641 17: $VL,
4642 18: $VM,
4643 30: $VN,
4644 33: 146,
4645 35: $VO,
4646 36: $VP,
4647 46: 117,
4648 47: $VQ,
4649 51: $VR,
4650 61: $VS,
4651 67: 108,
4652 70: 120,
4653 71: $VT,
4654 72: $VU,
4655 73: $VV,
4656 74: $VW,
4657 75: $VX,
4658 77: 110,
4659 78: $VY,
4660 84: $VZ,
4661 85: $Vi,
4662 86: $Vj,
4663 89: $Vk,
4664 90: $Vl,
4665 92: $Vm,
4666 93: $Vn,
4667 95: $Vo,
4668 96: $Vp,
4669 97: $Vq,
4670 98: $Vr,
4671 99: $Vs
4672 }, {
4673 10: $VG,
4674 12: $VH,
4675 13: $VI,
4676 15: $VJ,
4677 16: $VK,
4678 17: $VL,
4679 18: $VM,
4680 30: $VN,
4681 33: 147,
4682 35: $VO,
4683 36: $VP,
4684 46: 117,
4685 47: $VQ,
4686 51: $VR,
4687 61: $VS,
4688 67: 108,
4689 70: 120,
4690 71: $VT,
4691 72: $VU,
4692 73: $VV,
4693 74: $VW,
4694 75: $VX,
4695 77: 110,
4696 78: $VY,
4697 84: $VZ,
4698 85: $Vi,
4699 86: $Vj,
4700 89: $Vk,
4701 90: $Vl,
4702 92: $Vm,
4703 93: $Vn,
4704 95: $Vo,
4705 96: $Vp,
4706 97: $Vq,
4707 98: $Vr,
4708 99: $Vs
4709 }, {
4710 10: $VG,
4711 12: $VH,
4712 13: $VI,
4713 15: $VJ,
4714 16: $VK,
4715 17: $VL,
4716 18: $VM,
4717 30: $VN,
4718 33: 148,
4719 35: $VO,
4720 36: $VP,
4721 46: 117,
4722 47: $VQ,
4723 51: $VR,
4724 61: $VS,
4725 67: 108,
4726 70: 120,
4727 71: $VT,
4728 72: $VU,
4729 73: $VV,
4730 74: $VW,
4731 75: $VX,
4732 77: 110,
4733 78: $VY,
4734 84: $VZ,
4735 85: $Vi,
4736 86: $Vj,
4737 89: $Vk,
4738 90: $Vl,
4739 92: $Vm,
4740 93: $Vn,
4741 95: $Vo,
4742 96: $Vp,
4743 97: $Vq,
4744 98: $Vr,
4745 99: $Vs
4746 }, o($Vy, [2, 58]), o($VA, [2, 60]), o($Vy, [2, 29], {
4747 21: 149,
4748 10: $Vz
4749 }), o($V3, [2, 11]), o($V3, [2, 21]), o($V3, [2, 22]), {
4750 9: [1, 150]
4751 }, o($V3, [2, 12]), o($V3, [2, 13]), o($V3, [2, 14]), o($V3, [2, 15]), {
4752 8: $Vu,
4753 9: $Vv,
4754 11: $Vw,
4755 13: $V9,
4756 18: $Va,
4757 24: 152,
4758 32: [1, 151],
4759 45: 90,
4760 46: 32,
4761 47: $Vc,
4762 85: $Vi,
4763 86: $Vj,
4764 89: $Vk,
4765 90: $Vl,
4766 92: $Vm,
4767 93: $Vn,
4768 95: $Vo,
4769 96: $Vp,
4770 97: $Vq,
4771 98: $Vr,
4772 99: $Vs
4773 }, {
4774 8: $Vu,
4775 9: $Vv,
4776 11: $Vw,
4777 24: 153
4778 }, {
4779 6: 10,
4780 7: 11,
4781 8: $V5,
4782 9: $V6,
4783 10: $V7,
4784 11: $V8,
4785 13: $V9,
4786 18: $Va,
4787 23: 16,
4788 25: 17,
4789 26: 18,
4790 27: 19,
4791 28: 20,
4792 29: 21,
4793 30: $Vb,
4794 31: 29,
4795 35: [1, 154],
4796 37: 23,
4797 45: 30,
4798 46: 32,
4799 47: $Vc,
4800 71: $Vd,
4801 72: $Ve,
4802 73: $Vf,
4803 74: $Vg,
4804 75: $Vh,
4805 85: $Vi,
4806 86: $Vj,
4807 89: $Vk,
4808 90: $Vl,
4809 92: $Vm,
4810 93: $Vn,
4811 95: $Vo,
4812 96: $Vp,
4813 97: $Vq,
4814 98: $Vr,
4815 99: $Vs
4816 }, o($Vx, [2, 43]), o($VF, [2, 65], {
4817 10: [1, 155]
4818 }), {
4819 10: [1, 156]
4820 }, {
4821 10: $VG,
4822 12: $VH,
4823 13: $VI,
4824 15: $VJ,
4825 16: $VK,
4826 17: $VL,
4827 18: $VM,
4828 30: $VN,
4829 33: 157,
4830 35: $VO,
4831 36: $VP,
4832 46: 117,
4833 47: $VQ,
4834 51: $VR,
4835 61: $VS,
4836 67: 108,
4837 70: 120,
4838 71: $VT,
4839 72: $VU,
4840 73: $VV,
4841 74: $VW,
4842 75: $VX,
4843 77: 110,
4844 78: $VY,
4845 84: $VZ,
4846 85: $Vi,
4847 86: $Vj,
4848 89: $Vk,
4849 90: $Vl,
4850 92: $Vm,
4851 93: $Vn,
4852 95: $Vo,
4853 96: $Vp,
4854 97: $Vq,
4855 98: $Vr,
4856 99: $Vs
4857 }, {
4858 10: $VG,
4859 12: $VH,
4860 13: $VI,
4861 15: $VJ,
4862 16: $VK,
4863 17: $VL,
4864 18: $VM,
4865 30: $VN,
4866 35: $VO,
4867 46: 117,
4868 47: $VQ,
4869 51: $VR,
4870 52: [1, 158],
4871 53: [1, 159],
4872 54: [1, 160],
4873 55: [1, 161],
4874 61: $VS,
4875 67: 162,
4876 70: 120,
4877 71: $VT,
4878 72: $VU,
4879 73: $VV,
4880 74: $VW,
4881 75: $VX,
4882 77: 110,
4883 78: $VY,
4884 84: $VZ,
4885 85: $Vi,
4886 86: $Vj,
4887 89: $Vk,
4888 90: $Vl,
4889 92: $Vm,
4890 93: $Vn,
4891 95: $Vo,
4892 96: $Vp,
4893 97: $Vq,
4894 98: $Vr,
4895 99: $Vs
4896 }, o($V$, [2, 94]), o($V$, [2, 96]), o($V$, [2, 147]), o($V$, [2, 148]), o($V$, [2, 149]), o($V$, [2, 150]), o($V$, [2, 151]), o($V$, [2, 152]), o($V$, [2, 153]), o($V$, [2, 154]), o($V$, [2, 155]), o($V$, [2, 156]), o($V$, [2, 157]), o($V$, [2, 99]), o($V$, [2, 100]), o($V$, [2, 101]), o($V$, [2, 102]), o($V$, [2, 103]), o($V$, [2, 104]), o($V$, [2, 105]), o($V$, [2, 106]), o($V$, [2, 107]), o($V$, [2, 108]), o($V$, [2, 109]), {
4897 10: $VG,
4898 12: $VH,
4899 13: $VI,
4900 15: $VJ,
4901 16: $VK,
4902 17: $VL,
4903 18: $VM,
4904 30: $VN,
4905 35: $VO,
4906 46: 117,
4907 47: $VQ,
4908 51: $VR,
4909 57: [1, 163],
4910 58: [1, 164],
4911 59: [1, 165],
4912 60: [1, 166],
4913 61: $VS,
4914 67: 162,
4915 70: 120,
4916 71: $VT,
4917 72: $VU,
4918 73: $VV,
4919 74: $VW,
4920 75: $VX,
4921 77: 110,
4922 78: $VY,
4923 84: $VZ,
4924 85: $Vi,
4925 86: $Vj,
4926 89: $Vk,
4927 90: $Vl,
4928 92: $Vm,
4929 93: $Vn,
4930 95: $Vo,
4931 96: $Vp,
4932 97: $Vq,
4933 98: $Vr,
4934 99: $Vs
4935 }, {
4936 10: $VG,
4937 12: $VH,
4938 13: $VI,
4939 15: $VJ,
4940 16: $VK,
4941 17: $VL,
4942 18: $VM,
4943 30: $VN,
4944 35: $VO,
4945 46: 117,
4946 47: $VQ,
4947 51: $VR,
4948 61: $VS,
4949 62: [1, 167],
4950 63: [1, 168],
4951 64: [1, 169],
4952 65: [1, 170],
4953 67: 162,
4954 70: 120,
4955 71: $VT,
4956 72: $VU,
4957 73: $VV,
4958 74: $VW,
4959 75: $VX,
4960 77: 110,
4961 78: $VY,
4962 84: $VZ,
4963 85: $Vi,
4964 86: $Vj,
4965 89: $Vk,
4966 90: $Vl,
4967 92: $Vm,
4968 93: $Vn,
4969 95: $Vo,
4970 96: $Vp,
4971 97: $Vq,
4972 98: $Vr,
4973 99: $Vs
4974 }, {
4975 10: [1, 171],
4976 13: $V9,
4977 18: $Va,
4978 45: 90,
4979 46: 32,
4980 47: $Vc,
4981 85: $Vi,
4982 86: $Vj,
4983 89: $Vk,
4984 90: $Vl,
4985 92: $Vm,
4986 93: $Vn,
4987 95: $Vo,
4988 96: $Vp,
4989 97: $Vq,
4990 98: $Vr,
4991 99: $Vs
4992 }, {
4993 10: [1, 172]
4994 }, {
4995 10: [1, 173]
4996 }, {
4997 10: [1, 174],
4998 86: [1, 175]
4999 }, o($V01, [2, 128]), {
5000 10: [1, 176]
5001 }, {
5002 10: [1, 177],
5003 13: $V9,
5004 18: $Va,
5005 45: 90,
5006 46: 32,
5007 47: $Vc,
5008 85: $Vi,
5009 86: $Vj,
5010 89: $Vk,
5011 90: $Vl,
5012 92: $Vm,
5013 93: $Vn,
5014 95: $Vo,
5015 96: $Vp,
5016 97: $Vq,
5017 98: $Vr,
5018 99: $Vs
5019 }, {
5020 10: [1, 178],
5021 13: $V9,
5022 18: $Va,
5023 45: 90,
5024 46: 32,
5025 47: $Vc,
5026 85: $Vi,
5027 86: $Vj,
5028 89: $Vk,
5029 90: $Vl,
5030 92: $Vm,
5031 93: $Vn,
5032 95: $Vo,
5033 96: $Vp,
5034 97: $Vq,
5035 98: $Vr,
5036 99: $Vs
5037 }, {
5038 10: [1, 179],
5039 13: $V9,
5040 18: $Va,
5041 45: 90,
5042 46: 32,
5043 47: $Vc,
5044 85: $Vi,
5045 86: $Vj,
5046 89: $Vk,
5047 90: $Vl,
5048 92: $Vm,
5049 93: $Vn,
5050 95: $Vo,
5051 96: $Vp,
5052 97: $Vq,
5053 98: $Vr,
5054 99: $Vs
5055 }, {
5056 10: $VG,
5057 12: $VH,
5058 13: $VI,
5059 15: $VJ,
5060 16: $VK,
5061 17: $VL,
5062 18: $VM,
5063 30: $VN,
5064 34: [1, 180],
5065 35: $VO,
5066 46: 117,
5067 47: $VQ,
5068 51: $VR,
5069 61: $VS,
5070 67: 162,
5071 70: 120,
5072 71: $VT,
5073 72: $VU,
5074 73: $VV,
5075 74: $VW,
5076 75: $VX,
5077 77: 110,
5078 78: $VY,
5079 84: $VZ,
5080 85: $Vi,
5081 86: $Vj,
5082 89: $Vk,
5083 90: $Vl,
5084 92: $Vm,
5085 93: $Vn,
5086 95: $Vo,
5087 96: $Vp,
5088 97: $Vq,
5089 98: $Vr,
5090 99: $Vs
5091 }, {
5092 10: $VG,
5093 12: $VH,
5094 13: $VI,
5095 15: $VJ,
5096 16: $VK,
5097 17: $VL,
5098 18: $VM,
5099 30: $VN,
5100 33: 181,
5101 35: $VO,
5102 36: $VP,
5103 46: 117,
5104 47: $VQ,
5105 51: $VR,
5106 61: $VS,
5107 67: 108,
5108 70: 120,
5109 71: $VT,
5110 72: $VU,
5111 73: $VV,
5112 74: $VW,
5113 75: $VX,
5114 77: 110,
5115 78: $VY,
5116 84: $VZ,
5117 85: $Vi,
5118 86: $Vj,
5119 89: $Vk,
5120 90: $Vl,
5121 92: $Vm,
5122 93: $Vn,
5123 95: $Vo,
5124 96: $Vp,
5125 97: $Vq,
5126 98: $Vr,
5127 99: $Vs
5128 }, {
5129 10: $VG,
5130 12: $VH,
5131 13: $VI,
5132 15: $VJ,
5133 16: $VK,
5134 17: $VL,
5135 18: $VM,
5136 30: $VN,
5137 35: $VO,
5138 40: [1, 182],
5139 46: 117,
5140 47: $VQ,
5141 51: $VR,
5142 61: $VS,
5143 67: 162,
5144 70: 120,
5145 71: $VT,
5146 72: $VU,
5147 73: $VV,
5148 74: $VW,
5149 75: $VX,
5150 77: 110,
5151 78: $VY,
5152 84: $VZ,
5153 85: $Vi,
5154 86: $Vj,
5155 89: $Vk,
5156 90: $Vl,
5157 92: $Vm,
5158 93: $Vn,
5159 95: $Vo,
5160 96: $Vp,
5161 97: $Vq,
5162 98: $Vr,
5163 99: $Vs
5164 }, {
5165 10: $VG,
5166 12: $VH,
5167 13: $VI,
5168 15: $VJ,
5169 16: $VK,
5170 17: $VL,
5171 18: $VM,
5172 30: $VN,
5173 35: $VO,
5174 42: [1, 183],
5175 46: 117,
5176 47: $VQ,
5177 51: $VR,
5178 61: $VS,
5179 67: 162,
5180 70: 120,
5181 71: $VT,
5182 72: $VU,
5183 73: $VV,
5184 74: $VW,
5185 75: $VX,
5186 77: 110,
5187 78: $VY,
5188 84: $VZ,
5189 85: $Vi,
5190 86: $Vj,
5191 89: $Vk,
5192 90: $Vl,
5193 92: $Vm,
5194 93: $Vn,
5195 95: $Vo,
5196 96: $Vp,
5197 97: $Vq,
5198 98: $Vr,
5199 99: $Vs
5200 }, {
5201 10: $VG,
5202 12: $VH,
5203 13: $VI,
5204 15: $VJ,
5205 16: $VK,
5206 17: $VL,
5207 18: $VM,
5208 30: $VN,
5209 35: $VO,
5210 44: [1, 184],
5211 46: 117,
5212 47: $VQ,
5213 51: $VR,
5214 61: $VS,
5215 67: 162,
5216 70: 120,
5217 71: $VT,
5218 72: $VU,
5219 73: $VV,
5220 74: $VW,
5221 75: $VX,
5222 77: 110,
5223 78: $VY,
5224 84: $VZ,
5225 85: $Vi,
5226 86: $Vj,
5227 89: $Vk,
5228 90: $Vl,
5229 92: $Vm,
5230 93: $Vn,
5231 95: $Vo,
5232 96: $Vp,
5233 97: $Vq,
5234 98: $Vr,
5235 99: $Vs
5236 }, {
5237 10: $VG,
5238 12: $VH,
5239 13: $VI,
5240 15: $VJ,
5241 16: $VK,
5242 17: $VL,
5243 18: $VM,
5244 30: $VN,
5245 34: [1, 185],
5246 35: $VO,
5247 46: 117,
5248 47: $VQ,
5249 51: $VR,
5250 61: $VS,
5251 67: 162,
5252 70: 120,
5253 71: $VT,
5254 72: $VU,
5255 73: $VV,
5256 74: $VW,
5257 75: $VX,
5258 77: 110,
5259 78: $VY,
5260 84: $VZ,
5261 85: $Vi,
5262 86: $Vj,
5263 89: $Vk,
5264 90: $Vl,
5265 92: $Vm,
5266 93: $Vn,
5267 95: $Vo,
5268 96: $Vp,
5269 97: $Vq,
5270 98: $Vr,
5271 99: $Vs
5272 }, o($Vy, [2, 28]), o($V3, [2, 23]), {
5273 10: $VG,
5274 12: $VH,
5275 13: $VI,
5276 15: $VJ,
5277 16: $VK,
5278 17: $VL,
5279 18: $VM,
5280 30: $VN,
5281 33: 186,
5282 35: $VO,
5283 36: $VP,
5284 46: 117,
5285 47: $VQ,
5286 51: $VR,
5287 61: $VS,
5288 67: 108,
5289 70: 120,
5290 71: $VT,
5291 72: $VU,
5292 73: $VV,
5293 74: $VW,
5294 75: $VX,
5295 77: 110,
5296 78: $VY,
5297 84: $VZ,
5298 85: $Vi,
5299 86: $Vj,
5300 89: $Vk,
5301 90: $Vl,
5302 92: $Vm,
5303 93: $Vn,
5304 95: $Vo,
5305 96: $Vp,
5306 97: $Vq,
5307 98: $Vr,
5308 99: $Vs
5309 }, o($VE, $V4, {
5310 5: 187
5311 }), o($VE, $V4, {
5312 5: 188
5313 }), o($Vt, [2, 39]), o($VF, [2, 67]), o($VF, [2, 66]), {
5314 10: $VG,
5315 12: $VH,
5316 13: $VI,
5317 15: $VJ,
5318 16: $VK,
5319 17: $VL,
5320 18: $VM,
5321 30: $VN,
5322 35: $VO,
5323 46: 117,
5324 47: $VQ,
5325 51: $VR,
5326 61: $VS,
5327 66: [1, 189],
5328 67: 162,
5329 70: 120,
5330 71: $VT,
5331 72: $VU,
5332 73: $VV,
5333 74: $VW,
5334 75: $VX,
5335 77: 110,
5336 78: $VY,
5337 84: $VZ,
5338 85: $Vi,
5339 86: $Vj,
5340 89: $Vk,
5341 90: $Vl,
5342 92: $Vm,
5343 93: $Vn,
5344 95: $Vo,
5345 96: $Vp,
5346 97: $Vq,
5347 98: $Vr,
5348 99: $Vs
5349 }, o($VF, [2, 69]), o($VF, [2, 70]), o($VF, [2, 71]), o($VF, [2, 72]), o($V$, [2, 95]), o($VF, [2, 73]), o($VF, [2, 74]), o($VF, [2, 75]), o($VF, [2, 76]), o($VF, [2, 77]), o($VF, [2, 78]), o($VF, [2, 79]), o($VF, [2, 80]), {
5350 10: $V11,
5351 47: $V21,
5352 71: $V31,
5353 79: 190,
5354 80: $V41,
5355 84: $V51,
5356 85: $V61,
5357 87: 191,
5358 88: 192,
5359 89: $V71,
5360 90: $V81,
5361 91: $V91,
5362 92: $Va1,
5363 93: $Vb1
5364 }, {
5365 10: $V11,
5366 47: $V21,
5367 71: $V31,
5368 79: 204,
5369 80: $V41,
5370 84: $V51,
5371 85: $V61,
5372 87: 191,
5373 88: 192,
5374 89: $V71,
5375 90: $V81,
5376 91: $V91,
5377 92: $Va1,
5378 93: $Vb1
5379 }, {
5380 10: $V11,
5381 47: $V21,
5382 71: $V31,
5383 79: 205,
5384 80: $V41,
5385 82: [1, 206],
5386 84: $V51,
5387 85: $V61,
5388 87: 191,
5389 88: 192,
5390 89: $V71,
5391 90: $V81,
5392 91: $V91,
5393 92: $Va1,
5394 93: $Vb1
5395 }, {
5396 10: $V11,
5397 47: $V21,
5398 71: $V31,
5399 79: 207,
5400 80: $V41,
5401 82: [1, 208],
5402 84: $V51,
5403 85: $V61,
5404 87: 191,
5405 88: 192,
5406 89: $V71,
5407 90: $V81,
5408 91: $V91,
5409 92: $Va1,
5410 93: $Vb1
5411 }, {
5412 85: [1, 209]
5413 }, {
5414 10: $V11,
5415 47: $V21,
5416 71: $V31,
5417 79: 210,
5418 80: $V41,
5419 84: $V51,
5420 85: $V61,
5421 87: 191,
5422 88: 192,
5423 89: $V71,
5424 90: $V81,
5425 91: $V91,
5426 92: $Va1,
5427 93: $Vb1
5428 }, {
5429 10: $V11,
5430 47: $V21,
5431 71: $V31,
5432 79: 211,
5433 80: $V41,
5434 84: $V51,
5435 85: $V61,
5436 87: 191,
5437 88: 192,
5438 89: $V71,
5439 90: $V81,
5440 91: $V91,
5441 92: $Va1,
5442 93: $Vb1
5443 }, {
5444 13: $V9,
5445 18: $Va,
5446 31: 212,
5447 45: 30,
5448 46: 32,
5449 47: $Vc,
5450 85: $Vi,
5451 86: $Vj,
5452 89: $Vk,
5453 90: $Vl,
5454 92: $Vm,
5455 93: $Vn,
5456 95: $Vo,
5457 96: $Vp,
5458 97: $Vq,
5459 98: $Vr,
5460 99: $Vs
5461 }, {
5462 13: $V9,
5463 18: $Va,
5464 31: 213,
5465 36: [1, 214],
5466 45: 30,
5467 46: 32,
5468 47: $Vc,
5469 85: $Vi,
5470 86: $Vj,
5471 89: $Vk,
5472 90: $Vl,
5473 92: $Vm,
5474 93: $Vn,
5475 95: $Vo,
5476 96: $Vp,
5477 97: $Vq,
5478 98: $Vr,
5479 99: $Vs
5480 }, o($Vy, [2, 45], {
5481 21: 215,
5482 10: $Vz
5483 }), {
5484 10: $VG,
5485 12: $VH,
5486 13: $VI,
5487 15: $VJ,
5488 16: $VK,
5489 17: $VL,
5490 18: $VM,
5491 30: $VN,
5492 35: $VO,
5493 40: [1, 216],
5494 46: 117,
5495 47: $VQ,
5496 51: $VR,
5497 61: $VS,
5498 67: 162,
5499 70: 120,
5500 71: $VT,
5501 72: $VU,
5502 73: $VV,
5503 74: $VW,
5504 75: $VX,
5505 77: 110,
5506 78: $VY,
5507 84: $VZ,
5508 85: $Vi,
5509 86: $Vj,
5510 89: $Vk,
5511 90: $Vl,
5512 92: $Vm,
5513 93: $Vn,
5514 95: $Vo,
5515 96: $Vp,
5516 97: $Vq,
5517 98: $Vr,
5518 99: $Vs
5519 }, o($Vy, [2, 51], {
5520 21: 217,
5521 10: $Vz
5522 }), o($Vy, [2, 49], {
5523 21: 218,
5524 10: $Vz
5525 }), o($Vy, [2, 53], {
5526 21: 219,
5527 10: $Vz
5528 }), o($Vy, [2, 55], {
5529 21: 220,
5530 10: $Vz
5531 }), {
5532 10: $VG,
5533 12: $VH,
5534 13: $VI,
5535 15: $VJ,
5536 16: $VK,
5537 17: $VL,
5538 18: $VM,
5539 30: $VN,
5540 34: [1, 221],
5541 35: $VO,
5542 46: 117,
5543 47: $VQ,
5544 51: $VR,
5545 61: $VS,
5546 67: 162,
5547 70: 120,
5548 71: $VT,
5549 72: $VU,
5550 73: $VV,
5551 74: $VW,
5552 75: $VX,
5553 77: 110,
5554 78: $VY,
5555 84: $VZ,
5556 85: $Vi,
5557 86: $Vj,
5558 89: $Vk,
5559 90: $Vl,
5560 92: $Vm,
5561 93: $Vn,
5562 95: $Vo,
5563 96: $Vp,
5564 97: $Vq,
5565 98: $Vr,
5566 99: $Vs
5567 }, {
5568 6: 10,
5569 7: 11,
5570 8: $V5,
5571 9: $V6,
5572 10: $V7,
5573 11: $V8,
5574 13: $V9,
5575 18: $Va,
5576 23: 16,
5577 25: 17,
5578 26: 18,
5579 27: 19,
5580 28: 20,
5581 29: 21,
5582 30: $Vb,
5583 31: 29,
5584 35: [1, 222],
5585 37: 23,
5586 45: 30,
5587 46: 32,
5588 47: $Vc,
5589 71: $Vd,
5590 72: $Ve,
5591 73: $Vf,
5592 74: $Vg,
5593 75: $Vh,
5594 85: $Vi,
5595 86: $Vj,
5596 89: $Vk,
5597 90: $Vl,
5598 92: $Vm,
5599 93: $Vn,
5600 95: $Vo,
5601 96: $Vp,
5602 97: $Vq,
5603 98: $Vr,
5604 99: $Vs
5605 }, {
5606 6: 10,
5607 7: 11,
5608 8: $V5,
5609 9: $V6,
5610 10: $V7,
5611 11: $V8,
5612 13: $V9,
5613 18: $Va,
5614 23: 16,
5615 25: 17,
5616 26: 18,
5617 27: 19,
5618 28: 20,
5619 29: 21,
5620 30: $Vb,
5621 31: 29,
5622 35: [1, 223],
5623 37: 23,
5624 45: 30,
5625 46: 32,
5626 47: $Vc,
5627 71: $Vd,
5628 72: $Ve,
5629 73: $Vf,
5630 74: $Vg,
5631 75: $Vh,
5632 85: $Vi,
5633 86: $Vj,
5634 89: $Vk,
5635 90: $Vl,
5636 92: $Vm,
5637 93: $Vn,
5638 95: $Vo,
5639 96: $Vp,
5640 97: $Vq,
5641 98: $Vr,
5642 99: $Vs
5643 }, o([10, 13, 18, 47, 85, 86, 89, 90, 92, 93, 95, 96, 97, 98, 99], [2, 93]), o($Vx, [2, 119], {
5644 86: $Vc1
5645 }), o($Vd1, [2, 130], {
5646 88: 225,
5647 10: $V11,
5648 47: $V21,
5649 71: $V31,
5650 80: $V41,
5651 84: $V51,
5652 85: $V61,
5653 89: $V71,
5654 90: $V81,
5655 91: $V91,
5656 92: $Va1,
5657 93: $Vb1
5658 }), o($Ve1, [2, 132]), o($Ve1, [2, 134]), o($Ve1, [2, 135]), o($Ve1, [2, 136]), o($Ve1, [2, 137]), o($Ve1, [2, 138]), o($Ve1, [2, 139]), o($Ve1, [2, 140]), o($Ve1, [2, 141]), o($Ve1, [2, 142]), o($Ve1, [2, 143]), o($Ve1, [2, 144]), o($Vx, [2, 120], {
5659 86: $Vc1
5660 }), o($Vx, [2, 121], {
5661 86: $Vc1
5662 }), {
5663 10: [1, 226]
5664 }, o($Vx, [2, 122], {
5665 86: $Vc1
5666 }), {
5667 10: [1, 227]
5668 }, o($V01, [2, 129]), o($Vx, [2, 112], {
5669 86: $Vc1
5670 }), o($Vx, [2, 113], {
5671 86: $Vc1
5672 }), o($Vx, [2, 114], {
5673 46: 32,
5674 45: 90,
5675 13: $V9,
5676 18: $Va,
5677 47: $Vc,
5678 85: $Vi,
5679 86: $Vj,
5680 89: $Vk,
5681 90: $Vl,
5682 92: $Vm,
5683 93: $Vn,
5684 95: $Vo,
5685 96: $Vp,
5686 97: $Vq,
5687 98: $Vr,
5688 99: $Vs
5689 }), o($Vx, [2, 115], {
5690 46: 32,
5691 45: 90,
5692 10: [1, 228],
5693 13: $V9,
5694 18: $Va,
5695 47: $Vc,
5696 85: $Vi,
5697 86: $Vj,
5698 89: $Vk,
5699 90: $Vl,
5700 92: $Vm,
5701 93: $Vn,
5702 95: $Vo,
5703 96: $Vp,
5704 97: $Vq,
5705 98: $Vr,
5706 99: $Vs
5707 }), o($Vx, [2, 117], {
5708 10: [1, 229]
5709 }), o($Vy, [2, 46]), {
5710 40: [1, 230]
5711 }, o($Vy, [2, 52]), o($Vy, [2, 50]), o($Vy, [2, 54]), o($Vy, [2, 56]), {
5712 8: $Vu,
5713 9: $Vv,
5714 11: $Vw,
5715 24: 231
5716 }, o($Vt, [2, 38]), o($Vt, [2, 37]), {
5717 10: $V11,
5718 47: $V21,
5719 71: $V31,
5720 80: $V41,
5721 84: $V51,
5722 85: $V61,
5723 87: 232,
5724 88: 192,
5725 89: $V71,
5726 90: $V81,
5727 91: $V91,
5728 92: $Va1,
5729 93: $Vb1
5730 }, o($Ve1, [2, 133]), {
5731 13: $V9,
5732 18: $Va,
5733 31: 233,
5734 45: 30,
5735 46: 32,
5736 47: $Vc,
5737 85: $Vi,
5738 86: $Vj,
5739 89: $Vk,
5740 90: $Vl,
5741 92: $Vm,
5742 93: $Vn,
5743 95: $Vo,
5744 96: $Vp,
5745 97: $Vq,
5746 98: $Vr,
5747 99: $Vs
5748 }, {
5749 13: $V9,
5750 18: $Va,
5751 31: 234,
5752 45: 30,
5753 46: 32,
5754 47: $Vc,
5755 85: $Vi,
5756 86: $Vj,
5757 89: $Vk,
5758 90: $Vl,
5759 92: $Vm,
5760 93: $Vn,
5761 95: $Vo,
5762 96: $Vp,
5763 97: $Vq,
5764 98: $Vr,
5765 99: $Vs
5766 }, {
5767 36: [1, 235]
5768 }, {
5769 36: [1, 236]
5770 }, o($Vy, [2, 47], {
5771 21: 237,
5772 10: $Vz
5773 }), o($VE, $V4, {
5774 5: 238
5775 }), o($Vd1, [2, 131], {
5776 88: 225,
5777 10: $V11,
5778 47: $V21,
5779 71: $V31,
5780 80: $V41,
5781 84: $V51,
5782 85: $V61,
5783 89: $V71,
5784 90: $V81,
5785 91: $V91,
5786 92: $Va1,
5787 93: $Vb1
5788 }), o($Vx, [2, 125], {
5789 46: 32,
5790 45: 90,
5791 10: [1, 239],
5792 13: $V9,
5793 18: $Va,
5794 47: $Vc,
5795 85: $Vi,
5796 86: $Vj,
5797 89: $Vk,
5798 90: $Vl,
5799 92: $Vm,
5800 93: $Vn,
5801 95: $Vo,
5802 96: $Vp,
5803 97: $Vq,
5804 98: $Vr,
5805 99: $Vs
5806 }), o($Vx, [2, 126], {
5807 46: 32,
5808 45: 90,
5809 10: [1, 240],
5810 13: $V9,
5811 18: $Va,
5812 47: $Vc,
5813 85: $Vi,
5814 86: $Vj,
5815 89: $Vk,
5816 90: $Vl,
5817 92: $Vm,
5818 93: $Vn,
5819 95: $Vo,
5820 96: $Vp,
5821 97: $Vq,
5822 98: $Vr,
5823 99: $Vs
5824 }), o($Vx, [2, 116]), o($Vx, [2, 118]), o($Vy, [2, 48]), {
5825 6: 10,
5826 7: 11,
5827 8: $V5,
5828 9: $V6,
5829 10: $V7,
5830 11: $V8,
5831 13: $V9,
5832 18: $Va,
5833 23: 16,
5834 25: 17,
5835 26: 18,
5836 27: 19,
5837 28: 20,
5838 29: 21,
5839 30: $Vb,
5840 31: 29,
5841 35: [1, 241],
5842 37: 23,
5843 45: 30,
5844 46: 32,
5845 47: $Vc,
5846 71: $Vd,
5847 72: $Ve,
5848 73: $Vf,
5849 74: $Vg,
5850 75: $Vh,
5851 85: $Vi,
5852 86: $Vj,
5853 89: $Vk,
5854 90: $Vl,
5855 92: $Vm,
5856 93: $Vn,
5857 95: $Vo,
5858 96: $Vp,
5859 97: $Vq,
5860 98: $Vr,
5861 99: $Vs
5862 }, {
5863 10: $V11,
5864 47: $V21,
5865 71: $V31,
5866 79: 242,
5867 80: $V41,
5868 84: $V51,
5869 85: $V61,
5870 87: 191,
5871 88: 192,
5872 89: $V71,
5873 90: $V81,
5874 91: $V91,
5875 92: $Va1,
5876 93: $Vb1
5877 }, {
5878 10: $V11,
5879 47: $V21,
5880 71: $V31,
5881 79: 243,
5882 80: $V41,
5883 84: $V51,
5884 85: $V61,
5885 87: 191,
5886 88: 192,
5887 89: $V71,
5888 90: $V81,
5889 91: $V91,
5890 92: $Va1,
5891 93: $Vb1
5892 }, o($Vt, [2, 36]), o($Vx, [2, 123], {
5893 86: $Vc1
5894 }), o($Vx, [2, 124], {
5895 86: $Vc1
5896 })],
5897 defaultActions: {},
5898 parseError: function parseError(str, hash) {
5899 if (hash.recoverable) {
5900 this.trace(str);
5901 } else {
5902 var error = new Error(str);
5903 error.hash = hash;
5904 throw error;
5905 }
5906 },
5907 parse: function parse(input) {
5908 var self = this,
5909 stack = [0],
5910 tstack = [],
5911 vstack = [null],
5912 lstack = [],
5913 table = this.table,
5914 yytext = '',
5915 yylineno = 0,
5916 yyleng = 0,
5917 recovering = 0,
5918 TERROR = 2,
5919 EOF = 1;
5920 var args = lstack.slice.call(arguments, 1);
5921 var lexer = Object.create(this.lexer);
5922 var sharedState = {
5923 yy: {}
5924 };
5925
5926 for (var k in this.yy) {
5927 if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
5928 sharedState.yy[k] = this.yy[k];
5929 }
5930 }
5931
5932 lexer.setInput(input, sharedState.yy);
5933 sharedState.yy.lexer = lexer;
5934 sharedState.yy.parser = this;
5935
5936 if (typeof lexer.yylloc == 'undefined') {
5937 lexer.yylloc = {};
5938 }
5939
5940 var yyloc = lexer.yylloc;
5941 lstack.push(yyloc);
5942 var ranges = lexer.options && lexer.options.ranges;
5943
5944 if (typeof sharedState.yy.parseError === 'function') {
5945 this.parseError = sharedState.yy.parseError;
5946 } else {
5947 this.parseError = Object.getPrototypeOf(this).parseError;
5948 }
5949
5950 function popStack(n) {
5951 stack.length = stack.length - 2 * n;
5952 vstack.length = vstack.length - n;
5953 lstack.length = lstack.length - n;
5954 }
5955
5956 function lex() {
5957 var token;
5958 token = tstack.pop() || lexer.lex() || EOF;
5959
5960 if (typeof token !== 'number') {
5961 if (token instanceof Array) {
5962 tstack = token;
5963 token = tstack.pop();
5964 }
5965
5966 token = self.symbols_[token] || token;
5967 }
5968
5969 return token;
5970 }
5971
5972 var symbol,
5973 preErrorSymbol,
5974 state,
5975 action,
5976 a,
5977 r,
5978 yyval = {},
5979 p,
5980 len,
5981 newState,
5982 expected;
5983
5984 while (true) {
5985 state = stack[stack.length - 1];
5986
5987 if (this.defaultActions[state]) {
5988 action = this.defaultActions[state];
5989 } else {
5990 if (symbol === null || typeof symbol == 'undefined') {
5991 symbol = lex();
5992 }
5993
5994 action = table[state] && table[state][symbol];
5995 }
5996
5997 if (typeof action === 'undefined' || !action.length || !action[0]) {
5998 var errStr = '';
5999 expected = [];
6000
6001 for (p in table[state]) {
6002 if (this.terminals_[p] && p > TERROR) {
6003 expected.push('\'' + this.terminals_[p] + '\'');
6004 }
6005 }
6006
6007 if (lexer.showPosition) {
6008 errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
6009 } else {
6010 errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
6011 }
6012
6013 this.parseError(errStr, {
6014 text: lexer.match,
6015 token: this.terminals_[symbol] || symbol,
6016 line: lexer.yylineno,
6017 loc: yyloc,
6018 expected: expected
6019 });
6020 }
6021
6022 if (action[0] instanceof Array && action.length > 1) {
6023 throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
6024 }
6025
6026 switch (action[0]) {
6027 case 1:
6028 stack.push(symbol);
6029 vstack.push(lexer.yytext);
6030 lstack.push(lexer.yylloc);
6031 stack.push(action[1]);
6032 symbol = null;
6033
6034 if (!preErrorSymbol) {
6035 yyleng = lexer.yyleng;
6036 yytext = lexer.yytext;
6037 yylineno = lexer.yylineno;
6038 yyloc = lexer.yylloc;
6039
6040 if (recovering > 0) {
6041 recovering--;
6042 }
6043 } else {
6044 symbol = preErrorSymbol;
6045 preErrorSymbol = null;
6046 }
6047
6048 break;
6049
6050 case 2:
6051 len = this.productions_[action[1]][1];
6052 yyval.$ = vstack[vstack.length - len];
6053 yyval._$ = {
6054 first_line: lstack[lstack.length - (len || 1)].first_line,
6055 last_line: lstack[lstack.length - 1].last_line,
6056 first_column: lstack[lstack.length - (len || 1)].first_column,
6057 last_column: lstack[lstack.length - 1].last_column
6058 };
6059
6060 if (ranges) {
6061 yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
6062 }
6063
6064 r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));
6065
6066 if (typeof r !== 'undefined') {
6067 return r;
6068 }
6069
6070 if (len) {
6071 stack = stack.slice(0, -1 * len * 2);
6072 vstack = vstack.slice(0, -1 * len);
6073 lstack = lstack.slice(0, -1 * len);
6074 }
6075
6076 stack.push(this.productions_[action[1]][0]);
6077 vstack.push(yyval.$);
6078 lstack.push(yyval._$);
6079 newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
6080 stack.push(newState);
6081 break;
6082
6083 case 3:
6084 return true;
6085 }
6086 }
6087
6088 return true;
6089 }
6090 };
6091 /* generated by jison-lex 0.3.4 */
6092
6093 var lexer = function () {
6094 var lexer = {
6095 EOF: 1,
6096 parseError: function parseError(str, hash) {
6097 if (this.yy.parser) {
6098 this.yy.parser.parseError(str, hash);
6099 } else {
6100 throw new Error(str);
6101 }
6102 },
6103 // resets the lexer, sets new input
6104 setInput: function (input, yy) {
6105 this.yy = yy || this.yy || {};
6106 this._input = input;
6107 this._more = this._backtrack = this.done = false;
6108 this.yylineno = this.yyleng = 0;
6109 this.yytext = this.matched = this.match = '';
6110 this.conditionStack = ['INITIAL'];
6111 this.yylloc = {
6112 first_line: 1,
6113 first_column: 0,
6114 last_line: 1,
6115 last_column: 0
6116 };
6117
6118 if (this.options.ranges) {
6119 this.yylloc.range = [0, 0];
6120 }
6121
6122 this.offset = 0;
6123 return this;
6124 },
6125 // consumes and returns one char from the input
6126 input: function () {
6127 var ch = this._input[0];
6128 this.yytext += ch;
6129 this.yyleng++;
6130 this.offset++;
6131 this.match += ch;
6132 this.matched += ch;
6133 var lines = ch.match(/(?:\r\n?|\n).*/g);
6134
6135 if (lines) {
6136 this.yylineno++;
6137 this.yylloc.last_line++;
6138 } else {
6139 this.yylloc.last_column++;
6140 }
6141
6142 if (this.options.ranges) {
6143 this.yylloc.range[1]++;
6144 }
6145
6146 this._input = this._input.slice(1);
6147 return ch;
6148 },
6149 // unshifts one char (or a string) into the input
6150 unput: function (ch) {
6151 var len = ch.length;
6152 var lines = ch.split(/(?:\r\n?|\n)/g);
6153 this._input = ch + this._input;
6154 this.yytext = this.yytext.substr(0, this.yytext.length - len); //this.yyleng -= len;
6155
6156 this.offset -= len;
6157 var oldLines = this.match.split(/(?:\r\n?|\n)/g);
6158 this.match = this.match.substr(0, this.match.length - 1);
6159 this.matched = this.matched.substr(0, this.matched.length - 1);
6160
6161 if (lines.length - 1) {
6162 this.yylineno -= lines.length - 1;
6163 }
6164
6165 var r = this.yylloc.range;
6166 this.yylloc = {
6167 first_line: this.yylloc.first_line,
6168 last_line: this.yylineno + 1,
6169 first_column: this.yylloc.first_column,
6170 last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
6171 };
6172
6173 if (this.options.ranges) {
6174 this.yylloc.range = [r[0], r[0] + this.yyleng - len];
6175 }
6176
6177 this.yyleng = this.yytext.length;
6178 return this;
6179 },
6180 // When called from action, caches matched text and appends it on next action
6181 more: function () {
6182 this._more = true;
6183 return this;
6184 },
6185 // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
6186 reject: function () {
6187 if (this.options.backtrack_lexer) {
6188 this._backtrack = true;
6189 } else {
6190 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(), {
6191 text: "",
6192 token: null,
6193 line: this.yylineno
6194 });
6195 }
6196
6197 return this;
6198 },
6199 // retain first n characters of the match
6200 less: function (n) {
6201 this.unput(this.match.slice(n));
6202 },
6203 // displays already matched input, i.e. for error messages
6204 pastInput: function () {
6205 var past = this.matched.substr(0, this.matched.length - this.match.length);
6206 return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
6207 },
6208 // displays upcoming input, i.e. for error messages
6209 upcomingInput: function () {
6210 var next = this.match;
6211
6212 if (next.length < 20) {
6213 next += this._input.substr(0, 20 - next.length);
6214 }
6215
6216 return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
6217 },
6218 // displays the character position where the lexing error occurred, i.e. for error messages
6219 showPosition: function () {
6220 var pre = this.pastInput();
6221 var c = new Array(pre.length + 1).join("-");
6222 return pre + this.upcomingInput() + "\n" + c + "^";
6223 },
6224 // test the lexed token: return FALSE when not a match, otherwise return token
6225 test_match: function (match, indexed_rule) {
6226 var token, lines, backup;
6227
6228 if (this.options.backtrack_lexer) {
6229 // save context
6230 backup = {
6231 yylineno: this.yylineno,
6232 yylloc: {
6233 first_line: this.yylloc.first_line,
6234 last_line: this.last_line,
6235 first_column: this.yylloc.first_column,
6236 last_column: this.yylloc.last_column
6237 },
6238 yytext: this.yytext,
6239 match: this.match,
6240 matches: this.matches,
6241 matched: this.matched,
6242 yyleng: this.yyleng,
6243 offset: this.offset,
6244 _more: this._more,
6245 _input: this._input,
6246 yy: this.yy,
6247 conditionStack: this.conditionStack.slice(0),
6248 done: this.done
6249 };
6250
6251 if (this.options.ranges) {
6252 backup.yylloc.range = this.yylloc.range.slice(0);
6253 }
6254 }
6255
6256 lines = match[0].match(/(?:\r\n?|\n).*/g);
6257
6258 if (lines) {
6259 this.yylineno += lines.length;
6260 }
6261
6262 this.yylloc = {
6263 first_line: this.yylloc.last_line,
6264 last_line: this.yylineno + 1,
6265 first_column: this.yylloc.last_column,
6266 last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
6267 };
6268 this.yytext += match[0];
6269 this.match += match[0];
6270 this.matches = match;
6271 this.yyleng = this.yytext.length;
6272
6273 if (this.options.ranges) {
6274 this.yylloc.range = [this.offset, this.offset += this.yyleng];
6275 }
6276
6277 this._more = false;
6278 this._backtrack = false;
6279 this._input = this._input.slice(match[0].length);
6280 this.matched += match[0];
6281 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
6282
6283 if (this.done && this._input) {
6284 this.done = false;
6285 }
6286
6287 if (token) {
6288 return token;
6289 } else if (this._backtrack) {
6290 // recover context
6291 for (var k in backup) {
6292 this[k] = backup[k];
6293 }
6294
6295 return false; // rule action called reject() implying the next rule should be tested instead.
6296 }
6297
6298 return false;
6299 },
6300 // return next match in input
6301 next: function () {
6302 if (this.done) {
6303 return this.EOF;
6304 }
6305
6306 if (!this._input) {
6307 this.done = true;
6308 }
6309
6310 var token, match, tempMatch, index;
6311
6312 if (!this._more) {
6313 this.yytext = '';
6314 this.match = '';
6315 }
6316
6317 var rules = this._currentRules();
6318
6319 for (var i = 0; i < rules.length; i++) {
6320 tempMatch = this._input.match(this.rules[rules[i]]);
6321
6322 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
6323 match = tempMatch;
6324 index = i;
6325
6326 if (this.options.backtrack_lexer) {
6327 token = this.test_match(tempMatch, rules[i]);
6328
6329 if (token !== false) {
6330 return token;
6331 } else if (this._backtrack) {
6332 match = false;
6333 continue; // rule action called reject() implying a rule MISmatch.
6334 } else {
6335 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
6336 return false;
6337 }
6338 } else if (!this.options.flex) {
6339 break;
6340 }
6341 }
6342 }
6343
6344 if (match) {
6345 token = this.test_match(match, rules[index]);
6346
6347 if (token !== false) {
6348 return token;
6349 } // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
6350
6351
6352 return false;
6353 }
6354
6355 if (this._input === "") {
6356 return this.EOF;
6357 } else {
6358 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
6359 text: "",
6360 token: null,
6361 line: this.yylineno
6362 });
6363 }
6364 },
6365 // return next match that has a token
6366 lex: function lex() {
6367 var r = this.next();
6368
6369 if (r) {
6370 return r;
6371 } else {
6372 return this.lex();
6373 }
6374 },
6375 // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
6376 begin: function begin(condition) {
6377 this.conditionStack.push(condition);
6378 },
6379 // pop the previously active lexer condition state off the condition stack
6380 popState: function popState() {
6381 var n = this.conditionStack.length - 1;
6382
6383 if (n > 0) {
6384 return this.conditionStack.pop();
6385 } else {
6386 return this.conditionStack[0];
6387 }
6388 },
6389 // produce the lexer rule set which is active for the currently active lexer condition state
6390 _currentRules: function _currentRules() {
6391 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
6392 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
6393 } else {
6394 return this.conditions["INITIAL"].rules;
6395 }
6396 },
6397 // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
6398 topState: function topState(n) {
6399 n = this.conditionStack.length - 1 - Math.abs(n || 0);
6400
6401 if (n >= 0) {
6402 return this.conditionStack[n];
6403 } else {
6404 return "INITIAL";
6405 }
6406 },
6407 // alias for begin(condition)
6408 pushState: function pushState(condition) {
6409 this.begin(condition);
6410 },
6411 // return the number of states currently on the stack
6412 stateStackSize: function stateStackSize() {
6413 return this.conditionStack.length;
6414 },
6415 options: {},
6416 performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
6417 var YYSTATE = YY_START;
6418
6419 switch ($avoiding_name_collisions) {
6420 case 0:
6421 /* do nothing */
6422 break;
6423
6424 case 1:
6425 this.begin("string");
6426 break;
6427
6428 case 2:
6429 this.popState();
6430 break;
6431
6432 case 3:
6433 return "STR";
6434 break;
6435
6436 case 4:
6437 return 71;
6438 break;
6439
6440 case 5:
6441 return 78;
6442 break;
6443
6444 case 6:
6445 return 72;
6446 break;
6447
6448 case 7:
6449 return 82;
6450 break;
6451
6452 case 8:
6453 return 73;
6454 break;
6455
6456 case 9:
6457 return 74;
6458 break;
6459
6460 case 10:
6461 return 75;
6462 break;
6463
6464 case 11:
6465 return 12;
6466 break;
6467
6468 case 12:
6469 return 30;
6470 break;
6471
6472 case 13:
6473 return 35;
6474 break;
6475
6476 case 14:
6477 return 13;
6478 break;
6479
6480 case 15:
6481 return 13;
6482 break;
6483
6484 case 16:
6485 return 13;
6486 break;
6487
6488 case 17:
6489 return 13;
6490 break;
6491
6492 case 18:
6493 return 13;
6494 break;
6495
6496 case 19:
6497 return 13;
6498 break;
6499
6500 case 20:
6501 return 85;
6502 break;
6503
6504 case 21:
6505 return 92;
6506 break;
6507
6508 case 22:
6509 return 90;
6510 break;
6511
6512 case 23:
6513 return 8;
6514 break;
6515
6516 case 24:
6517 return 86;
6518 break;
6519
6520 case 25:
6521 return 99;
6522 break;
6523
6524 case 26:
6525 return 16;
6526 break;
6527
6528 case 27:
6529 return 15;
6530 break;
6531
6532 case 28:
6533 return 17;
6534 break;
6535
6536 case 29:
6537 return 18;
6538 break;
6539
6540 case 30:
6541 return 54;
6542 break;
6543
6544 case 31:
6545 return 52;
6546 break;
6547
6548 case 32:
6549 return 53;
6550 break;
6551
6552 case 33:
6553 return 55;
6554 break;
6555
6556 case 34:
6557 return 59;
6558 break;
6559
6560 case 35:
6561 return 57;
6562 break;
6563
6564 case 36:
6565 return 58;
6566 break;
6567
6568 case 37:
6569 return 60;
6570 break;
6571
6572 case 38:
6573 return 59;
6574 break;
6575
6576 case 39:
6577 return 57;
6578 break;
6579
6580 case 40:
6581 return 58;
6582 break;
6583
6584 case 41:
6585 return 60;
6586 break;
6587
6588 case 42:
6589 return 64;
6590 break;
6591
6592 case 43:
6593 return 62;
6594 break;
6595
6596 case 44:
6597 return 63;
6598 break;
6599
6600 case 45:
6601 return 65;
6602 break;
6603
6604 case 46:
6605 return 51;
6606 break;
6607
6608 case 47:
6609 return 56;
6610 break;
6611
6612 case 48:
6613 return 61;
6614 break;
6615
6616 case 49:
6617 return 41;
6618 break;
6619
6620 case 50:
6621 return 42;
6622 break;
6623
6624 case 51:
6625 return 47;
6626 break;
6627
6628 case 52:
6629 return 93;
6630 break;
6631
6632 case 53:
6633 return 97;
6634 break;
6635
6636 case 54:
6637 return 84;
6638 break;
6639
6640 case 55:
6641 return 98;
6642 break;
6643
6644 case 56:
6645 return 98;
6646 break;
6647
6648 case 57:
6649 return 89;
6650 break;
6651
6652 case 58:
6653 return 95;
6654 break;
6655
6656 case 59:
6657 return 96;
6658 break;
6659
6660 case 60:
6661 return 66;
6662 break;
6663
6664 case 61:
6665 return 39;
6666 break;
6667
6668 case 62:
6669 return 40;
6670 break;
6671
6672 case 63:
6673 return 32;
6674 break;
6675
6676 case 64:
6677 return 34;
6678 break;
6679
6680 case 65:
6681 return 43;
6682 break;
6683
6684 case 66:
6685 return 44;
6686 break;
6687
6688 case 67:
6689 return 102;
6690 break;
6691
6692 case 68:
6693 return 9;
6694 break;
6695
6696 case 69:
6697 return 10;
6698 break;
6699
6700 case 70:
6701 return 11;
6702 break;
6703 }
6704 },
6705 rules: [/^(?:%%[^\n]*)/, /^(?:["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:style\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\b)/, /^(?:class\b)/, /^(?:click\b)/, /^(?:graph\b)/, /^(?:subgraph\b)/, /^(?:end\b\s*)/, /^(?:LR\b)/, /^(?:RL\b)/, /^(?:TB\b)/, /^(?:BT\b)/, /^(?:TD\b)/, /^(?:BR\b)/, /^(?:[0-9]+)/, /^(?:#)/, /^(?::)/, /^(?:;)/, /^(?:,)/, /^(?:\*)/, /^(?:<)/, /^(?:>)/, /^(?:\^)/, /^(?:v\b)/, /^(?:\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*==[x]\s*)/, /^(?:\s*==>\s*)/, /^(?:\s*==[o]\s*)/, /^(?:\s*==[\=]\s*)/, /^(?:\s*--\s*)/, /^(?:\s*-\.\s*)/, /^(?:\s*==\s*)/, /^(?:\(-)/, /^(?:-\))/, /^(?:-)/, /^(?:\.)/, /^(?:\+)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:[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)/, /^(?:$)/],
6706 conditions: {
6707 "string": {
6708 "rules": [2, 3],
6709 "inclusive": false
6710 },
6711 "INITIAL": {
6712 "rules": [0, 1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 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],
6713 "inclusive": true
6714 }
6715 }
6716 };
6717 return lexer;
6718 }();
6719
6720 parser.lexer = lexer;
6721
6722 function Parser() {
6723 this.yy = {};
6724 }
6725
6726 Parser.prototype = parser;
6727 parser.Parser = Parser;
6728 return new Parser();
6729}();
6730
6731if (true) {
6732 exports.parser = parser;
6733 exports.Parser = parser.Parser;
6734
6735 exports.parse = function () {
6736 return parser.parse.apply(parser, arguments);
6737 };
6738
6739 exports.main = function commonjsMain(args) {
6740 if (!args[1]) {
6741 console.log('Usage: ' + args[0] + ' FILE');
6742 process.exit(1);
6743 }
6744
6745 var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
6746
6747 return exports.parser.parse(source);
6748 };
6749
6750 if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
6751 exports.main(process.argv.slice(1));
6752 }
6753}
6754/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
6755
6756/***/ }),
6757
6758/***/ "./src/diagrams/gantt/ganttDb.js":
6759/*!***************************************!*\
6760 !*** ./src/diagrams/gantt/ganttDb.js ***!
6761 \***************************************/
6762/*! exports provided: clear, setAxisFormat, getAxisFormat, setDateFormat, setExcludes, setTitle, getTitle, addSection, getTasks, addTask, findTaskById, addTaskOrg, setLink, setClass, setClickEvent, bindFunctions, default */
6763/***/ (function(module, __webpack_exports__, __webpack_require__) {
6764
6765"use strict";
6766__webpack_require__.r(__webpack_exports__);
6767/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
6768/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAxisFormat", function() { return setAxisFormat; });
6769/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAxisFormat", function() { return getAxisFormat; });
6770/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDateFormat", function() { return setDateFormat; });
6771/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setExcludes", function() { return setExcludes; });
6772/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTitle", function() { return setTitle; });
6773/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTitle", function() { return getTitle; });
6774/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addSection", function() { return addSection; });
6775/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTasks", function() { return getTasks; });
6776/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addTask", function() { return addTask; });
6777/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findTaskById", function() { return findTaskById; });
6778/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addTaskOrg", function() { return addTaskOrg; });
6779/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLink", function() { return setLink; });
6780/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setClass", function() { return setClass; });
6781/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setClickEvent", function() { return setClickEvent; });
6782/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindFunctions", function() { return bindFunctions; });
6783/* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moment-mini */ "moment-mini");
6784/* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment_mini__WEBPACK_IMPORTED_MODULE_0__);
6785/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
6786/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3 */ "d3");
6787/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_2__);
6788
6789
6790
6791let dateFormat = '';
6792let axisFormat = '';
6793let excludes = [];
6794let title = '';
6795let sections = [];
6796let tasks = [];
6797let currentSection = '';
6798const tags = ['active', 'done', 'crit', 'milestone'];
6799let funs = [];
6800const clear = function () {
6801 sections = [];
6802 tasks = [];
6803 currentSection = '';
6804 funs = [];
6805 title = '';
6806 taskCnt = 0;
6807 lastTask = undefined;
6808 lastTaskID = undefined;
6809 rawTasks = [];
6810};
6811const setAxisFormat = function (txt) {
6812 axisFormat = txt;
6813};
6814const getAxisFormat = function () {
6815 return axisFormat;
6816};
6817const setDateFormat = function (txt) {
6818 dateFormat = txt;
6819};
6820const setExcludes = function (txt) {
6821 excludes = txt.toLowerCase().split(/[\s,]+/);
6822};
6823const setTitle = function (txt) {
6824 title = txt;
6825};
6826const getTitle = function () {
6827 return title;
6828};
6829const addSection = function (txt) {
6830 currentSection = txt;
6831 sections.push(txt);
6832};
6833const getTasks = function () {
6834 let allItemsPricessed = compileTasks();
6835 const maxDepth = 10;
6836 let iterationCount = 0;
6837
6838 while (!allItemsPricessed && iterationCount < maxDepth) {
6839 allItemsPricessed = compileTasks();
6840 iterationCount++;
6841 }
6842
6843 tasks = rawTasks;
6844 return tasks;
6845};
6846
6847const isInvalidDate = function (date, dateFormat, excludes) {
6848 if (date.isoWeekday() >= 6 && excludes.indexOf('weekends') >= 0) {
6849 return true;
6850 }
6851
6852 if (excludes.indexOf(date.format('dddd').toLowerCase()) >= 0) {
6853 return true;
6854 }
6855
6856 return excludes.indexOf(date.format(dateFormat.trim())) >= 0;
6857};
6858
6859const checkTaskDates = function (task, dateFormat, excludes) {
6860 if (!excludes.length || task.manualEndTime) return;
6861 let startTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(task.startTime, dateFormat, true);
6862 startTime.add(1, 'd');
6863 let endTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(task.endTime, dateFormat, true);
6864 let renderEndTime = fixTaskDates(startTime, endTime, dateFormat, excludes);
6865 task.endTime = endTime.toDate();
6866 task.renderEndTime = renderEndTime;
6867};
6868
6869const fixTaskDates = function (startTime, endTime, dateFormat, excludes) {
6870 let invalid = false;
6871 let renderEndTime = null;
6872
6873 while (startTime.date() <= endTime.date()) {
6874 if (!invalid) {
6875 renderEndTime = endTime.toDate();
6876 }
6877
6878 invalid = isInvalidDate(startTime, dateFormat, excludes);
6879
6880 if (invalid) {
6881 endTime.add(1, 'd');
6882 }
6883
6884 startTime.add(1, 'd');
6885 }
6886
6887 return renderEndTime;
6888};
6889
6890const getStartDate = function (prevTime, dateFormat, str) {
6891 str = str.trim(); // Test for after
6892
6893 const re = /^after\s+([\d\w-]+)/;
6894 const afterStatement = re.exec(str.trim());
6895
6896 if (afterStatement !== null) {
6897 const task = findTaskById(afterStatement[1]);
6898
6899 if (typeof task === 'undefined') {
6900 const dt = new Date();
6901 dt.setHours(0, 0, 0, 0);
6902 return dt;
6903 }
6904
6905 return task.endTime;
6906 } // Check for actual date set
6907
6908
6909 let mDate = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(str, dateFormat.trim(), true);
6910
6911 if (mDate.isValid()) {
6912 return mDate.toDate();
6913 } else {
6914 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('Invalid date:' + str);
6915 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('With date format:' + dateFormat.trim());
6916 } // Default date - now
6917
6918
6919 return new Date();
6920};
6921
6922const getEndDate = function (prevTime, dateFormat, str) {
6923 str = str.trim(); // Check for actual date
6924
6925 let mDate = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(str, dateFormat.trim(), true);
6926
6927 if (mDate.isValid()) {
6928 return mDate.toDate();
6929 }
6930
6931 const d = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(prevTime); // Check for length
6932
6933 const re = /^([\d]+)([wdhms])/;
6934 const durationStatement = re.exec(str.trim());
6935
6936 if (durationStatement !== null) {
6937 switch (durationStatement[2]) {
6938 case 's':
6939 d.add(durationStatement[1], 'seconds');
6940 break;
6941
6942 case 'm':
6943 d.add(durationStatement[1], 'minutes');
6944 break;
6945
6946 case 'h':
6947 d.add(durationStatement[1], 'hours');
6948 break;
6949
6950 case 'd':
6951 d.add(durationStatement[1], 'days');
6952 break;
6953
6954 case 'w':
6955 d.add(durationStatement[1], 'weeks');
6956 break;
6957 }
6958 } // Default date - now
6959
6960
6961 return d.toDate();
6962};
6963
6964let taskCnt = 0;
6965
6966const parseId = function (idStr) {
6967 if (typeof idStr === 'undefined') {
6968 taskCnt = taskCnt + 1;
6969 return 'task' + taskCnt;
6970 }
6971
6972 return idStr;
6973}; // id, startDate, endDate
6974// id, startDate, length
6975// id, after x, endDate
6976// id, after x, length
6977// startDate, endDate
6978// startDate, length
6979// after x, endDate
6980// after x, length
6981// endDate
6982// length
6983
6984
6985const compileData = function (prevTask, dataStr) {
6986 let ds;
6987
6988 if (dataStr.substr(0, 1) === ':') {
6989 ds = dataStr.substr(1, dataStr.length);
6990 } else {
6991 ds = dataStr;
6992 }
6993
6994 const data = ds.split(',');
6995 const task = {}; // Get tags like active, done, crit and milestone
6996
6997 getTaskTags(data, task, tags);
6998
6999 for (let i = 0; i < data.length; i++) {
7000 data[i] = data[i].trim();
7001 }
7002
7003 let endTimeData = '';
7004
7005 switch (data.length) {
7006 case 1:
7007 task.id = parseId();
7008 task.startTime = prevTask.endTime;
7009 endTimeData = data[0];
7010 break;
7011
7012 case 2:
7013 task.id = parseId();
7014 task.startTime = getStartDate(undefined, dateFormat, data[0]);
7015 endTimeData = data[1];
7016 break;
7017
7018 case 3:
7019 task.id = parseId(data[0]);
7020 task.startTime = getStartDate(undefined, dateFormat, data[1]);
7021 endTimeData = data[2];
7022 break;
7023
7024 default:
7025 }
7026
7027 if (endTimeData) {
7028 task.endTime = getEndDate(task.startTime, dateFormat, endTimeData);
7029 task.manualEndTime = endTimeData === moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(task.endTime).format(dateFormat.trim());
7030 checkTaskDates(task, dateFormat, excludes);
7031 }
7032
7033 return task;
7034};
7035
7036const parseData = function (prevTaskId, dataStr) {
7037 let ds;
7038
7039 if (dataStr.substr(0, 1) === ':') {
7040 ds = dataStr.substr(1, dataStr.length);
7041 } else {
7042 ds = dataStr;
7043 }
7044
7045 const data = ds.split(',');
7046 const task = {}; // Get tags like active, done, crit and milestone
7047
7048 getTaskTags(data, task, tags);
7049
7050 for (let i = 0; i < data.length; i++) {
7051 data[i] = data[i].trim();
7052 }
7053
7054 switch (data.length) {
7055 case 1:
7056 task.id = parseId();
7057 task.startTime = {
7058 type: 'prevTaskEnd',
7059 id: prevTaskId
7060 };
7061 task.endTime = {
7062 data: data[0]
7063 };
7064 break;
7065
7066 case 2:
7067 task.id = parseId();
7068 task.startTime = {
7069 type: 'getStartDate',
7070 startData: data[0]
7071 };
7072 task.endTime = {
7073 data: data[1]
7074 };
7075 break;
7076
7077 case 3:
7078 task.id = parseId(data[0]);
7079 task.startTime = {
7080 type: 'getStartDate',
7081 startData: data[1]
7082 };
7083 task.endTime = {
7084 data: data[2]
7085 };
7086 break;
7087
7088 default:
7089 }
7090
7091 return task;
7092};
7093
7094let lastTask;
7095let lastTaskID;
7096let rawTasks = [];
7097const taskDb = {};
7098const addTask = function (descr, data) {
7099 const rawTask = {
7100 section: currentSection,
7101 type: currentSection,
7102 processed: false,
7103 manualEndTime: false,
7104 renderEndTime: null,
7105 raw: {
7106 data: data
7107 },
7108 task: descr,
7109 classes: []
7110 };
7111 const taskInfo = parseData(lastTaskID, data);
7112 rawTask.raw.startTime = taskInfo.startTime;
7113 rawTask.raw.endTime = taskInfo.endTime;
7114 rawTask.id = taskInfo.id;
7115 rawTask.prevTaskId = lastTaskID;
7116 rawTask.active = taskInfo.active;
7117 rawTask.done = taskInfo.done;
7118 rawTask.crit = taskInfo.crit;
7119 rawTask.milestone = taskInfo.milestone;
7120 const pos = rawTasks.push(rawTask);
7121 lastTaskID = rawTask.id; // Store cross ref
7122
7123 taskDb[rawTask.id] = pos - 1;
7124};
7125const findTaskById = function (id) {
7126 const pos = taskDb[id];
7127 return rawTasks[pos];
7128};
7129const addTaskOrg = function (descr, data) {
7130 const newTask = {
7131 section: currentSection,
7132 type: currentSection,
7133 description: descr,
7134 task: descr,
7135 classes: []
7136 };
7137 const taskInfo = compileData(lastTask, data);
7138 newTask.startTime = taskInfo.startTime;
7139 newTask.endTime = taskInfo.endTime;
7140 newTask.id = taskInfo.id;
7141 newTask.active = taskInfo.active;
7142 newTask.done = taskInfo.done;
7143 newTask.crit = taskInfo.crit;
7144 newTask.milestone = taskInfo.milestone;
7145 lastTask = newTask;
7146 tasks.push(newTask);
7147};
7148
7149const compileTasks = function () {
7150 const compileTask = function (pos) {
7151 const task = rawTasks[pos];
7152 let startTime = '';
7153
7154 switch (rawTasks[pos].raw.startTime.type) {
7155 case 'prevTaskEnd':
7156 const prevTask = findTaskById(task.prevTaskId);
7157 task.startTime = prevTask.endTime;
7158 break;
7159
7160 case 'getStartDate':
7161 startTime = getStartDate(undefined, dateFormat, rawTasks[pos].raw.startTime.startData);
7162
7163 if (startTime) {
7164 rawTasks[pos].startTime = startTime;
7165 }
7166
7167 break;
7168 }
7169
7170 if (rawTasks[pos].startTime) {
7171 rawTasks[pos].endTime = getEndDate(rawTasks[pos].startTime, dateFormat, rawTasks[pos].raw.endTime.data);
7172
7173 if (rawTasks[pos].endTime) {
7174 rawTasks[pos].processed = true;
7175 rawTasks[pos].manualEndTime = rawTasks[pos].raw.endTime.data === moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(rawTasks[pos].endTime).format(dateFormat.trim());
7176 checkTaskDates(rawTasks[pos], dateFormat, excludes);
7177 }
7178 }
7179
7180 return rawTasks[pos].processed;
7181 };
7182
7183 let allProcessed = true;
7184
7185 for (let i = 0; i < rawTasks.length; i++) {
7186 compileTask(i);
7187 allProcessed = allProcessed && rawTasks[i].processed;
7188 }
7189
7190 return allProcessed;
7191};
7192/**
7193 * Called by parser when a link is found. Adds the URL to the vertex data.
7194 * @param ids Comma separated list of ids
7195 * @param linkStr URL to create a link for
7196 */
7197
7198
7199const setLink = function (ids, linkStr) {
7200 ids.split(',').forEach(function (id) {
7201 let rawTask = findTaskById(id);
7202
7203 if (typeof rawTask !== 'undefined') {
7204 pushFun(id, () => {
7205 window.open(linkStr, '_self');
7206 });
7207 }
7208 });
7209 setClass(ids, 'clickable');
7210};
7211/**
7212 * Called by parser when a special node is found, e.g. a clickable element.
7213 * @param ids Comma separated list of ids
7214 * @param className Class to add
7215 */
7216
7217const setClass = function (ids, className) {
7218 ids.split(',').forEach(function (id) {
7219 let rawTask = findTaskById(id);
7220
7221 if (typeof rawTask !== 'undefined') {
7222 rawTask.classes.push(className);
7223 }
7224 });
7225};
7226
7227const setClickFun = function (id, functionName, functionArgs) {
7228 if (typeof functionName === 'undefined') {
7229 return;
7230 }
7231
7232 let argList = [];
7233
7234 if (typeof functionArgs === 'string') {
7235 /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */
7236 argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
7237
7238 for (let i = 0; i < argList.length; i++) {
7239 let item = argList[i].trim();
7240 /* Removes all double quotes at the start and end of an argument */
7241
7242 /* This preserves all starting and ending whitespace inside */
7243
7244 if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') {
7245 item = item.substr(1, item.length - 2);
7246 }
7247
7248 argList[i] = item;
7249 }
7250 }
7251
7252 let rawTask = findTaskById(id);
7253
7254 if (typeof rawTask !== 'undefined') {
7255 pushFun(id, () => {
7256 window[functionName](...argList);
7257 });
7258 }
7259};
7260/**
7261 * The callbackFunction is executed in a click event bound to the task with the specified id or the task's assigned text
7262 * @param id The task's id
7263 * @param callbackFunction A function to be executed when clicked on the task or the task's text
7264 */
7265
7266
7267const pushFun = function (id, callbackFunction) {
7268 funs.push(function (element) {
7269 const elem = d3__WEBPACK_IMPORTED_MODULE_2__["select"](element).select(`[id="${id}"]`);
7270
7271 if (elem !== null) {
7272 elem.on('click', function () {
7273 callbackFunction();
7274 });
7275 }
7276 });
7277 funs.push(function (element) {
7278 const elem = d3__WEBPACK_IMPORTED_MODULE_2__["select"](element).select(`[id="${id}-text"]`);
7279
7280 if (elem !== null) {
7281 elem.on('click', function () {
7282 callbackFunction();
7283 });
7284 }
7285 });
7286};
7287/**
7288 * Called by parser when a click definition is found. Registers an event handler.
7289 * @param ids Comma separated list of ids
7290 * @param functionName Function to be called on click
7291 * @param functionArgs Function args the function should be called with
7292 */
7293
7294
7295const setClickEvent = function (ids, functionName, functionArgs) {
7296 ids.split(',').forEach(function (id) {
7297 setClickFun(id, functionName, functionArgs);
7298 });
7299 setClass(ids, 'clickable');
7300};
7301/**
7302 * Binds all functions previously added to fun (specified through click) to the element
7303 * @param element
7304 */
7305
7306const bindFunctions = function (element) {
7307 funs.forEach(function (fun) {
7308 fun(element);
7309 });
7310};
7311/* harmony default export */ __webpack_exports__["default"] = ({
7312 clear,
7313 setDateFormat,
7314 setAxisFormat,
7315 getAxisFormat,
7316 setTitle,
7317 getTitle,
7318 addSection,
7319 getTasks,
7320 addTask,
7321 findTaskById,
7322 addTaskOrg,
7323 setExcludes,
7324 setClickEvent,
7325 setLink,
7326 bindFunctions
7327});
7328
7329function getTaskTags(data, task, tags) {
7330 let matchFound = true;
7331
7332 while (matchFound) {
7333 matchFound = false;
7334 tags.forEach(function (t) {
7335 const pattern = '^\\s*' + t + '\\s*$';
7336 const regex = new RegExp(pattern);
7337
7338 if (data[0].match(regex)) {
7339 task[t] = true;
7340 data.shift(1);
7341 matchFound = true;
7342 }
7343 });
7344 }
7345}
7346
7347/***/ }),
7348
7349/***/ "./src/diagrams/gantt/ganttRenderer.js":
7350/*!*********************************************!*\
7351 !*** ./src/diagrams/gantt/ganttRenderer.js ***!
7352 \*********************************************/
7353/*! exports provided: setConf, draw, default */
7354/***/ (function(module, __webpack_exports__, __webpack_require__) {
7355
7356"use strict";
7357__webpack_require__.r(__webpack_exports__);
7358/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
7359/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
7360/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
7361/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
7362/* harmony import */ var _parser_gantt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parser/gantt */ "./src/diagrams/gantt/parser/gantt.js");
7363/* harmony import */ var _parser_gantt__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_parser_gantt__WEBPACK_IMPORTED_MODULE_1__);
7364/* harmony import */ var _ganttDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ganttDb */ "./src/diagrams/gantt/ganttDb.js");
7365
7366
7367
7368_parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy = _ganttDb__WEBPACK_IMPORTED_MODULE_2__["default"];
7369const conf = {
7370 titleTopMargin: 25,
7371 barHeight: 20,
7372 barGap: 4,
7373 topPadding: 50,
7374 rightPadding: 75,
7375 leftPadding: 75,
7376 gridLineStartPadding: 35,
7377 fontSize: 11,
7378 fontFamily: '"Open-Sans", "sans-serif"'
7379};
7380const setConf = function (cnf) {
7381 const keys = Object.keys(cnf);
7382 keys.forEach(function (key) {
7383 conf[key] = cnf[key];
7384 });
7385};
7386let w;
7387const draw = function (text, id) {
7388 _parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.clear();
7389 _parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].parse(text);
7390 const elem = document.getElementById(id);
7391 w = elem.parentElement.offsetWidth;
7392
7393 if (typeof w === 'undefined') {
7394 w = 1200;
7395 }
7396
7397 if (typeof conf.useWidth !== 'undefined') {
7398 w = conf.useWidth;
7399 }
7400
7401 const taskArray = _parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.getTasks(); // Set height based on number of tasks
7402
7403 const h = taskArray.length * (conf.barHeight + conf.barGap) + 2 * conf.topPadding;
7404 elem.setAttribute('height', '100%'); // Set viewBox
7405
7406 elem.setAttribute('viewBox', '0 0 ' + w + ' ' + h);
7407 const svg = d3__WEBPACK_IMPORTED_MODULE_0__["select"](`[id="${id}"]`); // Set timescale
7408
7409 const timeScale = d3__WEBPACK_IMPORTED_MODULE_0__["scaleTime"]().domain([d3__WEBPACK_IMPORTED_MODULE_0__["min"](taskArray, function (d) {
7410 return d.startTime;
7411 }), d3__WEBPACK_IMPORTED_MODULE_0__["max"](taskArray, function (d) {
7412 return d.endTime;
7413 })]).rangeRound([0, w - conf.leftPadding - conf.rightPadding]);
7414 let categories = [];
7415
7416 for (let i = 0; i < taskArray.length; i++) {
7417 categories.push(taskArray[i].type);
7418 }
7419
7420 const catsUnfiltered = categories; // for vert labels
7421
7422 categories = checkUnique(categories);
7423 makeGant(taskArray, w, h);
7424
7425 if (typeof conf.useWidth !== 'undefined') {
7426 elem.setAttribute('width', w);
7427 }
7428
7429 svg.append('text').text(_parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.getTitle()).attr('x', w / 2).attr('y', conf.titleTopMargin).attr('class', 'titleText');
7430
7431 function makeGant(tasks, pageWidth, pageHeight) {
7432 const barHeight = conf.barHeight;
7433 const gap = barHeight + conf.barGap;
7434 const topPadding = conf.topPadding;
7435 const leftPadding = conf.leftPadding;
7436 const colorScale = d3__WEBPACK_IMPORTED_MODULE_0__["scaleLinear"]().domain([0, categories.length]).range(['#00B9FA', '#F95002']).interpolate(d3__WEBPACK_IMPORTED_MODULE_0__["interpolateHcl"]);
7437 makeGrid(leftPadding, topPadding, pageWidth, pageHeight);
7438 drawRects(tasks, gap, topPadding, leftPadding, barHeight, colorScale, pageWidth, pageHeight);
7439 vertLabels(gap, topPadding, leftPadding, barHeight, colorScale);
7440 drawToday(leftPadding, topPadding, pageWidth, pageHeight);
7441 }
7442
7443 function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w, h) {
7444 // Draw background rects covering the entire width of the graph, these form the section rows.
7445 svg.append('g').selectAll('rect').data(theArray).enter().append('rect').attr('x', 0).attr('y', function (d, i) {
7446 return i * theGap + theTopPad - 2;
7447 }).attr('width', function () {
7448 return w - conf.rightPadding / 2;
7449 }).attr('height', theGap).attr('class', function (d) {
7450 for (let i = 0; i < categories.length; i++) {
7451 if (d.type === categories[i]) {
7452 return 'section section' + i % conf.numberSectionStyles;
7453 }
7454 }
7455
7456 return 'section section0';
7457 }); // Draw the rects representing the tasks
7458
7459 const rectangles = svg.append('g').selectAll('rect').data(theArray).enter();
7460 rectangles.append('rect').attr('id', function (d) {
7461 return d.id;
7462 }).attr('rx', 3).attr('ry', 3).attr('x', function (d) {
7463 if (d.milestone) {
7464 return timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;
7465 }
7466
7467 return timeScale(d.startTime) + theSidePad;
7468 }).attr('y', function (d, i) {
7469 return i * theGap + theTopPad;
7470 }).attr('width', function (d) {
7471 if (d.milestone) {
7472 return theBarHeight;
7473 }
7474
7475 return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime);
7476 }).attr('height', theBarHeight).attr('transform-origin', function (d, i) {
7477 return (timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime))).toString() + 'px ' + (i * theGap + theTopPad + 0.5 * theBarHeight).toString() + 'px';
7478 }).attr('class', function (d) {
7479 const res = 'task';
7480 let classStr = '';
7481
7482 if (d.classes.length > 0) {
7483 classStr = d.classes.join(' ');
7484 }
7485
7486 let secNum = 0;
7487
7488 for (let i = 0; i < categories.length; i++) {
7489 if (d.type === categories[i]) {
7490 secNum = i % conf.numberSectionStyles;
7491 }
7492 }
7493
7494 let taskClass = '';
7495
7496 if (d.active) {
7497 if (d.crit) {
7498 taskClass += ' activeCrit';
7499 } else {
7500 taskClass = ' active';
7501 }
7502 } else if (d.done) {
7503 if (d.crit) {
7504 taskClass = ' doneCrit';
7505 } else {
7506 taskClass = ' done';
7507 }
7508 } else {
7509 if (d.crit) {
7510 taskClass += ' crit';
7511 }
7512 }
7513
7514 if (taskClass.length === 0) {
7515 taskClass = ' task';
7516 }
7517
7518 if (d.milestone) {
7519 taskClass = ' milestone ' + taskClass;
7520 }
7521
7522 taskClass += secNum;
7523 taskClass += ' ' + classStr;
7524 return res + taskClass;
7525 }); // Append task labels
7526
7527 rectangles.append('text').text(function (d) {
7528 return d.task;
7529 }).attr('font-size', conf.fontSize).attr('x', function (d) {
7530 let startX = timeScale(d.startTime);
7531 let endX = timeScale(d.renderEndTime || d.endTime);
7532
7533 if (d.milestone) {
7534 startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;
7535 }
7536
7537 if (d.milestone) {
7538 endX = startX + theBarHeight;
7539 }
7540
7541 const textWidth = this.getBBox().width; // Check id text width > width of rectangle
7542
7543 if (textWidth > endX - startX) {
7544 if (endX + textWidth + 1.5 * conf.leftPadding > w) {
7545 return startX + theSidePad - 5;
7546 } else {
7547 return endX + theSidePad + 5;
7548 }
7549 } else {
7550 return (endX - startX) / 2 + startX + theSidePad;
7551 }
7552 }).attr('y', function (d, i) {
7553 return i * theGap + conf.barHeight / 2 + (conf.fontSize / 2 - 2) + theTopPad;
7554 }).attr('text-height', theBarHeight).attr('class', function (d) {
7555 const startX = timeScale(d.startTime);
7556 let endX = timeScale(d.endTime);
7557
7558 if (d.milestone) {
7559 endX = startX + theBarHeight;
7560 }
7561
7562 const textWidth = this.getBBox().width;
7563 let classStr = '';
7564
7565 if (d.classes.length > 0) {
7566 classStr = d.classes.join(' ');
7567 }
7568
7569 let secNum = 0;
7570
7571 for (let i = 0; i < categories.length; i++) {
7572 if (d.type === categories[i]) {
7573 secNum = i % conf.numberSectionStyles;
7574 }
7575 }
7576
7577 let taskType = '';
7578
7579 if (d.active) {
7580 if (d.crit) {
7581 taskType = 'activeCritText' + secNum;
7582 } else {
7583 taskType = 'activeText' + secNum;
7584 }
7585 }
7586
7587 if (d.done) {
7588 if (d.crit) {
7589 taskType = taskType + ' doneCritText' + secNum;
7590 } else {
7591 taskType = taskType + ' doneText' + secNum;
7592 }
7593 } else {
7594 if (d.crit) {
7595 taskType = taskType + ' critText' + secNum;
7596 }
7597 }
7598
7599 if (d.milestone) {
7600 taskType += ' milestoneText';
7601 } // Check id text width > width of rectangle
7602
7603
7604 if (textWidth > endX - startX) {
7605 if (endX + textWidth + 1.5 * conf.leftPadding > w) {
7606 return classStr + ' taskTextOutsideLeft taskTextOutside' + secNum + ' ' + taskType;
7607 } else {
7608 return classStr + ' taskTextOutsideRight taskTextOutside' + secNum + ' ' + taskType;
7609 }
7610 } else {
7611 return classStr + ' taskText taskText' + secNum + ' ' + taskType;
7612 }
7613 });
7614 }
7615
7616 function makeGrid(theSidePad, theTopPad, w, h) {
7617 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'));
7618 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');
7619 }
7620
7621 function vertLabels(theGap, theTopPad) {
7622 const numOccurances = [];
7623 let prevGap = 0;
7624
7625 for (let i = 0; i < categories.length; i++) {
7626 numOccurances[i] = [categories[i], getCount(categories[i], catsUnfiltered)];
7627 }
7628
7629 svg.append('g') // without doing this, impossible to put grid lines behind text
7630 .selectAll('text').data(numOccurances).enter().append('text').text(function (d) {
7631 return d[0];
7632 }).attr('x', 10).attr('y', function (d, i) {
7633 if (i > 0) {
7634 for (let j = 0; j < i; j++) {
7635 prevGap += numOccurances[i - 1][1];
7636 return d[1] * theGap / 2 + prevGap * theGap + theTopPad;
7637 }
7638 } else {
7639 return d[1] * theGap / 2 + theTopPad;
7640 }
7641 }).attr('class', function (d) {
7642 for (let i = 0; i < categories.length; i++) {
7643 if (d[0] === categories[i]) {
7644 return 'sectionTitle sectionTitle' + i % conf.numberSectionStyles;
7645 }
7646 }
7647
7648 return 'sectionTitle';
7649 });
7650 }
7651
7652 function drawToday(theSidePad, theTopPad, w, h) {
7653 const todayG = svg.append('g').attr('class', 'today');
7654 const today = new Date();
7655 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');
7656 } // from this stackexchange question: http://stackoverflow.com/questions/1890203/unique-for-arrays-in-javascript
7657
7658
7659 function checkUnique(arr) {
7660 const hash = {};
7661 const result = [];
7662
7663 for (let i = 0, l = arr.length; i < l; ++i) {
7664 if (!hash.hasOwnProperty(arr[i])) {
7665 // it works with objects! in FF, at least
7666 hash[arr[i]] = true;
7667 result.push(arr[i]);
7668 }
7669 }
7670
7671 return result;
7672 } // from this stackexchange question: http://stackoverflow.com/questions/14227981/count-how-many-strings-in-an-array-have-duplicates-in-the-same-array
7673
7674
7675 function getCounts(arr) {
7676 let i = arr.length; // const to loop over
7677
7678 const obj = {}; // obj to store results
7679
7680 while (i) {
7681 obj[arr[--i]] = (obj[arr[i]] || 0) + 1; // count occurrences
7682 }
7683
7684 return obj;
7685 } // get specific from everything
7686
7687
7688 function getCount(word, arr) {
7689 return getCounts(arr)[word] || 0;
7690 }
7691};
7692/* harmony default export */ __webpack_exports__["default"] = ({
7693 setConf,
7694 draw
7695});
7696
7697/***/ }),
7698
7699/***/ "./src/diagrams/gantt/parser/gantt.js":
7700/*!********************************************!*\
7701 !*** ./src/diagrams/gantt/parser/gantt.js ***!
7702 \********************************************/
7703/*! no static exports found */
7704/***/ (function(module, exports, __webpack_require__) {
7705
7706/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
7707
7708/*
7709 Returns a Parser object of the following structure:
7710
7711 Parser: {
7712 yy: {}
7713 }
7714
7715 Parser.prototype: {
7716 yy: {},
7717 trace: function(),
7718 symbols_: {associative list: name ==> number},
7719 terminals_: {associative list: number ==> name},
7720 productions_: [...],
7721 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
7722 table: [...],
7723 defaultActions: {...},
7724 parseError: function(str, hash),
7725 parse: function(input),
7726
7727 lexer: {
7728 EOF: 1,
7729 parseError: function(str, hash),
7730 setInput: function(input),
7731 input: function(),
7732 unput: function(str),
7733 more: function(),
7734 less: function(n),
7735 pastInput: function(),
7736 upcomingInput: function(),
7737 showPosition: function(),
7738 test_match: function(regex_match_array, rule_index),
7739 next: function(),
7740 lex: function(),
7741 begin: function(condition),
7742 popState: function(),
7743 _currentRules: function(),
7744 topState: function(),
7745 pushState: function(condition),
7746
7747 options: {
7748 ranges: boolean (optional: true ==> token location info will include a .range[] member)
7749 flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
7750 backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
7751 },
7752
7753 performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
7754 rules: [...],
7755 conditions: {associative list: name ==> set},
7756 }
7757 }
7758
7759
7760 token location info (@$, _$, etc.): {
7761 first_line: n,
7762 last_line: n,
7763 first_column: n,
7764 last_column: n,
7765 range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
7766 }
7767
7768
7769 the parseError function receives a 'hash' object with these members for lexer and parser errors: {
7770 text: (matched text)
7771 token: (the produced terminal token, if any)
7772 line: (yylineno)
7773 }
7774 while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
7775 loc: (yylloc)
7776 expected: (string describing the set of expected tokens)
7777 recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
7778 }
7779*/
7780var parser = function () {
7781 var o = function (k, v, o, l) {
7782 for (o = o || {}, l = k.length; l--; o[k[l]] = v);
7783
7784 return o;
7785 },
7786 $V0 = [6, 8, 10, 11, 12, 13, 14, 15, 17, 19],
7787 $V1 = [1, 9],
7788 $V2 = [1, 10],
7789 $V3 = [1, 11],
7790 $V4 = [1, 12],
7791 $V5 = [1, 13],
7792 $V6 = [1, 15],
7793 $V7 = [1, 16];
7794
7795 var parser = {
7796 trace: function trace() {},
7797 yy: {},
7798 symbols_: {
7799 "error": 2,
7800 "start": 3,
7801 "gantt": 4,
7802 "document": 5,
7803 "EOF": 6,
7804 "line": 7,
7805 "SPACE": 8,
7806 "statement": 9,
7807 "NL": 10,
7808 "dateFormat": 11,
7809 "axisFormat": 12,
7810 "excludes": 13,
7811 "title": 14,
7812 "section": 15,
7813 "clickStatement": 16,
7814 "taskTxt": 17,
7815 "taskData": 18,
7816 "click": 19,
7817 "callbackname": 20,
7818 "callbackargs": 21,
7819 "href": 22,
7820 "clickStatementDebug": 23,
7821 "$accept": 0,
7822 "$end": 1
7823 },
7824 terminals_: {
7825 2: "error",
7826 4: "gantt",
7827 6: "EOF",
7828 8: "SPACE",
7829 10: "NL",
7830 11: "dateFormat",
7831 12: "axisFormat",
7832 13: "excludes",
7833 14: "title",
7834 15: "section",
7835 17: "taskTxt",
7836 18: "taskData",
7837 19: "click",
7838 20: "callbackname",
7839 21: "callbackargs",
7840 22: "href"
7841 },
7842 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, 2], [16, 2], [16, 3], [16, 3], [16, 4], [16, 3], [16, 4], [16, 2], [23, 2], [23, 3], [23, 3], [23, 4], [23, 3], [23, 4], [23, 2]],
7843 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate
7844 /* action[1] */
7845 , $$
7846 /* vstack */
7847 , _$
7848 /* lstack */
7849 ) {
7850 /* this == yyval */
7851 var $0 = $$.length - 1;
7852
7853 switch (yystate) {
7854 case 1:
7855 return $$[$0 - 1];
7856 break;
7857
7858 case 2:
7859 this.$ = [];
7860 break;
7861
7862 case 3:
7863 $$[$0 - 1].push($$[$0]);
7864 this.$ = $$[$0 - 1];
7865 break;
7866
7867 case 4:
7868 case 5:
7869 this.$ = $$[$0];
7870 break;
7871
7872 case 6:
7873 case 7:
7874 this.$ = [];
7875 break;
7876
7877 case 8:
7878 yy.setDateFormat($$[$0].substr(11));
7879 this.$ = $$[$0].substr(11);
7880 break;
7881
7882 case 9:
7883 yy.setAxisFormat($$[$0].substr(11));
7884 this.$ = $$[$0].substr(11);
7885 break;
7886
7887 case 10:
7888 yy.setExcludes($$[$0].substr(9));
7889 this.$ = $$[$0].substr(9);
7890 break;
7891
7892 case 11:
7893 yy.setTitle($$[$0].substr(6));
7894 this.$ = $$[$0].substr(6);
7895 break;
7896
7897 case 12:
7898 yy.addSection($$[$0].substr(8));
7899 this.$ = $$[$0].substr(8);
7900 break;
7901
7902 case 14:
7903 yy.addTask($$[$0 - 1], $$[$0]);
7904 this.$ = 'task';
7905 break;
7906
7907 case 15:
7908 this.$ = $$[$0 - 1];
7909 yy.setClickEvent($$[$0 - 1], $$[$0], null);
7910 break;
7911
7912 case 16:
7913 this.$ = $$[$0 - 2];
7914 yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);
7915 break;
7916
7917 case 17:
7918 this.$ = $$[$0 - 2];
7919 yy.setClickEvent($$[$0 - 2], $$[$0 - 1], null);
7920 yy.setLink($$[$0 - 2], $$[$0]);
7921 break;
7922
7923 case 18:
7924 this.$ = $$[$0 - 3];
7925 yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]);
7926 yy.setLink($$[$0 - 3], $$[$0]);
7927 break;
7928
7929 case 19:
7930 this.$ = $$[$0 - 2];
7931 yy.setClickEvent($$[$0 - 2], $$[$0], null);
7932 yy.setLink($$[$0 - 2], $$[$0 - 1]);
7933 break;
7934
7935 case 20:
7936 this.$ = $$[$0 - 3];
7937 yy.setClickEvent($$[$0 - 3], $$[$0 - 1], $$[$0]);
7938 yy.setLink($$[$0 - 3], $$[$0 - 2]);
7939 break;
7940
7941 case 21:
7942 this.$ = $$[$0 - 1];
7943 yy.setLink($$[$0 - 1], $$[$0]);
7944 break;
7945
7946 case 22:
7947 case 28:
7948 this.$ = $$[$0 - 1] + ' ' + $$[$0];
7949 break;
7950
7951 case 23:
7952 case 24:
7953 case 26:
7954 this.$ = $$[$0 - 2] + ' ' + $$[$0 - 1] + ' ' + $$[$0];
7955 break;
7956
7957 case 25:
7958 case 27:
7959 this.$ = $$[$0 - 3] + ' ' + $$[$0 - 2] + ' ' + $$[$0 - 1] + ' ' + $$[$0];
7960 break;
7961 }
7962 },
7963 table: [{
7964 3: 1,
7965 4: [1, 2]
7966 }, {
7967 1: [3]
7968 }, o($V0, [2, 2], {
7969 5: 3
7970 }), {
7971 6: [1, 4],
7972 7: 5,
7973 8: [1, 6],
7974 9: 7,
7975 10: [1, 8],
7976 11: $V1,
7977 12: $V2,
7978 13: $V3,
7979 14: $V4,
7980 15: $V5,
7981 16: 14,
7982 17: $V6,
7983 19: $V7
7984 }, o($V0, [2, 7], {
7985 1: [2, 1]
7986 }), o($V0, [2, 3]), {
7987 9: 17,
7988 11: $V1,
7989 12: $V2,
7990 13: $V3,
7991 14: $V4,
7992 15: $V5,
7993 16: 14,
7994 17: $V6,
7995 19: $V7
7996 }, 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]), {
7997 18: [1, 18]
7998 }, {
7999 20: [1, 19],
8000 22: [1, 20]
8001 }, o($V0, [2, 4]), o($V0, [2, 14]), o($V0, [2, 15], {
8002 21: [1, 21],
8003 22: [1, 22]
8004 }), o($V0, [2, 21], {
8005 20: [1, 23]
8006 }), o($V0, [2, 16], {
8007 22: [1, 24]
8008 }), o($V0, [2, 17]), o($V0, [2, 19], {
8009 21: [1, 25]
8010 }), o($V0, [2, 18]), o($V0, [2, 20])],
8011 defaultActions: {},
8012 parseError: function parseError(str, hash) {
8013 if (hash.recoverable) {
8014 this.trace(str);
8015 } else {
8016 var error = new Error(str);
8017 error.hash = hash;
8018 throw error;
8019 }
8020 },
8021 parse: function parse(input) {
8022 var self = this,
8023 stack = [0],
8024 tstack = [],
8025 vstack = [null],
8026 lstack = [],
8027 table = this.table,
8028 yytext = '',
8029 yylineno = 0,
8030 yyleng = 0,
8031 recovering = 0,
8032 TERROR = 2,
8033 EOF = 1;
8034 var args = lstack.slice.call(arguments, 1);
8035 var lexer = Object.create(this.lexer);
8036 var sharedState = {
8037 yy: {}
8038 };
8039
8040 for (var k in this.yy) {
8041 if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
8042 sharedState.yy[k] = this.yy[k];
8043 }
8044 }
8045
8046 lexer.setInput(input, sharedState.yy);
8047 sharedState.yy.lexer = lexer;
8048 sharedState.yy.parser = this;
8049
8050 if (typeof lexer.yylloc == 'undefined') {
8051 lexer.yylloc = {};
8052 }
8053
8054 var yyloc = lexer.yylloc;
8055 lstack.push(yyloc);
8056 var ranges = lexer.options && lexer.options.ranges;
8057
8058 if (typeof sharedState.yy.parseError === 'function') {
8059 this.parseError = sharedState.yy.parseError;
8060 } else {
8061 this.parseError = Object.getPrototypeOf(this).parseError;
8062 }
8063
8064 function popStack(n) {
8065 stack.length = stack.length - 2 * n;
8066 vstack.length = vstack.length - n;
8067 lstack.length = lstack.length - n;
8068 }
8069
8070 function lex() {
8071 var token;
8072 token = tstack.pop() || lexer.lex() || EOF;
8073
8074 if (typeof token !== 'number') {
8075 if (token instanceof Array) {
8076 tstack = token;
8077 token = tstack.pop();
8078 }
8079
8080 token = self.symbols_[token] || token;
8081 }
8082
8083 return token;
8084 }
8085
8086 var symbol,
8087 preErrorSymbol,
8088 state,
8089 action,
8090 a,
8091 r,
8092 yyval = {},
8093 p,
8094 len,
8095 newState,
8096 expected;
8097
8098 while (true) {
8099 state = stack[stack.length - 1];
8100
8101 if (this.defaultActions[state]) {
8102 action = this.defaultActions[state];
8103 } else {
8104 if (symbol === null || typeof symbol == 'undefined') {
8105 symbol = lex();
8106 }
8107
8108 action = table[state] && table[state][symbol];
8109 }
8110
8111 if (typeof action === 'undefined' || !action.length || !action[0]) {
8112 var errStr = '';
8113 expected = [];
8114
8115 for (p in table[state]) {
8116 if (this.terminals_[p] && p > TERROR) {
8117 expected.push('\'' + this.terminals_[p] + '\'');
8118 }
8119 }
8120
8121 if (lexer.showPosition) {
8122 errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
8123 } else {
8124 errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
8125 }
8126
8127 this.parseError(errStr, {
8128 text: lexer.match,
8129 token: this.terminals_[symbol] || symbol,
8130 line: lexer.yylineno,
8131 loc: yyloc,
8132 expected: expected
8133 });
8134 }
8135
8136 if (action[0] instanceof Array && action.length > 1) {
8137 throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
8138 }
8139
8140 switch (action[0]) {
8141 case 1:
8142 stack.push(symbol);
8143 vstack.push(lexer.yytext);
8144 lstack.push(lexer.yylloc);
8145 stack.push(action[1]);
8146 symbol = null;
8147
8148 if (!preErrorSymbol) {
8149 yyleng = lexer.yyleng;
8150 yytext = lexer.yytext;
8151 yylineno = lexer.yylineno;
8152 yyloc = lexer.yylloc;
8153
8154 if (recovering > 0) {
8155 recovering--;
8156 }
8157 } else {
8158 symbol = preErrorSymbol;
8159 preErrorSymbol = null;
8160 }
8161
8162 break;
8163
8164 case 2:
8165 len = this.productions_[action[1]][1];
8166 yyval.$ = vstack[vstack.length - len];
8167 yyval._$ = {
8168 first_line: lstack[lstack.length - (len || 1)].first_line,
8169 last_line: lstack[lstack.length - 1].last_line,
8170 first_column: lstack[lstack.length - (len || 1)].first_column,
8171 last_column: lstack[lstack.length - 1].last_column
8172 };
8173
8174 if (ranges) {
8175 yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
8176 }
8177
8178 r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));
8179
8180 if (typeof r !== 'undefined') {
8181 return r;
8182 }
8183
8184 if (len) {
8185 stack = stack.slice(0, -1 * len * 2);
8186 vstack = vstack.slice(0, -1 * len);
8187 lstack = lstack.slice(0, -1 * len);
8188 }
8189
8190 stack.push(this.productions_[action[1]][0]);
8191 vstack.push(yyval.$);
8192 lstack.push(yyval._$);
8193 newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
8194 stack.push(newState);
8195 break;
8196
8197 case 3:
8198 return true;
8199 }
8200 }
8201
8202 return true;
8203 }
8204 };
8205 /* generated by jison-lex 0.3.4 */
8206
8207 var lexer = function () {
8208 var lexer = {
8209 EOF: 1,
8210 parseError: function parseError(str, hash) {
8211 if (this.yy.parser) {
8212 this.yy.parser.parseError(str, hash);
8213 } else {
8214 throw new Error(str);
8215 }
8216 },
8217 // resets the lexer, sets new input
8218 setInput: function (input, yy) {
8219 this.yy = yy || this.yy || {};
8220 this._input = input;
8221 this._more = this._backtrack = this.done = false;
8222 this.yylineno = this.yyleng = 0;
8223 this.yytext = this.matched = this.match = '';
8224 this.conditionStack = ['INITIAL'];
8225 this.yylloc = {
8226 first_line: 1,
8227 first_column: 0,
8228 last_line: 1,
8229 last_column: 0
8230 };
8231
8232 if (this.options.ranges) {
8233 this.yylloc.range = [0, 0];
8234 }
8235
8236 this.offset = 0;
8237 return this;
8238 },
8239 // consumes and returns one char from the input
8240 input: function () {
8241 var ch = this._input[0];
8242 this.yytext += ch;
8243 this.yyleng++;
8244 this.offset++;
8245 this.match += ch;
8246 this.matched += ch;
8247 var lines = ch.match(/(?:\r\n?|\n).*/g);
8248
8249 if (lines) {
8250 this.yylineno++;
8251 this.yylloc.last_line++;
8252 } else {
8253 this.yylloc.last_column++;
8254 }
8255
8256 if (this.options.ranges) {
8257 this.yylloc.range[1]++;
8258 }
8259
8260 this._input = this._input.slice(1);
8261 return ch;
8262 },
8263 // unshifts one char (or a string) into the input
8264 unput: function (ch) {
8265 var len = ch.length;
8266 var lines = ch.split(/(?:\r\n?|\n)/g);
8267 this._input = ch + this._input;
8268 this.yytext = this.yytext.substr(0, this.yytext.length - len); //this.yyleng -= len;
8269
8270 this.offset -= len;
8271 var oldLines = this.match.split(/(?:\r\n?|\n)/g);
8272 this.match = this.match.substr(0, this.match.length - 1);
8273 this.matched = this.matched.substr(0, this.matched.length - 1);
8274
8275 if (lines.length - 1) {
8276 this.yylineno -= lines.length - 1;
8277 }
8278
8279 var r = this.yylloc.range;
8280 this.yylloc = {
8281 first_line: this.yylloc.first_line,
8282 last_line: this.yylineno + 1,
8283 first_column: this.yylloc.first_column,
8284 last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
8285 };
8286
8287 if (this.options.ranges) {
8288 this.yylloc.range = [r[0], r[0] + this.yyleng - len];
8289 }
8290
8291 this.yyleng = this.yytext.length;
8292 return this;
8293 },
8294 // When called from action, caches matched text and appends it on next action
8295 more: function () {
8296 this._more = true;
8297 return this;
8298 },
8299 // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
8300 reject: function () {
8301 if (this.options.backtrack_lexer) {
8302 this._backtrack = true;
8303 } else {
8304 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(), {
8305 text: "",
8306 token: null,
8307 line: this.yylineno
8308 });
8309 }
8310
8311 return this;
8312 },
8313 // retain first n characters of the match
8314 less: function (n) {
8315 this.unput(this.match.slice(n));
8316 },
8317 // displays already matched input, i.e. for error messages
8318 pastInput: function () {
8319 var past = this.matched.substr(0, this.matched.length - this.match.length);
8320 return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
8321 },
8322 // displays upcoming input, i.e. for error messages
8323 upcomingInput: function () {
8324 var next = this.match;
8325
8326 if (next.length < 20) {
8327 next += this._input.substr(0, 20 - next.length);
8328 }
8329
8330 return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
8331 },
8332 // displays the character position where the lexing error occurred, i.e. for error messages
8333 showPosition: function () {
8334 var pre = this.pastInput();
8335 var c = new Array(pre.length + 1).join("-");
8336 return pre + this.upcomingInput() + "\n" + c + "^";
8337 },
8338 // test the lexed token: return FALSE when not a match, otherwise return token
8339 test_match: function (match, indexed_rule) {
8340 var token, lines, backup;
8341
8342 if (this.options.backtrack_lexer) {
8343 // save context
8344 backup = {
8345 yylineno: this.yylineno,
8346 yylloc: {
8347 first_line: this.yylloc.first_line,
8348 last_line: this.last_line,
8349 first_column: this.yylloc.first_column,
8350 last_column: this.yylloc.last_column
8351 },
8352 yytext: this.yytext,
8353 match: this.match,
8354 matches: this.matches,
8355 matched: this.matched,
8356 yyleng: this.yyleng,
8357 offset: this.offset,
8358 _more: this._more,
8359 _input: this._input,
8360 yy: this.yy,
8361 conditionStack: this.conditionStack.slice(0),
8362 done: this.done
8363 };
8364
8365 if (this.options.ranges) {
8366 backup.yylloc.range = this.yylloc.range.slice(0);
8367 }
8368 }
8369
8370 lines = match[0].match(/(?:\r\n?|\n).*/g);
8371
8372 if (lines) {
8373 this.yylineno += lines.length;
8374 }
8375
8376 this.yylloc = {
8377 first_line: this.yylloc.last_line,
8378 last_line: this.yylineno + 1,
8379 first_column: this.yylloc.last_column,
8380 last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
8381 };
8382 this.yytext += match[0];
8383 this.match += match[0];
8384 this.matches = match;
8385 this.yyleng = this.yytext.length;
8386
8387 if (this.options.ranges) {
8388 this.yylloc.range = [this.offset, this.offset += this.yyleng];
8389 }
8390
8391 this._more = false;
8392 this._backtrack = false;
8393 this._input = this._input.slice(match[0].length);
8394 this.matched += match[0];
8395 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
8396
8397 if (this.done && this._input) {
8398 this.done = false;
8399 }
8400
8401 if (token) {
8402 return token;
8403 } else if (this._backtrack) {
8404 // recover context
8405 for (var k in backup) {
8406 this[k] = backup[k];
8407 }
8408
8409 return false; // rule action called reject() implying the next rule should be tested instead.
8410 }
8411
8412 return false;
8413 },
8414 // return next match in input
8415 next: function () {
8416 if (this.done) {
8417 return this.EOF;
8418 }
8419
8420 if (!this._input) {
8421 this.done = true;
8422 }
8423
8424 var token, match, tempMatch, index;
8425
8426 if (!this._more) {
8427 this.yytext = '';
8428 this.match = '';
8429 }
8430
8431 var rules = this._currentRules();
8432
8433 for (var i = 0; i < rules.length; i++) {
8434 tempMatch = this._input.match(this.rules[rules[i]]);
8435
8436 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
8437 match = tempMatch;
8438 index = i;
8439
8440 if (this.options.backtrack_lexer) {
8441 token = this.test_match(tempMatch, rules[i]);
8442
8443 if (token !== false) {
8444 return token;
8445 } else if (this._backtrack) {
8446 match = false;
8447 continue; // rule action called reject() implying a rule MISmatch.
8448 } else {
8449 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
8450 return false;
8451 }
8452 } else if (!this.options.flex) {
8453 break;
8454 }
8455 }
8456 }
8457
8458 if (match) {
8459 token = this.test_match(match, rules[index]);
8460
8461 if (token !== false) {
8462 return token;
8463 } // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
8464
8465
8466 return false;
8467 }
8468
8469 if (this._input === "") {
8470 return this.EOF;
8471 } else {
8472 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
8473 text: "",
8474 token: null,
8475 line: this.yylineno
8476 });
8477 }
8478 },
8479 // return next match that has a token
8480 lex: function lex() {
8481 var r = this.next();
8482
8483 if (r) {
8484 return r;
8485 } else {
8486 return this.lex();
8487 }
8488 },
8489 // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
8490 begin: function begin(condition) {
8491 this.conditionStack.push(condition);
8492 },
8493 // pop the previously active lexer condition state off the condition stack
8494 popState: function popState() {
8495 var n = this.conditionStack.length - 1;
8496
8497 if (n > 0) {
8498 return this.conditionStack.pop();
8499 } else {
8500 return this.conditionStack[0];
8501 }
8502 },
8503 // produce the lexer rule set which is active for the currently active lexer condition state
8504 _currentRules: function _currentRules() {
8505 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
8506 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
8507 } else {
8508 return this.conditions["INITIAL"].rules;
8509 }
8510 },
8511 // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
8512 topState: function topState(n) {
8513 n = this.conditionStack.length - 1 - Math.abs(n || 0);
8514
8515 if (n >= 0) {
8516 return this.conditionStack[n];
8517 } else {
8518 return "INITIAL";
8519 }
8520 },
8521 // alias for begin(condition)
8522 pushState: function pushState(condition) {
8523 this.begin(condition);
8524 },
8525 // return the number of states currently on the stack
8526 stateStackSize: function stateStackSize() {
8527 return this.conditionStack.length;
8528 },
8529 options: {
8530 "case-insensitive": true
8531 },
8532 performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
8533 var YYSTATE = YY_START;
8534
8535 switch ($avoiding_name_collisions) {
8536 case 0:
8537 return 10;
8538 break;
8539
8540 case 1:
8541 /* skip whitespace */
8542 break;
8543
8544 case 2:
8545 /* skip comments */
8546 break;
8547
8548 case 3:
8549 /* skip comments */
8550 break;
8551
8552 case 4:
8553 this.begin("href");
8554 break;
8555
8556 case 5:
8557 this.popState();
8558 break;
8559
8560 case 6:
8561 return 22;
8562 break;
8563
8564 case 7:
8565 this.begin("callbackname");
8566 break;
8567
8568 case 8:
8569 this.popState();
8570 break;
8571
8572 case 9:
8573 this.popState();
8574 this.begin("callbackargs");
8575 break;
8576
8577 case 10:
8578 return 20;
8579 break;
8580
8581 case 11:
8582 this.popState();
8583 break;
8584
8585 case 12:
8586 return 21;
8587 break;
8588
8589 case 13:
8590 this.begin("click");
8591 break;
8592
8593 case 14:
8594 this.popState();
8595 break;
8596
8597 case 15:
8598 return 19;
8599 break;
8600
8601 case 16:
8602 return 4;
8603 break;
8604
8605 case 17:
8606 return 11;
8607 break;
8608
8609 case 18:
8610 return 12;
8611 break;
8612
8613 case 19:
8614 return 13;
8615 break;
8616
8617 case 20:
8618 return 'date';
8619 break;
8620
8621 case 21:
8622 return 14;
8623 break;
8624
8625 case 22:
8626 return 15;
8627 break;
8628
8629 case 23:
8630 return 17;
8631 break;
8632
8633 case 24:
8634 return 18;
8635 break;
8636
8637 case 25:
8638 return ':';
8639 break;
8640
8641 case 26:
8642 return 6;
8643 break;
8644
8645 case 27:
8646 return 'INVALID';
8647 break;
8648 }
8649 },
8650 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, /^(?: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],
8651 conditions: {
8652 "callbackargs": {
8653 "rules": [11, 12],
8654 "inclusive": false
8655 },
8656 "callbackname": {
8657 "rules": [8, 9, 10],
8658 "inclusive": false
8659 },
8660 "href": {
8661 "rules": [5, 6],
8662 "inclusive": false
8663 },
8664 "click": {
8665 "rules": [14, 15],
8666 "inclusive": false
8667 },
8668 "INITIAL": {
8669 "rules": [0, 1, 2, 3, 4, 7, 13, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27],
8670 "inclusive": true
8671 }
8672 }
8673 };
8674 return lexer;
8675 }();
8676
8677 parser.lexer = lexer;
8678
8679 function Parser() {
8680 this.yy = {};
8681 }
8682
8683 Parser.prototype = parser;
8684 parser.Parser = Parser;
8685 return new Parser();
8686}();
8687
8688if (true) {
8689 exports.parser = parser;
8690 exports.Parser = parser.Parser;
8691
8692 exports.parse = function () {
8693 return parser.parse.apply(parser, arguments);
8694 };
8695
8696 exports.main = function commonjsMain(args) {
8697 if (!args[1]) {
8698 console.log('Usage: ' + args[0] + ' FILE');
8699 process.exit(1);
8700 }
8701
8702 var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
8703
8704 return exports.parser.parse(source);
8705 };
8706
8707 if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
8708 exports.main(process.argv.slice(1));
8709 }
8710}
8711/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
8712
8713/***/ }),
8714
8715/***/ "./src/diagrams/git/gitGraphAst.js":
8716/*!*****************************************!*\
8717 !*** ./src/diagrams/git/gitGraphAst.js ***!
8718 \*****************************************/
8719/*! exports provided: setDirection, setOptions, getOptions, commit, branch, merge, checkout, reset, prettyPrint, clear, getBranchesAsObjArray, getBranches, getCommits, getCommitsArray, getCurrentBranch, getDirection, getHead, default */
8720/***/ (function(module, __webpack_exports__, __webpack_require__) {
8721
8722"use strict";
8723__webpack_require__.r(__webpack_exports__);
8724/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDirection", function() { return setDirection; });
8725/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setOptions", function() { return setOptions; });
8726/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOptions", function() { return getOptions; });
8727/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "commit", function() { return commit; });
8728/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "branch", function() { return branch; });
8729/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
8730/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "checkout", function() { return checkout; });
8731/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; });
8732/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prettyPrint", function() { return prettyPrint; });
8733/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
8734/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBranchesAsObjArray", function() { return getBranchesAsObjArray; });
8735/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBranches", function() { return getBranches; });
8736/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCommits", function() { return getCommits; });
8737/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCommitsArray", function() { return getCommitsArray; });
8738/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCurrentBranch", function() { return getCurrentBranch; });
8739/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDirection", function() { return getDirection; });
8740/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getHead", function() { return getHead; });
8741/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash");
8742/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);
8743/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
8744
8745
8746let commits = {};
8747let head = null;
8748let branches = {
8749 'master': head
8750};
8751let curBranch = 'master';
8752let direction = 'LR';
8753let seq = 0;
8754
8755function getRandomInt(min, max) {
8756 return Math.floor(Math.random() * (max - min)) + min;
8757}
8758
8759function getId() {
8760 const pool = '0123456789abcdef';
8761 let id = '';
8762
8763 for (let i = 0; i < 7; i++) {
8764 id += pool[getRandomInt(0, 16)];
8765 }
8766
8767 return id;
8768}
8769
8770function isfastforwardable(currentCommit, otherCommit) {
8771 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('Entering isfastforwardable:', currentCommit.id, otherCommit.id);
8772
8773 while (currentCommit.seq <= otherCommit.seq && currentCommit !== otherCommit) {
8774 // only if other branch has more commits
8775 if (otherCommit.parent == null) break;
8776
8777 if (Array.isArray(otherCommit.parent)) {
8778 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('In merge commit:', otherCommit.parent);
8779 return isfastforwardable(currentCommit, commits[otherCommit.parent[0]]) || isfastforwardable(currentCommit, commits[otherCommit.parent[1]]);
8780 } else {
8781 otherCommit = commits[otherCommit.parent];
8782 }
8783 }
8784
8785 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug(currentCommit.id, otherCommit.id);
8786 return currentCommit.id === otherCommit.id;
8787}
8788
8789function isReachableFrom(currentCommit, otherCommit) {
8790 const currentSeq = currentCommit.seq;
8791 const otherSeq = otherCommit.seq;
8792 if (currentSeq > otherSeq) return isfastforwardable(otherCommit, currentCommit);
8793 return false;
8794}
8795
8796const setDirection = function (dir) {
8797 direction = dir;
8798};
8799let options = {};
8800const setOptions = function (rawOptString) {
8801 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('options str', rawOptString);
8802 rawOptString = rawOptString && rawOptString.trim();
8803 rawOptString = rawOptString || '{}';
8804
8805 try {
8806 options = JSON.parse(rawOptString);
8807 } catch (e) {
8808 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].error('error while parsing gitGraph options', e.message);
8809 }
8810};
8811const getOptions = function () {
8812 return options;
8813};
8814const commit = function (msg) {
8815 const commit = {
8816 id: getId(),
8817 message: msg,
8818 seq: seq++,
8819 parent: head == null ? null : head.id
8820 };
8821 head = commit;
8822 commits[commit.id] = commit;
8823 branches[curBranch] = commit.id;
8824 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('in pushCommit ' + commit.id);
8825};
8826const branch = function (name) {
8827 branches[name] = head != null ? head.id : null;
8828 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('in createBranch');
8829};
8830const merge = function (otherBranch) {
8831 const currentCommit = commits[branches[curBranch]];
8832 const otherCommit = commits[branches[otherBranch]];
8833
8834 if (isReachableFrom(currentCommit, otherCommit)) {
8835 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('Already merged');
8836 return;
8837 }
8838
8839 if (isfastforwardable(currentCommit, otherCommit)) {
8840 branches[curBranch] = branches[otherBranch];
8841 head = commits[branches[curBranch]];
8842 } else {
8843 // create merge commit
8844 const commit = {
8845 id: getId(),
8846 message: 'merged branch ' + otherBranch + ' into ' + curBranch,
8847 seq: seq++,
8848 parent: [head == null ? null : head.id, branches[otherBranch]]
8849 };
8850 head = commit;
8851 commits[commit.id] = commit;
8852 branches[curBranch] = commit.id;
8853 }
8854
8855 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug(branches);
8856 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('in mergeBranch');
8857};
8858const checkout = function (branch) {
8859 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('in checkout');
8860 curBranch = branch;
8861 const id = branches[curBranch];
8862 head = commits[id];
8863};
8864const reset = function (commitRef) {
8865 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('in reset', commitRef);
8866 const ref = commitRef.split(':')[0];
8867 let parentCount = parseInt(commitRef.split(':')[1]);
8868 let commit = ref === 'HEAD' ? head : commits[branches[ref]];
8869 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug(commit, parentCount);
8870
8871 while (parentCount > 0) {
8872 commit = commits[commit.parent];
8873 parentCount--;
8874
8875 if (!commit) {
8876 const err = 'Critical error - unique parent commit not found during reset';
8877 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].error(err);
8878 throw err;
8879 }
8880 }
8881
8882 head = commit;
8883 branches[curBranch] = commit.id;
8884};
8885
8886function upsert(arr, key, newval) {
8887 const index = arr.indexOf(key);
8888
8889 if (index === -1) {
8890 arr.push(newval);
8891 } else {
8892 arr.splice(index, 1, newval);
8893 }
8894}
8895
8896function prettyPrintCommitHistory(commitArr) {
8897 const commit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.maxBy(commitArr, 'seq');
8898
8899 let line = '';
8900 commitArr.forEach(function (c) {
8901 if (c === commit) {
8902 line += '\t*';
8903 } else {
8904 line += '\t|';
8905 }
8906 });
8907 const label = [line, commit.id, commit.seq];
8908
8909 for (let branch in branches) {
8910 if (branches[branch] === commit.id) label.push(branch);
8911 }
8912
8913 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug(label.join(' '));
8914
8915 if (Array.isArray(commit.parent)) {
8916 const newCommit = commits[commit.parent[0]];
8917 upsert(commitArr, commit, newCommit);
8918 commitArr.push(commits[commit.parent[1]]);
8919 } else if (commit.parent == null) {
8920 return;
8921 } else {
8922 const nextCommit = commits[commit.parent];
8923 upsert(commitArr, commit, nextCommit);
8924 }
8925
8926 commitArr = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniqBy(commitArr, 'id');
8927 prettyPrintCommitHistory(commitArr);
8928}
8929
8930const prettyPrint = function () {
8931 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug(commits);
8932 const node = getCommitsArray()[0];
8933 prettyPrintCommitHistory([node]);
8934};
8935const clear = function () {
8936 commits = {};
8937 head = null;
8938 branches = {
8939 'master': head
8940 };
8941 curBranch = 'master';
8942 seq = 0;
8943};
8944const getBranchesAsObjArray = function () {
8945 const branchArr = [];
8946
8947 for (let branch in branches) {
8948 branchArr.push({
8949 name: branch,
8950 commit: commits[branches[branch]]
8951 });
8952 }
8953
8954 return branchArr;
8955};
8956const getBranches = function () {
8957 return branches;
8958};
8959const getCommits = function () {
8960 return commits;
8961};
8962const getCommitsArray = function () {
8963 const commitArr = Object.keys(commits).map(function (key) {
8964 return commits[key];
8965 });
8966 commitArr.forEach(function (o) {
8967 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug(o.id);
8968 });
8969 return lodash__WEBPACK_IMPORTED_MODULE_0___default.a.orderBy(commitArr, ['seq'], ['desc']);
8970};
8971const getCurrentBranch = function () {
8972 return curBranch;
8973};
8974const getDirection = function () {
8975 return direction;
8976};
8977const getHead = function () {
8978 return head;
8979};
8980/* harmony default export */ __webpack_exports__["default"] = ({
8981 setDirection,
8982 setOptions,
8983 getOptions,
8984 commit,
8985 branch,
8986 merge,
8987 checkout,
8988 reset,
8989 prettyPrint,
8990 clear,
8991 getBranchesAsObjArray,
8992 getBranches,
8993 getCommits,
8994 getCommitsArray,
8995 getCurrentBranch,
8996 getDirection,
8997 getHead
8998});
8999
9000/***/ }),
9001
9002/***/ "./src/diagrams/git/gitGraphRenderer.js":
9003/*!**********************************************!*\
9004 !*** ./src/diagrams/git/gitGraphRenderer.js ***!
9005 \**********************************************/
9006/*! exports provided: setConf, draw, default */
9007/***/ (function(module, __webpack_exports__, __webpack_require__) {
9008
9009"use strict";
9010__webpack_require__.r(__webpack_exports__);
9011/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
9012/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
9013/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
9014/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
9015/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "lodash");
9016/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);
9017/* harmony import */ var _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./gitGraphAst */ "./src/diagrams/git/gitGraphAst.js");
9018/* harmony import */ var _parser_gitGraph__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/gitGraph */ "./src/diagrams/git/parser/gitGraph.js");
9019/* harmony import */ var _parser_gitGraph__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_gitGraph__WEBPACK_IMPORTED_MODULE_3__);
9020/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
9021/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils */ "./src/utils.js");
9022
9023
9024
9025
9026
9027
9028let allCommitsDict = {};
9029let branchNum;
9030let config = {
9031 nodeSpacing: 150,
9032 nodeFillColor: 'yellow',
9033 nodeStrokeWidth: 2,
9034 nodeStrokeColor: 'grey',
9035 lineStrokeWidth: 4,
9036 branchOffset: 50,
9037 lineColor: 'grey',
9038 leftMargin: 50,
9039 branchColors: ['#442f74', '#983351', '#609732', '#AA9A39'],
9040 nodeRadius: 10,
9041 nodeLabel: {
9042 width: 75,
9043 height: 100,
9044 x: -25,
9045 y: 0
9046 }
9047};
9048let apiConfig = {};
9049const setConf = function (c) {
9050 apiConfig = c;
9051};
9052
9053function svgCreateDefs(svg) {
9054 svg.append('defs').append('g').attr('id', 'def-commit').append('circle').attr('r', config.nodeRadius).attr('cx', 0).attr('cy', 0);
9055 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('');
9056}
9057
9058function svgDrawLine(svg, points, colorIdx, interpolate) {
9059 const curve = Object(_utils__WEBPACK_IMPORTED_MODULE_5__["interpolateToCurve"])(interpolate, d3__WEBPACK_IMPORTED_MODULE_0__["curveBasis"]);
9060 const color = config.branchColors[colorIdx % config.branchColors.length];
9061 const lineGen = d3__WEBPACK_IMPORTED_MODULE_0__["line"]().x(function (d) {
9062 return Math.round(d.x);
9063 }).y(function (d) {
9064 return Math.round(d.y);
9065 }).curve(curve);
9066 svg.append('svg:path').attr('d', lineGen(points)).style('stroke', color).style('stroke-width', config.lineStrokeWidth).style('fill', 'none');
9067} // Pass in the element and its pre-transform coords
9068
9069
9070function getElementCoords(element, coords) {
9071 coords = coords || element.node().getBBox();
9072 const ctm = element.node().getCTM();
9073 const xn = ctm.e + coords.x * ctm.a;
9074 const yn = ctm.f + coords.y * ctm.d;
9075 return {
9076 left: xn,
9077 top: yn,
9078 width: coords.width,
9079 height: coords.height
9080 };
9081}
9082
9083function svgDrawLineForCommits(svg, fromId, toId, direction, color) {
9084 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('svgDrawLineForCommits: ', fromId, toId);
9085 const fromBbox = getElementCoords(svg.select('#node-' + fromId + ' circle'));
9086 const toBbox = getElementCoords(svg.select('#node-' + toId + ' circle'));
9087
9088 switch (direction) {
9089 case 'LR':
9090 // (toBbox)
9091 // +--------
9092 // + (fromBbox)
9093 if (fromBbox.left - toBbox.left > config.nodeSpacing) {
9094 const lineStart = {
9095 x: fromBbox.left - config.nodeSpacing,
9096 y: toBbox.top + toBbox.height / 2
9097 };
9098 const lineEnd = {
9099 x: toBbox.left + toBbox.width,
9100 y: toBbox.top + toBbox.height / 2
9101 };
9102 svgDrawLine(svg, [lineStart, lineEnd], color, 'linear');
9103 svgDrawLine(svg, [{
9104 x: fromBbox.left,
9105 y: fromBbox.top + fromBbox.height / 2
9106 }, {
9107 x: fromBbox.left - config.nodeSpacing / 2,
9108 y: fromBbox.top + fromBbox.height / 2
9109 }, {
9110 x: fromBbox.left - config.nodeSpacing / 2,
9111 y: lineStart.y
9112 }, lineStart], color);
9113 } else {
9114 svgDrawLine(svg, [{
9115 'x': fromBbox.left,
9116 'y': fromBbox.top + fromBbox.height / 2
9117 }, {
9118 'x': fromBbox.left - config.nodeSpacing / 2,
9119 'y': fromBbox.top + fromBbox.height / 2
9120 }, {
9121 'x': fromBbox.left - config.nodeSpacing / 2,
9122 'y': toBbox.top + toBbox.height / 2
9123 }, {
9124 'x': toBbox.left + toBbox.width,
9125 'y': toBbox.top + toBbox.height / 2
9126 }], color);
9127 }
9128
9129 break;
9130
9131 case 'BT':
9132 // + (fromBbox)
9133 // |
9134 // |
9135 // + (toBbox)
9136 if (toBbox.top - fromBbox.top > config.nodeSpacing) {
9137 const lineStart = {
9138 x: toBbox.left + toBbox.width / 2,
9139 y: fromBbox.top + fromBbox.height + config.nodeSpacing
9140 };
9141 const lineEnd = {
9142 x: toBbox.left + toBbox.width / 2,
9143 y: toBbox.top
9144 };
9145 svgDrawLine(svg, [lineStart, lineEnd], color, 'linear');
9146 svgDrawLine(svg, [{
9147 x: fromBbox.left + fromBbox.width / 2,
9148 y: fromBbox.top + fromBbox.height
9149 }, {
9150 x: fromBbox.left + fromBbox.width / 2,
9151 y: fromBbox.top + fromBbox.height + config.nodeSpacing / 2
9152 }, {
9153 x: toBbox.left + toBbox.width / 2,
9154 y: lineStart.y - config.nodeSpacing / 2
9155 }, lineStart], color);
9156 } else {
9157 svgDrawLine(svg, [{
9158 'x': fromBbox.left + fromBbox.width / 2,
9159 'y': fromBbox.top + fromBbox.height
9160 }, {
9161 'x': fromBbox.left + fromBbox.width / 2,
9162 'y': fromBbox.top + config.nodeSpacing / 2
9163 }, {
9164 'x': toBbox.left + toBbox.width / 2,
9165 'y': toBbox.top - config.nodeSpacing / 2
9166 }, {
9167 'x': toBbox.left + toBbox.width / 2,
9168 'y': toBbox.top
9169 }], color);
9170 }
9171
9172 break;
9173 }
9174}
9175
9176function cloneNode(svg, selector) {
9177 return svg.select(selector).node().cloneNode(true);
9178}
9179
9180function renderCommitHistory(svg, commitid, branches, direction) {
9181 let commit;
9182 const numCommits = Object.keys(allCommitsDict).length;
9183
9184 if (typeof commitid === 'string') {
9185 do {
9186 commit = allCommitsDict[commitid];
9187 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('in renderCommitHistory', commit.id, commit.seq);
9188
9189 if (svg.select('#node-' + commitid).size() > 0) {
9190 return;
9191 }
9192
9193 svg.append(function () {
9194 return cloneNode(svg, '#def-commit');
9195 }).attr('class', 'commit').attr('id', function () {
9196 return 'node-' + commit.id;
9197 }).attr('transform', function () {
9198 switch (direction) {
9199 case 'LR':
9200 return 'translate(' + (commit.seq * config.nodeSpacing + config.leftMargin) + ', ' + branchNum * config.branchOffset + ')';
9201
9202 case 'BT':
9203 return 'translate(' + (branchNum * config.branchOffset + config.leftMargin) + ', ' + (numCommits - commit.seq) * config.nodeSpacing + ')';
9204 }
9205 }).attr('fill', config.nodeFillColor).attr('stroke', config.nodeStrokeColor).attr('stroke-width', config.nodeStrokeWidth);
9206 let branch;
9207
9208 for (let branchName in branches) {
9209 if (branches[branchName].commit === commit) {
9210 branch = branches[branchName];
9211 break;
9212 }
9213 }
9214
9215 if (branch) {
9216 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('found branch ', branch.name);
9217 svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'branch-label').text(branch.name + ', ');
9218 }
9219
9220 svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'commit-id').text(commit.id);
9221
9222 if (commit.message !== '' && direction === 'BT') {
9223 svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'commit-msg').text(', ' + commit.message);
9224 }
9225
9226 commitid = commit.parent;
9227 } while (commitid && allCommitsDict[commitid]);
9228 }
9229
9230 if (Array.isArray(commitid)) {
9231 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('found merge commmit', commitid);
9232 renderCommitHistory(svg, commitid[0], branches, direction);
9233 branchNum++;
9234 renderCommitHistory(svg, commitid[1], branches, direction);
9235 branchNum--;
9236 }
9237}
9238
9239function renderLines(svg, commit, direction, branchColor) {
9240 branchColor = branchColor || 0;
9241
9242 while (commit.seq > 0 && !commit.lineDrawn) {
9243 if (typeof commit.parent === 'string') {
9244 svgDrawLineForCommits(svg, commit.id, commit.parent, direction, branchColor);
9245 commit.lineDrawn = true;
9246 commit = allCommitsDict[commit.parent];
9247 } else if (Array.isArray(commit.parent)) {
9248 svgDrawLineForCommits(svg, commit.id, commit.parent[0], direction, branchColor);
9249 svgDrawLineForCommits(svg, commit.id, commit.parent[1], direction, branchColor + 1);
9250 renderLines(svg, allCommitsDict[commit.parent[1]], direction, branchColor + 1);
9251 commit.lineDrawn = true;
9252 commit = allCommitsDict[commit.parent[0]];
9253 }
9254 }
9255}
9256
9257const draw = function (txt, id, ver) {
9258 try {
9259 const parser = _parser_gitGraph__WEBPACK_IMPORTED_MODULE_3___default.a.parser;
9260 parser.yy = _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"];
9261 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('in gitgraph renderer', txt, id, ver); // Parse the graph definition
9262
9263 parser.parse(txt + '\n');
9264 config = lodash__WEBPACK_IMPORTED_MODULE_1___default.a.assign(config, apiConfig, _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"].getOptions());
9265 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('effective options', config);
9266 const direction = _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"].getDirection();
9267 allCommitsDict = _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"].getCommits();
9268 const branches = _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"].getBranchesAsObjArray();
9269
9270 if (direction === 'BT') {
9271 config.nodeLabel.x = branches.length * config.branchOffset;
9272 config.nodeLabel.width = '100%';
9273 config.nodeLabel.y = -1 * 2 * config.nodeRadius;
9274 }
9275
9276 const svg = d3__WEBPACK_IMPORTED_MODULE_0__["select"](`[id="${id}"]`);
9277 svgCreateDefs(svg);
9278 branchNum = 1;
9279
9280 for (let branch in branches) {
9281 const v = branches[branch];
9282 renderCommitHistory(svg, v.commit.id, branches, direction);
9283 renderLines(svg, v.commit, direction);
9284 branchNum++;
9285 }
9286
9287 svg.attr('height', function () {
9288 if (direction === 'BT') return Object.keys(allCommitsDict).length * config.nodeSpacing;
9289 return (branches.length + 1) * config.branchOffset;
9290 });
9291 } catch (e) {
9292 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].error('Error while rendering gitgraph');
9293 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].error(e.message);
9294 }
9295};
9296/* harmony default export */ __webpack_exports__["default"] = ({
9297 setConf,
9298 draw
9299});
9300
9301/***/ }),
9302
9303/***/ "./src/diagrams/git/parser/gitGraph.js":
9304/*!*********************************************!*\
9305 !*** ./src/diagrams/git/parser/gitGraph.js ***!
9306 \*********************************************/
9307/*! no static exports found */
9308/***/ (function(module, exports, __webpack_require__) {
9309
9310/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
9311
9312/*
9313 Returns a Parser object of the following structure:
9314
9315 Parser: {
9316 yy: {}
9317 }
9318
9319 Parser.prototype: {
9320 yy: {},
9321 trace: function(),
9322 symbols_: {associative list: name ==> number},
9323 terminals_: {associative list: number ==> name},
9324 productions_: [...],
9325 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
9326 table: [...],
9327 defaultActions: {...},
9328 parseError: function(str, hash),
9329 parse: function(input),
9330
9331 lexer: {
9332 EOF: 1,
9333 parseError: function(str, hash),
9334 setInput: function(input),
9335 input: function(),
9336 unput: function(str),
9337 more: function(),
9338 less: function(n),
9339 pastInput: function(),
9340 upcomingInput: function(),
9341 showPosition: function(),
9342 test_match: function(regex_match_array, rule_index),
9343 next: function(),
9344 lex: function(),
9345 begin: function(condition),
9346 popState: function(),
9347 _currentRules: function(),
9348 topState: function(),
9349 pushState: function(condition),
9350
9351 options: {
9352 ranges: boolean (optional: true ==> token location info will include a .range[] member)
9353 flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
9354 backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
9355 },
9356
9357 performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
9358 rules: [...],
9359 conditions: {associative list: name ==> set},
9360 }
9361 }
9362
9363
9364 token location info (@$, _$, etc.): {
9365 first_line: n,
9366 last_line: n,
9367 first_column: n,
9368 last_column: n,
9369 range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
9370 }
9371
9372
9373 the parseError function receives a 'hash' object with these members for lexer and parser errors: {
9374 text: (matched text)
9375 token: (the produced terminal token, if any)
9376 line: (yylineno)
9377 }
9378 while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
9379 loc: (yylloc)
9380 expected: (string describing the set of expected tokens)
9381 recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
9382 }
9383*/
9384var parser = function () {
9385 var o = function (k, v, o, l) {
9386 for (o = o || {}, l = k.length; l--; o[k[l]] = v);
9387
9388 return o;
9389 },
9390 $V0 = [2, 3],
9391 $V1 = [1, 7],
9392 $V2 = [7, 12, 15, 17, 19, 20, 21],
9393 $V3 = [7, 11, 12, 15, 17, 19, 20, 21],
9394 $V4 = [2, 20],
9395 $V5 = [1, 32];
9396
9397 var parser = {
9398 trace: function trace() {},
9399 yy: {},
9400 symbols_: {
9401 "error": 2,
9402 "start": 3,
9403 "GG": 4,
9404 ":": 5,
9405 "document": 6,
9406 "EOF": 7,
9407 "DIR": 8,
9408 "options": 9,
9409 "body": 10,
9410 "OPT": 11,
9411 "NL": 12,
9412 "line": 13,
9413 "statement": 14,
9414 "COMMIT": 15,
9415 "commit_arg": 16,
9416 "BRANCH": 17,
9417 "ID": 18,
9418 "CHECKOUT": 19,
9419 "MERGE": 20,
9420 "RESET": 21,
9421 "reset_arg": 22,
9422 "STR": 23,
9423 "HEAD": 24,
9424 "reset_parents": 25,
9425 "CARET": 26,
9426 "$accept": 0,
9427 "$end": 1
9428 },
9429 terminals_: {
9430 2: "error",
9431 4: "GG",
9432 5: ":",
9433 7: "EOF",
9434 8: "DIR",
9435 11: "OPT",
9436 12: "NL",
9437 15: "COMMIT",
9438 17: "BRANCH",
9439 18: "ID",
9440 19: "CHECKOUT",
9441 20: "MERGE",
9442 21: "RESET",
9443 23: "STR",
9444 24: "HEAD",
9445 26: "CARET"
9446 },
9447 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]],
9448 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate
9449 /* action[1] */
9450 , $$
9451 /* vstack */
9452 , _$
9453 /* lstack */
9454 ) {
9455 /* this == yyval */
9456 var $0 = $$.length - 1;
9457
9458 switch (yystate) {
9459 case 1:
9460 return $$[$0 - 1];
9461 break;
9462
9463 case 2:
9464 yy.setDirection($$[$0 - 3]);
9465 return $$[$0 - 1];
9466 break;
9467
9468 case 4:
9469 yy.setOptions($$[$0 - 1]);
9470 this.$ = $$[$0];
9471 break;
9472
9473 case 5:
9474 $$[$0 - 1] += $$[$0];
9475 this.$ = $$[$0 - 1];
9476 break;
9477
9478 case 7:
9479 this.$ = [];
9480 break;
9481
9482 case 8:
9483 $$[$0 - 1].push($$[$0]);
9484 this.$ = $$[$0 - 1];
9485 break;
9486
9487 case 9:
9488 this.$ = $$[$0 - 1];
9489 break;
9490
9491 case 11:
9492 yy.commit($$[$0]);
9493 break;
9494
9495 case 12:
9496 yy.branch($$[$0]);
9497 break;
9498
9499 case 13:
9500 yy.checkout($$[$0]);
9501 break;
9502
9503 case 14:
9504 yy.merge($$[$0]);
9505 break;
9506
9507 case 15:
9508 yy.reset($$[$0]);
9509 break;
9510
9511 case 16:
9512 this.$ = "";
9513 break;
9514
9515 case 17:
9516 this.$ = $$[$0];
9517 break;
9518
9519 case 18:
9520 this.$ = $$[$0 - 1] + ":" + $$[$0];
9521 break;
9522
9523 case 19:
9524 this.$ = $$[$0 - 1] + ":" + yy.count;
9525 yy.count = 0;
9526 break;
9527
9528 case 20:
9529 yy.count = 0;
9530 break;
9531
9532 case 21:
9533 yy.count += 1;
9534 break;
9535 }
9536 },
9537 table: [{
9538 3: 1,
9539 4: [1, 2]
9540 }, {
9541 1: [3]
9542 }, {
9543 5: [1, 3],
9544 8: [1, 4]
9545 }, {
9546 6: 5,
9547 7: $V0,
9548 9: 6,
9549 12: $V1
9550 }, {
9551 5: [1, 8]
9552 }, {
9553 7: [1, 9]
9554 }, o($V2, [2, 7], {
9555 10: 10,
9556 11: [1, 11]
9557 }), o($V3, [2, 6]), {
9558 6: 12,
9559 7: $V0,
9560 9: 6,
9561 12: $V1
9562 }, {
9563 1: [2, 1]
9564 }, {
9565 7: [2, 4],
9566 12: [1, 15],
9567 13: 13,
9568 14: 14,
9569 15: [1, 16],
9570 17: [1, 17],
9571 19: [1, 18],
9572 20: [1, 19],
9573 21: [1, 20]
9574 }, o($V3, [2, 5]), {
9575 7: [1, 21]
9576 }, o($V2, [2, 8]), {
9577 12: [1, 22]
9578 }, o($V2, [2, 10]), {
9579 12: [2, 16],
9580 16: 23,
9581 23: [1, 24]
9582 }, {
9583 18: [1, 25]
9584 }, {
9585 18: [1, 26]
9586 }, {
9587 18: [1, 27]
9588 }, {
9589 18: [1, 30],
9590 22: 28,
9591 24: [1, 29]
9592 }, {
9593 1: [2, 2]
9594 }, o($V2, [2, 9]), {
9595 12: [2, 11]
9596 }, {
9597 12: [2, 17]
9598 }, {
9599 12: [2, 12]
9600 }, {
9601 12: [2, 13]
9602 }, {
9603 12: [2, 14]
9604 }, {
9605 12: [2, 15]
9606 }, {
9607 12: $V4,
9608 25: 31,
9609 26: $V5
9610 }, {
9611 12: $V4,
9612 25: 33,
9613 26: $V5
9614 }, {
9615 12: [2, 18]
9616 }, {
9617 12: $V4,
9618 25: 34,
9619 26: $V5
9620 }, {
9621 12: [2, 19]
9622 }, {
9623 12: [2, 21]
9624 }],
9625 defaultActions: {
9626 9: [2, 1],
9627 21: [2, 2],
9628 23: [2, 11],
9629 24: [2, 17],
9630 25: [2, 12],
9631 26: [2, 13],
9632 27: [2, 14],
9633 28: [2, 15],
9634 31: [2, 18],
9635 33: [2, 19],
9636 34: [2, 21]
9637 },
9638 parseError: function parseError(str, hash) {
9639 if (hash.recoverable) {
9640 this.trace(str);
9641 } else {
9642 var error = new Error(str);
9643 error.hash = hash;
9644 throw error;
9645 }
9646 },
9647 parse: function parse(input) {
9648 var self = this,
9649 stack = [0],
9650 tstack = [],
9651 vstack = [null],
9652 lstack = [],
9653 table = this.table,
9654 yytext = '',
9655 yylineno = 0,
9656 yyleng = 0,
9657 recovering = 0,
9658 TERROR = 2,
9659 EOF = 1;
9660 var args = lstack.slice.call(arguments, 1);
9661 var lexer = Object.create(this.lexer);
9662 var sharedState = {
9663 yy: {}
9664 };
9665
9666 for (var k in this.yy) {
9667 if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
9668 sharedState.yy[k] = this.yy[k];
9669 }
9670 }
9671
9672 lexer.setInput(input, sharedState.yy);
9673 sharedState.yy.lexer = lexer;
9674 sharedState.yy.parser = this;
9675
9676 if (typeof lexer.yylloc == 'undefined') {
9677 lexer.yylloc = {};
9678 }
9679
9680 var yyloc = lexer.yylloc;
9681 lstack.push(yyloc);
9682 var ranges = lexer.options && lexer.options.ranges;
9683
9684 if (typeof sharedState.yy.parseError === 'function') {
9685 this.parseError = sharedState.yy.parseError;
9686 } else {
9687 this.parseError = Object.getPrototypeOf(this).parseError;
9688 }
9689
9690 function popStack(n) {
9691 stack.length = stack.length - 2 * n;
9692 vstack.length = vstack.length - n;
9693 lstack.length = lstack.length - n;
9694 }
9695
9696 function lex() {
9697 var token;
9698 token = tstack.pop() || lexer.lex() || EOF;
9699
9700 if (typeof token !== 'number') {
9701 if (token instanceof Array) {
9702 tstack = token;
9703 token = tstack.pop();
9704 }
9705
9706 token = self.symbols_[token] || token;
9707 }
9708
9709 return token;
9710 }
9711
9712 var symbol,
9713 preErrorSymbol,
9714 state,
9715 action,
9716 a,
9717 r,
9718 yyval = {},
9719 p,
9720 len,
9721 newState,
9722 expected;
9723
9724 while (true) {
9725 state = stack[stack.length - 1];
9726
9727 if (this.defaultActions[state]) {
9728 action = this.defaultActions[state];
9729 } else {
9730 if (symbol === null || typeof symbol == 'undefined') {
9731 symbol = lex();
9732 }
9733
9734 action = table[state] && table[state][symbol];
9735 }
9736
9737 if (typeof action === 'undefined' || !action.length || !action[0]) {
9738 var errStr = '';
9739 expected = [];
9740
9741 for (p in table[state]) {
9742 if (this.terminals_[p] && p > TERROR) {
9743 expected.push('\'' + this.terminals_[p] + '\'');
9744 }
9745 }
9746
9747 if (lexer.showPosition) {
9748 errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
9749 } else {
9750 errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
9751 }
9752
9753 this.parseError(errStr, {
9754 text: lexer.match,
9755 token: this.terminals_[symbol] || symbol,
9756 line: lexer.yylineno,
9757 loc: yyloc,
9758 expected: expected
9759 });
9760 }
9761
9762 if (action[0] instanceof Array && action.length > 1) {
9763 throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
9764 }
9765
9766 switch (action[0]) {
9767 case 1:
9768 stack.push(symbol);
9769 vstack.push(lexer.yytext);
9770 lstack.push(lexer.yylloc);
9771 stack.push(action[1]);
9772 symbol = null;
9773
9774 if (!preErrorSymbol) {
9775 yyleng = lexer.yyleng;
9776 yytext = lexer.yytext;
9777 yylineno = lexer.yylineno;
9778 yyloc = lexer.yylloc;
9779
9780 if (recovering > 0) {
9781 recovering--;
9782 }
9783 } else {
9784 symbol = preErrorSymbol;
9785 preErrorSymbol = null;
9786 }
9787
9788 break;
9789
9790 case 2:
9791 len = this.productions_[action[1]][1];
9792 yyval.$ = vstack[vstack.length - len];
9793 yyval._$ = {
9794 first_line: lstack[lstack.length - (len || 1)].first_line,
9795 last_line: lstack[lstack.length - 1].last_line,
9796 first_column: lstack[lstack.length - (len || 1)].first_column,
9797 last_column: lstack[lstack.length - 1].last_column
9798 };
9799
9800 if (ranges) {
9801 yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
9802 }
9803
9804 r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));
9805
9806 if (typeof r !== 'undefined') {
9807 return r;
9808 }
9809
9810 if (len) {
9811 stack = stack.slice(0, -1 * len * 2);
9812 vstack = vstack.slice(0, -1 * len);
9813 lstack = lstack.slice(0, -1 * len);
9814 }
9815
9816 stack.push(this.productions_[action[1]][0]);
9817 vstack.push(yyval.$);
9818 lstack.push(yyval._$);
9819 newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
9820 stack.push(newState);
9821 break;
9822
9823 case 3:
9824 return true;
9825 }
9826 }
9827
9828 return true;
9829 }
9830 };
9831 /* generated by jison-lex 0.3.4 */
9832
9833 var lexer = function () {
9834 var lexer = {
9835 EOF: 1,
9836 parseError: function parseError(str, hash) {
9837 if (this.yy.parser) {
9838 this.yy.parser.parseError(str, hash);
9839 } else {
9840 throw new Error(str);
9841 }
9842 },
9843 // resets the lexer, sets new input
9844 setInput: function (input, yy) {
9845 this.yy = yy || this.yy || {};
9846 this._input = input;
9847 this._more = this._backtrack = this.done = false;
9848 this.yylineno = this.yyleng = 0;
9849 this.yytext = this.matched = this.match = '';
9850 this.conditionStack = ['INITIAL'];
9851 this.yylloc = {
9852 first_line: 1,
9853 first_column: 0,
9854 last_line: 1,
9855 last_column: 0
9856 };
9857
9858 if (this.options.ranges) {
9859 this.yylloc.range = [0, 0];
9860 }
9861
9862 this.offset = 0;
9863 return this;
9864 },
9865 // consumes and returns one char from the input
9866 input: function () {
9867 var ch = this._input[0];
9868 this.yytext += ch;
9869 this.yyleng++;
9870 this.offset++;
9871 this.match += ch;
9872 this.matched += ch;
9873 var lines = ch.match(/(?:\r\n?|\n).*/g);
9874
9875 if (lines) {
9876 this.yylineno++;
9877 this.yylloc.last_line++;
9878 } else {
9879 this.yylloc.last_column++;
9880 }
9881
9882 if (this.options.ranges) {
9883 this.yylloc.range[1]++;
9884 }
9885
9886 this._input = this._input.slice(1);
9887 return ch;
9888 },
9889 // unshifts one char (or a string) into the input
9890 unput: function (ch) {
9891 var len = ch.length;
9892 var lines = ch.split(/(?:\r\n?|\n)/g);
9893 this._input = ch + this._input;
9894 this.yytext = this.yytext.substr(0, this.yytext.length - len); //this.yyleng -= len;
9895
9896 this.offset -= len;
9897 var oldLines = this.match.split(/(?:\r\n?|\n)/g);
9898 this.match = this.match.substr(0, this.match.length - 1);
9899 this.matched = this.matched.substr(0, this.matched.length - 1);
9900
9901 if (lines.length - 1) {
9902 this.yylineno -= lines.length - 1;
9903 }
9904
9905 var r = this.yylloc.range;
9906 this.yylloc = {
9907 first_line: this.yylloc.first_line,
9908 last_line: this.yylineno + 1,
9909 first_column: this.yylloc.first_column,
9910 last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
9911 };
9912
9913 if (this.options.ranges) {
9914 this.yylloc.range = [r[0], r[0] + this.yyleng - len];
9915 }
9916
9917 this.yyleng = this.yytext.length;
9918 return this;
9919 },
9920 // When called from action, caches matched text and appends it on next action
9921 more: function () {
9922 this._more = true;
9923 return this;
9924 },
9925 // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
9926 reject: function () {
9927 if (this.options.backtrack_lexer) {
9928 this._backtrack = true;
9929 } else {
9930 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(), {
9931 text: "",
9932 token: null,
9933 line: this.yylineno
9934 });
9935 }
9936
9937 return this;
9938 },
9939 // retain first n characters of the match
9940 less: function (n) {
9941 this.unput(this.match.slice(n));
9942 },
9943 // displays already matched input, i.e. for error messages
9944 pastInput: function () {
9945 var past = this.matched.substr(0, this.matched.length - this.match.length);
9946 return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
9947 },
9948 // displays upcoming input, i.e. for error messages
9949 upcomingInput: function () {
9950 var next = this.match;
9951
9952 if (next.length < 20) {
9953 next += this._input.substr(0, 20 - next.length);
9954 }
9955
9956 return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
9957 },
9958 // displays the character position where the lexing error occurred, i.e. for error messages
9959 showPosition: function () {
9960 var pre = this.pastInput();
9961 var c = new Array(pre.length + 1).join("-");
9962 return pre + this.upcomingInput() + "\n" + c + "^";
9963 },
9964 // test the lexed token: return FALSE when not a match, otherwise return token
9965 test_match: function (match, indexed_rule) {
9966 var token, lines, backup;
9967
9968 if (this.options.backtrack_lexer) {
9969 // save context
9970 backup = {
9971 yylineno: this.yylineno,
9972 yylloc: {
9973 first_line: this.yylloc.first_line,
9974 last_line: this.last_line,
9975 first_column: this.yylloc.first_column,
9976 last_column: this.yylloc.last_column
9977 },
9978 yytext: this.yytext,
9979 match: this.match,
9980 matches: this.matches,
9981 matched: this.matched,
9982 yyleng: this.yyleng,
9983 offset: this.offset,
9984 _more: this._more,
9985 _input: this._input,
9986 yy: this.yy,
9987 conditionStack: this.conditionStack.slice(0),
9988 done: this.done
9989 };
9990
9991 if (this.options.ranges) {
9992 backup.yylloc.range = this.yylloc.range.slice(0);
9993 }
9994 }
9995
9996 lines = match[0].match(/(?:\r\n?|\n).*/g);
9997
9998 if (lines) {
9999 this.yylineno += lines.length;
10000 }
10001
10002 this.yylloc = {
10003 first_line: this.yylloc.last_line,
10004 last_line: this.yylineno + 1,
10005 first_column: this.yylloc.last_column,
10006 last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
10007 };
10008 this.yytext += match[0];
10009 this.match += match[0];
10010 this.matches = match;
10011 this.yyleng = this.yytext.length;
10012
10013 if (this.options.ranges) {
10014 this.yylloc.range = [this.offset, this.offset += this.yyleng];
10015 }
10016
10017 this._more = false;
10018 this._backtrack = false;
10019 this._input = this._input.slice(match[0].length);
10020 this.matched += match[0];
10021 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
10022
10023 if (this.done && this._input) {
10024 this.done = false;
10025 }
10026
10027 if (token) {
10028 return token;
10029 } else if (this._backtrack) {
10030 // recover context
10031 for (var k in backup) {
10032 this[k] = backup[k];
10033 }
10034
10035 return false; // rule action called reject() implying the next rule should be tested instead.
10036 }
10037
10038 return false;
10039 },
10040 // return next match in input
10041 next: function () {
10042 if (this.done) {
10043 return this.EOF;
10044 }
10045
10046 if (!this._input) {
10047 this.done = true;
10048 }
10049
10050 var token, match, tempMatch, index;
10051
10052 if (!this._more) {
10053 this.yytext = '';
10054 this.match = '';
10055 }
10056
10057 var rules = this._currentRules();
10058
10059 for (var i = 0; i < rules.length; i++) {
10060 tempMatch = this._input.match(this.rules[rules[i]]);
10061
10062 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
10063 match = tempMatch;
10064 index = i;
10065
10066 if (this.options.backtrack_lexer) {
10067 token = this.test_match(tempMatch, rules[i]);
10068
10069 if (token !== false) {
10070 return token;
10071 } else if (this._backtrack) {
10072 match = false;
10073 continue; // rule action called reject() implying a rule MISmatch.
10074 } else {
10075 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
10076 return false;
10077 }
10078 } else if (!this.options.flex) {
10079 break;
10080 }
10081 }
10082 }
10083
10084 if (match) {
10085 token = this.test_match(match, rules[index]);
10086
10087 if (token !== false) {
10088 return token;
10089 } // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
10090
10091
10092 return false;
10093 }
10094
10095 if (this._input === "") {
10096 return this.EOF;
10097 } else {
10098 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
10099 text: "",
10100 token: null,
10101 line: this.yylineno
10102 });
10103 }
10104 },
10105 // return next match that has a token
10106 lex: function lex() {
10107 var r = this.next();
10108
10109 if (r) {
10110 return r;
10111 } else {
10112 return this.lex();
10113 }
10114 },
10115 // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
10116 begin: function begin(condition) {
10117 this.conditionStack.push(condition);
10118 },
10119 // pop the previously active lexer condition state off the condition stack
10120 popState: function popState() {
10121 var n = this.conditionStack.length - 1;
10122
10123 if (n > 0) {
10124 return this.conditionStack.pop();
10125 } else {
10126 return this.conditionStack[0];
10127 }
10128 },
10129 // produce the lexer rule set which is active for the currently active lexer condition state
10130 _currentRules: function _currentRules() {
10131 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
10132 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
10133 } else {
10134 return this.conditions["INITIAL"].rules;
10135 }
10136 },
10137 // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
10138 topState: function topState(n) {
10139 n = this.conditionStack.length - 1 - Math.abs(n || 0);
10140
10141 if (n >= 0) {
10142 return this.conditionStack[n];
10143 } else {
10144 return "INITIAL";
10145 }
10146 },
10147 // alias for begin(condition)
10148 pushState: function pushState(condition) {
10149 this.begin(condition);
10150 },
10151 // return the number of states currently on the stack
10152 stateStackSize: function stateStackSize() {
10153 return this.conditionStack.length;
10154 },
10155 options: {
10156 "case-insensitive": true
10157 },
10158 performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
10159 var YYSTATE = YY_START;
10160
10161 switch ($avoiding_name_collisions) {
10162 case 0:
10163 return 12;
10164 break;
10165
10166 case 1:
10167 /* skip all whitespace */
10168 break;
10169
10170 case 2:
10171 /* skip comments */
10172 break;
10173
10174 case 3:
10175 /* skip comments */
10176 break;
10177
10178 case 4:
10179 return 4;
10180 break;
10181
10182 case 5:
10183 return 15;
10184 break;
10185
10186 case 6:
10187 return 17;
10188 break;
10189
10190 case 7:
10191 return 20;
10192 break;
10193
10194 case 8:
10195 return 21;
10196 break;
10197
10198 case 9:
10199 return 19;
10200 break;
10201
10202 case 10:
10203 return 8;
10204 break;
10205
10206 case 11:
10207 return 8;
10208 break;
10209
10210 case 12:
10211 return 5;
10212 break;
10213
10214 case 13:
10215 return 26;
10216 break;
10217
10218 case 14:
10219 this.begin("options");
10220 break;
10221
10222 case 15:
10223 this.popState();
10224 break;
10225
10226 case 16:
10227 return 11;
10228 break;
10229
10230 case 17:
10231 this.begin("string");
10232 break;
10233
10234 case 18:
10235 this.popState();
10236 break;
10237
10238 case 19:
10239 return 23;
10240 break;
10241
10242 case 20:
10243 return 18;
10244 break;
10245
10246 case 21:
10247 return 7;
10248 break;
10249 }
10250 },
10251 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],
10252 conditions: {
10253 "options": {
10254 "rules": [15, 16],
10255 "inclusive": false
10256 },
10257 "string": {
10258 "rules": [18, 19],
10259 "inclusive": false
10260 },
10261 "INITIAL": {
10262 "rules": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17, 20, 21],
10263 "inclusive": true
10264 }
10265 }
10266 };
10267 return lexer;
10268 }();
10269
10270 parser.lexer = lexer;
10271
10272 function Parser() {
10273 this.yy = {};
10274 }
10275
10276 Parser.prototype = parser;
10277 parser.Parser = Parser;
10278 return new Parser();
10279}();
10280
10281if (true) {
10282 exports.parser = parser;
10283 exports.Parser = parser.Parser;
10284
10285 exports.parse = function () {
10286 return parser.parse.apply(parser, arguments);
10287 };
10288
10289 exports.main = function commonjsMain(args) {
10290 if (!args[1]) {
10291 console.log('Usage: ' + args[0] + ' FILE');
10292 process.exit(1);
10293 }
10294
10295 var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
10296
10297 return exports.parser.parse(source);
10298 };
10299
10300 if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
10301 exports.main(process.argv.slice(1));
10302 }
10303}
10304/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
10305
10306/***/ }),
10307
10308/***/ "./src/diagrams/info/infoDb.js":
10309/*!*************************************!*\
10310 !*** ./src/diagrams/info/infoDb.js ***!
10311 \*************************************/
10312/*! exports provided: setMessage, getMessage, setInfo, getInfo, default */
10313/***/ (function(module, __webpack_exports__, __webpack_require__) {
10314
10315"use strict";
10316__webpack_require__.r(__webpack_exports__);
10317/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setMessage", function() { return setMessage; });
10318/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMessage", function() { return getMessage; });
10319/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setInfo", function() { return setInfo; });
10320/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getInfo", function() { return getInfo; });
10321/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
10322/**
10323 * Created by knut on 15-01-14.
10324 */
10325
10326var message = '';
10327var info = false;
10328const setMessage = txt => {
10329 _logger__WEBPACK_IMPORTED_MODULE_0__["logger"].debug('Setting message to: ' + txt);
10330 message = txt;
10331};
10332const getMessage = () => {
10333 return message;
10334};
10335const setInfo = inf => {
10336 info = inf;
10337};
10338const getInfo = () => {
10339 return info;
10340}; // export const parseError = (err, hash) => {
10341// global.mermaidAPI.parseError(err, hash)
10342// }
10343
10344/* harmony default export */ __webpack_exports__["default"] = ({
10345 setMessage,
10346 getMessage,
10347 setInfo,
10348 getInfo // parseError
10349
10350});
10351
10352/***/ }),
10353
10354/***/ "./src/diagrams/info/infoRenderer.js":
10355/*!*******************************************!*\
10356 !*** ./src/diagrams/info/infoRenderer.js ***!
10357 \*******************************************/
10358/*! exports provided: setConf, draw, default */
10359/***/ (function(module, __webpack_exports__, __webpack_require__) {
10360
10361"use strict";
10362__webpack_require__.r(__webpack_exports__);
10363/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
10364/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
10365/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
10366/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
10367/* harmony import */ var _infoDb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./infoDb */ "./src/diagrams/info/infoDb.js");
10368/* harmony import */ var _parser_info_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parser/info.js */ "./src/diagrams/info/parser/info.js");
10369/* harmony import */ var _parser_info_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_parser_info_js__WEBPACK_IMPORTED_MODULE_2__);
10370/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
10371/**
10372 * Created by knut on 14-12-11.
10373 */
10374
10375
10376
10377
10378const conf = {};
10379const setConf = function (cnf) {
10380 const keys = Object.keys(cnf);
10381 keys.forEach(function (key) {
10382 conf[key] = cnf[key];
10383 });
10384};
10385/**
10386 * Draws a an info picture in the tag with id: id based on the graph definition in text.
10387 * @param text
10388 * @param id
10389 */
10390
10391const draw = (txt, id, ver) => {
10392 try {
10393 const parser = _parser_info_js__WEBPACK_IMPORTED_MODULE_2___default.a.parser;
10394 parser.yy = _infoDb__WEBPACK_IMPORTED_MODULE_1__["default"];
10395 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Renering info diagram\n' + txt); // Parse the graph definition
10396
10397 parser.parse(txt);
10398 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Parsed info diagram'); // Fetch the default direction, use TD if none was found
10399
10400 const svg = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#' + id);
10401 const g = svg.append('g');
10402 g.append('text') // text label for the x axis
10403 .attr('x', 100).attr('y', 40).attr('class', 'version').attr('font-size', '32px').style('text-anchor', 'middle').text('v ' + ver);
10404 svg.attr('height', 100);
10405 svg.attr('width', 400); // svg.attr('viewBox', '0 0 300 150');
10406 } catch (e) {
10407 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].error('Error while rendering info diagram');
10408 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].error(e.message);
10409 }
10410};
10411/* harmony default export */ __webpack_exports__["default"] = ({
10412 setConf,
10413 draw
10414});
10415
10416/***/ }),
10417
10418/***/ "./src/diagrams/info/parser/info.js":
10419/*!******************************************!*\
10420 !*** ./src/diagrams/info/parser/info.js ***!
10421 \******************************************/
10422/*! no static exports found */
10423/***/ (function(module, exports, __webpack_require__) {
10424
10425/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
10426
10427/*
10428 Returns a Parser object of the following structure:
10429
10430 Parser: {
10431 yy: {}
10432 }
10433
10434 Parser.prototype: {
10435 yy: {},
10436 trace: function(),
10437 symbols_: {associative list: name ==> number},
10438 terminals_: {associative list: number ==> name},
10439 productions_: [...],
10440 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
10441 table: [...],
10442 defaultActions: {...},
10443 parseError: function(str, hash),
10444 parse: function(input),
10445
10446 lexer: {
10447 EOF: 1,
10448 parseError: function(str, hash),
10449 setInput: function(input),
10450 input: function(),
10451 unput: function(str),
10452 more: function(),
10453 less: function(n),
10454 pastInput: function(),
10455 upcomingInput: function(),
10456 showPosition: function(),
10457 test_match: function(regex_match_array, rule_index),
10458 next: function(),
10459 lex: function(),
10460 begin: function(condition),
10461 popState: function(),
10462 _currentRules: function(),
10463 topState: function(),
10464 pushState: function(condition),
10465
10466 options: {
10467 ranges: boolean (optional: true ==> token location info will include a .range[] member)
10468 flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
10469 backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
10470 },
10471
10472 performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
10473 rules: [...],
10474 conditions: {associative list: name ==> set},
10475 }
10476 }
10477
10478
10479 token location info (@$, _$, etc.): {
10480 first_line: n,
10481 last_line: n,
10482 first_column: n,
10483 last_column: n,
10484 range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
10485 }
10486
10487
10488 the parseError function receives a 'hash' object with these members for lexer and parser errors: {
10489 text: (matched text)
10490 token: (the produced terminal token, if any)
10491 line: (yylineno)
10492 }
10493 while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
10494 loc: (yylloc)
10495 expected: (string describing the set of expected tokens)
10496 recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
10497 }
10498*/
10499var parser = function () {
10500 var o = function (k, v, o, l) {
10501 for (o = o || {}, l = k.length; l--; o[k[l]] = v);
10502
10503 return o;
10504 },
10505 $V0 = [6, 9, 10, 12];
10506
10507 var parser = {
10508 trace: function trace() {},
10509 yy: {},
10510 symbols_: {
10511 "error": 2,
10512 "start": 3,
10513 "info": 4,
10514 "document": 5,
10515 "EOF": 6,
10516 "line": 7,
10517 "statement": 8,
10518 "NL": 9,
10519 "showInfo": 10,
10520 "message": 11,
10521 "say": 12,
10522 "TXT": 13,
10523 "$accept": 0,
10524 "$end": 1
10525 },
10526 terminals_: {
10527 2: "error",
10528 4: "info",
10529 6: "EOF",
10530 9: "NL",
10531 10: "showInfo",
10532 12: "say",
10533 13: "TXT"
10534 },
10535 productions_: [0, [3, 3], [5, 0], [5, 2], [7, 1], [7, 1], [8, 1], [8, 1], [11, 2]],
10536 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate
10537 /* action[1] */
10538 , $$
10539 /* vstack */
10540 , _$
10541 /* lstack */
10542 ) {
10543 /* this == yyval */
10544 var $0 = $$.length - 1;
10545
10546 switch (yystate) {
10547 case 1:
10548 return yy;
10549 break;
10550
10551 case 4:
10552 break;
10553
10554 case 6:
10555 yy.setInfo(true);
10556 break;
10557
10558 case 7:
10559 yy.setMessage($$[$0]);
10560 break;
10561
10562 case 8:
10563 this.$ = $$[$0 - 1].substring(1).trim().replace(/\\n/gm, "\n");
10564 break;
10565 }
10566 },
10567 table: [{
10568 3: 1,
10569 4: [1, 2]
10570 }, {
10571 1: [3]
10572 }, o($V0, [2, 2], {
10573 5: 3
10574 }), {
10575 6: [1, 4],
10576 7: 5,
10577 8: 6,
10578 9: [1, 7],
10579 10: [1, 8],
10580 11: 9,
10581 12: [1, 10]
10582 }, {
10583 1: [2, 1]
10584 }, o($V0, [2, 3]), o($V0, [2, 4]), o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 7]), {
10585 13: [1, 11]
10586 }, o($V0, [2, 8])],
10587 defaultActions: {
10588 4: [2, 1]
10589 },
10590 parseError: function parseError(str, hash) {
10591 if (hash.recoverable) {
10592 this.trace(str);
10593 } else {
10594 var error = new Error(str);
10595 error.hash = hash;
10596 throw error;
10597 }
10598 },
10599 parse: function parse(input) {
10600 var self = this,
10601 stack = [0],
10602 tstack = [],
10603 vstack = [null],
10604 lstack = [],
10605 table = this.table,
10606 yytext = '',
10607 yylineno = 0,
10608 yyleng = 0,
10609 recovering = 0,
10610 TERROR = 2,
10611 EOF = 1;
10612 var args = lstack.slice.call(arguments, 1);
10613 var lexer = Object.create(this.lexer);
10614 var sharedState = {
10615 yy: {}
10616 };
10617
10618 for (var k in this.yy) {
10619 if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
10620 sharedState.yy[k] = this.yy[k];
10621 }
10622 }
10623
10624 lexer.setInput(input, sharedState.yy);
10625 sharedState.yy.lexer = lexer;
10626 sharedState.yy.parser = this;
10627
10628 if (typeof lexer.yylloc == 'undefined') {
10629 lexer.yylloc = {};
10630 }
10631
10632 var yyloc = lexer.yylloc;
10633 lstack.push(yyloc);
10634 var ranges = lexer.options && lexer.options.ranges;
10635
10636 if (typeof sharedState.yy.parseError === 'function') {
10637 this.parseError = sharedState.yy.parseError;
10638 } else {
10639 this.parseError = Object.getPrototypeOf(this).parseError;
10640 }
10641
10642 function popStack(n) {
10643 stack.length = stack.length - 2 * n;
10644 vstack.length = vstack.length - n;
10645 lstack.length = lstack.length - n;
10646 }
10647
10648 function lex() {
10649 var token;
10650 token = tstack.pop() || lexer.lex() || EOF;
10651
10652 if (typeof token !== 'number') {
10653 if (token instanceof Array) {
10654 tstack = token;
10655 token = tstack.pop();
10656 }
10657
10658 token = self.symbols_[token] || token;
10659 }
10660
10661 return token;
10662 }
10663
10664 var symbol,
10665 preErrorSymbol,
10666 state,
10667 action,
10668 a,
10669 r,
10670 yyval = {},
10671 p,
10672 len,
10673 newState,
10674 expected;
10675
10676 while (true) {
10677 state = stack[stack.length - 1];
10678
10679 if (this.defaultActions[state]) {
10680 action = this.defaultActions[state];
10681 } else {
10682 if (symbol === null || typeof symbol == 'undefined') {
10683 symbol = lex();
10684 }
10685
10686 action = table[state] && table[state][symbol];
10687 }
10688
10689 if (typeof action === 'undefined' || !action.length || !action[0]) {
10690 var errStr = '';
10691 expected = [];
10692
10693 for (p in table[state]) {
10694 if (this.terminals_[p] && p > TERROR) {
10695 expected.push('\'' + this.terminals_[p] + '\'');
10696 }
10697 }
10698
10699 if (lexer.showPosition) {
10700 errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
10701 } else {
10702 errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
10703 }
10704
10705 this.parseError(errStr, {
10706 text: lexer.match,
10707 token: this.terminals_[symbol] || symbol,
10708 line: lexer.yylineno,
10709 loc: yyloc,
10710 expected: expected
10711 });
10712 }
10713
10714 if (action[0] instanceof Array && action.length > 1) {
10715 throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
10716 }
10717
10718 switch (action[0]) {
10719 case 1:
10720 stack.push(symbol);
10721 vstack.push(lexer.yytext);
10722 lstack.push(lexer.yylloc);
10723 stack.push(action[1]);
10724 symbol = null;
10725
10726 if (!preErrorSymbol) {
10727 yyleng = lexer.yyleng;
10728 yytext = lexer.yytext;
10729 yylineno = lexer.yylineno;
10730 yyloc = lexer.yylloc;
10731
10732 if (recovering > 0) {
10733 recovering--;
10734 }
10735 } else {
10736 symbol = preErrorSymbol;
10737 preErrorSymbol = null;
10738 }
10739
10740 break;
10741
10742 case 2:
10743 len = this.productions_[action[1]][1];
10744 yyval.$ = vstack[vstack.length - len];
10745 yyval._$ = {
10746 first_line: lstack[lstack.length - (len || 1)].first_line,
10747 last_line: lstack[lstack.length - 1].last_line,
10748 first_column: lstack[lstack.length - (len || 1)].first_column,
10749 last_column: lstack[lstack.length - 1].last_column
10750 };
10751
10752 if (ranges) {
10753 yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
10754 }
10755
10756 r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));
10757
10758 if (typeof r !== 'undefined') {
10759 return r;
10760 }
10761
10762 if (len) {
10763 stack = stack.slice(0, -1 * len * 2);
10764 vstack = vstack.slice(0, -1 * len);
10765 lstack = lstack.slice(0, -1 * len);
10766 }
10767
10768 stack.push(this.productions_[action[1]][0]);
10769 vstack.push(yyval.$);
10770 lstack.push(yyval._$);
10771 newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
10772 stack.push(newState);
10773 break;
10774
10775 case 3:
10776 return true;
10777 }
10778 }
10779
10780 return true;
10781 }
10782 };
10783 /* generated by jison-lex 0.3.4 */
10784
10785 var lexer = function () {
10786 var lexer = {
10787 EOF: 1,
10788 parseError: function parseError(str, hash) {
10789 if (this.yy.parser) {
10790 this.yy.parser.parseError(str, hash);
10791 } else {
10792 throw new Error(str);
10793 }
10794 },
10795 // resets the lexer, sets new input
10796 setInput: function (input, yy) {
10797 this.yy = yy || this.yy || {};
10798 this._input = input;
10799 this._more = this._backtrack = this.done = false;
10800 this.yylineno = this.yyleng = 0;
10801 this.yytext = this.matched = this.match = '';
10802 this.conditionStack = ['INITIAL'];
10803 this.yylloc = {
10804 first_line: 1,
10805 first_column: 0,
10806 last_line: 1,
10807 last_column: 0
10808 };
10809
10810 if (this.options.ranges) {
10811 this.yylloc.range = [0, 0];
10812 }
10813
10814 this.offset = 0;
10815 return this;
10816 },
10817 // consumes and returns one char from the input
10818 input: function () {
10819 var ch = this._input[0];
10820 this.yytext += ch;
10821 this.yyleng++;
10822 this.offset++;
10823 this.match += ch;
10824 this.matched += ch;
10825 var lines = ch.match(/(?:\r\n?|\n).*/g);
10826
10827 if (lines) {
10828 this.yylineno++;
10829 this.yylloc.last_line++;
10830 } else {
10831 this.yylloc.last_column++;
10832 }
10833
10834 if (this.options.ranges) {
10835 this.yylloc.range[1]++;
10836 }
10837
10838 this._input = this._input.slice(1);
10839 return ch;
10840 },
10841 // unshifts one char (or a string) into the input
10842 unput: function (ch) {
10843 var len = ch.length;
10844 var lines = ch.split(/(?:\r\n?|\n)/g);
10845 this._input = ch + this._input;
10846 this.yytext = this.yytext.substr(0, this.yytext.length - len); //this.yyleng -= len;
10847
10848 this.offset -= len;
10849 var oldLines = this.match.split(/(?:\r\n?|\n)/g);
10850 this.match = this.match.substr(0, this.match.length - 1);
10851 this.matched = this.matched.substr(0, this.matched.length - 1);
10852
10853 if (lines.length - 1) {
10854 this.yylineno -= lines.length - 1;
10855 }
10856
10857 var r = this.yylloc.range;
10858 this.yylloc = {
10859 first_line: this.yylloc.first_line,
10860 last_line: this.yylineno + 1,
10861 first_column: this.yylloc.first_column,
10862 last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
10863 };
10864
10865 if (this.options.ranges) {
10866 this.yylloc.range = [r[0], r[0] + this.yyleng - len];
10867 }
10868
10869 this.yyleng = this.yytext.length;
10870 return this;
10871 },
10872 // When called from action, caches matched text and appends it on next action
10873 more: function () {
10874 this._more = true;
10875 return this;
10876 },
10877 // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
10878 reject: function () {
10879 if (this.options.backtrack_lexer) {
10880 this._backtrack = true;
10881 } else {
10882 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(), {
10883 text: "",
10884 token: null,
10885 line: this.yylineno
10886 });
10887 }
10888
10889 return this;
10890 },
10891 // retain first n characters of the match
10892 less: function (n) {
10893 this.unput(this.match.slice(n));
10894 },
10895 // displays already matched input, i.e. for error messages
10896 pastInput: function () {
10897 var past = this.matched.substr(0, this.matched.length - this.match.length);
10898 return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
10899 },
10900 // displays upcoming input, i.e. for error messages
10901 upcomingInput: function () {
10902 var next = this.match;
10903
10904 if (next.length < 20) {
10905 next += this._input.substr(0, 20 - next.length);
10906 }
10907
10908 return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
10909 },
10910 // displays the character position where the lexing error occurred, i.e. for error messages
10911 showPosition: function () {
10912 var pre = this.pastInput();
10913 var c = new Array(pre.length + 1).join("-");
10914 return pre + this.upcomingInput() + "\n" + c + "^";
10915 },
10916 // test the lexed token: return FALSE when not a match, otherwise return token
10917 test_match: function (match, indexed_rule) {
10918 var token, lines, backup;
10919
10920 if (this.options.backtrack_lexer) {
10921 // save context
10922 backup = {
10923 yylineno: this.yylineno,
10924 yylloc: {
10925 first_line: this.yylloc.first_line,
10926 last_line: this.last_line,
10927 first_column: this.yylloc.first_column,
10928 last_column: this.yylloc.last_column
10929 },
10930 yytext: this.yytext,
10931 match: this.match,
10932 matches: this.matches,
10933 matched: this.matched,
10934 yyleng: this.yyleng,
10935 offset: this.offset,
10936 _more: this._more,
10937 _input: this._input,
10938 yy: this.yy,
10939 conditionStack: this.conditionStack.slice(0),
10940 done: this.done
10941 };
10942
10943 if (this.options.ranges) {
10944 backup.yylloc.range = this.yylloc.range.slice(0);
10945 }
10946 }
10947
10948 lines = match[0].match(/(?:\r\n?|\n).*/g);
10949
10950 if (lines) {
10951 this.yylineno += lines.length;
10952 }
10953
10954 this.yylloc = {
10955 first_line: this.yylloc.last_line,
10956 last_line: this.yylineno + 1,
10957 first_column: this.yylloc.last_column,
10958 last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
10959 };
10960 this.yytext += match[0];
10961 this.match += match[0];
10962 this.matches = match;
10963 this.yyleng = this.yytext.length;
10964
10965 if (this.options.ranges) {
10966 this.yylloc.range = [this.offset, this.offset += this.yyleng];
10967 }
10968
10969 this._more = false;
10970 this._backtrack = false;
10971 this._input = this._input.slice(match[0].length);
10972 this.matched += match[0];
10973 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
10974
10975 if (this.done && this._input) {
10976 this.done = false;
10977 }
10978
10979 if (token) {
10980 return token;
10981 } else if (this._backtrack) {
10982 // recover context
10983 for (var k in backup) {
10984 this[k] = backup[k];
10985 }
10986
10987 return false; // rule action called reject() implying the next rule should be tested instead.
10988 }
10989
10990 return false;
10991 },
10992 // return next match in input
10993 next: function () {
10994 if (this.done) {
10995 return this.EOF;
10996 }
10997
10998 if (!this._input) {
10999 this.done = true;
11000 }
11001
11002 var token, match, tempMatch, index;
11003
11004 if (!this._more) {
11005 this.yytext = '';
11006 this.match = '';
11007 }
11008
11009 var rules = this._currentRules();
11010
11011 for (var i = 0; i < rules.length; i++) {
11012 tempMatch = this._input.match(this.rules[rules[i]]);
11013
11014 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
11015 match = tempMatch;
11016 index = i;
11017
11018 if (this.options.backtrack_lexer) {
11019 token = this.test_match(tempMatch, rules[i]);
11020
11021 if (token !== false) {
11022 return token;
11023 } else if (this._backtrack) {
11024 match = false;
11025 continue; // rule action called reject() implying a rule MISmatch.
11026 } else {
11027 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
11028 return false;
11029 }
11030 } else if (!this.options.flex) {
11031 break;
11032 }
11033 }
11034 }
11035
11036 if (match) {
11037 token = this.test_match(match, rules[index]);
11038
11039 if (token !== false) {
11040 return token;
11041 } // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
11042
11043
11044 return false;
11045 }
11046
11047 if (this._input === "") {
11048 return this.EOF;
11049 } else {
11050 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
11051 text: "",
11052 token: null,
11053 line: this.yylineno
11054 });
11055 }
11056 },
11057 // return next match that has a token
11058 lex: function lex() {
11059 var r = this.next();
11060
11061 if (r) {
11062 return r;
11063 } else {
11064 return this.lex();
11065 }
11066 },
11067 // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
11068 begin: function begin(condition) {
11069 this.conditionStack.push(condition);
11070 },
11071 // pop the previously active lexer condition state off the condition stack
11072 popState: function popState() {
11073 var n = this.conditionStack.length - 1;
11074
11075 if (n > 0) {
11076 return this.conditionStack.pop();
11077 } else {
11078 return this.conditionStack[0];
11079 }
11080 },
11081 // produce the lexer rule set which is active for the currently active lexer condition state
11082 _currentRules: function _currentRules() {
11083 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
11084 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
11085 } else {
11086 return this.conditions["INITIAL"].rules;
11087 }
11088 },
11089 // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
11090 topState: function topState(n) {
11091 n = this.conditionStack.length - 1 - Math.abs(n || 0);
11092
11093 if (n >= 0) {
11094 return this.conditionStack[n];
11095 } else {
11096 return "INITIAL";
11097 }
11098 },
11099 // alias for begin(condition)
11100 pushState: function pushState(condition) {
11101 this.begin(condition);
11102 },
11103 // return the number of states currently on the stack
11104 stateStackSize: function stateStackSize() {
11105 return this.conditionStack.length;
11106 },
11107 options: {
11108 "case-insensitive": true
11109 },
11110 performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
11111 // Pre-lexer code can go here
11112 var YYSTATE = YY_START;
11113
11114 switch ($avoiding_name_collisions) {
11115 case 0:
11116 return 4;
11117 break;
11118
11119 case 1:
11120 return 9;
11121 break;
11122
11123 case 2:
11124 return 'space';
11125 break;
11126
11127 case 3:
11128 return 10;
11129 break;
11130
11131 case 4:
11132 return 12;
11133 break;
11134
11135 case 5:
11136 return 6;
11137 break;
11138
11139 case 6:
11140 return 13;
11141 break;
11142 }
11143 },
11144 rules: [/^(?:info\b)/i, /^(?:[\s\n\r]+)/i, /^(?:[\s]+)/i, /^(?:showInfo\b)/i, /^(?:say\b)/i, /^(?:$)/i, /^(?:.)/i],
11145 conditions: {
11146 "INITIAL": {
11147 "rules": [0, 1, 2, 3, 4, 5, 6],
11148 "inclusive": true
11149 }
11150 }
11151 };
11152 return lexer;
11153 }();
11154
11155 parser.lexer = lexer;
11156
11157 function Parser() {
11158 this.yy = {};
11159 }
11160
11161 Parser.prototype = parser;
11162 parser.Parser = Parser;
11163 return new Parser();
11164}();
11165
11166if (true) {
11167 exports.parser = parser;
11168 exports.Parser = parser.Parser;
11169
11170 exports.parse = function () {
11171 return parser.parse.apply(parser, arguments);
11172 };
11173
11174 exports.main = function commonjsMain(args) {
11175 if (!args[1]) {
11176 console.log('Usage: ' + args[0] + ' FILE');
11177 process.exit(1);
11178 }
11179
11180 var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
11181
11182 return exports.parser.parse(source);
11183 };
11184
11185 if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
11186 exports.main(process.argv.slice(1));
11187 }
11188}
11189/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
11190
11191/***/ }),
11192
11193/***/ "./src/diagrams/sequence/parser/sequenceDiagram.js":
11194/*!*********************************************************!*\
11195 !*** ./src/diagrams/sequence/parser/sequenceDiagram.js ***!
11196 \*********************************************************/
11197/*! no static exports found */
11198/***/ (function(module, exports, __webpack_require__) {
11199
11200/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
11201
11202/*
11203 Returns a Parser object of the following structure:
11204
11205 Parser: {
11206 yy: {}
11207 }
11208
11209 Parser.prototype: {
11210 yy: {},
11211 trace: function(),
11212 symbols_: {associative list: name ==> number},
11213 terminals_: {associative list: number ==> name},
11214 productions_: [...],
11215 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
11216 table: [...],
11217 defaultActions: {...},
11218 parseError: function(str, hash),
11219 parse: function(input),
11220
11221 lexer: {
11222 EOF: 1,
11223 parseError: function(str, hash),
11224 setInput: function(input),
11225 input: function(),
11226 unput: function(str),
11227 more: function(),
11228 less: function(n),
11229 pastInput: function(),
11230 upcomingInput: function(),
11231 showPosition: function(),
11232 test_match: function(regex_match_array, rule_index),
11233 next: function(),
11234 lex: function(),
11235 begin: function(condition),
11236 popState: function(),
11237 _currentRules: function(),
11238 topState: function(),
11239 pushState: function(condition),
11240
11241 options: {
11242 ranges: boolean (optional: true ==> token location info will include a .range[] member)
11243 flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
11244 backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
11245 },
11246
11247 performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
11248 rules: [...],
11249 conditions: {associative list: name ==> set},
11250 }
11251 }
11252
11253
11254 token location info (@$, _$, etc.): {
11255 first_line: n,
11256 last_line: n,
11257 first_column: n,
11258 last_column: n,
11259 range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
11260 }
11261
11262
11263 the parseError function receives a 'hash' object with these members for lexer and parser errors: {
11264 text: (matched text)
11265 token: (the produced terminal token, if any)
11266 line: (yylineno)
11267 }
11268 while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
11269 loc: (yylloc)
11270 expected: (string describing the set of expected tokens)
11271 recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
11272 }
11273*/
11274var parser = function () {
11275 var o = function (k, v, o, l) {
11276 for (o = o || {}, l = k.length; l--; o[k[l]] = v);
11277
11278 return o;
11279 },
11280 $V0 = [1, 2],
11281 $V1 = [1, 3],
11282 $V2 = [1, 4],
11283 $V3 = [2, 4],
11284 $V4 = [1, 9],
11285 $V5 = [1, 11],
11286 $V6 = [1, 12],
11287 $V7 = [1, 14],
11288 $V8 = [1, 15],
11289 $V9 = [1, 17],
11290 $Va = [1, 18],
11291 $Vb = [1, 19],
11292 $Vc = [1, 20],
11293 $Vd = [1, 21],
11294 $Ve = [1, 23],
11295 $Vf = [1, 24],
11296 $Vg = [1, 4, 5, 10, 15, 16, 18, 20, 21, 22, 23, 25, 27, 28, 29, 40],
11297 $Vh = [1, 32],
11298 $Vi = [4, 5, 10, 15, 16, 18, 20, 21, 22, 23, 25, 29, 40],
11299 $Vj = [4, 5, 10, 15, 16, 18, 20, 21, 22, 23, 25, 28, 29, 40],
11300 $Vk = [4, 5, 10, 15, 16, 18, 20, 21, 22, 23, 25, 27, 29, 40],
11301 $Vl = [38, 39, 40];
11302
11303 var parser = {
11304 trace: function trace() {},
11305 yy: {},
11306 symbols_: {
11307 "error": 2,
11308 "start": 3,
11309 "SPACE": 4,
11310 "NL": 5,
11311 "SD": 6,
11312 "document": 7,
11313 "line": 8,
11314 "statement": 9,
11315 "participant": 10,
11316 "actor": 11,
11317 "AS": 12,
11318 "restOfLine": 13,
11319 "signal": 14,
11320 "activate": 15,
11321 "deactivate": 16,
11322 "note_statement": 17,
11323 "title": 18,
11324 "text2": 19,
11325 "loop": 20,
11326 "end": 21,
11327 "opt": 22,
11328 "alt": 23,
11329 "else_sections": 24,
11330 "par": 25,
11331 "par_sections": 26,
11332 "and": 27,
11333 "else": 28,
11334 "note": 29,
11335 "placement": 30,
11336 "over": 31,
11337 "actor_pair": 32,
11338 "spaceList": 33,
11339 ",": 34,
11340 "left_of": 35,
11341 "right_of": 36,
11342 "signaltype": 37,
11343 "+": 38,
11344 "-": 39,
11345 "ACTOR": 40,
11346 "SOLID_OPEN_ARROW": 41,
11347 "DOTTED_OPEN_ARROW": 42,
11348 "SOLID_ARROW": 43,
11349 "DOTTED_ARROW": 44,
11350 "SOLID_CROSS": 45,
11351 "DOTTED_CROSS": 46,
11352 "TXT": 47,
11353 "$accept": 0,
11354 "$end": 1
11355 },
11356 terminals_: {
11357 2: "error",
11358 4: "SPACE",
11359 5: "NL",
11360 6: "SD",
11361 10: "participant",
11362 12: "AS",
11363 13: "restOfLine",
11364 15: "activate",
11365 16: "deactivate",
11366 18: "title",
11367 20: "loop",
11368 21: "end",
11369 22: "opt",
11370 23: "alt",
11371 25: "par",
11372 27: "and",
11373 28: "else",
11374 29: "note",
11375 31: "over",
11376 34: ",",
11377 35: "left_of",
11378 36: "right_of",
11379 38: "+",
11380 39: "-",
11381 40: "ACTOR",
11382 41: "SOLID_OPEN_ARROW",
11383 42: "DOTTED_OPEN_ARROW",
11384 43: "SOLID_ARROW",
11385 44: "DOTTED_ARROW",
11386 45: "SOLID_CROSS",
11387 46: "DOTTED_CROSS",
11388 47: "TXT"
11389 },
11390 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], [26, 1], [26, 4], [24, 1], [24, 4], [17, 4], [17, 4], [33, 2], [33, 1], [32, 3], [32, 1], [30, 1], [30, 1], [14, 5], [14, 5], [14, 4], [11, 1], [37, 1], [37, 1], [37, 1], [37, 1], [37, 1], [37, 1], [19, 1]],
11391 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate
11392 /* action[1] */
11393 , $$
11394 /* vstack */
11395 , _$
11396 /* lstack */
11397 ) {
11398 /* this == yyval */
11399 var $0 = $$.length - 1;
11400
11401 switch (yystate) {
11402 case 3:
11403 yy.apply($$[$0]);
11404 return $$[$0];
11405 break;
11406
11407 case 4:
11408 this.$ = [];
11409 break;
11410
11411 case 5:
11412 $$[$0 - 1].push($$[$0]);
11413 this.$ = $$[$0 - 1];
11414 break;
11415
11416 case 6:
11417 case 7:
11418 this.$ = $$[$0];
11419 break;
11420
11421 case 8:
11422 this.$ = [];
11423 break;
11424
11425 case 9:
11426 $$[$0 - 3].description = $$[$0 - 1];
11427 this.$ = $$[$0 - 3];
11428 break;
11429
11430 case 10:
11431 this.$ = $$[$0 - 1];
11432 break;
11433
11434 case 12:
11435 this.$ = {
11436 type: 'activeStart',
11437 signalType: yy.LINETYPE.ACTIVE_START,
11438 actor: $$[$0 - 1]
11439 };
11440 break;
11441
11442 case 13:
11443 this.$ = {
11444 type: 'activeEnd',
11445 signalType: yy.LINETYPE.ACTIVE_END,
11446 actor: $$[$0 - 1]
11447 };
11448 break;
11449
11450 case 15:
11451 this.$ = [{
11452 type: 'setTitle',
11453 text: $$[$0 - 1]
11454 }];
11455 break;
11456
11457 case 16:
11458 $$[$0 - 1].unshift({
11459 type: 'loopStart',
11460 loopText: $$[$0 - 2],
11461 signalType: yy.LINETYPE.LOOP_START
11462 });
11463 $$[$0 - 1].push({
11464 type: 'loopEnd',
11465 loopText: $$[$0 - 2],
11466 signalType: yy.LINETYPE.LOOP_END
11467 });
11468 this.$ = $$[$0 - 1];
11469 break;
11470
11471 case 17:
11472 $$[$0 - 1].unshift({
11473 type: 'optStart',
11474 optText: $$[$0 - 2],
11475 signalType: yy.LINETYPE.OPT_START
11476 });
11477 $$[$0 - 1].push({
11478 type: 'optEnd',
11479 optText: $$[$0 - 2],
11480 signalType: yy.LINETYPE.OPT_END
11481 });
11482 this.$ = $$[$0 - 1];
11483 break;
11484
11485 case 18:
11486 // Alt start
11487 $$[$0 - 1].unshift({
11488 type: 'altStart',
11489 altText: $$[$0 - 2],
11490 signalType: yy.LINETYPE.ALT_START
11491 }); // Content in alt is already in $$[$0-1]
11492 // End
11493
11494 $$[$0 - 1].push({
11495 type: 'altEnd',
11496 signalType: yy.LINETYPE.ALT_END
11497 });
11498 this.$ = $$[$0 - 1];
11499 break;
11500
11501 case 19:
11502 // Parallel start
11503 $$[$0 - 1].unshift({
11504 type: 'parStart',
11505 parText: $$[$0 - 2],
11506 signalType: yy.LINETYPE.PAR_START
11507 }); // Content in par is already in $$[$0-1]
11508 // End
11509
11510 $$[$0 - 1].push({
11511 type: 'parEnd',
11512 signalType: yy.LINETYPE.PAR_END
11513 });
11514 this.$ = $$[$0 - 1];
11515 break;
11516
11517 case 21:
11518 this.$ = $$[$0 - 3].concat([{
11519 type: 'and',
11520 parText: $$[$0 - 1],
11521 signalType: yy.LINETYPE.PAR_AND
11522 }, $$[$0]]);
11523 break;
11524
11525 case 23:
11526 this.$ = $$[$0 - 3].concat([{
11527 type: 'else',
11528 altText: $$[$0 - 1],
11529 signalType: yy.LINETYPE.ALT_ELSE
11530 }, $$[$0]]);
11531 break;
11532
11533 case 24:
11534 this.$ = [$$[$0 - 1], {
11535 type: 'addNote',
11536 placement: $$[$0 - 2],
11537 actor: $$[$0 - 1].actor,
11538 text: $$[$0]
11539 }];
11540 break;
11541
11542 case 25:
11543 // Coerce actor_pair into a [to, from, ...] array
11544 $$[$0 - 2] = [].concat($$[$0 - 1], $$[$0 - 1]).slice(0, 2);
11545 $$[$0 - 2][0] = $$[$0 - 2][0].actor;
11546 $$[$0 - 2][1] = $$[$0 - 2][1].actor;
11547 this.$ = [$$[$0 - 1], {
11548 type: 'addNote',
11549 placement: yy.PLACEMENT.OVER,
11550 actor: $$[$0 - 2].slice(0, 2),
11551 text: $$[$0]
11552 }];
11553 break;
11554
11555 case 28:
11556 this.$ = [$$[$0 - 2], $$[$0]];
11557 break;
11558
11559 case 29:
11560 this.$ = $$[$0];
11561 break;
11562
11563 case 30:
11564 this.$ = yy.PLACEMENT.LEFTOF;
11565 break;
11566
11567 case 31:
11568 this.$ = yy.PLACEMENT.RIGHTOF;
11569 break;
11570
11571 case 32:
11572 this.$ = [$$[$0 - 4], $$[$0 - 1], {
11573 type: 'addMessage',
11574 from: $$[$0 - 4].actor,
11575 to: $$[$0 - 1].actor,
11576 signalType: $$[$0 - 3],
11577 msg: $$[$0]
11578 }, {
11579 type: 'activeStart',
11580 signalType: yy.LINETYPE.ACTIVE_START,
11581 actor: $$[$0 - 1]
11582 }];
11583 break;
11584
11585 case 33:
11586 this.$ = [$$[$0 - 4], $$[$0 - 1], {
11587 type: 'addMessage',
11588 from: $$[$0 - 4].actor,
11589 to: $$[$0 - 1].actor,
11590 signalType: $$[$0 - 3],
11591 msg: $$[$0]
11592 }, {
11593 type: 'activeEnd',
11594 signalType: yy.LINETYPE.ACTIVE_END,
11595 actor: $$[$0 - 4]
11596 }];
11597 break;
11598
11599 case 34:
11600 this.$ = [$$[$0 - 3], $$[$0 - 1], {
11601 type: 'addMessage',
11602 from: $$[$0 - 3].actor,
11603 to: $$[$0 - 1].actor,
11604 signalType: $$[$0 - 2],
11605 msg: $$[$0]
11606 }];
11607 break;
11608
11609 case 35:
11610 this.$ = {
11611 type: 'addActor',
11612 actor: $$[$0]
11613 };
11614 break;
11615
11616 case 36:
11617 this.$ = yy.LINETYPE.SOLID_OPEN;
11618 break;
11619
11620 case 37:
11621 this.$ = yy.LINETYPE.DOTTED_OPEN;
11622 break;
11623
11624 case 38:
11625 this.$ = yy.LINETYPE.SOLID;
11626 break;
11627
11628 case 39:
11629 this.$ = yy.LINETYPE.DOTTED;
11630 break;
11631
11632 case 40:
11633 this.$ = yy.LINETYPE.SOLID_CROSS;
11634 break;
11635
11636 case 41:
11637 this.$ = yy.LINETYPE.DOTTED_CROSS;
11638 break;
11639
11640 case 42:
11641 this.$ = $$[$0].substring(1).trim().replace(/\\n/gm, "\n");
11642 break;
11643 }
11644 },
11645 table: [{
11646 3: 1,
11647 4: $V0,
11648 5: $V1,
11649 6: $V2
11650 }, {
11651 1: [3]
11652 }, {
11653 3: 5,
11654 4: $V0,
11655 5: $V1,
11656 6: $V2
11657 }, {
11658 3: 6,
11659 4: $V0,
11660 5: $V1,
11661 6: $V2
11662 }, o([1, 4, 5, 10, 15, 16, 18, 20, 22, 23, 25, 29, 40], $V3, {
11663 7: 7
11664 }), {
11665 1: [2, 1]
11666 }, {
11667 1: [2, 2]
11668 }, {
11669 1: [2, 3],
11670 4: $V4,
11671 5: $V5,
11672 8: 8,
11673 9: 10,
11674 10: $V6,
11675 11: 22,
11676 14: 13,
11677 15: $V7,
11678 16: $V8,
11679 17: 16,
11680 18: $V9,
11681 20: $Va,
11682 22: $Vb,
11683 23: $Vc,
11684 25: $Vd,
11685 29: $Ve,
11686 40: $Vf
11687 }, o($Vg, [2, 5]), {
11688 9: 25,
11689 10: $V6,
11690 11: 22,
11691 14: 13,
11692 15: $V7,
11693 16: $V8,
11694 17: 16,
11695 18: $V9,
11696 20: $Va,
11697 22: $Vb,
11698 23: $Vc,
11699 25: $Vd,
11700 29: $Ve,
11701 40: $Vf
11702 }, o($Vg, [2, 7]), o($Vg, [2, 8]), {
11703 11: 26,
11704 40: $Vf
11705 }, {
11706 5: [1, 27]
11707 }, {
11708 11: 28,
11709 40: $Vf
11710 }, {
11711 11: 29,
11712 40: $Vf
11713 }, {
11714 5: [1, 30]
11715 }, {
11716 19: 31,
11717 47: $Vh
11718 }, {
11719 13: [1, 33]
11720 }, {
11721 13: [1, 34]
11722 }, {
11723 13: [1, 35]
11724 }, {
11725 13: [1, 36]
11726 }, {
11727 37: 37,
11728 41: [1, 38],
11729 42: [1, 39],
11730 43: [1, 40],
11731 44: [1, 41],
11732 45: [1, 42],
11733 46: [1, 43]
11734 }, {
11735 30: 44,
11736 31: [1, 45],
11737 35: [1, 46],
11738 36: [1, 47]
11739 }, o([5, 12, 34, 41, 42, 43, 44, 45, 46, 47], [2, 35]), o($Vg, [2, 6]), {
11740 5: [1, 49],
11741 12: [1, 48]
11742 }, o($Vg, [2, 11]), {
11743 5: [1, 50]
11744 }, {
11745 5: [1, 51]
11746 }, o($Vg, [2, 14]), {
11747 5: [1, 52]
11748 }, {
11749 5: [2, 42]
11750 }, o($Vi, $V3, {
11751 7: 53
11752 }), o($Vi, $V3, {
11753 7: 54
11754 }), o($Vj, $V3, {
11755 24: 55,
11756 7: 56
11757 }), o($Vk, $V3, {
11758 26: 57,
11759 7: 58
11760 }), {
11761 11: 61,
11762 38: [1, 59],
11763 39: [1, 60],
11764 40: $Vf
11765 }, o($Vl, [2, 36]), o($Vl, [2, 37]), o($Vl, [2, 38]), o($Vl, [2, 39]), o($Vl, [2, 40]), o($Vl, [2, 41]), {
11766 11: 62,
11767 40: $Vf
11768 }, {
11769 11: 64,
11770 32: 63,
11771 40: $Vf
11772 }, {
11773 40: [2, 30]
11774 }, {
11775 40: [2, 31]
11776 }, {
11777 13: [1, 65]
11778 }, o($Vg, [2, 10]), o($Vg, [2, 12]), o($Vg, [2, 13]), o($Vg, [2, 15]), {
11779 4: $V4,
11780 5: $V5,
11781 8: 8,
11782 9: 10,
11783 10: $V6,
11784 11: 22,
11785 14: 13,
11786 15: $V7,
11787 16: $V8,
11788 17: 16,
11789 18: $V9,
11790 20: $Va,
11791 21: [1, 66],
11792 22: $Vb,
11793 23: $Vc,
11794 25: $Vd,
11795 29: $Ve,
11796 40: $Vf
11797 }, {
11798 4: $V4,
11799 5: $V5,
11800 8: 8,
11801 9: 10,
11802 10: $V6,
11803 11: 22,
11804 14: 13,
11805 15: $V7,
11806 16: $V8,
11807 17: 16,
11808 18: $V9,
11809 20: $Va,
11810 21: [1, 67],
11811 22: $Vb,
11812 23: $Vc,
11813 25: $Vd,
11814 29: $Ve,
11815 40: $Vf
11816 }, {
11817 21: [1, 68]
11818 }, {
11819 4: $V4,
11820 5: $V5,
11821 8: 8,
11822 9: 10,
11823 10: $V6,
11824 11: 22,
11825 14: 13,
11826 15: $V7,
11827 16: $V8,
11828 17: 16,
11829 18: $V9,
11830 20: $Va,
11831 21: [2, 22],
11832 22: $Vb,
11833 23: $Vc,
11834 25: $Vd,
11835 28: [1, 69],
11836 29: $Ve,
11837 40: $Vf
11838 }, {
11839 21: [1, 70]
11840 }, {
11841 4: $V4,
11842 5: $V5,
11843 8: 8,
11844 9: 10,
11845 10: $V6,
11846 11: 22,
11847 14: 13,
11848 15: $V7,
11849 16: $V8,
11850 17: 16,
11851 18: $V9,
11852 20: $Va,
11853 21: [2, 20],
11854 22: $Vb,
11855 23: $Vc,
11856 25: $Vd,
11857 27: [1, 71],
11858 29: $Ve,
11859 40: $Vf
11860 }, {
11861 11: 72,
11862 40: $Vf
11863 }, {
11864 11: 73,
11865 40: $Vf
11866 }, {
11867 19: 74,
11868 47: $Vh
11869 }, {
11870 19: 75,
11871 47: $Vh
11872 }, {
11873 19: 76,
11874 47: $Vh
11875 }, {
11876 34: [1, 77],
11877 47: [2, 29]
11878 }, {
11879 5: [1, 78]
11880 }, o($Vg, [2, 16]), o($Vg, [2, 17]), o($Vg, [2, 18]), {
11881 13: [1, 79]
11882 }, o($Vg, [2, 19]), {
11883 13: [1, 80]
11884 }, {
11885 19: 81,
11886 47: $Vh
11887 }, {
11888 19: 82,
11889 47: $Vh
11890 }, {
11891 5: [2, 34]
11892 }, {
11893 5: [2, 24]
11894 }, {
11895 5: [2, 25]
11896 }, {
11897 11: 83,
11898 40: $Vf
11899 }, o($Vg, [2, 9]), o($Vj, $V3, {
11900 7: 56,
11901 24: 84
11902 }), o($Vk, $V3, {
11903 7: 58,
11904 26: 85
11905 }), {
11906 5: [2, 32]
11907 }, {
11908 5: [2, 33]
11909 }, {
11910 47: [2, 28]
11911 }, {
11912 21: [2, 23]
11913 }, {
11914 21: [2, 21]
11915 }],
11916 defaultActions: {
11917 5: [2, 1],
11918 6: [2, 2],
11919 32: [2, 42],
11920 46: [2, 30],
11921 47: [2, 31],
11922 74: [2, 34],
11923 75: [2, 24],
11924 76: [2, 25],
11925 81: [2, 32],
11926 82: [2, 33],
11927 83: [2, 28],
11928 84: [2, 23],
11929 85: [2, 21]
11930 },
11931 parseError: function parseError(str, hash) {
11932 if (hash.recoverable) {
11933 this.trace(str);
11934 } else {
11935 var error = new Error(str);
11936 error.hash = hash;
11937 throw error;
11938 }
11939 },
11940 parse: function parse(input) {
11941 var self = this,
11942 stack = [0],
11943 tstack = [],
11944 vstack = [null],
11945 lstack = [],
11946 table = this.table,
11947 yytext = '',
11948 yylineno = 0,
11949 yyleng = 0,
11950 recovering = 0,
11951 TERROR = 2,
11952 EOF = 1;
11953 var args = lstack.slice.call(arguments, 1);
11954 var lexer = Object.create(this.lexer);
11955 var sharedState = {
11956 yy: {}
11957 };
11958
11959 for (var k in this.yy) {
11960 if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
11961 sharedState.yy[k] = this.yy[k];
11962 }
11963 }
11964
11965 lexer.setInput(input, sharedState.yy);
11966 sharedState.yy.lexer = lexer;
11967 sharedState.yy.parser = this;
11968
11969 if (typeof lexer.yylloc == 'undefined') {
11970 lexer.yylloc = {};
11971 }
11972
11973 var yyloc = lexer.yylloc;
11974 lstack.push(yyloc);
11975 var ranges = lexer.options && lexer.options.ranges;
11976
11977 if (typeof sharedState.yy.parseError === 'function') {
11978 this.parseError = sharedState.yy.parseError;
11979 } else {
11980 this.parseError = Object.getPrototypeOf(this).parseError;
11981 }
11982
11983 function popStack(n) {
11984 stack.length = stack.length - 2 * n;
11985 vstack.length = vstack.length - n;
11986 lstack.length = lstack.length - n;
11987 }
11988
11989 function lex() {
11990 var token;
11991 token = tstack.pop() || lexer.lex() || EOF;
11992
11993 if (typeof token !== 'number') {
11994 if (token instanceof Array) {
11995 tstack = token;
11996 token = tstack.pop();
11997 }
11998
11999 token = self.symbols_[token] || token;
12000 }
12001
12002 return token;
12003 }
12004
12005 var symbol,
12006 preErrorSymbol,
12007 state,
12008 action,
12009 a,
12010 r,
12011 yyval = {},
12012 p,
12013 len,
12014 newState,
12015 expected;
12016
12017 while (true) {
12018 state = stack[stack.length - 1];
12019
12020 if (this.defaultActions[state]) {
12021 action = this.defaultActions[state];
12022 } else {
12023 if (symbol === null || typeof symbol == 'undefined') {
12024 symbol = lex();
12025 }
12026
12027 action = table[state] && table[state][symbol];
12028 }
12029
12030 if (typeof action === 'undefined' || !action.length || !action[0]) {
12031 var errStr = '';
12032 expected = [];
12033
12034 for (p in table[state]) {
12035 if (this.terminals_[p] && p > TERROR) {
12036 expected.push('\'' + this.terminals_[p] + '\'');
12037 }
12038 }
12039
12040 if (lexer.showPosition) {
12041 errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
12042 } else {
12043 errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
12044 }
12045
12046 this.parseError(errStr, {
12047 text: lexer.match,
12048 token: this.terminals_[symbol] || symbol,
12049 line: lexer.yylineno,
12050 loc: yyloc,
12051 expected: expected
12052 });
12053 }
12054
12055 if (action[0] instanceof Array && action.length > 1) {
12056 throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
12057 }
12058
12059 switch (action[0]) {
12060 case 1:
12061 stack.push(symbol);
12062 vstack.push(lexer.yytext);
12063 lstack.push(lexer.yylloc);
12064 stack.push(action[1]);
12065 symbol = null;
12066
12067 if (!preErrorSymbol) {
12068 yyleng = lexer.yyleng;
12069 yytext = lexer.yytext;
12070 yylineno = lexer.yylineno;
12071 yyloc = lexer.yylloc;
12072
12073 if (recovering > 0) {
12074 recovering--;
12075 }
12076 } else {
12077 symbol = preErrorSymbol;
12078 preErrorSymbol = null;
12079 }
12080
12081 break;
12082
12083 case 2:
12084 len = this.productions_[action[1]][1];
12085 yyval.$ = vstack[vstack.length - len];
12086 yyval._$ = {
12087 first_line: lstack[lstack.length - (len || 1)].first_line,
12088 last_line: lstack[lstack.length - 1].last_line,
12089 first_column: lstack[lstack.length - (len || 1)].first_column,
12090 last_column: lstack[lstack.length - 1].last_column
12091 };
12092
12093 if (ranges) {
12094 yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
12095 }
12096
12097 r = this.performAction.apply(yyval, [yytext, yyleng, yylineno, sharedState.yy, action[1], vstack, lstack].concat(args));
12098
12099 if (typeof r !== 'undefined') {
12100 return r;
12101 }
12102
12103 if (len) {
12104 stack = stack.slice(0, -1 * len * 2);
12105 vstack = vstack.slice(0, -1 * len);
12106 lstack = lstack.slice(0, -1 * len);
12107 }
12108
12109 stack.push(this.productions_[action[1]][0]);
12110 vstack.push(yyval.$);
12111 lstack.push(yyval._$);
12112 newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
12113 stack.push(newState);
12114 break;
12115
12116 case 3:
12117 return true;
12118 }
12119 }
12120
12121 return true;
12122 }
12123 };
12124 /* generated by jison-lex 0.3.4 */
12125
12126 var lexer = function () {
12127 var lexer = {
12128 EOF: 1,
12129 parseError: function parseError(str, hash) {
12130 if (this.yy.parser) {
12131 this.yy.parser.parseError(str, hash);
12132 } else {
12133 throw new Error(str);
12134 }
12135 },
12136 // resets the lexer, sets new input
12137 setInput: function (input, yy) {
12138 this.yy = yy || this.yy || {};
12139 this._input = input;
12140 this._more = this._backtrack = this.done = false;
12141 this.yylineno = this.yyleng = 0;
12142 this.yytext = this.matched = this.match = '';
12143 this.conditionStack = ['INITIAL'];
12144 this.yylloc = {
12145 first_line: 1,
12146 first_column: 0,
12147 last_line: 1,
12148 last_column: 0
12149 };
12150
12151 if (this.options.ranges) {
12152 this.yylloc.range = [0, 0];
12153 }
12154
12155 this.offset = 0;
12156 return this;
12157 },
12158 // consumes and returns one char from the input
12159 input: function () {
12160 var ch = this._input[0];
12161 this.yytext += ch;
12162 this.yyleng++;
12163 this.offset++;
12164 this.match += ch;
12165 this.matched += ch;
12166 var lines = ch.match(/(?:\r\n?|\n).*/g);
12167
12168 if (lines) {
12169 this.yylineno++;
12170 this.yylloc.last_line++;
12171 } else {
12172 this.yylloc.last_column++;
12173 }
12174
12175 if (this.options.ranges) {
12176 this.yylloc.range[1]++;
12177 }
12178
12179 this._input = this._input.slice(1);
12180 return ch;
12181 },
12182 // unshifts one char (or a string) into the input
12183 unput: function (ch) {
12184 var len = ch.length;
12185 var lines = ch.split(/(?:\r\n?|\n)/g);
12186 this._input = ch + this._input;
12187 this.yytext = this.yytext.substr(0, this.yytext.length - len); //this.yyleng -= len;
12188
12189 this.offset -= len;
12190 var oldLines = this.match.split(/(?:\r\n?|\n)/g);
12191 this.match = this.match.substr(0, this.match.length - 1);
12192 this.matched = this.matched.substr(0, this.matched.length - 1);
12193
12194 if (lines.length - 1) {
12195 this.yylineno -= lines.length - 1;
12196 }
12197
12198 var r = this.yylloc.range;
12199 this.yylloc = {
12200 first_line: this.yylloc.first_line,
12201 last_line: this.yylineno + 1,
12202 first_column: this.yylloc.first_column,
12203 last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
12204 };
12205
12206 if (this.options.ranges) {
12207 this.yylloc.range = [r[0], r[0] + this.yyleng - len];
12208 }
12209
12210 this.yyleng = this.yytext.length;
12211 return this;
12212 },
12213 // When called from action, caches matched text and appends it on next action
12214 more: function () {
12215 this._more = true;
12216 return this;
12217 },
12218 // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
12219 reject: function () {
12220 if (this.options.backtrack_lexer) {
12221 this._backtrack = true;
12222 } else {
12223 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(), {
12224 text: "",
12225 token: null,
12226 line: this.yylineno
12227 });
12228 }
12229
12230 return this;
12231 },
12232 // retain first n characters of the match
12233 less: function (n) {
12234 this.unput(this.match.slice(n));
12235 },
12236 // displays already matched input, i.e. for error messages
12237 pastInput: function () {
12238 var past = this.matched.substr(0, this.matched.length - this.match.length);
12239 return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, "");
12240 },
12241 // displays upcoming input, i.e. for error messages
12242 upcomingInput: function () {
12243 var next = this.match;
12244
12245 if (next.length < 20) {
12246 next += this._input.substr(0, 20 - next.length);
12247 }
12248
12249 return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
12250 },
12251 // displays the character position where the lexing error occurred, i.e. for error messages
12252 showPosition: function () {
12253 var pre = this.pastInput();
12254 var c = new Array(pre.length + 1).join("-");
12255 return pre + this.upcomingInput() + "\n" + c + "^";
12256 },
12257 // test the lexed token: return FALSE when not a match, otherwise return token
12258 test_match: function (match, indexed_rule) {
12259 var token, lines, backup;
12260
12261 if (this.options.backtrack_lexer) {
12262 // save context
12263 backup = {
12264 yylineno: this.yylineno,
12265 yylloc: {
12266 first_line: this.yylloc.first_line,
12267 last_line: this.last_line,
12268 first_column: this.yylloc.first_column,
12269 last_column: this.yylloc.last_column
12270 },
12271 yytext: this.yytext,
12272 match: this.match,
12273 matches: this.matches,
12274 matched: this.matched,
12275 yyleng: this.yyleng,
12276 offset: this.offset,
12277 _more: this._more,
12278 _input: this._input,
12279 yy: this.yy,
12280 conditionStack: this.conditionStack.slice(0),
12281 done: this.done
12282 };
12283
12284 if (this.options.ranges) {
12285 backup.yylloc.range = this.yylloc.range.slice(0);
12286 }
12287 }
12288
12289 lines = match[0].match(/(?:\r\n?|\n).*/g);
12290
12291 if (lines) {
12292 this.yylineno += lines.length;
12293 }
12294
12295 this.yylloc = {
12296 first_line: this.yylloc.last_line,
12297 last_line: this.yylineno + 1,
12298 first_column: this.yylloc.last_column,
12299 last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
12300 };
12301 this.yytext += match[0];
12302 this.match += match[0];
12303 this.matches = match;
12304 this.yyleng = this.yytext.length;
12305
12306 if (this.options.ranges) {
12307 this.yylloc.range = [this.offset, this.offset += this.yyleng];
12308 }
12309
12310 this._more = false;
12311 this._backtrack = false;
12312 this._input = this._input.slice(match[0].length);
12313 this.matched += match[0];
12314 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
12315
12316 if (this.done && this._input) {
12317 this.done = false;
12318 }
12319
12320 if (token) {
12321 return token;
12322 } else if (this._backtrack) {
12323 // recover context
12324 for (var k in backup) {
12325 this[k] = backup[k];
12326 }
12327
12328 return false; // rule action called reject() implying the next rule should be tested instead.
12329 }
12330
12331 return false;
12332 },
12333 // return next match in input
12334 next: function () {
12335 if (this.done) {
12336 return this.EOF;
12337 }
12338
12339 if (!this._input) {
12340 this.done = true;
12341 }
12342
12343 var token, match, tempMatch, index;
12344
12345 if (!this._more) {
12346 this.yytext = '';
12347 this.match = '';
12348 }
12349
12350 var rules = this._currentRules();
12351
12352 for (var i = 0; i < rules.length; i++) {
12353 tempMatch = this._input.match(this.rules[rules[i]]);
12354
12355 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
12356 match = tempMatch;
12357 index = i;
12358
12359 if (this.options.backtrack_lexer) {
12360 token = this.test_match(tempMatch, rules[i]);
12361
12362 if (token !== false) {
12363 return token;
12364 } else if (this._backtrack) {
12365 match = false;
12366 continue; // rule action called reject() implying a rule MISmatch.
12367 } else {
12368 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
12369 return false;
12370 }
12371 } else if (!this.options.flex) {
12372 break;
12373 }
12374 }
12375 }
12376
12377 if (match) {
12378 token = this.test_match(match, rules[index]);
12379
12380 if (token !== false) {
12381 return token;
12382 } // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
12383
12384
12385 return false;
12386 }
12387
12388 if (this._input === "") {
12389 return this.EOF;
12390 } else {
12391 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
12392 text: "",
12393 token: null,
12394 line: this.yylineno
12395 });
12396 }
12397 },
12398 // return next match that has a token
12399 lex: function lex() {
12400 var r = this.next();
12401
12402 if (r) {
12403 return r;
12404 } else {
12405 return this.lex();
12406 }
12407 },
12408 // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
12409 begin: function begin(condition) {
12410 this.conditionStack.push(condition);
12411 },
12412 // pop the previously active lexer condition state off the condition stack
12413 popState: function popState() {
12414 var n = this.conditionStack.length - 1;
12415
12416 if (n > 0) {
12417 return this.conditionStack.pop();
12418 } else {
12419 return this.conditionStack[0];
12420 }
12421 },
12422 // produce the lexer rule set which is active for the currently active lexer condition state
12423 _currentRules: function _currentRules() {
12424 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
12425 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
12426 } else {
12427 return this.conditions["INITIAL"].rules;
12428 }
12429 },
12430 // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
12431 topState: function topState(n) {
12432 n = this.conditionStack.length - 1 - Math.abs(n || 0);
12433
12434 if (n >= 0) {
12435 return this.conditionStack[n];
12436 } else {
12437 return "INITIAL";
12438 }
12439 },
12440 // alias for begin(condition)
12441 pushState: function pushState(condition) {
12442 this.begin(condition);
12443 },
12444 // return the number of states currently on the stack
12445 stateStackSize: function stateStackSize() {
12446 return this.conditionStack.length;
12447 },
12448 options: {
12449 "case-insensitive": true
12450 },
12451 performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
12452 var YYSTATE = YY_START;
12453
12454 switch ($avoiding_name_collisions) {
12455 case 0:
12456 return 5;
12457 break;
12458
12459 case 1:
12460 /* skip all whitespace */
12461 break;
12462
12463 case 2:
12464 /* skip same-line whitespace */
12465 break;
12466
12467 case 3:
12468 /* skip comments */
12469 break;
12470
12471 case 4:
12472 /* skip comments */
12473 break;
12474
12475 case 5:
12476 this.begin('ID');
12477 return 10;
12478 break;
12479
12480 case 6:
12481 this.begin('ALIAS');
12482 return 40;
12483 break;
12484
12485 case 7:
12486 this.popState();
12487 this.popState();
12488 this.begin('LINE');
12489 return 12;
12490 break;
12491
12492 case 8:
12493 this.popState();
12494 this.popState();
12495 return 5;
12496 break;
12497
12498 case 9:
12499 this.begin('LINE');
12500 return 20;
12501 break;
12502
12503 case 10:
12504 this.begin('LINE');
12505 return 22;
12506 break;
12507
12508 case 11:
12509 this.begin('LINE');
12510 return 23;
12511 break;
12512
12513 case 12:
12514 this.begin('LINE');
12515 return 28;
12516 break;
12517
12518 case 13:
12519 this.begin('LINE');
12520 return 25;
12521 break;
12522
12523 case 14:
12524 this.begin('LINE');
12525 return 27;
12526 break;
12527
12528 case 15:
12529 this.popState();
12530 return 13;
12531 break;
12532
12533 case 16:
12534 return 21;
12535 break;
12536
12537 case 17:
12538 return 35;
12539 break;
12540
12541 case 18:
12542 return 36;
12543 break;
12544
12545 case 19:
12546 return 31;
12547 break;
12548
12549 case 20:
12550 return 29;
12551 break;
12552
12553 case 21:
12554 this.begin('ID');
12555 return 15;
12556 break;
12557
12558 case 22:
12559 this.begin('ID');
12560 return 16;
12561 break;
12562
12563 case 23:
12564 return 18;
12565 break;
12566
12567 case 24:
12568 return 6;
12569 break;
12570
12571 case 25:
12572 return 34;
12573 break;
12574
12575 case 26:
12576 return 5;
12577 break;
12578
12579 case 27:
12580 yy_.yytext = yy_.yytext.trim();
12581 return 40;
12582 break;
12583
12584 case 28:
12585 return 43;
12586 break;
12587
12588 case 29:
12589 return 44;
12590 break;
12591
12592 case 30:
12593 return 41;
12594 break;
12595
12596 case 31:
12597 return 42;
12598 break;
12599
12600 case 32:
12601 return 45;
12602 break;
12603
12604 case 33:
12605 return 46;
12606 break;
12607
12608 case 34:
12609 return 47;
12610 break;
12611
12612 case 35:
12613 return 38;
12614 break;
12615
12616 case 36:
12617 return 39;
12618 break;
12619
12620 case 37:
12621 return 5;
12622 break;
12623
12624 case 38:
12625 return 'INVALID';
12626 break;
12627 }
12628 },
12629 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, /^(?: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],
12630 conditions: {
12631 "LINE": {
12632 "rules": [2, 3, 15],
12633 "inclusive": false
12634 },
12635 "ALIAS": {
12636 "rules": [2, 3, 7, 8],
12637 "inclusive": false
12638 },
12639 "ID": {
12640 "rules": [2, 3, 6],
12641 "inclusive": false
12642 },
12643 "INITIAL": {
12644 "rules": [0, 1, 3, 4, 5, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38],
12645 "inclusive": true
12646 }
12647 }
12648 };
12649 return lexer;
12650 }();
12651
12652 parser.lexer = lexer;
12653
12654 function Parser() {
12655 this.yy = {};
12656 }
12657
12658 Parser.prototype = parser;
12659 parser.Parser = Parser;
12660 return new Parser();
12661}();
12662
12663if (true) {
12664 exports.parser = parser;
12665 exports.Parser = parser.Parser;
12666
12667 exports.parse = function () {
12668 return parser.parse.apply(parser, arguments);
12669 };
12670
12671 exports.main = function commonjsMain(args) {
12672 if (!args[1]) {
12673 console.log('Usage: ' + args[0] + ' FILE');
12674 process.exit(1);
12675 }
12676
12677 var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
12678
12679 return exports.parser.parse(source);
12680 };
12681
12682 if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
12683 exports.main(process.argv.slice(1));
12684 }
12685}
12686/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
12687
12688/***/ }),
12689
12690/***/ "./src/diagrams/sequence/sequenceDb.js":
12691/*!*********************************************!*\
12692 !*** ./src/diagrams/sequence/sequenceDb.js ***!
12693 \*********************************************/
12694/*! exports provided: addActor, addMessage, addSignal, getMessages, getActors, getActor, getActorKeys, getTitle, clear, LINETYPE, ARROWTYPE, PLACEMENT, addNote, setTitle, apply, default */
12695/***/ (function(module, __webpack_exports__, __webpack_require__) {
12696
12697"use strict";
12698__webpack_require__.r(__webpack_exports__);
12699/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addActor", function() { return addActor; });
12700/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addMessage", function() { return addMessage; });
12701/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addSignal", function() { return addSignal; });
12702/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMessages", function() { return getMessages; });
12703/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActors", function() { return getActors; });
12704/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActor", function() { return getActor; });
12705/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActorKeys", function() { return getActorKeys; });
12706/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTitle", function() { return getTitle; });
12707/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
12708/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LINETYPE", function() { return LINETYPE; });
12709/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARROWTYPE", function() { return ARROWTYPE; });
12710/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PLACEMENT", function() { return PLACEMENT; });
12711/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addNote", function() { return addNote; });
12712/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTitle", function() { return setTitle; });
12713/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apply", function() { return apply; });
12714/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
12715
12716let actors = {};
12717let messages = [];
12718const notes = [];
12719let title = '';
12720const addActor = function (id, name, description) {
12721 // Don't allow description nulling
12722 const old = actors[id];
12723 if (old && name === old.name && description == null) return; // Don't allow null descriptions, either
12724
12725 if (description == null) description = name;
12726 actors[id] = {
12727 name: name,
12728 description: description
12729 };
12730};
12731const addMessage = function (idFrom, idTo, message, answer) {
12732 messages.push({
12733 from: idFrom,
12734 to: idTo,
12735 message: message,
12736 answer: answer
12737 });
12738};
12739const addSignal = function (idFrom, idTo, message, messageType) {
12740 _logger__WEBPACK_IMPORTED_MODULE_0__["logger"].debug('Adding message from=' + idFrom + ' to=' + idTo + ' message=' + message + ' type=' + messageType);
12741 messages.push({
12742 from: idFrom,
12743 to: idTo,
12744 message: message,
12745 type: messageType
12746 });
12747};
12748const getMessages = function () {
12749 return messages;
12750};
12751const getActors = function () {
12752 return actors;
12753};
12754const getActor = function (id) {
12755 return actors[id];
12756};
12757const getActorKeys = function () {
12758 return Object.keys(actors);
12759};
12760const getTitle = function () {
12761 return title;
12762};
12763const clear = function () {
12764 actors = {};
12765 messages = [];
12766};
12767const LINETYPE = {
12768 SOLID: 0,
12769 DOTTED: 1,
12770 NOTE: 2,
12771 SOLID_CROSS: 3,
12772 DOTTED_CROSS: 4,
12773 SOLID_OPEN: 5,
12774 DOTTED_OPEN: 6,
12775 LOOP_START: 10,
12776 LOOP_END: 11,
12777 ALT_START: 12,
12778 ALT_ELSE: 13,
12779 ALT_END: 14,
12780 OPT_START: 15,
12781 OPT_END: 16,
12782 ACTIVE_START: 17,
12783 ACTIVE_END: 18,
12784 PAR_START: 19,
12785 PAR_AND: 20,
12786 PAR_END: 21
12787};
12788const ARROWTYPE = {
12789 FILLED: 0,
12790 OPEN: 1
12791};
12792const PLACEMENT = {
12793 LEFTOF: 0,
12794 RIGHTOF: 1,
12795 OVER: 2
12796};
12797const addNote = function (actor, placement, message) {
12798 const note = {
12799 actor: actor,
12800 placement: placement,
12801 message: message // Coerce actor into a [to, from, ...] array
12802
12803 };
12804 const actors = [].concat(actor, actor);
12805 notes.push(note);
12806 messages.push({
12807 from: actors[0],
12808 to: actors[1],
12809 message: message,
12810 type: LINETYPE.NOTE,
12811 placement: placement
12812 });
12813};
12814const setTitle = function (titleText) {
12815 title = titleText;
12816};
12817const apply = function (param) {
12818 if (param instanceof Array) {
12819 param.forEach(function (item) {
12820 apply(item);
12821 });
12822 } else {
12823 switch (param.type) {
12824 case 'addActor':
12825 addActor(param.actor, param.actor, param.description);
12826 break;
12827
12828 case 'activeStart':
12829 addSignal(param.actor, undefined, undefined, param.signalType);
12830 break;
12831
12832 case 'activeEnd':
12833 addSignal(param.actor, undefined, undefined, param.signalType);
12834 break;
12835
12836 case 'addNote':
12837 addNote(param.actor, param.placement, param.text);
12838 break;
12839
12840 case 'addMessage':
12841 addSignal(param.from, param.to, param.msg, param.signalType);
12842 break;
12843
12844 case 'loopStart':
12845 addSignal(undefined, undefined, param.loopText, param.signalType);
12846 break;
12847
12848 case 'loopEnd':
12849 addSignal(undefined, undefined, undefined, param.signalType);
12850 break;
12851
12852 case 'optStart':
12853 addSignal(undefined, undefined, param.optText, param.signalType);
12854 break;
12855
12856 case 'optEnd':
12857 addSignal(undefined, undefined, undefined, param.signalType);
12858 break;
12859
12860 case 'altStart':
12861 addSignal(undefined, undefined, param.altText, param.signalType);
12862 break;
12863
12864 case 'else':
12865 addSignal(undefined, undefined, param.altText, param.signalType);
12866 break;
12867
12868 case 'altEnd':
12869 addSignal(undefined, undefined, undefined, param.signalType);
12870 break;
12871
12872 case 'setTitle':
12873 setTitle(param.text);
12874 break;
12875
12876 case 'parStart':
12877 addSignal(undefined, undefined, param.parText, param.signalType);
12878 break;
12879
12880 case 'and':
12881 addSignal(undefined, undefined, param.parText, param.signalType);
12882 break;
12883
12884 case 'parEnd':
12885 addSignal(undefined, undefined, undefined, param.signalType);
12886 break;
12887 }
12888 }
12889};
12890/* harmony default export */ __webpack_exports__["default"] = ({
12891 addActor,
12892 addMessage,
12893 addSignal,
12894 getMessages,
12895 getActors,
12896 getActor,
12897 getActorKeys,
12898 getTitle,
12899 clear,
12900 LINETYPE,
12901 ARROWTYPE,
12902 PLACEMENT,
12903 addNote,
12904 setTitle,
12905 apply
12906});
12907
12908/***/ }),
12909
12910/***/ "./src/diagrams/sequence/sequenceRenderer.js":
12911/*!***************************************************!*\
12912 !*** ./src/diagrams/sequence/sequenceRenderer.js ***!
12913 \***************************************************/
12914/*! exports provided: bounds, drawActors, setConf, draw, default */
12915/***/ (function(module, __webpack_exports__, __webpack_require__) {
12916
12917"use strict";
12918__webpack_require__.r(__webpack_exports__);
12919/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounds", function() { return bounds; });
12920/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawActors", function() { return drawActors; });
12921/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
12922/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
12923/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
12924/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
12925/* harmony import */ var _svgDraw__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./svgDraw */ "./src/diagrams/sequence/svgDraw.js");
12926/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
12927/* harmony import */ var _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/sequenceDiagram */ "./src/diagrams/sequence/parser/sequenceDiagram.js");
12928/* harmony import */ var _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__);
12929/* harmony import */ var _sequenceDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sequenceDb */ "./src/diagrams/sequence/sequenceDb.js");
12930
12931
12932
12933
12934
12935_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy = _sequenceDb__WEBPACK_IMPORTED_MODULE_4__["default"];
12936const conf = {
12937 diagramMarginX: 50,
12938 diagramMarginY: 30,
12939 // Margin between actors
12940 actorMargin: 50,
12941 // Width of actor boxes
12942 width: 150,
12943 // Height of actor boxes
12944 height: 65,
12945 actorFontSize: 14,
12946 actorFontFamily: '"Open-Sans", "sans-serif"',
12947 // Margin around loop boxes
12948 boxMargin: 10,
12949 boxTextMargin: 5,
12950 noteMargin: 10,
12951 // Space between messages
12952 messageMargin: 35,
12953 // mirror actors under diagram
12954 mirrorActors: false,
12955 // Depending on css styling this might need adjustment
12956 // Prolongs the edge of the diagram downwards
12957 bottomMarginAdj: 1,
12958 // width of activation box
12959 activationWidth: 10,
12960 // text placement as: tspan | fo | old only text as before
12961 textPlacement: 'tspan'
12962};
12963const bounds = {
12964 data: {
12965 startx: undefined,
12966 stopx: undefined,
12967 starty: undefined,
12968 stopy: undefined
12969 },
12970 verticalPos: 0,
12971 sequenceItems: [],
12972 activations: [],
12973 init: function () {
12974 this.sequenceItems = [];
12975 this.activations = [];
12976 this.data = {
12977 startx: undefined,
12978 stopx: undefined,
12979 starty: undefined,
12980 stopy: undefined
12981 };
12982 this.verticalPos = 0;
12983 },
12984 updateVal: function (obj, key, val, fun) {
12985 if (typeof obj[key] === 'undefined') {
12986 obj[key] = val;
12987 } else {
12988 obj[key] = fun(val, obj[key]);
12989 }
12990 },
12991 updateBounds: function (startx, starty, stopx, stopy) {
12992 const _self = this;
12993
12994 let cnt = 0;
12995
12996 function updateFn(type) {
12997 return function updateItemBounds(item) {
12998 cnt++; // The loop sequenceItems is a stack so the biggest margins in the beginning of the sequenceItems
12999
13000 const n = _self.sequenceItems.length - cnt + 1;
13001
13002 _self.updateVal(item, 'starty', starty - n * conf.boxMargin, Math.min);
13003
13004 _self.updateVal(item, 'stopy', stopy + n * conf.boxMargin, Math.max);
13005
13006 _self.updateVal(bounds.data, 'startx', startx - n * conf.boxMargin, Math.min);
13007
13008 _self.updateVal(bounds.data, 'stopx', stopx + n * conf.boxMargin, Math.max);
13009
13010 if (!(type === 'activation')) {
13011 _self.updateVal(item, 'startx', startx - n * conf.boxMargin, Math.min);
13012
13013 _self.updateVal(item, 'stopx', stopx + n * conf.boxMargin, Math.max);
13014
13015 _self.updateVal(bounds.data, 'starty', starty - n * conf.boxMargin, Math.min);
13016
13017 _self.updateVal(bounds.data, 'stopy', stopy + n * conf.boxMargin, Math.max);
13018 }
13019 };
13020 }
13021
13022 this.sequenceItems.forEach(updateFn());
13023 this.activations.forEach(updateFn('activation'));
13024 },
13025 insert: function (startx, starty, stopx, stopy) {
13026 const _startx = Math.min(startx, stopx);
13027
13028 const _stopx = Math.max(startx, stopx);
13029
13030 const _starty = Math.min(starty, stopy);
13031
13032 const _stopy = Math.max(starty, stopy);
13033
13034 this.updateVal(bounds.data, 'startx', _startx, Math.min);
13035 this.updateVal(bounds.data, 'starty', _starty, Math.min);
13036 this.updateVal(bounds.data, 'stopx', _stopx, Math.max);
13037 this.updateVal(bounds.data, 'stopy', _stopy, Math.max);
13038 this.updateBounds(_startx, _starty, _stopx, _stopy);
13039 },
13040 newActivation: function (message, diagram) {
13041 const actorRect = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getActors()[message.from.actor];
13042 const stackedSize = actorActivations(message.from.actor).length;
13043 const x = actorRect.x + conf.width / 2 + (stackedSize - 1) * conf.activationWidth / 2;
13044 this.activations.push({
13045 startx: x,
13046 starty: this.verticalPos + 2,
13047 stopx: x + conf.activationWidth,
13048 stopy: undefined,
13049 actor: message.from.actor,
13050 anchored: _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].anchorElement(diagram)
13051 });
13052 },
13053 endActivation: function (message) {
13054 // find most recent activation for given actor
13055 const lastActorActivationIdx = this.activations.map(function (activation) {
13056 return activation.actor;
13057 }).lastIndexOf(message.from.actor);
13058 const activation = this.activations.splice(lastActorActivationIdx, 1)[0];
13059 return activation;
13060 },
13061 newLoop: function (title) {
13062 this.sequenceItems.push({
13063 startx: undefined,
13064 starty: this.verticalPos,
13065 stopx: undefined,
13066 stopy: undefined,
13067 title: title
13068 });
13069 },
13070 endLoop: function () {
13071 const loop = this.sequenceItems.pop();
13072 return loop;
13073 },
13074 addSectionToLoop: function (message) {
13075 const loop = this.sequenceItems.pop();
13076 loop.sections = loop.sections || [];
13077 loop.sectionTitles = loop.sectionTitles || [];
13078 loop.sections.push(bounds.getVerticalPos());
13079 loop.sectionTitles.push(message);
13080 this.sequenceItems.push(loop);
13081 },
13082 bumpVerticalPos: function (bump) {
13083 this.verticalPos = this.verticalPos + bump;
13084 this.data.stopy = this.verticalPos;
13085 },
13086 getVerticalPos: function () {
13087 return this.verticalPos;
13088 },
13089 getBounds: function () {
13090 return this.data;
13091 }
13092};
13093
13094const _drawLongText = (text, x, y, g, width) => {
13095 let textHeight = 0;
13096 const lines = text.split(/<br\/?>/ig);
13097
13098 for (const line of lines) {
13099 const textObj = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].getTextObj();
13100 textObj.x = x;
13101 textObj.y = y + textHeight;
13102 textObj.textMargin = conf.noteMargin;
13103 textObj.dy = '1em';
13104 textObj.text = line;
13105 textObj.class = 'noteText';
13106 const textElem = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawText(g, textObj, width);
13107 textHeight += (textElem._groups || textElem)[0][0].getBBox().height;
13108 }
13109
13110 return textHeight;
13111};
13112/**
13113 * Draws an actor in the diagram with the attaced line
13114 * @param center - The center of the the actor
13115 * @param pos The position if the actor in the liost of actors
13116 * @param description The text in the box
13117 */
13118
13119
13120const drawNote = function (elem, startx, verticalPos, msg, forceWidth) {
13121 const rect = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].getNoteRect();
13122 rect.x = startx;
13123 rect.y = verticalPos;
13124 rect.width = forceWidth || conf.width;
13125 rect.class = 'note';
13126 let g = elem.append('g');
13127 const rectElem = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawRect(g, rect);
13128
13129 const textHeight = _drawLongText(msg.message, startx - 4, verticalPos + 24, g, rect.width - conf.noteMargin);
13130
13131 bounds.insert(startx, verticalPos, startx + rect.width, verticalPos + 2 * conf.noteMargin + textHeight);
13132 rectElem.attr('height', textHeight + 2 * conf.noteMargin);
13133 bounds.bumpVerticalPos(textHeight + 2 * conf.noteMargin);
13134};
13135/**
13136 * Draws a message
13137 * @param elem
13138 * @param startx
13139 * @param stopx
13140 * @param verticalPos
13141 * @param txtCenter
13142 * @param msg
13143 */
13144
13145
13146const drawMessage = function (elem, startx, stopx, verticalPos, msg) {
13147 const g = elem.append('g');
13148 const txtCenter = startx + (stopx - startx) / 2;
13149 const textElem = g.append('text') // text label for the x axis
13150 .attr('x', txtCenter).attr('y', verticalPos - 7).style('text-anchor', 'middle').attr('class', 'messageText').text(msg.message);
13151 let textWidth = (textElem._groups || textElem)[0][0].getBBox().width;
13152 let line;
13153
13154 if (startx === stopx) {
13155 if (conf.rightAngles) {
13156 line = g.append('path').attr('d', `M ${startx},${verticalPos} H ${startx + conf.width / 2} V ${verticalPos + 25} H ${startx}`);
13157 } else {
13158 line = g.append('path').attr('d', 'M ' + startx + ',' + verticalPos + ' C ' + (startx + 60) + ',' + (verticalPos - 10) + ' ' + (startx + 60) + ',' + (verticalPos + 30) + ' ' + startx + ',' + (verticalPos + 20));
13159 }
13160
13161 bounds.bumpVerticalPos(30);
13162 const dx = Math.max(textWidth / 2, 100);
13163 bounds.insert(startx - dx, bounds.getVerticalPos() - 10, stopx + dx, bounds.getVerticalPos());
13164 } else {
13165 line = g.append('line');
13166 line.attr('x1', startx);
13167 line.attr('y1', verticalPos);
13168 line.attr('x2', stopx);
13169 line.attr('y2', verticalPos);
13170 bounds.insert(startx, bounds.getVerticalPos() - 10, stopx, bounds.getVerticalPos());
13171 } // Make an SVG Container
13172 // Draw the line
13173
13174
13175 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) {
13176 line.style('stroke-dasharray', '3, 3');
13177 line.attr('class', 'messageLine1');
13178 } else {
13179 line.attr('class', 'messageLine0');
13180 }
13181
13182 let url = '';
13183
13184 if (conf.arrowMarkerAbsolute) {
13185 url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;
13186 url = url.replace(/\(/g, '\\(');
13187 url = url.replace(/\)/g, '\\)');
13188 }
13189
13190 line.attr('stroke-width', 2);
13191 line.attr('stroke', 'black');
13192 line.style('fill', 'none'); // remove any fill colour
13193
13194 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) {
13195 line.attr('marker-end', 'url(' + url + '#arrowhead)');
13196 }
13197
13198 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) {
13199 line.attr('marker-end', 'url(' + url + '#crosshead)');
13200 }
13201};
13202
13203const drawActors = function (diagram, actors, actorKeys, verticalPos) {
13204 // Draw the actors
13205 for (let i = 0; i < actorKeys.length; i++) {
13206 const key = actorKeys[i]; // Add some rendering data to the object
13207
13208 actors[key].x = i * conf.actorMargin + i * conf.width;
13209 actors[key].y = verticalPos;
13210 actors[key].width = conf.diagramMarginX;
13211 actors[key].height = conf.diagramMarginY; // Draw the box with the attached line
13212
13213 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawActor(diagram, actors[key].x, verticalPos, actors[key].description, conf);
13214 bounds.insert(actors[key].x, verticalPos, actors[key].x + conf.width, conf.height);
13215 } // Add a margin between the actor boxes and the first arrow
13216
13217
13218 bounds.bumpVerticalPos(conf.height);
13219};
13220const setConf = function (cnf) {
13221 const keys = Object.keys(cnf);
13222 keys.forEach(function (key) {
13223 conf[key] = cnf[key];
13224 });
13225};
13226
13227const actorActivations = function (actor) {
13228 return bounds.activations.filter(function (activation) {
13229 return activation.actor === actor;
13230 });
13231};
13232
13233const actorFlowVerticaBounds = function (actor) {
13234 // handle multiple stacked activations for same actor
13235 const actors = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getActors();
13236 const activations = actorActivations(actor);
13237 const left = activations.reduce(function (acc, activation) {
13238 return Math.min(acc, activation.startx);
13239 }, actors[actor].x + conf.width / 2);
13240 const right = activations.reduce(function (acc, activation) {
13241 return Math.max(acc, activation.stopx);
13242 }, actors[actor].x + conf.width / 2);
13243 return [left, right];
13244};
13245/**
13246 * Draws a flowchart in the tag with id: id based on the graph definition in text.
13247 * @param text
13248 * @param id
13249 */
13250
13251
13252const draw = function (text, id) {
13253 _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.clear();
13254 _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].parse(text + '\n');
13255 bounds.init();
13256 const diagram = d3__WEBPACK_IMPORTED_MODULE_0__["select"](`[id="${id}"]`);
13257 let startx;
13258 let stopx;
13259 let forceWidth; // Fetch data from the parsing
13260
13261 const actors = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getActors();
13262 const actorKeys = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getActorKeys();
13263 const messages = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getMessages();
13264 const title = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getTitle();
13265 drawActors(diagram, actors, actorKeys, 0); // The arrow head definition is attached to the svg once
13266
13267 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].insertArrowHead(diagram);
13268 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].insertArrowCrossHead(diagram);
13269
13270 function activeEnd(msg, verticalPos) {
13271 const activationData = bounds.endActivation(msg);
13272
13273 if (activationData.starty + 18 > verticalPos) {
13274 activationData.starty = verticalPos - 6;
13275 verticalPos += 12;
13276 }
13277
13278 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawActivation(diagram, activationData, verticalPos, conf, actorActivations(msg.from.actor).length);
13279 bounds.insert(activationData.startx, verticalPos - 10, activationData.stopx, verticalPos);
13280 } // const lastMsg
13281 // Draw the messages/signals
13282
13283
13284 messages.forEach(function (msg) {
13285 let loopData;
13286
13287 switch (msg.type) {
13288 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.NOTE:
13289 bounds.bumpVerticalPos(conf.boxMargin);
13290 startx = actors[msg.from].x;
13291 stopx = actors[msg.to].x;
13292
13293 if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.PLACEMENT.RIGHTOF) {
13294 drawNote(diagram, startx + (conf.width + conf.actorMargin) / 2, bounds.getVerticalPos(), msg);
13295 } else if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.PLACEMENT.LEFTOF) {
13296 drawNote(diagram, startx - (conf.width + conf.actorMargin) / 2, bounds.getVerticalPos(), msg);
13297 } else if (msg.to === msg.from) {
13298 // Single-actor over
13299 drawNote(diagram, startx, bounds.getVerticalPos(), msg);
13300 } else {
13301 // Multi-actor over
13302 forceWidth = Math.abs(startx - stopx) + conf.actorMargin;
13303 drawNote(diagram, (startx + stopx + conf.width - forceWidth) / 2, bounds.getVerticalPos(), msg, forceWidth);
13304 }
13305
13306 break;
13307
13308 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ACTIVE_START:
13309 bounds.newActivation(msg, diagram);
13310 break;
13311
13312 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ACTIVE_END:
13313 activeEnd(msg, bounds.getVerticalPos());
13314 break;
13315
13316 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.LOOP_START:
13317 bounds.bumpVerticalPos(conf.boxMargin);
13318 bounds.newLoop(msg.message);
13319 bounds.bumpVerticalPos(conf.boxMargin + conf.boxTextMargin);
13320 break;
13321
13322 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.LOOP_END:
13323 loopData = bounds.endLoop();
13324 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopData, 'loop', conf);
13325 bounds.bumpVerticalPos(conf.boxMargin);
13326 break;
13327
13328 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.OPT_START:
13329 bounds.bumpVerticalPos(conf.boxMargin);
13330 bounds.newLoop(msg.message);
13331 bounds.bumpVerticalPos(conf.boxMargin + conf.boxTextMargin);
13332 break;
13333
13334 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.OPT_END:
13335 loopData = bounds.endLoop();
13336 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopData, 'opt', conf);
13337 bounds.bumpVerticalPos(conf.boxMargin);
13338 break;
13339
13340 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_START:
13341 bounds.bumpVerticalPos(conf.boxMargin);
13342 bounds.newLoop(msg.message);
13343 bounds.bumpVerticalPos(conf.boxMargin + conf.boxTextMargin);
13344 break;
13345
13346 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_ELSE:
13347 bounds.bumpVerticalPos(conf.boxMargin);
13348 loopData = bounds.addSectionToLoop(msg.message);
13349 bounds.bumpVerticalPos(conf.boxMargin);
13350 break;
13351
13352 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_END:
13353 loopData = bounds.endLoop();
13354 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopData, 'alt', conf);
13355 bounds.bumpVerticalPos(conf.boxMargin);
13356 break;
13357
13358 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_START:
13359 bounds.bumpVerticalPos(conf.boxMargin);
13360 bounds.newLoop(msg.message);
13361 bounds.bumpVerticalPos(conf.boxMargin + conf.boxTextMargin);
13362 break;
13363
13364 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_AND:
13365 bounds.bumpVerticalPos(conf.boxMargin);
13366 loopData = bounds.addSectionToLoop(msg.message);
13367 bounds.bumpVerticalPos(conf.boxMargin);
13368 break;
13369
13370 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_END:
13371 loopData = bounds.endLoop();
13372 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopData, 'par', conf);
13373 bounds.bumpVerticalPos(conf.boxMargin);
13374 break;
13375
13376 default:
13377 try {
13378 // lastMsg = msg
13379 bounds.bumpVerticalPos(conf.messageMargin);
13380 const fromBounds = actorFlowVerticaBounds(msg.from);
13381 const toBounds = actorFlowVerticaBounds(msg.to);
13382 const fromIdx = fromBounds[0] <= toBounds[0] ? 1 : 0;
13383 const toIdx = fromBounds[0] < toBounds[0] ? 0 : 1;
13384 startx = fromBounds[fromIdx];
13385 stopx = toBounds[toIdx];
13386 const verticalPos = bounds.getVerticalPos();
13387 drawMessage(diagram, startx, stopx, verticalPos, msg);
13388 const allBounds = fromBounds.concat(toBounds);
13389 bounds.insert(Math.min.apply(null, allBounds), verticalPos, Math.max.apply(null, allBounds), verticalPos);
13390 } catch (e) {
13391 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].error('error while drawing message', e);
13392 }
13393
13394 }
13395 });
13396
13397 if (conf.mirrorActors) {
13398 // Draw actors below diagram
13399 bounds.bumpVerticalPos(conf.boxMargin * 2);
13400 drawActors(diagram, actors, actorKeys, bounds.getVerticalPos());
13401 }
13402
13403 const box = bounds.getBounds(); // Adjust line height of actor lines now that the height of the diagram is known
13404
13405 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('For line height fix Querying: #' + id + ' .actor-line');
13406 const actorLines = d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"]('#' + id + ' .actor-line');
13407 actorLines.attr('y2', box.stopy);
13408 let height = box.stopy - box.starty + 2 * conf.diagramMarginY;
13409
13410 if (conf.mirrorActors) {
13411 height = height - conf.boxMargin + conf.bottomMarginAdj;
13412 }
13413
13414 const width = box.stopx - box.startx + 2 * conf.diagramMarginX;
13415
13416 if (title) {
13417 diagram.append('text').text(title).attr('x', (box.stopx - box.startx) / 2 - 2 * conf.diagramMarginX).attr('y', -25);
13418 }
13419
13420 if (conf.useMaxWidth) {
13421 diagram.attr('height', '100%');
13422 diagram.attr('width', '100%');
13423 diagram.attr('style', 'max-width:' + width + 'px;');
13424 } else {
13425 diagram.attr('height', height);
13426 diagram.attr('width', width);
13427 }
13428
13429 const extraVertForTitle = title ? 40 : 0;
13430 diagram.attr('viewBox', box.startx - conf.diagramMarginX + ' -' + (conf.diagramMarginY + extraVertForTitle) + ' ' + width + ' ' + (height + extraVertForTitle));
13431};
13432/* harmony default export */ __webpack_exports__["default"] = ({
13433 bounds,
13434 drawActors,
13435 setConf,
13436 draw
13437});
13438
13439/***/ }),
13440
13441/***/ "./src/diagrams/sequence/svgDraw.js":
13442/*!******************************************!*\
13443 !*** ./src/diagrams/sequence/svgDraw.js ***!
13444 \******************************************/
13445/*! exports provided: drawRect, drawText, drawLabel, drawActor, anchorElement, drawActivation, drawLoop, insertArrowHead, insertArrowCrossHead, getTextObj, getNoteRect, default */
13446/***/ (function(module, __webpack_exports__, __webpack_require__) {
13447
13448"use strict";
13449__webpack_require__.r(__webpack_exports__);
13450/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawRect", function() { return drawRect; });
13451/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawText", function() { return drawText; });
13452/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawLabel", function() { return drawLabel; });
13453/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawActor", function() { return drawActor; });
13454/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "anchorElement", function() { return anchorElement; });
13455/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawActivation", function() { return drawActivation; });
13456/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawLoop", function() { return drawLoop; });
13457/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertArrowHead", function() { return insertArrowHead; });
13458/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertArrowCrossHead", function() { return insertArrowCrossHead; });
13459/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTextObj", function() { return getTextObj; });
13460/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNoteRect", function() { return getNoteRect; });
13461const drawRect = function (elem, rectData) {
13462 const rectElem = elem.append('rect');
13463 rectElem.attr('x', rectData.x);
13464 rectElem.attr('y', rectData.y);
13465 rectElem.attr('fill', rectData.fill);
13466 rectElem.attr('stroke', rectData.stroke);
13467 rectElem.attr('width', rectData.width);
13468 rectElem.attr('height', rectData.height);
13469 rectElem.attr('rx', rectData.rx);
13470 rectElem.attr('ry', rectData.ry);
13471
13472 if (typeof rectData.class !== 'undefined') {
13473 rectElem.attr('class', rectData.class);
13474 }
13475
13476 return rectElem;
13477};
13478const drawText = function (elem, textData, width) {
13479 // Remove and ignore br:s
13480 const nText = textData.text.replace(/<br\/?>/ig, ' ');
13481 const textElem = elem.append('text');
13482 textElem.attr('x', textData.x);
13483 textElem.attr('y', textData.y);
13484 textElem.style('text-anchor', textData.anchor);
13485 textElem.attr('fill', textData.fill);
13486
13487 if (typeof textData.class !== 'undefined') {
13488 textElem.attr('class', textData.class);
13489 }
13490
13491 const span = textElem.append('tspan');
13492 span.attr('x', textData.x + textData.textMargin * 2);
13493 span.attr('fill', textData.fill);
13494 span.text(nText);
13495 return textElem;
13496};
13497const drawLabel = function (elem, txtObject) {
13498 function genPoints(x, y, width, height, cut) {
13499 return x + ',' + y + ' ' + (x + width) + ',' + y + ' ' + (x + width) + ',' + (y + height - cut) + ' ' + (x + width - cut * 1.2) + ',' + (y + height) + ' ' + x + ',' + (y + height);
13500 }
13501
13502 const polygon = elem.append('polygon');
13503 polygon.attr('points', genPoints(txtObject.x, txtObject.y, 50, 20, 7));
13504 polygon.attr('class', 'labelBox');
13505 txtObject.y = txtObject.y + txtObject.labelMargin;
13506 txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;
13507 drawText(elem, txtObject);
13508};
13509let actorCnt = -1;
13510/**
13511 * Draws an actor in the diagram with the attaced line
13512 * @param center - The center of the the actor
13513 * @param pos The position if the actor in the liost of actors
13514 * @param description The text in the box
13515 */
13516
13517const drawActor = function (elem, left, verticalPos, description, conf) {
13518 const center = left + conf.width / 2;
13519 const g = elem.append('g');
13520
13521 if (verticalPos === 0) {
13522 actorCnt++;
13523 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');
13524 }
13525
13526 const rect = getNoteRect();
13527 rect.x = left;
13528 rect.y = verticalPos;
13529 rect.fill = '#eaeaea';
13530 rect.width = conf.width;
13531 rect.height = conf.height;
13532 rect.class = 'actor';
13533 rect.rx = 3;
13534 rect.ry = 3;
13535 drawRect(g, rect);
13536
13537 _drawTextCandidateFunc(conf)(description, g, rect.x, rect.y, rect.width, rect.height, {
13538 'class': 'actor'
13539 }, conf);
13540};
13541const anchorElement = function (elem) {
13542 return elem.append('g');
13543};
13544/**
13545 * Draws an actor in the diagram with the attaced line
13546 * @param elem - element to append activation rect
13547 * @param bounds - activation box bounds
13548 * @param verticalPos - precise y cooridnate of bottom activation box edge
13549 */
13550
13551const drawActivation = function (elem, bounds, verticalPos, conf, actorActivations) {
13552 const rect = getNoteRect();
13553 const g = bounds.anchored;
13554 rect.x = bounds.startx;
13555 rect.y = bounds.starty;
13556 rect.class = 'activation' + actorActivations % 3; // Will evaluate to 0, 1 or 2
13557
13558 rect.width = bounds.stopx - bounds.startx;
13559 rect.height = verticalPos - bounds.starty;
13560 drawRect(g, rect);
13561};
13562/**
13563 * Draws an actor in the diagram with the attaced line
13564 * @param center - The center of the the actor
13565 * @param pos The position if the actor in the list of actors
13566 * @param description The text in the box
13567 */
13568
13569const drawLoop = function (elem, bounds, labelText, conf) {
13570 const g = elem.append('g');
13571
13572 const drawLoopLine = function (startx, starty, stopx, stopy) {
13573 return g.append('line').attr('x1', startx).attr('y1', starty).attr('x2', stopx).attr('y2', stopy).attr('class', 'loopLine');
13574 };
13575
13576 drawLoopLine(bounds.startx, bounds.starty, bounds.stopx, bounds.starty);
13577 drawLoopLine(bounds.stopx, bounds.starty, bounds.stopx, bounds.stopy);
13578 drawLoopLine(bounds.startx, bounds.stopy, bounds.stopx, bounds.stopy);
13579 drawLoopLine(bounds.startx, bounds.starty, bounds.startx, bounds.stopy);
13580
13581 if (typeof bounds.sections !== 'undefined') {
13582 bounds.sections.forEach(function (item) {
13583 drawLoopLine(bounds.startx, item, bounds.stopx, item).style('stroke-dasharray', '3, 3');
13584 });
13585 }
13586
13587 let txt = getTextObj();
13588 txt.text = labelText;
13589 txt.x = bounds.startx;
13590 txt.y = bounds.starty;
13591 txt.labelMargin = 1.5 * 10; // This is the small box that says "loop"
13592
13593 txt.class = 'labelText'; // Its size & position are fixed.
13594
13595 drawLabel(g, txt);
13596 txt = getTextObj();
13597 txt.text = '[ ' + bounds.title + ' ]';
13598 txt.x = bounds.startx + (bounds.stopx - bounds.startx) / 2;
13599 txt.y = bounds.starty + 1.5 * conf.boxMargin;
13600 txt.anchor = 'middle';
13601 txt.class = 'loopText';
13602 drawText(g, txt);
13603
13604 if (typeof bounds.sectionTitles !== 'undefined') {
13605 bounds.sectionTitles.forEach(function (item, idx) {
13606 if (item !== '') {
13607 txt.text = '[ ' + item + ' ]';
13608 txt.y = bounds.sections[idx] + 1.5 * conf.boxMargin;
13609 drawText(g, txt);
13610 }
13611 });
13612 }
13613};
13614/**
13615 * Setup arrow head and define the marker. The result is appended to the svg.
13616 */
13617
13618const insertArrowHead = function (elem) {
13619 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'); // this is actual shape for arrowhead
13620};
13621/**
13622 * Setup arrow head and define the marker. The result is appended to the svg.
13623 */
13624
13625const insertArrowCrossHead = function (elem) {
13626 const defs = elem.append('defs');
13627 const marker = defs.append('marker').attr('id', 'crosshead').attr('markerWidth', 15).attr('markerHeight', 8).attr('orient', 'auto').attr('refX', 16).attr('refY', 4); // The arrow
13628
13629 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'); // The cross
13630
13631 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'); // this is actual shape for arrowhead
13632};
13633const getTextObj = function () {
13634 const txt = {
13635 x: 0,
13636 y: 0,
13637 'fill': undefined,
13638 'text-anchor': 'start',
13639 style: '#666',
13640 width: 100,
13641 height: 100,
13642 textMargin: 0,
13643 rx: 0,
13644 ry: 0
13645 };
13646 return txt;
13647};
13648const getNoteRect = function () {
13649 const rect = {
13650 x: 0,
13651 y: 0,
13652 fill: '#EDF2AE',
13653 stroke: '#666',
13654 width: 100,
13655 anchor: 'start',
13656 height: 100,
13657 rx: 0,
13658 ry: 0
13659 };
13660 return rect;
13661};
13662
13663const _drawTextCandidateFunc = function () {
13664 function byText(content, g, x, y, width, height, textAttrs) {
13665 const text = g.append('text').attr('x', x + width / 2).attr('y', y + height / 2 + 5).style('text-anchor', 'middle').text(content);
13666
13667 _setTextAttrs(text, textAttrs);
13668 }
13669
13670 function byTspan(content, g, x, y, width, height, textAttrs, conf) {
13671 const {
13672 actorFontSize,
13673 actorFontFamily
13674 } = conf;
13675 const lines = content.split(/<br\/?>/ig);
13676
13677 for (let i = 0; i < lines.length; i++) {
13678 const dy = i * actorFontSize - actorFontSize * (lines.length - 1) / 2;
13679 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);
13680 text.append('tspan').attr('x', x + width / 2).attr('dy', dy).text(lines[i]);
13681 text.attr('y', y + height / 2.0).attr('dominant-baseline', 'central').attr('alignment-baseline', 'central');
13682
13683 _setTextAttrs(text, textAttrs);
13684 }
13685 }
13686
13687 function byFo(content, g, x, y, width, height, textAttrs, conf) {
13688 const s = g.append('switch');
13689 const f = s.append('foreignObject').attr('x', x).attr('y', y).attr('width', width).attr('height', height);
13690 const text = f.append('div').style('display', 'table').style('height', '100%').style('width', '100%');
13691 text.append('div').style('display', 'table-cell').style('text-align', 'center').style('vertical-align', 'middle').text(content);
13692 byTspan(content, s, x, y, width, height, textAttrs, conf);
13693
13694 _setTextAttrs(text, textAttrs);
13695 }
13696
13697 function _setTextAttrs(toText, fromTextAttrsDict) {
13698 for (const key in fromTextAttrsDict) {
13699 if (fromTextAttrsDict.hasOwnProperty(key)) {
13700 toText.attr(key, fromTextAttrsDict[key]);
13701 }
13702 }
13703 }
13704
13705 return function (conf) {
13706 return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;
13707 };
13708}();
13709
13710/* harmony default export */ __webpack_exports__["default"] = ({
13711 drawRect,
13712 drawText,
13713 drawLabel,
13714 drawActor,
13715 anchorElement,
13716 drawActivation,
13717 drawLoop,
13718 insertArrowHead,
13719 insertArrowCrossHead,
13720 getTextObj,
13721 getNoteRect
13722});
13723
13724/***/ }),
13725
13726/***/ "./src/logger.js":
13727/*!***********************!*\
13728 !*** ./src/logger.js ***!
13729 \***********************/
13730/*! exports provided: LEVELS, logger, setLogLevel */
13731/***/ (function(module, __webpack_exports__, __webpack_require__) {
13732
13733"use strict";
13734__webpack_require__.r(__webpack_exports__);
13735/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LEVELS", function() { return LEVELS; });
13736/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logger", function() { return logger; });
13737/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLogLevel", function() { return setLogLevel; });
13738/* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moment-mini */ "moment-mini");
13739/* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment_mini__WEBPACK_IMPORTED_MODULE_0__);
13740
13741const LEVELS = {
13742 debug: 1,
13743 info: 2,
13744 warn: 3,
13745 error: 4,
13746 fatal: 5
13747};
13748const logger = {
13749 debug: () => {},
13750 info: () => {},
13751 warn: () => {},
13752 error: () => {},
13753 fatal: () => {}
13754};
13755const setLogLevel = function (level) {
13756 logger.debug = () => {};
13757
13758 logger.info = () => {};
13759
13760 logger.warn = () => {};
13761
13762 logger.error = () => {};
13763
13764 logger.fatal = () => {};
13765
13766 if (level <= LEVELS.fatal) {
13767 logger.fatal = console.log.bind(console, '\x1b[35m', format('FATAL'));
13768 }
13769
13770 if (level <= LEVELS.error) {
13771 logger.error = console.log.bind(console, '\x1b[31m', format('ERROR'));
13772 }
13773
13774 if (level <= LEVELS.warn) {
13775 logger.warn = console.log.bind(console, `\x1b[33m`, format('WARN'));
13776 }
13777
13778 if (level <= LEVELS.info) {
13779 logger.info = console.log.bind(console, '\x1b[34m', format('INFO'));
13780 }
13781
13782 if (level <= LEVELS.debug) {
13783 logger.debug = console.log.bind(console, '\x1b[32m', format('DEBUG'));
13784 }
13785};
13786
13787const format = level => {
13788 const time = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()().format('HH:mm:ss.SSS');
13789 return `${time} : ${level} : `;
13790};
13791
13792/***/ }),
13793
13794/***/ "./src/mermaid.js":
13795/*!************************!*\
13796 !*** ./src/mermaid.js ***!
13797 \************************/
13798/*! exports provided: default */
13799/***/ (function(module, __webpack_exports__, __webpack_require__) {
13800
13801"use strict";
13802__webpack_require__.r(__webpack_exports__);
13803/* harmony import */ var he__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! he */ "he");
13804/* harmony import */ var he__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(he__WEBPACK_IMPORTED_MODULE_0__);
13805/* harmony import */ var _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mermaidAPI */ "./src/mermaidAPI.js");
13806/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./logger */ "./src/logger.js");
13807/**
13808 * Web page integration module for the mermaid framework. It uses the mermaidAPI for mermaid functionality and to render
13809 * the diagrams to svg code.
13810 */
13811
13812
13813
13814/**
13815 * ## init
13816 * Function that goes through the document to find the chart definitions in there and render them.
13817 *
13818 * The function tags the processed attributes with the attribute data-processed and ignores found elements with the
13819 * attribute already set. This way the init function can be triggered several times.
13820 *
13821 * Optionally, `init` can accept in the second argument one of the following:
13822 * - a DOM Node
13823 * - an array of DOM nodes (as would come from a jQuery selector)
13824 * - a W3C selector, a la `.mermaid`
13825 *
13826 * ```mermaid
13827 * graph LR;
13828 * a(Find elements)-->b{Processed}
13829 * b-->|Yes|c(Leave element)
13830 * b-->|No |d(Transform)
13831 * ```
13832 * Renders the mermaid diagrams
13833 * @param nodes a css selector or an array of nodes
13834 */
13835
13836const init = function () {
13837 const conf = _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].getConfig();
13838 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Starting rendering diagrams');
13839 let nodes;
13840
13841 if (arguments.length >= 2) {
13842 /*! sequence config was passed as #1 */
13843 if (typeof arguments[0] !== 'undefined') {
13844 mermaid.sequenceConfig = arguments[0];
13845 }
13846
13847 nodes = arguments[1];
13848 } else {
13849 nodes = arguments[0];
13850 } // if last argument is a function this is the callback function
13851
13852
13853 let callback;
13854
13855 if (typeof arguments[arguments.length - 1] === 'function') {
13856 callback = arguments[arguments.length - 1];
13857 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Callback function found');
13858 } else {
13859 if (typeof conf.mermaid !== 'undefined') {
13860 if (typeof conf.mermaid.callback === 'function') {
13861 callback = conf.mermaid.callback;
13862 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Callback function found');
13863 } else {
13864 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('No Callback function found');
13865 }
13866 }
13867 }
13868
13869 nodes = nodes === undefined ? document.querySelectorAll('.mermaid') : typeof nodes === 'string' ? document.querySelectorAll(nodes) : nodes instanceof window.Node ? [nodes] : nodes; // Last case - sequence config was passed pick next
13870
13871 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Start On Load before: ' + mermaid.startOnLoad);
13872
13873 if (typeof mermaid.startOnLoad !== 'undefined') {
13874 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Start On Load inner: ' + mermaid.startOnLoad);
13875 _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].initialize({
13876 startOnLoad: mermaid.startOnLoad
13877 });
13878 }
13879
13880 if (typeof mermaid.ganttConfig !== 'undefined') {
13881 _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].initialize({
13882 gantt: mermaid.ganttConfig
13883 });
13884 }
13885
13886 let txt;
13887
13888 for (let i = 0; i < nodes.length; i++) {
13889 const element = nodes[i];
13890 /*! Check if previously processed */
13891
13892 if (!element.getAttribute('data-processed')) {
13893 element.setAttribute('data-processed', true);
13894 } else {
13895 continue;
13896 }
13897
13898 const id = `mermaid-${Date.now()}`; // Fetch the graph definition including tags
13899
13900 txt = element.innerHTML; // transforms the html to pure text
13901
13902 txt = he__WEBPACK_IMPORTED_MODULE_0___default.a.decode(txt).trim().replace(/<br>/ig, '<br/>');
13903 _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].render(id, txt, (svgCode, bindFunctions) => {
13904 element.innerHTML = svgCode;
13905
13906 if (typeof callback !== 'undefined') {
13907 callback(id);
13908 }
13909
13910 bindFunctions(element);
13911 }, element);
13912 }
13913};
13914
13915const initialize = function (config) {
13916 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Initializing mermaid ');
13917
13918 if (typeof config.mermaid !== 'undefined') {
13919 if (typeof config.mermaid.startOnLoad !== 'undefined') {
13920 mermaid.startOnLoad = config.mermaid.startOnLoad;
13921 }
13922
13923 if (typeof config.mermaid.htmlLabels !== 'undefined') {
13924 mermaid.htmlLabels = config.mermaid.htmlLabels;
13925 }
13926 }
13927
13928 _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].initialize(config);
13929};
13930/**
13931 * ##contentLoaded
13932 * Callback function that is called when page is loaded. This functions fetches configuration for mermaid rendering and
13933 * calls init for rendering the mermaid diagrams on the page.
13934 */
13935
13936
13937const contentLoaded = function () {
13938 let config;
13939
13940 if (mermaid.startOnLoad) {
13941 // No config found, do check API config
13942 config = _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].getConfig();
13943
13944 if (config.startOnLoad) {
13945 mermaid.init();
13946 }
13947 } else {
13948 if (typeof mermaid.startOnLoad === 'undefined') {
13949 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('In start, no config');
13950 config = _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].getConfig();
13951
13952 if (config.startOnLoad) {
13953 mermaid.init();
13954 }
13955 }
13956 }
13957};
13958
13959if (typeof document !== 'undefined') {
13960 /*!
13961 * Wait for document loaded before starting the execution
13962 */
13963 window.addEventListener('load', function () {
13964 contentLoaded();
13965 }, false);
13966}
13967
13968const mermaid = {
13969 startOnLoad: true,
13970 htmlLabels: true,
13971 mermaidAPI: _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"],
13972 parse: _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].parse,
13973 render: _mermaidAPI__WEBPACK_IMPORTED_MODULE_1__["default"].render,
13974 init,
13975 initialize,
13976 contentLoaded
13977};
13978/* harmony default export */ __webpack_exports__["default"] = (mermaid);
13979
13980/***/ }),
13981
13982/***/ "./src/mermaidAPI.js":
13983/*!***************************!*\
13984 !*** ./src/mermaidAPI.js ***!
13985 \***************************/
13986/*! exports provided: encodeEntities, decodeEntities, default */
13987/***/ (function(module, __webpack_exports__, __webpack_require__) {
13988
13989"use strict";
13990__webpack_require__.r(__webpack_exports__);
13991/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "encodeEntities", function() { return encodeEntities; });
13992/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "decodeEntities", function() { return decodeEntities; });
13993/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
13994/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
13995/* harmony import */ var scope_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! scope-css */ "scope-css");
13996/* harmony import */ var scope_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(scope_css__WEBPACK_IMPORTED_MODULE_1__);
13997/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../package.json */ "./package.json");
13998var _package_json__WEBPACK_IMPORTED_MODULE_2___namespace = /*#__PURE__*/__webpack_require__.t(/*! ../package.json */ "./package.json", 1);
13999/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./logger */ "./src/logger.js");
14000/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils */ "./src/utils.js");
14001/* harmony import */ var _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./diagrams/flowchart/flowRenderer */ "./src/diagrams/flowchart/flowRenderer.js");
14002/* harmony import */ var _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./diagrams/flowchart/parser/flow */ "./src/diagrams/flowchart/parser/flow.js");
14003/* harmony import */ var _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_6__);
14004/* harmony import */ var _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./diagrams/flowchart/flowDb */ "./src/diagrams/flowchart/flowDb.js");
14005/* harmony import */ var _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./diagrams/sequence/sequenceRenderer */ "./src/diagrams/sequence/sequenceRenderer.js");
14006/* harmony import */ var _diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./diagrams/sequence/parser/sequenceDiagram */ "./src/diagrams/sequence/parser/sequenceDiagram.js");
14007/* harmony import */ var _diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_9__);
14008/* harmony import */ var _diagrams_sequence_sequenceDb__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./diagrams/sequence/sequenceDb */ "./src/diagrams/sequence/sequenceDb.js");
14009/* harmony import */ var _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./diagrams/gantt/ganttRenderer */ "./src/diagrams/gantt/ganttRenderer.js");
14010/* harmony import */ var _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./diagrams/gantt/parser/gantt */ "./src/diagrams/gantt/parser/gantt.js");
14011/* harmony import */ var _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_12__);
14012/* harmony import */ var _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./diagrams/gantt/ganttDb */ "./src/diagrams/gantt/ganttDb.js");
14013/* harmony import */ var _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./diagrams/class/classRenderer */ "./src/diagrams/class/classRenderer.js");
14014/* harmony import */ var _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./diagrams/class/parser/classDiagram */ "./src/diagrams/class/parser/classDiagram.js");
14015/* harmony import */ var _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_15__);
14016/* harmony import */ var _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./diagrams/class/classDb */ "./src/diagrams/class/classDb.js");
14017/* harmony import */ var _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./diagrams/git/gitGraphRenderer */ "./src/diagrams/git/gitGraphRenderer.js");
14018/* harmony import */ var _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./diagrams/git/parser/gitGraph */ "./src/diagrams/git/parser/gitGraph.js");
14019/* harmony import */ var _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_18__);
14020/* harmony import */ var _diagrams_git_gitGraphAst__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./diagrams/git/gitGraphAst */ "./src/diagrams/git/gitGraphAst.js");
14021/* harmony import */ var _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./diagrams/info/infoRenderer */ "./src/diagrams/info/infoRenderer.js");
14022/* harmony import */ var _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./diagrams/info/parser/info */ "./src/diagrams/info/parser/info.js");
14023/* harmony import */ var _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_21__);
14024/* harmony import */ var _diagrams_info_infoDb__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./diagrams/info/infoDb */ "./src/diagrams/info/infoDb.js");
14025/**
14026 * ---
14027 * title: mermaidAPI
14028 * order: 5
14029 * ---
14030 * # mermaidAPI
14031 * This is the api to be used when handling the integration with the web page instead of using the default integration
14032 * (mermaid.js).
14033 *
14034 * The core of this api is the **render** function that given a graph definitionas text renders the graph/diagram and
14035 * returns a svg element for the graph. It is is then up to the user of the API to make use of the svg, either insert it
14036 * somewhere in the page or something completely different.
14037*/
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061const themes = {};
14062
14063for (const themeName of ['default', 'forest', 'dark', 'neutral']) {
14064 themes[themeName] = __webpack_require__("./src/themes sync recursive ^\\.\\/.*\\/index\\.scss$")(`./${themeName}/index.scss`);
14065}
14066/**
14067 * ## Configuration
14068 * These are the default options which can be overridden with the initialization call as in the example below:
14069 * ```
14070 * mermaid.initialize({
14071 * flowchart:{
14072 * htmlLabels: false
14073 * }
14074 * });
14075 * ```
14076 */
14077
14078
14079const config = {
14080 /** theme , the CSS style sheet
14081 *
14082 * **theme** - Choose one of the built-in themes: default, forest, dark or neutral. To disable any pre-defined mermaid theme, use "null".
14083 * **themeCSS** - Use your own CSS. This overrides **theme**.
14084 *```
14085 * "theme": "forest",
14086 * "themeCSS": ".node rect { fill: red; }"
14087 *```
14088 */
14089 theme: 'default',
14090 themeCSS: undefined,
14091
14092 /**
14093 * logLevel , decides the amount of logging to be used.
14094 * * debug: 1
14095 * * info: 2
14096 * * warn: 3
14097 * * error: 4
14098 * * fatal: 5
14099 */
14100 logLevel: 5,
14101
14102 /**
14103 * **startOnLoad** - This options controls whether or mermaid starts when the page loads
14104 */
14105 startOnLoad: true,
14106
14107 /**
14108 * **arrowMarkerAbsolute** - This options controls whether or arrow markers in html code will be absolute paths or
14109 * an anchor, #. This matters if you are using base tag settings.
14110 */
14111 arrowMarkerAbsolute: false,
14112
14113 /**
14114 * ### flowchart
14115 * *The object containing configurations specific for flowcharts*
14116 */
14117 flowchart: {
14118 /**
14119 * **htmlLabels** - Flag for setting whether or not a html tag should be used for rendering labels
14120 * on the edges
14121 */
14122 htmlLabels: true,
14123 curve: 'linear'
14124 },
14125
14126 /**
14127 * ### sequenceDiagram
14128 * The object containing configurations specific for sequence diagrams
14129 */
14130 sequence: {
14131 /**
14132 * **diagramMarginX** - margin to the right and left of the sequence diagram
14133 */
14134 diagramMarginX: 50,
14135
14136 /**
14137 * **diagramMarginY** - margin to the over and under the sequence diagram
14138 */
14139 diagramMarginY: 10,
14140
14141 /**
14142 * **actorMargin** - Margin between actors
14143 */
14144 actorMargin: 50,
14145
14146 /**
14147 * **width** - Width of actor boxes
14148 */
14149 width: 150,
14150
14151 /**
14152 * **height** - Height of actor boxes
14153 */
14154 height: 65,
14155
14156 /**
14157 * **boxMargin** - Margin around loop boxes
14158 */
14159 boxMargin: 10,
14160
14161 /**
14162 * **boxTextMargin** - margin around the text in loop/alt/opt boxes
14163 */
14164 boxTextMargin: 5,
14165
14166 /**
14167 * **noteMargin** - margin around notes
14168 */
14169 noteMargin: 10,
14170
14171 /**
14172 * **messageMargin** - Space between messages
14173 */
14174 messageMargin: 35,
14175
14176 /**
14177 * **mirrorActors** - mirror actors under diagram
14178 */
14179 mirrorActors: true,
14180
14181 /**
14182 * **bottomMarginAdj** - Depending on css styling this might need adjustment.
14183 * Prolongs the edge of the diagram downwards
14184 */
14185 bottomMarginAdj: 1,
14186
14187 /**
14188 * **useMaxWidth** - when this flag is set the height and width is set to 100% and is then scaling with the
14189 * available space if not the absolute space required is used
14190 */
14191 useMaxWidth: true,
14192
14193 /**
14194 * **rightAngles** - this will display arrows that start and begin at the same node as right angles, rather than a curve
14195 */
14196 rightAngles: false
14197 },
14198
14199 /** ### gantt
14200 * The object containing configurations specific for gantt diagrams*
14201 */
14202 gantt: {
14203 /**
14204 * **titleTopMargin** - margin top for the text over the gantt diagram
14205 */
14206 titleTopMargin: 25,
14207
14208 /**
14209 * **barHeight** - the height of the bars in the graph
14210 */
14211 barHeight: 20,
14212
14213 /**
14214 * **barGap** - the margin between the different activities in the gantt diagram
14215 */
14216 barGap: 4,
14217
14218 /**
14219 * **topPadding** - margin between title and gantt diagram and between axis and gantt diagram.
14220 */
14221 topPadding: 50,
14222
14223 /**
14224 * **leftPadding** - the space allocated for the section name to the left of the activities.
14225 */
14226 leftPadding: 75,
14227
14228 /**
14229 * **gridLineStartPadding** - Vertical starting position of the grid lines
14230 */
14231 gridLineStartPadding: 35,
14232
14233 /**
14234 * **fontSize** - font size ...
14235 */
14236 fontSize: 11,
14237
14238 /**
14239 * **fontFamily** - font family ...
14240 */
14241 fontFamily: '"Open-Sans", "sans-serif"',
14242
14243 /**
14244 * **numberSectionStyles** - the number of alternating section styles
14245 */
14246 numberSectionStyles: 4,
14247
14248 /**
14249 * **axisFormat** - datetime format of the axis, this might need adjustment to match your locale and preferences
14250 */
14251 axisFormat: '%Y-%m-%d'
14252 },
14253 class: {},
14254 git: {}
14255};
14256Object(_logger__WEBPACK_IMPORTED_MODULE_3__["setLogLevel"])(config.logLevel);
14257
14258function parse(text) {
14259 const graphType = _utils__WEBPACK_IMPORTED_MODULE_4__["default"].detectType(text);
14260 let parser;
14261 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Type ' + graphType);
14262
14263 switch (graphType) {
14264 case 'git':
14265 parser = _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_18___default.a;
14266 parser.parser.yy = _diagrams_git_gitGraphAst__WEBPACK_IMPORTED_MODULE_19__["default"];
14267 break;
14268
14269 case 'flowchart':
14270 parser = _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_6___default.a;
14271 parser.parser.yy = _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_7__["default"];
14272 break;
14273
14274 case 'sequence':
14275 parser = _diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_9___default.a;
14276 parser.parser.yy = _diagrams_sequence_sequenceDb__WEBPACK_IMPORTED_MODULE_10__["default"];
14277 break;
14278
14279 case 'gantt':
14280 parser = _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_12___default.a;
14281 parser.parser.yy = _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_13__["default"];
14282 break;
14283
14284 case 'class':
14285 parser = _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_15___default.a;
14286 parser.parser.yy = _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_16__["default"];
14287 break;
14288
14289 case 'info':
14290 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('info info info');
14291 parser = _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_21___default.a;
14292 parser.parser.yy = _diagrams_info_infoDb__WEBPACK_IMPORTED_MODULE_22__["default"];
14293 break;
14294 }
14295
14296 parser.parser.yy.parseError = (str, hash) => {
14297 const error = {
14298 str,
14299 hash
14300 };
14301 throw error;
14302 };
14303
14304 parser.parse(text);
14305}
14306
14307const encodeEntities = function (text) {
14308 let txt = text;
14309 txt = txt.replace(/style.*:\S*#.*;/g, function (s) {
14310 const innerTxt = s.substring(0, s.length - 1);
14311 return innerTxt;
14312 });
14313 txt = txt.replace(/classDef.*:\S*#.*;/g, function (s) {
14314 const innerTxt = s.substring(0, s.length - 1);
14315 return innerTxt;
14316 });
14317 txt = txt.replace(/#\w+;/g, function (s) {
14318 const innerTxt = s.substring(1, s.length - 1);
14319 const isInt = /^\+?\d+$/.test(innerTxt);
14320
14321 if (isInt) {
14322 return 'fl°°' + innerTxt + '¶ß';
14323 } else {
14324 return 'fl°' + innerTxt + '¶ß';
14325 }
14326 });
14327 return txt;
14328};
14329const decodeEntities = function (text) {
14330 let txt = text;
14331 txt = txt.replace(/fl°°/g, function () {
14332 return '&#';
14333 });
14334 txt = txt.replace(/fl°/g, function () {
14335 return '&';
14336 });
14337 txt = txt.replace(/¶ß/g, function () {
14338 return ';';
14339 });
14340 return txt;
14341};
14342/**
14343 * ##render
14344 * Function that renders an svg with a graph from a chart definition. Usage example below.
14345 *
14346 * ```
14347 * mermaidAPI.initialize({
14348 * startOnLoad:true
14349 * });
14350 * $(function(){
14351 * const graphDefinition = 'graph TB\na-->b';
14352 * const cb = function(svgGraph){
14353 * console.log(svgGraph);
14354 * };
14355 * mermaidAPI.render('id1',graphDefinition,cb);
14356 * });
14357 *```
14358 * @param id the id of the element to be rendered
14359 * @param txt the graph definition
14360 * @param cb callback which is called after rendering is finished with the svg code as inparam.
14361 * @param container selector to element in which a div with the graph temporarily will be inserted. In one is
14362 * provided a hidden div will be inserted in the body of the page instead. The element will be removed when rendering is
14363 * completed.
14364 */
14365
14366const render = function (id, txt, cb, container) {
14367 if (typeof container !== 'undefined') {
14368 container.innerHTML = '';
14369 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');
14370 } else {
14371 const element = document.querySelector('#' + 'd' + id);
14372
14373 if (element) {
14374 element.innerHTML = '';
14375 }
14376
14377 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');
14378 }
14379
14380 window.txt = txt;
14381 txt = encodeEntities(txt);
14382 const element = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#d' + id).node();
14383 const graphType = _utils__WEBPACK_IMPORTED_MODULE_4__["default"].detectType(txt); // insert inline style into svg
14384
14385 const svg = element.firstChild;
14386 const firstChild = svg.firstChild; // pre-defined theme
14387
14388 let style = themes[config.theme];
14389
14390 if (style === undefined) {
14391 style = '';
14392 } // user provided theme CSS
14393
14394
14395 if (config.themeCSS !== undefined) {
14396 style += `\n${config.themeCSS}`;
14397 } // classDef
14398
14399
14400 if (graphType === 'flowchart') {
14401 const classes = _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_5__["default"].getClasses(txt);
14402
14403 for (const className in classes) {
14404 style += `\n.${className} > * { ${classes[className].styles.join(' !important; ')} !important; }`;
14405 }
14406 }
14407
14408 const style1 = document.createElement('style');
14409 style1.innerHTML = scope_css__WEBPACK_IMPORTED_MODULE_1___default()(style, `#${id}`);
14410 svg.insertBefore(style1, firstChild);
14411 const style2 = document.createElement('style');
14412 const cs = window.getComputedStyle(svg);
14413 style2.innerHTML = `#${id} {
14414 color: ${cs.color};
14415 font: ${cs.font};
14416 }`;
14417 svg.insertBefore(style2, firstChild);
14418
14419 switch (graphType) {
14420 case 'git':
14421 config.flowchart.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
14422 _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_17__["default"].setConf(config.git);
14423 _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_17__["default"].draw(txt, id, false);
14424 break;
14425
14426 case 'flowchart':
14427 config.flowchart.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
14428 _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_5__["default"].setConf(config.flowchart);
14429 _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_5__["default"].draw(txt, id, false);
14430 break;
14431
14432 case 'sequence':
14433 config.sequence.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
14434
14435 if (config.sequenceDiagram) {
14436 // backwards compatibility
14437 _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_8__["default"].setConf(Object.assign(config.sequence, config.sequenceDiagram));
14438 console.error('`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.');
14439 } else {
14440 _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_8__["default"].setConf(config.sequence);
14441 }
14442
14443 _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_8__["default"].draw(txt, id);
14444 break;
14445
14446 case 'gantt':
14447 config.gantt.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
14448 _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_11__["default"].setConf(config.gantt);
14449 _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_11__["default"].draw(txt, id);
14450 break;
14451
14452 case 'class':
14453 config.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
14454 _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_14__["default"].setConf(config.class);
14455 _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_14__["default"].draw(txt, id);
14456 break;
14457
14458 case 'info':
14459 config.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
14460 _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_20__["default"].setConf(config.class);
14461 _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_20__["default"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);
14462 break;
14463 }
14464
14465 d3__WEBPACK_IMPORTED_MODULE_0__["select"](`[id="${id}"]`).selectAll('foreignobject > *').attr('xmlns', 'http://www.w3.org/1999/xhtml');
14466 let url = '';
14467
14468 if (config.arrowMarkerAbsolute) {
14469 url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;
14470 url = url.replace(/\(/g, '\\(');
14471 url = url.replace(/\)/g, '\\)');
14472 } // Fix for when the base tag is used
14473
14474
14475 let svgCode = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#d' + id).node().innerHTML.replace(/url\(#arrowhead/g, 'url(' + url + '#arrowhead', 'g');
14476 svgCode = decodeEntities(svgCode);
14477
14478 if (typeof cb !== 'undefined') {
14479 cb(svgCode, _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_7__["default"].bindFunctions);
14480 cb(svgCode, _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_13__["default"].bindFunctions);
14481 } else {
14482 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].warn('CB = undefined!');
14483 }
14484
14485 const node = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#d' + id).node();
14486
14487 if (node !== null && typeof node.remove === 'function') {
14488 d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#d' + id).node().remove();
14489 }
14490
14491 return svgCode;
14492};
14493
14494const setConf = function (cnf) {
14495 // Top level initially mermaid, gflow, sequenceDiagram and gantt
14496 const lvl1Keys = Object.keys(cnf);
14497
14498 for (let i = 0; i < lvl1Keys.length; i++) {
14499 if (typeof cnf[lvl1Keys[i]] === 'object' && cnf[lvl1Keys[i]] != null) {
14500 const lvl2Keys = Object.keys(cnf[lvl1Keys[i]]);
14501
14502 for (let j = 0; j < lvl2Keys.length; j++) {
14503 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Setting conf ', lvl1Keys[i], '-', lvl2Keys[j]);
14504
14505 if (typeof config[lvl1Keys[i]] === 'undefined') {
14506 config[lvl1Keys[i]] = {};
14507 }
14508
14509 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Setting config: ' + lvl1Keys[i] + ' ' + lvl2Keys[j] + ' to ' + cnf[lvl1Keys[i]][lvl2Keys[j]]);
14510 config[lvl1Keys[i]][lvl2Keys[j]] = cnf[lvl1Keys[i]][lvl2Keys[j]];
14511 }
14512 } else {
14513 config[lvl1Keys[i]] = cnf[lvl1Keys[i]];
14514 }
14515 }
14516};
14517
14518function initialize(options) {
14519 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Initializing mermaidAPI ', _package_json__WEBPACK_IMPORTED_MODULE_2__.version); // Update default config with options supplied at initialization
14520
14521 if (typeof options === 'object') {
14522 setConf(options);
14523 }
14524
14525 Object(_logger__WEBPACK_IMPORTED_MODULE_3__["setLogLevel"])(config.logLevel);
14526}
14527
14528function getConfig() {
14529 return config;
14530}
14531
14532const mermaidAPI = {
14533 render,
14534 parse,
14535 initialize,
14536 getConfig
14537};
14538/* harmony default export */ __webpack_exports__["default"] = (mermaidAPI);
14539
14540/***/ }),
14541
14542/***/ "./src/themes sync recursive ^\\.\\/.*\\/index\\.scss$":
14543/*!***********************************************!*\
14544 !*** ./src/themes sync ^\.\/.*\/index\.scss$ ***!
14545 \***********************************************/
14546/*! no static exports found */
14547/***/ (function(module, exports, __webpack_require__) {
14548
14549var map = {
14550 "./dark/index.scss": "./src/themes/dark/index.scss",
14551 "./default/index.scss": "./src/themes/default/index.scss",
14552 "./forest/index.scss": "./src/themes/forest/index.scss",
14553 "./neutral/index.scss": "./src/themes/neutral/index.scss"
14554};
14555
14556
14557function webpackContext(req) {
14558 var id = webpackContextResolve(req);
14559 return __webpack_require__(id);
14560}
14561function webpackContextResolve(req) {
14562 var id = map[req];
14563 if(!(id + 1)) { // check for number or string
14564 var e = new Error("Cannot find module '" + req + "'");
14565 e.code = 'MODULE_NOT_FOUND';
14566 throw e;
14567 }
14568 return id;
14569}
14570webpackContext.keys = function webpackContextKeys() {
14571 return Object.keys(map);
14572};
14573webpackContext.resolve = webpackContextResolve;
14574module.exports = webpackContext;
14575webpackContext.id = "./src/themes sync recursive ^\\.\\/.*\\/index\\.scss$";
14576
14577/***/ }),
14578
14579/***/ "./src/themes/dark/index.scss":
14580/*!************************************!*\
14581 !*** ./src/themes/dark/index.scss ***!
14582 \************************************/
14583/*! no static exports found */
14584/***/ (function(module, exports, __webpack_require__) {
14585
14586// css-to-string-loader: transforms styles from css-loader to a string output
14587
14588// Get the styles
14589var styles = __webpack_require__(/*! !../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./index.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/dark/index.scss");
14590
14591if (typeof styles === 'string') {
14592 // Return an existing string
14593 module.exports = styles;
14594} else {
14595 // Call the custom toString method from css-loader module
14596 module.exports = styles.toString();
14597}
14598
14599/***/ }),
14600
14601/***/ "./src/themes/default/index.scss":
14602/*!***************************************!*\
14603 !*** ./src/themes/default/index.scss ***!
14604 \***************************************/
14605/*! no static exports found */
14606/***/ (function(module, exports, __webpack_require__) {
14607
14608// css-to-string-loader: transforms styles from css-loader to a string output
14609
14610// Get the styles
14611var styles = __webpack_require__(/*! !../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./index.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/default/index.scss");
14612
14613if (typeof styles === 'string') {
14614 // Return an existing string
14615 module.exports = styles;
14616} else {
14617 // Call the custom toString method from css-loader module
14618 module.exports = styles.toString();
14619}
14620
14621/***/ }),
14622
14623/***/ "./src/themes/forest/index.scss":
14624/*!**************************************!*\
14625 !*** ./src/themes/forest/index.scss ***!
14626 \**************************************/
14627/*! no static exports found */
14628/***/ (function(module, exports, __webpack_require__) {
14629
14630// css-to-string-loader: transforms styles from css-loader to a string output
14631
14632// Get the styles
14633var styles = __webpack_require__(/*! !../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./index.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/forest/index.scss");
14634
14635if (typeof styles === 'string') {
14636 // Return an existing string
14637 module.exports = styles;
14638} else {
14639 // Call the custom toString method from css-loader module
14640 module.exports = styles.toString();
14641}
14642
14643/***/ }),
14644
14645/***/ "./src/themes/neutral/index.scss":
14646/*!***************************************!*\
14647 !*** ./src/themes/neutral/index.scss ***!
14648 \***************************************/
14649/*! no static exports found */
14650/***/ (function(module, exports, __webpack_require__) {
14651
14652// css-to-string-loader: transforms styles from css-loader to a string output
14653
14654// Get the styles
14655var styles = __webpack_require__(/*! !../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/lib/loader.js!./index.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/lib/loader.js!./src/themes/neutral/index.scss");
14656
14657if (typeof styles === 'string') {
14658 // Return an existing string
14659 module.exports = styles;
14660} else {
14661 // Call the custom toString method from css-loader module
14662 module.exports = styles.toString();
14663}
14664
14665/***/ }),
14666
14667/***/ "./src/utils.js":
14668/*!**********************!*\
14669 !*** ./src/utils.js ***!
14670 \**********************/
14671/*! exports provided: detectType, isSubstringInArray, interpolateToCurve, default */
14672/***/ (function(module, __webpack_exports__, __webpack_require__) {
14673
14674"use strict";
14675__webpack_require__.r(__webpack_exports__);
14676/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detectType", function() { return detectType; });
14677/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSubstringInArray", function() { return isSubstringInArray; });
14678/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpolateToCurve", function() { return interpolateToCurve; });
14679/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3");
14680/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__);
14681/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./logger */ "./src/logger.js");
14682
14683
14684/**
14685 * @function detectType
14686 * Detects the type of the graph text.
14687 * ```mermaid
14688 * graph LR
14689 * a-->b
14690 * b-->c
14691 * c-->d
14692 * d-->e
14693 * e-->f
14694 * f-->g
14695 * g-->h
14696 * ```
14697 *
14698 * @param {string} text The text defining the graph
14699 * @returns {string} A graph definition key
14700 */
14701
14702const detectType = function (text) {
14703 text = text.replace(/^\s*%%.*\n/g, '\n');
14704 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('Detecting diagram type based on the text ' + text);
14705
14706 if (text.match(/^\s*sequenceDiagram/)) {
14707 return 'sequence';
14708 }
14709
14710 if (text.match(/^\s*gantt/)) {
14711 return 'gantt';
14712 }
14713
14714 if (text.match(/^\s*classDiagram/)) {
14715 return 'class';
14716 }
14717
14718 if (text.match(/^\s*gitGraph/)) {
14719 return 'git';
14720 }
14721
14722 if (text.match(/^\s*info/)) {
14723 return 'info';
14724 }
14725
14726 return 'flowchart';
14727};
14728/**
14729 * @function isSubstringInArray
14730 * Detects whether a substring in present in a given array
14731 * @param {string} str The substring to detect
14732 * @param {array} arr The array to search
14733 * @returns {number} the array index containing the substring or -1 if not present
14734 **/
14735
14736const isSubstringInArray = function (str, arr) {
14737 for (let i = 0; i < arr.length; i++) {
14738 if (arr[i].match(str)) return i;
14739 }
14740
14741 return -1;
14742};
14743const interpolateToCurve = (interpolate, defaultCurve) => {
14744 if (!interpolate) {
14745 return defaultCurve;
14746 }
14747
14748 const curveName = `curve${interpolate.charAt(0).toUpperCase() + interpolate.slice(1)}`;
14749 return d3__WEBPACK_IMPORTED_MODULE_0__[curveName] || defaultCurve;
14750};
14751/* harmony default export */ __webpack_exports__["default"] = ({
14752 detectType,
14753 isSubstringInArray,
14754 interpolateToCurve
14755});
14756
14757/***/ }),
14758
14759/***/ "d3":
14760/*!*********************!*\
14761 !*** external "d3" ***!
14762 \*********************/
14763/*! no static exports found */
14764/***/ (function(module, exports) {
14765
14766module.exports = require("d3");
14767
14768/***/ }),
14769
14770/***/ "dagre-d3-renderer":
14771/*!************************************!*\
14772 !*** external "dagre-d3-renderer" ***!
14773 \************************************/
14774/*! no static exports found */
14775/***/ (function(module, exports) {
14776
14777module.exports = require("dagre-d3-renderer");
14778
14779/***/ }),
14780
14781/***/ "dagre-d3-renderer/lib/label/add-html-label.js":
14782/*!****************************************************************!*\
14783 !*** external "dagre-d3-renderer/lib/label/add-html-label.js" ***!
14784 \****************************************************************/
14785/*! no static exports found */
14786/***/ (function(module, exports) {
14787
14788module.exports = require("dagre-d3-renderer/lib/label/add-html-label.js");
14789
14790/***/ }),
14791
14792/***/ "dagre-layout":
14793/*!*******************************!*\
14794 !*** external "dagre-layout" ***!
14795 \*******************************/
14796/*! no static exports found */
14797/***/ (function(module, exports) {
14798
14799module.exports = require("dagre-layout");
14800
14801/***/ }),
14802
14803/***/ "graphlibrary":
14804/*!*******************************!*\
14805 !*** external "graphlibrary" ***!
14806 \*******************************/
14807/*! no static exports found */
14808/***/ (function(module, exports) {
14809
14810module.exports = require("graphlibrary");
14811
14812/***/ }),
14813
14814/***/ "he":
14815/*!*********************!*\
14816 !*** external "he" ***!
14817 \*********************/
14818/*! no static exports found */
14819/***/ (function(module, exports) {
14820
14821module.exports = require("he");
14822
14823/***/ }),
14824
14825/***/ "lodash":
14826/*!*************************!*\
14827 !*** external "lodash" ***!
14828 \*************************/
14829/*! no static exports found */
14830/***/ (function(module, exports) {
14831
14832module.exports = require("lodash");
14833
14834/***/ }),
14835
14836/***/ "moment-mini":
14837/*!******************************!*\
14838 !*** external "moment-mini" ***!
14839 \******************************/
14840/*! no static exports found */
14841/***/ (function(module, exports) {
14842
14843module.exports = require("moment-mini");
14844
14845/***/ }),
14846
14847/***/ "scope-css":
14848/*!****************************!*\
14849 !*** external "scope-css" ***!
14850 \****************************/
14851/*! no static exports found */
14852/***/ (function(module, exports) {
14853
14854module.exports = require("scope-css");
14855
14856/***/ })
14857
14858/******/ })["default"];
14859});
14860//# sourceMappingURL=mermaid.core.js.map
\No newline at end of file