162 lines
59 KiB
JavaScript
162 lines
59 KiB
JavaScript
|
|
import{n as e,r as t}from"./chunk-AGHRB4JF-Fz9kp2Fp.js";import{$ as n,G as r,H as i,K as a,U as o,a as s,d as c,it as l,s as u,v as d,w as f,x as p,y as ee}from"./chunk-CSCIHK7Q-VDPd5eNJ.js";import{t as m}from"./channel-Dz5mnghj.js";import{Q as h}from"./src-BrOGWJpF.js";import{c as g,g as _}from"./chunk-5ZQYHXKU-D-OgLpMs.js";import{n as te,t as ne}from"./chunk-XPW4576I-SsWL9gHk.js";import"./chunk-BSJP7CBP-BkJdmh17.js";import"./chunk-L5ZTLDWV-CzNJ_8is.js";import"./chunk-NZK2D7GU-Cte2JwiA.js";import"./chunk-O5CBEL6O-Bu7jDUJy.js";import{o as re}from"./chunk-3OPIFGDE-BBTvqaNI.js";import"./chunk-KSCS5N6A-BuXf0YOu.js";import{r as v,t as y}from"./chunk-LZXEDZCA-n9zJSIw5.js";import{t as b}from"./chunk-FMBD7UC4-CKA5OKZ8.js";import{t as x}from"./chunk-ND2GUHAM-zGgwlxna.js";import{t as S}from"./chunk-55IACEB6-BXXbpqd4.js";import{t as C}from"./chunk-2J33WTMH-CruGLWY_.js";var w=`flowchart-`,T=class{constructor(){this.vertexCounter=0,this.config=p(),this.diagramId=``,this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=o,this.setAccDescription=i,this.setDiagramTitle=a,this.getAccTitle=ee,this.getAccDescription=d,this.getDiagramTitle=f,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen(`gen-2`)}static{e(this,`FlowDB`)}sanitizeText(e){return u.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return this.diagramId?`${this.diagramId}-${t.domId}`:t.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,n,r,i,a,o,s={},c){if(!e||e.trim().length===0)return;let l;if(c!==void 0){let e;e=c.includes(`
|
||
|
|
`)?c+`
|
||
|
|
`:`{
|
||
|
|
`+c+`
|
||
|
|
}`,l=te(e,{schema:ne})}let u=this.edges.find(t=>t.id===e);if(u){let e=l;e?.animate!==void 0&&(u.animate=e.animate),e?.animation!==void 0&&(u.animation=e.animation),e?.curve!==void 0&&(u.interpolate=e.curve);return}let d,f=this.vertices.get(e);if(f===void 0&&(n===void 0&&r===void 0&&i!=null&&t.warn(`Style applied to unknown node "${e}". This may indicate a typo. The node will be created automatically.`),f={id:e,labelType:`text`,domId:w+e+`-`+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,f)),this.vertexCounter++,n===void 0?f.text===void 0&&(f.text=e):(this.config=p(),d=this.sanitizeText(n.text.trim()),f.labelType=n.type,d.startsWith(`"`)&&d.endsWith(`"`)&&(d=d.substring(1,d.length-1)),f.text=d),r!==void 0&&(f.type=r),i?.forEach(e=>{f.styles.push(e)}),a?.forEach(e=>{f.classes.push(e)}),o!==void 0&&(f.dir=o),f.props===void 0?f.props=s:s!==void 0&&Object.assign(f.props,s),l!==void 0){if(l.shape){if(l.shape!==l.shape.toLowerCase()||l.shape.includes(`_`))throw Error(`No such shape: ${l.shape}. Shape names should be lowercase.`);if(!re(l.shape))throw Error(`No such shape: ${l.shape}.`);f.type=l?.shape}l?.label&&(f.text=l?.label,f.labelType=this.sanitizeNodeLabelType(l?.labelType)),l?.icon&&(f.icon=l?.icon,!l.label?.trim()&&f.text===e&&(f.text=``)),l?.form&&(f.form=l?.form),l?.pos&&(f.pos=l?.pos),l?.img&&(f.img=l?.img,!l.label?.trim()&&f.text===e&&(f.text=``)),l?.constraint&&(f.constraint=l.constraint),l.w&&(f.assetWidth=Number(l.w)),l.h&&(f.assetHeight=Number(l.h))}}addSingleLink(e,n,r,i){let a={start:e,end:n,type:void 0,text:``,labelType:`text`,classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};t.info(`abc78 Got edge...`,a);let o=r.text;if(o!==void 0&&(a.text=this.sanitizeText(o.text.trim()),a.text.startsWith(`"`)&&a.text.endsWith(`"`)&&(a.text=a.text.substring(1,a.text.length-1)),a.labelType=this.sanitizeNodeLabelType(o.type)),r!==void 0&&(a.type=r.type,a.stroke=r.stroke,a.length=r.length>10?10:r.length),i&&!this.edges.some(e=>e.id===i))a.id=i,a.isUserDefinedId=!0;else{let e=this.edges.filter(e=>e.start===a.start&&e.end===a.end);e.length===0?a.id=g(a.start,a.end,{counter:0,prefix:`L`}):a.id=g(a.start,a.end,{counter:e.length+1,prefix:`L`})}if(this.edges.length<(this.config.maxEdges??500))t.info(`Pushing edge...`),this.edges.push(a);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
|
||
|
|
|
||
|
|
Initialize mermaid with maxEdges set to a higher number to allow more edges.
|
||
|
|
You cannot set this config via configuration inside the diagram as it is a secure config.
|
||
|
|
You have to call mermaid.initialize.`)}isLinkData(e){return typeof e==`object`&&!!e&&`id`in e&&typeof e.id==`string`}addLink(e,n,r){let i=this.isLinkData(r)?r.id.replace(`@`,``):void 0;t.info(`addLink`,e,n,i);for(let t of e)for(let a of n){let o=t===e[e.length-1],s=a===n[0];o&&s?this.addSingleLink(t,a,r,i):this.addSingleLink(t,a,r,void 0)}}updateLinkInterpolate(e,t){e.forEach(e=>{e==="default"?this.edges.defaultInterpolate=t:this.edges[e].interpolate=t})}updateLink(e,t){e.forEach(e=>{if(typeof e==`number`&&e>=this.edges.length)throw Error(`The index ${e} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);e==="default"?this.edges.defaultStyle=t:(this.edges[e].style=t,(this.edges[e]?.style?.length??0)>0&&!this.edges[e]?.style?.some(e=>e?.startsWith(`fill`))&&this.edges[e]?.style?.push(`fill:none`))})}addClass(e,t){let n=t.join().replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);e.split(`,`).forEach(e=>{let t=this.classes.get(e);t===void 0&&(t={id:e,styles:[],textStyles:[]},this.classes.set(e,t)),n?.forEach(e=>{if(/color/.exec(e)){let n=e.replace(`fill`,`bgFill`);t.textStyles.push(n)}t.styles.push(e)})})}setDirection(e){this.direction=e.trim(),/.*</.exec(this.direction)&&(this.direction=`RL`),/.*\^/.exec(this.direction)&&(this.direction=`BT`),/.*>/.exec(this.direction)&&(this.direction=`LR`),/.*v/.exec(this.direction)&&(this.direction=`TB`),this.direction===`TD`&&(this.direction=`TB`)}setClass(e,t){for(let n of e.split(`,`)){let e=this.vertices.get(n);e&&e.classes.push(t);let r=this.edges.find(e=>e.id===n);r&&r.classes.push(t);let i=this.subGraphLookup.get(n);i&&i.classes.push(t)}}setTooltip(e,t){if(t!==void 0){t=this.sanitizeText(t);for(let n of e.split(`,`))this.tooltips.set(this.version===`gen-1`?this.lookUpDomId(n):n,t)}}setClickFun(e,t,n){if(p().securityLevel!==`loose`||t===void 0)return;let r=[];if(typeof n==`string`){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e<r.length;e++){let t=r[e].trim();t.startsWith(`"`)&&t.endsWith(`"`)&&(t=t.substr(1,t.length-2)),r[e]=t}}r.length===0&&r.push(e);let i=this.vertices.get(e);i&&(i.haveCallback=!0,this.funs.push(()=>{let n=this.lookUpDomId(e),i=document.querySelector(`[id="${n}"]`);i!==null&&i.addEventListener(`click`,()=>{_.runFunc(t,...r)},!1)}))}setLink(e,t,n){e.split(`,`).forEach(e=>{let r=this.vertices.get(e);r!==void 0&&(r.link=_.formatUrl(t,this.config),r.linkTarget=n)}),this.setClass(e,`clickable`)}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,t,n){e.split(`,`).forEach(e=>{this.setClickFun(e,t,n)}),this.setClass(e,`clickable`)}bindFunctions(e){this.funs.forEach(t=>{t(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(e){let t=x();h(e).select(`svg`).selectAll(`g.node`).on(`mouseover`,e=>{let r=h(e.currentTarget),i=r.attr(`title`);if(i===null)return;let a=e.currentTarget?.getBoundingClientRect();t.transition().duration(200).style(`opacity`,`.9`),t.text(r.attr(`title`)).style(`left`,window.scrollX+a.left+(a.right-a.left)/2+`px`).style(`top`,window.scrollY+a.bottom+`px`),t.html(n.sanitize(i)),r.classed(`hover`,!0)}).on(`mouseout`,e=>{t.transition().duration(500).style(`opacity`,0),h(e.currentTarget).classed(`hover`,!1)})}clear(e=`gen-2`){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId=``,this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=p(),s()}setGen(e){this.version=e||`gen-2`}defaultStyle(){return`fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;`}addSubGraph(n,r,i){let a=n.text.trim(),o=i.text;n===i&&/\s/.exec(i.text)&&(a=void 0);let s=e(e=>{let t={boolean:{},number:{},string:{}},n=[],r;return{nodeList:e.filter(function(e){let i=typeof e;return e.stmt&&e.stmt===`dir`?(r=e.value,!1):e.trim()===``?!1:i in t?t[i
|
||
|
|
`+m.showPosition()+`
|
||
|
|
Expecting `+D.join(`, `)+`, got '`+(this.terminals_[v]||v)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(v==p?`end of input`:`'`+(this.terminals_[v]||v)+`'`),this.parseError(O,{text:m.match,token:this.terminals_[v]||v,line:m.yylineno,loc:_,expected:D})}if(x[0]instanceof Array&&x.length>1)throw Error(`Parse Error: multiple actions possible at state: `+b+`, token: `+v);switch(x[0]){case 1:r.push(v),a.push(m.yytext),o.push(m.yylloc),r.push(x[1]),v=null,y?(v=y,y=null):(u=m.yyleng,c=m.yytext,l=m.yylineno,_=m.yylloc,d>0&&d--);break;case 2:if(T=this.productions_[x[1]][1],C.$=a[a.length-T],C._$={first_line:o[o.length-(T||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(T||1)].first_column,last_column:o[o.length-1].last_column},te&&(C._$.range=[o[o.length-(T||1)].range[0],o[o.length-1].range[1]]),S=this.performAction.apply(C,[c,u,l,h.yy,x[1],a,o].concat(ee)),S!==void 0)return S;T&&(r=r.slice(0,-1*T*2),a=a.slice(0,-1*T),o=o.slice(0,-1*T)),r.push(this.productions_[x[1]][0]),a.push(C.$),o.push(C._$),E=s[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0},`parse`)};rt.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
|
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
||
|
|
`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e===!1?!1:e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
||
|
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:e(function(e,t,n,r){switch(n){case 0:return this.begin(`acc_title`),34;case 1:return this.popState(),`acc_title_value`;case 2:return this.begin(`acc_descr`),36;case 3:return this.popState(),`acc_descr_value`;case 4:this.begin(`acc_descr_multiline`);break;case 5:this.popState();break;case 6:return`acc_descr_multiline_value`;case 7:return this.pushState(`shapeData`),t.yytext=``,40;case 8:return this.pushState(`shapeDataStr`),40;case 9:return this.popState(),40;case 10:return t.yytext=t.yytext.replace(/\n\s*/g,`<br/>`),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin(`callbackname`);break;case 14:this.popState();break;case 15:this.popState(),this.begin(`callbackargs`);break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return`MD_STR`;case 20:this.popState();break;case 21:this.begin(`md_string`);break;case 22:return`STR`;case 23:this.popState();break;case 24:this.pushState(`string`);break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin(`click`);break;case 33:this.popState();break;case 34:return 88;case 35:return e.lex.firstGraph()&&this.begin(`dir`),12;case 36:return e.lex.firstGraph()&&this.begin(`dir`),12;case 37:return e.lex.firstGraph()&&this.begin(`dir`),12;case 38:return 27;case 39:return 32;case 40:return 98;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return this.popState(),13;case 45:return this.popState(),14;case 46:return this.popState(),14;case 47:return this.popState(),14;case 48:return this.popState(),14;case 49:return this.popState(),14;case 50:return this.popState(),14;case 51:return this.popState(),14;case 52:return this.popState(),14;case 53:return this.popState(),14;case 54:return this.popState(),14;case 55:return 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 125;case 60:return 78;case 61:return 105;case 62:return 111;case 63:return 46;case 64:return 60;case 65:return 44;case 66:return 8;case 67:return 106;case 68:return 115;case 69:return this.popState(),77;case 70:return this.pushState(`edgeText`),75;case 71:return 119;case 72:return this.popState(),77;case 73:return this.pushState(`thickEdgeText`),75;case 74:return 119;case 75:return this.popState(),77;case 76:return this.pushState(`dottedEdgeText`),75;case 77:return 119;case 78:return 77;case 79:return this.popState(),53;case 80:return`TEXT`;case 81:return this.pushState(`ellipseText`),52;case 82:return this.popState(),55;case 83:return this.pushState(`text`),54;case 84:return this.popState(),57;case 85:return this.pushState(`text`),56;case 86:return 58;case 87:return this.pushState(`text`),67;case 88:return this.popState(),64;case 89:return this.pushState(`text`),63;case 90:return this.popState(),49;case 91:return this.pushState(`text`),48;case 92:return this.popState(),69;case 93:return this.popState(),71;case 94:return 117;case 95:return this.pushState(`trapText`),68;case 96:return this.pushState(`trapText`),70;case 97:return 118;case 98:return 67;case 99:return 90;case 100:return`SEP`;case 101:return 89;case 102:return 115;case 103:return 111;case 104:return 44;case 105:return 109;case 106:return 114;case 107:return 116;case 108:return this.popSt
|
||
|
|
`);return O.parse(t)};var ae=ie,oe=e((e,t)=>{let n=m;return l(n(e,`r`),n(e,`g`),n(e,`b`),t)},`fade`),k={parser:ae,get db(){return new T},renderer:E,styles:e(e=>`.label {
|
||
|
|
font-family: ${e.fontFamily};
|
||
|
|
color: ${e.nodeTextColor||e.textColor};
|
||
|
|
}
|
||
|
|
.cluster-label text {
|
||
|
|
fill: ${e.titleColor};
|
||
|
|
}
|
||
|
|
.cluster-label span {
|
||
|
|
color: ${e.titleColor};
|
||
|
|
}
|
||
|
|
.cluster-label span p {
|
||
|
|
background-color: transparent;
|
||
|
|
}
|
||
|
|
|
||
|
|
.label text,span {
|
||
|
|
fill: ${e.nodeTextColor||e.textColor};
|
||
|
|
color: ${e.nodeTextColor||e.textColor};
|
||
|
|
}
|
||
|
|
|
||
|
|
.node rect,
|
||
|
|
.node circle,
|
||
|
|
.node ellipse,
|
||
|
|
.node polygon,
|
||
|
|
.node path {
|
||
|
|
fill: ${e.mainBkg};
|
||
|
|
stroke: ${e.nodeBorder};
|
||
|
|
stroke-width: ${e.strokeWidth??1}px;
|
||
|
|
}
|
||
|
|
.rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {
|
||
|
|
text-anchor: middle;
|
||
|
|
}
|
||
|
|
// .flowchart-label .text-outer-tspan {
|
||
|
|
// text-anchor: middle;
|
||
|
|
// }
|
||
|
|
// .flowchart-label .text-inner-tspan {
|
||
|
|
// text-anchor: start;
|
||
|
|
// }
|
||
|
|
|
||
|
|
.node .katex path {
|
||
|
|
fill: #000;
|
||
|
|
stroke: #000;
|
||
|
|
stroke-width: 1px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.rough-node .label,.node .label, .image-shape .label, .icon-shape .label {
|
||
|
|
text-align: center;
|
||
|
|
}
|
||
|
|
.node.clickable {
|
||
|
|
cursor: pointer;
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
.root .anchor path {
|
||
|
|
fill: ${e.lineColor} !important;
|
||
|
|
stroke-width: 0;
|
||
|
|
stroke: ${e.lineColor};
|
||
|
|
}
|
||
|
|
|
||
|
|
.arrowheadPath {
|
||
|
|
fill: ${e.arrowheadColor};
|
||
|
|
}
|
||
|
|
|
||
|
|
.edgePath .path {
|
||
|
|
stroke: ${e.lineColor};
|
||
|
|
stroke-width: ${e.strokeWidth??2}px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.flowchart-link {
|
||
|
|
stroke: ${e.lineColor};
|
||
|
|
fill: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
.edgeLabel {
|
||
|
|
background-color: ${e.edgeLabelBackground};
|
||
|
|
p {
|
||
|
|
background-color: ${e.edgeLabelBackground};
|
||
|
|
}
|
||
|
|
rect {
|
||
|
|
opacity: 0.5;
|
||
|
|
background-color: ${e.edgeLabelBackground};
|
||
|
|
fill: ${e.edgeLabelBackground};
|
||
|
|
}
|
||
|
|
text-align: center;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* For html labels only */
|
||
|
|
.labelBkg {
|
||
|
|
background-color: ${oe(e.edgeLabelBackground,.5)};
|
||
|
|
// background-color:
|
||
|
|
}
|
||
|
|
|
||
|
|
.cluster rect {
|
||
|
|
fill: ${e.clusterBkg};
|
||
|
|
stroke: ${e.clusterBorder};
|
||
|
|
stroke-width: 1px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.cluster text {
|
||
|
|
fill: ${e.titleColor};
|
||
|
|
}
|
||
|
|
|
||
|
|
.cluster span {
|
||
|
|
color: ${e.titleColor};
|
||
|
|
}
|
||
|
|
/* .cluster div {
|
||
|
|
color: ${e.titleColor};
|
||
|
|
} */
|
||
|
|
|
||
|
|
div.mermaidTooltip {
|
||
|
|
position: absolute;
|
||
|
|
text-align: center;
|
||
|
|
max-width: 200px;
|
||
|
|
padding: 2px;
|
||
|
|
font-family: ${e.fontFamily};
|
||
|
|
font-size: 12px;
|
||
|
|
background: ${e.tertiaryColor};
|
||
|
|
border: 1px solid ${e.border2};
|
||
|
|
border-radius: 2px;
|
||
|
|
pointer-events: none;
|
||
|
|
z-index: 100;
|
||
|
|
}
|
||
|
|
|
||
|
|
.flowchartTitleText {
|
||
|
|
text-anchor: middle;
|
||
|
|
font-size: 18px;
|
||
|
|
fill: ${e.textColor};
|
||
|
|
}
|
||
|
|
|
||
|
|
rect.text {
|
||
|
|
fill: none;
|
||
|
|
stroke-width: 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
.icon-shape, .image-shape {
|
||
|
|
background-color: ${e.edgeLabelBackground};
|
||
|
|
p {
|
||
|
|
background-color: ${e.edgeLabelBackground};
|
||
|
|
padding: 2px;
|
||
|
|
}
|
||
|
|
.label rect {
|
||
|
|
opacity: 0.5;
|
||
|
|
background-color: ${e.edgeLabelBackground};
|
||
|
|
fill: ${e.edgeLabelBackground};
|
||
|
|
}
|
||
|
|
text-align: center;
|
||
|
|
}
|
||
|
|
${b()}
|
||
|
|
`,`getStyles`),init:e(e=>{e.flowchart||={},e.layout&&r({layout:e.layout}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,r({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},`init`)};export{k as diagram};
|