import{l as qe,T as O,H as Ze,U as re,f as A,e as Te,V as Xe,h as q,W as P,j as Qe,X as x,K as X,k as Ee,Y as G,G as Q,Z as Je,$ as Oe,a0 as We,a1 as D,Q as me,N as ve,a2 as ze,a3 as Ve,a4 as ke,P as en,a5 as nn,O as rn,L as we,I as tn,E as sn,a6 as an,R as F,w as te}from"./index-B3xnVETd.js";import{an as un,ao as I,ap as fn,aq as j,ar as ie}from"./mermaid.core-BzK7EpWg.js";var on="__lodash_hash_undefined__";function dn(e){return this.__data__.set(e,on),this}function hn(e){return this.__data__.has(e)}function C(e){var n=-1,r=e==null?0:e.length;for(this.__data__=new qe;++nu))return!1;var g=s.get(e),l=s.get(n);if(g&&l)return g==n&&l==e;var o=-1,h=!0,y=r&cn?new C:void 0;for(s.set(e,n),s.set(n,e);++o-1}var Zn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Xn=/^\w*$/;function k(e,n){if(A(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||X(e)?!0:Xn.test(e)||!Zn.test(e)||n!=null&&e in Object(n)}var Qn=500;function Jn(e){var n=fn(e,function(t){return r.size===Qn&&r.clear(),t}),r=n.cache;return n}var Wn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zn=/\\(\\)?/g,Vn=Jn(function(e){var n=[];return e.charCodeAt(0)===46&&n.push(""),e.replace(Wn,function(r,t,i,s){n.push(i?s.replace(zn,"$1"):t||r)}),n});function kn(e){return e==null?"":Ne(e)}function Re(e,n){return A(e)?e:k(e,n)?[e]:Vn(kn(e))}var er=1/0;function U(e){if(typeof e=="string"||X(e))return e;var n=e+"";return n=="0"&&1/e==-er?"-0":n}function Me(e,n){n=Re(n,e);for(var r=0,t=n.length;e!=null&&r=Bt){var g=jt(e);if(g)return J(g);a=!1,i=$e,f=new C}else f=u;e:for(;++t1?i.setNode(s,r):i.setNode(s)}),this}setNode(n,r){return E(this._nodes,n)?(arguments.length>1&&(this._nodes[n]=r),this):(this._nodes[n]=arguments.length>1?r:this._defaultNodeLabelFn(n),this._isCompound&&(this._parent[n]=w,this._children[n]={},this._children[w][n]=!0),this._in[n]={},this._preds[n]={},this._out[n]={},this._sucs[n]={},++this._nodeCount,this)}node(n){return this._nodes[n]}hasNode(n){return E(this._nodes,n)}removeNode(n){var r=this;if(E(this._nodes,n)){var t=function(i){r.removeEdge(r._edgeObjs[i])};delete this._nodes[n],this._isCompound&&(this._removeFromParentsChildList(n),delete this._parent[n],v(this.children(n),function(i){r.setParent(i)}),delete this._children[n]),v(T(this._in[n]),t),delete this._in[n],delete this._preds[n],v(T(this._out[n]),t),delete this._out[n],delete this._sucs[n],--this._nodeCount}return this}setParent(n,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if($(r))r=w;else{r+="";for(var t=r;!$(t);t=this.parent(t))if(t===n)throw new Error("Setting "+r+" as parent of "+n+" would create a cycle");this.setNode(r)}return this.setNode(n),this._removeFromParentsChildList(n),this._parent[n]=r,this._children[r][n]=!0,this}_removeFromParentsChildList(n){delete this._children[this._parent[n]][n]}parent(n){if(this._isCompound){var r=this._parent[n];if(r!==w)return r}}children(n){if($(n)&&(n=w),this._isCompound){var r=this._children[n];if(r)return T(r)}else{if(n===w)return this.nodes();if(this.hasNode(n))return[]}}predecessors(n){var r=this._preds[n];if(r)return T(r)}successors(n){var r=this._sucs[n];if(r)return T(r)}neighbors(n){var r=this.predecessors(n);if(r)return Ht(r,this.successors(n))}isLeaf(n){var r;return this.isDirected()?r=this.successors(n):r=this.neighbors(n),r.length===0}filterNodes(n){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var t=this;v(this._nodes,function(a,u){n(u)&&r.setNode(u,a)}),v(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,t.edge(a))});var i={};function s(a){var u=t.parent(a);return u===void 0||r.hasNode(u)?(i[a]=u,u):u in i?i[u]:s(u)}return this._isCompound&&v(r.nodes(),function(a){r.setParent(a,s(a))}),r}setDefaultEdgeLabel(n){return te(n)||(n=F(n)),this._defaultEdgeLabelFn=n,this}edgeCount(){return this._edgeCount}edges(){return H(this._edgeObjs)}setPath(n,r){var t=this,i=arguments;return Gt(n,function(s,a){return i.length>1?t.setEdge(s,a,r):t.setEdge(s,a),a}),this}setEdge(){var n,r,t,i,s=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(n=a.v,r=a.w,t=a.name,arguments.length===2&&(i=arguments[1],s=!0)):(n=a,r=arguments[1],t=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),n=""+n,r=""+r,$(t)||(t=""+t);var u=L(this._isDirected,n,r,t);if(E(this._edgeLabels,u))return s&&(this._edgeLabels[u]=i),this;if(!$(t)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(n),this.setNode(r),this._edgeLabels[u]=s?i:this._defaultEdgeLabelFn(n,r,t);var f=qt(this._isDirected,n,r,t);return n=f.v,r=f.w,Object.freeze(f),this._edgeObjs[u]=f,Ae(this._preds[r],n),Ae(this._sucs[n],r),this._in[r][u]=f,this._out[n][u]=f,this._edgeCount++,this}edge(n,r,t){var i=arguments.length===1?Y(this._isDirected,arguments[0]):L(this._isDirected,n,r,t);return this._edgeLabels[i]}hasEdge(n,r,t){var i=arguments.length===1?Y(this._isDirected,arguments[0]):L(this._isDirected,n,r,t);return E(this._edgeLabels,i)}removeEdge(n,r,t){var i=arguments.length===1?Y(this._isDirected,arguments[0]):L(this._isDirected,n,r,t),s=this._edgeObjs[i];return s&&(n=s.v,r=s.w,delete this._edgeLabels[i],delete this._edgeObjs[i],ye(this._preds[r],n),ye(this._sucs[n],r),delete this._in[r][i],delete this._out[n][i],this._edgeCount--),this}inEdges(n,r){var t=this._in[n];if(t){var i=H(t);return r?M(i,function(s){return s.v===r}):i}}outEdges(n,r){var t=this._out[n];if(t){var i=H(t);return r?M(i,function(s){return s.w===r}):i}}nodeEdges(n,r){var t=this.inEdges(n,r);if(t)return t.concat(this.outEdges(n,r))}}Ye.prototype._nodeCount=0;Ye.prototype._edgeCount=0;function Ae(e,n){e[n]?e[n]++:e[n]=1}function ye(e,n){--e[n]||delete e[n]}function L(e,n,r,t){var i=""+n,s=""+r;if(!e&&i>s){var a=i;i=s,s=a}return i+be+s+be+($(t)?Yt:t)}function qt(e,n,r,t){var i=""+n,s=""+r;if(!e&&i>s){var a=i;i=s,s=a}var u={v:i,w:s};return t&&(u.name=t),u}function Y(e,n){return L(e,n.v,n.w,n.name)}export{Ye as G,K as a,tr as b,He as c,Bn as d,ee as e,v as f,Se as g,E as h,$ as i,St as j,T as k,It as l,Re as m,Me as n,Ot as o,kn as p,M as q,Gt as r,U as t,H as v};