"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_chunks_mermaid_core_sequenceDiagram-WL72ISMW_mjs"],{

/***/ "../node_modules/mermaid/dist/chunks/mermaid.core/chunk-QZHKN3VN.mjs":
/*!***************************************************************************!*\
  !*** ../node_modules/mermaid/dist/chunks/mermaid.core/chunk-QZHKN3VN.mjs ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   ImperativeState: () => (/* binding */ ImperativeState)\n/* harmony export */ });\n/* harmony import */ var _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chunk-AGHRB4JF.mjs */ \"../node_modules/mermaid/dist/chunks/mermaid.core/chunk-AGHRB4JF.mjs\");\n\n\n// src/utils/imperativeState.ts\nvar ImperativeState = class {\n  /**\n   * @param init - Function that creates the default state.\n   */\n  constructor(init) {\n    this.init = init;\n    this.records = this.init();\n  }\n  static {\n    (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_0__.__name)(this, \"ImperativeState\");\n  }\n  reset() {\n    this.records = this.init();\n  }\n};\n\n\n\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/mermaid/dist/chunks/mermaid.core/chunk-QZHKN3VN.mjs?");

/***/ }),

/***/ "../node_modules/mermaid/dist/chunks/mermaid.core/chunk-TZMSLE5B.mjs":
/*!***************************************************************************!*\
  !*** ../node_modules/mermaid/dist/chunks/mermaid.core/chunk-TZMSLE5B.mjs ***!
  \***************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   drawBackgroundRect: () => (/* binding */ drawBackgroundRect),\n/* harmony export */   drawEmbeddedImage: () => (/* binding */ drawEmbeddedImage),\n/* harmony export */   drawImage: () => (/* binding */ drawImage),\n/* harmony export */   drawRect: () => (/* binding */ drawRect),\n/* harmony export */   drawText: () => (/* binding */ drawText),\n/* harmony export */   getNoteRect: () => (/* binding */ getNoteRect),\n/* harmony export */   getTextObj: () => (/* binding */ getTextObj)\n/* harmony export */ });\n/* harmony import */ var _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chunk-ABZYJK2D.mjs */ \"../node_modules/mermaid/dist/chunks/mermaid.core/chunk-ABZYJK2D.mjs\");\n/* harmony import */ var _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chunk-AGHRB4JF.mjs */ \"../node_modules/mermaid/dist/chunks/mermaid.core/chunk-AGHRB4JF.mjs\");\n/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @braintree/sanitize-url */ \"../node_modules/@braintree/sanitize-url/dist/index.js\");\n\n\n\n// src/diagrams/common/svgDrawCommon.ts\n\nvar drawRect = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_1__.__name)((element, rectData) => {\n  const rectElement = element.append(\"rect\");\n  rectElement.attr(\"x\", rectData.x);\n  rectElement.attr(\"y\", rectData.y);\n  rectElement.attr(\"fill\", rectData.fill);\n  rectElement.attr(\"stroke\", rectData.stroke);\n  rectElement.attr(\"width\", rectData.width);\n  rectElement.attr(\"height\", rectData.height);\n  if (rectData.name) {\n    rectElement.attr(\"name\", rectData.name);\n  }\n  if (rectData.rx) {\n    rectElement.attr(\"rx\", rectData.rx);\n  }\n  if (rectData.ry) {\n    rectElement.attr(\"ry\", rectData.ry);\n  }\n  if (rectData.attrs !== void 0) {\n    for (const attrKey in rectData.attrs) {\n      rectElement.attr(attrKey, rectData.attrs[attrKey]);\n    }\n  }\n  if (rectData.class) {\n    rectElement.attr(\"class\", rectData.class);\n  }\n  return rectElement;\n}, \"drawRect\");\nvar drawBackgroundRect = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_1__.__name)((element, bounds) => {\n  const rectData = {\n    x: bounds.startx,\n    y: bounds.starty,\n    width: bounds.stopx - bounds.startx,\n    height: bounds.stopy - bounds.starty,\n    fill: bounds.fill,\n    stroke: bounds.stroke,\n    class: \"rect\"\n  };\n  const rectElement = drawRect(element, rectData);\n  rectElement.lower();\n}, \"drawBackgroundRect\");\nvar drawText = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_1__.__name)((element, textData) => {\n  const nText = textData.text.replace(_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_0__.lineBreakRegex, \" \");\n  const textElem = element.append(\"text\");\n  textElem.attr(\"x\", textData.x);\n  textElem.attr(\"y\", textData.y);\n  textElem.attr(\"class\", \"legend\");\n  textElem.style(\"text-anchor\", textData.anchor);\n  if (textData.class) {\n    textElem.attr(\"class\", textData.class);\n  }\n  const tspan = textElem.append(\"tspan\");\n  tspan.attr(\"x\", textData.x + textData.textMargin * 2);\n  tspan.text(nText);\n  return textElem;\n}, \"drawText\");\nvar drawImage = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_1__.__name)((elem, x, y, link) => {\n  const imageElement = elem.append(\"image\");\n  imageElement.attr(\"x\", x);\n  imageElement.attr(\"y\", y);\n  const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2__.sanitizeUrl)(link);\n  imageElement.attr(\"xlink:href\", sanitizedLink);\n}, \"drawImage\");\nvar drawEmbeddedImage = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_1__.__name)((element, x, y, link) => {\n  const imageElement = element.append(\"use\");\n  imageElement.attr(\"x\", x);\n  imageElement.attr(\"y\", y);\n  const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2__.sanitizeUrl)(link);\n  imageElement.attr(\"xlink:href\", `#${sanitizedLink}`);\n}, \"drawEmbeddedImage\");\nvar getNoteRect = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_1__.__name)(() => {\n  const noteRectData = {\n    x: 0,\n    y: 0,\n    width: 100,\n    height: 100,\n    fill: \"#EDF2AE\",\n    stroke: \"#666\",\n    anchor: \"start\",\n    rx: 0,\n    ry: 0\n  };\n  return noteRectData;\n}, \"getNoteRect\");\nvar getTextObj = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_1__.__name)(() => {\n  const testObject = {\n    x: 0,\n    y: 0,\n    width: 100,\n    height: 100,\n    \"text-anchor\": \"start\",\n    style: \"#666\",\n    textMargin: 0,\n    rx: 0,\n    ry: 0,\n    tspan: true\n  };\n  return testObject;\n}, \"getTextObj\");\n\n\n\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/mermaid/dist/chunks/mermaid.core/chunk-TZMSLE5B.mjs?");

/***/ }),

/***/ "../node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WL72ISMW.mjs":
/*!*************************************************************************************!*\
  !*** ../node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WL72ISMW.mjs ***!
  \*************************************************************************************/
