"use strict";
/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
(self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] = self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] || []).push([["vendors-node_modules_mermaid_dist_requirementDiagram-025ed9cd_js"],{

/***/ "../node_modules/mermaid/dist/requirementDiagram-025ed9cd.js":
/*!*******************************************************************!*\
  !*** ../node_modules/mermaid/dist/requirementDiagram-025ed9cd.js ***!
  \*******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   diagram: () => (/* binding */ diagram)\n/* harmony export */ });\n/* harmony import */ var _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./mermaid-04fb0060.js */ \"../node_modules/mermaid/dist/mermaid-04fb0060.js\");\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ \"../node_modules/d3/src/index.js\");\n/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dagre-d3-es/src/dagre/index.js */ \"../node_modules/dagre-d3-es/src/dagre/index.js\");\n/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! dagre-d3-es/src/graphlib/index.js */ \"../node_modules/dagre-d3-es/src/graphlib/index.js\");\n/* harmony import */ var ts_dedent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ts-dedent */ \"../node_modules/ts-dedent/esm/index.js\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! dayjs */ \"../node_modules/dayjs/dayjs.min.js\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @braintree/sanitize-url */ \"../node_modules/@braintree/sanitize-url/dist/index.js\");\n/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! dompurify */ \"../node_modules/dompurify/dist/purify.js\");\n/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(dompurify__WEBPACK_IMPORTED_MODULE_6__);\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar parser = function() {\n  var o = function(k, v, o2, l) {\n    for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)\n      ;\n    return o2;\n  }, $V0 = [1, 3], $V1 = [1, 4], $V2 = [1, 5], $V3 = [1, 6], $V4 = [5, 6, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 62, 63], $V5 = [1, 18], $V6 = [2, 7], $V7 = [1, 22], $V8 = [1, 23], $V9 = [1, 24], $Va = [1, 25], $Vb = [1, 26], $Vc = [1, 27], $Vd = [1, 20], $Ve = [1, 28], $Vf = [1, 29], $Vg = [62, 63], $Vh = [5, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 51, 53, 62, 63], $Vi = [1, 47], $Vj = [1, 48], $Vk = [1, 49], $Vl = [1, 50], $Vm = [1, 51], $Vn = [1, 52], $Vo = [1, 53], $Vp = [53, 54], $Vq = [1, 64], $Vr = [1, 60], $Vs = [1, 61], $Vt = [1, 62], $Vu = [1, 63], $Vv = [1, 65], $Vw = [1, 69], $Vx = [1, 70], $Vy = [1, 67], $Vz = [1, 68], $VA = [5, 8, 9, 11, 13, 31, 32, 33, 34, 35, 36, 44, 62, 63];\n  var parser2 = {\n    trace: function trace() {\n    },\n    yy: {},\n    symbols_: { \"error\": 2, \"start\": 3, \"directive\": 4, \"NEWLINE\": 5, \"RD\": 6, \"diagram\": 7, \"EOF\": 8, \"acc_title\": 9, \"acc_title_value\": 10, \"acc_descr\": 11, \"acc_descr_value\": 12, \"acc_descr_multiline_value\": 13, \"requirementDef\": 14, \"elementDef\": 15, \"relationshipDef\": 16, \"requirementType\": 17, \"requirementName\": 18, \"STRUCT_START\": 19, \"requirementBody\": 20, \"ID\": 21, \"COLONSEP\": 22, \"id\": 23, \"TEXT\": 24, \"text\": 25, \"RISK\": 26, \"riskLevel\": 27, \"VERIFYMTHD\": 28, \"verifyType\": 29, \"STRUCT_STOP\": 30, \"REQUIREMENT\": 31, \"FUNCTIONAL_REQUIREMENT\": 32, \"INTERFACE_REQUIREMENT\": 33, \"PERFORMANCE_REQUIREMENT\": 34, \"PHYSICAL_REQUIREMENT\": 35, \"DESIGN_CONSTRAINT\": 36, \"LOW_RISK\": 37, \"MED_RISK\": 38, \"HIGH_RISK\": 39, \"VERIFY_ANALYSIS\": 40, \"VERIFY_DEMONSTRATION\": 41, \"VERIFY_INSPECTION\": 42, \"VERIFY_TEST\": 43, \"ELEMENT\": 44, \"elementName\": 45, \"elementBody\": 46, \"TYPE\": 47, \"type\": 48, \"DOCREF\": 49, \"ref\": 50, \"END_ARROW_L\": 51, \"relationship\": 52, \"LINE\": 53, \"END_ARROW_R\": 54, \"CONTAINS\": 55, \"COPIES\": 56, \"DERIVES\": 57, \"SATISFIES\": 58, \"VERIFIES\": 59, \"REFINES\": 60, \"TRACES\": 61, \"unqString\": 62, \"qString\": 63, \"$accept\": 0, \"$end\": 1 },\n    terminals_: { 2: \"error\", 5: \"NEWLINE\", 6: \"RD\", 8: \"EOF\", 9: \"acc_title\", 10: \"acc_title_value\", 11: \"acc_descr\", 12: \"acc_descr_value\", 13: \"acc_descr_multiline_value\", 19: \"STRUCT_START\", 21: \"ID\", 22: \"COLONSEP\", 24: \"TEXT\", 26: \"RISK\", 28: \"VERIFYMTHD\", 30: \"STRUCT_STOP\", 31: \"REQUIREMENT\", 32: \"FUNCTIONAL_REQUIREMENT\", 33: \"INTERFACE_REQUIREMENT\", 34: \"PERFORMANCE_REQUIREMENT\", 35: \"PHYSICAL_REQUIREMENT\", 36: \"DESIGN_CONSTRAINT\", 37: \"LOW_RISK\", 38: \"MED_RISK\", 39: \"HIGH_RISK\", 40: \"VERIFY_ANALYSIS\", 41: \"VERIFY_DEMONSTRATION\", 42: \"VERIFY_INSPECTION\", 43: \"VERIFY_TEST\", 44: \"ELEMENT\", 47: \"TYPE\", 49: \"DOCREF\", 51: \"END_ARROW_L\", 53: \"LINE\", 54: \"END_ARROW_R\", 55: \"CONTAINS\", 56: \"COPIES\", 57: \"DERIVES\", 58: \"SATISFIES\", 59: \"VERIFIES\", 60: \"REFINES\", 61: \"TRACES\", 62: \"unqString\", 63: \"qString\" },\n    productions_: [0, [3, 3], [3, 2], [3, 4], [4, 2], [4, 2], [4, 1], [7, 0], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [14, 5], [20, 5], [20, 5], [20, 5], [20, 5], [20, 2], [20, 1], [17, 1], [17, 1], [17, 1], [17, 1], [17, 1], [17, 1], [27, 1], [27, 1], [27, 1], [29, 1], [29, 1], [29, 1], [29, 1], [15, 5], [46, 5], [46, 5], [46, 2], [46, 1], [16, 5], [16, 5], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [52, 1], [18, 1], [18, 1], [23, 1], [23, 1], [25, 1], [25, 1], [45, 1], [45, 1], [48, 1], [48, 1], [50, 1], [50, 1]],\n    performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {\n      var $0 = $$.length - 1;\n      switch (yystate) {\n        case 4:\n          this.$ = $$[$0].trim();\n          yy.setAccTitle(this.$);\n          break;\n        case 5:\n        case 6:\n          this.$ = $$[$0].trim();\n          yy.setAccDescription(this.$);\n          break;\n        case 7:\n          this.$ = [];\n          break;\n        case 13:\n          yy.addRequirement($$[$0 - 3], $$[$0 - 4]);\n          break;\n        case 14:\n          yy.setNewReqId($$[$0 - 2]);\n          break;\n        case 15:\n          yy.setNewReqText($$[$0 - 2]);\n          break;\n        case 16:\n          yy.setNewReqRisk($$[$0 - 2]);\n          break;\n        case 17:\n          yy.setNewReqVerifyMethod($$[$0 - 2]);\n          break;\n        case 20:\n          this.$ = yy.RequirementType.REQUIREMENT;\n          break;\n        case 21:\n          this.$ = yy.RequirementType.FUNCTIONAL_REQUIREMENT;\n          break;\n        case 22:\n          this.$ = yy.RequirementType.INTERFACE_REQUIREMENT;\n          break;\n        case 23:\n          this.$ = yy.RequirementType.PERFORMANCE_REQUIREMENT;\n          break;\n        case 24:\n          this.$ = yy.RequirementType.PHYSICAL_REQUIREMENT;\n          break;\n        case 25:\n          this.$ = yy.RequirementType.DESIGN_CONSTRAINT;\n          break;\n        case 26:\n          this.$ = yy.RiskLevel.LOW_RISK;\n          break;\n        case 27:\n          this.$ = yy.RiskLevel.MED_RISK;\n          break;\n        case 28:\n          this.$ = yy.RiskLevel.HIGH_RISK;\n          break;\n        case 29:\n          this.$ = yy.VerifyType.VERIFY_ANALYSIS;\n          break;\n        case 30:\n          this.$ = yy.VerifyType.VERIFY_DEMONSTRATION;\n          break;\n        case 31:\n          this.$ = yy.VerifyType.VERIFY_INSPECTION;\n          break;\n        case 32:\n          this.$ = yy.VerifyType.VERIFY_TEST;\n          break;\n        case 33:\n          yy.addElement($$[$0 - 3]);\n          break;\n        case 34:\n          yy.setNewElementType($$[$0 - 2]);\n          break;\n        case 35:\n          yy.setNewElementDocRef($$[$0 - 2]);\n          break;\n        case 38:\n          yy.addRelationship($$[$0 - 2], $$[$0], $$[$0 - 4]);\n          break;\n        case 39:\n          yy.addRelationship($$[$0 - 2], $$[$0 - 4], $$[$0]);\n          break;\n        case 40:\n          this.$ = yy.Relationships.CONTAINS;\n          break;\n        case 41:\n          this.$ = yy.Relationships.COPIES;\n          break;\n        case 42:\n          this.$ = yy.Relationships.DERIVES;\n          break;\n        case 43:\n          this.$ = yy.Relationships.SATISFIES;\n          break;\n        case 44:\n          this.$ = yy.Relationships.VERIFIES;\n          break;\n        case 45:\n          this.$ = yy.Relationships.REFINES;\n          break;\n        case 46:\n          this.$ = yy.Relationships.TRACES;\n          break;\n      }\n    },\n    table: [{ 3: 1, 4: 2, 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 1: [3] }, { 3: 8, 4: 2, 5: [1, 7], 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 5: [1, 9] }, { 10: [1, 10] }, { 12: [1, 11] }, o($V4, [2, 6]), { 3: 12, 4: 2, 6: $V0, 9: $V1, 11: $V2, 13: $V3 }, { 1: [2, 2] }, { 4: 17, 5: $V5, 7: 13, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, o($V4, [2, 4]), o($V4, [2, 5]), { 1: [2, 1] }, { 8: [1, 30] }, { 4: 17, 5: $V5, 7: 31, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 32, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 33, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 34, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 4: 17, 5: $V5, 7: 35, 8: $V6, 9: $V1, 11: $V2, 13: $V3, 14: 14, 15: 15, 16: 16, 17: 19, 23: 21, 31: $V7, 32: $V8, 33: $V9, 34: $Va, 35: $Vb, 36: $Vc, 44: $Vd, 62: $Ve, 63: $Vf }, { 18: 36, 62: [1, 37], 63: [1, 38] }, { 45: 39, 62: [1, 40], 63: [1, 41] }, { 51: [1, 42], 53: [1, 43] }, o($Vg, [2, 20]), o($Vg, [2, 21]), o($Vg, [2, 22]), o($Vg, [2, 23]), o($Vg, [2, 24]), o($Vg, [2, 25]), o($Vh, [2, 49]), o($Vh, [2, 50]), { 1: [2, 3] }, { 8: [2, 8] }, { 8: [2, 9] }, { 8: [2, 10] }, { 8: [2, 11] }, { 8: [2, 12] }, { 19: [1, 44] }, { 19: [2, 47] }, { 19: [2, 48] }, { 19: [1, 45] }, { 19: [2, 53] }, { 19: [2, 54] }, { 52: 46, 55: $Vi, 56: $Vj, 57: $Vk, 58: $Vl, 59: $Vm, 60: $Vn, 61: $Vo }, { 52: 54, 55: $Vi, 56: $Vj, 57: $Vk, 58: $Vl, 59: $Vm, 60: $Vn, 61: $Vo }, { 5: [1, 55] }, { 5: [1, 56] }, { 53: [1, 57] }, o($Vp, [2, 40]), o($Vp, [2, 41]), o($Vp, [2, 42]), o($Vp, [2, 43]), o($Vp, [2, 44]), o($Vp, [2, 45]), o($Vp, [2, 46]), { 54: [1, 58] }, { 5: $Vq, 20: 59, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vw, 30: $Vx, 46: 66, 47: $Vy, 49: $Vz }, { 23: 71, 62: $Ve, 63: $Vf }, { 23: 72, 62: $Ve, 63: $Vf }, o($VA, [2, 13]), { 22: [1, 73] }, { 22: [1, 74] }, { 22: [1, 75] }, { 22: [1, 76] }, { 5: $Vq, 20: 77, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, o($VA, [2, 19]), o($VA, [2, 33]), { 22: [1, 78] }, { 22: [1, 79] }, { 5: $Vw, 30: $Vx, 46: 80, 47: $Vy, 49: $Vz }, o($VA, [2, 37]), o($VA, [2, 38]), o($VA, [2, 39]), { 23: 81, 62: $Ve, 63: $Vf }, { 25: 82, 62: [1, 83], 63: [1, 84] }, { 27: 85, 37: [1, 86], 38: [1, 87], 39: [1, 88] }, { 29: 89, 40: [1, 90], 41: [1, 91], 42: [1, 92], 43: [1, 93] }, o($VA, [2, 18]), { 48: 94, 62: [1, 95], 63: [1, 96] }, { 50: 97, 62: [1, 98], 63: [1, 99] }, o($VA, [2, 36]), { 5: [1, 100] }, { 5: [1, 101] }, { 5: [2, 51] }, { 5: [2, 52] }, { 5: [1, 102] }, { 5: [2, 26] }, { 5: [2, 27] }, { 5: [2, 28] }, { 5: [1, 103] }, { 5: [2, 29] }, { 5: [2, 30] }, { 5: [2, 31] }, { 5: [2, 32] }, { 5: [1, 104] }, { 5: [2, 55] }, { 5: [2, 56] }, { 5: [1, 105] }, { 5: [2, 57] }, { 5: [2, 58] }, { 5: $Vq, 20: 106, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vq, 20: 107, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vq, 20: 108, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vq, 20: 109, 21: $Vr, 24: $Vs, 26: $Vt, 28: $Vu, 30: $Vv }, { 5: $Vw, 30: $Vx, 46: 110, 47: $Vy, 49: $Vz }, { 5: $Vw, 30: $Vx, 46: 111, 47: $Vy, 49: $Vz }, o($VA, [2, 14]), o($VA, [2, 15]), o($VA, [2, 16]), o($VA, [2, 17]), o($VA, [2, 34]), o($VA, [2, 35])],\n    defaultActions: { 8: [2, 2], 12: [2, 1], 30: [2, 3], 31: [2, 8], 32: [2, 9], 33: [2, 10], 34: [2, 11], 35: [2, 12], 37: [2, 47], 38: [2, 48], 40: [2, 53], 41: [2, 54], 83: [2, 51], 84: [2, 52], 86: [2, 26], 87: [2, 27], 88: [2, 28], 90: [2, 29], 91: [2, 30], 92: [2, 31], 93: [2, 32], 95: [2, 55], 96: [2, 56], 98: [2, 57], 99: [2, 58] },\n    parseError: function parseError(str, hash) {\n      if (hash.recoverable) {\n        this.trace(str);\n      } else {\n        var error = new Error(str);\n        error.hash = hash;\n        throw error;\n      }\n    },\n    parse: function parse(input) {\n      var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = \"\", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;\n      var args = lstack.slice.call(arguments, 1);\n      var lexer2 = Object.create(this.lexer);\n      var sharedState = { yy: {} };\n      for (var k in this.yy) {\n        if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n          sharedState.yy[k] = this.yy[k];\n        }\n      }\n      lexer2.setInput(input, sharedState.yy);\n      sharedState.yy.lexer = lexer2;\n      sharedState.yy.parser = this;\n      if (typeof lexer2.yylloc == \"undefined\") {\n        lexer2.yylloc = {};\n      }\n      var yyloc = lexer2.yylloc;\n      lstack.push(yyloc);\n      var ranges = lexer2.options && lexer2.options.ranges;\n      if (typeof sharedState.yy.parseError === \"function\") {\n        this.parseError = sharedState.yy.parseError;\n      } else {\n        this.parseError = Object.getPrototypeOf(this).parseError;\n      }\n      function lex() {\n        var token;\n        token = tstack.pop() || lexer2.lex() || EOF;\n        if (typeof token !== \"number\") {\n          if (token instanceof Array) {\n            tstack = token;\n            token = tstack.pop();\n          }\n          token = self.symbols_[token] || token;\n        }\n        return token;\n      }\n      var symbol, state, action, r, yyval = {}, p, len, newState, expected;\n      while (true) {\n        state = stack[stack.length - 1];\n        if (this.defaultActions[state]) {\n          action = this.defaultActions[state];\n        } else {\n          if (symbol === null || typeof symbol == \"undefined\") {\n            symbol = lex();\n          }\n          action = table[state] && table[state][symbol];\n        }\n        if (typeof action === \"undefined\" || !action.length || !action[0]) {\n          var errStr = \"\";\n          expected = [];\n          for (p in table[state]) {\n            if (this.terminals_[p] && p > TERROR) {\n              expected.push(\"'\" + this.terminals_[p] + \"'\");\n            }\n          }\n          if (lexer2.showPosition) {\n            errStr = \"Parse error on line \" + (yylineno + 1) + \":\\n\" + lexer2.showPosition() + \"\\nExpecting \" + expected.join(\", \") + \", got '\" + (this.terminals_[symbol] || symbol) + \"'\";\n          } else {\n            errStr = \"Parse error on line \" + (yylineno + 1) + \": Unexpected \" + (symbol == EOF ? \"end of input\" : \"'\" + (this.terminals_[symbol] || symbol) + \"'\");\n          }\n          this.parseError(errStr, {\n            text: lexer2.match,\n            token: this.terminals_[symbol] || symbol,\n            line: lexer2.yylineno,\n            loc: yyloc,\n            expected\n          });\n        }\n        if (action[0] instanceof Array && action.length > 1) {\n          throw new Error(\"Parse Error: multiple actions possible at state: \" + state + \", token: \" + symbol);\n        }\n        switch (action[0]) {\n          case 1:\n            stack.push(symbol);\n            vstack.push(lexer2.yytext);\n            lstack.push(lexer2.yylloc);\n            stack.push(action[1]);\n            symbol = null;\n            {\n              yyleng = lexer2.yyleng;\n              yytext = lexer2.yytext;\n              yylineno = lexer2.yylineno;\n              yyloc = lexer2.yylloc;\n            }\n            break;\n          case 2:\n            len = this.productions_[action[1]][1];\n            yyval.$ = vstack[vstack.length - len];\n            yyval._$ = {\n              first_line: lstack[lstack.length - (len || 1)].first_line,\n              last_line: lstack[lstack.length - 1].last_line,\n              first_column: lstack[lstack.length - (len || 1)].first_column,\n              last_column: lstack[lstack.length - 1].last_column\n            };\n            if (ranges) {\n              yyval._$.range = [\n                lstack[lstack.length - (len || 1)].range[0],\n                lstack[lstack.length - 1].range[1]\n              ];\n            }\n            r = this.performAction.apply(yyval, [\n              yytext,\n              yyleng,\n              yylineno,\n              sharedState.yy,\n              action[1],\n              vstack,\n              lstack\n            ].concat(args));\n            if (typeof r !== \"undefined\") {\n              return r;\n            }\n            if (len) {\n              stack = stack.slice(0, -1 * len * 2);\n              vstack = vstack.slice(0, -1 * len);\n              lstack = lstack.slice(0, -1 * len);\n            }\n            stack.push(this.productions_[action[1]][0]);\n            vstack.push(yyval.$);\n            lstack.push(yyval._$);\n            newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n            stack.push(newState);\n            break;\n          case 3:\n            return true;\n        }\n      }\n      return true;\n    }\n  };\n  var lexer = function() {\n    var lexer2 = {\n      EOF: 1,\n      parseError: function parseError(str, hash) {\n        if (this.yy.parser) {\n          this.yy.parser.parseError(str, hash);\n        } else {\n          throw new Error(str);\n        }\n      },\n      // resets the lexer, sets new input\n      setInput: function(input, yy) {\n        this.yy = yy || this.yy || {};\n        this._input = input;\n        this._more = this._backtrack = this.done = false;\n        this.yylineno = this.yyleng = 0;\n        this.yytext = this.matched = this.match = \"\";\n        this.conditionStack = [\"INITIAL\"];\n        this.yylloc = {\n          first_line: 1,\n          first_column: 0,\n          last_line: 1,\n          last_column: 0\n        };\n        if (this.options.ranges) {\n          this.yylloc.range = [0, 0];\n        }\n        this.offset = 0;\n        return this;\n      },\n      // consumes and returns one char from the input\n      input: function() {\n        var ch = this._input[0];\n        this.yytext += ch;\n        this.yyleng++;\n        this.offset++;\n        this.match += ch;\n        this.matched += ch;\n        var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n          this.yylineno++;\n          this.yylloc.last_line++;\n        } else {\n          this.yylloc.last_column++;\n        }\n        if (this.options.ranges) {\n          this.yylloc.range[1]++;\n        }\n        this._input = this._input.slice(1);\n        return ch;\n      },\n      // unshifts one char (or a string) into the input\n      unput: function(ch) {\n        var len = ch.length;\n        var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n        this._input = ch + this._input;\n        this.yytext = this.yytext.substr(0, this.yytext.length - len);\n        this.offset -= len;\n        var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n        this.match = this.match.substr(0, this.match.length - 1);\n        this.matched = this.matched.substr(0, this.matched.length - 1);\n        if (lines.length - 1) {\n          this.yylineno -= lines.length - 1;\n        }\n        var r = this.yylloc.range;\n        this.yylloc = {\n          first_line: this.yylloc.first_line,\n          last_line: this.yylineno + 1,\n          first_column: this.yylloc.first_column,\n          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\n        };\n        if (this.options.ranges) {\n          this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n        }\n        this.yyleng = this.yytext.length;\n        return this;\n      },\n      // When called from action, caches matched text and appends it on next action\n      more: function() {\n        this._more = true;\n        return this;\n      },\n      // 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.\n      reject: function() {\n        if (this.options.backtrack_lexer) {\n          this._backtrack = true;\n        } else {\n          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(), {\n            text: \"\",\n            token: null,\n            line: this.yylineno\n          });\n        }\n        return this;\n      },\n      // retain first n characters of the match\n      less: function(n) {\n        this.unput(this.match.slice(n));\n      },\n      // displays already matched input, i.e. for error messages\n      pastInput: function() {\n        var past = this.matched.substr(0, this.matched.length - this.match.length);\n        return (past.length > 20 ? \"...\" : \"\") + past.substr(-20).replace(/\\n/g, \"\");\n      },\n      // displays upcoming input, i.e. for error messages\n      upcomingInput: function() {\n        var next = this.match;\n        if (next.length < 20) {\n          next += this._input.substr(0, 20 - next.length);\n        }\n        return (next.substr(0, 20) + (next.length > 20 ? \"...\" : \"\")).replace(/\\n/g, \"\");\n      },\n      // displays the character position where the lexing error occurred, i.e. for error messages\n      showPosition: function() {\n        var pre = this.pastInput();\n        var c = new Array(pre.length + 1).join(\"-\");\n        return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n      },\n      // test the lexed token: return FALSE when not a match, otherwise return token\n      test_match: function(match, indexed_rule) {\n        var token, lines, backup;\n        if (this.options.backtrack_lexer) {\n          backup = {\n            yylineno: this.yylineno,\n            yylloc: {\n              first_line: this.yylloc.first_line,\n              last_line: this.last_line,\n              first_column: this.yylloc.first_column,\n              last_column: this.yylloc.last_column\n            },\n            yytext: this.yytext,\n            match: this.match,\n            matches: this.matches,\n            matched: this.matched,\n            yyleng: this.yyleng,\n            offset: this.offset,\n            _more: this._more,\n            _input: this._input,\n            yy: this.yy,\n            conditionStack: this.conditionStack.slice(0),\n            done: this.done\n          };\n          if (this.options.ranges) {\n            backup.yylloc.range = this.yylloc.range.slice(0);\n          }\n        }\n        lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n        if (lines) {\n          this.yylineno += lines.length;\n        }\n        this.yylloc = {\n          first_line: this.yylloc.last_line,\n          last_line: this.yylineno + 1,\n          first_column: this.yylloc.last_column,\n          last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length : this.yylloc.last_column + match[0].length\n        };\n        this.yytext += match[0];\n        this.match += match[0];\n        this.matches = match;\n        this.yyleng = this.yytext.length;\n        if (this.options.ranges) {\n          this.yylloc.range = [this.offset, this.offset += this.yyleng];\n        }\n        this._more = false;\n        this._backtrack = false;\n        this._input = this._input.slice(match[0].length);\n        this.matched += match[0];\n        token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n        if (this.done && this._input) {\n          this.done = false;\n        }\n        if (token) {\n          return token;\n        } else if (this._backtrack) {\n          for (var k in backup) {\n            this[k] = backup[k];\n          }\n          return false;\n        }\n        return false;\n      },\n      // return next match in input\n      next: function() {\n        if (this.done) {\n          return this.EOF;\n        }\n        if (!this._input) {\n          this.done = true;\n        }\n        var token, match, tempMatch, index;\n        if (!this._more) {\n          this.yytext = \"\";\n          this.match = \"\";\n        }\n        var rules = this._currentRules();\n        for (var i = 0; i < rules.length; i++) {\n          tempMatch = this._input.match(this.rules[rules[i]]);\n          if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n            match = tempMatch;\n            index = i;\n            if (this.options.backtrack_lexer) {\n              token = this.test_match(tempMatch, rules[i]);\n              if (token !== false) {\n                return token;\n              } else if (this._backtrack) {\n                match = false;\n                continue;\n              } else {\n                return false;\n              }\n            } else if (!this.options.flex) {\n              break;\n            }\n          }\n        }\n        if (match) {\n          token = this.test_match(match, rules[index]);\n          if (token !== false) {\n            return token;\n          }\n          return false;\n        }\n        if (this._input === \"\") {\n          return this.EOF;\n        } else {\n          return this.parseError(\"Lexical error on line \" + (this.yylineno + 1) + \". Unrecognized text.\\n\" + this.showPosition(), {\n            text: \"\",\n            token: null,\n            line: this.yylineno\n          });\n        }\n      },\n      // return next match that has a token\n      lex: function lex() {\n        var r = this.next();\n        if (r) {\n          return r;\n        } else {\n          return this.lex();\n        }\n      },\n      // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n      begin: function begin(condition) {\n        this.conditionStack.push(condition);\n      },\n      // pop the previously active lexer condition state off the condition stack\n      popState: function popState() {\n        var n = this.conditionStack.length - 1;\n        if (n > 0) {\n          return this.conditionStack.pop();\n        } else {\n          return this.conditionStack[0];\n        }\n      },\n      // produce the lexer rule set which is active for the currently active lexer condition state\n      _currentRules: function _currentRules() {\n        if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n          return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n        } else {\n          return this.conditions[\"INITIAL\"].rules;\n        }\n      },\n      // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\n      topState: function topState(n) {\n        n = this.conditionStack.length - 1 - Math.abs(n || 0);\n        if (n >= 0) {\n          return this.conditionStack[n];\n        } else {\n          return \"INITIAL\";\n        }\n      },\n      // alias for begin(condition)\n      pushState: function pushState(condition) {\n        this.begin(condition);\n      },\n      // return the number of states currently on the stack\n      stateStackSize: function stateStackSize() {\n        return this.conditionStack.length;\n      },\n      options: { \"case-insensitive\": true },\n      performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {\n        switch ($avoiding_name_collisions) {\n          case 0:\n            return \"title\";\n          case 1:\n            this.begin(\"acc_title\");\n            return 9;\n          case 2:\n            this.popState();\n            return \"acc_title_value\";\n          case 3:\n            this.begin(\"acc_descr\");\n            return 11;\n          case 4:\n            this.popState();\n            return \"acc_descr_value\";\n          case 5:\n            this.begin(\"acc_descr_multiline\");\n            break;\n          case 6:\n            this.popState();\n            break;\n          case 7:\n            return \"acc_descr_multiline_value\";\n          case 8:\n            return 5;\n          case 9:\n            break;\n          case 10:\n            break;\n          case 11:\n            break;\n          case 12:\n            return 8;\n          case 13:\n            return 6;\n          case 14:\n            return 19;\n          case 15:\n            return 30;\n          case 16:\n            return 22;\n          case 17:\n            return 21;\n          case 18:\n            return 24;\n          case 19:\n            return 26;\n          case 20:\n            return 28;\n          case 21:\n            return 31;\n          case 22:\n            return 32;\n          case 23:\n            return 33;\n          case 24:\n            return 34;\n          case 25:\n            return 35;\n          case 26:\n            return 36;\n          case 27:\n            return 37;\n          case 28:\n            return 38;\n          case 29:\n            return 39;\n          case 30:\n            return 40;\n          case 31:\n            return 41;\n          case 32:\n            return 42;\n          case 33:\n            return 43;\n          case 34:\n            return 44;\n          case 35:\n            return 55;\n          case 36:\n            return 56;\n          case 37:\n            return 57;\n          case 38:\n            return 58;\n          case 39:\n            return 59;\n          case 40:\n            return 60;\n          case 41:\n            return 61;\n          case 42:\n            return 47;\n          case 43:\n            return 49;\n          case 44:\n            return 51;\n          case 45:\n            return 54;\n          case 46:\n            return 53;\n          case 47:\n            this.begin(\"string\");\n            break;\n          case 48:\n            this.popState();\n            break;\n          case 49:\n            return \"qString\";\n          case 50:\n            yy_.yytext = yy_.yytext.trim();\n            return 62;\n        }\n      },\n      rules: [/^(?:title\\s[^#\\n;]+)/i, /^(?:accTitle\\s*:\\s*)/i, /^(?:(?!\\n||)*[^\\n]*)/i, /^(?:accDescr\\s*:\\s*)/i, /^(?:(?!\\n||)*[^\\n]*)/i, /^(?:accDescr\\s*\\{\\s*)/i, /^(?:[\\}])/i, /^(?:[^\\}]*)/i, /^(?:(\\r?\\n)+)/i, /^(?:\\s+)/i, /^(?:#[^\\n]*)/i, /^(?:%[^\\n]*)/i, /^(?:$)/i, /^(?:requirementDiagram\\b)/i, /^(?:\\{)/i, /^(?:\\})/i, /^(?::)/i, /^(?:id\\b)/i, /^(?:text\\b)/i, /^(?:risk\\b)/i, /^(?:verifyMethod\\b)/i, /^(?:requirement\\b)/i, /^(?:functionalRequirement\\b)/i, /^(?:interfaceRequirement\\b)/i, /^(?:performanceRequirement\\b)/i, /^(?:physicalRequirement\\b)/i, /^(?:designConstraint\\b)/i, /^(?:low\\b)/i, /^(?:medium\\b)/i, /^(?:high\\b)/i, /^(?:analysis\\b)/i, /^(?:demonstration\\b)/i, /^(?:inspection\\b)/i, /^(?:test\\b)/i, /^(?:element\\b)/i, /^(?:contains\\b)/i, /^(?:copies\\b)/i, /^(?:derives\\b)/i, /^(?:satisfies\\b)/i, /^(?:verifies\\b)/i, /^(?:refines\\b)/i, /^(?:traces\\b)/i, /^(?:type\\b)/i, /^(?:docref\\b)/i, /^(?:<-)/i, /^(?:->)/i, /^(?:-)/i, /^(?:[\"])/i, /^(?:[\"])/i, /^(?:[^\"]*)/i, /^(?:[\\w][^\\r\\n\\{\\<\\>\\-\\=]*)/i],\n      conditions: { \"acc_descr_multiline\": { \"rules\": [6, 7], \"inclusive\": false }, \"acc_descr\": { \"rules\": [4], \"inclusive\": false }, \"acc_title\": { \"rules\": [2], \"inclusive\": false }, \"unqString\": { \"rules\": [], \"inclusive\": false }, \"token\": { \"rules\": [], \"inclusive\": false }, \"string\": { \"rules\": [48, 49], \"inclusive\": false }, \"INITIAL\": { \"rules\": [0, 1, 3, 5, 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, 50], \"inclusive\": true } }\n    };\n    return lexer2;\n  }();\n  parser2.lexer = lexer;\n  function Parser() {\n    this.yy = {};\n  }\n  Parser.prototype = parser2;\n  parser2.Parser = Parser;\n  return new Parser();\n}();\nparser.parser = parser;\nconst parser$1 = parser;\nlet relations = [];\nlet latestRequirement = {};\nlet requirements = {};\nlet latestElement = {};\nlet elements = {};\nconst RequirementType = {\n  REQUIREMENT: \"Requirement\",\n  FUNCTIONAL_REQUIREMENT: \"Functional Requirement\",\n  INTERFACE_REQUIREMENT: \"Interface Requirement\",\n  PERFORMANCE_REQUIREMENT: \"Performance Requirement\",\n  PHYSICAL_REQUIREMENT: \"Physical Requirement\",\n  DESIGN_CONSTRAINT: \"Design Constraint\"\n};\nconst RiskLevel = {\n  LOW_RISK: \"Low\",\n  MED_RISK: \"Medium\",\n  HIGH_RISK: \"High\"\n};\nconst VerifyType = {\n  VERIFY_ANALYSIS: \"Analysis\",\n  VERIFY_DEMONSTRATION: \"Demonstration\",\n  VERIFY_INSPECTION: \"Inspection\",\n  VERIFY_TEST: \"Test\"\n};\nconst Relationships = {\n  CONTAINS: \"contains\",\n  COPIES: \"copies\",\n  DERIVES: \"derives\",\n  SATISFIES: \"satisfies\",\n  VERIFIES: \"verifies\",\n  REFINES: \"refines\",\n  TRACES: \"traces\"\n};\nconst addRequirement = (name, type) => {\n  if (requirements[name] === void 0) {\n    requirements[name] = {\n      name,\n      type,\n      id: latestRequirement.id,\n      text: latestRequirement.text,\n      risk: latestRequirement.risk,\n      verifyMethod: latestRequirement.verifyMethod\n    };\n  }\n  latestRequirement = {};\n  return requirements[name];\n};\nconst getRequirements = () => requirements;\nconst setNewReqId = (id) => {\n  if (latestRequirement !== void 0) {\n    latestRequirement.id = id;\n  }\n};\nconst setNewReqText = (text) => {\n  if (latestRequirement !== void 0) {\n    latestRequirement.text = text;\n  }\n};\nconst setNewReqRisk = (risk) => {\n  if (latestRequirement !== void 0) {\n    latestRequirement.risk = risk;\n  }\n};\nconst setNewReqVerifyMethod = (verifyMethod) => {\n  if (latestRequirement !== void 0) {\n    latestRequirement.verifyMethod = verifyMethod;\n  }\n};\nconst addElement = (name) => {\n  if (elements[name] === void 0) {\n    elements[name] = {\n      name,\n      type: latestElement.type,\n      docRef: latestElement.docRef\n    };\n    _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.l.info(\"Added new requirement: \", name);\n  }\n  latestElement = {};\n  return elements[name];\n};\nconst getElements = () => elements;\nconst setNewElementType = (type) => {\n  if (latestElement !== void 0) {\n    latestElement.type = type;\n  }\n};\nconst setNewElementDocRef = (docRef) => {\n  if (latestElement !== void 0) {\n    latestElement.docRef = docRef;\n  }\n};\nconst addRelationship = (type, src, dst) => {\n  relations.push({\n    type,\n    src,\n    dst\n  });\n};\nconst getRelationships = () => relations;\nconst clear = () => {\n  relations = [];\n  latestRequirement = {};\n  requirements = {};\n  latestElement = {};\n  elements = {};\n  (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.t)();\n};\nconst db = {\n  RequirementType,\n  RiskLevel,\n  VerifyType,\n  Relationships,\n  getConfig: () => (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.c)().req,\n  addRequirement,\n  getRequirements,\n  setNewReqId,\n  setNewReqText,\n  setNewReqRisk,\n  setNewReqVerifyMethod,\n  setAccTitle: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.s,\n  getAccTitle: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.g,\n  setAccDescription: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.b,\n  getAccDescription: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.a,\n  addElement,\n  getElements,\n  setNewElementType,\n  setNewElementDocRef,\n  addRelationship,\n  getRelationships,\n  clear\n};\nconst getStyles = (options) => `\n\n  marker {\n    fill: ${options.relationColor};\n    stroke: ${options.relationColor};\n  }\n\n  marker.cross {\n    stroke: ${options.lineColor};\n  }\n\n  svg {\n    font-family: ${options.fontFamily};\n    font-size: ${options.fontSize};\n  }\n\n  .reqBox {\n    fill: ${options.requirementBackground};\n    fill-opacity: 1.0;\n    stroke: ${options.requirementBorderColor};\n    stroke-width: ${options.requirementBorderSize};\n  }\n  \n  .reqTitle, .reqLabel{\n    fill:  ${options.requirementTextColor};\n  }\n  .reqLabelBox {\n    fill: ${options.relationLabelBackground};\n    fill-opacity: 1.0;\n  }\n\n  .req-title-line {\n    stroke: ${options.requirementBorderColor};\n    stroke-width: ${options.requirementBorderSize};\n  }\n  .relationshipLine {\n    stroke: ${options.relationColor};\n    stroke-width: 1;\n  }\n  .relationshipLabel {\n    fill: ${options.relationLabelColor};\n  }\n\n`;\nconst styles = getStyles;\nconst ReqMarkers = {\n  CONTAINS: \"contains\",\n  ARROW: \"arrow\"\n};\nconst insertLineEndings = (parentNode, conf2) => {\n  let containsNode = parentNode.append(\"defs\").append(\"marker\").attr(\"id\", ReqMarkers.CONTAINS + \"_line_ending\").attr(\"refX\", 0).attr(\"refY\", conf2.line_height / 2).attr(\"markerWidth\", conf2.line_height).attr(\"markerHeight\", conf2.line_height).attr(\"orient\", \"auto\").append(\"g\");\n  containsNode.append(\"circle\").attr(\"cx\", conf2.line_height / 2).attr(\"cy\", conf2.line_height / 2).attr(\"r\", conf2.line_height / 2).attr(\"fill\", \"none\");\n  containsNode.append(\"line\").attr(\"x1\", 0).attr(\"x2\", conf2.line_height).attr(\"y1\", conf2.line_height / 2).attr(\"y2\", conf2.line_height / 2).attr(\"stroke-width\", 1);\n  containsNode.append(\"line\").attr(\"y1\", 0).attr(\"y2\", conf2.line_height).attr(\"x1\", conf2.line_height / 2).attr(\"x2\", conf2.line_height / 2).attr(\"stroke-width\", 1);\n  parentNode.append(\"defs\").append(\"marker\").attr(\"id\", ReqMarkers.ARROW + \"_line_ending\").attr(\"refX\", conf2.line_height).attr(\"refY\", 0.5 * conf2.line_height).attr(\"markerWidth\", conf2.line_height).attr(\"markerHeight\", conf2.line_height).attr(\"orient\", \"auto\").append(\"path\").attr(\n    \"d\",\n    `M0,0\n      L${conf2.line_height},${conf2.line_height / 2}\n      M${conf2.line_height},${conf2.line_height / 2}\n      L0,${conf2.line_height}`\n  ).attr(\"stroke-width\", 1);\n};\nconst markers = {\n  ReqMarkers,\n  insertLineEndings\n};\nlet conf = {};\nlet relCnt = 0;\nconst newRectNode = (parentNode, id) => {\n  return parentNode.insert(\"rect\", \"#\" + id).attr(\"class\", \"req reqBox\").attr(\"x\", 0).attr(\"y\", 0).attr(\"width\", conf.rect_min_width + \"px\").attr(\"height\", conf.rect_min_height + \"px\");\n};\nconst newTitleNode = (parentNode, id, txts) => {\n  let x = conf.rect_min_width / 2;\n  let title = parentNode.append(\"text\").attr(\"class\", \"req reqLabel reqTitle\").attr(\"id\", id).attr(\"x\", x).attr(\"y\", conf.rect_padding).attr(\"dominant-baseline\", \"hanging\");\n  let i = 0;\n  txts.forEach((textStr) => {\n    if (i == 0) {\n      title.append(\"tspan\").attr(\"text-anchor\", \"middle\").attr(\"x\", conf.rect_min_width / 2).attr(\"dy\", 0).text(textStr);\n    } else {\n      title.append(\"tspan\").attr(\"text-anchor\", \"middle\").attr(\"x\", conf.rect_min_width / 2).attr(\"dy\", conf.line_height * 0.75).text(textStr);\n    }\n    i++;\n  });\n  let yPadding = 1.5 * conf.rect_padding;\n  let linePadding = i * conf.line_height * 0.75;\n  let totalY = yPadding + linePadding;\n  parentNode.append(\"line\").attr(\"class\", \"req-title-line\").attr(\"x1\", \"0\").attr(\"x2\", conf.rect_min_width).attr(\"y1\", totalY).attr(\"y2\", totalY);\n  return {\n    titleNode: title,\n    y: totalY\n  };\n};\nconst newBodyNode = (parentNode, id, txts, yStart) => {\n  let body = parentNode.append(\"text\").attr(\"class\", \"req reqLabel\").attr(\"id\", id).attr(\"x\", conf.rect_padding).attr(\"y\", yStart).attr(\"dominant-baseline\", \"hanging\");\n  let currentRow = 0;\n  const charLimit = 30;\n  let wrappedTxts = [];\n  txts.forEach((textStr) => {\n    let currentTextLen = textStr.length;\n    while (currentTextLen > charLimit && currentRow < 3) {\n      let firstPart = textStr.substring(0, charLimit);\n      textStr = textStr.substring(charLimit, textStr.length);\n      currentTextLen = textStr.length;\n      wrappedTxts[wrappedTxts.length] = firstPart;\n      currentRow++;\n    }\n    if (currentRow == 3) {\n      let lastStr = wrappedTxts[wrappedTxts.length - 1];\n      wrappedTxts[wrappedTxts.length - 1] = lastStr.substring(0, lastStr.length - 4) + \"...\";\n    } else {\n      wrappedTxts[wrappedTxts.length] = textStr;\n    }\n    currentRow = 0;\n  });\n  wrappedTxts.forEach((textStr) => {\n    body.append(\"tspan\").attr(\"x\", conf.rect_padding).attr(\"dy\", conf.line_height).text(textStr);\n  });\n  return body;\n};\nconst addEdgeLabel = (parentNode, svgPath, conf2, txt) => {\n  const len = svgPath.node().getTotalLength();\n  const labelPoint = svgPath.node().getPointAtLength(len * 0.5);\n  const labelId = \"rel\" + relCnt;\n  relCnt++;\n  const labelNode = parentNode.append(\"text\").attr(\"class\", \"req relationshipLabel\").attr(\"id\", labelId).attr(\"x\", labelPoint.x).attr(\"y\", labelPoint.y).attr(\"text-anchor\", \"middle\").attr(\"dominant-baseline\", \"middle\").text(txt);\n  const labelBBox = labelNode.node().getBBox();\n  parentNode.insert(\"rect\", \"#\" + labelId).attr(\"class\", \"req reqLabelBox\").attr(\"x\", labelPoint.x - labelBBox.width / 2).attr(\"y\", labelPoint.y - labelBBox.height / 2).attr(\"width\", labelBBox.width).attr(\"height\", labelBBox.height).attr(\"fill\", \"white\").attr(\"fill-opacity\", \"85%\");\n};\nconst drawRelationshipFromLayout = function(svg, rel, g, insert, diagObj) {\n  const edge = g.edge(elementString(rel.src), elementString(rel.dst));\n  const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_0__.line)().x(function(d) {\n    return d.x;\n  }).y(function(d) {\n    return d.y;\n  });\n  const svgPath = svg.insert(\"path\", \"#\" + insert).attr(\"class\", \"er relationshipLine\").attr(\"d\", lineFunction(edge.points)).attr(\"fill\", \"none\");\n  if (rel.type == diagObj.db.Relationships.CONTAINS) {\n    svgPath.attr(\n      \"marker-start\",\n      \"url(\" + _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.e.getUrl(conf.arrowMarkerAbsolute) + \"#\" + rel.type + \"_line_ending)\"\n    );\n  } else {\n    svgPath.attr(\"stroke-dasharray\", \"10,7\");\n    svgPath.attr(\n      \"marker-end\",\n      \"url(\" + _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.e.getUrl(conf.arrowMarkerAbsolute) + \"#\" + markers.ReqMarkers.ARROW + \"_line_ending)\"\n    );\n  }\n  addEdgeLabel(svg, svgPath, conf, `<<${rel.type}>>`);\n  return;\n};\nconst drawReqs = (reqs, graph, svgNode) => {\n  Object.keys(reqs).forEach((reqName) => {\n    let req = reqs[reqName];\n    reqName = elementString(reqName);\n    _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.l.info(\"Added new requirement: \", reqName);\n    const groupNode = svgNode.append(\"g\").attr(\"id\", reqName);\n    const textId = \"req-\" + reqName;\n    const rectNode = newRectNode(groupNode, textId);\n    let titleNodeInfo = newTitleNode(groupNode, reqName + \"_title\", [\n      `<<${req.type}>>`,\n      `${req.name}`\n    ]);\n    newBodyNode(\n      groupNode,\n      reqName + \"_body\",\n      [\n        `Id: ${req.id}`,\n        `Text: ${req.text}`,\n        `Risk: ${req.risk}`,\n        `Verification: ${req.verifyMethod}`\n      ],\n      titleNodeInfo.y\n    );\n    const rectBBox = rectNode.node().getBBox();\n    graph.setNode(reqName, {\n      width: rectBBox.width,\n      height: rectBBox.height,\n      shape: \"rect\",\n      id: reqName\n    });\n  });\n};\nconst drawElements = (els, graph, svgNode) => {\n  Object.keys(els).forEach((elName) => {\n    let el = els[elName];\n    const id = elementString(elName);\n    const groupNode = svgNode.append(\"g\").attr(\"id\", id);\n    const textId = \"element-\" + id;\n    const rectNode = newRectNode(groupNode, textId);\n    let titleNodeInfo = newTitleNode(groupNode, textId + \"_title\", [`<<Element>>`, `${elName}`]);\n    newBodyNode(\n      groupNode,\n      textId + \"_body\",\n      [`Type: ${el.type || \"Not Specified\"}`, `Doc Ref: ${el.docRef || \"None\"}`],\n      titleNodeInfo.y\n    );\n    const rectBBox = rectNode.node().getBBox();\n    graph.setNode(id, {\n      width: rectBBox.width,\n      height: rectBBox.height,\n      shape: \"rect\",\n      id\n    });\n  });\n};\nconst addRelationships = (relationships, g) => {\n  relationships.forEach(function(r) {\n    let src = elementString(r.src);\n    let dst = elementString(r.dst);\n    g.setEdge(src, dst, { relationship: r });\n  });\n  return relationships;\n};\nconst adjustEntities = function(svgNode, graph) {\n  graph.nodes().forEach(function(v) {\n    if (v !== void 0 && graph.node(v) !== void 0) {\n      svgNode.select(\"#\" + v);\n      svgNode.select(\"#\" + v).attr(\n        \"transform\",\n        \"translate(\" + (graph.node(v).x - graph.node(v).width / 2) + \",\" + (graph.node(v).y - graph.node(v).height / 2) + \" )\"\n      );\n    }\n  });\n  return;\n};\nconst elementString = (str) => {\n  return str.replace(/\\s/g, \"\").replace(/\\./g, \"_\");\n};\nconst draw = (text, id, _version, diagObj) => {\n  conf = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.c)().requirement;\n  const securityLevel = conf.securityLevel;\n  let sandboxElement;\n  if (securityLevel === \"sandbox\") {\n    sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__.select)(\"#i\" + id);\n  }\n  const root = securityLevel === \"sandbox\" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__.select)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__.select)(\"body\");\n  const svg = root.select(`[id='${id}']`);\n  markers.insertLineEndings(svg, conf);\n  const g = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__.Graph({\n    multigraph: false,\n    compound: false,\n    directed: true\n  }).setGraph({\n    rankdir: conf.layoutDirection,\n    marginx: 20,\n    marginy: 20,\n    nodesep: 100,\n    edgesep: 100,\n    ranksep: 100\n  }).setDefaultEdgeLabel(function() {\n    return {};\n  });\n  let requirements2 = diagObj.db.getRequirements();\n  let elements2 = diagObj.db.getElements();\n  let relationships = diagObj.db.getRelationships();\n  drawReqs(requirements2, g, svg);\n  drawElements(elements2, g, svg);\n  addRelationships(relationships, g);\n  (0,dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_1__.layout)(g);\n  adjustEntities(svg, g);\n  relationships.forEach(function(rel) {\n    drawRelationshipFromLayout(svg, rel, g, id, diagObj);\n  });\n  const padding = conf.rect_padding;\n  const svgBounds = svg.node().getBBox();\n  const width = svgBounds.width + padding * 2;\n  const height = svgBounds.height + padding * 2;\n  (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_7__.i)(svg, height, width, conf.useMaxWidth);\n  svg.attr(\"viewBox\", `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`);\n};\nconst renderer = {\n  draw\n};\nconst diagram = {\n  parser: parser$1,\n  db,\n  renderer,\n  styles\n};\n\n\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/mermaid/dist/requirementDiagram-025ed9cd.js?");

/***/ })

}]);