Files
anthropic-client/docs/public/mindmap-definition-GWI6TPTV-XCX7U2FR.min.js
T

97 lines
100 KiB
JavaScript
Raw Normal View History

2025-05-19 20:34:34 +00:00
import{a as ct}from"./chunk-WMZJ2DJX.min.js";import{a as Rt}from"./chunk-5IIW54K6.min.js";import{d as Ct}from"./chunk-AUO2PXKS.min.js";import{k as It}from"./chunk-PYPO7LRM.min.js";import"./chunk-CM5D5KZN.min.js";import{H as tt,P as Ot,Z as at,d as Nt,e as mt,f as Dt,h as w,ia as At,j as Q,v as q}from"./chunk-U3SD26FK.min.js";import"./chunk-CXRPJJJE.min.js";import{a as lt,d as bt}from"./chunk-OSRY5VT3.min.js";var ut=lt((et,gt)=>{(function(A,o){typeof et=="object"&&typeof gt=="object"?gt.exports=o():typeof define=="function"&&define.amd?define([],o):typeof et=="object"?et.layoutBase=o():A.layoutBase=o()})(et,function(){return function(E){var A={};function o(i){if(A[i])return A[i].exports;var e=A[i]={i,l:!1,exports:{}};return E[i].call(e.exports,e,e.exports,o),e.l=!0,e.exports}return o.m=E,o.c=A,o.i=function(i){return i},o.d=function(i,e,t){o.o(i,e)||Object.defineProperty(i,e,{configurable:!1,enumerable:!0,get:t})},o.n=function(i){var e=i&&i.__esModule?function(){return i.default}:function(){return i};return o.d(e,"a",e),e},o.o=function(i,e){return Object.prototype.hasOwnProperty.call(i,e)},o.p="",o(o.s=26)}([function(E,A,o){"use strict";function i(){}i.QUALITY=1,i.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,i.DEFAULT_INCREMENTAL=!1,i.DEFAULT_ANIMATION_ON_LAYOUT=!0,i.DEFAULT_ANIMATION_DURING_LAYOUT=!1,i.DEFAULT_ANIMATION_PERIOD=50,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,i.DEFAULT_GRAPH_MARGIN=15,i.NODE_DIMENSIONS_INCLUDE_LABELS=!1,i.SIMPLE_NODE_SIZE=40,i.SIMPLE_NODE_HALF_SIZE=i.SIMPLE_NODE_SIZE/2,i.EMPTY_COMPOUND_NODE_SIZE=40,i.MIN_EDGE_LENGTH=1,i.WORLD_BOUNDARY=1e6,i.INITIAL_WORLD_BOUNDARY=i.WORLD_BOUNDARY/1e3,i.WORLD_CENTER_X=1200,i.WORLD_CENTER_Y=900,E.exports=i},function(E,A,o){"use strict";var i=o(2),e=o(8),t=o(9);function r(f,a,d){i.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=f,this.target=a}r.prototype=Object.create(i.prototype);for(var l in i)r[l]=i[l];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(f,a){for(var d=this.getOtherEnd(f),s=a.getGraphManager().getRoot();;){if(d.getOwner()==a)return d;if(d.getOwner()==s)break;d=d.getOwner().getParent()}return null},r.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},E.exports=r},function(E,A,o){"use strict";function i(e){this.vGraphObject=e}E.exports=i},function(E,A,o){"use strict";var i=o(2),e=o(10),t=o(13),r=o(0),l=o(16),f=o(4);function a(s,c,u,v){u==null&&v==null&&(v=c),i.call(this,v),s.graphManager!=null&&(s=s.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=v,this.edges=[],this.graphManager=s,u!=null&&c!=null?this.rect=new t(c.x,c.y,u.width,u.height):this.r
`+S.showPosition()+`
Expecting `+st.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":ht="Parse error on line "+(x+1)+": Unexpected "+(Y==M?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(ht,{text:S.match,token:this.terminals_[Y]||Y,line:S.yylineno,loc:b,expected:st})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+Y);switch($[0]){case 1:g.push(Y),N.push(S.yytext),m.push(S.yylloc),g.push($[1]),Y=null,K?(Y=K,K=null):(U=S.yyleng,I=S.yytext,x=S.yylineno,b=S.yylloc,P>0&&P--);break;case 2:if(j=this.productions_[$[1]][1],J.$=N[N.length-j],J._$={first_line:m[m.length-(j||1)].first_line,last_line:m[m.length-1].last_line,first_column:m[m.length-(j||1)].first_column,last_column:m[m.length-1].last_column},H&&(J._$.range=[m[m.length-(j||1)].range[0],m[m.length-1].range[1]]),ot=this.performAction.apply(J,[I,U,x,F.yy,$[1],N,m].concat(G)),typeof ot<"u")return ot;j&&(g=g.slice(0,-1*j*2),N=N.slice(0,-1*j),m=m.slice(0,-1*j)),g.push(this.productions_[$[1]][0]),N.push(J.$),m.push(J._$),Tt=C[g[g.length-2]][g[g.length-1]],g.push(Tt);break;case 3:return!0}}return!0},"parse")},O=function(){var R={EOF:1,parseError:w(function(h,g){if(this.yy.parser)this.yy.parser.parseError(h,g);else throw new Error(h)},"parseError"),setInput:w(function(n,h){return this.yy=h||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:w(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var h=n.match(/(?:\r\n?|\n).*/g);return h?(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:w(function(n){var h=n.length,g=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var p=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),g.length-1&&(this.yylineno-=g.length-1);var N=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:g?(g.length===p.length?this.yylloc.first_column:0)+p[p.length-g.length].length-g[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[N[0],N[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:w(function(){return this._more=!0,this},"more"),reject:w(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:w(function(n){this.unput(this.match.slice(n))},"less"),pastInput:w(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:w(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:w(function(){var n=this.pastInput(),h=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
`+h+"^"},"showPosition"),test_match:w(function(n,h){var g,p,N;if(this.options.backtrack_lexer&&(N={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&&(N.yylloc.range=this.yylloc.range.slice(0))),p=n[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],g=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var m in N)this[m]=N[m];return!1}return!1},"test_match"),next:w(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,h,g,p;this._more||(this.yytext="",this.match="");for(var N=this._currentRules(),m=0;m<N.length;m++)if(g=this._input.match(this.rules[N[m]]),g&&(!h||g[0].length>h[0].length)){if(h=g,p=m,this.options.backtrack_lexer){if(n=this.test_match(g,N[m]),n!==!1)return n;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(n=this.test_match(h,N[p]),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:w(function(){var h=this.next();return h||this.lex()},"lex"),begin:w(function(h){this.conditionStack.push(h)},"begin"),popState:w(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:w(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:w(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:w(function(h){this.begin(h)},"pushState"),stateStackSize:w(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:w(function(h,g,p,N){var m=N;switch(p){case 0:return h.getLogger().trace("Found comment",g.yytext),6;break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;break;case 4:this.popState();break;case 5:h.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return h.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:h.getLogger().trace("end icon"),this.popState();break;case 10:return h.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return h.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return h.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return h.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;break;case 14:return this.begin("NODE"),19;break;case 15:return this.begin("NODE"),19;break;case 16:return this.begin("NODE"),19;break;case 17:return this.begin("NODE"),19;break;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:h.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return h.getLogger().trace("description:",g.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),h.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),h.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),h.getLogger().trace("node end ...",g.yytext),"NODE_DEND";break;case 30:return this.popState(),h.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),h.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),h.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),h.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),h.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return h.getLogger().trace("Long description:",g.yytext),20;break;case 36:return h.getLogger().trace("Long description:",g.yytext),20;break}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return R}();y.lexer=O;function D(){this.yy={}}return w(D,"Parser"),D.prototype=y,y.Parser=D,new D}();vt.parser=vt;var Ut=vt,V=[],wt=0,yt={},Pt=w(()=>{V=[],wt=0,yt={}},"clear"),Yt=w(function(E){for(let A=V.length-1;A>=0;A--)if(V[A].level<E)return V[A];return null},"getParent"),Xt=w(()=>V.length>0?V[0]:null,"getMindmap"),kt=w((E,A,o,i
a${l},${l} 1 0,1 ${i*.4},${-1*i*.1}
a${r},${r} 1 0,1 ${i*.35},${1*i*.2}
a${t},${t} 1 0,1 ${i*.15},${1*e*.35}
a${f},${f} 1 0,1 ${-1*i*.15},${1*e*.65}
a${r},${t} 1 0,1 ${-1*i*.25},${i*.15}
a${l},${l} 1 0,1 ${-1*i*.5},0
a${t},${t} 1 0,1 ${-1*i*.25},${-1*i*.15}
a${t},${t} 1 0,1 ${-1*i*.1},${-1*e*.35}
a${f},${f} 1 0,1 ${i*.1},${-1*e*.65}
H0 V0 Z`)},"cloudBkg"),te=w(function(E,A,o){let i=o.width,e=o.height,t=.15*i;A.append("path").attr("id","node-"+o.id).attr("class","node-bkg node-"+E.type2Str(o.type)).attr("d",`M0 0 a${t},${t} 1 0,0 ${i*.25},${-1*e*.1}
a${t},${t} 1 0,0 ${i*.25},0
a${t},${t} 1 0,0 ${i*.25},0
a${t},${t} 1 0,0 ${i*.25},${1*e*.1}
a${t},${t} 1 0,0 ${i*.15},${1*e*.33}
a${t*.8},${t*.8} 1 0,0 0,${1*e*.34}
a${t},${t} 1 0,0 ${-1*i*.15},${1*e*.33}
a${t},${t} 1 0,0 ${-1*i*.25},${e*.15}
a${t},${t} 1 0,0 ${-1*i*.25},0
a${t},${t} 1 0,0 ${-1*i*.25},0
a${t},${t} 1 0,0 ${-1*i*.25},${-1*e*.15}
a${t},${t} 1 0,0 ${-1*i*.1},${-1*e*.33}
a${t*.8},${t*.8} 1 0,0 0,${-1*e*.34}
a${t},${t} 1 0,0 ${i*.1},${-1*e*.33}
H0 V0 Z`)},"bangBkg"),ee=w(function(E,A,o){A.append("circle").attr("id","node-"+o.id).attr("class","node-bkg node-"+E.type2Str(o.type)).attr("r",o.width/2)},"circleBkg");function St(E,A,o,i,e){return E.insert("polygon",":first-child").attr("points",i.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+(e.width-A)/2+", "+o+")")}w(St,"insertPolygonShape");var re=w(function(E,A,o){let i=o.height,t=i/4,r=o.width-o.padding+2*t,l=[{x:t,y:0},{x:r-t,y:0},{x:r,y:-i/2},{x:r-t,y:-i},{x:t,y:-i},{x:0,y:-i/2}];St(A,r,i,l,o)},"hexagonBkg"),ie=w(function(E,A,o){A.append("rect").attr("id","node-"+o.id).attr("class","node-bkg node-"+E.type2Str(o.type)).attr("height",o.height).attr("rx",o.padding).attr("ry",o.padding).attr("width",o.width)},"roundedRectBkg"),ne=w(async function(E,A,o,i,e){let t=e.htmlLabels,r=i%(zt-1),l=A.append("g");o.section=r;let f="section-"+r;r<0&&(f+=" section-root"),l.attr("class",(o.class?o.class+" ":"")+"mindmap-node "+f);let a=l.append("g"),d=l.append("g"),s=o.descr.replace(/(<br\/*>)/g,`
`);await Ct(d,s,{useHtmlLabels:t,width:o.width,classes:"mindmap-node-label"},e),t||d.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");let c=d.node().getBBox(),[u]=It(e.fontSize);if(o.height=c.height+u*1.1*.5+o.padding,o.width=c.width+2*o.padding,o.icon)if(o.type===E.nodeType.CIRCLE)o.height+=50,o.width+=50,l.append("foreignObject").attr("height","50px").attr("width",o.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+r+" "+o.icon),d.attr("transform","translate("+o.width/2+", "+(o.height/2-1.5*o.padding)+")");else{o.width+=50;let v=o.height;o.height=Math.max(v,60);let L=Math.abs(o.height-v);l.append("foreignObject").attr("width","60px").attr("height",o.height).attr("style","text-align: center;margin-top:"+L/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+r+" "+o.icon),d.attr("transform","translate("+(25+o.width/2)+", "+(L/2+o.padding/2)+")")}else if(t){let v=(o.width-c.width)/2,L=(o.height-c.height)/2;d.attr("transform","translate("+v+", "+L+")")}else{let v=o.width/2,L=o.padding/2;d.attr("transform","translate("+v+", "+L+")")}switch(o.type){case E.nodeType.DEFAULT:Kt(E,a,o,r);break;case E.nodeType.ROUNDED_RECT:ie(E,a,o,r);break;case E.nodeType.RECT:Jt(E,a,o,r);break;case E.nodeType.CIRCLE:a.attr("transform","translate("+o.width/2+", "+ +o.height/2+")"),ee(E,a,o,r);break;case E.nodeType.CLOUD:qt(E,a,o,r);break;case E.nodeType.BANG:te(E,a,o,r);break;case E.nodeType.HEXAGON:re(E,a,o,r);break}return E.setElementForId(o.id,l),o.height},"drawNode"),se=w(function(E,A){let o=E.getElementById(A.id),i=A.x||0,e=A.y||0;o.attr("transform","translate("+i+","+e+")")},"positionNode");ct.use(xt.default);async function Et(E,A,o,i,e){await ne(E,A,o,i,e),o.children&&await Promise.all(o.children.map((t,r)=>Et(E,A,t,i<0?r:i,e)))}w(Et,"drawNodes");function Gt(E,A){A.edges().map((o,i)=>{let e=o.data();if(o[0]._private.bodyBounds){let t=o[0]._private.rscratch;Q.trace("Edge: ",i,e),E.insert("path").attr("d",`M ${t.startX},${t.startY} L ${t.midX},${t.midY} L${t.endX},${t.endY} `).attr("class","edge section-edge-"+e.section+" edge-depth-"+e.depth)}})}w(Gt,"drawEdges");function Lt(E,A,o,i){A.add({group:"nodes",data:{id:E.id.toString(),labelText:E.descr,height:E.height,width:E.width,level:i,nodeId:E.id,padding:E.padding,type:E.type},position:{x:E.x,y:E.y}}),E.children&&E.children.forEach(e=>{Lt(e,A,o,i+1),A.add({group:"edges",data:{id:`${E.id}_${e.id}`,source:E.id,target:e.id,depth:i,section:e.section}})})}w(Lt,"addNodes");function _t(E,A){return new Promise(o=>{let i=At("body").append("div").attr("id","cy").attr("style","display:none"),e=ct({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});i.remove(),Lt(E,e,A,0),e.nodes().forEach(function(t){t.layoutDimensions=()=>{let r=t.data();return{w:r.width,h:r.height}}}),e.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),e.ready(t=>{Q.info("Ready",t),o(e)})})}w(_t,"layoutMindmap");function Ft(E,A){A.nodes().map((o,i)=>{let e=o.data();e.x=o.position().x,e.y=o.position().y,se(E,e);let t=E.getElementById(e.nodeId);Q.info("Id:",i,"Position: (",o.position().x,", ",o.position().y,")",e),t.attr("transform",`translate(${o.position().x-e.width/2}, ${o.position().y-e.height/2})`),t.attr("attr",`apa-${i})`)})}w(Ft,"positionNodes");var ae=w(async(E,A,o,i)=>{Q.debug(`Rendering mindmap diagram
`+E);let e=i.db,t=e.getMindmap();if(!t)return;let r=at();r.htmlLabels=!1;let l=Rt(A),f=l.append("g");f.attr("class","mindmap-edges");let a=l.append("g");a.attr("class","mindmap-nodes"),await Et(e,a,t,-1,r);let d=await _t(t,r);Gt(f,d),Ft(e,d),Ot(void 0,l,r.mindmap?.padding??q.mindmap.padding,r.mindmap?.useMaxWidth??q.mindmap.useMaxWidth)},"draw"),oe={draw:ae},he=w(E=>{let A="";for(let o=0;o<E.THEME_COLOR_LIMIT;o++)E["lineColor"+o]=E["lineColor"+o]||E["cScaleInv"+o],Nt(E["lineColor"+o])?E["lineColor"+o]=mt(E["lineColor"+o],20):E["lineColor"+o]=Dt(E["lineColor"+o],20);for(let o=0;o<E.THEME_COLOR_LIMIT;o++){let i=""+(17-3*o);A+=`
.section-${o-1} rect, .section-${o-1} path, .section-${o-1} circle, .section-${o-1} polygon, .section-${o-1} path {
fill: ${E["cScale"+o]};
}
.section-${o-1} text {
fill: ${E["cScaleLabel"+o]};
}
.node-icon-${o-1} {
font-size: 40px;
color: ${E["cScaleLabel"+o]};
}
.section-edge-${o-1}{
stroke: ${E["cScale"+o]};
}
.edge-depth-${o-1}{
stroke-width: ${i};
}
.section-${o-1} line {
stroke: ${E["cScaleInv"+o]} ;
stroke-width: 3;
}
.disabled, .disabled circle, .disabled text {
fill: lightgray;
}
.disabled text {
fill: #efefef;
}
`}return A},"genSections"),le=w(E=>`
.edge {
stroke-width: 3;
}
${he(E)}
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
fill: ${E.git0};
}
.section-root text {
fill: ${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;
}
`,"getStyles"),ce=le,Le={db:Qt,renderer:oe,parser:Ut,styles:ce};export{Le as diagram};
//# sourceMappingURL=mindmap-definition-GWI6TPTV-XCX7U2FR.min.js.map