@agent-link/server 0.1.529 → 0.1.531
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 +1 -1
- package/web/dist/assets/{abnfDiagram-VRR7QNED-BfiP2Zk_.js → abnfDiagram-VRR7QNED-BL1HPCFt.js} +1 -1
- package/web/dist/assets/arc-ukC8Y68L.js +1 -0
- package/web/dist/assets/architectureDiagram-ZJ3FMSHR-C1HYHPYr.js +1 -0
- package/web/dist/assets/blockDiagram-677ZJIJ3-DaVx4CNT.js +1 -0
- package/web/dist/assets/{c4Diagram-LMCZKHZV-C8OUf3BR.js → c4Diagram-LMCZKHZV-siodmCca.js} +1 -1
- package/web/dist/assets/channel-_3CXs0S6.js +1 -0
- package/web/dist/assets/{chunk-2Q5K7J3B-C6jSTVLi.js → chunk-2Q5K7J3B-Bx9BT0O5.js} +1 -1
- package/web/dist/assets/{chunk-32BRIVSS-CggGBtt4.js → chunk-32BRIVSS-DMbShUtg.js} +1 -1
- package/web/dist/assets/{chunk-5VM5RSS4-D1soGNls.js → chunk-5VM5RSS4-RoKGQ68D.js} +1 -1
- package/web/dist/assets/chunk-EX3LRPZG-37ljNSR4.js +1 -0
- package/web/dist/assets/{chunk-JWPE2WC7-4UUblnAa.js → chunk-JWPE2WC7-BNdwFjNx.js} +1 -1
- package/web/dist/assets/{chunk-MOJQB5TN-wHLLmx_6.js → chunk-MOJQB5TN-D2uwiiok.js} +1 -1
- package/web/dist/assets/{chunk-RYQCIY6F-3t9VqLG3.js → chunk-RYQCIY6F-C0Es5VR8.js} +1 -1
- package/web/dist/assets/chunk-V7JOEXUC-DPeMSwZ7.js +1 -0
- package/web/dist/assets/{chunk-VR4S4FIN-D1BCGr2u.js → chunk-VR4S4FIN-DGrJyFPf.js} +1 -1
- package/web/dist/assets/{chunk-XXDRQBXY-DGKbzfgb.js → chunk-XXDRQBXY-D2pNZxaH.js} +1 -1
- package/web/dist/assets/classDiagram-OUVF2IWQ-DN82DObI.js +1 -0
- package/web/dist/assets/classDiagram-v2-EOCWNBFH-DN82DObI.js +1 -0
- package/web/dist/assets/{cose-bilkent-JH36ORCC-mSZoV4j5.js → cose-bilkent-JH36ORCC-QFCp3j_I.js} +1 -1
- package/web/dist/assets/{cssMode-BCtl_sZS.js → cssMode-BaPv0biA.js} +1 -1
- package/web/dist/assets/{cynefin-VYW2F7L2-Bs61V2_s.js → cynefin-VYW2F7L2-Crr9xzVk.js} +1 -1
- package/web/dist/assets/{cynefinDiagram-TSTJHNR4-D8sErx-i.js → cynefinDiagram-TSTJHNR4-CvQDUnR9.js} +1 -1
- package/web/dist/assets/{dagre-VKFMJZFB-DwZwRIdq.js → dagre-VKFMJZFB-DZ22tequ.js} +1 -1
- package/web/dist/assets/diagram-FQU43EPY-DpEHzFWe.js +1 -0
- package/web/dist/assets/{diagram-G47NLZAW-D34u5D4R.js → diagram-G47NLZAW-COuikZny.js} +1 -1
- package/web/dist/assets/{diagram-NH7WQ7WH-Bclu-QKX.js → diagram-NH7WQ7WH-CixVLnNt.js} +1 -1
- package/web/dist/assets/diagram-OA4YK3LP-Dm4cMFGq.js +1 -0
- package/web/dist/assets/diagram-WEI45ONY-MTEIG5JH.js +1 -0
- package/web/dist/assets/{ebnfDiagram-CCIWWBDH-BMvfX5B7.js → ebnfDiagram-CCIWWBDH-DO12bkYN.js} +1 -1
- package/web/dist/assets/{editor.main-CRQmkoke.js → editor.main-CgpQktDS.js} +3 -3
- package/web/dist/assets/{erDiagram-Q63AITRT-C5fou_R0.js → erDiagram-Q63AITRT-C75kuF8B.js} +1 -1
- package/web/dist/assets/{flowDiagram-23GEKE2U-BvyeC4B4.js → flowDiagram-23GEKE2U-Dac7EBDx.js} +1 -1
- package/web/dist/assets/{freemarker2-ClAGg0IQ.js → freemarker2-CtNdfXyy.js} +1 -1
- package/web/dist/assets/{ganttDiagram-NO4QXBWP-BhYLcfRq.js → ganttDiagram-NO4QXBWP-CFomad4n.js} +1 -1
- package/web/dist/assets/{gitGraphDiagram-IHSO6WYX-GIUQR9io.js → gitGraphDiagram-IHSO6WYX-DW41CpSa.js} +1 -1
- package/web/dist/assets/{handlebars-BrhIT-2Z.js → handlebars-DqE2xJiR.js} +1 -1
- package/web/dist/assets/{html-Blr8PCTz.js → html--Y0ZbhJn.js} +1 -1
- package/web/dist/assets/{htmlMode-Dde-sA1T.js → htmlMode-tea_pqNu.js} +1 -1
- package/web/dist/assets/{index-DVzecOLh.css → index-CayH0jwf.css} +1 -1
- package/web/dist/assets/{index-i_5HmRyk.js → index-Cqf5h9KI.js} +6 -6
- package/web/dist/assets/{infoDiagram-FWYZ7A6U-BPN79fMb.js → infoDiagram-FWYZ7A6U--twUni5c.js} +1 -1
- package/web/dist/assets/ishikawaDiagram-FXEZZL3T-C4a7qlFu.js +1 -0
- package/web/dist/assets/{javascript-BGGps4Mr.js → javascript-BZzbthCk.js} +1 -1
- package/web/dist/assets/{journeyDiagram-5HDEW3XC-DuUwJnVX.js → journeyDiagram-5HDEW3XC-BnAJJ8PW.js} +1 -1
- package/web/dist/assets/{jsonMode-BmSjf3mu.js → jsonMode-DobieDWX.js} +1 -1
- package/web/dist/assets/kanban-definition-HUTT4EX6-_b-GFMgX.js +1 -0
- package/web/dist/assets/{layout-C0UWAnD9.js → layout-CdIFZZ-x.js} +1 -1
- package/web/dist/assets/{linear-UmV7KkKH.js → linear-COeTfGIu.js} +1 -1
- package/web/dist/assets/{liquid-BN5TFFjS.js → liquid-CVWJKf9r.js} +1 -1
- package/web/dist/assets/{lspLanguageFeatures-B_SnC_5n.js → lspLanguageFeatures-ktS9VY9y.js} +1 -1
- package/web/dist/assets/{map-DupEyqkA.js → map-CKQHuyK8.js} +1 -1
- package/web/dist/assets/{mdx-B9dc9gem.js → mdx-CMKiGQq4.js} +1 -1
- package/web/dist/assets/{mermaid.core-vavDl7Vc.js → mermaid.core-BFos4t0c.js} +3 -3
- package/web/dist/assets/mindmap-definition-LN4V7U3C-CZ596N6V.js +1 -0
- package/web/dist/assets/{pegDiagram-2B236MQR-DM11fXL6.js → pegDiagram-2B236MQR-B7mC_T4T.js} +1 -1
- package/web/dist/assets/pieDiagram-ENE6RG2P-CGnO8ABw.js +1 -0
- package/web/dist/assets/{python-WH7KbzLw.js → python-CfDM8Z6H.js} +1 -1
- package/web/dist/assets/{quadrantDiagram-ABIIQ3AL-ZEnQ2SUE.js → quadrantDiagram-ABIIQ3AL--YDPrR8n.js} +1 -1
- package/web/dist/assets/{railroadDiagram-RFXS5EU6-BVojcmrd.js → railroadDiagram-RFXS5EU6-BFyEmljG.js} +1 -1
- package/web/dist/assets/{razor-CimqSBMk.js → razor-BT-jAkic.js} +1 -1
- package/web/dist/assets/{requirementDiagram-TGXJPOKE-DxQ9PFxS.js → requirementDiagram-TGXJPOKE-Bg1DqDT0.js} +1 -1
- package/web/dist/assets/sankeyDiagram-HTMAVEWB-BQFuyDvQ.js +1 -0
- package/web/dist/assets/sequenceDiagram-DBY2YBRQ-D7VzO-wj.js +1 -0
- package/web/dist/assets/{sizeCapture-X5ZJPWSS-DvQ4QG8W.js → sizeCapture-X5ZJPWSS-DeGW_7pu.js} +1 -1
- package/web/dist/assets/stateDiagram-2N3HPSRC-ahSFUBWd.js +1 -0
- package/web/dist/assets/stateDiagram-v2-6OUMAXLB-BO6bAhNk.js +1 -0
- package/web/dist/assets/swimlanes-5IMT3BWC-Brv-BvGT.js +2 -0
- package/web/dist/assets/swimlanesDiagram-G3AALYLV-DVNi-V2w.js +1 -0
- package/web/dist/assets/timeline-definition-FHXFAJF6-B1YlZETF.js +1 -0
- package/web/dist/assets/{tsMode-Dx0tcA6l.js → tsMode-aqEsVbJ9.js} +1 -1
- package/web/dist/assets/{typescript-DNWZ8y2S.js → typescript-DVcqAE2u.js} +1 -1
- package/web/dist/assets/vennDiagram-L72KCM5P-CryCGvdS.js +1 -0
- package/web/dist/assets/wardleyDiagram-EHGQE667-D6SV9zmm.js +1 -0
- package/web/dist/assets/{xml-BhCfmf0h.js → xml-B8YYWLI7.js} +1 -1
- package/web/dist/assets/xychartDiagram-FW5EYKEG-D0h0SgNX.js +1 -0
- package/web/dist/assets/{yaml-Bxpf18Ey.js → yaml-U6lrNEwn.js} +1 -1
- package/web/dist/index.html +2 -2
- package/web/dist/locales/en.json +1 -1
- package/web/dist/locales/zh.json +1 -1
- package/web/dist/assets/arc-048B3EAe.js +0 -1
- package/web/dist/assets/architectureDiagram-ZJ3FMSHR-DlOt88b5.js +0 -1
- package/web/dist/assets/blockDiagram-677ZJIJ3-Dp4rq3HL.js +0 -1
- package/web/dist/assets/channel-BPpgv-ij.js +0 -1
- package/web/dist/assets/chunk-EX3LRPZG-BGkdyKa7.js +0 -1
- package/web/dist/assets/chunk-V7JOEXUC-C9w7ddH_.js +0 -1
- package/web/dist/assets/classDiagram-OUVF2IWQ-5wWFaf41.js +0 -1
- package/web/dist/assets/classDiagram-v2-EOCWNBFH-5wWFaf41.js +0 -1
- package/web/dist/assets/diagram-FQU43EPY-BrBA0t46.js +0 -1
- package/web/dist/assets/diagram-OA4YK3LP-cxAUzrj7.js +0 -1
- package/web/dist/assets/diagram-WEI45ONY-DDoEUds_.js +0 -1
- package/web/dist/assets/ishikawaDiagram-FXEZZL3T-vYLEkyGy.js +0 -1
- package/web/dist/assets/kanban-definition-HUTT4EX6-VT776tJC.js +0 -1
- package/web/dist/assets/mindmap-definition-LN4V7U3C-DPO3dXQI.js +0 -1
- package/web/dist/assets/pieDiagram-ENE6RG2P-qizLyMyZ.js +0 -1
- package/web/dist/assets/sankeyDiagram-HTMAVEWB-C4RIECvO.js +0 -1
- package/web/dist/assets/sequenceDiagram-DBY2YBRQ-_3sOpSqP.js +0 -1
- package/web/dist/assets/stateDiagram-2N3HPSRC-BuGYx19B.js +0 -1
- package/web/dist/assets/stateDiagram-v2-6OUMAXLB-oKII58Qy.js +0 -1
- package/web/dist/assets/swimlanes-5IMT3BWC-YI2ijFsA.js +0 -2
- package/web/dist/assets/swimlanesDiagram-G3AALYLV-BGOAzM8z.js +0 -1
- package/web/dist/assets/timeline-definition-FHXFAJF6-CDEEncuw.js +0 -1
- package/web/dist/assets/vennDiagram-L72KCM5P-BO3KJlti.js +0 -1
- package/web/dist/assets/wardleyDiagram-EHGQE667-C8f1_s1-.js +0 -1
- package/web/dist/assets/xychartDiagram-FW5EYKEG-DV9mcR-c.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t;import{g as e}from"./chunk-XXDRQBXY-DGKbzfgb.js";import{s}from"./chunk-VR4S4FIN-D1BCGr2u.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-vavDl7Vc.js";import{f as S}from"./chunk-32BRIVSS-CggGBtt4.js";import{p as k}from"./index-i_5HmRyk.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};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t,e;import{g as s}from"./chunk-5VM5RSS4-D1soGNls.js";import{g as i}from"./chunk-XXDRQBXY-DGKbzfgb.js";import{s as n}from"./chunk-VR4S4FIN-D1BCGr2u.js";import{_ as a,l as r,c as u,u as l,v as o,x as c,d as h,b as p,a as d,s as A,g as y,n as m,o as g,k as C,p as b,q as k,i as E,N as f}from"./mermaid.core-vavDl7Vc.js";import{f as T}from"./chunk-32BRIVSS-CggGBtt4.js";import{p as F}from"./index-i_5HmRyk.js";var D=function(){var t=a(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,18],s=[1,19],i=[1,20],n=[1,41],r=[1,26],u=[1,42],l=[1,24],o=[1,25],c=[1,32],h=[1,33],p=[1,34],d=[1,45],A=[1,35],y=[1,36],m=[1,37],g=[1,38],C=[1,27],b=[1,28],k=[1,29],E=[1,30],f=[1,31],T=[1,44],F=[1,46],D=[1,43],B=[1,47],_=[1,9],S=[1,8,9],N=[1,58],$=[1,59],L=[1,60],x=[1,61],I=[1,62],v=[1,63],O=[1,64],w=[1,8,9,41],R=[1,77],P=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],M=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],G=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],z=[13,60,68,69,70,71,72,86,100,102,103],Y=[1,103],j=[1,121],K=[1,117],W=[1,113],Q=[1,119],X=[1,114],q=[1,115],H=[1,116],V=[1,118],J=[1,120],Z=[22,50,60,61,82,86,87,88,89,90],tt=[1,128],et=[12,39],st=[1,8,9,39,41,44,46],it=[1,8,9,22],nt=[1,153],at=[1,8,9,61],rt=[1,8,9,22,50,60,61,82,86,87,88,89,90],ut={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:a(function(t,e,s,i,n,a,r){var u=a.length-1;switch(n){case 8:this.$=a[u-1];break;case 9:case 10:case 13:case 15:case 46:this.$=a[u];break;case 11:case 14:this.$=a[u-2]+"."+a[u];break;case 12:case 16:case 110:this.$=a[u-1]+a[u];break;case 17:case 18:this.$=a[u-1]+"~"+a[u]+"~";break;case 19:i.addRelation(a[u]);break;case 20:a[u-1].title=i.cleanupLabel(a[u]),i.addRelation(a[u-1]);break;case 31:this.$=a[u].trim(),i.setAccTitle(this.$);break;case 32:case 33:this.$=a[u].trim(),i.setAccDescription(this.$);break;case 34:i.addClassesToNamespace(a[u-3],a[u-1][0],a[u-1][1]),i.popNamespace();break;case 35:i.addClassesToNamespace(a[u-4],a[u-1][0],a[u-1][1]),i.popNamespace();break;case 36:this.$=i.addNamespace(a[u]);break;case 37:this.$=i.addNamespace(a[u-1],a[u]);break;case 38:this.$=[[a[u]],[]];break;case 39:this.$=[[a[u-1]],[]];break;case 40:a[u][0].unshift(a[u-2]),this.$=a[u];break;case 41:this.$=[[],[a[u]]];break;case 42:this.$=[[],[a[u-1]]];break;case 43:a[u][1].unshift(a[u-2]),this.$=a[u];break;case 44:case 45:this.$=[[],[]];break;case 48:i.setCssClass(a[u-2],a[u]);break;case 49:i.addMembers(a[u-3],a[u-1]);break;case 51:i.setCssClass(a[u-5],a[u-3]),i.addMembers(a[u-5],a[u-1]);break;case 52:i.addAnnotation(a[u-3],a[u-1]);break;case 53:i.addAnnotation(a[u-6],a[u-4]),i.addMembers(a[u-6],a[u-1]);break;case 54:i.addAnnotation(a[u-5],a[u-3]);break;case 55:this.$=a[u],i.addClass(a[u]);break;case 56:this.$=a[u-1],i.addClass(a[u-1]),i.setClassLabel(a[u-1],a[u]);break;case 60:i.addAnnotation(a[u],a[u-2]);break;case 61:case 74:case 107:this.$=[a[u]];break;case 62:a[u].push(a[u-1]),this.$=a[u];break;case 63:case 65:case 66:break;case 64:i.addMember(a[u-1],i.cleanupLabel(a[u]));break;case 67:this.$={id1:a[u-2],id2:a[u],relation:a[u-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:a[u-3],id2:a[u],relation:a[u-1],relationTitle1:a[u-2],relationTitle2:"none"};break;case 69:this.$={id1:a[u-3],id2:a[u],relation:a[u-2],relationTitle1:"none",relationTitle2:a[u-1]};break;case 70:this.$={id1:a[u-4],id2:a[u],relation:a[u-2],relationTitle1:a[u-3],relationTitle2:a[u-1]};break;case 71:this.$=i.addNote(a[u],a[u-1]);break;case 72:this.$=i.addNote(a[u]);break;case 73:this.$=a[u-2],i.defineClass(a[u-1],a[u]);break;case 75:this.$=a[u-2].concat([a[u]]);break;case 76:i.setDirection("TB");break;case 77:i.setDirection("BT");break;case 78:i.setDirection("RL");break;case 79:i.setDirection("LR");break;case 80:this.$={type1:a[u-2],type2:a[u],lineType:a[u-1]};break;case 81:this.$={type1:"none",type2:a[u],lineType:a[u-1]};break;case 82:this.$={type1:a[u-1],type2:"none",lineType:a[u]};break;case 83:this.$={type1:"none",type2:"none",lineType:a[u]};break;case 84:this.$=i.relationType.AGGREGATION;break;case 85:this.$=i.relationType.EXTENSION;break;case 86:this.$=i.relationType.COMPOSITION;break;case 87:this.$=i.relationType.DEPENDENCY;break;case 88:this.$=i.relationType.LOLLIPOP;break;case 89:this.$=i.lineType.LINE;break;case 90:this.$=i.lineType.DOTTED_LINE;break;case 91:case 97:this.$=a[u-2],i.setClickEvent(a[u-1],a[u]);break;case 92:case 98:this.$=a[u-3],i.setClickEvent(a[u-2],a[u-1]),i.setTooltip(a[u-2],a[u]);break;case 93:this.$=a[u-2],i.setLink(a[u-1],a[u]);break;case 94:this.$=a[u-3],i.setLink(a[u-2],a[u-1],a[u]);break;case 95:this.$=a[u-3],i.setLink(a[u-2],a[u-1]),i.setTooltip(a[u-2],a[u]);break;case 96:this.$=a[u-4],i.setLink(a[u-3],a[u-2],a[u]),i.setTooltip(a[u-3],a[u-1]);break;case 99:this.$=a[u-3],i.setClickEvent(a[u-2],a[u-1],a[u]);break;case 100:this.$=a[u-4],i.setClickEvent(a[u-3],a[u-2],a[u-1]),i.setTooltip(a[u-3],a[u]);break;case 101:this.$=a[u-3],i.setLink(a[u-2],a[u]);break;case 102:this.$=a[u-4],i.setLink(a[u-3],a[u-1],a[u]);break;case 103:this.$=a[u-4],i.setLink(a[u-3],a[u-1]),i.setTooltip(a[u-3],a[u]);break;case 104:this.$=a[u-5],i.setLink(a[u-4],a[u-2],a[u]),i.setTooltip(a[u-4],a[u-1]);break;case 105:this.$=a[u-2],i.setCssStyle(a[u-1],a[u]);break;case 106:i.setCssClass(a[u-1],a[u]);break;case 108:a[u-2].push(a[u]),this.$=a[u-2]}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:s,37:i,38:22,42:n,43:23,46:r,48:u,51:l,52:o,54:c,56:h,57:p,60:d,62:A,63:y,64:m,65:g,75:C,76:b,78:k,82:E,83:f,86:T,100:F,102:D,103:B},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(_,[2,5],{8:[1,48]}),{8:[1,49]},t(S,[2,19],{22:[1,50]}),t(S,[2,21]),t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),t(S,[2,26]),t(S,[2,27]),t(S,[2,28]),t(S,[2,29]),t(S,[2,30]),{34:[1,51]},{36:[1,52]},t(S,[2,33]),t(S,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:N,69:$,70:L,71:x,72:I,73:v,74:O}),{39:[1,65]},t(w,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(S,[2,65]),t(S,[2,66]),{16:69,60:d,86:T,100:F,102:D},{16:39,17:40,19:70,60:d,86:T,100:F,102:D,103:B},{16:39,17:40,19:71,60:d,86:T,100:F,102:D,103:B},{16:39,17:40,19:72,60:d,86:T,100:F,102:D,103:B},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:d,86:T,100:F,102:D,103:B},{13:R,55:76},{58:78,60:[1,79]},t(S,[2,76]),t(S,[2,77]),t(S,[2,78]),t(S,[2,79]),t(P,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:d,86:T,100:F,102:D,103:B}),t(P,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:d,86:T,100:F,102:D,103:B},{16:39,17:40,19:87,60:d,86:T,100:F,102:D,103:B},t(M,[2,133]),t(M,[2,134]),t(M,[2,135]),t(M,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(_,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:e,35:s,37:i,42:n,46:r,48:u,51:l,52:o,54:c,56:h,57:p,60:d,62:A,63:y,64:m,65:g,75:C,76:b,78:k,82:E,83:f,86:T,100:F,102:D,103:B}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:s,37:i,38:22,42:n,43:23,46:r,48:u,51:l,52:o,54:c,56:h,57:p,60:d,62:A,63:y,64:m,65:g,75:C,76:b,78:k,82:E,83:f,86:T,100:F,102:D,103:B},t(S,[2,20]),t(S,[2,31]),t(S,[2,32]),{13:[1,91],16:39,17:40,19:90,60:d,86:T,100:F,102:D,103:B},{53:92,66:56,67:57,68:N,69:$,70:L,71:x,72:I,73:v,74:O},t(S,[2,64]),{67:93,73:v,74:O},t(G,[2,83],{66:94,68:N,69:$,70:L,71:x,72:I}),t(U,[2,84]),t(U,[2,85]),t(U,[2,86]),t(U,[2,87]),t(U,[2,88]),t(z,[2,89]),t(z,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:n,43:23,48:u,54:c,56:h},{16:100,60:d,86:T,100:F,102:D},{41:[1,102],45:101,51:Y},{16:104,60:d,86:T,100:F,102:D},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:j,50:K,59:110,60:W,82:Q,84:111,85:112,86:X,87:q,88:H,89:V,90:J},{60:[1,122]},{13:R,55:123},t(w,[2,72]),t(w,[2,138]),{22:j,50:K,59:124,60:W,61:[1,125],82:Q,84:111,85:112,86:X,87:q,88:H,89:V,90:J},t(Z,[2,74]),{16:39,17:40,19:126,60:d,86:T,100:F,102:D,103:B},t(P,[2,16]),t(P,[2,17]),t(P,[2,18]),{11:127,12:tt,39:[2,36]},t(et,[2,9],{16:85,17:86,15:130,18:[1,129],60:d,86:T,100:F,102:D,103:B}),t(et,[2,10]),t(st,[2,55],{11:131,12:tt}),t(_,[2,7]),{9:[1,132]},t(it,[2,67]),{16:39,17:40,19:133,60:d,86:T,100:F,102:D,103:B},{13:[1,135],16:39,17:40,19:134,60:d,86:T,100:F,102:D,103:B},t(G,[2,82],{66:136,68:N,69:$,70:L,71:x,72:I}),t(G,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:n,43:23,48:u,54:c,56:h},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(w,[2,48],{39:[1,142]}),{41:[1,143]},t(w,[2,50]),{41:[2,61],45:144,51:Y},{47:[1,145]},{16:39,17:40,19:146,60:d,86:T,100:F,102:D,103:B},t(S,[2,91],{13:[1,147]}),t(S,[2,93],{13:[1,149],77:[1,148]}),t(S,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(S,[2,105],{61:nt}),t(at,[2,107],{85:154,22:j,50:K,60:W,82:Q,86:X,87:q,88:H,89:V,90:J}),t(rt,[2,109]),t(rt,[2,111]),t(rt,[2,112]),t(rt,[2,113]),t(rt,[2,114]),t(rt,[2,115]),t(rt,[2,116]),t(rt,[2,117]),t(rt,[2,118]),t(rt,[2,119]),t(S,[2,106]),t(w,[2,71]),t(S,[2,73],{61:nt}),{60:[1,155]},t(P,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:d,86:T,100:F,102:D,103:B},t(et,[2,12]),t(st,[2,56]),{1:[2,4]},t(it,[2,69]),t(it,[2,68]),{16:39,17:40,19:158,60:d,86:T,100:F,102:D,103:B},t(G,[2,80]),t(w,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:n,43:23,48:u,54:c,56:h},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:n,43:23,48:u,54:c,56:h},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:n,43:23,48:u,54:c,56:h},{45:163,51:Y},t(w,[2,49]),{41:[2,62]},t(w,[2,52],{39:[1,164]}),t(S,[2,60]),t(S,[2,92]),t(S,[2,94]),t(S,[2,95],{77:[1,165]}),t(S,[2,98]),t(S,[2,99],{13:[1,166]}),t(S,[2,101],{13:[1,168],77:[1,167]}),{22:j,50:K,60:W,82:Q,84:169,85:112,86:X,87:q,88:H,89:V,90:J},t(rt,[2,110]),t(Z,[2,75]),{14:[1,170]},t(et,[2,11]),t(it,[2,70]),t(w,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:Y},t(S,[2,96]),t(S,[2,100]),t(S,[2,102]),t(S,[2,103],{77:[1,174]}),t(at,[2,108],{85:154,22:j,50:K,60:W,82:Q,86:X,87:q,88:H,89:V,90:J}),t(st,[2,8]),t(w,[2,51]),{41:[1,175]},t(w,[2,54]),t(S,[2,104]),t(w,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:a(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:a(function(t){var e=this,s=[0],i=[],n=[null],r=[],u=this.table,l="",o=0,c=0,h=r.slice.call(arguments,1),p=Object.create(this.lexer),d={yy:{}};for(var A in this.yy)Object.prototype.hasOwnProperty.call(this.yy,A)&&(d.yy[A]=this.yy[A]);p.setInput(t,d.yy),d.yy.lexer=p,d.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var y=p.yylloc;r.push(y);var m=p.options&&p.options.ranges;function g(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,a(function(t){s.length=s.length-2*t,n.length=n.length-t,r.length=r.length-t},"popStack"),a(g,"lex");for(var C,b,k,E,f,T,F,D,B={};;){if(b=s[s.length-1],this.defaultActions[b]?k=this.defaultActions[b]:(null==C&&(C=g()),k=u[b]&&u[b][C]),void 0===k||!k.length||!k[0]){var _="";for(f in D=[],u[b])this.terminals_[f]&&f>2&&D.push("'"+this.terminals_[f]+"'");_=p.showPosition?"Parse error on line "+(o+1)+":\n"+p.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[C]||C)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==C?"end of input":"'"+(this.terminals_[C]||C)+"'"),this.parseError(_,{text:p.match,token:this.terminals_[C]||C,line:p.yylineno,loc:y,expected:D})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+C);switch(k[0]){case 1:s.push(C),n.push(p.yytext),r.push(p.yylloc),s.push(k[1]),C=null,c=p.yyleng,l=p.yytext,o=p.yylineno,y=p.yylloc;break;case 2:if(T=this.productions_[k[1]][1],B.$=n[n.length-T],B._$={first_line:r[r.length-(T||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(T||1)].first_column,last_column:r[r.length-1].last_column},m&&(B._$.range=[r[r.length-(T||1)].range[0],r[r.length-1].range[1]]),void 0!==(E=this.performAction.apply(B,[l,c,o,d.yy,k[1],n,r].concat(h))))return E;T&&(s=s.slice(0,-1*T*2),n=n.slice(0,-1*T),r=r.slice(0,-1*T)),s.push(this.productions_[k[1]][0]),n.push(B.$),r.push(B._$),F=u[s[s.length-2]][s[s.length-1]],s.push(F);break;case 3:return!0}}return!0},"parse")},lt=function(){return{EOF:1,parseError:a(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:a(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:a(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:a(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:a(function(){return this._more=!0,this},"more"),reject:a(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:a(function(t){this.unput(this.match.slice(t))},"less"),pastInput:a(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:a(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:a(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:a(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 a in n)this[a]=n[a];return!1}return!1},"test_match"),next:a(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(),a=0;a<n.length;a++)if((s=this._input.match(this.rules[n[a]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[a])))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:a(function(){var t=this.next();return t||this.lex()},"lex"),begin:a(function(t){this.conditionStack.push(t)},"begin"),popState:a(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(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:a(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:a(function(t){this.begin(t)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:a(function(t,e,s,i){switch(s){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:case 5:case 14:case 31:case 37:case 41:case 48:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 19:case 22:case 24:case 59:case 62:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 36:return 8;case 15:case 16:return 7;case 17:case 38:case 46:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 23:return 80;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;case 30:case 40:return this.popState(),8;case 32:return this.begin("namespace-body"),39;case 33:this.popState(),this.less(0);break;case 34:case 44:return this.popState(),41;case 35:case 45:return"EOF_IN_STRUCT";case 39:return this.begin("class"),48;case 42:return this.popState(),this.popState(),41;case 43:return this.begin("class-body"),39;case 47:return"OPEN_IN_STRUCT";case 49:return"MEMBER";case 50:return 83;case 51:return 75;case 52:return 76;case 53:return 78;case 54:return 54;case 55:return 56;case 56:return 46;case 57:return 47;case 58:return 81;case 60:return"GENERICTYPE";case 61:this.begin("generic");break;case 63:return"BQUOTE_STR";case 64:this.begin("bqstring");break;case 65:case 66:case 67:case 68:return 77;case 69:case 70:return 69;case 71:case 72:return 71;case 73:return 70;case 74:return 68;case 75:return 72;case 76:return 73;case 77:return 74;case 78:return 22;case 79:return 44;case 80:return 100;case 81:return 18;case 82:return"PLUS";case 83:return 87;case 84:return 61;case 85:case 86:return 89;case 87:return 90;case 88:case 89:return"EQUALS";case 90:return 60;case 91:return 12;case 92:return 14;case 93:return"PUNCTUATION";case 94:return 86;case 95:return 102;case 96:case 97:return 50;case 98:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,29,34,35,36,37,38,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},namespace:{rules:[26,29,30,31,32,33,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},"class-body":{rules:[26,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},class:{rules:[26,40,41,42,43,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr:{rules:[9,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_title:{rules:[7,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_args:{rules:[22,23,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_name:{rules:[19,20,21,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},href:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},struct:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},generic:{rules:[26,50,51,52,53,54,55,56,57,58,59,60,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},bqstring:{rules:[26,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},string:{rules:[24,25,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98],inclusive:!0}}}}();function ot(){this.yy={}}return ut.lexer=lt,a(ot,"Parser"),ot.prototype=ut,ut.Parser=ot,new ot}();D.parser=D;var B=D,_=["#","+","~","-",""],S=(a(t=class{constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",this.text="";const s=E(t,u());this.parseMember(s)}getDisplayDetails(){let t=this.visibility+f(this.id);"method"===this.memberType&&(t+=`(${f(this.parameters.trim())})`,this.returnType&&(t+=" : "+f(this.returnType))),t=t.trim();return{displayText:t,cssStyle:this.parseClassifier()}}parseMember(t){let e="";if("method"===this.memberType){const s=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);if(s){const t=s[1]?s[1].trim():"";if(_.includes(t)&&(this.visibility=t),this.id=s[2],this.parameters=s[3]?s[3].trim():"",e=s[4]?s[4].trim():"",this.returnType=s[5]?s[5].trim():"",""===e){const t=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(t)&&(e=t,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const s=t.length,i=t.substring(0,1),n=t.substring(s-1);_.includes(i)&&(this.visibility=i),/[$*]/.exec(n)&&(e=n),this.id=t.substring(""===this.visibility?0:1,""===e?s:s-1)}this.classifier=e,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();const s=`${this.visibility?"\\"+this.visibility:""}${f(this.id)}${"method"===this.memberType?`(${f(this.parameters)})${this.returnType?" : "+f(this.returnType):""}`:""}`;this.text=s.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},"ClassMember"),t),N="classId-",$=0,L=a(t=>C.sanitizeText(t,u()),"sanitizeText"),x=(a(e=class{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=new Map,this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=a(t=>{const e=T();h(t).select("svg").selectAll("g").filter(function(){return null!==h(this).attr("title")}).on("mouseover",t=>{const s=h(t.currentTarget),i=s.attr("title");if(!i)return;const n=t.currentTarget.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(F.sanitize(i)).style("left",`${window.scrollX+n.left+n.width/2}px`).style("top",`${window.scrollY+n.bottom+4}px`),s.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0),h(t.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=p,this.getAccTitle=d,this.setAccDescription=A,this.getAccDescription=y,this.setDiagramTitle=m,this.getDiagramTitle=g,this.getConfig=a(()=>u().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.popNamespace=this.popNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}splitClassNameAndType(t){const e=C.sanitizeText(t,u());let s="",i=e;if(e.indexOf("~")>0){const t=e.split("~");i=L(t[0]),s=L(t[1])}return{className:i,type:s}}setClassLabel(t,e){const s=C.sanitizeText(t,u());e&&(e=L(e));const{className:i}=this.splitClassNameAndType(s);this.classes.get(i).label=e,this.classes.get(i).text=`${e}${this.classes.get(i).type?`<${this.classes.get(i).type}>`:""}`}addClass(t){const e=C.sanitizeText(t,u()),{className:s,type:i}=this.splitClassNameAndType(e);if(this.classes.has(s))return;const n=C.sanitizeText(s,u());this.classes.set(n,{id:n,type:i,label:n,text:`${n}${i?`<${i}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:N+n+"-"+$}),$++}addInterface(t,e){const s={id:`interface${this.interfaces.length}`,label:t,classId:e};this.interfaces.push(s)}setDiagramId(t){this.diagramId=t}lookUpDomId(t){const e=C.sanitizeText(t,u());if(this.classes.has(e)){const t=this.classes.get(e).domId;return this.diagramId?`${this.diagramId}-${t}`:t}throw new Error("Class not found: "+e)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.direction="TB",b()}getClass(t){return this.classes.get(t)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(t){const e="number"==typeof t?`note${t}`:t;return this.notes.get(e)}getNotes(){return this.notes}addRelation(t){r.debug("Adding relation: "+JSON.stringify(t));const e=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];t.relation.type1!==this.relationType.LOLLIPOP||e.includes(t.relation.type2)?t.relation.type2!==this.relationType.LOLLIPOP||e.includes(t.relation.type1)?(this.addClass(t.id1),this.addClass(t.id2)):(this.addClass(t.id1),this.addInterface(t.id2,t.id1),t.id2="interface"+(this.interfaces.length-1)):(this.addClass(t.id2),this.addInterface(t.id1,t.id2),t.id1="interface"+(this.interfaces.length-1)),t.id1=this.splitClassNameAndType(t.id1).className,t.id2=this.splitClassNameAndType(t.id2).className,t.relationTitle1=C.sanitizeText(t.relationTitle1.trim(),u()),t.relationTitle2=C.sanitizeText(t.relationTitle2.trim(),u()),this.relations.push(t)}addAnnotation(t,e){const s=this.splitClassNameAndType(t).className;this.classes.get(s).annotations.push(e)}addMember(t,e){this.addClass(t);const s=this.splitClassNameAndType(t).className,i=this.classes.get(s);if("string"==typeof e){const t=e.trim();t.startsWith("<<")&&t.endsWith(">>")?i.annotations.push(L(t.substring(2,t.length-2))):t.indexOf(")")>0?i.methods.push(new S(t,"method")):t&&i.members.push(new S(t,"attribute"))}}addMembers(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(e=>this.addMember(t,e)))}addNote(t,e){const s=this.notes.size,i={id:`note${s}`,class:e,text:t,index:s};return this.notes.set(i.id,i),i.id}cleanupLabel(t){return t.startsWith(":")&&(t=t.substring(1)),L(t.trim())}setCssClass(t,e){t.split(",").forEach(t=>{let s=t;/\d/.exec(t[0])&&(s=N+s),s=this.splitClassNameAndType(s).className;const i=this.classes.get(s);i&&(i.cssClasses+=" "+e)})}defineClass(t,e){for(const s of t){let t=this.styleClasses.get(s);void 0===t&&(t={id:s,styles:[],textStyles:[]},this.styleClasses.set(s,t)),e&&e.forEach(e=>{if(/color/.exec(e)){const s=e.replace("fill","bgFill");t.textStyles.push(s)}t.styles.push(e)}),this.classes.forEach(t=>{t.cssClasses.includes(s)&&t.styles.push(...e.flatMap(t=>t.split(",")))})}}setTooltip(t,e){t.split(",").forEach(t=>{if(void 0!==e){const s=this.splitClassNameAndType(t).className,i=this.classes.get(s);i&&(i.tooltip=L(e))}})}getTooltip(t,e){return e&&this.namespaces.has(e)?this.namespaces.get(e).classes.get(t).tooltip:this.classes.get(t).tooltip}setLink(t,e,s){const i=u();t.split(",").forEach(t=>{let n=t;/\d/.exec(t[0])&&(n=N+n),n=this.splitClassNameAndType(n).className;const a=this.classes.get(n);a&&(a.link=c.formatUrl(e,i),"sandbox"===i.securityLevel?a.linkTarget="_top":a.linkTarget="string"==typeof s?L(s):"_blank")}),this.setCssClass(t,"clickable")}setClickEvent(t,e,s){t.split(",").forEach(t=>{this.setClickFunc(t,e,s);const i=this.splitClassNameAndType(t).className,n=this.classes.get(i);n&&(n.haveCallback=!0)}),this.setCssClass(t,"clickable")}setClickFunc(t,e,s){const i=C.sanitizeText(t,u());if("loose"!==u().securityLevel)return;if(void 0===e)return;const n=this.splitClassNameAndType(i).className;if(this.classes.has(n)){let t=[];if("string"==typeof s){t=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e<t.length;e++){let s=t[e].trim();s.startsWith('"')&&s.endsWith('"')&&(s=s.substr(1,s.length-2)),t[e]=s}}0===t.length&&t.push(n),this.functions.push(()=>{const s=this.lookUpDomId(n),i=document.querySelector(`[id="${s}"]`);null!==i&&i.addEventListener("click",()=>{c.runFunc(e,...t)},!1)})}}bindFunctions(t){this.functions.forEach(e=>{e(t)})}escapeHtml(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}getDirection(){return this.direction}setDirection(t){this.direction=t}static resolveQualifiedId(t,e){const s=e.at(-1);return s?`${s}.${t}`:t}static getAncestorIds(t){const e=t.split("."),s=new Array(e.length);s[0]=e[0];for(let i=1;i<e.length;i++)s[i]=`${s[i-1]}.${e[i]}`;return s}createNamespaceNode(t,e,s,i=!1){return{id:t,label:e,classes:new Map,notes:new Map,children:new Map,domId:N+t+"-"+this.namespaceCounter++,parent:s,explicit:i}}linkParentChild(t,e){const s=this.namespaces.get(t),i=this.namespaces.get(e);s&&i&&(s.children.has(e)||s.children.set(e,i),i.parent??(i.parent=t))}addNamespace(t,s){const i=e.resolveQualifiedId(t,this.namespaceStack);if(this.namespaceStack.push(i),this.namespaces.has(i)){const t=this.namespaces.get(i);return t.explicit=!0,s&&(t.label=s),i}const n=i.split("."),a=e.getAncestorIds(i);for(let e=0;e<a.length;e++){const t=a[e],i=e>0?a[e-1]:void 0,r=e===a.length-1,u=r&&s?s:n[e];this.namespaces.has(t)?r&&(this.namespaces.get(t).explicit=!0):this.namespaces.set(t,this.createNamespaceNode(t,u,i,r)),i&&this.linkParentChild(i,t)}return i}popNamespace(){this.namespaceStack.pop()}getNamespace(t){return this.namespaces.get(t)}getNamespaces(){return this.namespaces}addClassesToNamespace(t,e,s){if(this.namespaces.has(t)){for(const s of e){const{className:e}=this.splitClassNameAndType(s),i=this.getClass(e);i.parent=t,this.namespaces.get(t).classes.set(e,i)}for(const e of s){const s=this.getNote(e);s.parent=t,this.namespaces.get(t).notes.set(e,s)}}}setCssStyle(t,e){const s=this.classes.get(t);if(e&&s)for(const i of e)i.includes(",")?s.styles.push(...i.split(",")):s.styles.push(i)}getArrowMarker(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}resolveExplicitAncestor(t){let e=t;for(;e;){const t=this.namespaces.get(e);if(!t)return;if(t.explicit)return e;e=t.parent}}getData(){var t,e;const s=[],i=[],n=u(),a=(null==(t=n.class)?void 0:t.hierarchicalNamespaces)??!0;for(const u of this.namespaces.values()){if(!a&&!u.explicit)continue;const t={id:u.id,label:a?u.label:u.id,isGroup:!0,padding:n.class.padding??16,shape:"rect",cssStyles:[],look:n.look,parentId:a?u.parent:void 0};s.push(t)}for(const u of this.classes.values()){const t=a?u.parent:this.resolveExplicitAncestor(u.parent),e={...u,type:void 0,isGroup:!1,parentId:t,look:n.look};s.push(e)}for(const u of this.notes.values()){const t=a?u.parent:this.resolveExplicitAncestor(u.parent),r={id:u.id,label:u.text,isGroup:!1,shape:"note",padding:n.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${n.themeVariables.noteBkgColor}`,`stroke: ${n.themeVariables.noteBorderColor}`],look:n.look,parentId:t,labelType:"markdown"};s.push(r);const l=null==(e=this.classes.get(u.class))?void 0:e.id;if(l){const t={id:`edgeNote${u.index}`,start:u.id,end:l,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:n.look};i.push(t)}}for(const u of this.interfaces){const t={id:u.id,label:u.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:n.look};s.push(t)}let r=0;for(const u of this.relations){r++;const t={id:k(u.id1,u.id2,{prefix:"id",counter:r}),start:u.id1,end:u.id2,type:"normal",label:u.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(u.relation.type1),arrowTypeEnd:this.getArrowMarker(u.relation.type2),startLabelRight:"none"===u.relationTitle1?"":u.relationTitle1,endLabelLeft:"none"===u.relationTitle2?"":u.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:u.style||"",pattern:1==u.relation.lineType?"dashed":"solid",look:n.look,labelType:"markdown"};i.push(t)}return{nodes:s,edges:i,other:{},config:n,direction:this.getDirection()}}},"ClassDB"),e),I=a(t=>`g.classGroup text {\n fill: ${t.nodeBorder||t.classText};\n stroke: none;\n font-family: ${t.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span {\n color: ${t.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .cluster rect {\n fill: ${t.clusterBkg};\n stroke: ${t.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span {\n color: ${t.titleColor};\n }\n\n.nodeLabel, .edgeLabel {\n color: ${t.classText};\n}\n\n.noteLabel .nodeLabel, .noteLabel .edgeLabel {\n color: ${t.noteTextColor};\n}\n.edgeLabel .label rect {\n fill: ${t.mainBkg};\n}\n.label text {\n fill: ${t.classText};\n}\n\n.labelBkg {\n background: ${t.mainBkg};\n}\n.edgeLabel .label span {\n background: ${t.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: ${t.strokeWidth};\n }\n\n\n.divider {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${t.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${t.lineColor};\n stroke-width: ${t.strokeWidth};\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n[id$="-compositionStart"], .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-compositionEnd"], .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-dependencyStart"], .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-dependencyEnd"], .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-extensionStart"], .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-extensionEnd"], .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-aggregationStart"], .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-aggregationEnd"], .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-lollipopStart"], .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-lollipopEnd"], .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n line-height: initial;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n\n.edgeLabel[data-look="neo"] {\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 ${s()}\n`,"getStyles"),v=a((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"),O={getClasses:a(function(t,e){return e.db.getClasses()},"getClasses"),draw:a(async function(t,e,s,a){r.info("REF0:"),r.info("Drawing class diagram (v3)",e);const{securityLevel:h,state:p,layout:d}=u();a.db.setDiagramId(e);const A=a.db.getData(),y=i(e,h);A.type=a.type,A.layoutAlgorithm=l(d),A.nodeSpacing=(null==p?void 0:p.nodeSpacing)||50,A.rankSpacing=(null==p?void 0:p.rankSpacing)||50,A.markers=["aggregation","extension","composition","dependency","lollipop"],A.diagramId=e,await o(A,y);c.insertTitle(y,"classDiagramTitleText",(null==p?void 0:p.titleTopMargin)??25,a.db.getDiagramTitle()),n(y,8,"classDiagram",(null==p?void 0:p.useMaxWidth)??!0)},"draw"),getDir:v};export{x as C,B as a,O as c,I as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as r,c as s,a,C as e}from"./chunk-V7JOEXUC-C9w7ddH_.js";import{_ as o}from"./mermaid.core-vavDl7Vc.js";import"./chunk-5VM5RSS4-D1soGNls.js";import"./chunk-XXDRQBXY-DGKbzfgb.js";import"./chunk-VR4S4FIN-D1BCGr2u.js";import"./chunk-32BRIVSS-CggGBtt4.js";import"./index-i_5HmRyk.js";var t={parser:a,get db(){return new e},renderer:s,styles:r,init:o(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{t as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as r,c as s,a,C as e}from"./chunk-V7JOEXUC-C9w7ddH_.js";import{_ as o}from"./mermaid.core-vavDl7Vc.js";import"./chunk-5VM5RSS4-D1soGNls.js";import"./chunk-XXDRQBXY-DGKbzfgb.js";import"./chunk-VR4S4FIN-D1BCGr2u.js";import"./chunk-32BRIVSS-CggGBtt4.js";import"./index-i_5HmRyk.js";var t={parser:a,get db(){return new e},renderer:s,styles:r,init:o(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{t as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e}from"./chunk-JWPE2WC7-4UUblnAa.js";import{o as t,n,s as a,g as i,a as r,b as o,_ as s,l,c as d,d as m,z as c,p as x,A as u,y as f,B as g,i as h,w as b,aj as p}from"./mermaid.core-vavDl7Vc.js";import{p as w,i as v}from"./cynefin-VYW2F7L2-Bs61V2_s.js";import"./index-i_5HmRyk.js";var y="position frame",P="frame positioned",M="position relation",k="relation positioned",S=s(function(e){l.debug("options str",e)},"setOptions"),B=s(function(){return{}},"getOptions"),F=s(function(){$(),x()},"clear");function $(){W={}}s($,"reset");var A=g.eventmodeling,E=s(()=>u({...A,...f().eventmodeling}),"getConfig"),W={};function R(){let e=I;const{ast:t}=W,n=H();if(!t)throw new Error("No data for EventModel");return t.frames.forEach((a,i)=>{const r=X(a,t.dataEntities,n);let o;e=re(e,{$kind:y,index:i,frame:a,textProps:r}),q(a)?(l.debug("source frame",a.sourceFrames),o=t.frames.filter(e=>a.sourceFrames.some(t=>t.$refText===e.name)),o.forEach(t=>{e=re(e,{$kind:M,index:i,frame:a,sourceFrame:t})})):e=re(e,{$kind:M,index:i,frame:a})}),e={...e,sortedSwimlanesArray:Y(e.swimlanes)},e}function O(e){W.ast=e}s(R,"getState"),s(O,"setAst");var T={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function H(){return T}s(H,"getDiagramProps");var I={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function C(e){const t=e.split(".");if(2===t.length)return t[0]}function j(e){const t=e.split(".");return 2===t.length?t[1]:e}function D(e,t){if(t&&0!==t.length)return Object.values(e).find(e=>e.namespace===t)}function N(e,t,n){return Math.max(t,...Object.keys(e).filter(e=>{const a=Number.parseInt(e);return a>t&&a<n}).map(e=>Number.parseInt(e)))+1}function U(e,t){const n=C(e.entityIdentifier),a=D(t,n);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return a?{index:a.index,label:a.namespace||T.labelUiAutomation}:n?{index:N(t,0,100),label:T.labelUiAutomationPrefix+n}:{index:0,label:T.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return a?{index:a.index,label:a.namespace||T.labelCommandReadModel}:n?{index:N(t,100,200),label:T.labelCommandReadModelPrefix+n}:{index:100,label:T.labelCommandReadModel};default:return a?{index:a.index,label:a.namespace||T.labelEvents}:n?{index:N(t,200,300),label:T.labelEventsPrefix+n}:{index:200,label:T.labelEvents}}}function V(e){const{themeVariables:t}=f();switch(e.modelEntityType){case"ui":return{fill:t.emUiFill??"white",stroke:t.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:t.emProcessorFill??"#edb3f6",stroke:t.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:t.emReadModelFill??"#d3f1a2",stroke:t.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:t.emCommandFill??"#bcd6fe",stroke:t.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:t.emEventFill??"#ffb778",stroke:t.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}function X(e,t,n){const a=f(),i=h(j(e.entityIdentifier)??"",a);let r;const o={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"};let s=`<b>${b(i,n.textMaxWidth,o)}</b>`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=h(r,a),r=b(r,n.textMaxWidth,o),r=r.replaceAll(" "," ")),e.dataReference){const i=t.find(t=>{var n;return t.name===(null==(n=e.dataReference)?void 0:n.$refText)});i&&(r=i.dataBlockValue,r=r.substring(r.indexOf("{\n")+2),r=r.substring(0,r.lastIndexOf("}")-1),r=h(r,a),r=b(r,n.textMaxWidth,o),r=r.replaceAll(" "," "),r+="<br/>")}const d=void 0!==r;d&&(s+=`<br/><br/><code style="text-align: left; display: block;max-width:${n.textMaxWidth}px">${r}</code>`);const m=p(s,{fontSize:o.fontSize,fontWeight:o.fontWeight,fontFamily:o.fontFamily}),c={content:s,width:d?m.width/3:m.width,height:m.height};return l.debug(`[${e.name}] ${e.entityIdentifier} text`,c),c}function z(e,t){const n=t,a=V(n.frame),i={width:n.textProps.width+2*T.boxTextPadding,height:n.textProps.height+2*T.boxTextPadding};return[{$kind:P,frame:n.frame,index:n.index,visual:a,dimension:i,textProps:n.textProps}]}function G(e,t,n){return void 0===t?T.contentStartX:t.index===e.index&&e.r?e.r+T.boxPadding:void 0===n?T.contentStartX:n.r-T.boxOverlap+T.boxPadding}function L(e,t){const n=[...e.map(e=>e.r),t];return Math.max(...n)}function Y(e){return Object.values(e).sort((e,t)=>e.index-t.index)}function J(e,t){const n=t,a=U(n.frame,e.swimlanes);let i;i=a.index in e.swimlanes?e.swimlanes[a.index]:{index:a.index,label:a.label,r:0,y:a.index*T.swimlaneMinHeight+T.swimlaneGap,height:T.swimlaneMinHeight,maxHeight:T.swimlaneMinHeight};const r=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,o=void 0!==e.previousSwimlaneNumber?e.swimlanes[e.previousSwimlaneNumber]:void 0,s={width:Math.max(T.boxMinWidth,Math.min(T.boxMaxWidth,n.dimension.width))+2*T.boxPadding,height:Math.max(T.boxMinHeight,Math.min(T.boxMaxHeight,n.dimension.height))+2*T.boxPadding},l=G(i,o,r),d=l+s.width+T.boxPadding,m=L(Object.values(e.swimlanes),d);i.r=l+s.width,i.maxHeight=Math.max(i.maxHeight,s.height),i.height=Math.max(T.swimlaneMinHeight,i.maxHeight)+2*T.swimlanePadding;const c={x:l,y:T.swimlanePadding+i.y,r:d,dimension:s,leftSibling:!1,swimlane:i,visual:n.visual,text:n.textProps.content,frame:n.frame,index:n.index},x={...e,boxes:[...e.boxes,c],swimlanes:{...e.swimlanes,[`${i.index}`]:i},previousSwimlaneNumber:a.index,previousFrame:n.frame,maxR:m},u=Y(x.swimlanes);u.length>0&&(u[0].y=0);for(let f=1;f<u.length;f++){const e=u[f],t=u[f-1];e.y=t.y+t.height+T.swimlaneGap}return x}function _(e,t){return 0===e&&0===t.sourceFrames.length}function q(e){return void 0!==e.sourceFrames&&null!==e.sourceFrames&&e.sourceFrames.length>0}function K(e,t){if(null!=t)return e.find(e=>e.frame.name===t.name)}function Q(e,t,n){if(!(n<0))for(let a=n;a>=0;a--){const n=e[a];if(n.swimlane.index!==t)return n}}function Z(e,t){const n=t;if(v(n.frame)||_(n.index,n.frame))return[];const a=K(e.boxes,n.frame);if(void 0===a)throw new Error(`Target box not found for frame ${n.frame.name}`);let i;if(i=n.sourceFrame?K(e.boxes,n.sourceFrame):Q(e.boxes,a.swimlane.index,n.index-1),void 0===i)return[];return[{$kind:k,frame:n.frame,index:n.index,sourceBox:i,targetBox:a}]}function ee(e,t){const n=t,a={visual:{fill:"none",stroke:"#000"},source:{x:n.sourceBox.x,y:n.sourceBox.y},target:{x:n.targetBox.x,y:n.targetBox.y},sourceBox:n.sourceBox,targetBox:n.targetBox};return{...e,relations:[...e.relations,a]}}s(C,"extractNamespace"),s(j,"extractName"),s(D,"findSwimlaneByNamespace"),s(N,"findNextAvailableIndex"),s(U,"calculateSwimlaneProps"),s(V,"calculateEntityVisualProps"),s(X,"calculateTextProps"),s(z,"decidePositionFrame"),s(G,"calculateX"),s(L,"calculateMaxRight"),s(Y,"sortedSwimlanesArray"),s(J,"evolveFramePositioned"),s(_,"isFirstFrame"),s(q,"hasSourceFrame"),s(K,"findBoxByFrame"),s(Q,"findBoxByLineIndex"),s(Z,"decidePositionRelation"),s(ee,"evolveRelationPositioned");var te={[y]:z,[M]:Z},ne={[P]:J,[k]:ee};function ae(e,t){const n=te[t.$kind];if(null==n)return[];const a=n(e,t);return l.debug("decided events",a),a}function ie(e,t){const n=t.reduce((e,t)=>{const n=ne[t.$kind];return null==n?e:n(e,t)},e);return l.debug("evolve events",{state:e,newState:n,events:t}),n}function re(e,t){return ie(e,ae(e,t))}s(ae,"decide"),s(ie,"evolve"),s(re,"dispatch");var oe={getConfig:E,setOptions:S,getOptions:B,clear:F,setAccTitle:o,getAccTitle:r,getAccDescription:i,setAccDescription:a,setDiagramTitle:n,getDiagramTitle:t,setAst:O,getDiagramProps:H,getState:R},se={parse:s(async t=>{const n=await w("eventmodeling",t);l.debug(n),oe.setAst(n),e(n,oe)},"parse")},le=d(),de=null==le?void 0:le.eventmodeling;function me(e,t){return n=>{const a=n.swimlane.y+t.swimlanePadding,i=e.append("g").attr("class","em-box");i.append("rect").attr("x",n.x).attr("y",a).attr("rx","3").attr("width",n.dimension.width).attr("height",n.dimension.height).attr("stroke",n.visual.stroke).attr("fill",n.visual.fill);i.append("foreignObject").attr("x",n.x+t.boxPadding).attr("y",a+10).attr("width",n.dimension.width-2*t.boxPadding).attr("height",n.dimension.height-2*t.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(n.text)}}function ce(e,t){return e>t}function xe(e,t,n,a){return i=>{const r=i.sourceBox.swimlane.y+t.swimlanePadding,o=i.targetBox.swimlane.y+t.swimlanePadding,s=ce(r,o),d=i.sourceBox.x+2*i.sourceBox.dimension.width/3,m=i.targetBox.x+i.targetBox.dimension.width/3;let c,x;l.debug(`rendering relation up=${s} for `,{sourceBox:i.sourceBox,targetBox:i.targetBox}),s?(c=r,x=o+i.targetBox.dimension.height):(c=r+i.sourceBox.dimension.height,x=o);const u=a.emRelationStroke??i.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",i.visual.fill).attr("stroke",u).attr("stroke-width","1").attr("marker-end",`url(#${n})`).attr("d",`M${d} ${c} L${m} ${x}`)}}function ue(e,t,n,a){return i=>{const r=e.append("g").attr("class","em-swimlane"),o=a.emSwimlaneBackgroundOdd??"rgb(250,250,250)",s=a.emSwimlaneBackgroundStroke??"rgb(240,240,240)";r.append("rect").attr("x",0).attr("y",i.y).attr("rx","3").attr("width",t+n.swimlanePadding).attr("height",i.height).attr("fill",o).attr("stroke",s),r.append("text").attr("font-weight",n.swimlaneTextFontWeight).attr("x",30).attr("y",i.y+30).text(i.label)}}s(me,"renderD3Box"),s(ce,"dirUpwards"),s(xe,"renderD3Relation"),s(ue,"renderD3Swimlane");var fe={parser:se,db:oe,renderer:{draw:s(function(e,t,n,a){if(l.debug("in eventmodeling renderer",e+"\n","id:",t,n),!de)throw new Error("EventModeling config not found");const i=a.db,{themeVariables:r,eventmodeling:o}=d(),s=m(`[id="${t}"]`),x=i.getDiagramProps(),u=i.getState(),f=`em-arrowhead-${t}`,g=r.emArrowhead??"#000000";u.sortedSwimlanesArray.forEach(ue(s,u.maxR,x,r)),u.boxes.forEach(me(s,x)),u.relations.forEach(xe(s,x,f,r));s.append("defs").append("marker").attr("id",f).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",g),c(void 0,s,(null==o?void 0:o.padding)??30,null==o?void 0:o.useMaxWidth)},"draw")},styles:s(e=>"","getStyles")};export{fe as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as e}from"./chunk-2Q5K7J3B-C6jSTVLi.js";import{p as t}from"./chunk-JWPE2WC7-4UUblnAa.js";import{n,b as i,s as o,o as r,g as s,a,_ as c,A as d,l,D as h,e as p,y as f,p as g,i as u,ah as w,B as x,ai as m}from"./mermaid.core-vavDl7Vc.js";import{p as y}from"./cynefin-VYW2F7L2-Bs61V2_s.js";import"./index-i_5HmRyk.js";var b=/[─━│┃└┗├┣]/,v=/[└┗├┣]/,k=/[─━]/,$=/^[\s│┃]+$/,B=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,V=/^\s*%%/;function C(e){return e.some(e=>b.test(e))}function I(e){for(const t of e){const e=v.exec(t);if((null==e?void 0:e.index)&&e.index>0)return e.index}return 4}function T(e,t){return e.replace(/\bline\s+(\d+)\b/gi,(e,n)=>{const i=parseInt(n,10),o=t.get(i);return o?`line ${o}`:e})}function M(e){const t=e.split("\n"),n=new Map;let i=-1;for(const[c,d]of t.entries())if("treeView-beta"===d.trim()){i=c;break}if(-1===i)return{text:e,lineMap:n};const o=[];for(let c=i+1;c<t.length;c++){const e=t[c];""===e.trim()||V.test(e)||B.test(e)||($.test(e)||o.push(e.replace(/\t/g," ")))}if(!C(o))return{text:e,lineMap:n};const r=I(o),s=[];let a=0;for(let c=0;c<=i;c++)s.push(t[c]),a++,n.set(a,c+1);for(let c=i+1;c<t.length;c++){const e=t[c],i=c+1;if(""===e.trim()){s.push(e),a++,n.set(a,i);continue}if(V.test(e)){s.push(e),a++,n.set(a,i);continue}if(B.test(e)){s.push(e),a++,n.set(a,i);continue}if($.test(e))continue;const o=e.replace(/\t/g," "),d=v.exec(o);if(void 0!==(null==d?void 0:d.index)){const e=d.index,t=Math.round(e/r)+1;let c=e+1;for(;c<o.length&&k.test(o[c]);)c++;for(;c<o.length&&" "===o[c];)c++;const l=o.slice(c).trimEnd();if(!l)throw new Error(`Line ${i}: Empty node — expected a filename or directory name after the box-drawing prefix`);const h=" ".repeat(t);s.push(h+l),a++,n.set(a,i)}else{if(/^[\s─━│┃└┗├┣]+$/.test(o))continue;if(b.test(o))s.push(e),a++,n.set(a,i);else{if(/^\s+/.test(o))throw new Error(`Line ${i}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);s.push(e),a++,n.set(a,i)}}}return{text:s.join("\n"),lineMap:n}}c(C,"isBoxDrawingFormat"),c(I,"inferSegmentWidth"),c(T,"remapErrorLines"),c(M,"preprocessBoxDrawing");var E=new e(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),A=c(()=>{E.reset(),g()},"clear"),D=c(()=>E.records.stack[0],"getRoot"),W=c(()=>E.records.cnt,"getCount"),j=x.treeView,z=c(()=>d(j,f().treeView),"getConfig"),L={clear:A,addNode:c((e,t,n,i,o,r)=>{for(;e<=E.records.stack[E.records.stack.length-1].level;)E.records.stack.pop();const s={id:E.records.cnt++,level:e,name:t,nodeType:n,icon:o,cssClass:i,description:r,children:[]};E.records.stack[E.records.stack.length-1].children.push(s),E.records.stack.push(s)},"addNode"),getRoot:D,getCount:W,getConfig:z,getAccTitle:a,getAccDescription:s,getDiagramTitle:r,setAccDescription:o,setAccTitle:i,setDiagramTitle:n},S=c(e=>{t(e,L);for(const t of e.nodes){const e="number"==typeof t.indent?t.indent:0;let n=t.name;const i=n.endsWith("/");i&&(n=n.slice(0,-1));const o=i?"directory":"file",r=t.classAnnotation||void 0,s=t.iconAnnotation,a=void 0!==s?s||"none":void 0,c=t.descAnnotation||void 0,d=c?u(c,f()):void 0;L.addNode(e,n,o,r,a,d)}},"populate"),X={parse:c(async e=>{const{text:t,lineMap:n}=M(e);try{const e=await y("treeView",t);l.debug(e),S(e)}catch(i){throw n.size>0&&i instanceof Error&&(i.message=T(i.message,n)),i}},"parse")},N={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function R(e,t){var n;const i=null==(n=null==t?void 0:t.filenameIcons)?void 0:n[e];if(i)return i;const o=e.lastIndexOf(".");if(o>0){const n=e.substring(o).toLowerCase(),i=null==t?void 0:t.extensionIcons;return(null==i?void 0:i[n])??(null==i?void 0:i[n.slice(1)])}}function Y(e,t){return e.includes(":")?e:e in N.icons||!t?`${N.prefix}:${e}`:`${t}:${e}`}function F(e,t){if("none"!==e.icon){if(e.icon)return Y(e.icon,t.defaultIconPack);if(t.showIcons){if("file"===e.nodeType){const n=R(e.name,t);if("none"===n)return;if(n)return Y(n,t.defaultIconPack)}return`${N.prefix}:${"directory"===e.nodeType?"folder":"file"}`}}}c(R,"detectIcon"),c(Y,"qualifyIcon"),c(F,"getNodeIcon"),m([{name:N.prefix,icons:N}]);var H=c((e,t)=>`tv-icon-${e}-${t.replace(/[^\w-]/g,"-")}`,"iconSymbolId"),P=c(async(e,t,n,i)=>{const o=new Set,r=c(e=>{const t=F(e,n);t&&o.add(t),e.children.forEach(r)},"collect");if(r(t),0===o.size)return;const s=await Promise.all([...o].map(async e=>({icon:e,svg:await w(e,{height:14,width:14})}))),a=e.append("defs");for(const{icon:c,svg:d}of s)a.append("g").attr("id",H(i,c)).html(d)},"injectIconDefs"),G=c((e,t,n,i,o,r)=>{var s;const a=i.append("g");let c="treeView-node-label";"directory"===n.nodeType&&(c+=" treeView-node-dir"),n.cssClass&&(c+=` ${n.cssClass}`);const d=F(n,o),l=void 0!==d;d&&a.append("use").attr("xlink:href",`#${H(r,d)}`).attr("x",e+o.paddingX).attr("y",t+o.paddingY).attr("class","treeView-node-icon");const h=a.append("text").text(n.name).attr("dominant-baseline","middle").attr("class",c),{height:p,width:f}=h.node().getBBox(),g=p+2*o.paddingY,u=e+o.paddingX+(l?18:0);h.attr("x",u),h.attr("y",t+g/2);const w=u+f,x=f+2*o.paddingX+(l?18:0);return n.BBox={x:e,y:t,width:x,height:g},(null==(s=n.cssClass)?void 0:s.split(/\s+/).includes("highlight"))&&a.insert("rect",":first-child").attr("x",e).attr("y",t+1).attr("width",0).attr("height",g-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:n,nodeGroup:a,labelRightEdge:w,centerY:t+g/2}},"positionLabel"),J=c((e,t,n,i,o,r)=>e.append("line").attr("x1",t).attr("y1",n).attr("x2",i).attr("y2",o).attr("stroke-width",r).attr("class","treeView-node-line"),"positionLine"),Z=c((e,t,n,i)=>{var o;let r=0,s=0;const a=[],d=c((e,t,n,o)=>{const c=o*(n.rowIndent+n.paddingX),d=G(c,r,t,e,n,i);a.push(d);const{height:l,width:h}=t.BBox;J(e,c-n.rowIndent,r+l/2,c,r+l/2,n.lineThickness),s=Math.max(s,c+h),r+=l},"drawNode"),l=c((t,i=0)=>{d(e,t,n,i),t.children.forEach(e=>{l(e,i+1)});const{x:o,y:r,height:s}=t.BBox;if(t.children.length){const{y:i,height:a}=t.children[t.children.length-1].BBox;J(e,o+n.paddingX,r+s,o+n.paddingX,i+a/2+n.lineThickness/2,n.lineThickness)}},"processNode");l(t);const h=a.filter(e=>e.node.description);if(h.length>0){const e=Math.max(...a.map(e=>e.labelRightEdge))+16;for(const t of h){const i=t.nodeGroup.append("text").text(t.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",e).attr("y",t.centerY).node().getBBox();s=Math.max(s,e+i.width+n.paddingX)}}for(const c of a)if(null==(o=c.node.cssClass)?void 0:o.split(/\s+/).includes("highlight")){const e=c.nodeGroup.select(".treeView-highlight-bg");if(!e.empty()){const t=s-c.node.BBox.x+8;e.attr("width",t),s=Math.max(s,c.node.BBox.x+t+2)}}return{totalHeight:r,totalWidth:s}},"drawTree"),q={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},K={db:L,renderer:{draw:c(async(e,t,n,i)=>{l.debug("Rendering treeView diagram\n"+e);const o=i.db,r=o.getRoot(),s=o.getConfig(),a=h(t);await P(a,r,s,t);const c=a.append("g");c.attr("class","tree-view");const{totalHeight:d,totalWidth:f}=Z(c,r,s,t);a.attr("viewBox",`-${s.lineThickness/2} 0 ${f} ${d}`),p(a,d,f,s.useMaxWidth)},"draw")},parser:X,styles:c(({treeView:e})=>{const{labelFontSize:t,labelColor:n,lineColor:i,iconColor:o,descriptionColor:r,highlightBg:s,highlightStroke:a}=d(q,e);return`\n .treeView-node-label {\n font-size: ${t};\n fill: ${n};\n white-space: pre;\n }\n .treeView-node-dir {\n font-weight: bold;\n }\n .treeView-node-line {\n stroke: ${i};\n }\n .treeView-node-icon {\n color: ${o};\n }\n .treeView-node-description {\n font-size: ${t};\n fill: ${r};\n font-style: italic;\n white-space: pre;\n }\n .treeView-highlight-bg {\n fill: ${s};\n stroke: ${a};\n stroke-width: 1;\n }\n `},"styles")};export{K as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as t}from"./chunk-JWPE2WC7-4UUblnAa.js";import{s as e,g as a,o as r,n,a as s,b as i,_ as o,D as l,p as c,A as d,y as u,B as g,l as p,E as x,e as h}from"./mermaid.core-vavDl7Vc.js";import{p as m}from"./cynefin-VYW2F7L2-Bs61V2_s.js";import"./index-i_5HmRyk.js";var f={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},$={axes:[],curves:[],options:f},v=structuredClone($),y=g.radar,w=o(()=>d({...y,...u().radar}),"getConfig"),b=o(()=>v.axes,"getAxes"),C=o(()=>v.curves,"getCurves"),M=o(()=>v.options,"getOptions"),L=o(t=>{v.axes=t.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),A=o(t=>{v.curves=t.map(t=>({name:t.name,label:t.label??t.name,entries:T(t.entries)}))},"setCurves"),T=o(t=>{if(null==t[0].axis)return t.map(t=>t.value);const e=b();if(0===e.length)throw new Error("Axes must be populated before curves for reference entries");return e.map(e=>{const a=t.find(t=>{var a;return(null==(a=t.axis)?void 0:a.$refText)===e.name});if(void 0===a)throw new Error("Missing entry for axis "+e.label);return a.value})},"computeCurveEntries"),k={getAxes:b,getCurves:C,getOptions:M,setAxes:L,setCurves:A,setOptions:o(t=>{var e,a,r,n,s;const i=t.reduce((t,e)=>(t[e.name]=e,t),{});v.options={showLegend:(null==(e=i.showLegend)?void 0:e.value)??f.showLegend,ticks:(null==(a=i.ticks)?void 0:a.value)??f.ticks,max:(null==(r=i.max)?void 0:r.value)??f.max,min:(null==(n=i.min)?void 0:n.value)??f.min,graticule:(null==(s=i.graticule)?void 0:s.value)??f.graticule}},"setOptions"),getConfig:w,clear:o(()=>{c(),v=structuredClone($)},"clear"),setAccTitle:i,getAccTitle:s,setDiagramTitle:n,getDiagramTitle:r,getAccDescription:a,setAccDescription:e},O=o(e=>{t(e,k);const{axes:a,curves:r,options:n}=e;k.setAxes(a),k.setCurves(r),k.setOptions(n)},"populate"),S={parse:o(async t=>{const e=await m("radar",t);p.debug(e),O(e)},"parse")},E=o((t,e,a,r)=>{const n=r.db,s=n.getAxes(),i=n.getCurves(),o=n.getOptions(),c=n.getConfig(),d=n.getDiagramTitle(),u=l(e),g=I(u,c),p=o.max??Math.max(...i.map(t=>Math.max(...t.entries))),x=o.min,h=Math.min(c.width,c.height)/2;F(g,s,h,o.ticks,o.graticule),P(g,s,h,c),W(g,s,i,x,p,o.graticule,c),D(g,i,o.showLegend,c),g.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),I=o((t,e)=>{const a=e.width+e.marginLeft+e.marginRight,r=e.height+e.marginTop+e.marginBottom,n=e.marginLeft+e.width/2,s=e.marginTop+e.height/2;return h(t,r,a,e.useMaxWidth??!0),t.attr("viewBox",`0 0 ${a} ${r}`).attr("overflow","visible"),t.append("g").attr("transform",`translate(${n}, ${s})`)},"drawFrame"),F=o((t,e,a,r,n)=>{if("circle"===n)for(let s=0;s<r;s++){const e=a*(s+1)/r;t.append("circle").attr("r",e).attr("class","radarGraticule")}else if("polygon"===n){const n=e.length;for(let s=0;s<r;s++){const i=a*(s+1)/r,o=e.map((t,e)=>{const a=2*e*Math.PI/n-Math.PI/2;return`${i*Math.cos(a)},${i*Math.sin(a)}`}).join(" ");t.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),P=o((t,e,a,r)=>{const n=e.length;for(let s=0;s<n;s++){const i=e[s].label,o=2*s*Math.PI/n-Math.PI/2,l=Math.cos(o),c=Math.sin(o);t.append("line").attr("x1",0).attr("y1",0).attr("x2",a*r.axisScaleFactor*l).attr("y2",a*r.axisScaleFactor*c).attr("class","radarAxisLine");const d=l>.01?"start":l<-.01?"end":"middle",u=c>.01?"hanging":c<-.01?"auto":"central",g=4;t.append("text").text(i).attr("x",a*r.axisLabelFactor*l+g*l).attr("y",a*r.axisLabelFactor*c+g*c).attr("text-anchor",d).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function W(t,e,a,r,n,s,i){const o=e.length,l=Math.min(i.width,i.height)/2;a.forEach((e,a)=>{if(e.entries.length!==o)return;const c=e.entries.map((t,e)=>{const a=2*Math.PI*e/o-Math.PI/2,s=j(t,r,n,l);return{x:s*Math.cos(a),y:s*Math.sin(a)}});"circle"===s?t.append("path").attr("d",z(c,i.curveTension)).attr("class",`radarCurve-${a}`):"polygon"===s&&t.append("polygon").attr("points",c.map(t=>`${t.x},${t.y}`).join(" ")).attr("class",`radarCurve-${a}`)})}function j(t,e,a,r){return r*(Math.min(Math.max(t,e),a)-e)/(a-e)}function z(t,e){const a=t.length;let r=`M${t[0].x},${t[0].y}`;for(let n=0;n<a;n++){const s=t[(n-1+a)%a],i=t[n],o=t[(n+1)%a],l=t[(n+2)%a],c={x:i.x+(o.x-s.x)*e,y:i.y+(o.y-s.y)*e},d={x:o.x-(l.x-i.x)*e,y:o.y-(l.y-i.y)*e};r+=` C${c.x},${c.y} ${d.x},${d.y} ${o.x},${o.y}`}return`${r} Z`}function D(t,e,a,r){if(!a)return;const n=3*(r.width/2+r.marginRight)/4,s=3*-(r.height/2+r.marginTop)/4;e.forEach((e,a)=>{const r=t.append("g").attr("transform",`translate(${n}, ${s+20*a})`);r.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${a}`),r.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(e.label)})}o(W,"drawCurves"),o(j,"relativeRadius"),o(z,"closedRoundCurve"),o(D,"drawLegend");var R={draw:E},B=o((t,e)=>{let a="";for(let r=0;r<t.THEME_COLOR_LIMIT;r++){const n=t[`cScale${r}`];a+=`\n\t\t.radarCurve-${r} {\n\t\t\tcolor: ${n};\n\t\t\tfill: ${n};\n\t\t\tfill-opacity: ${e.curveOpacity};\n\t\t\tstroke: ${n};\n\t\t\tstroke-width: ${e.curveStrokeWidth};\n\t\t}\n\t\t.radarLegendBox-${r} {\n\t\t\tfill: ${n};\n\t\t\tfill-opacity: ${e.curveOpacity};\n\t\t\tstroke: ${n};\n\t\t}\n\t\t`}return a},"genIndexStyles"),G=o(t=>{const e=x(),a=u(),r=d(e,a.themeVariables);return{themeVariables:r,radarOptions:d(r.radar,t)}},"buildRadarStyleOptions"),V={parser:S,db:k,renderer:R,styles:o(({radar:t}={})=>{const{themeVariables:e,radarOptions:a}=G(t);return`\n\t.radarTitle {\n\t\tfont-size: ${e.fontSize};\n\t\tcolor: ${e.titleColor};\n\t\tdominant-baseline: hanging;\n\t\ttext-anchor: middle;\n\t}\n\t.radarAxisLine {\n\t\tstroke: ${a.axisColor};\n\t\tstroke-width: ${a.axisStrokeWidth};\n\t}\n\t.radarAxisLabel {\n\t\tfont-size: ${a.axisLabelFontSize}px;\n\t\tcolor: ${a.axisColor};\n\t}\n\t.radarGraticule {\n\t\tfill: ${a.graticuleColor};\n\t\tfill-opacity: ${a.graticuleOpacity};\n\t\tstroke: ${a.graticuleColor};\n\t\tstroke-width: ${a.graticuleStrokeWidth};\n\t}\n\t.radarLegendText {\n\t\ttext-anchor: start;\n\t\tfont-size: ${a.legendFontSize}px;\n\t\tdominant-baseline: hanging;\n\t}\n\t${B(e,a)}\n\t`},"styles")};export{V as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t;import{_ as e,c as i,K as n,D as s,ak as a,p as r,k as h,n as o,a as l,b as c,g as u,s as d,o as y,e as p}from"./mermaid.core-vavDl7Vc.js";import"./index-i_5HmRyk.js";var g=function(){var t=e(function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i},"o"),i=[1,4],n=[1,14],s=[1,12],a=[1,13],r=[6,7,8],h=[1,20],o=[1,18],l=[1,19],c=[6,7,11],u=[1,6,13,14],d=[1,23],y=[1,24],p=[1,6,7,11,13,14],g={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(t,e,i,n,s,a,r){var h=a.length-1;switch(s){case 6:case 7:return n;case 15:n.addNode(a[h-1].length,a[h].trim());break;case 16:n.addNode(0,a[h].trim())}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:i},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:i},{6:n,7:[1,10],9:9,12:11,13:s,14:a},t(r,[2,3]),{1:[2,2]},t(r,[2,4]),t(r,[2,5]),{1:[2,6],6:n,12:15,13:s,14:a},{6:n,9:16,12:11,13:s,14:a},{6:h,7:o,10:17,11:l},t(c,[2,18],{14:[1,21]}),t(c,[2,16]),t(c,[2,17]),{6:h,7:o,10:22,11:l},{1:[2,7],6:n,12:15,13:s,14:a},t(u,[2,14],{7:d,11:y}),t(p,[2,8]),t(p,[2,9]),t(p,[2,10]),t(c,[2,15]),t(u,[2,13],{7:d,11:y}),t(p,[2,11]),t(p,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},"parseError"),parse:e(function(t){var i=this,n=[0],s=[],a=[null],r=[],h=this.table,o="",l=0,c=0,u=r.slice.call(arguments,1),d=Object.create(this.lexer),y={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(y.yy[p]=this.yy[p]);d.setInput(t,y.yy),y.yy.lexer=d,y.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;r.push(g);var f=d.options&&d.options.ranges;function k(){var t;return"number"!=typeof(t=s.pop()||d.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,e(function(t){n.length=n.length-2*t,a.length=a.length-t,r.length=r.length-t},"popStack"),e(k,"lex");for(var m,w,x,b,_,v,S,$,I={};;){if(w=n[n.length-1],this.defaultActions[w]?x=this.defaultActions[w]:(null==m&&(m=k()),x=h[w]&&h[w][m]),void 0===x||!x.length||!x[0]){var E="";for(_ in $=[],h[w])this.terminals_[_]&&_>2&&$.push("'"+this.terminals_[_]+"'");E=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(E,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:g,expected:$})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+m);switch(x[0]){case 1:n.push(m),a.push(d.yytext),r.push(d.yylloc),n.push(x[1]),m=null,c=d.yyleng,o=d.yytext,l=d.yylineno,g=d.yylloc;break;case 2:if(v=this.productions_[x[1]][1],I.$=a[a.length-v],I._$={first_line:r[r.length-(v||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(v||1)].first_column,last_column:r[r.length-1].last_column},f&&(I._$.range=[r[r.length-(v||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(I,[o,c,l,y.yy,x[1],a,r].concat(u))))return b;v&&(n=n.slice(0,-1*v*2),a=a.slice(0,-1*v),r=r.slice(0,-1*v)),n.push(this.productions_[x[1]][0]),a.push(I.$),r.push(I._$),S=h[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0},"parse")},f=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,i=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 n=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),i.length-1&&(this.yylineno-=i.length-1);var s=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:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[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 i,n,s;if(this.options.backtrack_lexer&&(s={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&&(s.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var a in s)this[a]=s[a];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;var t,e,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),a=0;a<s.length;a++)if((i=this._input.match(this.rules[s[a]]))&&(!e||i[0].length>e[0].length)){if(e=i,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,s[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[n]))&&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:{"case-insensitive":!0},performAction:e(function(t,e,i,n){switch(i){case 0:case 3:return 6;case 1:case 2:return 8;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function k(){this.yy={}}return g.lexer=f,e(k,"Parser"),k.prototype=g,g.Parser=k,new k}();g.parser=g;var f=g,k=(e(t=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,r()}getRoot(){return this.root}addNode(t,e){const n=h.sanitizeText(e,i());if(!this.root)return this.root={text:n,children:[]},this.stack=[{level:0,node:this.root}],void o(n);this.baseLevel??(this.baseLevel=t);let s=t-this.baseLevel+1;for(s<=0&&(s=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=s;)this.stack.pop();const a={text:n,children:[]};this.stack[this.stack.length-1].node.children.push(a),this.stack.push({level:s,node:a})}getAccTitle(){return l()}setAccTitle(t){c(t)}getAccDescription(){return u()}setAccDescription(t){d(t)}getDiagramTitle(){return y()}setDiagramTitle(t){o(t)}},"IshikawaDB"),t),m=250,w=82*Math.PI/180,x=Math.cos(w),b=Math.sin(w),_=e((t,e,i)=>{const n=t.node().getBBox(),s=n.width+2*e,a=n.height+2*e;p(t,a,s,i),t.attr("viewBox",`${n.x-e} ${n.y-e} ${s} ${a}`)},"applyPaddedViewBox"),v=e((t,e,r,h)=>{var o,l;const c=h.db.getRoot();if(!c)return;const u=i(),{look:d,handDrawnSeed:y,themeVariables:p}=u,g=n(u.fontSize)[0]??14,f="handDrawn"===d,k=c.children??[],w=(null==(o=u.ishikawa)?void 0:o.diagramPadding)??20,x=(null==(l=u.ishikawa)?void 0:l.useMaxWidth)??!1,b=s(e),v=b.append("g").attr("class","ishikawa"),I=f?a.svg(b.node()):void 0,E=I?{roughSvg:I,seed:y??0,lineColor:(null==p?void 0:p.lineColor)??"#333",fillColor:(null==p?void 0:p.mainBkg)??"#fff"}:void 0,A=`ishikawa-arrow-${e}`;f||v.append("defs").append("marker").attr("id",A).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let L=0,M=m;const P=f?void 0:B(v,L,M,L,M,"ishikawa-spine");if($(v,L,M,c.text,g,E),!k.length)return f&&B(v,L,M,L,M,"ishikawa-spine",E),void _(b,w,x);L-=20;const T=k.filter((t,e)=>e%2==0),N=k.filter((t,e)=>e%2==1),D=S(T),O=S(N),j=D.total+O.total;let W=m,z=m;if(j>0){const t=500,e=75;W=Math.max(e,t*(D.total/j)),z=Math.max(e,t*(O.total/j))}const R=2*g;W=Math.max(W,D.max*R),z=Math.max(z,O.max*R),M=Math.max(W,m),P&&P.attr("y1",M).attr("y2",M),v.select(".ishikawa-head-group").attr("transform",`translate(0,${M})`);const F=Math.ceil(k.length/2);for(let i=0;i<F;i++){const t=v.append("g").attr("class","ishikawa-pair");for(const[e,n,s]of[[k[2*i],-1,W],[k[2*i+1],1,z]])e&&C(t,e,L,M,n,s,g,E);L=t.selectAll("text").nodes().reduce((t,e)=>Math.min(t,e.getBBox().x),1/0)}if(f)B(v,L,M,0,M,"ishikawa-spine",E);else{P.attr("x1",L);const t=`url(#${A})`;v.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",t)}_(b,w,x)},"draw"),S=e(t=>{const i=e(t=>t.children.reduce((t,e)=>t+1+i(e),0),"countDescendants");return t.reduce((t,e)=>{const n=i(e);return t.total+=n,t.max=Math.max(t.max,n),t},{total:0,max:0})},"sideStats"),$=e((t,e,i,n,s,a)=>{const r=Math.max(6,Math.floor(110/(.6*s))),h=t.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${e},${i})`),o=P(h,M(n,r),0,0,"ishikawa-head-label","start",s),l=o.node().getBBox(),c=Math.max(60,l.width+6),u=Math.max(40,2*l.height+40),d=`M 0 ${-u/2} L 0 ${u/2} Q ${2.4*c} 0 0 ${-u/2} Z`;if(a){const t=a.roughSvg.path(d,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});h.insert(()=>t,":first-child").attr("class","ishikawa-head")}else h.insert("path",":first-child").attr("class","ishikawa-head").attr("d",d);o.attr("transform",`translate(${(c-l.width)/2-l.x+3},${-l.y-l.height/2})`)},"drawHead"),I=e((t,i)=>{const n=[],s=[],a=e((t,e,r)=>{const h=-1===i?[...t].reverse():t;for(const i of h){const t=n.length,h=i.children??[];n.push({depth:r,text:M(i.text,15),parentIndex:e,childCount:h.length}),r%2==0?(s.push(t),h.length&&a(h,t,r+1)):(h.length&&a(h,t,r+1),s.push(t))}},"walk");return a(t,-1,2),{entries:n,yOrder:s}},"flattenTree"),E=e((t,e,i,n,s,a,r)=>{const h=t.append("g").attr("class","ishikawa-label-group"),o=P(h,e,i,n+11*s,"ishikawa-label cause","middle",a).node().getBBox();if(r){const t=r.roughSvg.rectangle(o.x-20,o.y-2,o.width+40,o.height+4,{roughness:1.5,seed:r.seed,fill:r.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:r.lineColor,strokeWidth:2});h.insert(()=>t,":first-child").attr("class","ishikawa-label-box")}else h.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",o.x-20).attr("y",o.y-2).attr("width",o.width+40).attr("height",o.height+4)},"drawCauseLabel"),A=e((t,e,i,n,s,a)=>{const r=Math.sqrt(n*n+s*s);if(0===r)return;const h=n/r,o=s/r,l=6*-o,c=6*h,u=`M ${e} ${i} L ${e-6*h*2+l} ${i-6*o*2+c} L ${e-6*h*2-l} ${i-6*o*2-c} Z`,d=a.roughSvg.path(u,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:"solid",stroke:a.lineColor,strokeWidth:1});t.append(()=>d)},"drawArrowMarker"),C=e((t,e,i,n,s,a,r,h)=>{const o=e.children??[],l=a*(o.length?1:.2),c=b*l*s,u=i+-x*l,d=n+c;if(B(t,i,n,u,d,"ishikawa-branch",h),h&&A(t,i,n,i-u,n-d,h),E(t,e.text,u,d,s,r,h),!o.length)return;const{entries:y,yOrder:p}=I(o,s),g=y.length,f=new Array(g);for(const[x,b]of p.entries())f[b]=n+c*((x+1)/(g+1));const k=new Map;k.set(-1,{x0:i,y0:n,x1:u,y1:d,childCount:o.length,childrenDrawn:0});const m=-x,w=b*s,_=s<0?"ishikawa-label up":"ishikawa-label down";for(const[x,b]of y.entries()){const e=f[x],i=k.get(b.parentIndex),n=t.append("g").attr("class","ishikawa-sub-group");let s=0,a=0,o=0;if(b.depth%2==0){const t=i.y1-i.y0;s=T(i.x0,i.x1,t?(e-i.y0)/t:.5),a=e,o=s-(b.childCount>0?60+5*b.childCount:30),B(n,s,e,o,e,"ishikawa-sub-branch",h),h&&A(n,s,e,1,0,h),P(n,b.text,o,e,"ishikawa-label align","end",r)}else{const t=i.childrenDrawn++;s=T(i.x0,i.x1,(i.childCount-t)/(i.childCount+1)),a=i.y0,o=s+m*((e-a)/w),B(n,s,a,o,e,"ishikawa-sub-branch",h),h&&A(n,s,a,s-o,a-e,h),P(n,b.text,o,e,_,"end",r)}b.childCount>0&&k.set(x,{x0:s,y0:a,x1:o,y1:e,childCount:b.childCount,childrenDrawn:0})}},"drawBranch"),L=e(t=>t.split(/<br\s*\/?>|\n/),"splitLines"),M=e((t,e)=>{if(t.length<=e)return t;const i=[];for(const n of t.split(/\s+/)){const t=i.length-1;t>=0&&i[t].length+1+n.length<=e?i[t]+=" "+n:i.push(n)}return i.join("\n")},"wrapText"),P=e((t,e,i,n,s,a,r)=>{const h=L(e),o=1.05*r,l=t.append("text").attr("class",s).attr("text-anchor",a).attr("x",i).attr("y",n-(h.length-1)*o/2);for(const[c,u]of h.entries())l.append("tspan").attr("x",i).attr("dy",0===c?0:o).text(u);return l},"drawMultilineText"),T=e((t,e,i)=>t+(e-t)*i,"lerp"),B=e((t,e,i,n,s,a,r)=>{if(r){const h=r.roughSvg.line(e,i,n,s,{roughness:1.5,seed:r.seed,stroke:r.lineColor,strokeWidth:2});return void t.append(()=>h).attr("class",a)}return t.append("line").attr("class",a).attr("x1",e).attr("y1",i).attr("x2",n).attr("y2",s)},"drawLine"),N={draw:v},D=e(t=>`\n.ishikawa .ishikawa-spine,\n.ishikawa .ishikawa-branch,\n.ishikawa .ishikawa-sub-branch {\n stroke: ${t.lineColor};\n stroke-width: 2;\n fill: none;\n}\n\n.ishikawa .ishikawa-sub-branch {\n stroke-width: 1;\n}\n\n.ishikawa .ishikawa-arrow {\n fill: ${t.lineColor};\n}\n\n.ishikawa .ishikawa-head {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa .ishikawa-label-box {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa text {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n fill: ${t.textColor};\n}\n\n.ishikawa .ishikawa-head-label {\n font-weight: 600;\n text-anchor: middle;\n dominant-baseline: middle;\n font-size: 14px;\n}\n\n.ishikawa .ishikawa-label {\n text-anchor: end;\n}\n\n.ishikawa .ishikawa-label.cause {\n text-anchor: middle;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.align {\n text-anchor: end;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.up {\n dominant-baseline: baseline;\n}\n\n.ishikawa .ishikawa-label.down {\n dominant-baseline: hanging;\n}\n`,"getStyles"),O={parser:f,get db(){return new k},renderer:N,styles:D};export{O as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as t,l as e,c as n,D as i,ac as s,ad as r,ae as o,V as a,B as l,i as c,G as h,J as u,S as d,T as g,U as p}from"./mermaid.core-vavDl7Vc.js";import{g as y}from"./chunk-5VM5RSS4-D1soGNls.js";import"./index-i_5HmRyk.js";var f=function(){var e=t(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),n=[1,4],i=[1,13],s=[1,12],r=[1,15],o=[1,16],a=[1,20],l=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],g=[6,7,11],p=[1,31],y=[6,7,11,24],f=[1,6,13,16,17,20,23],m=[1,35],b=[1,36],_=[1,6,7,11,13,16,17,20,23],k=[1,38],E={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:t(function(t,e,n,i,s,r,o){var a=r.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",r[a-1].id),i.addNode(r[a-2].length,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 16:i.getLogger().info("Node: ",r[a].id),i.addNode(r[a-1].length,r[a].id,r[a].descr,r[a].type);break;case 17:i.getLogger().trace("Icon: ",r[a]),i.decorateNode({icon:r[a]});break;case 18:case 23:i.decorateNode({class:r[a]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",r[a-1].id),i.addNode(0,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 21:i.getLogger().trace("Node: ",r[a].id),i.addNode(0,r[a].id,r[a].descr,r[a].type);break;case 22:i.decorateNode({icon:r[a]});break;case 27:i.getLogger().trace("node found ..",r[a-2]),this.$={id:r[a-1],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 28:this.$={id:r[a],descr:r[a],type:0};break;case 29:i.getLogger().trace("node found ..",r[a-3]),this.$={id:r[a-3],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 30:this.$=r[a-1]+r[a];break;case 31:this.$=r[a]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:i,7:[1,10],9:9,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:l},e(c,[2,3]),{1:[2,2]},e(c,[2,4]),e(c,[2,5]),{1:[2,6],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:l},{6:i,9:22,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:l},{6:h,7:u,10:23,11:d},e(g,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:a,23:l}),e(g,[2,19]),e(g,[2,21],{15:30,24:p}),e(g,[2,22]),e(g,[2,23]),e(y,[2,25]),e(y,[2,26]),e(y,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:d},{1:[2,7],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:l},e(f,[2,14],{7:m,11:b}),e(_,[2,8]),e(_,[2,9]),e(_,[2,10]),e(g,[2,16],{15:37,24:p}),e(g,[2,17]),e(g,[2,18]),e(g,[2,20],{24:k}),e(y,[2,31]),{21:[1,39]},{22:[1,40]},e(f,[2,13],{7:m,11:b}),e(_,[2,11]),e(_,[2,12]),e(g,[2,15],{24:k}),e(y,[2,30]),{22:[1,41]},e(y,[2,27]),e(y,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:t(function(e){var n=this,i=[0],s=[],r=[null],o=[],a=this.table,l="",c=0,h=0,u=o.slice.call(arguments,1),d=Object.create(this.lexer),g={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(g.yy[p]=this.yy[p]);d.setInput(e,g.yy),g.yy.lexer=d,g.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;o.push(y);var f=d.options&&d.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||d.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t(function(t){i.length=i.length-2*t,r.length=r.length-t,o.length=o.length-t},"popStack"),t(m,"lex");for(var b,_,k,E,S,N,v,x,D={};;){if(_=i[i.length-1],this.defaultActions[_]?k=this.defaultActions[_]:(null==b&&(b=m()),k=a[_]&&a[_][b]),void 0===k||!k.length||!k[0]){var L="";for(S in x=[],a[_])this.terminals_[S]&&S>2&&x.push("'"+this.terminals_[S]+"'");L=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(L,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:y,expected:x})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(k[0]){case 1:i.push(b),r.push(d.yytext),o.push(d.yylloc),i.push(k[1]),b=null,h=d.yyleng,l=d.yytext,c=d.yylineno,y=d.yylloc;break;case 2:if(N=this.productions_[k[1]][1],D.$=r[r.length-N],D._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},f&&(D._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),void 0!==(E=this.performAction.apply(D,[l,h,c,g.yy,k[1],r,o].concat(u))))return E;N&&(i=i.slice(0,-1*N*2),r=r.slice(0,-1*N),o=o.slice(0,-1*N)),i.push(this.productions_[k[1]][0]),r.push(D.$),o.push(D._$),v=a[i[i.length-2]][i[i.length-1]],i.push(v);break;case 3:return!0}}return!0},"parse")},S=function(){return{EOF:1,parseError:t(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:t(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:t(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:t(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 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),n.length-1&&(this.yylineno-=n.length-1);var s=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===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(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:t(function(t){this.unput(this.match.slice(t))},"less"),pastInput:t(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:t(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:t(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:t(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={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&&(s.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],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 r in s)this[r]=s[r];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[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:t(function(){var t=this.next();return t||this.lex()},"lex"),begin:t(function(t){this.conditionStack.push(t)},"begin"),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:t(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:t(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:t(function(t){this.begin(t)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(t,e,n,i){switch(n){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const n=/\n\s*/g;return e.yytext=e.yytext.replace(n,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}}();function N(){this.yy={}}return E.lexer=S,t(N,"Parser"),N.prototype=E,E.Parser=N,new N}();f.parser=f;var m=f,b=[],_=[],k=0,E={},S=t(()=>{b=[],_=[],k=0,E={}},"clear"),N=t(t=>{if(0===b.length)return null;const e=b[0].level;let n=null;for(let i=b.length-1;i>=0;i--)if(b[i].level!==e||n||(n=b[i]),b[i].level<e)throw new Error('Items without section detected, found section ("'+b[i].label+'")');return t===(null==n?void 0:n.level)?null:n},"getSection"),v=t(function(){return _},"getSections"),x=t(function(){const t=[],e=v(),i=n();for(const n of e){const e={id:n.id,label:c(n.label??"",i),labelType:"markdown",isGroup:!0,ticket:n.ticket,shape:"kanbanSection",level:n.level,look:i.look};t.push(e);const s=b.filter(t=>t.parentId===n.id);for(const r of s){const e={id:r.id,parentId:n.id,label:c(r.label??"",i),labelType:"markdown",isGroup:!1,ticket:null==r?void 0:r.ticket,priority:null==r?void 0:r.priority,assigned:null==r?void 0:r.assigned,icon:null==r?void 0:r.icon,shape:"kanbanItem",level:r.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(e)}}return{nodes:t,edges:[],other:{},config:n()}},"getData"),D=t((t,e,i,s,r)=>{var o,a;const d=n();let g=(null==(o=d.mindmap)?void 0:o.padding)??l.mindmap.padding;switch(s){case L.ROUNDED_RECT:case L.RECT:case L.HEXAGON:g*=2}const p={id:c(e,d)||"kbn"+k++,level:t,label:c(i,d),width:(null==(a=d.mindmap)?void 0:a.maxNodeWidth)??l.mindmap.maxNodeWidth,padding:g,isGroup:!1};if(void 0!==r){let t;t=r.includes("\n")?r+"\n":"{\n"+r+"\n}";const e=h(t,{schema:u});if(e.shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);(null==e?void 0:e.shape)&&"kanbanItem"===e.shape&&(p.shape=null==e?void 0:e.shape),(null==e?void 0:e.label)&&(p.label=null==e?void 0:e.label),(null==e?void 0:e.icon)&&(p.icon=null==e?void 0:e.icon.toString()),(null==e?void 0:e.assigned)&&(p.assigned=null==e?void 0:e.assigned.toString()),(null==e?void 0:e.ticket)&&(p.ticket=null==e?void 0:e.ticket.toString()),(null==e?void 0:e.priority)&&(p.priority=null==e?void 0:e.priority)}const y=N(t);y?p.parentId=y.id||"kbn"+k++:_.push(p),b.push(p)},"addNode"),L={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},I={clear:S,addNode:D,getSections:v,getData:x,nodeType:L,getType:t((t,n)=>{switch(e.debug("In get type",t,n),t){case"[":return L.RECT;case"(":return")"===n?L.ROUNDED_RECT:L.CLOUD;case"((":return L.CIRCLE;case")":return L.CLOUD;case"))":return L.BANG;case"{{":return L.HEXAGON;default:return L.DEFAULT}},"getType"),setElementForId:t((t,e)=>{E[t]=e},"setElementForId"),decorateNode:t(t=>{if(!t)return;const e=n(),i=b[b.length-1];t.icon&&(i.icon=c(t.icon,e)),t.class&&(i.cssClasses=c(t.class,e))},"decorateNode"),type2Str:t(t=>{switch(t){case L.DEFAULT:return"no-border";case L.RECT:return"rect";case L.ROUNDED_RECT:return"rounded-rect";case L.CIRCLE:return"circle";case L.CLOUD:return"cloud";case L.BANG:return"bang";case L.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:t(()=>e,"getLogger"),getElementById:t(t=>E[t],"getElementById")},O={draw:t(async(t,c,h,u)=>{var d,g,p,y,f;e.debug("Rendering kanban diagram\n"+t);const m=u.db.getData(),b=n();b.htmlLabels=!1;const _=i(c);for(const e of m.nodes)e.domId=`${c}-${e.id}`;const k=_.append("g");k.attr("class","sections");const E=_.append("g");E.attr("class","items");const S=m.nodes.filter(t=>t.isGroup);let N=0;const v=[];let x=25;for(const e of S){const t=(null==(d=null==b?void 0:b.kanban)?void 0:d.sectionWidth)||200;N+=1,e.x=t*N+10*(N-1)/2,e.width=t,e.y=0,e.height=3*t,e.rx=5,e.ry=5,e.cssClasses=e.cssClasses+" section-"+N;const n=await s(k,e);x=Math.max(x,null==(g=null==n?void 0:n.labelBBox)?void 0:g.height),v.push(n)}let D=0;for(const e of S){const t=v[D];D+=1;const n=(null==(p=null==b?void 0:b.kanban)?void 0:p.sectionWidth)||200,i=3*-n/2+x;let s=i;const a=m.nodes.filter(t=>t.parentId===e.id);for(const h of a){if(h.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");h.x=e.x,h.width=n-15;const t=(await r(E,h,{config:b})).node().getBBox();h.y=s+t.height/2,await o(h),s=h.y+t.height/2+5}const l=t.cluster.select("rect"),c=Math.max(s-i+30,50)+(x-25);l.attr("height",c)}a(void 0,_,(null==(y=b.mindmap)?void 0:y.padding)??l.kanban.padding,(null==(f=b.mindmap)?void 0:f.useMaxWidth)??l.kanban.useMaxWidth)},"draw")},C=t(e=>{let n="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],d(e["lineColor"+t])?e["lineColor"+t]=g(e["lineColor"+t],20):e["lineColor"+t]=p(e["lineColor"+t],20);const i=t((t,n)=>e.darkMode?p(t,n):g(t,n),"adjuster");for(let t=0;t<e.THEME_COLOR_LIMIT;t++){const s=""+(17-3*t);n+=`\n .section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} polygon, .section-${t-1} path {\n fill: ${i(e["cScale"+t],10)};\n stroke: ${i(e["cScale"+t],10)};\n\n }\n .section-${t-1} text {\n fill: ${e["cScaleLabel"+t]};\n }\n .node-icon-${t-1} {\n font-size: 40px;\n color: ${e["cScaleLabel"+t]};\n }\n .section-edge-${t-1}{\n stroke: ${e["cScale"+t]};\n }\n .edge-depth-${t-1}{\n stroke-width: ${s};\n }\n .section-${t-1} line {\n stroke: ${e["cScaleInv"+t]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n\n .kanban-ticket-link {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n text-decoration: underline;\n }\n `}return n},"genSections"),w={db:I,renderer:O,parser:m,styles:t(t=>`\n .edge {\n stroke-width: 3;\n }\n ${C(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .cluster-label, .label {\n color: ${t.textColor};\n fill: ${t.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n ${y()}\n`,"getStyles")};export{w as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e;import{g as t}from"./chunk-XXDRQBXY-DGKbzfgb.js";import{s as n}from"./chunk-VR4S4FIN-D1BCGr2u.js";import{_ as i,l as s,u as o,v as r,y as a,B as c,c as l,i as h,b5 as d,S as g,T as u,U as p}from"./mermaid.core-vavDl7Vc.js";import"./index-i_5HmRyk.js";const y=[];for(let D=0;D<256;++D)y.push((D+256).toString(16).slice(1));const m=new Uint8Array(16);function f(e,t,n){return crypto.randomUUID?crypto.randomUUID():function(e){var t;e=e||{};const n=e.random??(null==(t=e.rng)?void 0:t.call(e))??crypto.getRandomValues(m);if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=15&n[6]|64,n[8]=63&n[8]|128,function(e,t=0){return(y[e[t+0]]+y[e[t+1]]+y[e[t+2]]+y[e[t+3]]+"-"+y[e[t+4]]+y[e[t+5]]+"-"+y[e[t+6]]+y[e[t+7]]+"-"+y[e[t+8]]+y[e[t+9]]+"-"+y[e[t+10]]+y[e[t+11]]+y[e[t+12]]+y[e[t+13]]+y[e[t+14]]+y[e[t+15]]).toLowerCase()}(n)}(e)}var _=function(){var e=i(function(e,t,n,i){for(n=n||{},i=e.length;i--;n[e[i]]=t);return n},"o"),t=[1,4],n=[1,13],s=[1,12],o=[1,15],r=[1,16],a=[1,20],c=[1,19],l=[6,7,8],h=[1,26],d=[1,24],g=[1,25],u=[6,7,11],p=[1,6,13,15,16,19,22],y=[1,33],m=[1,34],f=[1,6,7,11,13,15,16,19,22],_={trace:i(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:i(function(e,t,n,i,s,o,r){var a=o.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",o[a].id),i.addNode(o[a-1].length,o[a].id,o[a].descr,o[a].type);break;case 16:i.getLogger().trace("Icon: ",o[a]),i.decorateNode({icon:o[a]});break;case 17:case 21:i.decorateNode({class:o[a]});break;case 18:i.getLogger().trace("SPACELIST");break;case 19:i.getLogger().trace("Node: ",o[a].id),i.addNode(0,o[a].id,o[a].descr,o[a].type);break;case 20:i.decorateNode({icon:o[a]});break;case 25:i.getLogger().trace("node found ..",o[a-2]),this.$={id:o[a-1],descr:o[a-1],type:i.getType(o[a-2],o[a])};break;case 26:this.$={id:o[a],descr:o[a],type:i.nodeType.DEFAULT};break;case 27:i.getLogger().trace("node found ..",o[a-3]),this.$={id:o[a-3],descr:o[a-1],type:i.getType(o[a-2],o[a])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:n,7:[1,10],9:9,12:11,13:s,14:14,15:o,16:r,17:17,18:18,19:a,22:c},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:n,12:21,13:s,14:14,15:o,16:r,17:17,18:18,19:a,22:c},{6:n,9:22,12:11,13:s,14:14,15:o,16:r,17:17,18:18,19:a,22:c},{6:h,7:d,10:23,11:g},e(u,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:a,22:c}),e(u,[2,18]),e(u,[2,19]),e(u,[2,20]),e(u,[2,21]),e(u,[2,23]),e(u,[2,24]),e(u,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:d,10:32,11:g},{1:[2,7],6:n,12:21,13:s,14:14,15:o,16:r,17:17,18:18,19:a,22:c},e(p,[2,14],{7:y,11:m}),e(f,[2,8]),e(f,[2,9]),e(f,[2,10]),e(u,[2,15]),e(u,[2,16]),e(u,[2,17]),{20:[1,35]},{21:[1,36]},e(p,[2,13],{7:y,11:m}),e(f,[2,11]),e(f,[2,12]),{21:[1,37]},e(u,[2,25]),e(u,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:i(function(e,t){if(!t.recoverable){var n=new Error(e);throw n.hash=t,n}this.trace(e)},"parseError"),parse:i(function(e){var t=this,n=[0],s=[],o=[null],r=[],a=this.table,c="",l=0,h=0,d=r.slice.call(arguments,1),g=Object.create(this.lexer),u={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(u.yy[p]=this.yy[p]);g.setInput(e,u.yy),u.yy.lexer=g,u.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;r.push(y);var m=g.options&&g.options.ranges;function f(){var e;return"number"!=typeof(e=s.pop()||g.lex()||1)&&(e instanceof Array&&(e=(s=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,i(function(e){n.length=n.length-2*e,o.length=o.length-e,r.length=r.length-e},"popStack"),i(f,"lex");for(var _,k,E,b,S,N,L,x,v={};;){if(k=n[n.length-1],this.defaultActions[k]?E=this.defaultActions[k]:(null==_&&(_=f()),E=a[k]&&a[k][_]),void 0===E||!E.length||!E[0]){var D="";for(S in x=[],a[k])this.terminals_[S]&&S>2&&x.push("'"+this.terminals_[S]+"'");D=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(D,{text:g.match,token:this.terminals_[_]||_,line:g.yylineno,loc:y,expected:x})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+_);switch(E[0]){case 1:n.push(_),o.push(g.yytext),r.push(g.yylloc),n.push(E[1]),_=null,h=g.yyleng,c=g.yytext,l=g.yylineno,y=g.yylloc;break;case 2:if(N=this.productions_[E[1]][1],v.$=o[o.length-N],v._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},m&&(v._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(v,[c,h,l,u.yy,E[1],o,r].concat(d))))return b;N&&(n=n.slice(0,-1*N*2),o=o.slice(0,-1*N),r=r.slice(0,-1*N)),n.push(this.productions_[E[1]][0]),o.push(v.$),r.push(v._$),L=a[n[n.length-2]][n[n.length-1]],n.push(L);break;case 3:return!0}}return!0},"parse")},k=function(){return{EOF:1,parseError:i(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:i(function(e,t){return this.yy=t||this.yy||{},this._input=e,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 e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.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),e},"input"),unput:i(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;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),n.length-1&&(this.yylineno-=n.length-1);var s=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===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-t]),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(e){this.unput(this.match.slice(e))},"less"),pastInput:i(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},"showPosition"),test_match:i(function(e,t){var n,i,s;if(this.options.backtrack_lexer&&(s={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&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=e[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+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in s)this[o]=s[o];return!1}return!1},"test_match"),next:i(function(){if(this.done)return this.EOF;var e,t,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),o=0;o<s.length;o++)if((n=this._input.match(this.rules[s[o]]))&&(!t||n[0].length>t[0].length)){if(t=n,i=o,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,s[o])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,s[i]))&&e:""===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 e=this.next();return e||this.lex()},"lex"),begin:i(function(e){this.conditionStack.push(e)},"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(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:i(function(e){this.begin(e)},"pushState"),stateStackSize:i(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:i(function(e,t,n,i){switch(n){case 0:return e.getLogger().trace("Found comment",t.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return e.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:e.getLogger().trace("end icon"),this.popState();break;case 10:return e.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return e.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return e.getLogger().trace("description:",t.yytext),"NODE_DESCR";case 27:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),e.getLogger().trace("node end ...",t.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return e.getLogger().trace("Long description:",t.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}}();function E(){this.yy={}}return _.lexer=k,i(E,"Parser"),E.prototype=_,_.Parser=E,new E}();_.parser=_;var k=_,E={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},b=(i(e=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=E,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let t=this.nodes.length-1;t>=0;t--)if(this.nodes[t].level<e)return this.nodes[t];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,t,n,i){var o,r;s.info("addNode",e,t,n,i);let a=!1;0===this.nodes.length?(this.baseLevel=e,e=0,a=!0):void 0!==this.baseLevel&&(e-=this.baseLevel,a=!1);const d=l();let g=(null==(o=d.mindmap)?void 0:o.padding)??c.mindmap.padding;switch(i){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:g*=2}const u={id:this.count++,nodeId:h(t,d),level:e,descr:h(n,d),type:i,children:[],width:(null==(r=d.mindmap)?void 0:r.maxNodeWidth)??c.mindmap.maxNodeWidth,padding:g,isRoot:a},p=this.getParent(e);if(p)p.children.push(u),this.nodes.push(u);else{if(!a)throw new Error(`There can be only one root. No parent could be found for ("${u.descr}")`);this.nodes.push(u)}}getType(e,t){switch(s.debug("In get type",e,t),e){case"[":return this.nodeType.RECT;case"(":return")"===t?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,t){this.elements[e]=t}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;const t=l(),n=this.nodes[this.nodes.length-1];e.icon&&(n.icon=h(e.icon,t)),e.class&&(n.class=h(e.class,t))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,t){if(0===e.level?e.section=void 0:e.section=t,e.children)for(const[n,i]of e.children.entries()){const s=0===e.level?n%11:t;this.assignSections(i,s)}}flattenNodes(e,t){const n=l(),s=["mindmap-node"];!0===e.isRoot?s.push("section-root","section--1"):void 0!==e.section&&s.push(`section-${e.section}`),e.class&&s.push(e.class);const o=s.join(" "),r=i(e=>{var t;const i=((null==(t=n.theme)?void 0:t.toLowerCase())??"").includes("redux");switch(e){case E.CIRCLE:return"mindmapCircle";case E.RECT:return"rect";case E.ROUNDED_RECT:return"rounded";case E.CLOUD:return"cloud";case E.BANG:return"bang";case E.HEXAGON:return"hexagon";case E.DEFAULT:return i?"rounded":"defaultMindmapNode";default:return"rect"}},"getShapeFromType"),a={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:r(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:o,cssStyles:[],look:n.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(t.push(a),e.children)for(const i of e.children)this.flattenNodes(i,t)}generateEdges(e,t){if(!e.children)return;const n=l();for(const i of e.children){let s="edge";void 0!==i.section&&(s+=` section-edge-${i.section}`);s+=` edge-depth-${e.level+1}`;const o={id:`edge_${e.id}_${i.id}`,start:e.id.toString(),end:i.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:n.look,classes:s,depth:e.level,section:i.section};t.push(o),this.generateEdges(i,t)}}getData(){const e=this.getMindmap(),t=l(),n=t;if(void 0!==d().layout||(n.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:n};s.debug("getData: mindmapRoot",e,t),this.assignSections(e);const i=[],o=[];this.flattenNodes(e,i),this.generateEdges(e,o),s.debug(`getData: processed ${i.length} nodes and ${o.length} edges`);const r=new Map;for(const s of i)r.set(s.id,{shape:s.shape,width:s.width,height:s.height,padding:s.padding});return{nodes:i,edges:o,config:n,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(r),type:"mindmap",diagramId:"mindmap-"+f()}}getLogger(){return s}},"MindmapDB"),e),S={draw:i(async(e,i,l,h)=>{var d,g;s.debug("Rendering mindmap diagram\n"+e);const u=h.db,p=u.getData(),y=t(i,p.config.securityLevel);p.type=h.type,p.layoutAlgorithm=o(p.config.layout,{fallback:"cose-bilkent"}),p.diagramId=i;if(!u.getMindmap())return;p.nodes.forEach(e=>{"rounded"===e.shape?(e.radius=15,e.taper=15,e.stroke="none",e.width=0,e.padding=15):"circle"===e.shape?e.padding=10:"rect"===e.shape?(e.width=0,e.padding=10):"hexagon"===e.shape&&(e.width=0,e.height=0)}),await r(p,y);const{themeVariables:m}=a(),{useGradient:f,gradientStart:_,gradientStop:k}=m;if(f&&_&&k){const e=y.attr("id"),t=y.append("defs").append("linearGradient").attr("id",`${e}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("stop").attr("offset","0%").attr("stop-color",_).attr("stop-opacity",1),t.append("stop").attr("offset","100%").attr("stop-color",k).attr("stop-opacity",1)}n(y,(null==(d=p.config.mindmap)?void 0:d.padding)??c.mindmap.padding,"mindmapDiagram",(null==(g=p.config.mindmap)?void 0:g.useMaxWidth)??c.mindmap.useMaxWidth)},"draw")},N=i(e=>{const{theme:t,look:n}=e;let i="";for(let s=0;s<e.THEME_COLOR_LIMIT;s++)e["lineColor"+s]=e["lineColor"+s]||e["cScaleInv"+s],g(e["lineColor"+s])?e["lineColor"+s]=u(e["lineColor"+s],20):e["lineColor"+s]=p(e["lineColor"+s],20);for(let s=0;s<e.THEME_COLOR_LIMIT;s++){const o=""+("neo"===n?Math.max(10-2*(s-1),2):17-3*s);i+=`\n .section-${s-1} rect, .section-${s-1} path, .section-${s-1} circle, .section-${s-1} polygon, .section-${s-1} path {\n fill: ${e["cScale"+s]};\n }\n .section-${s-1} text {\n fill: ${e["cScaleLabel"+s]};\n }\n .section-${s-1} span {\n color: ${e["cScaleLabel"+s]};\n }\n .node-icon-${s-1} {\n font-size: 40px;\n color: ${e["cScaleLabel"+s]};\n }\n .section-edge-${s-1}{\n stroke: ${e["cScale"+s]};\n }\n .edge-depth-${s-1}{\n stroke-width: ${o};\n }\n .section-${s-1} line {\n stroke: ${e["cScaleInv"+s]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n [data-look="neo"].mindmap-node.section-${s-1} rect, [data-look="neo"].mindmap-node.section-${s-1} path, [data-look="neo"].mindmap-node.section-${s-1} circle, [data-look="neo"].mindmap-node.section-${s-1} polygon {\n fill: ${"redux"===t||"redux-dark"===t||"neutral"===t?e.mainBkg:e["cScale"+s]};\n stroke: ${"redux"===t||"redux-dark"===t?e.nodeBorder:e["cScale"+s]};\n stroke-width: ${e.strokeWidth??2}px;\n }\n [data-look="neo"].section-edge-${s-1}{\n stroke: ${(null==t?void 0:t.includes("redux"))||"neo-dark"===t?e.nodeBorder:e["cScale"+s]};\n }\n [data-look="neo"].mindmap-node.section-${s-1} text {\n fill: ${"redux"===t||"redux-dark"===t?e.nodeBorder:e["cScaleLabel"+("neutral"===t?1:s)]};\n }\n `}return i},"genSections"),L=i((e,t,n)=>{let i="";for(let s=0;s<e;s++)i+=`\n [data-look="neo"].mindmap-node.section-${s-1} rect, [data-look="neo"].mindmap-node.section-${s-1} path, [data-look="neo"].mindmap-node.section-${s-1} circle, [data-look="neo"].mindmap-node.section-${s-1} polygon {\n stroke: url(${t}-gradient);\n fill: ${n};\n }\n .section-${s-1} line {\n stroke-width: 0;\n }`;return i},"genGradient"),x=i(e=>{const{theme:t}=e,n=e.svgId,i=e.dropShadow?e.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none";return`\n .edge {\n stroke-width: 3;\n }\n ${N(e)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${e.git0};\n }\n .section-root text {\n fill: ${e.gitBranchLabel0};\n }\n .section-root span {\n color: ${(null==t?void 0:t.includes("redux"))?e.nodeBorder:e.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n [data-look="neo"].mindmap-node {\n filter: ${i};\n }\n [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon {\n fill: ${(null==t?void 0:t.includes("redux"))?e.mainBkg:e.git0};\n }\n [data-look="neo"].mindmap-node.section-root .text-inner-tspan {\n fill: ${(null==t?void 0:t.includes("redux"))?e.nodeBorder:e["cScaleLabel"+("neutral"===t?1:0)]};\n }\n ${e.useGradient&&n&&e.mainBkg?L(e.THEME_COLOR_LIMIT,n,e.mainBkg):""}\n`},"getStyles"),v={get db(){return new b},renderer:S,parser:k,styles:x};export{v as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as t}from"./chunk-JWPE2WC7-4UUblnAa.js";import{a1 as e,a4 as a,b4 as n,g as r,s as i,a as l,b as o,o as s,n as c,_ as p,l as d,c as u,A as h,D as g,K as f,e as m,p as x,B as y}from"./mermaid.core-vavDl7Vc.js";import{p as w}from"./cynefin-VYW2F7L2-Bs61V2_s.js";import{d as v}from"./arc-048B3EAe.js";import{o as S}from"./ordinal-CVjKTKEW.js";import"./index-i_5HmRyk.js";import"./init-C0SZ43gy.js";function $(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function b(t){return t}var A=y.pie,C={sections:new Map,showData:!1},D=C.sections,T=C.showData,k=structuredClone(A),M={getConfig:p(()=>structuredClone(k),"getConfig"),clear:p(()=>{D=new Map,T=C.showData,x()},"clear"),setDiagramTitle:c,getDiagramTitle:s,setAccTitle:o,getAccTitle:l,setAccDescription:i,getAccDescription:r,addSection:p(({label:t,value:e})=>{if(e<0)throw new Error(`"${t}" has invalid value: ${e}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);D.has(t)||(D.set(t,e),d.debug(`added new section: ${t}, with value: ${e}`))},"addSection"),getSections:p(()=>D,"getSections"),setShowData:p(t=>{T=t},"setShowData"),getShowData:p(()=>T,"getShowData")},j=p((e,a)=>{t(e,a),a.setShowData(e.showData),e.sections.map(a.addSection)},"populateDb"),O={parse:p(async t=>{const e=await w("pie",t);d.debug(e),j(e,M)},"parse")},W=p(t=>`\n .pieCircle{\n stroke: ${t.pieStrokeColor};\n stroke-width : ${t.pieStrokeWidth};\n opacity : ${t.pieOpacity};\n }\n .pieCircle.highlighted{\n scale: 1.05;\n opacity: 1;\n }\n .pieCircle.highlightedOnHover:hover{\n transition-duration: 250ms;\n scale: 1.05;\n opacity: 1;\n }\n .pieOuterCircle{\n stroke: ${t.pieOuterStrokeColor};\n stroke-width: ${t.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${t.pieTitleTextSize};\n fill: ${t.pieTitleTextColor};\n font-family: ${t.fontFamily};\n }\n .slice {\n font-family: ${t.fontFamily};\n fill: ${t.pieSectionTextColor};\n font-size:${t.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${t.pieLegendTextColor};\n font-family: ${t.fontFamily};\n font-size: ${t.pieLegendTextSize};\n }\n`,"getStyles"),z=p(t=>{const r=[...t.values()].reduce((t,e)=>t+e,0),i=[...t.entries()].map(([t,e])=>({label:t,value:e})).filter(t=>t.value/r*100>=1),l=function(){var t=b,r=$,i=null,l=e(0),o=e(a),s=e(0);function c(e){var c,p,d,u,h,g=(e=n(e)).length,f=0,m=new Array(g),x=new Array(g),y=+l.apply(this,arguments),w=Math.min(a,Math.max(-a,o.apply(this,arguments)-y)),v=Math.min(Math.abs(w)/g,s.apply(this,arguments)),S=v*(w<0?-1:1);for(c=0;c<g;++c)(h=x[m[c]=c]=+t(e[c],c,e))>0&&(f+=h);for(null!=r?m.sort(function(t,e){return r(x[t],x[e])}):null!=i&&m.sort(function(t,a){return i(e[t],e[a])}),c=0,d=f?(w-g*S)/f:0;c<g;++c,y=u)p=m[c],u=y+((h=x[p])>0?h*d:0)+S,x[p]={data:e[p],index:c,value:h,startAngle:y,endAngle:u,padAngle:v};return x}return c.value=function(a){return arguments.length?(t="function"==typeof a?a:e(+a),c):t},c.sortValues=function(t){return arguments.length?(r=t,i=null,c):r},c.sort=function(t){return arguments.length?(i=t,r=null,c):i},c.startAngle=function(t){return arguments.length?(l="function"==typeof t?t:e(+t),c):l},c.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:e(+t),c):o},c.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:e(+t),c):s},c}().value(t=>t.value).sort(null);return l(i)},"createPieArcs"),F={parser:O,db:M,renderer:{draw:p((t,e,a,n)=>{var r;d.debug("rendering pie chart\n"+t);const i=n.db,l=u(),o=h(i.getConfig(),l.pie),s=18,c=450,p=c,x=g(e),y=x.append("g");y.attr("transform","translate(225,225)");const{themeVariables:w}=l;let[$]=f(w.pieOuterStrokeWidth);$??($=2);const b=o.legendPosition,A=o.textPosition,C=o.donutHole>0&&o.donutHole<=.9?o.donutHole:0,D=Math.min(p,c)/2-40,T=v().innerRadius(C*D).outerRadius(D),k=v().innerRadius(D*A).outerRadius(D*A),M=y.append("g");M.append("circle").attr("cx",0).attr("cy",0).attr("r",D+$/2).attr("class","pieOuterCircle");const j=i.getSections(),O=z(j),W=[w.pie1,w.pie2,w.pie3,w.pie4,w.pie5,w.pie6,w.pie7,w.pie8,w.pie9,w.pie10,w.pie11,w.pie12];let F=0;j.forEach(t=>{F+=t});const R=O.filter(t=>"0"!==(t.data.value/F*100).toFixed(0)),H=S(W).domain([...j.keys()]);M.selectAll("mySlices").data(R).enter().append("path").attr("d",T).attr("fill",t=>H(t.data.label)).attr("class",t=>{let e="pieCircle";return"hover"===o.highlightSlice?e+=" highlightedOnHover":o.highlightSlice===t.data.label&&(e+=" highlighted"),e}),M.selectAll("mySlices").data(R).enter().append("text").text(t=>(t.data.value/F*100).toFixed(0)+"%").attr("transform",t=>"translate("+k.centroid(t)+")").style("text-anchor","middle").attr("class","slice");const B=y.append("text").text(i.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText"),P=[...j.entries()].map(([t,e])=>({label:t,value:e})),E=y.selectAll(".legend").data(P).enter().append("g").attr("class","legend");E.append("rect").attr("width",s).attr("height",s).style("fill",t=>H(t.label)).style("stroke",t=>H(t.label)),E.append("text").attr("x",22).attr("y",14).text(t=>i.getShowData()?`${t.label} [${t.value}]`:t.label);const L=Math.max(...E.selectAll("text").nodes().map(t=>(null==t?void 0:t.getBoundingClientRect().width)??0));let N=c,V=490;const J=22,K=P.length*J;switch(b){case"center":E.attr("transform",(t,e)=>{const a=J*P.length/2;return"translate("+(-L/2-22)+","+(e*J-a)+")"});break;case"top":N+=K,E.attr("transform",(t,e)=>`translate(${-L/2-22}, ${e*J-D})`),M.attr("transform",()=>`translate(0, ${K+J})`);break;case"bottom":N+=K,E.attr("transform",(t,e)=>"translate("+(-L/2-22)+","+(e*J-(-D-J))+")");break;case"left":V+=22+L,E.attr("transform",(t,e)=>{const a=J*P.length/2;return"translate("+(-D-22)+","+(e*J-a)+")"}),M.attr("transform",()=>`translate(${L+s+4}, 0)`);break;default:V+=22+L,E.attr("transform",(t,e)=>{const a=J*P.length/2;return"translate(216,"+(e*J-a)+")"})}const Y=(null==(r=B.node())?void 0:r.getBoundingClientRect().width)??0,_=225-Y/2,q=225+Y/2,G=Math.min(0,_),I=Math.max(V,q)-G;x.attr("viewBox",`${G} 0 ${I} ${N}`),m(x,N,I,o.useMaxWidth)},"draw")},styles:W};export{F as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t,n,e;import{n as i,o as r,s,g as o,b as l,a,_ as c,c as h,b7 as u,d as f,V as y,p as d,k as g}from"./mermaid.core-vavDl7Vc.js";import{o as p}from"./ordinal-CVjKTKEW.js";import"./index-i_5HmRyk.js";import"./init-C0SZ43gy.js";const _=function(t){for(var n=t.length/6|0,e=new Array(n),i=0;i<n;)e[i]="#"+t.slice(6*i,6*++i);return e}("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function k(t,n){let e;if(void 0===n)for(const i of t)null!=i&&(e<i||void 0===e&&i>=i)&&(e=i);else{let i=-1;for(let r of t)null!=(r=n(r,++i,t))&&(e<r||void 0===e&&r>=r)&&(e=r)}return e}function x(t,n){let e;if(void 0===n)for(const i of t)null!=i&&(e>i||void 0===e&&i>=i)&&(e=i);else{let i=-1;for(let r of t)null!=(r=n(r,++i,t))&&(e>r||void 0===e&&r>=r)&&(e=r)}return e}function m(t,n){let e=0;if(void 0===n)for(let i of t)(i=+i)&&(e+=i);else{let i=-1;for(let r of t)(r=+n(r,++i,t))&&(e+=r)}return e}function v(t){return t.target.depth}function b(t,n){return t.sourceLinks.length?t.depth:n-1}function w(t){return function(){return t}}function S(t,n){return E(t.source,n.source)||t.index-n.index}function L(t,n){return E(t.target,n.target)||t.index-n.index}function E(t,n){return t.y0-n.y0}function A(t){return t.value}function M(t){return t.index}function I(t){return t.nodes}function T(t){return t.links}function P(t,n){const e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function N({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const i of n.sourceLinks)i.y0=t+i.width/2,t+=i.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function C(){let t,n,e,i=0,r=0,s=1,o=1,l=24,a=8,c=M,h=b,u=I,f=T,y=6;function d(){const d={nodes:u.apply(null,arguments),links:f.apply(null,arguments)};return function({nodes:t,links:n}){for(const[e,r]of t.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const i=new Map(t.map((n,e)=>[c(n,e,t),n]));for(const[e,r]of n.entries()){r.index=e;let{source:t,target:n}=r;"object"!=typeof t&&(t=r.source=P(i,t)),"object"!=typeof n&&(n=r.target=P(i,n)),t.sourceLinks.push(r),n.targetLinks.push(r)}if(null!=e)for(const{sourceLinks:r,targetLinks:s}of t)r.sort(e),s.sort(e)}(d),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(m(n.sourceLinks,A),m(n.targetLinks,A)):n.fixedValue}(d),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,r=0;for(;e.size;){for(const t of e){t.depth=r;for(const{target:n}of t.sourceLinks)i.add(n)}if(++r>n)throw new Error("circular link");e=i,i=new Set}}(d),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,r=0;for(;e.size;){for(const t of e){t.height=r;for(const{source:n}of t.targetLinks)i.add(n)}if(++r>n)throw new Error("circular link");e=i,i=new Set}}(d),function(e){const c=function({nodes:t}){const e=k(t,t=>t.depth)+1,r=(s-i-l)/(e-1),o=new Array(e);for(const n of t){const t=Math.max(0,Math.min(e-1,Math.floor(h.call(null,n,e))));n.layer=t,n.x0=i+t*r,n.x1=n.x0+l,o[t]?o[t].push(n):o[t]=[n]}if(n)for(const i of o)i.sort(n);return o}(e);t=Math.min(a,(o-r)/(k(c,t=>t.length)-1)),function(n){const e=x(n,n=>(o-r-(n.length-1)*t)/m(n,A));for(const i of n){let n=r;for(const r of i){r.y0=n,r.y1=n+r.value*e,n=r.y1+t;for(const t of r.sourceLinks)t.width=t.value*e}n=(o-n+t)/(i.length+1);for(let t=0;t<i.length;++t){const e=i[t];e.y0+=n*(t+1),e.y1+=n*(t+1)}O(i)}}(c);for(let t=0;t<y;++t){const n=Math.pow(.99,t),e=Math.max(1-n,(t+1)/y);p(c,n,e),g(c,n,e)}}(d),N(d),d}function g(t,e,i){for(let r=1,s=t.length;r<s;++r){const s=t[r];for(const t of s){let n=0,i=0;for(const{source:e,value:s}of t.targetLinks){let r=s*(t.layer-e.layer);n+=j(e,t)*r,i+=r}if(!(i>0))continue;let r=(n/i-t.y0)*e;t.y0+=r,t.y1+=r,$(t)}void 0===n&&s.sort(E),_(s,i)}}function p(t,e,i){for(let r=t.length-2;r>=0;--r){const s=t[r];for(const t of s){let n=0,i=0;for(const{target:e,value:s}of t.sourceLinks){let r=s*(e.layer-t.layer);n+=D(t,e)*r,i+=r}if(!(i>0))continue;let r=(n/i-t.y0)*e;t.y0+=r,t.y1+=r,$(t)}void 0===n&&s.sort(E),_(s,i)}}function _(n,e){const i=n.length>>1,s=n[i];C(n,s.y0-t,i-1,e),v(n,s.y1+t,i+1,e),C(n,o,n.length-1,e),v(n,r,0,e)}function v(n,e,i,r){for(;i<n.length;++i){const s=n[i],o=(e-s.y0)*r;o>1e-6&&(s.y0+=o,s.y1+=o),e=s.y1+t}}function C(n,e,i,r){for(;i>=0;--i){const s=n[i],o=(s.y1-e)*r;o>1e-6&&(s.y0-=o,s.y1-=o),e=s.y0-t}}function $({sourceLinks:t,targetLinks:n}){if(void 0===e){for(const{source:{sourceLinks:t}}of n)t.sort(L);for(const{target:{targetLinks:n}}of t)n.sort(S)}}function O(t){if(void 0===e)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(L),e.sort(S)}function j(n,e){let i=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:r,width:s}of n.sourceLinks){if(r===e)break;i+=s+t}for(const{source:t,width:r}of e.targetLinks){if(t===n)break;i-=r}return i}function D(n,e){let i=e.y0-(e.targetLinks.length-1)*t/2;for(const{source:r,width:s}of e.targetLinks){if(r===n)break;i+=s+t}for(const{target:t,width:r}of n.sourceLinks){if(t===e)break;i-=r}return i}return d.update=function(t){return N(t),t},d.nodeId=function(t){return arguments.length?(c="function"==typeof t?t:w(t),d):c},d.nodeAlign=function(t){return arguments.length?(h="function"==typeof t?t:w(t),d):h},d.nodeSort=function(t){return arguments.length?(n=t,d):n},d.nodeWidth=function(t){return arguments.length?(l=+t,d):l},d.nodePadding=function(n){return arguments.length?(a=t=+n,d):a},d.nodes=function(t){return arguments.length?(u="function"==typeof t?t:w(t),d):u},d.links=function(t){return arguments.length?(f="function"==typeof t?t:w(t),d):f},d.linkSort=function(t){return arguments.length?(e=t,d):e},d.size=function(t){return arguments.length?(i=r=0,s=+t[0],o=+t[1],d):[s-i,o-r]},d.extent=function(t){return arguments.length?(i=+t[0][0],s=+t[1][0],r=+t[0][1],o=+t[1][1],d):[[i,r],[s,o]]},d.iterations=function(t){return arguments.length?(y=+t,d):y},d}var $=Math.PI,O=2*$,j=1e-6,D=O-j;function z(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function F(){return new z}function W(t){return function(){return t}}function U(t){return t[0]}function G(t){return t[1]}z.prototype=F.prototype={constructor:z,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,r,s){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+r)+","+(this._y1=+s)},arcTo:function(t,n,e,i,r){t=+t,n=+n,e=+e,i=+i,r=+r;var s=this._x1,o=this._y1,l=e-t,a=i-n,c=s-t,h=o-n,u=c*c+h*h;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(u>j)if(Math.abs(h*l-a*c)>j&&r){var f=e-s,y=i-o,d=l*l+a*a,g=f*f+y*y,p=Math.sqrt(d),_=Math.sqrt(u),k=r*Math.tan(($-Math.acos((d+u-g)/(2*p*_)))/2),x=k/_,m=k/p;Math.abs(x-1)>j&&(this._+="L"+(t+x*c)+","+(n+x*h)),this._+="A"+r+","+r+",0,0,"+ +(h*f>c*y)+","+(this._x1=t+m*l)+","+(this._y1=n+m*a)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,i,r,s){t=+t,n=+n,s=!!s;var o=(e=+e)*Math.cos(i),l=e*Math.sin(i),a=t+o,c=n+l,h=1^s,u=s?i-r:r-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+a+","+c:(Math.abs(this._x1-a)>j||Math.abs(this._y1-c)>j)&&(this._+="L"+a+","+c),e&&(u<0&&(u=u%O+O),u>D?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-l)+"A"+e+","+e+",0,1,"+h+","+(this._x1=a)+","+(this._y1=c):u>j&&(this._+="A"+e+","+e+",0,"+ +(u>=$)+","+h+","+(this._x1=t+e*Math.cos(r))+","+(this._y1=n+e*Math.sin(r))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};var V=Array.prototype.slice;function X(t){return t.source}function q(t){return t.target}function B(t,n,e,i,r){t.moveTo(n,e),t.bezierCurveTo(n=(n+i)/2,e,n,r,i,r)}function Q(){return function(t){var n=X,e=q,i=U,r=G,s=null;function o(){var o,l=V.call(arguments),a=n.apply(this,l),c=e.apply(this,l);if(s||(s=o=F()),t(s,+i.apply(this,(l[0]=a,l)),+r.apply(this,l),+i.apply(this,(l[0]=c,l)),+r.apply(this,l)),o)return s=null,o+""||null}return o.source=function(t){return arguments.length?(n=t,o):n},o.target=function(t){return arguments.length?(e=t,o):e},o.x=function(t){return arguments.length?(i="function"==typeof t?t:W(+t),o):i},o.y=function(t){return arguments.length?(r="function"==typeof t?t:W(+t),o):r},o.context=function(t){return arguments.length?(s=null==t?null:t,o):s},o}(B)}function R(t){return[t.source.x1,t.y0]}function Y(t){return[t.target.x0,t.y1]}var K=function(){var t=c(function(t,n,e,i){for(e=e||{},i=t.length;i--;e[t[i]]=n);return e},"o"),n=[1,9],e=[1,10],i=[1,5,10,12],r={trace:c(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:c(function(t,n,e,i,r,s,o){var l=s.length-1;switch(r){case 7:const t=i.findOrCreateNode(s[l-4].trim().replaceAll('""','"')),n=i.findOrCreateNode(s[l-2].trim().replaceAll('""','"')),e=parseFloat(s[l].trim());i.addLink(t,n,e);break;case 8:case 9:case 11:this.$=s[l];break;case 10:this.$=s[l-1]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:e},{1:[2,6],7:11,10:[1,12]},t(e,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(i,[2,8]),t(i,[2,9]),{19:[1,16]},t(i,[2,11]),{1:[2,1]},{1:[2,5]},t(e,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:e},{15:18,16:7,17:8,18:n,20:e},{18:[1,19]},t(e,[2,3]),{12:[1,20]},t(i,[2,10]),{15:21,16:7,17:8,18:n,20:e},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:c(function(t,n){if(!n.recoverable){var e=new Error(t);throw e.hash=n,e}this.trace(t)},"parseError"),parse:c(function(t){var n=this,e=[0],i=[],r=[null],s=[],o=this.table,l="",a=0,h=0,u=s.slice.call(arguments,1),f=Object.create(this.lexer),y={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(y.yy[d]=this.yy[d]);f.setInput(t,y.yy),y.yy.lexer=f,y.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var g=f.yylloc;s.push(g);var p=f.options&&f.options.ranges;function _(){var t;return"number"!=typeof(t=i.pop()||f.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,c(function(t){e.length=e.length-2*t,r.length=r.length-t,s.length=s.length-t},"popStack"),c(_,"lex");for(var k,x,m,v,b,w,S,L,E={};;){if(x=e[e.length-1],this.defaultActions[x]?m=this.defaultActions[x]:(null==k&&(k=_()),m=o[x]&&o[x][k]),void 0===m||!m.length||!m[0]){var A="";for(b in L=[],o[x])this.terminals_[b]&&b>2&&L.push("'"+this.terminals_[b]+"'");A=f.showPosition?"Parse error on line "+(a+1)+":\n"+f.showPosition()+"\nExpecting "+L.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(A,{text:f.match,token:this.terminals_[k]||k,line:f.yylineno,loc:g,expected:L})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+k);switch(m[0]){case 1:e.push(k),r.push(f.yytext),s.push(f.yylloc),e.push(m[1]),k=null,h=f.yyleng,l=f.yytext,a=f.yylineno,g=f.yylloc;break;case 2:if(w=this.productions_[m[1]][1],E.$=r[r.length-w],E._$={first_line:s[s.length-(w||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(w||1)].first_column,last_column:s[s.length-1].last_column},p&&(E._$.range=[s[s.length-(w||1)].range[0],s[s.length-1].range[1]]),void 0!==(v=this.performAction.apply(E,[l,h,a,y.yy,m[1],r,s].concat(u))))return v;w&&(e=e.slice(0,-1*w*2),r=r.slice(0,-1*w),s=s.slice(0,-1*w)),e.push(this.productions_[m[1]][0]),r.push(E.$),s.push(E._$),S=o[e[e.length-2]][e[e.length-1]],e.push(S);break;case 3:return!0}}return!0},"parse")},s=function(){return{EOF:1,parseError:c(function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},"parseError"),setInput:c(function(t,n){return this.yy=n||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:c(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:c(function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;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),e.length-1&&(this.yylineno-=e.length-1);var r=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:e?(e.length===i.length?this.yylloc.first_column:0)+i[i.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(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:c(function(t){this.unput(this.match.slice(t))},"less"),pastInput:c(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:c(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:c(function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"},"showPosition"),test_match:c(function(t,n){var e,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.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],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1},"test_match"),next:c(function(){if(this.done)return this.EOF;var t,n,e,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;s<r.length;s++)if((e=this._input.match(this.rules[r[s]]))&&(!n||e[0].length>n[0].length)){if(n=e,i=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,r[s])))return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?!1!==(t=this.test_match(n,r[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:c(function(){var t=this.next();return t||this.lex()},"lex"),begin:c(function(t){this.conditionStack.push(t)},"begin"),popState:c(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:c(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:c(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:c(function(t){this.begin(t)},"pushState"),stateStackSize:c(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:c(function(t,n,e,i){switch(e){case 0:case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}}}();function o(){this.yy={}}return r.lexer=s,c(o,"Parser"),o.prototype=r,r.Parser=o,new o}();K.parser=K;var Z=K,H=[],J=[],tt=new Map,nt=c(()=>{H=[],J=[],tt=new Map,d()},"clear"),et=(c(t=class{constructor(t,n,e=0){this.source=t,this.target=n,this.value=e}},"SankeyLink"),t),it=c((t,n,e)=>{H.push(new et(t,n,e))},"addLink"),rt=(c(n=class{constructor(t){this.ID=t}},"SankeyNode"),n),st=c(t=>{t=g.sanitizeText(t,h());let n=tt.get(t);return void 0===n&&(n=new rt(t),tt.set(t,n),J.push(n)),n},"findOrCreateNode"),ot=c(()=>J,"getNodes"),lt=c(()=>H,"getLinks"),at=c(()=>({nodes:J.map(t=>({id:t.ID})),links:H.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),ct={nodesMap:tt,getConfig:c(()=>h().sankey,"getConfig"),getNodes:ot,getLinks:lt,getGraph:at,addLink:it,findOrCreateNode:st,getAccTitle:a,setAccTitle:l,getAccDescription:o,setAccDescription:s,getDiagramTitle:r,setDiagramTitle:i,clear:nt},ht=(c(e=class{static next(t){return new e(t+ ++e.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},"Uid"),e.count=0,e),ut={left:function(t){return t.depth},right:function(t,n){return n-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?x(t.sourceLinks,v)-1:0},justify:b},ft=c(t=>{let n=0,e=0;for(const i of t){const t=i.value??0;t>n&&(n=t,e=i.layer??0)}return e},"findCentralNodeLayer"),yt={draw:c(function(t,n,e,i){const{securityLevel:r,sankey:s}=h(),o=u.sankey;let l;"sandbox"===r&&(l=f("#i"+n));const a=f("sandbox"===r?l.nodes()[0].contentDocument.body:"body"),d="sandbox"===r?a.select(`[id="${n}"]`):f(`[id="${n}"]`),g=(null==s?void 0:s.width)??o.width,k=(null==s?void 0:s.height)??o.width,x=(null==s?void 0:s.useMaxWidth)??o.useMaxWidth,m=(null==s?void 0:s.nodeAlignment)??o.nodeAlignment,v=(null==s?void 0:s.prefix)??o.prefix,b=(null==s?void 0:s.suffix)??o.suffix,w=(null==s?void 0:s.showValues)??o.showValues,S=(null==s?void 0:s.nodeWidth)??o.nodeWidth??10,L=(null==s?void 0:s.nodePadding)??o.nodePadding??12,E=(null==s?void 0:s.labelStyle)??o.labelStyle??"legacy",A=(null==s?void 0:s.nodeColors)??{},M=i.db.getGraph(),I=ut[m];C().nodeId(t=>t.id).nodeWidth(S).nodePadding(L+(w?15:0)).nodeAlign(I).extent([[0,0],[g,k]])(M);const T=ft(M.nodes),P=p(_),N=c(t=>A[t]??P(t),"getNodeColor");d.append("g").attr("class","nodes").selectAll(".node").data(M.nodes).join("g").attr("class","node").attr("id",t=>(t.uid=ht.next("node-")).id).attr("transform",function(t){return"translate("+t.x0+","+t.y0+")"}).attr("x",t=>t.x0).attr("y",t=>t.y0).append("rect").attr("height",t=>t.y1-t.y0).attr("width",t=>t.x1-t.x0).attr("fill",t=>N(t.id));const $=c(({id:t,value:n})=>w?`${t}\n${v}${Math.round(100*n)/100}${b}`:t,"getText"),O=c(t=>{if("outlined"===E){return(t.layer??0)<T?{x:t.x0-6,anchor:"end"}:{x:t.x1+6,anchor:"start"}}return t.x0<g/2?{x:t.x1+6,anchor:"start"}:{x:t.x0-6,anchor:"end"}},"getLabelPosition"),j=d.append("g").attr("class","node-labels").attr("font-size",14),D=c(t=>j.selectAll(t?`.${t}`:"text").data(M.nodes).join("text").attr("class",t??null).attr("x",t=>O(t).x).attr("y",t=>(t.y1+t.y0)/2).attr("dy",(w?"0":"0.35")+"em").attr("text-anchor",t=>O(t).anchor).text($),"appendLabel");"outlined"===E?(D("sankey-label-bg"),D("sankey-label-fg")):D();const z=d.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(M.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),F=(null==s?void 0:s.linkColor)??"gradient";if("gradient"===F){const t=z.append("linearGradient").attr("id",t=>(t.uid=ht.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",t=>t.source.x1).attr("x2",t=>t.target.x0);t.append("stop").attr("offset","0%").attr("stop-color",t=>N(t.source.id)),t.append("stop").attr("offset","100%").attr("stop-color",t=>N(t.target.id))}let W;switch(F){case"gradient":W=c(t=>t.uid,"coloring");break;case"source":W=c(t=>N(t.source.id),"coloring");break;case"target":W=c(t=>N(t.target.id),"coloring");break;default:W=F}z.append("path").attr("d",Q().source(R).target(Y)).attr("stroke",W).attr("stroke-width",t=>Math.max(1,t.width)),y(void 0,d,0,x)},"draw")},dt=c(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim(),"prepareTextForParsing"),gt=c(t=>`.label {\n font-family: ${t.fontFamily};\n }\n\n .node-labels {\n font-family: ${t.fontFamily};\n }\n\n /* Outlined label style - background stroke for better readability */\n .sankey-label-bg {\n stroke: ${t.mainBkg||t.background||"#fff"};\n stroke-width: 4px;\n stroke-linejoin: round;\n paint-order: stroke;\n }\n\n /* Foreground label text */\n .sankey-label-fg {\n fill: ${t.textColor};\n }\n\n /* Node styling */\n .node rect {\n shape-rendering: crispEdges;\n }\n\n /* Link styling */\n .link {\n fill: none;\n stroke-opacity: 0.5;\n mix-blend-mode: multiply;\n }\n`,"getStyles"),pt=Z.parse.bind(Z);Z.parse=t=>pt(dt(t));var _t={styles:gt,parser:Z,db:ct,renderer:yt};export{_t as diagram};
|