@agent-link/server 0.1.514 → 0.1.516
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/web/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/web/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/web/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/web/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/web/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/web/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/web/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/web/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/web/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/web/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/web/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/web/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/web/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/web/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/web/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/web/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/web/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/web/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/web/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/web/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/web/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/web/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/web/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/web/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/web/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/web/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/web/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/web/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/web/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/web/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/web/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/web/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/web/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/web/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/web/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/web/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/web/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/web/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/web/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/web/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/web/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/web/dist/assets/abnfDiagram-VRR7QNED-BUjsT5Jl.js +1 -0
- package/web/dist/assets/arc-g7pWmx0C.js +1 -0
- package/web/dist/assets/architectureDiagram-ZJ3FMSHR-DdY1zStg.js +1 -0
- package/web/dist/assets/blockDiagram-677ZJIJ3-p821t5EL.js +1 -0
- package/web/dist/assets/c4Diagram-LMCZKHZV-BDxSF0rZ.js +1 -0
- package/web/dist/assets/channel-DZ15n_vn.js +1 -0
- package/web/dist/assets/chunk-2Q5K7J3B-B6At725E.js +1 -0
- package/web/dist/assets/chunk-32BRIVSS-ByOJtY8z.js +1 -0
- package/web/dist/assets/chunk-5VM5RSS4-DodNdju3.js +1 -0
- package/web/dist/assets/chunk-EX3LRPZG-BbkcflSb.js +1 -0
- package/web/dist/assets/chunk-JWPE2WC7-Cbd64bDm.js +1 -0
- package/web/dist/assets/chunk-MOJQB5TN-BCdBF-nP.js +1 -0
- package/web/dist/assets/chunk-RYQCIY6F-C25IRTcm.js +1 -0
- package/web/dist/assets/chunk-V7JOEXUC-CTFuOUPA.js +1 -0
- package/web/dist/assets/chunk-VR4S4FIN-DGfPvqRe.js +1 -0
- package/web/dist/assets/chunk-XXDRQBXY-B487xPKi.js +1 -0
- package/web/dist/assets/classDiagram-OUVF2IWQ-D4kzK_ro.js +1 -0
- package/web/dist/assets/classDiagram-v2-EOCWNBFH-D4kzK_ro.js +1 -0
- package/web/dist/assets/cose-bilkent-JH36ORCC-DUMkrDFK.js +1 -0
- package/web/dist/assets/{cssMode-BVP-lg8e.js → cssMode-CdsyJmus.js} +1 -1
- package/web/dist/assets/cynefin-VYW2F7L2-BlGVzc2_.js +15 -0
- package/web/dist/assets/cynefinDiagram-TSTJHNR4-PoQ0yMv9.js +1 -0
- package/web/dist/assets/cytoscape.esm-t-ybqhnH.js +9 -0
- package/web/dist/assets/dagre-VKFMJZFB-BWyn717Z.js +1 -0
- package/web/dist/assets/defaultLocale-BsH76t_G.js +1 -0
- package/web/dist/assets/diagram-FQU43EPY-B3lehSFh.js +1 -0
- package/web/dist/assets/diagram-G47NLZAW-CVRsDrwp.js +1 -0
- package/web/dist/assets/diagram-NH7WQ7WH-DPlGYep5.js +1 -0
- package/web/dist/assets/diagram-OA4YK3LP-DmAZvYGW.js +1 -0
- package/web/dist/assets/diagram-WEI45ONY-BKU8fuXs.js +1 -0
- package/web/dist/assets/ebnfDiagram-CCIWWBDH-DCw-gQk-.js +1 -0
- package/web/dist/assets/{editor.main-GMui43Hi.js → editor.main-BvdG8I8J.js} +3 -3
- package/web/dist/assets/erDiagram-Q63AITRT-B83I2lOG.js +1 -0
- package/web/dist/assets/flowDiagram-23GEKE2U-ntdq9hFf.js +1 -0
- package/web/dist/assets/{freemarker2-BIV1vE86.js → freemarker2-DheGgBGE.js} +1 -1
- package/web/dist/assets/ganttDiagram-NO4QXBWP-4DvbAFgY.js +1 -0
- package/web/dist/assets/gitGraphDiagram-IHSO6WYX-DpRPEjV6.js +1 -0
- package/web/dist/assets/graph-DaY0Al7L.js +1 -0
- package/web/dist/assets/{handlebars-DJpbpIyl.js → handlebars-CckrWHXt.js} +1 -1
- package/web/dist/assets/{html-Coanr1Wq.js → html-C43OYA91.js} +1 -1
- package/web/dist/assets/{htmlMode-D1FwOZyW.js → htmlMode-lFho_JTn.js} +1 -1
- package/web/dist/assets/index-CMoSnPi6.css +32 -0
- package/web/dist/assets/index-uJhfY-Ds.js +45 -0
- package/web/dist/assets/infoDiagram-FWYZ7A6U-1eJf2fJM.js +1 -0
- package/web/dist/assets/init-C0SZ43gy.js +1 -0
- package/web/dist/assets/ishikawaDiagram-FXEZZL3T-COJ6FHQU.js +1 -0
- package/web/dist/assets/{javascript-bCoiQwMM.js → javascript-BJV9A7A7.js} +1 -1
- package/web/dist/assets/journeyDiagram-5HDEW3XC-DTG6ApTa.js +1 -0
- package/web/dist/assets/{jsonMode-enM9TwR0.js → jsonMode-D4R8rHC6.js} +1 -1
- package/web/dist/assets/kanban-definition-HUTT4EX6-Ch9Vv2Ww.js +1 -0
- package/web/dist/assets/katex-0DbU9dfb.js +1 -0
- package/web/dist/assets/layout-C0UWAnD9.js +1 -0
- package/web/dist/assets/linear-BmFo1B75.js +1 -0
- package/web/dist/assets/{liquid-CszNaE-2.js → liquid-D3s3nyQz.js} +1 -1
- package/web/dist/assets/{lspLanguageFeatures-BDk6vcdq.js → lspLanguageFeatures-8aPLOpk2.js} +1 -1
- package/web/dist/assets/map-DupEyqkA.js +1 -0
- package/web/dist/assets/{mdx-kBp56vUn.js → mdx-DDTVuV3U.js} +1 -1
- package/web/dist/assets/mermaid.core-5jj-23N2.js +7 -0
- package/web/dist/assets/mindmap-definition-LN4V7U3C-DyoV-6vp.js +1 -0
- package/web/dist/assets/ordinal-CVjKTKEW.js +1 -0
- package/web/dist/assets/pegDiagram-2B236MQR-ByVdM12w.js +1 -0
- package/web/dist/assets/pieDiagram-ENE6RG2P-DWqHi0F2.js +1 -0
- package/web/dist/assets/{python-CqD2LrC5.js → python-CBtQzFsj.js} +1 -1
- package/web/dist/assets/quadrantDiagram-ABIIQ3AL-D-w-JKTm.js +1 -0
- package/web/dist/assets/railroadDiagram-RFXS5EU6-BiVVSb2K.js +1 -0
- package/web/dist/assets/{razor-CIX8et7e.js → razor-BJGBgvpK.js} +1 -1
- package/web/dist/assets/requirementDiagram-TGXJPOKE-CuLeAThk.js +1 -0
- package/web/dist/assets/sankeyDiagram-HTMAVEWB-DHKfF6mB.js +1 -0
- package/web/dist/assets/sequenceDiagram-DBY2YBRQ-Cmr2xhzm.js +1 -0
- package/web/dist/assets/sizeCapture-X5ZJPWSS-SdH7bebB.js +1 -0
- package/web/dist/assets/stateDiagram-2N3HPSRC-BLWksXfF.js +1 -0
- package/web/dist/assets/stateDiagram-v2-6OUMAXLB-gDBt9zc0.js +1 -0
- package/web/dist/assets/swimlanes-5IMT3BWC-v_nvNhJi.js +2 -0
- package/web/dist/assets/swimlanesDiagram-G3AALYLV-aCkqc0Za.js +1 -0
- package/web/dist/assets/timeline-definition-FHXFAJF6-D3qhITJm.js +1 -0
- package/web/dist/assets/{tsMode-BO5vf4Sq.js → tsMode-DxcojxIQ.js} +1 -1
- package/web/dist/assets/{typescript-DzvkAKiy.js → typescript-WJrpuPAD.js} +1 -1
- package/web/dist/assets/vennDiagram-L72KCM5P-B1aJUCUq.js +1 -0
- package/web/dist/assets/wardleyDiagram-EHGQE667-Dv9rOWSR.js +1 -0
- package/web/dist/assets/{xml-BXIbPO12.js → xml-C6uSUkGV.js} +1 -1
- package/web/dist/assets/xychartDiagram-FW5EYKEG-C_XjudM0.js +1 -0
- package/web/dist/assets/{yaml-COh21kph.js → yaml-BDwAJ4A_.js} +1 -1
- package/web/dist/index.html +2 -2
- package/web/dist/locales/en.json +7 -0
- package/web/dist/locales/zh.json +7 -0
- package/web/dist/assets/index-BYehqthn.js +0 -43
- package/web/dist/assets/index-CJbuaAi0.css +0 -32
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as t}from"./chunk-5VM5RSS4-DodNdju3.js";import{az as e,aA as r,aB as a,aC as i,aD as n,aE as s,aF as o,aG as l,aH as c,aI as d,aJ as h,aK as g,aL as u,aM as y,aN as p,aO as x,aP as b,aQ as f,aR as m,aS as w,aT as k,aU as S,aV as L,aW as _,aX as v,_ as E,y as T,d as D,e as $,l as I,p as N,r as C,c as B,aY as O,O as R,P as z,L as A,aZ as M,a_ as P,a$ as Y,ar as j,x as F,k as W,b0 as X,i as H,b1 as U,b2 as K}from"./mermaid.core-5jj-23N2.js";import{G as Z}from"./graph-DaY0Al7L.js";import{c as q}from"./channel-DZ15n_vn.js";import"./index-uJhfY-Ds.js";function V(t){if(e(t))return t;const E=r(t);if(!function(t){switch(r(t)){case v:case _:case L:case S:case k:case w:case m:case f:case b:case x:case p:case y:case u:case g:case h:case d:case c:case l:case o:case s:case n:case i:return!0;default:return!1}}(t))return{};if(T=t,Array.isArray(T)){const e=Array.from(t);return t.length>0&&"string"==typeof t[0]&&Object.hasOwn(t,"index")&&(e.index=t.index,e.input=t.input),e}var T;if(a(t)){const e=t;return new(0,e.constructor)(e.buffer,e.byteOffset,e.length)}if("[object ArrayBuffer]"===E)return new ArrayBuffer(t.byteLength);if("[object DataView]"===E){const e=t,r=e.buffer,a=e.byteOffset,i=e.byteLength,n=new ArrayBuffer(i),s=new Uint8Array(r,a,i);return new Uint8Array(n).set(s),new DataView(n)}if("[object Boolean]"===E||"[object Number]"===E||"[object String]"===E){const e=new(0,t.constructor)(t.valueOf());return"[object String]"===E?function(t,e){const r=e.valueOf().length;for(const a in e)Object.hasOwn(e,a)&&(Number.isNaN(Number(a))||Number(a)>=r)&&(t[a]=e[a])}(e,t):G(e,t),e}if("[object Date]"===E)return new Date(Number(t));if("[object RegExp]"===E){const e=t,r=new RegExp(e.source,e.flags);return r.lastIndex=e.lastIndex,r}if("[object Symbol]"===E)return Object(Symbol.prototype.valueOf.call(t));if("[object Map]"===E){const e=t,r=new Map;return e.forEach((t,e)=>{r.set(e,t)}),r}if("[object Set]"===E){const e=t,r=new Set;return e.forEach(t=>{r.add(t)}),r}if("[object Arguments]"===E){const e=t,r={};return G(r,e),r.length=e.length,r[Symbol.iterator]=e[Symbol.iterator],r}const D={};return function(t,e){const r=Object.getPrototypeOf(e);null!==r&&"function"==typeof e.constructor&&Object.setPrototypeOf(t,r)}(D,t),G(D,t),function(t,e){const r=Object.getOwnPropertySymbols(e);for(let a=0;a<r.length;a++){const i=r[a];Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}}(D,t),D}function G(t,e){for(const r in e)Object.hasOwn(e,r)&&(t[r]=e[r])}var J=function(){var t=E(function(t,e,r,a){for(r=r||{},a=t.length;a--;r[t[a]]=e);return r},"o"),e=[1,15],r=[1,7],a=[1,13],i=[1,14],n=[1,19],s=[1,16],o=[1,17],l=[1,18],c=[8,30],d=[8,10,21,28,29,30,31,39,43,46],h=[1,23],g=[1,24],u=[8,10,15,16,21,28,29,30,31,39,43,46],y=[8,10,15,16,21,27,28,29,30,31,39,43,46],p=[1,49],x={trace:E(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:E(function(t,e,r,a,i,n,s){var o=n.length-1;switch(i){case 4:a.getLogger().debug("Rule: separator (NL) ");break;case 5:a.getLogger().debug("Rule: separator (Space) ");break;case 6:a.getLogger().debug("Rule: separator (EOF) ");break;case 7:a.getLogger().debug("Rule: hierarchy: ",n[o-1]),a.setHierarchy(n[o-1]);break;case 8:a.getLogger().debug("Stop NL ");break;case 9:a.getLogger().debug("Stop EOF ");break;case 10:a.getLogger().debug("Stop NL2 ");break;case 11:a.getLogger().debug("Stop EOF2 ");break;case 12:a.getLogger().debug("Rule: statement: ",n[o]),"number"==typeof n[o].length?this.$=n[o]:this.$=[n[o]];break;case 13:a.getLogger().debug("Rule: statement #2: ",n[o-1]),this.$=[n[o-1]].concat(n[o]);break;case 14:a.getLogger().debug("Rule: link: ",n[o],t),this.$={edgeTypeStr:n[o],label:""};break;case 15:a.getLogger().debug("Rule: LABEL link: ",n[o-3],n[o-1],n[o]),this.$={edgeTypeStr:n[o],label:n[o-1]};break;case 18:const e=parseInt(n[o]),r=a.generateId();this.$={id:r,type:"space",label:"",width:e,children:[]};break;case 23:a.getLogger().debug("Rule: (nodeStatement link node) ",n[o-2],n[o-1],n[o]," typestr: ",n[o-1].edgeTypeStr);const i=a.edgeStrToEdgeData(n[o-1].edgeTypeStr),s=a.edgeStrToEdgeStartData(n[o-1].edgeTypeStr),l=a.edgeStrToThickness(n[o-1].edgeTypeStr),c=a.edgeStrToPattern(n[o-1].edgeTypeStr);this.$=[{id:n[o-2].id,label:n[o-2].label,type:n[o-2].type,directions:n[o-2].directions},{id:n[o-2].id+"-"+n[o].id,start:n[o-2].id,end:n[o].id,label:n[o-1].label,type:"edge",thickness:l,pattern:c,directions:n[o].directions,arrowTypeEnd:i,arrowTypeStart:s},{id:n[o].id,label:n[o].label,type:a.typeStr2Type(n[o].typeStr),directions:n[o].directions}];break;case 24:a.getLogger().debug("Rule: nodeStatement (abc88 node size) ",n[o-1],n[o]),this.$={id:n[o-1].id,label:n[o-1].label,type:a.typeStr2Type(n[o-1].typeStr),directions:n[o-1].directions,widthInColumns:parseInt(n[o],10)};break;case 25:a.getLogger().debug("Rule: nodeStatement (node) ",n[o]),this.$={id:n[o].id,label:n[o].label,type:a.typeStr2Type(n[o].typeStr),directions:n[o].directions,widthInColumns:1};break;case 26:a.getLogger().debug("APA123",this?this:"na"),a.getLogger().debug("COLUMNS: ",n[o]),this.$={type:"column-setting",columns:"auto"===n[o]?-1:parseInt(n[o])};break;case 27:a.getLogger().debug("Rule: id-block statement : ",n[o-2],n[o-1]),a.generateId(),this.$={...n[o-2],type:"composite",children:n[o-1]};break;case 28:a.getLogger().debug("Rule: blockStatement : ",n[o-2],n[o-1],n[o]);const d=a.generateId();this.$={id:d,type:"composite",label:"",children:n[o-1]};break;case 29:a.getLogger().debug("Rule: node (NODE_ID separator): ",n[o]),this.$={id:n[o]};break;case 30:a.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",n[o-1],n[o]),this.$={id:n[o-1],label:n[o].label,typeStr:n[o].typeStr,directions:n[o].directions};break;case 31:a.getLogger().debug("Rule: dirList: ",n[o]),this.$=[n[o]];break;case 32:a.getLogger().debug("Rule: dirList: ",n[o-1],n[o]),this.$=[n[o-1]].concat(n[o]);break;case 33:a.getLogger().debug("Rule: nodeShapeNLabel: ",n[o-2],n[o-1],n[o]),this.$={typeStr:n[o-2]+n[o],label:n[o-1]};break;case 34:a.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",n[o-3],n[o-2]," #3:",n[o-1],n[o]),this.$={typeStr:n[o-3]+n[o],label:n[o-2],directions:n[o-1]};break;case 35:case 36:this.$={type:"classDef",id:n[o-1].trim(),css:n[o].trim()};break;case 37:this.$={type:"applyClass",id:n[o-1].trim(),styleClass:n[o].trim()};break;case 38:this.$={type:"applyStyles",id:n[o-1].trim(),stylesStr:n[o].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:e,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:n,39:s,43:o,46:l},{8:[1,20]},t(c,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:e,21:r,28:a,29:i,31:n,39:s,43:o,46:l}),t(d,[2,16],{14:22,15:h,16:g}),t(d,[2,17]),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,22]),t(u,[2,25],{27:[1,25]}),t(d,[2,26]),{19:26,26:12,31:n},{10:e,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:n,39:s,43:o,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(y,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(c,[2,13]),{26:35,31:n},{31:[2,14]},{17:[1,36]},t(u,[2,24]),{10:e,11:37,13:4,14:22,15:h,16:g,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:n,39:s,43:o,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(y,[2,30]),{18:[1,43]},{18:[1,44]},t(u,[2,23]),{18:[1,45]},{30:[1,46]},t(d,[2,28]),t(d,[2,35]),t(d,[2,36]),t(d,[2,37]),t(d,[2,38]),{36:[1,47]},{33:48,34:p},{15:[1,50]},t(d,[2,27]),t(y,[2,33]),{38:[1,51]},{33:52,34:p,38:[2,31]},{31:[2,15]},t(y,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:E(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:E(function(t){var e=this,r=[0],a=[],i=[null],n=[],s=this.table,o="",l=0,c=0,d=n.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var u in this.yy)Object.prototype.hasOwnProperty.call(this.yy,u)&&(g.yy[u]=this.yy[u]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var y=h.yylloc;n.push(y);var p=h.options&&h.options.ranges;function x(){var t;return"number"!=typeof(t=a.pop()||h.lex()||1)&&(t instanceof Array&&(t=(a=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,E(function(t){r.length=r.length-2*t,i.length=i.length-t,n.length=n.length-t},"popStack"),E(x,"lex");for(var b,f,m,w,k,S,L,_,v={};;){if(f=r[r.length-1],this.defaultActions[f]?m=this.defaultActions[f]:(null==b&&(b=x()),m=s[f]&&s[f][b]),void 0===m||!m.length||!m[0]){var T="";for(k in _=[],s[f])this.terminals_[k]&&k>2&&_.push("'"+this.terminals_[k]+"'");T=h.showPosition?"Parse error on line "+(l+1)+":\n"+h.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(T,{text:h.match,token:this.terminals_[b]||b,line:h.yylineno,loc:y,expected:_})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+f+", token: "+b);switch(m[0]){case 1:r.push(b),i.push(h.yytext),n.push(h.yylloc),r.push(m[1]),b=null,c=h.yyleng,o=h.yytext,l=h.yylineno,y=h.yylloc;break;case 2:if(S=this.productions_[m[1]][1],v.$=i[i.length-S],v._$={first_line:n[n.length-(S||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(S||1)].first_column,last_column:n[n.length-1].last_column},p&&(v._$.range=[n[n.length-(S||1)].range[0],n[n.length-1].range[1]]),void 0!==(w=this.performAction.apply(v,[o,c,l,g.yy,m[1],i,n].concat(d))))return w;S&&(r=r.slice(0,-1*S*2),i=i.slice(0,-1*S),n=n.slice(0,-1*S)),r.push(this.productions_[m[1]][0]),i.push(v.$),n.push(v._$),L=s[r[r.length-2]][r[r.length-1]],r.push(L);break;case 3:return!0}}return!0},"parse")},b=function(){return{EOF:1,parseError:E(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:E(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:E(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:E(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:E(function(){return this._more=!0,this},"more"),reject:E(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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(),{text:"",token:null,line:this.yylineno})},"reject"),less:E(function(t){this.unput(this.match.slice(t))},"less"),pastInput:E(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:E(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:E(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:E(function(t,e){var r,a,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var n in i)this[n]=i[n];return!1}return!1},"test_match"),next:E(function(){if(this.done)return this.EOF;var t,e,r,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),n=0;n<i.length;n++)if((r=this._input.match(this.rules[i[n]]))&&(!e||r[0].length>e[0].length)){if(e=r,a=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[n])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:E(function(){var t=this.next();return t||this.lex()},"lex"),begin:E(function(t){this.conditionStack.push(t)},"begin"),popState:E(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:E(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:E(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:E(function(t){this.begin(t)},"pushState"),stateStackSize:E(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:E(function(t,e,r,a){switch(r){case 0:return t.getLogger().debug("Found block-beta"),10;case 1:return t.getLogger().debug("Found id-block"),29;case 2:return t.getLogger().debug("Found block"),10;case 3:t.getLogger().debug(".",e.yytext);break;case 4:t.getLogger().debug("_",e.yytext);break;case 5:return 5;case 6:return e.yytext=-1,28;case 7:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.yytext),28;case 8:case 76:case 77:case 99:this.pushState("md_string");break;case 9:return"MD_STR";case 10:case 34:case 79:this.popState();break;case 11:this.pushState("string");break;case 12:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 13:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 14:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 15:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:case 40:case 41:case 44:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return t.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),37;case 74:return t.getLogger().debug("Lex: NODE_ID",e.yytext),31;case 75:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 78:return"NODE_DESCR";case 80:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 83:t.getLogger().debug("LEX POPPING"),this.popState();break;case 84:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 91:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 93:case 94:case 95:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 96:case 97:case 98:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 100:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 102:case 103:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 104:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}}();function f(){this.yy={}}return x.lexer=b,E(f,"Parser"),f.prototype=x,x.Parser=f,new f}();J.parser=J;var Q=J,tt=new Map,et=[],rt=new Map,at="color",it="fill",nt=new Map,st="",ot=E(t=>W.sanitizeText(t,B()),"sanitizeText"),lt=E(function(t,e=""){let r=nt.get(t);r||(r={id:t,styles:[],textStyles:[]},nt.set(t,r)),null!=e&&e.split(",").forEach(t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(at).exec(t)){const t=e.replace(it,"bgFill").replace(at,it);r.textStyles.push(t)}r.styles.push(e)})},"addStyleClass"),ct=E(function(t,e=""){const r=tt.get(t);null!=e&&(r.styles=e.split(","))},"addStyle2Node"),dt=E(function(t,e){t.split(",").forEach(function(t){let r=tt.get(t);if(void 0===r){const e=t.trim();r={id:e,type:"na",children:[]},tt.set(e,r)}r.classes||(r.classes=[]),r.classes.push(e)})},"setCssClass"),ht=E((t,e)=>{const r=t.flat(),a=[],i=r.find(t=>"column-setting"===(null==t?void 0:t.type)),n=(null==i?void 0:i.columns)??-1;for(const s of r)if("number"==typeof n&&n>0&&"column-setting"!==s.type&&"number"==typeof s.widthInColumns&&s.widthInColumns>n&&I.warn(`Block ${s.id} width ${s.widthInColumns} exceeds configured column width ${n}`),s.label&&(s.label=ot(s.label)),"classDef"!==s.type)if("applyClass"!==s.type)if("applyStyles"!==s.type)if("column-setting"===s.type)e.columns=s.columns??-1;else if("edge"===s.type){const t=(rt.get(s.id)??0)+1;rt.set(s.id,t),s.id=t+"-"+s.id,et.push(s)}else{s.label||("composite"===s.type?s.label="":s.label=s.id);const t=tt.get(s.id);if(void 0===t?tt.set(s.id,s):("na"!==s.type&&(t.type=s.type),s.label!==s.id&&(t.label=s.label)),s.children&&ht(s.children,s),"space"===s.type){const t=s.width??1;for(let e=0;e<t;e++){const t=V(s);t.id=t.id+"-"+e,tt.set(t.id,t),a.push(t)}}else void 0===t&&a.push(s)}else(null==s?void 0:s.stylesStr)&&ct(s.id,null==s?void 0:s.stylesStr);else dt(s.id,(null==s?void 0:s.styleClass)??"");else lt(s.id,s.css);e.children=a},"populateBlockDatabase"),gt=[],ut={id:"root",type:"composite",children:[],columns:-1},yt=E(()=>{I.debug("Clear called"),N(),ut={id:"root",type:"composite",children:[],columns:-1},tt=new Map([["root",ut]]),gt=[],nt=new Map,et=[],rt=new Map,st=""},"clear");function pt(t){switch(I.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return I.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function xt(t){return I.debug("typeStr2Type",t),"=="===t?"thick":"normal"}function bt(t){switch(t.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function ft(t){switch(t.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}function mt(t){return t.includes("==")?"thick":"normal"}function wt(t){return t.includes(".-")?"dotted":"solid"}E(pt,"typeStr2Type"),E(xt,"edgeTypeStr2Type"),E(bt,"edgeStrToEdgeData"),E(ft,"edgeStrToEdgeStartData"),E(mt,"edgeStrToThickness"),E(wt,"edgeStrToPattern");var kt=0,St=E(()=>(kt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+kt),"generateId"),Lt=E(t=>{ut.children=t,ht(t,ut),gt=ut.children},"setHierarchy"),_t=E(t=>{const e=tt.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),vt=E(()=>[...tt.values()],"getBlocksFlat"),Et=E(()=>gt||[],"getBlocks"),Tt=E(()=>et,"getEdges"),Dt=E(t=>tt.get(t),"getBlock"),$t=E(t=>{tt.set(t.id,t)},"setBlock"),It=E(t=>{st=t},"setDiagramId"),Nt=E(()=>st,"getDiagramId"),Ct=E(()=>I,"getLogger"),Bt=E(function(){return nt},"getClasses"),Ot={getConfig:E(()=>T().block,"getConfig"),typeStr2Type:pt,edgeTypeStr2Type:xt,edgeStrToEdgeData:bt,edgeStrToEdgeStartData:ft,edgeStrToThickness:mt,edgeStrToPattern:wt,getLogger:Ct,getBlocksFlat:vt,getBlocks:Et,getEdges:Tt,setHierarchy:Lt,getBlock:Dt,setBlock:$t,getColumns:_t,getClasses:Bt,clear:yt,generateId:St,setDiagramId:It,getDiagramId:Nt},Rt=E((t,e)=>{const r=q,a=r(t,"r"),i=r(t,"g"),n=r(t,"b");return C(a,i,n,e)},"fade"),zt=E(e=>`.label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .cluster-label text {\n fill: ${e.titleColor};\n }\n .cluster-label span,p {\n color: ${e.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${e.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n /*\n * This is for backward compatibility with existing code that didn't\n * add a \`<p>\` around edge labels.\n *\n * TODO: We should probably remove this in a future release.\n */\n p {\n margin: 0;\n padding: 0;\n display: inline;\n }\n rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${e.edgeLabelBackground};\n }\n\n .node .cluster {\n // fill: ${Rt(e.mainBkg,.5)};\n fill: ${Rt(e.clusterBkg,.5)};\n stroke: ${Rt(e.clusterBorder,.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n .cluster span,p {\n color: ${e.titleColor};\n }\n /* .cluster div {\n color: ${e.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${e.textColor};\n }\n ${t()}\n`,"getStyles"),At=E((t,e,r,a)=>{e.forEach(e=>{Mt[e](t,r,a)})},"insertMarkers"),Mt={extension:E((t,e,r)=>{I.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),composition:E((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),aggregation:E((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),dependency:E((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).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")},"dependency"),lollipop:E((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),point:E((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),circle:E((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),cross:E((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),barb:E((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb")},Pt=At;function Yt(t,e){if(0===t||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);if(t<0)return{px:e,py:0};if(1===t)return{px:0,py:e};return{px:e%t,py:Math.floor(e/t)}}E(Yt,"calculateBlockPosition");var jt=E(t=>{let e=0,r=0;for(const a of t.children){const{width:t,height:i,x:n,y:s}=a.size??{width:0,height:0,x:0,y:0};if(I.debug("getMaxChildSize abc95 child:",a.id,"width:",t,"height:",i,"x:",n,"y:",s,a.type),"space"===a.type)continue;const o=t/(a.widthInColumns??1);o>e&&(e=o),i>r&&(r=i)}return{width:e,height:r}},"getMaxChildSize");function Ft(t,e,r=0,a=0,i=8){var n,s,o,l,c,d,h,g,u,y,p;I.debug("setBlockSizes abc95 (start)",t.id,null==(n=null==t?void 0:t.size)?void 0:n.x,"block width =",null==t?void 0:t.size,"siblingWidth",r),(null==(s=null==t?void 0:t.size)?void 0:s.width)||(t.size={width:r,height:a,x:0,y:0});let x=0,b=0;if((null==(o=t.children)?void 0:o.length)>0){for(const r of t.children)Ft(r,e,0,0,i);const n=jt(t);x=n.width,b=n.height,I.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",x,b);for(const e of t.children)e.size&&(I.debug(`abc95 Setting size of children of ${t.id} id=${e.id} ${x} ${b} ${JSON.stringify(e.size)}`),e.size.width=x*(e.widthInColumns??1)+i*((e.widthInColumns??1)-1),e.size.height=b,e.size.x=0,e.size.y=0,I.debug(`abc95 updating size of ${t.id} children child:${e.id} maxWidth:${x} maxHeight:${b}`));for(const r of t.children)Ft(r,e,x,b,i);const s=t.columns??-1;let o=0;for(const e of t.children)o+=e.widthInColumns??1;let g=t.children.length;s>0&&s<o&&(g=s);const u=Math.ceil(o/g);let y=g*(x+i)+i,p=u*(b+i)+i;if(y<r){I.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${r} siblingHeight ${a} width ${y}`),y=r,p=a;const e=(r-g*i-i)/g,n=(a-u*i-i)/u;I.debug("Size indata abc88",t.id,"childWidth",e,"maxWidth",x),I.debug("Size indata abc88",t.id,"childHeight",n,"maxHeight",b),I.debug("Size indata abc88 xSize",g,"padding",i);for(const r of t.children)r.size&&(r.size.width=e,r.size.height=n,r.size.x=0,r.size.y=0)}if(I.debug(`abc95 (finale calc) ${t.id} xSize ${g} ySize ${u} columns ${s}${t.children.length} width=${Math.max(y,(null==(l=t.size)?void 0:l.width)||0)}`),y<((null==(c=null==t?void 0:t.size)?void 0:c.width)||0)){y=(null==(d=null==t?void 0:t.size)?void 0:d.width)||0;const e=s>0?Math.min(t.children.length,s):t.children.length;if(e>0){const r=(y-e*i-i)/e;I.debug("abc95 (growing to fit) width",t.id,y,null==(h=t.size)?void 0:h.width,r);for(const e of t.children)e.size&&(e.size.width=r)}}t.size={width:y,height:p,x:0,y:0}}I.debug("setBlockSizes abc94 (done)",t.id,null==(g=null==t?void 0:t.size)?void 0:g.x,null==(u=null==t?void 0:t.size)?void 0:u.width,null==(y=null==t?void 0:t.size)?void 0:y.y,null==(p=null==t?void 0:t.size)?void 0:p.height)}function Wt(t,e,r=8){var a,i,n,s,o,l,c,d,h,g,u,y,p,x,b,f,m;I.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${null==(a=null==t?void 0:t.size)?void 0:a.x} y: ${null==(i=null==t?void 0:t.size)?void 0:i.y} width: ${null==(n=null==t?void 0:t.size)?void 0:n.width}`);const w=t.columns??-1;if(I.debug("layoutBlocks columns abc95",t.id,"=>",w,t),t.children&&t.children.length>0){const a=(null==(o=null==(s=null==t?void 0:t.children[0])?void 0:s.size)?void 0:o.width)??0,i=t.children.length*a+(t.children.length-1)*r;I.debug("widthOfChildren 88",i,"posX");const n=new Map;{let e=0;for(const r of t.children){if(!r.size)continue;const{py:t}=Yt(w,e),a=n.get(t)??0;r.size.height>a&&n.set(t,r.size.height);let i=(null==r?void 0:r.widthInColumns)??1;w>0&&(i=Math.min(i,w-e%w)),e+=i}}const b=new Map;{let t=0;const e=[...n.keys()].sort((t,e)=>t-e);for(const a of e)b.set(a,t),t+=(n.get(a)??0)+r}let f=0;I.debug("abc91 block?.size?.x",t.id,null==(l=null==t?void 0:t.size)?void 0:l.x);let m=(null==(c=null==t?void 0:t.size)?void 0:c.x)?(null==(d=null==t?void 0:t.size)?void 0:d.x)+(-(null==(h=null==t?void 0:t.size)?void 0:h.width)/2||0):-r,k=0;for(const s of t.children){const a=t;if(!s.size)continue;const{width:i,height:o}=s.size,{px:l,py:c}=Yt(w,f);if(c!=k&&(k=c,m=(null==(g=null==t?void 0:t.size)?void 0:g.x)?(null==(u=null==t?void 0:t.size)?void 0:u.x)+(-(null==(y=null==t?void 0:t.size)?void 0:y.width)/2||0):-r,I.debug("New row in layout for block",t.id," and child ",s.id,k)),I.debug(`abc89 layout blocks (child) id: ${s.id} Pos: ${f} (px, py) ${l},${c} (${null==(p=null==a?void 0:a.size)?void 0:p.x},${null==(x=null==a?void 0:a.size)?void 0:x.y}) parent: ${a.id} width: ${i}${r}`),a.size){const t=i/2;s.size.x=m+r+t,I.debug(`abc91 layout blocks (calc) px, pyid:${s.id} startingPos=X${m} new startingPosX${s.size.x} ${t} padding=${r} width=${i} halfWidth=${t} => x:${s.size.x} y:${s.size.y} ${s.widthInColumns} (width * (child?.w || 1)) / 2 ${i*((null==s?void 0:s.widthInColumns)??1)/2}`),m=s.size.x+t;const e=b.get(c)??0,l=n.get(c)??o;s.size.y=a.size.y-a.size.height/2+e+l/2+r,I.debug(`abc88 layout blocks (calc) px, pyid:${s.id}startingPosX${m}${r}${t}=>x:${s.size.x}y:${s.size.y}${s.widthInColumns}(width * (child?.w || 1)) / 2${i*((null==s?void 0:s.widthInColumns)??1)/2}`)}s.children&&Wt(s,e,r);let d=(null==s?void 0:s.widthInColumns)??1;w>0&&(d=Math.min(d,w-f%w)),f+=d,I.debug("abc88 columnsPos",s,f)}}I.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${null==(b=null==t?void 0:t.size)?void 0:b.x} y: ${null==(f=null==t?void 0:t.size)?void 0:f.y} width: ${null==(m=null==t?void 0:t.size)?void 0:m.width}`)}function Xt(t,{minX:e,minY:r,maxX:a,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&"root"!==t.id){const{x:n,y:s,width:o,height:l}=t.size;n-o/2<e&&(e=n-o/2),s-l/2<r&&(r=s-l/2),n+o/2>a&&(a=n+o/2),s+l/2>i&&(i=s+l/2)}if(t.children)for(const n of t.children)({minX:e,minY:r,maxX:a,maxY:i}=Xt(n,{minX:e,minY:r,maxX:a,maxY:i}));return{minX:e,minY:r,maxX:a,maxY:i}}function Ht(t){var e,r;const a=t.getBlock("root");if(!a)return;const i=(null==(r=null==(e=B())?void 0:e.block)?void 0:r.padding)??8;Ft(a,t,0,0,i),Wt(a,t,i),I.debug("getBlocks",JSON.stringify(a,null,2));const{minX:n,minY:s,maxX:o,maxY:l}=Xt(a);return{x:n,y:s,width:o-n,height:l-s}}E(Ft,"setBlockSizes"),E(Wt,"layoutBlocks"),E(Xt,"findBounds"),E(Ht,"layout");var Ut=E(async(t,e,r,a=!1,i=!1)=>{let n=e||"";"object"==typeof n&&(n=n[0]);const s=B(),o=M(s);return await P(t,n,{style:r,isTitle:a,useHtmlLabels:o,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},s)},"createLabel"),Kt=E((t,e,r,a,i)=>{e.arrowTypeStart&&qt(t,"start",e.arrowTypeStart,r,a,i),e.arrowTypeEnd&&qt(t,"end",e.arrowTypeEnd,r,a,i)},"addEdgeMarkers"),Zt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},qt=E((t,e,r,a,i,n)=>{const s=Zt[r];if(!s)return void I.warn(`Unknown arrow type: ${r}`);const o="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${a}#${i}_${n}-${s}${o})`)},"addEdgeMarker"),Vt={},Gt={},Jt=E(async(t,e)=>{const r=B(),a=M(r),i=t.insert("g").attr("class","edgeLabel"),n=i.insert("g").attr("class","label"),s="markdown"===e.labelType,o=await P(t,e.label,{style:e.labelStyle,useHtmlLabels:a,addSvgBackground:s,isNode:!1,markdown:s,width:s?void 0:Number.POSITIVE_INFINITY},r);n.node().appendChild(o);let l,c=o.getBBox(),d=c;if(a){const t=o.children[0],e=D(o);c=t.getBoundingClientRect(),d=c,e.attr("width",c.width),e.attr("height",c.height)}else{const t=D(o).select("text").node();t&&"function"==typeof t.getBBox&&(d=t.getBBox())}if(n.attr("transform",Y(d,a)),Vt[e.id]=i,e.width=c.width,e.height=c.height,e.startLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),i=r.insert("g").attr("class","inner"),n=await Ut(i,e.startLabelLeft,e.labelStyle);l=n;let s=n.getBBox();if(a){const t=n.children[0],e=D(n);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}i.attr("transform",Y(s,a)),Gt[e.id]||(Gt[e.id]={}),Gt[e.id].startLeft=r,Qt(l,e.startLabelLeft)}if(e.startLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),i=r.insert("g").attr("class","inner"),n=await Ut(i,e.startLabelRight,e.labelStyle);l=n;let s=n.getBBox();if(a){const t=n.children[0],e=D(n);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}i.attr("transform",Y(s,a)),Gt[e.id]||(Gt[e.id]={}),Gt[e.id].startRight=r,Qt(l,e.startLabelRight)}if(e.endLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),i=r.insert("g").attr("class","inner"),n=await Ut(r,e.endLabelLeft,e.labelStyle);l=n;let s=n.getBBox();if(a){const t=n.children[0],e=D(n);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}i.attr("transform",Y(s,a)),Gt[e.id]||(Gt[e.id]={}),Gt[e.id].endLeft=r,Qt(l,e.endLabelLeft)}if(e.endLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),i=r.insert("g").attr("class","inner"),n=await Ut(r,e.endLabelRight,e.labelStyle);l=n;let s=n.getBBox();if(a){const t=n.children[0],e=D(n);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}i.attr("transform",Y(s,a)),Gt[e.id]||(Gt[e.id]={}),Gt[e.id].endRight=r,Qt(l,e.endLabelRight)}return o},"insertEdgeLabel");function Qt(t,e){M(B())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}E(Qt,"setTerminalWidth");var te=E((t,e)=>{I.debug("Moving label abc88 ",t.id,t.label,Vt[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath;const a=B(),{subGraphTitleTotalMargin:i}=j(a);if(t.label){const a=Vt[t.id];let n=t.x,s=t.y;if(r){const a=F.calcLabelPosition(r);I.debug("Moving label "+t.label+" from (",n,",",s,") to (",a.x,",",a.y,") abc88"),e.updatedPath&&(n=a.x,s=a.y)}a.attr("transform",`translate(${n}, ${s+i/2})`)}if(t.startLabelLeft){const e=Gt[t.id].startLeft;let a=t.x,i=t.y;if(r){const e=F.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.startLabelRight){const e=Gt[t.id].startRight;let a=t.x,i=t.y;if(r){const e=F.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.endLabelLeft){const e=Gt[t.id].endLeft;let a=t.x,i=t.y;if(r){const e=F.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.endLabelRight){const e=Gt[t.id].endRight;let a=t.x,i=t.y;if(r){const e=F.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}},"positionEdgeLabel"),ee=E((t,e)=>{const r=t.x,a=t.y,i=Math.abs(e.x-r),n=Math.abs(e.y-a),s=t.width/2,o=t.height/2;return i>=s||n>=o},"outsideNode"),re=E((t,e,r)=>{I.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const a=t.x,i=t.y,n=Math.abs(a-r.x),s=t.width/2;let o=r.x<e.x?s-n:s+n;const l=t.height/2,c=Math.abs(e.y-r.y),d=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*s>Math.abs(a-e.x)*l){let t=r.y<e.y?e.y-l-i:i-l-e.y;o=d*t/c;const a={x:r.x<e.x?r.x+o:r.x-d+o,y:r.y<e.y?r.y+c-t:r.y-c+t};return 0===o&&(a.x=e.x,a.y=e.y),0===d&&(a.x=e.x),0===c&&(a.y=e.y),I.debug(`abc89 topp/bott calc, Q ${c}, q ${t}, R ${d}, r ${o}`,a),a}{o=r.x<e.x?e.x-s-a:a-s-e.x;let t=c*o/d,i=r.x<e.x?r.x+d-o:r.x-d+o,n=r.y<e.y?r.y+t:r.y-t;return I.debug(`sides calc abc89, Q ${c}, q ${t}, R ${d}, r ${o}`,{_x:i,_y:n}),0===o&&(i=e.x,n=e.y),0===d&&(i=e.x),0===c&&(n=e.y),{x:i,y:n}}},"intersection"),ae=E((t,e)=>{I.debug("abc88 cutPathAtIntersect",t,e);let r=[],a=t[0],i=!1;return t.forEach(t=>{if(ee(e,t)||i)a=t,i||r.push(t);else{const n=re(e,a,t);let s=!1;r.forEach(t=>{s=s||t.x===n.x&&t.y===n.y}),r.some(t=>t.x===n.x&&t.y===n.y)||r.push(n),i=!0}}),r},"cutPathAtIntersect"),ie=E(function(t,e,r,a,i,n,s){let o=r.points;I.debug("abc88 InsertEdge: edge=",r,"e=",e);let l=!1;const c=n.node(e.v);var d=n.node(e.w);(null==d?void 0:d.intersect)&&(null==c?void 0:c.intersect)&&(o=o.slice(1,r.points.length-1),o.unshift(c.intersect(o[0])),o.push(d.intersect(o[o.length-1]))),r.toCluster&&(I.debug("to cluster abc88",a[r.toCluster]),o=ae(r.points,a[r.toCluster].node),l=!0),r.fromCluster&&(I.debug("from cluster abc88",a[r.fromCluster]),o=ae(o.reverse(),a[r.fromCluster].node).reverse(),l=!0);const h=o.filter(t=>!Number.isNaN(t.y));let g=z;!r.curve||"graph"!==i&&"flowchart"!==i||(g=r.curve);const{x:u,y:y}=O(r),p=R().x(u).y(y).curve(g);let x;switch(r.thickness){case"normal":x="edge-thickness-normal";break;case"thick":case"invisible":x="edge-thickness-thick";break;default:x=""}switch(r.pattern){case"solid":x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed"}const b=t.append("path").attr("d",p(h)).attr("id",r.id).attr("class"," "+x+(r.classes?" "+r.classes:"")).attr("style",r.style);let f="";(B().flowchart.arrowMarkerAbsolute||B().state.arrowMarkerAbsolute)&&(f=A(!0)),Kt(b,r,f,s,i);let m={};return l&&(m.updatedPath=o),m.originalPath=r.points,m},"insertEdge"),ne=E(t=>{const e=new Set;for(const r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r)}return e},"expandAndDeduplicateDirections"),se=E((t,e,r,a)=>{const i=ne(t),n=e.height+2*r.padding,s=n/2,o=a??e.width+2*s+r.padding,l=r.padding/2;return i.has("right")&&i.has("left")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:s,y:0},{x:o/2,y:2*l},{x:o-s,y:0},{x:o,y:0},{x:o,y:-n/3},{x:o+2*l,y:-n/2},{x:o,y:-2*n/3},{x:o,y:-n},{x:o-s,y:-n},{x:o/2,y:-n-2*l},{x:s,y:-n},{x:0,y:-n},{x:0,y:-2*n/3},{x:-2*l,y:-n/2},{x:0,y:-n/3}]:i.has("right")&&i.has("left")&&i.has("up")?[{x:s,y:0},{x:o-s,y:0},{x:o,y:-n/2},{x:o-s,y:-n},{x:s,y:-n},{x:0,y:-n/2}]:i.has("right")&&i.has("left")&&i.has("down")?[{x:0,y:0},{x:s,y:-n},{x:o-s,y:-n},{x:o,y:0}]:i.has("right")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:o,y:-s},{x:o,y:-n+s},{x:0,y:-n}]:i.has("left")&&i.has("up")&&i.has("down")?[{x:o,y:0},{x:0,y:-s},{x:0,y:-n+s},{x:o,y:-n}]:i.has("right")&&i.has("left")?[{x:s,y:0},{x:s,y:-l},{x:o-s,y:-l},{x:o-s,y:0},{x:o,y:-n/2},{x:o-s,y:-n},{x:o-s,y:-n+l},{x:s,y:-n+l},{x:s,y:-n},{x:0,y:-n/2}]:i.has("up")&&i.has("down")?[{x:o/2,y:0},{x:0,y:-l},{x:s,y:-l},{x:s,y:-n+l},{x:0,y:-n+l},{x:o/2,y:-n},{x:o,y:-n+l},{x:o-s,y:-n+l},{x:o-s,y:-l},{x:o,y:-l}]:i.has("right")&&i.has("up")?[{x:0,y:0},{x:o,y:-s},{x:0,y:-n}]:i.has("right")&&i.has("down")?[{x:0,y:0},{x:o,y:0},{x:0,y:-n}]:i.has("left")&&i.has("up")?[{x:o,y:0},{x:0,y:-s},{x:o,y:-n}]:i.has("left")&&i.has("down")?[{x:o,y:0},{x:0,y:0},{x:o,y:-n}]:i.has("right")?[{x:s,y:-l},{x:s,y:-l},{x:o-s,y:-l},{x:o-s,y:0},{x:o,y:-n/2},{x:o-s,y:-n},{x:o-s,y:-n+l},{x:s,y:-n+l},{x:s,y:-n+l}]:i.has("left")?[{x:s,y:0},{x:s,y:-l},{x:o-s,y:-l},{x:o-s,y:-n+l},{x:s,y:-n+l},{x:s,y:-n},{x:0,y:-n/2}]:i.has("up")?[{x:s,y:-l},{x:s,y:-n+l},{x:0,y:-n+l},{x:o/2,y:-n},{x:o,y:-n+l},{x:o-s,y:-n+l},{x:o-s,y:-l}]:i.has("down")?[{x:o/2,y:0},{x:0,y:-l},{x:s,y:-l},{x:s,y:-n+l},{x:o-s,y:-n+l},{x:o-s,y:-l},{x:o,y:-l}]:[{x:0,y:0}]},"getArrowPoints");function oe(t,e){return t.intersect(e)}E(oe,"intersectNode");var le=oe;function ce(t,e,r,a){var i=t.x,n=t.y,s=i-a.x,o=n-a.y,l=Math.sqrt(e*e*o*o+r*r*s*s),c=Math.abs(e*r*s/l);a.x<i&&(c=-c);var d=Math.abs(e*r*o/l);return a.y<n&&(d=-d),{x:i+c,y:n+d}}E(ce,"intersectEllipse");var de=ce;function he(t,e,r){return de(t,e,e,r)}E(he,"intersectCircle");var ge=he;function ue(t,e,r,a){var i,n,s,o,l,c,d,h,g,u,y,p,x;if(i=e.y-t.y,s=t.x-e.x,l=e.x*t.y-t.x*e.y,g=i*r.x+s*r.y+l,u=i*a.x+s*a.y+l,!(0!==g&&0!==u&&ye(g,u)||(n=a.y-r.y,o=r.x-a.x,c=a.x*r.y-r.x*a.y,d=n*t.x+o*t.y+c,h=n*e.x+o*e.y+c,0!==d&&0!==h&&ye(d,h)||0===(y=i*o-n*s))))return p=Math.abs(y/2),{x:(x=s*c-o*l)<0?(x-p)/y:(x+p)/y,y:(x=n*l-i*c)<0?(x-p)/y:(x+p)/y}}function ye(t,e){return t*e>0}E(ue,"intersectLine"),E(ye,"sameSign");var pe=ue,xe=be;function be(t,e,r){var a=t.x,i=t.y,n=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));for(var l=a-t.width/2-s,c=i-t.height/2-o,d=0;d<e.length;d++){var h=e[d],g=e[d<e.length-1?d+1:0],u=pe(t,r,{x:l+h.x,y:c+h.y},{x:l+g.x,y:c+g.y});u&&n.push(u)}return n.length?(n.length>1&&n.sort(function(t,e){var a=t.x-r.x,i=t.y-r.y,n=Math.sqrt(a*a+i*i),s=e.x-r.x,o=e.y-r.y,l=Math.sqrt(s*s+o*o);return n<l?-1:n===l?0:1}),n[0]):t}E(be,"intersectPolygon");var fe={node:le,circle:ge,ellipse:de,polygon:xe,rect:E((t,e)=>{var r,a,i=t.x,n=t.y,s=e.x-i,o=e.y-n,l=t.width/2,c=t.height/2;return Math.abs(o)*l>Math.abs(s)*c?(o<0&&(c=-c),r=0===o?0:c*s/o,a=c):(s<0&&(l=-l),r=l,a=0===s?0:l*o/s),{x:i+r,y:n+a}},"intersectRect")},me=E(async(t,e,r,a)=>{const i=B();let n;const s=e.useHtmlLabels||M(i);n=r||"node default";const o=t.insert("g").attr("class",n).attr("id",e.domId||e.id),l=o.insert("g").attr("class","label").attr("style",e.labelStyle);let c,d;c=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0],d="markdown"===e.labelType?P(l,H(U(c),i),{useHtmlLabels:s,width:e.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):await Ut(l,H(U(c),i),e.labelStyle,!1,a);let h=d.getBBox();const g=e.padding/2;if(M(i)){const t=d.children[0],e=D(d);await K(t,c),h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}return s?l.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):l.attr("transform","translate(0, "+-h.height/2+")"),e.centerLabel&&l.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:o,bbox:h,halfPadding:g,label:l}},"labelHelper"),we=E((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds");function ke(t,e,r,a){return t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}E(ke,"insertPolygonShape");var Se=E(async(t,e)=>{e.useHtmlLabels||M(B())||(e.centerLabel=!0);const{shapeSvg:r,bbox:a,halfPadding:i}=await me(t,e,"node "+e.classes,!0);I.info("Classes = ",e.classes);const n=r.insert("rect",":first-child");return n.attr("rx",e.rx).attr("ry",e.ry).attr("x",-a.width/2-i).attr("y",-a.height/2-i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),we(e,n),e.intersect=function(t){return fe.rect(e,t)},r},"note"),Le=E(t=>t?" "+t:"","formatClass"),_e=E((t,e)=>`${e||"node default"}${Le(t.classes)} ${Le(t.class)}`,"getClassesFromNode"),ve=E(async(t,e)=>{const{shapeSvg:r,bbox:a}=await me(t,e,_e(e,void 0),!0),i=a.width+e.padding+(a.height+e.padding),n=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];I.info("Question main (Circle)");const s=ke(r,i,i,n);return s.attr("style",e.style),we(e,s),e.intersect=function(t){return I.warn("Intersect called"),fe.polygon(e,n,t)},r},"question"),Ee=E((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return r.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return fe.circle(e,14,t)},r},"choice"),Te=E(async(t,e)=>{const{shapeSvg:r,bbox:a}=await me(t,e,_e(e,void 0),!0),i=e.positioned?e.height:a.height+e.padding,n=i/4,s=e.positioned?e.width:a.width+2*n+e.padding,o=[{x:n,y:0},{x:s-n,y:0},{x:s,y:-i/2},{x:s-n,y:-i},{x:n,y:-i},{x:0,y:-i/2}],l=ke(r,s,i,o);return l.attr("style",e.style),we(e,l),e.intersect=function(t){return fe.polygon(e,o,t)},r},"hexagon"),De=E(async(t,e)=>{const{shapeSvg:r,bbox:a}=await me(t,e,void 0,!0),i=a.height+2*e.padding,n=i/2,s=a.width+2*n+e.padding,o=e.positioned&&(e.widthInColumns??1)>1&&e.width>s?e.width:s,l=se(e.directions,a,e,o),c=ke(r,o,i,l);return c.attr("style",e.style),we(e,c),e.intersect=function(t){return fe.polygon(e,l,t)},r},"block_arrow"),$e=E(async(t,e)=>{const{shapeSvg:r,bbox:a}=await me(t,e,_e(e,void 0),!0),i=a.width+e.padding,n=a.height+e.padding,s=[{x:-n/2,y:0},{x:i,y:0},{x:i,y:-n},{x:-n/2,y:-n},{x:0,y:-n/2}];return ke(r,i,n,s).attr("style",e.style),e.width=i+n,e.height=n,e.intersect=function(t){return fe.polygon(e,s,t)},r},"rect_left_inv_arrow"),Ie=E(async(t,e)=>{const{shapeSvg:r,bbox:a}=await me(t,e,_e(e),!0),i=a.width+e.padding,n=a.height+e.padding,s=[{x:-2*n/6,y:0},{x:i-n/6,y:0},{x:i+2*n/6,y:-n},{x:n/6,y:-n}],o=ke(r,i,n,s);return o.attr("style",e.style),we(e,o),e.intersect=function(t){return fe.polygon(e,s,t)},r},"lean_right"),Ne=E(async(t,e)=>{const{shapeSvg:r,bbox:a}=await me(t,e,_e(e,void 0),!0),i=a.width+e.padding,n=a.height+e.padding,s=[{x:2*n/6,y:0},{x:i+n/6,y:0},{x:i-2*n/6,y:-n},{x:-n/6,y:-n}],o=ke(r,i,n,s);return o.attr("style",e.style),we(e,o),e.intersect=function(t){return fe.polygon(e,s,t)},r},"lean_left"),Ce=E(async(t,e)=>{const{shapeSvg:r,bbox:a}=await me(t,e,_e(e,void 0),!0),i=a.width+e.padding,n=a.height+e.padding,s=[{x:-2*n/6,y:0},{x:i+2*n/6,y:0},{x:i-n/6,y:-n},{x:n/6,y:-n}],o=ke(r,i,n,s);return o.attr("style",e.style),we(e,o),e.intersect=function(t){return fe.polygon(e,s,t)},r},"trapezoid"),Be=E(async(t,e)=>{const{shapeSvg:r,bbox:a}=await me(t,e,_e(e,void 0),!0),i=a.width+e.padding,n=a.height+e.padding,s=[{x:n/6,y:0},{x:i-n/6,y:0},{x:i+2*n/6,y:-n},{x:-2*n/6,y:-n}],o=ke(r,i,n,s);return o.attr("style",e.style),we(e,o),e.intersect=function(t){return fe.polygon(e,s,t)},r},"inv_trapezoid"),Oe=E(async(t,e)=>{const{shapeSvg:r,bbox:a}=await me(t,e,_e(e,void 0),!0),i=a.width+e.padding,n=a.height+e.padding,s=[{x:0,y:0},{x:i+n/2,y:0},{x:i,y:-n/2},{x:i+n/2,y:-n},{x:0,y:-n}],o=ke(r,i,n,s);return o.attr("style",e.style),we(e,o),e.intersect=function(t){return fe.polygon(e,s,t)},r},"rect_right_inv_arrow"),Re=E(async(t,e)=>{const{shapeSvg:r,bbox:a}=await me(t,e,_e(e,void 0),!0),i=a.width+e.padding,n=i/2,s=n/(2.5+i/50),o=a.height+s+e.padding,l="M 0,"+s+" a "+n+","+s+" 0,0,0 "+i+" 0 a "+n+","+s+" 0,0,0 "+-i+" 0 l 0,"+o+" a "+n+","+s+" 0,0,0 "+i+" 0 l 0,"+-o,c=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-i/2+","+-(o/2+s)+")");return we(e,c),e.intersect=function(t){const r=fe.rect(e,t),a=r.x-e.x;if(0!=n&&(Math.abs(a)<e.width/2||Math.abs(a)==e.width/2&&Math.abs(r.y-e.y)>e.height/2-s)){let i=s*s*(1-a*a/(n*n));0!=i&&(i=Math.sqrt(i)),i=s-i,t.y-e.y>0&&(i=-i),r.y+=i}return r},r},"cylinder"),ze=E(async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await me(t,e,"node "+e.classes+" "+e.class,!0),n=r.insert("rect",":first-child"),s=e.positioned?e.width:a.width+e.padding,o=e.positioned?e.height:a.height+e.padding,l=e.positioned?-s/2:-a.width/2-i,c=e.positioned?-o/2:-a.height/2-i;if(n.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",c).attr("width",s).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(Pe(n,e.props.borders,s,o),t.delete("borders")),t.forEach(t=>{I.warn(`Unknown node property ${t}`)})}return we(e,n),e.intersect=function(t){return fe.rect(e,t)},r},"rect"),Ae=E(async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await me(t,e,"node "+e.classes,!0),n=r.insert("rect",":first-child"),s=e.positioned?e.width:a.width+e.padding,o=e.positioned?e.height:a.height+e.padding,l=e.positioned?-s/2:-a.width/2-i,c=e.positioned?-o/2:-a.height/2-i;if(n.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",c).attr("width",s).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(Pe(n,e.props.borders,s,o),t.delete("borders")),t.forEach(t=>{I.warn(`Unknown node property ${t}`)})}return we(e,n),e.intersect=function(t){return fe.rect(e,t)},r},"composite"),Me=E(async(t,e)=>{const{shapeSvg:r}=await me(t,e,"label",!0);I.trace("Classes = ",e.class);const a=r.insert("rect",":first-child");if(a.attr("width",0).attr("height",0),r.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(Pe(a,e.props.borders,0,0),t.delete("borders")),t.forEach(t=>{I.warn(`Unknown node property ${t}`)})}return we(e,a),e.intersect=function(t){return fe.rect(e,t)},r},"labelRect");function Pe(t,e,r,a){const i=[],n=E(t=>{i.push(t,0)},"addBorder"),s=E(t=>{i.push(0,t)},"skipBorder");e.includes("t")?(I.debug("add top border"),n(r)):s(r),e.includes("r")?(I.debug("add right border"),n(a)):s(a),e.includes("b")?(I.debug("add bottom border"),n(r)):s(r),e.includes("l")?(I.debug("add left border"),n(a)):s(a),t.attr("stroke-dasharray",i.join(" "))}E(Pe,"applyNodePropertyBorders");var Ye=E(async(t,e)=>{let r;r=e.classes?"node "+e.classes:"node default";const a=t.insert("g").attr("class",r).attr("id",e.domId||e.id),i=a.insert("rect",":first-child"),n=a.insert("line"),s=a.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText;let l="";l="object"==typeof o?o[0]:o,I.info("Label text abc79",l,o,"object"==typeof o);const c=await Ut(s,l,e.labelStyle,!0,!0);let d={width:0,height:0};if(M(B())){const t=c.children[0],e=D(c);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}I.info("Text 2",o);const h=o.slice(1,o.length);let g=c.getBBox();const u=await Ut(s,h.join?h.join("<br/>"):h,e.labelStyle,!0,!0);if(M(B())){const t=u.children[0],e=D(u);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}const y=e.padding/2;return D(u).attr("transform","translate( "+(d.width>g.width?0:(g.width-d.width)/2)+", "+(g.height+y+5)+")"),D(c).attr("transform","translate( "+(d.width<g.width?0:-(g.width-d.width)/2)+", 0)"),d=s.node().getBBox(),s.attr("transform","translate("+-d.width/2+", "+(-d.height/2-y+3)+")"),i.attr("class","outer title-state").attr("x",-d.width/2-y).attr("y",-d.height/2-y).attr("width",d.width+e.padding).attr("height",d.height+e.padding),n.attr("class","divider").attr("x1",-d.width/2-y).attr("x2",d.width/2+y).attr("y1",-d.height/2-y+g.height+y).attr("y2",-d.height/2-y+g.height+y),we(e,i),e.intersect=function(t){return fe.rect(e,t)},a},"rectWithTitle"),je=E(async(t,e)=>{const{shapeSvg:r,bbox:a}=await me(t,e,_e(e,void 0),!0),i=a.height+e.padding,n=a.width+i/4+e.padding,s=r.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-n/2).attr("y",-i/2).attr("width",n).attr("height",i);return we(e,s),e.intersect=function(t){return fe.rect(e,t)},r},"stadium"),Fe=E(async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await me(t,e,_e(e,void 0),!0),n=r.insert("circle",":first-child");return n.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),I.info("Circle main"),we(e,n),e.intersect=function(t){return I.info("Circle intersect",e,a.width/2+i,t),fe.circle(e,a.width/2+i,t)},r},"circle"),We=E(async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await me(t,e,_e(e,void 0),!0),n=r.insert("g",":first-child"),s=n.insert("circle"),o=n.insert("circle");return n.attr("class",e.class),s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i+5).attr("width",a.width+e.padding+10).attr("height",a.height+e.padding+10),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),I.info("DoubleCircle main"),we(e,s),e.intersect=function(t){return I.info("DoubleCircle intersect",e,a.width/2+i+5,t),fe.circle(e,a.width/2+i+5,t)},r},"doublecircle"),Xe=E(async(t,e)=>{const{shapeSvg:r,bbox:a}=await me(t,e,_e(e,void 0),!0),i=a.width+e.padding,n=a.height+e.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-n},{x:0,y:-n},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-n},{x:-8,y:-n},{x:-8,y:0}],o=ke(r,i,n,s);return o.attr("style",e.style),we(e,o),e.intersect=function(t){return fe.polygon(e,s,t)},r},"subroutine"),He=E((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),we(e,a),e.intersect=function(t){return fe.circle(e,7,t)},r},"start"),Ue=E((t,e,r)=>{const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let i=70,n=10;"LR"===r&&(i=10,n=70);const s=a.append("rect").attr("x",-1*i/2).attr("y",-1*n/2).attr("width",i).attr("height",n).attr("class","fork-join");return we(e,s),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return fe.rect(e,t)},a},"forkJoin"),Ke={rhombus:ve,composite:Ae,question:ve,rect:ze,labelRect:Me,rectWithTitle:Ye,choice:Ee,circle:Fe,doublecircle:We,stadium:je,hexagon:Te,block_arrow:De,rect_left_inv_arrow:$e,lean_right:Ie,lean_left:Ne,trapezoid:Ce,inv_trapezoid:Be,rect_right_inv_arrow:Oe,cylinder:Re,start:He,end:E((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),a.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),we(e,i),e.intersect=function(t){return fe.circle(e,7,t)},r},"end"),note:Se,subroutine:Xe,fork:Ue,join:Ue,class_box:E(async(t,e)=>{var r;const a=e.padding/2;let i;i=e.classes?"node "+e.classes:"node default";const n=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=n.insert("rect",":first-child"),o=n.insert("line"),l=n.insert("line");let c=0,d=4;const h=n.insert("g").attr("class","label");let g=0;const u=null==(r=e.classData.annotations)?void 0:r[0],y=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",p=await Ut(h,y,e.labelStyle,!0,!0);let x=p.getBBox();if(M(B())){const t=p.children[0],e=D(p);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}e.classData.annotations[0]&&(d+=x.height+4,c+=x.width);let b=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&(M(B())?b+="<"+e.classData.type+">":b+="<"+e.classData.type+">");const f=await Ut(h,b,e.labelStyle,!0,!0);D(f).attr("class","classTitle");let m=f.getBBox();if(M(B())){const t=f.children[0],e=D(f);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}d+=m.height+4,m.width>c&&(c=m.width);const w=[];e.classData.members.forEach(async t=>{const r=t.getDisplayDetails();let a=r.displayText;M(B())&&(a=a.replace(/</g,"<").replace(/>/g,">"));const i=await Ut(h,a,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0);let n=i.getBBox();if(M(B())){const t=i.children[0],e=D(i);n=t.getBoundingClientRect(),e.attr("width",n.width),e.attr("height",n.height)}n.width>c&&(c=n.width),d+=n.height+4,w.push(i)}),d+=8;const k=[];if(e.classData.methods.forEach(async t=>{const r=t.getDisplayDetails();let a=r.displayText;M(B())&&(a=a.replace(/</g,"<").replace(/>/g,">"));const i=await Ut(h,a,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0);let n=i.getBBox();if(M(B())){const t=i.children[0],e=D(i);n=t.getBoundingClientRect(),e.attr("width",n.width),e.attr("height",n.height)}n.width>c&&(c=n.width),d+=n.height+4,k.push(i)}),d+=8,u){let t=(c-x.width)/2;D(p).attr("transform","translate( "+(-1*c/2+t)+", "+-1*d/2+")"),g=x.height+4}let S=(c-m.width)/2;return D(f).attr("transform","translate( "+(-1*c/2+S)+", "+(-1*d/2+g)+")"),g+=m.height+4,o.attr("class","divider").attr("x1",-c/2-a).attr("x2",c/2+a).attr("y1",-d/2-a+8+g).attr("y2",-d/2-a+8+g),g+=8,w.forEach(t=>{D(t).attr("transform","translate( "+-c/2+", "+(-1*d/2+g+4)+")");const e=null==t?void 0:t.getBBox();g+=((null==e?void 0:e.height)??0)+4}),g+=8,l.attr("class","divider").attr("x1",-c/2-a).attr("x2",c/2+a).attr("y1",-d/2-a+8+g).attr("y2",-d/2-a+8+g),g+=8,k.forEach(t=>{D(t).attr("transform","translate( "+-c/2+", "+(-1*d/2+g)+")");const e=null==t?void 0:t.getBBox();g+=((null==e?void 0:e.height)??0)+4}),s.attr("style",e.style).attr("class","outer title-state").attr("x",-c/2-a).attr("y",-d/2-a).attr("width",c+e.padding).attr("height",d+e.padding),we(e,s),e.intersect=function(t){return fe.rect(e,t)},n},"class_box")},Ze={},qe=E(async(t,e,r)=>{let a,i;if(e.link){let n;"sandbox"===B().securityLevel?n="_top":e.linkTarget&&(n=e.linkTarget||"_blank"),a=t.insert("svg:a").attr("xlink:href",e.link).attr("target",n),i=await Ke[e.shape](a,e,r)}else i=await Ke[e.shape](t,e,r),a=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),Ze[e.id]=a,e.haveCallback&&Ze[e.id].attr("class",Ze[e.id].attr("class")+" clickable"),a},"insertNode"),Ve=E(t=>{const e=Ze[t.id];I.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode");function Ge(t,e,r=!1){var a,i,n;const s=t;let o="default";((null==(a=null==s?void 0:s.classes)?void 0:a.length)||0)>0&&(o=((null==s?void 0:s.classes)??[]).join(" ")),o+=" flowchart-label";let l,c=0,d="";switch(s.type){case"round":c=5,d="rect";break;case"composite":c=0,d="composite",l=0;break;case"square":case"group":default:d="rect";break;case"diamond":d="question";break;case"hexagon":d="hexagon";break;case"block_arrow":d="block_arrow";break;case"odd":case"rect_left_inv_arrow":d="rect_left_inv_arrow";break;case"lean_right":d="lean_right";break;case"lean_left":d="lean_left";break;case"trapezoid":d="trapezoid";break;case"inv_trapezoid":d="inv_trapezoid";break;case"circle":d="circle";break;case"ellipse":d="ellipse";break;case"stadium":d="stadium";break;case"subroutine":d="subroutine";break;case"cylinder":d="cylinder";break;case"doublecircle":d="doublecircle"}const h=X((null==s?void 0:s.styles)??[]),g=s.label,u=s.size??{width:0,height:0,x:0,y:0},y=e.getDiagramId();return{labelStyle:h.labelStyle,shape:d,labelText:g,rx:c,ry:c,class:o,style:h.style,id:s.id,domId:y?`${y}-${s.id}`:s.id,directions:s.directions,width:u.width,height:u.height,x:u.x,y:u.y,positioned:r,intersect:void 0,type:s.type,padding:l??(null==(n=null==(i=T())?void 0:i.block)?void 0:n.padding)??0,widthInColumns:s.widthInColumns??1}}async function Je(t,e,r){const a=Ge(e,r,!1);if("group"===a.type)return;const i=T(),n=await qe(t,a,{config:i}),s=n.node().getBBox(),o=r.getBlock(a.id);o.size={width:s.width,height:s.height,x:0,y:0,node:n},r.setBlock(o),n.remove()}async function Qe(t,e,r){const a=Ge(e,r,!0);if("space"!==r.getBlock(a.id).type){const r=T();await qe(t,a,{config:r}),e.intersect=null==a?void 0:a.intersect,Ve(a)}}async function tr(t,e,r,a){for(const i of e)await a(t,i,r),i.children&&await tr(t,i.children,r,a)}async function er(t,e,r){await tr(t,e,r,Je)}async function rr(t,e,r){await tr(t,e,r,Qe)}async function ar(t,e,r,a,i){const n=new Z({multigraph:!0,compound:!0});n.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const s of r)s.size&&n.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(const s of e)if(s.start&&s.end){const e=a.getBlock(s.start),r=a.getBlock(s.end);if((null==e?void 0:e.size)&&(null==r?void 0:r.size)){const a=e.size,o=r.size,l=[{x:a.x,y:a.y},{x:a.x+(o.x-a.x)/2,y:a.y+(o.y-a.y)/2},{x:o.x,y:o.y}],c=i?`${i}-${s.id}`:s.id,d=`${"thick"===s.thickness?"edge-thickness-thick":"edge-thickness-normal"} ${"dotted"===s.pattern?"edge-pattern-dotted":"edge-pattern-solid"} flowchart-link LS-a1 LE-b1`;ie(t,{v:s.start,w:s.end,name:c},{...s,id:c,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:d},void 0,"block",n,i),s.label&&(await Jt(t,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:d}),te({...s,x:l[1].x,y:l[1].y},{originalPath:l}))}}}E(Ge,"getNodeFromBlock"),E(Je,"calculateBlockSize"),E(Qe,"insertBlockPositioned"),E(tr,"performOperations"),E(er,"calculateBlockSizes"),E(rr,"insertBlocks"),E(ar,"insertEdges");var ir=E(function(t,e){return e.db.getClasses()},"getClasses"),nr={parser:Q,db:Ot,renderer:{draw:E(async function(t,e,r,a){const{securityLevel:i,block:n}=T(),s=a.db;let o;s.setDiagramId(e),"sandbox"===i&&(o=D("#i"+e));const l=D("sandbox"===i?o.nodes()[0].contentDocument.body:"body"),c="sandbox"===i?l.select(`[id="${e}"]`):D(`[id="${e}"]`);Pt(c,["point","circle","cross"],a.type,e);const d=s.getBlocks(),h=s.getBlocksFlat(),g=s.getEdges(),u=c.insert("g").attr("class","block");await er(u,d,s);const y=Ht(s);if(await rr(u,d,s),await ar(u,g,h,s,e),y){const t=y,e=Math.max(1,Math.round(t.width/t.height*.125)),r=t.height+e+10,a=t.width+10,{useMaxWidth:i}=n;$(c,r,a,!!i),I.debug("Here Bounds",y,t),c.attr("viewBox",`${t.x-5} ${t.y-5} ${t.width+10} ${t.height+10}`)}},"draw"),getClasses:ir},styles:zt};export{nr as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t,e;import{g as n,d as a}from"./chunk-32BRIVSS-ByOJtY8z.js";import{s as i,g as s,a as r,b as l,_ as o,c as h,d,l as u,e as p,f as y,h as g,i as f,j as b,w as _,k as x,m}from"./mermaid.core-5jj-23N2.js";import"./index-uJhfY-Ds.js";var E=function(){var t=o(function(t,e,n,a){for(n=n||{},a=t.length;a--;n[t[a]]=e);return n},"o"),e=[1,24],n=[1,25],a=[1,26],i=[1,27],s=[1,28],r=[1,63],l=[1,64],h=[1,65],d=[1,66],u=[1,67],p=[1,68],y=[1,69],g=[1,29],f=[1,30],b=[1,31],_=[1,32],x=[1,33],m=[1,34],E=[1,35],S=[1,36],A=[1,37],C=[1,38],w=[1,39],O=[1,40],k=[1,41],T=[1,42],v=[1,43],R=[1,44],D=[1,45],N=[1,46],P=[1,47],B=[1,48],j=[1,50],I=[1,51],M=[1,52],L=[1,53],Y=[1,54],U=[1,55],F=[1,56],X=[1,57],z=[1,58],W=[1,59],Q=[1,60],$=[14,42],H=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],V=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],q=[1,82],G=[1,83],K=[1,84],J=[1,85],Z=[12,14,42],tt=[12,14,33,42],et=[12,14,33,42,76,77,79,80],nt=[12,33],at=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],it={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:o(function(t,e,n,a,i,s,r){var l=s.length-1;switch(i){case 3:a.setDirection("TB");break;case 4:a.setDirection("BT");break;case 5:a.setDirection("RL");break;case 6:a.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:a.setC4Type(s[l-3]);break;case 19:a.setTitle(s[l].substring(6)),this.$=s[l].substring(6);break;case 20:a.setAccDescription(s[l].substring(15)),this.$=s[l].substring(15);break;case 21:this.$=s[l].trim(),a.setTitle(this.$);break;case 22:case 23:this.$=s[l].trim(),a.setAccDescription(this.$);break;case 28:s[l].splice(2,0,"ENTERPRISE"),a.addPersonOrSystemBoundary(...s[l]),this.$=s[l];break;case 29:s[l].splice(2,0,"SYSTEM"),a.addPersonOrSystemBoundary(...s[l]),this.$=s[l];break;case 30:a.addPersonOrSystemBoundary(...s[l]),this.$=s[l];break;case 31:s[l].splice(2,0,"CONTAINER"),a.addContainerBoundary(...s[l]),this.$=s[l];break;case 32:a.addDeploymentNode("node",...s[l]),this.$=s[l];break;case 33:a.addDeploymentNode("nodeL",...s[l]),this.$=s[l];break;case 34:a.addDeploymentNode("nodeR",...s[l]),this.$=s[l];break;case 35:a.popBoundaryParseStack();break;case 39:a.addPersonOrSystem("person",...s[l]),this.$=s[l];break;case 40:a.addPersonOrSystem("external_person",...s[l]),this.$=s[l];break;case 41:a.addPersonOrSystem("system",...s[l]),this.$=s[l];break;case 42:a.addPersonOrSystem("system_db",...s[l]),this.$=s[l];break;case 43:a.addPersonOrSystem("system_queue",...s[l]),this.$=s[l];break;case 44:a.addPersonOrSystem("external_system",...s[l]),this.$=s[l];break;case 45:a.addPersonOrSystem("external_system_db",...s[l]),this.$=s[l];break;case 46:a.addPersonOrSystem("external_system_queue",...s[l]),this.$=s[l];break;case 47:a.addContainer("container",...s[l]),this.$=s[l];break;case 48:a.addContainer("container_db",...s[l]),this.$=s[l];break;case 49:a.addContainer("container_queue",...s[l]),this.$=s[l];break;case 50:a.addContainer("external_container",...s[l]),this.$=s[l];break;case 51:a.addContainer("external_container_db",...s[l]),this.$=s[l];break;case 52:a.addContainer("external_container_queue",...s[l]),this.$=s[l];break;case 53:a.addComponent("component",...s[l]),this.$=s[l];break;case 54:a.addComponent("component_db",...s[l]),this.$=s[l];break;case 55:a.addComponent("component_queue",...s[l]),this.$=s[l];break;case 56:a.addComponent("external_component",...s[l]),this.$=s[l];break;case 57:a.addComponent("external_component_db",...s[l]),this.$=s[l];break;case 58:a.addComponent("external_component_queue",...s[l]),this.$=s[l];break;case 60:a.addRel("rel",...s[l]),this.$=s[l];break;case 61:a.addRel("birel",...s[l]),this.$=s[l];break;case 62:a.addRel("rel_u",...s[l]),this.$=s[l];break;case 63:a.addRel("rel_d",...s[l]),this.$=s[l];break;case 64:a.addRel("rel_l",...s[l]),this.$=s[l];break;case 65:a.addRel("rel_r",...s[l]),this.$=s[l];break;case 66:a.addRel("rel_b",...s[l]),this.$=s[l];break;case 67:s[l].splice(0,1),a.addRel("rel",...s[l]),this.$=s[l];break;case 68:a.updateElStyle("update_el_style",...s[l]),this.$=s[l];break;case 69:a.updateRelStyle("update_rel_style",...s[l]),this.$=s[l];break;case 70:a.updateLayoutConfig("update_layout_config",...s[l]),this.$=s[l];break;case 71:this.$=[s[l]];break;case 72:s[l].unshift(s[l-1]),this.$=s[l];break;case 73:case 75:this.$=s[l].trim();break;case 74:let t={};t[s[l-1].trim()]=s[l].trim(),this.$=t;break;case 76:this.$=""}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:n,24:a,26:i,28:s,29:49,30:61,32:62,34:r,36:l,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:_,48:x,49:m,50:E,51:S,52:A,53:C,54:w,55:O,56:k,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:j,65:I,66:M,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q},{13:70,19:20,20:21,21:22,22:e,23:n,24:a,26:i,28:s,29:49,30:61,32:62,34:r,36:l,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:_,48:x,49:m,50:E,51:S,52:A,53:C,54:w,55:O,56:k,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:j,65:I,66:M,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q},{13:71,19:20,20:21,21:22,22:e,23:n,24:a,26:i,28:s,29:49,30:61,32:62,34:r,36:l,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:_,48:x,49:m,50:E,51:S,52:A,53:C,54:w,55:O,56:k,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:j,65:I,66:M,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q},{13:72,19:20,20:21,21:22,22:e,23:n,24:a,26:i,28:s,29:49,30:61,32:62,34:r,36:l,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:_,48:x,49:m,50:E,51:S,52:A,53:C,54:w,55:O,56:k,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:j,65:I,66:M,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q},{13:73,19:20,20:21,21:22,22:e,23:n,24:a,26:i,28:s,29:49,30:61,32:62,34:r,36:l,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:_,48:x,49:m,50:E,51:S,52:A,53:C,54:w,55:O,56:k,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:j,65:I,66:M,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q},{14:[1,74]},t($,[2,13],{43:23,29:49,30:61,32:62,20:75,34:r,36:l,37:h,38:d,39:u,40:p,41:y,44:g,45:f,46:b,47:_,48:x,49:m,50:E,51:S,52:A,53:C,54:w,55:O,56:k,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:j,65:I,66:M,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q}),t($,[2,14]),t(H,[2,16],{12:[1,76]}),t($,[2,36],{12:[1,77]}),t(V,[2,19]),t(V,[2,20]),{25:[1,78]},{27:[1,79]},t(V,[2,23]),{35:80,75:81,76:q,77:G,79:K,80:J},{35:86,75:81,76:q,77:G,79:K,80:J},{35:87,75:81,76:q,77:G,79:K,80:J},{35:88,75:81,76:q,77:G,79:K,80:J},{35:89,75:81,76:q,77:G,79:K,80:J},{35:90,75:81,76:q,77:G,79:K,80:J},{35:91,75:81,76:q,77:G,79:K,80:J},{35:92,75:81,76:q,77:G,79:K,80:J},{35:93,75:81,76:q,77:G,79:K,80:J},{35:94,75:81,76:q,77:G,79:K,80:J},{35:95,75:81,76:q,77:G,79:K,80:J},{35:96,75:81,76:q,77:G,79:K,80:J},{35:97,75:81,76:q,77:G,79:K,80:J},{35:98,75:81,76:q,77:G,79:K,80:J},{35:99,75:81,76:q,77:G,79:K,80:J},{35:100,75:81,76:q,77:G,79:K,80:J},{35:101,75:81,76:q,77:G,79:K,80:J},{35:102,75:81,76:q,77:G,79:K,80:J},{35:103,75:81,76:q,77:G,79:K,80:J},{35:104,75:81,76:q,77:G,79:K,80:J},t(Z,[2,59]),{35:105,75:81,76:q,77:G,79:K,80:J},{35:106,75:81,76:q,77:G,79:K,80:J},{35:107,75:81,76:q,77:G,79:K,80:J},{35:108,75:81,76:q,77:G,79:K,80:J},{35:109,75:81,76:q,77:G,79:K,80:J},{35:110,75:81,76:q,77:G,79:K,80:J},{35:111,75:81,76:q,77:G,79:K,80:J},{35:112,75:81,76:q,77:G,79:K,80:J},{35:113,75:81,76:q,77:G,79:K,80:J},{35:114,75:81,76:q,77:G,79:K,80:J},{35:115,75:81,76:q,77:G,79:K,80:J},{20:116,29:49,30:61,32:62,34:r,36:l,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:_,48:x,49:m,50:E,51:S,52:A,53:C,54:w,55:O,56:k,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:j,65:I,66:M,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q},{12:[1,118],33:[1,117]},{35:119,75:81,76:q,77:G,79:K,80:J},{35:120,75:81,76:q,77:G,79:K,80:J},{35:121,75:81,76:q,77:G,79:K,80:J},{35:122,75:81,76:q,77:G,79:K,80:J},{35:123,75:81,76:q,77:G,79:K,80:J},{35:124,75:81,76:q,77:G,79:K,80:J},{35:125,75:81,76:q,77:G,79:K,80:J},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t($,[2,15]),t(H,[2,17],{21:22,19:130,22:e,23:n,24:a,26:i,28:s}),t($,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:n,24:a,26:i,28:s,34:r,36:l,37:h,38:d,39:u,40:p,41:y,44:g,45:f,46:b,47:_,48:x,49:m,50:E,51:S,52:A,53:C,54:w,55:O,56:k,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:j,65:I,66:M,67:L,68:Y,69:U,70:F,71:X,72:z,73:W,74:Q}),t(V,[2,21]),t(V,[2,22]),t(Z,[2,39]),t(tt,[2,71],{75:81,35:132,76:q,77:G,79:K,80:J}),t(et,[2,73]),{78:[1,133]},t(et,[2,75]),t(et,[2,76]),t(Z,[2,40]),t(Z,[2,41]),t(Z,[2,42]),t(Z,[2,43]),t(Z,[2,44]),t(Z,[2,45]),t(Z,[2,46]),t(Z,[2,47]),t(Z,[2,48]),t(Z,[2,49]),t(Z,[2,50]),t(Z,[2,51]),t(Z,[2,52]),t(Z,[2,53]),t(Z,[2,54]),t(Z,[2,55]),t(Z,[2,56]),t(Z,[2,57]),t(Z,[2,58]),t(Z,[2,60]),t(Z,[2,61]),t(Z,[2,62]),t(Z,[2,63]),t(Z,[2,64]),t(Z,[2,65]),t(Z,[2,66]),t(Z,[2,67]),t(Z,[2,68]),t(Z,[2,69]),t(Z,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(nt,[2,28]),t(nt,[2,29]),t(nt,[2,30]),t(nt,[2,31]),t(nt,[2,32]),t(nt,[2,33]),t(nt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(H,[2,18]),t($,[2,38]),t(tt,[2,72]),t(et,[2,74]),t(Z,[2,24]),t(Z,[2,35]),t(at,[2,25]),t(at,[2,26],{12:[1,138]}),t(at,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:o(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:o(function(t){var e=this,n=[0],a=[],i=[null],s=[],r=this.table,l="",c=0,h=0,d=s.slice.call(arguments,1),u=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);u.setInput(t,p.yy),p.yy.lexer=u,p.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var g=u.yylloc;s.push(g);var f=u.options&&u.options.ranges;function b(){var t;return"number"!=typeof(t=a.pop()||u.lex()||1)&&(t instanceof Array&&(t=(a=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o(function(t){n.length=n.length-2*t,i.length=i.length-t,s.length=s.length-t},"popStack"),o(b,"lex");for(var _,x,m,E,S,A,C,w,O={};;){if(x=n[n.length-1],this.defaultActions[x]?m=this.defaultActions[x]:(null==_&&(_=b()),m=r[x]&&r[x][_]),void 0===m||!m.length||!m[0]){var k="";for(S in w=[],r[x])this.terminals_[S]&&S>2&&w.push("'"+this.terminals_[S]+"'");k=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(k,{text:u.match,token:this.terminals_[_]||_,line:u.yylineno,loc:g,expected:w})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+_);switch(m[0]){case 1:n.push(_),i.push(u.yytext),s.push(u.yylloc),n.push(m[1]),_=null,h=u.yyleng,l=u.yytext,c=u.yylineno,g=u.yylloc;break;case 2:if(A=this.productions_[m[1]][1],O.$=i[i.length-A],O._$={first_line:s[s.length-(A||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(A||1)].first_column,last_column:s[s.length-1].last_column},f&&(O._$.range=[s[s.length-(A||1)].range[0],s[s.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[l,h,c,p.yy,m[1],i,s].concat(d))))return E;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),s=s.slice(0,-1*A)),n.push(this.productions_[m[1]][0]),i.push(O.$),s.push(O._$),C=r[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0},"parse")},st=function(){return{EOF:1,parseError:o(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:o(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:o(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===a.length?this.yylloc.first_column:0)+a[a.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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(),{text:"",token:null,line:this.yylineno})},"reject"),less:o(function(t){this.unput(this.match.slice(t))},"less"),pastInput:o(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:o(function(t,e){var n,a,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var s in i)this[s]=i[s];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;var t,e,n,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),s=0;s<i.length;s++)if((n=this._input.match(this.rules[i[s]]))&&(!e||n[0].length>e[0].length)){if(e=n,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var t=this.next();return t||this.lex()},"lex"),begin:o(function(t){this.conditionStack.push(t)},"begin"),popState:o(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:o(function(t){this.begin(t)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:o(function(t,e,n,a){switch(n){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 73:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 16:case 70:break;case 14:c;break;case 15:return 12;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:case 53:return this.begin("rel_u"),66;case 54:case 55:return this.begin("rel_d"),67;case 56:case 57:return this.begin("rel_l"),68;case 58:case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:case 79:this.popState(),this.popState();break;case 69:case 71:return 80;case 72:this.begin("string");break;case 74:case 80:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[65,66,67,68],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}}}();function rt(){this.yy={}}return it.lexer=st,o(rt,"Parser"),rt.prototype=it,it.Parser=rt,new rt}();E.parser=E;var S,A=E,C=[],w=[""],O="global",k="",T=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],v=[],R="",D=!1,N=4,P=2,B=o(function(){return S},"getC4Type"),j=o(function(t){let e=f(t,h());S=e},"setC4Type"),I=o(function(t,e,n,a,i,s,r,l,o){if(null==t||null==e||null==n||null==a)return;let c={};const h=v.find(t=>t.from===e&&t.to===n);if(h?c=h:v.push(c),c.type=t,c.from=e,c.to=n,c.label={text:a},null==i)c.techn={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];c[t]={text:e}}else c.techn={text:i};if(null==s)c.descr={text:""};else if("object"==typeof s){let[t,e]=Object.entries(s)[0];c[t]={text:e}}else c.descr={text:s};if("object"==typeof r){let[t,e]=Object.entries(r)[0];c[t]=e}else c.sprite=r;if("object"==typeof l){let[t,e]=Object.entries(l)[0];c[t]=e}else c.tags=l;if("object"==typeof o){let[t,e]=Object.entries(o)[0];c[t]=e}else c.link=o;c.wrap=st()},"addRel"),M=o(function(t,e,n,a,i,s,r){if(null===e||null===n)return;let l={};const o=C.find(t=>t.alias===e);if(o&&e===o.alias?l=o:(l.alias=e,C.push(l)),l.label=null==n?{text:""}:{text:n},null==a)l.descr={text:""};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];l[t]={text:e}}else l.descr={text:a};if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]=e}else l.sprite=i;if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.tags=s;if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]=e}else l.link=r;l.typeC4Shape={text:t},l.parentBoundary=O,l.wrap=st()},"addPersonOrSystem"),L=o(function(t,e,n,a,i,s,r,l){if(null===e||null===n)return;let o={};const c=C.find(t=>t.alias===e);if(c&&e===c.alias?o=c:(o.alias=e,C.push(o)),o.label=null==n?{text:""}:{text:n},null==a)o.techn={text:""};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];o[t]={text:e}}else o.techn={text:a};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.sprite=s;if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.tags=r;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.wrap=st(),o.typeC4Shape={text:t},o.parentBoundary=O},"addContainer"),Y=o(function(t,e,n,a,i,s,r,l){if(null===e||null===n)return;let o={};const c=C.find(t=>t.alias===e);if(c&&e===c.alias?o=c:(o.alias=e,C.push(o)),o.label=null==n?{text:""}:{text:n},null==a)o.techn={text:""};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];o[t]={text:e}}else o.techn={text:a};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.sprite=s;if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.tags=r;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.wrap=st(),o.typeC4Shape={text:t},o.parentBoundary=O},"addComponent"),U=o(function(t,e,n,a,i){if(null===t||null===e)return;let s={};const r=T.find(e=>e.alias===t);if(r&&t===r.alias?s=r:(s.alias=t,T.push(s)),s.label=null==e?{text:""}:{text:e},null==n)s.type={text:"system"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];s[t]={text:e}}else s.type={text:n};if("object"==typeof a){let[t,e]=Object.entries(a)[0];s[t]=e}else s.tags=a;if("object"==typeof i){let[t,e]=Object.entries(i)[0];s[t]=e}else s.link=i;s.parentBoundary=O,s.wrap=st(),k=O,O=t,w.push(k)},"addPersonOrSystemBoundary"),F=o(function(t,e,n,a,i){if(null===t||null===e)return;let s={};const r=T.find(e=>e.alias===t);if(r&&t===r.alias?s=r:(s.alias=t,T.push(s)),s.label=null==e?{text:""}:{text:e},null==n)s.type={text:"container"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];s[t]={text:e}}else s.type={text:n};if("object"==typeof a){let[t,e]=Object.entries(a)[0];s[t]=e}else s.tags=a;if("object"==typeof i){let[t,e]=Object.entries(i)[0];s[t]=e}else s.link=i;s.parentBoundary=O,s.wrap=st(),k=O,O=t,w.push(k)},"addContainerBoundary"),X=o(function(t,e,n,a,i,s,r,l){if(null===e||null===n)return;let o={};const c=T.find(t=>t.alias===e);if(c&&e===c.alias?o=c:(o.alias=e,T.push(o)),o.label=null==n?{text:""}:{text:n},null==a)o.type={text:"node"};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];o[t]={text:e}}else o.type={text:a};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.tags=r;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.nodeType=t,o.parentBoundary=O,o.wrap=st(),k=O,O=e,w.push(k)},"addDeploymentNode"),z=o(function(){O=k,w.pop(),k=w.pop(),w.push(k)},"popBoundaryParseStack"),W=o(function(t,e,n,a,i,s,r,l,o,c,h){let d=C.find(t=>t.alias===e);if(void 0!==d||(d=T.find(t=>t.alias===e),void 0!==d)){if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];d[t]=e}else d.bgColor=n;if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];d[t]=e}else d.fontColor=a;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];d[t]=e}else d.borderColor=i;if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];d[t]=e}else d.shadowing=s;if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];d[t]=e}else d.shape=r;if(null!=l)if("object"==typeof l){let[t,e]=Object.entries(l)[0];d[t]=e}else d.sprite=l;if(null!=o)if("object"==typeof o){let[t,e]=Object.entries(o)[0];d[t]=e}else d.techn=o;if(null!=c)if("object"==typeof c){let[t,e]=Object.entries(c)[0];d[t]=e}else d.legendText=c;if(null!=h)if("object"==typeof h){let[t,e]=Object.entries(h)[0];d[t]=e}else d.legendSprite=h}},"updateElStyle"),Q=o(function(t,e,n,a,i,s,r){const l=v.find(t=>t.from===e&&t.to===n);if(void 0!==l){if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];l[t]=e}else l.textColor=a;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]=e}else l.lineColor=i;if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=parseInt(e)}else l.offsetX=parseInt(s);if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]=parseInt(e)}else l.offsetY=parseInt(r)}},"updateRelStyle"),$=o(function(t,e,n){let a=N,i=P;if("object"==typeof e){const t=Object.values(e)[0];a=parseInt(t)}else a=parseInt(e);if("object"==typeof n){const t=Object.values(n)[0];i=parseInt(t)}else i=parseInt(n);a>=1&&(N=a),i>=1&&(P=i)},"updateLayoutConfig"),H=o(function(){return N},"getC4ShapeInRow"),V=o(function(){return P},"getC4BoundaryInRow"),q=o(function(){return O},"getCurrentBoundaryParse"),G=o(function(){return k},"getParentBoundaryParse"),K=o(function(t){return null==t?C:C.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),J=o(function(t){return C.find(e=>e.alias===t)},"getC4Shape"),Z=o(function(t){return Object.keys(K(t))},"getC4ShapeKeys"),tt=o(function(t){return null==t?T:T.filter(e=>e.parentBoundary===t)},"getBoundaries"),et=tt,nt=o(function(){return v},"getRels"),at=o(function(){return R},"getTitle"),it=o(function(t){D=t},"setWrap"),st=o(function(){return D},"autoWrap"),rt=o(function(){C=[],T=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],k="",O="global",w=[""],v=[],w=[""],R="",D=!1,N=4,P=2},"clear"),lt=o(function(t){let e=f(t,h());R=e},"setTitle"),ot={addPersonOrSystem:M,addPersonOrSystemBoundary:U,addContainer:L,addContainerBoundary:F,addComponent:Y,addDeploymentNode:X,popBoundaryParseStack:z,addRel:I,updateElStyle:W,updateRelStyle:Q,updateLayoutConfig:$,autoWrap:st,setWrap:it,getC4ShapeArray:K,getC4Shape:J,getC4ShapeKeys:Z,getBoundaries:tt,getBoundarys:et,getCurrentBoundaryParse:q,getParentBoundaryParse:G,getRels:nt,getTitle:at,getC4Type:B,getC4ShapeInRow:H,getC4BoundaryInRow:V,setAccTitle:l,getAccTitle:r,getAccDescription:s,setAccDescription:i,getConfig:o(()=>h().c4,"getConfig"),clear:rt,LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:lt,setC4Type:j},ct=o(function(t,e){return a(t,e)},"drawRect"),ht=o(function(t,e,n,a,i,s){const r=t.append("image");r.attr("width",e),r.attr("height",n),r.attr("x",a),r.attr("y",i);let l=s.startsWith("data:image/png;base64")?s:b.sanitizeUrl(s);r.attr("xlink:href",l)},"drawImage"),dt=o((t,e,n,a)=>{const i=t.append("g");let s=0;for(let r of e){let t=r.textColor?r.textColor:"#444444",e=r.lineColor?r.lineColor:"#444444",l=r.offsetX?parseInt(r.offsetX):0,o=r.offsetY?parseInt(r.offsetY):0,c="";if(0===s){let t=i.append("line");t.attr("x1",r.startPoint.x),t.attr("y1",r.startPoint.y),t.attr("x2",r.endPoint.x),t.attr("y2",r.endPoint.y),t.attr("stroke-width","1"),t.attr("stroke",e),t.style("fill","none"),"rel_b"!==r.type&&t.attr("marker-end","url("+c+"#"+a+"-arrowhead)"),"birel"!==r.type&&"rel_b"!==r.type||t.attr("marker-start","url("+c+"#"+a+"-arrowend)"),s=-1}else{let t=i.append("path");t.attr("fill","none").attr("stroke-width","1").attr("stroke",e).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",r.startPoint.x).replaceAll("starty",r.startPoint.y).replaceAll("controlx",r.startPoint.x+(r.endPoint.x-r.startPoint.x)/2-(r.endPoint.x-r.startPoint.x)/4).replaceAll("controly",r.startPoint.y+(r.endPoint.y-r.startPoint.y)/2).replaceAll("stopx",r.endPoint.x).replaceAll("stopy",r.endPoint.y)),"rel_b"!==r.type&&t.attr("marker-end","url("+c+"#"+a+"-arrowhead)"),"birel"!==r.type&&"rel_b"!==r.type||t.attr("marker-start","url("+c+"#"+a+"-arrowend)")}let h=n.messageFont();St(n)(r.label.text,i,Math.min(r.startPoint.x,r.endPoint.x)+Math.abs(r.endPoint.x-r.startPoint.x)/2+l,Math.min(r.startPoint.y,r.endPoint.y)+Math.abs(r.endPoint.y-r.startPoint.y)/2+o,r.label.width,r.label.height,{fill:t},h),r.techn&&""!==r.techn.text&&(h=n.messageFont(),St(n)("["+r.techn.text+"]",i,Math.min(r.startPoint.x,r.endPoint.x)+Math.abs(r.endPoint.x-r.startPoint.x)/2+l,Math.min(r.startPoint.y,r.endPoint.y)+Math.abs(r.endPoint.y-r.startPoint.y)/2+n.messageFontSize+5+o,Math.max(r.label.width,r.techn.width),r.techn.height,{fill:t,"font-style":"italic"},h))}},"drawRels"),ut=o(function(t,e,n){const a=t.append("g");let i=e.bgColor?e.bgColor:"none",s=e.borderColor?e.borderColor:"#444444",r=e.fontColor?e.fontColor:"black",l={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(l={"stroke-width":1});let o={x:e.x,y:e.y,fill:i,stroke:s,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:l};ct(a,o);let c=n.boundaryFont();c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=r,St(n)(e.label.text,a,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},c),e.type&&""!==e.type.text&&(c=n.boundaryFont(),c.fontColor=r,St(n)(e.type.text,a,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},c)),e.descr&&""!==e.descr.text&&(c=n.boundaryFont(),c.fontSize=c.fontSize-2,c.fontColor=r,St(n)(e.descr.text,a,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},c))},"drawBoundary"),pt=o(function(t,e,a){var i;let s=e.bgColor?e.bgColor:a[e.typeC4Shape.text+"_bg_color"],r=e.borderColor?e.borderColor:a[e.typeC4Shape.text+"_border_color"],l=e.fontColor?e.fontColor:"#FFFFFF",o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}const c=t.append("g");c.attr("class","person-man");const h=n();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":h.x=e.x,h.y=e.y,h.fill=s,h.width=e.width,h.height=e.height,h.stroke=r,h.rx=2.5,h.ry=2.5,h.attrs={"stroke-width":.5},ct(c,h);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":c.append("path").attr("fill",s).attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),c.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":c.append("path").attr("fill",s).attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),c.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2))}let d=Et(a,e.typeC4Shape.text);switch(c.append("text").attr("fill",l).attr("font-family",d.fontFamily).attr("font-size",d.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":ht(c,48,48,e.x+e.width/2-24,e.y+e.image.Y,o)}let u=a[e.typeC4Shape.text+"Font"]();return u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=l,St(a)(e.label.text,c,e.x,e.y+e.label.Y,e.width,e.height,{fill:l},u),u=a[e.typeC4Shape.text+"Font"](),u.fontColor=l,e.techn&&""!==(null==(i=e.techn)?void 0:i.text)?St(a)(e.techn.text,c,e.x,e.y+e.techn.Y,e.width,e.height,{fill:l,"font-style":"italic"},u):e.type&&""!==e.type.text&&St(a)(e.type.text,c,e.x,e.y+e.type.Y,e.width,e.height,{fill:l,"font-style":"italic"},u),e.descr&&""!==e.descr.text&&(u=a.personFont(),u.fontColor=l,St(a)(e.descr.text,c,e.x,e.y+e.descr.Y,e.width,e.height,{fill:l},u)),e.height},"drawC4Shape"),yt=o(function(t,e){t.append("defs").append("symbol").attr("id",e+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","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")},"insertDatabaseIcon"),gt=o(function(t,e){t.append("defs").append("symbol").attr("id",e+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","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")},"insertComputerIcon"),ft=o(function(t,e){t.append("defs").append("symbol").attr("id",e+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","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")},"insertClockIcon"),bt=o(function(t,e){t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),_t=o(function(t,e){t.append("defs").append("marker").attr("id",e+"-arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),xt=o(function(t,e){t.append("defs").append("marker").attr("id",e+"-filled-head").attr("refX",18).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")},"insertArrowFilledHead"),mt=o(function(t,e){const n=t.append("defs").append("marker").attr("id",e+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);n.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),n.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),Et=o((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),St=function(){function t(t,e,n,i,s,r,l){a(e.append("text").attr("x",n+s/2).attr("y",i+r/2+5).style("text-anchor","middle").text(t),l)}function e(t,e,n,i,s,r,l,o){const{fontSize:c,fontFamily:h,fontWeight:d}=o,u=t.split(x.lineBreakRegex);for(let p=0;p<u.length;p++){const t=p*c-c*(u.length-1)/2,r=e.append("text").attr("x",n+s/2).attr("y",i).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",c).style("font-weight",d).style("font-family",h);r.append("tspan").attr("dy",t).text(u[p]).attr("alignment-baseline","mathematical"),a(r,l)}}function n(t,n,i,s,r,l,o,c){const h=n.append("switch"),d=h.append("foreignObject").attr("x",i).attr("y",s).attr("width",r).attr("height",l).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");d.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,i,s,r,0,o,c),a(d,o)}function a(t,e){for(const n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return o(t,"byText"),o(e,"byTspan"),o(n,"byFo"),o(a,"_setTextAttrs"),function(a){return"fo"===a.textPlacement?n:"old"===a.textPlacement?t:e}}(),At={drawRect:ct,drawBoundary:ut,drawC4Shape:pt,drawRels:dt,drawImage:ht,insertArrowHead:bt,insertArrowEnd:_t,insertArrowFilledHead:xt,insertArrowCrossHead:mt,insertDatabaseIcon:yt,insertComputerIcon:gt,insertClockIcon:ft},Ct=0,wt=0,Ot=4,kt=2;E.yy=ot;var Tt={},vt=(o(t=class{constructor(t){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,Rt(t.db.getConfig())}setData(t,e,n,a){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=e,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=a}updateVal(t,e,n,a){void 0===t[e]?t[e]=n:t[e]=a(n,t[e])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let e=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+2*t.margin,n=e+t.width,a=this.nextData.starty+2*t.margin,i=a+t.height;(e>=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>Ot)&&(e=this.nextData.startx+t.margin+Tt.nextLinePaddingX,a=this.nextData.stopy+2*t.margin,this.nextData.stopx=n=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=a+t.height,this.nextData.cnt=1),t.x=e,t.y=a,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",a,Math.min),this.updateVal(this.data,"stopx",n,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",a,Math.min),this.updateVal(this.nextData,"stopx",n,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},Rt(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},"Bounds"),t),Rt=o(function(t){y(Tt,t),t.fontFamily&&(Tt.personFontFamily=Tt.systemFontFamily=Tt.messageFontFamily=t.fontFamily),t.fontSize&&(Tt.personFontSize=Tt.systemFontSize=Tt.messageFontSize=t.fontSize),t.fontWeight&&(Tt.personFontWeight=Tt.systemFontWeight=Tt.messageFontWeight=t.fontWeight)},"setConf"),Dt=o((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),Nt=o(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),Pt=o(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont");function Bt(t,e,n,a,i){if(!e[t].width)if(n)e[t].text=_(e[t].text,i,a),e[t].textLines=e[t].text.split(x.lineBreakRegex).length,e[t].width=i,e[t].height=m(e[t].text,a);else{let n=e[t].text.split(x.lineBreakRegex);e[t].textLines=n.length;let i=0;e[t].height=0,e[t].width=0;for(const s of n)e[t].width=Math.max(g(s,a),e[t].width),i=m(s,a),e[t].height=e[t].height+i}}o(Bt,"calcC4ShapeTextWH");var jt=o(function(t,e,n){e.x=n.data.startx,e.y=n.data.starty,e.width=n.data.stopx-n.data.startx,e.height=n.data.stopy-n.data.starty,e.label.y=Tt.c4ShapeMargin-35;let a=e.wrap&&Tt.wrap,i=Nt(Tt);i.fontSize=i.fontSize+2,i.fontWeight="bold",Bt("label",e,a,i,g(e.label.text,i)),At.drawBoundary(t,e,Tt)},"drawBoundary"),It=o(function(t,e,n,a){let i=0;for(const s of a){i=0;const a=n[s];let r=Dt(Tt,a.typeC4Shape.text);switch(r.fontSize=r.fontSize-2,a.typeC4Shape.width=g("«"+a.typeC4Shape.text+"»",r),a.typeC4Shape.height=r.fontSize+2,a.typeC4Shape.Y=Tt.c4ShapePadding,i=a.typeC4Shape.Y+a.typeC4Shape.height-4,a.image={width:0,height:0,Y:0},a.typeC4Shape.text){case"person":case"external_person":a.image.width=48,a.image.height=48,a.image.Y=i,i=a.image.Y+a.image.height}a.sprite&&(a.image.width=48,a.image.height=48,a.image.Y=i,i=a.image.Y+a.image.height);let l=a.wrap&&Tt.wrap,o=Tt.width-2*Tt.c4ShapePadding,c=Dt(Tt,a.typeC4Shape.text);if(c.fontSize=c.fontSize+2,c.fontWeight="bold",Bt("label",a,l,c,o),a.label.Y=i+8,i=a.label.Y+a.label.height,a.type&&""!==a.type.text){a.type.text="["+a.type.text+"]",Bt("type",a,l,Dt(Tt,a.typeC4Shape.text),o),a.type.Y=i+5,i=a.type.Y+a.type.height}else if(a.techn&&""!==a.techn.text){a.techn.text="["+a.techn.text+"]",Bt("techn",a,l,Dt(Tt,a.techn.text),o),a.techn.Y=i+5,i=a.techn.Y+a.techn.height}let h=i,d=a.label.width;if(a.descr&&""!==a.descr.text){Bt("descr",a,l,Dt(Tt,a.typeC4Shape.text),o),a.descr.Y=i+20,i=a.descr.Y+a.descr.height,d=Math.max(a.label.width,a.descr.width),h=i-5*a.descr.textLines}d+=Tt.c4ShapePadding,a.width=Math.max(a.width||Tt.width,d,Tt.width),a.height=Math.max(a.height||Tt.height,h,Tt.height),a.margin=a.margin||Tt.c4ShapeMargin,t.insert(a),At.drawC4Shape(e,a,Tt)}t.bumpLastMargin(Tt.c4ShapeMargin)},"drawC4ShapeArray"),Mt=(o(e=class{constructor(t,e){this.x=t,this.y=e}},"Point"),e),Lt=o(function(t,e){let n=t.x,a=t.y,i=e.x,s=e.y,r=n+t.width/2,l=a+t.height/2,o=Math.abs(n-i),c=Math.abs(a-s),h=c/o,d=t.height/t.width,u=null;return a==s&&n<i?u=new Mt(n+t.width,l):a==s&&n>i?u=new Mt(n,l):n==i&&a<s?u=new Mt(r,a+t.height):n==i&&a>s&&(u=new Mt(r,a)),n>i&&a<s?u=d>=h?new Mt(n,l+h*t.width/2):new Mt(r-o/c*t.height/2,a+t.height):n<i&&a<s?u=d>=h?new Mt(n+t.width,l+h*t.width/2):new Mt(r+o/c*t.height/2,a+t.height):n<i&&a>s?u=d>=h?new Mt(n+t.width,l-h*t.width/2):new Mt(r+t.height/2*o/c,a):n>i&&a>s&&(u=d>=h?new Mt(n,l-t.width/2*h):new Mt(r-t.height/2*o/c,a)),u},"getIntersectPoint"),Yt=o(function(t,e){let n={x:0,y:0};n.x=e.x+e.width/2,n.y=e.y+e.height/2;let a=Lt(t,n);return n.x=t.x+t.width/2,n.y=t.y+t.height/2,{startPoint:a,endPoint:Lt(e,n)}},"getIntersectPoints"),Ut=o(function(t,e,n,a,i){let s=0;for(let r of e){s+=1;let t=r.wrap&&Tt.wrap,e=Pt(Tt);"C4Dynamic"===a.db.getC4Type()&&(r.label.text=s+": "+r.label.text);let i=g(r.label.text,e);Bt("label",r,t,e,i),r.techn&&""!==r.techn.text&&(i=g(r.techn.text,e),Bt("techn",r,t,e,i)),r.descr&&""!==r.descr.text&&(i=g(r.descr.text,e),Bt("descr",r,t,e,i));let l=n(r.from),o=n(r.to),c=Yt(l,o);r.startPoint=c.startPoint,r.endPoint=c.endPoint}At.drawRels(t,e,Tt,i)},"drawRels");function Ft(t,e,n,a,i){let s=new vt(i);s.data.widthLimit=n.data.widthLimit/Math.min(kt,a.length);for(let[r,l]of a.entries()){let a=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=a,a=l.image.Y+l.image.height);let o=l.wrap&&Tt.wrap,c=Nt(Tt);if(c.fontSize=c.fontSize+2,c.fontWeight="bold",Bt("label",l,o,c,s.data.widthLimit),l.label.Y=a+8,a=l.label.Y+l.label.height,l.type&&""!==l.type.text){l.type.text="["+l.type.text+"]",Bt("type",l,o,Nt(Tt),s.data.widthLimit),l.type.Y=a+5,a=l.type.Y+l.type.height}if(l.descr&&""!==l.descr.text){let t=Nt(Tt);t.fontSize=t.fontSize-2,Bt("descr",l,o,t,s.data.widthLimit),l.descr.Y=a+20,a=l.descr.Y+l.descr.height}if(0==r||r%kt===0){let t=n.data.startx+Tt.diagramMarginX,e=n.data.stopy+Tt.diagramMarginY+a;s.setData(t,t,e,e)}else{let t=s.data.stopx!==s.data.startx?s.data.stopx+Tt.diagramMarginX:s.data.startx,e=s.data.starty;s.setData(t,t,e,e)}s.name=l.alias;let h=i.db.getC4ShapeArray(l.alias),d=i.db.getC4ShapeKeys(l.alias);d.length>0&&It(s,t,h,d),e=l.alias;let u=i.db.getBoundaries(e);u.length>0&&Ft(t,e,s,u,i),"global"!==l.alias&&jt(t,l,s),n.data.stopy=Math.max(s.data.stopy+Tt.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(s.data.stopx+Tt.c4ShapeMargin,n.data.stopx),Ct=Math.max(Ct,n.data.stopx),wt=Math.max(wt,n.data.stopy)}}o(Ft,"drawInsideBoundary");var Xt={drawPersonOrSystemArray:It,drawBoundary:jt,setConf:Rt,draw:o(function(t,e,n,a){Tt=h().c4;const i=h().securityLevel;let s;"sandbox"===i&&(s=d("#i"+e));const r=d("sandbox"===i?s.nodes()[0].contentDocument.body:"body");let l=a.db;a.db.setWrap(Tt.wrap),Ot=l.getC4ShapeInRow(),kt=l.getC4BoundaryInRow(),u.debug(`C:${JSON.stringify(Tt,null,2)}`);const o="sandbox"===i?r.select(`[id="${e}"]`):d(`[id="${e}"]`);At.insertComputerIcon(o,e),At.insertDatabaseIcon(o,e),At.insertClockIcon(o,e);let c=new vt(a);c.setData(Tt.diagramMarginX,Tt.diagramMarginX,Tt.diagramMarginY,Tt.diagramMarginY),c.data.widthLimit=screen.availWidth,Ct=Tt.diagramMarginX,wt=Tt.diagramMarginY;const y=a.db.getTitle();Ft(o,"",c,a.db.getBoundaries(""),a),At.insertArrowHead(o,e),At.insertArrowEnd(o,e),At.insertArrowCrossHead(o,e),At.insertArrowFilledHead(o,e),Ut(o,a.db.getRels(),a.db.getC4Shape,a,e),c.data.stopx=Ct,c.data.stopy=wt;const g=c.data;let f=g.stopy-g.starty+2*Tt.diagramMarginY;const b=g.stopx-g.startx+2*Tt.diagramMarginX;y&&o.append("text").text(y).attr("x",(g.stopx-g.startx)/2-4*Tt.diagramMarginX).attr("y",g.starty+Tt.diagramMarginY),p(o,f,b,Tt.useMaxWidth);const _=y?60:0;o.attr("viewBox",g.startx-Tt.diagramMarginX+" -"+(Tt.diagramMarginY+_)+" "+b+" "+(f+_)),u.debug("models:",g)},"draw")},zt={parser:A,db:ot,renderer:Xt,styles:o(t=>`.person {\n stroke: ${t.personBorder};\n fill: ${t.personBkg};\n }\n`,"getStyles"),init:o(({c4:t,wrap:e})=>{Xt.setConf(t),ot.setWrap(e)},"init")};export{zt as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{af as a,ag as r}from"./mermaid.core-5jj-23N2.js";const o=(o,s)=>a.lang.round(r.parse(o)[s]);export{o as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t;import{_ as r}from"./mermaid.core-5jj-23N2.js";var i=(r(t=class{constructor(t){this.init=t,this.records=this.init()}reset(){this.records=this.init()}},"ImperativeState"),t);export{i as I};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t,d as a,R as r,j as e}from"./mermaid.core-5jj-23N2.js";var s=t((t,a)=>{const r=t.append("rect");if(r.attr("x",a.x),r.attr("y",a.y),r.attr("fill",a.fill),r.attr("stroke",a.stroke),r.attr("width",a.width),r.attr("height",a.height),a.name&&r.attr("name",a.name),a.rx&&r.attr("rx",a.rx),a.ry&&r.attr("ry",a.ry),void 0!==a.attrs)for(const e in a.attrs)r.attr(e,a.attrs[e]);return a.class&&r.attr("class",a.class),r},"drawRect"),n=t((t,a)=>{const r={x:a.startx,y:a.starty,width:a.stopx-a.startx,height:a.stopy-a.starty,fill:a.fill,stroke:a.stroke,class:"rect"};s(t,r).lower()},"drawBackgroundRect"),o=t((t,a)=>{const e=a.text.replace(r," "),s=t.append("text");s.attr("x",a.x),s.attr("y",a.y),s.attr("class","legend"),s.style("text-anchor",a.anchor),a.class&&s.attr("class",a.class);const n=s.append("tspan");return n.attr("x",a.x+2*a.textMargin),n.text(e),s},"drawText"),i=t((t,a,r,s)=>{const n=t.append("image");n.attr("x",a),n.attr("y",r);const o=e.sanitizeUrl(s);n.attr("xlink:href",o)},"drawImage"),l=t((t,a,r,s)=>{const n=t.append("use");n.attr("x",a),n.attr("y",r);const o=e.sanitizeUrl(s);n.attr("xlink:href",`#${o}`)},"drawEmbeddedImage"),d=t(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),x=t(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),c=t(()=>{let t=a(".mermaidTooltip");return t.empty()&&(t=a("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip");export{n as a,x as b,l as c,s as d,i as e,c as f,d as g,o as h};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as n}from"./mermaid.core-5jj-23N2.js";var e=n(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles");export{e as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t;import{g as e}from"./chunk-XXDRQBXY-B487xPKi.js";import{s}from"./chunk-VR4S4FIN-DGfPvqRe.js";import{_ as i,l as n,c as r,v as o,x as a,a as l,b as c,g as h,s as d,n as u,o as p,Q as y,k as g,p as f,d as m}from"./mermaid.core-5jj-23N2.js";import{f as S}from"./chunk-32BRIVSS-ByOJtY8z.js";import{p as k}from"./index-uJhfY-Ds.js";var b=function(){var t=i(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,2],s=[1,3],n=[1,4],r=[2,4],o=[1,9],a=[1,11],l=[1,16],c=[1,17],h=[1,18],d=[1,19],u=[1,33],p=[1,20],y=[1,21],g=[1,22],f=[1,23],m=[1,24],S=[1,26],k=[1,27],b=[1,28],T=[1,29],_=[1,30],E=[1,31],v=[1,32],x=[1,35],$=[1,36],C=[1,37],D=[1,38],I=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],L=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],w=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],N={trace:i(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:i(function(t,e,s,i,n,r,o){var a=r.length-1;switch(n){case 3:return i.setRootDoc(r[a]),r[a];case 4:this.$=[];break;case 5:"nl"!=r[a]&&(r[a-1].push(r[a]),this.$=r[a-1]);break;case 6:case 7:case 12:this.$=r[a];break;case 8:this.$="nl";break;case 13:const t=r[a-1];t.description=i.trimColon(r[a]),this.$=t;break;case 14:this.$={stmt:"relation",state1:r[a-2],state2:r[a]};break;case 15:const e=i.trimColon(r[a]);this.$={stmt:"relation",state1:r[a-3],state2:r[a-1],description:e};break;case 19:this.$={stmt:"state",id:r[a-3],type:"default",description:"",doc:r[a-1]};break;case 20:var l=r[a],c=r[a-2].trim();if(r[a].match(":")){var h=r[a].split(":");l=h[0],c=[c,h[1]]}this.$={stmt:"state",id:l,type:"default",description:c};break;case 21:this.$={stmt:"state",id:r[a-3],type:"default",description:r[a-5],doc:r[a-1]};break;case 22:this.$={stmt:"state",id:r[a],type:"fork"};break;case 23:this.$={stmt:"state",id:r[a],type:"join"};break;case 24:this.$={stmt:"state",id:r[a],type:"choice"};break;case 25:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:r[a-1].trim(),note:{position:r[a-2].trim(),text:r[a].trim()}};break;case 29:this.$=r[a].trim(),i.setAccTitle(this.$);break;case 30:case 31:this.$=r[a].trim(),i.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:r[a-3],url:r[a-2],tooltip:r[a-1]};break;case 33:this.$={stmt:"click",id:r[a-3],url:r[a-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:r[a-1].trim(),classes:r[a].trim()};break;case 36:this.$={stmt:"style",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 37:this.$={stmt:"applyClass",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 38:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:r[a].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:r[a-2].trim(),classes:[r[a].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:e,5:s,6:n},{1:[3]},{3:5,4:e,5:s,6:n},{3:6,4:e,5:s,6:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:a,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:E,48:v,51:x,52:$,53:C,54:D,57:I},t(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:E,48:v,51:x,52:$,53:C,54:D,57:I},t(A,[2,7]),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(A,[2,11]),t(A,[2,12],{14:[1,40],15:[1,41]}),t(A,[2,16]),{18:[1,42]},t(A,[2,18],{20:[1,43]}),{23:[1,44]},t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(A,[2,28]),{34:[1,49]},{36:[1,50]},t(A,[2,31]),{13:51,24:u,57:I},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(L,[2,44],{58:[1,56]}),t(L,[2,45],{58:[1,57]}),t(A,[2,38]),t(A,[2,39]),t(A,[2,40]),t(A,[2,41]),t(A,[2,6]),t(A,[2,13]),{13:58,24:u,57:I},t(A,[2,17]),t(w,r,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(A,[2,29]),t(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(A,[2,14],{14:[1,71]}),{4:o,5:a,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,72],22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:E,48:v,51:x,52:$,53:C,54:D,57:I},t(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(A,[2,34]),t(A,[2,35]),t(A,[2,36]),t(A,[2,37]),t(L,[2,46]),t(L,[2,47]),t(A,[2,15]),t(A,[2,19]),t(w,r,{7:78}),t(A,[2,26]),t(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:a,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,81],22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:k,37:b,38:T,41:_,45:E,48:v,51:x,52:$,53:C,54:D,57:I},t(A,[2,32]),t(A,[2,33]),t(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:i(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:i(function(t){var e=this,s=[0],n=[],r=[null],o=[],a=this.table,l="",c=0,h=0,d=o.slice.call(arguments,1),u=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);u.setInput(t,p.yy),p.yy.lexer=u,p.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var g=u.yylloc;o.push(g);var f=u.options&&u.options.ranges;function m(){var t;return"number"!=typeof(t=n.pop()||u.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,i(function(t){s.length=s.length-2*t,r.length=r.length-t,o.length=o.length-t},"popStack"),i(m,"lex");for(var S,k,b,T,_,E,v,x,$={};;){if(k=s[s.length-1],this.defaultActions[k]?b=this.defaultActions[k]:(null==S&&(S=m()),b=a[k]&&a[k][S]),void 0===b||!b.length||!b[0]){var C="";for(_ in x=[],a[k])this.terminals_[_]&&_>2&&x.push("'"+this.terminals_[_]+"'");C=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[S]||S)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==S?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(C,{text:u.match,token:this.terminals_[S]||S,line:u.yylineno,loc:g,expected:x})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+S);switch(b[0]){case 1:s.push(S),r.push(u.yytext),o.push(u.yylloc),s.push(b[1]),S=null,h=u.yyleng,l=u.yytext,c=u.yylineno,g=u.yylloc;break;case 2:if(E=this.productions_[b[1]][1],$.$=r[r.length-E],$._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},f&&($._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),void 0!==(T=this.performAction.apply($,[l,h,c,p.yy,b[1],r,o].concat(d))))return T;E&&(s=s.slice(0,-1*E*2),r=r.slice(0,-1*E),o=o.slice(0,-1*E)),s.push(this.productions_[b[1]][0]),r.push($.$),o.push($._$),v=a[s[s.length-2]][s[s.length-1]],s.push(v);break;case 3:return!0}}return!0},"parse")},O=function(){return{EOF:1,parseError:i(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:i(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:i(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:i(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:i(function(){return this._more=!0,this},"more"),reject:i(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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(),{text:"",token:null,line:this.yylineno})},"reject"),less:i(function(t){this.unput(this.match.slice(t))},"less"),pastInput:i(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:i(function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:i(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if((s=this._input.match(this.rules[n[r]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:i(function(){var t=this.next();return t||this.lex()},"lex"),begin:i(function(t){this.conditionStack.push(t)},"begin"),popState:i(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:i(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:i(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:i(function(t){this.begin(t)},"pushState"),stateStackSize:i(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:i(function(t,e,s,n){function r(){const s=e.yytext.indexOf("%%");if(0===s)return!1;if(s>0){const i=e.yytext.slice(0,s),n=e.yytext.slice(s);n&&t.lexer.unput(n),e.yytext=i}return!0}switch(i(r,"processId"),s){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:case 43:return 51;case 5:case 44:return 52;case 6:case 45:return 53;case 7:case 46:return 54;case 8:case 78:return 5;case 9:case 10:case 11:case 12:case 57:case 63:break;case 13:case 33:return this.pushState("SCALE"),17;case 14:case 34:return 18;case 15:case 21:case 35:case 50:case 54:this.popState();break;case 16:return this.begin("acc_title"),33;case 17:return this.popState(),"acc_title_value";case 18:return this.begin("acc_descr"),35;case 19:return this.popState(),"acc_descr_value";case 20:this.begin("acc_descr_multiline");break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 25:return this.popState(),this.pushState("CLASSDEFID"),42;case 26:return this.popState(),43;case 27:return this.pushState("CLASS"),48;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;case 29:return this.popState(),50;case 30:return this.pushState("STYLE"),45;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 32:return this.popState(),47;case 36:this.pushState("STATE");break;case 37:case 40:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 38:case 41:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 39:case 42:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";case 49:case 65:if(!r())return;return this.popState(),"ID";case 51:return"STATE_DESCR";case 52:throw new Error('Error: State name must be a single word. Found: "'+e.yytext.trim()+'"');case 53:return 19;case 55:return this.popState(),this.pushState("struct"),20;case 56:return this.popState(),21;case 58:return this.begin("NOTE"),29;case 59:return this.popState(),this.pushState("NOTE_ID"),59;case 60:return this.popState(),this.pushState("NOTE_ID"),60;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 64:return"NOTE_TEXT";case 66:if(!r())return;return this.popState(),this.pushState("NOTE_TEXT"),24;case 67:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 68:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 69:case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!r())return;return 24;case 74:return e.yytext=e.yytext.trim(),14;case 75:return 15;case 76:return 28;case 77:return 58;case 79:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}}}();function R(){this.yy={}}return N.lexer=O,i(R,"Parser"),R.prototype=N,N.Parser=R,new R}();b.parser=b;var T=b,_="state",E="root",v="relation",x="default",$="divider",C="fill:none",D="fill: #333",I="markdown",A="normal",L="rect",w="rectWithTitle",N="divider",O="roundedWithTitle",R="statediagram",B=`${R}-state`,F="transition",P=`${F} note-edge`,Y=`${R}-note`,G=`${R}-cluster`,j=`${R}-cluster-alt`,z="parent",W="note",M="----",U=`${M}${W}`,X=`${M}${z}`,H=i((t,e="TB")=>{if(!t.doc)return e;let s=e;for(const i of t.doc)"dir"===i.stmt&&(s=i.value);return s},"getDir"),V={getClasses:i(function(t,e){return e.db.getClasses()},"getClasses"),draw:i(async function(t,i,l,c){n.info("REF0:"),n.info("Drawing state diagram (v2)",i);const{securityLevel:h,state:d,layout:u}=r();c.db.extract(c.db.getRootDocV2());const p=c.db.getData(),y=e(i,h);p.type=c.type,p.layoutAlgorithm=u,p.nodeSpacing=(null==d?void 0:d.nodeSpacing)||50,p.rankSpacing=(null==d?void 0:d.rankSpacing)||50;"neo"===r().look?p.markers=["barbNeo"]:p.markers=["barb"],p.diagramId=i,await o(p,y);try{("function"==typeof c.db.getLinks?c.db.getLinks():new Map).forEach((t,e)=>{var s;const i="string"==typeof e?e:"string"==typeof(null==e?void 0:e.id)?e.id:"",r=p.nodes.find(t=>t.id===i);if(!i)return void n.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(e));const o=null==(s=y.node())?void 0:s.querySelectorAll("g.node, g.rough-node");let a;if(null==o||o.forEach(t=>{var e;const s=null==(e=t.textContent)?void 0:e.trim();t.id!==(null==r?void 0:r.domId)&&s!==i||(a=t)}),!a)return void n.warn("⚠️ Could not find node matching text:",i);const l=a.parentNode;if(!l)return void n.warn("⚠️ Node has no parent, cannot wrap:",i);const c=document.createElementNS("http://www.w3.org/2000/svg","a"),h=t.url.replace(/^"+|"+$/g,"");if(c.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",h),c.setAttribute("target","_blank"),t.tooltip){const e=t.tooltip.replace(/^"+|"+$/g,"");c.setAttribute("title",e),a.setAttribute("title",e)}l.replaceChild(c,a),c.appendChild(a),n.info("🔗 Wrapped node in <a> tag for:",i,t.url)})}catch(g){n.error("❌ Error injecting clickable links:",g)}a.insertTitle(y,"statediagramTitleText",(null==d?void 0:d.titleTopMargin)??25,c.db.getDiagramTitle()),s(y,8,R,(null==d?void 0:d.useMaxWidth)??!0)},"draw"),getDir:H},J=new Map,K=0;function Q(t="",e=0,s="",i=M){return`state-${t}${null!==s&&s.length>0?`${i}${s}`:""}-${e}`}i(Q,"stateDomId");var q=i((t,e,s,i,o,a,l,c)=>{n.trace("items",e),e.forEach(e=>{switch(e.stmt){case _:case x:it(t,e,s,i,o,a,l,c);break;case v:{it(t,e.state1,s,i,o,a,l,c),it(t,e.state2,s,i,o,a,l,c);const n="neo"===l,h={id:"edge"+K,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:n?"arrow_barb_neo":"arrow_barb",style:C,labelStyle:"",label:g.sanitizeText(e.description??"",r()),arrowheadStyle:D,labelpos:"c",labelType:I,thickness:A,classes:F,look:l};o.push(h),K++}}})},"setupDoc"),Z=i((t,e="TB")=>{let s=e;if(t.doc)for(const i of t.doc)"dir"===i.stmt&&(s=i.value);return s},"getDir");function tt(t,e,s){if(!e.id||"</join></fork>"===e.id||"</choice>"===e.id)return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(t=>{const i=s.get(t);i&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...i.styles])}));const i=t.find(t=>t.id===e.id);i?Object.assign(i,e):t.push(e)}function et(t){var e;return(null==(e=null==t?void 0:t.classes)?void 0:e.join(" "))??""}function st(t){return(null==t?void 0:t.styles)??[]}i(tt,"insertOrUpdateNode"),i(et,"getClassesFromDbInfo"),i(st,"getStylesFromDbInfo");var it=i((t,e,s,i,o,a,l,c)=>{var h,d,u;const p=e.id,y=s.get(p),f=et(y),m=st(y),S=r();if(n.info("dataFetcher parsedItem",e,y,m),"root"!==p){let s=L;!0===e.start?s="stateStart":!1===e.start&&(s="stateEnd"),e.type!==x&&(s=e.type),J.get(p)||J.set(p,{id:p,shape:s,description:g.sanitizeText(p,S),cssClasses:`${f} ${B}`,cssStyles:m});const r=J.get(p);e.description&&(Array.isArray(r.description)?(r.shape=w,r.description.push(e.description)):(null==(h=r.description)?void 0:h.length)&&r.description.length>0?(r.shape=w,r.description===p?r.description=[e.description]:r.description=[r.description,e.description]):(r.shape=L,r.description=e.description),r.description=g.sanitizeTextOrArray(r.description,S)),1===(null==(d=r.description)?void 0:d.length)&&r.shape===w&&("group"===r.type?r.shape=O:r.shape=L),!r.type&&e.doc&&(n.info("Setting cluster for XCX",p,Z(e)),r.type="group",r.isGroup=!0,r.dir=Z(e),r.explicitDir=e.doc.some(t=>"dir"===t.stmt),r.shape=e.type===$?N:O,r.cssClasses=`${r.cssClasses} ${G} ${a?j:""}`);const y={labelStyle:"",shape:r.shape,label:r.description,cssClasses:r.cssClasses,cssCompiledStyles:[],cssStyles:r.cssStyles,id:p,dir:r.dir,domId:Q(p,K),type:r.type,isGroup:"group"===r.type,padding:8,rx:10,ry:10,look:l,labelType:"markdown"};if(y.shape===N&&(y.label=""),t&&"root"!==t.id&&(n.trace("Setting node ",p," to be child of its parent ",t.id),y.parentId=t.id),y.centerLabel=!0,e.note){const t={labelStyle:"",shape:"note",label:e.note.text,labelType:"markdown",cssClasses:Y,cssStyles:[],cssCompiledStyles:[],id:p+U+"-"+K,domId:Q(p,K,W),type:r.type,isGroup:"group"===r.type,padding:null==(u=S.flowchart)?void 0:u.padding,look:l,position:e.note.position},s=p+X,n={labelStyle:"",shape:"noteGroup",label:e.note.text,cssClasses:r.cssClasses,cssStyles:[],id:p+X,domId:Q(p,K,z),type:"group",isGroup:!0,padding:16,look:l,position:e.note.position};K++,n.id=s,t.parentId=s,tt(i,n,c),tt(i,t,c),tt(i,y,c);let a=p,h=t.id;"left of"===e.note.position&&(a=t.id,h=p),o.push({id:a+"-"+h,start:a,end:h,arrowhead:"none",arrowTypeEnd:"",style:C,labelStyle:"",classes:P,arrowheadStyle:D,labelpos:"c",labelType:I,thickness:A,look:l})}else tt(i,y,c)}e.doc&&(n.trace("Adding nodes children "),q(e,e.doc,s,i,o,!a,l,c))},"dataFetcher"),nt=i(()=>{J.clear(),K=0},"reset"),rt="[*]",ot="start",at="[*]",lt="end",ct="color",ht="fill",dt="bgFill",ut=",",pt=i(()=>new Map,"newClassesList"),yt=i(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),gt=i(t=>JSON.parse(JSON.stringify(t)),"clone"),ft=(i(t=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=pt(),this.documents={root:yt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=l,this.setAccTitle=c,this.getAccDescription=h,this.setAccDescription=d,this.setDiagramTitle=u,this.getDiagramTitle=p,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}extract(t){this.clear(!0);for(const i of Array.isArray(t)?t:t.doc)switch(i.stmt){case _:this.addState(i.id.trim(),i.type,i.doc,i.description,i.note);break;case v:this.addRelation(i.state1,i.state2,i.description);break;case"classDef":this.addStyleClass(i.id.trim(),i.classes);break;case"style":this.handleStyleDef(i);break;case"applyClass":this.setCssClass(i.id.trim(),i.styleClass);break;case"click":this.addLink(i.id,i.url,i.tooltip)}const e=this.getStates(),s=r();nt(),it(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,s.look,this.classes);for(const i of this.nodes)if(Array.isArray(i.label)){if(i.description=i.label.slice(1),i.isGroup&&i.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${i.id}]`);i.label=i.label[0]}}handleStyleDef(t){const e=t.id.trim().split(","),s=t.styleClass.split(",");for(const i of e){let t=this.getState(i);if(!t){const e=i.trim();this.addState(e),t=this.getState(e)}t&&(t.styles=s.map(t=>{var e;return null==(e=t.replace(/;/g,""))?void 0:e.trim()}))}}setRootDoc(t){n.info("Setting root doc",t),this.rootDoc=t,1===this.version?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,e,s){if(e.stmt===v)return this.docTranslator(t,e.state1,!0),void this.docTranslator(t,e.state2,!1);if(e.stmt===_&&(e.id===rt?(e.id=t.id+(s?"_start":"_end"),e.start=s):e.id=e.id.trim()),e.stmt!==E&&e.stmt!==_||!e.doc)return;const i=[];let n=[];for(const r of e.doc)if(r.type===$){const t=gt(r);t.doc=gt(n),i.push(t),n=[]}else n.push(r);if(i.length>0&&n.length>0){const t={stmt:_,id:y(),type:"divider",doc:gt(n)};i.push(gt(t)),e.doc=i}e.doc.forEach(t=>this.docTranslator(e,t,!0))}getRootDocV2(){return this.docTranslator({id:E,stmt:E},{id:E,stmt:E,doc:this.rootDoc},!0),{id:E,doc:this.rootDoc}}addState(t,e=x,s=void 0,i=void 0,o=void 0,a=void 0,l=void 0,c=void 0){const h=null==t?void 0:t.trim();if(this.currentDocument.states.has(h)){const t=this.currentDocument.states.get(h);if(!t)throw new Error(`State not found: ${h}`);t.doc||(t.doc=s),t.type||(t.type=e)}else n.info("Adding state ",h,i),this.currentDocument.states.set(h,{stmt:_,id:h,descriptions:[],type:e,doc:s,note:o,classes:[],styles:[],textStyles:[]});if(i){n.info("Setting state description",h,i);(Array.isArray(i)?i:[i]).forEach(t=>this.addDescription(h,t.trim()))}if(o){const t=this.currentDocument.states.get(h);if(!t)throw new Error(`State not found: ${h}`);t.note=o,t.note.text=g.sanitizeText(t.note.text,r())}if(a){n.info("Setting state classes",h,a);(Array.isArray(a)?a:[a]).forEach(t=>this.setCssClass(h,t.trim()))}if(l){n.info("Setting state styles",h,l);(Array.isArray(l)?l:[l]).forEach(t=>this.setStyle(h,t.trim()))}if(c){n.info("Setting state styles",h,l);(Array.isArray(c)?c:[c]).forEach(t=>this.setTextStyle(h,t.trim()))}}clear(t){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:yt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=pt(),t||(this.links=new Map,f())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){n.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,s){this.links.set(t,{url:e,tooltip:s}),n.warn("Adding link",t,e,s)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===rt?(this.startEndCount++,`${ot}${this.startEndCount}`):t}startTypeIfNeeded(t="",e=x){return t===rt?ot:e}endIdIfNeeded(t=""){return t===at?(this.startEndCount++,`${lt}${this.startEndCount}`):t}endTypeIfNeeded(t="",e=x){return t===at?lt:e}addRelationObjs(t,e,s=""){const i=this.startIdIfNeeded(t.id.trim()),n=this.startTypeIfNeeded(t.id.trim(),t.type),o=this.startIdIfNeeded(e.id.trim()),a=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(i,n,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(o,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:i,id2:o,relationTitle:g.sanitizeText(s,r())})}addRelation(t,e,s){if("object"==typeof t&&"object"==typeof e)this.addRelationObjs(t,e,s);else if("string"==typeof t&&"string"==typeof e){const i=this.startIdIfNeeded(t.trim()),n=this.startTypeIfNeeded(t),o=this.endIdIfNeeded(e.trim()),a=this.endTypeIfNeeded(e);this.addState(i,n),this.addState(o,a),this.currentDocument.relations.push({id1:i,id2:o,relationTitle:s?g.sanitizeText(s,r()):void 0})}}addDescription(t,e){var s;const i=this.currentDocument.states.get(t),n=e.startsWith(":")?e.replace(":","").trim():e;null==(s=null==i?void 0:i.descriptions)||s.push(g.sanitizeText(n,r()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});const s=this.classes.get(t);e&&s&&e.split(ut).forEach(t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(ct).exec(t)){const t=e.replace(ht,dt).replace(ct,ht);s.textStyles.push(t)}s.styles.push(e)})}getClasses(){return this.classes}setupToolTips(t){const e=S();m(t).select("svg").selectAll("g.node, g.rough-node").on("mouseover",t=>{var s;const i=m(t.currentTarget),n=i.attr("title");if(null===n)return;const r=null==(s=t.currentTarget)?void 0:s.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.style("left",window.scrollX+r.left+(r.right-r.left)/2+"px").style("top",window.scrollY+r.bottom+"px"),e.html(k.sanitize(n)),i.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0);m(t.currentTarget).classed("hover",!1)})}setCssClass(t,e){t.split(",").forEach(t=>{var s;let i=this.getState(t);if(!i){const e=t.trim();this.addState(e),i=this.getState(e)}null==(s=null==i?void 0:i.classes)||s.push(e)})}setStyle(t,e){var s,i;null==(i=null==(s=this.getState(t))?void 0:s.styles)||i.push(e)}setTextStyle(t,e){var s,i;null==(i=null==(s=this.getState(t))?void 0:s.textStyles)||i.push(e)}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirectionStatement(){return this.rootDoc.find(t=>"dir"===t.stmt)}getDirection(){var t;return(null==(t=this.getDirectionStatement())?void 0:t.value)??"TB"}setDirection(t){const e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:"dir",value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){const t=r();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:H(this.getRootDocV2())}}getConfig(){return r().state}},"StateDB"),t.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},t),mt=i(t=>`\ndefs [id$="-barbEnd"] {\n fill: ${t.transitionColor};\n stroke: ${t.transitionColor};\n }\ng.stateGroup text {\n fill: ${t.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${t.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${t.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${t.lineColor};\n stroke-width: ${t.strokeWidth||1};\n}\n\n.transition {\n stroke: ${t.transitionColor};\n stroke-width: ${t.strokeWidth||1};\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${t.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n\n text {\n fill: ${t.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${t.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n}\n.edgeLabel .label text {\n fill: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${t.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${t.innerEndBackground};\n stroke: ${t.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${t.compositeBackground||t.background};\n // stroke: ${t.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${t.stateBkg||t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: ${t.strokeWidth||1}px;\n}\n.node polygon {\n fill: ${t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};;\n stroke-width: ${t.strokeWidth||1}px;\n}\n[id$="-barbEnd"] {\n fill: ${t.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${t.compositeTitleBackground};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: ${t.strokeWidth||1}px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${t.stateLabelColor};\n // line-height: 1;\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${t.stateBorder||t.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${t.compositeBackground||t.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${t.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${t.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${t.noteTextColor};\n}\n\n[id$="-dependencyStart"], [id$="-dependencyEnd"] {\n fill: ${t.lineColor};\n stroke: ${t.lineColor};\n stroke-width: ${t.strokeWidth||1};\n}\n\n.statediagramTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n\n[data-look="neo"].statediagram-cluster rect {\n fill: ${t.mainBkg};\n stroke: ${t.useGradient?"url("+t.svgId+"-gradient)":t.stateBorder||t.nodeBorder};\n stroke-width: ${t.strokeWidth??1};\n}\n[data-look="neo"].statediagram-cluster rect.outer {\n rx: ${t.radius}px;\n ry: ${t.radius}px;\n filter: ${t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${t.svgId}-drop-shadow)`):"none"}\n}\n`,"getStyles");export{ft as S,T as a,V as b,mt as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as c}from"./mermaid.core-5jj-23N2.js";function l(c,l){var e,t,a;c.accDescr&&(null==(e=l.setAccDescription)||e.call(l,c.accDescr)),c.accTitle&&(null==(t=l.setAccTitle)||t.call(l,c.accTitle)),c.title&&(null==(a=l.setDiagramTitle)||a.call(l,c.title))}c(l,"populateCommonDb");export{l as p};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e,t;import{_ as n,l as r,D as i,y as a,p as o,E as l,e as s,i as d,c as m}from"./mermaid.core-5jj-23N2.js";var c="",h="",p="",u=[],g=new Map,T=n(e=>d(e,m()),"sanitizeText"),f=n(e=>{switch(e.type){case"terminal":return{...e,value:T(e.value)};case"nonterminal":return{...e,name:T(e.name)};case"sequence":return{...e,elements:e.elements.map(f)};case"choice":return{...e,alternatives:e.alternatives.map(f)};case"optional":return{...e,element:f(e.element)};case"repetition":return{...e,element:f(e.element),separator:e.separator?f(e.separator):void 0};case"special":return{...e,text:T(e.text)}}},"sanitizeAstNode"),x=n(()=>{c="",h="",p="",u.length=0,g.clear(),o(),r.debug("[Railroad] Database cleared")},"clear"),w=n(e=>{c=T(e),r.debug("[Railroad] Title set:",e)},"setTitle"),k=n(()=>c,"getTitle"),C={clear:x,setTitle:w,getTitle:k,addRule:n(e=>{const t={...e,name:T(e.name),definition:f(e.definition),comment:e.comment?T(e.comment):void 0};r.debug("[Railroad] Adding rule:",t.name),g.has(t.name)&&r.warn(`[Railroad] Rule '${t.name}' is already defined. Overwriting.`),u.push(t),g.set(t.name,t)},"addRule"),getRules:n(()=>u,"getRules"),getRule:n(e=>g.get(e),"getRule"),setAccTitle:n(e=>{h=T(e).replace(/^\s+/g,""),r.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),getAccTitle:n(()=>h,"getAccTitle"),setAccDescription:n(e=>{p=T(e).replace(/\n\s+/g,"\n"),r.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),getAccDescription:n(()=>p,"getAccDescription"),setDiagramTitle:w,getDiagramTitle:k},F={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},S=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,$=/^[\w "',.-]+$/,y=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),b=n(e=>!!e&&Object.keys(e).every(e=>"railroad"===e||y.has(e)),"isRailroadStyleOptions"),R=n(e=>e?"railroad"in e&&e.railroad?e.railroad:b(e)?e:{}:{},"extractRailroadOverrides"),v=n(e=>{if(!e||b(e))return{};const{railroad:t,svgId:n,theme:r,look:i,...a}=e;return a},"extractThemeOverrides"),z=n((e,t)=>{if("string"!=typeof e)return t;const n=e.trim();return S.test(n)?n:t},"sanitizeColorValue"),N=n((e,t)=>{if("string"!=typeof e)return t;const n=e.trim();return $.test(n)?n:t},"sanitizeFontFamilyValue"),M=n((e,t)=>{const n="number"==typeof e?e:"string"==typeof e?Number.parseFloat(e):Number.NaN;return Number.isFinite(n)&&n>=0?n:t},"sanitizeNumberValue"),A=n(e=>{const t="number"==typeof e?e:"string"==typeof e?Number.parseFloat(e):Number.NaN;return Number.isFinite(t)&&t>0?t:void 0},"parseThemeFontSize"),B=n(e=>{const t=N(e.fontFamily,F.fontFamily),n=A(e.fontSize)??F.fontSize;return{...F,fontFamily:t,fontSize:n,terminalFill:z(e.secondBkg??e.secondaryColor,F.terminalFill),terminalStroke:z(e.secondaryBorderColor??e.lineColor,F.terminalStroke),terminalTextColor:z(e.secondaryTextColor??e.textColor,F.terminalTextColor),nonTerminalFill:z(e.mainBkg??e.background,F.nonTerminalFill),nonTerminalStroke:z(e.primaryBorderColor??e.lineColor,F.nonTerminalStroke),nonTerminalTextColor:z(e.primaryTextColor??e.textColor,F.nonTerminalTextColor),lineColor:z(e.lineColor,F.lineColor),markerFill:z(e.lineColor,F.markerFill),commentFill:z(e.labelBackground??e.tertiaryColor,F.commentFill),commentStroke:z(e.tertiaryBorderColor??e.lineColor,F.commentStroke),commentTextColor:z(e.tertiaryTextColor??e.textColor,F.commentTextColor),specialFill:z(e.tertiaryColor??e.secondaryColor,F.specialFill),specialStroke:z(e.tertiaryBorderColor??e.secondaryBorderColor,F.specialStroke),ruleNameColor:z(e.titleColor??e.textColor,F.ruleNameColor)}},"buildThemeDefaults"),E=n(e=>{const t=a(),n={...l(),...t.themeVariables??{},...v(e)},r=B(n),i={...t.railroad??{},...R(e)};return{compactMode:i.compactMode??r.compactMode,padding:M(i.padding,r.padding),verticalSeparation:M(i.verticalSeparation,r.verticalSeparation),horizontalSeparation:M(i.horizontalSeparation,r.horizontalSeparation),arcRadius:M(i.arcRadius,r.arcRadius),fontSize:M(i.fontSize,r.fontSize),fontFamily:N(i.fontFamily,r.fontFamily),terminalFill:z(i.terminalFill,r.terminalFill),terminalStroke:z(i.terminalStroke,r.terminalStroke),terminalTextColor:z(i.terminalTextColor,r.terminalTextColor),nonTerminalFill:z(i.nonTerminalFill,r.nonTerminalFill),nonTerminalStroke:z(i.nonTerminalStroke,r.nonTerminalStroke),nonTerminalTextColor:z(i.nonTerminalTextColor,r.nonTerminalTextColor),lineColor:z(i.lineColor,r.lineColor),strokeWidth:M(i.strokeWidth,r.strokeWidth),markerFill:z(i.markerFill,r.markerFill),commentFill:z(i.commentFill,r.commentFill),commentStroke:z(i.commentStroke,r.commentStroke),commentTextColor:z(i.commentTextColor,r.commentTextColor),specialFill:z(i.specialFill,r.specialFill),specialStroke:z(i.specialStroke,r.specialStroke),ruleNameColor:z(i.ruleNameColor,r.ruleNameColor),showMarkers:i.showMarkers??r.showMarkers,markerRadius:M(i.markerRadius,r.markerRadius)}},"buildRailroadStyleOptions"),D=n(e=>{const{fontFamily:t,fontSize:n,terminalFill:r,terminalStroke:i,terminalTextColor:a,nonTerminalFill:o,nonTerminalStroke:l,nonTerminalTextColor:s,lineColor:d,strokeWidth:m,markerFill:c,commentFill:h,commentStroke:p,commentTextColor:u,specialFill:g,specialStroke:T,ruleNameColor:f}=E(e);return`\n .railroad-diagram {\n font-family: ${t};\n font-size: ${n}px;\n }\n\n .railroad-terminal rect {\n fill: ${r};\n stroke: ${i};\n stroke-width: ${m}px;\n }\n\n .railroad-terminal text {\n fill: ${a};\n font-family: ${t};\n font-size: ${n}px;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n .railroad-nonterminal rect {\n fill: ${o};\n stroke: ${l};\n stroke-width: ${m}px;\n }\n\n .railroad-nonterminal text {\n fill: ${s};\n font-family: ${t};\n font-size: ${n}px;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n .railroad-line {\n stroke: ${d};\n stroke-width: ${m}px;\n fill: none;\n }\n\n .railroad-start circle,\n .railroad-end circle {\n fill: ${c};\n }\n\n .railroad-comment ellipse {\n fill: ${h};\n stroke: ${p};\n stroke-width: ${m}px;\n }\n\n .railroad-comment text {\n fill: ${u};\n font-style: italic;\n font-family: ${t};\n font-size: ${n}px;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n .railroad-special rect {\n fill: ${g};\n stroke: ${T};\n stroke-width: ${m}px;\n stroke-dasharray: 5,3;\n }\n\n .railroad-special text {\n fill: ${s};\n font-family: ${t};\n font-size: ${n}px;\n text-anchor: middle;\n dominant-baseline: middle;\n }\n\n .railroad-rule-name {\n font-weight: bold;\n fill: ${f};\n font-family: ${t};\n font-size: ${n}px;\n }\n\n .railroad-group {\n /* Grouping container, no specific styles */\n }\n`},"getStyles"),O=(n(e=class{constructor(){this.d=""}moveTo(e,t){return this.d+=`M ${e} ${t} `,this}lineTo(e,t){return this.d+=`L ${e} ${t} `,this}horizontalTo(e){return this.d+=`H ${e} `,this}verticalTo(e){return this.d+=`V ${e} `,this}arcTo(e,t,n,r,i,a,o){return this.d+=`A ${e} ${t} ${n} ${r?1:0} ${i?1:0} ${a} ${o} `,this}build(){return this.d.trim()}},"PathBuilder"),e),W=(n(t=class{constructor(e,t=E()){this.textCache=new Map,this.svg=e,this.config=t}measureText(e){if(this.textCache.has(e))return this.textCache.get(e);const t=this.svg.append("text").attr("font-family",this.config.fontFamily).attr("font-size",this.config.fontSize).text(e),n=t.node().getBBox(),r={width:n.width,height:n.height};return t.remove(),this.textCache.set(e,r),r}renderTerminal(e,t){const n=this.measureText(t),r=n.width+2*this.config.padding,i=n.height+2*this.config.padding,a=e.append("g").attr("class","railroad-terminal");return a.append("rect").attr("x",0).attr("y",0).attr("width",r).attr("height",i).attr("rx",10).attr("ry",10),a.append("text").attr("x",r/2).attr("y",i/2).text(t),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderNonTerminal(e,t){const n=this.measureText(t),r=n.width+2*this.config.padding,i=n.height+2*this.config.padding,a=e.append("g").attr("class","railroad-nonterminal");return a.append("rect").attr("x",0).attr("y",0).attr("width",r).attr("height",i),a.append("text").attr("x",r/2).attr("y",i/2).text(t),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderSequence(e,t){const n=t.map(t=>this.renderExpression(e,t));let r=0,i=0,a=0;for(const s of n)r+=s.dimensions.width,i=Math.max(i,s.dimensions.up),a=Math.max(a,s.dimensions.down);r+=(n.length-1)*this.config.horizontalSeparation;const o=e.append("g").attr("class","railroad-sequence");let l=0;for(let s=0;s<n.length;s++){const e=n[s],t=i-e.dimensions.up;if(o.node().appendChild(e.element).setAttribute("transform",`translate(${l}, ${t})`),s<n.length-1){const t=l+e.dimensions.width,n=t+this.config.horizontalSeparation,r=i;o.append("path").attr("class","railroad-line").attr("d",(new O).moveTo(t,r).lineTo(n,r).build())}l+=e.dimensions.width+this.config.horizontalSeparation}return{element:o.node(),dimensions:{width:r,height:i+a,up:i,down:a}}}renderChoice(e,t){const n=t.map(t=>this.renderExpression(e,t));let r=0,i=0;for(const m of n)r=Math.max(r,m.dimensions.width),i+=m.dimensions.height;i+=(n.length-1)*this.config.verticalSeparation;const a=this.config.arcRadius,o=r+4*a,l=e.append("g").attr("class","railroad-choice");let s=0;const d=i/2;for(const m of n){const e=s,t=e+m.dimensions.up,n=2*a+(r-m.dimensions.width)/2;l.node().appendChild(m.element).setAttribute("transform",`translate(${n}, ${e})`);const i=new O,c=t>d;t===d?i.moveTo(0,d).lineTo(n,t):i.moveTo(0,d).arcTo(a,a,0,!1,c,a,d+(c?a:-a)).lineTo(a,t-(c?a:-a)).arcTo(a,a,0,!1,!c,2*a,t).lineTo(n,t),l.append("path").attr("class","railroad-line").attr("d",i.build());const h=new O,p=n+m.dimensions.width,u=o-2*a;t===d?h.moveTo(p,t).lineTo(o,d):h.moveTo(p,t).lineTo(u,t).arcTo(a,a,0,!1,!c,o-a,t+(c?-a:a)).lineTo(o-a,d+(c?a:-a)).arcTo(a,a,0,!1,c,o,d),l.append("path").attr("class","railroad-line").attr("d",h.build()),s+=m.dimensions.height+this.config.verticalSeparation}return{element:l.node(),dimensions:{width:o,height:i,up:d,down:i-d}}}renderOptional(e,t){const n=this.renderExpression(e,t),r=this.config.arcRadius,i=2*r,a=n.dimensions.width+4*r,o=n.dimensions.height+i,l=e.append("g").attr("class","railroad-optional"),s=2*r,d=i;l.node().appendChild(n.element).setAttribute("transform",`translate(${s}, ${d})`);const m=d+n.dimensions.up,c=(new O).moveTo(0,m).lineTo(2*r,m);l.append("path").attr("class","railroad-line").attr("d",c.build());const h=(new O).moveTo(s+n.dimensions.width,m).lineTo(a,m);l.append("path").attr("class","railroad-line").attr("d",h.build());const p=(new O).moveTo(0,m).arcTo(r,r,0,!1,!1,r,m-r).lineTo(r,r).arcTo(r,r,0,!1,!0,2*r,0).lineTo(a-2*r,0).arcTo(r,r,0,!1,!0,a-r,r).lineTo(a-r,m-r).arcTo(r,r,0,!1,!1,a,m);return l.append("path").attr("class","railroad-line").attr("d",p.build()),{element:l.node(),dimensions:{width:a,height:o,up:m,down:o-m}}}renderRepetition(e,t,n){const r=this.renderExpression(e,t),i=this.config.arcRadius,a=2*i,o=r.dimensions.width+4*i,l=0===n,s=r.dimensions.height+a+(l?a:0),d=e.append("g").attr("class","railroad-repetition"),m=2*i,c=l?a:0;d.node().appendChild(r.element).setAttribute("transform",`translate(${m}, ${c})`);const h=c+r.dimensions.up;d.append("path").attr("class","railroad-line").attr("d",(new O).moveTo(0,h).lineTo(2*i,h).build()),d.append("path").attr("class","railroad-line").attr("d",(new O).moveTo(m+r.dimensions.width,h).lineTo(o,h).build());const p=c+r.dimensions.height+i,u=(new O).moveTo(m+r.dimensions.width,h).arcTo(i,i,0,!1,!0,m+r.dimensions.width+i,h+i).lineTo(m+r.dimensions.width+i,p).arcTo(i,i,0,!1,!0,m+r.dimensions.width,p+i).lineTo(2*i,p+i).arcTo(i,i,0,!1,!0,i,p).lineTo(i,h+i).arcTo(i,i,0,!1,!0,2*i,h);if(d.append("path").attr("class","railroad-line").attr("d",u.build()),l){const e=(new O).moveTo(0,h).arcTo(i,i,0,!1,!1,i,h-i).lineTo(i,i).arcTo(i,i,0,!1,!0,2*i,0).lineTo(o-2*i,0).arcTo(i,i,0,!1,!0,o-i,i).lineTo(o-i,h-i).arcTo(i,i,0,!1,!1,o,h);d.append("path").attr("class","railroad-line").attr("d",e.build())}return{element:d.node(),dimensions:{width:o,height:s,up:h,down:s-h}}}renderSpecial(e,t){const n=this.measureText("? "+t+" ?"),r=n.width+2*this.config.padding,i=n.height+2*this.config.padding,a=e.append("g").attr("class","railroad-special");return a.append("rect").attr("x",0).attr("y",0).attr("width",r).attr("height",i),a.append("text").attr("x",r/2).attr("y",i/2).text("? "+t+" ?"),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderExpression(e,t){switch(t.type){case"terminal":return this.renderTerminal(e,t.value);case"nonterminal":return this.renderNonTerminal(e,t.name);case"sequence":return this.renderSequence(e,t.elements);case"choice":return this.renderChoice(e,t.alternatives);case"optional":return this.renderOptional(e,t.element);case"repetition":return this.renderRepetition(e,t.element,t.min);case"special":return this.renderSpecial(e,t.text);default:throw new Error(`Unknown node type: ${t.type}`)}}renderRule(e,t){const n=this.svg.append("g").attr("class","railroad-rule").attr("transform",`translate(0, ${t})`),r=e.name+" =",i=this.measureText(r).width+20,a=i+20,o=n.append("g"),l=this.renderExpression(o,e.definition),s=Math.max(20,l.dimensions.up),d=s-l.dimensions.up;o.attr("transform",`translate(${a}, ${d})`);n.append("g").attr("class","railroad-rule-name-group").append("text").attr("class","railroad-rule-name").attr("x",0).attr("y",s).text(r);n.append("g").attr("class","railroad-start").append("circle").attr("cx",i).attr("cy",s).attr("r",this.config.markerRadius);return n.append("g").attr("class","railroad-end").append("circle").attr("cx",a+l.dimensions.width+10).attr("cy",s).attr("r",this.config.markerRadius),n.append("path").attr("class","railroad-line").attr("d",(new O).moveTo(i+this.config.markerRadius,s).lineTo(a,s).build()),n.append("path").attr("class","railroad-line").attr("d",(new O).moveTo(a+l.dimensions.width,s).lineTo(a+l.dimensions.width+10-this.config.markerRadius,s).build()),{height:Math.max(40,d+l.dimensions.height+2*this.config.padding),width:a+l.dimensions.width+10+this.config.markerRadius}}renderDiagram(e){let t=this.config.padding,n=0;for(const r of e){const e=this.renderRule(r,t);t+=e.height+this.config.verticalSeparation,n=Math.max(n,e.width)}return{width:n+2*this.config.padding,height:t+this.config.padding}}},"RailroadRenderer"),t),q=n((e,t,n)=>{s(e,t.height,t.width,n),e.attr("viewBox",`0 0 ${t.width} ${t.height}`)},"configureRailroadSvgSize"),V={draw:n((e,t,n)=>{r.debug("[Railroad] Rendering diagram\n"+e);try{const e=i(t);e.attr("class","railroad-diagram");const n=a().railroad,o=(null==n?void 0:n.useMaxWidth)??!0,l=C.getRules();if(r.debug(`[Railroad] Rendering ${l.length} rules`),0===l.length)return r.warn("[Railroad] No rules to render"),void q(e,{height:100,width:200},o);const s=new W(e,E()).renderDiagram(l);q(e,s,o),r.debug("[Railroad] Render complete")}catch(o){throw r.error("[Railroad] Render error:",o),o}},"draw")};export{C as d,D as g,V as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e,l as n}from"./mermaid.core-5jj-23N2.js";import{i as t,G as r}from"./graph-DaY0Al7L.js";import{b as o,m as a}from"./map-DupEyqkA.js";function i(e){var n,r={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:s(e),edges:d(e)};return t(e.graph())||(r.value=(n=e.graph(),o(n,4))),r}function s(e){return a(e.nodes(),function(n){var r=e.node(n),o=e.parent(n),a={v:n};return t(r)||(a.value=r),t(o)||(a.parent=o),a})}function d(e){return a(e.edges(),function(n){var r=e.edge(n),o={v:n.v,w:n.w};return t(n.name)||(o.name=n.name),t(r)||(o.value=r),o})}var c=new Map,l=new Map,g=new Map,u=e(()=>{l.clear(),g.clear(),c.clear()},"clear"),f=e((e,t)=>{const r=l.get(t)||[];return n.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),h=e((e,t)=>{const r=l.get(t)||[];return n.info("Descendants of ",t," is ",r),n.info("Edge is ",e),e.v!==t&&e.w!==t&&(r?r.includes(e.v)||f(e.v,t)||f(e.w,t)||r.includes(e.w):(n.debug("Tilt, ",t,",not in descendants"),!1))},"edgeInCluster"),p=e((e,t,r,o)=>{n.warn("Copying children of ",e,"root",o,"data",t.node(e),o);const a=t.children(e)||[];e!==o&&a.push(e),n.warn("Copying (nodes) clusterId",e,"nodes",a),a.forEach(a=>{if(t.children(a).length>0)p(a,t,r,o);else{const i=t.node(a);n.info("cp ",a," to ",o," with parent ",e),r.setNode(a,i),o!==t.parent(a)&&(n.warn("Setting parent",a,t.parent(a)),r.setParent(a,t.parent(a))),e!==o&&a!==e?(n.debug("Setting parent",a,e),r.setParent(a,e)):(n.info("In copy ",e,"root",o,"data",t.node(e),o),n.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==o,"node!==clusterId",a!==e));const s=t.edges(a);n.debug("Copying Edges",s),s.forEach(a=>{n.info("Edge",a);const i=t.edge(a.v,a.w,a.name);n.info("Edge data",i,o);try{if(h(a,o)){const e=l.get(o)||[],s=e.includes(a.v)||f(a.v,o)||a.v===o,d=e.includes(a.w)||f(a.w,o)||a.w===o;if(s&&d)n.info("Copying as ",a.v,a.w,i,a.name),r.setEdge(a.v,a.w,i,a.name),n.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]));else{const e=s?o:a.v,r=d?o:a.w;n.info("Rebinding cross-boundary edge as ",e,r,i,a.name),t.setEdge(e,r,i,a.name)}}else n.info("Skipping copy of edge ",a.v,"--\x3e",a.w," rootId: ",o," clusterId:",e)}catch(s){n.error(s)}})}n.debug("Removing node",a),t.removeNode(a)})},"copy"),w=e((e,n)=>{const t=n.children(e);let r=[...t];for(const o of t)g.set(o,e),r=[...r,...w(o,n)];return r},"extractDescendants"),v=e((e,n,t)=>{const r=e.edges().filter(e=>e.v===n||e.w===n),o=e.edges().filter(e=>e.v===t||e.w===t),a=r.map(e=>({v:e.v===n?t:e.v,w:e.w===n?n:e.w})),i=o.map(e=>({v:e.v,w:e.w}));return a.filter(e=>i.some(n=>e.v===n.v&&e.w===n.w))},"findCommonEdges"),m=e((e,t,r)=>{const o=t.children(e);if(n.trace("Searching children of id ",e,o),o.length<1)return e;let a;for(const n of o){const e=m(n,t,r),o=v(t,r,e);if(e){if(!(o.length>0))return e;a=e}}return a},"findNonClusterChild"),b=e(e=>c.has(e)&&c.get(e).externalConnections&&c.has(e)?c.get(e).id:e,"getAnchorId"),x=e((e,t)=>{var r;if(!e||t>10)n.debug("Opting out, no graph ");else{n.debug("Opting in, graph "),e.nodes().forEach(function(t){e.children(t).length>0&&(n.warn("Cluster identified",t," Replacement id in edges: ",m(t,e,t)),l.set(t,w(t,e)),c.set(t,{id:m(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){const r=e.children(t),o=e.edges();r.length>0?(n.debug("Cluster identified",t,l),o.forEach(e=>{f(e.v,t)^f(e.w,t)&&(n.warn("Edge: ",e," leaves cluster ",t),n.warn("Descendants of XXX ",t,": ",l.get(t)),c.get(t).externalConnections=!0)})):n.debug("Not a cluster ",t,l)});for(let n of c.keys()){const t=c.get(n).id,o=e.parent(t);o!==n&&c.has(o)&&!c.get(o).externalConnections&&(c.get(n).id=o);const a=e.edges().some(e=>e.v===n);if(t&&(null==(r=c.get(n))?void 0:r.externalConnections)&&a&&N(e,t,n)){const r=y(e,n,e.parent(t));r&&(c.get(n).id=r)}}e.edges().forEach(function(t){const r=e.edge(t);n.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),n.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let o=t.v,a=t.w;if(n.warn("Fix XXX",c,"ids:",t.v,t.w,"Translating: ",c.get(t.v)," --- ",c.get(t.w)),c.get(t.v)||c.get(t.w)){if(n.warn("Fixing and trying - removing XXX",t.v,t.w,t.name),o=b(t.v),a=b(t.w),e.removeEdge(t.v,t.w,t.name),o!==t.v){const n=e.parent(o);c.get(n).externalConnections=!0,r.fromCluster=t.v}if(a!==t.w){const n=e.parent(a);c.get(n).externalConnections=!0,r.toCluster=t.w}n.warn("Fix Replacing with XXX",o,a,t.name),e.setEdge(o,a,r,t.name)}}),n.warn("Adjusted Graph",i(e)),C(e,0),n.trace(c)}},"adjustClustersAndEdges"),C=e((e,t)=>{var o,a,s,d;if(n.warn("extractor - ",t,i(e),e.children("D")),t>10)return void n.error("Bailing out");let l=e.nodes(),g=!1;for(const n of l){const t=e.children(n);g=g||t.length>0}if(g){n.debug("Nodes = ",l,t);for(const g of l)if(n.debug("Extracting node",g,c,c.has(g)&&!c.get(g).externalConnections,!e.parent(g),e.node(g),e.children("D")," Depth ",t),c.has(g))if((null==(a=null==(o=c.get(g))?void 0:o.clusterData)?void 0:a.explicitDir)&&e.children(g)&&e.children(g).length>0){n.warn("Cluster with explicit dir, creating subgraph for children",g,t);const o=c.get(g).clusterData.dir,a=new r({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});p(g,e,a,g);const s=e.node(g)||{};e.setNode(g,{...s,clusterNode:!0,id:g,clusterData:c.get(g).clusterData,label:c.get(g).label,graph:a}),n.warn("Subgraph for cluster with explicit dir created:",g,i(a))}else if(!c.get(g).externalConnections&&e.children(g)&&e.children(g).length>0){n.warn("Cluster without external connections, without a parent and with children",g,t);let o="TB"===e.graph().rankdir?"LR":"TB";(null==(d=null==(s=c.get(g))?void 0:s.clusterData)?void 0:d.dir)&&(o=c.get(g).clusterData.dir,n.warn("Fixing dir",c.get(g).clusterData.dir,o));const a=new r({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});p(g,e,a,g);const l=e.node(g)||{};e.setNode(g,{...l,clusterNode:!0,id:g,clusterData:c.get(g).clusterData,label:c.get(g).label,graph:a}),n.debug("Old graph after copy",i(e))}else n.warn("Cluster ** ",g," **not meeting the criteria !externalConnections:",!c.get(g).externalConnections," no parent: ",!e.parent(g)," children ",e.children(g)&&e.children(g).length>0,e.children("D"),t),n.debug(c);else n.debug("Not a cluster",g,t);l=e.nodes(),n.warn("New list of nodes",l);for(const r of l){const o=e.node(r);n.warn(" Now next level",r,o),(null==o?void 0:o.clusterNode)&&C(o.graph,t+1)}}else n.debug("Done, no node has children",e.nodes())},"extractor"),D=e((e,n)=>{if(0===n.length)return[];let t=Object.assign([],n);return n.forEach(n=>{const r=e.children(n),o=D(e,r);t=[...t,...o]}),t},"sorter"),E=e(e=>D(e,e.children()),"sortNodesByHierarchy"),N=e((e,n,t)=>{let r=e.parent(n);for(;r&&r!==t;){const n=c.get(r);if(n&&!n.externalConnections)return!0;r=e.parent(r)}return!1},"isNodeInExtractableCluster"),y=e((e,n,t)=>{const r=e.children(n)??[];for(const o of r){if(o===t||f(o,t))continue;const r=m(o,e,n);if(r&&!N(e,r,n))return r}return null},"findSafeAnchorNode");export{x as a,c as b,u as c,m as f,E as s,i as w};
|