import{B as I,C as Ze,S as m,D as y,E as Te,F as qe,G as Xe,H as Je,I as Ee,J as G,K as X,L as Qe,M as me,N as We,O as C,P as x,Q as Oe,R as ve,T as ze,U as Z,V as Ve,W as ke,X as P,Y as en,Z as nn,_ as rn,$ as re,a0 as tn,a1 as sn,a2 as an,a3 as we,a4 as un,a5 as j,a6 as fn,a7 as on,a8 as M,a9 as te,aa as ie}from"../app.CV7ObeM5.js";var dn="[object Symbol]";function J(e){return typeof e=="symbol"||I(e)&&Ze(e)==dn}function $e(e,n){for(var r=-1,t=e==null?0:e.length,i=Array(t);++r-1}function T(e){return Te(e)?qe(e):Xe(e)}var yn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,An=/^\w*$/;function Q(e,n){if(y(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||J(e)?!0:An.test(e)||!yn.test(e)||n!=null&&e in Object(n)}var Tn=500;function En(e){var n=Je(e,function(t){return r.size===Tn&&r.clear(),t}),r=n.cache;return n}var mn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,On=/\\(\\)?/g,vn=En(function(e){var n=[];return e.charCodeAt(0)===46&&n.push(""),e.replace(mn,function(r,t,i,s){n.push(i?s.replace(On,"$1"):t||r)}),n});function wn(e){return e==null?"":Le(e)}function Ie(e,n){return y(e)?e:Q(e,n)?[e]:vn(wn(e))}var $n=1/0;function U(e){if(typeof e=="string"||J(e))return e;var n=e+"";return n=="0"&&1/e==-$n?"-0":n}function Ce(e,n){n=Ie(n,e);for(var r=0,t=n.length;e!=null&&ru))return!1;var l=s.get(e),g=s.get(n);if(l&&g)return l==n&&g==e;var o=-1,h=!0,A=r&Qr?new S:void 0;for(s.set(e,n),s.set(n,e);++o=Ht){var l=Kt(e);if(l)return V(l);a=!1,i=Ge,f=new S}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 Zt(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=M(n)),this._defaultEdgeLabelFn=n,this}edgeCount(){return this._edgeCount}edges(){return H(this._edgeObjs)}setPath(n,r){var t=this,i=arguments;return jt(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=Xt(this._isDirected,n,r,t);return n=f.v,r=f.w,Object.freeze(f),this._edgeObjs[u]=f,ye(this._preds[r],n),ye(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],Ae(this._preds[r],n),Ae(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?D(i,function(s){return s.v===r}):i}}outEdges(n,r){var t=this._out[n];if(t){var i=H(t);return r?D(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 ye(e,n){e[n]?e[n]++:e[n]=1}function Ae(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)?qt:t)}function Xt(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,B as a,In as b,He as c,ln as d,ee as e,v as f,$e as g,E as h,J as i,Ft as j,T as k,St as l,Ie as m,Ce as n,vt as o,wn as p,$ as q,D as r,jt as s,U as t,H as v};