@softistx/pulsarix-widget 0.8.5 → 0.10.0
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/README.md +76 -48
- package/dist/chunks/{abnfDiagram-XWFEHMT6.b9yk4x5x.js → abnfDiagram-XWFEHMT6.rxx9wyp3.js} +1 -1
- package/dist/chunks/architecture-WOLXFQ4H.hwrxbct0.js +1 -0
- package/dist/chunks/architectureDiagram-CSQXQB3N.mrm0pgc0.js +36 -0
- package/dist/chunks/{blockDiagram-BEDRHYPZ.bb08b9nt.js → blockDiagram-BEDRHYPZ.f4dfpk7e.js} +11 -11
- package/dist/chunks/{c4Diagram-M2UUVUY5.px0epccd.js → c4Diagram-M2UUVUY5.rz43j1my.js} +3 -3
- package/dist/chunks/{chat-markdown-CrbWbK1O.k4nmgyey.js → chat-markdown-BSu4FB_l.xgn4yj83.js} +29 -29
- package/dist/chunks/{classDiagram-v2-KXABOMEV.f02387t9.js → classDiagram-v2-KXABOMEV.m96cfcad.js} +8 -8
- package/dist/chunks/cose-bilkent-JH36ORCC.zz2rwyw6.js +1 -0
- package/dist/chunks/cynefin-EF2NZ3EQ.y29bn1cz.js +1 -0
- package/dist/chunks/{cynefinDiagram-NJNITYFG.zt7gprt1.js → cynefinDiagram-NJNITYFG.az2k68wq.js} +1 -1
- package/dist/chunks/{dagre-KIHZ2IZ3.702bqbr9.js → dagre-KIHZ2IZ3.mgwg8bc4.js} +2 -2
- package/dist/chunks/{diagram-7YQZDPLS.m7vf21j6.js → diagram-7YQZDPLS.x8fg6705.js} +2 -2
- package/dist/chunks/{diagram-QBROCOUO.33e5hv7x.js → diagram-QBROCOUO.db60dsss.js} +24 -24
- package/dist/chunks/{diagram-RJJCUUZO.94k74bz7.js → diagram-RJJCUUZO.a7e9w297.js} +4 -4
- package/dist/chunks/{diagram-WERXNKYE.7fe849z6.js → diagram-WERXNKYE.a04f53kd.js} +2 -2
- package/dist/chunks/diagram-YHHI257C.v19jhmrh.js +3 -0
- package/dist/chunks/{diagram-YR4HJLHV.310x2we2.js → diagram-YR4HJLHV.c5e87gmw.js} +1 -1
- package/dist/chunks/{ebnfDiagram-N527522P.a4crteq1.js → ebnfDiagram-N527522P.bjrxfgze.js} +1 -1
- package/dist/chunks/editor-shortcuts-dialog-Cz3T8435.5ve4nsaw.js +1 -0
- package/dist/chunks/editor.yak1qktd.js +4 -0
- package/dist/chunks/{elk-O5DQBFGD.dx61etan.js → elk-O5DQBFGD.1ydp0b7a.js} +13 -13
- package/dist/chunks/emoji-picker-00Bw2c2b.gzznrrz5.js +4 -0
- package/dist/chunks/{erDiagram-K3K3BIDK.qzqv67zm.js → erDiagram-K3K3BIDK.g171ckq1.js} +8 -8
- package/dist/chunks/eventmodeling-K75KTNOO.46qfxqj7.js +1 -0
- package/dist/chunks/{flow-diagram-AiM6FiIm.73jr19pb.js → flow-diagram-DGZOc1z1.3gbgbm5m.js} +6 -6
- package/dist/chunks/flowDiagram-Z6JWZHQI.f0eaj70g.js +1 -0
- package/dist/chunks/{ganttDiagram-3PRQTZWP.xngzb32h.js → ganttDiagram-3PRQTZWP.3b9dh4nr.js} +5 -5
- package/dist/chunks/gitGraph-VSP46ZUC.swware7n.js +1 -0
- package/dist/chunks/{gitGraphDiagram-VXDFKS5L.1sm36z2q.js → gitGraphDiagram-VXDFKS5L.thyp7vsd.js} +22 -22
- package/dist/chunks/{grid-E2QIVN74.76pgtn2n.js → grid-E2QIVN74.entqjpa3.js} +1 -1
- package/dist/chunks/illustration-BcaGDjvB.1q9xtmyq.js +1 -0
- package/dist/chunks/{index.r0p3fm9f.js → index.0g1t1pjx.js} +1 -1
- package/dist/chunks/{index.rfyzb2yv.js → index.35d4zbh8.js} +4 -4
- package/dist/chunks/index.5fcbba6e.js +2 -0
- package/dist/chunks/{index.7gxz6d1f.js → index.6pzexww5.js} +10 -10
- package/dist/chunks/{index.zm5x44tn.js → index.8vaktk8x.js} +1 -1
- package/dist/chunks/{index.dnnzjw18.js → index.8zg579vd.js} +2 -2
- package/dist/chunks/{index.0k4tbjhp.js → index.9n1y396a.js} +1 -1
- package/dist/chunks/{index.8f3x951p.js → index.a3njhfdd.js} +2 -2
- package/dist/chunks/{index.a6rz456z.js → index.cw97ff3b.js} +2 -2
- package/dist/chunks/{index.fv9af3wd.js → index.d57x7pg9.js} +6 -6
- package/dist/chunks/{index.fbeztcp3.js → index.g2ba0pke.js} +2 -2
- package/dist/chunks/index.h1xzvasx.js +2 -0
- package/dist/chunks/{index.hvdnkr5m.js → index.qr6a02kx.js} +2 -2
- package/dist/chunks/index.rkgfxpm3.js +44 -0
- package/dist/chunks/index.sw8gvntb.js +2 -0
- package/dist/chunks/{index.0e4s8r4m.js → index.v02zf4zg.js} +2 -2
- package/dist/chunks/{index.t34t6kpe.js → index.w1516g8q.js} +35 -35
- package/dist/chunks/{index.9bf5qrah.js → index.w4emtsqw.js} +2 -2
- package/dist/chunks/{index.nsckd1vt.js → index.yhmqh641.js} +2 -2
- package/dist/chunks/{index.1d7qpsyx.js → index.zkngte5k.js} +2 -2
- package/dist/chunks/{index.a1bxkgd3.js → index.zkx4ryzt.js} +104 -104
- package/dist/chunks/info-OHQRW6UA.1er9b42t.js +1 -0
- package/dist/chunks/{infoDiagram-EZ3ZOAHP.pfd0fjwn.js → infoDiagram-EZ3ZOAHP.833fvq8n.js} +2 -2
- package/dist/chunks/{ishikawaDiagram-S3EKX5GW.h5kjez1x.js → ishikawaDiagram-S3EKX5GW.q3evaw24.js} +5 -5
- package/dist/chunks/{journeyDiagram-POQNLL5X.55cqc9p0.js → journeyDiagram-POQNLL5X.9werrmpy.js} +5 -5
- package/dist/chunks/{kanban-definition-BH5XI6FM.pkdvda4y.js → kanban-definition-BH5XI6FM.f3ssda0m.js} +7 -7
- package/dist/chunks/markup-color-chrome-ykGNUl8y.pcgw4znz.js +1 -0
- package/dist/chunks/markup-custom-color-MM-HnrqY.sygnt3gs.js +1 -0
- package/dist/chunks/mention-list-6cR5VSPa.x0x55xzp.js +1 -0
- package/dist/chunks/{mermaid.core.j7s05j63.js → mermaid.core.5cqab0cw.js} +7 -7
- package/dist/chunks/{mindmap-definition-WVAN44T4.x3jbxvft.js → mindmap-definition-WVAN44T4.pjjxgse0.js} +6 -6
- package/dist/chunks/packet-JDAUHWVQ.t5jwb2rb.js +1 -0
- package/dist/chunks/panel.2vwd6k3h.js +7 -0
- package/dist/chunks/{pegDiagram-D4NLKWP3.xq15gqy9.js → pegDiagram-D4NLKWP3.mdacgbzb.js} +1 -1
- package/dist/chunks/pie-XZMESJXO.pe88zesw.js +1 -0
- package/dist/chunks/pieDiagram-36ENHN4W.fb0d6a9w.js +39 -0
- package/dist/chunks/plated-illustration-pTqcYOQg.6b9fm4a7.js +1 -0
- package/dist/chunks/{quadrantDiagram-ZQUDMS73.k28g8jpn.js → quadrantDiagram-ZQUDMS73.m5cgqatg.js} +4 -4
- package/dist/chunks/radar-ABXABTNO.jtbddwfq.js +1 -0
- package/dist/chunks/railroad-I3PHUGI6.kvyt0f9s.js +1 -0
- package/dist/chunks/railroad-abnf-LNEFI6M7.ybx0vspg.js +1 -0
- package/dist/chunks/railroad-ebnf-DWYD2UWJ.yx4c4enn.js +1 -0
- package/dist/chunks/railroad-peg-JR7BVNR7.mb71eyqe.js +1 -0
- package/dist/chunks/{railroadDiagram-JIZHGYPL.e7p2vqgg.js → railroadDiagram-JIZHGYPL.w2e1k61e.js} +1 -1
- package/dist/chunks/{render-VIF2ZAQL.w5ytncsg.js → render-VIF2ZAQL.exs2rt60.js} +1 -1
- package/dist/chunks/{requirementDiagram-AXW2TVFA.arekdz02.js → requirementDiagram-AXW2TVFA.mrxb120d.js} +4 -4
- package/dist/chunks/{sankeyDiagram-FBCJTAIF.1d04xcmb.js → sankeyDiagram-FBCJTAIF.csj5n1sg.js} +6 -6
- package/dist/chunks/{sequenceDiagram-3LA2ROMG.j4xywwp1.js → sequenceDiagram-3LA2ROMG.73qx1ab4.js} +11 -11
- package/dist/chunks/{sizeCapture-2Q2CQKSF.862bnf6p.js → sizeCapture-2Q2CQKSF.vfe8maj3.js} +1 -1
- package/dist/chunks/{stateDiagram-v2-ATKHQDJO.xvvtr0y2.js → stateDiagram-v2-ATKHQDJO.h4grfmy4.js} +8 -8
- package/dist/chunks/{swimlanes-YQL5WMAO.dtnjb4xt.js → swimlanes-YQL5WMAO.e2y8jam1.js} +1 -1
- package/dist/chunks/swimlanesDiagram-UCCPES4V.dtthssd5.js +8 -0
- package/dist/chunks/{timeline-definition-7Z437IG3.zfhqzc4r.js → timeline-definition-7Z437IG3.2zxa6hz5.js} +9 -9
- package/dist/chunks/treeView-D4JQ5SDB.3kgztv30.js +1 -0
- package/dist/chunks/treemap-SAJKECNS.xj47e2ae.js +1 -0
- package/dist/chunks/{usecaseDiagram-RDK6N6HP.ewxnyz4c.js → usecaseDiagram-RDK6N6HP.61cdyktj.js} +57 -57
- package/dist/chunks/{vennDiagram-SHRQU5PJ.wkzf1f00.js → vennDiagram-SHRQU5PJ.4tspw3rs.js} +7 -7
- package/dist/chunks/wardley-7MLQ67FV.pckbr6zr.js +1 -0
- package/dist/chunks/{wardleyDiagram-F3OXNVQS.srjfm4nb.js → wardleyDiagram-F3OXNVQS.q2p8tshx.js} +4 -4
- package/dist/chunks/{xychartDiagram-GDYJKCDI.xfa2vexk.js → xychartDiagram-GDYJKCDI.69desp9j.js} +5 -5
- package/dist/index.js +48 -21
- package/dist/react.js +74 -0
- package/dist/server.js +20 -0
- package/dist/types/config.d.ts +1 -1
- package/dist/types/mount.d.ts +1 -1
- package/dist/types/react.d.ts +27 -0
- package/dist/types/server.d.ts +15 -0
- package/docs/integration.md +109 -36
- package/package.json +20 -5
- package/dist/chunks/architecture-WOLXFQ4H.aft3rkrr.js +0 -1
- package/dist/chunks/architectureDiagram-CSQXQB3N.qz18rz0g.js +0 -36
- package/dist/chunks/cose-bilkent-JH36ORCC.azq9k24r.js +0 -1
- package/dist/chunks/cynefin-EF2NZ3EQ.dk039jny.js +0 -1
- package/dist/chunks/diagram-YHHI257C.qjjjfq7w.js +0 -3
- package/dist/chunks/editor-shortcuts-dialog-B0ppoiza.x3p4h07t.js +0 -1
- package/dist/chunks/editor.arg3zy29.js +0 -4
- package/dist/chunks/emoji-picker-CbvQZ2ZL.nst616hd.js +0 -4
- package/dist/chunks/eventmodeling-K75KTNOO.gmm1bcak.js +0 -1
- package/dist/chunks/flowDiagram-Z6JWZHQI.fzwqg115.js +0 -1
- package/dist/chunks/gitGraph-VSP46ZUC.0m8jykgw.js +0 -1
- package/dist/chunks/illustration-BOW28wq5.bkz28k1x.js +0 -1
- package/dist/chunks/index.32jxrb9b.js +0 -2
- package/dist/chunks/index.7k5v3p25.js +0 -2
- package/dist/chunks/index.e35b4yh5.js +0 -44
- package/dist/chunks/index.wrjdgn4c.js +0 -2
- package/dist/chunks/info-OHQRW6UA.e0a85drn.js +0 -1
- package/dist/chunks/markup-color-chrome-ykGNUl8y.0ds56d6x.js +0 -1
- package/dist/chunks/markup-custom-color-Dgm2hHI7.7darvajx.js +0 -1
- package/dist/chunks/mention-list-CkAUzPBG.mtjgmmzb.js +0 -1
- package/dist/chunks/packet-JDAUHWVQ.52409p3r.js +0 -1
- package/dist/chunks/panel.9tp7gr60.js +0 -7
- package/dist/chunks/pie-XZMESJXO.q5kre8cx.js +0 -1
- package/dist/chunks/pieDiagram-36ENHN4W.8h0wam54.js +0 -39
- package/dist/chunks/plated-illustration-COZYWJ81.xy7ba5mq.js +0 -1
- package/dist/chunks/radar-ABXABTNO.yk872k2n.js +0 -1
- package/dist/chunks/railroad-I3PHUGI6.9wfa6vs3.js +0 -1
- package/dist/chunks/railroad-abnf-LNEFI6M7.70zznk3b.js +0 -1
- package/dist/chunks/railroad-ebnf-DWYD2UWJ.4pvdng0p.js +0 -1
- package/dist/chunks/railroad-peg-JR7BVNR7.ev15ebp6.js +0 -1
- package/dist/chunks/swimlanesDiagram-UCCPES4V.0q8kd5qn.js +0 -8
- package/dist/chunks/treeView-D4JQ5SDB.3fzswdjp.js +0 -1
- package/dist/chunks/treemap-SAJKECNS.cgh74bhn.js +0 -1
- package/dist/chunks/wardley-7MLQ67FV.6q5tgt0s.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e}from"./index.
|
|
1
|
+
import{e}from"./index.zkx4ryzt.js";var h=1;function s(i){return`edge-label-${i.start}-${i.end}-${i.id}`}e(s,"edgeLabelFixtureId");function l(i){return`group-title-${i.id}`}e(l,"groupTitleFixtureId");function a(){if(typeof globalThis>"u")return;return globalThis}e(a,"getCaptureGlobal");function f(){return Boolean(a()?.mermaidCaptureSizes)}e(f,"shouldCaptureSizes");function c(){if(typeof location>"u")return"browser-dev";return`${location.pathname}${location.search}`}e(c,"capturedFromLocation");function p(i,d){let o=a();if(!o)return;let n=d.node(),u=((n&&"ownerSVGElement"in n?n.ownerSVGElement:null)??n)?.id??"(unknown)";o.mermaidCapturedSizes??=[];let r={svgId:u,sizes:i};o.mermaidCapturedSizes.push(r),o.mermaidLastCapturedSizes=r}e(p,"emitCapturedSizes");function m(i,d){let o=[];for(let t of d.nodes){if(t.isGroup)continue;o.push({id:t.id,width:t.width??0,height:t.height??0})}let n=new Set(o.map((t)=>t.id));for(let t of d.edges){let u=typeof t.label==="string"?t.label.trim():t.label,r=s(t);if(!u||n.has(r)||typeof t.width!=="number")continue;n.add(r),o.push({id:r,width:t.width,height:t.height??0})}for(let t of d.nodes)if(t.isGroup&&t.labelBBox)o.push({id:l(t),width:t.labelBBox.width,height:t.labelBBox.height});if(o.length===0)return;p({metadata:{captureVersion:h,capturedAt:new Date().toISOString(),capturedFrom:c()},nodes:o},i)}e(m,"captureNodeSizes");export{m as captureNodeSizes};
|
package/dist/chunks/{stateDiagram-v2-ATKHQDJO.xvvtr0y2.js → stateDiagram-v2-ATKHQDJO.h4grfmy4.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{e,n,
|
|
2
|
-
`+
|
|
3
|
-
Expecting `+
|
|
4
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(c){this.unput(this.match.slice(c))},"less"),pastInput:e(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var c=this.match;if(c.length<20)c+=this._input.substr(0,20-c.length);return(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var c=this.pastInput(),
|
|
5
|
-
`+
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var p=this.next();if(p)return p;else return this.lex()},"lex"),begin:e(function(p){this.conditionStack.push(p)},"begin"),popState:e(function(){var p=this.conditionStack.length-1;if(p>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(p){if(p=this.conditionStack.length-1-Math.abs(p||0),p>=0)return this.conditionStack[p];else return"INITIAL"},"topState"),pushState:e(function(p){this.begin(p)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(p,a,T,v){function i(){let h=a.yytext.indexOf("%%");if(h===0)return!1;if(h>0){let X=a.yytext.slice(0,h),J=a.yytext.slice(h);if(J)p.lexer.unput(J);a.yytext=X}return!0}e(i,"processId");var it=v;switch(T){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState("SCALE"),17;break;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;break;case 17:return this.popState(),"acc_title_value";break;case 18:return this.begin("acc_descr"),35;break;case 19:return this.popState(),"acc_descr_value";break;case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;break;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 25:return this.popState(),this.pushState("CLASSDEFID"),42;break;case 26:return this.popState(),43;break;case 27:return this.pushState("CLASS"),48;break;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;break;case 29:return this.popState(),50;break;case 30:return this.pushState("STYLE"),45;break;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;break;case 32:return this.popState(),47;break;case 33:return this.pushState("SCALE"),17;break;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),25;break;case 38:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),26;break;case 39:return this.popState(),a.yytext=a.yytext.slice(0,-10).trim(),27;break;case 40:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),25;break;case 41:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),26;break;case 42:return this.popState(),a.yytext=a.yytext.slice(0,-10).trim(),27;break;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";break;case 49:if(!i())return;return this.popState(),"ID";break;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:throw Error('Error: State name must be a single word. Found: "'+a.yytext.trim()+'"');case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;break;case 56:return this.popState(),21;break;case 57:break;case 58:return this.begin("NOTE"),29;break;case 59:return this.popState(),this.pushState("NOTE_ID"),59;break;case 60:return this.popState(),this.pushState("NOTE_ID"),60;break;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 63:break;case 64:return"NOTE_TEXT";case 65:if(!i())return;return this.popState(),"ID";break;case 66:if(!i())return;return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 67:return this.popState(),a.yytext=a.yytext.substr(2).trim(),31;break;case 68:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),31;break;case 69:return 6;case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!i())return;return 24;case 74:return a.yytext=a.yytext.trim(),14;break;case 75:return 15;case 76:return 28;case 77:return 58;case 78:return 5;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}}};return Q}();Lt.lexer=ue;function kt(){this.yy={}}return e(kt,"Parser"),kt.prototype=Lt,Lt.Parser=kt,new kt}();Pt.parser=Pt;var me=Pt,be="TB",qt="TB",jt="dir",ot="state",nt="root",Bt="relation",ke="classDef",Te="style",De="applyClass",ut="default",Qt="divider",Zt="fill:none",te="fill: #333",ee="c",se="markdown",re="normal",$t="rect",Ft="rectWithTitle",Ce="stateStart",xe="stateEnd",Gt="divider",Ut="roundedWithTitle",Le="note",we="noteGroup",ft="statediagram",Ie="state",Ne=`${ft}-${Ie}`,ie="transition",Oe="note",Re="note-edge",$e=`${ie} ${Re}`,Fe=`${ft}-${Oe}`,Be="cluster",Ge=`${ft}-${Be}`,Ye="cluster-alt",Ve=`${ft}-${Ye}`,ae="parent",ne="note",Me="state",Yt="----",We=`${Yt}${ne}`,Ht=`${Yt}${ae}`,At=new Map,Z=0,oe=0,ct=new Map,je=e((t,s,l,r)=>{if(t===Gt&&l?.id!==void 0&&ct.has(l.id)){let g=ct.get(l.id);return ct.set(s,g),g}let d=oe++,f=r?void 0:d;return ct.set(s,f),f},"colorSlotFor");function xt(t="",s=0,l="",r=Yt){let d=l!==null&&l.length>0?`${r}${l}`:"";return`${Me}-${t}${d}-${s}`}e(xt,"stateDomId");var Ue=e((t,s,l,r,d,f,g,b)=>{n.trace("items",s),s.forEach((o)=>{switch(o.stmt){case ot:dt(t,o,l,r,d,f,g,b);break;case ut:dt(t,o,l,r,d,f,g,b);break;case Bt:{dt(t,o.state1,l,r,d,f,g,b),dt(t,o.state2,l,r,d,f,g,b);let E=g==="neo",_={id:"edge"+Z,start:o.state1.id,end:o.state2.id,arrowhead:"normal",arrowTypeEnd:E?"arrow_barb_neo":"arrow_barb",style:Zt,labelStyle:"",label:y.sanitizeText(o.description??"",u()),arrowheadStyle:te,labelpos:ee,labelType:se,thickness:re,classes:ie,look:g};d.push(_),Z++}break}})},"setupDoc"),zt=e((t,s=qt)=>{let l=s;if(t.doc){for(let r of t.doc)if(r.stmt==="dir")l=r.value}return l},"getDir");function ht(t,s,l){if(!s.id||s.id==="</join></fork>"||s.id==="</choice>")return;if(s.cssClasses){if(!Array.isArray(s.cssCompiledStyles))s.cssCompiledStyles=[];s.cssClasses.split(" ").forEach((d)=>{let f=l.get(d);if(f)s.cssCompiledStyles=[...s.cssCompiledStyles??[],...f.styles]})}let r=t.find((d)=>d.id===s.id);if(r)Object.assign(r,s);else t.push(s)}e(ht,"insertOrUpdateNode");function le(t){return t?.classes?.join(" ")??""}e(le,"getClassesFromDbInfo");function ce(t){return t?.styles??[]}e(ce,"getStylesFromDbInfo");var dt=e((t,s,l,r,d,f,g,b)=>{let o=s.id,E=l.get(o),_=le(E),B=ce(E),G=u(),W=_.trim()!==""||B.length>0;if(n.info("dataFetcher parsedItem",s,E,B),o!=="root"){let w=$t;if(s.start===!0)w=Ce;else if(s.start===!1)w=xe;if(s.type!==ut)w=s.type;if(!At.get(o))At.set(o,{id:o,shape:w,description:y.sanitizeText(o,G),cssClasses:`${_} ${Ne}`,cssStyles:B});let S=At.get(o);if(s.description){if(Array.isArray(S.description))S.shape=Ft,S.description.push(s.description);else if(S.description?.length&&S.description.length>0)if(S.shape=Ft,S.description===o)S.description=[s.description];else S.description=[S.description,s.description];else S.shape=$t,S.description=s.description;S.description=y.sanitizeTextOrArray(S.description,G)}if(S.description?.length===1&&S.shape===Ft)if(S.type==="group")S.shape=Ut;else S.shape=$t;if(!S.type&&s.doc)n.info("Setting cluster for XCX",o,zt(s)),S.type="group",S.isGroup=!0,S.dir=zt(s),S.shape=s.type===Qt?Gt:Ut,S.colorIndex=je(S.shape,o,t,W),S.cssClasses=`${S.cssClasses} ${Ge} ${f?Ve:""}`;let Y={labelStyle:"",shape:S.shape,label:S.description,cssClasses:S.cssClasses,cssCompiledStyles:[],cssStyles:S.cssStyles,id:o,dir:S.dir,domId:xt(o,Z),type:S.type,isGroup:S.type==="group",colorIndex:S.colorIndex,padding:8,rx:10,ry:10,look:g,labelType:"markdown"};if(Y.shape===Gt)Y.label="";if(t&&t.id!=="root")n.trace("Setting node ",o," to be child of its parent ",t.id),Y.parentId=t.id;if(Y.centerLabel=!0,s.note){let N={labelStyle:"",shape:Le,label:s.note.text,labelType:"markdown",cssClasses:Fe,cssStyles:[],cssCompiledStyles:[],id:o+We+"-"+Z,domId:xt(o,Z,ne),type:"node",isGroup:!1,padding:G.flowchart?.padding,look:g,position:s.note.position},H=o+Ht,V={labelStyle:"",shape:we,label:s.note.text,cssClasses:S.cssClasses,cssStyles:[],id:o+Ht,domId:xt(o,Z,ae),type:"group",isGroup:!0,padding:16,look:g,position:s.note.position};Z++,V.id=H,N.parentId=H,ht(r,V,b),ht(r,N,b),ht(r,Y,b);let K=o,x=N.id;if(s.note.position==="left of")K=N.id,x=o;d.push({id:K+"-"+x,start:K,end:x,arrowhead:"none",arrowTypeEnd:"",style:Zt,labelStyle:"",classes:$e,pattern:"dashed",arrowheadStyle:te,labelpos:ee,labelType:se,thickness:re,look:g})}else ht(r,Y,b)}if(s.doc)n.trace("Adding nodes children "),Ue(s,s.doc,l,r,d,!f,g,b)},"dataFetcher"),He=e(()=>{At.clear(),Z=0,oe=0,ct.clear()},"reset"),de=e((t,s=qt)=>{if(!t.doc)return s;let l=s;for(let r of t.doc)if(r.stmt==="dir")l=r.value;return l},"getDir"),ze=e(function(t,s){return s.db.getClasses()},"getClasses"),Ke=e(async function(t,s,l,r){n.info("REF0:"),n.info("Drawing state diagram (v2)",s);let{securityLevel:d,state:f,layout:g}=u();r.db.extract(r.db.getRootDocV2());let b=r.db.getData(),o=Ee(s,d);if(b.type=r.type,b.layoutAlgorithm=_e(g),b.nodeSpacing=f?.nodeSpacing||50,b.rankSpacing=f?.rankSpacing||50,u().look==="neo")b.markers=["barbNeo"];else b.markers=["barb"];b.diagramId=s,await Ae(b,o);let _=8;try{(typeof r.db.getLinks==="function"?r.db.getLinks():new Map).forEach((G,W)=>{let w=typeof W==="string"?W:typeof W?.id==="string"?W.id:"",S=b.nodes.find((x)=>x.id===w);if(!w){n.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(W));return}let Y=o.node()?.querySelectorAll("g.node, g.rough-node"),N;if(Y?.forEach((x)=>{let st=x.textContent?.trim();if(x.id===S?.domId||st===w)N=x}),!N){n.warn("⚠️ Could not find node matching text:",w);return}let H=N.parentNode;if(!H){n.warn("⚠️ Node has no parent, cannot wrap:",w);return}let V=document.createElementNS("http://www.w3.org/2000/svg","a"),K=G.url.replace(/^"+|"+$/g,"");if(V.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",K),V.setAttribute("target","_blank"),G.tooltip){let x=G.tooltip.replace(/^"+|"+$/g,"");V.setAttribute("title",x),N.setAttribute("title",x)}H.replaceChild(V,N),V.appendChild(N),n.info("\uD83D\uDD17 Wrapped node in <a> tag for:",w,G.url)})}catch(B){n.error("❌ Error injecting clickable links:",B)}z.insertTitle(o,"statediagramTitleText",f?.titleTopMargin??25,r.db.getDiagramTitle()),ge(o,_,ft,f?.useMaxWidth??!0)},"draw"),Xe={getClasses:ze,draw:Ke,getDir:de},P={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Kt=e(()=>new Map,"newClassesList"),Jt=e(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),Dt=e((t)=>JSON.parse(JSON.stringify(t)),"clone"),Je=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Kt(),this.documents={root:Jt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=R,this.setAccTitle=L,this.getAccDescription=M,this.setAccDescription=I,this.setDiagramTitle=D,this.getDiagramTitle=O,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)}static{e(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){this.clear(!0);for(let r of Array.isArray(t)?t:t.doc)switch(r.stmt){case ot:this.addState(r.id.trim(),r.type,r.doc,r.description,r.note);break;case Bt:this.addRelation(r.state1,r.state2,r.description);break;case ke:this.addStyleClass(r.id.trim(),r.classes);break;case Te:this.handleStyleDef(r);break;case De:this.setCssClass(r.id.trim(),r.styleClass);break;case"click":this.addLink(r.id,r.url,r.tooltip);break}let s=this.getStates(),l=u();He(),dt(void 0,this.getRootDocV2(),s,this.nodes,this.edges,!0,l.look,this.classes);for(let r of this.nodes){if(!Array.isArray(r.label))continue;if(r.description=r.label.slice(1),r.isGroup&&r.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${r.id}]`);r.label=r.label[0]}}handleStyleDef(t){let s=t.id.trim().split(","),l=t.styleClass.split(",");for(let r of s){let d=this.getState(r);if(!d){let f=r.trim();this.addState(f),d=this.getState(f)}if(d)d.styles=l.map((f)=>f.replace(/;/g,"")?.trim())}}setRootDoc(t){if(n.info("Setting root doc",t),this.rootDoc=t,this.version===1)this.extract(t);else this.extract(this.getRootDocV2())}docTranslator(t,s,l){if(s.stmt===Bt){this.docTranslator(t,s.state1,!0),this.docTranslator(t,s.state2,!1);return}if(s.stmt===ot)if(s.id===P.START_NODE)s.id=t.id+(l?"_start":"_end"),s.start=l;else s.id=s.id.trim();if(s.stmt!==nt&&s.stmt!==ot||!s.doc)return;let r=[],d=[];for(let f of s.doc)if(f.type===Qt){let g=Dt(f);g.doc=Dt(d),r.push(g),d=[]}else d.push(f);if(r.length>0&&d.length>0){let f={stmt:ot,id:ys(),type:"divider",doc:Dt(d)};r.push(Dt(f)),s.doc=r}s.doc.forEach((f)=>this.docTranslator(s,f,!0))}getRootDocV2(){return this.docTranslator({id:nt,stmt:nt},{id:nt,stmt:nt,doc:this.rootDoc},!0),{id:nt,doc:this.rootDoc}}addState(t,s=ut,l=void 0,r=void 0,d=void 0,f=void 0,g=void 0,b=void 0){let o=t?.trim();if(!this.currentDocument.states.has(o))n.info("Adding state ",o,r),this.currentDocument.states.set(o,{stmt:ot,id:o,descriptions:[],type:s,doc:l,note:d,classes:[],styles:[],textStyles:[]});else{let E=this.currentDocument.states.get(o);if(!E)throw Error(`State not found: ${o}`);if(!E.doc)E.doc=l;if(!E.type)E.type=s}if(r)n.info("Setting state description",o,r),(Array.isArray(r)?r:[r]).forEach((_)=>this.addDescription(o,_.trim()));if(d){let E=this.currentDocument.states.get(o);if(!E)throw Error(`State not found: ${o}`);E.note=d,E.note.text=y.sanitizeText(E.note.text,u())}if(f)n.info("Setting state classes",o,f),(Array.isArray(f)?f:[f]).forEach((_)=>this.setCssClass(o,_.trim()));if(g)n.info("Setting state styles",o,g),(Array.isArray(g)?g:[g]).forEach((_)=>this.setStyle(o,_.trim()));if(b)n.info("Setting state styles",o,g),(Array.isArray(b)?b:[b]).forEach((_)=>this.setTextStyle(o,_.trim()))}clear(t){if(this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:Jt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Kt(),!t)this.links=new Map,A()}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,s,l){this.links.set(t,{url:s,tooltip:l}),n.warn("Adding link",t,s,l)}getLinks(){return this.links}startIdIfNeeded(t=""){if(t===P.START_NODE)return this.startEndCount++,`${P.START_TYPE}${this.startEndCount}`;return t}startTypeIfNeeded(t="",s=ut){return t===P.START_NODE?P.START_TYPE:s}endIdIfNeeded(t=""){if(t===P.END_NODE)return this.startEndCount++,`${P.END_TYPE}${this.startEndCount}`;return t}endTypeIfNeeded(t="",s=ut){return t===P.END_NODE?P.END_TYPE:s}addRelationObjs(t,s,l=""){let r=this.startIdIfNeeded(t.id.trim()),d=this.startTypeIfNeeded(t.id.trim(),t.type),f=this.startIdIfNeeded(s.id.trim()),g=this.startTypeIfNeeded(s.id.trim(),s.type);this.addState(r,d,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(f,g,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),this.currentDocument.relations.push({id1:r,id2:f,relationTitle:y.sanitizeText(l,u())})}addRelation(t,s,l){if(typeof t==="object"&&typeof s==="object")this.addRelationObjs(t,s,l);else if(typeof t==="string"&&typeof s==="string"){let r=this.startIdIfNeeded(t.trim()),d=this.startTypeIfNeeded(t),f=this.endIdIfNeeded(s.trim()),g=this.endTypeIfNeeded(s);this.addState(r,d),this.addState(f,g),this.currentDocument.relations.push({id1:r,id2:f,relationTitle:l?y.sanitizeText(l,u()):void 0})}}addDescription(t,s){let l=this.currentDocument.states.get(t),r=s.startsWith(":")?s.replace(":","").trim():s;l?.descriptions?.push(y.sanitizeText(r,u()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,s=""){if(!this.classes.has(t))this.classes.set(t,{id:t,styles:[],textStyles:[]});let l=this.classes.get(t);if(s&&l)s.split(P.STYLECLASS_SEP).forEach((r)=>{let d=r.replace(/([^;]*);/,"$1").trim();if(RegExp(P.COLOR_KEYWORD).exec(r)){let g=d.replace(P.FILL_KEYWORD,P.BG_FILL).replace(P.COLOR_KEYWORD,P.FILL_KEYWORD);l.textStyles.push(g)}l.styles.push(d)})}getClasses(){return this.classes}setupToolTips(t){let s=Xt();m(t).select("svg").selectAll("g.node, g.rough-node").on("mouseover",(d)=>{let f=m(d.currentTarget),g=f.attr("title");if(g===null)return;let b=d.currentTarget?.getBoundingClientRect();s.transition().duration(200).style("opacity",".9"),s.style("left",window.scrollX+b.left+(b.right-b.left)/2+"px").style("top",window.scrollY+b.bottom+"px"),s.html(Pe.sanitize(g)),f.classed("hover",!0)}).on("mouseout",(d)=>{s.transition().duration(500).style("opacity",0),m(d.currentTarget).classed("hover",!1)})}setCssClass(t,s){t.split(",").forEach((l)=>{let r=this.getState(l);if(!r){let d=l.trim();this.addState(d),r=this.getState(d)}r?.classes?.push(s)})}setStyle(t,s){this.getState(t)?.styles?.push(s)}setTextStyle(t,s){this.getState(t)?.textStyles?.push(s)}bindFunctions(t){this.funs.forEach((s)=>{s(t)})}getDirectionStatement(){return this.rootDoc.find((t)=>t.stmt===jt)}getDirection(){return this.getDirectionStatement()?.value??be}setDirection(t){let s=this.getDirectionStatement();if(s)s.value=t;else this.rootDoc.unshift({stmt:jt,value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){let t=u();for(let s of this.nodes)if(s.wrappingWidth??=t.state?.wrappingWidth,!s.isGroup)s.minWidth??=t.state?.minNodeWidth;return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:de(this.getRootDocV2())}}getConfig(){return u().state}},qe=e((t)=>{let{theme:s,bkgColorArray:l,borderColorArray:r}=t;if(!he(s,r))return"";let d=pe(t.look),f=ve(l),g="";for(let b=0;b<Ct(r);b++){let o=r[b],E=f?`fill: ${l[b%l.length]};`:"",_=`[data-look="${d}"][data-color-id="color-${b}"]`;g+=`
|
|
1
|
+
import{e,n,Oe,y,A,L,R,I,M,P,O,u,p,ge,de,fe,Tt,ys,F,Se,Ee}from"./index.zkx4ryzt.js";import{Kt}from"./index.v02zf4zg.js";import{Ce}from"./index.5fcbba6e.js";import{pe}from"./index.w4emtsqw.js";var Pt=function(){var t=e(function(Q,c,S,a){for(S=S||{},a=Q.length;a--;S[Q[a]]=c);return S},"o"),s=[1,2],l=[1,3],r=[1,4],d=[2,4],f=[1,9],m=[1,11],b=[1,16],o=[1,17],E=[1,18],_=[1,19],G=[1,33],Y=[1,20],j=[1,21],x=[1,22],g=[1,23],V=[1,24],w=[1,26],z=[1,27],W=[1,28],K=[1,29],C=[1,30],st=[1,31],pt=[1,32],St=[1,35],gt=[1,36],yt=[1,37],mt=[1,38],rt=[1,34],k=[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],bt=[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],Vt=[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],Lt={trace:e(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,"-->":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:"-->",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:e(function(c,S,a,T,v,i,it){var h=i.length-1;switch(v){case 3:return T.setRootDoc(i[h]),i[h];break;case 4:this.$=[];break;case 5:if(i[h]!="nl")i[h-1].push(i[h]),this.$=i[h-1];break;case 6:case 7:this.$=i[h];break;case 8:this.$="nl";break;case 12:this.$=i[h];break;case 13:let Et=i[h-1];Et.description=T.trimColon(i[h]),this.$=Et;break;case 14:this.$={stmt:"relation",state1:i[h-2],state2:i[h]};break;case 15:let _t=T.trimColon(i[h]);this.$={stmt:"relation",state1:i[h-3],state2:i[h-1],description:_t};break;case 19:this.$={stmt:"state",id:i[h-3],type:"default",description:"",doc:i[h-1]};break;case 20:var X=i[h],J=i[h-2].trim();if(i[h].match(":")){var lt=i[h].split(":");X=lt[0],J=[J,lt[1]]}this.$={stmt:"state",id:X,type:"default",description:J};break;case 21:this.$={stmt:"state",id:i[h-3],type:"default",description:i[h-5],doc:i[h-1]};break;case 22:this.$={stmt:"state",id:i[h],type:"fork"};break;case 23:this.$={stmt:"state",id:i[h],type:"join"};break;case 24:this.$={stmt:"state",id:i[h],type:"choice"};break;case 25:this.$={stmt:"state",id:T.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[h-1].trim(),note:{position:i[h-2].trim(),text:i[h].trim()}};break;case 29:this.$=i[h].trim(),T.setAccTitle(this.$);break;case 30:case 31:this.$=i[h].trim(),T.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[h-3],url:i[h-2],tooltip:i[h-1]};break;case 33:this.$={stmt:"click",id:i[h-3],url:i[h-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[h-1].trim(),classes:i[h].trim()};break;case 36:this.$={stmt:"style",id:i[h-1].trim(),styleClass:i[h].trim()};break;case 37:this.$={stmt:"applyClass",id:i[h-1].trim(),styleClass:i[h].trim()};break;case 38:T.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:T.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:T.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:T.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[h].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[h-2].trim(),classes:[i[h].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[h-2].trim(),classes:[i[h].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:s,5:l,6:r},{1:[3]},{3:5,4:s,5:l,6:r},{3:6,4:s,5:l,6:r},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],d,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:f,5:m,8:8,9:10,10:12,11:13,12:14,13:15,16:b,17:o,19:E,22:_,24:G,25:Y,26:j,27:x,28:g,29:V,32:25,33:w,35:z,37:W,38:K,41:C,45:st,48:pt,51:St,52:gt,53:yt,54:mt,57:rt},t(k,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:b,17:o,19:E,22:_,24:G,25:Y,26:j,27:x,28:g,29:V,32:25,33:w,35:z,37:W,38:K,41:C,45:st,48:pt,51:St,52:gt,53:yt,54:mt,57:rt},t(k,[2,7]),t(k,[2,8]),t(k,[2,9]),t(k,[2,10]),t(k,[2,11]),t(k,[2,12],{14:[1,40],15:[1,41]}),t(k,[2,16]),{18:[1,42]},t(k,[2,18],{20:[1,43]}),{23:[1,44]},t(k,[2,22]),t(k,[2,23]),t(k,[2,24]),t(k,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(k,[2,28]),{34:[1,49]},{36:[1,50]},t(k,[2,31]),{13:51,24:G,57:rt},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(bt,[2,44],{58:[1,56]}),t(bt,[2,45],{58:[1,57]}),t(k,[2,38]),t(k,[2,39]),t(k,[2,40]),t(k,[2,41]),t(k,[2,6]),t(k,[2,13]),{13:58,24:G,57:rt},t(k,[2,17]),t(Vt,d,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(k,[2,29]),t(k,[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(k,[2,14],{14:[1,71]}),{4:f,5:m,8:8,9:10,10:12,11:13,12:14,13:15,16:b,17:o,19:E,21:[1,72],22:_,24:G,25:Y,26:j,27:x,28:g,29:V,32:25,33:w,35:z,37:W,38:K,41:C,45:st,48:pt,51:St,52:gt,53:yt,54:mt,57:rt},t(k,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(k,[2,34]),t(k,[2,35]),t(k,[2,36]),t(k,[2,37]),t(bt,[2,46]),t(bt,[2,47]),t(k,[2,15]),t(k,[2,19]),t(Vt,d,{7:78}),t(k,[2,26]),t(k,[2,27]),{5:[1,79]},{5:[1,80]},{4:f,5:m,8:8,9:10,10:12,11:13,12:14,13:15,16:b,17:o,19:E,21:[1,81],22:_,24:G,25:Y,26:j,27:x,28:g,29:V,32:25,33:w,35:z,37:W,38:K,41:C,45:st,48:pt,51:St,52:gt,53:yt,54:mt,57:rt},t(k,[2,32]),t(k,[2,33]),t(k,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:e(function(c,S){if(S.recoverable)this.trace(c);else{var a=Error(c);throw a.hash=S,a}},"parseError"),parse:e(function(c){var S=this,a=[0],T=[],v=[null],i=[],it=this.table,h="",X=0,J=0,lt=0,Et=2,_t=1,ye=i.slice.call(arguments,1),D=Object.create(this.lexer),tt={yy:{}};for(var wt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,wt))tt.yy[wt]=this.yy[wt];if(D.setInput(c,tt.yy),tt.yy.lexer=D,tt.yy.parser=this,typeof D.yylloc>"u")D.yylloc={};var It=D.yylloc;i.push(It);var me=D.options&&D.options.ranges;if(typeof tt.yy.parseError==="function")this.parseError=tt.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function be(H){a.length=a.length-2*H,v.length=v.length-H,i.length=i.length-H}e(be,"popStack");function Mt(){var H=T.pop()||D.lex()||_t;if(typeof H!=="number"){if(H instanceof Array)T=H,H=T.pop();H=S.symbols_[H]||H}return H}e(Mt,"lex");var N,Nt,et,U,ts,Ot,at={},vt,q,Wt,Dt;while(!0){if(et=a[a.length-1],this.defaultActions[et])U=this.defaultActions[et];else{if(N===null||typeof N>"u")N=Mt();U=it[et]&&it[et][N]}if(typeof U>"u"||!U.length||!U[0]){var Rt="";Dt=[];for(vt in it[et])if(this.terminals_[vt]&&vt>Et)Dt.push("'"+this.terminals_[vt]+"'");if(D.showPosition)Rt="Parse error on line "+(X+1)+`:
|
|
2
|
+
`+D.showPosition()+`
|
|
3
|
+
Expecting `+Dt.join(", ")+", got '"+(this.terminals_[N]||N)+"'";else Rt="Parse error on line "+(X+1)+": Unexpected "+(N==_t?"end of input":"'"+(this.terminals_[N]||N)+"'");this.parseError(Rt,{text:D.match,token:this.terminals_[N]||N,line:D.yylineno,loc:It,expected:Dt})}if(U[0]instanceof Array&&U.length>1)throw Error("Parse Error: multiple actions possible at state: "+et+", token: "+N);switch(U[0]){case 1:if(a.push(N),v.push(D.yytext),i.push(D.yylloc),a.push(U[1]),N=null,!Nt){if(J=D.yyleng,h=D.yytext,X=D.yylineno,It=D.yylloc,lt>0)lt--}else N=Nt,Nt=null;break;case 2:if(q=this.productions_[U[1]][1],at.$=v[v.length-q],at._$={first_line:i[i.length-(q||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(q||1)].first_column,last_column:i[i.length-1].last_column},me)at._$.range=[i[i.length-(q||1)].range[0],i[i.length-1].range[1]];if(Ot=this.performAction.apply(at,[h,J,X,tt.yy,U[1],v,i].concat(ye)),typeof Ot<"u")return Ot;if(q)a=a.slice(0,-1*q*2),v=v.slice(0,-1*q),i=i.slice(0,-1*q);a.push(this.productions_[U[1]][0]),v.push(at.$),i.push(at._$),Wt=it[a[a.length-2]][a[a.length-1]],a.push(Wt);break;case 3:return!0}}return!0},"parse")},ue=function(){var Q={EOF:1,parseError:e(function(S,a){if(this.yy.parser)this.yy.parser.parseError(S,a);else throw Error(S)},"parseError"),setInput:e(function(c,S){if(this.yy=S||this.yy||{},this._input=c,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];return this.offset=0,this},"setInput"),input:e(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var S=c.match(/(?:\r\n?|\n).*/g);if(S)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),c},"input"),unput:e(function(c){var S=c.length,a=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-S),this.offset-=S;var T=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1)this.yylineno-=a.length-1;var v=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===T.length?this.yylloc.first_column:0)+T[T.length-a.length].length-a[0].length:this.yylloc.first_column-S},this.options.ranges)this.yylloc.range=[v[0],v[0]+this.yyleng-S];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(c){this.unput(this.match.slice(c))},"less"),pastInput:e(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var c=this.match;if(c.length<20)c+=this._input.substr(0,20-c.length);return(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var c=this.pastInput(),S=Array(c.length+1).join("-");return c+this.upcomingInput()+`
|
|
5
|
+
`+S+"^"},"showPosition"),test_match:e(function(c,S){var a,T,v;if(this.options.backtrack_lexer){if(v={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)v.yylloc.range=this.yylloc.range.slice(0)}if(T=c[0].match(/(?:\r\n?|\n).*/g),T)this.yylineno+=T.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:T?T[T.length-1].length-T[T.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+c[0].length},this.yytext+=c[0],this.match+=c[0],this.matches=c,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(c[0].length),this.matched+=c[0],a=this.performAction.call(this,this.yy,this,S,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(a)return a;else if(this._backtrack){for(var i in v)this[i]=v[i];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var c,S,a,T;if(!this._more)this.yytext="",this.match="";var v=this._currentRules();for(var i=0;i<v.length;i++)if(a=this._input.match(this.rules[v[i]]),a&&(!S||a[0].length>S[0].length)){if(S=a,T=i,this.options.backtrack_lexer)if(c=this.test_match(a,v[i]),c!==!1)return c;else if(this._backtrack){S=!1;continue}else return!1;else if(!this.options.flex)break}if(S){if(c=this.test_match(S,v[T]),c!==!1)return c;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var S=this.next();if(S)return S;else return this.lex()},"lex"),begin:e(function(S){this.conditionStack.push(S)},"begin"),popState:e(function(){var S=this.conditionStack.length-1;if(S>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(S){if(S=this.conditionStack.length-1-Math.abs(S||0),S>=0)return this.conditionStack[S];else return"INITIAL"},"topState"),pushState:e(function(S){this.begin(S)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(S,a,T,v){function i(){let h=a.yytext.indexOf("%%");if(h===0)return!1;if(h>0){let X=a.yytext.slice(0,h),J=a.yytext.slice(h);if(J)S.lexer.unput(J);a.yytext=X}return!0}e(i,"processId");var it=v;switch(T){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState("SCALE"),17;break;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;break;case 17:return this.popState(),"acc_title_value";break;case 18:return this.begin("acc_descr"),35;break;case 19:return this.popState(),"acc_descr_value";break;case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;break;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 25:return this.popState(),this.pushState("CLASSDEFID"),42;break;case 26:return this.popState(),43;break;case 27:return this.pushState("CLASS"),48;break;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;break;case 29:return this.popState(),50;break;case 30:return this.pushState("STYLE"),45;break;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;break;case 32:return this.popState(),47;break;case 33:return this.pushState("SCALE"),17;break;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),25;break;case 38:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),26;break;case 39:return this.popState(),a.yytext=a.yytext.slice(0,-10).trim(),27;break;case 40:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),25;break;case 41:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),26;break;case 42:return this.popState(),a.yytext=a.yytext.slice(0,-10).trim(),27;break;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";break;case 49:if(!i())return;return this.popState(),"ID";break;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:throw Error('Error: State name must be a single word. Found: "'+a.yytext.trim()+'"');case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;break;case 56:return this.popState(),21;break;case 57:break;case 58:return this.begin("NOTE"),29;break;case 59:return this.popState(),this.pushState("NOTE_ID"),59;break;case 60:return this.popState(),this.pushState("NOTE_ID"),60;break;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 63:break;case 64:return"NOTE_TEXT";case 65:if(!i())return;return this.popState(),"ID";break;case 66:if(!i())return;return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 67:return this.popState(),a.yytext=a.yytext.substr(2).trim(),31;break;case 68:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),31;break;case 69:return 6;case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!i())return;return 24;case 74:return a.yytext=a.yytext.trim(),14;break;case 75:return 15;case 76:return 28;case 77:return 58;case 78:return 5;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}}};return Q}();Lt.lexer=ue;function kt(){this.yy={}}return e(kt,"Parser"),kt.prototype=Lt,Lt.Parser=kt,new kt}();Pt.parser=Pt;var ke=Pt,Te="TB",qt="TB",jt="dir",ot="state",nt="root",Bt="relation",_e="classDef",ve="style",De="applyClass",ut="default",Qt="divider",Zt="fill:none",te="fill: #333",ee="c",se="markdown",re="normal",$t="rect",Ft="rectWithTitle",Ae="stateStart",xe="stateEnd",Gt="divider",Ut="roundedWithTitle",Le="note",we="noteGroup",ft="statediagram",Ie="state",Ne=`${ft}-${Ie}`,ie="transition",Re="note",$e="note-edge",Fe=`${ie} ${$e}`,Pe=`${ft}-${Re}`,Be="cluster",Ge=`${ft}-${Be}`,Ye="cluster-alt",Ve=`${ft}-${Ye}`,ae="parent",ne="note",Me="state",Yt="----",We=`${Yt}${ne}`,Ht=`${Yt}${ae}`,At=new Map,Z=0,oe=0,ct=new Map,je=e((t,s,l,r)=>{if(t===Gt&&l?.id!==void 0&&ct.has(l.id)){let m=ct.get(l.id);return ct.set(s,m),m}let d=oe++,f=r?void 0:d;return ct.set(s,f),f},"colorSlotFor");function xt(t="",s=0,l="",r=Yt){let d=l!==null&&l.length>0?`${r}${l}`:"";return`${Me}-${t}${d}-${s}`}e(xt,"stateDomId");var Ue=e((t,s,l,r,d,f,m,b)=>{n.trace("items",s),s.forEach((o)=>{switch(o.stmt){case ot:dt(t,o,l,r,d,f,m,b);break;case ut:dt(t,o,l,r,d,f,m,b);break;case Bt:{dt(t,o.state1,l,r,d,f,m,b),dt(t,o.state2,l,r,d,f,m,b);let E=m==="neo",_={id:"edge"+Z,start:o.state1.id,end:o.state2.id,arrowhead:"normal",arrowTypeEnd:E?"arrow_barb_neo":"arrow_barb",style:Zt,labelStyle:"",label:y.sanitizeText(o.description??"",u()),arrowheadStyle:te,labelpos:ee,labelType:se,thickness:re,classes:ie,look:m};d.push(_),Z++}break}})},"setupDoc"),zt=e((t,s=qt)=>{let l=s;if(t.doc){for(let r of t.doc)if(r.stmt==="dir")l=r.value}return l},"getDir");function ht(t,s,l){if(!s.id||s.id==="</join></fork>"||s.id==="</choice>")return;if(s.cssClasses){if(!Array.isArray(s.cssCompiledStyles))s.cssCompiledStyles=[];s.cssClasses.split(" ").forEach((d)=>{let f=l.get(d);if(f)s.cssCompiledStyles=[...s.cssCompiledStyles??[],...f.styles]})}let r=t.find((d)=>d.id===s.id);if(r)Object.assign(r,s);else t.push(s)}e(ht,"insertOrUpdateNode");function le(t){return t?.classes?.join(" ")??""}e(le,"getClassesFromDbInfo");function ce(t){return t?.styles??[]}e(ce,"getStylesFromDbInfo");var dt=e((t,s,l,r,d,f,m,b)=>{let o=s.id,E=l.get(o),_=le(E),G=ce(E),Y=u(),j=_.trim()!==""||G.length>0;if(n.info("dataFetcher parsedItem",s,E,G),o!=="root"){let x=$t;if(s.start===!0)x=Ae;else if(s.start===!1)x=xe;if(s.type!==ut)x=s.type;if(!At.get(o))At.set(o,{id:o,shape:x,description:y.sanitizeText(o,Y),cssClasses:`${_} ${Ne}`,cssStyles:G});let g=At.get(o);if(s.description){if(Array.isArray(g.description))g.shape=Ft,g.description.push(s.description);else if(g.description?.length&&g.description.length>0)if(g.shape=Ft,g.description===o)g.description=[s.description];else g.description=[g.description,s.description];else g.shape=$t,g.description=s.description;g.description=y.sanitizeTextOrArray(g.description,Y)}if(g.description?.length===1&&g.shape===Ft)if(g.type==="group")g.shape=Ut;else g.shape=$t;if(!g.type&&s.doc)n.info("Setting cluster for XCX",o,zt(s)),g.type="group",g.isGroup=!0,g.dir=zt(s),g.shape=s.type===Qt?Gt:Ut,g.colorIndex=je(g.shape,o,t,j),g.cssClasses=`${g.cssClasses} ${Ge} ${f?Ve:""}`;let V={labelStyle:"",shape:g.shape,label:g.description,cssClasses:g.cssClasses,cssCompiledStyles:[],cssStyles:g.cssStyles,id:o,dir:g.dir,domId:xt(o,Z),type:g.type,isGroup:g.type==="group",colorIndex:g.colorIndex,padding:8,rx:10,ry:10,look:m,labelType:"markdown"};if(V.shape===Gt)V.label="";if(t&&t.id!=="root")n.trace("Setting node ",o," to be child of its parent ",t.id),V.parentId=t.id;if(V.centerLabel=!0,s.note){let w={labelStyle:"",shape:Le,label:s.note.text,labelType:"markdown",cssClasses:Pe,cssStyles:[],cssCompiledStyles:[],id:o+We+"-"+Z,domId:xt(o,Z,ne),type:"node",isGroup:!1,padding:Y.flowchart?.padding,look:m,position:s.note.position},z=o+Ht,W={labelStyle:"",shape:we,label:s.note.text,cssClasses:g.cssClasses,cssStyles:[],id:o+Ht,domId:xt(o,Z,ae),type:"group",isGroup:!0,padding:16,look:m,position:s.note.position};Z++,W.id=z,w.parentId=z,ht(r,W,b),ht(r,w,b),ht(r,V,b);let K=o,C=w.id;if(s.note.position==="left of")K=w.id,C=o;d.push({id:K+"-"+C,start:K,end:C,arrowhead:"none",arrowTypeEnd:"",style:Zt,labelStyle:"",classes:Fe,pattern:"dashed",arrowheadStyle:te,labelpos:ee,labelType:se,thickness:re,look:m})}else ht(r,V,b)}if(s.doc)n.trace("Adding nodes children "),Ue(s,s.doc,l,r,d,!f,m,b)},"dataFetcher"),He=e(()=>{At.clear(),Z=0,oe=0,ct.clear()},"reset"),he=e((t,s=qt)=>{if(!t.doc)return s;let l=s;for(let r of t.doc)if(r.stmt==="dir")l=r.value;return l},"getDir"),ze=e(function(t,s){return s.db.getClasses()},"getClasses"),Ke=e(async function(t,s,l,r){n.info("REF0:"),n.info("Drawing state diagram (v2)",s);let{securityLevel:d,state:f,layout:m}=u();r.db.extract(r.db.getRootDocV2());let b=r.db.getData(),o=Ce(s,d);if(b.type=r.type,b.layoutAlgorithm=Ee(m),b.nodeSpacing=f?.nodeSpacing||50,b.rankSpacing=f?.rankSpacing||50,u().look==="neo")b.markers=["barbNeo"];else b.markers=["barb"];b.diagramId=s,await Se(b,o);let _=8;try{(typeof r.db.getLinks==="function"?r.db.getLinks():new Map).forEach((Y,j)=>{let x=typeof j==="string"?j:typeof j?.id==="string"?j.id:"",g=b.nodes.find((C)=>C.id===x);if(!x){n.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(j));return}let V=o.node()?.querySelectorAll("g.node, g.rough-node"),w;if(V?.forEach((C)=>{let st=C.textContent?.trim();if(C.id===g?.domId||st===x)w=C}),!w){n.warn("⚠️ Could not find node matching text:",x);return}let z=w.parentNode;if(!z){n.warn("⚠️ Node has no parent, cannot wrap:",x);return}let W=document.createElementNS("http://www.w3.org/2000/svg","a"),K=Y.url.replace(/^"+|"+$/g,"");if(W.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",K),W.setAttribute("target","_blank"),Y.tooltip){let C=Y.tooltip.replace(/^"+|"+$/g,"");W.setAttribute("title",C),w.setAttribute("title",C)}z.replaceChild(W,w),W.appendChild(w),n.info("\uD83D\uDD17 Wrapped node in <a> tag for:",x,Y.url)})}catch(G){n.error("❌ Error injecting clickable links:",G)}F.insertTitle(o,"statediagramTitleText",f?.titleTopMargin??25,r.db.getDiagramTitle()),pe(o,_,ft,f?.useMaxWidth??!0)},"draw"),Xe={getClasses:ze,draw:Ke,getDir:he},B={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Xt=e(()=>new Map,"newClassesList"),Jt=e(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),Ct=e((t)=>JSON.parse(JSON.stringify(t)),"clone"),Je=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Xt(),this.documents={root:Jt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=R,this.setAccTitle=L,this.getAccDescription=M,this.setAccDescription=I,this.setDiagramTitle=P,this.getDiagramTitle=O,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)}static{e(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){this.clear(!0);for(let r of Array.isArray(t)?t:t.doc)switch(r.stmt){case ot:this.addState(r.id.trim(),r.type,r.doc,r.description,r.note);break;case Bt:this.addRelation(r.state1,r.state2,r.description);break;case _e:this.addStyleClass(r.id.trim(),r.classes);break;case ve:this.handleStyleDef(r);break;case De:this.setCssClass(r.id.trim(),r.styleClass);break;case"click":this.addLink(r.id,r.url,r.tooltip);break}let s=this.getStates(),l=u();He(),dt(void 0,this.getRootDocV2(),s,this.nodes,this.edges,!0,l.look,this.classes);for(let r of this.nodes){if(!Array.isArray(r.label))continue;if(r.description=r.label.slice(1),r.isGroup&&r.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${r.id}]`);r.label=r.label[0]}}handleStyleDef(t){let s=t.id.trim().split(","),l=t.styleClass.split(",");for(let r of s){let d=this.getState(r);if(!d){let f=r.trim();this.addState(f),d=this.getState(f)}if(d)d.styles=l.map((f)=>f.replace(/;/g,"")?.trim())}}setRootDoc(t){if(n.info("Setting root doc",t),this.rootDoc=t,this.version===1)this.extract(t);else this.extract(this.getRootDocV2())}docTranslator(t,s,l){if(s.stmt===Bt){this.docTranslator(t,s.state1,!0),this.docTranslator(t,s.state2,!1);return}if(s.stmt===ot)if(s.id===B.START_NODE)s.id=t.id+(l?"_start":"_end"),s.start=l;else s.id=s.id.trim();if(s.stmt!==nt&&s.stmt!==ot||!s.doc)return;let r=[],d=[];for(let f of s.doc)if(f.type===Qt){let m=Ct(f);m.doc=Ct(d),r.push(m),d=[]}else d.push(f);if(r.length>0&&d.length>0){let f={stmt:ot,id:ys(),type:"divider",doc:Ct(d)};r.push(Ct(f)),s.doc=r}s.doc.forEach((f)=>this.docTranslator(s,f,!0))}getRootDocV2(){return this.docTranslator({id:nt,stmt:nt},{id:nt,stmt:nt,doc:this.rootDoc},!0),{id:nt,doc:this.rootDoc}}addState(t,s=ut,l=void 0,r=void 0,d=void 0,f=void 0,m=void 0,b=void 0){let o=t?.trim();if(!this.currentDocument.states.has(o))n.info("Adding state ",o,r),this.currentDocument.states.set(o,{stmt:ot,id:o,descriptions:[],type:s,doc:l,note:d,classes:[],styles:[],textStyles:[]});else{let E=this.currentDocument.states.get(o);if(!E)throw Error(`State not found: ${o}`);if(!E.doc)E.doc=l;if(!E.type)E.type=s}if(r)n.info("Setting state description",o,r),(Array.isArray(r)?r:[r]).forEach((_)=>this.addDescription(o,_.trim()));if(d){let E=this.currentDocument.states.get(o);if(!E)throw Error(`State not found: ${o}`);E.note=d,E.note.text=y.sanitizeText(E.note.text,u())}if(f)n.info("Setting state classes",o,f),(Array.isArray(f)?f:[f]).forEach((_)=>this.setCssClass(o,_.trim()));if(m)n.info("Setting state styles",o,m),(Array.isArray(m)?m:[m]).forEach((_)=>this.setStyle(o,_.trim()));if(b)n.info("Setting state styles",o,m),(Array.isArray(b)?b:[b]).forEach((_)=>this.setTextStyle(o,_.trim()))}clear(t){if(this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:Jt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Xt(),!t)this.links=new Map,A()}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,s,l){this.links.set(t,{url:s,tooltip:l}),n.warn("Adding link",t,s,l)}getLinks(){return this.links}startIdIfNeeded(t=""){if(t===B.START_NODE)return this.startEndCount++,`${B.START_TYPE}${this.startEndCount}`;return t}startTypeIfNeeded(t="",s=ut){return t===B.START_NODE?B.START_TYPE:s}endIdIfNeeded(t=""){if(t===B.END_NODE)return this.startEndCount++,`${B.END_TYPE}${this.startEndCount}`;return t}endTypeIfNeeded(t="",s=ut){return t===B.END_NODE?B.END_TYPE:s}addRelationObjs(t,s,l=""){let r=this.startIdIfNeeded(t.id.trim()),d=this.startTypeIfNeeded(t.id.trim(),t.type),f=this.startIdIfNeeded(s.id.trim()),m=this.startTypeIfNeeded(s.id.trim(),s.type);this.addState(r,d,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(f,m,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),this.currentDocument.relations.push({id1:r,id2:f,relationTitle:y.sanitizeText(l,u())})}addRelation(t,s,l){if(typeof t==="object"&&typeof s==="object")this.addRelationObjs(t,s,l);else if(typeof t==="string"&&typeof s==="string"){let r=this.startIdIfNeeded(t.trim()),d=this.startTypeIfNeeded(t),f=this.endIdIfNeeded(s.trim()),m=this.endTypeIfNeeded(s);this.addState(r,d),this.addState(f,m),this.currentDocument.relations.push({id1:r,id2:f,relationTitle:l?y.sanitizeText(l,u()):void 0})}}addDescription(t,s){let l=this.currentDocument.states.get(t),r=s.startsWith(":")?s.replace(":","").trim():s;l?.descriptions?.push(y.sanitizeText(r,u()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,s=""){if(!this.classes.has(t))this.classes.set(t,{id:t,styles:[],textStyles:[]});let l=this.classes.get(t);if(s&&l)s.split(B.STYLECLASS_SEP).forEach((r)=>{let d=r.replace(/([^;]*);/,"$1").trim();if(RegExp(B.COLOR_KEYWORD).exec(r)){let m=d.replace(B.FILL_KEYWORD,B.BG_FILL).replace(B.COLOR_KEYWORD,B.FILL_KEYWORD);l.textStyles.push(m)}l.styles.push(d)})}getClasses(){return this.classes}setupToolTips(t){let s=Kt();p(t).select("svg").selectAll("g.node, g.rough-node").on("mouseover",(d)=>{let f=p(d.currentTarget),m=f.attr("title");if(m===null)return;let b=d.currentTarget?.getBoundingClientRect();s.transition().duration(200).style("opacity",".9"),s.style("left",window.scrollX+b.left+(b.right-b.left)/2+"px").style("top",window.scrollY+b.bottom+"px"),s.html(Oe.sanitize(m)),f.classed("hover",!0)}).on("mouseout",(d)=>{s.transition().duration(500).style("opacity",0),p(d.currentTarget).classed("hover",!1)})}setCssClass(t,s){t.split(",").forEach((l)=>{let r=this.getState(l);if(!r){let d=l.trim();this.addState(d),r=this.getState(d)}r?.classes?.push(s)})}setStyle(t,s){this.getState(t)?.styles?.push(s)}setTextStyle(t,s){this.getState(t)?.textStyles?.push(s)}bindFunctions(t){this.funs.forEach((s)=>{s(t)})}getDirectionStatement(){return this.rootDoc.find((t)=>t.stmt===jt)}getDirection(){return this.getDirectionStatement()?.value??Te}setDirection(t){let s=this.getDirectionStatement();if(s)s.value=t;else this.rootDoc.unshift({stmt:jt,value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){let t=u();for(let s of this.nodes)if(s.wrappingWidth??=t.state?.wrappingWidth,!s.isGroup)s.minWidth??=t.state?.minNodeWidth;return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:he(this.getRootDocV2())}}getConfig(){return u().state}},qe=e((t)=>{let{theme:s,bkgColorArray:l,borderColorArray:r}=t;if(!de(s,r))return"";let d=fe(t.look),f=ge(l),m="";for(let b=0;b<Tt(r);b++){let o=r[b],E=f?`fill: ${l[b%l.length]};`:"",_=`[data-look="${d}"][data-color-id="color-${b}"]`;m+=`
|
|
7
7
|
|
|
8
8
|
/* The title strip: \`rect.outer\` spans the whole composite and \`rect.inner\` covers
|
|
9
9
|
the body, so what stays visible of \`outer\` is the band behind the label. */
|
|
@@ -62,7 +62,7 @@ Expecting `+vt.join(", ")+", got '"+(this.terminals_[F]||F)+"'";else Rt="Parse e
|
|
|
62
62
|
${_}.statediagram-cluster .divider path[fill='none'] {
|
|
63
63
|
stroke: ${o};
|
|
64
64
|
}
|
|
65
|
-
`}return
|
|
65
|
+
`}return m},"genColor"),Qe=e((t)=>`
|
|
66
66
|
${qe(t)}
|
|
67
67
|
defs [id$="-barbEnd"] {
|
|
68
68
|
fill: ${t.transitionColor};
|
|
@@ -288,4 +288,4 @@ g.stateGroup line {
|
|
|
288
288
|
ry: ${t.radius}px;
|
|
289
289
|
filter: ${t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${t.svgId}-drop-shadow)`):"none"}
|
|
290
290
|
}
|
|
291
|
-
`,"getStyles"),Ze=Qe,Ts={parser:
|
|
291
|
+
`,"getStyles"),Ze=Qe,Ts={parser:ke,get db(){return new Je(2)},renderer:Xe,styles:Ze,init:e((t)=>{if(!t.state)t.state={};t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{Ts as diagram};
|