pmx-canvas 0.9.3 → 0.11.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/.github/extensions/pmx-canvas/runtime.json +1 -1
- package/.github/extensions/pmx-canvas/tools.json +9418 -2016
- package/CHANGELOG.md +54 -1
- package/dist/canvas/chunks/abnfDiagram-N423BO3Z-p8dtp6va.js +1 -0
- package/dist/canvas/chunks/architecture-TIHT7OUA-9tffvpsv.js +1 -0
- package/dist/canvas/chunks/architectureDiagram-T3A2C74G-5jhmxrzf.js +36 -0
- package/dist/canvas/chunks/blockDiagram-VBNYF7ZC-pw1fa9yb.js +132 -0
- package/dist/canvas/chunks/c4Diagram-5PPSVZJV-x07nq0tt.js +10 -0
- package/dist/canvas/chunks/classDiagram-JCYQIIEL-nc6g5x1r.js +1 -0
- package/dist/canvas/chunks/classDiagram-v2-OCEON4UE-0qnbpwvh.js +1 -0
- package/dist/canvas/chunks/cose-bilkent-JH36ORCC-nm39npq0.js +1 -0
- package/dist/canvas/chunks/cynefin-VYW2F7L2-ys8p46ts.js +1 -0
- package/dist/canvas/chunks/cynefinDiagram-MW4NZA55-vdxrwahz.js +62 -0
- package/dist/canvas/chunks/dagre-VZM6K2ZE-bqdm7wpd.js +4 -0
- package/dist/canvas/chunks/diagram-7IWD3JNH-gs5gpr93.js +30 -0
- package/dist/canvas/chunks/diagram-B4RE2ZJO-cgwjg47s.js +3 -0
- package/dist/canvas/chunks/diagram-LBJQPF4R-w3vahpav.js +24 -0
- package/dist/canvas/chunks/diagram-Q27KOJAE-42837z6h.js +24 -0
- package/dist/canvas/chunks/diagram-UB23O5K3-4fz83q59.js +41 -0
- package/dist/canvas/chunks/ebnfDiagram-BXEA7PRR-zphtgegj.js +1 -0
- package/dist/canvas/chunks/erDiagram-JOGREHBK-zvbbdxp4.js +85 -0
- package/dist/canvas/chunks/eventmodeling-45OFAUF4-v9q6dn4c.js +1 -0
- package/dist/canvas/chunks/flowDiagram-UKHOOZJN-yrr5z8tc.js +1 -0
- package/dist/canvas/chunks/ganttDiagram-PKOTCBZU-282jzycm.js +292 -0
- package/dist/canvas/chunks/gitGraph-TEB2WS4Q-kdwb8m0a.js +1 -0
- package/dist/canvas/chunks/gitGraphDiagram-DS77QQ5N-vqqy6p1b.js +106 -0
- package/dist/canvas/chunks/index-0rk4gp1g.js +2 -0
- package/dist/canvas/chunks/index-194m3hc3.js +2 -0
- package/dist/canvas/chunks/index-1r72hdzb.js +301 -0
- package/dist/canvas/chunks/index-353m7b0p.js +2 -0
- package/dist/canvas/chunks/index-3cy1bzwh.js +2 -0
- package/dist/canvas/chunks/index-5tv8v1hk.js +1 -0
- package/dist/canvas/chunks/index-6ceya556.js +332 -0
- package/dist/canvas/chunks/index-6qmsnxwy.js +4 -0
- package/dist/canvas/chunks/index-d3b3gqe9.js +2 -0
- package/dist/canvas/chunks/index-fjtdggjn.js +2 -0
- package/dist/canvas/chunks/index-g3pwnqeb.js +2 -0
- package/dist/canvas/chunks/index-gf4e0et4.js +2 -0
- package/dist/canvas/chunks/index-hj99nz1f.js +1 -0
- package/dist/canvas/chunks/index-nprm96xp.js +16 -0
- package/dist/canvas/chunks/index-qj8fxwsf.js +2 -0
- package/dist/canvas/chunks/index-r2fyc9w1.js +89 -0
- package/dist/canvas/chunks/index-rft2hcz5.js +2 -0
- package/dist/canvas/chunks/index-rh7nv68n.js +2 -0
- package/dist/canvas/chunks/index-s4j678gj.js +2 -0
- package/dist/canvas/chunks/index-tb1wf525.js +179 -0
- package/dist/canvas/chunks/index-vv56h019.js +2 -0
- package/dist/canvas/chunks/index-w2mra17t.js +207 -0
- package/dist/canvas/chunks/index-wgv7en21.js +232 -0
- package/dist/canvas/chunks/index-yw8h9vha.js +157 -0
- package/dist/canvas/chunks/info-DKCQHKI2-wpzs6sz3.js +1 -0
- package/dist/canvas/chunks/infoDiagram-6WML65LV-v1yvggqj.js +2 -0
- package/dist/canvas/chunks/ishikawaDiagram-WSZJBQD7-5hnq1a9p.js +70 -0
- package/dist/canvas/chunks/journeyDiagram-NVQOT4AX-zjcffveh.js +139 -0
- package/dist/canvas/chunks/kanban-definition-27J2QSJJ-dakqtfp1.js +89 -0
- package/dist/canvas/chunks/katex-dmg8k4zm.js +257 -0
- package/dist/canvas/chunks/mermaid.core-j2geswrd.js +12 -0
- package/dist/canvas/chunks/mindmap-definition-FAOFIHXS-142xhr3k.js +96 -0
- package/dist/canvas/chunks/packet-7NZHBO7P-xn439f0s.js +1 -0
- package/dist/canvas/chunks/pegDiagram-VL7TDLO6-5wvk7vsd.js +1 -0
- package/dist/canvas/chunks/pie-RZYD4A2V-0kf16rwh.js +1 -0
- package/dist/canvas/chunks/pieDiagram-7S7Q4E2Y-ztdhwycc.js +39 -0
- package/dist/canvas/chunks/quadrantDiagram-CIZ2JOQS-c5p9gmg6.js +7 -0
- package/dist/canvas/chunks/radar-I7S5WNFK-0g2pz36t.js +1 -0
- package/dist/canvas/chunks/railroad-3IZDKUUU-fcaran6j.js +1 -0
- package/dist/canvas/chunks/railroad-abnf-AHOZXSZD-wgdya41q.js +1 -0
- package/dist/canvas/chunks/railroad-ebnf-EBAXGLYW-gy07a4ka.js +1 -0
- package/dist/canvas/chunks/railroad-peg-LSFZ7HO6-ewk6wtkh.js +1 -0
- package/dist/canvas/chunks/railroadDiagram-AXF67PYL-xkmqkjwf.js +1 -0
- package/dist/canvas/chunks/requirementDiagram-LRYGKXZP-9wm2dyaw.js +84 -0
- package/dist/canvas/chunks/sankeyDiagram-W5VNT64P-2w19etgb.js +40 -0
- package/dist/canvas/chunks/sequenceDiagram-SI44F4Z6-0jn0vwmz.js +162 -0
- package/dist/canvas/chunks/sizeCapture-X5ZJPWSS-x75epwdq.js +1 -0
- package/dist/canvas/chunks/stateDiagram-OKZ733FA-schjpy6d.js +1 -0
- package/dist/canvas/chunks/stateDiagram-v2-UEYNNEHI-k8sfp2e7.js +1 -0
- package/dist/canvas/chunks/swimlanes-SLNWSIFB-gkw4xce3.js +1 -0
- package/dist/canvas/chunks/swimlanesDiagram-ULZ7WXOC-nqysw67j.js +8 -0
- package/dist/canvas/chunks/timeline-definition-Z64GVDOM-x7nkcy01.js +120 -0
- package/dist/canvas/chunks/treeView-QDETBFTQ-cesw6gp0.js +1 -0
- package/dist/canvas/chunks/treemap-6X3UGDF4-zdv4knp9.js +1 -0
- package/dist/canvas/chunks/vennDiagram-T6HMQDX7-x8dqn9yf.js +34 -0
- package/dist/canvas/chunks/wardley-OPB4EBWU-44pdddez.js +1 -0
- package/dist/canvas/chunks/wardleyDiagram-T6FBY63Y-t1j52t9r.js +78 -0
- package/dist/canvas/chunks/xychartDiagram-ELKLHX3M-38t16pme.js +7 -0
- package/dist/canvas/global.css +389 -229
- package/dist/canvas/index.js +141 -211
- package/dist/canvas/mcp-app.html +4205 -554
- package/dist/canvas/mermaid-entry.js +338 -338
- package/dist/canvas/surface-theme.css +6 -6
- package/dist/json-render/index.css +1 -1
- package/dist/json-render/index.js +49 -49
- package/dist/types/client/canvas/BarHint.d.ts +5 -3
- package/dist/types/client/canvas/CanvasNode.d.ts +0 -11
- package/dist/types/client/canvas/EdgeLayer.d.ts +1 -2
- package/dist/types/client/canvas/auto-fit.d.ts +4 -5
- package/dist/types/client/mermaid-entry.d.ts +1 -2
- package/dist/types/client/mermaid-render.d.ts +1 -0
- package/dist/types/client/nodes/BoardNode.d.ts +1 -1
- package/dist/types/client/nodes/ExtAppFrame.d.ts +7 -90
- package/dist/types/client/nodes/McpAppNode.d.ts +1 -25
- package/dist/types/client/nodes/MermaidNode.d.ts +1 -8
- package/dist/types/client/nodes/ViewerFrame.d.ts +29 -0
- package/dist/types/client/nodes/ViewerHost.d.ts +6 -0
- package/dist/types/client/nodes/iframe-document-url.d.ts +3 -9
- package/dist/types/client/nodes/primitive-copy.d.ts +5 -0
- package/dist/types/client/nodes/use-iframe-content-height.d.ts +1 -1
- package/dist/types/client/nodes/use-surface-frame.d.ts +4 -6
- package/dist/types/client/nodes/viewer-runtime-state.d.ts +2 -1
- package/dist/types/client/state/canvas-store.d.ts +3 -1
- package/dist/types/client/state/intent-bridge.d.ts +1 -0
- package/dist/types/client/state/presentation.d.ts +17 -6
- package/dist/types/json-render/server.d.ts +2 -1
- package/dist/types/mcp/canvas-access.d.ts +1 -12
- package/dist/types/mcp/resource-subscriptions.d.ts +7 -0
- package/dist/types/mcp/server.d.ts +2 -0
- package/dist/types/server/ax-wait.d.ts +1 -0
- package/dist/types/server/canvas-operations.d.ts +1 -0
- package/dist/types/server/canvas-state.d.ts +2 -0
- package/dist/types/server/index.d.ts +11 -6
- package/dist/types/server/operations/http.d.ts +10 -0
- package/dist/types/server/operations/index.d.ts +2 -2
- package/dist/types/server/operations/invoker.d.ts +4 -3
- package/dist/types/server/operations/mcp-contracts.d.ts +20 -0
- package/dist/types/server/operations/mcp.d.ts +2 -0
- package/dist/types/server/operations/ops/batch.d.ts +1 -0
- package/dist/types/server/operations/ops/boards.d.ts +0 -1
- package/dist/types/server/operations/registry.d.ts +2 -2
- package/dist/types/server/operations/types.d.ts +12 -2
- package/dist/types/server/server.d.ts +2 -0
- package/dist/types/server/tour-control.d.ts +13 -3
- package/dist/types/server/webpage-node.d.ts +1 -0
- package/dist/types/shared/ax-surface-protocol.d.ts +0 -9
- package/dist/types/shared/tour.d.ts +8 -0
- package/docs/api-reference.md +2 -2
- package/docs/cli.md +1 -1
- package/docs/design/Chrome.dc.html +32 -6
- package/docs/design/Types1.dc.html +3 -2
- package/docs/design/Types2.dc.html +1 -1
- package/docs/design/Types3.dc.html +1 -1
- package/docs/design/Zoom.dc.html +37 -60
- package/docs/design/canvas.json +1 -1
- package/docs/design.md +169 -4
- package/docs/http-api.md +82 -1
- package/docs/mcp.md +101 -21
- package/docs/node-types.md +38 -3
- package/docs/plans/plan-009-tech-debt-backlog.md +2 -2
- package/docs/plans/plan-019-post-0.9-roadmap.md +402 -13
- package/docs/product-vision-2026-09.md +9 -0
- package/docs/sdk.md +5 -2
- package/package.json +2 -2
- package/plugins/pmx-canvas/com.github.copilot/extensions/pmx-canvas/runtime.json +1 -1
- package/plugins/pmx-canvas/plugin.json +1 -1
- package/plugins/pmx-canvas/runtime.json +1 -1
- package/plugins/pmx-canvas/tools.json +9418 -2016
- package/skills/pmx-canvas/SKILL.md +19 -21
- package/skills/pmx-canvas/references/full-reference.md +44 -6
- package/skills/pmx-canvas/references/installing-pmx-canvas.md +7 -7
- package/skills/published-consumer-e2e/scripts/run-published-consumer-e2e.sh +3 -5
- package/src/client/canvas/BarHint.tsx +6 -3
- package/src/client/canvas/CanvasNode.tsx +34 -47
- package/src/client/canvas/CanvasViewport.tsx +6 -7
- package/src/client/canvas/ContextMenu.tsx +63 -3
- package/src/client/canvas/EdgeLayer.tsx +365 -169
- package/src/client/canvas/ExpandedNodeOverlay.tsx +1 -2
- package/src/client/canvas/Presentation.tsx +53 -3
- package/src/client/canvas/ToolRail.tsx +2 -0
- package/src/client/canvas/TopBar.tsx +24 -9
- package/src/client/canvas/auto-fit.ts +9 -11
- package/src/client/canvas/canvas-area.ts +1 -1
- package/src/client/canvas/use-focus-trap.ts +6 -1
- package/src/client/mermaid-entry.ts +6 -20
- package/src/client/mermaid-render.ts +39 -0
- package/src/client/nodes/AxStepControls.tsx +45 -69
- package/src/client/nodes/BoardNode.tsx +65 -9
- package/src/client/nodes/ContextNode.tsx +88 -396
- package/src/client/nodes/ExtAppFrame.tsx +283 -1462
- package/src/client/nodes/FileNode.tsx +92 -81
- package/src/client/nodes/HtmlNode.tsx +8 -36
- package/src/client/nodes/LedgerNode.tsx +31 -17
- package/src/client/nodes/MarkdownNode.tsx +8 -17
- package/src/client/nodes/McpAppNode.tsx +48 -154
- package/src/client/nodes/MermaidNode.tsx +80 -69
- package/src/client/nodes/PromptNode.tsx +12 -14
- package/src/client/nodes/ResponseNode.tsx +8 -6
- package/src/client/nodes/StatusNode.tsx +22 -7
- package/src/client/nodes/StatusSummary.tsx +5 -3
- package/src/client/nodes/TraceNode.tsx +8 -8
- package/src/client/nodes/ViewerFrame.tsx +262 -0
- package/src/client/nodes/ViewerHost.tsx +41 -0
- package/src/client/nodes/WebpageNode.tsx +22 -24
- package/src/client/nodes/iframe-document-url.ts +20 -27
- package/src/client/nodes/primitive-copy.ts +97 -0
- package/src/client/nodes/use-iframe-content-height.ts +34 -10
- package/src/client/nodes/use-surface-frame.ts +22 -11
- package/src/client/nodes/viewer-runtime-state.ts +41 -35
- package/src/client/state/canvas-store.ts +18 -12
- package/src/client/state/intent-bridge.ts +1 -0
- package/src/client/state/presentation.ts +135 -15
- package/src/client/state/sse-bridge.ts +18 -19
- package/src/client/theme/global.css +389 -229
- package/src/client/theme/surface-theme.css +6 -6
- package/src/json-render/charts/tufte-components.tsx +44 -2
- package/src/json-render/renderer/index.css +62 -2
- package/src/json-render/renderer/index.tsx +31 -7
- package/src/json-render/server.ts +3 -2
- package/src/mcp/canvas-access.ts +6 -47
- package/src/mcp/resource-subscriptions.ts +181 -0
- package/src/mcp/server.ts +185 -219
- package/src/server/ax-wait.ts +21 -6
- package/src/server/board-export.ts +35 -24
- package/src/server/canvas-geometry.ts +1 -0
- package/src/server/canvas-operations.ts +6 -2
- package/src/server/canvas-state.ts +5 -0
- package/src/server/demo-state.json +106 -100
- package/src/server/html-primitives.ts +3 -9
- package/src/server/html-surface.ts +8 -0
- package/src/server/index.ts +30 -12
- package/src/server/operations/http.ts +69 -21
- package/src/server/operations/index.ts +8 -1
- package/src/server/operations/invoker.ts +53 -5
- package/src/server/operations/mcp-contracts.ts +354 -0
- package/src/server/operations/mcp.ts +153 -18
- package/src/server/operations/ops/ax-await.ts +18 -10
- package/src/server/operations/ops/ax-read.ts +2 -0
- package/src/server/operations/ops/ax-timeline.ts +2 -2
- package/src/server/operations/ops/batch.ts +27 -8
- package/src/server/operations/ops/boards.ts +1 -3
- package/src/server/operations/ops/nodes.ts +18 -3
- package/src/server/operations/ops/viewport.ts +11 -9
- package/src/server/operations/registry.ts +24 -4
- package/src/server/operations/types.ts +16 -2
- package/src/server/server.ts +17 -59
- package/src/server/tour-control.ts +66 -6
- package/src/server/webpage-node.ts +9 -4
- package/src/shared/ax-surface-protocol.ts +0 -11
- package/src/shared/content-height-reporter.ts +4 -3
- package/src/shared/tour.ts +8 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{e,t,Fr,F,ot,fi,Gt,$e,Ni,Di,Pi,pi,mi,u,Oi,zr,M,gi,yi,Lt,Hr,Mn,$i,k,Nn,Bi,Ur,Pn,n,A,Ze,Je,gt,tn,jn,Hi,Kn,E,h,Wi,Te,Bt,Zn,Ai}from"./index-1r72hdzb.js";import{T,V}from"./index-6qmsnxwy.js";function Tr(r){let a=r?.constructor,i=typeof a==="function"?a.prototype:Object.prototype;return r===i}function yr(r){if(r==null)return!0;if(jn(r)){if(typeof r.splice!=="function"&&typeof r!=="string"&&(typeof Buffer>"u"||!Buffer.isBuffer(r))&&!gt(r)&&!tn(r))return!1;return r.length===0}if(typeof r==="object"){if(r instanceof Map||r instanceof Set)return r.size===0;let a=Object.keys(r);if(Tr(r))return a.filter((i)=>i!=="constructor").length===0;return a.length===0}return!0}var K="comm",ir="rule",or="decl";var Ar="@media",_r="@import";var Rr="@supports";var Mr="@namespace",er="@keyframes";var nr="@layer",kr="@scope";var Lr=Math.abs,q=String.fromCharCode;function sr(r){return r.trim()}function tr(r,a,i){return r.replace(a,i)}function B(r,a){return r.charCodeAt(a)|0}function G(r,a,i){return r.slice(a,i)}function D(r){return r.length}function dr(r){return r.length}function Q(r,a){return a.push(r),r}var cr=1,Z=1,Cr=0,R=0,b=0,rr="";function lr(r,a,i,o,s,d,l,c){return{value:r,root:a,parent:i,type:o,props:s,children:d,line:cr,column:Z,length:l,return:"",siblings:c}}function Ir(){return b}function Or(){if(b=R>0?B(rr,--R):0,Z--,b===10)Z=1,cr--;return b}function L(){if(b=R<Cr?B(rr,R++):0,Z++,b===10)Z=1,cr++;return b}function H(){return B(rr,R)}function ar(){return R}function ur(r,a){return G(rr,r,a)}function J(r){switch(r){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function $r(r){return cr=Z=1,Cr=D(rr=r),R=0,[]}function Pr(r){return rr="",r}function pr(r){return sr(ur(R-1,wr(r===91?r+2:r===40?r+1:r)))}function Nr(r){while(b=H())if(b<33)L();else break;return J(r)>2||J(b)>3?"":" "}function Vr(r,a){while(--a&&L())if(b<48||b>102||b>57&&b<65||b>70&&b<97)break;return ur(r,ar()+(a<6&&H()==32&&L()==32))}function wr(r){while(L())switch(b){case r:return R;case 34:case 39:if(r!==34&&r!==39)wr(b);break;case 40:if(r===41)wr(r);break;case 92:L();break}return R}function Br(r,a){while(L())if(r+b===57)break;else if(r+b===84&&H()===47)break;return"/*"+ur(a,R-1)+"*"+q(r===47?r:L())}function Gr(r){while(!J(H()))L();return ur(r,R)}function qr(r){return Pr(mr("",null,null,null,[""],r=$r(r),0,[0],r))}function mr(r,a,i,o,s,d,l,c,p){var g=0,y=0,f=l,x=0,I=0,O=0,v=1,U=1,P=1,S=0,w=0,z="",X=s,N=d,_=o,m=z;while(U)switch(O=w,w=L()){case 40:if(O!=108&&B(m,f-1)==58)S++,m+="(";else m+=pr(w);break;case 41:S--,m+=")";break;case 34:case 39:case 91:m+=pr(w);break;case 9:case 10:case 13:case 32:if(S>0){m+=q(w);break}m+=Nr(O);break;case 92:m+=Vr(ar()-1,7);continue;case 47:switch(H()){case 42:case 47:if(Q(nt(Br(L(),ar()),a,i,p),p),(J(O||1)==5||J(H()||1)==5)&&D(m)&&G(m,-1,void 0)!==" ")m+=" ";break;default:m+="/"}break;case 123*v:c[g++]=D(m)*P;case 125*v:case 59:case 0:if(S>0&&w){m+=q(w);break}switch(w){case 0:case 125:U=0;case 59+y:if(P==-1)m=tr(m,/\f/g,"");if(I>0&&(D(m)-f||v===0))Q(I>32?Yr(m+";",o,i,f-1,p):Yr(tr(m," ","")+";",o,i,f-2,p),p);break;case 59:m+=";";default:if(Q(_=jr(m,a,i,g,y,s,c,z,X=[],N=[],f,d),d),w===123)if(y===0)mr(m,a,_,_,X,d,f,c,N);else{switch(x){case 99:if(B(m,3)===110)break;case 108:if(B(m,2)===97)break;default:y=0;case 100:case 109:case 115:}if(y)mr(r,_,_,o&&Q(jr(r,_,_,0,0,s,c,z,s,X=[],f,N),N),s,N,f,c,o?X:N);else mr(m,_,_,_,[""],N,0,c,N)}}g=y=I=0,v=P=1,z=m="",f=l;break;case 58:f=1+D(m),I=O;default:if(v<1){if(w==123)--v;else if(w==125&&v++==0&&Or()==125)continue}switch(m+=q(w),w*v){case 38:P=y>0?1:(m+="\f",-1);break;case 44:if(S>0)break;c[g++]=(D(m)-1)*P,P=1;break;case 64:if(H()===45)m+=pr(L());x=H(),y=f=D(z=m+=Gr(ar())),w++;break;case 45:if(O===45&&D(m)==2)v=0}}return d}function jr(r,a,i,o,s,d,l,c,p,g,y,f){var x=s-1,I=s===0?d:[""],O=dr(I);for(var v=0,U=0,P=0;v<o;++v)for(var S=0,w=G(r,x+1,x=Lr(U=l[v])),z=r;S<O;++S)if(z=sr(U>0?I[S]+" "+w:tr(w,/&\f/g,I[S])))p[P++]=z;return lr(r,a,i,s===0?ir:c,p,g,y,f)}function nt(r,a,i,o){return lr(r,a,i,K,q(Ir()),G(r,2,-2),0,o)}function Yr(r,a,i,o,s){return lr(r,a,i,or,G(r,0,o),G(r,o+1,-1),o,s)}function fr(r,a){var i="";for(var o=0;o<r.length;o++)i+=a(r[o],o,r,a)||"";return i}function Wr(r,a,i,o){switch(r.type){case nr:if(r.children.length)break;case _r:case Mr:case or:return r.return=r.return||r.value;case K:return"";case er:return r.return=r.value+"{"+fr(r.children,o)+"}";case ir:if(!D(r.value=r.props.join(",")))return""}return D(i=fr(r.children,o))?r.return=r.value+"{"+i+"}":""}function Xr(r){var a=dr(r);return function(i,o,s,d){var l="";for(var c=0;c<a;c++)l+=r[c](i,o,s,d)||"";return l}}var re="c4",st=e((r)=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(r),"detector"),dt=e(async()=>{let{diagram:r}=await (T("x07nq0tt"),import("./c4Diagram-5PPSVZJV-x07nq0tt.js"));return{id:re,diagram:r}},"loader"),ct={id:re,detector:st,loader:dt},lt=ct,ee="flowchart",ut=e((r,a)=>{if(a?.flowchart?.defaultRenderer==="dagre-wrapper"||a?.flowchart?.defaultRenderer==="elk")return!1;return/^\s*graph/.test(r)},"detector"),pt=e(async()=>{let{diagram:r}=await (T("yrr5z8tc"),import("./flowDiagram-UKHOOZJN-yrr5z8tc.js"));return{id:ee,diagram:r}},"loader"),mt={id:ee,detector:ut,loader:pt},ft=mt,te="flowchart-v2",vt=e((r,a)=>{if(a?.flowchart?.defaultRenderer==="dagre-d3")return!1;if(a?.flowchart?.defaultRenderer==="elk")a.layout="elk";if(/^\s*graph/.test(r)&&a?.flowchart?.defaultRenderer==="dagre-wrapper")return!0;return/^\s*flowchart/.test(r)},"detector"),ht=e(async()=>{let{diagram:r}=await (T("yrr5z8tc"),import("./flowDiagram-UKHOOZJN-yrr5z8tc.js"));return{id:te,diagram:r}},"loader"),yt={id:te,detector:vt,loader:ht},wt=yt,ae="swimlane",bt=e((r)=>/^\s*swimlane-beta\b/.test(r),"detector"),xt=e(async()=>{let{diagram:r}=await (T("nqysw67j"),import("./swimlanesDiagram-ULZ7WXOC-nqysw67j.js"));return{id:ae,diagram:r}},"loader"),St={id:ae,detector:bt,loader:xt},Et=St,ie="er",Dt=e((r)=>/^\s*erDiagram/.test(r),"detector"),Tt=e(async()=>{let{diagram:r}=await (T("zvbbdxp4"),import("./erDiagram-JOGREHBK-zvbbdxp4.js"));return{id:ie,diagram:r}},"loader"),At={id:ie,detector:Dt,loader:Tt},_t=At,oe="gitGraph",Rt=e((r)=>/^\s*gitGraph/.test(r),"detector"),Mt=e(async()=>{let{diagram:r}=await (T("vqqy6p1b"),import("./gitGraphDiagram-DS77QQ5N-vqqy6p1b.js"));return{id:oe,diagram:r}},"loader"),kt={id:oe,detector:Rt,loader:Mt},Ct=kt,ne="gantt",It=e((r)=>/^\s*gantt/.test(r),"detector"),Ot=e(async()=>{let{diagram:r}=await (T("282jzycm"),import("./ganttDiagram-PKOTCBZU-282jzycm.js"));return{id:ne,diagram:r}},"loader"),Ft={id:ne,detector:It,loader:Ot},$t=Ft,se="info",Pt=e((r)=>/^\s*info/.test(r),"detector"),zt=e(async()=>{let{diagram:r}=await (T("v1yvggqj"),import("./infoDiagram-6WML65LV-v1yvggqj.js"));return{id:se,diagram:r}},"loader"),Nt={id:se,detector:Pt,loader:zt},de="pie",Vt=e((r)=>/^\s*pie/.test(r),"detector"),Ut=e(async()=>{let{diagram:r}=await (T("ztdhwycc"),import("./pieDiagram-7S7Q4E2Y-ztdhwycc.js"));return{id:de,diagram:r}},"loader"),Ht={id:de,detector:Vt,loader:Ut},ce="quadrantChart",jt=e((r)=>/^\s*quadrantChart/.test(r),"detector"),Yt=e(async()=>{let{diagram:r}=await (T("c5p9gmg6"),import("./quadrantDiagram-CIZ2JOQS-c5p9gmg6.js"));return{id:ce,diagram:r}},"loader"),qt={id:ce,detector:jt,loader:Yt},Wt=qt,le="xychart",Xt=e((r)=>/^\s*xychart(-beta)?/.test(r),"detector"),Kt=e(async()=>{let{diagram:r}=await (T("38t16pme"),import("./xychartDiagram-ELKLHX3M-38t16pme.js"));return{id:le,diagram:r}},"loader"),Qt={id:le,detector:Xt,loader:Kt},Zt=Qt,ue="requirement",Jt=e((r)=>/^\s*requirement(Diagram)?/.test(r),"detector"),ra=e(async()=>{let{diagram:r}=await (T("9wm2dyaw"),import("./requirementDiagram-LRYGKXZP-9wm2dyaw.js"));return{id:ue,diagram:r}},"loader"),ea={id:ue,detector:Jt,loader:ra},ta=ea,pe="sequence",aa=e((r)=>/^\s*sequenceDiagram/.test(r),"detector"),ia=e(async()=>{let{diagram:r}=await (T("0jn0vwmz"),import("./sequenceDiagram-SI44F4Z6-0jn0vwmz.js"));return{id:pe,diagram:r}},"loader"),oa={id:pe,detector:aa,loader:ia},na=oa,me="class",sa=e((r,a)=>{if(a?.class?.defaultRenderer==="dagre-wrapper")return!1;return/^\s*classDiagram/.test(r)},"detector"),da=e(async()=>{let{diagram:r}=await (T("nc6g5x1r"),import("./classDiagram-JCYQIIEL-nc6g5x1r.js"));return{id:me,diagram:r}},"loader"),ca={id:me,detector:sa,loader:da},la=ca,fe="classDiagram",ua=e((r,a)=>{if(/^\s*classDiagram/.test(r)&&a?.class?.defaultRenderer==="dagre-wrapper")return!0;return/^\s*classDiagram-v2/.test(r)},"detector"),pa=e(async()=>{let{diagram:r}=await (T("0qnbpwvh"),import("./classDiagram-v2-OCEON4UE-0qnbpwvh.js"));return{id:fe,diagram:r}},"loader"),ma={id:fe,detector:ua,loader:pa},fa=ma,ge="state",ga=e((r,a)=>{if(a?.state?.defaultRenderer==="dagre-wrapper")return!1;return/^\s*stateDiagram/.test(r)},"detector"),va=e(async()=>{let{diagram:r}=await (T("schjpy6d"),import("./stateDiagram-OKZ733FA-schjpy6d.js"));return{id:ge,diagram:r}},"loader"),ha={id:ge,detector:ga,loader:va},ya=ha,ve="stateDiagram",wa=e((r,a)=>{if(/^\s*stateDiagram-v2/.test(r))return!0;if(/^\s*stateDiagram/.test(r)&&a?.state?.defaultRenderer==="dagre-wrapper")return!0;return!1},"detector"),ba=e(async()=>{let{diagram:r}=await (T("k8sfp2e7"),import("./stateDiagram-v2-UEYNNEHI-k8sfp2e7.js"));return{id:ve,diagram:r}},"loader"),xa={id:ve,detector:wa,loader:ba},Sa=xa,he="journey",Ea=e((r)=>/^\s*journey/.test(r),"detector"),Da=e(async()=>{let{diagram:r}=await (T("zjcffveh"),import("./journeyDiagram-NVQOT4AX-zjcffveh.js"));return{id:he,diagram:r}},"loader"),Ta={id:he,detector:Ea,loader:Da},Aa=Ta,_a=e((r,a,i)=>{t.debug(`rendering svg for syntax error
|
|
2
|
+
`);let o=A(a),s=o.append("g");o.attr("viewBox","0 0 2412 512"),k(o,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${i}`)},"draw"),ye={draw:_a},Ra=ye,Ma={db:{},renderer:ye,parser:{parse:e(()=>{return},"parse")}},ka=Ma,we="flowchart-elk",La=e((r,a={})=>{if(/^\s*flowchart-elk/.test(r)||/^\s*(flowchart|graph)/.test(r)&&a?.flowchart?.defaultRenderer==="elk")return a.layout="elk",!0;return!1},"detector"),Ca=e(async()=>{let{diagram:r}=await (T("yrr5z8tc"),import("./flowDiagram-UKHOOZJN-yrr5z8tc.js"));return{id:we,diagram:r}},"loader"),Ia={id:we,detector:La,loader:Ca},Oa=Ia,be="timeline",Fa=e((r)=>/^\s*timeline/.test(r),"detector"),$a=e(async()=>{let{diagram:r}=await (T("x7nkcy01"),import("./timeline-definition-Z64GVDOM-x7nkcy01.js"));return{id:be,diagram:r}},"loader"),Pa={id:be,detector:Fa,loader:$a},za=Pa,xe="mindmap",Na=e((r)=>/^\s*mindmap/.test(r),"detector"),Va=e(async()=>{let{diagram:r}=await (T("142xhr3k"),import("./mindmap-definition-FAOFIHXS-142xhr3k.js"));return{id:xe,diagram:r}},"loader"),Ua={id:xe,detector:Na,loader:Va},Ba=Ua,Se="kanban",Ga=e((r)=>/^\s*kanban/.test(r),"detector"),Ha=e(async()=>{let{diagram:r}=await (T("dakqtfp1"),import("./kanban-definition-27J2QSJJ-dakqtfp1.js"));return{id:Se,diagram:r}},"loader"),ja={id:Se,detector:Ga,loader:Ha},Ya=ja,Ee="sankey",qa=e((r)=>/^\s*sankey(-beta)?/.test(r),"detector"),Wa=e(async()=>{let{diagram:r}=await (T("2w19etgb"),import("./sankeyDiagram-W5VNT64P-2w19etgb.js"));return{id:Ee,diagram:r}},"loader"),Xa={id:Ee,detector:qa,loader:Wa},Ka=Xa,De="packet",Qa=e((r)=>/^\s*packet(-beta)?/.test(r),"detector"),Za=e(async()=>{let{diagram:r}=await (T("w3vahpav"),import("./diagram-LBJQPF4R-w3vahpav.js"));return{id:De,diagram:r}},"loader"),Ja={id:De,detector:Qa,loader:Za},Ae="radar",ri=e((r)=>/^\s*radar-beta/.test(r),"detector"),ei=e(async()=>{let{diagram:r}=await (T("4fz83q59"),import("./diagram-UB23O5K3-4fz83q59.js"));return{id:Ae,diagram:r}},"loader"),ti={id:Ae,detector:ri,loader:ei},_e="block",ai=e((r)=>/^\s*block(-beta)?/.test(r),"detector"),ii=e(async()=>{let{diagram:r}=await (T("pw1fa9yb"),import("./blockDiagram-VBNYF7ZC-pw1fa9yb.js"));return{id:_e,diagram:r}},"loader"),oi={id:_e,detector:ai,loader:ii},ni=oi,Re="treeView",si=e((r)=>/^\s*treeView-beta/.test(r),"detector"),di=e(async()=>{let{diagram:r}=await (T("gs5gpr93"),import("./diagram-7IWD3JNH-gs5gpr93.js"));return{id:Re,diagram:r}},"loader"),ci={id:Re,detector:si,loader:di},li=ci,Me="architecture",ui=e((r)=>/^\s*architecture/.test(r),"detector"),vi=e(async()=>{let{diagram:r}=await (T("5jhmxrzf"),import("./architectureDiagram-T3A2C74G-5jhmxrzf.js"));return{id:Me,diagram:r}},"loader"),hi={id:Me,detector:ui,loader:vi},wi=hi,ke="eventmodeling",bi=e((r)=>/^\s*eventmodeling/.test(r),"detector"),xi=e(async()=>{let{diagram:r}=await (T("cgwjg47s"),import("./diagram-B4RE2ZJO-cgwjg47s.js"));return{id:ke,diagram:r}},"loader"),Si={id:ke,detector:bi,loader:xi},Ei=Si,Le="ishikawa",Ti=e((r)=>/^\s*ishikawa(-beta)?\b/i.test(r),"detector"),_i=e(async()=>{let{diagram:r}=await (T("5hnq1a9p"),import("./ishikawaDiagram-WSZJBQD7-5hnq1a9p.js"));return{id:Le,diagram:r}},"loader"),Ri={id:Le,detector:Ti,loader:_i},Ce="venn",Mi=e((r)=>/^\s*venn-beta/.test(r),"detector"),ki=e(async()=>{let{diagram:r}=await (T("x8dqn9yf"),import("./vennDiagram-T6HMQDX7-x8dqn9yf.js"));return{id:Ce,diagram:r}},"loader"),Li={id:Ce,detector:Mi,loader:ki},Ci=Li,Ie="treemap",Ii=e((r)=>/^\s*treemap/.test(r),"detector"),Fi=e(async()=>{let{diagram:r}=await (T("42837z6h"),import("./diagram-Q27KOJAE-42837z6h.js"));return{id:Ie,diagram:r}},"loader"),zi={id:Ie,detector:Ii,loader:Fi},Oe="wardley",Vi=e((r)=>/^\s*wardley-beta/i.test(r),"detector"),Ui=e(async()=>{let{diagram:r}=await (T("t1j52t9r"),import("./wardleyDiagram-T6FBY63Y-t1j52t9r.js"));return{id:Oe,diagram:r}},"loader"),Gi={id:Oe,detector:Vi,loader:Ui},ji=Gi,Fe="cynefin",Yi=e((r)=>/^\s*cynefin-beta(?:[\s:]|$)/.test(r),"detector"),qi=e(async()=>{let{diagram:r}=await (T("vdxrwahz"),import("./cynefinDiagram-MW4NZA55-vdxrwahz.js"));return{id:Fe,diagram:r}},"loader"),Xi={id:Fe,detector:Yi,loader:qi},Pe="railroad",Ki=e((r)=>/^\s*railroad-beta/i.test(r),"detector"),Qi=e(async()=>{let{diagram:r}=await (T("xkmqkjwf"),import("./railroadDiagram-AXF67PYL-xkmqkjwf.js"));return{id:Pe,diagram:r}},"loader"),Zi={id:Pe,detector:Ki,loader:Qi},ze="railroadEbnf",Ji=e((r)=>/^\s*railroad-ebnf-beta/i.test(r),"detector"),ro=e(async()=>{let{diagram:r}=await (T("zphtgegj"),import("./ebnfDiagram-BXEA7PRR-zphtgegj.js"));return{id:ze,diagram:r}},"loader"),eo={id:ze,detector:Ji,loader:ro},Ne="railroadAbnf",to=e((r)=>/^\s*railroad-abnf-beta/i.test(r),"detector"),ao=e(async()=>{let{diagram:r}=await (T("p8dtp6va"),import("./abnfDiagram-N423BO3Z-p8dtp6va.js"));return{id:Ne,diagram:r}},"loader"),io={id:Ne,detector:to,loader:ao},Ve="railroadPeg",oo=e((r)=>/^\s*railroad-peg-beta/i.test(r),"detector"),no=e(async()=>{let{diagram:r}=await (T("5wvk7vsd"),import("./pegDiagram-VL7TDLO6-5wvk7vsd.js"));return{id:Ve,diagram:r}},"loader"),so={id:Ve,detector:oo,loader:no},Kr=!1,vr=e(()=>{if(Kr)return;Kr=!0,Ur("error",ka,(r)=>r.toLowerCase().trim()==="error"),Ur("---",{db:{clear:e(()=>{},"clear")},styles:{},renderer:{draw:e(()=>{},"draw")},parser:{parse:e(()=>{throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:e(()=>null,"init")},(r)=>r.toLowerCase().trimStart().startsWith("---")),Mn(Oa,Ba,wi),Mn(lt,Ya,fa,la,_t,$t,Nt,Ht,ta,na,Et,wt,ft,za,Ct,Sa,ya,Aa,Wt,Ka,Ja,Zt,ni,Ei,li,ti,Ri,zi,Zi,eo,io,so,Ci,ji,Xi)},"addDiagrams"),co=e(async()=>{t.debug("Loading registered diagrams");let a=(await Promise.allSettled(Object.entries(Lt).map(async([i,{detector:o,loader:s}])=>{if(!s)return;try{Pn(i)}catch{try{let{diagram:d,id:l}=await s();Ur(l,d,o)}catch(d){throw t.error(`Failed to load external diagram with key ${i}. Removing from detectors.`),delete Lt[i],d}}}))).filter((i)=>i.status==="rejected");if(a.length>0){t.error(`Failed to load ${a.length} external diagrams`);for(let i of a)t.error(i);throw Error(`Failed to load ${a.length} external diagrams`)}},"loadRegisteredDiagrams"),lo="graphics-document document";function Ue(r,a){if(r.attr("role",lo),a!=="")r.attr("aria-roledescription",a)}e(Ue,"setA11yDiagramInfo");function Be(r,a,i,o){if(r.insert===void 0)return;if(i){let s=`chart-desc-${o}`;r.attr("aria-describedby",s),r.insert("desc",":first-child").attr("id",s).text(i)}if(a){let s=`chart-title-${o}`;r.attr("aria-labelledby",s),r.insert("title",":first-child").attr("id",s).text(a)}}e(Be,"addSVGa11yTitleDescription");var xr=class r{constructor(a,i,o,s,d){this.type=a,this.text=i,this.db=o,this.parser=s,this.renderer=d}static{e(this,"Diagram")}static async fromText(a,i={}){let o=u(),s=Hr(a,o);a=Wi(a)+`
|
|
3
|
+
`;try{Pn(s)}catch{let g=$i(s);if(!g)throw new yi(`Diagram ${s} not found.`);let{id:y,diagram:f}=await g();Ur(y,f)}let{db:d,parser:l,renderer:c,init:p}=Pn(s);if(l.parser)l.parser.yy=d;if(d.clear?.(),p?.(o),i.title)d.setDiagramTitle?.(i.title);return await l.parse(a),new r(s,a,d,l,c)}async render(a,i){await this.renderer.draw(this.text,a,i,this)}getParser(){return this.parser}getType(){return this.type}},Qr=[],uo=e(()=>{Qr.forEach((r)=>{r()}),Qr=[]},"attachFunctions"),po=e((r)=>r.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Ge(r){let a=r.match(gi);if(!a)return{text:r,metadata:{}};let i=a[1],o=i?a[2].split(`
|
|
4
|
+
`).map((l)=>l.startsWith(i)?l.slice(i.length):l).join(`
|
|
5
|
+
`):a[2],s=Je(o,{schema:Ze})??{};s=typeof s==="object"&&!Array.isArray(s)?s:{};let d={};if(s.displayMode)d.displayMode=s.displayMode.toString();if(s.title)d.title=s.title.toString();if(s.config)d.config=s.config;return{text:r.slice(a[0].length),metadata:d}}e(Ge,"extractFrontMatter");var mo=e((r)=>r.replace(/\r\n?/g,`
|
|
6
|
+
`).replace(/<(\w+)([^>]*)>/g,(a,i,o)=>"<"+i+o.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),fo=e((r)=>{let{text:a,metadata:i}=Ge(r),{displayMode:o,title:s,config:d={}}=i;if(o){if(!d.gantt)d.gantt={};d.gantt.displayMode=o}return{title:s,config:d,text:a}},"processFrontmatter"),go=e((r)=>{let a=h.detectInit(r)??{},i=h.detectDirective(r,"wrap");if(Array.isArray(i))a.wrap=i.some(({type:o})=>o==="wrap");else if(i?.type==="wrap")a.wrap=!0;return{text:Hi(r),directive:a}},"processDirectives");function Er(r){let a=mo(r),i=fo(a),o=go(i.text),s=E(i.config,o.directive);return r=po(o.text),{code:r,title:i.title,config:s}}e(Er,"preprocessDiagram");function He(r){let a=new TextEncoder().encode(r),i=Array.from(a,(o)=>String.fromCodePoint(o)).join("");return btoa(i)}e(He,"toBase64");var vo=50000,ho="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",yo="sandbox",wo="loose",bo="http://www.w3.org/2000/svg",xo="http://www.w3.org/1999/xlink",So="http://www.w3.org/1999/xhtml",Eo="100%",Do="100%",To="border:0;margin:0;",Ao="margin:0",_o="allow-top-navigation-by-user-activation allow-popups",Ro='The "iframe" tag is not supported by your browser.',Mo=["foreignobject"],ko=["dominant-baseline"];function Dr(r){let a=Er(r);return zr(),Oi(a.config??{}),a}e(Dr,"processAndSetConfigs");async function je(r,a){vr();try{let{code:i,config:o}=Dr(r);return{diagramType:(await qe(i)).type,config:o}}catch(i){if(a?.suppressErrors)return!1;throw i}}e(je,"parse");var Zr=e((r,a,i=[])=>{let o=fi(`{ ${i.join(" !important; ")} !important; }`);return`.${r} ${a} ${o}`},"cssImportantStyles"),Lo=e((r,a=new Map)=>{let i=new CSSStyleSheet;if(r.fontFamily!==void 0)i.insertRule(`:root { --mermaid-font-family: ${r.fontFamily}}`,i.cssRules.length);if(r.altFontFamily!==void 0)i.insertRule(`:root { --mermaid-alt-font-family: ${r.altFontFamily}}`,i.cssRules.length);if(a instanceof Map){let c=M(r)?["> *","span"]:["rect","polygon","ellipse","circle","path"];a.forEach((p)=>{if(!yr(p.styles))c.forEach((g)=>{i.insertRule(Zr(p.id,g,p.styles),i.cssRules.length)});if(!yr(p.textStyles))i.insertRule(Zr(p.id,"tspan",(p?.textStyles||[]).map((g)=>g.replace("color","fill"))),i.cssRules.length)})}let o="";if(r.themeCSS!==void 0)if(typeof i.replaceSync==="function"){let s=new CSSStyleSheet;s.replaceSync(r.themeCSS),o=Nn(s)+`
|
|
7
|
+
`}else o+=`${r.themeCSS}
|
|
8
|
+
`;return o+Nn(i)},"createCssStyles"),Co=e((r,a)=>fr(qr(`${r}{${a}}`),Xr([e(function(o,s,d,l){if(o.type==="rule"&&Array.isArray(o.props)){if(o.parent&&o.parent.type===er)return;o.props=o.props.map((c)=>{if(c===r&&Array.isArray(o.children)&&o.children.every((g)=>{if(g.type!=="decl")return!1;return new Set(["font-family","font-size","fill"]).has(g.props)}))return c;if(!((c.startsWith(`${r} `)||c.startsWith(`${r}>`))&&!c.startsWith(`${r} ||`)))return`${r} ${c}`;return c})}else if(o.type.startsWith("@")){if(![Ar,Rr,nr,kr,"@container","@starting-style",er].includes(o.type))t.warn(`Removing unsupported at-rule ${o.type} from CSS`),o.type=K}},"addNamespace"),Wr])),"compileCSS"),Io=e((r,a,i,o)=>{let s=Lo(r,i),d=Bi(a,s,{...r.themeVariables,theme:r.theme,look:r.look},o);return Co(o,d)},"createUserStyles"),Oo=e((r="",a,i)=>{let o=r;if(!i&&!a)o=o.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#');return o=Te(o),o=o.replace(/<br>/g,"<br/>"),o},"cleanUpSvgCode"),Fo=e((r="",a)=>{let i=a?.viewBox?.baseVal?.height?a.viewBox.baseVal.height+"px":Do,o=He(`<body style="${Ao}">${r}</body>`);return`<iframe style="width:${Eo};height:${i};${To}" src="data:text/html;charset=UTF-8;base64,${o}" sandbox="${_o}">
|
|
9
|
+
${Ro}
|
|
10
|
+
</iframe>`},"putIntoIFrame"),Jr=e((r,a,i,o,s)=>{let d=r.append("div");if(d.attr("id",i),o)d.attr("style",o);let l=d.append("svg").attr("id",a).attr("width","100%").attr("xmlns",bo);if(s)l.attr("xmlns:xlink",s);return l.append("g"),r},"appendDivSvgG");function Sr(r,a){return r.append("iframe").attr("id",a).attr("style","width: 100%; height: 100%;").attr("sandbox","")}e(Sr,"sandboxedIframe");var $o=e((r,a,i,o)=>{r.getElementById(a)?.remove(),r.getElementById(i)?.remove(),r.getElementById(o)?.remove()},"removeExistingElements"),Po=e(async function(r,a,i){vr();let o=Dr(a);a=o.code;let s=u();if(t.debug(s),a.length>(s?.maxTextSize??vo))a=ho;let d=`#${r}`,l="i"+r,c="#"+l,p="d"+r,g="#"+p,y=e(()=>{let hr=n(x?c:g).node();if(hr&&"remove"in hr)hr.remove()},"removeTempElements"),f=n(document.body),x=s.securityLevel===yo,I=s.securityLevel===wo,O=s.fontFamily;if(i!==void 0){if(i)i.innerHTML="";if(x){let C=Sr(n(i),l);f=n(C.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=n(i);Jr(f,r,p,`font-family: ${O}`,xo)}else{if($o(document,r,p,l),x){let C=Sr(n(document.body),l);f=n(C.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=n("body");Jr(f,r,p)}let v,U;try{v=await xr.fromText(a,{title:o.title})}catch(C){if(s.suppressErrorRendering)throw y(),C;v=await xr.fromText("error"),U=C}let P=f.select(g).node(),S=v.type,w=P.firstChild,z=w.firstChild,X=v.renderer.getClasses?.(a,v),N=Io(s,S,X,d),_=document.createElement("style");_.innerHTML=N,w.insertBefore(_,z);try{await v.renderer.draw(a,r,"11.16.1",v)}catch(C){if(s.suppressErrorRendering)y();else Ra.draw(a,r,"11.16.1");throw C}let m=f.select(`${g} svg`),tt=v.db.getAccTitle?.(),at=v.db.getAccDescription?.();We(S,m,tt,at),f.select(`[id="${r}"]`).selectAll("foreignobject > *").attr("xmlns",So);let Y=f.select(g).node().innerHTML;if(t.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),Y=Oo(Y,x,$e(s.arrowMarkerAbsolute)),x){let C=f.select(g+" svg").node();Y=Fo(Y,C)}else if(!I)Y=V.sanitize(Y,{ADD_TAGS:Mo,ADD_ATTR:ko,HTML_INTEGRATION_POINTS:{foreignobject:!0}});if(uo(),U)throw U;return y(),{diagramType:S,svg:Y,bindFunctions:v.db.bindFunctions}},"render");function Ye(r={}){let a=F({},r);if(a?.fontFamily&&!a.themeVariables?.fontFamily){if(!a.themeVariables)a.themeVariables={};a.themeVariables.fontFamily=a.fontFamily}if(Di(a),a?.theme&&a.theme in ot)a.themeVariables=ot[a.theme].getThemeVariables(a.themeVariables);else if(a)a.themeVariables=ot.default.getThemeVariables(a.themeVariables);let i=typeof a==="object"?Ni(a):pi();Fr(i.logLevel),vr()}e(Ye,"initialize");var qe=e((r,a={})=>{let{code:i}=Er(r);return xr.fromText(i,a)},"getDiagramFromText");function We(r,a,i,o){Ue(a,r),Be(a,i,o,a.attr("id"))}e(We,"addA11yInfo");var W=Object.freeze({render:Po,parse:je,getDiagramFromText:qe,initialize:Ye,getConfig:u,setConfig:mi,getSiteConfig:pi,updateSiteConfig:Pi,reset:e(()=>{zr()},"reset"),globalReset:e(()=>{zr(Gt)},"globalReset"),defaultConfig:Gt});Fr(u().logLevel);zr(u());var zo=e((r,a,i)=>{if(t.warn(r),Kn(r)){if(i)i(r.str,r.hash);a.push({...r,message:r.str,error:r})}else{if(i)i(r);if(r instanceof Error)a.push({str:r.message,message:r.message,hash:r.name,error:r})}},"handleError"),Xe=e(async function(r={querySelector:".mermaid"}){try{await No(r)}catch(a){if(Kn(a))t.error(a.str);if(j.parseError)j.parseError(a);if(!r.suppressErrors)throw t.error("Use the suppressErrors option to suppress these errors"),a}},"run"),No=e(async function({postRenderCallback:r,querySelector:a,nodes:i}={querySelector:".mermaid"}){let o=W.getConfig();t.debug(`${!r?"No ":""}Callback function found`);let s;if(i)s=i;else if(a)s=document.querySelectorAll(a);else throw Error("Nodes and querySelector are both undefined");if(t.debug(`Found ${s.length} diagrams`),o?.startOnLoad!==void 0)t.debug("Start On Load: "+o?.startOnLoad),W.updateSiteConfig({startOnLoad:o?.startOnLoad});let d=new h.InitIDGenerator(o.deterministicIds,o.deterministicIDSeed),l,c=[];for(let p of Array.from(s)){if(t.info("Rendering diagram: "+p.id),p.getAttribute("data-processed"))continue;p.setAttribute("data-processed","true");let g=`mermaid-${d.next()}`;l=p.innerHTML,l=Zn(h.entityDecode(l)).trim().replace(/<br\s*\/?>/gi,"<br/>");let y=h.detectInit(l);if(y)t.debug("Detected early reinit: ",y);try{let{svg:f,bindFunctions:x}=await et(g,l,p);if(p.innerHTML=f,r)await r(g);if(x)x(p)}catch(f){zo(f,c,j.parseError)}}if(c.length>0)throw c[0]},"runThrowsErrors"),Ke=e(function(r){W.initialize(r)},"initialize"),Vo=e(async function(r,a,i){if(t.warn("mermaid.init is deprecated. Please use run instead."),r)Ke(r);let o={postRenderCallback:i,querySelector:".mermaid"};if(typeof a==="string")o.querySelector=a;else if(a)if(a instanceof HTMLElement)o.nodes=[a];else o.nodes=a;await Xe(o)},"init"),Uo=e(async(r,{lazyLoad:a=!0}={})=>{if(vr(),Mn(...r),a===!1)await co()},"registerExternalDiagrams"),Qe=e(function(){if(j.startOnLoad){let{startOnLoad:r}=W.getConfig();if(r)j.run().catch((a)=>t.error("Mermaid failed to initialize",a))}},"contentLoaded");if(typeof document<"u")window.addEventListener("load",Qe,!1);var Bo=e(function(r){j.parseError=r},"setParseErrorHandler"),gr=[],br=!1,rt=e(async()=>{if(br)return;br=!0;while(gr.length>0){let r=gr.shift();if(r)try{await r()}catch(a){t.error("Error executing queue",a)}}br=!1},"executeQueue"),Go=e(async(r,a)=>new Promise((i,o)=>{let s=e(()=>new Promise((d,l)=>{W.parse(r,a).then((c)=>{d(c),i(c)},(c)=>{t.error("Error parsing",c),j.parseError?.(c),l(c),o(c)})}),"performCall");gr.push(s),rt().catch(o)}),"parse"),et=e((r,a,i)=>new Promise((o,s)=>{let d=e(()=>new Promise((l,c)=>{W.render(r,a,i).then((p)=>{l(p),o(p)},(p)=>{t.error("Error parsing",p),j.parseError?.(p),c(p),s(p)})}),"performCall");gr.push(d),rt().catch(s)}),"render"),Ho=e(()=>Object.keys(Lt).map((r)=>({id:r})),"getRegisteredDiagramsMetadata"),j={startOnLoad:!0,mermaidAPI:W,parse:Go,render:et,init:Vo,run:Xe,registerExternalDiagrams:Uo,registerLayoutLoaders:Ai,initialize:Ke,parseError:void 0,contentLoaded:Qe,setParseErrorHandler:Bo,detectType:Hr,registerIconPacks:Bt,getRegisteredDiagramsMetadata:Ho},Fn=j;/*! Check if previously processed *//*!
|
|
11
|
+
* Wait for document loaded before starting the execution
|
|
12
|
+
*/export{Fn as default};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import{e,t,N,i,a,x,u,Gr,w,r,fe,Ce}from"./index-1r72hdzb.js";import"./index-6qmsnxwy.js";import{le}from"./index-s4j678gj.js";import{J}from"./index-3cy1bzwh.js";var be=new Uint8Array(16);function te(){return crypto.getRandomValues(be)}var D=[];for(let n=0;n<256;++n)D.push((n+256).toString(16).slice(1));function ge(n,o=0){return(D[n[o+0]]+D[n[o+1]]+D[n[o+2]]+D[n[o+3]]+"-"+D[n[o+4]]+D[n[o+5]]+"-"+D[n[o+6]]+D[n[o+7]]+"-"+D[n[o+8]]+D[n[o+9]]+"-"+D[n[o+10]]+D[n[o+11]]+D[n[o+12]]+D[n[o+13]]+D[n[o+14]]+D[n[o+15]]).toLowerCase()}function Ee(n,o,f){if(!o&&!n&&crypto.randomUUID)return crypto.randomUUID();return _e(n,o,f)}function _e(n,o,f){n=n||{};let g=n.random??n.rng?.()??te();if(g.length<16)throw Error("Random bytes length must be >= 16");if(g[6]=g[6]&15|64,g[8]=g[8]&63|128,o){if(f=f||0,f<0||f+16>o.length)throw RangeError(`UUID byte range ${f}:${f+15} is out of buffer bounds`);for(let s=0;s<16;++s)o[f+s]=g[s];return o}return ge(g)}var ne=Ee;var ie=function(){var n=e(function(R,h,c,d){for(c=c||{},d=R.length;d--;c[R[d]]=h);return c},"o"),o=[1,4],f=[1,13],g=[1,12],s=[1,15],m=[1,16],E=[1,20],_=[1,19],L=[6,7,8],B=[1,26],P=[1,24],V=[1,25],y=[6,7,11],F=[1,6,13,15,16,19,22],re=[1,33],se=[1,34],G=[1,6,7,11,13,15,16,19,22],Y={trace:e(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:e(function(h,c,d,p,b,l,j){var k=l.length-1;switch(b){case 6:case 7:return p;case 8:p.getLogger().trace("Stop NL ");break;case 9:p.getLogger().trace("Stop EOF ");break;case 11:p.getLogger().trace("Stop NL2 ");break;case 12:p.getLogger().trace("Stop EOF2 ");break;case 15:p.getLogger().info("Node: ",l[k].id),p.addNode(l[k-1].length,l[k].id,l[k].descr,l[k].type);break;case 16:p.getLogger().trace("Icon: ",l[k]),p.decorateNode({icon:l[k]});break;case 17:case 21:p.decorateNode({class:l[k]});break;case 18:p.getLogger().trace("SPACELIST");break;case 19:p.getLogger().trace("Node: ",l[k].id),p.addNode(0,l[k].id,l[k].descr,l[k].type);break;case 20:p.decorateNode({icon:l[k]});break;case 25:p.getLogger().trace("node found ..",l[k-2]),this.$={id:l[k-1],descr:l[k-1],type:p.getType(l[k-2],l[k])};break;case 26:this.$={id:l[k],descr:l[k],type:p.nodeType.DEFAULT};break;case 27:p.getLogger().trace("node found ..",l[k-3]),this.$={id:l[k-3],descr:l[k-1],type:p.getType(l[k-2],l[k])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:o},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:o},{6:f,7:[1,10],9:9,12:11,13:g,14:14,15:s,16:m,17:17,18:18,19:E,22:_},n(L,[2,3]),{1:[2,2]},n(L,[2,4]),n(L,[2,5]),{1:[2,6],6:f,12:21,13:g,14:14,15:s,16:m,17:17,18:18,19:E,22:_},{6:f,9:22,12:11,13:g,14:14,15:s,16:m,17:17,18:18,19:E,22:_},{6:B,7:P,10:23,11:V},n(y,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:E,22:_}),n(y,[2,18]),n(y,[2,19]),n(y,[2,20]),n(y,[2,21]),n(y,[2,23]),n(y,[2,24]),n(y,[2,26],{19:[1,30]}),{20:[1,31]},{6:B,7:P,10:32,11:V},{1:[2,7],6:f,12:21,13:g,14:14,15:s,16:m,17:17,18:18,19:E,22:_},n(F,[2,14],{7:re,11:se}),n(G,[2,8]),n(G,[2,9]),n(G,[2,10]),n(y,[2,15]),n(y,[2,16]),n(y,[2,17]),{20:[1,35]},{21:[1,36]},n(F,[2,13],{7:re,11:se}),n(G,[2,11]),n(G,[2,12]),{21:[1,37]},n(y,[2,25]),n(y,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(h,c){if(c.recoverable)this.trace(h);else{var d=Error(h);throw d.hash=c,d}},"parseError"),parse:e(function(h){var c=this,d=[0],p=[],b=[null],l=[],j=this.table,k="",W=0,oe=0,ae=0,pe=2,ce=1,me=l.slice.call(arguments,1),S=Object.create(this.lexer),A={yy:{}};for(var q in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,q))A.yy[q]=this.yy[q];if(S.setInput(h,A.yy),A.yy.lexer=S,A.yy.parser=this,typeof S.yylloc>"u")S.yylloc={};var K=S.yylloc;l.push(K);var ye=S.options&&S.options.ranges;if(typeof A.yy.parseError==="function")this.parseError=A.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function ke(O){d.length=d.length-2*O,b.length=b.length-O,l.length=l.length-O}e(ke,"popStack");function he(){var O=p.pop()||S.lex()||ce;if(typeof O!=="number"){if(O instanceof Array)p=O,O=p.pop();O=c.symbols_[O]||O}return O}e(he,"lex");var v,Q,U,T,we,Z,M={},X,I,de,z;while(!0){if(U=d[d.length-1],this.defaultActions[U])T=this.defaultActions[U];else{if(v===null||typeof v>"u")v=he();T=j[U]&&j[U][v]}if(typeof T>"u"||!T.length||!T[0]){var ee="";z=[];for(X in j[U])if(this.terminals_[X]&&X>pe)z.push("'"+this.terminals_[X]+"'");if(S.showPosition)ee="Parse error on line "+(W+1)+`:
|
|
2
|
+
`+S.showPosition()+`
|
|
3
|
+
Expecting `+z.join(", ")+", got '"+(this.terminals_[v]||v)+"'";else ee="Parse error on line "+(W+1)+": Unexpected "+(v==ce?"end of input":"'"+(this.terminals_[v]||v)+"'");this.parseError(ee,{text:S.match,token:this.terminals_[v]||v,line:S.yylineno,loc:K,expected:z})}if(T[0]instanceof Array&&T.length>1)throw Error("Parse Error: multiple actions possible at state: "+U+", token: "+v);switch(T[0]){case 1:if(d.push(v),b.push(S.yytext),l.push(S.yylloc),d.push(T[1]),v=null,!Q){if(oe=S.yyleng,k=S.yytext,W=S.yylineno,K=S.yylloc,ae>0)ae--}else v=Q,Q=null;break;case 2:if(I=this.productions_[T[1]][1],M.$=b[b.length-I],M._$={first_line:l[l.length-(I||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(I||1)].first_column,last_column:l[l.length-1].last_column},ye)M._$.range=[l[l.length-(I||1)].range[0],l[l.length-1].range[1]];if(Z=this.performAction.apply(M,[k,oe,W,A.yy,T[1],b,l].concat(me)),typeof Z<"u")return Z;if(I)d=d.slice(0,-1*I*2),b=b.slice(0,-1*I),l=l.slice(0,-1*I);d.push(this.productions_[T[1]][0]),b.push(M.$),l.push(M._$),de=j[d[d.length-2]][d[d.length-1]],d.push(de);break;case 3:return!0}}return!0},"parse")},ue=function(){var R={EOF:1,parseError:e(function(c,d){if(this.yy.parser)this.yy.parser.parseError(c,d);else throw Error(c)},"parseError"),setInput:e(function(h,c){if(this.yy=c||this.yy||{},this._input=h,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 h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var c=h.match(/(?:\r\n?|\n).*/g);if(c)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),h},"input"),unput:e(function(h){var c=h.length,d=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var p=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),d.length-1)this.yylineno-=d.length-1;var b=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:d?(d.length===p.length?this.yylloc.first_column:0)+p[p.length-d.length].length-d[0].length:this.yylloc.first_column-c},this.options.ranges)this.yylloc.range=[b[0],b[0]+this.yyleng-c];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(h){this.unput(this.match.slice(h))},"less"),pastInput:e(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var h=this.match;if(h.length<20)h+=this._input.substr(0,20-h.length);return(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var h=this.pastInput(),c=Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
|
5
|
+
`+c+"^"},"showPosition"),test_match:e(function(h,c){var d,p,b;if(this.options.backtrack_lexer){if(b={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)b.yylloc.range=this.yylloc.range.slice(0)}if(p=h[0].match(/(?:\r\n?|\n).*/g),p)this.yylineno+=p.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,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(h[0].length),this.matched+=h[0],d=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(d)return d;else if(this._backtrack){for(var l in b)this[l]=b[l];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var h,c,d,p;if(!this._more)this.yytext="",this.match="";var b=this._currentRules();for(var l=0;l<b.length;l++)if(d=this._input.match(this.rules[b[l]]),d&&(!c||d[0].length>c[0].length)){if(c=d,p=l,this.options.backtrack_lexer)if(h=this.test_match(d,b[l]),h!==!1)return h;else if(this._backtrack){c=!1;continue}else return!1;else if(!this.options.flex)break}if(c){if(h=this.test_match(c,b[p]),h!==!1)return h;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 c=this.next();if(c)return c;else return this.lex()},"lex"),begin:e(function(c){this.conditionStack.push(c)},"begin"),popState:e(function(){var c=this.conditionStack.length-1;if(c>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(c){if(c=this.conditionStack.length-1-Math.abs(c||0),c>=0)return this.conditionStack[c];else return"INITIAL"},"topState"),pushState:e(function(c){this.begin(c)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(c,d,p,b){var l=b;switch(p){case 0:return c.getLogger().trace("Found comment",d.yytext),6;break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;break;case 4:this.popState();break;case 5:c.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return c.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:c.getLogger().trace("end icon"),this.popState();break;case 10:return c.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return c.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return c.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return c.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;break;case 14:return this.begin("NODE"),19;break;case 15:return this.begin("NODE"),19;break;case 16:return this.begin("NODE"),19;break;case 17:return this.begin("NODE"),19;break;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:c.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return c.getLogger().trace("description:",d.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),c.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),c.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),c.getLogger().trace("node end ...",d.yytext),"NODE_DEND";break;case 30:return this.popState(),c.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),c.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),c.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),c.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),c.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return c.getLogger().trace("Long description:",d.yytext),20;break;case 36:return c.getLogger().trace("Long description:",d.yytext),20;break}},"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}}};return R}();Y.lexer=ue;function H(){this.yy={}}return e(H,"Parser"),H.prototype=Y,Y.Parser=H,new H}();ie.parser=ie;var Se=ie,xe=12,C={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Ne=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=C,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)}static{e(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(n){for(let o=this.nodes.length-1;o>=0;o--)if(this.nodes[o].level<n)return this.nodes[o];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(n,o,f,g){t.info("addNode",n,o,f,g);let s=!1;if(this.nodes.length===0)this.baseLevel=n,n=0,s=!0;else if(this.baseLevel!==void 0)n=n-this.baseLevel,s=!1;let m=r(),E=m.mindmap?.padding??x.mindmap.padding;switch(g){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:E*=2;break}let _={id:this.count++,nodeId:w(o,m),level:n,descr:w(f,m),type:g,children:[],width:m.mindmap?.maxNodeWidth??x.mindmap.maxNodeWidth,padding:E,isRoot:s},L=this.getParent(n);if(L)L.children.push(_),this.nodes.push(_);else if(s)this.nodes.push(_);else throw Error(`There can be only one root. No parent could be found for ("${_.descr}")`)}getType(n,o){switch(t.debug("In get type",n,o),n){case"[":return this.nodeType.RECT;case"(":return o===")"?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(n,o){this.elements[n]=o}getElementById(n){return this.elements[n]}decorateNode(n){if(!n)return;let o=r(),f=this.nodes[this.nodes.length-1];if(n.icon)f.icon=w(n.icon,o);if(n.class)f.class=w(n.class,o)}type2Str(n){switch(n){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(n,o){if(n.level===0)n.section=void 0;else n.section=o;if(n.children)for(let[f,g]of n.children.entries()){let s=n.level===0?f%(xe-1):o;this.assignSections(g,s)}}flattenNodes(n,o){let f=r(),g=["mindmap-node"];if(n.isRoot===!0)g.push("section-root","section--1");else if(n.section!==void 0)g.push(`section-${n.section}`);if(n.class)g.push(n.class);let s=g.join(" "),m=e((_)=>{let B=(f.theme?.toLowerCase()??"").includes("redux");switch(_){case C.CIRCLE:return"mindmapCircle";case C.RECT:return"rect";case C.ROUNDED_RECT:return"rounded";case C.CLOUD:return"cloud";case C.BANG:return"bang";case C.HEXAGON:return"hexagon";case C.DEFAULT:return B?"rounded":"defaultMindmapNode";case C.NO_BORDER:default:return"rect"}},"getShapeFromType"),E={id:n.id.toString(),domId:"node_"+n.id.toString(),label:n.descr,labelType:"markdown",isGroup:!1,shape:m(n.type),width:n.width,height:n.height??0,padding:n.padding,cssClasses:s,cssStyles:[],look:f.look,icon:n.icon,x:n.x,y:n.y,level:n.level,nodeId:n.nodeId,type:n.type,section:n.section};if(o.push(E),n.children)for(let _ of n.children)this.flattenNodes(_,o)}generateEdges(n,o){if(!n.children)return;let f=r();for(let g of n.children){let s="edge";if(g.section!==void 0)s+=` section-edge-${g.section}`;let m=n.level+1;s+=` edge-depth-${m}`;let E={id:`edge_${n.id}_${g.id}`,start:n.id.toString(),end:g.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:f.look,classes:s,depth:n.level,section:g.section};o.push(E),this.generateEdges(g,o)}}getData(){let n=this.getMindmap(),o=r(),g=Gr().layout!==void 0,s=o;if(!g)s.layout="cose-bilkent";if(!n)return{nodes:[],edges:[],config:s};t.debug("getData: mindmapRoot",n,o),this.assignSections(n);let m=[],E=[];this.flattenNodes(n,m),this.generateEdges(n,E),t.debug(`getData: processed ${m.length} nodes and ${E.length} edges`);let _=new Map;for(let L of m)_.set(L.id,{shape:L.shape,width:L.width,height:L.height,padding:L.padding});return{nodes:m,edges:E,config:s,rootNode:n,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(_),type:"mindmap",diagramId:"mindmap-"+ne()}}getLogger(){return t}},De=e(async(n,o,f,g)=>{t.debug(`Rendering mindmap diagram
|
|
7
|
+
`+n);let s=g.db,m=s.getData(),E=le(o,m.config.securityLevel);if(m.type=g.type,m.layoutAlgorithm=Ce(m.config.layout,{fallback:"cose-bilkent"}),m.diagramId=o,!s.getMindmap())return;m.nodes.forEach((y)=>{if(y.shape==="rounded")y.radius=15,y.taper=15,y.stroke="none",y.width=0,y.padding=15;else if(y.shape==="circle")y.padding=10;else if(y.shape==="rect")y.width=0,y.padding=10;else if(y.shape==="hexagon")y.width=0,y.height=0}),await fe(m,E);let{themeVariables:L}=u(),{useGradient:B,gradientStart:P,gradientStop:V}=L;if(B&&P&&V){let y=E.attr("id"),F=E.append("defs").append("linearGradient").attr("id",`${y}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");F.append("stop").attr("offset","0%").attr("stop-color",P).attr("stop-opacity",1),F.append("stop").attr("offset","100%").attr("stop-color",V).attr("stop-opacity",1)}J(E,m.config.mindmap?.padding??x.mindmap.padding,"mindmapDiagram",m.config.mindmap?.useMaxWidth??x.mindmap.useMaxWidth)},"draw"),Le={draw:De},ve=e((n)=>{let{theme:o,look:f}=n,g="";for(let s=0;s<n.THEME_COLOR_LIMIT;s++)if(n["lineColor"+s]=n["lineColor"+s]||n["cScaleInv"+s],N(n["lineColor"+s]))n["lineColor"+s]=i(n["lineColor"+s],20);else n["lineColor"+s]=a(n["lineColor"+s],20);for(let s=0;s<n.THEME_COLOR_LIMIT;s++){let m=""+(f==="neo"?Math.max(10-(s-1)*2,2):17-3*s);g+=`
|
|
8
|
+
.section-${s-1} rect, .section-${s-1} path, .section-${s-1} circle, .section-${s-1} polygon, .section-${s-1} path {
|
|
9
|
+
fill: ${n["cScale"+s]};
|
|
10
|
+
}
|
|
11
|
+
.section-${s-1} text {
|
|
12
|
+
fill: ${n["cScaleLabel"+s]};
|
|
13
|
+
}
|
|
14
|
+
.section-${s-1} span {
|
|
15
|
+
color: ${n["cScaleLabel"+s]};
|
|
16
|
+
}
|
|
17
|
+
.node-icon-${s-1} {
|
|
18
|
+
font-size: 40px;
|
|
19
|
+
color: ${n["cScaleLabel"+s]};
|
|
20
|
+
}
|
|
21
|
+
.section-edge-${s-1}{
|
|
22
|
+
stroke: ${n["cScale"+s]};
|
|
23
|
+
}
|
|
24
|
+
.edge-depth-${s-1}{
|
|
25
|
+
stroke-width: ${m};
|
|
26
|
+
}
|
|
27
|
+
.section-${s-1} line {
|
|
28
|
+
stroke: ${n["cScaleInv"+s]} ;
|
|
29
|
+
stroke-width: 3;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.disabled, .disabled circle, .disabled text {
|
|
33
|
+
fill: lightgray;
|
|
34
|
+
}
|
|
35
|
+
.disabled text {
|
|
36
|
+
fill: #efefef;
|
|
37
|
+
}
|
|
38
|
+
[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 {
|
|
39
|
+
fill: ${o==="redux"||o==="redux-dark"||o==="neutral"?n.mainBkg:n["cScale"+s]};
|
|
40
|
+
stroke: ${o==="redux"||o==="redux-dark"?n.nodeBorder:n["cScale"+s]};
|
|
41
|
+
stroke-width: ${n.strokeWidth??2}px;
|
|
42
|
+
}
|
|
43
|
+
[data-look="neo"].section-edge-${s-1}{
|
|
44
|
+
stroke: ${o?.includes("redux")||o==="neo-dark"?n.nodeBorder:n["cScale"+s]};
|
|
45
|
+
}
|
|
46
|
+
[data-look="neo"].mindmap-node.section-${s-1} text {
|
|
47
|
+
fill: ${o==="redux"||o==="redux-dark"?n.nodeBorder:n["cScaleLabel"+(o==="neutral"?1:s)]};
|
|
48
|
+
}
|
|
49
|
+
`}return g},"genSections"),Te=e((n,o,f)=>{let g="";for(let s=0;s<n;s++)g+=`
|
|
50
|
+
[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 {
|
|
51
|
+
stroke: url(${o}-gradient);
|
|
52
|
+
fill: ${f};
|
|
53
|
+
}
|
|
54
|
+
.section-${s-1} line {
|
|
55
|
+
stroke-width: 0;
|
|
56
|
+
}`;return g},"genGradient"),Oe=e((n)=>{let{theme:o}=n,f=n.svgId,g=n.dropShadow?n.dropShadow.replace("url(#drop-shadow)",`url(${f}-drop-shadow)`):"none";return`
|
|
57
|
+
.edge {
|
|
58
|
+
stroke-width: 3;
|
|
59
|
+
}
|
|
60
|
+
${ve(n)}
|
|
61
|
+
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
62
|
+
fill: ${n.git0};
|
|
63
|
+
}
|
|
64
|
+
.section-root text {
|
|
65
|
+
fill: ${n.gitBranchLabel0};
|
|
66
|
+
}
|
|
67
|
+
.section-root span {
|
|
68
|
+
color: ${o?.includes("redux")?n.nodeBorder:n.gitBranchLabel0};
|
|
69
|
+
}
|
|
70
|
+
.icon-container {
|
|
71
|
+
height:100%;
|
|
72
|
+
display: flex;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
align-items: center;
|
|
75
|
+
}
|
|
76
|
+
.edge {
|
|
77
|
+
fill: none;
|
|
78
|
+
}
|
|
79
|
+
.mindmap-node-label {
|
|
80
|
+
dy: 1em;
|
|
81
|
+
alignment-baseline: middle;
|
|
82
|
+
text-anchor: middle;
|
|
83
|
+
dominant-baseline: middle;
|
|
84
|
+
text-align: center;
|
|
85
|
+
}
|
|
86
|
+
[data-look="neo"].mindmap-node {
|
|
87
|
+
filter: ${g};
|
|
88
|
+
}
|
|
89
|
+
[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 {
|
|
90
|
+
fill: ${o?.includes("redux")?n.mainBkg:n.git0};
|
|
91
|
+
}
|
|
92
|
+
[data-look="neo"].mindmap-node.section-root .text-inner-tspan {
|
|
93
|
+
fill: ${o?.includes("redux")?n.nodeBorder:n["cScaleLabel"+(o==="neutral"?1:0)]};
|
|
94
|
+
}
|
|
95
|
+
${n.useGradient&&f&&n.mainBkg?Te(n.THEME_COLOR_LIMIT,f,n.mainBkg):""}
|
|
96
|
+
`},"getStyles"),Ie=Oe,Tt={get db(){return new Ne},renderer:Le,parser:Se,styles:Ie};export{Tt as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{si}from"./index-tb1wf525.js";export{si as createPacketServices};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e,t}from"./index-1r72hdzb.js";import"./index-6qmsnxwy.js";import{P,ze,Ge}from"./index-r2fyc9w1.js";import{R}from"./index-353m7b0p.js";import{er,Pe}from"./index-tb1wf525.js";var i=er().RailroadPeg.parser.LangiumParser,s=e((r)=>{let a=r.alternatives.map(l);if(a.length===1)return a[0];return{type:"choice",alternatives:a}},"transformOrderedChoice"),l=e((r)=>{let a=r.elements.map(m);if(a.length===1)return a[0];return{type:"sequence",elements:a}},"transformSequence"),m=e((r)=>{let a=p(r.suffix);if(!r.operator)return a;return{type:"special",text:r.operator==="&"?`&${o(a)}`:`!${o(a)}`}},"transformPrefix"),o=e((r)=>{switch(r.type){case"terminal":return`"${r.value}"`;case"nonterminal":return r.name;case"special":return r.text;default:return"(...)"}},"nodeToLabel"),p=e((r)=>{let a=u(r.primary);if(!r.operator)return a;switch(r.operator){case"?":return{type:"optional",element:a};case"*":return{type:"repetition",element:a,min:0,max:1/0};case"+":return{type:"repetition",element:a,min:1,max:1/0};default:throw Error(`Unsupported PEG suffix operator: ${r.operator}`)}},"transformSuffix"),u=e((r)=>{switch(r.$type){case"PegLiteral":return{type:"terminal",value:r.value};case"PegIdentifier":return{type:"nonterminal",name:r.name};case"PegGroup":return s(r.element);case"PegAny":return{type:"special",text:r.dot};default:throw Error(`Unsupported PEG primary node: ${r.$type}`)}},"transformPrimary"),c=e((r)=>({name:r.name,definition:s(r.definition)}),"transformRule"),f=e((r)=>{if(R(r,P),r.title)P.setTitle(r.title);r.rules.map((a)=>P.addRule(c(a)))},"populateDb"),d={parse:e((r)=>{P.clear(),t.debug("[PEG Parser] Starting Langium parse");let a=i.parse(r);if(a.lexerErrors.length>0||a.parserErrors.length>0)throw new Pe(a);let n=a.value;t.debug("[PEG Parser] Parsed rules:",n.rules.length),f(n),t.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:P}},x={parser:d,db:P,renderer:Ge,styles:ze};export{x as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{oi}from"./index-tb1wf525.js";export{oi as createPieServices};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import{R}from"./index-353m7b0p.js";import{e,t,x,k,d,f,p,m,g,b,v,r,z,qt,Vr,A,he,E}from"./index-1r72hdzb.js";import"./index-6qmsnxwy.js";import{D}from"./index-tb1wf525.js";import{De}from"./index-rh7nv68n.js";import{pe}from"./index-gf4e0et4.js";function at(a,l){return l<a?-1:l>a?1:l>=a?0:NaN}function nt(a){return a}function it(){var a=nt,l=at,H=null,I=z(0),h=z(qt),C=z(0);function s(n){var o,u=(n=Vr(n)).length,T,N,G=0,M=Array(u),c=Array(u),B=+I.apply(this,arguments),j=Math.min(qt,Math.max(-qt,h.apply(this,arguments)-B)),V,q=Math.min(Math.abs(j)/u,C.apply(this,arguments)),y=q*(j<0?-1:1),P;for(o=0;o<u;++o)if((P=c[M[o]=o]=+a(n[o],o,n))>0)G+=P;if(l!=null)M.sort(function(X,L){return l(c[X],c[L])});else if(H!=null)M.sort(function(X,L){return H(n[X],n[L])});for(o=0,N=G?(j-u*y)/G:0;o<u;++o,B=V)T=M[o],P=c[T],V=B+(P>0?P*N:0)+y,c[T]={data:n[T],index:o,value:P,startAngle:B,endAngle:V,padAngle:q};return c}return s.value=function(n){return arguments.length?(a=typeof n==="function"?n:z(+n),s):a},s.sortValues=function(n){return arguments.length?(l=n,H=null,s):l},s.sort=function(n){return arguments.length?(H=n,l=null,s):H},s.startAngle=function(n){return arguments.length?(I=typeof n==="function"?n:z(+n),s):I},s.endAngle=function(n){return arguments.length?(h=typeof n==="function"?n:z(+n),s):h},s.padAngle=function(n){return arguments.length?(C=typeof n==="function"?n:z(+n),s):C},s}var dt=x.pie,ot={sections:new Map,showData:!1,config:dt},{sections:Q,showData:lt}=ot,St=structuredClone(dt),yt=e(()=>structuredClone(St),"getConfig"),wt=e(()=>{Q=new Map,lt=ot.showData,d()},"clear"),At=e(({label:a,value:l})=>{if(l<0)throw Error(`"${a}" has invalid value: ${l}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);if(!Q.has(a))Q.set(a,l),t.debug(`added new section: ${a}, with value: ${l}`)},"addSection"),Ct=e(()=>Q,"getSections"),$t=e((a)=>{lt=a},"setShowData"),Dt=e(()=>lt,"getShowData"),pt={getConfig:yt,clear:wt,setDiagramTitle:b,getDiagramTitle:v,setAccTitle:f,getAccTitle:p,setAccDescription:m,getAccDescription:g,addSection:At,getSections:Ct,setShowData:$t,getShowData:Dt},Tt=e((a,l)=>{R(a,l),l.setShowData(a.showData),a.sections.map(l.addSection)},"populateDb"),bt={parse:e(async(a)=>{let l=await D("pie",a);t.debug(l),Tt(l,pt)},"parse")},kt=e((a)=>`
|
|
2
|
+
.pieCircle{
|
|
3
|
+
stroke: ${a.pieStrokeColor};
|
|
4
|
+
stroke-width : ${a.pieStrokeWidth};
|
|
5
|
+
opacity : ${a.pieOpacity};
|
|
6
|
+
}
|
|
7
|
+
.pieCircle.highlighted{
|
|
8
|
+
scale: 1.05;
|
|
9
|
+
opacity: 1;
|
|
10
|
+
}
|
|
11
|
+
.pieCircle.highlightedOnHover:hover{
|
|
12
|
+
transition-duration: 250ms;
|
|
13
|
+
scale: 1.05;
|
|
14
|
+
opacity: 1;
|
|
15
|
+
}
|
|
16
|
+
.pieOuterCircle{
|
|
17
|
+
stroke: ${a.pieOuterStrokeColor};
|
|
18
|
+
stroke-width: ${a.pieOuterStrokeWidth};
|
|
19
|
+
fill: none;
|
|
20
|
+
}
|
|
21
|
+
.pieTitleText {
|
|
22
|
+
text-anchor: middle;
|
|
23
|
+
font-size: ${a.pieTitleTextSize};
|
|
24
|
+
fill: ${a.pieTitleTextColor};
|
|
25
|
+
font-family: ${a.fontFamily};
|
|
26
|
+
}
|
|
27
|
+
.slice {
|
|
28
|
+
font-family: ${a.fontFamily};
|
|
29
|
+
fill: ${a.pieSectionTextColor};
|
|
30
|
+
font-size:${a.pieSectionTextSize};
|
|
31
|
+
// fill: white;
|
|
32
|
+
}
|
|
33
|
+
.legend text {
|
|
34
|
+
fill: ${a.pieLegendTextColor};
|
|
35
|
+
font-family: ${a.fontFamily};
|
|
36
|
+
font-size: ${a.pieLegendTextSize};
|
|
37
|
+
}
|
|
38
|
+
`,"getStyles"),zt=kt,Et=e((a)=>{let l=[...a.values()].reduce((h,C)=>h+C,0),H=[...a.entries()].map(([h,C])=>({label:h,value:C})).filter((h)=>h.value/l*100>=1);return it().value((h)=>h.value).sort(null)(H)},"createPieArcs"),Mt=e((a,l,H,I)=>{t.debug(`rendering pie chart
|
|
39
|
+
`+a);let h=I.db,C=r(),s=E(h.getConfig(),C.pie),n=40,o=18,u=4,T=450,N=T,G=A(l),M=G.append("g");M.attr("transform","translate("+N/2+","+T/2+")");let{themeVariables:c}=C,[B]=he(c.pieOuterStrokeWidth);B??=2;let{legendPosition:j,textPosition:V}=s,q=s.donutHole>0&&s.donutHole<=0.9?s.donutHole:0,y=Math.min(N,T)/2-n,P=De().innerRadius(q*y).outerRadius(y),X=De().innerRadius(y*V).outerRadius(y*V),L=M.append("g");L.append("circle").attr("cx",0).attr("cy",0).attr("r",y+B/2).attr("class","pieOuterCircle");let J=h.getSections(),ft=Et(J),ht=[c.pie1,c.pie2,c.pie3,c.pie4,c.pie5,c.pie6,c.pie7,c.pie8,c.pie9,c.pie10,c.pie11,c.pie12],Y=0;J.forEach((i)=>{Y+=i});let st=ft.filter((i)=>(i.data.value/Y*100).toFixed(0)!=="0"),tt=pe(ht).domain([...J.keys()]);L.selectAll("mySlices").data(st).enter().append("path").attr("d",P).attr("fill",(i)=>tt(i.data.label)).attr("class",(i)=>{let S="pieCircle";if(s.highlightSlice==="hover")S+=" highlightedOnHover";else if(s.highlightSlice===i.data.label)S+=" highlighted";return S}),L.selectAll("mySlices").data(st).enter().append("text").text((i)=>(i.data.value/Y*100).toFixed(0)+"%").attr("transform",(i)=>"translate("+X.centroid(i)+")").style("text-anchor","middle").attr("class","slice");let mt=M.append("text").text(h.getDiagramTitle()).attr("x",0).attr("y",-(T-50)/2).attr("class","pieTitleText"),Z=[...J.entries()].map(([i,S])=>({label:i,value:S})),_=M.selectAll(".legend").data(Z).enter().append("g").attr("class","legend");_.append("rect").attr("width",o).attr("height",o).style("fill",(i)=>tt(i.label)).style("stroke",(i)=>tt(i.label)),_.append("text").attr("x",o+u).attr("y",o-u).text((i)=>{if(h.getShowData())return`${i.label} [${i.value}]`;return i.label});let U=Math.max(..._.selectAll("text").nodes().map((i)=>i?.getBoundingClientRect().width??0)),K=T,et=N+n,w=o+u,rt=Z.length*w;switch(j){case"center":_.attr("transform",(i,S)=>{let O=w*Z.length/2,W=-U/2-(o+u),F=S*w-O;return"translate("+W+","+F+")"});break;case"top":K+=rt,_.attr("transform",(i,S)=>{let O=y,W=-U/2-(o+u),F=S*w-O;return`translate(${W}, ${F})`}),L.attr("transform",()=>`translate(0, ${rt+w})`);break;case"bottom":K+=rt,_.attr("transform",(i,S)=>{let O=-y-w,W=-U/2-(o+u),F=S*w-O;return"translate("+W+","+F+")"});break;case"left":et+=o+u+U,_.attr("transform",(i,S)=>{let O=w*Z.length/2,W=-y-(o+u),F=S*w-O;return"translate("+W+","+F+")"}),L.attr("transform",()=>`translate(${U+o+u}, 0)`);break;case"right":default:et+=o+u+U,_.attr("transform",(i,S)=>{let O=w*Z.length/2,W=12*o,F=S*w-O;return"translate("+W+","+F+")"});break}let ct=mt.node()?.getBoundingClientRect().width??0,vt=N/2-ct/2,xt=N/2+ct/2,ut=Math.min(0,vt),gt=Math.max(et,xt)-ut;G.attr("viewBox",`${ut} 0 ${gt} ${K}`),k(G,K,gt,s.useMaxWidth)},"draw"),Rt={draw:Mt},Kt={parser:bt,db:pt,renderer:Rt,styles:zt};export{Kt as diagram};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{e,t,j,x,w,k,d,f,p,m,g,b,v,r,n}from"./index-1r72hdzb.js";import"./index-6qmsnxwy.js";import"./index-5tv8v1hk.js";import{Oe}from"./index-194m3hc3.js";var Qt=function(){var i=e(function(ot,h,u,S){for(u=u||{},S=ot.length;S--;u[ot[S]]=h);return u},"o"),o=[1,3],P=[1,4],A=[1,5],c=[1,6],_=[1,7],B=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],y=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],T=[55,56,57],V=[2,36],D=[1,37],z=[1,36],C=[1,38],L=[1,35],E=[1,43],F=[1,41],R=[1,45],_t=[1,14],At=[1,23],Ft=[1,18],Pt=[1,19],qt=[1,20],Vt=[1,21],kt=[1,22],s=[1,24],Ht=[1,25],Xt=[1,26],Mt=[1,27],Yt=[1,28],jt=[1,29],et=[1,32],it=[1,33],N=[1,34],W=[1,39],U=[1,40],Q=[1,42],O=[1,44],nt=[1,63],rt=[1,62],H=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Gt=[1,66],Kt=[1,67],Zt=[1,68],Jt=[1,69],$t=[1,70],te=[1,71],ee=[1,72],ie=[1,73],ae=[1,74],ne=[1,75],re=[1,76],se=[1,77],K=[4,5,6,7,8,9,10,11,12,13,14,15,18],ct=[1,91],dt=[1,92],ut=[1,93],xt=[1,100],ft=[1,94],gt=[1,97],pt=[1,95],yt=[1,96],bt=[1,98],Tt=[1,99],It=[1,103],oe=[10,55,56,57],Z=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],wt={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:e(function(h,u,S,q,I,a,St){var l=a.length-1;switch(I){case 23:this.$=a[l];break;case 24:this.$=a[l-1]+""+a[l];break;case 26:this.$=a[l-1]+a[l];break;case 27:this.$=[a[l].trim()];break;case 28:a[l-2].push(a[l].trim()),this.$=a[l-2];break;case 29:this.$=a[l-4],q.addClass(a[l-2],a[l]);break;case 37:this.$=[];break;case 42:this.$=a[l].trim(),q.setDiagramTitle(this.$);break;case 43:this.$=a[l].trim(),q.setAccTitle(this.$);break;case 44:case 45:this.$=a[l].trim(),q.setAccDescription(this.$);break;case 46:q.addSection(a[l].substr(8)),this.$=a[l].substr(8);break;case 47:q.addPoint(a[l-3],"",a[l-1],a[l],[]);break;case 48:q.addPoint(a[l-4],a[l-3],a[l-1],a[l],[]);break;case 49:q.addPoint(a[l-4],"",a[l-2],a[l-1],a[l]);break;case 50:q.addPoint(a[l-5],a[l-4],a[l-2],a[l-1],a[l]);break;case 51:q.setXAxisLeftText(a[l-2]),q.setXAxisRightText(a[l]);break;case 52:a[l-1].text+=" ⟶ ",q.setXAxisLeftText(a[l-1]);break;case 53:q.setXAxisLeftText(a[l]);break;case 54:q.setYAxisBottomText(a[l-2]),q.setYAxisTopText(a[l]);break;case 55:a[l-1].text+=" ⟶ ",q.setYAxisBottomText(a[l-1]);break;case 56:q.setYAxisBottomText(a[l]);break;case 57:q.setQuadrant1Text(a[l]);break;case 58:q.setQuadrant2Text(a[l]);break;case 59:q.setQuadrant3Text(a[l]);break;case 60:q.setQuadrant4Text(a[l]);break;case 64:this.$={text:a[l],type:"text"};break;case 65:this.$={text:a[l-1].text+""+a[l],type:a[l-1].type};break;case 66:this.$={text:a[l],type:"text"};break;case 67:this.$={text:a[l],type:"markdown"};break;case 68:this.$=a[l];break;case 69:this.$=a[l-1]+""+a[l];break}},"anonymous"),table:[{18:o,26:1,27:2,28:P,55:A,56:c,57:_},{1:[3]},{18:o,26:8,27:2,28:P,55:A,56:c,57:_},{18:o,26:9,27:2,28:P,55:A,56:c,57:_},i(B,[2,33],{29:10}),i(y,[2,61]),i(y,[2,62]),i(y,[2,63]),{1:[2,30]},{1:[2,31]},i(T,V,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:D,5:z,10:C,12:L,13:E,14:F,15:R,18:_t,25:At,35:Ft,37:Pt,39:qt,41:Vt,42:kt,48:s,50:Ht,51:Xt,52:Mt,53:Yt,54:jt,60:et,61:it,63:N,64:W,65:U,66:Q,67:O}),i(B,[2,34]),{27:46,55:A,56:c,57:_},i(T,[2,37]),i(T,V,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:D,5:z,10:C,12:L,13:E,14:F,15:R,18:_t,25:At,35:Ft,37:Pt,39:qt,41:Vt,42:kt,48:s,50:Ht,51:Xt,52:Mt,53:Yt,54:jt,60:et,61:it,63:N,64:W,65:U,66:Q,67:O}),i(T,[2,39]),i(T,[2,40]),i(T,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},i(T,[2,45]),i(T,[2,46]),{18:[1,51]},{4:D,5:z,10:C,12:L,13:E,14:F,15:R,43:52,58:31,60:et,61:it,63:N,64:W,65:U,66:Q,67:O},{4:D,5:z,10:C,12:L,13:E,14:F,15:R,43:53,58:31,60:et,61:it,63:N,64:W,65:U,66:Q,67:O},{4:D,5:z,10:C,12:L,13:E,14:F,15:R,43:54,58:31,60:et,61:it,63:N,64:W,65:U,66:Q,67:O},{4:D,5:z,10:C,12:L,13:E,14:F,15:R,43:55,58:31,60:et,61:it,63:N,64:W,65:U,66:Q,67:O},{4:D,5:z,10:C,12:L,13:E,14:F,15:R,43:56,58:31,60:et,61:it,63:N,64:W,65:U,66:Q,67:O},{4:D,5:z,10:C,12:L,13:E,14:F,15:R,43:57,58:31,60:et,61:it,63:N,64:W,65:U,66:Q,67:O},{4:D,5:z,8:nt,10:C,12:L,13:E,14:F,15:R,18:rt,44:[1,58],47:[1,59],58:61,59:60,63:N,64:W,65:U,66:Q,67:O},i(H,[2,64]),i(H,[2,66]),i(H,[2,67]),i(H,[2,70]),i(H,[2,71]),i(H,[2,72]),i(H,[2,73]),i(H,[2,74]),i(H,[2,75]),i(H,[2,76]),i(H,[2,77]),i(H,[2,78]),i(H,[2,79]),i(H,[2,80]),i(H,[2,81]),i(B,[2,35]),i(T,[2,38]),i(T,[2,42]),i(T,[2,43]),i(T,[2,44]),{3:65,4:Gt,5:Kt,6:Zt,7:Jt,8:$t,9:te,10:ee,11:ie,12:ae,13:ne,14:re,15:se,21:64},i(T,[2,53],{59:60,58:61,4:D,5:z,8:nt,10:C,12:L,13:E,14:F,15:R,18:rt,49:[1,78],63:N,64:W,65:U,66:Q,67:O}),i(T,[2,56],{59:60,58:61,4:D,5:z,8:nt,10:C,12:L,13:E,14:F,15:R,18:rt,49:[1,79],63:N,64:W,65:U,66:Q,67:O}),i(T,[2,57],{59:60,58:61,4:D,5:z,8:nt,10:C,12:L,13:E,14:F,15:R,18:rt,63:N,64:W,65:U,66:Q,67:O}),i(T,[2,58],{59:60,58:61,4:D,5:z,8:nt,10:C,12:L,13:E,14:F,15:R,18:rt,63:N,64:W,65:U,66:Q,67:O}),i(T,[2,59],{59:60,58:61,4:D,5:z,8:nt,10:C,12:L,13:E,14:F,15:R,18:rt,63:N,64:W,65:U,66:Q,67:O}),i(T,[2,60],{59:60,58:61,4:D,5:z,8:nt,10:C,12:L,13:E,14:F,15:R,18:rt,63:N,64:W,65:U,66:Q,67:O}),{45:[1,80]},{44:[1,81]},i(H,[2,65]),i(H,[2,82]),i(H,[2,83]),i(H,[2,84]),{3:83,4:Gt,5:Kt,6:Zt,7:Jt,8:$t,9:te,10:ee,11:ie,12:ae,13:ne,14:re,15:se,18:[1,82]},i(K,[2,23]),i(K,[2,1]),i(K,[2,2]),i(K,[2,3]),i(K,[2,4]),i(K,[2,5]),i(K,[2,6]),i(K,[2,7]),i(K,[2,8]),i(K,[2,9]),i(K,[2,10]),i(K,[2,11]),i(K,[2,12]),i(T,[2,52],{58:31,43:84,4:D,5:z,10:C,12:L,13:E,14:F,15:R,60:et,61:it,63:N,64:W,65:U,66:Q,67:O}),i(T,[2,55],{58:31,43:85,4:D,5:z,10:C,12:L,13:E,14:F,15:R,60:et,61:it,63:N,64:W,65:U,66:Q,67:O}),{46:[1,86]},{45:[1,87]},{4:ct,5:dt,6:ut,8:xt,11:ft,13:gt,16:90,17:pt,18:yt,19:bt,20:Tt,22:89,23:88},i(K,[2,24]),i(T,[2,51],{59:60,58:61,4:D,5:z,8:nt,10:C,12:L,13:E,14:F,15:R,18:rt,63:N,64:W,65:U,66:Q,67:O}),i(T,[2,54],{59:60,58:61,4:D,5:z,8:nt,10:C,12:L,13:E,14:F,15:R,18:rt,63:N,64:W,65:U,66:Q,67:O}),i(T,[2,47],{22:89,16:90,23:101,4:ct,5:dt,6:ut,8:xt,11:ft,13:gt,17:pt,18:yt,19:bt,20:Tt}),{46:[1,102]},i(T,[2,29],{10:It}),i(oe,[2,27],{16:104,4:ct,5:dt,6:ut,8:xt,11:ft,13:gt,17:pt,18:yt,19:bt,20:Tt}),i(Z,[2,25]),i(Z,[2,13]),i(Z,[2,14]),i(Z,[2,15]),i(Z,[2,16]),i(Z,[2,17]),i(Z,[2,18]),i(Z,[2,19]),i(Z,[2,20]),i(Z,[2,21]),i(Z,[2,22]),i(T,[2,49],{10:It}),i(T,[2,48],{22:89,16:90,23:105,4:ct,5:dt,6:ut,8:xt,11:ft,13:gt,17:pt,18:yt,19:bt,20:Tt}),{4:ct,5:dt,6:ut,8:xt,11:ft,13:gt,16:90,17:pt,18:yt,19:bt,20:Tt,22:106},i(Z,[2,26]),i(T,[2,50],{10:It}),i(oe,[2,28],{16:104,4:ct,5:dt,6:ut,8:xt,11:ft,13:gt,17:pt,18:yt,19:bt,20:Tt})],defaultActions:{8:[2,30],9:[2,31]},parseError:e(function(h,u){if(u.recoverable)this.trace(h);else{var S=Error(h);throw S.hash=u,S}},"parseError"),parse:e(function(h){var u=this,S=[0],q=[],I=[null],a=[],St=this.table,l="",Ct=0,le=0,he=0,Ce=2,ce=1,Le=a.slice.call(arguments,1),X=Object.create(this.lexer),lt={yy:{}};for(var Bt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Bt))lt.yy[Bt]=this.yy[Bt];if(X.setInput(h,lt.yy),lt.yy.lexer=X,lt.yy.parser=this,typeof X.yylloc>"u")X.yylloc={};var Rt=X.yylloc;a.push(Rt);var Ee=X.options&&X.options.ranges;if(typeof lt.yy.parseError==="function")this.parseError=lt.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function De(tt){S.length=S.length-2*tt,I.length=I.length-tt,a.length=a.length-tt}e(De,"popStack");function de(){var tt=q.pop()||X.lex()||ce;if(typeof tt!=="number"){if(tt instanceof Array)q=tt,tt=q.pop();tt=u.symbols_[tt]||tt}return tt}e(de,"lex");var Y,Nt,ht,J,Ne,Wt,mt={},Lt,st,ue,Et;while(!0){if(ht=S[S.length-1],this.defaultActions[ht])J=this.defaultActions[ht];else{if(Y===null||typeof Y>"u")Y=de();J=St[ht]&&St[ht][Y]}if(typeof J>"u"||!J.length||!J[0]){var Ut="";Et=[];for(Lt in St[ht])if(this.terminals_[Lt]&&Lt>Ce)Et.push("'"+this.terminals_[Lt]+"'");if(X.showPosition)Ut="Parse error on line "+(Ct+1)+`:
|
|
2
|
+
`+X.showPosition()+`
|
|
3
|
+
Expecting `+Et.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'";else Ut="Parse error on line "+(Ct+1)+": Unexpected "+(Y==ce?"end of input":"'"+(this.terminals_[Y]||Y)+"'");this.parseError(Ut,{text:X.match,token:this.terminals_[Y]||Y,line:X.yylineno,loc:Rt,expected:Et})}if(J[0]instanceof Array&&J.length>1)throw Error("Parse Error: multiple actions possible at state: "+ht+", token: "+Y);switch(J[0]){case 1:if(S.push(Y),I.push(X.yytext),a.push(X.yylloc),S.push(J[1]),Y=null,!Nt){if(le=X.yyleng,l=X.yytext,Ct=X.yylineno,Rt=X.yylloc,he>0)he--}else Y=Nt,Nt=null;break;case 2:if(st=this.productions_[J[1]][1],mt.$=I[I.length-st],mt._$={first_line:a[a.length-(st||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(st||1)].first_column,last_column:a[a.length-1].last_column},Ee)mt._$.range=[a[a.length-(st||1)].range[0],a[a.length-1].range[1]];if(Wt=this.performAction.apply(mt,[l,le,Ct,lt.yy,J[1],I,a].concat(Le)),typeof Wt<"u")return Wt;if(st)S=S.slice(0,-1*st*2),I=I.slice(0,-1*st),a=a.slice(0,-1*st);S.push(this.productions_[J[1]][0]),I.push(mt.$),a.push(mt._$),ue=St[S[S.length-2]][S[S.length-1]],S.push(ue);break;case 3:return!0}}return!0},"parse")},ve=function(){var ot={EOF:1,parseError:e(function(u,S){if(this.yy.parser)this.yy.parser.parseError(u,S);else throw Error(u)},"parseError"),setInput:e(function(h,u){if(this.yy=u||this.yy||{},this._input=h,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 h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var u=h.match(/(?:\r\n?|\n).*/g);if(u)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),h},"input"),unput:e(function(h){var u=h.length,S=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var q=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),S.length-1)this.yylineno-=S.length-1;var I=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:S?(S.length===q.length?this.yylloc.first_column:0)+q[q.length-S.length].length-S[0].length:this.yylloc.first_column-u},this.options.ranges)this.yylloc.range=[I[0],I[0]+this.yyleng-u];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(h){this.unput(this.match.slice(h))},"less"),pastInput:e(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var h=this.match;if(h.length<20)h+=this._input.substr(0,20-h.length);return(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var h=this.pastInput(),u=Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
|
5
|
+
`+u+"^"},"showPosition"),test_match:e(function(h,u){var S,q,I;if(this.options.backtrack_lexer){if(I={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)I.yylloc.range=this.yylloc.range.slice(0)}if(q=h[0].match(/(?:\r\n?|\n).*/g),q)this.yylineno+=q.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:q?q[q.length-1].length-q[q.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,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(h[0].length),this.matched+=h[0],S=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(S)return S;else if(this._backtrack){for(var a in I)this[a]=I[a];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var h,u,S,q;if(!this._more)this.yytext="",this.match="";var I=this._currentRules();for(var a=0;a<I.length;a++)if(S=this._input.match(this.rules[I[a]]),S&&(!u||S[0].length>u[0].length)){if(u=S,q=a,this.options.backtrack_lexer)if(h=this.test_match(S,I[a]),h!==!1)return h;else if(this._backtrack){u=!1;continue}else return!1;else if(!this.options.flex)break}if(u){if(h=this.test_match(u,I[q]),h!==!1)return h;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 u=this.next();if(u)return u;else return this.lex()},"lex"),begin:e(function(u){this.conditionStack.push(u)},"begin"),popState:e(function(){var u=this.conditionStack.length-1;if(u>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(u){if(u=this.conditionStack.length-1-Math.abs(u||0),u>=0)return this.conditionStack[u];else return"INITIAL"},"topState"),pushState:e(function(u){this.begin(u)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(u,S,q,I){var a=I;switch(q){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;break;case 5:return this.popState(),"title_value";break;case 6:return this.begin("acc_title"),37;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),39;break;case 9:return this.popState(),"acc_descr_value";break;case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;break;case 29:return this.begin("point_start"),44;break;case 30:return this.begin("point_x"),45;break;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;break;case 34:return 28;case 35:return 4;case 36:return 15;case 37:return 11;case 38:return 64;case 39:return 10;case 40:return 65;case 41:return 65;case 42:return 14;case 43:return 13;case 44:return 67;case 45:return 66;case 46:return 12;case 47:return 8;case 48:return 5;case 49:return 18;case 50:return 56;case 51:return 63;case 52:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?:[^\x00-\x7F]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return ot}();wt.lexer=ve;function vt(){this.yy={}}return e(vt,"Parser"),vt.prototype=wt,wt.Parser=vt,new vt}();Qt.parser=Qt;var ze=Qt,G=j(),Ve=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{e(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:x.quadrantChart?.chartWidth||500,chartWidth:x.quadrantChart?.chartHeight||500,titlePadding:x.quadrantChart?.titlePadding||10,titleFontSize:x.quadrantChart?.titleFontSize||20,quadrantPadding:x.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:x.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:x.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:x.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:x.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:x.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:x.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:x.quadrantChart?.pointTextPadding||5,pointLabelFontSize:x.quadrantChart?.pointLabelFontSize||12,pointRadius:x.quadrantChart?.pointRadius||5,xAxisPosition:x.quadrantChart?.xAxisPosition||"top",yAxisPosition:x.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:x.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:x.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:G.quadrant1Fill,quadrant2Fill:G.quadrant2Fill,quadrant3Fill:G.quadrant3Fill,quadrant4Fill:G.quadrant4Fill,quadrant1TextFill:G.quadrant1TextFill,quadrant2TextFill:G.quadrant2TextFill,quadrant3TextFill:G.quadrant3TextFill,quadrant4TextFill:G.quadrant4TextFill,quadrantPointFill:G.quadrantPointFill,quadrantPointTextFill:G.quadrantPointTextFill,quadrantXAxisTextFill:G.quadrantXAxisTextFill,quadrantYAxisTextFill:G.quadrantYAxisTextFill,quadrantTitleFill:G.quadrantTitleFill,quadrantInternalBorderStrokeFill:G.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:G.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,t.info("clear called")}setData(i){this.data={...this.data,...i}}addPoints(i){this.data.points=[...i,...this.data.points]}addClass(i,o){this.classes.set(i,o)}setConfig(i){t.trace("setConfig called with: ",i),this.config={...this.config,...i}}setThemeConfig(i){t.trace("setThemeConfig called with: ",i),this.themeConfig={...this.themeConfig,...i}}calculateSpace(i,o,P,A){let c=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,_={top:i==="top"&&o?c:0,bottom:i==="bottom"&&o?c:0},B=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,y={left:this.config.yAxisPosition==="left"&&P?B:0,right:this.config.yAxisPosition==="right"&&P?B:0},T=this.config.titleFontSize+this.config.titlePadding*2,V={top:A?T:0},D=this.config.quadrantPadding+y.left,z=this.config.quadrantPadding+_.top+V.top,C=this.config.chartWidth-this.config.quadrantPadding*2-y.left-y.right,L=this.config.chartHeight-this.config.quadrantPadding*2-_.top-_.bottom-V.top,E=C/2,F=L/2;return{xAxisSpace:_,yAxisSpace:y,titleSpace:V,quadrantSpace:{quadrantLeft:D,quadrantTop:z,quadrantWidth:C,quadrantHalfWidth:E,quadrantHeight:L,quadrantHalfHeight:F}}}getAxisLabels(i,o,P,A){let{quadrantSpace:c,titleSpace:_}=A,{quadrantHalfHeight:B,quadrantHeight:y,quadrantLeft:T,quadrantHalfWidth:V,quadrantTop:D,quadrantWidth:z}=c,C=Boolean(this.data.xAxisRightText),L=Boolean(this.data.yAxisTopText),E=[];if(this.data.xAxisLeftText&&o)E.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:T+(C?V/2:0),y:i==="top"?this.config.xAxisLabelPadding+_.top:this.config.xAxisLabelPadding+D+y+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:C?"center":"left",horizontalPos:"top",rotation:0});if(this.data.xAxisRightText&&o)E.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:T+V+(C?V/2:0),y:i==="top"?this.config.xAxisLabelPadding+_.top:this.config.xAxisLabelPadding+D+y+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:C?"center":"left",horizontalPos:"top",rotation:0});if(this.data.yAxisBottomText&&P)E.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+T+z+this.config.quadrantPadding,y:D+y-(L?B/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:L?"center":"left",horizontalPos:"top",rotation:-90});if(this.data.yAxisTopText&&P)E.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+T+z+this.config.quadrantPadding,y:D+B-(L?B/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:L?"center":"left",horizontalPos:"top",rotation:-90});return E}getQuadrants(i){let{quadrantSpace:o}=i,{quadrantHalfHeight:P,quadrantLeft:A,quadrantHalfWidth:c,quadrantTop:_}=o,B=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:A+c,y:_,width:c,height:P,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:A,y:_,width:c,height:P,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:A,y:_+P,width:c,height:P,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:A+c,y:_+P,width:c,height:P,fill:this.themeConfig.quadrant4Fill}];for(let y of B)if(y.text.x=y.x+y.width/2,this.data.points.length===0)y.text.y=y.y+y.height/2,y.text.horizontalPos="middle";else y.text.y=y.y+this.config.quadrantTextTopPadding,y.text.horizontalPos="top";return B}getQuadrantPoints(i){let{quadrantSpace:o}=i,{quadrantHeight:P,quadrantLeft:A,quadrantTop:c,quadrantWidth:_}=o,B=Oe().domain([0,1]).range([A,_+A]),y=Oe().domain([0,1]).range([P+c,c]);return this.data.points.map((V)=>{let D=this.classes.get(V.className);if(D)V={...D,...V};return{x:B(V.x),y:y(V.y),fill:V.color??this.themeConfig.quadrantPointFill,radius:V.radius??this.config.pointRadius,text:{text:V.text,fill:this.themeConfig.quadrantPointTextFill,x:B(V.x),y:y(V.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:V.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:V.strokeWidth??"0px"}})}getBorders(i){let o=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:P}=i,{quadrantHalfHeight:A,quadrantHeight:c,quadrantLeft:_,quadrantHalfWidth:B,quadrantTop:y,quadrantWidth:T}=P;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:_-o,y1:y,x2:_+T+o,y2:y},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:_+T,y1:y+o,x2:_+T,y2:y+c-o},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:_-o,y1:y+c,x2:_+T+o,y2:y+c},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:_,y1:y+o,x2:_,y2:y+c-o},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:_+B,y1:y+o,x2:_+B,y2:y+c-o},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:_+o,y1:y+A,x2:_+T-o,y2:y+A}]}getTitle(i){if(i)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2};return}build(){let i=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),o=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),P=this.config.showTitle&&!!this.data.titleText,A=this.data.points.length>0?"bottom":this.config.xAxisPosition,c=this.calculateSpace(A,i,o,P);return{points:this.getQuadrantPoints(c),quadrants:this.getQuadrants(c),axisLabels:this.getAxisLabels(A,i,o,c),borderLines:this.getBorders(c),title:this.getTitle(P)}}},Dt=class extends Error{static{e(this,"InvalidStyleError")}constructor(i,o,P){super(`value for ${i} ${o} is invalid, please use a valid ${P}`);this.name="InvalidStyleError"}};function Ot(i){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(i)}e(Ot,"validateHexCode");function xe(i){return!/^\d+$/.test(i)}e(xe,"validateNumber");function fe(i){return!/^\d+px$/.test(i)}e(fe,"validateSizeInPixels");function at(i){return w(i.trim(),r())}e(at,"textSanitizer");var M=new Ve;function ge(i){M.setData({quadrant1Text:at(i.text)})}e(ge,"setQuadrant1Text");function pe(i){M.setData({quadrant2Text:at(i.text)})}e(pe,"setQuadrant2Text");function ye(i){M.setData({quadrant3Text:at(i.text)})}e(ye,"setQuadrant3Text");function be(i){M.setData({quadrant4Text:at(i.text)})}e(be,"setQuadrant4Text");function Te(i){M.setData({xAxisLeftText:at(i.text)})}e(Te,"setXAxisLeftText");function me(i){M.setData({xAxisRightText:at(i.text)})}e(me,"setXAxisRightText");function qe(i){M.setData({yAxisTopText:at(i.text)})}e(qe,"setYAxisTopText");function ke(i){M.setData({yAxisBottomText:at(i.text)})}e(ke,"setYAxisBottomText");function zt(i){let o={};for(let P of i){let[A,c]=P.trim().split(/\s*:\s*/);if(A==="radius"){if(xe(c))throw new Dt(A,c,"number");o.radius=parseInt(c)}else if(A==="color"){if(Ot(c))throw new Dt(A,c,"hex code");o.color=c}else if(A==="stroke-color"){if(Ot(c))throw new Dt(A,c,"hex code");o.strokeColor=c}else if(A==="stroke-width"){if(fe(c))throw new Dt(A,c,"number of pixels (eg. 10px)");o.strokeWidth=c}else throw Error(`style named ${A} is not supported.`)}return o}e(zt,"parseStyles");function Se(i,o,P,A,c){let _=zt(c);M.addPoints([{x:P,y:A,text:at(i.text),className:o,..._}])}e(Se,"addPoint");function _e(i,o){M.addClass(i,zt(o))}e(_e,"addClass");function Ae(i){M.setConfig({chartWidth:i})}e(Ae,"setWidth");function Fe(i){M.setConfig({chartHeight:i})}e(Fe,"setHeight");function Pe(){let i=r(),{themeVariables:o,quadrantChart:P}=i;if(P)M.setConfig(P);return M.setThemeConfig({quadrant1Fill:o.quadrant1Fill,quadrant2Fill:o.quadrant2Fill,quadrant3Fill:o.quadrant3Fill,quadrant4Fill:o.quadrant4Fill,quadrant1TextFill:o.quadrant1TextFill,quadrant2TextFill:o.quadrant2TextFill,quadrant3TextFill:o.quadrant3TextFill,quadrant4TextFill:o.quadrant4TextFill,quadrantPointFill:o.quadrantPointFill,quadrantPointTextFill:o.quadrantPointTextFill,quadrantXAxisTextFill:o.quadrantXAxisTextFill,quadrantYAxisTextFill:o.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:o.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:o.quadrantInternalBorderStrokeFill,quadrantTitleFill:o.quadrantTitleFill}),M.setData({titleText:v()}),M.build()}e(Pe,"getQuadrantData");var Ie=e(function(){M.clear(),d()},"clear"),we={setWidth:Ae,setHeight:Fe,setQuadrant1Text:ge,setQuadrant2Text:pe,setQuadrant3Text:ye,setQuadrant4Text:be,setXAxisLeftText:Te,setXAxisRightText:me,setYAxisTopText:qe,setYAxisBottomText:ke,parseStyles:zt,addPoint:Se,addClass:_e,getQuadrantData:Pe,clear:Ie,setAccTitle:f,getAccTitle:p,setDiagramTitle:b,getDiagramTitle:v,getAccDescription:g,setAccDescription:m},Be=e((i,o,P,A)=>{function c(s){return s==="top"?"hanging":"middle"}e(c,"getDominantBaseLine");function _(s){return s==="left"?"start":"middle"}e(_,"getTextAnchor");function B(s){return`translate(${s.x}, ${s.y}) rotate(${s.rotation||0})`}e(B,"getTransformation");let y=r();t.debug(`Rendering quadrant chart
|
|
7
|
+
`+i);let T=y.securityLevel,V;if(T==="sandbox")V=n("#i"+o);let z=(T==="sandbox"?n(V.nodes()[0].contentDocument.body):n("body")).select(`[id="${o}"]`),C=z.append("g").attr("class","main"),L=y.quadrantChart?.chartWidth??500,E=y.quadrantChart?.chartHeight??500;k(z,E,L,y.quadrantChart?.useMaxWidth??!0),z.attr("viewBox","0 0 "+L+" "+E),A.db.setHeight(E),A.db.setWidth(L);let F=A.db.getQuadrantData(),R=C.append("g").attr("class","quadrants"),_t=C.append("g").attr("class","border"),At=C.append("g").attr("class","data-points"),Ft=C.append("g").attr("class","labels"),Pt=C.append("g").attr("class","title");if(F.title)Pt.append("text").attr("x",0).attr("y",0).attr("fill",F.title.fill).attr("font-size",F.title.fontSize).attr("dominant-baseline",c(F.title.horizontalPos)).attr("text-anchor",_(F.title.verticalPos)).attr("transform",B(F.title)).text(F.title.text);if(F.borderLines)_t.selectAll("line").data(F.borderLines).enter().append("line").attr("x1",(s)=>s.x1).attr("y1",(s)=>s.y1).attr("x2",(s)=>s.x2).attr("y2",(s)=>s.y2).style("stroke",(s)=>s.strokeFill).style("stroke-width",(s)=>s.strokeWidth);let qt=R.selectAll("g.quadrant").data(F.quadrants).enter().append("g").attr("class","quadrant");qt.append("rect").attr("x",(s)=>s.x).attr("y",(s)=>s.y).attr("width",(s)=>s.width).attr("height",(s)=>s.height).attr("fill",(s)=>s.fill),qt.append("text").attr("x",0).attr("y",0).attr("fill",(s)=>s.text.fill).attr("font-size",(s)=>s.text.fontSize).attr("dominant-baseline",(s)=>c(s.text.horizontalPos)).attr("text-anchor",(s)=>_(s.text.verticalPos)).attr("transform",(s)=>B(s.text)).text((s)=>s.text.text),Ft.selectAll("g.label").data(F.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text((s)=>s.text).attr("fill",(s)=>s.fill).attr("font-size",(s)=>s.fontSize).attr("dominant-baseline",(s)=>c(s.horizontalPos)).attr("text-anchor",(s)=>_(s.verticalPos)).attr("transform",(s)=>B(s));let kt=At.selectAll("g.data-point").data(F.points).enter().append("g").attr("class","data-point");kt.append("circle").attr("cx",(s)=>s.x).attr("cy",(s)=>s.y).attr("r",(s)=>s.radius).attr("fill",(s)=>s.fill).attr("stroke",(s)=>s.strokeColor).attr("stroke-width",(s)=>s.strokeWidth),kt.append("text").attr("x",0).attr("y",0).text((s)=>s.text.text).attr("fill",(s)=>s.text.fill).attr("font-size",(s)=>s.text.fontSize).attr("dominant-baseline",(s)=>c(s.text.horizontalPos)).attr("text-anchor",(s)=>_(s.text.verticalPos)).attr("transform",(s)=>B(s.text))},"draw"),Re={draw:Be},Me={parser:ze,db:we,renderer:Re,styles:e(()=>"","styles")};export{Me as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ei}from"./index-tb1wf525.js";export{ei as createRadarServices};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Zt}from"./index-tb1wf525.js";export{Zt as createRailroadServices};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Qt}from"./index-tb1wf525.js";export{Qt as createRailroadAbnfServices};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Jt}from"./index-tb1wf525.js";export{Jt as createRailroadEbnfServices};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{er}from"./index-tb1wf525.js";export{er as createRailroadPegServices};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e,t}from"./index-1r72hdzb.js";import"./index-6qmsnxwy.js";import{P,ze,Ge}from"./index-r2fyc9w1.js";import{R}from"./index-353m7b0p.js";import{Zt,Pe}from"./index-tb1wf525.js";var o=Zt().Railroad.parser.LangiumParser,n=e((r)=>{switch(r.$type){case"RailroadTerminalExpr":return{type:"terminal",value:r.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:r.name};case"RailroadSpecialExpr":return{type:"special",text:r.text};case"RailroadSequenceExpr":{let a=r.elements.map(n);return a.length===1?a[0]:{type:"sequence",elements:a}}case"RailroadChoiceExpr":{let a=r.alternatives.map(n);return a.length===1?a[0]:{type:"choice",alternatives:a}}case"RailroadOptionalExpr":return{type:"optional",element:n(r.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:n(r.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:n(r.element),min:0,max:1/0};default:throw Error(`Unsupported railroad expression: ${r.$type}`)}},"transformExpression"),l=e((r)=>({name:r.name,definition:n(r.definition)}),"transformRule"),s=e((r)=>{if(R(r,P),r.title)P.setTitle(r.title);r.rules.map((a)=>P.addRule(l(a)))},"populateDb"),m={parse:e((r)=>{P.clear(),t.debug("[Railroad Parser] Starting Langium parse");let a=o.parse(r);if(a.lexerErrors.length>0||a.parserErrors.length>0)throw new Pe(a);let i=a.value;t.debug("[Railroad Parser] Parsed rules:",i.rules.length),s(i),t.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:P}},E={parser:m,db:P,renderer:Ge,styles:ze};export{E as diagram};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import{e,st,t,u,d,f,p,m,g,b,v,r,h,fe,Ce}from"./index-1r72hdzb.js";import"./index-6qmsnxwy.js";import{le}from"./index-s4j678gj.js";import{J}from"./index-3cy1bzwh.js";var Ye=function(){var s=e(function(X,l,o,R){for(o=o||{},R=X.length;R--;o[X[R]]=l);return o},"o"),y=[1,3],k=[1,4],c=[1,5],a=[1,6],_=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],V=[1,22],T=[2,7],C=[1,26],x=[1,27],O=[1,28],F=[1,29],P=[1,33],U=[1,34],Y=[1,35],B=[1,36],Q=[1,37],H=[1,38],K=[1,24],W=[1,31],j=[1,32],G=[1,30],N=[1,39],q=[1,40],I=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],Z=[1,61],ue=[89,90],Be=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Ve=[27,29],Qe=[1,70],He=[1,71],Ke=[1,72],We=[1,73],je=[1,74],Ge=[1,75],ze=[1,76],de=[1,83],ee=[1,80],Ee=[1,84],pe=[1,85],be=[1,86],Re=[1,87],ge=[1,88],ke=[1,89],ye=[1,90],_e=[1,91],Se=[1,92],ve=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],te=[63,64],Xe=[1,101],Je=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],w=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],se=[1,110],ie=[1,106],re=[1,107],ne=[1,108],ae=[1,109],ce=[1,111],Ie=[1,116],Te=[1,117],Ne=[1,114],qe=[1,115],De={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:e(function(l,o,R,n,S,i,Ae){var E=i.length-1;switch(S){case 4:this.$=i[E].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=i[E].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:n.setDirection("TB");break;case 18:n.setDirection("BT");break;case 19:n.setDirection("RL");break;case 20:n.setDirection("LR");break;case 21:n.addRequirement(i[E-3],i[E-4]);break;case 22:n.addRequirement(i[E-5],i[E-6]),n.setClass([i[E-5]],i[E-3]);break;case 23:n.setNewReqId(i[E-2]);break;case 24:n.setNewReqText(i[E-2]);break;case 25:n.setNewReqRisk(i[E-2]);break;case 26:n.setNewReqVerifyMethod(i[E-2]);break;case 29:this.$=n.RequirementType.REQUIREMENT;break;case 30:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=n.RiskLevel.LOW_RISK;break;case 36:this.$=n.RiskLevel.MED_RISK;break;case 37:this.$=n.RiskLevel.HIGH_RISK;break;case 38:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=n.VerifyType.VERIFY_TEST;break;case 42:n.addElement(i[E-3]);break;case 43:n.addElement(i[E-5]),n.setClass([i[E-5]],i[E-3]);break;case 44:n.setNewElementType(i[E-2]);break;case 45:n.setNewElementDocRef(i[E-2]);break;case 48:n.addRelationship(i[E-2],i[E],i[E-4]);break;case 49:n.addRelationship(i[E-2],i[E-4],i[E]);break;case 50:this.$=n.Relationships.CONTAINS;break;case 51:this.$=n.Relationships.COPIES;break;case 52:this.$=n.Relationships.DERIVES;break;case 53:this.$=n.Relationships.SATISFIES;break;case 54:this.$=n.Relationships.VERIFIES;break;case 55:this.$=n.Relationships.REFINES;break;case 56:this.$=n.Relationships.TRACES;break;case 57:this.$=i[E-2],n.defineClass(i[E-1],i[E]);break;case 58:n.setClass(i[E-1],i[E]);break;case 59:n.setClass([i[E-2]],i[E]);break;case 60:case 62:this.$=[i[E]];break;case 61:case 63:this.$=i[E-2].concat([i[E]]);break;case 64:this.$=i[E-2],n.setCssStyle(i[E-1],i[E]);break;case 65:this.$=[i[E]];break;case 66:i[E-2].push(i[E]),this.$=i[E-2];break;case 68:this.$=i[E-1]+i[E];break}},"anonymous"),table:[{3:1,4:2,6:y,9:k,11:c,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:y,9:k,11:c,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},s(_,[2,6]),{3:12,4:2,6:y,9:k,11:c,13:a},{1:[2,2]},{4:17,5:V,7:13,8:T,9:k,11:c,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:C,22:x,23:O,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:N,90:q},s(_,[2,4]),s(_,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:V,7:42,8:T,9:k,11:c,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:C,22:x,23:O,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:N,90:q},{4:17,5:V,7:43,8:T,9:k,11:c,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:C,22:x,23:O,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:N,90:q},{4:17,5:V,7:44,8:T,9:k,11:c,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:C,22:x,23:O,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:N,90:q},{4:17,5:V,7:45,8:T,9:k,11:c,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:C,22:x,23:O,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:N,90:q},{4:17,5:V,7:46,8:T,9:k,11:c,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:C,22:x,23:O,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:N,90:q},{4:17,5:V,7:47,8:T,9:k,11:c,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:C,22:x,23:O,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:N,90:q},{4:17,5:V,7:48,8:T,9:k,11:c,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:C,22:x,23:O,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:N,90:q},{4:17,5:V,7:49,8:T,9:k,11:c,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:C,22:x,23:O,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:N,90:q},{4:17,5:V,7:50,8:T,9:k,11:c,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:C,22:x,23:O,24:F,25:23,33:25,41:P,42:U,43:Y,44:B,45:Q,46:H,54:K,72:W,74:j,77:G,89:N,90:q},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},s(I,[2,17]),s(I,[2,18]),s(I,[2,19]),s(I,[2,20]),{30:60,33:62,75:Z,89:N,90:q},{30:63,33:62,75:Z,89:N,90:q},{30:64,33:62,75:Z,89:N,90:q},s(ue,[2,29]),s(ue,[2,30]),s(ue,[2,31]),s(ue,[2,32]),s(ue,[2,33]),s(ue,[2,34]),s(Be,[2,81]),s(Be,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},s(Ve,[2,79]),s(Ve,[2,80]),{27:[1,67],29:[1,68]},s(Ve,[2,85]),s(Ve,[2,86]),{62:69,65:Qe,66:He,67:Ke,68:We,69:je,70:Ge,71:ze},{62:77,65:Qe,66:He,67:Ke,68:We,69:je,70:Ge,71:ze},{30:78,33:62,75:Z,89:N,90:q},{73:79,75:de,76:ee,78:81,79:82,80:Ee,81:pe,82:be,83:Re,84:ge,85:ke,86:ye,87:_e,88:Se},s(ve,[2,60]),s(ve,[2,62]),{73:93,75:de,76:ee,78:81,79:82,80:Ee,81:pe,82:be,83:Re,84:ge,85:ke,86:ye,87:_e,88:Se},{30:94,33:62,75:Z,76:ee,89:N,90:q},{5:[1,95]},{30:96,33:62,75:Z,89:N,90:q},{5:[1,97]},{30:98,33:62,75:Z,89:N,90:q},{63:[1,99]},s(te,[2,50]),s(te,[2,51]),s(te,[2,52]),s(te,[2,53]),s(te,[2,54]),s(te,[2,55]),s(te,[2,56]),{64:[1,100]},s(I,[2,59],{76:ee}),s(I,[2,64],{76:Xe}),{33:103,75:[1,102],89:N,90:q},s(Je,[2,65],{79:104,75:de,80:Ee,81:pe,82:be,83:Re,84:ge,85:ke,86:ye,87:_e,88:Se}),s(w,[2,67]),s(w,[2,69]),s(w,[2,70]),s(w,[2,71]),s(w,[2,72]),s(w,[2,73]),s(w,[2,74]),s(w,[2,75]),s(w,[2,76]),s(w,[2,77]),s(w,[2,78]),s(I,[2,57],{76:Xe}),s(I,[2,58],{76:ee}),{5:se,28:105,31:ie,34:re,36:ne,38:ae,40:ce},{27:[1,112],76:ee},{5:Ie,40:Te,56:113,57:Ne,59:qe},{27:[1,118],76:ee},{33:119,89:N,90:q},{33:120,89:N,90:q},{75:de,78:121,79:82,80:Ee,81:pe,82:be,83:Re,84:ge,85:ke,86:ye,87:_e,88:Se},s(ve,[2,61]),s(ve,[2,63]),s(w,[2,68]),s(I,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:se,28:126,31:ie,34:re,36:ne,38:ae,40:ce},s(I,[2,28]),{5:[1,127]},s(I,[2,42]),{32:[1,128]},{32:[1,129]},{5:Ie,40:Te,56:130,57:Ne,59:qe},s(I,[2,47]),{5:[1,131]},s(I,[2,48]),s(I,[2,49]),s(Je,[2,66],{79:104,75:de,80:Ee,81:pe,82:be,83:Re,84:ge,85:ke,86:ye,87:_e,88:Se}),{33:132,89:N,90:q},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},s(I,[2,27]),{5:se,28:145,31:ie,34:re,36:ne,38:ae,40:ce},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},s(I,[2,46]),{5:Ie,40:Te,56:152,57:Ne,59:qe},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},s(I,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},s(I,[2,43]),{5:se,28:159,31:ie,34:re,36:ne,38:ae,40:ce},{5:se,28:160,31:ie,34:re,36:ne,38:ae,40:ce},{5:se,28:161,31:ie,34:re,36:ne,38:ae,40:ce},{5:se,28:162,31:ie,34:re,36:ne,38:ae,40:ce},{5:Ie,40:Te,56:163,57:Ne,59:qe},{5:Ie,40:Te,56:164,57:Ne,59:qe},s(I,[2,23]),s(I,[2,24]),s(I,[2,25]),s(I,[2,26]),s(I,[2,44]),s(I,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:e(function(l,o){if(o.recoverable)this.trace(l);else{var R=Error(l);throw R.hash=o,R}},"parseError"),parse:e(function(l){var o=this,R=[0],n=[],S=[null],i=[],Ae=this.table,E="",xe=0,Ze=0,et=0,lt=2,tt=1,ct=i.slice.call(arguments,1),A=Object.create(this.lexer),oe={yy:{}};for(var Me in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Me))oe.yy[Me]=this.yy[Me];if(A.setInput(l,oe.yy),oe.yy.lexer=A,oe.yy.parser=this,typeof A.yylloc>"u")A.yylloc={};var Fe=A.yylloc;i.push(Fe);var ot=A.options&&A.options.ranges;if(typeof oe.yy.parseError==="function")this.parseError=oe.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function ht(M){R.length=R.length-2*M,S.length=S.length-M,i.length=i.length-M}e(ht,"popStack");function it(){var M=n.pop()||A.lex()||tt;if(typeof M!=="number"){if(M instanceof Array)n=M,M=n.pop();M=o.symbols_[M]||M}return M}e(it,"lex");var L,$e,he,D,bt,Pe,me={},Oe,z,rt,we;while(!0){if(he=R[R.length-1],this.defaultActions[he])D=this.defaultActions[he];else{if(L===null||typeof L>"u")L=it();D=Ae[he]&&Ae[he][L]}if(typeof D>"u"||!D.length||!D[0]){var Ue="";we=[];for(Oe in Ae[he])if(this.terminals_[Oe]&&Oe>lt)we.push("'"+this.terminals_[Oe]+"'");if(A.showPosition)Ue="Parse error on line "+(xe+1)+`:
|
|
2
|
+
`+A.showPosition()+`
|
|
3
|
+
Expecting `+we.join(", ")+", got '"+(this.terminals_[L]||L)+"'";else Ue="Parse error on line "+(xe+1)+": Unexpected "+(L==tt?"end of input":"'"+(this.terminals_[L]||L)+"'");this.parseError(Ue,{text:A.match,token:this.terminals_[L]||L,line:A.yylineno,loc:Fe,expected:we})}if(D[0]instanceof Array&&D.length>1)throw Error("Parse Error: multiple actions possible at state: "+he+", token: "+L);switch(D[0]){case 1:if(R.push(L),S.push(A.yytext),i.push(A.yylloc),R.push(D[1]),L=null,!$e){if(Ze=A.yyleng,E=A.yytext,xe=A.yylineno,Fe=A.yylloc,et>0)et--}else L=$e,$e=null;break;case 2:if(z=this.productions_[D[1]][1],me.$=S[S.length-z],me._$={first_line:i[i.length-(z||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(z||1)].first_column,last_column:i[i.length-1].last_column},ot)me._$.range=[i[i.length-(z||1)].range[0],i[i.length-1].range[1]];if(Pe=this.performAction.apply(me,[E,Ze,xe,oe.yy,D[1],S,i].concat(ct)),typeof Pe<"u")return Pe;if(z)R=R.slice(0,-1*z*2),S=S.slice(0,-1*z),i=i.slice(0,-1*z);R.push(this.productions_[D[1]][0]),S.push(me.$),i.push(me._$),rt=Ae[R[R.length-2]][R[R.length-1]],R.push(rt);break;case 3:return!0}}return!0},"parse")},at=function(){var X={EOF:1,parseError:e(function(o,R){if(this.yy.parser)this.yy.parser.parseError(o,R);else throw Error(o)},"parseError"),setInput:e(function(l,o){if(this.yy=o||this.yy||{},this._input=l,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 l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var o=l.match(/(?:\r\n?|\n).*/g);if(o)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),l},"input"),unput:e(function(l){var o=l.length,R=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var n=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),R.length-1)this.yylineno-=R.length-1;var S=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:R?(R.length===n.length?this.yylloc.first_column:0)+n[n.length-R.length].length-R[0].length:this.yylloc.first_column-o},this.options.ranges)this.yylloc.range=[S[0],S[0]+this.yyleng-o];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(l){this.unput(this.match.slice(l))},"less"),pastInput:e(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var l=this.match;if(l.length<20)l+=this._input.substr(0,20-l.length);return(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var l=this.pastInput(),o=Array(l.length+1).join("-");return l+this.upcomingInput()+`
|
|
5
|
+
`+o+"^"},"showPosition"),test_match:e(function(l,o){var R,n,S;if(this.options.backtrack_lexer){if(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)}if(n=l[0].match(/(?:\r\n?|\n).*/g),n)this.yylineno+=n.length;if(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+l[0].length},this.yytext+=l[0],this.match+=l[0],this.matches=l,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(l[0].length),this.matched+=l[0],R=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(R)return R;else if(this._backtrack){for(var i in S)this[i]=S[i];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var l,o,R,n;if(!this._more)this.yytext="",this.match="";var S=this._currentRules();for(var i=0;i<S.length;i++)if(R=this._input.match(this.rules[S[i]]),R&&(!o||R[0].length>o[0].length)){if(o=R,n=i,this.options.backtrack_lexer)if(l=this.test_match(R,S[i]),l!==!1)return l;else if(this._backtrack){o=!1;continue}else return!1;else if(!this.options.flex)break}if(o){if(l=this.test_match(o,S[n]),l!==!1)return l;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 o=this.next();if(o)return o;else return this.lex()},"lex"),begin:e(function(o){this.conditionStack.push(o)},"begin"),popState:e(function(){var o=this.conditionStack.length-1;if(o>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(o){if(o=this.conditionStack.length-1-Math.abs(o||0),o>=0)return this.conditionStack[o];else return"INITIAL"},"topState"),pushState:e(function(o){this.begin(o)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(o,R,n,S){var i=S;switch(n){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;break;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;break;case 60:return this.begin("style"),74;break;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return R.yytext=R.yytext.trim(),89;break;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return X}();De.lexer=at;function Le(){this.yy={}}return e(Le,"Parser"),Le.prototype=De,De.Parser=Le,new Le}();Ye.parser=Ye;var ut=Ye,ft=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=f,this.getAccTitle=p,this.setAccDescription=m,this.getAccDescription=g,this.setDiagramTitle=b,this.getDiagramTitle=v,this.getConfig=e(()=>r().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{e(this,"RequirementDB")}getDirection(){return this.direction}setDirection(s){this.direction=s}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(s,y){if(!this.requirements.has(s))this.requirements.set(s,{name:s,type:y,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]});return this.resetLatestRequirement(),this.requirements.get(s)}getRequirements(){return this.requirements}setNewReqId(s){if(this.latestRequirement!==void 0)this.latestRequirement.requirementId=s}setNewReqText(s){if(this.latestRequirement!==void 0)this.latestRequirement.text=s}setNewReqRisk(s){if(this.latestRequirement!==void 0)this.latestRequirement.risk=s}setNewReqVerifyMethod(s){if(this.latestRequirement!==void 0)this.latestRequirement.verifyMethod=s}addElement(s){if(!this.elements.has(s))this.elements.set(s,{name:s,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),t.info("Added new element: ",s);return this.resetLatestElement(),this.elements.get(s)}getElements(){return this.elements}setNewElementType(s){if(this.latestElement!==void 0)this.latestElement.type=s}setNewElementDocRef(s){if(this.latestElement!==void 0)this.latestElement.docRef=s}addRelationship(s,y,k){this.relations.push({type:s,src:y,dst:k})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,d()}setCssStyle(s,y){for(let k of s){let c=this.requirements.get(k)??this.elements.get(k);if(!y||!c)return;for(let a of y)if(a.includes(","))c.cssStyles.push(...a.split(","));else c.cssStyles.push(a)}}setClass(s,y){for(let k of s){let c=this.requirements.get(k)??this.elements.get(k);if(c)for(let a of y){c.classes.push(a);let _=this.classes.get(a)?.styles;if(_)c.cssStyles.push(..._)}}}defineClass(s,y){for(let k of s){let c=this.classes.get(k);if(c===void 0)c={id:k,styles:[],textStyles:[]},this.classes.set(k,c);if(y)y.forEach(function(a){if(/color/.exec(a)){let _=a.replace("fill","bgFill");c.textStyles.push(_)}c.styles.push(a)});this.requirements.forEach((a)=>{if(a.classes.includes(k))a.cssStyles.push(...y.flatMap((_)=>_.split(",")))}),this.elements.forEach((a)=>{if(a.classes.includes(k))a.cssStyles.push(...y.flatMap((_)=>_.split(",")))})}}getClasses(){return this.classes}getData(){let s=r(),y=[],k=[];for(let c of this.requirements.values()){let a=c;a.id=c.name,a.cssStyles=c.cssStyles,a.cssClasses=c.classes.join(" "),a.shape="requirementBox",a.look=s.look,a.colorIndex=y.length,y.push(a)}for(let c of this.elements.values()){let a=c;a.shape="requirementBox",a.look=s.look,a.id=c.name,a.cssStyles=c.cssStyles,a.cssClasses=c.classes.join(" "),a.colorIndex=y.length,y.push(a)}for(let c of this.relations){let a=0,_=c.type===this.Relationships.CONTAINS,V={id:`${c.src}-${c.dst}-${a}`,start:this.requirements.get(c.src)?.name??this.elements.get(c.src)?.name,end:this.requirements.get(c.dst)?.name??this.elements.get(c.dst)?.name,label:`<<${c.type}>>`,classes:"relationshipLine",style:["fill:none",_?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:_?"normal":"dashed",arrowTypeStart:_?"requirement_contains":"",arrowTypeEnd:_?"":"requirement_arrow",look:s.look,labelType:"markdown"};k.push(V),a++}return{nodes:y,edges:k,other:{},config:s,direction:this.getDirection()}}},mt=e((s)=>{let y=u(),{themeVariables:k,look:c}=y,{bkgColorArray:a,borderColorArray:_}=k;if(!_?.length)return"";let V="";for(let T=0;T<s.THEME_COLOR_LIMIT;T++)V+=`
|
|
7
|
+
|
|
8
|
+
[data-look="${c}"][data-color-id="color-${T}"].node path {
|
|
9
|
+
stroke: ${_[T]};
|
|
10
|
+
fill: ${a?.length?a[T]:""};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
[data-look="${c}"][data-color-id="color-${T}"].node rect {
|
|
14
|
+
stroke: ${_[T]};
|
|
15
|
+
fill: ${a?.length?a[T]:""};
|
|
16
|
+
}
|
|
17
|
+
`;return V},"genColor"),dt=e((s)=>{let y=u(),{look:k,themeVariables:c}=y,{requirementEdgeLabelBackground:a}=c;return`
|
|
18
|
+
${mt(s)}
|
|
19
|
+
marker {
|
|
20
|
+
fill: ${s.relationColor};
|
|
21
|
+
stroke: ${s.relationColor};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
marker.cross {
|
|
25
|
+
stroke: ${s.lineColor};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
svg {
|
|
29
|
+
font-family: ${s.fontFamily};
|
|
30
|
+
font-size: ${s.fontSize};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.reqBox {
|
|
34
|
+
fill: ${s.requirementBackground};
|
|
35
|
+
fill-opacity: 1.0;
|
|
36
|
+
stroke: ${s.requirementBorderColor};
|
|
37
|
+
stroke-width: ${s.requirementBorderSize};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.reqTitle, .reqLabel{
|
|
41
|
+
fill: ${s.requirementTextColor};
|
|
42
|
+
}
|
|
43
|
+
.reqLabelBox {
|
|
44
|
+
fill: ${s.relationLabelBackground};
|
|
45
|
+
fill-opacity: 1.0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.req-title-line {
|
|
49
|
+
stroke: ${s.requirementBorderColor};
|
|
50
|
+
stroke-width: ${s.requirementBorderSize};
|
|
51
|
+
}
|
|
52
|
+
.relationshipLine {
|
|
53
|
+
stroke: ${s.relationColor};
|
|
54
|
+
stroke-width: ${k==="neo"?s.strokeWidth:"1px"};
|
|
55
|
+
}
|
|
56
|
+
.relationshipLabel {
|
|
57
|
+
fill: ${s.relationLabelColor};
|
|
58
|
+
}
|
|
59
|
+
.edgeLabel {
|
|
60
|
+
background-color: ${s.edgeLabelBackground};
|
|
61
|
+
}
|
|
62
|
+
.edgeLabel .label rect {
|
|
63
|
+
fill: ${s.edgeLabelBackground};
|
|
64
|
+
}
|
|
65
|
+
.edgeLabel .label text {
|
|
66
|
+
fill: ${s.relationLabelColor};
|
|
67
|
+
}
|
|
68
|
+
.divider {
|
|
69
|
+
stroke: ${s.nodeBorder};
|
|
70
|
+
stroke-width: 1;
|
|
71
|
+
}
|
|
72
|
+
.label {
|
|
73
|
+
font-family: ${s.fontFamily};
|
|
74
|
+
color: ${s.nodeTextColor||s.textColor};
|
|
75
|
+
}
|
|
76
|
+
.label text,span {
|
|
77
|
+
fill: ${s.nodeTextColor||s.textColor};
|
|
78
|
+
color: ${s.nodeTextColor||s.textColor};
|
|
79
|
+
}
|
|
80
|
+
.labelBkg {
|
|
81
|
+
background-color: ${a??s.edgeLabelBackground};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
`},"getStyles"),Et=dt,nt={};st(nt,{draw:()=>pt});var pt=e(async function(s,y,k,c){t.info("REF0:"),t.info("Drawing requirement diagram (unified)",y);let{securityLevel:a,state:_,layout:V,look:T}=r(),C=c.db.getData(),x=le(y,a);C.type=c.type,C.layoutAlgorithm=Ce(V),C.nodeSpacing=_?.nodeSpacing??50,C.rankSpacing=_?.rankSpacing??50,C.markers=T==="neo"?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],C.diagramId=y,await fe(C,x);let O=8;h.insertTitle(x,"requirementDiagramTitleText",_?.titleTopMargin??25,c.db.getDiagramTitle()),J(x,O,"requirementDiagram",_?.useMaxWidth??!0)},"draw"),Lt={parser:ut,get db(){return new ft},renderer:nt,styles:Et};export{Lt as diagram};
|