/***/ ((__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 _chunk_TZMSLE5B_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chunk-TZMSLE5B.mjs */ \"../node_modules/mermaid/dist/chunks/mermaid.core/chunk-TZMSLE5B.mjs\");\n/* harmony import */ var _chunk_MI3HLSF2_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chunk-MI3HLSF2.mjs */ \"../node_modules/mermaid/dist/chunks/mermaid.core/chunk-MI3HLSF2.mjs\");\n/* harmony import */ var _chunk_QZHKN3VN_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./chunk-QZHKN3VN.mjs */ \"../node_modules/mermaid/dist/chunks/mermaid.core/chunk-QZHKN3VN.mjs\");\n/* harmony import */ var _chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./chunk-S3R3BYOJ.mjs */ \"../node_modules/mermaid/dist/chunks/mermaid.core/chunk-S3R3BYOJ.mjs\");\n/* harmony import */ var _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./chunk-ABZYJK2D.mjs */ \"../node_modules/mermaid/dist/chunks/mermaid.core/chunk-ABZYJK2D.mjs\");\n/* harmony import */ var _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./chunk-AGHRB4JF.mjs */ \"../node_modules/mermaid/dist/chunks/mermaid.core/chunk-AGHRB4JF.mjs\");\n/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! d3 */ \"../node_modules/d3/src/index.js\");\n/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @braintree/sanitize-url */ \"../node_modules/@braintree/sanitize-url/dist/index.js\");\n\n\n\n\n\n\n\n// src/diagrams/sequence/parser/sequenceDiagram.jison\nvar parser = (function() {\n  var o = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(k, v, o2, l) {\n    for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;\n    return o2;\n  }, \"o\"), $V0 = [1, 2], $V1 = [1, 3], $V2 = [1, 4], $V3 = [2, 4], $V4 = [1, 9], $V5 = [1, 11], $V6 = [1, 13], $V7 = [1, 14], $V8 = [1, 16], $V9 = [1, 17], $Va = [1, 18], $Vb = [1, 24], $Vc = [1, 25], $Vd = [1, 26], $Ve = [1, 27], $Vf = [1, 28], $Vg = [1, 29], $Vh = [1, 30], $Vi = [1, 31], $Vj = [1, 32], $Vk = [1, 33], $Vl = [1, 34], $Vm = [1, 35], $Vn = [1, 36], $Vo = [1, 37], $Vp = [1, 38], $Vq = [1, 39], $Vr = [1, 41], $Vs = [1, 42], $Vt = [1, 43], $Vu = [1, 44], $Vv = [1, 45], $Vw = [1, 46], $Vx = [1, 4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 48, 49, 50, 52, 53, 55, 60, 61, 62, 63, 71], $Vy = [2, 71], $Vz = [4, 5, 16, 50, 52, 53], $VA = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 55, 60, 61, 62, 63, 71], $VB = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 49, 50, 52, 53, 55, 60, 61, 62, 63, 71], $VC = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 48, 50, 52, 53, 55, 60, 61, 62, 63, 71], $VD = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 50, 52, 53, 55, 60, 61, 62, 63, 71], $VE = [69, 70, 71], $VF = [1, 127];\n  var parser2 = {\n    trace: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function trace() {\n    }, \"trace\"),\n    yy: {},\n    symbols_: { \"error\": 2, \"start\": 3, \"SPACE\": 4, \"NEWLINE\": 5, \"SD\": 6, \"document\": 7, \"line\": 8, \"statement\": 9, \"box_section\": 10, \"box_line\": 11, \"participant_statement\": 12, \"create\": 13, \"box\": 14, \"restOfLine\": 15, \"end\": 16, \"signal\": 17, \"autonumber\": 18, \"NUM\": 19, \"off\": 20, \"activate\": 21, \"actor\": 22, \"deactivate\": 23, \"note_statement\": 24, \"links_statement\": 25, \"link_statement\": 26, \"properties_statement\": 27, \"details_statement\": 28, \"title\": 29, \"legacy_title\": 30, \"acc_title\": 31, \"acc_title_value\": 32, \"acc_descr\": 33, \"acc_descr_value\": 34, \"acc_descr_multiline_value\": 35, \"loop\": 36, \"rect\": 37, \"opt\": 38, \"alt\": 39, \"else_sections\": 40, \"par\": 41, \"par_sections\": 42, \"par_over\": 43, \"critical\": 44, \"option_sections\": 45, \"break\": 46, \"option\": 47, \"and\": 48, \"else\": 49, \"participant\": 50, \"AS\": 51, \"participant_actor\": 52, \"destroy\": 53, \"actor_with_config\": 54, \"note\": 55, \"placement\": 56, \"text2\": 57, \"over\": 58, \"actor_pair\": 59, \"links\": 60, \"link\": 61, \"properties\": 62, \"details\": 63, \"spaceList\": 64, \",\": 65, \"left_of\": 66, \"right_of\": 67, \"signaltype\": 68, \"+\": 69, \"-\": 70, \"ACTOR\": 71, \"config_object\": 72, \"CONFIG_START\": 73, \"CONFIG_CONTENT\": 74, \"CONFIG_END\": 75, \"SOLID_OPEN_ARROW\": 76, \"DOTTED_OPEN_ARROW\": 77, \"SOLID_ARROW\": 78, \"BIDIRECTIONAL_SOLID_ARROW\": 79, \"DOTTED_ARROW\": 80, \"BIDIRECTIONAL_DOTTED_ARROW\": 81, \"SOLID_CROSS\": 82, \"DOTTED_CROSS\": 83, \"SOLID_POINT\": 84, \"DOTTED_POINT\": 85, \"TXT\": 86, \"$accept\": 0, \"$end\": 1 },\n    terminals_: { 2: \"error\", 4: \"SPACE\", 5: \"NEWLINE\", 6: \"SD\", 13: \"create\", 14: \"box\", 15: \"restOfLine\", 16: \"end\", 18: \"autonumber\", 19: \"NUM\", 20: \"off\", 21: \"activate\", 23: \"deactivate\", 29: \"title\", 30: \"legacy_title\", 31: \"acc_title\", 32: \"acc_title_value\", 33: \"acc_descr\", 34: \"acc_descr_value\", 35: \"acc_descr_multiline_value\", 36: \"loop\", 37: \"rect\", 38: \"opt\", 39: \"alt\", 41: \"par\", 43: \"par_over\", 44: \"critical\", 46: \"break\", 47: \"option\", 48: \"and\", 49: \"else\", 50: \"participant\", 51: \"AS\", 52: \"participant_actor\", 53: \"destroy\", 55: \"note\", 58: \"over\", 60: \"links\", 61: \"link\", 62: \"properties\", 63: \"details\", 65: \",\", 66: \"left_of\", 67: \"right_of\", 69: \"+\", 70: \"-\", 71: \"ACTOR\", 73: \"CONFIG_START\", 74: \"CONFIG_CONTENT\", 75: \"CONFIG_END\", 76: \"SOLID_OPEN_ARROW\", 77: \"DOTTED_OPEN_ARROW\", 78: \"SOLID_ARROW\", 79: \"BIDIRECTIONAL_SOLID_ARROW\", 80: \"DOTTED_ARROW\", 81: \"BIDIRECTIONAL_DOTTED_ARROW\", 82: \"SOLID_CROSS\", 83: \"DOTTED_CROSS\", 84: \"SOLID_POINT\", 85: \"DOTTED_POINT\", 86: \"TXT\" },\n    productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [10, 0], [10, 2], [11, 2], [11, 1], [11, 1], [9, 1], [9, 2], [9, 4], [9, 2], [9, 4], [9, 3], [9, 3], [9, 2], [9, 3], [9, 3], [9, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [45, 1], [45, 4], [42, 1], [42, 4], [40, 1], [40, 4], [12, 5], [12, 3], [12, 5], [12, 3], [12, 3], [12, 3], [24, 4], [24, 4], [25, 3], [26, 3], [27, 3], [28, 3], [64, 2], [64, 1], [59, 3], [59, 1], [56, 1], [56, 1], [17, 5], [17, 5], [17, 4], [54, 2], [72, 3], [22, 1], [68, 1], [68, 1], [68, 1], [68, 1], [68, 1], [68, 1], [68, 1], [68, 1], [68, 1], [68, 1], [57, 1]],\n    performAction: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {\n      var $0 = $$.length - 1;\n      switch (yystate) {\n        case 3:\n          yy.apply($$[$0]);\n          return $$[$0];\n          break;\n        case 4:\n        case 9:\n          this.$ = [];\n          break;\n        case 5:\n        case 10:\n          $$[$0 - 1].push($$[$0]);\n          this.$ = $$[$0 - 1];\n          break;\n        case 6:\n        case 7:\n        case 11:\n        case 12:\n          this.$ = $$[$0];\n          break;\n        case 8:\n        case 13:\n          this.$ = [];\n          break;\n        case 15:\n          $$[$0].type = \"createParticipant\";\n          this.$ = $$[$0];\n          break;\n        case 16:\n          $$[$0 - 1].unshift({ type: \"boxStart\", boxData: yy.parseBoxData($$[$0 - 2]) });\n          $$[$0 - 1].push({ type: \"boxEnd\", boxText: $$[$0 - 2] });\n          this.$ = $$[$0 - 1];\n          break;\n        case 18:\n          this.$ = { type: \"sequenceIndex\", sequenceIndex: Number($$[$0 - 2]), sequenceIndexStep: Number($$[$0 - 1]), sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER };\n          break;\n        case 19:\n          this.$ = { type: \"sequenceIndex\", sequenceIndex: Number($$[$0 - 1]), sequenceIndexStep: 1, sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER };\n          break;\n        case 20:\n          this.$ = { type: \"sequenceIndex\", sequenceVisible: false, signalType: yy.LINETYPE.AUTONUMBER };\n          break;\n        case 21:\n          this.$ = { type: \"sequenceIndex\", sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER };\n          break;\n        case 22:\n          this.$ = { type: \"activeStart\", signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0 - 1].actor };\n          break;\n        case 23:\n          this.$ = { type: \"activeEnd\", signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0 - 1].actor };\n          break;\n        case 29:\n          yy.setDiagramTitle($$[$0].substring(6));\n          this.$ = $$[$0].substring(6);\n          break;\n        case 30:\n          yy.setDiagramTitle($$[$0].substring(7));\n          this.$ = $$[$0].substring(7);\n          break;\n        case 31:\n          this.$ = $$[$0].trim();\n          yy.setAccTitle(this.$);\n          break;\n        case 32:\n        case 33:\n          this.$ = $$[$0].trim();\n          yy.setAccDescription(this.$);\n          break;\n        case 34:\n          $$[$0 - 1].unshift({ type: \"loopStart\", loopText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.LOOP_START });\n          $$[$0 - 1].push({ type: \"loopEnd\", loopText: $$[$0 - 2], signalType: yy.LINETYPE.LOOP_END });\n          this.$ = $$[$0 - 1];\n          break;\n        case 35:\n          $$[$0 - 1].unshift({ type: \"rectStart\", color: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.RECT_START });\n          $$[$0 - 1].push({ type: \"rectEnd\", color: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.RECT_END });\n          this.$ = $$[$0 - 1];\n          break;\n        case 36:\n          $$[$0 - 1].unshift({ type: \"optStart\", optText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.OPT_START });\n          $$[$0 - 1].push({ type: \"optEnd\", optText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.OPT_END });\n          this.$ = $$[$0 - 1];\n          break;\n        case 37:\n          $$[$0 - 1].unshift({ type: \"altStart\", altText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.ALT_START });\n          $$[$0 - 1].push({ type: \"altEnd\", signalType: yy.LINETYPE.ALT_END });\n          this.$ = $$[$0 - 1];\n          break;\n        case 38:\n          $$[$0 - 1].unshift({ type: \"parStart\", parText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.PAR_START });\n          $$[$0 - 1].push({ type: \"parEnd\", signalType: yy.LINETYPE.PAR_END });\n          this.$ = $$[$0 - 1];\n          break;\n        case 39:\n          $$[$0 - 1].unshift({ type: \"parStart\", parText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.PAR_OVER_START });\n          $$[$0 - 1].push({ type: \"parEnd\", signalType: yy.LINETYPE.PAR_END });\n          this.$ = $$[$0 - 1];\n          break;\n        case 40:\n          $$[$0 - 1].unshift({ type: \"criticalStart\", criticalText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.CRITICAL_START });\n          $$[$0 - 1].push({ type: \"criticalEnd\", signalType: yy.LINETYPE.CRITICAL_END });\n          this.$ = $$[$0 - 1];\n          break;\n        case 41:\n          $$[$0 - 1].unshift({ type: \"breakStart\", breakText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.BREAK_START });\n          $$[$0 - 1].push({ type: \"breakEnd\", optText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.BREAK_END });\n          this.$ = $$[$0 - 1];\n          break;\n        case 43:\n          this.$ = $$[$0 - 3].concat([{ type: \"option\", optionText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.CRITICAL_OPTION }, $$[$0]]);\n          break;\n        case 45:\n          this.$ = $$[$0 - 3].concat([{ type: \"and\", parText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.PAR_AND }, $$[$0]]);\n          break;\n        case 47:\n          this.$ = $$[$0 - 3].concat([{ type: \"else\", altText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.ALT_ELSE }, $$[$0]]);\n          break;\n        case 48:\n          $$[$0 - 3].draw = \"participant\";\n          $$[$0 - 3].type = \"addParticipant\";\n          $$[$0 - 3].description = yy.parseMessage($$[$0 - 1]);\n          this.$ = $$[$0 - 3];\n          break;\n        case 49:\n          $$[$0 - 1].draw = \"participant\";\n          $$[$0 - 1].type = \"addParticipant\";\n          this.$ = $$[$0 - 1];\n          break;\n        case 50:\n          $$[$0 - 3].draw = \"actor\";\n          $$[$0 - 3].type = \"addParticipant\";\n          $$[$0 - 3].description = yy.parseMessage($$[$0 - 1]);\n          this.$ = $$[$0 - 3];\n          break;\n        case 51:\n          $$[$0 - 1].draw = \"actor\";\n          $$[$0 - 1].type = \"addParticipant\";\n          this.$ = $$[$0 - 1];\n          break;\n        case 52:\n          $$[$0 - 1].type = \"destroyParticipant\";\n          this.$ = $$[$0 - 1];\n          break;\n        case 53:\n          $$[$0 - 1].draw = \"participant\";\n          $$[$0 - 1].type = \"addParticipant\";\n          this.$ = $$[$0 - 1];\n          break;\n        case 54:\n          this.$ = [$$[$0 - 1], { type: \"addNote\", placement: $$[$0 - 2], actor: $$[$0 - 1].actor, text: $$[$0] }];\n          break;\n        case 55:\n          $$[$0 - 2] = [].concat($$[$0 - 1], $$[$0 - 1]).slice(0, 2);\n          $$[$0 - 2][0] = $$[$0 - 2][0].actor;\n          $$[$0 - 2][1] = $$[$0 - 2][1].actor;\n          this.$ = [$$[$0 - 1], { type: \"addNote\", placement: yy.PLACEMENT.OVER, actor: $$[$0 - 2].slice(0, 2), text: $$[$0] }];\n          break;\n        case 56:\n          this.$ = [$$[$0 - 1], { type: \"addLinks\", actor: $$[$0 - 1].actor, text: $$[$0] }];\n          break;\n        case 57:\n          this.$ = [$$[$0 - 1], { type: \"addALink\", actor: $$[$0 - 1].actor, text: $$[$0] }];\n          break;\n        case 58:\n          this.$ = [$$[$0 - 1], { type: \"addProperties\", actor: $$[$0 - 1].actor, text: $$[$0] }];\n          break;\n        case 59:\n          this.$ = [$$[$0 - 1], { type: \"addDetails\", actor: $$[$0 - 1].actor, text: $$[$0] }];\n          break;\n        case 62:\n          this.$ = [$$[$0 - 2], $$[$0]];\n          break;\n        case 63:\n          this.$ = $$[$0];\n          break;\n        case 64:\n          this.$ = yy.PLACEMENT.LEFTOF;\n          break;\n        case 65:\n          this.$ = yy.PLACEMENT.RIGHTOF;\n          break;\n        case 66:\n          this.$ = [\n            $$[$0 - 4],\n            $$[$0 - 1],\n            { type: \"addMessage\", from: $$[$0 - 4].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 3], msg: $$[$0], activate: true },\n            { type: \"activeStart\", signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0 - 1].actor }\n          ];\n          break;\n        case 67:\n          this.$ = [\n            $$[$0 - 4],\n            $$[$0 - 1],\n            { type: \"addMessage\", from: $$[$0 - 4].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 3], msg: $$[$0] },\n            { type: \"activeEnd\", signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0 - 4].actor }\n          ];\n          break;\n        case 68:\n          this.$ = [$$[$0 - 3], $$[$0 - 1], { type: \"addMessage\", from: $$[$0 - 3].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 2], msg: $$[$0] }];\n          break;\n        case 69:\n          this.$ = {\n            type: \"addParticipant\",\n            actor: $$[$0 - 1],\n            config: $$[$0]\n          };\n          break;\n        case 70:\n          this.$ = $$[$0 - 1].trim();\n          break;\n        case 71:\n          this.$ = { type: \"addParticipant\", actor: $$[$0] };\n          break;\n        case 72:\n          this.$ = yy.LINETYPE.SOLID_OPEN;\n          break;\n        case 73:\n          this.$ = yy.LINETYPE.DOTTED_OPEN;\n          break;\n        case 74:\n          this.$ = yy.LINETYPE.SOLID;\n          break;\n        case 75:\n          this.$ = yy.LINETYPE.BIDIRECTIONAL_SOLID;\n          break;\n        case 76:\n          this.$ = yy.LINETYPE.DOTTED;\n          break;\n        case 77:\n          this.$ = yy.LINETYPE.BIDIRECTIONAL_DOTTED;\n          break;\n        case 78:\n          this.$ = yy.LINETYPE.SOLID_CROSS;\n          break;\n        case 79:\n          this.$ = yy.LINETYPE.DOTTED_CROSS;\n          break;\n        case 80:\n          this.$ = yy.LINETYPE.SOLID_POINT;\n          break;\n        case 81:\n          this.$ = yy.LINETYPE.DOTTED_POINT;\n          break;\n        case 82:\n          this.$ = yy.parseMessage($$[$0].trim().substring(1));\n          break;\n      }\n    }, \"anonymous\"),\n    table: [{ 3: 1, 4: $V0, 5: $V1, 6: $V2 }, { 1: [3] }, { 3: 5, 4: $V0, 5: $V1, 6: $V2 }, { 3: 6, 4: $V0, 5: $V1, 6: $V2 }, o([1, 4, 5, 13, 14, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 55, 60, 61, 62, 63, 71], $V3, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 55: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 71: $Vw }, o($Vx, [2, 5]), { 9: 47, 12: 12, 13: $V6, 14: $V7, 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 55: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 71: $Vw }, o($Vx, [2, 7]), o($Vx, [2, 8]), o($Vx, [2, 14]), { 12: 48, 50: $Vo, 52: $Vp, 53: $Vq }, { 15: [1, 49] }, { 5: [1, 50] }, { 5: [1, 53], 19: [1, 51], 20: [1, 52] }, { 22: 54, 71: $Vw }, { 22: 55, 71: $Vw }, { 5: [1, 56] }, { 5: [1, 57] }, { 5: [1, 58] }, { 5: [1, 59] }, { 5: [1, 60] }, o($Vx, [2, 29]), o($Vx, [2, 30]), { 32: [1, 61] }, { 34: [1, 62] }, o($Vx, [2, 33]), { 15: [1, 63] }, { 15: [1, 64] }, { 15: [1, 65] }, { 15: [1, 66] }, { 15: [1, 67] }, { 15: [1, 68] }, { 15: [1, 69] }, { 15: [1, 70] }, { 22: 71, 54: 72, 71: [1, 73] }, { 22: 74, 71: $Vw }, { 22: 75, 71: $Vw }, { 68: 76, 76: [1, 77], 77: [1, 78], 78: [1, 79], 79: [1, 80], 80: [1, 81], 81: [1, 82], 82: [1, 83], 83: [1, 84], 84: [1, 85], 85: [1, 86] }, { 56: 87, 58: [1, 88], 66: [1, 89], 67: [1, 90] }, { 22: 91, 71: $Vw }, { 22: 92, 71: $Vw }, { 22: 93, 71: $Vw }, { 22: 94, 71: $Vw }, o([5, 51, 65, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86], $Vy), o($Vx, [2, 6]), o($Vx, [2, 15]), o($Vz, [2, 9], { 10: 95 }), o($Vx, [2, 17]), { 5: [1, 97], 19: [1, 96] }, { 5: [1, 98] }, o($Vx, [2, 21]), { 5: [1, 99] }, { 5: [1, 100] }, o($Vx, [2, 24]), o($Vx, [2, 25]), o($Vx, [2, 26]), o($Vx, [2, 27]), o($Vx, [2, 28]), o($Vx, [2, 31]), o($Vx, [2, 32]), o($VA, $V3, { 7: 101 }), o($VA, $V3, { 7: 102 }), o($VA, $V3, { 7: 103 }), o($VB, $V3, { 40: 104, 7: 105 }), o($VC, $V3, { 42: 106, 7: 107 }), o($VC, $V3, { 7: 107, 42: 108 }), o($VD, $V3, { 45: 109, 7: 110 }), o($VA, $V3, { 7: 111 }), { 5: [1, 113], 51: [1, 112] }, { 5: [1, 114] }, o([5, 51], $Vy, { 72: 115, 73: [1, 116] }), { 5: [1, 118], 51: [1, 117] }, { 5: [1, 119] }, { 22: 122, 69: [1, 120], 70: [1, 121], 71: $Vw }, o($VE, [2, 72]), o($VE, [2, 73]), o($VE, [2, 74]), o($VE, [2, 75]), o($VE, [2, 76]), o($VE, [2, 77]), o($VE, [2, 78]), o($VE, [2, 79]), o($VE, [2, 80]), o($VE, [2, 81]), { 22: 123, 71: $Vw }, { 22: 125, 59: 124, 71: $Vw }, { 71: [2, 64] }, { 71: [2, 65] }, { 57: 126, 86: $VF }, { 57: 128, 86: $VF }, { 57: 129, 86: $VF }, { 57: 130, 86: $VF }, { 4: [1, 133], 5: [1, 135], 11: 132, 12: 134, 16: [1, 131], 50: $Vo, 52: $Vp, 53: $Vq }, { 5: [1, 136] }, o($Vx, [2, 19]), o($Vx, [2, 20]), o($Vx, [2, 22]), o($Vx, [2, 23]), { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 137], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 55: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 71: $Vw }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 138], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 55: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 71: $Vw }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 139], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 55: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 71: $Vw }, { 16: [1, 140] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [2, 46], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 49: [1, 141], 50: $Vo, 52: $Vp, 53: $Vq, 55: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 71: $Vw }, { 16: [1, 142] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [2, 44], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 48: [1, 143], 50: $Vo, 52: $Vp, 53: $Vq, 55: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 71: $Vw }, { 16: [1, 144] }, { 16: [1, 145] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [2, 42], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 47: [1, 146], 50: $Vo, 52: $Vp, 53: $Vq, 55: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 71: $Vw }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 147], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 55: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 71: $Vw }, { 15: [1, 148] }, o($Vx, [2, 49]), o($Vx, [2, 53]), { 5: [2, 69] }, { 74: [1, 149] }, { 15: [1, 150] }, o($Vx, [2, 51]), o($Vx, [2, 52]), { 22: 151, 71: $Vw }, { 22: 152, 71: $Vw }, { 57: 153, 86: $VF }, { 57: 154, 86: $VF }, { 57: 155, 86: $VF }, { 65: [1, 156], 86: [2, 63] }, { 5: [2, 56] }, { 5: [2, 82] }, { 5: [2, 57] }, { 5: [2, 58] }, { 5: [2, 59] }, o($Vx, [2, 16]), o($Vz, [2, 10]), { 12: 157, 50: $Vo, 52: $Vp, 53: $Vq }, o($Vz, [2, 12]), o($Vz, [2, 13]), o($Vx, [2, 18]), o($Vx, [2, 34]), o($Vx, [2, 35]), o($Vx, [2, 36]), o($Vx, [2, 37]), { 15: [1, 158] }, o($Vx, [2, 38]), { 15: [1, 159] }, o($Vx, [2, 39]), o($Vx, [2, 40]), { 15: [1, 160] }, o($Vx, [2, 41]), { 5: [1, 161] }, { 75: [1, 162] }, { 5: [1, 163] }, { 57: 164, 86: $VF }, { 57: 165, 86: $VF }, { 5: [2, 68] }, { 5: [2, 54] }, { 5: [2, 55] }, { 22: 166, 71: $Vw }, o($Vz, [2, 11]), o($VB, $V3, { 7: 105, 40: 167 }), o($VC, $V3, { 7: 107, 42: 168 }), o($VD, $V3, { 7: 110, 45: 169 }), o($Vx, [2, 48]), { 5: [2, 70] }, o($Vx, [2, 50]), { 5: [2, 66] }, { 5: [2, 67] }, { 86: [2, 62] }, { 16: [2, 47] }, { 16: [2, 45] }, { 16: [2, 43] }],\n    defaultActions: { 5: [2, 1], 6: [2, 2], 89: [2, 64], 90: [2, 65], 115: [2, 69], 126: [2, 56], 127: [2, 82], 128: [2, 57], 129: [2, 58], 130: [2, 59], 153: [2, 68], 154: [2, 54], 155: [2, 55], 162: [2, 70], 164: [2, 66], 165: [2, 67], 166: [2, 62], 167: [2, 47], 168: [2, 45], 169: [2, 43] },\n    parseError: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(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    }, \"parseError\"),\n    parse: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function parse(input) {\n      var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = \"\", yylineno = 0, yyleng = 0, recovering = 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 popStack(n) {\n        stack.length = stack.length - 2 * n;\n        vstack.length = vstack.length - n;\n        lstack.length = lstack.length - n;\n      }\n      (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(popStack, \"popStack\");\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      (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(lex, \"lex\");\n      var symbol, preErrorSymbol, state, action, a, 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            if (!preErrorSymbol) {\n              yyleng = lexer2.yyleng;\n              yytext = lexer2.yytext;\n              yylineno = lexer2.yylineno;\n              yyloc = lexer2.yylloc;\n              if (recovering > 0) {\n                recovering--;\n              }\n            } else {\n              symbol = preErrorSymbol;\n              preErrorSymbol = null;\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    }, \"parse\")\n  };\n  var lexer = /* @__PURE__ */ (function() {\n    var lexer2 = {\n      EOF: 1,\n      parseError: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(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      }, \"parseError\"),\n      // resets the lexer, sets new input\n      setInput: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(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      }, \"setInput\"),\n      // consumes and returns one char from the input\n      input: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(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      }, \"input\"),\n      // unshifts one char (or a string) into the input\n      unput: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(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      }, \"unput\"),\n      // When called from action, caches matched text and appends it on next action\n      more: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function() {\n        this._more = true;\n        return this;\n      }, \"more\"),\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: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(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      }, \"reject\"),\n      // retain first n characters of the match\n      less: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(n) {\n        this.unput(this.match.slice(n));\n      }, \"less\"),\n      // displays already matched input, i.e. for error messages\n      pastInput: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(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      }, \"pastInput\"),\n      // displays upcoming input, i.e. for error messages\n      upcomingInput: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(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      }, \"upcomingInput\"),\n      // displays the character position where the lexing error occurred, i.e. for error messages\n      showPosition: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function() {\n        var pre = this.pastInput();\n        var c = new Array(pre.length + 1).join(\"-\");\n        return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n      }, \"showPosition\"),\n      // test the lexed token: return FALSE when not a match, otherwise return token\n      test_match: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(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      }, \"test_match\"),\n      // return next match in input\n      next: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(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      }, \"next\"),\n      // return next match that has a token\n      lex: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function lex() {\n        var r = this.next();\n        if (r) {\n          return r;\n        } else {\n          return this.lex();\n        }\n      }, \"lex\"),\n      // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\n      begin: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function begin(condition) {\n        this.conditionStack.push(condition);\n      }, \"begin\"),\n      // pop the previously active lexer condition state off the condition stack\n      popState: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(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      }, \"popState\"),\n      // produce the lexer rule set which is active for the currently active lexer condition state\n      _currentRules: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(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      }, \"_currentRules\"),\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: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(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      }, \"topState\"),\n      // alias for begin(condition)\n      pushState: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function pushState(condition) {\n        this.begin(condition);\n      }, \"pushState\"),\n      // return the number of states currently on the stack\n      stateStackSize: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function stateStackSize() {\n        return this.conditionStack.length;\n      }, \"stateStackSize\"),\n      options: { \"case-insensitive\": true },\n      performAction: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {\n        var YYSTATE = YY_START;\n        switch ($avoiding_name_collisions) {\n          case 0:\n            return 5;\n            break;\n          case 1:\n            break;\n          case 2:\n            break;\n          case 3:\n            break;\n          case 4:\n            break;\n          case 5:\n            break;\n          case 6:\n            return 19;\n            break;\n          case 7:\n            this.begin(\"CONFIG\");\n            return 73;\n            break;\n          case 8:\n            return 74;\n            break;\n          case 9:\n            this.popState();\n            this.popState();\n            return 75;\n            break;\n          case 10:\n            yy_.yytext = yy_.yytext.trim();\n            return 71;\n            break;\n          case 11:\n            yy_.yytext = yy_.yytext.trim();\n            this.begin(\"ALIAS\");\n            return 71;\n            break;\n          case 12:\n            this.begin(\"LINE\");\n            return 14;\n            break;\n          case 13:\n            this.begin(\"ID\");\n            return 50;\n            break;\n          case 14:\n            this.begin(\"ID\");\n            return 52;\n            break;\n          case 15:\n            return 13;\n            break;\n          case 16:\n            this.begin(\"ID\");\n            return 53;\n            break;\n          case 17:\n            yy_.yytext = yy_.yytext.trim();\n            this.begin(\"ALIAS\");\n            return 71;\n            break;\n          case 18:\n            this.popState();\n            this.popState();\n            this.begin(\"LINE\");\n            return 51;\n            break;\n          case 19:\n            this.popState();\n            this.popState();\n            return 5;\n            break;\n          case 20:\n            this.begin(\"LINE\");\n            return 36;\n            break;\n          case 21:\n            this.begin(\"LINE\");\n            return 37;\n            break;\n          case 22:\n            this.begin(\"LINE\");\n            return 38;\n            break;\n          case 23:\n            this.begin(\"LINE\");\n            return 39;\n            break;\n          case 24:\n            this.begin(\"LINE\");\n            return 49;\n            break;\n          case 25:\n            this.begin(\"LINE\");\n            return 41;\n            break;\n          case 26:\n            this.begin(\"LINE\");\n            return 43;\n            break;\n          case 27:\n            this.begin(\"LINE\");\n            return 48;\n            break;\n          case 28:\n            this.begin(\"LINE\");\n            return 44;\n            break;\n          case 29:\n            this.begin(\"LINE\");\n            return 47;\n            break;\n          case 30:\n            this.begin(\"LINE\");\n            return 46;\n            break;\n          case 31:\n            this.popState();\n            return 15;\n            break;\n          case 32:\n            return 16;\n            break;\n          case 33:\n            return 66;\n            break;\n          case 34:\n            return 67;\n            break;\n          case 35:\n            return 60;\n            break;\n          case 36:\n            return 61;\n            break;\n          case 37:\n            return 62;\n            break;\n          case 38:\n            return 63;\n            break;\n          case 39:\n            return 58;\n            break;\n          case 40:\n            return 55;\n            break;\n          case 41:\n            this.begin(\"ID\");\n            return 21;\n            break;\n          case 42:\n            this.begin(\"ID\");\n            return 23;\n            break;\n          case 43:\n            return 29;\n            break;\n          case 44:\n            return 30;\n            break;\n          case 45:\n            this.begin(\"acc_title\");\n            return 31;\n            break;\n          case 46:\n            this.popState();\n            return \"acc_title_value\";\n            break;\n          case 47:\n            this.begin(\"acc_descr\");\n            return 33;\n            break;\n          case 48:\n            this.popState();\n            return \"acc_descr_value\";\n            break;\n          case 49:\n            this.begin(\"acc_descr_multiline\");\n            break;\n          case 50:\n            this.popState();\n            break;\n          case 51:\n            return \"acc_descr_multiline_value\";\n            break;\n          case 52:\n            return 6;\n            break;\n          case 53:\n            return 18;\n            break;\n          case 54:\n            return 20;\n            break;\n          case 55:\n            return 65;\n            break;\n          case 56:\n            return 5;\n            break;\n          case 57:\n            yy_.yytext = yy_.yytext.trim();\n            return 71;\n            break;\n          case 58:\n            return 78;\n            break;\n          case 59:\n            return 79;\n            break;\n          case 60:\n            return 80;\n            break;\n          case 61:\n            return 81;\n            break;\n          case 62:\n            return 76;\n            break;\n          case 63:\n            return 77;\n            break;\n          case 64:\n            return 82;\n            break;\n          case 65:\n            return 83;\n            break;\n          case 66:\n            return 84;\n            break;\n          case 67:\n            return 85;\n            break;\n          case 68:\n            return 86;\n            break;\n          case 69:\n            return 86;\n            break;\n          case 70:\n            return 69;\n            break;\n          case 71:\n            return 70;\n            break;\n          case 72:\n            return 5;\n            break;\n          case 73:\n            return \"INVALID\";\n            break;\n        }\n      }, \"anonymous\"),\n      rules: [/^(?:[\\n]+)/i, /^(?:\\s+)/i, /^(?:((?!\\n)\\s)+)/i, /^(?:#[^\\n]*)/i, /^(?:%(?!\\{)[^\\n]*)/i, /^(?:[^\\}]%%[^\\n]*)/i, /^(?:[0-9]+(?=[ \\n]+))/i, /^(?:@\\{)/i, /^(?:[^\\}]+)/i, /^(?:\\})/i, /^(?:[^\\<->\\->:\\n,;@\\s]+(?=@\\{))/i, /^(?:[^\\<->\\->:\\n,;@]+?([\\-]*[^\\<->\\->:\\n,;@]+?)*?(?=((?!\\n)\\s)+as(?!\\n)\\s|[#\\n;]|$))/i, /^(?:box\\b)/i, /^(?:participant\\b)/i, /^(?:actor\\b)/i, /^(?:create\\b)/i, /^(?:destroy\\b)/i, /^(?:[^<\\->\\->:\\n,;]+?([\\-]*[^<\\->\\->:\\n,;]+?)*?(?=((?!\\n)\\s)+as(?!\\n)\\s|[#\\n;]|$))/i, /^(?:as\\b)/i, /^(?:(?:))/i, /^(?:loop\\b)/i, /^(?:rect\\b)/i, /^(?:opt\\b)/i, /^(?:alt\\b)/i, /^(?:else\\b)/i, /^(?:par\\b)/i, /^(?:par_over\\b)/i, /^(?:and\\b)/i, /^(?:critical\\b)/i, /^(?:option\\b)/i, /^(?:break\\b)/i, /^(?:(?:[:]?(?:no)?wrap)?[^#\\n;]*)/i, /^(?:end\\b)/i, /^(?:left of\\b)/i, /^(?:right of\\b)/i, /^(?:links\\b)/i, /^(?:link\\b)/i, /^(?:properties\\b)/i, /^(?:details\\b)/i, /^(?:over\\b)/i, /^(?:note\\b)/i, /^(?:activate\\b)/i, /^(?:deactivate\\b)/i, /^(?:title\\s[^#\\n;]+)/i, /^(?:title:\\s[^#\\n;]+)/i, /^(?:accTitle\\s*:\\s*)/i, /^(?:(?!\\n||)*[^\\n]*)/i, /^(?:accDescr\\s*:\\s*)/i, /^(?:(?!\\n||)*[^\\n]*)/i, /^(?:accDescr\\s*\\{\\s*)/i, /^(?:[\\}])/i, /^(?:[^\\}]*)/i, /^(?:sequenceDiagram\\b)/i, /^(?:autonumber\\b)/i, /^(?:off\\b)/i, /^(?:,)/i, /^(?:;)/i, /^(?:[^+<\\->\\->:\\n,;]+((?!(-x|--x|-\\)|--\\)))[\\-]*[^\\+<\\->\\->:\\n,;]+)*)/i, /^(?:->>)/i, /^(?:<<->>)/i, /^(?:-->>)/i, /^(?:<<-->>)/i, /^(?:->)/i, /^(?:-->)/i, /^(?:-[x])/i, /^(?:--[x])/i, /^(?:-[\\)])/i, /^(?:--[\\)])/i, /^(?::(?:(?:no)?wrap)?[^#\\n;]*)/i, /^(?::)/i, /^(?:\\+)/i, /^(?:-)/i, /^(?:$)/i, /^(?:.)/i],\n      conditions: { \"acc_descr_multiline\": { \"rules\": [50, 51], \"inclusive\": false }, \"acc_descr\": { \"rules\": [48], \"inclusive\": false }, \"acc_title\": { \"rules\": [46], \"inclusive\": false }, \"ID\": { \"rules\": [2, 3, 7, 10, 11, 17], \"inclusive\": false }, \"ALIAS\": { \"rules\": [2, 3, 18, 19], \"inclusive\": false }, \"LINE\": { \"rules\": [2, 3, 31], \"inclusive\": false }, \"CONFIG\": { \"rules\": [8, 9], \"inclusive\": false }, \"CONFIG_DATA\": { \"rules\": [], \"inclusive\": false }, \"INITIAL\": { \"rules\": [0, 1, 3, 4, 5, 6, 12, 13, 14, 15, 16, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 47, 49, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73], \"inclusive\": true } }\n    };\n    return lexer2;\n  })();\n  parser2.lexer = lexer;\n  function Parser() {\n    this.yy = {};\n  }\n  (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(Parser, \"Parser\");\n  Parser.prototype = parser2;\n  parser2.Parser = Parser;\n  return new Parser();\n})();\nparser.parser = parser;\nvar sequenceDiagram_default = parser;\n\n// src/diagrams/sequence/sequenceDb.ts\nvar LINETYPE = {\n  SOLID: 0,\n  DOTTED: 1,\n  NOTE: 2,\n  SOLID_CROSS: 3,\n  DOTTED_CROSS: 4,\n  SOLID_OPEN: 5,\n  DOTTED_OPEN: 6,\n  LOOP_START: 10,\n  LOOP_END: 11,\n  ALT_START: 12,\n  ALT_ELSE: 13,\n  ALT_END: 14,\n  OPT_START: 15,\n  OPT_END: 16,\n  ACTIVE_START: 17,\n  ACTIVE_END: 18,\n  PAR_START: 19,\n  PAR_AND: 20,\n  PAR_END: 21,\n  RECT_START: 22,\n  RECT_END: 23,\n  SOLID_POINT: 24,\n  DOTTED_POINT: 25,\n  AUTONUMBER: 26,\n  CRITICAL_START: 27,\n  CRITICAL_OPTION: 28,\n  CRITICAL_END: 29,\n  BREAK_START: 30,\n  BREAK_END: 31,\n  PAR_OVER_START: 32,\n  BIDIRECTIONAL_SOLID: 33,\n  BIDIRECTIONAL_DOTTED: 34\n};\nvar ARROWTYPE = {\n  FILLED: 0,\n  OPEN: 1\n};\nvar PLACEMENT = {\n  LEFTOF: 0,\n  RIGHTOF: 1,\n  OVER: 2\n};\nvar PARTICIPANT_TYPE = {\n  ACTOR: \"actor\",\n  BOUNDARY: \"boundary\",\n  COLLECTIONS: \"collections\",\n  CONTROL: \"control\",\n  DATABASE: \"database\",\n  ENTITY: \"entity\",\n  PARTICIPANT: \"participant\",\n  QUEUE: \"queue\"\n};\nvar SequenceDB = class {\n  constructor() {\n    this.state = new _chunk_QZHKN3VN_mjs__WEBPACK_IMPORTED_MODULE_2__.ImperativeState(() => ({\n      prevActor: void 0,\n      actors: /* @__PURE__ */ new Map(),\n      createdActors: /* @__PURE__ */ new Map(),\n      destroyedActors: /* @__PURE__ */ new Map(),\n      boxes: [],\n      messages: [],\n      notes: [],\n      sequenceNumbersEnabled: false,\n      wrapEnabled: void 0,\n      currentBox: void 0,\n      lastCreated: void 0,\n      lastDestroyed: void 0\n    }));\n    this.setAccTitle = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.setAccTitle;\n    this.setAccDescription = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.setAccDescription;\n    this.setDiagramTitle = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.setDiagramTitle;\n    this.getAccTitle = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.getAccTitle;\n    this.getAccDescription = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.getAccDescription;\n    this.getDiagramTitle = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.getDiagramTitle;\n    this.apply = this.apply.bind(this);\n    this.parseBoxData = this.parseBoxData.bind(this);\n    this.parseMessage = this.parseMessage.bind(this);\n    this.clear();\n    this.setWrap((0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.getConfig2)().wrap);\n    this.LINETYPE = LINETYPE;\n    this.ARROWTYPE = ARROWTYPE;\n    this.PLACEMENT = PLACEMENT;\n  }\n  static {\n    (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(this, \"SequenceDB\");\n  }\n  addBox(data) {\n    this.state.records.boxes.push({\n      name: data.text,\n      wrap: data.wrap ?? this.autoWrap(),\n      fill: data.color,\n      actorKeys: []\n    });\n    this.state.records.currentBox = this.state.records.boxes.slice(-1)[0];\n  }\n  addActor(id, name, description, type, metadata) {\n    let assignedBox = this.state.records.currentBox;\n    let doc;\n    if (metadata !== void 0) {\n      let yamlData;\n      if (!metadata.includes(\"\\n\")) {\n        yamlData = \"{\\n\" + metadata + \"\\n}\";\n      } else {\n        yamlData = metadata + \"\\n\";\n      }\n      doc = (0,_chunk_MI3HLSF2_mjs__WEBPACK_IMPORTED_MODULE_1__.load)(yamlData, { schema: _chunk_MI3HLSF2_mjs__WEBPACK_IMPORTED_MODULE_1__.JSON_SCHEMA });\n    }\n    type = doc?.type ?? type;\n    const old = this.state.records.actors.get(id);\n    if (old) {\n      if (this.state.records.currentBox && old.box && this.state.records.currentBox !== old.box) {\n        throw new Error(\n          `A same participant should only be defined in one Box: ${old.name} can't be in '${old.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`\n        );\n      }\n      assignedBox = old.box ? old.box : this.state.records.currentBox;\n      old.box = assignedBox;\n      if (old && name === old.name && description == null) {\n        return;\n      }\n    }\n    if (description?.text == null) {\n      description = { text: name, type };\n    }\n    if (type == null || description.text == null) {\n      description = { text: name, type };\n    }\n    this.state.records.actors.set(id, {\n      box: assignedBox,\n      name,\n      description: description.text,\n      wrap: description.wrap ?? this.autoWrap(),\n      prevActor: this.state.records.prevActor,\n      links: {},\n      properties: {},\n      actorCnt: null,\n      rectData: null,\n      type: type ?? \"participant\"\n    });\n    if (this.state.records.prevActor) {\n      const prevActorInRecords = this.state.records.actors.get(this.state.records.prevActor);\n      if (prevActorInRecords) {\n        prevActorInRecords.nextActor = id;\n      }\n    }\n    if (this.state.records.currentBox) {\n      this.state.records.currentBox.actorKeys.push(id);\n    }\n    this.state.records.prevActor = id;\n  }\n  activationCount(part) {\n    let i;\n    let count = 0;\n    if (!part) {\n      return 0;\n    }\n    for (i = 0; i < this.state.records.messages.length; i++) {\n      if (this.state.records.messages[i].type === this.LINETYPE.ACTIVE_START && this.state.records.messages[i].from === part) {\n        count++;\n      }\n      if (this.state.records.messages[i].type === this.LINETYPE.ACTIVE_END && this.state.records.messages[i].from === part) {\n        count--;\n      }\n    }\n    return count;\n  }\n  addMessage(idFrom, idTo, message, answer) {\n    this.state.records.messages.push({\n      id: this.state.records.messages.length.toString(),\n      from: idFrom,\n      to: idTo,\n      message: message.text,\n      wrap: message.wrap ?? this.autoWrap(),\n      answer\n    });\n  }\n  addSignal(idFrom, idTo, message, messageType, activate = false) {\n    if (messageType === this.LINETYPE.ACTIVE_END) {\n      const cnt = this.activationCount(idFrom ?? \"\");\n      if (cnt < 1) {\n        const error = new Error(\"Trying to inactivate an inactive participant (\" + idFrom + \")\");\n        error.hash = {\n          text: \"->>-\",\n          token: \"->>-\",\n          line: \"1\",\n          loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },\n          expected: [\"'ACTIVE_PARTICIPANT'\"]\n        };\n        throw error;\n      }\n    }\n    this.state.records.messages.push({\n      id: this.state.records.messages.length.toString(),\n      from: idFrom,\n      to: idTo,\n      message: message?.text ?? \"\",\n      wrap: message?.wrap ?? this.autoWrap(),\n      type: messageType,\n      activate\n    });\n    return true;\n  }\n  hasAtLeastOneBox() {\n    return this.state.records.boxes.length > 0;\n  }\n  hasAtLeastOneBoxWithTitle() {\n    return this.state.records.boxes.some((b) => b.name);\n  }\n  getMessages() {\n    return this.state.records.messages;\n  }\n  getBoxes() {\n    return this.state.records.boxes;\n  }\n  getActors() {\n    return this.state.records.actors;\n  }\n  getCreatedActors() {\n    return this.state.records.createdActors;\n  }\n  getDestroyedActors() {\n    return this.state.records.destroyedActors;\n  }\n  getActor(id) {\n    return this.state.records.actors.get(id);\n  }\n  getActorKeys() {\n    return [...this.state.records.actors.keys()];\n  }\n  enableSequenceNumbers() {\n    this.state.records.sequenceNumbersEnabled = true;\n  }\n  disableSequenceNumbers() {\n    this.state.records.sequenceNumbersEnabled = false;\n  }\n  showSequenceNumbers() {\n    return this.state.records.sequenceNumbersEnabled;\n  }\n  setWrap(wrapSetting) {\n    this.state.records.wrapEnabled = wrapSetting;\n  }\n  extractWrap(text) {\n    if (text === void 0) {\n      return {};\n    }\n    text = text.trim();\n    const wrap = /^:?wrap:/.exec(text) !== null ? true : /^:?nowrap:/.exec(text) !== null ? false : void 0;\n    const cleanedText = (wrap === void 0 ? text : text.replace(/^:?(?:no)?wrap:/, \"\")).trim();\n    return { cleanedText, wrap };\n  }\n  autoWrap() {\n    if (this.state.records.wrapEnabled !== void 0) {\n      return this.state.records.wrapEnabled;\n    }\n    return (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.getConfig2)().sequence?.wrap ?? false;\n  }\n  clear() {\n    this.state.reset();\n    (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.clear)();\n  }\n  parseMessage(str) {\n    const trimmedStr = str.trim();\n    const { wrap, cleanedText } = this.extractWrap(trimmedStr);\n    const message = {\n      text: cleanedText,\n      wrap\n    };\n    _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.log.debug(`parseMessage: ${JSON.stringify(message)}`);\n    return message;\n  }\n  // We expect the box statement to be color first then description\n  // The color can be rgb,rgba,hsl,hsla, or css code names  #hex codes are not supported for now because of the way the char # is handled\n  // We extract first segment as color, the rest of the line is considered as text\n  parseBoxData(str) {\n    const match = /^((?:rgba?|hsla?)\\s*\\(.*\\)|\\w*)(.*)$/.exec(str);\n    let color = match?.[1] ? match[1].trim() : \"transparent\";\n    let title = match?.[2] ? match[2].trim() : void 0;\n    if (window?.CSS) {\n      if (!window.CSS.supports(\"color\", color)) {\n        color = \"transparent\";\n        title = str.trim();\n      }\n    } else {\n      const style = new Option().style;\n      style.color = color;\n      if (style.color !== color) {\n        color = \"transparent\";\n        title = str.trim();\n      }\n    }\n    const { wrap, cleanedText } = this.extractWrap(title);\n    return {\n      text: cleanedText ? (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.sanitizeText)(cleanedText, (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.getConfig2)()) : void 0,\n      color,\n      wrap\n    };\n  }\n  addNote(actor, placement, message) {\n    const note = {\n      actor,\n      placement,\n      message: message.text,\n      wrap: message.wrap ?? this.autoWrap()\n    };\n    const actors = [].concat(actor, actor);\n    this.state.records.notes.push(note);\n    this.state.records.messages.push({\n      id: this.state.records.messages.length.toString(),\n      from: actors[0],\n      to: actors[1],\n      message: message.text,\n      wrap: message.wrap ?? this.autoWrap(),\n      type: this.LINETYPE.NOTE,\n      placement\n    });\n  }\n  addLinks(actorId, text) {\n    const actor = this.getActor(actorId);\n    try {\n      let sanitizedText = (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.sanitizeText)(text.text, (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.getConfig2)());\n      sanitizedText = sanitizedText.replace(/&equals;/g, \"=\");\n      sanitizedText = sanitizedText.replace(/&amp;/g, \"&\");\n      const links = JSON.parse(sanitizedText);\n      this.insertLinks(actor, links);\n    } catch (e) {\n      _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.log.error(\"error while parsing actor link text\", e);\n    }\n  }\n  addALink(actorId, text) {\n    const actor = this.getActor(actorId);\n    try {\n      const links = {};\n      let sanitizedText = (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.sanitizeText)(text.text, (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.getConfig2)());\n      const sep = sanitizedText.indexOf(\"@\");\n      sanitizedText = sanitizedText.replace(/&equals;/g, \"=\");\n      sanitizedText = sanitizedText.replace(/&amp;/g, \"&\");\n      const label = sanitizedText.slice(0, sep - 1).trim();\n      const link = sanitizedText.slice(sep + 1).trim();\n      links[label] = link;\n      this.insertLinks(actor, links);\n    } catch (e) {\n      _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.log.error(\"error while parsing actor link text\", e);\n    }\n  }\n  insertLinks(actor, links) {\n    if (actor.links == null) {\n      actor.links = links;\n    } else {\n      for (const key in links) {\n        actor.links[key] = links[key];\n      }\n    }\n  }\n  addProperties(actorId, text) {\n    const actor = this.getActor(actorId);\n    try {\n      const sanitizedText = (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.sanitizeText)(text.text, (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.getConfig2)());\n      const properties = JSON.parse(sanitizedText);\n      this.insertProperties(actor, properties);\n    } catch (e) {\n      _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.log.error(\"error while parsing actor properties text\", e);\n    }\n  }\n  insertProperties(actor, properties) {\n    if (actor.properties == null) {\n      actor.properties = properties;\n    } else {\n      for (const key in properties) {\n        actor.properties[key] = properties[key];\n      }\n    }\n  }\n  boxEnd() {\n    this.state.records.currentBox = void 0;\n  }\n  addDetails(actorId, text) {\n    const actor = this.getActor(actorId);\n    const elem = document.getElementById(text.text);\n    try {\n      const text2 = elem.innerHTML;\n      const details = JSON.parse(text2);\n      if (details.properties) {\n        this.insertProperties(actor, details.properties);\n      }\n      if (details.links) {\n        this.insertLinks(actor, details.links);\n      }\n    } catch (e) {\n      _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.log.error(\"error while parsing actor details text\", e);\n    }\n  }\n  getActorProperty(actor, key) {\n    if (actor?.properties !== void 0) {\n      return actor.properties[key];\n    }\n    return void 0;\n  }\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-redundant-type-constituents\n  apply(param) {\n    if (Array.isArray(param)) {\n      param.forEach((item) => {\n        this.apply(item);\n      });\n    } else {\n      switch (param.type) {\n        case \"sequenceIndex\":\n          this.state.records.messages.push({\n            id: this.state.records.messages.length.toString(),\n            from: void 0,\n            to: void 0,\n            message: {\n              start: param.sequenceIndex,\n              step: param.sequenceIndexStep,\n              visible: param.sequenceVisible\n            },\n            wrap: false,\n            type: param.signalType\n          });\n          break;\n        case \"addParticipant\":\n          this.addActor(param.actor, param.actor, param.description, param.draw, param.config);\n          break;\n        case \"createParticipant\":\n          if (this.state.records.actors.has(param.actor)) {\n            throw new Error(\n              \"It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior\"\n            );\n          }\n          this.state.records.lastCreated = param.actor;\n          this.addActor(param.actor, param.actor, param.description, param.draw, param.config);\n          this.state.records.createdActors.set(param.actor, this.state.records.messages.length);\n          break;\n        case \"destroyParticipant\":\n          this.state.records.lastDestroyed = param.actor;\n          this.state.records.destroyedActors.set(param.actor, this.state.records.messages.length);\n          break;\n        case \"activeStart\":\n          this.addSignal(param.actor, void 0, void 0, param.signalType);\n          break;\n        case \"activeEnd\":\n          this.addSignal(param.actor, void 0, void 0, param.signalType);\n          break;\n        case \"addNote\":\n          this.addNote(param.actor, param.placement, param.text);\n          break;\n        case \"addLinks\":\n          this.addLinks(param.actor, param.text);\n          break;\n        case \"addALink\":\n          this.addALink(param.actor, param.text);\n          break;\n        case \"addProperties\":\n          this.addProperties(param.actor, param.text);\n          break;\n        case \"addDetails\":\n          this.addDetails(param.actor, param.text);\n          break;\n        case \"addMessage\":\n          if (this.state.records.lastCreated) {\n            if (param.to !== this.state.records.lastCreated) {\n              throw new Error(\n                \"The created participant \" + this.state.records.lastCreated.name + \" does not have an associated creating message after its declaration. Please check the sequence diagram.\"\n              );\n            } else {\n              this.state.records.lastCreated = void 0;\n            }\n          } else if (this.state.records.lastDestroyed) {\n            if (param.to !== this.state.records.lastDestroyed && param.from !== this.state.records.lastDestroyed) {\n              throw new Error(\n                \"The destroyed participant \" + this.state.records.lastDestroyed.name + \" does not have an associated destroying message after its declaration. Please check the sequence diagram.\"\n              );\n            } else {\n              this.state.records.lastDestroyed = void 0;\n            }\n          }\n          this.addSignal(param.from, param.to, param.msg, param.signalType, param.activate);\n          break;\n        case \"boxStart\":\n          this.addBox(param.boxData);\n          break;\n        case \"boxEnd\":\n          this.boxEnd();\n          break;\n        case \"loopStart\":\n          this.addSignal(void 0, void 0, param.loopText, param.signalType);\n          break;\n        case \"loopEnd\":\n          this.addSignal(void 0, void 0, void 0, param.signalType);\n          break;\n        case \"rectStart\":\n          this.addSignal(void 0, void 0, param.color, param.signalType);\n          break;\n        case \"rectEnd\":\n          this.addSignal(void 0, void 0, void 0, param.signalType);\n          break;\n        case \"optStart\":\n          this.addSignal(void 0, void 0, param.optText, param.signalType);\n          break;\n        case \"optEnd\":\n          this.addSignal(void 0, void 0, void 0, param.signalType);\n          break;\n        case \"altStart\":\n          this.addSignal(void 0, void 0, param.altText, param.signalType);\n          break;\n        case \"else\":\n          this.addSignal(void 0, void 0, param.altText, param.signalType);\n          break;\n        case \"altEnd\":\n          this.addSignal(void 0, void 0, void 0, param.signalType);\n          break;\n        case \"setAccTitle\":\n          (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.setAccTitle)(param.text);\n          break;\n        case \"parStart\":\n          this.addSignal(void 0, void 0, param.parText, param.signalType);\n          break;\n        case \"and\":\n          this.addSignal(void 0, void 0, param.parText, param.signalType);\n          break;\n        case \"parEnd\":\n          this.addSignal(void 0, void 0, void 0, param.signalType);\n          break;\n        case \"criticalStart\":\n          this.addSignal(void 0, void 0, param.criticalText, param.signalType);\n          break;\n        case \"option\":\n          this.addSignal(void 0, void 0, param.optionText, param.signalType);\n          break;\n        case \"criticalEnd\":\n          this.addSignal(void 0, void 0, void 0, param.signalType);\n          break;\n        case \"breakStart\":\n          this.addSignal(void 0, void 0, param.breakText, param.signalType);\n          break;\n        case \"breakEnd\":\n          this.addSignal(void 0, void 0, void 0, param.signalType);\n          break;\n      }\n    }\n  }\n  getConfig() {\n    return (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.getConfig2)().sequence;\n  }\n};\n\n// src/diagrams/sequence/styles.js\nvar getStyles = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)((options) => `.actor {\n    stroke: ${options.actorBorder};\n    fill: ${options.actorBkg};\n  }\n\n  text.actor > tspan {\n    fill: ${options.actorTextColor};\n    stroke: none;\n  }\n\n  .actor-line {\n    stroke: ${options.actorLineColor};\n  }\n  \n  .innerArc {\n    stroke-width: 1.5;\n    stroke-dasharray: none;\n  }\n\n  .messageLine0 {\n    stroke-width: 1.5;\n    stroke-dasharray: none;\n    stroke: ${options.signalColor};\n  }\n\n  .messageLine1 {\n    stroke-width: 1.5;\n    stroke-dasharray: 2, 2;\n    stroke: ${options.signalColor};\n  }\n\n  #arrowhead path {\n    fill: ${options.signalColor};\n    stroke: ${options.signalColor};\n  }\n\n  .sequenceNumber {\n    fill: ${options.sequenceNumberColor};\n  }\n\n  #sequencenumber {\n    fill: ${options.signalColor};\n  }\n\n  #crosshead path {\n    fill: ${options.signalColor};\n    stroke: ${options.signalColor};\n  }\n\n  .messageText {\n    fill: ${options.signalTextColor};\n    stroke: none;\n  }\n\n  .labelBox {\n    stroke: ${options.labelBoxBorderColor};\n    fill: ${options.labelBoxBkgColor};\n  }\n\n  .labelText, .labelText > tspan {\n    fill: ${options.labelTextColor};\n    stroke: none;\n  }\n\n  .loopText, .loopText > tspan {\n    fill: ${options.loopTextColor};\n    stroke: none;\n  }\n\n  .loopLine {\n    stroke-width: 2px;\n    stroke-dasharray: 2, 2;\n    stroke: ${options.labelBoxBorderColor};\n    fill: ${options.labelBoxBorderColor};\n  }\n\n  .note {\n    //stroke: #decc93;\n    stroke: ${options.noteBorderColor};\n    fill: ${options.noteBkgColor};\n  }\n\n  .noteText, .noteText > tspan {\n    fill: ${options.noteTextColor};\n    stroke: none;\n  }\n\n  .activation0 {\n    fill: ${options.activationBkgColor};\n    stroke: ${options.activationBorderColor};\n  }\n\n  .activation1 {\n    fill: ${options.activationBkgColor};\n    stroke: ${options.activationBorderColor};\n  }\n\n  .activation2 {\n    fill: ${options.activationBkgColor};\n    stroke: ${options.activationBorderColor};\n  }\n\n  .actorPopupMenu {\n    position: absolute;\n  }\n\n  .actorPopupMenuPanel {\n    position: absolute;\n    fill: ${options.actorBkg};\n    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n    filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n  .actor-man line {\n    stroke: ${options.actorBorder};\n    fill: ${options.actorBkg};\n  }\n  .actor-man circle, line {\n    stroke: ${options.actorBorder};\n    fill: ${options.actorBkg};\n    stroke-width: 2px;\n  }\n\n`, \"getStyles\");\nvar styles_default = getStyles;\n\n// src/diagrams/sequence/sequenceRenderer.ts\n\n\n// src/diagrams/sequence/svgDraw.js\n\nvar ACTOR_TYPE_WIDTH = 18 * 2;\nvar TOP_ACTOR_CLASS = \"actor-top\";\nvar BOTTOM_ACTOR_CLASS = \"actor-bottom\";\nvar ACTOR_BOX_CLASS = \"actor-box\";\nvar ACTOR_MAN_FIGURE_CLASS = \"actor-man\";\nvar drawRect2 = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(elem, rectData) {\n  return (0,_chunk_TZMSLE5B_mjs__WEBPACK_IMPORTED_MODULE_0__.drawRect)(elem, rectData);\n}, \"drawRect\");\nvar drawPopup = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(elem, actor, minMenuWidth, textAttrs, forceMenus) {\n  if (actor.links === void 0 || actor.links === null || Object.keys(actor.links).length === 0) {\n    return { height: 0, width: 0 };\n  }\n  const links = actor.links;\n  const actorCnt2 = actor.actorCnt;\n  const rectData = actor.rectData;\n  var displayValue = \"none\";\n  if (forceMenus) {\n    displayValue = \"block !important\";\n  }\n  const g = elem.append(\"g\");\n  g.attr(\"id\", \"actor\" + actorCnt2 + \"_popup\");\n  g.attr(\"class\", \"actorPopupMenu\");\n  g.attr(\"display\", displayValue);\n  var actorClass = \"\";\n  if (rectData.class !== void 0) {\n    actorClass = \" \" + rectData.class;\n  }\n  let menuWidth = rectData.width > minMenuWidth ? rectData.width : minMenuWidth;\n  const rectElem = g.append(\"rect\");\n  rectElem.attr(\"class\", \"actorPopupMenuPanel\" + actorClass);\n  rectElem.attr(\"x\", rectData.x);\n  rectElem.attr(\"y\", rectData.height);\n  rectElem.attr(\"fill\", rectData.fill);\n  rectElem.attr(\"stroke\", rectData.stroke);\n  rectElem.attr(\"width\", menuWidth);\n  rectElem.attr(\"height\", rectData.height);\n  rectElem.attr(\"rx\", rectData.rx);\n  rectElem.attr(\"ry\", rectData.ry);\n  if (links != null) {\n    var linkY = 20;\n    for (let key in links) {\n      var linkElem = g.append(\"a\");\n      var sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_7__.sanitizeUrl)(links[key]);\n      linkElem.attr(\"xlink:href\", sanitizedLink);\n      linkElem.attr(\"target\", \"_blank\");\n      _drawMenuItemTextCandidateFunc(textAttrs)(\n        key,\n        linkElem,\n        rectData.x + 10,\n        rectData.height + linkY,\n        menuWidth,\n        20,\n        { class: \"actor\" },\n        textAttrs\n      );\n      linkY += 30;\n    }\n  }\n  rectElem.attr(\"height\", linkY);\n  return { height: rectData.height + linkY, width: menuWidth };\n}, \"drawPopup\");\nvar popupMenuToggle = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(popId) {\n  return \"var pu = document.getElementById('\" + popId + \"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }\";\n}, \"popupMenuToggle\");\nvar drawKatex = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(async function(elem, textData, msgModel = null) {\n  let textElem = elem.append(\"foreignObject\");\n  const linesSanitized = await (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.renderKatexSanitized)(textData.text, (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.getConfig)());\n  const divElem = textElem.append(\"xhtml:div\").attr(\"style\", \"width: fit-content;\").attr(\"xmlns\", \"http://www.w3.org/1999/xhtml\").html(linesSanitized);\n  const dim = divElem.node().getBoundingClientRect();\n  textElem.attr(\"height\", Math.round(dim.height)).attr(\"width\", Math.round(dim.width));\n  if (textData.class === \"noteText\") {\n    const rectElem = elem.node().firstChild;\n    rectElem.setAttribute(\"height\", dim.height + 2 * textData.textMargin);\n    const rectDim = rectElem.getBBox();\n    textElem.attr(\"x\", Math.round(rectDim.x + rectDim.width / 2 - dim.width / 2)).attr(\"y\", Math.round(rectDim.y + rectDim.height / 2 - dim.height / 2));\n  } else if (msgModel) {\n    let { startx, stopx, starty } = msgModel;\n    if (startx > stopx) {\n      const temp = startx;\n      startx = stopx;\n      stopx = temp;\n    }\n    textElem.attr(\"x\", Math.round(startx + Math.abs(startx - stopx) / 2 - dim.width / 2));\n    if (textData.class === \"loopText\") {\n      textElem.attr(\"y\", Math.round(starty));\n    } else {\n      textElem.attr(\"y\", Math.round(starty - dim.height));\n    }\n  }\n  return [textElem];\n}, \"drawKatex\");\nvar drawText = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(elem, textData) {\n  let prevTextHeight = 0;\n  let textHeight = 0;\n  const lines = textData.text.split(_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.lineBreakRegex);\n  const [_textFontSize, _textFontSizePx] = (0,_chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_3__.parseFontSize)(textData.fontSize);\n  let textElems = [];\n  let dy = 0;\n  let yfunc = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(() => textData.y, \"yfunc\");\n  if (textData.valign !== void 0 && textData.textMargin !== void 0 && textData.textMargin > 0) {\n    switch (textData.valign) {\n      case \"top\":\n      case \"start\":\n        yfunc = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(() => Math.round(textData.y + textData.textMargin), \"yfunc\");\n        break;\n      case \"middle\":\n      case \"center\":\n        yfunc = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(() => Math.round(textData.y + (prevTextHeight + textHeight + textData.textMargin) / 2), \"yfunc\");\n        break;\n      case \"bottom\":\n      case \"end\":\n        yfunc = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(() => Math.round(\n          textData.y + (prevTextHeight + textHeight + 2 * textData.textMargin) - textData.textMargin\n        ), \"yfunc\");\n        break;\n    }\n  }\n  if (textData.anchor !== void 0 && textData.textMargin !== void 0 && textData.width !== void 0) {\n    switch (textData.anchor) {\n      case \"left\":\n      case \"start\":\n        textData.x = Math.round(textData.x + textData.textMargin);\n        textData.anchor = \"start\";\n        textData.dominantBaseline = \"middle\";\n        textData.alignmentBaseline = \"middle\";\n        break;\n      case \"middle\":\n      case \"center\":\n        textData.x = Math.round(textData.x + textData.width / 2);\n        textData.anchor = \"middle\";\n        textData.dominantBaseline = \"middle\";\n        textData.alignmentBaseline = \"middle\";\n        break;\n      case \"right\":\n      case \"end\":\n        textData.x = Math.round(textData.x + textData.width - textData.textMargin);\n        textData.anchor = \"end\";\n        textData.dominantBaseline = \"middle\";\n        textData.alignmentBaseline = \"middle\";\n        break;\n    }\n  }\n  for (let [i, line] of lines.entries()) {\n    if (textData.textMargin !== void 0 && textData.textMargin === 0 && _textFontSize !== void 0) {\n      dy = i * _textFontSize;\n    }\n    const textElem = elem.append(\"text\");\n    textElem.attr(\"x\", textData.x);\n    textElem.attr(\"y\", yfunc());\n    if (textData.anchor !== void 0) {\n      textElem.attr(\"text-anchor\", textData.anchor).attr(\"dominant-baseline\", textData.dominantBaseline).attr(\"alignment-baseline\", textData.alignmentBaseline);\n    }\n    if (textData.fontFamily !== void 0) {\n      textElem.style(\"font-family\", textData.fontFamily);\n    }\n    if (_textFontSizePx !== void 0) {\n      textElem.style(\"font-size\", _textFontSizePx);\n    }\n    if (textData.fontWeight !== void 0) {\n      textElem.style(\"font-weight\", textData.fontWeight);\n    }\n    if (textData.fill !== void 0) {\n      textElem.attr(\"fill\", textData.fill);\n    }\n    if (textData.class !== void 0) {\n      textElem.attr(\"class\", textData.class);\n    }\n    if (textData.dy !== void 0) {\n      textElem.attr(\"dy\", textData.dy);\n    } else if (dy !== 0) {\n      textElem.attr(\"dy\", dy);\n    }\n    const text = line || _chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_3__.ZERO_WIDTH_SPACE;\n    if (textData.tspan) {\n      const span = textElem.append(\"tspan\");\n      span.attr(\"x\", textData.x);\n      if (textData.fill !== void 0) {\n        span.attr(\"fill\", textData.fill);\n      }\n      span.text(text);\n    } else {\n      textElem.text(text);\n    }\n    if (textData.valign !== void 0 && textData.textMargin !== void 0 && textData.textMargin > 0) {\n      textHeight += (textElem._groups || textElem)[0][0].getBBox().height;\n      prevTextHeight = textHeight;\n    }\n    textElems.push(textElem);\n  }\n  return textElems;\n}, \"drawText\");\nvar drawLabel = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(elem, txtObject) {\n  function genPoints(x, y, width, height, cut) {\n    return x + \",\" + y + \" \" + (x + width) + \",\" + y + \" \" + (x + width) + \",\" + (y + height - cut) + \" \" + (x + width - cut * 1.2) + \",\" + (y + height) + \" \" + x + \",\" + (y + height);\n  }\n  (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(genPoints, \"genPoints\");\n  const polygon = elem.append(\"polygon\");\n  polygon.attr(\"points\", genPoints(txtObject.x, txtObject.y, txtObject.width, txtObject.height, 7));\n  polygon.attr(\"class\", \"labelBox\");\n  txtObject.y = txtObject.y + txtObject.height / 2;\n  drawText(elem, txtObject);\n  return polygon;\n}, \"drawLabel\");\nvar actorCnt = -1;\nvar fixLifeLineHeights = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)((diagram2, actors, actorKeys, conf2) => {\n  if (!diagram2.select) {\n    return;\n  }\n  actorKeys.forEach((actorKey) => {\n    const actor = actors.get(actorKey);\n    const actorDOM = diagram2.select(\"#actor\" + actor.actorCnt);\n    if (!conf2.mirrorActors && actor.stopy) {\n      actorDOM.attr(\"y2\", actor.stopy + actor.height / 2);\n    } else if (conf2.mirrorActors) {\n      actorDOM.attr(\"y2\", actor.stopy);\n    }\n  });\n}, \"fixLifeLineHeights\");\nvar drawActorTypeParticipant = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(elem, actor, conf2, isFooter) {\n  const actorY = isFooter ? actor.stopy : actor.starty;\n  const center = actor.x + actor.width / 2;\n  const centerY = actorY + actor.height;\n  const boxplusLineGroup = elem.append(\"g\").lower();\n  var g = boxplusLineGroup;\n  if (!isFooter) {\n    actorCnt++;\n    if (Object.keys(actor.links || {}).length && !conf2.forceMenus) {\n      g.attr(\"onclick\", popupMenuToggle(`actor${actorCnt}_popup`)).attr(\"cursor\", \"pointer\");\n    }\n    g.append(\"line\").attr(\"id\", \"actor\" + actorCnt).attr(\"x1\", center).attr(\"y1\", centerY).attr(\"x2\", center).attr(\"y2\", 2e3).attr(\"class\", \"actor-line 200\").attr(\"stroke-width\", \"0.5px\").attr(\"stroke\", \"#999\").attr(\"name\", actor.name);\n    g = boxplusLineGroup.append(\"g\");\n    actor.actorCnt = actorCnt;\n    if (actor.links != null) {\n      g.attr(\"id\", \"root-\" + actorCnt);\n    }\n  }\n  const rect = (0,_chunk_TZMSLE5B_mjs__WEBPACK_IMPORTED_MODULE_0__.getNoteRect)();\n  var cssclass = \"actor\";\n  if (actor.properties?.class) {\n    cssclass = actor.properties.class;\n  } else {\n    rect.fill = \"#eaeaea\";\n  }\n  if (isFooter) {\n    cssclass += ` ${BOTTOM_ACTOR_CLASS}`;\n  } else {\n    cssclass += ` ${TOP_ACTOR_CLASS}`;\n  }\n  rect.x = actor.x;\n  rect.y = actorY;\n  rect.width = actor.width;\n  rect.height = actor.height;\n  rect.class = cssclass;\n  rect.rx = 3;\n  rect.ry = 3;\n  rect.name = actor.name;\n  const rectElem = drawRect2(g, rect);\n  actor.rectData = rect;\n  if (actor.properties?.icon) {\n    const iconSrc = actor.properties.icon.trim();\n    if (iconSrc.charAt(0) === \"@\") {\n      (0,_chunk_TZMSLE5B_mjs__WEBPACK_IMPORTED_MODULE_0__.drawEmbeddedImage)(g, rect.x + rect.width - 20, rect.y + 10, iconSrc.substr(1));\n    } else {\n      (0,_chunk_TZMSLE5B_mjs__WEBPACK_IMPORTED_MODULE_0__.drawImage)(g, rect.x + rect.width - 20, rect.y + 10, iconSrc);\n    }\n  }\n  _drawTextCandidateFunc(conf2, (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.hasKatex)(actor.description))(\n    actor.description,\n    g,\n    rect.x,\n    rect.y,\n    rect.width,\n    rect.height,\n    { class: `actor ${ACTOR_BOX_CLASS}` },\n    conf2\n  );\n  let height = actor.height;\n  if (rectElem.node) {\n    const bounds2 = rectElem.node().getBBox();\n    actor.height = bounds2.height;\n    height = bounds2.height;\n  }\n  return height;\n}, \"drawActorTypeParticipant\");\nvar drawActorTypeCollections = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(elem, actor, conf2, isFooter) {\n  const actorY = isFooter ? actor.stopy : actor.starty;\n  const center = actor.x + actor.width / 2;\n  const centerY = actorY + actor.height;\n  const boxplusLineGroup = elem.append(\"g\").lower();\n  var g = boxplusLineGroup;\n  if (!isFooter) {\n    actorCnt++;\n    if (Object.keys(actor.links || {}).length && !conf2.forceMenus) {\n      g.attr(\"onclick\", popupMenuToggle(`actor${actorCnt}_popup`)).attr(\"cursor\", \"pointer\");\n    }\n    g.append(\"line\").attr(\"id\", \"actor\" + actorCnt).attr(\"x1\", center).attr(\"y1\", centerY).attr(\"x2\", center).attr(\"y2\", 2e3).attr(\"class\", \"actor-line 200\").attr(\"stroke-width\", \"0.5px\").attr(\"stroke\", \"#999\").attr(\"name\", actor.name);\n    g = boxplusLineGroup.append(\"g\");\n    actor.actorCnt = actorCnt;\n    if (actor.links != null) {\n      g.attr(\"id\", \"root-\" + actorCnt);\n    }\n  }\n  const rect = (0,_chunk_TZMSLE5B_mjs__WEBPACK_IMPORTED_MODULE_0__.getNoteRect)();\n  var cssclass = \"actor\";\n  if (actor.properties?.class) {\n    cssclass = actor.properties.class;\n  } else {\n    rect.fill = \"#eaeaea\";\n  }\n  if (isFooter) {\n    cssclass += ` ${BOTTOM_ACTOR_CLASS}`;\n  } else {\n    cssclass += ` ${TOP_ACTOR_CLASS}`;\n  }\n  rect.x = actor.x;\n  rect.y = actorY;\n  rect.width = actor.width;\n  rect.height = actor.height;\n  rect.class = cssclass;\n  rect.name = actor.name;\n  const offset = 6;\n  const shadowRect = {\n    ...rect,\n    x: rect.x + (isFooter ? -offset : -offset),\n    y: rect.y + (isFooter ? +offset : +offset),\n    class: \"actor\"\n  };\n  const rectElem = drawRect2(g, rect);\n  drawRect2(g, shadowRect);\n  actor.rectData = rect;\n  if (actor.properties?.icon) {\n    const iconSrc = actor.properties.icon.trim();\n    if (iconSrc.charAt(0) === \"@\") {\n      (0,_chunk_TZMSLE5B_mjs__WEBPACK_IMPORTED_MODULE_0__.drawEmbeddedImage)(g, rect.x + rect.width - 20, rect.y + 10, iconSrc.substr(1));\n    } else {\n      (0,_chunk_TZMSLE5B_mjs__WEBPACK_IMPORTED_MODULE_0__.drawImage)(g, rect.x + rect.width - 20, rect.y + 10, iconSrc);\n    }\n  }\n  _drawTextCandidateFunc(conf2, (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.hasKatex)(actor.description))(\n    actor.description,\n    g,\n    rect.x - offset,\n    rect.y + offset,\n    rect.width,\n    rect.height,\n    { class: `actor ${ACTOR_BOX_CLASS}` },\n    conf2\n  );\n  let height = actor.height;\n  if (rectElem.node) {\n    const bounds2 = rectElem.node().getBBox();\n    actor.height = bounds2.height;\n    height = bounds2.height;\n  }\n  return height;\n}, \"drawActorTypeCollections\");\nvar drawActorTypeQueue = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(elem, actor, conf2, isFooter) {\n  const actorY = isFooter ? actor.stopy : actor.starty;\n  const center = actor.x + actor.width / 2;\n  const centerY = actorY + actor.height;\n  const boxplusLineGroup = elem.append(\"g\").lower();\n  let g = boxplusLineGroup;\n  if (!isFooter) {\n    actorCnt++;\n    if (Object.keys(actor.links || {}).length && !conf2.forceMenus) {\n      g.attr(\"onclick\", popupMenuToggle(`actor${actorCnt}_popup`)).attr(\"cursor\", \"pointer\");\n    }\n    g.append(\"line\").attr(\"id\", \"actor\" + actorCnt).attr(\"x1\", center).attr(\"y1\", centerY).attr(\"x2\", center).attr(\"y2\", 2e3).attr(\"class\", \"actor-line 200\").attr(\"stroke-width\", \"0.5px\").attr(\"stroke\", \"#999\").attr(\"name\", actor.name);\n    g = boxplusLineGroup.append(\"g\");\n    actor.actorCnt = actorCnt;\n    if (actor.links != null) {\n      g.attr(\"id\", \"root-\" + actorCnt);\n    }\n  }\n  const rect = (0,_chunk_TZMSLE5B_mjs__WEBPACK_IMPORTED_MODULE_0__.getNoteRect)();\n  let cssclass = \"actor\";\n  if (actor.properties?.class) {\n    cssclass = actor.properties.class;\n  } else {\n    rect.fill = \"#eaeaea\";\n  }\n  if (isFooter) {\n    cssclass += ` ${BOTTOM_ACTOR_CLASS}`;\n  } else {\n    cssclass += ` ${TOP_ACTOR_CLASS}`;\n  }\n  rect.x = actor.x;\n  rect.y = actorY;\n  rect.width = actor.width;\n  rect.height = actor.height;\n  rect.class = cssclass;\n  rect.name = actor.name;\n  const ry = rect.height / 2;\n  const rx = ry / (2.5 + rect.height / 50);\n  const cylinderGroup = g.append(\"g\");\n  const cylinderArc = g.append(\"g\");\n  cylinderGroup.append(\"path\").attr(\n    \"d\",\n    `M ${rect.x},${rect.y + ry}\n    a ${rx},${ry} 0 0 0 0,${rect.height}\n    h ${rect.width - 2 * rx}\n    a ${rx},${ry} 0 0 0 0,-${rect.height}\n    Z\n  `\n  ).attr(\"class\", cssclass);\n  cylinderArc.append(\"path\").attr(\n    \"d\",\n    `M ${rect.x},${rect.y + ry}\n      a ${rx},${ry} 0 0 0 0,${rect.height}`\n  ).attr(\"stroke\", \"#666\").attr(\"stroke-width\", \"1px\").attr(\"class\", cssclass);\n  cylinderGroup.attr(\"transform\", `translate(${rx}, ${-(rect.height / 2)})`);\n  cylinderArc.attr(\"transform\", `translate(${rect.width - rx}, ${-rect.height / 2})`);\n  actor.rectData = rect;\n  if (actor.properties?.icon) {\n    const iconSrc = actor.properties.icon.trim();\n    const iconX = rect.x + rect.width - 20;\n    const iconY = rect.y + 10;\n    if (iconSrc.charAt(0) === \"@\") {\n      (0,_chunk_TZMSLE5B_mjs__WEBPACK_IMPORTED_MODULE_0__.drawEmbeddedImage)(g, iconX, iconY, iconSrc.substr(1));\n    } else {\n      (0,_chunk_TZMSLE5B_mjs__WEBPACK_IMPORTED_MODULE_0__.drawImage)(g, iconX, iconY, iconSrc);\n    }\n  }\n  _drawTextCandidateFunc(conf2, (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.hasKatex)(actor.description))(\n    actor.description,\n    g,\n    rect.x,\n    rect.y,\n    rect.width,\n    rect.height,\n    { class: `actor ${ACTOR_BOX_CLASS}` },\n    conf2\n  );\n  let height = actor.height;\n  const lastPath = cylinderGroup.select(\"path:last-child\");\n  if (lastPath.node()) {\n    const bounds2 = lastPath.node().getBBox();\n    actor.height = bounds2.height;\n    height = bounds2.height;\n  }\n  return height;\n}, \"drawActorTypeQueue\");\nvar drawActorTypeControl = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(elem, actor, conf2, isFooter) {\n  const actorY = isFooter ? actor.stopy : actor.starty;\n  const center = actor.x + actor.width / 2;\n  const centerY = actorY + 75;\n  const line = elem.append(\"g\").lower();\n  if (!isFooter) {\n    actorCnt++;\n    line.append(\"line\").attr(\"id\", \"actor\" + actorCnt).attr(\"x1\", center).attr(\"y1\", centerY).attr(\"x2\", center).attr(\"y2\", 2e3).attr(\"class\", \"actor-line 200\").attr(\"stroke-width\", \"0.5px\").attr(\"stroke\", \"#999\").attr(\"name\", actor.name);\n    actor.actorCnt = actorCnt;\n  }\n  const actElem = elem.append(\"g\");\n  let cssClass = ACTOR_MAN_FIGURE_CLASS;\n  if (isFooter) {\n    cssClass += ` ${BOTTOM_ACTOR_CLASS}`;\n  } else {\n    cssClass += ` ${TOP_ACTOR_CLASS}`;\n  }\n  actElem.attr(\"class\", cssClass);\n  actElem.attr(\"name\", actor.name);\n  const rect = (0,_chunk_TZMSLE5B_mjs__WEBPACK_IMPORTED_MODULE_0__.getNoteRect)();\n  rect.x = actor.x;\n  rect.y = actorY;\n  rect.fill = \"#eaeaea\";\n  rect.width = actor.width;\n  rect.height = actor.height;\n  rect.class = \"actor\";\n  const cx = actor.x + actor.width / 2;\n  const cy = actorY + 30;\n  const r = 18;\n  actElem.append(\"defs\").append(\"marker\").attr(\"id\", \"filled-head-control\").attr(\"refX\", 11).attr(\"refY\", 5.8).attr(\"markerWidth\", 20).attr(\"markerHeight\", 28).attr(\"orient\", \"172.5\").append(\"path\").attr(\"d\", \"M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z\");\n  actElem.append(\"circle\").attr(\"cx\", cx).attr(\"cy\", cy).attr(\"r\", r).attr(\"fill\", \"#eaeaf7\").attr(\"stroke\", \"#666\").attr(\"stroke-width\", 1.2);\n  actElem.append(\"line\").attr(\"marker-end\", \"url(#filled-head-control)\").attr(\"transform\", `translate(${cx}, ${cy - r})`);\n  const bounds2 = actElem.node().getBBox();\n  actor.height = bounds2.height + 2 * (conf2?.sequence?.labelBoxHeight ?? 0);\n  _drawTextCandidateFunc(conf2, (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.hasKatex)(actor.description))(\n    actor.description,\n    actElem,\n    rect.x,\n    rect.y + r + (isFooter ? 5 : 10),\n    rect.width,\n    rect.height,\n    { class: `actor ${ACTOR_MAN_FIGURE_CLASS}` },\n    conf2\n  );\n  return actor.height;\n}, \"drawActorTypeControl\");\nvar drawActorTypeEntity = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(elem, actor, conf2, isFooter) {\n  const actorY = isFooter ? actor.stopy : actor.starty;\n  const center = actor.x + actor.width / 2;\n  const centerY = actorY + 75;\n  const line = elem.append(\"g\").lower();\n  const actElem = elem.append(\"g\");\n  let cssClass = ACTOR_MAN_FIGURE_CLASS;\n  if (isFooter) {\n    cssClass += ` ${BOTTOM_ACTOR_CLASS}`;\n  } else {\n    cssClass += ` ${TOP_ACTOR_CLASS}`;\n  }\n  actElem.attr(\"class\", cssClass);\n  actElem.attr(\"name\", actor.name);\n  const rect = (0,_chunk_TZMSLE5B_mjs__WEBPACK_IMPORTED_MODULE_0__.getNoteRect)();\n  rect.x = actor.x;\n  rect.y = actorY;\n  rect.fill = \"#eaeaea\";\n  rect.width = actor.width;\n  rect.height = actor.height;\n  rect.class = \"actor\";\n  const cx = actor.x + actor.width / 2;\n  const cy = actorY + (!isFooter ? 25 : 10);\n  const r = 18;\n  actElem.append(\"circle\").attr(\"cx\", cx).attr(\"cy\", cy).attr(\"r\", r).attr(\"width\", actor.width).attr(\"height\", actor.height);\n  actElem.append(\"line\").attr(\"x1\", cx - r).attr(\"x2\", cx + r).attr(\"y1\", cy + r).attr(\"y2\", cy + r).attr(\"stroke\", \"#333\").attr(\"stroke-width\", 2);\n  const bounds2 = actElem.node().getBBox();\n  actor.height = bounds2.height + (conf2?.sequence?.labelBoxHeight ?? 0);\n  if (!isFooter) {\n    actorCnt++;\n    line.append(\"line\").attr(\"id\", \"actor\" + actorCnt).attr(\"x1\", center).attr(\"y1\", centerY).attr(\"x2\", center).attr(\"y2\", 2e3).attr(\"class\", \"actor-line 200\").attr(\"stroke-width\", \"0.5px\").attr(\"stroke\", \"#999\").attr(\"name\", actor.name);\n    actor.actorCnt = actorCnt;\n  }\n  _drawTextCandidateFunc(conf2, (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.hasKatex)(actor.description))(\n    actor.description,\n    actElem,\n    rect.x,\n    rect.y + (!isFooter ? (cy + r - actorY) / 2 : (cy - actorY + r - 5) / 2),\n    rect.width,\n    rect.height,\n    { class: `actor ${ACTOR_MAN_FIGURE_CLASS}` },\n    conf2\n  );\n  if (!isFooter) {\n    actElem.attr(\"transform\", `translate(${0}, ${r / 2})`);\n  } else {\n    actElem.attr(\"transform\", `translate(${0}, ${r / 2})`);\n  }\n  return actor.height;\n}, \"drawActorTypeEntity\");\nvar drawActorTypeDatabase = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(elem, actor, conf2, isFooter) {\n  const actorY = isFooter ? actor.stopy : actor.starty;\n  const center = actor.x + actor.width / 2;\n  const centerY = actorY + actor.height + 2 * conf2.boxTextMargin;\n  const boxplusLineGroup = elem.append(\"g\").lower();\n  let g = boxplusLineGroup;\n  if (!isFooter) {\n    actorCnt++;\n    if (Object.keys(actor.links || {}).length && !conf2.forceMenus) {\n      g.attr(\"onclick\", popupMenuToggle(`actor${actorCnt}_popup`)).attr(\"cursor\", \"pointer\");\n    }\n    g.append(\"line\").attr(\"id\", \"actor\" + actorCnt).attr(\"x1\", center).attr(\"y1\", centerY).attr(\"x2\", center).attr(\"y2\", 2e3).attr(\"class\", \"actor-line 200\").attr(\"stroke-width\", \"0.5px\").attr(\"stroke\", \"#999\").attr(\"name\", actor.name);\n    g = boxplusLineGroup.append(\"g\");\n    actor.actorCnt = actorCnt;\n    if (actor.links != null) {\n      g.attr(\"id\", \"root-\" + actorCnt);\n    }\n  }\n  const rect = (0,_chunk_TZMSLE5B_mjs__WEBPACK_IMPORTED_MODULE_0__.getNoteRect)();\n  let cssclass = \"actor\";\n  if (actor.properties?.class) {\n    cssclass = actor.properties.class;\n  } else {\n    rect.fill = \"#eaeaea\";\n  }\n  if (isFooter) {\n    cssclass += ` ${BOTTOM_ACTOR_CLASS}`;\n  } else {\n    cssclass += ` ${TOP_ACTOR_CLASS}`;\n  }\n  rect.x = actor.x;\n  rect.y = actorY;\n  rect.width = actor.width;\n  rect.height = actor.height;\n  rect.class = cssclass;\n  rect.name = actor.name;\n  rect.x = actor.x;\n  rect.y = actorY;\n  const w = rect.width / 4;\n  const h = rect.width / 4;\n  const rx = w / 2;\n  const ry = rx / (2.5 + w / 50);\n  const cylinderGroup = g.append(\"g\");\n  const d = `\n  M ${rect.x},${rect.y + ry}\n  a ${rx},${ry} 0 0 0 ${w},0\n  a ${rx},${ry} 0 0 0 -${w},0\n  l 0,${h - 2 * ry}\n  a ${rx},${ry} 0 0 0 ${w},0\n  l 0,-${h - 2 * ry}\n`;\n  cylinderGroup.append(\"path\").attr(\"d\", d).attr(\"fill\", \"#eaeaea\").attr(\"stroke\", \"#000\").attr(\"stroke-width\", 1).attr(\"class\", cssclass);\n  if (!isFooter) {\n    cylinderGroup.attr(\"transform\", `translate(${w * 1.5}, ${(rect.height + ry) / 4})`);\n  } else {\n    cylinderGroup.attr(\"transform\", `translate(${w * 1.5}, ${rect.height / 4 - 2 * ry})`);\n  }\n  actor.rectData = rect;\n  _drawTextCandidateFunc(conf2, (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.hasKatex)(actor.description))(\n    actor.description,\n    g,\n    rect.x,\n    rect.y + (!isFooter ? (rect.height + ry) / 2 : (rect.height + h) / 4),\n    rect.width,\n    rect.height,\n    { class: `actor ${ACTOR_BOX_CLASS}` },\n    conf2\n  );\n  const lastPath = cylinderGroup.select(\"path:last-child\");\n  if (lastPath.node()) {\n    const bounds2 = lastPath.node().getBBox();\n    actor.height = bounds2.height + (conf2.sequence.labelBoxHeight ?? 0);\n  }\n  return actor.height;\n}, \"drawActorTypeDatabase\");\nvar drawActorTypeBoundary = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(elem, actor, conf2, isFooter) {\n  const actorY = isFooter ? actor.stopy : actor.starty;\n  const center = actor.x + actor.width / 2;\n  const centerY = actorY + 80;\n  const radius = 30;\n  const line = elem.append(\"g\").lower();\n  if (!isFooter) {\n    actorCnt++;\n    line.append(\"line\").attr(\"id\", \"actor\" + actorCnt).attr(\"x1\", center).attr(\"y1\", centerY).attr(\"x2\", center).attr(\"y2\", 2e3).attr(\"class\", \"actor-line 200\").attr(\"stroke-width\", \"0.5px\").attr(\"stroke\", \"#999\").attr(\"name\", actor.name);\n    actor.actorCnt = actorCnt;\n  }\n  const actElem = elem.append(\"g\");\n  let cssClass = ACTOR_MAN_FIGURE_CLASS;\n  if (isFooter) {\n    cssClass += ` ${BOTTOM_ACTOR_CLASS}`;\n  } else {\n    cssClass += ` ${TOP_ACTOR_CLASS}`;\n  }\n  actElem.attr(\"class\", cssClass);\n  actElem.attr(\"name\", actor.name);\n  const rect = (0,_chunk_TZMSLE5B_mjs__WEBPACK_IMPORTED_MODULE_0__.getNoteRect)();\n  rect.x = actor.x;\n  rect.y = actorY;\n  rect.fill = \"#eaeaea\";\n  rect.width = actor.width;\n  rect.height = actor.height;\n  rect.class = \"actor\";\n  actElem.append(\"line\").attr(\"id\", \"actor-man-torso\" + actorCnt).attr(\"x1\", actor.x + actor.width / 2 - radius * 2.5).attr(\"y1\", actorY + 10).attr(\"x2\", actor.x + actor.width / 2 - 15).attr(\"y2\", actorY + 10);\n  actElem.append(\"line\").attr(\"id\", \"actor-man-arms\" + actorCnt).attr(\"x1\", actor.x + actor.width / 2 - radius * 2.5).attr(\"y1\", actorY + 0).attr(\"x2\", actor.x + actor.width / 2 - radius * 2.5).attr(\"y2\", actorY + 20);\n  actElem.append(\"circle\").attr(\"cx\", actor.x + actor.width / 2).attr(\"cy\", actorY + 10).attr(\"r\", radius);\n  const bounds2 = actElem.node().getBBox();\n  actor.height = bounds2.height + (conf2.sequence.labelBoxHeight ?? 0);\n  _drawTextCandidateFunc(conf2, (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.hasKatex)(actor.description))(\n    actor.description,\n    actElem,\n    rect.x,\n    rect.y + (!isFooter ? radius / 2 + 3 : radius / 2 - 4),\n    rect.width,\n    rect.height,\n    { class: `actor ${ACTOR_MAN_FIGURE_CLASS}` },\n    conf2\n  );\n  if (!isFooter) {\n    actElem.attr(\"transform\", `translate(0,${radius / 2 + 7})`);\n  } else {\n    actElem.attr(\"transform\", `translate(0,${radius / 2 + 7})`);\n  }\n  return actor.height;\n}, \"drawActorTypeBoundary\");\nvar drawActorTypeActor = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(elem, actor, conf2, isFooter) {\n  const actorY = isFooter ? actor.stopy : actor.starty;\n  const center = actor.x + actor.width / 2;\n  const centerY = actorY + 80;\n  const line = elem.append(\"g\").lower();\n  if (!isFooter) {\n    actorCnt++;\n    line.append(\"line\").attr(\"id\", \"actor\" + actorCnt).attr(\"x1\", center).attr(\"y1\", centerY).attr(\"x2\", center).attr(\"y2\", 2e3).attr(\"class\", \"actor-line 200\").attr(\"stroke-width\", \"0.5px\").attr(\"stroke\", \"#999\").attr(\"name\", actor.name);\n    actor.actorCnt = actorCnt;\n  }\n  const actElem = elem.append(\"g\");\n  let cssClass = ACTOR_MAN_FIGURE_CLASS;\n  if (isFooter) {\n    cssClass += ` ${BOTTOM_ACTOR_CLASS}`;\n  } else {\n    cssClass += ` ${TOP_ACTOR_CLASS}`;\n  }\n  actElem.attr(\"class\", cssClass);\n  actElem.attr(\"name\", actor.name);\n  const rect = (0,_chunk_TZMSLE5B_mjs__WEBPACK_IMPORTED_MODULE_0__.getNoteRect)();\n  rect.x = actor.x;\n  rect.y = actorY;\n  rect.fill = \"#eaeaea\";\n  rect.width = actor.width;\n  rect.height = actor.height;\n  rect.class = \"actor\";\n  rect.rx = 3;\n  rect.ry = 3;\n  actElem.append(\"line\").attr(\"id\", \"actor-man-torso\" + actorCnt).attr(\"x1\", center).attr(\"y1\", actorY + 25).attr(\"x2\", center).attr(\"y2\", actorY + 45);\n  actElem.append(\"line\").attr(\"id\", \"actor-man-arms\" + actorCnt).attr(\"x1\", center - ACTOR_TYPE_WIDTH / 2).attr(\"y1\", actorY + 33).attr(\"x2\", center + ACTOR_TYPE_WIDTH / 2).attr(\"y2\", actorY + 33);\n  actElem.append(\"line\").attr(\"x1\", center - ACTOR_TYPE_WIDTH / 2).attr(\"y1\", actorY + 60).attr(\"x2\", center).attr(\"y2\", actorY + 45);\n  actElem.append(\"line\").attr(\"x1\", center).attr(\"y1\", actorY + 45).attr(\"x2\", center + ACTOR_TYPE_WIDTH / 2 - 2).attr(\"y2\", actorY + 60);\n  const circle = actElem.append(\"circle\");\n  circle.attr(\"cx\", actor.x + actor.width / 2);\n  circle.attr(\"cy\", actorY + 10);\n  circle.attr(\"r\", 15);\n  circle.attr(\"width\", actor.width);\n  circle.attr(\"height\", actor.height);\n  const bounds2 = actElem.node().getBBox();\n  actor.height = bounds2.height;\n  _drawTextCandidateFunc(conf2, (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.hasKatex)(actor.description))(\n    actor.description,\n    actElem,\n    rect.x,\n    rect.y + 35,\n    rect.width,\n    rect.height,\n    { class: `actor ${ACTOR_MAN_FIGURE_CLASS}` },\n    conf2\n  );\n  return actor.height;\n}, \"drawActorTypeActor\");\nvar drawActor = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(async function(elem, actor, conf2, isFooter) {\n  switch (actor.type) {\n    case \"actor\":\n      return await drawActorTypeActor(elem, actor, conf2, isFooter);\n    case \"participant\":\n      return await drawActorTypeParticipant(elem, actor, conf2, isFooter);\n    case \"boundary\":\n      return await drawActorTypeBoundary(elem, actor, conf2, isFooter);\n    case \"control\":\n      return await drawActorTypeControl(elem, actor, conf2, isFooter);\n    case \"entity\":\n      return await drawActorTypeEntity(elem, actor, conf2, isFooter);\n    case \"database\":\n      return await drawActorTypeDatabase(elem, actor, conf2, isFooter);\n    case \"collections\":\n      return await drawActorTypeCollections(elem, actor, conf2, isFooter);\n    case \"queue\":\n      return await drawActorTypeQueue(elem, actor, conf2, isFooter);\n  }\n}, \"drawActor\");\nvar drawBox = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(elem, box, conf2) {\n  const boxplusTextGroup = elem.append(\"g\");\n  const g = boxplusTextGroup;\n  drawBackgroundRect2(g, box);\n  if (box.name) {\n    _drawTextCandidateFunc(conf2)(\n      box.name,\n      g,\n      box.x,\n      box.y + conf2.boxTextMargin + (box.textMaxHeight || 0) / 2,\n      box.width,\n      0,\n      { class: \"text\" },\n      conf2\n    );\n  }\n  g.lower();\n}, \"drawBox\");\nvar anchorElement = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(elem) {\n  return elem.append(\"g\");\n}, \"anchorElement\");\nvar drawActivation = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(elem, bounds2, verticalPos, conf2, actorActivations2) {\n  const rect = (0,_chunk_TZMSLE5B_mjs__WEBPACK_IMPORTED_MODULE_0__.getNoteRect)();\n  const g = bounds2.anchored;\n  rect.x = bounds2.startx;\n  rect.y = bounds2.starty;\n  rect.class = \"activation\" + actorActivations2 % 3;\n  rect.width = bounds2.stopx - bounds2.startx;\n  rect.height = verticalPos - bounds2.starty;\n  drawRect2(g, rect);\n}, \"drawActivation\");\nvar drawLoop = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(async function(elem, loopModel, labelText, conf2) {\n  const {\n    boxMargin,\n    boxTextMargin,\n    labelBoxHeight,\n    labelBoxWidth,\n    messageFontFamily: fontFamily,\n    messageFontSize: fontSize,\n    messageFontWeight: fontWeight\n  } = conf2;\n  const g = elem.append(\"g\");\n  const drawLoopLine = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(startx, starty, stopx, stopy) {\n    return g.append(\"line\").attr(\"x1\", startx).attr(\"y1\", starty).attr(\"x2\", stopx).attr(\"y2\", stopy).attr(\"class\", \"loopLine\");\n  }, \"drawLoopLine\");\n  drawLoopLine(loopModel.startx, loopModel.starty, loopModel.stopx, loopModel.starty);\n  drawLoopLine(loopModel.stopx, loopModel.starty, loopModel.stopx, loopModel.stopy);\n  drawLoopLine(loopModel.startx, loopModel.stopy, loopModel.stopx, loopModel.stopy);\n  drawLoopLine(loopModel.startx, loopModel.starty, loopModel.startx, loopModel.stopy);\n  if (loopModel.sections !== void 0) {\n    loopModel.sections.forEach(function(item) {\n      drawLoopLine(loopModel.startx, item.y, loopModel.stopx, item.y).style(\n        \"stroke-dasharray\",\n        \"3, 3\"\n      );\n    });\n  }\n  let txt = (0,_chunk_TZMSLE5B_mjs__WEBPACK_IMPORTED_MODULE_0__.getTextObj)();\n  txt.text = labelText;\n  txt.x = loopModel.startx;\n  txt.y = loopModel.starty;\n  txt.fontFamily = fontFamily;\n  txt.fontSize = fontSize;\n  txt.fontWeight = fontWeight;\n  txt.anchor = \"middle\";\n  txt.valign = \"middle\";\n  txt.tspan = false;\n  txt.width = labelBoxWidth || 50;\n  txt.height = labelBoxHeight || 20;\n  txt.textMargin = boxTextMargin;\n  txt.class = \"labelText\";\n  drawLabel(g, txt);\n  txt = getTextObj2();\n  txt.text = loopModel.title;\n  txt.x = loopModel.startx + labelBoxWidth / 2 + (loopModel.stopx - loopModel.startx) / 2;\n  txt.y = loopModel.starty + boxMargin + boxTextMargin;\n  txt.anchor = \"middle\";\n  txt.valign = \"middle\";\n  txt.textMargin = boxTextMargin;\n  txt.class = \"loopText\";\n  txt.fontFamily = fontFamily;\n  txt.fontSize = fontSize;\n  txt.fontWeight = fontWeight;\n  txt.wrap = true;\n  let textElem = (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.hasKatex)(txt.text) ? await drawKatex(g, txt, loopModel) : drawText(g, txt);\n  if (loopModel.sectionTitles !== void 0) {\n    for (const [idx, item] of Object.entries(loopModel.sectionTitles)) {\n      if (item.message) {\n        txt.text = item.message;\n        txt.x = loopModel.startx + (loopModel.stopx - loopModel.startx) / 2;\n        txt.y = loopModel.sections[idx].y + boxMargin + boxTextMargin;\n        txt.class = \"loopText\";\n        txt.anchor = \"middle\";\n        txt.valign = \"middle\";\n        txt.tspan = false;\n        txt.fontFamily = fontFamily;\n        txt.fontSize = fontSize;\n        txt.fontWeight = fontWeight;\n        txt.wrap = loopModel.wrap;\n        if ((0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.hasKatex)(txt.text)) {\n          loopModel.starty = loopModel.sections[idx].y;\n          await drawKatex(g, txt, loopModel);\n        } else {\n          drawText(g, txt);\n        }\n        let sectionHeight = Math.round(\n          textElem.map((te) => (te._groups || te)[0][0].getBBox().height).reduce((acc, curr) => acc + curr)\n        );\n        loopModel.sections[idx].height += sectionHeight - (boxMargin + boxTextMargin);\n      }\n    }\n  }\n  loopModel.height = Math.round(loopModel.stopy - loopModel.starty);\n  return g;\n}, \"drawLoop\");\nvar drawBackgroundRect2 = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(elem, bounds2) {\n  (0,_chunk_TZMSLE5B_mjs__WEBPACK_IMPORTED_MODULE_0__.drawBackgroundRect)(elem, bounds2);\n}, \"drawBackgroundRect\");\nvar insertDatabaseIcon = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(elem) {\n  elem.append(\"defs\").append(\"symbol\").attr(\"id\", \"database\").attr(\"fill-rule\", \"evenodd\").attr(\"clip-rule\", \"evenodd\").append(\"path\").attr(\"transform\", \"scale(.5)\").attr(\n    \"d\",\n    \"M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z\"\n  );\n}, \"insertDatabaseIcon\");\nvar insertComputerIcon = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(elem) {\n  elem.append(\"defs\").append(\"symbol\").attr(\"id\", \"computer\").attr(\"width\", \"24\").attr(\"height\", \"24\").append(\"path\").attr(\"transform\", \"scale(.5)\").attr(\n    \"d\",\n    \"M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z\"\n  );\n}, \"insertComputerIcon\");\nvar insertClockIcon = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(elem) {\n  elem.append(\"defs\").append(\"symbol\").attr(\"id\", \"clock\").attr(\"width\", \"24\").attr(\"height\", \"24\").append(\"path\").attr(\"transform\", \"scale(.5)\").attr(\n    \"d\",\n    \"M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z\"\n  );\n}, \"insertClockIcon\");\nvar insertArrowHead = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(elem) {\n  elem.append(\"defs\").append(\"marker\").attr(\"id\", \"arrowhead\").attr(\"refX\", 7.9).attr(\"refY\", 5).attr(\"markerUnits\", \"userSpaceOnUse\").attr(\"markerWidth\", 12).attr(\"markerHeight\", 12).attr(\"orient\", \"auto-start-reverse\").append(\"path\").attr(\"d\", \"M -1 0 L 10 5 L 0 10 z\");\n}, \"insertArrowHead\");\nvar insertArrowFilledHead = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(elem) {\n  elem.append(\"defs\").append(\"marker\").attr(\"id\", \"filled-head\").attr(\"refX\", 15.5).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\");\n}, \"insertArrowFilledHead\");\nvar insertSequenceNumber = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(elem) {\n  elem.append(\"defs\").append(\"marker\").attr(\"id\", \"sequencenumber\").attr(\"refX\", 15).attr(\"refY\", 15).attr(\"markerWidth\", 60).attr(\"markerHeight\", 40).attr(\"orient\", \"auto\").append(\"circle\").attr(\"cx\", 15).attr(\"cy\", 15).attr(\"r\", 6);\n}, \"insertSequenceNumber\");\nvar insertArrowCrossHead = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(elem) {\n  const defs = elem.append(\"defs\");\n  const marker = defs.append(\"marker\").attr(\"id\", \"crosshead\").attr(\"markerWidth\", 15).attr(\"markerHeight\", 8).attr(\"orient\", \"auto\").attr(\"refX\", 4).attr(\"refY\", 4.5);\n  marker.append(\"path\").attr(\"fill\", \"none\").attr(\"stroke\", \"#000000\").style(\"stroke-dasharray\", \"0, 0\").attr(\"stroke-width\", \"1pt\").attr(\"d\", \"M 1,2 L 6,7 M 6,2 L 1,7\");\n}, \"insertArrowCrossHead\");\nvar getTextObj2 = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function() {\n  return {\n    x: 0,\n    y: 0,\n    fill: void 0,\n    anchor: void 0,\n    style: \"#666\",\n    width: void 0,\n    height: void 0,\n    textMargin: 0,\n    rx: 0,\n    ry: 0,\n    tspan: true,\n    valign: void 0\n  };\n}, \"getTextObj\");\nvar getNoteRect2 = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function() {\n  return {\n    x: 0,\n    y: 0,\n    fill: \"#EDF2AE\",\n    stroke: \"#666\",\n    width: 100,\n    anchor: \"start\",\n    height: 100,\n    rx: 0,\n    ry: 0\n  };\n}, \"getNoteRect\");\nvar _drawTextCandidateFunc = /* @__PURE__ */ (function() {\n  function byText(content, g, x, y, width, height, textAttrs) {\n    const text = g.append(\"text\").attr(\"x\", x + width / 2).attr(\"y\", y + height / 2 + 5).style(\"text-anchor\", \"middle\").text(content);\n    _setTextAttrs(text, textAttrs);\n  }\n  (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(byText, \"byText\");\n  function byTspan(content, g, x, y, width, height, textAttrs, conf2) {\n    const { actorFontSize, actorFontFamily, actorFontWeight } = conf2;\n    const [_actorFontSize, _actorFontSizePx] = (0,_chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_3__.parseFontSize)(actorFontSize);\n    const lines = content.split(_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.lineBreakRegex);\n    for (let i = 0; i < lines.length; i++) {\n      const dy = i * _actorFontSize - _actorFontSize * (lines.length - 1) / 2;\n      const text = g.append(\"text\").attr(\"x\", x + width / 2).attr(\"y\", y).style(\"text-anchor\", \"middle\").style(\"font-size\", _actorFontSizePx).style(\"font-weight\", actorFontWeight).style(\"font-family\", actorFontFamily);\n      text.append(\"tspan\").attr(\"x\", x + width / 2).attr(\"dy\", dy).text(lines[i]);\n      text.attr(\"y\", y + height / 2).attr(\"dominant-baseline\", \"central\").attr(\"alignment-baseline\", \"central\");\n      _setTextAttrs(text, textAttrs);\n    }\n  }\n  (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(byTspan, \"byTspan\");\n  function byFo(content, g, x, y, width, height, textAttrs, conf2) {\n    const s = g.append(\"switch\");\n    const f = s.append(\"foreignObject\").attr(\"x\", x).attr(\"y\", y).attr(\"width\", width).attr(\"height\", height);\n    const text = f.append(\"xhtml:div\").style(\"display\", \"table\").style(\"height\", \"100%\").style(\"width\", \"100%\");\n    text.append(\"div\").style(\"display\", \"table-cell\").style(\"text-align\", \"center\").style(\"vertical-align\", \"middle\").text(content);\n    byTspan(content, s, x, y, width, height, textAttrs, conf2);\n    _setTextAttrs(text, textAttrs);\n  }\n  (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(byFo, \"byFo\");\n  async function byKatex(content, g, x, y, width, height, textAttrs, conf2) {\n    const dim = await (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.calculateMathMLDimensions)(content, (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.getConfig)());\n    const s = g.append(\"switch\");\n    const f = s.append(\"foreignObject\").attr(\"x\", x + width / 2 - dim.width / 2).attr(\"y\", y + height / 2 - dim.height / 2).attr(\"width\", dim.width).attr(\"height\", dim.height);\n    const text = f.append(\"xhtml:div\").style(\"height\", \"100%\").style(\"width\", \"100%\");\n    text.append(\"div\").style(\"text-align\", \"center\").style(\"vertical-align\", \"middle\").html(await (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.renderKatexSanitized)(content, (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.getConfig)()));\n    byTspan(content, s, x, y, width, height, textAttrs, conf2);\n    _setTextAttrs(text, textAttrs);\n  }\n  (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(byKatex, \"byKatex\");\n  function _setTextAttrs(toText, fromTextAttrsDict) {\n    for (const key in fromTextAttrsDict) {\n      if (fromTextAttrsDict.hasOwnProperty(key)) {\n        toText.attr(key, fromTextAttrsDict[key]);\n      }\n    }\n  }\n  (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(_setTextAttrs, \"_setTextAttrs\");\n  return function(conf2, hasKatex2 = false) {\n    if (hasKatex2) {\n      return byKatex;\n    }\n    return conf2.textPlacement === \"fo\" ? byFo : conf2.textPlacement === \"old\" ? byText : byTspan;\n  };\n})();\nvar _drawMenuItemTextCandidateFunc = /* @__PURE__ */ (function() {\n  function byText(content, g, x, y, width, height, textAttrs) {\n    const text = g.append(\"text\").attr(\"x\", x).attr(\"y\", y).style(\"text-anchor\", \"start\").text(content);\n    _setTextAttrs(text, textAttrs);\n  }\n  (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(byText, \"byText\");\n  function byTspan(content, g, x, y, width, height, textAttrs, conf2) {\n    const { actorFontSize, actorFontFamily, actorFontWeight } = conf2;\n    const lines = content.split(_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.lineBreakRegex);\n    for (let i = 0; i < lines.length; i++) {\n      const dy = i * actorFontSize - actorFontSize * (lines.length - 1) / 2;\n      const text = g.append(\"text\").attr(\"x\", x).attr(\"y\", y).style(\"text-anchor\", \"start\").style(\"font-size\", actorFontSize).style(\"font-weight\", actorFontWeight).style(\"font-family\", actorFontFamily);\n      text.append(\"tspan\").attr(\"x\", x).attr(\"dy\", dy).text(lines[i]);\n      text.attr(\"y\", y + height / 2).attr(\"dominant-baseline\", \"central\").attr(\"alignment-baseline\", \"central\");\n      _setTextAttrs(text, textAttrs);\n    }\n  }\n  (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(byTspan, \"byTspan\");\n  function byFo(content, g, x, y, width, height, textAttrs, conf2) {\n    const s = g.append(\"switch\");\n    const f = s.append(\"foreignObject\").attr(\"x\", x).attr(\"y\", y).attr(\"width\", width).attr(\"height\", height);\n    const text = f.append(\"xhtml:div\").style(\"display\", \"table\").style(\"height\", \"100%\").style(\"width\", \"100%\");\n    text.append(\"div\").style(\"display\", \"table-cell\").style(\"text-align\", \"center\").style(\"vertical-align\", \"middle\").text(content);\n    byTspan(content, s, x, y, width, height, textAttrs, conf2);\n    _setTextAttrs(text, textAttrs);\n  }\n  (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(byFo, \"byFo\");\n  function _setTextAttrs(toText, fromTextAttrsDict) {\n    for (const key in fromTextAttrsDict) {\n      if (fromTextAttrsDict.hasOwnProperty(key)) {\n        toText.attr(key, fromTextAttrsDict[key]);\n      }\n    }\n  }\n  (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(_setTextAttrs, \"_setTextAttrs\");\n  return function(conf2) {\n    return conf2.textPlacement === \"fo\" ? byFo : conf2.textPlacement === \"old\" ? byText : byTspan;\n  };\n})();\nvar svgDraw_default = {\n  drawRect: drawRect2,\n  drawText,\n  drawLabel,\n  drawActor,\n  drawBox,\n  drawPopup,\n  anchorElement,\n  drawActivation,\n  drawLoop,\n  drawBackgroundRect: drawBackgroundRect2,\n  insertArrowHead,\n  insertArrowFilledHead,\n  insertSequenceNumber,\n  insertArrowCrossHead,\n  insertDatabaseIcon,\n  insertComputerIcon,\n  insertClockIcon,\n  getTextObj: getTextObj2,\n  getNoteRect: getNoteRect2,\n  fixLifeLineHeights,\n  sanitizeUrl: _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_7__.sanitizeUrl\n};\n\n// src/diagrams/sequence/sequenceRenderer.ts\nvar conf = {};\nvar bounds = {\n  data: {\n    startx: void 0,\n    stopx: void 0,\n    starty: void 0,\n    stopy: void 0\n  },\n  verticalPos: 0,\n  sequenceItems: [],\n  activations: [],\n  models: {\n    getHeight: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function() {\n      return Math.max.apply(\n        null,\n        this.actors.length === 0 ? [0] : this.actors.map((actor) => actor.height || 0)\n      ) + (this.loops.length === 0 ? 0 : this.loops.map((it) => it.height || 0).reduce((acc, h) => acc + h)) + (this.messages.length === 0 ? 0 : this.messages.map((it) => it.height || 0).reduce((acc, h) => acc + h)) + (this.notes.length === 0 ? 0 : this.notes.map((it) => it.height || 0).reduce((acc, h) => acc + h));\n    }, \"getHeight\"),\n    clear: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function() {\n      this.actors = [];\n      this.boxes = [];\n      this.loops = [];\n      this.messages = [];\n      this.notes = [];\n    }, \"clear\"),\n    addBox: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(boxModel) {\n      this.boxes.push(boxModel);\n    }, \"addBox\"),\n    addActor: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(actorModel) {\n      this.actors.push(actorModel);\n    }, \"addActor\"),\n    addLoop: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(loopModel) {\n      this.loops.push(loopModel);\n    }, \"addLoop\"),\n    addMessage: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(msgModel) {\n      this.messages.push(msgModel);\n    }, \"addMessage\"),\n    addNote: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(noteModel) {\n      this.notes.push(noteModel);\n    }, \"addNote\"),\n    lastActor: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function() {\n      return this.actors[this.actors.length - 1];\n    }, \"lastActor\"),\n    lastLoop: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function() {\n      return this.loops[this.loops.length - 1];\n    }, \"lastLoop\"),\n    lastMessage: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function() {\n      return this.messages[this.messages.length - 1];\n    }, \"lastMessage\"),\n    lastNote: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function() {\n      return this.notes[this.notes.length - 1];\n    }, \"lastNote\"),\n    actors: [],\n    boxes: [],\n    loops: [],\n    messages: [],\n    notes: []\n  },\n  init: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function() {\n    this.sequenceItems = [];\n    this.activations = [];\n    this.models.clear();\n    this.data = {\n      startx: void 0,\n      stopx: void 0,\n      starty: void 0,\n      stopy: void 0\n    };\n    this.verticalPos = 0;\n    setConf((0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.getConfig2)());\n  }, \"init\"),\n  updateVal: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(obj, key, val, fun) {\n    if (obj[key] === void 0) {\n      obj[key] = val;\n    } else {\n      obj[key] = fun(val, obj[key]);\n    }\n  }, \"updateVal\"),\n  updateBounds: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(startx, starty, stopx, stopy) {\n    const _self = this;\n    let cnt = 0;\n    function updateFn(type) {\n      return /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function updateItemBounds(item) {\n        cnt++;\n        const n = _self.sequenceItems.length - cnt + 1;\n        _self.updateVal(item, \"starty\", starty - n * conf.boxMargin, Math.min);\n        _self.updateVal(item, \"stopy\", stopy + n * conf.boxMargin, Math.max);\n        _self.updateVal(bounds.data, \"startx\", startx - n * conf.boxMargin, Math.min);\n        _self.updateVal(bounds.data, \"stopx\", stopx + n * conf.boxMargin, Math.max);\n        if (!(type === \"activation\")) {\n          _self.updateVal(item, \"startx\", startx - n * conf.boxMargin, Math.min);\n          _self.updateVal(item, \"stopx\", stopx + n * conf.boxMargin, Math.max);\n          _self.updateVal(bounds.data, \"starty\", starty - n * conf.boxMargin, Math.min);\n          _self.updateVal(bounds.data, \"stopy\", stopy + n * conf.boxMargin, Math.max);\n        }\n      }, \"updateItemBounds\");\n    }\n    (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(updateFn, \"updateFn\");\n    this.sequenceItems.forEach(updateFn());\n    this.activations.forEach(updateFn(\"activation\"));\n  }, \"updateBounds\"),\n  insert: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(startx, starty, stopx, stopy) {\n    const _startx = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMin(startx, stopx);\n    const _stopx = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(startx, stopx);\n    const _starty = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMin(starty, stopy);\n    const _stopy = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(starty, stopy);\n    this.updateVal(bounds.data, \"startx\", _startx, Math.min);\n    this.updateVal(bounds.data, \"starty\", _starty, Math.min);\n    this.updateVal(bounds.data, \"stopx\", _stopx, Math.max);\n    this.updateVal(bounds.data, \"stopy\", _stopy, Math.max);\n    this.updateBounds(_startx, _starty, _stopx, _stopy);\n  }, \"insert\"),\n  newActivation: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(message, diagram2, actors) {\n    const actorRect = actors.get(message.from);\n    const stackedSize = actorActivations(message.from).length || 0;\n    const x = actorRect.x + actorRect.width / 2 + (stackedSize - 1) * conf.activationWidth / 2;\n    this.activations.push({\n      startx: x,\n      starty: this.verticalPos + 2,\n      stopx: x + conf.activationWidth,\n      stopy: void 0,\n      actor: message.from,\n      anchored: svgDraw_default.anchorElement(diagram2)\n    });\n  }, \"newActivation\"),\n  endActivation: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(message) {\n    const lastActorActivationIdx = this.activations.map(function(activation) {\n      return activation.actor;\n    }).lastIndexOf(message.from);\n    return this.activations.splice(lastActorActivationIdx, 1)[0];\n  }, \"endActivation\"),\n  createLoop: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(title = { message: void 0, wrap: false, width: void 0 }, fill) {\n    return {\n      startx: void 0,\n      starty: this.verticalPos,\n      stopx: void 0,\n      stopy: void 0,\n      title: title.message,\n      wrap: title.wrap,\n      width: title.width,\n      height: 0,\n      fill\n    };\n  }, \"createLoop\"),\n  newLoop: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(title = { message: void 0, wrap: false, width: void 0 }, fill) {\n    this.sequenceItems.push(this.createLoop(title, fill));\n  }, \"newLoop\"),\n  endLoop: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function() {\n    return this.sequenceItems.pop();\n  }, \"endLoop\"),\n  isLoopOverlap: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function() {\n    return this.sequenceItems.length ? this.sequenceItems[this.sequenceItems.length - 1].overlap : false;\n  }, \"isLoopOverlap\"),\n  addSectionToLoop: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(message) {\n    const loop = this.sequenceItems.pop();\n    loop.sections = loop.sections || [];\n    loop.sectionTitles = loop.sectionTitles || [];\n    loop.sections.push({ y: bounds.getVerticalPos(), height: 0 });\n    loop.sectionTitles.push(message);\n    this.sequenceItems.push(loop);\n  }, \"addSectionToLoop\"),\n  saveVerticalPos: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function() {\n    if (this.isLoopOverlap()) {\n      this.savedVerticalPos = this.verticalPos;\n    }\n  }, \"saveVerticalPos\"),\n  resetVerticalPos: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function() {\n    if (this.isLoopOverlap()) {\n      this.verticalPos = this.savedVerticalPos;\n    }\n  }, \"resetVerticalPos\"),\n  bumpVerticalPos: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(bump) {\n    this.verticalPos = this.verticalPos + bump;\n    this.data.stopy = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(this.data.stopy, this.verticalPos);\n  }, \"bumpVerticalPos\"),\n  getVerticalPos: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function() {\n    return this.verticalPos;\n  }, \"getVerticalPos\"),\n  getBounds: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function() {\n    return { bounds: this.data, models: this.models };\n  }, \"getBounds\")\n};\nvar drawNote = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(async function(elem, noteModel) {\n  bounds.bumpVerticalPos(conf.boxMargin);\n  noteModel.height = conf.boxMargin;\n  noteModel.starty = bounds.getVerticalPos();\n  const rect = (0,_chunk_TZMSLE5B_mjs__WEBPACK_IMPORTED_MODULE_0__.getNoteRect)();\n  rect.x = noteModel.startx;\n  rect.y = noteModel.starty;\n  rect.width = noteModel.width || conf.width;\n  rect.class = \"note\";\n  const g = elem.append(\"g\");\n  const rectElem = svgDraw_default.drawRect(g, rect);\n  const textObj = (0,_chunk_TZMSLE5B_mjs__WEBPACK_IMPORTED_MODULE_0__.getTextObj)();\n  textObj.x = noteModel.startx;\n  textObj.y = noteModel.starty;\n  textObj.width = rect.width;\n  textObj.dy = \"1em\";\n  textObj.text = noteModel.message;\n  textObj.class = \"noteText\";\n  textObj.fontFamily = conf.noteFontFamily;\n  textObj.fontSize = conf.noteFontSize;\n  textObj.fontWeight = conf.noteFontWeight;\n  textObj.anchor = conf.noteAlign;\n  textObj.textMargin = conf.noteMargin;\n  textObj.valign = \"center\";\n  const textElem = (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.hasKatex)(textObj.text) ? await drawKatex(g, textObj) : drawText(g, textObj);\n  const textHeight = Math.round(\n    textElem.map((te) => (te._groups || te)[0][0].getBBox().height).reduce((acc, curr) => acc + curr)\n  );\n  rectElem.attr(\"height\", textHeight + 2 * conf.noteMargin);\n  noteModel.height += textHeight + 2 * conf.noteMargin;\n  bounds.bumpVerticalPos(textHeight + 2 * conf.noteMargin);\n  noteModel.stopy = noteModel.starty + textHeight + 2 * conf.noteMargin;\n  noteModel.stopx = noteModel.startx + rect.width;\n  bounds.insert(noteModel.startx, noteModel.starty, noteModel.stopx, noteModel.stopy);\n  bounds.models.addNote(noteModel);\n}, \"drawNote\");\nvar messageFont = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)((cnf) => {\n  return {\n    fontFamily: cnf.messageFontFamily,\n    fontSize: cnf.messageFontSize,\n    fontWeight: cnf.messageFontWeight\n  };\n}, \"messageFont\");\nvar noteFont = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)((cnf) => {\n  return {\n    fontFamily: cnf.noteFontFamily,\n    fontSize: cnf.noteFontSize,\n    fontWeight: cnf.noteFontWeight\n  };\n}, \"noteFont\");\nvar actorFont = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)((cnf) => {\n  return {\n    fontFamily: cnf.actorFontFamily,\n    fontSize: cnf.actorFontSize,\n    fontWeight: cnf.actorFontWeight\n  };\n}, \"actorFont\");\nasync function boundMessage(_diagram, msgModel) {\n  bounds.bumpVerticalPos(10);\n  const { startx, stopx, message } = msgModel;\n  const lines = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.splitBreaks(message).length;\n  const isKatexMsg = (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.hasKatex)(message);\n  const textDims = isKatexMsg ? await (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.calculateMathMLDimensions)(message, (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.getConfig2)()) : _chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_3__.utils_default.calculateTextDimensions(message, messageFont(conf));\n  if (!isKatexMsg) {\n    const lineHeight = textDims.height / lines;\n    msgModel.height += lineHeight;\n    bounds.bumpVerticalPos(lineHeight);\n  }\n  let lineStartY;\n  let totalOffset = textDims.height - 10;\n  const textWidth = textDims.width;\n  if (startx === stopx) {\n    lineStartY = bounds.getVerticalPos() + totalOffset;\n    if (!conf.rightAngles) {\n      totalOffset += conf.boxMargin;\n      lineStartY = bounds.getVerticalPos() + totalOffset;\n    }\n    totalOffset += 30;\n    const dx = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(textWidth / 2, conf.width / 2);\n    bounds.insert(\n      startx - dx,\n      bounds.getVerticalPos() - 10 + totalOffset,\n      stopx + dx,\n      bounds.getVerticalPos() + 30 + totalOffset\n    );\n  } else {\n    totalOffset += conf.boxMargin;\n    lineStartY = bounds.getVerticalPos() + totalOffset;\n    bounds.insert(startx, lineStartY - 10, stopx, lineStartY);\n  }\n  bounds.bumpVerticalPos(totalOffset);\n  msgModel.height += totalOffset;\n  msgModel.stopy = msgModel.starty + msgModel.height;\n  bounds.insert(msgModel.fromBounds, msgModel.starty, msgModel.toBounds, msgModel.stopy);\n  return lineStartY;\n}\n(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(boundMessage, \"boundMessage\");\nvar drawMessage = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(async function(diagram2, msgModel, lineStartY, diagObj) {\n  const { startx, stopx, starty, message, type, sequenceIndex, sequenceVisible } = msgModel;\n  const textDims = _chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_3__.utils_default.calculateTextDimensions(message, messageFont(conf));\n  const textObj = (0,_chunk_TZMSLE5B_mjs__WEBPACK_IMPORTED_MODULE_0__.getTextObj)();\n  textObj.x = startx;\n  textObj.y = starty + 10;\n  textObj.width = stopx - startx;\n  textObj.class = \"messageText\";\n  textObj.dy = \"1em\";\n  textObj.text = message;\n  textObj.fontFamily = conf.messageFontFamily;\n  textObj.fontSize = conf.messageFontSize;\n  textObj.fontWeight = conf.messageFontWeight;\n  textObj.anchor = conf.messageAlign;\n  textObj.valign = \"center\";\n  textObj.textMargin = conf.wrapPadding;\n  textObj.tspan = false;\n  if ((0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.hasKatex)(textObj.text)) {\n    await drawKatex(diagram2, textObj, { startx, stopx, starty: lineStartY });\n  } else {\n    drawText(diagram2, textObj);\n  }\n  const textWidth = textDims.width;\n  let line;\n  if (startx === stopx) {\n    if (conf.rightAngles) {\n      line = diagram2.append(\"path\").attr(\n        \"d\",\n        `M  ${startx},${lineStartY} H ${startx + _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(conf.width / 2, textWidth / 2)} V ${lineStartY + 25} H ${startx}`\n      );\n    } else {\n      line = diagram2.append(\"path\").attr(\n        \"d\",\n        \"M \" + startx + \",\" + lineStartY + \" C \" + (startx + 60) + \",\" + (lineStartY - 10) + \" \" + (startx + 60) + \",\" + (lineStartY + 30) + \" \" + startx + \",\" + (lineStartY + 20)\n      );\n    }\n  } else {\n    line = diagram2.append(\"line\");\n    line.attr(\"x1\", startx);\n    line.attr(\"y1\", lineStartY);\n    line.attr(\"x2\", stopx);\n    line.attr(\"y2\", lineStartY);\n  }\n  if (type === diagObj.db.LINETYPE.DOTTED || type === diagObj.db.LINETYPE.DOTTED_CROSS || type === diagObj.db.LINETYPE.DOTTED_POINT || type === diagObj.db.LINETYPE.DOTTED_OPEN || type === diagObj.db.LINETYPE.BIDIRECTIONAL_DOTTED) {\n    line.style(\"stroke-dasharray\", \"3, 3\");\n    line.attr(\"class\", \"messageLine1\");\n  } else {\n    line.attr(\"class\", \"messageLine0\");\n  }\n  let url = \"\";\n  if (conf.arrowMarkerAbsolute) {\n    url = (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.getUrl)(true);\n  }\n  line.attr(\"stroke-width\", 2);\n  line.attr(\"stroke\", \"none\");\n  line.style(\"fill\", \"none\");\n  if (type === diagObj.db.LINETYPE.SOLID || type === diagObj.db.LINETYPE.DOTTED) {\n    line.attr(\"marker-end\", \"url(\" + url + \"#arrowhead)\");\n  }\n  if (type === diagObj.db.LINETYPE.BIDIRECTIONAL_SOLID || type === diagObj.db.LINETYPE.BIDIRECTIONAL_DOTTED) {\n    line.attr(\"marker-start\", \"url(\" + url + \"#arrowhead)\");\n    line.attr(\"marker-end\", \"url(\" + url + \"#arrowhead)\");\n  }\n  if (type === diagObj.db.LINETYPE.SOLID_POINT || type === diagObj.db.LINETYPE.DOTTED_POINT) {\n    line.attr(\"marker-end\", \"url(\" + url + \"#filled-head)\");\n  }\n  if (type === diagObj.db.LINETYPE.SOLID_CROSS || type === diagObj.db.LINETYPE.DOTTED_CROSS) {\n    line.attr(\"marker-end\", \"url(\" + url + \"#crosshead)\");\n  }\n  if (sequenceVisible || conf.showSequenceNumbers) {\n    const isBidirectional = type === diagObj.db.LINETYPE.BIDIRECTIONAL_SOLID || type === diagObj.db.LINETYPE.BIDIRECTIONAL_DOTTED;\n    if (isBidirectional) {\n      const SEQUENCE_NUMBER_RADIUS = 6;\n      if (startx < stopx) {\n        line.attr(\"x1\", startx + 2 * SEQUENCE_NUMBER_RADIUS);\n      } else {\n        line.attr(\"x1\", startx + SEQUENCE_NUMBER_RADIUS);\n      }\n    }\n    diagram2.append(\"line\").attr(\"x1\", startx).attr(\"y1\", lineStartY).attr(\"x2\", startx).attr(\"y2\", lineStartY).attr(\"stroke-width\", 0).attr(\"marker-start\", \"url(\" + url + \"#sequencenumber)\");\n    diagram2.append(\"text\").attr(\"x\", startx).attr(\"y\", lineStartY + 4).attr(\"font-family\", \"sans-serif\").attr(\"font-size\", \"12px\").attr(\"text-anchor\", \"middle\").attr(\"class\", \"sequenceNumber\").text(sequenceIndex);\n  }\n}, \"drawMessage\");\nvar addActorRenderingData = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(diagram2, actors, createdActors, actorKeys, verticalPos, messages, isFooter) {\n  let prevWidth = 0;\n  let prevMargin = 0;\n  let prevBox = void 0;\n  let maxHeight = 0;\n  for (const actorKey of actorKeys) {\n    const actor = actors.get(actorKey);\n    const box = actor.box;\n    if (prevBox && prevBox != box) {\n      if (!isFooter) {\n        bounds.models.addBox(prevBox);\n      }\n      prevMargin += conf.boxMargin + prevBox.margin;\n    }\n    if (box && box != prevBox) {\n      if (!isFooter) {\n        box.x = prevWidth + prevMargin;\n        box.y = verticalPos;\n      }\n      prevMargin += box.margin;\n    }\n    actor.width = actor.width || conf.width;\n    actor.height = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(actor.height || conf.height, conf.height);\n    actor.margin = actor.margin || conf.actorMargin;\n    maxHeight = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(maxHeight, actor.height);\n    if (createdActors.get(actor.name)) {\n      prevMargin += actor.width / 2;\n    }\n    actor.x = prevWidth + prevMargin;\n    actor.starty = bounds.getVerticalPos();\n    bounds.insert(actor.x, verticalPos, actor.x + actor.width, actor.height);\n    prevWidth += actor.width + prevMargin;\n    if (actor.box) {\n      actor.box.width = prevWidth + box.margin - actor.box.x;\n    }\n    prevMargin = actor.margin;\n    prevBox = actor.box;\n    bounds.models.addActor(actor);\n  }\n  if (prevBox && !isFooter) {\n    bounds.models.addBox(prevBox);\n  }\n  bounds.bumpVerticalPos(maxHeight);\n}, \"addActorRenderingData\");\nvar drawActors = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(async function(diagram2, actors, actorKeys, isFooter) {\n  if (!isFooter) {\n    for (const actorKey of actorKeys) {\n      const actor = actors.get(actorKey);\n      await svgDraw_default.drawActor(diagram2, actor, conf, false);\n    }\n  } else {\n    let maxHeight = 0;\n    bounds.bumpVerticalPos(conf.boxMargin * 2);\n    for (const actorKey of actorKeys) {\n      const actor = actors.get(actorKey);\n      if (!actor.stopy) {\n        actor.stopy = bounds.getVerticalPos();\n      }\n      const height = await svgDraw_default.drawActor(diagram2, actor, conf, true);\n      maxHeight = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(maxHeight, height);\n    }\n    bounds.bumpVerticalPos(maxHeight + conf.boxMargin);\n  }\n}, \"drawActors\");\nvar drawActorsPopup = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(diagram2, actors, actorKeys, doc) {\n  let maxHeight = 0;\n  let maxWidth = 0;\n  for (const actorKey of actorKeys) {\n    const actor = actors.get(actorKey);\n    const minMenuWidth = getRequiredPopupWidth(actor);\n    const menuDimensions = svgDraw_default.drawPopup(\n      diagram2,\n      actor,\n      minMenuWidth,\n      conf,\n      conf.forceMenus,\n      doc\n    );\n    if (menuDimensions.height > maxHeight) {\n      maxHeight = menuDimensions.height;\n    }\n    if (menuDimensions.width + actor.x > maxWidth) {\n      maxWidth = menuDimensions.width + actor.x;\n    }\n  }\n  return { maxHeight, maxWidth };\n}, \"drawActorsPopup\");\nvar setConf = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(cnf) {\n  (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.assignWithDepth_default)(conf, cnf);\n  if (cnf.fontFamily) {\n    conf.actorFontFamily = conf.noteFontFamily = conf.messageFontFamily = cnf.fontFamily;\n  }\n  if (cnf.fontSize) {\n    conf.actorFontSize = conf.noteFontSize = conf.messageFontSize = cnf.fontSize;\n  }\n  if (cnf.fontWeight) {\n    conf.actorFontWeight = conf.noteFontWeight = conf.messageFontWeight = cnf.fontWeight;\n  }\n}, \"setConf\");\nvar actorActivations = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(actor) {\n  return bounds.activations.filter(function(activation) {\n    return activation.actor === actor;\n  });\n}, \"actorActivations\");\nvar activationBounds = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(actor, actors) {\n  const actorObj = actors.get(actor);\n  const activations = actorActivations(actor);\n  const left = activations.reduce(\n    function(acc, activation) {\n      return _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMin(acc, activation.startx);\n    },\n    actorObj.x + actorObj.width / 2 - 1\n  );\n  const right = activations.reduce(\n    function(acc, activation) {\n      return _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(acc, activation.stopx);\n    },\n    actorObj.x + actorObj.width / 2 + 1\n  );\n  return [left, right];\n}, \"activationBounds\");\nfunction adjustLoopHeightForWrap(loopWidths, msg, preMargin, postMargin, addLoopFn) {\n  bounds.bumpVerticalPos(preMargin);\n  let heightAdjust = postMargin;\n  if (msg.id && msg.message && loopWidths[msg.id]) {\n    const loopWidth = loopWidths[msg.id].width;\n    const textConf = messageFont(conf);\n    msg.message = _chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_3__.utils_default.wrapLabel(`[${msg.message}]`, loopWidth - 2 * conf.wrapPadding, textConf);\n    msg.width = loopWidth;\n    msg.wrap = true;\n    const textDims = _chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_3__.utils_default.calculateTextDimensions(msg.message, textConf);\n    const totalOffset = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(textDims.height, conf.labelBoxHeight);\n    heightAdjust = postMargin + totalOffset;\n    _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.log.debug(`${totalOffset} - ${msg.message}`);\n  }\n  addLoopFn(msg);\n  bounds.bumpVerticalPos(heightAdjust);\n}\n(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(adjustLoopHeightForWrap, \"adjustLoopHeightForWrap\");\nfunction adjustCreatedDestroyedData(msg, msgModel, lineStartY, index, actors, createdActors, destroyedActors) {\n  function receiverAdjustment(actor, adjustment) {\n    if (actor.x < actors.get(msg.from).x) {\n      bounds.insert(\n        msgModel.stopx - adjustment,\n        msgModel.starty,\n        msgModel.startx,\n        msgModel.stopy + actor.height / 2 + conf.noteMargin\n      );\n      msgModel.stopx = msgModel.stopx + adjustment;\n    } else {\n      bounds.insert(\n        msgModel.startx,\n        msgModel.starty,\n        msgModel.stopx + adjustment,\n        msgModel.stopy + actor.height / 2 + conf.noteMargin\n      );\n      msgModel.stopx = msgModel.stopx - adjustment;\n    }\n  }\n  (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(receiverAdjustment, \"receiverAdjustment\");\n  function senderAdjustment(actor, adjustment) {\n    if (actor.x < actors.get(msg.to).x) {\n      bounds.insert(\n        msgModel.startx - adjustment,\n        msgModel.starty,\n        msgModel.stopx,\n        msgModel.stopy + actor.height / 2 + conf.noteMargin\n      );\n      msgModel.startx = msgModel.startx + adjustment;\n    } else {\n      bounds.insert(\n        msgModel.stopx,\n        msgModel.starty,\n        msgModel.startx + adjustment,\n        msgModel.stopy + actor.height / 2 + conf.noteMargin\n      );\n      msgModel.startx = msgModel.startx - adjustment;\n    }\n  }\n  (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(senderAdjustment, \"senderAdjustment\");\n  const actorArray = [\n    PARTICIPANT_TYPE.ACTOR,\n    PARTICIPANT_TYPE.CONTROL,\n    PARTICIPANT_TYPE.ENTITY,\n    PARTICIPANT_TYPE.DATABASE\n  ];\n  if (createdActors.get(msg.to) == index) {\n    const actor = actors.get(msg.to);\n    const adjustment = actorArray.includes(actor.type) ? ACTOR_TYPE_WIDTH / 2 + 3 : actor.width / 2 + 3;\n    receiverAdjustment(actor, adjustment);\n    actor.starty = lineStartY - actor.height / 2;\n    bounds.bumpVerticalPos(actor.height / 2);\n  } else if (destroyedActors.get(msg.from) == index) {\n    const actor = actors.get(msg.from);\n    if (conf.mirrorActors) {\n      const adjustment = actorArray.includes(actor.type) ? ACTOR_TYPE_WIDTH / 2 : actor.width / 2;\n      senderAdjustment(actor, adjustment);\n    }\n    actor.stopy = lineStartY - actor.height / 2;\n    bounds.bumpVerticalPos(actor.height / 2);\n  } else if (destroyedActors.get(msg.to) == index) {\n    const actor = actors.get(msg.to);\n    if (conf.mirrorActors) {\n      const adjustment = actorArray.includes(actor.type) ? ACTOR_TYPE_WIDTH / 2 + 3 : actor.width / 2 + 3;\n      receiverAdjustment(actor, adjustment);\n    }\n    actor.stopy = lineStartY - actor.height / 2;\n    bounds.bumpVerticalPos(actor.height / 2);\n  }\n}\n(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(adjustCreatedDestroyedData, \"adjustCreatedDestroyedData\");\nvar draw = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(async function(_text, id, _version, diagObj) {\n  const { securityLevel, sequence } = (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.getConfig2)();\n  conf = sequence;\n  let sandboxElement;\n  if (securityLevel === \"sandbox\") {\n    sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_6__.select)(\"#i\" + id);\n  }\n  const root = securityLevel === \"sandbox\" ? (0,d3__WEBPACK_IMPORTED_MODULE_6__.select)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_6__.select)(\"body\");\n  const doc = securityLevel === \"sandbox\" ? sandboxElement.nodes()[0].contentDocument : document;\n  bounds.init();\n  _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.log.debug(diagObj.db);\n  const diagram2 = securityLevel === \"sandbox\" ? root.select(`[id=\"${id}\"]`) : (0,d3__WEBPACK_IMPORTED_MODULE_6__.select)(`[id=\"${id}\"]`);\n  const actors = diagObj.db.getActors();\n  const createdActors = diagObj.db.getCreatedActors();\n  const destroyedActors = diagObj.db.getDestroyedActors();\n  const boxes = diagObj.db.getBoxes();\n  let actorKeys = diagObj.db.getActorKeys();\n  const messages = diagObj.db.getMessages();\n  const title = diagObj.db.getDiagramTitle();\n  const hasBoxes = diagObj.db.hasAtLeastOneBox();\n  const hasBoxTitles = diagObj.db.hasAtLeastOneBoxWithTitle();\n  const maxMessageWidthPerActor = await getMaxMessageWidthPerActor(actors, messages, diagObj);\n  conf.height = await calculateActorMargins(actors, maxMessageWidthPerActor, boxes);\n  svgDraw_default.insertComputerIcon(diagram2);\n  svgDraw_default.insertDatabaseIcon(diagram2);\n  svgDraw_default.insertClockIcon(diagram2);\n  if (hasBoxes) {\n    bounds.bumpVerticalPos(conf.boxMargin);\n    if (hasBoxTitles) {\n      bounds.bumpVerticalPos(boxes[0].textMaxHeight);\n    }\n  }\n  if (conf.hideUnusedParticipants === true) {\n    const newActors = /* @__PURE__ */ new Set();\n    messages.forEach((message) => {\n      newActors.add(message.from);\n      newActors.add(message.to);\n    });\n    actorKeys = actorKeys.filter((actorKey) => newActors.has(actorKey));\n  }\n  addActorRenderingData(diagram2, actors, createdActors, actorKeys, 0, messages, false);\n  const loopWidths = await calculateLoopBounds(messages, actors, maxMessageWidthPerActor, diagObj);\n  svgDraw_default.insertArrowHead(diagram2);\n  svgDraw_default.insertArrowCrossHead(diagram2);\n  svgDraw_default.insertArrowFilledHead(diagram2);\n  svgDraw_default.insertSequenceNumber(diagram2);\n  function activeEnd(msg, verticalPos) {\n    const activationData = bounds.endActivation(msg);\n    if (activationData.starty + 18 > verticalPos) {\n      activationData.starty = verticalPos - 6;\n      verticalPos += 12;\n    }\n    svgDraw_default.drawActivation(\n      diagram2,\n      activationData,\n      verticalPos,\n      conf,\n      actorActivations(msg.from).length\n    );\n    bounds.insert(activationData.startx, verticalPos - 10, activationData.stopx, verticalPos);\n  }\n  (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(activeEnd, \"activeEnd\");\n  let sequenceIndex = 1;\n  let sequenceIndexStep = 1;\n  const messagesToDraw = [];\n  const backgrounds = [];\n  let index = 0;\n  for (const msg of messages) {\n    let loopModel, noteModel, msgModel;\n    switch (msg.type) {\n      case diagObj.db.LINETYPE.NOTE:\n        bounds.resetVerticalPos();\n        noteModel = msg.noteModel;\n        await drawNote(diagram2, noteModel);\n        break;\n      case diagObj.db.LINETYPE.ACTIVE_START:\n        bounds.newActivation(msg, diagram2, actors);\n        break;\n      case diagObj.db.LINETYPE.ACTIVE_END:\n        activeEnd(msg, bounds.getVerticalPos());\n        break;\n      case diagObj.db.LINETYPE.LOOP_START:\n        adjustLoopHeightForWrap(\n          loopWidths,\n          msg,\n          conf.boxMargin,\n          conf.boxMargin + conf.boxTextMargin,\n          (message) => bounds.newLoop(message)\n        );\n        break;\n      case diagObj.db.LINETYPE.LOOP_END:\n        loopModel = bounds.endLoop();\n        await svgDraw_default.drawLoop(diagram2, loopModel, \"loop\", conf);\n        bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n        bounds.models.addLoop(loopModel);\n        break;\n      case diagObj.db.LINETYPE.RECT_START:\n        adjustLoopHeightForWrap(\n          loopWidths,\n          msg,\n          conf.boxMargin,\n          conf.boxMargin,\n          (message) => bounds.newLoop(void 0, message.message)\n        );\n        break;\n      case diagObj.db.LINETYPE.RECT_END:\n        loopModel = bounds.endLoop();\n        backgrounds.push(loopModel);\n        bounds.models.addLoop(loopModel);\n        bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n        break;\n      case diagObj.db.LINETYPE.OPT_START:\n        adjustLoopHeightForWrap(\n          loopWidths,\n          msg,\n          conf.boxMargin,\n          conf.boxMargin + conf.boxTextMargin,\n          (message) => bounds.newLoop(message)\n        );\n        break;\n      case diagObj.db.LINETYPE.OPT_END:\n        loopModel = bounds.endLoop();\n        await svgDraw_default.drawLoop(diagram2, loopModel, \"opt\", conf);\n        bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n        bounds.models.addLoop(loopModel);\n        break;\n      case diagObj.db.LINETYPE.ALT_START:\n        adjustLoopHeightForWrap(\n          loopWidths,\n          msg,\n          conf.boxMargin,\n          conf.boxMargin + conf.boxTextMargin,\n          (message) => bounds.newLoop(message)\n        );\n        break;\n      case diagObj.db.LINETYPE.ALT_ELSE:\n        adjustLoopHeightForWrap(\n          loopWidths,\n          msg,\n          conf.boxMargin + conf.boxTextMargin,\n          conf.boxMargin,\n          (message) => bounds.addSectionToLoop(message)\n        );\n        break;\n      case diagObj.db.LINETYPE.ALT_END:\n        loopModel = bounds.endLoop();\n        await svgDraw_default.drawLoop(diagram2, loopModel, \"alt\", conf);\n        bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n        bounds.models.addLoop(loopModel);\n        break;\n      case diagObj.db.LINETYPE.PAR_START:\n      case diagObj.db.LINETYPE.PAR_OVER_START:\n        adjustLoopHeightForWrap(\n          loopWidths,\n          msg,\n          conf.boxMargin,\n          conf.boxMargin + conf.boxTextMargin,\n          (message) => bounds.newLoop(message)\n        );\n        bounds.saveVerticalPos();\n        break;\n      case diagObj.db.LINETYPE.PAR_AND:\n        adjustLoopHeightForWrap(\n          loopWidths,\n          msg,\n          conf.boxMargin + conf.boxTextMargin,\n          conf.boxMargin,\n          (message) => bounds.addSectionToLoop(message)\n        );\n        break;\n      case diagObj.db.LINETYPE.PAR_END:\n        loopModel = bounds.endLoop();\n        await svgDraw_default.drawLoop(diagram2, loopModel, \"par\", conf);\n        bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n        bounds.models.addLoop(loopModel);\n        break;\n      case diagObj.db.LINETYPE.AUTONUMBER:\n        sequenceIndex = msg.message.start || sequenceIndex;\n        sequenceIndexStep = msg.message.step || sequenceIndexStep;\n        if (msg.message.visible) {\n          diagObj.db.enableSequenceNumbers();\n        } else {\n          diagObj.db.disableSequenceNumbers();\n        }\n        break;\n      case diagObj.db.LINETYPE.CRITICAL_START:\n        adjustLoopHeightForWrap(\n          loopWidths,\n          msg,\n          conf.boxMargin,\n          conf.boxMargin + conf.boxTextMargin,\n          (message) => bounds.newLoop(message)\n        );\n        break;\n      case diagObj.db.LINETYPE.CRITICAL_OPTION:\n        adjustLoopHeightForWrap(\n          loopWidths,\n          msg,\n          conf.boxMargin + conf.boxTextMargin,\n          conf.boxMargin,\n          (message) => bounds.addSectionToLoop(message)\n        );\n        break;\n      case diagObj.db.LINETYPE.CRITICAL_END:\n        loopModel = bounds.endLoop();\n        await svgDraw_default.drawLoop(diagram2, loopModel, \"critical\", conf);\n        bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n        bounds.models.addLoop(loopModel);\n        break;\n      case diagObj.db.LINETYPE.BREAK_START:\n        adjustLoopHeightForWrap(\n          loopWidths,\n          msg,\n          conf.boxMargin,\n          conf.boxMargin + conf.boxTextMargin,\n          (message) => bounds.newLoop(message)\n        );\n        break;\n      case diagObj.db.LINETYPE.BREAK_END:\n        loopModel = bounds.endLoop();\n        await svgDraw_default.drawLoop(diagram2, loopModel, \"break\", conf);\n        bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n        bounds.models.addLoop(loopModel);\n        break;\n      default:\n        try {\n          msgModel = msg.msgModel;\n          msgModel.starty = bounds.getVerticalPos();\n          msgModel.sequenceIndex = sequenceIndex;\n          msgModel.sequenceVisible = diagObj.db.showSequenceNumbers();\n          const lineStartY = await boundMessage(diagram2, msgModel);\n          adjustCreatedDestroyedData(\n            msg,\n            msgModel,\n            lineStartY,\n            index,\n            actors,\n            createdActors,\n            destroyedActors\n          );\n          messagesToDraw.push({ messageModel: msgModel, lineStartY });\n          bounds.models.addMessage(msgModel);\n        } catch (e) {\n          _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.log.error(\"error while drawing message\", e);\n        }\n    }\n    if ([\n      diagObj.db.LINETYPE.SOLID_OPEN,\n      diagObj.db.LINETYPE.DOTTED_OPEN,\n      diagObj.db.LINETYPE.SOLID,\n      diagObj.db.LINETYPE.DOTTED,\n      diagObj.db.LINETYPE.SOLID_CROSS,\n      diagObj.db.LINETYPE.DOTTED_CROSS,\n      diagObj.db.LINETYPE.SOLID_POINT,\n      diagObj.db.LINETYPE.DOTTED_POINT,\n      diagObj.db.LINETYPE.BIDIRECTIONAL_SOLID,\n      diagObj.db.LINETYPE.BIDIRECTIONAL_DOTTED\n    ].includes(msg.type)) {\n      sequenceIndex = sequenceIndex + sequenceIndexStep;\n    }\n    index++;\n  }\n  _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.log.debug(\"createdActors\", createdActors);\n  _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.log.debug(\"destroyedActors\", destroyedActors);\n  await drawActors(diagram2, actors, actorKeys, false);\n  for (const e of messagesToDraw) {\n    await drawMessage(diagram2, e.messageModel, e.lineStartY, diagObj);\n  }\n  if (conf.mirrorActors) {\n    await drawActors(diagram2, actors, actorKeys, true);\n  }\n  backgrounds.forEach((e) => svgDraw_default.drawBackgroundRect(diagram2, e));\n  fixLifeLineHeights(diagram2, actors, actorKeys, conf);\n  for (const box2 of bounds.models.boxes) {\n    box2.height = bounds.getVerticalPos() - box2.y;\n    bounds.insert(box2.x, box2.y, box2.x + box2.width, box2.height);\n    const boxPadding = conf.boxMargin * 2;\n    box2.startx = box2.x - boxPadding;\n    box2.starty = box2.y - boxPadding * 0.25;\n    box2.stopx = box2.startx + box2.width + 2 * boxPadding;\n    box2.stopy = box2.starty + box2.height + boxPadding * 0.75;\n    box2.stroke = \"rgb(0,0,0, 0.5)\";\n    svgDraw_default.drawBox(diagram2, box2, conf);\n  }\n  if (hasBoxes) {\n    bounds.bumpVerticalPos(conf.boxMargin);\n  }\n  const requiredBoxSize = drawActorsPopup(diagram2, actors, actorKeys, doc);\n  const { bounds: box } = bounds.getBounds();\n  if (box.startx === void 0) {\n    box.startx = 0;\n  }\n  if (box.starty === void 0) {\n    box.starty = 0;\n  }\n  if (box.stopx === void 0) {\n    box.stopx = 0;\n  }\n  if (box.stopy === void 0) {\n    box.stopy = 0;\n  }\n  let boxHeight = box.stopy - box.starty;\n  if (boxHeight < requiredBoxSize.maxHeight) {\n    boxHeight = requiredBoxSize.maxHeight;\n  }\n  let height = boxHeight + 2 * conf.diagramMarginY;\n  if (conf.mirrorActors) {\n    height = height - conf.boxMargin + conf.bottomMarginAdj;\n  }\n  let boxWidth = box.stopx - box.startx;\n  if (boxWidth < requiredBoxSize.maxWidth) {\n    boxWidth = requiredBoxSize.maxWidth;\n  }\n  const width = boxWidth + 2 * conf.diagramMarginX;\n  if (title) {\n    diagram2.append(\"text\").text(title).attr(\"x\", (box.stopx - box.startx) / 2 - 2 * conf.diagramMarginX).attr(\"y\", -25);\n  }\n  (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.configureSvgSize)(diagram2, height, width, conf.useMaxWidth);\n  const extraVertForTitle = title ? 40 : 0;\n  diagram2.attr(\n    \"viewBox\",\n    box.startx - conf.diagramMarginX + \" -\" + (conf.diagramMarginY + extraVertForTitle) + \" \" + width + \" \" + (height + extraVertForTitle)\n  );\n  _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.log.debug(`models:`, bounds.models);\n}, \"draw\");\nasync function getMaxMessageWidthPerActor(actors, messages, diagObj) {\n  const maxMessageWidthPerActor = {};\n  for (const msg of messages) {\n    if (actors.get(msg.to) && actors.get(msg.from)) {\n      const actor = actors.get(msg.to);\n      if (msg.placement === diagObj.db.PLACEMENT.LEFTOF && !actor.prevActor) {\n        continue;\n      }\n      if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF && !actor.nextActor) {\n        continue;\n      }\n      const isNote = msg.placement !== void 0;\n      const isMessage = !isNote;\n      const textFont = isNote ? noteFont(conf) : messageFont(conf);\n      const wrappedMessage = msg.wrap ? _chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_3__.utils_default.wrapLabel(msg.message, conf.width - 2 * conf.wrapPadding, textFont) : msg.message;\n      const messageDimensions = (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.hasKatex)(wrappedMessage) ? await (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.calculateMathMLDimensions)(msg.message, (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.getConfig2)()) : _chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_3__.utils_default.calculateTextDimensions(wrappedMessage, textFont);\n      const messageWidth = messageDimensions.width + 2 * conf.wrapPadding;\n      if (isMessage && msg.from === actor.nextActor) {\n        maxMessageWidthPerActor[msg.to] = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(\n          maxMessageWidthPerActor[msg.to] || 0,\n          messageWidth\n        );\n      } else if (isMessage && msg.from === actor.prevActor) {\n        maxMessageWidthPerActor[msg.from] = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(\n          maxMessageWidthPerActor[msg.from] || 0,\n          messageWidth\n        );\n      } else if (isMessage && msg.from === msg.to) {\n        maxMessageWidthPerActor[msg.from] = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(\n          maxMessageWidthPerActor[msg.from] || 0,\n          messageWidth / 2\n        );\n        maxMessageWidthPerActor[msg.to] = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(\n          maxMessageWidthPerActor[msg.to] || 0,\n          messageWidth / 2\n        );\n      } else if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF) {\n        maxMessageWidthPerActor[msg.from] = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(\n          maxMessageWidthPerActor[msg.from] || 0,\n          messageWidth\n        );\n      } else if (msg.placement === diagObj.db.PLACEMENT.LEFTOF) {\n        maxMessageWidthPerActor[actor.prevActor] = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(\n          maxMessageWidthPerActor[actor.prevActor] || 0,\n          messageWidth\n        );\n      } else if (msg.placement === diagObj.db.PLACEMENT.OVER) {\n        if (actor.prevActor) {\n          maxMessageWidthPerActor[actor.prevActor] = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(\n            maxMessageWidthPerActor[actor.prevActor] || 0,\n            messageWidth / 2\n          );\n        }\n        if (actor.nextActor) {\n          maxMessageWidthPerActor[msg.from] = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(\n            maxMessageWidthPerActor[msg.from] || 0,\n            messageWidth / 2\n          );\n        }\n      }\n    }\n  }\n  _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.log.debug(\"maxMessageWidthPerActor:\", maxMessageWidthPerActor);\n  return maxMessageWidthPerActor;\n}\n(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(getMaxMessageWidthPerActor, \"getMaxMessageWidthPerActor\");\nvar getRequiredPopupWidth = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(actor) {\n  let requiredPopupWidth = 0;\n  const textFont = actorFont(conf);\n  for (const key in actor.links) {\n    const labelDimensions = _chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_3__.utils_default.calculateTextDimensions(key, textFont);\n    const labelWidth = labelDimensions.width + 2 * conf.wrapPadding + 2 * conf.boxMargin;\n    if (requiredPopupWidth < labelWidth) {\n      requiredPopupWidth = labelWidth;\n    }\n  }\n  return requiredPopupWidth;\n}, \"getRequiredPopupWidth\");\nasync function calculateActorMargins(actors, actorToMessageWidth, boxes) {\n  let maxHeight = 0;\n  for (const prop of actors.keys()) {\n    const actor = actors.get(prop);\n    if (actor.wrap) {\n      actor.description = _chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_3__.utils_default.wrapLabel(\n        actor.description,\n        conf.width - 2 * conf.wrapPadding,\n        actorFont(conf)\n      );\n    }\n    const actDims = (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.hasKatex)(actor.description) ? await (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.calculateMathMLDimensions)(actor.description, (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.getConfig2)()) : _chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_3__.utils_default.calculateTextDimensions(actor.description, actorFont(conf));\n    actor.width = actor.wrap ? conf.width : _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(conf.width, actDims.width + 2 * conf.wrapPadding);\n    actor.height = actor.wrap ? _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(actDims.height, conf.height) : conf.height;\n    maxHeight = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(maxHeight, actor.height);\n  }\n  for (const actorKey in actorToMessageWidth) {\n    const actor = actors.get(actorKey);\n    if (!actor) {\n      continue;\n    }\n    const nextActor = actors.get(actor.nextActor);\n    if (!nextActor) {\n      const messageWidth2 = actorToMessageWidth[actorKey];\n      const actorWidth2 = messageWidth2 + conf.actorMargin - actor.width / 2;\n      actor.margin = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(actorWidth2, conf.actorMargin);\n      continue;\n    }\n    const messageWidth = actorToMessageWidth[actorKey];\n    const actorWidth = messageWidth + conf.actorMargin - actor.width / 2 - nextActor.width / 2;\n    actor.margin = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(actorWidth, conf.actorMargin);\n  }\n  let maxBoxHeight = 0;\n  boxes.forEach((box) => {\n    const textFont = messageFont(conf);\n    let totalWidth = box.actorKeys.reduce((total, aKey) => {\n      return total += actors.get(aKey).width + (actors.get(aKey).margin || 0);\n    }, 0);\n    const standardBoxPadding = conf.boxMargin * 8;\n    totalWidth += standardBoxPadding;\n    totalWidth -= 2 * conf.boxTextMargin;\n    if (box.wrap) {\n      box.name = _chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_3__.utils_default.wrapLabel(box.name, totalWidth - 2 * conf.wrapPadding, textFont);\n    }\n    const boxMsgDimensions = _chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_3__.utils_default.calculateTextDimensions(box.name, textFont);\n    maxBoxHeight = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(boxMsgDimensions.height, maxBoxHeight);\n    const minWidth = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(totalWidth, boxMsgDimensions.width + 2 * conf.wrapPadding);\n    box.margin = conf.boxTextMargin;\n    if (totalWidth < minWidth) {\n      const missing = (minWidth - totalWidth) / 2;\n      box.margin += missing;\n    }\n  });\n  boxes.forEach((box) => box.textMaxHeight = maxBoxHeight);\n  return _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(maxHeight, conf.height);\n}\n(0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(calculateActorMargins, \"calculateActorMargins\");\nvar buildNoteModel = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(async function(msg, actors, diagObj) {\n  const fromActor = actors.get(msg.from);\n  const toActor = actors.get(msg.to);\n  const startx = fromActor.x;\n  const stopx = toActor.x;\n  const shouldWrap = msg.wrap && msg.message;\n  let textDimensions = (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.hasKatex)(msg.message) ? await (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.calculateMathMLDimensions)(msg.message, (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.getConfig2)()) : _chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_3__.utils_default.calculateTextDimensions(\n    shouldWrap ? _chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_3__.utils_default.wrapLabel(msg.message, conf.width, noteFont(conf)) : msg.message,\n    noteFont(conf)\n  );\n  const noteModel = {\n    width: shouldWrap ? conf.width : _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(conf.width, textDimensions.width + 2 * conf.noteMargin),\n    height: 0,\n    startx: fromActor.x,\n    stopx: 0,\n    starty: 0,\n    stopy: 0,\n    message: msg.message\n  };\n  if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF) {\n    noteModel.width = shouldWrap ? _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(conf.width, textDimensions.width) : _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(\n      fromActor.width / 2 + toActor.width / 2,\n      textDimensions.width + 2 * conf.noteMargin\n    );\n    noteModel.startx = startx + (fromActor.width + conf.actorMargin) / 2;\n  } else if (msg.placement === diagObj.db.PLACEMENT.LEFTOF) {\n    noteModel.width = shouldWrap ? _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(conf.width, textDimensions.width + 2 * conf.noteMargin) : _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(\n      fromActor.width / 2 + toActor.width / 2,\n      textDimensions.width + 2 * conf.noteMargin\n    );\n    noteModel.startx = startx - noteModel.width + (fromActor.width - conf.actorMargin) / 2;\n  } else if (msg.to === msg.from) {\n    textDimensions = _chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_3__.utils_default.calculateTextDimensions(\n      shouldWrap ? _chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_3__.utils_default.wrapLabel(msg.message, _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(conf.width, fromActor.width), noteFont(conf)) : msg.message,\n      noteFont(conf)\n    );\n    noteModel.width = shouldWrap ? _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(conf.width, fromActor.width) : _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(fromActor.width, conf.width, textDimensions.width + 2 * conf.noteMargin);\n    noteModel.startx = startx + (fromActor.width - noteModel.width) / 2;\n  } else {\n    noteModel.width = Math.abs(startx + fromActor.width / 2 - (stopx + toActor.width / 2)) + conf.actorMargin;\n    noteModel.startx = startx < stopx ? startx + fromActor.width / 2 - conf.actorMargin / 2 : stopx + toActor.width / 2 - conf.actorMargin / 2;\n  }\n  if (shouldWrap) {\n    noteModel.message = _chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_3__.utils_default.wrapLabel(\n      msg.message,\n      noteModel.width - 2 * conf.wrapPadding,\n      noteFont(conf)\n    );\n  }\n  _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.log.debug(\n    `NM:[${noteModel.startx},${noteModel.stopx},${noteModel.starty},${noteModel.stopy}:${noteModel.width},${noteModel.height}=${msg.message}]`\n  );\n  return noteModel;\n}, \"buildNoteModel\");\nvar buildMessageModel = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(function(msg, actors, diagObj) {\n  if (![\n    diagObj.db.LINETYPE.SOLID_OPEN,\n    diagObj.db.LINETYPE.DOTTED_OPEN,\n    diagObj.db.LINETYPE.SOLID,\n    diagObj.db.LINETYPE.DOTTED,\n    diagObj.db.LINETYPE.SOLID_CROSS,\n    diagObj.db.LINETYPE.DOTTED_CROSS,\n    diagObj.db.LINETYPE.SOLID_POINT,\n    diagObj.db.LINETYPE.DOTTED_POINT,\n    diagObj.db.LINETYPE.BIDIRECTIONAL_SOLID,\n    diagObj.db.LINETYPE.BIDIRECTIONAL_DOTTED\n  ].includes(msg.type)) {\n    return {};\n  }\n  const [fromLeft, fromRight] = activationBounds(msg.from, actors);\n  const [toLeft, toRight] = activationBounds(msg.to, actors);\n  const isArrowToRight = fromLeft <= toLeft;\n  let startx = isArrowToRight ? fromRight : fromLeft;\n  let stopx = isArrowToRight ? toLeft : toRight;\n  const isArrowToActivation = Math.abs(toLeft - toRight) > 2;\n  const adjustValue = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)((value) => {\n    return isArrowToRight ? -value : value;\n  }, \"adjustValue\");\n  if (msg.from === msg.to) {\n    stopx = startx;\n  } else {\n    if (msg.activate && !isArrowToActivation) {\n      stopx += adjustValue(conf.activationWidth / 2 - 1);\n    }\n    if (![diagObj.db.LINETYPE.SOLID_OPEN, diagObj.db.LINETYPE.DOTTED_OPEN].includes(msg.type)) {\n      stopx += adjustValue(3);\n    }\n    if ([diagObj.db.LINETYPE.BIDIRECTIONAL_SOLID, diagObj.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(\n      msg.type\n    )) {\n      startx -= adjustValue(3);\n    }\n  }\n  const allBounds = [fromLeft, fromRight, toLeft, toRight];\n  const boundedWidth = Math.abs(startx - stopx);\n  if (msg.wrap && msg.message) {\n    msg.message = _chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_3__.utils_default.wrapLabel(\n      msg.message,\n      _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(boundedWidth + 2 * conf.wrapPadding, conf.width),\n      messageFont(conf)\n    );\n  }\n  const msgDims = _chunk_S3R3BYOJ_mjs__WEBPACK_IMPORTED_MODULE_3__.utils_default.calculateTextDimensions(msg.message, messageFont(conf));\n  return {\n    width: _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(\n      msg.wrap ? 0 : msgDims.width + 2 * conf.wrapPadding,\n      boundedWidth + 2 * conf.wrapPadding,\n      conf.width\n    ),\n    height: 0,\n    startx,\n    stopx,\n    starty: 0,\n    stopy: 0,\n    message: msg.message,\n    type: msg.type,\n    wrap: msg.wrap,\n    fromBounds: Math.min.apply(null, allBounds),\n    toBounds: Math.max.apply(null, allBounds)\n  };\n}, \"buildMessageModel\");\nvar calculateLoopBounds = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)(async function(messages, actors, _maxWidthPerActor, diagObj) {\n  const loops = {};\n  const stack = [];\n  let current, noteModel, msgModel;\n  for (const msg of messages) {\n    switch (msg.type) {\n      case diagObj.db.LINETYPE.LOOP_START:\n      case diagObj.db.LINETYPE.ALT_START:\n      case diagObj.db.LINETYPE.OPT_START:\n      case diagObj.db.LINETYPE.PAR_START:\n      case diagObj.db.LINETYPE.PAR_OVER_START:\n      case diagObj.db.LINETYPE.CRITICAL_START:\n      case diagObj.db.LINETYPE.BREAK_START:\n        stack.push({\n          id: msg.id,\n          msg: msg.message,\n          from: Number.MAX_SAFE_INTEGER,\n          to: Number.MIN_SAFE_INTEGER,\n          width: 0\n        });\n        break;\n      case diagObj.db.LINETYPE.ALT_ELSE:\n      case diagObj.db.LINETYPE.PAR_AND:\n      case diagObj.db.LINETYPE.CRITICAL_OPTION:\n        if (msg.message) {\n          current = stack.pop();\n          loops[current.id] = current;\n          loops[msg.id] = current;\n          stack.push(current);\n        }\n        break;\n      case diagObj.db.LINETYPE.LOOP_END:\n      case diagObj.db.LINETYPE.ALT_END:\n      case diagObj.db.LINETYPE.OPT_END:\n      case diagObj.db.LINETYPE.PAR_END:\n      case diagObj.db.LINETYPE.CRITICAL_END:\n      case diagObj.db.LINETYPE.BREAK_END:\n        current = stack.pop();\n        loops[current.id] = current;\n        break;\n      case diagObj.db.LINETYPE.ACTIVE_START:\n        {\n          const actorRect = actors.get(msg.from ? msg.from : msg.to.actor);\n          const stackedSize = actorActivations(msg.from ? msg.from : msg.to.actor).length;\n          const x = actorRect.x + actorRect.width / 2 + (stackedSize - 1) * conf.activationWidth / 2;\n          const toAdd = {\n            startx: x,\n            stopx: x + conf.activationWidth,\n            actor: msg.from,\n            enabled: true\n          };\n          bounds.activations.push(toAdd);\n        }\n        break;\n      case diagObj.db.LINETYPE.ACTIVE_END:\n        {\n          const lastActorActivationIdx = bounds.activations.map((a) => a.actor).lastIndexOf(msg.from);\n          bounds.activations.splice(lastActorActivationIdx, 1).splice(0, 1);\n        }\n        break;\n    }\n    const isNote = msg.placement !== void 0;\n    if (isNote) {\n      noteModel = await buildNoteModel(msg, actors, diagObj);\n      msg.noteModel = noteModel;\n      stack.forEach((stk) => {\n        current = stk;\n        current.from = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMin(current.from, noteModel.startx);\n        current.to = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(current.to, noteModel.startx + noteModel.width);\n        current.width = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(current.width, Math.abs(current.from - current.to)) - conf.labelBoxWidth;\n      });\n    } else {\n      msgModel = buildMessageModel(msg, actors, diagObj);\n      msg.msgModel = msgModel;\n      if (msgModel.startx && msgModel.stopx && stack.length > 0) {\n        stack.forEach((stk) => {\n          current = stk;\n          if (msgModel.startx === msgModel.stopx) {\n            const from = actors.get(msg.from);\n            const to = actors.get(msg.to);\n            current.from = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMin(\n              from.x - msgModel.width / 2,\n              from.x - from.width / 2,\n              current.from\n            );\n            current.to = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(\n              to.x + msgModel.width / 2,\n              to.x + from.width / 2,\n              current.to\n            );\n            current.width = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(current.width, Math.abs(current.to - current.from)) - conf.labelBoxWidth;\n          } else {\n            current.from = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMin(msgModel.startx, current.from);\n            current.to = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(msgModel.stopx, current.to);\n            current.width = _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.common_default.getMax(current.width, msgModel.width) - conf.labelBoxWidth;\n          }\n        });\n      }\n    }\n  }\n  bounds.activations = [];\n  _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.log.debug(\"Loop type widths:\", loops);\n  return loops;\n}, \"calculateLoopBounds\");\nvar sequenceRenderer_default = {\n  bounds,\n  drawActors,\n  drawActorsPopup,\n  setConf,\n  draw\n};\n\n// src/diagrams/sequence/sequenceDiagram.ts\nvar diagram = {\n  parser: sequenceDiagram_default,\n  get db() {\n    return new SequenceDB();\n  },\n  renderer: sequenceRenderer_default,\n  styles: styles_default,\n  init: /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_5__.__name)((cnf) => {\n    if (!cnf.sequence) {\n      cnf.sequence = {};\n    }\n    if (cnf.wrap) {\n      cnf.sequence.wrap = cnf.wrap;\n      (0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_4__.setConfig2)({ sequence: { wrap: cnf.wrap } });\n    }\n  }, \"init\")\n};\n\n\n\n//# sourceURL=webpack://_JUPYTERLAB.CORE_OUTPUT/../node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WL72ISMW.mjs?");

/***/ })

}]);