| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- import{g as re}from"./chunk-55IACEB6-CH1sPvzl.js";import{s as ae}from"./chunk-2J33WTMH-DTqwDsyF.js";import{aa as l,eV as O,dC as oe,fQ as ce,dm as le,cK as F,dn as $,f$ as V,dL as he,ek as de,eN as ge,cz as ue}from"./builder-DygomDiV.js";import{v as pe}from"./v4-Dnyct6Ft.js";var X=(function(){var e=l(function(x,n,i,a){for(i=i||{},a=x.length;a--;i[x[a]]=n);return i},"o"),r=[1,4],u=[1,13],c=[1,12],t=[1,15],h=[1,16],f=[1,20],m=[1,19],E=[6,7,8],v=[1,26],C=[1,24],I=[1,25],d=[6,7,11],w=[1,6,13,15,16,19,22],Y=[1,33],K=[1,34],R=[1,6,7,11,13,15,16,19,22],G={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(n,i,a,o,p,s,A){var g=s.length-1;switch(p){case 6:case 7:return o;case 8:o.getLogger().trace("Stop NL ");break;case 9:o.getLogger().trace("Stop EOF ");break;case 11:o.getLogger().trace("Stop NL2 ");break;case 12:o.getLogger().trace("Stop EOF2 ");break;case 15:o.getLogger().info("Node: ",s[g].id),o.addNode(s[g-1].length,s[g].id,s[g].descr,s[g].type);break;case 16:o.getLogger().trace("Icon: ",s[g]),o.decorateNode({icon:s[g]});break;case 17:case 21:o.decorateNode({class:s[g]});break;case 18:o.getLogger().trace("SPACELIST");break;case 19:o.getLogger().trace("Node: ",s[g].id),o.addNode(0,s[g].id,s[g].descr,s[g].type);break;case 20:o.decorateNode({icon:s[g]});break;case 25:o.getLogger().trace("node found ..",s[g-2]),this.$={id:s[g-1],descr:s[g-1],type:o.getType(s[g-2],s[g])};break;case 26:this.$={id:s[g],descr:s[g],type:o.nodeType.DEFAULT};break;case 27:o.getLogger().trace("node found ..",s[g-3]),this.$={id:s[g-3],descr:s[g-1],type:o.getType(s[g-2],s[g])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:r},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:r},{6:u,7:[1,10],9:9,12:11,13:c,14:14,15:t,16:h,17:17,18:18,19:f,22:m},e(E,[2,3]),{1:[2,2]},e(E,[2,4]),e(E,[2,5]),{1:[2,6],6:u,12:21,13:c,14:14,15:t,16:h,17:17,18:18,19:f,22:m},{6:u,9:22,12:11,13:c,14:14,15:t,16:h,17:17,18:18,19:f,22:m},{6:v,7:C,10:23,11:I},e(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:f,22:m}),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,23]),e(d,[2,24]),e(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:v,7:C,10:32,11:I},{1:[2,7],6:u,12:21,13:c,14:14,15:t,16:h,17:17,18:18,19:f,22:m},e(w,[2,14],{7:Y,11:K}),e(R,[2,8]),e(R,[2,9]),e(R,[2,10]),e(d,[2,15]),e(d,[2,16]),e(d,[2,17]),{20:[1,35]},{21:[1,36]},e(w,[2,13],{7:Y,11:K}),e(R,[2,11]),e(R,[2,12]),{21:[1,37]},e(d,[2,25]),e(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:l(function(n,i){if(i.recoverable)this.trace(n);else{var a=new Error(n);throw a.hash=i,a}},"parseError"),parse:l(function(n){var i=this,a=[0],o=[],p=[null],s=[],A=this.table,g="",P=0,Q=0,te=2,q=1,ie=s.slice.call(arguments,1),y=Object.create(this.lexer),D={yy:{}};for(var j in this.yy)Object.prototype.hasOwnProperty.call(this.yy,j)&&(D.yy[j]=this.yy[j]);y.setInput(n,D.yy),D.yy.lexer=y,D.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var H=y.yylloc;s.push(H);var ne=y.options&&y.options.ranges;typeof D.yy.parseError=="function"?this.parseError=D.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function se(k){a.length=a.length-2*k,p.length=p.length-k,s.length=s.length-k}l(se,"popStack");function J(){var k;return k=o.pop()||y.lex()||q,typeof k!="number"&&(k instanceof Array&&(o=k,k=o.pop()),k=i.symbols_[k]||k),k}l(J,"lex");for(var _,L,b,z,T={},M,S,Z,U;;){if(L=a[a.length-1],this.defaultActions[L]?b=this.defaultActions[L]:((_===null||typeof _>"u")&&(_=J()),b=A[L]&&A[L][_]),typeof b>"u"||!b.length||!b[0]){var W="";U=[];for(M in A[L])this.terminals_[M]&&M>te&&U.push("'"+this.terminals_[M]+"'");y.showPosition?W="Parse error on line "+(P+1)+`:
- `+y.showPosition()+`
- Expecting `+U.join(", ")+", got '"+(this.terminals_[_]||_)+"'":W="Parse error on line "+(P+1)+": Unexpected "+(_==q?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(W,{text:y.match,token:this.terminals_[_]||_,line:y.yylineno,loc:H,expected:U})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+_);switch(b[0]){case 1:a.push(_),p.push(y.yytext),s.push(y.yylloc),a.push(b[1]),_=null,Q=y.yyleng,g=y.yytext,P=y.yylineno,H=y.yylloc;break;case 2:if(S=this.productions_[b[1]][1],T.$=p[p.length-S],T._$={first_line:s[s.length-(S||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(S||1)].first_column,last_column:s[s.length-1].last_column},ne&&(T._$.range=[s[s.length-(S||1)].range[0],s[s.length-1].range[1]]),z=this.performAction.apply(T,[g,Q,P,D.yy,b[1],p,s].concat(ie)),typeof z<"u")return z;S&&(a=a.slice(0,-1*S*2),p=p.slice(0,-1*S),s=s.slice(0,-1*S)),a.push(this.productions_[b[1]][0]),p.push(T.$),s.push(T._$),Z=A[a[a.length-2]][a[a.length-1]],a.push(Z);break;case 3:return!0}}return!0},"parse")},ee=(function(){var x={EOF:1,parseError:l(function(i,a){if(this.yy.parser)this.yy.parser.parseError(i,a);else throw new Error(i)},"parseError"),setInput:l(function(n,i){return this.yy=i||this.yy||{},this._input=n,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 n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var i=n.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),n},"input"),unput:l(function(n){var i=n.length,a=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var o=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),a.length-1&&(this.yylineno-=a.length-1);var p=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:a?(a.length===o.length?this.yylloc.first_column:0)+o[o.length-a.length].length-a[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[p[0],p[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).
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(n){this.unput(this.match.slice(n))},"less"),pastInput:l(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var n=this.pastInput(),i=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
- `+i+"^"},"showPosition"),test_match:l(function(n,i){var a,o,p;if(this.options.backtrack_lexer&&(p={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&&(p.yylloc.range=this.yylloc.range.slice(0))),o=n[0].match(/(?:\r\n?|\n).*/g),o&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-o[o.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,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(n[0].length),this.matched+=n[0],a=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var s in p)this[s]=p[s];return!1}return!1},"test_match"),next:l(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,i,a,o;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),s=0;s<p.length;s++)if(a=this._input.match(this.rules[p[s]]),a&&(!i||a[0].length>i[0].length)){if(i=a,o=s,this.options.backtrack_lexer){if(n=this.test_match(a,p[s]),n!==!1)return n;if(this._backtrack){i=!1;continue}else return!1}else if(!this.options.flex)break}return i?(n=this.test_match(i,p[o]),n!==!1?n:!1):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: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,a,o,p){switch(o){case 0:return i.getLogger().trace("Found comment",a.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:",a.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 ...",a.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:",a.yytext),20;case 36:return i.getLogger().trace("Long description:",a.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})();G.lexer=ee;function B(){this.yy={}}return l(B,"Parser"),B.prototype=G,G.Parser=B,new B})();X.parser=X;var fe=X,me=12,N={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},ye=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=N,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{l(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let r=this.nodes.length-1;r>=0;r--)if(this.nodes[r].level<e)return this.nodes[r];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,r,u,c){O.info("addNode",e,r,u,c);let t=!1;this.nodes.length===0?(this.baseLevel=e,e=0,t=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,t=!1);const h=$();let f=h.mindmap?.padding??F.mindmap.padding;switch(c){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:f*=2;break}const m={id:this.count++,nodeId:V(r,h),level:e,descr:V(u,h),type:c,children:[],width:h.mindmap?.maxNodeWidth??F.mindmap.maxNodeWidth,padding:f,isRoot:t},E=this.getParent(e);if(E)E.children.push(m),this.nodes.push(m);else if(t)this.nodes.push(m);else throw new Error(`There can be only one root. No parent could be found for ("${m.descr}")`)}getType(e,r){switch(O.debug("In get type",e,r),e){case"[":return this.nodeType.RECT;case"(":return r===")"?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,r){this.elements[e]=r}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;const r=$(),u=this.nodes[this.nodes.length-1];e.icon&&(u.icon=V(e.icon,r)),e.class&&(u.class=V(e.class,r))}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,r){if(e.level===0?e.section=void 0:e.section=r,e.children)for(const[u,c]of e.children.entries()){const t=e.level===0?u%(me-1):r;this.assignSections(c,t)}}flattenNodes(e,r){const u=$(),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 t=c.join(" "),h=l(m=>{const v=(u.theme?.toLowerCase()??"").includes("redux");switch(m){case N.CIRCLE:return"mindmapCircle";case N.RECT:return"rect";case N.ROUNDED_RECT:return"rounded";case N.CLOUD:return"cloud";case N.BANG:return"bang";case N.HEXAGON:return"hexagon";case N.DEFAULT:return v?"rounded":"defaultMindmapNode";case N.NO_BORDER:default:return"rect"}},"getShapeFromType"),f={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:h(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:t,cssStyles:[],look:u.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(r.push(f),e.children)for(const m of e.children)this.flattenNodes(m,r)}generateEdges(e,r){if(!e.children)return;const u=$();for(const c of e.children){let t="edge";c.section!==void 0&&(t+=` section-edge-${c.section}`);const h=e.level+1;t+=` edge-depth-${h}`;const f={id:`edge_${e.id}_${c.id}`,start:e.id.toString(),end:c.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:u.look,classes:t,depth:e.level,section:c.section};r.push(f),this.generateEdges(c,r)}}getData(){const e=this.getMindmap(),r=$(),c=he().layout!==void 0,t=r;if(c||(t.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:t};O.debug("getData: mindmapRoot",e,r),this.assignSections(e);const h=[],f=[];this.flattenNodes(e,h),this.generateEdges(e,f),O.debug(`getData: processed ${h.length} nodes and ${f.length} edges`);const m=new Map;for(const E of h)m.set(E.id,{shape:E.shape,width:E.width,height:E.height,padding:E.padding});return{nodes:h,edges:f,config:t,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(m),type:"mindmap",diagramId:"mindmap-"+pe()}}getLogger(){return O}},Ee=l(async(e,r,u,c)=>{O.debug(`Rendering mindmap diagram
- `+e);const t=c.db,h=t.getData(),f=re(r,h.config.securityLevel);if(h.type=c.type,h.layoutAlgorithm=oe(h.config.layout,{fallback:"cose-bilkent"}),h.diagramId=r,!t.getMindmap())return;h.nodes.forEach(d=>{d.shape==="rounded"?(d.radius=15,d.taper=15,d.stroke="none",d.width=0,d.padding=15):d.shape==="circle"?d.padding=10:d.shape==="rect"?(d.width=0,d.padding=10):d.shape==="hexagon"&&(d.width=0,d.height=0)}),await ce(h,f);const{themeVariables:E}=le(),{useGradient:v,gradientStart:C,gradientStop:I}=E;if(v&&C&&I){const d=f.attr("id"),w=f.append("defs").append("linearGradient").attr("id",`${d}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");w.append("stop").attr("offset","0%").attr("stop-color",C).attr("stop-opacity",1),w.append("stop").attr("offset","100%").attr("stop-color",I).attr("stop-opacity",1)}ae(f,h.config.mindmap?.padding??F.mindmap.padding,"mindmapDiagram",h.config.mindmap?.useMaxWidth??F.mindmap.useMaxWidth)},"draw"),_e={draw:Ee},ke=l(e=>{const{theme:r,look:u}=e;let c="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],de(e["lineColor"+t])?e["lineColor"+t]=ge(e["lineColor"+t],20):e["lineColor"+t]=ue(e["lineColor"+t],20);for(let t=0;t<e.THEME_COLOR_LIMIT;t++){const h=""+(u==="neo"?Math.max(10-(t-1)*2,2):17-3*t);c+=`
- .section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} polygon, .section-${t-1} path {
- fill: ${e["cScale"+t]};
- }
- .section-${t-1} text {
- fill: ${e["cScaleLabel"+t]};
- }
- .section-${t-1} span {
- color: ${e["cScaleLabel"+t]};
- }
- .node-icon-${t-1} {
- font-size: 40px;
- color: ${e["cScaleLabel"+t]};
- }
- .section-edge-${t-1}{
- stroke: ${e["cScale"+t]};
- }
- .edge-depth-${t-1}{
- stroke-width: ${h};
- }
- .section-${t-1} line {
- stroke: ${e["cScaleInv"+t]} ;
- stroke-width: 3;
- }
- .disabled, .disabled circle, .disabled text {
- fill: lightgray;
- }
- .disabled text {
- fill: #efefef;
- }
- [data-look="neo"].mindmap-node.section-${t-1} rect, [data-look="neo"].mindmap-node.section-${t-1} path, [data-look="neo"].mindmap-node.section-${t-1} circle, [data-look="neo"].mindmap-node.section-${t-1} polygon {
- fill: ${r==="redux"||r==="redux-dark"||r==="neutral"?e.mainBkg:e["cScale"+t]};
- stroke: ${r==="redux"||r==="redux-dark"?e.nodeBorder:e["cScale"+t]};
- stroke-width: ${e.strokeWidth??2}px;
- }
- [data-look="neo"].section-edge-${t-1}{
- stroke: ${r?.includes("redux")||r==="neo-dark"?e.nodeBorder:e["cScale"+t]};
- }
- [data-look="neo"].mindmap-node.section-${t-1} text {
- fill: ${r==="redux"||r==="redux-dark"?e.nodeBorder:e["cScaleLabel"+(r==="neutral"?1:t)]};
- }
- `}return c},"genSections"),be=l((e,r,u)=>{let c="";for(let t=0;t<e;t++)c+=`
- [data-look="neo"].mindmap-node.section-${t-1} rect, [data-look="neo"].mindmap-node.section-${t-1} path, [data-look="neo"].mindmap-node.section-${t-1} circle, [data-look="neo"].mindmap-node.section-${t-1} polygon {
- stroke: url(${r}-gradient);
- fill: ${u};
- }
- .section-${t-1} line {
- stroke-width: 0;
- }`;return c},"genGradient"),Se=l(e=>{const{theme:r}=e,u=e.svgId,c=e.dropShadow?e.dropShadow.replace("url(#drop-shadow)",`url(${u}-drop-shadow)`):"none";return`
- .edge {
- stroke-width: 3;
- }
- ${ke(e)}
- .section-root rect, .section-root path, .section-root circle, .section-root polygon {
- fill: ${e.git0};
- }
- .section-root text {
- fill: ${e.gitBranchLabel0};
- }
- .section-root span {
- color: ${r?.includes("redux")?e.nodeBorder:e.gitBranchLabel0};
- }
- .icon-container {
- height:100%;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .edge {
- fill: none;
- }
- .mindmap-node-label {
- dy: 1em;
- alignment-baseline: middle;
- text-anchor: middle;
- dominant-baseline: middle;
- text-align: center;
- }
- [data-look="neo"].mindmap-node {
- filter: ${c};
- }
- [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon {
- fill: ${r?.includes("redux")?e.mainBkg:e.git0};
- }
- [data-look="neo"].mindmap-node.section-root .text-inner-tspan {
- fill: ${r?.includes("redux")?e.nodeBorder:e["cScaleLabel"+(r==="neutral"?1:0)]};
- }
- ${e.useGradient&&u&&e.mainBkg?be(e.THEME_COLOR_LIMIT,u,e.mainBkg):""}
- `},"getStyles"),Ne=Se,Te={get db(){return new ye},renderer:_e,parser:fe,styles:Ne};export{Te as diagram};
|