Files
anthropic-client/docs/public/mindmap-definition-307c710a-X5KDYKIG.min.js
T

119 lines
464 KiB
JavaScript
Raw Normal View History

2024-07-07 16:16:55 -05:00
import{b as Xi}from"./chunk-LXB37CFX.min.js";import{Ga as zt,Ia as Hr,J as ph,M as Yi,N as Hi,O as $i,Qa as $r,_a as _i,b as dh,c as gh,eb as Wi,h as Ui,nb as ka,rb as Ki}from"./chunk-YEACHCAA.min.js";import{b as ne,d as Yr}from"./chunk-XUHMPXWX.min.js";var gr=ne((E1,Zi)=>{function yh(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}Zi.exports=yh});var Ji=ne((w1,Qi)=>{var mh=typeof global=="object"&&global&&global.Object===Object&&global;Qi.exports=mh});var Xr=ne((x1,ji)=>{var bh=Ji(),Eh=typeof self=="object"&&self&&self.Object===Object&&self,wh=bh||Eh||Function("return this")();ji.exports=wh});var ts=ne((T1,es)=>{var xh=Xr(),Th=function(){return xh.Date.now()};es.exports=Th});var as=ne((C1,rs)=>{var Ch=/\s/;function Dh(t){for(var e=t.length;e--&&Ch.test(t.charAt(e)););return e}rs.exports=Dh});var is=ne((D1,ns)=>{var Sh=as(),Lh=/^\s+/;function Ah(t){return t&&t.slice(0,Sh(t)+1).replace(Lh,"")}ns.exports=Ah});var Pa=ne((S1,ss)=>{var Oh=Xr(),Nh=Oh.Symbol;ss.exports=Nh});var fs=ne((L1,ls)=>{var os=Pa(),us=Object.prototype,Ih=us.hasOwnProperty,Mh=us.toString,_r=os?os.toStringTag:void 0;function Rh(t){var e=Ih.call(t,_r),r=t[_r];try{t[_r]=void 0;var a=!0}catch{}var n=Mh.call(t);return a&&(e?t[_r]=r:delete t[_r]),n}ls.exports=Rh});var cs=ne((A1,hs)=>{var kh=Object.prototype,Ph=kh.toString;function Bh(t){return Ph.call(t)}hs.exports=Bh});var In=ne((O1,gs)=>{var vs=Pa(),Fh=fs(),Gh=cs(),zh="[object Null]",qh="[object Undefined]",ds=vs?vs.toStringTag:void 0;function Vh(t){return t==null?t===void 0?qh:zh:ds&&ds in Object(t)?Fh(t):Gh(t)}gs.exports=Vh});var ys=ne((N1,ps)=>{function Uh(t){return t!=null&&typeof t=="object"}ps.exports=Uh});var pr=ne((I1,ms)=>{var Yh=In(),Hh=ys(),$h="[object Symbol]";function Xh(t){return typeof t=="symbol"||Hh(t)&&Yh(t)==$h}ms.exports=Xh});var xs=ne((M1,ws)=>{var _h=is(),bs=gr(),Wh=pr(),Es=NaN,Kh=/^[-+]0x[0-9a-f]+$/i,Zh=/^0b[01]+$/i,Qh=/^0o[0-7]+$/i,Jh=parseInt;function jh(t){if(typeof t=="number")return t;if(Wh(t))return Es;if(bs(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=bs(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=_h(t);var r=Zh.test(t);return r||Qh.test(t)?Jh(t.slice(2),r?2:8):Kh.test(t)?Es:+t}ws.exports=jh});var Ds=ne((R1,Cs)=>{var ec=gr(),Mn=ts(),Ts=xs(),tc="Expected a function",rc=Math.max,ac=Math.min;function nc(t,e,r){var a,n,i,s,o,l,u=0,f=!1,h=!1,c=!0;if(typeof t!="function")throw new TypeError(tc);e=Ts(e)||0,ec(r)&&(f=!!r.leading,h="maxWait"in r,i=h?rc(Ts(r.maxWait)||0,e):i,c="trailing"in r?!!r.trailing:c);function v(x){var E=a,C=n;return a=n=void 0,u=x,s=t.apply(C,E),s}function d(x){return u=x,o=setTimeout(y,e),f?v(x):s}function g(x){var E=x-l,C=x-u,T=e-E;return h?ac(T,i-C):T}function p(x){var E=x-l,C=x-u;return l===void 0||E>=e||E<0||h&&C>=i}function y(){var x=Mn();if(p(x))return b(x);o=setTimeout(y,g(x))}function b(x){return o=void 0,c&&a?v(x):(a=n=void 0,s)}function w(){o!==void 0&&clearTimeout(o),u=0,a=l=n=o=void 0}function D(){return o===void 0?s:b(Mn())}function m(){var x=Mn(),E=p(x);if(a=arguments,n=this,l=x,E){if(o===void 0)return d(l);if(h)return clearTimeout(o),o=setTimeout(y,e),v(l)}return o===void 0&&(o=setTimeout(y,e)),s}return m.cancel=w,m.flush=D,m}Cs.exports=nc});var Ls=ne((Rn,Ss)=>{(function(){var t,e,r,a,n,i,s,o,l,u,f,h,c,v,d;r=Math.floor,u=Math.min,e=function(g,p){return g<p?-1:g>p?1:0},l=function(g,p,y,b,w){var D;if(y==null&&(y=0),w==null&&(w=e),y<0)throw new Error("lo must be non-negative");for(b==null&&(b=g.length);y<b;)D=r((y+b)/2),w(p,g[D])<0?b=D:y=D+1;return[].splice.apply(g,[y,y-y].concat(p)),p},i=function(g,p,y){return y==null&&(y=e),g.push(p),v(g,0,g.length-1,y)},n=function(g,p){var y,b;return p==null&&(p=e),y=g.pop(),g.length?(b=g[0],g[0]=y,d(g,0,p)):b=y,b},o=function(g,p,y){var b;return y==null&&(y=e),b=g[0],g[0]=p,d(g,0,y),b},s=function(g,p,y){var b;return y==null&&(y=e),g.length&&y(g[0],p)<0&&(b=[g[0],p],p=b[0],g[0]=b[1],d(g,0,y)),p},a=function(g,p){var y,b,w,D,m,x,E,C;for(p==null&&(p=e),x=function(){C=[];for(var T=0,L=r(g.length/2);0<=L?T<L:T>L;0<=L?T++:T--)C.push(T);return C}.apply(this).reverse(),E=[],b=0,D=x.length;b<D
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ve=typeof window>"u"?null:window,Su=Ve?Ve.navigator:null;Ve&&Ve.document;var og=Ye(""),Ll=Ye({}),ug=Ye(function(){}),lg=typeof HTMLElement>"u"?"undefined":Ye(HTMLElement),Ea=function(e){return e&&e.instanceString&&Fe(e.instanceString)?e.instanceString():null},ve=function(e){return e!=null&&Ye(e)==og},Fe=function(e){return e!=null&&Ye(e)===ug},Re=function(e){return!ct(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},Se=function(e){return e!=null&&Ye(e)===Ll&&!Re(e)&&e.constructor===Object},fg=function(e){return e!=null&&Ye(e)===Ll},ae=function(e){return e!=null&&Ye(e)===Ye(1)&&!isNaN(e)},hg=function(e){return ae(e)&&Math.floor(e)===e},an=function(e){if(lg!=="undefined")return e!=null&&e instanceof HTMLElement},ct=function(e){return wa(e)||Al(e)},wa=function(e){return Ea(e)==="collection"&&e._private.single},Al=function(e){return Ea(e)==="collection"&&!e._private.single},ci=function(e){return Ea(e)==="core"},Ol=function(e){return Ea(e)==="stylesheet"},cg=function(e){return Ea(e)==="event"},Xt=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},vg=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},dg=function(e){return Se(e)&&ae(e.x1)&&ae(e.x2)&&ae(e.y1)&&ae(e.y2)},gg=function(e){return fg(e)&&Fe(e.then)},pg=function(){return Su&&Su.userAgent.match(/msie|trident|edge/i)},ua=function(e,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],s=0;s<arguments.length;s++)i.push(arguments[s]);return i.join("$")});var a=function n(){var i=this,s=arguments,o,l=r.apply(i,s),u=n.cache;return(o=u[l])||(o=u[l]=e.apply(i,s)),o};return a.cache={},a},vi=ua(function(t){return t.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),pn=ua(function(t){return t.replace(/(-\w)/g,function(e){return e[1].toUpperCase()})}),Nl=ua(function(t,e){return t+e[0].toUpperCase()+e.substring(1)},function(t,e){return t+"$"+e}),Lu=function(e){return Xt(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},Ue="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",yg="rgb[a]?\\(("+Ue+"[%]?)\\s*,\\s*("+Ue+"[%]?)\\s*,\\s*("+Ue+"[%]?)(?:\\s*,\\s*("+Ue+"))?\\)",mg="rgb[a]?\\((?:"+Ue+"[%]?)\\s*,\\s*(?:"+Ue+"[%]?)\\s*,\\s*(?:"+Ue+"[%]?)(?:\\s*,\\s*(?:"+Ue+"))?\\)",bg="hsl[a]?\\(("+Ue+")\\s*,\\s*("+Ue+"[%])\\s*,\\s*("+Ue+"[%])(?:\\s*,\\s*("+Ue+"))?\\)",Eg="hsl[a]?\\((?:"+Ue+")\\s*,\\s*(?:"+Ue+"[%])\\s*,\\s*(?:"+Ue+"[%])(?:\\s*,\\s*(?:"+Ue+"))?\\)",wg="\\#[0-9a-fA-F]{3}",xg="\\#[0-9a-fA-F]{6}",Il=function(e,r){return e<r?-1:e>r?1:0},Tg=function(e,r){return-1*Il(e,r)},ge=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r<e.length;r++){var a=e[r];if(a!=null)for(var n=Object.keys(a),i=0;i<n.length;i++){var s=n[i];t[s]=a[s]}}return t},Cg=function(e){if(!(!(e.length===4||e.length===7)||e[0]!=="#")){var r=e.length===4,a,n,i,s=16;return r?(a=parseInt(e[1]+e[1],s),n=parseInt(e[2]+e[2],s),i=parseInt(e[3]+e[3],s)):(a=parseInt(e[1]+e[2],s),n=parseInt(e[3]+e[4],s),i=parseInt(e[5]+e[6],s)),[a,n,i]}},Dg=function(e){var r,a,n,i,s,o,l,u;function f(d,g,p){return p<0&&(p+=1),p>1&&(p-=1),p<1/6?d+(g-d)*6*p:p<1/2?g:p<2/3?d+(g-d)*(2/3-p)*6:d}var h=new RegExp("^"+bg+"$").exec(e);if(h){if(a=parseInt(h[1]),a<0?a=(360- -1*a%360)%360:a>360&&(a=a%360),a/=360,n=parseFloat(h[2]),n<0||n>100||(n=n/100,i=parseFloat(h[3]),i<0||i>100)||(i=i/100,s=h[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(n===0)o=l=u=Math.round(i*255);else{var c=i<.5?i*(1+n):i+n-i*n,v=2*i-c;o=Math.round(255*f(v,c,a+1/3)),l=Math.round(255*f(v,c,a)),u=Math.round(255*f(v,c,a-1/3))}r=[o,l,u,s]}return r},Sg=function(e){var r,a=new RegExp("^"+yg+"$").exec(e);if(a){r=[];for(var n=[],i=1;i<=3;i++){var s=a[i];if(s[s.length-1]==="%"&&(n[i]=!0),s=parseFloat(s),n[i]&&(s=s/100*255),s<0||s>255)return;r.push(Math.floor(s))}var o=n[1]||n[2]||n[3],l=n[1]&&n[2]&&n[3];if(o&&!l)return;var u=a[4];if(u!==void 0){if(u=parseFloat(u),u<0||u>1)return;r.push(u)}}return r},Lg=function(e){return Og[e.toLowerCase()]},Ag=functio
`),h=t.pstyle("text-max-width").pfValue,c=t.pstyle("text-overflow-wrap").value,v=c==="anywhere",d=[],g=/[\s\u200b]+/,p=v?"":" ",y=0;y<f.length;y++){var b=f[y],w=this.calculateLabelDimensions(t,b),D=w.width;if(v){var m=b.split("").join(u);b=m}if(D>h){for(var x=b.split(g),E="",C=0;C<x.length;C++){var T=x[C],L=E.length===0?T:E+p+T,A=this.calculateLabelDimensions(t,L),S=A.width;S<=h?E+=T+p:(E&&d.push(E),E=T+p)}E.match(/^[\s\u200b]+$/)||d.push(E)}else d.push(b)}s("labelWrapCachedLines",d),n=s("labelWrapCachedText",d.join(`
`)),s("labelWrapKey",l)}else if(o==="ellipsis"){var M=t.pstyle("text-max-width").pfValue,N="",P="\u2026",R=!1;if(this.calculateLabelDimensions(t,n).width<M)return n;for(var I=0;I<n.length;I++){var k=this.calculateLabelDimensions(t,N+n[I]+P).width;if(k>M)break;N+=n[I],I===n.length-1&&(R=!0)}return R||(N+=P),N}return n};Nt.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;if(e==="auto")if(t.isNode())switch(r){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return e};Nt.calculateLabelDimensions=function(t,e){var r=this,a=ir(e,t._private.labelDimsKey),n=r.labelDimCache||(r.labelDimCache=[]),i=n[a];if(i!=null)return i;var s=0,o=t.pstyle("font-style").strValue,l=t.pstyle("font-size").pfValue,u=t.pstyle("font-family").strValue,f=t.pstyle("font-weight").strValue,h=this.labelCalcCanvas,c=this.labelCalcCanvasContext;if(!h){h=this.labelCalcCanvas=document.createElement("canvas"),c=this.labelCalcCanvasContext=h.getContext("2d");var v=h.style;v.position="absolute",v.left="-9999px",v.top="-9999px",v.zIndex="-1",v.visibility="hidden",v.pointerEvents="none"}c.font="".concat(o," ").concat(f," ").concat(l,"px ").concat(u);for(var d=0,g=0,p=e.split(`
`),y=0;y<p.length;y++){var b=p[y],w=c.measureText(b),D=Math.ceil(w.width),m=l;d=Math.max(D,d),g+=m}return d+=s,g+=s,n[a]={width:d,height:g}};Nt.calculateLabelAngle=function(t,e){var r=t._private,a=r.rscratch,n=t.isEdge(),i=e?e+"-":"",s=t.pstyle(i+"text-rotation"),o=s.strValue;return o==="none"?0:n&&o==="autorotate"?a.labelAutoAngle:o==="autorotate"?0:s.pfValue};Nt.calculateLabelAngles=function(t){var e=this,r=t.isEdge(),a=t._private,n=a.rscratch;n.labelAngle=e.calculateLabelAngle(t),r&&(n.sourceLabelAngle=e.calculateLabelAngle(t,"source"),n.targetLabelAngle=e.calculateLabelAngle(t,"target"))};var kf={},gl=28,pl=!1;kf.getNodeShape=function(t){var e=this,r=t.pstyle("shape").value;if(r==="cutrectangle"&&(t.width()<gl||t.height()<gl))return pl||(Ie("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),pl=!0),"rectangle";if(t.isParent())return r==="rectangle"||r==="roundrectangle"||r==="round-rectangle"||r==="cutrectangle"||r==="cut-rectangle"||r==="barrel"?r:"rectangle";if(r==="polygon"){var a=t.pstyle("shape-polygon-points").value;return e.nodeShapes.makePolygon(a).name}return r};var Ln={};Ln.registerCalculationListeners=function(){var t=this.cy,e=t.collection(),r=this,a=function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(s),o)for(var l=0;l<s.length;l++){var u=s[l],f=u._private,h=f.rstyle;h.clean=!1,h.cleanConnected=!1}};r.binder(t).on("bounds.* dirty.*",function(s){var o=s.target;a(o)}).on("style.* background.*",function(s){var o=s.target;a(o,!1)});var n=function(s){if(s){var o=r.onUpdateEleCalcsFns;e.cleanStyle();for(var l=0;l<e.length;l++){var u=e[l],f=u._private.rstyle;u.isNode()&&!f.cleanConnected&&(a(u.connectedEdges()),f.cleanConnected=!0)}if(o)for(var h=0;h<o.length;h++){var c=o[h];c(s,e)}r.recalculateRenderedStyle(e),e=t.collection()}};r.flushRenderedStyleQueue=function(){n(!0)},r.beforeRender(n,r.beforeRenderPriorities.eleCalcs)};Ln.onUpdateEleCalcs=function(t){var e=this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[];e.push(t)};Ln.recalculateRenderedStyle=function(t,e){var r=function(D){return D._private.rstyle.cleanConnected},a=[],n=[];if(!this.destroyed){e===void 0&&(e=!0);for(var i=0;i<t.length;i++){var s=t[i],o=s._private,l=o.rstyle;s.isEdge()&&(!r(s.source())||!r(s.target()))&&(l.clean=!1),!(e&&l.clean||s.removed())&&s.pstyle("display").value!=="none"&&(o.group==="nodes"?n.push(s):a.push(s),l.clean=!0)}for(var u=0;u<n.length;u++){var f=n[u],h=f._private,c=h.rstyle,v=f.position();this.recalculateNodeLabelProjection(f),c.nodeX=v.x,c.nodeY=v.y,c.nodeW=f.pstyle("width").pfValue,c.nodeH=f.pstyle("height").pfValue}this.recalculateEdgeProjections(a);for(var d=0;d<a.length;d++){var g=a[d],p=g._private,y=p.rstyle,b=p.rscratch;y.srcX=b.arrowStartX,y.srcY=b.arrowStartY,y.tgtX=b.arrowEndX,y.tgtY=b.arrowEndY,y.midX=b.midX,y.midY=b.midY,y.labelAngle=b.labelAngle,y.sourceLabelAngle=b.sourceLabelAngle,y.targetLabelAngle=b.targetLabelAngle}}};var An={};An.updateCachedGrabbedEles=function(){var t=this.cachedZSortedEles;if(t){t.drag=[],t.nondrag=[];for(var e=[],r=0;r<t.length;r++){var a=t[r],n=a._private.rscratch;a.grabbed()&&!a.isParent()?e.push(a):n.inDragLayer?t.drag.push(a):t.nondrag.push(a)}for(var r=0;r<e.length;r++){var a=e[r];t.drag.push(a)}}};An.invalidateCachedZSortedEles=function(){this.cachedZSortedEles=null};An.getCachedZSortedEles=function(t){if(t||!this.cachedZSortedEles){var e=this.cy.mutableElements().toArray();e.sort(Ef),e.interactive=e.filter(function(r){return r.interactive()}),this.cachedZSortedEles=e,this.updateCachedGrabbedEles()}else e=this.cachedZSortedEles;return e};var Pf={};[hr,vn,it,Da,Ai,Nt,kf,Ln,An].forEach(function(t){ge(Pf,t)});var Bf={};Bf.getCachedImage=function(t,e,r){var a=this,n=a.imageCache=a.imageCache||{},i=n[t];if(i)return i.image.complete||i.image.addEventListener("load",r),i.image;i=n[t]=n[t]||{};var s=i.image=new Image;s.addEventListener("load",r),s.addEventListener("error",function(){s.error=!0});var o="data:",l=t.substring(0,o.length).toLowerCase()===o;return l||(e=e==="null"?null:e,s.crossOrigin=e),s.s
`+k.showPosition()+`
Expecting `+ie.join(", ")+", got '"+(this.terminals_[X]||X)+"'":de="Parse error on line "+(M+1)+": Unexpected "+(X==R?"end of input":"'"+(this.terminals_[X]||X)+"'"),this.parseError(de,{text:k.match,token:this.terminals_[X]||X,line:k.yylineno,loc:B,expected:ie})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Y+", token: "+X);switch(_[0]){case 1:E.push(X),T.push(k.yytext),L.push(k.yylloc),E.push(_[1]),X=null,N=k.yyleng,S=k.yytext,M=k.yylineno,B=k.yylloc;break;case 2:if(Q=this.productions_[_[1]][1],K.$=T[T.length-Q],K._$={first_line:L[L.length-(Q||1)].first_line,last_line:L[L.length-1].last_line,first_column:L[L.length-(Q||1)].first_column,last_column:L[L.length-1].last_column},G&&(K._$.range=[L[L.length-(Q||1)].range[0],L[L.length-1].range[1]]),q=this.performAction.apply(K,[S,N,M,F.yy,_[1],T,L].concat(I)),typeof q<"u")return q;Q&&(E=E.slice(0,-1*Q*2),T=T.slice(0,-1*Q),L=L.slice(0,-1*Q)),E.push(this.productions_[_[1]][0]),T.push(K.$),L.push(K._$),ee=A[E[E.length-2]][E[E.length-1]],E.push(ee);break;case 3:return!0}}return!0}},b=function(){var D={EOF:1,parseError:function(x,E){if(this.yy.parser)this.yy.parser.parseError(x,E);else throw new Error(x)},setInput:function(m,x){return this.yy=x||this.yy||{},this._input=m,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},input:function(){var m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var x=m.match(/(?:\r\n?|\n).*/g);return x?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),m},unput:function(m){var x=m.length,E=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;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),E.length-1&&(this.yylineno-=E.length-1);var T=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:E?(E.length===C.length?this.yylloc.first_column:0)+C[C.length-E.length].length-E[0].length:this.yylloc.first_column-x},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-x]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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},less:function(m){this.unput(this.match.slice(m))},pastInput:function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var m=this.pastInput(),x=new Array(m.length+1).join("-");return m+this.upcomingInput()+`
`+x+"^"},test_match:function(m,x){var E,C,T;if(this.options.backtrack_lexer&&(T={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&&(T.yylloc.range=this.yylloc.range.slice(0))),C=m[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+m[0].length},this.yytext+=m[0],this.match+=m[0],this.matches=m,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(m[0].length),this.matched+=m[0],E=this.performAction.call(this,this.yy,this,x,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),E)return E;if(this._backtrack){for(var L in T)this[L]=T[L];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var m,x,E,C;this._more||(this.yytext="",this.match="");for(var T=this._currentRules(),L=0;L<T.length;L++)if(E=this._input.match(this.rules[T[L]]),E&&(!x||E[0].length>x[0].length)){if(x=E,C=L,this.options.backtrack_lexer){if(m=this.test_match(E,T[L]),m!==!1)return m;if(this._backtrack){x=!1;continue}else return!1}else if(!this.options.flex)break}return x?(m=this.test_match(x,T[C]),m!==!1?m:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var x=this.next();return x||this.lex()},begin:function(x){this.conditionStack.push(x)},popState:function(){var x=this.conditionStack.length-1;return x>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(x){return x=this.conditionStack.length-1-Math.abs(x||0),x>=0?this.conditionStack[x]:"INITIAL"},pushState:function(x){this.begin(x)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(x,E,C,T){switch(C){case 0:return x.getLogger().trace("Found comment",E.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:x.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return x.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:x.getLogger().trace("end icon"),this.popState();break;case 10:return x.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return x.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return x.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return x.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:x.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return x.getLogger().trace("description:",E.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),x.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),x.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),x.getLogger().trace("node end ...",E.yytext),"NODE_DEND";case 30:return this.popState(),x.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),x.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),x.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),x.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),x.getLogger().trace("node end (("),"NODE_DEND";case 35:return x.getLogger().trace("Long description:",E.yytext),20;case 36:return x.getLogger().trace("Long description:",E.yytext),20}},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 D}();y.lexer=b;function w(){this.yy={}}return w.prototype=y,y.Parser=w,new w}();Pi.parser=Pi;var U0=Pi,Dt=[],rh=0,Fi={},Y0=()=>{Dt=[],rh=0,Fi={}},H0=function(t){for(let e=Dt.length-1;e>=0;e--)if(Dt[e].level<t)return Dt[e];return null},$0=()=>Dt.length>0?Dt[0]:null,X0=(t,e,r,a)=>{var n,i;zt.info("addNode",t,e,r,a);let s=ka(),o=((n=s.mindmap)==null?void 0:n.padding)??$r.mindmap.padding;switch(a){case $e.ROUNDED_RECT:case $e.RECT:case $e.HEXAGON:o*=2}let l={id:rh++,nodeId:Hr(e,s),level:t,descr:Hr(r,s),type:a,children:[],width:((i=s.mindmap)==null?void 0:i.maxNodeWidth)??$r.mindmap.maxNode
a${o},${o} 1 0,1 ${a*.4},${-1*a*.1}
a${s},${s} 1 0,1 ${a*.35},${1*a*.2}
a${i},${i} 1 0,1 ${a*.15},${1*n*.35}
a${l},${l} 1 0,1 ${-1*a*.15},${1*n*.65}
a${s},${i} 1 0,1 ${-1*a*.25},${a*.15}
a${o},${o} 1 0,1 ${-1*a*.5},0
a${i},${i} 1 0,1 ${-1*a*.25},${-1*a*.15}
a${i},${i} 1 0,1 ${-1*a*.1},${-1*n*.35}
a${l},${l} 1 0,1 ${a*.1},${-1*n*.65}
H0 V0 Z`)},i1=function(t,e,r){let a=r.width,n=r.height,i=.15*a;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${i},${i} 1 0,0 ${a*.25},${-1*n*.1}
a${i},${i} 1 0,0 ${a*.25},0
a${i},${i} 1 0,0 ${a*.25},0
a${i},${i} 1 0,0 ${a*.25},${1*n*.1}
a${i},${i} 1 0,0 ${a*.15},${1*n*.33}
a${i*.8},${i*.8} 1 0,0 0,${1*n*.34}
a${i},${i} 1 0,0 ${-1*a*.15},${1*n*.33}
a${i},${i} 1 0,0 ${-1*a*.25},${n*.15}
a${i},${i} 1 0,0 ${-1*a*.25},0
a${i},${i} 1 0,0 ${-1*a*.25},0
a${i},${i} 1 0,0 ${-1*a*.25},${-1*n*.15}
a${i},${i} 1 0,0 ${-1*a*.1},${-1*n*.33}
a${i*.8},${i*.8} 1 0,0 0,${-1*n*.34}
a${i},${i} 1 0,0 ${a*.1},${-1*n*.33}
H0 V0 Z`)},s1=function(t,e,r){e.append("circle").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("r",r.width/2)};function o1(t,e,r,a,n){return t.insert("polygon",":first-child").attr("points",a.map(function(i){return i.x+","+i.y}).join(" ")).attr("transform","translate("+(n.width-e)/2+", "+r+")")}var u1=function(t,e,r){let a=r.height,i=a/4,s=r.width-r.padding+2*i,o=[{x:i,y:0},{x:s-i,y:0},{x:s,y:-a/2},{x:s-i,y:-a},{x:i,y:-a},{x:0,y:-a/2}];o1(e,s,a,o,r)},l1=function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("rx",r.padding).attr("ry",r.padding).attr("width",r.width)},f1=function(t,e,r,a,n){let i=n.htmlLabels,s=a%(t1-1),o=e.append("g");r.section=s;let l="section-"+s;s<0&&(l+=" section-root"),o.attr("class",(r.class?r.class+" ":"")+"mindmap-node "+l);let u=o.append("g"),f=o.append("g"),h=r.descr.replace(/(<br\/*>)/g,`
`);Xi(f,h,{useHtmlLabels:i,width:r.width,classes:"mindmap-node-label"}),i||f.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");let c=f.node().getBBox(),[v]=_i(n.fontSize);if(r.height=c.height+v*1.1*.5+r.padding,r.width=c.width+2*r.padding,r.icon)if(r.type===t.nodeType.CIRCLE)r.height+=50,r.width+=50,o.append("foreignObject").attr("height","50px").attr("width",r.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),f.attr("transform","translate("+r.width/2+", "+(r.height/2-1.5*r.padding)+")");else{r.width+=50;let d=r.height;r.height=Math.max(d,60);let g=Math.abs(r.height-d);o.append("foreignObject").attr("width","60px").attr("height",r.height).attr("style","text-align: center;margin-top:"+g/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),f.attr("transform","translate("+(25+r.width/2)+", "+(g/2+r.padding/2)+")")}else if(i){let d=(r.width-c.width)/2,g=(r.height-c.height)/2;f.attr("transform","translate("+d+", "+g+")")}else{let d=r.width/2,g=r.padding/2;f.attr("transform","translate("+d+", "+g+")")}switch(r.type){case t.nodeType.DEFAULT:r1(t,u,r,s);break;case t.nodeType.ROUNDED_RECT:l1(t,u,r);break;case t.nodeType.RECT:a1(t,u,r);break;case t.nodeType.CIRCLE:u.attr("transform","translate("+r.width/2+", "+ +r.height/2+")"),s1(t,u,r);break;case t.nodeType.CLOUD:n1(t,u,r);break;case t.nodeType.BANG:i1(t,u,r);break;case t.nodeType.HEXAGON:u1(t,u,r);break}return t.setElementForId(r.id,o),r.height},h1=function(t,e){let r=t.getElementById(e.id),a=e.x||0,n=e.y||0;r.attr("transform","translate("+a+","+n+")")};Bi.default.use(th.default);function ah(t,e,r,a,n){f1(t,e,r,a,n),r.children&&r.children.forEach((i,s)=>{ah(t,e,i,a<0?s:a,n)})}function c1(t,e){e.edges().map((r,a)=>{let n=r.data();if(r[0]._private.bodyBounds){let i=r[0]._private.rscratch;zt.trace("Edge: ",a,n),t.insert("path").attr("d",`M ${i.startX},${i.startY} L ${i.midX},${i.midY} L${i.endX},${i.endY} `).attr("class","edge section-edge-"+n.section+" edge-depth-"+n.depth)}})}function nh(t,e,r,a){e.add({group:"nodes",data:{id:t.id.toString(),labelText:t.descr,height:t.height,width:t.width,level:a,nodeId:t.id,padding:t.padding,type:t.type},position:{x:t.x,y:t.y}}),t.children&&t.children.forEach(n=>{nh(n,e,r,a+1),e.add({group:"edges",data:{id:`${t.id}_${n.id}`,source:t.id,target:n.id,depth:a,section:n.section}})})}function v1(t,e){return new Promise(r=>{let a=Ui("body").append("div").attr("id","cy").attr("style","display:none"),n=(0,Bi.default)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});a.remove(),nh(t,n,e,0),n.nodes().forEach(function(i){i.layoutDimensions=()=>{let s=i.data();return{w:s.width,h:s.height}}}),n.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),n.ready(i=>{zt.info("Ready",i),r(n)})})}function d1(t,e){e.nodes().map((r,a)=>{let n=r.data();n.x=r.position().x,n.y=r.position().y,h1(t,n);let i=t.getElementById(n.nodeId);zt.info("Id:",a,"Position: (",r.position().x,", ",r.position().y,")",n),i.attr("transform",`translate(${r.position().x-n.width/2}, ${r.position().y-n.height/2})`),i.attr("attr",`apa-${a})`)})}var g1=async(t,e,r,a)=>{var n,i;zt.debug(`Rendering mindmap diagram
`+t);let s=a.db,o=s.getMindmap();if(!o)return;let l=ka();l.htmlLabels=!1;let u=Ki(e),f=u.append("g");f.attr("class","mindmap-edges");let h=u.append("g");h.attr("class","mindmap-nodes"),ah(s,h,o,-1,l);let c=await v1(o,l);c1(f,c),d1(s,c),Wi(void 0,u,((n=l.mindmap)==null?void 0:n.padding)??$r.mindmap.padding,((i=l.mindmap)==null?void 0:i.useMaxWidth)??$r.mindmap.useMaxWidth)},p1={draw:g1},y1=t=>{let e="";for(let r=0;r<t.THEME_COLOR_LIMIT;r++)t["lineColor"+r]=t["lineColor"+r]||t["cScaleInv"+r],Yi(t["lineColor"+r])?t["lineColor"+r]=Hi(t["lineColor"+r],20):t["lineColor"+r]=$i(t["lineColor"+r],20);for(let r=0;r<t.THEME_COLOR_LIMIT;r++){let a=""+(17-3*r);e+=`
.section-${r-1} rect, .section-${r-1} path, .section-${r-1} circle, .section-${r-1} polygon, .section-${r-1} path {
fill: ${t["cScale"+r]};
}
.section-${r-1} text {
fill: ${t["cScaleLabel"+r]};
}
.node-icon-${r-1} {
font-size: 40px;
color: ${t["cScaleLabel"+r]};
}
.section-edge-${r-1}{
stroke: ${t["cScale"+r]};
}
.edge-depth-${r-1}{
stroke-width: ${a};
}
.section-${r-1} line {
stroke: ${t["cScaleInv"+r]} ;
stroke-width: 3;
}
.disabled, .disabled circle, .disabled text {
fill: lightgray;
}
.disabled text {
fill: #efefef;
}
`}return e},m1=t=>`
.edge {
stroke-width: 3;
}
${y1(t)}
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
fill: ${t.git0};
}
.section-root text {
fill: ${t.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;
}
`,b1=m1,Vb={db:e1,renderer:p1,parser:U0,styles:b1};export{Vb as diagram};
/*! Bundled license information:
cytoscape/dist/cytoscape.cjs.js:
(*!
Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable
Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com)
Licensed under The MIT License (http://opensource.org/licenses/MIT)
*)
(*!
Event object based on jQuery events, MIT license
https://jquery.org/license/
https://tldrlegal.com/license/mit-license
https://github.com/jquery/jquery/blob/master/src/event.js
*)
(*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License *)
(*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License *)
*/
//# sourceMappingURL=mindmap-definition-307c710a-X5KDYKIG.min.js.map