@mycelish/cli 0.2.8 → 0.3.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/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +65 -0
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/health-checks/runner.d.ts.map +1 -1
- package/dist/commands/health-checks/runner.js +23 -1
- package/dist/commands/health-checks/runner.js.map +1 -1
- package/dist/commands/marketplace.d.ts.map +1 -1
- package/dist/commands/marketplace.js +34 -1
- package/dist/commands/marketplace.js.map +1 -1
- package/dist/commands/remote.d.ts.map +1 -1
- package/dist/commands/remote.js +17 -0
- package/dist/commands/remote.js.map +1 -1
- package/dist/commands/remove.d.ts +16 -8
- package/dist/commands/remove.d.ts.map +1 -1
- package/dist/commands/remove.js +163 -42
- package/dist/commands/remove.js.map +1 -1
- package/dist/commands/remove.test.js +4 -4
- package/dist/commands/remove.test.js.map +1 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +20 -1
- package/dist/commands/sync.js.map +1 -1
- package/dist/core/auto-adapter.d.ts.map +1 -1
- package/dist/core/auto-adapter.js +2 -0
- package/dist/core/auto-adapter.js.map +1 -1
- package/dist/core/content-hash.d.ts +3 -0
- package/dist/core/content-hash.d.ts.map +1 -0
- package/dist/core/content-hash.js +11 -0
- package/dist/core/content-hash.js.map +1 -0
- package/dist/core/env-template.d.ts +8 -0
- package/dist/core/env-template.d.ts.map +1 -1
- package/dist/core/env-template.js +67 -1
- package/dist/core/env-template.js.map +1 -1
- package/dist/core/env-template.test.js +100 -1
- package/dist/core/env-template.test.js.map +1 -1
- package/dist/core/manifest-migrator.d.ts +0 -1
- package/dist/core/manifest-migrator.d.ts.map +1 -1
- package/dist/core/manifest-migrator.js +1 -1
- package/dist/core/manifest-migrator.js.map +1 -1
- package/dist/core/manifest-state.d.ts +2 -1
- package/dist/core/manifest-state.d.ts.map +1 -1
- package/dist/core/manifest-state.js.map +1 -1
- package/dist/core/marketplace-cache.d.ts +12 -0
- package/dist/core/marketplace-cache.d.ts.map +1 -0
- package/dist/core/marketplace-cache.js +127 -0
- package/dist/core/marketplace-cache.js.map +1 -0
- package/dist/core/marketplace-cache.test.d.ts +2 -0
- package/dist/core/marketplace-cache.test.d.ts.map +1 -0
- package/dist/core/marketplace-cache.test.js +122 -0
- package/dist/core/marketplace-cache.test.js.map +1 -0
- package/dist/core/marketplace-constants.d.ts +14 -0
- package/dist/core/marketplace-constants.d.ts.map +1 -0
- package/dist/core/marketplace-constants.js +14 -0
- package/dist/core/marketplace-constants.js.map +1 -0
- package/dist/core/marketplace-deduplicator.d.ts +13 -0
- package/dist/core/marketplace-deduplicator.d.ts.map +1 -0
- package/dist/core/marketplace-deduplicator.js +84 -0
- package/dist/core/marketplace-deduplicator.js.map +1 -0
- package/dist/core/marketplace-deduplicator.test.d.ts +2 -0
- package/dist/core/marketplace-deduplicator.test.d.ts.map +1 -0
- package/dist/core/marketplace-deduplicator.test.js +70 -0
- package/dist/core/marketplace-deduplicator.test.js.map +1 -0
- package/dist/core/marketplace-registry.d.ts.map +1 -1
- package/dist/core/marketplace-registry.js +10 -16
- package/dist/core/marketplace-registry.js.map +1 -1
- package/dist/core/marketplace-registry.test.js +5 -4
- package/dist/core/marketplace-registry.test.js.map +1 -1
- package/dist/core/marketplace-sources.d.ts +47 -25
- package/dist/core/marketplace-sources.d.ts.map +1 -1
- package/dist/core/marketplace-sources.js +331 -106
- package/dist/core/marketplace-sources.js.map +1 -1
- package/dist/core/marketplace-sources.test.js +158 -5
- package/dist/core/marketplace-sources.test.js.map +1 -1
- package/dist/core/marketplace.d.ts +22 -5
- package/dist/core/marketplace.d.ts.map +1 -1
- package/dist/core/marketplace.js +280 -127
- package/dist/core/marketplace.js.map +1 -1
- package/dist/core/marketplace.test.js +20 -58
- package/dist/core/marketplace.test.js.map +1 -1
- package/dist/core/migrator/executor.d.ts.map +1 -1
- package/dist/core/migrator/executor.js +11 -2
- package/dist/core/migrator/executor.js.map +1 -1
- package/dist/core/migrator/manifest.d.ts +10 -1
- package/dist/core/migrator/manifest.d.ts.map +1 -1
- package/dist/core/migrator/manifest.js +12 -2
- package/dist/core/migrator/manifest.js.map +1 -1
- package/dist/core/plugin-scanner.test.js +0 -4
- package/dist/core/plugin-scanner.test.js.map +1 -1
- package/dist/core/plugin-state.d.ts.map +1 -1
- package/dist/core/plugin-state.js +50 -18
- package/dist/core/plugin-state.js.map +1 -1
- package/dist/core/plugin-takeover.d.ts +15 -0
- package/dist/core/plugin-takeover.d.ts.map +1 -1
- package/dist/core/plugin-takeover.js +163 -3
- package/dist/core/plugin-takeover.js.map +1 -1
- package/dist/core/presets.test.js +0 -3
- package/dist/core/presets.test.js.map +1 -1
- package/dist/core/secret-detector.d.ts +20 -0
- package/dist/core/secret-detector.d.ts.map +1 -0
- package/dist/core/secret-detector.js +83 -0
- package/dist/core/secret-detector.js.map +1 -0
- package/dist/core/secret-detector.test.d.ts +2 -0
- package/dist/core/secret-detector.test.d.ts.map +1 -0
- package/dist/core/secret-detector.test.js +91 -0
- package/dist/core/secret-detector.test.js.map +1 -0
- package/dist/core/security-scanner.d.ts +24 -0
- package/dist/core/security-scanner.d.ts.map +1 -0
- package/dist/core/security-scanner.js +182 -0
- package/dist/core/security-scanner.js.map +1 -0
- package/dist/core/security-scanner.test.d.ts +2 -0
- package/dist/core/security-scanner.test.d.ts.map +1 -0
- package/dist/core/security-scanner.test.js +120 -0
- package/dist/core/security-scanner.test.js.map +1 -0
- package/dist/core/snapshot.d.ts.map +1 -1
- package/dist/core/snapshot.js +0 -6
- package/dist/core/snapshot.js.map +1 -1
- package/dist/core/snapshot.test.js +0 -4
- package/dist/core/snapshot.test.js.map +1 -1
- package/dist/dashboard/assets/_baseUniq-CaVE7eUV.js +1 -0
- package/dist/dashboard/assets/arc-CR894Erh.js +1 -0
- package/dist/dashboard/assets/architectureDiagram-VXUJARFQ-vuLSFK92.js +36 -0
- package/dist/dashboard/assets/blockDiagram-VD42YOAC-CjXwNwFV.js +122 -0
- package/dist/dashboard/assets/c4Diagram-YG6GDRKO-BUk0KT3V.js +10 -0
- package/dist/dashboard/assets/channel-BzUEK7Iv.js +1 -0
- package/dist/dashboard/assets/chunk-4BX2VUAB-BCCD1RD0.js +1 -0
- package/dist/dashboard/assets/chunk-55IACEB6-7M5H4j_M.js +1 -0
- package/dist/dashboard/assets/chunk-B4BG7PRW-CkuZp9sw.js +165 -0
- package/dist/dashboard/assets/chunk-DI55MBZ5-aoWuqaxJ.js +220 -0
- package/dist/dashboard/assets/chunk-FMBD7UC4-zGR2QW6c.js +15 -0
- package/dist/dashboard/assets/chunk-QN33PNHL-Lj8Zu7hm.js +1 -0
- package/dist/dashboard/assets/chunk-QZHKN3VN-JLEIDbAK.js +1 -0
- package/dist/dashboard/assets/chunk-TZMSLE5B-BB4GoxaV.js +1 -0
- package/dist/dashboard/assets/classDiagram-2ON5EDUG-CMpOlMXG.js +1 -0
- package/dist/dashboard/assets/classDiagram-v2-WZHVMYZB-CMpOlMXG.js +1 -0
- package/dist/dashboard/assets/clone-CHi7kZ5h.js +1 -0
- package/dist/dashboard/assets/cose-bilkent-S5V4N54A-DLEOmN1S.js +1 -0
- package/dist/dashboard/assets/cytoscape.esm-5J0xJHOV.js +321 -0
- package/dist/dashboard/assets/dagre-6UL2VRFP-BKeNwVe7.js +4 -0
- package/dist/dashboard/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/dist/dashboard/assets/diagram-PSM6KHXK-BwTCZWHJ.js +24 -0
- package/dist/dashboard/assets/diagram-QEK2KX5R-Bg109hRA.js +43 -0
- package/dist/dashboard/assets/diagram-S2PKOQOG-CjzZEN97.js +24 -0
- package/dist/dashboard/assets/erDiagram-Q2GNP2WA-C_o1kY7B.js +60 -0
- package/dist/dashboard/assets/flowDiagram-NV44I4VS-CGcmMJTD.js +162 -0
- package/dist/dashboard/assets/ganttDiagram-JELNMOA3-Dh1Atgfm.js +267 -0
- package/dist/dashboard/assets/gitGraphDiagram-NY62KEGX-BkHRiPWO.js +65 -0
- package/dist/dashboard/assets/graph-gTAnu0gr.js +1 -0
- package/dist/dashboard/assets/index-DFP3ko3G.css +1 -0
- package/dist/dashboard/assets/index-Dr2pvJml.js +189 -0
- package/dist/dashboard/assets/infoDiagram-WHAUD3N6-CdqkT51i.js +2 -0
- package/dist/dashboard/assets/init-Gi6I4Gst.js +1 -0
- package/dist/dashboard/assets/journeyDiagram-XKPGCS4Q-D6H-T7IF.js +139 -0
- package/dist/dashboard/assets/kanban-definition-3W4ZIXB7-CdtlB9dE.js +89 -0
- package/dist/dashboard/assets/katex-DhXJpUyf.js +261 -0
- package/dist/dashboard/assets/layout-5P3G0oCF.js +1 -0
- package/dist/dashboard/assets/linear-BEr0iAwY.js +1 -0
- package/dist/dashboard/assets/mermaid.core-DY8Lk9ir.js +250 -0
- package/dist/dashboard/assets/min-rFBMICyx.js +1 -0
- package/dist/dashboard/assets/mindmap-definition-VGOIOE7T-BBgtd54T.js +68 -0
- package/dist/dashboard/assets/ordinal-Cboi1Yqb.js +1 -0
- package/dist/dashboard/assets/pieDiagram-ADFJNKIX-fgAzUnCv.js +30 -0
- package/dist/dashboard/assets/quadrantDiagram-AYHSOK5B-BtBFRMty.js +7 -0
- package/dist/dashboard/assets/requirementDiagram-UZGBJVZJ-Dsb2J8qM.js +64 -0
- package/dist/dashboard/assets/sankeyDiagram-TZEHDZUN-DgeXoGZy.js +10 -0
- package/dist/dashboard/assets/sequenceDiagram-WL72ISMW-CW8ApGYu.js +145 -0
- package/dist/dashboard/assets/stateDiagram-FKZM4ZOC-CFKNRDGr.js +1 -0
- package/dist/dashboard/assets/stateDiagram-v2-4FDKWEC3-B3pJgIRu.js +1 -0
- package/dist/dashboard/assets/timeline-definition-IT6M3QCI-DeE7K_Tn.js +61 -0
- package/dist/dashboard/assets/treemap-KMMF4GRG-DgksShPO.js +128 -0
- package/dist/dashboard/assets/xychartDiagram-PRI3JC2R-C8fn_Zm6.js +7 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/routes/marketplace.d.ts.map +1 -1
- package/dist/routes/marketplace.js +179 -1
- package/dist/routes/marketplace.js.map +1 -1
- package/dist/routes/remove.js +4 -4
- package/dist/routes/remove.js.map +1 -1
- package/dist/routes/state.d.ts.map +1 -1
- package/dist/routes/state.js +56 -9
- package/dist/routes/state.js.map +1 -1
- package/package.json +2 -2
- package/dist/dashboard/assets/index-CAenUQES.css +0 -1
- package/dist/dashboard/assets/index-DDo3xcmE.js +0 -150
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b,a as m,c as d,d as h,i as l}from"./_baseUniq-CaVE7eUV.js";import{aC as g,aD as o,aE as p}from"./mermaid.core-DY8Lk9ir.js";function M(a){var n=a==null?0:a.length;return n?b(a):[]}function v(a,n){var s=-1,t=g(a)?Array(a.length):[];return m(a,function(f,i,e){t[++s]=n(f,i,e)}),t}function k(a,n){var s=o(a)?h:v;return s(a,d(n))}function x(a,n){return a<n}function A(a,n,s){for(var t=-1,f=a.length;++t<f;){var i=a[t],e=n(i);if(e!=null&&(r===void 0?e===e&&!l(e):s(e,r)))var r=e,u=i}return u}function w(a){return a&&a.length?A(a,p,x):void 0}export{x as a,A as b,v as c,w as d,M as f,k as m};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import{g as le}from"./chunk-55IACEB6-7M5H4j_M.js";import{s as he}from"./chunk-QN33PNHL-Lj8Zu7hm.js";import{_ as l,l as I,n as de,r as ge,D as B,c as W,h as M,aB as ue,V as pe,W as fe,X as ye}from"./mermaid.core-DY8Lk9ir.js";import"./index-Dr2pvJml.js";const E=[];for(let t=0;t<256;++t)E.push((t+256).toString(16).slice(1));function me(t,e=0){return(E[t[e+0]]+E[t[e+1]]+E[t[e+2]]+E[t[e+3]]+"-"+E[t[e+4]]+E[t[e+5]]+"-"+E[t[e+6]]+E[t[e+7]]+"-"+E[t[e+8]]+E[t[e+9]]+"-"+E[t[e+10]]+E[t[e+11]]+E[t[e+12]]+E[t[e+13]]+E[t[e+14]]+E[t[e+15]]).toLowerCase()}let z;const Ee=new Uint8Array(16);function _e(){if(!z){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");z=crypto.getRandomValues.bind(crypto)}return z(Ee)}const be=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ne={randomUUID:be};function Se(t,e,n){if(ne.randomUUID&&!t)return ne.randomUUID();t=t||{};const c=t.random??t.rng?.()??_e();if(c.length<16)throw new Error("Random bytes length must be >= 16");return c[6]=c[6]&15|64,c[8]=c[8]&63|128,me(c)}var X=(function(){var t=l(function(x,s,i,o){for(i=i||{},o=x.length;o--;i[x[o]]=s);return i},"o"),e=[1,4],n=[1,13],c=[1,12],f=[1,15],h=[1,16],p=[1,20],m=[1,19],u=[6,7,8],N=[1,26],Y=[1,24],q=[1,25],b=[6,7,11],J=[1,6,13,15,16,19,22],K=[1,33],Q=[1,34],R=[1,6,7,11,13,15,16,19,22],F={trace:l(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:l(function(s,i,o,a,g,r,w){var d=r.length-1;switch(g){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",r[d].id),a.addNode(r[d-1].length,r[d].id,r[d].descr,r[d].type);break;case 16:a.getLogger().trace("Icon: ",r[d]),a.decorateNode({icon:r[d]});break;case 17:case 21:a.decorateNode({class:r[d]});break;case 18:a.getLogger().trace("SPACELIST");break;case 19:a.getLogger().trace("Node: ",r[d].id),a.addNode(0,r[d].id,r[d].descr,r[d].type);break;case 20:a.decorateNode({icon:r[d]});break;case 25:a.getLogger().trace("node found ..",r[d-2]),this.$={id:r[d-1],descr:r[d-1],type:a.getType(r[d-2],r[d])};break;case 26:this.$={id:r[d],descr:r[d],type:a.nodeType.DEFAULT};break;case 27:a.getLogger().trace("node found ..",r[d-3]),this.$={id:r[d-3],descr:r[d-1],type:a.getType(r[d-2],r[d])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:n,7:[1,10],9:9,12:11,13:c,14:14,15:f,16:h,17:17,18:18,19:p,22:m},t(u,[2,3]),{1:[2,2]},t(u,[2,4]),t(u,[2,5]),{1:[2,6],6:n,12:21,13:c,14:14,15:f,16:h,17:17,18:18,19:p,22:m},{6:n,9:22,12:11,13:c,14:14,15:f,16:h,17:17,18:18,19:p,22:m},{6:N,7:Y,10:23,11:q},t(b,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:p,22:m}),t(b,[2,18]),t(b,[2,19]),t(b,[2,20]),t(b,[2,21]),t(b,[2,23]),t(b,[2,24]),t(b,[2,26],{19:[1,30]}),{20:[1,31]},{6:N,7:Y,10:32,11:q},{1:[2,7],6:n,12:21,13:c,14:14,15:f,16:h,17:17,18:18,19:p,22:m},t(J,[2,14],{7:K,11:Q}),t(R,[2,8]),t(R,[2,9]),t(R,[2,10]),t(b,[2,15]),t(b,[2,16]),t(b,[2,17]),{20:[1,35]},{21:[1,36]},t(J,[2,13],{7:K,11:Q}),t(R,[2,11]),t(R,[2,12]),{21:[1,37]},t(b,[2,25]),t(b,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(s,i){if(i.recoverable)this.trace(s);else{var o=new Error(s);throw o.hash=i,o}},"parseError"),parse:l(function(s){var i=this,o=[0],a=[],g=[null],r=[],w=this.table,d="",U=0,Z=0,re=2,ee=1,oe=r.slice.call(arguments,1),y=Object.create(this.lexer),v={yy:{}};for(var j in this.yy)Object.prototype.hasOwnProperty.call(this.yy,j)&&(v.yy[j]=this.yy[j]);y.setInput(s,v.yy),v.yy.lexer=y,v.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var G=y.yylloc;r.push(G);var ae=y.options&&y.options.ranges;typeof v.yy.parseError=="function"?this.parseError=v.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ce(S){o.length=o.length-2*S,g.length=g.length-S,r.length=r.length-S}l(ce,"popStack");function te(){var S;return S=a.pop()||y.lex()||ee,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=i.symbols_[S]||S),S}l(te,"lex");for(var _,T,D,H,O={},P,k,ie,V;;){if(T=o[o.length-1],this.defaultActions[T]?D=this.defaultActions[T]:((_===null||typeof _>"u")&&(_=te()),D=w[T]&&w[T][_]),typeof D>"u"||!D.length||!D[0]){var $="";V=[];for(P in w[T])this.terminals_[P]&&P>re&&V.push("'"+this.terminals_[P]+"'");y.showPosition?$="Parse error on line "+(U+1)+`:
|
|
2
|
+
`+y.showPosition()+`
|
|
3
|
+
Expecting `+V.join(", ")+", got '"+(this.terminals_[_]||_)+"'":$="Parse error on line "+(U+1)+": Unexpected "+(_==ee?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError($,{text:y.match,token:this.terminals_[_]||_,line:y.yylineno,loc:G,expected:V})}if(D[0]instanceof Array&&D.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+_);switch(D[0]){case 1:o.push(_),g.push(y.yytext),r.push(y.yylloc),o.push(D[1]),_=null,Z=y.yyleng,d=y.yytext,U=y.yylineno,G=y.yylloc;break;case 2:if(k=this.productions_[D[1]][1],O.$=g[g.length-k],O._$={first_line:r[r.length-(k||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(k||1)].first_column,last_column:r[r.length-1].last_column},ae&&(O._$.range=[r[r.length-(k||1)].range[0],r[r.length-1].range[1]]),H=this.performAction.apply(O,[d,Z,U,v.yy,D[1],g,r].concat(oe)),typeof H<"u")return H;k&&(o=o.slice(0,-1*k*2),g=g.slice(0,-1*k),r=r.slice(0,-1*k)),o.push(this.productions_[D[1]][0]),g.push(O.$),r.push(O._$),ie=w[o[o.length-2]][o[o.length-1]],o.push(ie);break;case 3:return!0}}return!0},"parse")},se=(function(){var x={EOF:1,parseError:l(function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw new Error(i)},"parseError"),setInput:l(function(s,i){return this.yy=i||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var i=s.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:l(function(s){var i=s.length,o=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1&&(this.yylineno-=o.length-1);var g=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===a.length?this.yylloc.first_column:0)+a[a.length-o.length].length-o[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[g[0],g[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(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:l(function(s){this.unput(this.match.slice(s))},"less"),pastInput:l(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var s=this.pastInput(),i=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
5
|
+
`+i+"^"},"showPosition"),test_match:l(function(s,i){var o,a,g;if(this.options.backtrack_lexer&&(g={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&&(g.yylloc.range=this.yylloc.range.slice(0))),a=s[0].match(/(?:\r\n?|\n).*/g),a&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],o=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var r in g)this[r]=g[r];return!1}return!1},"test_match"),next:l(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,i,o,a;this._more||(this.yytext="",this.match="");for(var g=this._currentRules(),r=0;r<g.length;r++)if(o=this._input.match(this.rules[g[r]]),o&&(!i||o[0].length>i[0].length)){if(i=o,a=r,this.options.backtrack_lexer){if(s=this.test_match(o,g[r]),s!==!1)return s;if(this._backtrack){i=!1;continue}else return!1}else if(!this.options.flex)break}return i?(s=this.test_match(i,g[a]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:l(function(){var i=this.next();return i||this.lex()},"lex"),begin:l(function(i){this.conditionStack.push(i)},"begin"),popState:l(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:l(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:l(function(i){this.begin(i)},"pushState"),stateStackSize:l(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:l(function(i,o,a,g){switch(a){case 0:return i.getLogger().trace("Found comment",o.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:i.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return i.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:i.getLogger().trace("end icon"),this.popState();break;case 10:return i.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return i.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return i.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return i.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:i.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return i.getLogger().trace("description:",o.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),i.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),i.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),i.getLogger().trace("node end ...",o.yytext),"NODE_DEND";case 30:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),i.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),i.getLogger().trace("node end (("),"NODE_DEND";case 35:return i.getLogger().trace("Long description:",o.yytext),20;case 36:return i.getLogger().trace("Long description:",o.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return x})();F.lexer=se;function A(){this.yy={}}return l(A,"Parser"),A.prototype=F,F.Parser=A,new A})();X.parser=X;var De=X,L={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},C,Ne=(C=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=L,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let n=this.nodes.length-1;n>=0;n--)if(this.nodes[n].level<e)return this.nodes[n];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,n,c,f){I.info("addNode",e,n,c,f);let h=!1;this.nodes.length===0?(this.baseLevel=e,e=0,h=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,h=!1);const p=W();let m=p.mindmap?.padding??B.mindmap.padding;switch(f){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:m*=2;break}const u={id:this.count++,nodeId:M(n,p),level:e,descr:M(c,p),type:f,children:[],width:p.mindmap?.maxNodeWidth??B.mindmap.maxNodeWidth,padding:m,isRoot:h},N=this.getParent(e);if(N)N.children.push(u),this.nodes.push(u);else if(h)this.nodes.push(u);else throw new Error(`There can be only one root. No parent could be found for ("${u.descr}")`)}getType(e,n){switch(I.debug("In get type",e,n),e){case"[":return this.nodeType.RECT;case"(":return n===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,n){this.elements[e]=n}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;const n=W(),c=this.nodes[this.nodes.length-1];e.icon&&(c.icon=M(e.icon,n)),e.class&&(c.class=M(e.class,n))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,n){if(e.level===0?e.section=void 0:e.section=n,e.children)for(const[c,f]of e.children.entries()){const h=e.level===0?c:n;this.assignSections(f,h)}}flattenNodes(e,n){const c=["mindmap-node"];e.isRoot===!0?c.push("section-root","section--1"):e.section!==void 0&&c.push(`section-${e.section}`),e.class&&c.push(e.class);const f=c.join(" "),h=l(m=>{switch(m){case L.CIRCLE:return"mindmapCircle";case L.RECT:return"rect";case L.ROUNDED_RECT:return"rounded";case L.CLOUD:return"cloud";case L.BANG:return"bang";case L.HEXAGON:return"hexagon";case L.DEFAULT:return"defaultMindmapNode";case L.NO_BORDER:default:return"rect"}},"getShapeFromType"),p={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,isGroup:!1,shape:h(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:f,cssStyles:[],look:"default",icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(n.push(p),e.children)for(const m of e.children)this.flattenNodes(m,n)}generateEdges(e,n){if(e.children)for(const c of e.children){let f="edge";c.section!==void 0&&(f+=` section-edge-${c.section}`);const h=e.level+1;f+=` edge-depth-${h}`;const p={id:`edge_${e.id}_${c.id}`,start:e.id.toString(),end:c.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:"default",classes:f,depth:e.level,section:c.section};n.push(p),this.generateEdges(c,n)}}getData(){const e=this.getMindmap(),n=W(),f=ue().layout!==void 0,h=n;if(f||(h.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:h};I.debug("getData: mindmapRoot",e,n),this.assignSections(e);const p=[],m=[];this.flattenNodes(e,p),this.generateEdges(e,m),I.debug(`getData: processed ${p.length} nodes and ${m.length} edges`);const u=new Map;for(const N of p)u.set(N.id,{shape:N.shape,width:N.width,height:N.height,padding:N.padding});return{nodes:p,edges:m,config:h,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(u),type:"mindmap",diagramId:"mindmap-"+Se()}}getLogger(){return I}},l(C,"MindmapDB"),C),ke=l(async(t,e,n,c)=>{I.debug(`Rendering mindmap diagram
|
|
7
|
+
`+t);const f=c.db,h=f.getData(),p=le(e,h.config.securityLevel);h.type=c.type,h.layoutAlgorithm=de(h.config.layout,{fallback:"cose-bilkent"}),h.diagramId=e,f.getMindmap()&&(h.nodes.forEach(u=>{u.shape==="rounded"?(u.radius=15,u.taper=15,u.stroke="none",u.width=0,u.padding=15):u.shape==="circle"?u.padding=10:u.shape==="rect"&&(u.width=0,u.padding=10)}),await ge(h,p),he(p,h.config.mindmap?.padding??B.mindmap.padding,"mindmapDiagram",h.config.mindmap?.useMaxWidth??B.mindmap.useMaxWidth))},"draw"),Le={draw:ke},xe=l(t=>{let e="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++)t["lineColor"+n]=t["lineColor"+n]||t["cScaleInv"+n],pe(t["lineColor"+n])?t["lineColor"+n]=fe(t["lineColor"+n],20):t["lineColor"+n]=ye(t["lineColor"+n],20);for(let n=0;n<t.THEME_COLOR_LIMIT;n++){const c=""+(17-3*n);e+=`
|
|
8
|
+
.section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {
|
|
9
|
+
fill: ${t["cScale"+n]};
|
|
10
|
+
}
|
|
11
|
+
.section-${n-1} text {
|
|
12
|
+
fill: ${t["cScaleLabel"+n]};
|
|
13
|
+
}
|
|
14
|
+
.node-icon-${n-1} {
|
|
15
|
+
font-size: 40px;
|
|
16
|
+
color: ${t["cScaleLabel"+n]};
|
|
17
|
+
}
|
|
18
|
+
.section-edge-${n-1}{
|
|
19
|
+
stroke: ${t["cScale"+n]};
|
|
20
|
+
}
|
|
21
|
+
.edge-depth-${n-1}{
|
|
22
|
+
stroke-width: ${c};
|
|
23
|
+
}
|
|
24
|
+
.section-${n-1} line {
|
|
25
|
+
stroke: ${t["cScaleInv"+n]} ;
|
|
26
|
+
stroke-width: 3;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.disabled, .disabled circle, .disabled text {
|
|
30
|
+
fill: lightgray;
|
|
31
|
+
}
|
|
32
|
+
.disabled text {
|
|
33
|
+
fill: #efefef;
|
|
34
|
+
}
|
|
35
|
+
`}return e},"genSections"),ve=l(t=>`
|
|
36
|
+
.edge {
|
|
37
|
+
stroke-width: 3;
|
|
38
|
+
}
|
|
39
|
+
${xe(t)}
|
|
40
|
+
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
41
|
+
fill: ${t.git0};
|
|
42
|
+
}
|
|
43
|
+
.section-root text {
|
|
44
|
+
fill: ${t.gitBranchLabel0};
|
|
45
|
+
}
|
|
46
|
+
.section-root span {
|
|
47
|
+
color: ${t.gitBranchLabel0};
|
|
48
|
+
}
|
|
49
|
+
.section-2 span {
|
|
50
|
+
color: ${t.gitBranchLabel0};
|
|
51
|
+
}
|
|
52
|
+
.icon-container {
|
|
53
|
+
height:100%;
|
|
54
|
+
display: flex;
|
|
55
|
+
justify-content: center;
|
|
56
|
+
align-items: center;
|
|
57
|
+
}
|
|
58
|
+
.edge {
|
|
59
|
+
fill: none;
|
|
60
|
+
}
|
|
61
|
+
.mindmap-node-label {
|
|
62
|
+
dy: 1em;
|
|
63
|
+
alignment-baseline: middle;
|
|
64
|
+
text-anchor: middle;
|
|
65
|
+
dominant-baseline: middle;
|
|
66
|
+
text-align: center;
|
|
67
|
+
}
|
|
68
|
+
`,"getStyles"),Te=ve,we={get db(){return new Ne},renderer:Le,parser:De,styles:Te};export{we as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as a}from"./init-Gi6I4Gst.js";class o extends Map{constructor(n,t=g){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),n!=null)for(const[r,s]of n)this.set(r,s)}get(n){return super.get(c(this,n))}has(n){return super.has(c(this,n))}set(n,t){return super.set(l(this,n),t)}delete(n){return super.delete(p(this,n))}}function c({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):t}function l({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):(e.set(r,t),t)}function p({_intern:e,_key:n},t){const r=n(t);return e.has(r)&&(t=e.get(r),e.delete(r)),t}function g(e){return e!==null&&typeof e=="object"?e.valueOf():e}const f=Symbol("implicit");function h(){var e=new o,n=[],t=[],r=f;function s(u){let i=e.get(u);if(i===void 0){if(r!==f)return r;e.set(u,i=n.push(u)-1)}return t[i%t.length]}return s.domain=function(u){if(!arguments.length)return n.slice();n=[],e=new o;for(const i of u)e.has(i)||e.set(i,n.push(i)-1);return s},s.range=function(u){return arguments.length?(t=Array.from(u),s):t.slice()},s.unknown=function(u){return arguments.length?(r=u,s):r},s.copy=function(){return h(n,t).unknown(r)},a.apply(s,arguments),s}export{h as o};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import{a3 as S,a6 as z,aA as j,g as Z,s as q,a as H,b as J,p as K,o as Q,_ as p,l as F,c as X,C as Y,G as ee,M as te,d as ae,x as re,D as ne}from"./mermaid.core-DY8Lk9ir.js";import{p as ie}from"./chunk-4BX2VUAB-BCCD1RD0.js";import{p as se}from"./treemap-KMMF4GRG-DgksShPO.js";import"./index-Dr2pvJml.js";import{d as I}from"./arc-CR894Erh.js";import{o as le}from"./ordinal-Cboi1Yqb.js";import"./min-rFBMICyx.js";import"./_baseUniq-CaVE7eUV.js";import"./init-Gi6I4Gst.js";function oe(e,a){return a<e?-1:a>e?1:a>=e?0:NaN}function ce(e){return e}function ue(){var e=ce,a=oe,f=null,x=S(0),s=S(z),o=S(0);function l(t){var n,c=(t=j(t)).length,d,y,h=0,u=new Array(c),i=new Array(c),v=+x.apply(this,arguments),A=Math.min(z,Math.max(-z,s.apply(this,arguments)-v)),m,C=Math.min(Math.abs(A)/c,o.apply(this,arguments)),$=C*(A<0?-1:1),g;for(n=0;n<c;++n)(g=i[u[n]=n]=+e(t[n],n,t))>0&&(h+=g);for(a!=null?u.sort(function(w,D){return a(i[w],i[D])}):f!=null&&u.sort(function(w,D){return f(t[w],t[D])}),n=0,y=h?(A-c*$)/h:0;n<c;++n,v=m)d=u[n],g=i[d],m=v+(g>0?g*y:0)+$,i[d]={data:t[d],index:n,value:g,startAngle:v,endAngle:m,padAngle:C};return i}return l.value=function(t){return arguments.length?(e=typeof t=="function"?t:S(+t),l):e},l.sortValues=function(t){return arguments.length?(a=t,f=null,l):a},l.sort=function(t){return arguments.length?(f=t,a=null,l):f},l.startAngle=function(t){return arguments.length?(x=typeof t=="function"?t:S(+t),l):x},l.endAngle=function(t){return arguments.length?(s=typeof t=="function"?t:S(+t),l):s},l.padAngle=function(t){return arguments.length?(o=typeof t=="function"?t:S(+t),l):o},l}var pe=ne.pie,G={sections:new Map,showData:!1},T=G.sections,N=G.showData,de=structuredClone(pe),ge=p(()=>structuredClone(de),"getConfig"),fe=p(()=>{T=new Map,N=G.showData,re()},"clear"),me=p(({label:e,value:a})=>{if(a<0)throw new Error(`"${e}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);T.has(e)||(T.set(e,a),F.debug(`added new section: ${e}, with value: ${a}`))},"addSection"),he=p(()=>T,"getSections"),ve=p(e=>{N=e},"setShowData"),Se=p(()=>N,"getShowData"),L={getConfig:ge,clear:fe,setDiagramTitle:Q,getDiagramTitle:K,setAccTitle:J,getAccTitle:H,setAccDescription:q,getAccDescription:Z,addSection:me,getSections:he,setShowData:ve,getShowData:Se},xe=p((e,a)=>{ie(e,a),a.setShowData(e.showData),e.sections.map(a.addSection)},"populateDb"),ye={parse:p(async e=>{const a=await se("pie",e);F.debug(a),xe(a,L)},"parse")},Ae=p(e=>`
|
|
2
|
+
.pieCircle{
|
|
3
|
+
stroke: ${e.pieStrokeColor};
|
|
4
|
+
stroke-width : ${e.pieStrokeWidth};
|
|
5
|
+
opacity : ${e.pieOpacity};
|
|
6
|
+
}
|
|
7
|
+
.pieOuterCircle{
|
|
8
|
+
stroke: ${e.pieOuterStrokeColor};
|
|
9
|
+
stroke-width: ${e.pieOuterStrokeWidth};
|
|
10
|
+
fill: none;
|
|
11
|
+
}
|
|
12
|
+
.pieTitleText {
|
|
13
|
+
text-anchor: middle;
|
|
14
|
+
font-size: ${e.pieTitleTextSize};
|
|
15
|
+
fill: ${e.pieTitleTextColor};
|
|
16
|
+
font-family: ${e.fontFamily};
|
|
17
|
+
}
|
|
18
|
+
.slice {
|
|
19
|
+
font-family: ${e.fontFamily};
|
|
20
|
+
fill: ${e.pieSectionTextColor};
|
|
21
|
+
font-size:${e.pieSectionTextSize};
|
|
22
|
+
// fill: white;
|
|
23
|
+
}
|
|
24
|
+
.legend text {
|
|
25
|
+
fill: ${e.pieLegendTextColor};
|
|
26
|
+
font-family: ${e.fontFamily};
|
|
27
|
+
font-size: ${e.pieLegendTextSize};
|
|
28
|
+
}
|
|
29
|
+
`,"getStyles"),we=Ae,De=p(e=>{const a=[...e.values()].reduce((s,o)=>s+o,0),f=[...e.entries()].map(([s,o])=>({label:s,value:o})).filter(s=>s.value/a*100>=1).sort((s,o)=>o.value-s.value);return ue().value(s=>s.value)(f)},"createPieArcs"),Ce=p((e,a,f,x)=>{F.debug(`rendering pie chart
|
|
30
|
+
`+e);const s=x.db,o=X(),l=Y(s.getConfig(),o.pie),t=40,n=18,c=4,d=450,y=d,h=ee(a),u=h.append("g");u.attr("transform","translate("+y/2+","+d/2+")");const{themeVariables:i}=o;let[v]=te(i.pieOuterStrokeWidth);v??=2;const A=l.textPosition,m=Math.min(y,d)/2-t,C=I().innerRadius(0).outerRadius(m),$=I().innerRadius(m*A).outerRadius(m*A);u.append("circle").attr("cx",0).attr("cy",0).attr("r",m+v/2).attr("class","pieOuterCircle");const g=s.getSections(),w=De(g),D=[i.pie1,i.pie2,i.pie3,i.pie4,i.pie5,i.pie6,i.pie7,i.pie8,i.pie9,i.pie10,i.pie11,i.pie12];let b=0;g.forEach(r=>{b+=r});const W=w.filter(r=>(r.data.value/b*100).toFixed(0)!=="0"),E=le(D);u.selectAll("mySlices").data(W).enter().append("path").attr("d",C).attr("fill",r=>E(r.data.label)).attr("class","pieCircle"),u.selectAll("mySlices").data(W).enter().append("text").text(r=>(r.data.value/b*100).toFixed(0)+"%").attr("transform",r=>"translate("+$.centroid(r)+")").style("text-anchor","middle").attr("class","slice"),u.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText");const O=[...g.entries()].map(([r,M])=>({label:r,value:M})),k=u.selectAll(".legend").data(O).enter().append("g").attr("class","legend").attr("transform",(r,M)=>{const R=n+c,B=R*O.length/2,V=12*n,U=M*R-B;return"translate("+V+","+U+")"});k.append("rect").attr("width",n).attr("height",n).style("fill",r=>E(r.label)).style("stroke",r=>E(r.label)),k.append("text").attr("x",n+c).attr("y",n-c).text(r=>s.getShowData()?`${r.label} [${r.value}]`:r.label);const _=Math.max(...k.selectAll("text").nodes().map(r=>r?.getBoundingClientRect().width??0)),P=y+t+n+c+_;h.attr("viewBox",`0 0 ${P} ${d}`),ae(h,d,P,l.useMaxWidth)},"draw"),$e={draw:Ce},We={parser:ye,db:L,renderer:$e,styles:we};export{We as diagram};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{s as _e,g as Ae,p as ie,o as ke,a as Fe,b as Pe,_ as o,c as zt,l as bt,d as ve,x as Ce,D,h as Le,I as Ee}from"./mermaid.core-DY8Lk9ir.js";import{s as Lt}from"./index-Dr2pvJml.js";import{l as ee}from"./linear-BEr0iAwY.js";import"./init-Gi6I4Gst.js";import"./defaultLocale-DX6XiGOO.js";var Et=(function(){var t=o(function(M,r,l,x){for(l=l||{},x=M.length;x--;l[M[x]]=r);return l},"o"),n=[1,3],f=[1,4],d=[1,5],h=[1,6],p=[1,7],y=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],_=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],a=[55,56,57],A=[2,36],u=[1,37],T=[1,36],m=[1,38],q=[1,35],b=[1,43],g=[1,41],G=[1,14],ht=[1,23],xt=[1,18],ft=[1,19],gt=[1,20],ct=[1,21],_t=[1,22],dt=[1,24],i=[1,25],Vt=[1,26],It=[1,27],wt=[1,28],Bt=[1,29],W=[1,32],U=[1,33],k=[1,34],F=[1,39],P=[1,40],v=[1,42],C=[1,44],O=[1,62],H=[1,61],L=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],Rt=[1,65],Nt=[1,66],Wt=[1,67],Ut=[1,68],Qt=[1,69],Ot=[1,70],Ht=[1,71],Xt=[1,72],Mt=[1,73],Yt=[1,74],jt=[1,75],Gt=[1,76],I=[4,5,6,7,8,9,10,11,12,13,14,15,18],K=[1,90],Z=[1,91],J=[1,92],$=[1,99],tt=[1,93],et=[1,96],it=[1,94],at=[1,95],nt=[1,97],st=[1,98],At=[1,102],Kt=[10,55,56,57],R=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],kt={trace:o(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],[59,1],[59,1],[59,1]],performAction:o(function(r,l,x,c,S,e,ut){var s=e.length-1;switch(S){case 23:this.$=e[s];break;case 24:this.$=e[s-1]+""+e[s];break;case 26:this.$=e[s-1]+e[s];break;case 27:this.$=[e[s].trim()];break;case 28:e[s-2].push(e[s].trim()),this.$=e[s-2];break;case 29:this.$=e[s-4],c.addClass(e[s-2],e[s]);break;case 37:this.$=[];break;case 42:this.$=e[s].trim(),c.setDiagramTitle(this.$);break;case 43:this.$=e[s].trim(),c.setAccTitle(this.$);break;case 44:case 45:this.$=e[s].trim(),c.setAccDescription(this.$);break;case 46:c.addSection(e[s].substr(8)),this.$=e[s].substr(8);break;case 47:c.addPoint(e[s-3],"",e[s-1],e[s],[]);break;case 48:c.addPoint(e[s-4],e[s-3],e[s-1],e[s],[]);break;case 49:c.addPoint(e[s-4],"",e[s-2],e[s-1],e[s]);break;case 50:c.addPoint(e[s-5],e[s-4],e[s-2],e[s-1],e[s]);break;case 51:c.setXAxisLeftText(e[s-2]),c.setXAxisRightText(e[s]);break;case 52:e[s-1].text+=" ⟶ ",c.setXAxisLeftText(e[s-1]);break;case 53:c.setXAxisLeftText(e[s]);break;case 54:c.setYAxisBottomText(e[s-2]),c.setYAxisTopText(e[s]);break;case 55:e[s-1].text+=" ⟶ ",c.setYAxisBottomText(e[s-1]);break;case 56:c.setYAxisBottomText(e[s]);break;case 57:c.setQuadrant1Text(e[s]);break;case 58:c.setQuadrant2Text(e[s]);break;case 59:c.setQuadrant3Text(e[s]);break;case 60:c.setQuadrant4Text(e[s]);break;case 64:this.$={text:e[s],type:"text"};break;case 65:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 66:this.$={text:e[s],type:"text"};break;case 67:this.$={text:e[s],type:"markdown"};break;case 68:this.$=e[s];break;case 69:this.$=e[s-1]+""+e[s];break}},"anonymous"),table:[{18:n,26:1,27:2,28:f,55:d,56:h,57:p},{1:[3]},{18:n,26:8,27:2,28:f,55:d,56:h,57:p},{18:n,26:9,27:2,28:f,55:d,56:h,57:p},t(y,[2,33],{29:10}),t(_,[2,61]),t(_,[2,62]),t(_,[2,63]),{1:[2,30]},{1:[2,31]},t(a,A,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:u,5:T,10:m,12:q,13:b,14:g,18:G,25:ht,35:xt,37:ft,39:gt,41:ct,42:_t,48:dt,50:i,51:Vt,52:It,53:wt,54:Bt,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(y,[2,34]),{27:45,55:d,56:h,57:p},t(a,[2,37]),t(a,A,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:u,5:T,10:m,12:q,13:b,14:g,18:G,25:ht,35:xt,37:ft,39:gt,41:ct,42:_t,48:dt,50:i,51:Vt,52:It,53:wt,54:Bt,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(a,[2,39]),t(a,[2,40]),t(a,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(a,[2,45]),t(a,[2,46]),{18:[1,50]},{4:u,5:T,10:m,12:q,13:b,14:g,43:51,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:u,5:T,10:m,12:q,13:b,14:g,43:52,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:u,5:T,10:m,12:q,13:b,14:g,43:53,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:u,5:T,10:m,12:q,13:b,14:g,43:54,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:u,5:T,10:m,12:q,13:b,14:g,43:55,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:u,5:T,10:m,12:q,13:b,14:g,43:56,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:u,5:T,8:O,10:m,12:q,13:b,14:g,18:H,44:[1,57],47:[1,58],58:60,59:59,63:k,64:F,65:P,66:v,67:C},t(L,[2,64]),t(L,[2,66]),t(L,[2,67]),t(L,[2,70]),t(L,[2,71]),t(L,[2,72]),t(L,[2,73]),t(L,[2,74]),t(L,[2,75]),t(L,[2,76]),t(L,[2,77]),t(L,[2,78]),t(L,[2,79]),t(L,[2,80]),t(y,[2,35]),t(a,[2,38]),t(a,[2,42]),t(a,[2,43]),t(a,[2,44]),{3:64,4:Rt,5:Nt,6:Wt,7:Ut,8:Qt,9:Ot,10:Ht,11:Xt,12:Mt,13:Yt,14:jt,15:Gt,21:63},t(a,[2,53],{59:59,58:60,4:u,5:T,8:O,10:m,12:q,13:b,14:g,18:H,49:[1,77],63:k,64:F,65:P,66:v,67:C}),t(a,[2,56],{59:59,58:60,4:u,5:T,8:O,10:m,12:q,13:b,14:g,18:H,49:[1,78],63:k,64:F,65:P,66:v,67:C}),t(a,[2,57],{59:59,58:60,4:u,5:T,8:O,10:m,12:q,13:b,14:g,18:H,63:k,64:F,65:P,66:v,67:C}),t(a,[2,58],{59:59,58:60,4:u,5:T,8:O,10:m,12:q,13:b,14:g,18:H,63:k,64:F,65:P,66:v,67:C}),t(a,[2,59],{59:59,58:60,4:u,5:T,8:O,10:m,12:q,13:b,14:g,18:H,63:k,64:F,65:P,66:v,67:C}),t(a,[2,60],{59:59,58:60,4:u,5:T,8:O,10:m,12:q,13:b,14:g,18:H,63:k,64:F,65:P,66:v,67:C}),{45:[1,79]},{44:[1,80]},t(L,[2,65]),t(L,[2,81]),t(L,[2,82]),t(L,[2,83]),{3:82,4:Rt,5:Nt,6:Wt,7:Ut,8:Qt,9:Ot,10:Ht,11:Xt,12:Mt,13:Yt,14:jt,15:Gt,18:[1,81]},t(I,[2,23]),t(I,[2,1]),t(I,[2,2]),t(I,[2,3]),t(I,[2,4]),t(I,[2,5]),t(I,[2,6]),t(I,[2,7]),t(I,[2,8]),t(I,[2,9]),t(I,[2,10]),t(I,[2,11]),t(I,[2,12]),t(a,[2,52],{58:31,43:83,4:u,5:T,10:m,12:q,13:b,14:g,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(a,[2,55],{58:31,43:84,4:u,5:T,10:m,12:q,13:b,14:g,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),{46:[1,85]},{45:[1,86]},{4:K,5:Z,6:J,8:$,11:tt,13:et,16:89,17:it,18:at,19:nt,20:st,22:88,23:87},t(I,[2,24]),t(a,[2,51],{59:59,58:60,4:u,5:T,8:O,10:m,12:q,13:b,14:g,18:H,63:k,64:F,65:P,66:v,67:C}),t(a,[2,54],{59:59,58:60,4:u,5:T,8:O,10:m,12:q,13:b,14:g,18:H,63:k,64:F,65:P,66:v,67:C}),t(a,[2,47],{22:88,16:89,23:100,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{46:[1,101]},t(a,[2,29],{10:At}),t(Kt,[2,27],{16:103,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),t(R,[2,25]),t(R,[2,13]),t(R,[2,14]),t(R,[2,15]),t(R,[2,16]),t(R,[2,17]),t(R,[2,18]),t(R,[2,19]),t(R,[2,20]),t(R,[2,21]),t(R,[2,22]),t(a,[2,49],{10:At}),t(a,[2,48],{22:88,16:89,23:104,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st}),{4:K,5:Z,6:J,8:$,11:tt,13:et,16:89,17:it,18:at,19:nt,20:st,22:105},t(R,[2,26]),t(a,[2,50],{10:At}),t(Kt,[2,28],{16:103,4:K,5:Z,6:J,8:$,11:tt,13:et,17:it,18:at,19:nt,20:st})],defaultActions:{8:[2,30],9:[2,31]},parseError:o(function(r,l){if(l.recoverable)this.trace(r);else{var x=new Error(r);throw x.hash=l,x}},"parseError"),parse:o(function(r){var l=this,x=[0],c=[],S=[null],e=[],ut=this.table,s="",yt=0,Zt=0,me=2,Jt=1,qe=e.slice.call(arguments,1),E=Object.create(this.lexer),Y={yy:{}};for(var Ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ft)&&(Y.yy[Ft]=this.yy[Ft]);E.setInput(r,Y.yy),Y.yy.lexer=E,Y.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var Pt=E.yylloc;e.push(Pt);var be=E.options&&E.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Se(B){x.length=x.length-2*B,S.length=S.length-B,e.length=e.length-B}o(Se,"popStack");function $t(){var B;return B=c.pop()||E.lex()||Jt,typeof B!="number"&&(B instanceof Array&&(c=B,B=c.pop()),B=l.symbols_[B]||B),B}o($t,"lex");for(var w,j,N,vt,rt={},Tt,X,te,mt;;){if(j=x[x.length-1],this.defaultActions[j]?N=this.defaultActions[j]:((w===null||typeof w>"u")&&(w=$t()),N=ut[j]&&ut[j][w]),typeof N>"u"||!N.length||!N[0]){var Ct="";mt=[];for(Tt in ut[j])this.terminals_[Tt]&&Tt>me&&mt.push("'"+this.terminals_[Tt]+"'");E.showPosition?Ct="Parse error on line "+(yt+1)+`:
|
|
2
|
+
`+E.showPosition()+`
|
|
3
|
+
Expecting `+mt.join(", ")+", got '"+(this.terminals_[w]||w)+"'":Ct="Parse error on line "+(yt+1)+": Unexpected "+(w==Jt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(Ct,{text:E.match,token:this.terminals_[w]||w,line:E.yylineno,loc:Pt,expected:mt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+w);switch(N[0]){case 1:x.push(w),S.push(E.yytext),e.push(E.yylloc),x.push(N[1]),w=null,Zt=E.yyleng,s=E.yytext,yt=E.yylineno,Pt=E.yylloc;break;case 2:if(X=this.productions_[N[1]][1],rt.$=S[S.length-X],rt._$={first_line:e[e.length-(X||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(X||1)].first_column,last_column:e[e.length-1].last_column},be&&(rt._$.range=[e[e.length-(X||1)].range[0],e[e.length-1].range[1]]),vt=this.performAction.apply(rt,[s,Zt,yt,Y.yy,N[1],S,e].concat(qe)),typeof vt<"u")return vt;X&&(x=x.slice(0,-1*X*2),S=S.slice(0,-1*X),e=e.slice(0,-1*X)),x.push(this.productions_[N[1]][0]),S.push(rt.$),e.push(rt._$),te=ut[x[x.length-2]][x[x.length-1]],x.push(te);break;case 3:return!0}}return!0},"parse")},Te=(function(){var M={EOF:1,parseError:o(function(l,x){if(this.yy.parser)this.yy.parser.parseError(l,x);else throw new Error(l)},"parseError"),setInput:o(function(r,l){return this.yy=l||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:o(function(r){var l=r.length,x=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1&&(this.yylineno-=x.length-1);var S=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:x?(x.length===c.length?this.yylloc.first_column:0)+c[c.length-x.length].length-x[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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:o(function(r){this.unput(this.match.slice(r))},"less"),pastInput:o(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var r=this.pastInput(),l=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
5
|
+
`+l+"^"},"showPosition"),test_match:o(function(r,l){var x,c,S;if(this.options.backtrack_lexer&&(S={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(S.yylloc.range=this.yylloc.range.slice(0))),c=r[0].match(/(?:\r\n?|\n).*/g),c&&(this.yylineno+=c.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],x=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),x)return x;if(this._backtrack){for(var e in S)this[e]=S[e];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,l,x,c;this._more||(this.yytext="",this.match="");for(var S=this._currentRules(),e=0;e<S.length;e++)if(x=this._input.match(this.rules[S[e]]),x&&(!l||x[0].length>l[0].length)){if(l=x,c=e,this.options.backtrack_lexer){if(r=this.test_match(x,S[e]),r!==!1)return r;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(r=this.test_match(l,S[c]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var l=this.next();return l||this.lex()},"lex"),begin:o(function(l){this.conditionStack.push(l)},"begin"),popState:o(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:o(function(l){this.begin(l)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(l,x,c,S){switch(c){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";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;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:return 65;case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51: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,/^(?::)/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],inclusive:!0}}};return M})();kt.lexer=Te;function pt(){this.yy={}}return o(pt,"Parser"),pt.prototype=kt,kt.Parser=pt,new pt})();Et.parser=Et;var De=Et,V=Ee(),ot,ze=(ot=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:D.quadrantChart?.chartWidth||500,chartWidth:D.quadrantChart?.chartHeight||500,titlePadding:D.quadrantChart?.titlePadding||10,titleFontSize:D.quadrantChart?.titleFontSize||20,quadrantPadding:D.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:D.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:D.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:D.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:D.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:D.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:D.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:D.quadrantChart?.pointTextPadding||5,pointLabelFontSize:D.quadrantChart?.pointLabelFontSize||12,pointRadius:D.quadrantChart?.pointRadius||5,xAxisPosition:D.quadrantChart?.xAxisPosition||"top",yAxisPosition:D.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:D.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:D.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:V.quadrant1Fill,quadrant2Fill:V.quadrant2Fill,quadrant3Fill:V.quadrant3Fill,quadrant4Fill:V.quadrant4Fill,quadrant1TextFill:V.quadrant1TextFill,quadrant2TextFill:V.quadrant2TextFill,quadrant3TextFill:V.quadrant3TextFill,quadrant4TextFill:V.quadrant4TextFill,quadrantPointFill:V.quadrantPointFill,quadrantPointTextFill:V.quadrantPointTextFill,quadrantXAxisTextFill:V.quadrantXAxisTextFill,quadrantYAxisTextFill:V.quadrantYAxisTextFill,quadrantTitleFill:V.quadrantTitleFill,quadrantInternalBorderStrokeFill:V.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:V.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,bt.info("clear called")}setData(n){this.data={...this.data,...n}}addPoints(n){this.data.points=[...n,...this.data.points]}addClass(n,f){this.classes.set(n,f)}setConfig(n){bt.trace("setConfig called with: ",n),this.config={...this.config,...n}}setThemeConfig(n){bt.trace("setThemeConfig called with: ",n),this.themeConfig={...this.themeConfig,...n}}calculateSpace(n,f,d,h){const p=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,y={top:n==="top"&&f?p:0,bottom:n==="bottom"&&f?p:0},_=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,a={left:this.config.yAxisPosition==="left"&&d?_:0,right:this.config.yAxisPosition==="right"&&d?_:0},A=this.config.titleFontSize+this.config.titlePadding*2,u={top:h?A:0},T=this.config.quadrantPadding+a.left,m=this.config.quadrantPadding+y.top+u.top,q=this.config.chartWidth-this.config.quadrantPadding*2-a.left-a.right,b=this.config.chartHeight-this.config.quadrantPadding*2-y.top-y.bottom-u.top,g=q/2,G=b/2;return{xAxisSpace:y,yAxisSpace:a,titleSpace:u,quadrantSpace:{quadrantLeft:T,quadrantTop:m,quadrantWidth:q,quadrantHalfWidth:g,quadrantHeight:b,quadrantHalfHeight:G}}}getAxisLabels(n,f,d,h){const{quadrantSpace:p,titleSpace:y}=h,{quadrantHalfHeight:_,quadrantHeight:a,quadrantLeft:A,quadrantHalfWidth:u,quadrantTop:T,quadrantWidth:m}=p,q=!!this.data.xAxisRightText,b=!!this.data.yAxisTopText,g=[];return this.data.xAxisLeftText&&f&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:A+(q?u/2:0),y:n==="top"?this.config.xAxisLabelPadding+y.top:this.config.xAxisLabelPadding+T+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:q?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&f&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:A+u+(q?u/2:0),y:n==="top"?this.config.xAxisLabelPadding+y.top:this.config.xAxisLabelPadding+T+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:q?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&d&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+A+m+this.config.quadrantPadding,y:T+a-(b?_/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:b?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&d&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+A+m+this.config.quadrantPadding,y:T+_-(b?_/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:b?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(n){const{quadrantSpace:f}=n,{quadrantHalfHeight:d,quadrantLeft:h,quadrantHalfWidth:p,quadrantTop:y}=f,_=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h+p,y,width:p,height:d,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:h,y,width:p,height:d,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:h,y:y+d,width:p,height:d,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:h+p,y:y+d,width:p,height:d,fill:this.themeConfig.quadrant4Fill}];for(const a of _)a.text.x=a.x+a.width/2,this.data.points.length===0?(a.text.y=a.y+a.height/2,a.text.horizontalPos="middle"):(a.text.y=a.y+this.config.quadrantTextTopPadding,a.text.horizontalPos="top");return _}getQuadrantPoints(n){const{quadrantSpace:f}=n,{quadrantHeight:d,quadrantLeft:h,quadrantTop:p,quadrantWidth:y}=f,_=ee().domain([0,1]).range([h,y+h]),a=ee().domain([0,1]).range([d+p,p]);return this.data.points.map(u=>{const T=this.classes.get(u.className);return T&&(u={...T,...u}),{x:_(u.x),y:a(u.y),fill:u.color??this.themeConfig.quadrantPointFill,radius:u.radius??this.config.pointRadius,text:{text:u.text,fill:this.themeConfig.quadrantPointTextFill,x:_(u.x),y:a(u.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:u.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:u.strokeWidth??"0px"}})}getBorders(n){const f=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:d}=n,{quadrantHalfHeight:h,quadrantHeight:p,quadrantLeft:y,quadrantHalfWidth:_,quadrantTop:a,quadrantWidth:A}=d;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y-f,y1:a,x2:y+A+f,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y+A,y1:a+f,x2:y+A,y2:a+p-f},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y-f,y1:a+p,x2:y+A+f,y2:a+p},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y,y1:a+f,x2:y,y2:a+p-f},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:y+_,y1:a+f,x2:y+_,y2:a+p-f},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:y+f,y1:a+h,x2:y+A-f,y2:a+h}]}getTitle(n){if(n)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}}build(){const n=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),f=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),d=this.config.showTitle&&!!this.data.titleText,h=this.data.points.length>0?"bottom":this.config.xAxisPosition,p=this.calculateSpace(h,n,f,d);return{points:this.getQuadrantPoints(p),quadrants:this.getQuadrants(p),axisLabels:this.getAxisLabels(h,n,f,p),borderLines:this.getBorders(p),title:this.getTitle(d)}}},o(ot,"QuadrantBuilder"),ot),lt,qt=(lt=class extends Error{constructor(n,f,d){super(`value for ${n} ${f} is invalid, please use a valid ${d}`),this.name="InvalidStyleError"}},o(lt,"InvalidStyleError"),lt);function Dt(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}o(Dt,"validateHexCode");function ae(t){return!/^\d+$/.test(t)}o(ae,"validateNumber");function ne(t){return!/^\d+px$/.test(t)}o(ne,"validateSizeInPixels");var Ve=zt();function Q(t){return Le(t.trim(),Ve)}o(Q,"textSanitizer");var z=new ze;function se(t){z.setData({quadrant1Text:Q(t.text)})}o(se,"setQuadrant1Text");function re(t){z.setData({quadrant2Text:Q(t.text)})}o(re,"setQuadrant2Text");function oe(t){z.setData({quadrant3Text:Q(t.text)})}o(oe,"setQuadrant3Text");function le(t){z.setData({quadrant4Text:Q(t.text)})}o(le,"setQuadrant4Text");function he(t){z.setData({xAxisLeftText:Q(t.text)})}o(he,"setXAxisLeftText");function ce(t){z.setData({xAxisRightText:Q(t.text)})}o(ce,"setXAxisRightText");function de(t){z.setData({yAxisTopText:Q(t.text)})}o(de,"setYAxisTopText");function ue(t){z.setData({yAxisBottomText:Q(t.text)})}o(ue,"setYAxisBottomText");function St(t){const n={};for(const f of t){const[d,h]=f.trim().split(/\s*:\s*/);if(d==="radius"){if(ae(h))throw new qt(d,h,"number");n.radius=parseInt(h)}else if(d==="color"){if(Dt(h))throw new qt(d,h,"hex code");n.color=h}else if(d==="stroke-color"){if(Dt(h))throw new qt(d,h,"hex code");n.strokeColor=h}else if(d==="stroke-width"){if(ne(h))throw new qt(d,h,"number of pixels (eg. 10px)");n.strokeWidth=h}else throw new Error(`style named ${d} is not supported.`)}return n}o(St,"parseStyles");function xe(t,n,f,d,h){const p=St(h);z.addPoints([{x:f,y:d,text:Q(t.text),className:n,...p}])}o(xe,"addPoint");function fe(t,n){z.addClass(t,St(n))}o(fe,"addClass");function ge(t){z.setConfig({chartWidth:t})}o(ge,"setWidth");function pe(t){z.setConfig({chartHeight:t})}o(pe,"setHeight");function ye(){const t=zt(),{themeVariables:n,quadrantChart:f}=t;return f&&z.setConfig(f),z.setThemeConfig({quadrant1Fill:n.quadrant1Fill,quadrant2Fill:n.quadrant2Fill,quadrant3Fill:n.quadrant3Fill,quadrant4Fill:n.quadrant4Fill,quadrant1TextFill:n.quadrant1TextFill,quadrant2TextFill:n.quadrant2TextFill,quadrant3TextFill:n.quadrant3TextFill,quadrant4TextFill:n.quadrant4TextFill,quadrantPointFill:n.quadrantPointFill,quadrantPointTextFill:n.quadrantPointTextFill,quadrantXAxisTextFill:n.quadrantXAxisTextFill,quadrantYAxisTextFill:n.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:n.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:n.quadrantInternalBorderStrokeFill,quadrantTitleFill:n.quadrantTitleFill}),z.setData({titleText:ie()}),z.build()}o(ye,"getQuadrantData");var Ie=o(function(){z.clear(),Ce()},"clear"),we={setWidth:ge,setHeight:pe,setQuadrant1Text:se,setQuadrant2Text:re,setQuadrant3Text:oe,setQuadrant4Text:le,setXAxisLeftText:he,setXAxisRightText:ce,setYAxisTopText:de,setYAxisBottomText:ue,parseStyles:St,addPoint:xe,addClass:fe,getQuadrantData:ye,clear:Ie,setAccTitle:Pe,getAccTitle:Fe,setDiagramTitle:ke,getDiagramTitle:ie,getAccDescription:Ae,setAccDescription:_e},Be=o((t,n,f,d)=>{function h(i){return i==="top"?"hanging":"middle"}o(h,"getDominantBaseLine");function p(i){return i==="left"?"start":"middle"}o(p,"getTextAnchor");function y(i){return`translate(${i.x}, ${i.y}) rotate(${i.rotation||0})`}o(y,"getTransformation");const _=zt();bt.debug(`Rendering quadrant chart
|
|
7
|
+
`+t);const a=_.securityLevel;let A;a==="sandbox"&&(A=Lt("#i"+n));const T=(a==="sandbox"?Lt(A.nodes()[0].contentDocument.body):Lt("body")).select(`[id="${n}"]`),m=T.append("g").attr("class","main"),q=_.quadrantChart?.chartWidth??500,b=_.quadrantChart?.chartHeight??500;ve(T,b,q,_.quadrantChart?.useMaxWidth??!0),T.attr("viewBox","0 0 "+q+" "+b),d.db.setHeight(b),d.db.setWidth(q);const g=d.db.getQuadrantData(),G=m.append("g").attr("class","quadrants"),ht=m.append("g").attr("class","border"),xt=m.append("g").attr("class","data-points"),ft=m.append("g").attr("class","labels"),gt=m.append("g").attr("class","title");g.title&>.append("text").attr("x",0).attr("y",0).attr("fill",g.title.fill).attr("font-size",g.title.fontSize).attr("dominant-baseline",h(g.title.horizontalPos)).attr("text-anchor",p(g.title.verticalPos)).attr("transform",y(g.title)).text(g.title.text),g.borderLines&&ht.selectAll("line").data(g.borderLines).enter().append("line").attr("x1",i=>i.x1).attr("y1",i=>i.y1).attr("x2",i=>i.x2).attr("y2",i=>i.y2).style("stroke",i=>i.strokeFill).style("stroke-width",i=>i.strokeWidth);const ct=G.selectAll("g.quadrant").data(g.quadrants).enter().append("g").attr("class","quadrant");ct.append("rect").attr("x",i=>i.x).attr("y",i=>i.y).attr("width",i=>i.width).attr("height",i=>i.height).attr("fill",i=>i.fill),ct.append("text").attr("x",0).attr("y",0).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>h(i.text.horizontalPos)).attr("text-anchor",i=>p(i.text.verticalPos)).attr("transform",i=>y(i.text)).text(i=>i.text.text),ft.selectAll("g.label").data(g.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(i=>i.text).attr("fill",i=>i.fill).attr("font-size",i=>i.fontSize).attr("dominant-baseline",i=>h(i.horizontalPos)).attr("text-anchor",i=>p(i.verticalPos)).attr("transform",i=>y(i));const dt=xt.selectAll("g.data-point").data(g.points).enter().append("g").attr("class","data-point");dt.append("circle").attr("cx",i=>i.x).attr("cy",i=>i.y).attr("r",i=>i.radius).attr("fill",i=>i.fill).attr("stroke",i=>i.strokeColor).attr("stroke-width",i=>i.strokeWidth),dt.append("text").attr("x",0).attr("y",0).text(i=>i.text.text).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>h(i.text.horizontalPos)).attr("text-anchor",i=>p(i.text.verticalPos)).attr("transform",i=>y(i.text))},"draw"),Re={draw:Be},He={parser:De,db:we,renderer:Re,styles:o(()=>"","styles")};export{He as diagram};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import{g as Ge}from"./chunk-55IACEB6-7M5H4j_M.js";import{s as ze}from"./chunk-QN33PNHL-Lj8Zu7hm.js";import{_ as f,b as Xe,a as Je,s as Ze,g as et,o as tt,p as st,c as Ne,l as qe,x as it,A as rt,n as nt,r as at,u as lt}from"./mermaid.core-DY8Lk9ir.js";import"./index-Dr2pvJml.js";var Ae=(function(){var e=f(function(P,i,n,c){for(n=n||{},c=P.length;c--;n[P[c]]=i);return n},"o"),l=[1,3],u=[1,4],h=[1,5],r=[1,6],o=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],m=[1,22],y=[2,7],_=[1,26],b=[1,27],N=[1,28],q=[1,29],A=[1,33],C=[1,34],V=[1,35],v=[1,36],x=[1,37],L=[1,38],D=[1,24],O=[1,31],w=[1,32],M=[1,30],p=[1,39],R=[1,40],d=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],$=[1,61],X=[89,90],Ce=[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],de=[27,29],Ve=[1,70],ve=[1,71],xe=[1,72],Le=[1,73],De=[1,74],Oe=[1,75],we=[1,76],ee=[1,83],U=[1,80],te=[1,84],se=[1,85],ie=[1,86],re=[1,87],ne=[1,88],ae=[1,89],le=[1,90],ce=[1,91],oe=[1,92],pe=[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],Y=[63,64],Me=[1,101],Fe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[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],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],he=[1,116],ue=[1,117],fe=[1,114],me=[1,115],Se={trace:f(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:f(function(i,n,c,s,E,t,Ee){var a=t.length-1;switch(E){case 4:this.$=t[a].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[a].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[a-3],t[a-4]);break;case 22:s.addRequirement(t[a-5],t[a-6]),s.setClass([t[a-5]],t[a-3]);break;case 23:s.setNewReqId(t[a-2]);break;case 24:s.setNewReqText(t[a-2]);break;case 25:s.setNewReqRisk(t[a-2]);break;case 26:s.setNewReqVerifyMethod(t[a-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[a-3]);break;case 43:s.addElement(t[a-5]),s.setClass([t[a-5]],t[a-3]);break;case 44:s.setNewElementType(t[a-2]);break;case 45:s.setNewElementDocRef(t[a-2]);break;case 48:s.addRelationship(t[a-2],t[a],t[a-4]);break;case 49:s.addRelationship(t[a-2],t[a-4],t[a]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[a-2],s.defineClass(t[a-1],t[a]);break;case 58:s.setClass(t[a-1],t[a]);break;case 59:s.setClass([t[a-2]],t[a]);break;case 60:case 62:this.$=[t[a]];break;case 61:case 63:this.$=t[a-2].concat([t[a]]);break;case 64:this.$=t[a-2],s.setCssStyle(t[a-1],t[a]);break;case 65:this.$=[t[a]];break;case 66:t[a-2].push(t[a]),this.$=t[a-2];break;case 68:this.$=t[a-1]+t[a];break}},"anonymous"),table:[{3:1,4:2,6:l,9:u,11:h,13:r},{1:[3]},{3:8,4:2,5:[1,7],6:l,9:u,11:h,13:r},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(o,[2,6]),{3:12,4:2,6:l,9:u,11:h,13:r},{1:[2,2]},{4:17,5:m,7:13,8:y,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:p,90:R},e(o,[2,4]),e(o,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:m,7:42,8:y,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:p,90:R},{4:17,5:m,7:43,8:y,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:p,90:R},{4:17,5:m,7:44,8:y,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:p,90:R},{4:17,5:m,7:45,8:y,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:p,90:R},{4:17,5:m,7:46,8:y,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:p,90:R},{4:17,5:m,7:47,8:y,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:p,90:R},{4:17,5:m,7:48,8:y,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:p,90:R},{4:17,5:m,7:49,8:y,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:p,90:R},{4:17,5:m,7:50,8:y,9:u,11:h,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:p,90:R},{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]},e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),{30:60,33:62,75:$,89:p,90:R},{30:63,33:62,75:$,89:p,90:R},{30:64,33:62,75:$,89:p,90:R},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ce,[2,81]),e(Ce,[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]},e(de,[2,79]),e(de,[2,80]),{27:[1,67],29:[1,68]},e(de,[2,85]),e(de,[2,86]),{62:69,65:Ve,66:ve,67:xe,68:Le,69:De,70:Oe,71:we},{62:77,65:Ve,66:ve,67:xe,68:Le,69:De,70:Oe,71:we},{30:78,33:62,75:$,89:p,90:R},{73:79,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,60]),e(pe,[2,62]),{73:93,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},{30:94,33:62,75:$,76:U,89:p,90:R},{5:[1,95]},{30:96,33:62,75:$,89:p,90:R},{5:[1,97]},{30:98,33:62,75:$,89:p,90:R},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(d,[2,59],{76:U}),e(d,[2,64],{76:Me}),{33:103,75:[1,102],89:p,90:R},e(Fe,[2,65],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(d,[2,57],{76:Me}),e(d,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:he,40:ue,56:113,57:fe,59:me},{27:[1,118],76:U},{33:119,89:p,90:R},{33:120,89:p,90:R},{75:ee,78:121,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,61]),e(pe,[2,63]),e(T,[2,68]),e(d,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(d,[2,28]),{5:[1,127]},e(d,[2,42]),{32:[1,128]},{32:[1,129]},{5:he,40:ue,56:130,57:fe,59:me},e(d,[2,47]),{5:[1,131]},e(d,[2,48]),e(d,[2,49]),e(Fe,[2,66],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),{33:132,89:p,90:R},{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]},e(d,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(d,[2,46]),{5:he,40:ue,56:152,57:fe,59:me},{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]},e(d,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(d,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:he,40:ue,56:163,57:fe,59:me},{5:he,40:ue,56:164,57:fe,59:me},e(d,[2,23]),e(d,[2,24]),e(d,[2,25]),e(d,[2,26]),e(d,[2,44]),e(d,[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:f(function(i,n){if(n.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=n,c}},"parseError"),parse:f(function(i){var n=this,c=[0],s=[],E=[null],t=[],Ee=this.table,a="",ye=0,Pe=0,He=2,$e=1,Ke=t.slice.call(arguments,1),g=Object.create(this.lexer),G={yy:{}};for(var Ie in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ie)&&(G.yy[Ie]=this.yy[Ie]);g.setInput(i,G.yy),G.yy.lexer=g,G.yy.parser=this,typeof g.yylloc>"u"&&(g.yylloc={});var be=g.yylloc;t.push(be);var We=g.options&&g.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function je(I){c.length=c.length-2*I,E.length=E.length-I,t.length=t.length-I}f(je,"popStack");function Ue(){var I;return I=s.pop()||g.lex()||$e,typeof I!="number"&&(I instanceof Array&&(s=I,I=s.pop()),I=n.symbols_[I]||I),I}f(Ue,"lex");for(var S,z,k,Te,J={},ge,F,Ye,_e;;){if(z=c[c.length-1],this.defaultActions[z]?k=this.defaultActions[z]:((S===null||typeof S>"u")&&(S=Ue()),k=Ee[z]&&Ee[z][S]),typeof k>"u"||!k.length||!k[0]){var ke="";_e=[];for(ge in Ee[z])this.terminals_[ge]&&ge>He&&_e.push("'"+this.terminals_[ge]+"'");g.showPosition?ke="Parse error on line "+(ye+1)+`:
|
|
2
|
+
`+g.showPosition()+`
|
|
3
|
+
Expecting `+_e.join(", ")+", got '"+(this.terminals_[S]||S)+"'":ke="Parse error on line "+(ye+1)+": Unexpected "+(S==$e?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(ke,{text:g.match,token:this.terminals_[S]||S,line:g.yylineno,loc:be,expected:_e})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+S);switch(k[0]){case 1:c.push(S),E.push(g.yytext),t.push(g.yylloc),c.push(k[1]),S=null,Pe=g.yyleng,a=g.yytext,ye=g.yylineno,be=g.yylloc;break;case 2:if(F=this.productions_[k[1]][1],J.$=E[E.length-F],J._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},We&&(J._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),Te=this.performAction.apply(J,[a,Pe,ye,G.yy,k[1],E,t].concat(Ke)),typeof Te<"u")return Te;F&&(c=c.slice(0,-1*F*2),E=E.slice(0,-1*F),t=t.slice(0,-1*F)),c.push(this.productions_[k[1]][0]),E.push(J.$),t.push(J._$),Ye=Ee[c[c.length-2]][c[c.length-1]],c.push(Ye);break;case 3:return!0}}return!0},"parse")},Qe=(function(){var P={EOF:1,parseError:f(function(n,c){if(this.yy.parser)this.yy.parser.parseError(n,c);else throw new Error(n)},"parseError"),setInput:f(function(i,n){return this.yy=n||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:f(function(i){var n=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===s.length?this.yylloc.first_column:0)+s[s.length-c.length].length-c[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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:f(function(i){this.unput(this.match.slice(i))},"less"),pastInput:f(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
5
|
+
`+n+"^"},"showPosition"),test_match:f(function(i,n){var c,s,E;if(this.options.backtrack_lexer&&(E={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&&(E.yylloc.range=this.yylloc.range.slice(0))),s=i[0].match(/(?:\r\n?|\n).*/g),s&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],c=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var t in E)this[t]=E[t];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,n,c,s;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),t=0;t<E.length;t++)if(c=this._input.match(this.rules[E[t]]),c&&(!n||c[0].length>n[0].length)){if(n=c,s=t,this.options.backtrack_lexer){if(i=this.test_match(c,E[t]),i!==!1)return i;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(i=this.test_match(n,E[s]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f(function(){var n=this.next();return n||this.lex()},"lex"),begin:f(function(n){this.conditionStack.push(n)},"begin"),popState:f(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:f(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:f(function(n){this.begin(n)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f(function(n,c,s,E){switch(s){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";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;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;case 60:return this.begin("style"),74;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 c.yytext=c.yytext.trim(),89;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 P})();Se.lexer=Qe;function Re(){this.yy={}}return f(Re,"Parser"),Re.prototype=Se,Se.Parser=Re,new Re})();Ae.parser=Ae;var ct=Ae,Z,ot=(Z=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=Xe,this.getAccTitle=Je,this.setAccDescription=Ze,this.getAccDescription=et,this.setDiagramTitle=tt,this.getDiagramTitle=st,this.getConfig=f(()=>Ne().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)}getDirection(){return this.direction}setDirection(l){this.direction=l}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(l,u){return this.requirements.has(l)||this.requirements.set(l,{name:l,type:u,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(l)}getRequirements(){return this.requirements}setNewReqId(l){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=l)}setNewReqText(l){this.latestRequirement!==void 0&&(this.latestRequirement.text=l)}setNewReqRisk(l){this.latestRequirement!==void 0&&(this.latestRequirement.risk=l)}setNewReqVerifyMethod(l){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=l)}addElement(l){return this.elements.has(l)||(this.elements.set(l,{name:l,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),qe.info("Added new element: ",l)),this.resetLatestElement(),this.elements.get(l)}getElements(){return this.elements}setNewElementType(l){this.latestElement!==void 0&&(this.latestElement.type=l)}setNewElementDocRef(l){this.latestElement!==void 0&&(this.latestElement.docRef=l)}addRelationship(l,u,h){this.relations.push({type:l,src:u,dst:h})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,it()}setCssStyle(l,u){for(const h of l){const r=this.requirements.get(h)??this.elements.get(h);if(!u||!r)return;for(const o of u)o.includes(",")?r.cssStyles.push(...o.split(",")):r.cssStyles.push(o)}}setClass(l,u){for(const h of l){const r=this.requirements.get(h)??this.elements.get(h);if(r)for(const o of u){r.classes.push(o);const m=this.classes.get(o)?.styles;m&&r.cssStyles.push(...m)}}}defineClass(l,u){for(const h of l){let r=this.classes.get(h);r===void 0&&(r={id:h,styles:[],textStyles:[]},this.classes.set(h,r)),u&&u.forEach(function(o){if(/color/.exec(o)){const m=o.replace("fill","bgFill");r.textStyles.push(m)}r.styles.push(o)}),this.requirements.forEach(o=>{o.classes.includes(h)&&o.cssStyles.push(...u.flatMap(m=>m.split(",")))}),this.elements.forEach(o=>{o.classes.includes(h)&&o.cssStyles.push(...u.flatMap(m=>m.split(",")))})}}getClasses(){return this.classes}getData(){const l=Ne(),u=[],h=[];for(const r of this.requirements.values()){const o=r;o.id=r.name,o.cssStyles=r.cssStyles,o.cssClasses=r.classes.join(" "),o.shape="requirementBox",o.look=l.look,u.push(o)}for(const r of this.elements.values()){const o=r;o.shape="requirementBox",o.look=l.look,o.id=r.name,o.cssStyles=r.cssStyles,o.cssClasses=r.classes.join(" "),u.push(o)}for(const r of this.relations){let o=0;const m=r.type===this.Relationships.CONTAINS,y={id:`${r.src}-${r.dst}-${o}`,start:this.requirements.get(r.src)?.name??this.elements.get(r.src)?.name,end:this.requirements.get(r.dst)?.name??this.elements.get(r.dst)?.name,label:`<<${r.type}>>`,classes:"relationshipLine",style:["fill:none",m?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:m?"normal":"dashed",arrowTypeStart:m?"requirement_contains":"",arrowTypeEnd:m?"":"requirement_arrow",look:l.look};h.push(y),o++}return{nodes:u,edges:h,other:{},config:l,direction:this.getDirection()}}},f(Z,"RequirementDB"),Z),ht=f(e=>`
|
|
7
|
+
|
|
8
|
+
marker {
|
|
9
|
+
fill: ${e.relationColor};
|
|
10
|
+
stroke: ${e.relationColor};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
marker.cross {
|
|
14
|
+
stroke: ${e.lineColor};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
svg {
|
|
18
|
+
font-family: ${e.fontFamily};
|
|
19
|
+
font-size: ${e.fontSize};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.reqBox {
|
|
23
|
+
fill: ${e.requirementBackground};
|
|
24
|
+
fill-opacity: 1.0;
|
|
25
|
+
stroke: ${e.requirementBorderColor};
|
|
26
|
+
stroke-width: ${e.requirementBorderSize};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.reqTitle, .reqLabel{
|
|
30
|
+
fill: ${e.requirementTextColor};
|
|
31
|
+
}
|
|
32
|
+
.reqLabelBox {
|
|
33
|
+
fill: ${e.relationLabelBackground};
|
|
34
|
+
fill-opacity: 1.0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.req-title-line {
|
|
38
|
+
stroke: ${e.requirementBorderColor};
|
|
39
|
+
stroke-width: ${e.requirementBorderSize};
|
|
40
|
+
}
|
|
41
|
+
.relationshipLine {
|
|
42
|
+
stroke: ${e.relationColor};
|
|
43
|
+
stroke-width: 1;
|
|
44
|
+
}
|
|
45
|
+
.relationshipLabel {
|
|
46
|
+
fill: ${e.relationLabelColor};
|
|
47
|
+
}
|
|
48
|
+
.divider {
|
|
49
|
+
stroke: ${e.nodeBorder};
|
|
50
|
+
stroke-width: 1;
|
|
51
|
+
}
|
|
52
|
+
.label {
|
|
53
|
+
font-family: ${e.fontFamily};
|
|
54
|
+
color: ${e.nodeTextColor||e.textColor};
|
|
55
|
+
}
|
|
56
|
+
.label text,span {
|
|
57
|
+
fill: ${e.nodeTextColor||e.textColor};
|
|
58
|
+
color: ${e.nodeTextColor||e.textColor};
|
|
59
|
+
}
|
|
60
|
+
.labelBkg {
|
|
61
|
+
background-color: ${e.edgeLabelBackground};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
`,"getStyles"),ut=ht,Be={};rt(Be,{draw:()=>ft});var ft=f(async function(e,l,u,h){qe.info("REF0:"),qe.info("Drawing requirement diagram (unified)",l);const{securityLevel:r,state:o,layout:m}=Ne(),y=h.db.getData(),_=Ge(l,r);y.type=h.type,y.layoutAlgorithm=nt(m),y.nodeSpacing=o?.nodeSpacing??50,y.rankSpacing=o?.rankSpacing??50,y.markers=["requirement_contains","requirement_arrow"],y.diagramId=l,await at(y,_);const b=8;lt.insertTitle(_,"requirementDiagramTitleText",o?.titleTopMargin??25,h.db.getDiagramTitle()),ze(_,b,"requirementDiagram",o?.useMaxWidth??!0)},"draw"),Rt={parser:ct,get db(){return new ot},renderer:Be,styles:ut};export{Rt as diagram};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{o as _t,p as xt,s as vt,g as bt,b as wt,a as St,_ as g,c as lt,y as Lt,U as Et,x as At,j as Tt}from"./mermaid.core-DY8Lk9ir.js";import{s as X}from"./index-Dr2pvJml.js";import{o as Mt}from"./ordinal-Cboi1Yqb.js";import"./init-Gi6I4Gst.js";function Nt(t){for(var e=t.length/6|0,i=new Array(e),a=0;a<e;)i[a]="#"+t.slice(a*6,++a*6);return i}const It=Nt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function ct(t,e){let i;if(e===void 0)for(const a of t)a!=null&&(i<a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i<h||i===void 0&&h>=h)&&(i=h)}return i}function pt(t,e){let i;if(e===void 0)for(const a of t)a!=null&&(i>a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i>h||i===void 0&&h>=h)&&(i=h)}return i}function nt(t,e){let i=0;if(e===void 0)for(let a of t)(a=+a)&&(i+=a);else{let a=-1;for(let h of t)(h=+e(h,++a,t))&&(i+=h)}return i}function Pt(t){return t.target.depth}function Ct(t){return t.depth}function Ot(t,e){return e-1-t.height}function mt(t,e){return t.sourceLinks.length?t.depth:e-1}function Dt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?pt(t.sourceLinks,Pt)-1:0}function q(t){return function(){return t}}function ut(t,e){return Q(t.source,e.source)||t.index-e.index}function ht(t,e){return Q(t.target,e.target)||t.index-e.index}function Q(t,e){return t.y0-e.y0}function it(t){return t.value}function $t(t){return t.index}function jt(t){return t.nodes}function zt(t){return t.links}function ft(t,e){const i=t.get(e);if(!i)throw new Error("missing: "+e);return i}function yt({nodes:t}){for(const e of t){let i=e.y0,a=i;for(const h of e.sourceLinks)h.y0=i+h.width/2,i+=h.width;for(const h of e.targetLinks)h.y1=a+h.width/2,a+=h.width}}function Bt(){let t=0,e=0,i=1,a=1,h=24,b=8,p,k=$t,s=mt,o,l,_=jt,x=zt,y=6;function v(){const n={nodes:_.apply(null,arguments),links:x.apply(null,arguments)};return M(n),T(n),N(n),C(n),S(n),yt(n),n}v.update=function(n){return yt(n),n},v.nodeId=function(n){return arguments.length?(k=typeof n=="function"?n:q(n),v):k},v.nodeAlign=function(n){return arguments.length?(s=typeof n=="function"?n:q(n),v):s},v.nodeSort=function(n){return arguments.length?(o=n,v):o},v.nodeWidth=function(n){return arguments.length?(h=+n,v):h},v.nodePadding=function(n){return arguments.length?(b=p=+n,v):b},v.nodes=function(n){return arguments.length?(_=typeof n=="function"?n:q(n),v):_},v.links=function(n){return arguments.length?(x=typeof n=="function"?n:q(n),v):x},v.linkSort=function(n){return arguments.length?(l=n,v):l},v.size=function(n){return arguments.length?(t=e=0,i=+n[0],a=+n[1],v):[i-t,a-e]},v.extent=function(n){return arguments.length?(t=+n[0][0],i=+n[1][0],e=+n[0][1],a=+n[1][1],v):[[t,e],[i,a]]},v.iterations=function(n){return arguments.length?(y=+n,v):y};function M({nodes:n,links:f}){for(const[c,r]of n.entries())r.index=c,r.sourceLinks=[],r.targetLinks=[];const u=new Map(n.map((c,r)=>[k(c,r,n),c]));for(const[c,r]of f.entries()){r.index=c;let{source:m,target:w}=r;typeof m!="object"&&(m=r.source=ft(u,m)),typeof w!="object"&&(w=r.target=ft(u,w)),m.sourceLinks.push(r),w.targetLinks.push(r)}if(l!=null)for(const{sourceLinks:c,targetLinks:r}of n)c.sort(l),r.sort(l)}function T({nodes:n}){for(const f of n)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function N({nodes:n}){const f=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const m of u){m.depth=r;for(const{target:w}of m.sourceLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function C({nodes:n}){const f=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const m of u){m.height=r;for(const{source:w}of m.targetLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function $({nodes:n}){const f=ct(n,r=>r.depth)+1,u=(i-t-h)/(f-1),c=new Array(f);for(const r of n){const m=Math.max(0,Math.min(f-1,Math.floor(s.call(null,r,f))));r.layer=m,r.x0=t+m*u,r.x1=r.x0+h,c[m]?c[m].push(r):c[m]=[r]}if(o)for(const r of c)r.sort(o);return c}function R(n){const f=pt(n,u=>(a-e-(u.length-1)*p)/nt(u,it));for(const u of n){let c=e;for(const r of u){r.y0=c,r.y1=c+r.value*f,c=r.y1+p;for(const m of r.sourceLinks)m.width=m.value*f}c=(a-c+p)/(u.length+1);for(let r=0;r<u.length;++r){const m=u[r];m.y0+=c*(r+1),m.y1+=c*(r+1)}A(u)}}function S(n){const f=$(n);p=Math.min(b,(a-e)/(ct(f,u=>u.length)-1)),R(f);for(let u=0;u<y;++u){const c=Math.pow(.99,u),r=Math.max(1-c,(u+1)/y);B(f,c,r),P(f,c,r)}}function P(n,f,u){for(let c=1,r=n.length;c<r;++c){const m=n[c];for(const w of m){let L=0,F=0;for(const{source:Y,value:et}of w.targetLinks){let H=et*(w.layer-Y.layer);L+=j(Y,w)*H,F+=H}if(!(F>0))continue;let G=(L/F-w.y0)*f;w.y0+=G,w.y1+=G,E(w)}o===void 0&&m.sort(Q),O(m,u)}}function B(n,f,u){for(let c=n.length,r=c-2;r>=0;--r){const m=n[r];for(const w of m){let L=0,F=0;for(const{target:Y,value:et}of w.sourceLinks){let H=et*(Y.layer-w.layer);L+=I(w,Y)*H,F+=H}if(!(F>0))continue;let G=(L/F-w.y0)*f;w.y0+=G,w.y1+=G,E(w)}o===void 0&&m.sort(Q),O(m,u)}}function O(n,f){const u=n.length>>1,c=n[u];d(n,c.y0-p,u-1,f),D(n,c.y1+p,u+1,f),d(n,a,n.length-1,f),D(n,e,0,f)}function D(n,f,u,c){for(;u<n.length;++u){const r=n[u],m=(f-r.y0)*c;m>1e-6&&(r.y0+=m,r.y1+=m),f=r.y1+p}}function d(n,f,u,c){for(;u>=0;--u){const r=n[u],m=(r.y1-f)*c;m>1e-6&&(r.y0-=m,r.y1-=m),f=r.y0-p}}function E({sourceLinks:n,targetLinks:f}){if(l===void 0){for(const{source:{sourceLinks:u}}of f)u.sort(ht);for(const{target:{targetLinks:u}}of n)u.sort(ut)}}function A(n){if(l===void 0)for(const{sourceLinks:f,targetLinks:u}of n)f.sort(ht),u.sort(ut)}function j(n,f){let u=n.y0-(n.sourceLinks.length-1)*p/2;for(const{target:c,width:r}of n.sourceLinks){if(c===f)break;u+=r+p}for(const{source:c,width:r}of f.targetLinks){if(c===n)break;u-=r}return u}function I(n,f){let u=f.y0-(f.targetLinks.length-1)*p/2;for(const{source:c,width:r}of f.targetLinks){if(c===n)break;u+=r+p}for(const{target:c,width:r}of n.sourceLinks){if(c===f)break;u-=r}return u}return v}var st=Math.PI,rt=2*st,V=1e-6,Rt=rt-V;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function kt(){return new ot}ot.prototype=kt.prototype={constructor:ot,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,i,a){this._+="Q"+ +t+","+ +e+","+(this._x1=+i)+","+(this._y1=+a)},bezierCurveTo:function(t,e,i,a,h,b){this._+="C"+ +t+","+ +e+","+ +i+","+ +a+","+(this._x1=+h)+","+(this._y1=+b)},arcTo:function(t,e,i,a,h){t=+t,e=+e,i=+i,a=+a,h=+h;var b=this._x1,p=this._y1,k=i-t,s=a-e,o=b-t,l=p-e,_=o*o+l*l;if(h<0)throw new Error("negative radius: "+h);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(_>V)if(!(Math.abs(l*k-s*o)>V)||!h)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var x=i-b,y=a-p,v=k*k+s*s,M=x*x+y*y,T=Math.sqrt(v),N=Math.sqrt(_),C=h*Math.tan((st-Math.acos((v+_-M)/(2*T*N)))/2),$=C/N,R=C/T;Math.abs($-1)>V&&(this._+="L"+(t+$*o)+","+(e+$*l)),this._+="A"+h+","+h+",0,0,"+ +(l*x>o*y)+","+(this._x1=t+R*k)+","+(this._y1=e+R*s)}},arc:function(t,e,i,a,h,b){t=+t,e=+e,i=+i,b=!!b;var p=i*Math.cos(a),k=i*Math.sin(a),s=t+p,o=e+k,l=1^b,_=b?a-h:h-a;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+s+","+o:(Math.abs(this._x1-s)>V||Math.abs(this._y1-o)>V)&&(this._+="L"+s+","+o),i&&(_<0&&(_=_%rt+rt),_>Rt?this._+="A"+i+","+i+",0,1,"+l+","+(t-p)+","+(e-k)+"A"+i+","+i+",0,1,"+l+","+(this._x1=s)+","+(this._y1=o):_>V&&(this._+="A"+i+","+i+",0,"+ +(_>=st)+","+l+","+(this._x1=t+i*Math.cos(h))+","+(this._y1=e+i*Math.sin(h))))},rect:function(t,e,i,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +i+"v"+ +a+"h"+-i+"Z"},toString:function(){return this._}};function dt(t){return function(){return t}}function Ft(t){return t[0]}function Vt(t){return t[1]}var Wt=Array.prototype.slice;function Ut(t){return t.source}function Gt(t){return t.target}function Yt(t){var e=Ut,i=Gt,a=Ft,h=Vt,b=null;function p(){var k,s=Wt.call(arguments),o=e.apply(this,s),l=i.apply(this,s);if(b||(b=k=kt()),t(b,+a.apply(this,(s[0]=o,s)),+h.apply(this,s),+a.apply(this,(s[0]=l,s)),+h.apply(this,s)),k)return b=null,k+""||null}return p.source=function(k){return arguments.length?(e=k,p):e},p.target=function(k){return arguments.length?(i=k,p):i},p.x=function(k){return arguments.length?(a=typeof k=="function"?k:dt(+k),p):a},p.y=function(k){return arguments.length?(h=typeof k=="function"?k:dt(+k),p):h},p.context=function(k){return arguments.length?(b=k??null,p):b},p}function Ht(t,e,i,a,h){t.moveTo(e,i),t.bezierCurveTo(e=(e+a)/2,i,e,h,a,h)}function Xt(){return Yt(Ht)}function qt(t){return[t.source.x1,t.y0]}function Qt(t){return[t.target.x0,t.y1]}function Kt(){return Xt().source(qt).target(Qt)}var at=(function(){var t=g(function(k,s,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=s);return o},"o"),e=[1,9],i=[1,10],a=[1,5,10,12],h={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:g(function(s,o,l,_,x,y,v){var M=y.length-1;switch(x){case 7:const T=_.findOrCreateNode(y[M-4].trim().replaceAll('""','"')),N=_.findOrCreateNode(y[M-2].trim().replaceAll('""','"')),C=parseFloat(y[M].trim());_.addLink(T,N,C);break;case 8:case 9:case 11:this.$=y[M];break;case 10:this.$=y[M-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:i},{1:[2,6],7:11,10:[1,12]},t(i,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:i},{15:18,16:7,17:8,18:e,20:i},{18:[1,19]},t(i,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:e,20:i},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:g(function(s,o){if(o.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=o,l}},"parseError"),parse:g(function(s){var o=this,l=[0],_=[],x=[null],y=[],v=this.table,M="",T=0,N=0,C=2,$=1,R=y.slice.call(arguments,1),S=Object.create(this.lexer),P={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(P.yy[B]=this.yy[B]);S.setInput(s,P.yy),P.yy.lexer=S,P.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var O=S.yylloc;y.push(O);var D=S.options&&S.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function d(L){l.length=l.length-2*L,x.length=x.length-L,y.length=y.length-L}g(d,"popStack");function E(){var L;return L=_.pop()||S.lex()||$,typeof L!="number"&&(L instanceof Array&&(_=L,L=_.pop()),L=o.symbols_[L]||L),L}g(E,"lex");for(var A,j,I,n,f={},u,c,r,m;;){if(j=l[l.length-1],this.defaultActions[j]?I=this.defaultActions[j]:((A===null||typeof A>"u")&&(A=E()),I=v[j]&&v[j][A]),typeof I>"u"||!I.length||!I[0]){var w="";m=[];for(u in v[j])this.terminals_[u]&&u>C&&m.push("'"+this.terminals_[u]+"'");S.showPosition?w="Parse error on line "+(T+1)+`:
|
|
2
|
+
`+S.showPosition()+`
|
|
3
|
+
Expecting `+m.join(", ")+", got '"+(this.terminals_[A]||A)+"'":w="Parse error on line "+(T+1)+": Unexpected "+(A==$?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(w,{text:S.match,token:this.terminals_[A]||A,line:S.yylineno,loc:O,expected:m})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+A);switch(I[0]){case 1:l.push(A),x.push(S.yytext),y.push(S.yylloc),l.push(I[1]),A=null,N=S.yyleng,M=S.yytext,T=S.yylineno,O=S.yylloc;break;case 2:if(c=this.productions_[I[1]][1],f.$=x[x.length-c],f._$={first_line:y[y.length-(c||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(c||1)].first_column,last_column:y[y.length-1].last_column},D&&(f._$.range=[y[y.length-(c||1)].range[0],y[y.length-1].range[1]]),n=this.performAction.apply(f,[M,N,T,P.yy,I[1],x,y].concat(R)),typeof n<"u")return n;c&&(l=l.slice(0,-1*c*2),x=x.slice(0,-1*c),y=y.slice(0,-1*c)),l.push(this.productions_[I[1]][0]),x.push(f.$),y.push(f._$),r=v[l[l.length-2]][l[l.length-1]],l.push(r);break;case 3:return!0}}return!0},"parse")},b=(function(){var k={EOF:1,parseError:g(function(o,l){if(this.yy.parser)this.yy.parser.parseError(o,l);else throw new Error(o)},"parseError"),setInput:g(function(s,o){return this.yy=o||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:g(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var o=s.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:g(function(s){var o=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var _=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var x=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===_.length?this.yylloc.first_column:0)+_[_.length-l.length].length-l[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(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:g(function(s){this.unput(this.match.slice(s))},"less"),pastInput:g(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var s=this.pastInput(),o=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
5
|
+
`+o+"^"},"showPosition"),test_match:g(function(s,o){var l,_,x;if(this.options.backtrack_lexer&&(x={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&&(x.yylloc.range=this.yylloc.range.slice(0))),_=s[0].match(/(?:\r\n?|\n).*/g),_&&(this.yylineno+=_.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:_?_[_.length-1].length-_[_.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],l=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var y in x)this[y]=x[y];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,o,l,_;this._more||(this.yytext="",this.match="");for(var x=this._currentRules(),y=0;y<x.length;y++)if(l=this._input.match(this.rules[x[y]]),l&&(!o||l[0].length>o[0].length)){if(o=l,_=y,this.options.backtrack_lexer){if(s=this.test_match(l,x[y]),s!==!1)return s;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(s=this.test_match(o,x[_]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:g(function(){var o=this.next();return o||this.lex()},"lex"),begin:g(function(o){this.conditionStack.push(o)},"begin"),popState:g(function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:g(function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},"topState"),pushState:g(function(o){this.begin(o)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:g(function(o,l,_,x){switch(_){case 0:return this.pushState("csv"),4;case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return k})();h.lexer=b;function p(){this.yy={}}return g(p,"Parser"),p.prototype=h,h.Parser=p,new p})();at.parser=at;var K=at,J=[],tt=[],Z=new Map,Zt=g(()=>{J=[],tt=[],Z=new Map,At()},"clear"),W,Jt=(W=class{constructor(e,i,a=0){this.source=e,this.target=i,this.value=a}},g(W,"SankeyLink"),W),te=g((t,e,i)=>{J.push(new Jt(t,e,i))},"addLink"),U,ee=(U=class{constructor(e){this.ID=e}},g(U,"SankeyNode"),U),ne=g(t=>{t=Tt.sanitizeText(t,lt());let e=Z.get(t);return e===void 0&&(e=new ee(t),Z.set(t,e),tt.push(e)),e},"findOrCreateNode"),ie=g(()=>tt,"getNodes"),se=g(()=>J,"getLinks"),re=g(()=>({nodes:tt.map(t=>({id:t.ID})),links:J.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),oe={nodesMap:Z,getConfig:g(()=>lt().sankey,"getConfig"),getNodes:ie,getLinks:se,getGraph:re,addLink:te,findOrCreateNode:ne,getAccTitle:St,setAccTitle:wt,getAccDescription:bt,setAccDescription:vt,getDiagramTitle:xt,setDiagramTitle:_t,clear:Zt},z,gt=(z=class{static next(e){return new z(e+ ++z.count)}constructor(e){this.id=e,this.href=`#${e}`}toString(){return"url("+this.href+")"}},g(z,"Uid"),z.count=0,z),ae={left:Ct,right:Ot,center:Dt,justify:mt},le=g(function(t,e,i,a){const{securityLevel:h,sankey:b}=lt(),p=Lt.sankey;let k;h==="sandbox"&&(k=X("#i"+e));const s=h==="sandbox"?X(k.nodes()[0].contentDocument.body):X("body"),o=h==="sandbox"?s.select(`[id="${e}"]`):X(`[id="${e}"]`),l=b?.width??p.width,_=b?.height??p.width,x=b?.useMaxWidth??p.useMaxWidth,y=b?.nodeAlignment??p.nodeAlignment,v=b?.prefix??p.prefix,M=b?.suffix??p.suffix,T=b?.showValues??p.showValues,N=a.db.getGraph(),C=ae[y];Bt().nodeId(d=>d.id).nodeWidth(10).nodePadding(10+(T?15:0)).nodeAlign(C).extent([[0,0],[l,_]])(N);const S=Mt(It);o.append("g").attr("class","nodes").selectAll(".node").data(N.nodes).join("g").attr("class","node").attr("id",d=>(d.uid=gt.next("node-")).id).attr("transform",function(d){return"translate("+d.x0+","+d.y0+")"}).attr("x",d=>d.x0).attr("y",d=>d.y0).append("rect").attr("height",d=>d.y1-d.y0).attr("width",d=>d.x1-d.x0).attr("fill",d=>S(d.id));const P=g(({id:d,value:E})=>T?`${d}
|
|
7
|
+
${v}${Math.round(E*100)/100}${M}`:d,"getText");o.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(N.nodes).join("text").attr("x",d=>d.x0<l/2?d.x1+6:d.x0-6).attr("y",d=>(d.y1+d.y0)/2).attr("dy",`${T?"0":"0.35"}em`).attr("text-anchor",d=>d.x0<l/2?"start":"end").text(P);const B=o.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(N.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),O=b?.linkColor??"gradient";if(O==="gradient"){const d=B.append("linearGradient").attr("id",E=>(E.uid=gt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",E=>E.source.x1).attr("x2",E=>E.target.x0);d.append("stop").attr("offset","0%").attr("stop-color",E=>S(E.source.id)),d.append("stop").attr("offset","100%").attr("stop-color",E=>S(E.target.id))}let D;switch(O){case"gradient":D=g(d=>d.uid,"coloring");break;case"source":D=g(d=>S(d.source.id),"coloring");break;case"target":D=g(d=>S(d.target.id),"coloring");break;default:D=O}B.append("path").attr("d",Kt()).attr("stroke",D).attr("stroke-width",d=>Math.max(1,d.width)),Et(void 0,o,0,x)},"draw"),ce={draw:le},ue=g(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
|
|
8
|
+
`).trim(),"prepareTextForParsing"),he=g(t=>`.label {
|
|
9
|
+
font-family: ${t.fontFamily};
|
|
10
|
+
}`,"getStyles"),fe=he,ye=K.parse.bind(K);K.parse=t=>ye(ue(t));var ke={styles:fe,parser:K,db:oe,renderer:ce};export{ke as diagram};
|