@kestra-io/ui-libs 0.0.258 → 0.0.259
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{VueFlowUtils-CXNqz9kc.cjs → VueFlowUtils-CF-L3pYu.cjs} +2 -2
- package/dist/{VueFlowUtils-CXNqz9kc.cjs.map → VueFlowUtils-CF-L3pYu.cjs.map} +1 -1
- package/dist/{VueFlowUtils-CxR7tTss.js → VueFlowUtils-D6fVYEkI.js} +720 -715
- package/dist/{VueFlowUtils-CxR7tTss.js.map → VueFlowUtils-D6fVYEkI.js.map} +1 -1
- package/dist/components/topology/Topology.vue.d.ts.map +1 -1
- package/dist/kestra-index.cjs.js +10 -10
- package/dist/kestra-index.cjs.js.map +1 -1
- package/dist/kestra-index.es.js +931 -928
- package/dist/kestra-index.es.js.map +1 -1
- package/dist/kestra-vueflowutils.cjs.js +1 -1
- package/dist/kestra-vueflowutils.es.js +20 -19
- package/dist/ui-libs.css +1 -1
- package/dist/utils/VueFlowUtils.d.ts +1 -0
- package/dist/utils/VueFlowUtils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/nodes/BasicNode.vue +10 -10
- package/src/components/topology/Topology.vue +10 -0
- package/src/utils/VueFlowUtils.ts +19 -10
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const B=require("@vue-flow/core"),I=require("./FlowYamlUtils-CB_0RSKT.cjs"),bi=require("vue"),Po=require("humanize-duration"),yi=require("moment"),Mo=require("moment-timezone"),Fo={TASKS:"TASKS",TRIGGERS:"TRIGGERS",TASK_RUNNERS:"TASK_RUNNERS"},Go={EDIT:"edit",DELETE:"delete",SHOW_DESCRIPTION:"showDescription",COLLAPSE:"collapse",EXPAND:"expand",OPEN_LINK:"openLink",ADD_TASK:"addTask",SHOW_LOGS:"showLogs",MOUSE_OVER:"mouseover",MOUSE_LEAVE:"mouseleave",ADD_ERROR:"addError",EXPAND_DEPENDENCIES:"expandDependencies",SHOW_CONDITION:"showCondition",RUN_TASK:"runTask"},ee="cluster_",Do={EXECUTIONS:"executions",TASKRUNS:"taskruns"},Uo={ALL:"all",ERROR:"error",HIDDEN:"hidden",DEFAULT:"all"},$={TASK_WIDTH:184,TASK_HEIGHT:44,TRIGGER_WIDTH:184,TRIGGER_HEIGHT:44,DOT_WIDTH:5,DOT_HEIGHT:5,COLLAPSED_CLUSTER_WIDTH:150,COLLAPSED_CLUSTER_HEIGHT:44,TRIGGER_CLUSTER_WIDTH:350,TRIGGER_CLUSTER_HEIGHT:180},Bo={STORAGE_KEY:"view-type",SOURCE:"source",SOURCE_TOPOLOGY:"source-topology",SOURCE_DOC:"source-doc",TOPOLOGY:"topology",SOURCE_BLUEPRINTS:"source-blueprints"},Ho={DISPLAY_EXECUTIONS_COLUMNS:"displayExecutionsColumns",DISPLAY_FLOW_EXECUTIONS_COLUMNS:"displayFlowExecutionsColumns",SELECTED_TENANT:"selectedTenant",EXECUTE_FLOW_BEHAVIOUR:"executeFlowBehaviour",SHOW_CHART:"showChart",SHOW_FLOWS_CHART:"showFlowsChart",SHOW_LOGS_CHART:"showLogsChart",DEFAULT_NAMESPACE:"defaultNamespace",LATEST_NAMESPACE:"latestNamespace",PAGINATION_SIZE:"paginationSize",IMPERSONATE:"impersonate",EDITOR_VIEW_TYPE:"editorViewType"},Wo={SAME_TAB:"same tab",NEW_TAB:"new tab"},Vo={INPROGRESS:"IN-PROGRESS"};var Oe,mi;function jo(){if(mi)return Oe;mi=1;function e(a){return function(u,n,r){for(var t=-1,s=Object(u),i=r(u),o=i.length;o--;){var d=i[a?o:++t];if(n(s[d],d,s)===!1)break}return u}}return Oe=e,Oe}var Ae,qi;function Zt(){if(qi)return Ae;qi=1;var e=jo(),a=e();return Ae=a,Ae}var Ne,Ei;function Qt(){if(Ei)return Ne;Ei=1;var e=Zt(),a=I.requireKeys();function u(n,r){return n&&e(n,r,a)}return Ne=u,Ne}var ke,wi;function Ko(){if(wi)return ke;wi=1;var e="__lodash_hash_undefined__";function a(u){return this.__data__.set(u,e),this}return ke=a,ke}var xe,Ri;function zo(){if(Ri)return xe;Ri=1;function e(a){return this.__data__.has(a)}return xe=e,xe}var Le,Ii;function Hs(){if(Ii)return Le;Ii=1;var e=I.require_MapCache(),a=Ko(),u=zo();function n(r){var t=-1,s=r==null?0:r.length;for(this.__data__=new e;++t<s;)this.add(r[t])}return n.prototype.add=n.prototype.push=a,n.prototype.has=u,Le=n,Le}var Pe,Ti;function Yo(){if(Ti)return Pe;Ti=1;function e(a,u){for(var n=-1,r=a==null?0:a.length;++n<r;)if(u(a[n],n,a))return!0;return!1}return Pe=e,Pe}var Me,Si;function Ws(){if(Si)return Me;Si=1;function e(a,u){return a.has(u)}return Me=e,Me}var Fe,Ci;function Vs(){if(Ci)return Fe;Ci=1;var e=Hs(),a=Yo(),u=Ws(),n=1,r=2;function t(s,i,o,d,f,c){var h=o&n,l=s.length,q=i.length;if(l!=q&&!(h&&q>l))return!1;var g=c.get(s),v=c.get(i);if(g&&v)return g==i&&v==s;var _=-1,y=!0,b=o&r?new e:void 0;for(c.set(s,i),c.set(i,s);++_<l;){var m=s[_],E=i[_];if(d)var w=h?d(E,m,_,i,s,c):d(m,E,_,s,i,c);if(w!==void 0){if(w)continue;y=!1;break}if(b){if(!a(i,function(p,T){if(!u(b,T)&&(m===p||f(m,p,o,d,c)))return b.push(T)})){y=!1;break}}else if(!(m===E||f(m,E,o,d,c))){y=!1;break}}return c.delete(s),c.delete(i),y}return Fe=t,Fe}var Ge,Oi;function $o(){if(Oi)return Ge;Oi=1;function e(a){var u=-1,n=Array(a.size);return a.forEach(function(r,t){n[++u]=[t,r]}),n}return Ge=e,Ge}var De,Ai;function Jt(){if(Ai)return De;Ai=1;function e(a){var u=-1,n=Array(a.size);return a.forEach(function(r){n[++u]=r}),n}return De=e,De}var Ue,Ni;function Xo(){if(Ni)return Ue;Ni=1;var e=I.require_Symbol(),a=I.require_Uint8Array(),u=I.requireEq(),n=Vs(),r=$o(),t=Jt(),s=1,i=2,o="[object Boolean]",d="[object Date]",f="[object Error]",c="[object Map]",h="[object Number]",l="[object RegExp]",q="[object Set]",g="[object String]",v="[object Symbol]",_="[object ArrayBuffer]",y="[object DataView]",b=e?e.prototype:void 0,m=b?b.valueOf:void 0;function E(w,p,T,C,O,k,x){switch(T){case y:if(w.byteLength!=p.byteLength||w.byteOffset!=p.byteOffset)return!1;w=w.buffer,p=p.buffer;case _:return!(w.byteLength!=p.byteLength||!k(new a(w),new a(p)));case o:case d:case h:return u(+w,+p);case f:return w.name==p.name&&w.message==p.message;case l:case g:return w==p+"";case c:var L=r;case q:var M=C&s;if(L||(L=t),w.size!=p.size&&!M)return!1;var F=x.get(w);if(F)return F==p;C|=i,x.set(w,p);var H=n(L(w),L(p),C,O,k,x);return x.delete(w),H;case v:if(m)return m.call(w)==m.call(p)}return!1}return Ue=E,Ue}var Be,ki;function Zo(){if(ki)return Be;ki=1;var e=I.require_getAllKeys(),a=1,u=Object.prototype,n=u.hasOwnProperty;function r(t,s,i,o,d,f){var c=i&a,h=e(t),l=h.length,q=e(s),g=q.length;if(l!=g&&!c)return!1;for(var v=l;v--;){var _=h[v];if(!(c?_ in s:n.call(s,_)))return!1}var y=f.get(t),b=f.get(s);if(y&&b)return y==s&&b==t;var m=!0;f.set(t,s),f.set(s,t);for(var E=c;++v<l;){_=h[v];var w=t[_],p=s[_];if(o)var T=c?o(p,w,_,s,t,f):o(w,p,_,t,s,f);if(!(T===void 0?w===p||d(w,p,i,o,f):T)){m=!1;break}E||(E=_=="constructor")}if(m&&!E){var C=t.constructor,O=s.constructor;C!=O&&"constructor"in t&&"constructor"in s&&!(typeof C=="function"&&C instanceof C&&typeof O=="function"&&O instanceof O)&&(m=!1)}return f.delete(t),f.delete(s),m}return Be=r,Be}var He,xi;function Qo(){if(xi)return He;xi=1;var e=I.require_Stack(),a=Vs(),u=Xo(),n=Zo(),r=I.require_getTag(),t=I.requireIsArray(),s=I.requireIsBuffer(),i=I.requireIsTypedArray(),o=1,d="[object Arguments]",f="[object Array]",c="[object Object]",h=Object.prototype,l=h.hasOwnProperty;function q(g,v,_,y,b,m){var E=t(g),w=t(v),p=E?f:r(g),T=w?f:r(v);p=p==d?c:p,T=T==d?c:T;var C=p==c,O=T==c,k=p==T;if(k&&s(g)){if(!s(v))return!1;E=!0,C=!1}if(k&&!C)return m||(m=new e),E||i(g)?a(g,v,_,y,b,m):u(g,v,p,_,y,b,m);if(!(_&o)){var x=C&&l.call(g,"__wrapped__"),L=O&&l.call(v,"__wrapped__");if(x||L){var M=x?g.value():g,F=L?v.value():v;return m||(m=new e),b(M,F,_,y,m)}}return k?(m||(m=new e),n(g,v,_,y,b,m)):!1}return He=q,He}var We,Li;function ei(){if(Li)return We;Li=1;var e=Qo(),a=I.requireIsObjectLike();function u(n,r,t,s,i){return n===r?!0:n==null||r==null||!a(n)&&!a(r)?n!==n&&r!==r:e(n,r,t,s,u,i)}return We=u,We}var Ve,Pi;function Jo(){if(Pi)return Ve;Pi=1;var e=I.require_Stack(),a=ei(),u=1,n=2;function r(t,s,i,o){var d=i.length,f=d,c=!o;if(t==null)return!f;for(t=Object(t);d--;){var h=i[d];if(c&&h[2]?h[1]!==t[h[0]]:!(h[0]in t))return!1}for(;++d<f;){h=i[d];var l=h[0],q=t[l],g=h[1];if(c&&h[2]){if(q===void 0&&!(l in t))return!1}else{var v=new e;if(o)var _=o(q,g,l,t,s,v);if(!(_===void 0?a(g,q,u|n,o,v):_))return!1}}return!0}return Ve=r,Ve}var je,Mi;function js(){if(Mi)return je;Mi=1;var e=I.requireIsObject();function a(u){return u===u&&!e(u)}return je=a,je}var Ke,Fi;function ef(){if(Fi)return Ke;Fi=1;var e=js(),a=I.requireKeys();function u(n){for(var r=a(n),t=r.length;t--;){var s=r[t],i=n[s];r[t]=[s,i,e(i)]}return r}return Ke=u,Ke}var ze,Gi;function Ks(){if(Gi)return ze;Gi=1;function e(a,u){return function(n){return n==null?!1:n[a]===u&&(u!==void 0||a in Object(n))}}return ze=e,ze}var Ye,Di;function rf(){if(Di)return Ye;Di=1;var e=Jo(),a=ef(),u=Ks();function n(r){var t=a(r);return t.length==1&&t[0][2]?u(t[0][0],t[0][1]):function(s){return s===r||e(s,r,t)}}return Ye=n,Ye}var $e,Ui;function re(){if(Ui)return $e;Ui=1;var e=I.require_baseGetTag(),a=I.requireIsObjectLike(),u="[object Symbol]";function n(r){return typeof r=="symbol"||a(r)&&e(r)==u}return $e=n,$e}var Xe,Bi;function ri(){if(Bi)return Xe;Bi=1;var e=I.requireIsArray(),a=re(),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function r(t,s){if(e(t))return!1;var i=typeof t;return i=="number"||i=="symbol"||i=="boolean"||t==null||a(t)?!0:n.test(t)||!u.test(t)||s!=null&&t in Object(s)}return Xe=r,Xe}var Ze,Hi;function nf(){if(Hi)return Ze;Hi=1;var e=I.require_MapCache(),a="Expected a function";function u(n,r){if(typeof n!="function"||r!=null&&typeof r!="function")throw new TypeError(a);var t=function(){var s=arguments,i=r?r.apply(this,s):s[0],o=t.cache;if(o.has(i))return o.get(i);var d=n.apply(this,s);return t.cache=o.set(i,d)||o,d};return t.cache=new(u.Cache||e),t}return u.Cache=e,Ze=u,Ze}var Qe,Wi;function tf(){if(Wi)return Qe;Wi=1;var e=nf(),a=500;function u(n){var r=e(n,function(s){return t.size===a&&t.clear(),s}),t=r.cache;return r}return Qe=u,Qe}var Je,Vi;function af(){if(Vi)return Je;Vi=1;var e=tf(),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,n=e(function(r){var t=[];return r.charCodeAt(0)===46&&t.push(""),r.replace(a,function(s,i,o,d){t.push(o?d.replace(u,"$1"):i||s)}),t});return Je=n,Je}var er,ji;function pe(){if(ji)return er;ji=1;function e(a,u){for(var n=-1,r=a==null?0:a.length,t=Array(r);++n<r;)t[n]=u(a[n],n,a);return t}return er=e,er}var rr,Ki;function uf(){if(Ki)return rr;Ki=1;var e=I.require_Symbol(),a=pe(),u=I.requireIsArray(),n=re(),r=e?e.prototype:void 0,t=r?r.toString:void 0;function s(i){if(typeof i=="string")return i;if(u(i))return a(i,s)+"";if(n(i))return t?t.call(i):"";var o=i+"";return o=="0"&&1/i==-1/0?"-0":o}return rr=s,rr}var nr,zi;function zs(){if(zi)return nr;zi=1;var e=uf();function a(u){return u==null?"":e(u)}return nr=a,nr}var tr,Yi;function ge(){if(Yi)return tr;Yi=1;var e=I.requireIsArray(),a=ri(),u=af(),n=zs();function r(t,s){return e(t)?t:a(t,s)?[t]:u(n(t))}return tr=r,tr}var ir,$i;function ue(){if($i)return ir;$i=1;var e=re();function a(u){if(typeof u=="string"||e(u))return u;var n=u+"";return n=="0"&&1/u==-1/0?"-0":n}return ir=a,ir}var ar,Xi;function _e(){if(Xi)return ar;Xi=1;var e=ge(),a=ue();function u(n,r){r=e(r,n);for(var t=0,s=r.length;n!=null&&t<s;)n=n[a(r[t++])];return t&&t==s?n:void 0}return ar=u,ar}var ur,Zi;function sf(){if(Zi)return ur;Zi=1;var e=_e();function a(u,n,r){var t=u==null?void 0:e(u,n);return t===void 0?r:t}return ur=a,ur}var sr,Qi;function of(){if(Qi)return sr;Qi=1;function e(a,u){return a!=null&&u in Object(a)}return sr=e,sr}var or,Ji;function Ys(){if(Ji)return or;Ji=1;var e=ge(),a=I.requireIsArguments(),u=I.requireIsArray(),n=I.require_isIndex(),r=I.requireIsLength(),t=ue();function s(i,o,d){o=e(o,i);for(var f=-1,c=o.length,h=!1;++f<c;){var l=t(o[f]);if(!(h=i!=null&&d(i,l)))break;i=i[l]}return h||++f!=c?h:(c=i==null?0:i.length,!!c&&r(c)&&n(l,c)&&(u(i)||a(i)))}return or=s,or}var fr,ea;function $s(){if(ea)return fr;ea=1;var e=of(),a=Ys();function u(n,r){return n!=null&&a(n,r,e)}return fr=u,fr}var dr,ra;function ff(){if(ra)return dr;ra=1;var e=ei(),a=sf(),u=$s(),n=ri(),r=js(),t=Ks(),s=ue(),i=1,o=2;function d(f,c){return n(f)&&r(c)?t(s(f),c):function(h){var l=a(h,f);return l===void 0&&l===c?u(h,f):e(c,l,i|o)}}return dr=d,dr}var cr,na;function Q(){if(na)return cr;na=1;function e(a){return a}return cr=e,cr}var hr,ta;function Xs(){if(ta)return hr;ta=1;function e(a){return function(u){return u?.[a]}}return hr=e,hr}var lr,ia;function df(){if(ia)return lr;ia=1;var e=_e();function a(u){return function(n){return e(n,u)}}return lr=a,lr}var vr,aa;function cf(){if(aa)return vr;aa=1;var e=Xs(),a=df(),u=ri(),n=ue();function r(t){return u(t)?e(n(t)):a(t)}return vr=r,vr}var pr,ua;function X(){if(ua)return pr;ua=1;var e=rf(),a=ff(),u=Q(),n=I.requireIsArray(),r=cf();function t(s){return typeof s=="function"?s:s==null?u:typeof s=="object"?n(s)?a(s[0],s[1]):e(s):r(s)}return pr=t,pr}var gr,sa;function Zs(){if(sa)return gr;sa=1;var e=I.require_baseAssignValue(),a=Qt(),u=X();function n(r,t){var s={};return t=u(t,3),a(r,function(i,o,d){e(s,o,t(i,o,d))}),s}return gr=n,gr}const hf={en:{y:()=>"y",mo:()=>"mo",w:()=>"w",d:()=>"d",h:()=>"h",m:()=>"m",s:()=>"s",ms:()=>"ms"},fr:{y:()=>"a",mo:()=>"mo",w:()=>"se",d:()=>"j",h:()=>"h",m:()=>"m",s:()=>"s",ms:()=>"ms"}},lf="dateFormat",vf="timezone",pf=e=>e.charAt(0).toUpperCase()+e.slice(1),Qs=(e,a)=>{const u=bi.getCurrentInstance()?.appContext.config.globalProperties.$moment().locale(),n=bi.getCurrentInstance()?.appContext.config.globalProperties.$moment(e).locale(u);let r;return a==="iso"?r="YYYY-MM-DD HH:mm:ss.SSS":r=a??localStorage.getItem(lf)??"llll",n.tz(localStorage.getItem(vf)??Mo.tz.guess()).format(r)};function gf(e,a){return e.split(a).slice(1).join(a)}function Js(e){return yi.duration(e,yi.ISO_8601).asMilliseconds()/1e3}function eo(e,a){return a=a||{maxDecimalPoints:2},a.spacer="",a.language=localStorage.getItem("lang")||"en",a.languages=hf,a.largest=2,typeof e!="number"&&(e=Js(e)),Po(e*1e3,a).replace(/\.([0-9])s$/i,".$10s")}function ro(e){return e.split(".").pop()}function _f(e,a,u){return u.indexOf(e)===a}const de={capitalize:pf,dateFilter:Qs,splitFirst:gf,duration:Js,humanDuration:eo,afterLastDot:ro,distinctFilter:_f};function ni(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var _r,oa;function bf(){if(oa)return _r;oa=1;var e=I.require_baseClone(),a=4;function u(n){return e(n,a)}return _r=u,_r}var br,fa;function ti(){if(fa)return br;fa=1;function e(a){return function(){return a}}return br=e,br}var yr,da;function yf(){if(da)return yr;da=1;var e=I.requireIsArrayLike();function a(u,n){return function(r,t){if(r==null)return r;if(!e(r))return u(r,t);for(var s=r.length,i=n?s:-1,o=Object(r);(n?i--:++i<s)&&t(o[i],i,o)!==!1;);return r}}return yr=a,yr}var mr,ca;function be(){if(ca)return mr;ca=1;var e=Qt(),a=yf(),u=a(e);return mr=u,mr}var qr,ha;function no(){if(ha)return qr;ha=1;var e=Q();function a(u){return typeof u=="function"?u:e}return qr=a,qr}var Er,la;function to(){if(la)return Er;la=1;var e=I.require_arrayEach(),a=be(),u=no(),n=I.requireIsArray();function r(t,s){var i=n(t)?e:a;return i(t,u(s))}return Er=r,Er}var wr,va;function io(){return va||(va=1,wr=to()),wr}var Rr,pa;function mf(){if(pa)return Rr;pa=1;var e=be();function a(u,n){var r=[];return e(u,function(t,s,i){n(t,s,i)&&r.push(t)}),r}return Rr=a,Rr}var Ir,ga;function ao(){if(ga)return Ir;ga=1;var e=I.require_arrayFilter(),a=mf(),u=X(),n=I.requireIsArray();function r(t,s){var i=n(t)?e:a;return i(t,u(s,3))}return Ir=r,Ir}var Tr,_a;function qf(){if(_a)return Tr;_a=1;var e=Object.prototype,a=e.hasOwnProperty;function u(n,r){return n!=null&&a.call(n,r)}return Tr=u,Tr}var Sr,ba;function uo(){if(ba)return Sr;ba=1;var e=qf(),a=Ys();function u(n,r){return n!=null&&a(n,r,e)}return Sr=u,Sr}var Cr,ya;function Ef(){if(ya)return Cr;ya=1;var e=I.require_baseKeys(),a=I.require_getTag(),u=I.requireIsArguments(),n=I.requireIsArray(),r=I.requireIsArrayLike(),t=I.requireIsBuffer(),s=I.require_isPrototype(),i=I.requireIsTypedArray(),o="[object Map]",d="[object Set]",f=Object.prototype,c=f.hasOwnProperty;function h(l){if(l==null)return!0;if(r(l)&&(n(l)||typeof l=="string"||typeof l.splice=="function"||t(l)||i(l)||u(l)))return!l.length;var q=a(l);if(q==o||q==d)return!l.size;if(s(l))return!e(l).length;for(var g in l)if(c.call(l,g))return!1;return!0}return Cr=h,Cr}var Or,ma;function so(){if(ma)return Or;ma=1;function e(a){return a===void 0}return Or=e,Or}var Ar,qa;function oo(){if(qa)return Ar;qa=1;var e=be(),a=I.requireIsArrayLike();function u(n,r){var t=-1,s=a(n)?Array(n.length):[];return e(n,function(i,o,d){s[++t]=r(i,o,d)}),s}return Ar=u,Ar}var Nr,Ea;function fo(){if(Ea)return Nr;Ea=1;var e=pe(),a=X(),u=oo(),n=I.requireIsArray();function r(t,s){var i=n(t)?e:u;return i(t,a(s,3))}return Nr=r,Nr}var kr,wa;function wf(){if(wa)return kr;wa=1;function e(a,u,n,r){var t=-1,s=a==null?0:a.length;for(r&&s&&(n=a[++t]);++t<s;)n=u(n,a[t],t,a);return n}return kr=e,kr}var xr,Ra;function Rf(){if(Ra)return xr;Ra=1;function e(a,u,n,r,t){return t(a,function(s,i,o){n=r?(r=!1,s):u(n,s,i,o)}),n}return xr=e,xr}var Lr,Ia;function co(){if(Ia)return Lr;Ia=1;var e=wf(),a=be(),u=X(),n=Rf(),r=I.requireIsArray();function t(s,i,o){var d=r(s)?e:n,f=arguments.length<3;return d(s,u(i,4),o,f,a)}return Lr=t,Lr}var Pr,Ta;function If(){if(Ta)return Pr;Ta=1;var e=I.require_baseGetTag(),a=I.requireIsArray(),u=I.requireIsObjectLike(),n="[object String]";function r(t){return typeof t=="string"||!a(t)&&u(t)&&e(t)==n}return Pr=r,Pr}var Mr,Sa;function Tf(){if(Sa)return Mr;Sa=1;var e=Xs(),a=e("length");return Mr=a,Mr}var Fr,Ca;function Sf(){if(Ca)return Fr;Ca=1;var e="\\ud800-\\udfff",a="\\u0300-\\u036f",u="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",r=a+u+n,t="\\ufe0e\\ufe0f",s="\\u200d",i=RegExp("["+s+e+r+t+"]");function o(d){return i.test(d)}return Fr=o,Fr}var Gr,Oa;function Cf(){if(Oa)return Gr;Oa=1;var e="\\ud800-\\udfff",a="\\u0300-\\u036f",u="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",r=a+u+n,t="\\ufe0e\\ufe0f",s="["+e+"]",i="["+r+"]",o="\\ud83c[\\udffb-\\udfff]",d="(?:"+i+"|"+o+")",f="[^"+e+"]",c="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",l="\\u200d",q=d+"?",g="["+t+"]?",v="(?:"+l+"(?:"+[f,c,h].join("|")+")"+g+q+")*",_=g+q+v,y="(?:"+[f+i+"?",i,c,h,s].join("|")+")",b=RegExp(o+"(?="+o+")|"+y+_,"g");function m(E){for(var w=b.lastIndex=0;b.test(E);)++w;return w}return Gr=m,Gr}var Dr,Aa;function Of(){if(Aa)return Dr;Aa=1;var e=Tf(),a=Sf(),u=Cf();function n(r){return a(r)?u(r):e(r)}return Dr=n,Dr}var Ur,Na;function Af(){if(Na)return Ur;Na=1;var e=I.require_baseKeys(),a=I.require_getTag(),u=I.requireIsArrayLike(),n=If(),r=Of(),t="[object Map]",s="[object Set]";function i(o){if(o==null)return 0;if(u(o))return n(o)?r(o):o.length;var d=a(o);return d==t||d==s?o.size:e(o).length}return Ur=i,Ur}var Br,ka;function Nf(){if(ka)return Br;ka=1;var e=I.require_arrayEach(),a=I.require_baseCreate(),u=Qt(),n=X(),r=I.require_getPrototype(),t=I.requireIsArray(),s=I.requireIsBuffer(),i=I.requireIsFunction(),o=I.requireIsObject(),d=I.requireIsTypedArray();function f(c,h,l){var q=t(c),g=q||s(c)||d(c);if(h=n(h,4),l==null){var v=c&&c.constructor;g?l=q?new v:[]:o(c)?l=i(v)?a(r(c)):{}:l={}}return(g?e:u)(c,function(_,y,b){return h(l,_,y,b)}),l}return Br=f,Br}var Hr,xa;function kf(){if(xa)return Hr;xa=1;var e=I.require_Symbol(),a=I.requireIsArguments(),u=I.requireIsArray(),n=e?e.isConcatSpreadable:void 0;function r(t){return u(t)||a(t)||!!(n&&t&&t[n])}return Hr=r,Hr}var Wr,La;function ii(){if(La)return Wr;La=1;var e=I.require_arrayPush(),a=kf();function u(n,r,t,s,i){var o=-1,d=n.length;for(t||(t=a),i||(i=[]);++o<d;){var f=n[o];r>0&&t(f)?r>1?u(f,r-1,t,s,i):e(i,f):s||(i[i.length]=f)}return i}return Wr=u,Wr}var Vr,Pa;function xf(){if(Pa)return Vr;Pa=1;function e(a,u,n){switch(n.length){case 0:return a.call(u);case 1:return a.call(u,n[0]);case 2:return a.call(u,n[0],n[1]);case 3:return a.call(u,n[0],n[1],n[2])}return a.apply(u,n)}return Vr=e,Vr}var jr,Ma;function ho(){if(Ma)return jr;Ma=1;var e=xf(),a=Math.max;function u(n,r,t){return r=a(r===void 0?n.length-1:r,0),function(){for(var s=arguments,i=-1,o=a(s.length-r,0),d=Array(o);++i<o;)d[i]=s[r+i];i=-1;for(var f=Array(r+1);++i<r;)f[i]=s[i];return f[r]=t(d),e(n,this,f)}}return jr=u,jr}var Kr,Fa;function Lf(){if(Fa)return Kr;Fa=1;var e=ti(),a=I.require_defineProperty(),u=Q(),n=a?function(r,t){return a(r,"toString",{configurable:!0,enumerable:!1,value:e(t),writable:!0})}:u;return Kr=n,Kr}var zr,Ga;function Pf(){if(Ga)return zr;Ga=1;var e=800,a=16,u=Date.now;function n(r){var t=0,s=0;return function(){var i=u(),o=a-(i-s);if(s=i,o>0){if(++t>=e)return arguments[0]}else t=0;return r.apply(void 0,arguments)}}return zr=n,zr}var Yr,Da;function lo(){if(Da)return Yr;Da=1;var e=Lf(),a=Pf(),u=a(e);return Yr=u,Yr}var $r,Ua;function ye(){if(Ua)return $r;Ua=1;var e=Q(),a=ho(),u=lo();function n(r,t){return u(a(r,t,e),r+"")}return $r=n,$r}var Xr,Ba;function vo(){if(Ba)return Xr;Ba=1;function e(a,u,n,r){for(var t=a.length,s=n+(r?1:-1);r?s--:++s<t;)if(u(a[s],s,a))return s;return-1}return Xr=e,Xr}var Zr,Ha;function Mf(){if(Ha)return Zr;Ha=1;function e(a){return a!==a}return Zr=e,Zr}var Qr,Wa;function Ff(){if(Wa)return Qr;Wa=1;function e(a,u,n){for(var r=n-1,t=a.length;++r<t;)if(a[r]===u)return r;return-1}return Qr=e,Qr}var Jr,Va;function Gf(){if(Va)return Jr;Va=1;var e=vo(),a=Mf(),u=Ff();function n(r,t,s){return t===t?u(r,t,s):e(r,a,s)}return Jr=n,Jr}var en,ja;function Df(){if(ja)return en;ja=1;var e=Gf();function a(u,n){var r=u==null?0:u.length;return!!r&&e(u,n,0)>-1}return en=a,en}var rn,Ka;function Uf(){if(Ka)return rn;Ka=1;function e(a,u,n){for(var r=-1,t=a==null?0:a.length;++r<t;)if(n(u,a[r]))return!0;return!1}return rn=e,rn}var nn,za;function Bf(){if(za)return nn;za=1;function e(){}return nn=e,nn}var tn,Ya;function Hf(){if(Ya)return tn;Ya=1;var e=I.require_Set(),a=Bf(),u=Jt(),n=1/0,r=e&&1/u(new e([,-0]))[1]==n?function(t){return new e(t)}:a;return tn=r,tn}var an,$a;function Wf(){if($a)return an;$a=1;var e=Hs(),a=Df(),u=Uf(),n=Ws(),r=Hf(),t=Jt(),s=200;function i(o,d,f){var c=-1,h=a,l=o.length,q=!0,g=[],v=g;if(f)q=!1,h=u;else if(l>=s){var _=d?null:r(o);if(_)return t(_);q=!1,h=n,v=new e}else v=d?[]:g;e:for(;++c<l;){var y=o[c],b=d?d(y):y;if(y=f||y!==0?y:0,q&&b===b){for(var m=v.length;m--;)if(v[m]===b)continue e;d&&v.push(b),g.push(y)}else h(v,b,f)||(v!==g&&v.push(b),g.push(y))}return g}return an=i,an}var un,Xa;function po(){if(Xa)return un;Xa=1;var e=I.requireIsArrayLike(),a=I.requireIsObjectLike();function u(n){return a(n)&&e(n)}return un=u,un}var sn,Za;function Vf(){if(Za)return sn;Za=1;var e=ii(),a=ye(),u=Wf(),n=po(),r=a(function(t){return u(e(t,1,n,!0))});return sn=r,sn}var on,Qa;function jf(){if(Qa)return on;Qa=1;var e=pe();function a(u,n){return e(n,function(r){return u[r]})}return on=a,on}var fn,Ja;function go(){if(Ja)return fn;Ja=1;var e=jf(),a=I.requireKeys();function u(n){return n==null?[]:e(n,a(n))}return fn=u,fn}var dn,eu;function z(){if(eu)return dn;eu=1;var e;if(typeof ni=="function")try{e={clone:bf(),constant:ti(),each:io(),filter:ao(),has:uo(),isArray:I.requireIsArray(),isEmpty:Ef(),isFunction:I.requireIsFunction(),isUndefined:so(),keys:I.requireKeys(),map:fo(),reduce:co(),size:Af(),transform:Nf(),union:Vf(),values:go()}}catch{}return e||(e=window._),dn=e,dn}var cn,ru;function ai(){if(ru)return cn;ru=1;var e=z();cn=r;var a="\0",u="\0",n="";function r(f){this._isDirected=e.has(f,"directed")?f.directed:!0,this._isMultigraph=e.has(f,"multigraph")?f.multigraph:!1,this._isCompound=e.has(f,"compound")?f.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[u]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}r.prototype._nodeCount=0,r.prototype._edgeCount=0,r.prototype.isDirected=function(){return this._isDirected},r.prototype.isMultigraph=function(){return this._isMultigraph},r.prototype.isCompound=function(){return this._isCompound},r.prototype.setGraph=function(f){return this._label=f,this},r.prototype.graph=function(){return this._label},r.prototype.setDefaultNodeLabel=function(f){return e.isFunction(f)||(f=e.constant(f)),this._defaultNodeLabelFn=f,this},r.prototype.nodeCount=function(){return this._nodeCount},r.prototype.nodes=function(){return e.keys(this._nodes)},r.prototype.sources=function(){var f=this;return e.filter(this.nodes(),function(c){return e.isEmpty(f._in[c])})},r.prototype.sinks=function(){var f=this;return e.filter(this.nodes(),function(c){return e.isEmpty(f._out[c])})},r.prototype.setNodes=function(f,c){var h=arguments,l=this;return e.each(f,function(q){h.length>1?l.setNode(q,c):l.setNode(q)}),this},r.prototype.setNode=function(f,c){return e.has(this._nodes,f)?(arguments.length>1&&(this._nodes[f]=c),this):(this._nodes[f]=arguments.length>1?c:this._defaultNodeLabelFn(f),this._isCompound&&(this._parent[f]=u,this._children[f]={},this._children[u][f]=!0),this._in[f]={},this._preds[f]={},this._out[f]={},this._sucs[f]={},++this._nodeCount,this)},r.prototype.node=function(f){return this._nodes[f]},r.prototype.hasNode=function(f){return e.has(this._nodes,f)},r.prototype.removeNode=function(f){var c=this;if(e.has(this._nodes,f)){var h=function(l){c.removeEdge(c._edgeObjs[l])};delete this._nodes[f],this._isCompound&&(this._removeFromParentsChildList(f),delete this._parent[f],e.each(this.children(f),function(l){c.setParent(l)}),delete this._children[f]),e.each(e.keys(this._in[f]),h),delete this._in[f],delete this._preds[f],e.each(e.keys(this._out[f]),h),delete this._out[f],delete this._sucs[f],--this._nodeCount}return this},r.prototype.setParent=function(f,c){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(c))c=u;else{c+="";for(var h=c;!e.isUndefined(h);h=this.parent(h))if(h===f)throw new Error("Setting "+c+" as parent of "+f+" would create a cycle");this.setNode(c)}return this.setNode(f),this._removeFromParentsChildList(f),this._parent[f]=c,this._children[c][f]=!0,this},r.prototype._removeFromParentsChildList=function(f){delete this._children[this._parent[f]][f]},r.prototype.parent=function(f){if(this._isCompound){var c=this._parent[f];if(c!==u)return c}},r.prototype.children=function(f){if(e.isUndefined(f)&&(f=u),this._isCompound){var c=this._children[f];if(c)return e.keys(c)}else{if(f===u)return this.nodes();if(this.hasNode(f))return[]}},r.prototype.predecessors=function(f){var c=this._preds[f];if(c)return e.keys(c)},r.prototype.successors=function(f){var c=this._sucs[f];if(c)return e.keys(c)},r.prototype.neighbors=function(f){var c=this.predecessors(f);if(c)return e.union(c,this.successors(f))},r.prototype.isLeaf=function(f){var c;return this.isDirected()?c=this.successors(f):c=this.neighbors(f),c.length===0},r.prototype.filterNodes=function(f){var c=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});c.setGraph(this.graph());var h=this;e.each(this._nodes,function(g,v){f(v)&&c.setNode(v,g)}),e.each(this._edgeObjs,function(g){c.hasNode(g.v)&&c.hasNode(g.w)&&c.setEdge(g,h.edge(g))});var l={};function q(g){var v=h.parent(g);return v===void 0||c.hasNode(v)?(l[g]=v,v):v in l?l[v]:q(v)}return this._isCompound&&e.each(c.nodes(),function(g){c.setParent(g,q(g))}),c},r.prototype.setDefaultEdgeLabel=function(f){return e.isFunction(f)||(f=e.constant(f)),this._defaultEdgeLabelFn=f,this},r.prototype.edgeCount=function(){return this._edgeCount},r.prototype.edges=function(){return e.values(this._edgeObjs)},r.prototype.setPath=function(f,c){var h=this,l=arguments;return e.reduce(f,function(q,g){return l.length>1?h.setEdge(q,g,c):h.setEdge(q,g),g}),this},r.prototype.setEdge=function(){var f,c,h,l,q=!1,g=arguments[0];typeof g=="object"&&g!==null&&"v"in g?(f=g.v,c=g.w,h=g.name,arguments.length===2&&(l=arguments[1],q=!0)):(f=g,c=arguments[1],h=arguments[3],arguments.length>2&&(l=arguments[2],q=!0)),f=""+f,c=""+c,e.isUndefined(h)||(h=""+h);var v=i(this._isDirected,f,c,h);if(e.has(this._edgeLabels,v))return q&&(this._edgeLabels[v]=l),this;if(!e.isUndefined(h)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(f),this.setNode(c),this._edgeLabels[v]=q?l:this._defaultEdgeLabelFn(f,c,h);var _=o(this._isDirected,f,c,h);return f=_.v,c=_.w,Object.freeze(_),this._edgeObjs[v]=_,t(this._preds[c],f),t(this._sucs[f],c),this._in[c][v]=_,this._out[f][v]=_,this._edgeCount++,this},r.prototype.edge=function(f,c,h){var l=arguments.length===1?d(this._isDirected,arguments[0]):i(this._isDirected,f,c,h);return this._edgeLabels[l]},r.prototype.hasEdge=function(f,c,h){var l=arguments.length===1?d(this._isDirected,arguments[0]):i(this._isDirected,f,c,h);return e.has(this._edgeLabels,l)},r.prototype.removeEdge=function(f,c,h){var l=arguments.length===1?d(this._isDirected,arguments[0]):i(this._isDirected,f,c,h),q=this._edgeObjs[l];return q&&(f=q.v,c=q.w,delete this._edgeLabels[l],delete this._edgeObjs[l],s(this._preds[c],f),s(this._sucs[f],c),delete this._in[c][l],delete this._out[f][l],this._edgeCount--),this},r.prototype.inEdges=function(f,c){var h=this._in[f];if(h){var l=e.values(h);return c?e.filter(l,function(q){return q.v===c}):l}},r.prototype.outEdges=function(f,c){var h=this._out[f];if(h){var l=e.values(h);return c?e.filter(l,function(q){return q.w===c}):l}},r.prototype.nodeEdges=function(f,c){var h=this.inEdges(f,c);if(h)return h.concat(this.outEdges(f,c))};function t(f,c){f[c]?f[c]++:f[c]=1}function s(f,c){--f[c]||delete f[c]}function i(f,c,h,l){var q=""+c,g=""+h;if(!f&&q>g){var v=q;q=g,g=v}return q+n+g+n+(e.isUndefined(l)?a:l)}function o(f,c,h,l){var q=""+c,g=""+h;if(!f&&q>g){var v=q;q=g,g=v}var _={v:q,w:g};return l&&(_.name=l),_}function d(f,c){return i(f,c.v,c.w,c.name)}return cn}var hn,nu;function Kf(){return nu||(nu=1,hn="2.1.8"),hn}var ln,tu;function zf(){return tu||(tu=1,ln={Graph:ai(),version:Kf()}),ln}var vn,iu;function Yf(){if(iu)return vn;iu=1;var e=z(),a=ai();vn={write:u,read:t};function u(s){var i={options:{directed:s.isDirected(),multigraph:s.isMultigraph(),compound:s.isCompound()},nodes:n(s),edges:r(s)};return e.isUndefined(s.graph())||(i.value=e.clone(s.graph())),i}function n(s){return e.map(s.nodes(),function(i){var o=s.node(i),d=s.parent(i),f={v:i};return e.isUndefined(o)||(f.value=o),e.isUndefined(d)||(f.parent=d),f})}function r(s){return e.map(s.edges(),function(i){var o=s.edge(i),d={v:i.v,w:i.w};return e.isUndefined(i.name)||(d.name=i.name),e.isUndefined(o)||(d.value=o),d})}function t(s){var i=new a(s.options).setGraph(s.value);return e.each(s.nodes,function(o){i.setNode(o.v,o.value),o.parent&&i.setParent(o.v,o.parent)}),e.each(s.edges,function(o){i.setEdge({v:o.v,w:o.w,name:o.name},o.value)}),i}return vn}var pn,au;function $f(){if(au)return pn;au=1;var e=z();pn=a;function a(u){var n={},r=[],t;function s(i){e.has(n,i)||(n[i]=!0,t.push(i),e.each(u.successors(i),s),e.each(u.predecessors(i),s))}return e.each(u.nodes(),function(i){t=[],s(i),t.length&&r.push(t)}),r}return pn}var gn,uu;function _o(){if(uu)return gn;uu=1;var e=z();gn=a;function a(){this._arr=[],this._keyIndices={}}return a.prototype.size=function(){return this._arr.length},a.prototype.keys=function(){return this._arr.map(function(u){return u.key})},a.prototype.has=function(u){return e.has(this._keyIndices,u)},a.prototype.priority=function(u){var n=this._keyIndices[u];if(n!==void 0)return this._arr[n].priority},a.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},a.prototype.add=function(u,n){var r=this._keyIndices;if(u=String(u),!e.has(r,u)){var t=this._arr,s=t.length;return r[u]=s,t.push({key:u,priority:n}),this._decrease(s),!0}return!1},a.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var u=this._arr.pop();return delete this._keyIndices[u.key],this._heapify(0),u.key},a.prototype.decrease=function(u,n){var r=this._keyIndices[u];if(n>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+u+" Old: "+this._arr[r].priority+" New: "+n);this._arr[r].priority=n,this._decrease(r)},a.prototype._heapify=function(u){var n=this._arr,r=2*u,t=r+1,s=u;r<n.length&&(s=n[r].priority<n[s].priority?r:s,t<n.length&&(s=n[t].priority<n[s].priority?t:s),s!==u&&(this._swap(u,s),this._heapify(s)))},a.prototype._decrease=function(u){for(var n=this._arr,r=n[u].priority,t;u!==0&&(t=u>>1,!(n[t].priority<r));)this._swap(u,t),u=t},a.prototype._swap=function(u,n){var r=this._arr,t=this._keyIndices,s=r[u],i=r[n];r[u]=i,r[n]=s,t[i.key]=u,t[s.key]=n},gn}var _n,su;function bo(){if(su)return _n;su=1;var e=z(),a=_o();_n=n;var u=e.constant(1);function n(t,s,i,o){return r(t,String(s),i||u,o||function(d){return t.outEdges(d)})}function r(t,s,i,o){var d={},f=new a,c,h,l=function(q){var g=q.v!==c?q.v:q.w,v=d[g],_=i(q),y=h.distance+_;if(_<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+q+" Weight: "+_);y<v.distance&&(v.distance=y,v.predecessor=c,f.decrease(g,y))};for(t.nodes().forEach(function(q){var g=q===s?0:Number.POSITIVE_INFINITY;d[q]={distance:g},f.add(q,g)});f.size()>0&&(c=f.removeMin(),h=d[c],h.distance!==Number.POSITIVE_INFINITY);)o(c).forEach(l);return d}return _n}var bn,ou;function Xf(){if(ou)return bn;ou=1;var e=bo(),a=z();bn=u;function u(n,r,t){return a.transform(n.nodes(),function(s,i){s[i]=e(n,i,r,t)},{})}return bn}var yn,fu;function yo(){if(fu)return yn;fu=1;var e=z();yn=a;function a(u){var n=0,r=[],t={},s=[];function i(o){var d=t[o]={onStack:!0,lowlink:n,index:n++};if(r.push(o),u.successors(o).forEach(function(h){e.has(t,h)?t[h].onStack&&(d.lowlink=Math.min(d.lowlink,t[h].index)):(i(h),d.lowlink=Math.min(d.lowlink,t[h].lowlink))}),d.lowlink===d.index){var f=[],c;do c=r.pop(),t[c].onStack=!1,f.push(c);while(o!==c);s.push(f)}}return u.nodes().forEach(function(o){e.has(t,o)||i(o)}),s}return yn}var mn,du;function Zf(){if(du)return mn;du=1;var e=z(),a=yo();mn=u;function u(n){return e.filter(a(n),function(r){return r.length>1||r.length===1&&n.hasEdge(r[0],r[0])})}return mn}var qn,cu;function Qf(){if(cu)return qn;cu=1;var e=z();qn=u;var a=e.constant(1);function u(r,t,s){return n(r,t||a,s||function(i){return r.outEdges(i)})}function n(r,t,s){var i={},o=r.nodes();return o.forEach(function(d){i[d]={},i[d][d]={distance:0},o.forEach(function(f){d!==f&&(i[d][f]={distance:Number.POSITIVE_INFINITY})}),s(d).forEach(function(f){var c=f.v===d?f.w:f.v,h=t(f);i[d][c]={distance:h,predecessor:d}})}),o.forEach(function(d){var f=i[d];o.forEach(function(c){var h=i[c];o.forEach(function(l){var q=h[d],g=f[l],v=h[l],_=q.distance+g.distance;_<v.distance&&(v.distance=_,v.predecessor=g.predecessor)})})}),i}return qn}var En,hu;function mo(){if(hu)return En;hu=1;var e=z();En=a,a.CycleException=u;function a(n){var r={},t={},s=[];function i(o){if(e.has(t,o))throw new u;e.has(r,o)||(t[o]=!0,r[o]=!0,e.each(n.predecessors(o),i),delete t[o],s.push(o))}if(e.each(n.sinks(),i),e.size(r)!==n.nodeCount())throw new u;return s}function u(){}return u.prototype=new Error,En}var wn,lu;function Jf(){if(lu)return wn;lu=1;var e=mo();wn=a;function a(u){try{e(u)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return wn}var Rn,vu;function qo(){if(vu)return Rn;vu=1;var e=z();Rn=a;function a(n,r,t){e.isArray(r)||(r=[r]);var s=(n.isDirected()?n.successors:n.neighbors).bind(n),i=[],o={};return e.each(r,function(d){if(!n.hasNode(d))throw new Error("Graph does not have node: "+d);u(n,d,t==="post",o,s,i)}),i}function u(n,r,t,s,i,o){e.has(s,r)||(s[r]=!0,t||o.push(r),e.each(i(r),function(d){u(n,d,t,s,i,o)}),t&&o.push(r))}return Rn}var In,pu;function ed(){if(pu)return In;pu=1;var e=qo();In=a;function a(u,n){return e(u,n,"post")}return In}var Tn,gu;function rd(){if(gu)return Tn;gu=1;var e=qo();Tn=a;function a(u,n){return e(u,n,"pre")}return Tn}var Sn,_u;function nd(){if(_u)return Sn;_u=1;var e=z(),a=ai(),u=_o();Sn=n;function n(r,t){var s=new a,i={},o=new u,d;function f(h){var l=h.v===d?h.w:h.v,q=o.priority(l);if(q!==void 0){var g=t(h);g<q&&(i[l]=d,o.decrease(l,g))}}if(r.nodeCount()===0)return s;e.each(r.nodes(),function(h){o.add(h,Number.POSITIVE_INFINITY),s.setNode(h)}),o.decrease(r.nodes()[0],0);for(var c=!1;o.size()>0;){if(d=o.removeMin(),e.has(i,d))s.setEdge(d,i[d]);else{if(c)throw new Error("Input graph is not connected: "+r);c=!0}r.nodeEdges(d).forEach(f)}return s}return Sn}var Cn,bu;function td(){return bu||(bu=1,Cn={components:$f(),dijkstra:bo(),dijkstraAll:Xf(),findCycles:Zf(),floydWarshall:Qf(),isAcyclic:Jf(),postorder:ed(),preorder:rd(),prim:nd(),tarjan:yo(),topsort:mo()}),Cn}var On,yu;function id(){if(yu)return On;yu=1;var e=zf();return On={Graph:e.Graph,json:Yf(),alg:td(),version:e.version},On}var An,mu;function Y(){if(mu)return An;mu=1;var e;if(typeof ni=="function")try{e=id()}catch{}return e||(e=window.graphlib),An=e,An}var Nn,qu;function me(){if(qu)return Nn;qu=1;var e=I.requireEq(),a=I.requireIsArrayLike(),u=I.require_isIndex(),n=I.requireIsObject();function r(t,s,i){if(!n(i))return!1;var o=typeof s;return(o=="number"?a(i)&&u(s,i.length):o=="string"&&s in i)?e(i[s],t):!1}return Nn=r,Nn}var kn,Eu;function ad(){if(Eu)return kn;Eu=1;var e=ye(),a=I.requireEq(),u=me(),n=I.requireKeysIn(),r=Object.prototype,t=r.hasOwnProperty,s=e(function(i,o){i=Object(i);var d=-1,f=o.length,c=f>2?o[2]:void 0;for(c&&u(o[0],o[1],c)&&(f=1);++d<f;)for(var h=o[d],l=n(h),q=-1,g=l.length;++q<g;){var v=l[q],_=i[v];(_===void 0||a(_,r[v])&&!t.call(i,v))&&(i[v]=h[v])}return i});return kn=s,kn}var xn,wu;function ud(){if(wu)return xn;wu=1;var e=X(),a=I.requireIsArrayLike(),u=I.requireKeys();function n(r){return function(t,s,i){var o=Object(t);if(!a(t)){var d=e(s,3);t=u(t),s=function(c){return d(o[c],c,o)}}var f=r(t,s,i);return f>-1?o[d?t[f]:f]:void 0}}return xn=n,xn}var Ln,Ru;function sd(){if(Ru)return Ln;Ru=1;var e=/\s/;function a(u){for(var n=u.length;n--&&e.test(u.charAt(n)););return n}return Ln=a,Ln}var Pn,Iu;function od(){if(Iu)return Pn;Iu=1;var e=sd(),a=/^\s+/;function u(n){return n&&n.slice(0,e(n)+1).replace(a,"")}return Pn=u,Pn}var Mn,Tu;function fd(){if(Tu)return Mn;Tu=1;var e=od(),a=I.requireIsObject(),u=re(),n=NaN,r=/^[-+]0x[0-9a-f]+$/i,t=/^0b[01]+$/i,s=/^0o[0-7]+$/i,i=parseInt;function o(d){if(typeof d=="number")return d;if(u(d))return n;if(a(d)){var f=typeof d.valueOf=="function"?d.valueOf():d;d=a(f)?f+"":f}if(typeof d!="string")return d===0?d:+d;d=e(d);var c=t.test(d);return c||s.test(d)?i(d.slice(2),c?2:8):r.test(d)?n:+d}return Mn=o,Mn}var Fn,Su;function Eo(){if(Su)return Fn;Su=1;var e=fd(),a=1/0,u=17976931348623157e292;function n(r){if(!r)return r===0?r:0;if(r=e(r),r===a||r===-a){var t=r<0?-1:1;return t*u}return r===r?r:0}return Fn=n,Fn}var Gn,Cu;function dd(){if(Cu)return Gn;Cu=1;var e=Eo();function a(u){var n=e(u),r=n%1;return n===n?r?n-r:n:0}return Gn=a,Gn}var Dn,Ou;function cd(){if(Ou)return Dn;Ou=1;var e=vo(),a=X(),u=dd(),n=Math.max;function r(t,s,i){var o=t==null?0:t.length;if(!o)return-1;var d=i==null?0:u(i);return d<0&&(d=n(o+d,0)),e(t,a(s,3),d)}return Dn=r,Dn}var Un,Au;function hd(){if(Au)return Un;Au=1;var e=ud(),a=cd(),u=e(a);return Un=u,Un}var Bn,Nu;function wo(){if(Nu)return Bn;Nu=1;var e=ii();function a(u){var n=u==null?0:u.length;return n?e(u,1):[]}return Bn=a,Bn}var Hn,ku;function ld(){if(ku)return Hn;ku=1;var e=Zt(),a=no(),u=I.requireKeysIn();function n(r,t){return r==null?r:e(r,a(t),u)}return Hn=n,Hn}var Wn,xu;function vd(){if(xu)return Wn;xu=1;function e(a){var u=a==null?0:a.length;return u?a[u-1]:void 0}return Wn=e,Wn}var Vn,Lu;function ui(){if(Lu)return Vn;Lu=1;var e=re();function a(u,n,r){for(var t=-1,s=u.length;++t<s;){var i=u[t],o=n(i);if(o!=null&&(d===void 0?o===o&&!e(o):r(o,d)))var d=o,f=i}return f}return Vn=a,Vn}var jn,Pu;function pd(){if(Pu)return jn;Pu=1;function e(a,u){return a>u}return jn=e,jn}var Kn,Mu;function gd(){if(Mu)return Kn;Mu=1;var e=ui(),a=pd(),u=Q();function n(r){return r&&r.length?e(r,u,a):void 0}return Kn=n,Kn}var zn,Fu;function Ro(){if(Fu)return zn;Fu=1;var e=I.require_baseAssignValue(),a=I.requireEq();function u(n,r,t){(t!==void 0&&!a(n[r],t)||t===void 0&&!(r in n))&&e(n,r,t)}return zn=u,zn}var Yn,Gu;function _d(){if(Gu)return Yn;Gu=1;var e=I.require_baseGetTag(),a=I.require_getPrototype(),u=I.requireIsObjectLike(),n="[object Object]",r=Function.prototype,t=Object.prototype,s=r.toString,i=t.hasOwnProperty,o=s.call(Object);function d(f){if(!u(f)||e(f)!=n)return!1;var c=a(f);if(c===null)return!0;var h=i.call(c,"constructor")&&c.constructor;return typeof h=="function"&&h instanceof h&&s.call(h)==o}return Yn=d,Yn}var $n,Du;function Io(){if(Du)return $n;Du=1;function e(a,u){if(!(u==="constructor"&&typeof a[u]=="function")&&u!="__proto__")return a[u]}return $n=e,$n}var Xn,Uu;function bd(){if(Uu)return Xn;Uu=1;var e=I.require_copyObject(),a=I.requireKeysIn();function u(n){return e(n,a(n))}return Xn=u,Xn}var Zn,Bu;function yd(){if(Bu)return Zn;Bu=1;var e=Ro(),a=I.require_cloneBuffer(),u=I.require_cloneTypedArray(),n=I.require_copyArray(),r=I.require_initCloneObject(),t=I.requireIsArguments(),s=I.requireIsArray(),i=po(),o=I.requireIsBuffer(),d=I.requireIsFunction(),f=I.requireIsObject(),c=_d(),h=I.requireIsTypedArray(),l=Io(),q=bd();function g(v,_,y,b,m,E,w){var p=l(v,y),T=l(_,y),C=w.get(T);if(C){e(v,y,C);return}var O=E?E(p,T,y+"",v,_,w):void 0,k=O===void 0;if(k){var x=s(T),L=!x&&o(T),M=!x&&!L&&h(T);O=T,x||L||M?s(p)?O=p:i(p)?O=n(p):L?(k=!1,O=a(T,!0)):M?(k=!1,O=u(T,!0)):O=[]:c(T)||t(T)?(O=p,t(p)?O=q(p):(!f(p)||d(p))&&(O=r(T))):k=!1}k&&(w.set(T,O),m(O,T,b,E,w),w.delete(T)),e(v,y,O)}return Zn=g,Zn}var Qn,Hu;function md(){if(Hu)return Qn;Hu=1;var e=I.require_Stack(),a=Ro(),u=Zt(),n=yd(),r=I.requireIsObject(),t=I.requireKeysIn(),s=Io();function i(o,d,f,c,h){o!==d&&u(d,function(l,q){if(h||(h=new e),r(l))n(o,d,q,f,i,c,h);else{var g=c?c(s(o,q),l,q+"",o,d,h):void 0;g===void 0&&(g=l),a(o,q,g)}},t)}return Qn=i,Qn}var Jn,Wu;function qd(){if(Wu)return Jn;Wu=1;var e=ye(),a=me();function u(n){return e(function(r,t){var s=-1,i=t.length,o=i>1?t[i-1]:void 0,d=i>2?t[2]:void 0;for(o=n.length>3&&typeof o=="function"?(i--,o):void 0,d&&a(t[0],t[1],d)&&(o=i<3?void 0:o,i=1),r=Object(r);++s<i;){var f=t[s];f&&n(r,f,s,o)}return r})}return Jn=u,Jn}var et,Vu;function Ed(){if(Vu)return et;Vu=1;var e=md(),a=qd(),u=a(function(n,r,t){e(n,r,t)});return et=u,et}var rt,ju;function To(){if(ju)return rt;ju=1;function e(a,u){return a<u}return rt=e,rt}var nt,Ku;function wd(){if(Ku)return nt;Ku=1;var e=ui(),a=To(),u=Q();function n(r){return r&&r.length?e(r,u,a):void 0}return nt=n,nt}var tt,zu;function Rd(){if(zu)return tt;zu=1;var e=ui(),a=X(),u=To();function n(r,t){return r&&r.length?e(r,a(t,2),u):void 0}return tt=n,tt}var it,Yu;function Id(){if(Yu)return it;Yu=1;var e=I.require_root(),a=function(){return e.Date.now()};return it=a,it}var at,$u;function Td(){if($u)return at;$u=1;var e=I.require_assignValue(),a=ge(),u=I.require_isIndex(),n=I.requireIsObject(),r=ue();function t(s,i,o,d){if(!n(s))return s;i=a(i,s);for(var f=-1,c=i.length,h=c-1,l=s;l!=null&&++f<c;){var q=r(i[f]),g=o;if(q==="__proto__"||q==="constructor"||q==="prototype")return s;if(f!=h){var v=l[q];g=d?d(v,q,l):void 0,g===void 0&&(g=n(v)?v:u(i[f+1])?[]:{})}e(l,q,g),l=l[q]}return s}return at=t,at}var ut,Xu;function Sd(){if(Xu)return ut;Xu=1;var e=_e(),a=Td(),u=ge();function n(r,t,s){for(var i=-1,o=t.length,d={};++i<o;){var f=t[i],c=e(r,f);s(c,f)&&a(d,u(f,r),c)}return d}return ut=n,ut}var st,Zu;function Cd(){if(Zu)return st;Zu=1;var e=Sd(),a=$s();function u(n,r){return e(n,r,function(t,s){return a(n,s)})}return st=u,st}var ot,Qu;function Od(){if(Qu)return ot;Qu=1;var e=wo(),a=ho(),u=lo();function n(r){return u(a(r,void 0,e),r+"")}return ot=n,ot}var ft,Ju;function Ad(){if(Ju)return ft;Ju=1;var e=Cd(),a=Od(),u=a(function(n,r){return n==null?{}:e(n,r)});return ft=u,ft}var dt,es;function Nd(){if(es)return dt;es=1;var e=Math.ceil,a=Math.max;function u(n,r,t,s){for(var i=-1,o=a(e((r-n)/(t||1)),0),d=Array(o);o--;)d[s?o:++i]=n,n+=t;return d}return dt=u,dt}var ct,rs;function kd(){if(rs)return ct;rs=1;var e=Nd(),a=me(),u=Eo();function n(r){return function(t,s,i){return i&&typeof i!="number"&&a(t,s,i)&&(s=i=void 0),t=u(t),s===void 0?(s=t,t=0):s=u(s),i=i===void 0?t<s?1:-1:u(i),e(t,s,i,r)}}return ct=n,ct}var ht,ns;function xd(){if(ns)return ht;ns=1;var e=kd(),a=e();return ht=a,ht}var lt,ts;function Ld(){if(ts)return lt;ts=1;function e(a,u){var n=a.length;for(a.sort(u);n--;)a[n]=a[n].value;return a}return lt=e,lt}var vt,is;function Pd(){if(is)return vt;is=1;var e=re();function a(u,n){if(u!==n){var r=u!==void 0,t=u===null,s=u===u,i=e(u),o=n!==void 0,d=n===null,f=n===n,c=e(n);if(!d&&!c&&!i&&u>n||i&&o&&f&&!d&&!c||t&&o&&f||!r&&f||!s)return 1;if(!t&&!i&&!c&&u<n||c&&r&&s&&!t&&!i||d&&r&&s||!o&&s||!f)return-1}return 0}return vt=a,vt}var pt,as;function Md(){if(as)return pt;as=1;var e=Pd();function a(u,n,r){for(var t=-1,s=u.criteria,i=n.criteria,o=s.length,d=r.length;++t<o;){var f=e(s[t],i[t]);if(f){if(t>=d)return f;var c=r[t];return f*(c=="desc"?-1:1)}}return u.index-n.index}return pt=a,pt}var gt,us;function Fd(){if(us)return gt;us=1;var e=pe(),a=_e(),u=X(),n=oo(),r=Ld(),t=I.require_baseUnary(),s=Md(),i=Q(),o=I.requireIsArray();function d(f,c,h){c.length?c=e(c,function(g){return o(g)?function(v){return a(v,g.length===1?g[0]:g)}:g}):c=[i];var l=-1;c=e(c,t(u));var q=n(f,function(g,v,_){var y=e(c,function(b){return b(g)});return{criteria:y,index:++l,value:g}});return r(q,function(g,v){return s(g,v,h)})}return gt=d,gt}var _t,ss;function Gd(){if(ss)return _t;ss=1;var e=ii(),a=Fd(),u=ye(),n=me(),r=u(function(t,s){if(t==null)return[];var i=s.length;return i>1&&n(t,s[0],s[1])?s=[]:i>2&&n(s[0],s[1],s[2])&&(s=[s[0]]),a(t,e(s,1),[])});return _t=r,_t}var bt,os;function Dd(){if(os)return bt;os=1;var e=zs(),a=0;function u(n){var r=++a;return e(n)+r}return bt=u,bt}var yt,fs;function Ud(){if(fs)return yt;fs=1;function e(a,u,n){for(var r=-1,t=a.length,s=u.length,i={};++r<t;){var o=r<s?u[r]:void 0;n(i,a[r],o)}return i}return yt=e,yt}var mt,ds;function Bd(){if(ds)return mt;ds=1;var e=I.require_assignValue(),a=Ud();function u(n,r){return a(n||[],r||[],e)}return mt=u,mt}var qt,cs;function G(){if(cs)return qt;cs=1;var e;if(typeof ni=="function")try{e={cloneDeep:I.requireCloneDeep(),constant:ti(),defaults:ad(),each:io(),filter:ao(),find:hd(),flatten:wo(),forEach:to(),forIn:ld(),has:uo(),isUndefined:so(),last:vd(),map:fo(),mapValues:Zs(),max:gd(),merge:Ed(),min:wd(),minBy:Rd(),now:Id(),pick:Ad(),range:xd(),reduce:co(),sortBy:Gd(),uniqueId:Dd(),values:go(),zipObject:Bd()}}catch{}return e||(e=window._),qt=e,qt}var Et,hs;function Hd(){if(hs)return Et;hs=1,Et=e;function e(){var n={};n._next=n._prev=n,this._sentinel=n}e.prototype.dequeue=function(){var n=this._sentinel,r=n._prev;if(r!==n)return a(r),r},e.prototype.enqueue=function(n){var r=this._sentinel;n._prev&&n._next&&a(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r},e.prototype.toString=function(){for(var n=[],r=this._sentinel,t=r._prev;t!==r;)n.push(JSON.stringify(t,u)),t=t._prev;return"["+n.join(", ")+"]"};function a(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function u(n,r){if(n!=="_next"&&n!=="_prev")return r}return Et}var wt,ls;function Wd(){if(ls)return wt;ls=1;var e=G(),a=Y().Graph,u=Hd();wt=r;var n=e.constant(1);function r(d,f){if(d.nodeCount()<=1)return[];var c=i(d,f||n),h=t(c.graph,c.buckets,c.zeroIdx);return e.flatten(e.map(h,function(l){return d.outEdges(l.v,l.w)}),!0)}function t(d,f,c){for(var h=[],l=f[f.length-1],q=f[0],g;d.nodeCount();){for(;g=q.dequeue();)s(d,f,c,g);for(;g=l.dequeue();)s(d,f,c,g);if(d.nodeCount()){for(var v=f.length-2;v>0;--v)if(g=f[v].dequeue(),g){h=h.concat(s(d,f,c,g,!0));break}}}return h}function s(d,f,c,h,l){var q=l?[]:void 0;return e.forEach(d.inEdges(h.v),function(g){var v=d.edge(g),_=d.node(g.v);l&&q.push({v:g.v,w:g.w}),_.out-=v,o(f,c,_)}),e.forEach(d.outEdges(h.v),function(g){var v=d.edge(g),_=g.w,y=d.node(_);y.in-=v,o(f,c,y)}),d.removeNode(h.v),q}function i(d,f){var c=new a,h=0,l=0;e.forEach(d.nodes(),function(v){c.setNode(v,{v,in:0,out:0})}),e.forEach(d.edges(),function(v){var _=c.edge(v.v,v.w)||0,y=f(v),b=_+y;c.setEdge(v.v,v.w,b),l=Math.max(l,c.node(v.v).out+=y),h=Math.max(h,c.node(v.w).in+=y)});var q=e.range(l+h+3).map(function(){return new u}),g=h+1;return e.forEach(c.nodes(),function(v){o(q,g,c.node(v))}),{graph:c,buckets:q,zeroIdx:g}}function o(d,f,c){c.out?c.in?d[c.out-c.in+f].enqueue(c):d[d.length-1].enqueue(c):d[0].enqueue(c)}return wt}var Rt,vs;function Vd(){if(vs)return Rt;vs=1;var e=G(),a=Wd();Rt={run:u,undo:r};function u(t){var s=t.graph().acyclicer==="greedy"?a(t,i(t)):n(t);e.forEach(s,function(o){var d=t.edge(o);t.removeEdge(o),d.forwardName=o.name,d.reversed=!0,t.setEdge(o.w,o.v,d,e.uniqueId("rev"))});function i(o){return function(d){return o.edge(d).weight}}}function n(t){var s=[],i={},o={};function d(f){e.has(o,f)||(o[f]=!0,i[f]=!0,e.forEach(t.outEdges(f),function(c){e.has(i,c.w)?s.push(c):d(c.w)}),delete i[f])}return e.forEach(t.nodes(),d),s}function r(t){e.forEach(t.edges(),function(s){var i=t.edge(s);if(i.reversed){t.removeEdge(s);var o=i.forwardName;delete i.reversed,delete i.forwardName,t.setEdge(s.w,s.v,i,o)}})}return Rt}var It,ps;function V(){if(ps)return It;ps=1;var e=G(),a=Y().Graph;It={addDummyNode:u,simplify:n,asNonCompoundGraph:r,successorWeights:t,predecessorWeights:s,intersectRect:i,buildLayerMatrix:o,normalizeRanks:d,removeEmptyRanks:f,addBorderNode:c,maxRank:h,partition:l,time:q,notime:g};function u(v,_,y,b){var m;do m=e.uniqueId(b);while(v.hasNode(m));return y.dummy=_,v.setNode(m,y),m}function n(v){var _=new a().setGraph(v.graph());return e.forEach(v.nodes(),function(y){_.setNode(y,v.node(y))}),e.forEach(v.edges(),function(y){var b=_.edge(y.v,y.w)||{weight:0,minlen:1},m=v.edge(y);_.setEdge(y.v,y.w,{weight:b.weight+m.weight,minlen:Math.max(b.minlen,m.minlen)})}),_}function r(v){var _=new a({multigraph:v.isMultigraph()}).setGraph(v.graph());return e.forEach(v.nodes(),function(y){v.children(y).length||_.setNode(y,v.node(y))}),e.forEach(v.edges(),function(y){_.setEdge(y,v.edge(y))}),_}function t(v){var _=e.map(v.nodes(),function(y){var b={};return e.forEach(v.outEdges(y),function(m){b[m.w]=(b[m.w]||0)+v.edge(m).weight}),b});return e.zipObject(v.nodes(),_)}function s(v){var _=e.map(v.nodes(),function(y){var b={};return e.forEach(v.inEdges(y),function(m){b[m.v]=(b[m.v]||0)+v.edge(m).weight}),b});return e.zipObject(v.nodes(),_)}function i(v,_){var y=v.x,b=v.y,m=_.x-y,E=_.y-b,w=v.width/2,p=v.height/2;if(!m&&!E)throw new Error("Not possible to find intersection inside of the rectangle");var T,C;return Math.abs(E)*w>Math.abs(m)*p?(E<0&&(p=-p),T=p*m/E,C=p):(m<0&&(w=-w),T=w,C=w*E/m),{x:y+T,y:b+C}}function o(v){var _=e.map(e.range(h(v)+1),function(){return[]});return e.forEach(v.nodes(),function(y){var b=v.node(y),m=b.rank;e.isUndefined(m)||(_[m][b.order]=y)}),_}function d(v){var _=e.min(e.map(v.nodes(),function(y){return v.node(y).rank}));e.forEach(v.nodes(),function(y){var b=v.node(y);e.has(b,"rank")&&(b.rank-=_)})}function f(v){var _=e.min(e.map(v.nodes(),function(E){return v.node(E).rank})),y=[];e.forEach(v.nodes(),function(E){var w=v.node(E).rank-_;y[w]||(y[w]=[]),y[w].push(E)});var b=0,m=v.graph().nodeRankFactor;e.forEach(y,function(E,w){e.isUndefined(E)&&w%m!==0?--b:b&&e.forEach(E,function(p){v.node(p).rank+=b})})}function c(v,_,y,b){var m={width:0,height:0};return arguments.length>=4&&(m.rank=y,m.order=b),u(v,"border",m,_)}function h(v){return e.max(e.map(v.nodes(),function(_){var y=v.node(_).rank;if(!e.isUndefined(y))return y}))}function l(v,_){var y={lhs:[],rhs:[]};return e.forEach(v,function(b){_(b)?y.lhs.push(b):y.rhs.push(b)}),y}function q(v,_){var y=e.now();try{return _()}finally{console.log(v+" time: "+(e.now()-y)+"ms")}}function g(v,_){return _()}return It}var Tt,gs;function jd(){if(gs)return Tt;gs=1;var e=G(),a=V();Tt={run:u,undo:r};function u(t){t.graph().dummyChains=[],e.forEach(t.edges(),function(s){n(t,s)})}function n(t,s){var i=s.v,o=t.node(i).rank,d=s.w,f=t.node(d).rank,c=s.name,h=t.edge(s),l=h.labelRank;if(f!==o+1){t.removeEdge(s);var q,g,v;for(v=0,++o;o<f;++v,++o)h.points=[],g={width:0,height:0,edgeLabel:h,edgeObj:s,rank:o},q=a.addDummyNode(t,"edge",g,"_d"),o===l&&(g.width=h.width,g.height=h.height,g.dummy="edge-label",g.labelpos=h.labelpos),t.setEdge(i,q,{weight:h.weight},c),v===0&&t.graph().dummyChains.push(q),i=q;t.setEdge(i,d,{weight:h.weight},c)}}function r(t){e.forEach(t.graph().dummyChains,function(s){var i=t.node(s),o=i.edgeLabel,d;for(t.setEdge(i.edgeObj,o);i.dummy;)d=t.successors(s)[0],t.removeNode(s),o.points.push({x:i.x,y:i.y}),i.dummy==="edge-label"&&(o.x=i.x,o.y=i.y,o.width=i.width,o.height=i.height),s=d,i=t.node(s)})}return Tt}var St,_s;function ce(){if(_s)return St;_s=1;var e=G();St={longestPath:a,slack:u};function a(n){var r={};function t(s){var i=n.node(s);if(e.has(r,s))return i.rank;r[s]=!0;var o=e.min(e.map(n.outEdges(s),function(d){return t(d.w)-n.edge(d).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),i.rank=o}e.forEach(n.sources(),t)}function u(n,r){return n.node(r.w).rank-n.node(r.v).rank-n.edge(r).minlen}return St}var Ct,bs;function So(){if(bs)return Ct;bs=1;var e=G(),a=Y().Graph,u=ce().slack;Ct=n;function n(i){var o=new a({directed:!1}),d=i.nodes()[0],f=i.nodeCount();o.setNode(d,{});for(var c,h;r(o,i)<f;)c=t(o,i),h=o.hasNode(c.v)?u(i,c):-u(i,c),s(o,i,h);return o}function r(i,o){function d(f){e.forEach(o.nodeEdges(f),function(c){var h=c.v,l=f===h?c.w:h;!i.hasNode(l)&&!u(o,c)&&(i.setNode(l,{}),i.setEdge(f,l,{}),d(l))})}return e.forEach(i.nodes(),d),i.nodeCount()}function t(i,o){return e.minBy(o.edges(),function(d){if(i.hasNode(d.v)!==i.hasNode(d.w))return u(o,d)})}function s(i,o,d){e.forEach(i.nodes(),function(f){o.node(f).rank+=d})}return Ct}var Ot,ys;function Kd(){if(ys)return Ot;ys=1;var e=G(),a=So(),u=ce().slack,n=ce().longestPath,r=Y().alg.preorder,t=Y().alg.postorder,s=V().simplify;Ot=i,i.initLowLimValues=c,i.initCutValues=o,i.calcCutValue=f,i.leaveEdge=l,i.enterEdge=q,i.exchangeEdges=g;function i(b){b=s(b),n(b);var m=a(b);c(m),o(m,b);for(var E,w;E=l(m);)w=q(m,b,E),g(m,b,E,w)}function o(b,m){var E=t(b,b.nodes());E=E.slice(0,E.length-1),e.forEach(E,function(w){d(b,m,w)})}function d(b,m,E){var w=b.node(E),p=w.parent;b.edge(E,p).cutvalue=f(b,m,E)}function f(b,m,E){var w=b.node(E),p=w.parent,T=!0,C=m.edge(E,p),O=0;return C||(T=!1,C=m.edge(p,E)),O=C.weight,e.forEach(m.nodeEdges(E),function(k){var x=k.v===E,L=x?k.w:k.v;if(L!==p){var M=x===T,F=m.edge(k).weight;if(O+=M?F:-F,_(b,E,L)){var H=b.edge(E,L).cutvalue;O+=M?-H:H}}}),O}function c(b,m){arguments.length<2&&(m=b.nodes()[0]),h(b,{},1,m)}function h(b,m,E,w,p){var T=E,C=b.node(w);return m[w]=!0,e.forEach(b.neighbors(w),function(O){e.has(m,O)||(E=h(b,m,E,O,w))}),C.low=T,C.lim=E++,p?C.parent=p:delete C.parent,E}function l(b){return e.find(b.edges(),function(m){return b.edge(m).cutvalue<0})}function q(b,m,E){var w=E.v,p=E.w;m.hasEdge(w,p)||(w=E.w,p=E.v);var T=b.node(w),C=b.node(p),O=T,k=!1;T.lim>C.lim&&(O=C,k=!0);var x=e.filter(m.edges(),function(L){return k===y(b,b.node(L.v),O)&&k!==y(b,b.node(L.w),O)});return e.minBy(x,function(L){return u(m,L)})}function g(b,m,E,w){var p=E.v,T=E.w;b.removeEdge(p,T),b.setEdge(w.v,w.w,{}),c(b),o(b,m),v(b,m)}function v(b,m){var E=e.find(b.nodes(),function(p){return!m.node(p).parent}),w=r(b,E);w=w.slice(1),e.forEach(w,function(p){var T=b.node(p).parent,C=m.edge(p,T),O=!1;C||(C=m.edge(T,p),O=!0),m.node(p).rank=m.node(T).rank+(O?C.minlen:-C.minlen)})}function _(b,m,E){return b.hasEdge(m,E)}function y(b,m,E){return E.low<=m.lim&&m.lim<=E.lim}return Ot}var At,ms;function zd(){if(ms)return At;ms=1;var e=ce(),a=e.longestPath,u=So(),n=Kd();At=r;function r(o){switch(o.graph().ranker){case"network-simplex":i(o);break;case"tight-tree":s(o);break;case"longest-path":t(o);break;default:i(o)}}var t=a;function s(o){a(o),u(o)}function i(o){n(o)}return At}var Nt,qs;function Yd(){if(qs)return Nt;qs=1;var e=G();Nt=a;function a(r){var t=n(r);e.forEach(r.graph().dummyChains,function(s){for(var i=r.node(s),o=i.edgeObj,d=u(r,t,o.v,o.w),f=d.path,c=d.lca,h=0,l=f[h],q=!0;s!==o.w;){if(i=r.node(s),q){for(;(l=f[h])!==c&&r.node(l).maxRank<i.rank;)h++;l===c&&(q=!1)}if(!q){for(;h<f.length-1&&r.node(l=f[h+1]).minRank<=i.rank;)h++;l=f[h]}r.setParent(s,l),s=r.successors(s)[0]}})}function u(r,t,s,i){var o=[],d=[],f=Math.min(t[s].low,t[i].low),c=Math.max(t[s].lim,t[i].lim),h,l;h=s;do h=r.parent(h),o.push(h);while(h&&(t[h].low>f||c>t[h].lim));for(l=h,h=i;(h=r.parent(h))!==l;)d.push(h);return{path:o.concat(d.reverse()),lca:l}}function n(r){var t={},s=0;function i(o){var d=s;e.forEach(r.children(o),i),t[o]={low:d,lim:s++}}return e.forEach(r.children(),i),t}return Nt}var kt,Es;function $d(){if(Es)return kt;Es=1;var e=G(),a=V();kt={run:u,cleanup:s};function u(i){var o=a.addDummyNode(i,"root",{},"_root"),d=r(i),f=e.max(e.values(d))-1,c=2*f+1;i.graph().nestingRoot=o,e.forEach(i.edges(),function(l){i.edge(l).minlen*=c});var h=t(i)+1;e.forEach(i.children(),function(l){n(i,o,c,h,f,d,l)}),i.graph().nodeRankFactor=c}function n(i,o,d,f,c,h,l){var q=i.children(l);if(!q.length){l!==o&&i.setEdge(o,l,{weight:0,minlen:d});return}var g=a.addBorderNode(i,"_bt"),v=a.addBorderNode(i,"_bb"),_=i.node(l);i.setParent(g,l),_.borderTop=g,i.setParent(v,l),_.borderBottom=v,e.forEach(q,function(y){n(i,o,d,f,c,h,y);var b=i.node(y),m=b.borderTop?b.borderTop:y,E=b.borderBottom?b.borderBottom:y,w=b.borderTop?f:2*f,p=m!==E?1:c-h[l]+1;i.setEdge(g,m,{weight:w,minlen:p,nestingEdge:!0}),i.setEdge(E,v,{weight:w,minlen:p,nestingEdge:!0})}),i.parent(l)||i.setEdge(o,g,{weight:0,minlen:c+h[l]})}function r(i){var o={};function d(f,c){var h=i.children(f);h&&h.length&&e.forEach(h,function(l){d(l,c+1)}),o[f]=c}return e.forEach(i.children(),function(f){d(f,1)}),o}function t(i){return e.reduce(i.edges(),function(o,d){return o+i.edge(d).weight},0)}function s(i){var o=i.graph();i.removeNode(o.nestingRoot),delete o.nestingRoot,e.forEach(i.edges(),function(d){var f=i.edge(d);f.nestingEdge&&i.removeEdge(d)})}return kt}var xt,ws;function Xd(){if(ws)return xt;ws=1;var e=G(),a=V();xt=u;function u(r){function t(s){var i=r.children(s),o=r.node(s);if(i.length&&e.forEach(i,t),e.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var d=o.minRank,f=o.maxRank+1;d<f;++d)n(r,"borderLeft","_bl",s,o,d),n(r,"borderRight","_br",s,o,d)}}e.forEach(r.children(),t)}function n(r,t,s,i,o,d){var f={width:0,height:0,rank:d,borderType:t},c=o[t][d-1],h=a.addDummyNode(r,"border",f,s);o[t][d]=h,r.setParent(h,i),c&&r.setEdge(c,h,{weight:1})}return xt}var Lt,Rs;function Zd(){if(Rs)return Lt;Rs=1;var e=G();Lt={adjust:a,undo:u};function a(d){var f=d.graph().rankdir.toLowerCase();(f==="lr"||f==="rl")&&n(d)}function u(d){var f=d.graph().rankdir.toLowerCase();(f==="bt"||f==="rl")&&t(d),(f==="lr"||f==="rl")&&(i(d),n(d))}function n(d){e.forEach(d.nodes(),function(f){r(d.node(f))}),e.forEach(d.edges(),function(f){r(d.edge(f))})}function r(d){var f=d.width;d.width=d.height,d.height=f}function t(d){e.forEach(d.nodes(),function(f){s(d.node(f))}),e.forEach(d.edges(),function(f){var c=d.edge(f);e.forEach(c.points,s),e.has(c,"y")&&s(c)})}function s(d){d.y=-d.y}function i(d){e.forEach(d.nodes(),function(f){o(d.node(f))}),e.forEach(d.edges(),function(f){var c=d.edge(f);e.forEach(c.points,o),e.has(c,"x")&&o(c)})}function o(d){var f=d.x;d.x=d.y,d.y=f}return Lt}var Pt,Is;function Qd(){if(Is)return Pt;Is=1;var e=G();Pt=a;function a(u){var n={},r=e.filter(u.nodes(),function(d){return!u.children(d).length}),t=e.max(e.map(r,function(d){return u.node(d).rank})),s=e.map(e.range(t+1),function(){return[]});function i(d){if(!e.has(n,d)){n[d]=!0;var f=u.node(d);s[f.rank].push(d),e.forEach(u.successors(d),i)}}var o=e.sortBy(r,function(d){return u.node(d).rank});return e.forEach(o,i),s}return Pt}var Mt,Ts;function Jd(){if(Ts)return Mt;Ts=1;var e=G();Mt=a;function a(n,r){for(var t=0,s=1;s<r.length;++s)t+=u(n,r[s-1],r[s]);return t}function u(n,r,t){for(var s=e.zipObject(t,e.map(t,function(h,l){return l})),i=e.flatten(e.map(r,function(h){return e.sortBy(e.map(n.outEdges(h),function(l){return{pos:s[l.w],weight:n.edge(l).weight}}),"pos")}),!0),o=1;o<t.length;)o<<=1;var d=2*o-1;o-=1;var f=e.map(new Array(d),function(){return 0}),c=0;return e.forEach(i.forEach(function(h){var l=h.pos+o;f[l]+=h.weight;for(var q=0;l>0;)l%2&&(q+=f[l+1]),l=l-1>>1,f[l]+=h.weight;c+=h.weight*q})),c}return Mt}var Ft,Ss;function ec(){if(Ss)return Ft;Ss=1;var e=G();Ft=a;function a(u,n){return e.map(n,function(r){var t=u.inEdges(r);if(t.length){var s=e.reduce(t,function(i,o){var d=u.edge(o),f=u.node(o.v);return{sum:i.sum+d.weight*f.order,weight:i.weight+d.weight}},{sum:0,weight:0});return{v:r,barycenter:s.sum/s.weight,weight:s.weight}}else return{v:r}})}return Ft}var Gt,Cs;function rc(){if(Cs)return Gt;Cs=1;var e=G();Gt=a;function a(r,t){var s={};e.forEach(r,function(o,d){var f=s[o.v]={indegree:0,in:[],out:[],vs:[o.v],i:d};e.isUndefined(o.barycenter)||(f.barycenter=o.barycenter,f.weight=o.weight)}),e.forEach(t.edges(),function(o){var d=s[o.v],f=s[o.w];!e.isUndefined(d)&&!e.isUndefined(f)&&(f.indegree++,d.out.push(s[o.w]))});var i=e.filter(s,function(o){return!o.indegree});return u(i)}function u(r){var t=[];function s(d){return function(f){f.merged||(e.isUndefined(f.barycenter)||e.isUndefined(d.barycenter)||f.barycenter>=d.barycenter)&&n(d,f)}}function i(d){return function(f){f.in.push(d),--f.indegree===0&&r.push(f)}}for(;r.length;){var o=r.pop();t.push(o),e.forEach(o.in.reverse(),s(o)),e.forEach(o.out,i(o))}return e.map(e.filter(t,function(d){return!d.merged}),function(d){return e.pick(d,["vs","i","barycenter","weight"])})}function n(r,t){var s=0,i=0;r.weight&&(s+=r.barycenter*r.weight,i+=r.weight),t.weight&&(s+=t.barycenter*t.weight,i+=t.weight),r.vs=t.vs.concat(r.vs),r.barycenter=s/i,r.weight=i,r.i=Math.min(t.i,r.i),t.merged=!0}return Gt}var Dt,Os;function nc(){if(Os)return Dt;Os=1;var e=G(),a=V();Dt=u;function u(t,s){var i=a.partition(t,function(g){return e.has(g,"barycenter")}),o=i.lhs,d=e.sortBy(i.rhs,function(g){return-g.i}),f=[],c=0,h=0,l=0;o.sort(r(!!s)),l=n(f,d,l),e.forEach(o,function(g){l+=g.vs.length,f.push(g.vs),c+=g.barycenter*g.weight,h+=g.weight,l=n(f,d,l)});var q={vs:e.flatten(f,!0)};return h&&(q.barycenter=c/h,q.weight=h),q}function n(t,s,i){for(var o;s.length&&(o=e.last(s)).i<=i;)s.pop(),t.push(o.vs),i++;return i}function r(t){return function(s,i){return s.barycenter<i.barycenter?-1:s.barycenter>i.barycenter?1:t?i.i-s.i:s.i-i.i}}return Dt}var Ut,As;function tc(){if(As)return Ut;As=1;var e=G(),a=ec(),u=rc(),n=nc();Ut=r;function r(i,o,d,f){var c=i.children(o),h=i.node(o),l=h?h.borderLeft:void 0,q=h?h.borderRight:void 0,g={};l&&(c=e.filter(c,function(E){return E!==l&&E!==q}));var v=a(i,c);e.forEach(v,function(E){if(i.children(E.v).length){var w=r(i,E.v,d,f);g[E.v]=w,e.has(w,"barycenter")&&s(E,w)}});var _=u(v,d);t(_,g);var y=n(_,f);if(l&&(y.vs=e.flatten([l,y.vs,q],!0),i.predecessors(l).length)){var b=i.node(i.predecessors(l)[0]),m=i.node(i.predecessors(q)[0]);e.has(y,"barycenter")||(y.barycenter=0,y.weight=0),y.barycenter=(y.barycenter*y.weight+b.order+m.order)/(y.weight+2),y.weight+=2}return y}function t(i,o){e.forEach(i,function(d){d.vs=e.flatten(d.vs.map(function(f){return o[f]?o[f].vs:f}),!0)})}function s(i,o){e.isUndefined(i.barycenter)?(i.barycenter=o.barycenter,i.weight=o.weight):(i.barycenter=(i.barycenter*i.weight+o.barycenter*o.weight)/(i.weight+o.weight),i.weight+=o.weight)}return Ut}var Bt,Ns;function ic(){if(Ns)return Bt;Ns=1;var e=G(),a=Y().Graph;Bt=u;function u(r,t,s){var i=n(r),o=new a({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(d){return r.node(d)});return e.forEach(r.nodes(),function(d){var f=r.node(d),c=r.parent(d);(f.rank===t||f.minRank<=t&&t<=f.maxRank)&&(o.setNode(d),o.setParent(d,c||i),e.forEach(r[s](d),function(h){var l=h.v===d?h.w:h.v,q=o.edge(l,d),g=e.isUndefined(q)?0:q.weight;o.setEdge(l,d,{weight:r.edge(h).weight+g})}),e.has(f,"minRank")&&o.setNode(d,{borderLeft:f.borderLeft[t],borderRight:f.borderRight[t]}))}),o}function n(r){for(var t;r.hasNode(t=e.uniqueId("_root")););return t}return Bt}var Ht,ks;function ac(){if(ks)return Ht;ks=1;var e=G();Ht=a;function a(u,n,r){var t={},s;e.forEach(r,function(i){for(var o=u.parent(i),d,f;o;){if(d=u.parent(o),d?(f=t[d],t[d]=o):(f=s,s=o),f&&f!==o){n.setEdge(f,o);return}o=d}})}return Ht}var Wt,xs;function uc(){if(xs)return Wt;xs=1;var e=G(),a=Qd(),u=Jd(),n=tc(),r=ic(),t=ac(),s=Y().Graph,i=V();Wt=o;function o(h){var l=i.maxRank(h),q=d(h,e.range(1,l+1),"inEdges"),g=d(h,e.range(l-1,-1,-1),"outEdges"),v=a(h);c(h,v);for(var _=Number.POSITIVE_INFINITY,y,b=0,m=0;m<4;++b,++m){f(b%2?q:g,b%4>=2),v=i.buildLayerMatrix(h);var E=u(h,v);E<_&&(m=0,y=e.cloneDeep(v),_=E)}c(h,y)}function d(h,l,q){return e.map(l,function(g){return r(h,g,q)})}function f(h,l){var q=new s;e.forEach(h,function(g){var v=g.graph().root,_=n(g,v,q,l);e.forEach(_.vs,function(y,b){g.node(y).order=b}),t(g,q,_.vs)})}function c(h,l){e.forEach(l,function(q){e.forEach(q,function(g,v){h.node(g).order=v})})}return Wt}var Vt,Ls;function sc(){if(Ls)return Vt;Ls=1;var e=G(),a=Y().Graph,u=V();Vt={positionX:q,findType1Conflicts:n,findType2Conflicts:r,addConflict:s,hasConflict:i,verticalAlignment:o,horizontalCompaction:d,alignCoordinates:h,findSmallestWidthAlignment:c,balance:l};function n(_,y){var b={};function m(E,w){var p=0,T=0,C=E.length,O=e.last(w);return e.forEach(w,function(k,x){var L=t(_,k),M=L?_.node(L).order:C;(L||k===O)&&(e.forEach(w.slice(T,x+1),function(F){e.forEach(_.predecessors(F),function(H){var oe=_.node(H),fe=oe.order;(fe<p||M<fe)&&!(oe.dummy&&_.node(F).dummy)&&s(b,H,F)})}),T=x+1,p=M)}),w}return e.reduce(y,m),b}function r(_,y){var b={};function m(w,p,T,C,O){var k;e.forEach(e.range(p,T),function(x){k=w[x],_.node(k).dummy&&e.forEach(_.predecessors(k),function(L){var M=_.node(L);M.dummy&&(M.order<C||M.order>O)&&s(b,L,k)})})}function E(w,p){var T=-1,C,O=0;return e.forEach(p,function(k,x){if(_.node(k).dummy==="border"){var L=_.predecessors(k);L.length&&(C=_.node(L[0]).order,m(p,O,x,T,C),O=x,T=C)}m(p,O,p.length,C,w.length)}),p}return e.reduce(y,E),b}function t(_,y){if(_.node(y).dummy)return e.find(_.predecessors(y),function(b){return _.node(b).dummy})}function s(_,y,b){if(y>b){var m=y;y=b,b=m}var E=_[y];E||(_[y]=E={}),E[b]=!0}function i(_,y,b){if(y>b){var m=y;y=b,b=m}return e.has(_[y],b)}function o(_,y,b,m){var E={},w={},p={};return e.forEach(y,function(T){e.forEach(T,function(C,O){E[C]=C,w[C]=C,p[C]=O})}),e.forEach(y,function(T){var C=-1;e.forEach(T,function(O){var k=m(O);if(k.length){k=e.sortBy(k,function(H){return p[H]});for(var x=(k.length-1)/2,L=Math.floor(x),M=Math.ceil(x);L<=M;++L){var F=k[L];w[O]===O&&C<p[F]&&!i(b,O,F)&&(w[F]=O,w[O]=E[O]=E[F],C=p[F])}}})}),{root:E,align:w}}function d(_,y,b,m,E){var w={},p=f(_,y,b,E),T=E?"borderLeft":"borderRight";function C(x,L){for(var M=p.nodes(),F=M.pop(),H={};F;)H[F]?x(F):(H[F]=!0,M.push(F),M=M.concat(L(F))),F=M.pop()}function O(x){w[x]=p.inEdges(x).reduce(function(L,M){return Math.max(L,w[M.v]+p.edge(M))},0)}function k(x){var L=p.outEdges(x).reduce(function(F,H){return Math.min(F,w[H.w]-p.edge(H))},Number.POSITIVE_INFINITY),M=_.node(x);L!==Number.POSITIVE_INFINITY&&M.borderType!==T&&(w[x]=Math.max(w[x],L))}return C(O,p.predecessors.bind(p)),C(k,p.successors.bind(p)),e.forEach(m,function(x){w[x]=w[b[x]]}),w}function f(_,y,b,m){var E=new a,w=_.graph(),p=g(w.nodesep,w.edgesep,m);return e.forEach(y,function(T){var C;e.forEach(T,function(O){var k=b[O];if(E.setNode(k),C){var x=b[C],L=E.edge(x,k);E.setEdge(x,k,Math.max(p(_,O,C),L||0))}C=O})}),E}function c(_,y){return e.minBy(e.values(y),function(b){var m=Number.NEGATIVE_INFINITY,E=Number.POSITIVE_INFINITY;return e.forIn(b,function(w,p){var T=v(_,p)/2;m=Math.max(w+T,m),E=Math.min(w-T,E)}),m-E})}function h(_,y){var b=e.values(y),m=e.min(b),E=e.max(b);e.forEach(["u","d"],function(w){e.forEach(["l","r"],function(p){var T=w+p,C=_[T],O;if(C!==y){var k=e.values(C);O=p==="l"?m-e.min(k):E-e.max(k),O&&(_[T]=e.mapValues(C,function(x){return x+O}))}})})}function l(_,y){return e.mapValues(_.ul,function(b,m){if(y)return _[y.toLowerCase()][m];var E=e.sortBy(e.map(_,m));return(E[1]+E[2])/2})}function q(_){var y=u.buildLayerMatrix(_),b=e.merge(n(_,y),r(_,y)),m={},E;e.forEach(["u","d"],function(p){E=p==="u"?y:e.values(y).reverse(),e.forEach(["l","r"],function(T){T==="r"&&(E=e.map(E,function(x){return e.values(x).reverse()}));var C=(p==="u"?_.predecessors:_.successors).bind(_),O=o(_,E,b,C),k=d(_,E,O.root,O.align,T==="r");T==="r"&&(k=e.mapValues(k,function(x){return-x})),m[p+T]=k})});var w=c(_,m);return h(m,w),l(m,_.graph().align)}function g(_,y,b){return function(m,E,w){var p=m.node(E),T=m.node(w),C=0,O;if(C+=p.width/2,e.has(p,"labelpos"))switch(p.labelpos.toLowerCase()){case"l":O=-p.width/2;break;case"r":O=p.width/2;break}if(O&&(C+=b?O:-O),O=0,C+=(p.dummy?y:_)/2,C+=(T.dummy?y:_)/2,C+=T.width/2,e.has(T,"labelpos"))switch(T.labelpos.toLowerCase()){case"l":O=T.width/2;break;case"r":O=-T.width/2;break}return O&&(C+=b?O:-O),O=0,C}}function v(_,y){return _.node(y).width}return Vt}var jt,Ps;function oc(){if(Ps)return jt;Ps=1;var e=G(),a=V(),u=sc().positionX;jt=n;function n(t){t=a.asNonCompoundGraph(t),r(t),e.forEach(u(t),function(s,i){t.node(i).x=s})}function r(t){var s=a.buildLayerMatrix(t),i=t.graph().ranksep,o=0;e.forEach(s,function(d){var f=e.max(e.map(d,function(c){return t.node(c).height}));e.forEach(d,function(c){t.node(c).y=o+f/2}),o+=f+i})}return jt}var Kt,Ms;function fc(){if(Ms)return Kt;Ms=1;var e=G(),a=Vd(),u=jd(),n=zd(),r=V().normalizeRanks,t=Yd(),s=V().removeEmptyRanks,i=$d(),o=Xd(),d=Zd(),f=uc(),c=oc(),h=V(),l=Y().Graph;Kt=q;function q(R,S){var A=S&&S.debugTiming?h.time:h.notime;A("layout",function(){var N=A(" buildLayoutGraph",function(){return C(R)});A(" runLayout",function(){g(N,A)}),A(" updateInputGraph",function(){v(R,N)})})}function g(R,S){S(" makeSpaceForEdgeLabels",function(){O(R)}),S(" removeSelfEdges",function(){ko(R)}),S(" acyclic",function(){a.run(R)}),S(" nestingGraph.run",function(){i.run(R)}),S(" rank",function(){n(h.asNonCompoundGraph(R))}),S(" injectEdgeLabelProxies",function(){k(R)}),S(" removeEmptyRanks",function(){s(R)}),S(" nestingGraph.cleanup",function(){i.cleanup(R)}),S(" normalizeRanks",function(){r(R)}),S(" assignRankMinMax",function(){x(R)}),S(" removeEdgeLabelProxies",function(){L(R)}),S(" normalize.run",function(){u.run(R)}),S(" parentDummyChains",function(){t(R)}),S(" addBorderSegments",function(){o(R)}),S(" order",function(){f(R)}),S(" insertSelfEdges",function(){xo(R)}),S(" adjustCoordinateSystem",function(){d.adjust(R)}),S(" position",function(){c(R)}),S(" positionSelfEdges",function(){Lo(R)}),S(" removeBorderNodes",function(){fe(R)}),S(" normalize.undo",function(){u.undo(R)}),S(" fixupEdgeLabelCoords",function(){H(R)}),S(" undoCoordinateSystem",function(){d.undo(R)}),S(" translateGraph",function(){M(R)}),S(" assignNodeIntersects",function(){F(R)}),S(" reversePoints",function(){oe(R)}),S(" acyclic.undo",function(){a.undo(R)})}function v(R,S){e.forEach(R.nodes(),function(A){var N=R.node(A),P=S.node(A);N&&(N.x=P.x,N.y=P.y,S.children(A).length&&(N.width=P.width,N.height=P.height))}),e.forEach(R.edges(),function(A){var N=R.edge(A),P=S.edge(A);N.points=P.points,e.has(P,"x")&&(N.x=P.x,N.y=P.y)}),R.graph().width=S.graph().width,R.graph().height=S.graph().height}var _=["nodesep","edgesep","ranksep","marginx","marginy"],y={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],m=["width","height"],E={width:0,height:0},w=["minlen","weight","width","height","labeloffset"],p={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},T=["labelpos"];function C(R){var S=new l({multigraph:!0,compound:!0}),A=Ce(R.graph());return S.setGraph(e.merge({},y,Se(A,_),e.pick(A,b))),e.forEach(R.nodes(),function(N){var P=Ce(R.node(N));S.setNode(N,e.defaults(Se(P,m),E)),S.setParent(N,R.parent(N))}),e.forEach(R.edges(),function(N){var P=Ce(R.edge(N));S.setEdge(N,e.merge({},p,Se(P,w),e.pick(P,T)))}),S}function O(R){var S=R.graph();S.ranksep/=2,e.forEach(R.edges(),function(A){var N=R.edge(A);N.minlen*=2,N.labelpos.toLowerCase()!=="c"&&(S.rankdir==="TB"||S.rankdir==="BT"?N.width+=N.labeloffset:N.height+=N.labeloffset)})}function k(R){e.forEach(R.edges(),function(S){var A=R.edge(S);if(A.width&&A.height){var N=R.node(S.v),P=R.node(S.w),D={rank:(P.rank-N.rank)/2+N.rank,e:S};h.addDummyNode(R,"edge-proxy",D,"_ep")}})}function x(R){var S=0;e.forEach(R.nodes(),function(A){var N=R.node(A);N.borderTop&&(N.minRank=R.node(N.borderTop).rank,N.maxRank=R.node(N.borderBottom).rank,S=e.max(S,N.maxRank))}),R.graph().maxRank=S}function L(R){e.forEach(R.nodes(),function(S){var A=R.node(S);A.dummy==="edge-proxy"&&(R.edge(A.e).labelRank=A.rank,R.removeNode(S))})}function M(R){var S=Number.POSITIVE_INFINITY,A=0,N=Number.POSITIVE_INFINITY,P=0,D=R.graph(),U=D.marginx||0,j=D.marginy||0;function pi(K){var W=K.x,ne=K.y,gi=K.width,_i=K.height;S=Math.min(S,W-gi/2),A=Math.max(A,W+gi/2),N=Math.min(N,ne-_i/2),P=Math.max(P,ne+_i/2)}e.forEach(R.nodes(),function(K){pi(R.node(K))}),e.forEach(R.edges(),function(K){var W=R.edge(K);e.has(W,"x")&&pi(W)}),S-=U,N-=j,e.forEach(R.nodes(),function(K){var W=R.node(K);W.x-=S,W.y-=N}),e.forEach(R.edges(),function(K){var W=R.edge(K);e.forEach(W.points,function(ne){ne.x-=S,ne.y-=N}),e.has(W,"x")&&(W.x-=S),e.has(W,"y")&&(W.y-=N)}),D.width=A-S+U,D.height=P-N+j}function F(R){e.forEach(R.edges(),function(S){var A=R.edge(S),N=R.node(S.v),P=R.node(S.w),D,U;A.points?(D=A.points[0],U=A.points[A.points.length-1]):(A.points=[],D=P,U=N),A.points.unshift(h.intersectRect(N,D)),A.points.push(h.intersectRect(P,U))})}function H(R){e.forEach(R.edges(),function(S){var A=R.edge(S);if(e.has(A,"x"))switch((A.labelpos==="l"||A.labelpos==="r")&&(A.width-=A.labeloffset),A.labelpos){case"l":A.x-=A.width/2+A.labeloffset;break;case"r":A.x+=A.width/2+A.labeloffset;break}})}function oe(R){e.forEach(R.edges(),function(S){var A=R.edge(S);A.reversed&&A.points.reverse()})}function fe(R){e.forEach(R.nodes(),function(S){if(R.children(S).length){var A=R.node(S),N=R.node(A.borderTop),P=R.node(A.borderBottom),D=R.node(e.last(A.borderLeft)),U=R.node(e.last(A.borderRight));A.width=Math.abs(U.x-D.x),A.height=Math.abs(P.y-N.y),A.x=D.x+A.width/2,A.y=N.y+A.height/2}}),e.forEach(R.nodes(),function(S){R.node(S).dummy==="border"&&R.removeNode(S)})}function ko(R){e.forEach(R.edges(),function(S){if(S.v===S.w){var A=R.node(S.v);A.selfEdges||(A.selfEdges=[]),A.selfEdges.push({e:S,label:R.edge(S)}),R.removeEdge(S)}})}function xo(R){var S=h.buildLayerMatrix(R);e.forEach(S,function(A){var N=0;e.forEach(A,function(P,D){var U=R.node(P);U.order=D+N,e.forEach(U.selfEdges,function(j){h.addDummyNode(R,"selfedge",{width:j.label.width,height:j.label.height,rank:U.rank,order:D+ ++N,e:j.e,label:j.label},"_se")}),delete U.selfEdges})})}function Lo(R){e.forEach(R.nodes(),function(S){var A=R.node(S);if(A.dummy==="selfedge"){var N=R.node(A.e.v),P=N.x+N.width/2,D=N.y,U=A.x-P,j=N.height/2;R.setEdge(A.e,A.label),R.removeNode(S),A.label.points=[{x:P+2*U/3,y:D-j},{x:P+5*U/6,y:D-j},{x:P+U,y:D},{x:P+5*U/6,y:D+j},{x:P+2*U/3,y:D+j}],A.label.x=A.x,A.label.y=A.y}})}function Se(R,S){return e.mapValues(e.pick(R,S),Number)}function Ce(R){var S={};return e.forEach(R,function(A,N){S[N.toLowerCase()]=A}),S}return Kt}var zt,Fs;function dc(){if(Fs)return zt;Fs=1;var e=G(),a=V(),u=Y().Graph;zt={debugOrdering:n};function n(r){var t=a.buildLayerMatrix(r),s=new u({compound:!0,multigraph:!0}).setGraph({});return e.forEach(r.nodes(),function(i){s.setNode(i,{label:i}),s.setParent(i,"layer"+r.node(i).rank)}),e.forEach(r.edges(),function(i){s.setEdge(i.v,i.w,{},i.name)}),e.forEach(t,function(i,o){var d="layer"+o;s.setNode(d,{rank:"same"}),e.reduce(i,function(f,c){return s.setEdge(f,c,{style:"invis"}),c})}),s}return zt}var Yt,Gs;function cc(){return Gs||(Gs=1,Yt="0.8.5"),Yt}var $t,Ds;function hc(){return Ds||(Ds=1,$t={graphlib:Y(),layout:fc(),debug:dc(),util:{time:V().time,notime:V().notime},version:cc()}),$t}var lc=hc();const Us=I.getDefaultExportFromCjs(lc);var Xt,Bs;function vc(){if(Bs)return Xt;Bs=1;var e=ei();function a(u,n){return e(u,n)}return Xt=a,Xt}var pc=vc();const gc=I.getDefaultExportFromCjs(pc),Z="root.Triggers";function qe(e,a){const{getEdges:u}=B.useVueFlow(e),n=[];for(const r of u.value)if(r.target===a){n.push(r);const t=qe(e,r.source);t.length>0&&n.push(...t)}return n}function Ee(e,a){const{getEdges:u}=B.useVueFlow(e),n=[];for(const r of u.value)if(r.source===a){n.push(r);const t=Ee(e,r.target);t.length>0&&n.push(...t)}return n}function we(e,a){const{getEdges:u,findNode:n}=B.useVueFlow(e),r=n(a),t=r?[r]:[];for(const s of u.value)if(s.target===a){t.push(s.sourceNode);const i=we(e,s.source);i.length>0&&t.push(...i)}return t}function Re(e,a){const{getEdges:u,findNode:n}=B.useVueFlow(e),r=[n(a)];for(const t of u.value)if(t.source===a){r.push(t.targetNode);const s=Re(e,t.target);s.length>0&&r.push(...s)}return r}function Co(e,a){return[...qe(e,a),...we(e,a),...Ee(e,a),...Re(e,a)]}function si(e,a,u,n,r,t,s){const i=new Us.graphlib.Graph({compound:!0});i.setDefaultEdgeLabel(()=>({})),i.setGraph({rankdir:u?"LR":"TB"});for(const o of e.nodes)a.includes(o.uid)||i.setNode(o.uid,{width:ie(o),height:ae(o)});for(const o of e.clusters||[]){const d=o.cluster.uid.replace(ee,"");if(n.includes(o.cluster.uid)&&t.has(d)){const f={uid:d,type:"collapsedcluster"};i.setNode(d,{width:ie(f),height:ae(f)}),s.push(f);continue}if(!r[o.cluster.uid]){i.setNode(o.cluster.uid,{clusterLabelPos:"top"});for(const f of o.nodes||[])a.includes(f)||i.setParent(f,o.cluster.uid)}if(o.parents){const f=r[o.cluster.uid]?r[o.cluster.uid]:o.cluster.uid;a.includes(f)||i.setParent(f,o.parents[o.parents.length-1])}}for(const o of e.edges||[]){const d=Te(o.source,o.target,r,a);d&&i.setEdge(d.source,d.target)}return Us.layout(i),i}function te(e,a){const u={x:e.x-e.width/2,y:e.y-e.height/2};if(a){const n=te(a);u.x=u.x-n.x,u.y=u.y-n.y}return u}function ie(e){return Ie(e)||se(e)?$.TASK_WIDTH:J(e)?$.COLLAPSED_CLUSTER_WIDTH:$.DOT_WIDTH}function ae(e){return Ie(e)||se(e)?$.TASK_HEIGHT:J(e)?$.COLLAPSED_CLUSTER_HEIGHT:$.DOT_HEIGHT}function Ie(e){return["GraphTask","SubflowGraphTask$1"].some(a=>e.type.endsWith(a))}function se(e){return e.type.endsWith("GraphTrigger")}function J(e){return e.type==="collapsedcluster"}function Te(e,a,u,n){const r=u[e]?u[e]:e,t=u[a]?u[a]:a;return r===t||n.includes(r)||n.includes(t)?null:{target:t,source:r}}function Oo(e){const{getEdges:a,getNodes:u,getElements:n,removeEdges:r,removeNodes:t,removeSelectedElements:s}=B.useVueFlow(e);r(a.value),t(u.value),s(n.value)}function oi(e){return e?I.flowHaveTasks(e):!1}function fi(e,a){return e.uid===Z||se(e)||J(e)?"success":e.type.endsWith("SubflowGraphTask")?"primary":e.branchType=="ERROR"?"danger":e.branchType=="FINALLY"?"warning":a.has(e.uid)?"blue":"default"}function di(e,a,u,n){if(n.some(d=>e.source.startsWith(d)&&e.target.startsWith(d))||u.includes(e.target)||e.source.startsWith(Z)||e.target.startsWith(Z))return;const r=e.target.split(".");r.pop();const t=r.join("."),s=de.afterLastDot(t),i=a[e.target];if(i.type.endsWith("GraphClusterEnd")&&a[t]?.task?.type?.endsWith("Parallel"))return;if(i.type.endsWith("GraphClusterRoot"))return[s,"before"];const o=a[e.source].type.endsWith("GraphClusterEnd");if(!o&&i.type.endsWith("GraphClusterEnd"))return[de.afterLastDot(e.source),"after"];if(o){const d=e.source.split(".");return[d[d.length-2],"after"]}return[de.afterLastDot(e.target),"before"]}function ci(e,a,u){const n=s=>{const i=s.split(".");for(let o=1;o<=i.length;o++){const d=i.slice(0,o).join("."),f=u[d]?.branchType;if(f)return f}return a[s]?.branchType??null},r=n(e.source),t=n(e.target);return[r,t].includes("ERROR")?"danger":[r,t].includes("FINALLY")?"warning":null}function Ao(e,a,u,n,r,t,s,i,o,d,f,c,h){const l=[],q=[ee+Z];if(!n||r&&!oi(r)){l.push({id:"start",type:"dot",position:{x:0,y:0},style:{width:"5px",height:"5px"},sourcePosition:s?B.Position.Right:B.Position.Bottom,targetPosition:s?B.Position.Left:B.Position.Top,parentNode:void 0,draggable:!1}),l.push({id:"end",type:"dot",position:s?{x:50,y:0}:{x:0,y:50},style:{width:"5px",height:"5px"},sourcePosition:s?B.Position.Right:B.Position.Bottom,targetPosition:s?B.Position.Left:B.Position.Top,parentNode:void 0,draggable:!1}),l.push({id:"start|end",source:"start",target:"end",type:"edge",data:{edge:{relation:{relationType:"SEQUENTIAL"}},isFlowable:!1,initTask:!0,color:"primary"}});return}const g=si(n,t,s,q,i,o,d),v={},_=n.clusters||[],y=_.map(p=>p.cluster),b=y.filter(p=>p.type.endsWith("SubflowGraphCluster")).map(p=>p.taskNode.uid),m=Object.fromEntries(n.nodes.concat(d).map(p=>[p.uid,p]));for(const p of _)if(!i[p.cluster.uid]&&!o.has(p.cluster.uid)){p.cluster.taskNode?.task?.type==="io.kestra.core.tasks.flows.Dag"&&b.push(p.cluster.taskNode.uid);for(const x of p.nodes)v[x]=p.cluster;const T=p.cluster.uid,C=g.node(T),O=p.parents?p.parents[p.parents.length-1]:void 0,k=hi(p.cluster);l.push({id:T,type:"cluster",parentNode:O,position:te(C,O?g.node(O):void 0),style:{width:T===Z&&s?$.TRIGGER_CLUSTER_WIDTH+"px":C.width+"px",height:T===Z&&!s?$.TRIGGER_CLUSTER_HEIGHT+"px":C.height+"px"},data:{collapsable:!0,color:k,taskNode:p.cluster.taskNode,unused:p.cluster.taskNode?m[p.cluster.taskNode.uid].unused:!1},class:`ks-topology-${k}-border rounded p-2`})}for(const p of n.nodes.concat(d))if(!t.includes(p.uid)){const T=g.node(p.uid);let C="task";he(p)?C="dot":p.type.includes("GraphTrigger")?C="trigger":p.type==="collapsedcluster"&&(C="collapsedcluster");const O=fi(p,o),k=f||p.task?.type?.includes("$")||b.some(x=>p.uid.startsWith(x+"."));l.push({id:p.uid,type:C,position:te(T,v[p.uid]?g.node(v[p.uid].uid):void 0),style:{width:ie(p)+"px",height:ae(p)+"px"},sourcePosition:s?B.Position.Right:B.Position.Bottom,targetPosition:s?B.Position.Left:B.Position.Top,parentNode:v[p.uid]?v[p.uid].uid:void 0,draggable:C==="task"?!k:!1,data:{node:p,parent:v[p.uid]?v[p.uid]:void 0,namespace:v[p.uid]?.taskNode?.task?.namespace??u,flowId:v[p.uid]?.taskNode?.task?.flowId??a,isFlowable:v[p.uid]?.uid===ee+p.uid&&!p.type.endsWith("SubflowGraphTask"),color:O,expandable:li(p,v,i,h),isReadOnly:k,iconComponent:J(p)?"lightning-bolt":null,executionId:p.executionId,unused:p.unused},class:p.type==="collapsedcluster"?`ks-topology-${O}-border rounded`:""})}const E=y.filter(p=>p.taskNode).map(p=>p.taskNode.uid),w=n.edges??[];for(const p of w){const T=Te(p.source,p.target,i,t);if(T){const C=ci(p,m,v);l.push({id:T.source+"|"+T.target,source:T.source,target:T.target,type:"edge",markerEnd:he(m[T.target])?"":{id:"marker-"+(m[T.target].branchType?m[T.target].branchType?.toLocaleLowerCase():"custom"),type:B.MarkerType.ArrowClosed,color:C?`var(--ks-border-${C})`:"var(--ks-topology-edge-color)"},data:{haveAdd:!f&&c&&di(p,m,E,b),haveDashArray:m[p.source].type.endsWith("GraphTrigger")||m[p.target].type.endsWith("GraphTrigger")||p.source.startsWith(Z),color:C,unused:p.unused},style:{zIndex:10},animated:!0})}}return l}function he(e){return["GraphClusterRoot","GraphClusterFinally","GraphClusterAfterExecution","GraphClusterEnd"].some(a=>e.type.endsWith(a))}function hi(e){return e.uid===ee+Z?"success":e.type.endsWith("SubflowGraphCluster")?"primary":e.branchType==="ERROR"?"danger":"blue"}function li(e,a,u,n){return Object.values(u).includes(e.uid)||J(e)?!0:e.type.endsWith("SubflowGraphTask")&&a[e.uid]?.uid?.replace(ee,"")!==e.uid&&n}function le(e){const u=e.nodes.map(n=>n.uid).filter(n=>!e.edges.some(r=>r.target===n));return e.nodes.filter(n=>u.includes(n.uid))}function vi(e,a){if(a)return e.edges.filter(u=>u.source===a&&u.target)}function ve(e,a){let u,n,r=[a.uid];do{if(u=r.flatMap(t=>vi(e,t)).filter(Boolean),u.length===0)return[];r=u.map(t=>t.target),n=e.nodes.filter(t=>r.includes(t.uid)&&t.task)}while(!n.length);return n}function No(e,a,u){if(!u)return!1;let n=le(e),r=le(a);if(n.length!==r.length)return!1;let t=120;do{if(r=r.flatMap(s=>ve(a,s)),r.some(s=>s.task.id===u))return!0;if(n=n.flatMap(s=>ve(e,s)),n.length!==r.length)return!1;for(const s of r){const i=n.find(f=>f.task?.id===s.task?.id),o=i?.task??{},d=s.task??{};if(!i||Object.keys(o).length!==Object.keys(d).length||!gc(o,d))return!1}}while(n.length&&r.length&&t-- >0);return t<=0?(console.warn("areTasksIdenticalInGraphUntilTask: Infinite loop detected, stopping comparison."),!1):!0}const _c=Object.freeze(Object.defineProperty({__proto__:null,areTasksIdenticalInGraphUntilTask:No,cleanGraph:Oo,computeClusterColor:hi,flowHaveTasks:oi,generateDagreGraph:si,generateGraph:Ao,getEdgeColor:ci,getNextTaskNodes:ve,getNodeHeight:ae,getNodePosition:te,getNodeWidth:ie,getRootNodes:le,getTargetNodesEdges:vi,haveAdd:di,isClusterRootOrEnd:he,isCollapsedCluster:J,isExpandableTask:li,isTaskNode:Ie,isTriggerNode:se,linkedElements:Co,nodeColor:fi,predecessorsEdge:qe,predecessorsNode:we,replaceIfCollapsed:Te,successorsEdge:Ee,successorsNode:Re},Symbol.toStringTag,{value:"Module"}));exports.CLUSTER_PREFIX=ee;exports.EVENTS=Go;exports.NODE_SIZES=$;exports.SECTIONS=Fo;exports.Utils=de;exports.VueFlowUtils=_c;exports.afterLastDot=ro;exports.areTasksIdenticalInGraphUntilTask=No;exports.cleanGraph=Oo;exports.computeClusterColor=hi;exports.dateFilter=Qs;exports.editorViewTypes=Bo;exports.executeFlowBehaviours=Wo;exports.flowHaveTasks=oi;exports.generateDagreGraph=si;exports.generateGraph=Ao;exports.getEdgeColor=ci;exports.getNextTaskNodes=ve;exports.getNodeHeight=ae;exports.getNodePosition=te;exports.getNodeWidth=ie;exports.getRootNodes=le;exports.getTargetNodesEdges=vi;exports.haveAdd=di;exports.humanDuration=eo;exports.isClusterRootOrEnd=he;exports.isCollapsedCluster=J;exports.isExpandableTask=li;exports.isTaskNode=Ie;exports.isTriggerNode=se;exports.linkedElements=Co;exports.logDisplayTypes=Uo;exports.nodeColor=fi;exports.predecessorsEdge=qe;exports.predecessorsNode=we;exports.replaceIfCollapsed=Te;exports.requireMapValues=Zs;exports.stateDisplayValues=Vo;exports.stateGlobalChartTypes=Do;exports.storageKeys=Ho;exports.successorsEdge=Ee;exports.successorsNode=Re;
|
|
2
|
-
//# sourceMappingURL=VueFlowUtils-
|
|
1
|
+
"use strict";const B=require("@vue-flow/core"),I=require("./FlowYamlUtils-CB_0RSKT.cjs"),yi=require("vue"),Mo=require("humanize-duration"),mi=require("moment"),Fo=require("moment-timezone"),Go={TASKS:"TASKS",TRIGGERS:"TRIGGERS",TASK_RUNNERS:"TASK_RUNNERS"},Do={EDIT:"edit",DELETE:"delete",SHOW_DESCRIPTION:"showDescription",COLLAPSE:"collapse",EXPAND:"expand",OPEN_LINK:"openLink",ADD_TASK:"addTask",SHOW_LOGS:"showLogs",MOUSE_OVER:"mouseover",MOUSE_LEAVE:"mouseleave",ADD_ERROR:"addError",EXPAND_DEPENDENCIES:"expandDependencies",SHOW_CONDITION:"showCondition",RUN_TASK:"runTask"},ee="cluster_",Uo={EXECUTIONS:"executions",TASKRUNS:"taskruns"},Bo={ALL:"all",ERROR:"error",HIDDEN:"hidden",DEFAULT:"all"},$={TASK_WIDTH:184,TASK_HEIGHT:44,TRIGGER_WIDTH:184,TRIGGER_HEIGHT:44,DOT_WIDTH:5,DOT_HEIGHT:5,COLLAPSED_CLUSTER_WIDTH:150,COLLAPSED_CLUSTER_HEIGHT:44,TRIGGER_CLUSTER_WIDTH:350,TRIGGER_CLUSTER_HEIGHT:180},Ho={STORAGE_KEY:"view-type",SOURCE:"source",SOURCE_TOPOLOGY:"source-topology",SOURCE_DOC:"source-doc",TOPOLOGY:"topology",SOURCE_BLUEPRINTS:"source-blueprints"},Wo={DISPLAY_EXECUTIONS_COLUMNS:"displayExecutionsColumns",DISPLAY_FLOW_EXECUTIONS_COLUMNS:"displayFlowExecutionsColumns",SELECTED_TENANT:"selectedTenant",EXECUTE_FLOW_BEHAVIOUR:"executeFlowBehaviour",SHOW_CHART:"showChart",SHOW_FLOWS_CHART:"showFlowsChart",SHOW_LOGS_CHART:"showLogsChart",DEFAULT_NAMESPACE:"defaultNamespace",LATEST_NAMESPACE:"latestNamespace",PAGINATION_SIZE:"paginationSize",IMPERSONATE:"impersonate",EDITOR_VIEW_TYPE:"editorViewType"},Vo={SAME_TAB:"same tab",NEW_TAB:"new tab"},jo={INPROGRESS:"IN-PROGRESS"};var Oe,qi;function Ko(){if(qi)return Oe;qi=1;function e(a){return function(u,n,r){for(var t=-1,s=Object(u),i=r(u),o=i.length;o--;){var d=i[a?o:++t];if(n(s[d],d,s)===!1)break}return u}}return Oe=e,Oe}var Ae,Ei;function Zt(){if(Ei)return Ae;Ei=1;var e=Ko(),a=e();return Ae=a,Ae}var Ne,wi;function Qt(){if(wi)return Ne;wi=1;var e=Zt(),a=I.requireKeys();function u(n,r){return n&&e(n,r,a)}return Ne=u,Ne}var ke,Ri;function zo(){if(Ri)return ke;Ri=1;var e="__lodash_hash_undefined__";function a(u){return this.__data__.set(u,e),this}return ke=a,ke}var xe,Ii;function Yo(){if(Ii)return xe;Ii=1;function e(a){return this.__data__.has(a)}return xe=e,xe}var Le,Ti;function Ws(){if(Ti)return Le;Ti=1;var e=I.require_MapCache(),a=zo(),u=Yo();function n(r){var t=-1,s=r==null?0:r.length;for(this.__data__=new e;++t<s;)this.add(r[t])}return n.prototype.add=n.prototype.push=a,n.prototype.has=u,Le=n,Le}var Pe,Si;function $o(){if(Si)return Pe;Si=1;function e(a,u){for(var n=-1,r=a==null?0:a.length;++n<r;)if(u(a[n],n,a))return!0;return!1}return Pe=e,Pe}var Me,Ci;function Vs(){if(Ci)return Me;Ci=1;function e(a,u){return a.has(u)}return Me=e,Me}var Fe,Oi;function js(){if(Oi)return Fe;Oi=1;var e=Ws(),a=$o(),u=Vs(),n=1,r=2;function t(s,i,o,d,f,c){var h=o&n,l=s.length,q=i.length;if(l!=q&&!(h&&q>l))return!1;var g=c.get(s),v=c.get(i);if(g&&v)return g==i&&v==s;var _=-1,y=!0,b=o&r?new e:void 0;for(c.set(s,i),c.set(i,s);++_<l;){var m=s[_],E=i[_];if(d)var w=h?d(E,m,_,i,s,c):d(m,E,_,s,i,c);if(w!==void 0){if(w)continue;y=!1;break}if(b){if(!a(i,function(p,T){if(!u(b,T)&&(m===p||f(m,p,o,d,c)))return b.push(T)})){y=!1;break}}else if(!(m===E||f(m,E,o,d,c))){y=!1;break}}return c.delete(s),c.delete(i),y}return Fe=t,Fe}var Ge,Ai;function Xo(){if(Ai)return Ge;Ai=1;function e(a){var u=-1,n=Array(a.size);return a.forEach(function(r,t){n[++u]=[t,r]}),n}return Ge=e,Ge}var De,Ni;function Jt(){if(Ni)return De;Ni=1;function e(a){var u=-1,n=Array(a.size);return a.forEach(function(r){n[++u]=r}),n}return De=e,De}var Ue,ki;function Zo(){if(ki)return Ue;ki=1;var e=I.require_Symbol(),a=I.require_Uint8Array(),u=I.requireEq(),n=js(),r=Xo(),t=Jt(),s=1,i=2,o="[object Boolean]",d="[object Date]",f="[object Error]",c="[object Map]",h="[object Number]",l="[object RegExp]",q="[object Set]",g="[object String]",v="[object Symbol]",_="[object ArrayBuffer]",y="[object DataView]",b=e?e.prototype:void 0,m=b?b.valueOf:void 0;function E(w,p,T,C,O,x,N){switch(T){case y:if(w.byteLength!=p.byteLength||w.byteOffset!=p.byteOffset)return!1;w=w.buffer,p=p.buffer;case _:return!(w.byteLength!=p.byteLength||!x(new a(w),new a(p)));case o:case d:case h:return u(+w,+p);case f:return w.name==p.name&&w.message==p.message;case l:case g:return w==p+"";case c:var L=r;case q:var M=C&s;if(L||(L=t),w.size!=p.size&&!M)return!1;var F=N.get(w);if(F)return F==p;C|=i,N.set(w,p);var H=n(L(w),L(p),C,O,x,N);return N.delete(w),H;case v:if(m)return m.call(w)==m.call(p)}return!1}return Ue=E,Ue}var Be,xi;function Qo(){if(xi)return Be;xi=1;var e=I.require_getAllKeys(),a=1,u=Object.prototype,n=u.hasOwnProperty;function r(t,s,i,o,d,f){var c=i&a,h=e(t),l=h.length,q=e(s),g=q.length;if(l!=g&&!c)return!1;for(var v=l;v--;){var _=h[v];if(!(c?_ in s:n.call(s,_)))return!1}var y=f.get(t),b=f.get(s);if(y&&b)return y==s&&b==t;var m=!0;f.set(t,s),f.set(s,t);for(var E=c;++v<l;){_=h[v];var w=t[_],p=s[_];if(o)var T=c?o(p,w,_,s,t,f):o(w,p,_,t,s,f);if(!(T===void 0?w===p||d(w,p,i,o,f):T)){m=!1;break}E||(E=_=="constructor")}if(m&&!E){var C=t.constructor,O=s.constructor;C!=O&&"constructor"in t&&"constructor"in s&&!(typeof C=="function"&&C instanceof C&&typeof O=="function"&&O instanceof O)&&(m=!1)}return f.delete(t),f.delete(s),m}return Be=r,Be}var He,Li;function Jo(){if(Li)return He;Li=1;var e=I.require_Stack(),a=js(),u=Zo(),n=Qo(),r=I.require_getTag(),t=I.requireIsArray(),s=I.requireIsBuffer(),i=I.requireIsTypedArray(),o=1,d="[object Arguments]",f="[object Array]",c="[object Object]",h=Object.prototype,l=h.hasOwnProperty;function q(g,v,_,y,b,m){var E=t(g),w=t(v),p=E?f:r(g),T=w?f:r(v);p=p==d?c:p,T=T==d?c:T;var C=p==c,O=T==c,x=p==T;if(x&&s(g)){if(!s(v))return!1;E=!0,C=!1}if(x&&!C)return m||(m=new e),E||i(g)?a(g,v,_,y,b,m):u(g,v,p,_,y,b,m);if(!(_&o)){var N=C&&l.call(g,"__wrapped__"),L=O&&l.call(v,"__wrapped__");if(N||L){var M=N?g.value():g,F=L?v.value():v;return m||(m=new e),b(M,F,_,y,m)}}return x?(m||(m=new e),n(g,v,_,y,b,m)):!1}return He=q,He}var We,Pi;function ei(){if(Pi)return We;Pi=1;var e=Jo(),a=I.requireIsObjectLike();function u(n,r,t,s,i){return n===r?!0:n==null||r==null||!a(n)&&!a(r)?n!==n&&r!==r:e(n,r,t,s,u,i)}return We=u,We}var Ve,Mi;function ef(){if(Mi)return Ve;Mi=1;var e=I.require_Stack(),a=ei(),u=1,n=2;function r(t,s,i,o){var d=i.length,f=d,c=!o;if(t==null)return!f;for(t=Object(t);d--;){var h=i[d];if(c&&h[2]?h[1]!==t[h[0]]:!(h[0]in t))return!1}for(;++d<f;){h=i[d];var l=h[0],q=t[l],g=h[1];if(c&&h[2]){if(q===void 0&&!(l in t))return!1}else{var v=new e;if(o)var _=o(q,g,l,t,s,v);if(!(_===void 0?a(g,q,u|n,o,v):_))return!1}}return!0}return Ve=r,Ve}var je,Fi;function Ks(){if(Fi)return je;Fi=1;var e=I.requireIsObject();function a(u){return u===u&&!e(u)}return je=a,je}var Ke,Gi;function rf(){if(Gi)return Ke;Gi=1;var e=Ks(),a=I.requireKeys();function u(n){for(var r=a(n),t=r.length;t--;){var s=r[t],i=n[s];r[t]=[s,i,e(i)]}return r}return Ke=u,Ke}var ze,Di;function zs(){if(Di)return ze;Di=1;function e(a,u){return function(n){return n==null?!1:n[a]===u&&(u!==void 0||a in Object(n))}}return ze=e,ze}var Ye,Ui;function nf(){if(Ui)return Ye;Ui=1;var e=ef(),a=rf(),u=zs();function n(r){var t=a(r);return t.length==1&&t[0][2]?u(t[0][0],t[0][1]):function(s){return s===r||e(s,r,t)}}return Ye=n,Ye}var $e,Bi;function re(){if(Bi)return $e;Bi=1;var e=I.require_baseGetTag(),a=I.requireIsObjectLike(),u="[object Symbol]";function n(r){return typeof r=="symbol"||a(r)&&e(r)==u}return $e=n,$e}var Xe,Hi;function ri(){if(Hi)return Xe;Hi=1;var e=I.requireIsArray(),a=re(),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function r(t,s){if(e(t))return!1;var i=typeof t;return i=="number"||i=="symbol"||i=="boolean"||t==null||a(t)?!0:n.test(t)||!u.test(t)||s!=null&&t in Object(s)}return Xe=r,Xe}var Ze,Wi;function tf(){if(Wi)return Ze;Wi=1;var e=I.require_MapCache(),a="Expected a function";function u(n,r){if(typeof n!="function"||r!=null&&typeof r!="function")throw new TypeError(a);var t=function(){var s=arguments,i=r?r.apply(this,s):s[0],o=t.cache;if(o.has(i))return o.get(i);var d=n.apply(this,s);return t.cache=o.set(i,d)||o,d};return t.cache=new(u.Cache||e),t}return u.Cache=e,Ze=u,Ze}var Qe,Vi;function af(){if(Vi)return Qe;Vi=1;var e=tf(),a=500;function u(n){var r=e(n,function(s){return t.size===a&&t.clear(),s}),t=r.cache;return r}return Qe=u,Qe}var Je,ji;function uf(){if(ji)return Je;ji=1;var e=af(),a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,n=e(function(r){var t=[];return r.charCodeAt(0)===46&&t.push(""),r.replace(a,function(s,i,o,d){t.push(o?d.replace(u,"$1"):i||s)}),t});return Je=n,Je}var er,Ki;function pe(){if(Ki)return er;Ki=1;function e(a,u){for(var n=-1,r=a==null?0:a.length,t=Array(r);++n<r;)t[n]=u(a[n],n,a);return t}return er=e,er}var rr,zi;function sf(){if(zi)return rr;zi=1;var e=I.require_Symbol(),a=pe(),u=I.requireIsArray(),n=re(),r=e?e.prototype:void 0,t=r?r.toString:void 0;function s(i){if(typeof i=="string")return i;if(u(i))return a(i,s)+"";if(n(i))return t?t.call(i):"";var o=i+"";return o=="0"&&1/i==-1/0?"-0":o}return rr=s,rr}var nr,Yi;function Ys(){if(Yi)return nr;Yi=1;var e=sf();function a(u){return u==null?"":e(u)}return nr=a,nr}var tr,$i;function ge(){if($i)return tr;$i=1;var e=I.requireIsArray(),a=ri(),u=uf(),n=Ys();function r(t,s){return e(t)?t:a(t,s)?[t]:u(n(t))}return tr=r,tr}var ir,Xi;function ue(){if(Xi)return ir;Xi=1;var e=re();function a(u){if(typeof u=="string"||e(u))return u;var n=u+"";return n=="0"&&1/u==-1/0?"-0":n}return ir=a,ir}var ar,Zi;function _e(){if(Zi)return ar;Zi=1;var e=ge(),a=ue();function u(n,r){r=e(r,n);for(var t=0,s=r.length;n!=null&&t<s;)n=n[a(r[t++])];return t&&t==s?n:void 0}return ar=u,ar}var ur,Qi;function of(){if(Qi)return ur;Qi=1;var e=_e();function a(u,n,r){var t=u==null?void 0:e(u,n);return t===void 0?r:t}return ur=a,ur}var sr,Ji;function ff(){if(Ji)return sr;Ji=1;function e(a,u){return a!=null&&u in Object(a)}return sr=e,sr}var or,ea;function $s(){if(ea)return or;ea=1;var e=ge(),a=I.requireIsArguments(),u=I.requireIsArray(),n=I.require_isIndex(),r=I.requireIsLength(),t=ue();function s(i,o,d){o=e(o,i);for(var f=-1,c=o.length,h=!1;++f<c;){var l=t(o[f]);if(!(h=i!=null&&d(i,l)))break;i=i[l]}return h||++f!=c?h:(c=i==null?0:i.length,!!c&&r(c)&&n(l,c)&&(u(i)||a(i)))}return or=s,or}var fr,ra;function Xs(){if(ra)return fr;ra=1;var e=ff(),a=$s();function u(n,r){return n!=null&&a(n,r,e)}return fr=u,fr}var dr,na;function df(){if(na)return dr;na=1;var e=ei(),a=of(),u=Xs(),n=ri(),r=Ks(),t=zs(),s=ue(),i=1,o=2;function d(f,c){return n(f)&&r(c)?t(s(f),c):function(h){var l=a(h,f);return l===void 0&&l===c?u(h,f):e(c,l,i|o)}}return dr=d,dr}var cr,ta;function Q(){if(ta)return cr;ta=1;function e(a){return a}return cr=e,cr}var hr,ia;function Zs(){if(ia)return hr;ia=1;function e(a){return function(u){return u?.[a]}}return hr=e,hr}var lr,aa;function cf(){if(aa)return lr;aa=1;var e=_e();function a(u){return function(n){return e(n,u)}}return lr=a,lr}var vr,ua;function hf(){if(ua)return vr;ua=1;var e=Zs(),a=cf(),u=ri(),n=ue();function r(t){return u(t)?e(n(t)):a(t)}return vr=r,vr}var pr,sa;function X(){if(sa)return pr;sa=1;var e=nf(),a=df(),u=Q(),n=I.requireIsArray(),r=hf();function t(s){return typeof s=="function"?s:s==null?u:typeof s=="object"?n(s)?a(s[0],s[1]):e(s):r(s)}return pr=t,pr}var gr,oa;function Qs(){if(oa)return gr;oa=1;var e=I.require_baseAssignValue(),a=Qt(),u=X();function n(r,t){var s={};return t=u(t,3),a(r,function(i,o,d){e(s,o,t(i,o,d))}),s}return gr=n,gr}const lf={en:{y:()=>"y",mo:()=>"mo",w:()=>"w",d:()=>"d",h:()=>"h",m:()=>"m",s:()=>"s",ms:()=>"ms"},fr:{y:()=>"a",mo:()=>"mo",w:()=>"se",d:()=>"j",h:()=>"h",m:()=>"m",s:()=>"s",ms:()=>"ms"}},vf="dateFormat",pf="timezone",gf=e=>e.charAt(0).toUpperCase()+e.slice(1),Js=(e,a)=>{const u=yi.getCurrentInstance()?.appContext.config.globalProperties.$moment().locale(),n=yi.getCurrentInstance()?.appContext.config.globalProperties.$moment(e).locale(u);let r;return a==="iso"?r="YYYY-MM-DD HH:mm:ss.SSS":r=a??localStorage.getItem(vf)??"llll",n.tz(localStorage.getItem(pf)??Fo.tz.guess()).format(r)};function _f(e,a){return e.split(a).slice(1).join(a)}function eo(e){return mi.duration(e,mi.ISO_8601).asMilliseconds()/1e3}function ro(e,a){return a=a||{maxDecimalPoints:2},a.spacer="",a.language=localStorage.getItem("lang")||"en",a.languages=lf,a.largest=2,typeof e!="number"&&(e=eo(e)),Mo(e*1e3,a).replace(/\.([0-9])s$/i,".$10s")}function no(e){return e.split(".").pop()}function bf(e,a,u){return u.indexOf(e)===a}const de={capitalize:gf,dateFilter:Js,splitFirst:_f,duration:eo,humanDuration:ro,afterLastDot:no,distinctFilter:bf};function ni(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var _r,fa;function yf(){if(fa)return _r;fa=1;var e=I.require_baseClone(),a=4;function u(n){return e(n,a)}return _r=u,_r}var br,da;function ti(){if(da)return br;da=1;function e(a){return function(){return a}}return br=e,br}var yr,ca;function mf(){if(ca)return yr;ca=1;var e=I.requireIsArrayLike();function a(u,n){return function(r,t){if(r==null)return r;if(!e(r))return u(r,t);for(var s=r.length,i=n?s:-1,o=Object(r);(n?i--:++i<s)&&t(o[i],i,o)!==!1;);return r}}return yr=a,yr}var mr,ha;function be(){if(ha)return mr;ha=1;var e=Qt(),a=mf(),u=a(e);return mr=u,mr}var qr,la;function to(){if(la)return qr;la=1;var e=Q();function a(u){return typeof u=="function"?u:e}return qr=a,qr}var Er,va;function io(){if(va)return Er;va=1;var e=I.require_arrayEach(),a=be(),u=to(),n=I.requireIsArray();function r(t,s){var i=n(t)?e:a;return i(t,u(s))}return Er=r,Er}var wr,pa;function ao(){return pa||(pa=1,wr=io()),wr}var Rr,ga;function qf(){if(ga)return Rr;ga=1;var e=be();function a(u,n){var r=[];return e(u,function(t,s,i){n(t,s,i)&&r.push(t)}),r}return Rr=a,Rr}var Ir,_a;function uo(){if(_a)return Ir;_a=1;var e=I.require_arrayFilter(),a=qf(),u=X(),n=I.requireIsArray();function r(t,s){var i=n(t)?e:a;return i(t,u(s,3))}return Ir=r,Ir}var Tr,ba;function Ef(){if(ba)return Tr;ba=1;var e=Object.prototype,a=e.hasOwnProperty;function u(n,r){return n!=null&&a.call(n,r)}return Tr=u,Tr}var Sr,ya;function so(){if(ya)return Sr;ya=1;var e=Ef(),a=$s();function u(n,r){return n!=null&&a(n,r,e)}return Sr=u,Sr}var Cr,ma;function wf(){if(ma)return Cr;ma=1;var e=I.require_baseKeys(),a=I.require_getTag(),u=I.requireIsArguments(),n=I.requireIsArray(),r=I.requireIsArrayLike(),t=I.requireIsBuffer(),s=I.require_isPrototype(),i=I.requireIsTypedArray(),o="[object Map]",d="[object Set]",f=Object.prototype,c=f.hasOwnProperty;function h(l){if(l==null)return!0;if(r(l)&&(n(l)||typeof l=="string"||typeof l.splice=="function"||t(l)||i(l)||u(l)))return!l.length;var q=a(l);if(q==o||q==d)return!l.size;if(s(l))return!e(l).length;for(var g in l)if(c.call(l,g))return!1;return!0}return Cr=h,Cr}var Or,qa;function oo(){if(qa)return Or;qa=1;function e(a){return a===void 0}return Or=e,Or}var Ar,Ea;function fo(){if(Ea)return Ar;Ea=1;var e=be(),a=I.requireIsArrayLike();function u(n,r){var t=-1,s=a(n)?Array(n.length):[];return e(n,function(i,o,d){s[++t]=r(i,o,d)}),s}return Ar=u,Ar}var Nr,wa;function co(){if(wa)return Nr;wa=1;var e=pe(),a=X(),u=fo(),n=I.requireIsArray();function r(t,s){var i=n(t)?e:u;return i(t,a(s,3))}return Nr=r,Nr}var kr,Ra;function Rf(){if(Ra)return kr;Ra=1;function e(a,u,n,r){var t=-1,s=a==null?0:a.length;for(r&&s&&(n=a[++t]);++t<s;)n=u(n,a[t],t,a);return n}return kr=e,kr}var xr,Ia;function If(){if(Ia)return xr;Ia=1;function e(a,u,n,r,t){return t(a,function(s,i,o){n=r?(r=!1,s):u(n,s,i,o)}),n}return xr=e,xr}var Lr,Ta;function ho(){if(Ta)return Lr;Ta=1;var e=Rf(),a=be(),u=X(),n=If(),r=I.requireIsArray();function t(s,i,o){var d=r(s)?e:n,f=arguments.length<3;return d(s,u(i,4),o,f,a)}return Lr=t,Lr}var Pr,Sa;function Tf(){if(Sa)return Pr;Sa=1;var e=I.require_baseGetTag(),a=I.requireIsArray(),u=I.requireIsObjectLike(),n="[object String]";function r(t){return typeof t=="string"||!a(t)&&u(t)&&e(t)==n}return Pr=r,Pr}var Mr,Ca;function Sf(){if(Ca)return Mr;Ca=1;var e=Zs(),a=e("length");return Mr=a,Mr}var Fr,Oa;function Cf(){if(Oa)return Fr;Oa=1;var e="\\ud800-\\udfff",a="\\u0300-\\u036f",u="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",r=a+u+n,t="\\ufe0e\\ufe0f",s="\\u200d",i=RegExp("["+s+e+r+t+"]");function o(d){return i.test(d)}return Fr=o,Fr}var Gr,Aa;function Of(){if(Aa)return Gr;Aa=1;var e="\\ud800-\\udfff",a="\\u0300-\\u036f",u="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",r=a+u+n,t="\\ufe0e\\ufe0f",s="["+e+"]",i="["+r+"]",o="\\ud83c[\\udffb-\\udfff]",d="(?:"+i+"|"+o+")",f="[^"+e+"]",c="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",l="\\u200d",q=d+"?",g="["+t+"]?",v="(?:"+l+"(?:"+[f,c,h].join("|")+")"+g+q+")*",_=g+q+v,y="(?:"+[f+i+"?",i,c,h,s].join("|")+")",b=RegExp(o+"(?="+o+")|"+y+_,"g");function m(E){for(var w=b.lastIndex=0;b.test(E);)++w;return w}return Gr=m,Gr}var Dr,Na;function Af(){if(Na)return Dr;Na=1;var e=Sf(),a=Cf(),u=Of();function n(r){return a(r)?u(r):e(r)}return Dr=n,Dr}var Ur,ka;function Nf(){if(ka)return Ur;ka=1;var e=I.require_baseKeys(),a=I.require_getTag(),u=I.requireIsArrayLike(),n=Tf(),r=Af(),t="[object Map]",s="[object Set]";function i(o){if(o==null)return 0;if(u(o))return n(o)?r(o):o.length;var d=a(o);return d==t||d==s?o.size:e(o).length}return Ur=i,Ur}var Br,xa;function kf(){if(xa)return Br;xa=1;var e=I.require_arrayEach(),a=I.require_baseCreate(),u=Qt(),n=X(),r=I.require_getPrototype(),t=I.requireIsArray(),s=I.requireIsBuffer(),i=I.requireIsFunction(),o=I.requireIsObject(),d=I.requireIsTypedArray();function f(c,h,l){var q=t(c),g=q||s(c)||d(c);if(h=n(h,4),l==null){var v=c&&c.constructor;g?l=q?new v:[]:o(c)?l=i(v)?a(r(c)):{}:l={}}return(g?e:u)(c,function(_,y,b){return h(l,_,y,b)}),l}return Br=f,Br}var Hr,La;function xf(){if(La)return Hr;La=1;var e=I.require_Symbol(),a=I.requireIsArguments(),u=I.requireIsArray(),n=e?e.isConcatSpreadable:void 0;function r(t){return u(t)||a(t)||!!(n&&t&&t[n])}return Hr=r,Hr}var Wr,Pa;function ii(){if(Pa)return Wr;Pa=1;var e=I.require_arrayPush(),a=xf();function u(n,r,t,s,i){var o=-1,d=n.length;for(t||(t=a),i||(i=[]);++o<d;){var f=n[o];r>0&&t(f)?r>1?u(f,r-1,t,s,i):e(i,f):s||(i[i.length]=f)}return i}return Wr=u,Wr}var Vr,Ma;function Lf(){if(Ma)return Vr;Ma=1;function e(a,u,n){switch(n.length){case 0:return a.call(u);case 1:return a.call(u,n[0]);case 2:return a.call(u,n[0],n[1]);case 3:return a.call(u,n[0],n[1],n[2])}return a.apply(u,n)}return Vr=e,Vr}var jr,Fa;function lo(){if(Fa)return jr;Fa=1;var e=Lf(),a=Math.max;function u(n,r,t){return r=a(r===void 0?n.length-1:r,0),function(){for(var s=arguments,i=-1,o=a(s.length-r,0),d=Array(o);++i<o;)d[i]=s[r+i];i=-1;for(var f=Array(r+1);++i<r;)f[i]=s[i];return f[r]=t(d),e(n,this,f)}}return jr=u,jr}var Kr,Ga;function Pf(){if(Ga)return Kr;Ga=1;var e=ti(),a=I.require_defineProperty(),u=Q(),n=a?function(r,t){return a(r,"toString",{configurable:!0,enumerable:!1,value:e(t),writable:!0})}:u;return Kr=n,Kr}var zr,Da;function Mf(){if(Da)return zr;Da=1;var e=800,a=16,u=Date.now;function n(r){var t=0,s=0;return function(){var i=u(),o=a-(i-s);if(s=i,o>0){if(++t>=e)return arguments[0]}else t=0;return r.apply(void 0,arguments)}}return zr=n,zr}var Yr,Ua;function vo(){if(Ua)return Yr;Ua=1;var e=Pf(),a=Mf(),u=a(e);return Yr=u,Yr}var $r,Ba;function ye(){if(Ba)return $r;Ba=1;var e=Q(),a=lo(),u=vo();function n(r,t){return u(a(r,t,e),r+"")}return $r=n,$r}var Xr,Ha;function po(){if(Ha)return Xr;Ha=1;function e(a,u,n,r){for(var t=a.length,s=n+(r?1:-1);r?s--:++s<t;)if(u(a[s],s,a))return s;return-1}return Xr=e,Xr}var Zr,Wa;function Ff(){if(Wa)return Zr;Wa=1;function e(a){return a!==a}return Zr=e,Zr}var Qr,Va;function Gf(){if(Va)return Qr;Va=1;function e(a,u,n){for(var r=n-1,t=a.length;++r<t;)if(a[r]===u)return r;return-1}return Qr=e,Qr}var Jr,ja;function Df(){if(ja)return Jr;ja=1;var e=po(),a=Ff(),u=Gf();function n(r,t,s){return t===t?u(r,t,s):e(r,a,s)}return Jr=n,Jr}var en,Ka;function Uf(){if(Ka)return en;Ka=1;var e=Df();function a(u,n){var r=u==null?0:u.length;return!!r&&e(u,n,0)>-1}return en=a,en}var rn,za;function Bf(){if(za)return rn;za=1;function e(a,u,n){for(var r=-1,t=a==null?0:a.length;++r<t;)if(n(u,a[r]))return!0;return!1}return rn=e,rn}var nn,Ya;function Hf(){if(Ya)return nn;Ya=1;function e(){}return nn=e,nn}var tn,$a;function Wf(){if($a)return tn;$a=1;var e=I.require_Set(),a=Hf(),u=Jt(),n=1/0,r=e&&1/u(new e([,-0]))[1]==n?function(t){return new e(t)}:a;return tn=r,tn}var an,Xa;function Vf(){if(Xa)return an;Xa=1;var e=Ws(),a=Uf(),u=Bf(),n=Vs(),r=Wf(),t=Jt(),s=200;function i(o,d,f){var c=-1,h=a,l=o.length,q=!0,g=[],v=g;if(f)q=!1,h=u;else if(l>=s){var _=d?null:r(o);if(_)return t(_);q=!1,h=n,v=new e}else v=d?[]:g;e:for(;++c<l;){var y=o[c],b=d?d(y):y;if(y=f||y!==0?y:0,q&&b===b){for(var m=v.length;m--;)if(v[m]===b)continue e;d&&v.push(b),g.push(y)}else h(v,b,f)||(v!==g&&v.push(b),g.push(y))}return g}return an=i,an}var un,Za;function go(){if(Za)return un;Za=1;var e=I.requireIsArrayLike(),a=I.requireIsObjectLike();function u(n){return a(n)&&e(n)}return un=u,un}var sn,Qa;function jf(){if(Qa)return sn;Qa=1;var e=ii(),a=ye(),u=Vf(),n=go(),r=a(function(t){return u(e(t,1,n,!0))});return sn=r,sn}var on,Ja;function Kf(){if(Ja)return on;Ja=1;var e=pe();function a(u,n){return e(n,function(r){return u[r]})}return on=a,on}var fn,eu;function _o(){if(eu)return fn;eu=1;var e=Kf(),a=I.requireKeys();function u(n){return n==null?[]:e(n,a(n))}return fn=u,fn}var dn,ru;function z(){if(ru)return dn;ru=1;var e;if(typeof ni=="function")try{e={clone:yf(),constant:ti(),each:ao(),filter:uo(),has:so(),isArray:I.requireIsArray(),isEmpty:wf(),isFunction:I.requireIsFunction(),isUndefined:oo(),keys:I.requireKeys(),map:co(),reduce:ho(),size:Nf(),transform:kf(),union:jf(),values:_o()}}catch{}return e||(e=window._),dn=e,dn}var cn,nu;function ai(){if(nu)return cn;nu=1;var e=z();cn=r;var a="\0",u="\0",n="";function r(f){this._isDirected=e.has(f,"directed")?f.directed:!0,this._isMultigraph=e.has(f,"multigraph")?f.multigraph:!1,this._isCompound=e.has(f,"compound")?f.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[u]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}r.prototype._nodeCount=0,r.prototype._edgeCount=0,r.prototype.isDirected=function(){return this._isDirected},r.prototype.isMultigraph=function(){return this._isMultigraph},r.prototype.isCompound=function(){return this._isCompound},r.prototype.setGraph=function(f){return this._label=f,this},r.prototype.graph=function(){return this._label},r.prototype.setDefaultNodeLabel=function(f){return e.isFunction(f)||(f=e.constant(f)),this._defaultNodeLabelFn=f,this},r.prototype.nodeCount=function(){return this._nodeCount},r.prototype.nodes=function(){return e.keys(this._nodes)},r.prototype.sources=function(){var f=this;return e.filter(this.nodes(),function(c){return e.isEmpty(f._in[c])})},r.prototype.sinks=function(){var f=this;return e.filter(this.nodes(),function(c){return e.isEmpty(f._out[c])})},r.prototype.setNodes=function(f,c){var h=arguments,l=this;return e.each(f,function(q){h.length>1?l.setNode(q,c):l.setNode(q)}),this},r.prototype.setNode=function(f,c){return e.has(this._nodes,f)?(arguments.length>1&&(this._nodes[f]=c),this):(this._nodes[f]=arguments.length>1?c:this._defaultNodeLabelFn(f),this._isCompound&&(this._parent[f]=u,this._children[f]={},this._children[u][f]=!0),this._in[f]={},this._preds[f]={},this._out[f]={},this._sucs[f]={},++this._nodeCount,this)},r.prototype.node=function(f){return this._nodes[f]},r.prototype.hasNode=function(f){return e.has(this._nodes,f)},r.prototype.removeNode=function(f){var c=this;if(e.has(this._nodes,f)){var h=function(l){c.removeEdge(c._edgeObjs[l])};delete this._nodes[f],this._isCompound&&(this._removeFromParentsChildList(f),delete this._parent[f],e.each(this.children(f),function(l){c.setParent(l)}),delete this._children[f]),e.each(e.keys(this._in[f]),h),delete this._in[f],delete this._preds[f],e.each(e.keys(this._out[f]),h),delete this._out[f],delete this._sucs[f],--this._nodeCount}return this},r.prototype.setParent=function(f,c){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(c))c=u;else{c+="";for(var h=c;!e.isUndefined(h);h=this.parent(h))if(h===f)throw new Error("Setting "+c+" as parent of "+f+" would create a cycle");this.setNode(c)}return this.setNode(f),this._removeFromParentsChildList(f),this._parent[f]=c,this._children[c][f]=!0,this},r.prototype._removeFromParentsChildList=function(f){delete this._children[this._parent[f]][f]},r.prototype.parent=function(f){if(this._isCompound){var c=this._parent[f];if(c!==u)return c}},r.prototype.children=function(f){if(e.isUndefined(f)&&(f=u),this._isCompound){var c=this._children[f];if(c)return e.keys(c)}else{if(f===u)return this.nodes();if(this.hasNode(f))return[]}},r.prototype.predecessors=function(f){var c=this._preds[f];if(c)return e.keys(c)},r.prototype.successors=function(f){var c=this._sucs[f];if(c)return e.keys(c)},r.prototype.neighbors=function(f){var c=this.predecessors(f);if(c)return e.union(c,this.successors(f))},r.prototype.isLeaf=function(f){var c;return this.isDirected()?c=this.successors(f):c=this.neighbors(f),c.length===0},r.prototype.filterNodes=function(f){var c=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});c.setGraph(this.graph());var h=this;e.each(this._nodes,function(g,v){f(v)&&c.setNode(v,g)}),e.each(this._edgeObjs,function(g){c.hasNode(g.v)&&c.hasNode(g.w)&&c.setEdge(g,h.edge(g))});var l={};function q(g){var v=h.parent(g);return v===void 0||c.hasNode(v)?(l[g]=v,v):v in l?l[v]:q(v)}return this._isCompound&&e.each(c.nodes(),function(g){c.setParent(g,q(g))}),c},r.prototype.setDefaultEdgeLabel=function(f){return e.isFunction(f)||(f=e.constant(f)),this._defaultEdgeLabelFn=f,this},r.prototype.edgeCount=function(){return this._edgeCount},r.prototype.edges=function(){return e.values(this._edgeObjs)},r.prototype.setPath=function(f,c){var h=this,l=arguments;return e.reduce(f,function(q,g){return l.length>1?h.setEdge(q,g,c):h.setEdge(q,g),g}),this},r.prototype.setEdge=function(){var f,c,h,l,q=!1,g=arguments[0];typeof g=="object"&&g!==null&&"v"in g?(f=g.v,c=g.w,h=g.name,arguments.length===2&&(l=arguments[1],q=!0)):(f=g,c=arguments[1],h=arguments[3],arguments.length>2&&(l=arguments[2],q=!0)),f=""+f,c=""+c,e.isUndefined(h)||(h=""+h);var v=i(this._isDirected,f,c,h);if(e.has(this._edgeLabels,v))return q&&(this._edgeLabels[v]=l),this;if(!e.isUndefined(h)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(f),this.setNode(c),this._edgeLabels[v]=q?l:this._defaultEdgeLabelFn(f,c,h);var _=o(this._isDirected,f,c,h);return f=_.v,c=_.w,Object.freeze(_),this._edgeObjs[v]=_,t(this._preds[c],f),t(this._sucs[f],c),this._in[c][v]=_,this._out[f][v]=_,this._edgeCount++,this},r.prototype.edge=function(f,c,h){var l=arguments.length===1?d(this._isDirected,arguments[0]):i(this._isDirected,f,c,h);return this._edgeLabels[l]},r.prototype.hasEdge=function(f,c,h){var l=arguments.length===1?d(this._isDirected,arguments[0]):i(this._isDirected,f,c,h);return e.has(this._edgeLabels,l)},r.prototype.removeEdge=function(f,c,h){var l=arguments.length===1?d(this._isDirected,arguments[0]):i(this._isDirected,f,c,h),q=this._edgeObjs[l];return q&&(f=q.v,c=q.w,delete this._edgeLabels[l],delete this._edgeObjs[l],s(this._preds[c],f),s(this._sucs[f],c),delete this._in[c][l],delete this._out[f][l],this._edgeCount--),this},r.prototype.inEdges=function(f,c){var h=this._in[f];if(h){var l=e.values(h);return c?e.filter(l,function(q){return q.v===c}):l}},r.prototype.outEdges=function(f,c){var h=this._out[f];if(h){var l=e.values(h);return c?e.filter(l,function(q){return q.w===c}):l}},r.prototype.nodeEdges=function(f,c){var h=this.inEdges(f,c);if(h)return h.concat(this.outEdges(f,c))};function t(f,c){f[c]?f[c]++:f[c]=1}function s(f,c){--f[c]||delete f[c]}function i(f,c,h,l){var q=""+c,g=""+h;if(!f&&q>g){var v=q;q=g,g=v}return q+n+g+n+(e.isUndefined(l)?a:l)}function o(f,c,h,l){var q=""+c,g=""+h;if(!f&&q>g){var v=q;q=g,g=v}var _={v:q,w:g};return l&&(_.name=l),_}function d(f,c){return i(f,c.v,c.w,c.name)}return cn}var hn,tu;function zf(){return tu||(tu=1,hn="2.1.8"),hn}var ln,iu;function Yf(){return iu||(iu=1,ln={Graph:ai(),version:zf()}),ln}var vn,au;function $f(){if(au)return vn;au=1;var e=z(),a=ai();vn={write:u,read:t};function u(s){var i={options:{directed:s.isDirected(),multigraph:s.isMultigraph(),compound:s.isCompound()},nodes:n(s),edges:r(s)};return e.isUndefined(s.graph())||(i.value=e.clone(s.graph())),i}function n(s){return e.map(s.nodes(),function(i){var o=s.node(i),d=s.parent(i),f={v:i};return e.isUndefined(o)||(f.value=o),e.isUndefined(d)||(f.parent=d),f})}function r(s){return e.map(s.edges(),function(i){var o=s.edge(i),d={v:i.v,w:i.w};return e.isUndefined(i.name)||(d.name=i.name),e.isUndefined(o)||(d.value=o),d})}function t(s){var i=new a(s.options).setGraph(s.value);return e.each(s.nodes,function(o){i.setNode(o.v,o.value),o.parent&&i.setParent(o.v,o.parent)}),e.each(s.edges,function(o){i.setEdge({v:o.v,w:o.w,name:o.name},o.value)}),i}return vn}var pn,uu;function Xf(){if(uu)return pn;uu=1;var e=z();pn=a;function a(u){var n={},r=[],t;function s(i){e.has(n,i)||(n[i]=!0,t.push(i),e.each(u.successors(i),s),e.each(u.predecessors(i),s))}return e.each(u.nodes(),function(i){t=[],s(i),t.length&&r.push(t)}),r}return pn}var gn,su;function bo(){if(su)return gn;su=1;var e=z();gn=a;function a(){this._arr=[],this._keyIndices={}}return a.prototype.size=function(){return this._arr.length},a.prototype.keys=function(){return this._arr.map(function(u){return u.key})},a.prototype.has=function(u){return e.has(this._keyIndices,u)},a.prototype.priority=function(u){var n=this._keyIndices[u];if(n!==void 0)return this._arr[n].priority},a.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},a.prototype.add=function(u,n){var r=this._keyIndices;if(u=String(u),!e.has(r,u)){var t=this._arr,s=t.length;return r[u]=s,t.push({key:u,priority:n}),this._decrease(s),!0}return!1},a.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var u=this._arr.pop();return delete this._keyIndices[u.key],this._heapify(0),u.key},a.prototype.decrease=function(u,n){var r=this._keyIndices[u];if(n>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+u+" Old: "+this._arr[r].priority+" New: "+n);this._arr[r].priority=n,this._decrease(r)},a.prototype._heapify=function(u){var n=this._arr,r=2*u,t=r+1,s=u;r<n.length&&(s=n[r].priority<n[s].priority?r:s,t<n.length&&(s=n[t].priority<n[s].priority?t:s),s!==u&&(this._swap(u,s),this._heapify(s)))},a.prototype._decrease=function(u){for(var n=this._arr,r=n[u].priority,t;u!==0&&(t=u>>1,!(n[t].priority<r));)this._swap(u,t),u=t},a.prototype._swap=function(u,n){var r=this._arr,t=this._keyIndices,s=r[u],i=r[n];r[u]=i,r[n]=s,t[i.key]=u,t[s.key]=n},gn}var _n,ou;function yo(){if(ou)return _n;ou=1;var e=z(),a=bo();_n=n;var u=e.constant(1);function n(t,s,i,o){return r(t,String(s),i||u,o||function(d){return t.outEdges(d)})}function r(t,s,i,o){var d={},f=new a,c,h,l=function(q){var g=q.v!==c?q.v:q.w,v=d[g],_=i(q),y=h.distance+_;if(_<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+q+" Weight: "+_);y<v.distance&&(v.distance=y,v.predecessor=c,f.decrease(g,y))};for(t.nodes().forEach(function(q){var g=q===s?0:Number.POSITIVE_INFINITY;d[q]={distance:g},f.add(q,g)});f.size()>0&&(c=f.removeMin(),h=d[c],h.distance!==Number.POSITIVE_INFINITY);)o(c).forEach(l);return d}return _n}var bn,fu;function Zf(){if(fu)return bn;fu=1;var e=yo(),a=z();bn=u;function u(n,r,t){return a.transform(n.nodes(),function(s,i){s[i]=e(n,i,r,t)},{})}return bn}var yn,du;function mo(){if(du)return yn;du=1;var e=z();yn=a;function a(u){var n=0,r=[],t={},s=[];function i(o){var d=t[o]={onStack:!0,lowlink:n,index:n++};if(r.push(o),u.successors(o).forEach(function(h){e.has(t,h)?t[h].onStack&&(d.lowlink=Math.min(d.lowlink,t[h].index)):(i(h),d.lowlink=Math.min(d.lowlink,t[h].lowlink))}),d.lowlink===d.index){var f=[],c;do c=r.pop(),t[c].onStack=!1,f.push(c);while(o!==c);s.push(f)}}return u.nodes().forEach(function(o){e.has(t,o)||i(o)}),s}return yn}var mn,cu;function Qf(){if(cu)return mn;cu=1;var e=z(),a=mo();mn=u;function u(n){return e.filter(a(n),function(r){return r.length>1||r.length===1&&n.hasEdge(r[0],r[0])})}return mn}var qn,hu;function Jf(){if(hu)return qn;hu=1;var e=z();qn=u;var a=e.constant(1);function u(r,t,s){return n(r,t||a,s||function(i){return r.outEdges(i)})}function n(r,t,s){var i={},o=r.nodes();return o.forEach(function(d){i[d]={},i[d][d]={distance:0},o.forEach(function(f){d!==f&&(i[d][f]={distance:Number.POSITIVE_INFINITY})}),s(d).forEach(function(f){var c=f.v===d?f.w:f.v,h=t(f);i[d][c]={distance:h,predecessor:d}})}),o.forEach(function(d){var f=i[d];o.forEach(function(c){var h=i[c];o.forEach(function(l){var q=h[d],g=f[l],v=h[l],_=q.distance+g.distance;_<v.distance&&(v.distance=_,v.predecessor=g.predecessor)})})}),i}return qn}var En,lu;function qo(){if(lu)return En;lu=1;var e=z();En=a,a.CycleException=u;function a(n){var r={},t={},s=[];function i(o){if(e.has(t,o))throw new u;e.has(r,o)||(t[o]=!0,r[o]=!0,e.each(n.predecessors(o),i),delete t[o],s.push(o))}if(e.each(n.sinks(),i),e.size(r)!==n.nodeCount())throw new u;return s}function u(){}return u.prototype=new Error,En}var wn,vu;function ed(){if(vu)return wn;vu=1;var e=qo();wn=a;function a(u){try{e(u)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return wn}var Rn,pu;function Eo(){if(pu)return Rn;pu=1;var e=z();Rn=a;function a(n,r,t){e.isArray(r)||(r=[r]);var s=(n.isDirected()?n.successors:n.neighbors).bind(n),i=[],o={};return e.each(r,function(d){if(!n.hasNode(d))throw new Error("Graph does not have node: "+d);u(n,d,t==="post",o,s,i)}),i}function u(n,r,t,s,i,o){e.has(s,r)||(s[r]=!0,t||o.push(r),e.each(i(r),function(d){u(n,d,t,s,i,o)}),t&&o.push(r))}return Rn}var In,gu;function rd(){if(gu)return In;gu=1;var e=Eo();In=a;function a(u,n){return e(u,n,"post")}return In}var Tn,_u;function nd(){if(_u)return Tn;_u=1;var e=Eo();Tn=a;function a(u,n){return e(u,n,"pre")}return Tn}var Sn,bu;function td(){if(bu)return Sn;bu=1;var e=z(),a=ai(),u=bo();Sn=n;function n(r,t){var s=new a,i={},o=new u,d;function f(h){var l=h.v===d?h.w:h.v,q=o.priority(l);if(q!==void 0){var g=t(h);g<q&&(i[l]=d,o.decrease(l,g))}}if(r.nodeCount()===0)return s;e.each(r.nodes(),function(h){o.add(h,Number.POSITIVE_INFINITY),s.setNode(h)}),o.decrease(r.nodes()[0],0);for(var c=!1;o.size()>0;){if(d=o.removeMin(),e.has(i,d))s.setEdge(d,i[d]);else{if(c)throw new Error("Input graph is not connected: "+r);c=!0}r.nodeEdges(d).forEach(f)}return s}return Sn}var Cn,yu;function id(){return yu||(yu=1,Cn={components:Xf(),dijkstra:yo(),dijkstraAll:Zf(),findCycles:Qf(),floydWarshall:Jf(),isAcyclic:ed(),postorder:rd(),preorder:nd(),prim:td(),tarjan:mo(),topsort:qo()}),Cn}var On,mu;function ad(){if(mu)return On;mu=1;var e=Yf();return On={Graph:e.Graph,json:$f(),alg:id(),version:e.version},On}var An,qu;function Y(){if(qu)return An;qu=1;var e;if(typeof ni=="function")try{e=ad()}catch{}return e||(e=window.graphlib),An=e,An}var Nn,Eu;function me(){if(Eu)return Nn;Eu=1;var e=I.requireEq(),a=I.requireIsArrayLike(),u=I.require_isIndex(),n=I.requireIsObject();function r(t,s,i){if(!n(i))return!1;var o=typeof s;return(o=="number"?a(i)&&u(s,i.length):o=="string"&&s in i)?e(i[s],t):!1}return Nn=r,Nn}var kn,wu;function ud(){if(wu)return kn;wu=1;var e=ye(),a=I.requireEq(),u=me(),n=I.requireKeysIn(),r=Object.prototype,t=r.hasOwnProperty,s=e(function(i,o){i=Object(i);var d=-1,f=o.length,c=f>2?o[2]:void 0;for(c&&u(o[0],o[1],c)&&(f=1);++d<f;)for(var h=o[d],l=n(h),q=-1,g=l.length;++q<g;){var v=l[q],_=i[v];(_===void 0||a(_,r[v])&&!t.call(i,v))&&(i[v]=h[v])}return i});return kn=s,kn}var xn,Ru;function sd(){if(Ru)return xn;Ru=1;var e=X(),a=I.requireIsArrayLike(),u=I.requireKeys();function n(r){return function(t,s,i){var o=Object(t);if(!a(t)){var d=e(s,3);t=u(t),s=function(c){return d(o[c],c,o)}}var f=r(t,s,i);return f>-1?o[d?t[f]:f]:void 0}}return xn=n,xn}var Ln,Iu;function od(){if(Iu)return Ln;Iu=1;var e=/\s/;function a(u){for(var n=u.length;n--&&e.test(u.charAt(n)););return n}return Ln=a,Ln}var Pn,Tu;function fd(){if(Tu)return Pn;Tu=1;var e=od(),a=/^\s+/;function u(n){return n&&n.slice(0,e(n)+1).replace(a,"")}return Pn=u,Pn}var Mn,Su;function dd(){if(Su)return Mn;Su=1;var e=fd(),a=I.requireIsObject(),u=re(),n=NaN,r=/^[-+]0x[0-9a-f]+$/i,t=/^0b[01]+$/i,s=/^0o[0-7]+$/i,i=parseInt;function o(d){if(typeof d=="number")return d;if(u(d))return n;if(a(d)){var f=typeof d.valueOf=="function"?d.valueOf():d;d=a(f)?f+"":f}if(typeof d!="string")return d===0?d:+d;d=e(d);var c=t.test(d);return c||s.test(d)?i(d.slice(2),c?2:8):r.test(d)?n:+d}return Mn=o,Mn}var Fn,Cu;function wo(){if(Cu)return Fn;Cu=1;var e=dd(),a=1/0,u=17976931348623157e292;function n(r){if(!r)return r===0?r:0;if(r=e(r),r===a||r===-a){var t=r<0?-1:1;return t*u}return r===r?r:0}return Fn=n,Fn}var Gn,Ou;function cd(){if(Ou)return Gn;Ou=1;var e=wo();function a(u){var n=e(u),r=n%1;return n===n?r?n-r:n:0}return Gn=a,Gn}var Dn,Au;function hd(){if(Au)return Dn;Au=1;var e=po(),a=X(),u=cd(),n=Math.max;function r(t,s,i){var o=t==null?0:t.length;if(!o)return-1;var d=i==null?0:u(i);return d<0&&(d=n(o+d,0)),e(t,a(s,3),d)}return Dn=r,Dn}var Un,Nu;function ld(){if(Nu)return Un;Nu=1;var e=sd(),a=hd(),u=e(a);return Un=u,Un}var Bn,ku;function Ro(){if(ku)return Bn;ku=1;var e=ii();function a(u){var n=u==null?0:u.length;return n?e(u,1):[]}return Bn=a,Bn}var Hn,xu;function vd(){if(xu)return Hn;xu=1;var e=Zt(),a=to(),u=I.requireKeysIn();function n(r,t){return r==null?r:e(r,a(t),u)}return Hn=n,Hn}var Wn,Lu;function pd(){if(Lu)return Wn;Lu=1;function e(a){var u=a==null?0:a.length;return u?a[u-1]:void 0}return Wn=e,Wn}var Vn,Pu;function ui(){if(Pu)return Vn;Pu=1;var e=re();function a(u,n,r){for(var t=-1,s=u.length;++t<s;){var i=u[t],o=n(i);if(o!=null&&(d===void 0?o===o&&!e(o):r(o,d)))var d=o,f=i}return f}return Vn=a,Vn}var jn,Mu;function gd(){if(Mu)return jn;Mu=1;function e(a,u){return a>u}return jn=e,jn}var Kn,Fu;function _d(){if(Fu)return Kn;Fu=1;var e=ui(),a=gd(),u=Q();function n(r){return r&&r.length?e(r,u,a):void 0}return Kn=n,Kn}var zn,Gu;function Io(){if(Gu)return zn;Gu=1;var e=I.require_baseAssignValue(),a=I.requireEq();function u(n,r,t){(t!==void 0&&!a(n[r],t)||t===void 0&&!(r in n))&&e(n,r,t)}return zn=u,zn}var Yn,Du;function bd(){if(Du)return Yn;Du=1;var e=I.require_baseGetTag(),a=I.require_getPrototype(),u=I.requireIsObjectLike(),n="[object Object]",r=Function.prototype,t=Object.prototype,s=r.toString,i=t.hasOwnProperty,o=s.call(Object);function d(f){if(!u(f)||e(f)!=n)return!1;var c=a(f);if(c===null)return!0;var h=i.call(c,"constructor")&&c.constructor;return typeof h=="function"&&h instanceof h&&s.call(h)==o}return Yn=d,Yn}var $n,Uu;function To(){if(Uu)return $n;Uu=1;function e(a,u){if(!(u==="constructor"&&typeof a[u]=="function")&&u!="__proto__")return a[u]}return $n=e,$n}var Xn,Bu;function yd(){if(Bu)return Xn;Bu=1;var e=I.require_copyObject(),a=I.requireKeysIn();function u(n){return e(n,a(n))}return Xn=u,Xn}var Zn,Hu;function md(){if(Hu)return Zn;Hu=1;var e=Io(),a=I.require_cloneBuffer(),u=I.require_cloneTypedArray(),n=I.require_copyArray(),r=I.require_initCloneObject(),t=I.requireIsArguments(),s=I.requireIsArray(),i=go(),o=I.requireIsBuffer(),d=I.requireIsFunction(),f=I.requireIsObject(),c=bd(),h=I.requireIsTypedArray(),l=To(),q=yd();function g(v,_,y,b,m,E,w){var p=l(v,y),T=l(_,y),C=w.get(T);if(C){e(v,y,C);return}var O=E?E(p,T,y+"",v,_,w):void 0,x=O===void 0;if(x){var N=s(T),L=!N&&o(T),M=!N&&!L&&h(T);O=T,N||L||M?s(p)?O=p:i(p)?O=n(p):L?(x=!1,O=a(T,!0)):M?(x=!1,O=u(T,!0)):O=[]:c(T)||t(T)?(O=p,t(p)?O=q(p):(!f(p)||d(p))&&(O=r(T))):x=!1}x&&(w.set(T,O),m(O,T,b,E,w),w.delete(T)),e(v,y,O)}return Zn=g,Zn}var Qn,Wu;function qd(){if(Wu)return Qn;Wu=1;var e=I.require_Stack(),a=Io(),u=Zt(),n=md(),r=I.requireIsObject(),t=I.requireKeysIn(),s=To();function i(o,d,f,c,h){o!==d&&u(d,function(l,q){if(h||(h=new e),r(l))n(o,d,q,f,i,c,h);else{var g=c?c(s(o,q),l,q+"",o,d,h):void 0;g===void 0&&(g=l),a(o,q,g)}},t)}return Qn=i,Qn}var Jn,Vu;function Ed(){if(Vu)return Jn;Vu=1;var e=ye(),a=me();function u(n){return e(function(r,t){var s=-1,i=t.length,o=i>1?t[i-1]:void 0,d=i>2?t[2]:void 0;for(o=n.length>3&&typeof o=="function"?(i--,o):void 0,d&&a(t[0],t[1],d)&&(o=i<3?void 0:o,i=1),r=Object(r);++s<i;){var f=t[s];f&&n(r,f,s,o)}return r})}return Jn=u,Jn}var et,ju;function wd(){if(ju)return et;ju=1;var e=qd(),a=Ed(),u=a(function(n,r,t){e(n,r,t)});return et=u,et}var rt,Ku;function So(){if(Ku)return rt;Ku=1;function e(a,u){return a<u}return rt=e,rt}var nt,zu;function Rd(){if(zu)return nt;zu=1;var e=ui(),a=So(),u=Q();function n(r){return r&&r.length?e(r,u,a):void 0}return nt=n,nt}var tt,Yu;function Id(){if(Yu)return tt;Yu=1;var e=ui(),a=X(),u=So();function n(r,t){return r&&r.length?e(r,a(t,2),u):void 0}return tt=n,tt}var it,$u;function Td(){if($u)return it;$u=1;var e=I.require_root(),a=function(){return e.Date.now()};return it=a,it}var at,Xu;function Sd(){if(Xu)return at;Xu=1;var e=I.require_assignValue(),a=ge(),u=I.require_isIndex(),n=I.requireIsObject(),r=ue();function t(s,i,o,d){if(!n(s))return s;i=a(i,s);for(var f=-1,c=i.length,h=c-1,l=s;l!=null&&++f<c;){var q=r(i[f]),g=o;if(q==="__proto__"||q==="constructor"||q==="prototype")return s;if(f!=h){var v=l[q];g=d?d(v,q,l):void 0,g===void 0&&(g=n(v)?v:u(i[f+1])?[]:{})}e(l,q,g),l=l[q]}return s}return at=t,at}var ut,Zu;function Cd(){if(Zu)return ut;Zu=1;var e=_e(),a=Sd(),u=ge();function n(r,t,s){for(var i=-1,o=t.length,d={};++i<o;){var f=t[i],c=e(r,f);s(c,f)&&a(d,u(f,r),c)}return d}return ut=n,ut}var st,Qu;function Od(){if(Qu)return st;Qu=1;var e=Cd(),a=Xs();function u(n,r){return e(n,r,function(t,s){return a(n,s)})}return st=u,st}var ot,Ju;function Ad(){if(Ju)return ot;Ju=1;var e=Ro(),a=lo(),u=vo();function n(r){return u(a(r,void 0,e),r+"")}return ot=n,ot}var ft,es;function Nd(){if(es)return ft;es=1;var e=Od(),a=Ad(),u=a(function(n,r){return n==null?{}:e(n,r)});return ft=u,ft}var dt,rs;function kd(){if(rs)return dt;rs=1;var e=Math.ceil,a=Math.max;function u(n,r,t,s){for(var i=-1,o=a(e((r-n)/(t||1)),0),d=Array(o);o--;)d[s?o:++i]=n,n+=t;return d}return dt=u,dt}var ct,ns;function xd(){if(ns)return ct;ns=1;var e=kd(),a=me(),u=wo();function n(r){return function(t,s,i){return i&&typeof i!="number"&&a(t,s,i)&&(s=i=void 0),t=u(t),s===void 0?(s=t,t=0):s=u(s),i=i===void 0?t<s?1:-1:u(i),e(t,s,i,r)}}return ct=n,ct}var ht,ts;function Ld(){if(ts)return ht;ts=1;var e=xd(),a=e();return ht=a,ht}var lt,is;function Pd(){if(is)return lt;is=1;function e(a,u){var n=a.length;for(a.sort(u);n--;)a[n]=a[n].value;return a}return lt=e,lt}var vt,as;function Md(){if(as)return vt;as=1;var e=re();function a(u,n){if(u!==n){var r=u!==void 0,t=u===null,s=u===u,i=e(u),o=n!==void 0,d=n===null,f=n===n,c=e(n);if(!d&&!c&&!i&&u>n||i&&o&&f&&!d&&!c||t&&o&&f||!r&&f||!s)return 1;if(!t&&!i&&!c&&u<n||c&&r&&s&&!t&&!i||d&&r&&s||!o&&s||!f)return-1}return 0}return vt=a,vt}var pt,us;function Fd(){if(us)return pt;us=1;var e=Md();function a(u,n,r){for(var t=-1,s=u.criteria,i=n.criteria,o=s.length,d=r.length;++t<o;){var f=e(s[t],i[t]);if(f){if(t>=d)return f;var c=r[t];return f*(c=="desc"?-1:1)}}return u.index-n.index}return pt=a,pt}var gt,ss;function Gd(){if(ss)return gt;ss=1;var e=pe(),a=_e(),u=X(),n=fo(),r=Pd(),t=I.require_baseUnary(),s=Fd(),i=Q(),o=I.requireIsArray();function d(f,c,h){c.length?c=e(c,function(g){return o(g)?function(v){return a(v,g.length===1?g[0]:g)}:g}):c=[i];var l=-1;c=e(c,t(u));var q=n(f,function(g,v,_){var y=e(c,function(b){return b(g)});return{criteria:y,index:++l,value:g}});return r(q,function(g,v){return s(g,v,h)})}return gt=d,gt}var _t,os;function Dd(){if(os)return _t;os=1;var e=ii(),a=Gd(),u=ye(),n=me(),r=u(function(t,s){if(t==null)return[];var i=s.length;return i>1&&n(t,s[0],s[1])?s=[]:i>2&&n(s[0],s[1],s[2])&&(s=[s[0]]),a(t,e(s,1),[])});return _t=r,_t}var bt,fs;function Ud(){if(fs)return bt;fs=1;var e=Ys(),a=0;function u(n){var r=++a;return e(n)+r}return bt=u,bt}var yt,ds;function Bd(){if(ds)return yt;ds=1;function e(a,u,n){for(var r=-1,t=a.length,s=u.length,i={};++r<t;){var o=r<s?u[r]:void 0;n(i,a[r],o)}return i}return yt=e,yt}var mt,cs;function Hd(){if(cs)return mt;cs=1;var e=I.require_assignValue(),a=Bd();function u(n,r){return a(n||[],r||[],e)}return mt=u,mt}var qt,hs;function G(){if(hs)return qt;hs=1;var e;if(typeof ni=="function")try{e={cloneDeep:I.requireCloneDeep(),constant:ti(),defaults:ud(),each:ao(),filter:uo(),find:ld(),flatten:Ro(),forEach:io(),forIn:vd(),has:so(),isUndefined:oo(),last:pd(),map:co(),mapValues:Qs(),max:_d(),merge:wd(),min:Rd(),minBy:Id(),now:Td(),pick:Nd(),range:Ld(),reduce:ho(),sortBy:Dd(),uniqueId:Ud(),values:_o(),zipObject:Hd()}}catch{}return e||(e=window._),qt=e,qt}var Et,ls;function Wd(){if(ls)return Et;ls=1,Et=e;function e(){var n={};n._next=n._prev=n,this._sentinel=n}e.prototype.dequeue=function(){var n=this._sentinel,r=n._prev;if(r!==n)return a(r),r},e.prototype.enqueue=function(n){var r=this._sentinel;n._prev&&n._next&&a(n),n._next=r._next,r._next._prev=n,r._next=n,n._prev=r},e.prototype.toString=function(){for(var n=[],r=this._sentinel,t=r._prev;t!==r;)n.push(JSON.stringify(t,u)),t=t._prev;return"["+n.join(", ")+"]"};function a(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function u(n,r){if(n!=="_next"&&n!=="_prev")return r}return Et}var wt,vs;function Vd(){if(vs)return wt;vs=1;var e=G(),a=Y().Graph,u=Wd();wt=r;var n=e.constant(1);function r(d,f){if(d.nodeCount()<=1)return[];var c=i(d,f||n),h=t(c.graph,c.buckets,c.zeroIdx);return e.flatten(e.map(h,function(l){return d.outEdges(l.v,l.w)}),!0)}function t(d,f,c){for(var h=[],l=f[f.length-1],q=f[0],g;d.nodeCount();){for(;g=q.dequeue();)s(d,f,c,g);for(;g=l.dequeue();)s(d,f,c,g);if(d.nodeCount()){for(var v=f.length-2;v>0;--v)if(g=f[v].dequeue(),g){h=h.concat(s(d,f,c,g,!0));break}}}return h}function s(d,f,c,h,l){var q=l?[]:void 0;return e.forEach(d.inEdges(h.v),function(g){var v=d.edge(g),_=d.node(g.v);l&&q.push({v:g.v,w:g.w}),_.out-=v,o(f,c,_)}),e.forEach(d.outEdges(h.v),function(g){var v=d.edge(g),_=g.w,y=d.node(_);y.in-=v,o(f,c,y)}),d.removeNode(h.v),q}function i(d,f){var c=new a,h=0,l=0;e.forEach(d.nodes(),function(v){c.setNode(v,{v,in:0,out:0})}),e.forEach(d.edges(),function(v){var _=c.edge(v.v,v.w)||0,y=f(v),b=_+y;c.setEdge(v.v,v.w,b),l=Math.max(l,c.node(v.v).out+=y),h=Math.max(h,c.node(v.w).in+=y)});var q=e.range(l+h+3).map(function(){return new u}),g=h+1;return e.forEach(c.nodes(),function(v){o(q,g,c.node(v))}),{graph:c,buckets:q,zeroIdx:g}}function o(d,f,c){c.out?c.in?d[c.out-c.in+f].enqueue(c):d[d.length-1].enqueue(c):d[0].enqueue(c)}return wt}var Rt,ps;function jd(){if(ps)return Rt;ps=1;var e=G(),a=Vd();Rt={run:u,undo:r};function u(t){var s=t.graph().acyclicer==="greedy"?a(t,i(t)):n(t);e.forEach(s,function(o){var d=t.edge(o);t.removeEdge(o),d.forwardName=o.name,d.reversed=!0,t.setEdge(o.w,o.v,d,e.uniqueId("rev"))});function i(o){return function(d){return o.edge(d).weight}}}function n(t){var s=[],i={},o={};function d(f){e.has(o,f)||(o[f]=!0,i[f]=!0,e.forEach(t.outEdges(f),function(c){e.has(i,c.w)?s.push(c):d(c.w)}),delete i[f])}return e.forEach(t.nodes(),d),s}function r(t){e.forEach(t.edges(),function(s){var i=t.edge(s);if(i.reversed){t.removeEdge(s);var o=i.forwardName;delete i.reversed,delete i.forwardName,t.setEdge(s.w,s.v,i,o)}})}return Rt}var It,gs;function V(){if(gs)return It;gs=1;var e=G(),a=Y().Graph;It={addDummyNode:u,simplify:n,asNonCompoundGraph:r,successorWeights:t,predecessorWeights:s,intersectRect:i,buildLayerMatrix:o,normalizeRanks:d,removeEmptyRanks:f,addBorderNode:c,maxRank:h,partition:l,time:q,notime:g};function u(v,_,y,b){var m;do m=e.uniqueId(b);while(v.hasNode(m));return y.dummy=_,v.setNode(m,y),m}function n(v){var _=new a().setGraph(v.graph());return e.forEach(v.nodes(),function(y){_.setNode(y,v.node(y))}),e.forEach(v.edges(),function(y){var b=_.edge(y.v,y.w)||{weight:0,minlen:1},m=v.edge(y);_.setEdge(y.v,y.w,{weight:b.weight+m.weight,minlen:Math.max(b.minlen,m.minlen)})}),_}function r(v){var _=new a({multigraph:v.isMultigraph()}).setGraph(v.graph());return e.forEach(v.nodes(),function(y){v.children(y).length||_.setNode(y,v.node(y))}),e.forEach(v.edges(),function(y){_.setEdge(y,v.edge(y))}),_}function t(v){var _=e.map(v.nodes(),function(y){var b={};return e.forEach(v.outEdges(y),function(m){b[m.w]=(b[m.w]||0)+v.edge(m).weight}),b});return e.zipObject(v.nodes(),_)}function s(v){var _=e.map(v.nodes(),function(y){var b={};return e.forEach(v.inEdges(y),function(m){b[m.v]=(b[m.v]||0)+v.edge(m).weight}),b});return e.zipObject(v.nodes(),_)}function i(v,_){var y=v.x,b=v.y,m=_.x-y,E=_.y-b,w=v.width/2,p=v.height/2;if(!m&&!E)throw new Error("Not possible to find intersection inside of the rectangle");var T,C;return Math.abs(E)*w>Math.abs(m)*p?(E<0&&(p=-p),T=p*m/E,C=p):(m<0&&(w=-w),T=w,C=w*E/m),{x:y+T,y:b+C}}function o(v){var _=e.map(e.range(h(v)+1),function(){return[]});return e.forEach(v.nodes(),function(y){var b=v.node(y),m=b.rank;e.isUndefined(m)||(_[m][b.order]=y)}),_}function d(v){var _=e.min(e.map(v.nodes(),function(y){return v.node(y).rank}));e.forEach(v.nodes(),function(y){var b=v.node(y);e.has(b,"rank")&&(b.rank-=_)})}function f(v){var _=e.min(e.map(v.nodes(),function(E){return v.node(E).rank})),y=[];e.forEach(v.nodes(),function(E){var w=v.node(E).rank-_;y[w]||(y[w]=[]),y[w].push(E)});var b=0,m=v.graph().nodeRankFactor;e.forEach(y,function(E,w){e.isUndefined(E)&&w%m!==0?--b:b&&e.forEach(E,function(p){v.node(p).rank+=b})})}function c(v,_,y,b){var m={width:0,height:0};return arguments.length>=4&&(m.rank=y,m.order=b),u(v,"border",m,_)}function h(v){return e.max(e.map(v.nodes(),function(_){var y=v.node(_).rank;if(!e.isUndefined(y))return y}))}function l(v,_){var y={lhs:[],rhs:[]};return e.forEach(v,function(b){_(b)?y.lhs.push(b):y.rhs.push(b)}),y}function q(v,_){var y=e.now();try{return _()}finally{console.log(v+" time: "+(e.now()-y)+"ms")}}function g(v,_){return _()}return It}var Tt,_s;function Kd(){if(_s)return Tt;_s=1;var e=G(),a=V();Tt={run:u,undo:r};function u(t){t.graph().dummyChains=[],e.forEach(t.edges(),function(s){n(t,s)})}function n(t,s){var i=s.v,o=t.node(i).rank,d=s.w,f=t.node(d).rank,c=s.name,h=t.edge(s),l=h.labelRank;if(f!==o+1){t.removeEdge(s);var q,g,v;for(v=0,++o;o<f;++v,++o)h.points=[],g={width:0,height:0,edgeLabel:h,edgeObj:s,rank:o},q=a.addDummyNode(t,"edge",g,"_d"),o===l&&(g.width=h.width,g.height=h.height,g.dummy="edge-label",g.labelpos=h.labelpos),t.setEdge(i,q,{weight:h.weight},c),v===0&&t.graph().dummyChains.push(q),i=q;t.setEdge(i,d,{weight:h.weight},c)}}function r(t){e.forEach(t.graph().dummyChains,function(s){var i=t.node(s),o=i.edgeLabel,d;for(t.setEdge(i.edgeObj,o);i.dummy;)d=t.successors(s)[0],t.removeNode(s),o.points.push({x:i.x,y:i.y}),i.dummy==="edge-label"&&(o.x=i.x,o.y=i.y,o.width=i.width,o.height=i.height),s=d,i=t.node(s)})}return Tt}var St,bs;function ce(){if(bs)return St;bs=1;var e=G();St={longestPath:a,slack:u};function a(n){var r={};function t(s){var i=n.node(s);if(e.has(r,s))return i.rank;r[s]=!0;var o=e.min(e.map(n.outEdges(s),function(d){return t(d.w)-n.edge(d).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),i.rank=o}e.forEach(n.sources(),t)}function u(n,r){return n.node(r.w).rank-n.node(r.v).rank-n.edge(r).minlen}return St}var Ct,ys;function Co(){if(ys)return Ct;ys=1;var e=G(),a=Y().Graph,u=ce().slack;Ct=n;function n(i){var o=new a({directed:!1}),d=i.nodes()[0],f=i.nodeCount();o.setNode(d,{});for(var c,h;r(o,i)<f;)c=t(o,i),h=o.hasNode(c.v)?u(i,c):-u(i,c),s(o,i,h);return o}function r(i,o){function d(f){e.forEach(o.nodeEdges(f),function(c){var h=c.v,l=f===h?c.w:h;!i.hasNode(l)&&!u(o,c)&&(i.setNode(l,{}),i.setEdge(f,l,{}),d(l))})}return e.forEach(i.nodes(),d),i.nodeCount()}function t(i,o){return e.minBy(o.edges(),function(d){if(i.hasNode(d.v)!==i.hasNode(d.w))return u(o,d)})}function s(i,o,d){e.forEach(i.nodes(),function(f){o.node(f).rank+=d})}return Ct}var Ot,ms;function zd(){if(ms)return Ot;ms=1;var e=G(),a=Co(),u=ce().slack,n=ce().longestPath,r=Y().alg.preorder,t=Y().alg.postorder,s=V().simplify;Ot=i,i.initLowLimValues=c,i.initCutValues=o,i.calcCutValue=f,i.leaveEdge=l,i.enterEdge=q,i.exchangeEdges=g;function i(b){b=s(b),n(b);var m=a(b);c(m),o(m,b);for(var E,w;E=l(m);)w=q(m,b,E),g(m,b,E,w)}function o(b,m){var E=t(b,b.nodes());E=E.slice(0,E.length-1),e.forEach(E,function(w){d(b,m,w)})}function d(b,m,E){var w=b.node(E),p=w.parent;b.edge(E,p).cutvalue=f(b,m,E)}function f(b,m,E){var w=b.node(E),p=w.parent,T=!0,C=m.edge(E,p),O=0;return C||(T=!1,C=m.edge(p,E)),O=C.weight,e.forEach(m.nodeEdges(E),function(x){var N=x.v===E,L=N?x.w:x.v;if(L!==p){var M=N===T,F=m.edge(x).weight;if(O+=M?F:-F,_(b,E,L)){var H=b.edge(E,L).cutvalue;O+=M?-H:H}}}),O}function c(b,m){arguments.length<2&&(m=b.nodes()[0]),h(b,{},1,m)}function h(b,m,E,w,p){var T=E,C=b.node(w);return m[w]=!0,e.forEach(b.neighbors(w),function(O){e.has(m,O)||(E=h(b,m,E,O,w))}),C.low=T,C.lim=E++,p?C.parent=p:delete C.parent,E}function l(b){return e.find(b.edges(),function(m){return b.edge(m).cutvalue<0})}function q(b,m,E){var w=E.v,p=E.w;m.hasEdge(w,p)||(w=E.w,p=E.v);var T=b.node(w),C=b.node(p),O=T,x=!1;T.lim>C.lim&&(O=C,x=!0);var N=e.filter(m.edges(),function(L){return x===y(b,b.node(L.v),O)&&x!==y(b,b.node(L.w),O)});return e.minBy(N,function(L){return u(m,L)})}function g(b,m,E,w){var p=E.v,T=E.w;b.removeEdge(p,T),b.setEdge(w.v,w.w,{}),c(b),o(b,m),v(b,m)}function v(b,m){var E=e.find(b.nodes(),function(p){return!m.node(p).parent}),w=r(b,E);w=w.slice(1),e.forEach(w,function(p){var T=b.node(p).parent,C=m.edge(p,T),O=!1;C||(C=m.edge(T,p),O=!0),m.node(p).rank=m.node(T).rank+(O?C.minlen:-C.minlen)})}function _(b,m,E){return b.hasEdge(m,E)}function y(b,m,E){return E.low<=m.lim&&m.lim<=E.lim}return Ot}var At,qs;function Yd(){if(qs)return At;qs=1;var e=ce(),a=e.longestPath,u=Co(),n=zd();At=r;function r(o){switch(o.graph().ranker){case"network-simplex":i(o);break;case"tight-tree":s(o);break;case"longest-path":t(o);break;default:i(o)}}var t=a;function s(o){a(o),u(o)}function i(o){n(o)}return At}var Nt,Es;function $d(){if(Es)return Nt;Es=1;var e=G();Nt=a;function a(r){var t=n(r);e.forEach(r.graph().dummyChains,function(s){for(var i=r.node(s),o=i.edgeObj,d=u(r,t,o.v,o.w),f=d.path,c=d.lca,h=0,l=f[h],q=!0;s!==o.w;){if(i=r.node(s),q){for(;(l=f[h])!==c&&r.node(l).maxRank<i.rank;)h++;l===c&&(q=!1)}if(!q){for(;h<f.length-1&&r.node(l=f[h+1]).minRank<=i.rank;)h++;l=f[h]}r.setParent(s,l),s=r.successors(s)[0]}})}function u(r,t,s,i){var o=[],d=[],f=Math.min(t[s].low,t[i].low),c=Math.max(t[s].lim,t[i].lim),h,l;h=s;do h=r.parent(h),o.push(h);while(h&&(t[h].low>f||c>t[h].lim));for(l=h,h=i;(h=r.parent(h))!==l;)d.push(h);return{path:o.concat(d.reverse()),lca:l}}function n(r){var t={},s=0;function i(o){var d=s;e.forEach(r.children(o),i),t[o]={low:d,lim:s++}}return e.forEach(r.children(),i),t}return Nt}var kt,ws;function Xd(){if(ws)return kt;ws=1;var e=G(),a=V();kt={run:u,cleanup:s};function u(i){var o=a.addDummyNode(i,"root",{},"_root"),d=r(i),f=e.max(e.values(d))-1,c=2*f+1;i.graph().nestingRoot=o,e.forEach(i.edges(),function(l){i.edge(l).minlen*=c});var h=t(i)+1;e.forEach(i.children(),function(l){n(i,o,c,h,f,d,l)}),i.graph().nodeRankFactor=c}function n(i,o,d,f,c,h,l){var q=i.children(l);if(!q.length){l!==o&&i.setEdge(o,l,{weight:0,minlen:d});return}var g=a.addBorderNode(i,"_bt"),v=a.addBorderNode(i,"_bb"),_=i.node(l);i.setParent(g,l),_.borderTop=g,i.setParent(v,l),_.borderBottom=v,e.forEach(q,function(y){n(i,o,d,f,c,h,y);var b=i.node(y),m=b.borderTop?b.borderTop:y,E=b.borderBottom?b.borderBottom:y,w=b.borderTop?f:2*f,p=m!==E?1:c-h[l]+1;i.setEdge(g,m,{weight:w,minlen:p,nestingEdge:!0}),i.setEdge(E,v,{weight:w,minlen:p,nestingEdge:!0})}),i.parent(l)||i.setEdge(o,g,{weight:0,minlen:c+h[l]})}function r(i){var o={};function d(f,c){var h=i.children(f);h&&h.length&&e.forEach(h,function(l){d(l,c+1)}),o[f]=c}return e.forEach(i.children(),function(f){d(f,1)}),o}function t(i){return e.reduce(i.edges(),function(o,d){return o+i.edge(d).weight},0)}function s(i){var o=i.graph();i.removeNode(o.nestingRoot),delete o.nestingRoot,e.forEach(i.edges(),function(d){var f=i.edge(d);f.nestingEdge&&i.removeEdge(d)})}return kt}var xt,Rs;function Zd(){if(Rs)return xt;Rs=1;var e=G(),a=V();xt=u;function u(r){function t(s){var i=r.children(s),o=r.node(s);if(i.length&&e.forEach(i,t),e.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var d=o.minRank,f=o.maxRank+1;d<f;++d)n(r,"borderLeft","_bl",s,o,d),n(r,"borderRight","_br",s,o,d)}}e.forEach(r.children(),t)}function n(r,t,s,i,o,d){var f={width:0,height:0,rank:d,borderType:t},c=o[t][d-1],h=a.addDummyNode(r,"border",f,s);o[t][d]=h,r.setParent(h,i),c&&r.setEdge(c,h,{weight:1})}return xt}var Lt,Is;function Qd(){if(Is)return Lt;Is=1;var e=G();Lt={adjust:a,undo:u};function a(d){var f=d.graph().rankdir.toLowerCase();(f==="lr"||f==="rl")&&n(d)}function u(d){var f=d.graph().rankdir.toLowerCase();(f==="bt"||f==="rl")&&t(d),(f==="lr"||f==="rl")&&(i(d),n(d))}function n(d){e.forEach(d.nodes(),function(f){r(d.node(f))}),e.forEach(d.edges(),function(f){r(d.edge(f))})}function r(d){var f=d.width;d.width=d.height,d.height=f}function t(d){e.forEach(d.nodes(),function(f){s(d.node(f))}),e.forEach(d.edges(),function(f){var c=d.edge(f);e.forEach(c.points,s),e.has(c,"y")&&s(c)})}function s(d){d.y=-d.y}function i(d){e.forEach(d.nodes(),function(f){o(d.node(f))}),e.forEach(d.edges(),function(f){var c=d.edge(f);e.forEach(c.points,o),e.has(c,"x")&&o(c)})}function o(d){var f=d.x;d.x=d.y,d.y=f}return Lt}var Pt,Ts;function Jd(){if(Ts)return Pt;Ts=1;var e=G();Pt=a;function a(u){var n={},r=e.filter(u.nodes(),function(d){return!u.children(d).length}),t=e.max(e.map(r,function(d){return u.node(d).rank})),s=e.map(e.range(t+1),function(){return[]});function i(d){if(!e.has(n,d)){n[d]=!0;var f=u.node(d);s[f.rank].push(d),e.forEach(u.successors(d),i)}}var o=e.sortBy(r,function(d){return u.node(d).rank});return e.forEach(o,i),s}return Pt}var Mt,Ss;function ec(){if(Ss)return Mt;Ss=1;var e=G();Mt=a;function a(n,r){for(var t=0,s=1;s<r.length;++s)t+=u(n,r[s-1],r[s]);return t}function u(n,r,t){for(var s=e.zipObject(t,e.map(t,function(h,l){return l})),i=e.flatten(e.map(r,function(h){return e.sortBy(e.map(n.outEdges(h),function(l){return{pos:s[l.w],weight:n.edge(l).weight}}),"pos")}),!0),o=1;o<t.length;)o<<=1;var d=2*o-1;o-=1;var f=e.map(new Array(d),function(){return 0}),c=0;return e.forEach(i.forEach(function(h){var l=h.pos+o;f[l]+=h.weight;for(var q=0;l>0;)l%2&&(q+=f[l+1]),l=l-1>>1,f[l]+=h.weight;c+=h.weight*q})),c}return Mt}var Ft,Cs;function rc(){if(Cs)return Ft;Cs=1;var e=G();Ft=a;function a(u,n){return e.map(n,function(r){var t=u.inEdges(r);if(t.length){var s=e.reduce(t,function(i,o){var d=u.edge(o),f=u.node(o.v);return{sum:i.sum+d.weight*f.order,weight:i.weight+d.weight}},{sum:0,weight:0});return{v:r,barycenter:s.sum/s.weight,weight:s.weight}}else return{v:r}})}return Ft}var Gt,Os;function nc(){if(Os)return Gt;Os=1;var e=G();Gt=a;function a(r,t){var s={};e.forEach(r,function(o,d){var f=s[o.v]={indegree:0,in:[],out:[],vs:[o.v],i:d};e.isUndefined(o.barycenter)||(f.barycenter=o.barycenter,f.weight=o.weight)}),e.forEach(t.edges(),function(o){var d=s[o.v],f=s[o.w];!e.isUndefined(d)&&!e.isUndefined(f)&&(f.indegree++,d.out.push(s[o.w]))});var i=e.filter(s,function(o){return!o.indegree});return u(i)}function u(r){var t=[];function s(d){return function(f){f.merged||(e.isUndefined(f.barycenter)||e.isUndefined(d.barycenter)||f.barycenter>=d.barycenter)&&n(d,f)}}function i(d){return function(f){f.in.push(d),--f.indegree===0&&r.push(f)}}for(;r.length;){var o=r.pop();t.push(o),e.forEach(o.in.reverse(),s(o)),e.forEach(o.out,i(o))}return e.map(e.filter(t,function(d){return!d.merged}),function(d){return e.pick(d,["vs","i","barycenter","weight"])})}function n(r,t){var s=0,i=0;r.weight&&(s+=r.barycenter*r.weight,i+=r.weight),t.weight&&(s+=t.barycenter*t.weight,i+=t.weight),r.vs=t.vs.concat(r.vs),r.barycenter=s/i,r.weight=i,r.i=Math.min(t.i,r.i),t.merged=!0}return Gt}var Dt,As;function tc(){if(As)return Dt;As=1;var e=G(),a=V();Dt=u;function u(t,s){var i=a.partition(t,function(g){return e.has(g,"barycenter")}),o=i.lhs,d=e.sortBy(i.rhs,function(g){return-g.i}),f=[],c=0,h=0,l=0;o.sort(r(!!s)),l=n(f,d,l),e.forEach(o,function(g){l+=g.vs.length,f.push(g.vs),c+=g.barycenter*g.weight,h+=g.weight,l=n(f,d,l)});var q={vs:e.flatten(f,!0)};return h&&(q.barycenter=c/h,q.weight=h),q}function n(t,s,i){for(var o;s.length&&(o=e.last(s)).i<=i;)s.pop(),t.push(o.vs),i++;return i}function r(t){return function(s,i){return s.barycenter<i.barycenter?-1:s.barycenter>i.barycenter?1:t?i.i-s.i:s.i-i.i}}return Dt}var Ut,Ns;function ic(){if(Ns)return Ut;Ns=1;var e=G(),a=rc(),u=nc(),n=tc();Ut=r;function r(i,o,d,f){var c=i.children(o),h=i.node(o),l=h?h.borderLeft:void 0,q=h?h.borderRight:void 0,g={};l&&(c=e.filter(c,function(E){return E!==l&&E!==q}));var v=a(i,c);e.forEach(v,function(E){if(i.children(E.v).length){var w=r(i,E.v,d,f);g[E.v]=w,e.has(w,"barycenter")&&s(E,w)}});var _=u(v,d);t(_,g);var y=n(_,f);if(l&&(y.vs=e.flatten([l,y.vs,q],!0),i.predecessors(l).length)){var b=i.node(i.predecessors(l)[0]),m=i.node(i.predecessors(q)[0]);e.has(y,"barycenter")||(y.barycenter=0,y.weight=0),y.barycenter=(y.barycenter*y.weight+b.order+m.order)/(y.weight+2),y.weight+=2}return y}function t(i,o){e.forEach(i,function(d){d.vs=e.flatten(d.vs.map(function(f){return o[f]?o[f].vs:f}),!0)})}function s(i,o){e.isUndefined(i.barycenter)?(i.barycenter=o.barycenter,i.weight=o.weight):(i.barycenter=(i.barycenter*i.weight+o.barycenter*o.weight)/(i.weight+o.weight),i.weight+=o.weight)}return Ut}var Bt,ks;function ac(){if(ks)return Bt;ks=1;var e=G(),a=Y().Graph;Bt=u;function u(r,t,s){var i=n(r),o=new a({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(d){return r.node(d)});return e.forEach(r.nodes(),function(d){var f=r.node(d),c=r.parent(d);(f.rank===t||f.minRank<=t&&t<=f.maxRank)&&(o.setNode(d),o.setParent(d,c||i),e.forEach(r[s](d),function(h){var l=h.v===d?h.w:h.v,q=o.edge(l,d),g=e.isUndefined(q)?0:q.weight;o.setEdge(l,d,{weight:r.edge(h).weight+g})}),e.has(f,"minRank")&&o.setNode(d,{borderLeft:f.borderLeft[t],borderRight:f.borderRight[t]}))}),o}function n(r){for(var t;r.hasNode(t=e.uniqueId("_root")););return t}return Bt}var Ht,xs;function uc(){if(xs)return Ht;xs=1;var e=G();Ht=a;function a(u,n,r){var t={},s;e.forEach(r,function(i){for(var o=u.parent(i),d,f;o;){if(d=u.parent(o),d?(f=t[d],t[d]=o):(f=s,s=o),f&&f!==o){n.setEdge(f,o);return}o=d}})}return Ht}var Wt,Ls;function sc(){if(Ls)return Wt;Ls=1;var e=G(),a=Jd(),u=ec(),n=ic(),r=ac(),t=uc(),s=Y().Graph,i=V();Wt=o;function o(h){var l=i.maxRank(h),q=d(h,e.range(1,l+1),"inEdges"),g=d(h,e.range(l-1,-1,-1),"outEdges"),v=a(h);c(h,v);for(var _=Number.POSITIVE_INFINITY,y,b=0,m=0;m<4;++b,++m){f(b%2?q:g,b%4>=2),v=i.buildLayerMatrix(h);var E=u(h,v);E<_&&(m=0,y=e.cloneDeep(v),_=E)}c(h,y)}function d(h,l,q){return e.map(l,function(g){return r(h,g,q)})}function f(h,l){var q=new s;e.forEach(h,function(g){var v=g.graph().root,_=n(g,v,q,l);e.forEach(_.vs,function(y,b){g.node(y).order=b}),t(g,q,_.vs)})}function c(h,l){e.forEach(l,function(q){e.forEach(q,function(g,v){h.node(g).order=v})})}return Wt}var Vt,Ps;function oc(){if(Ps)return Vt;Ps=1;var e=G(),a=Y().Graph,u=V();Vt={positionX:q,findType1Conflicts:n,findType2Conflicts:r,addConflict:s,hasConflict:i,verticalAlignment:o,horizontalCompaction:d,alignCoordinates:h,findSmallestWidthAlignment:c,balance:l};function n(_,y){var b={};function m(E,w){var p=0,T=0,C=E.length,O=e.last(w);return e.forEach(w,function(x,N){var L=t(_,x),M=L?_.node(L).order:C;(L||x===O)&&(e.forEach(w.slice(T,N+1),function(F){e.forEach(_.predecessors(F),function(H){var oe=_.node(H),fe=oe.order;(fe<p||M<fe)&&!(oe.dummy&&_.node(F).dummy)&&s(b,H,F)})}),T=N+1,p=M)}),w}return e.reduce(y,m),b}function r(_,y){var b={};function m(w,p,T,C,O){var x;e.forEach(e.range(p,T),function(N){x=w[N],_.node(x).dummy&&e.forEach(_.predecessors(x),function(L){var M=_.node(L);M.dummy&&(M.order<C||M.order>O)&&s(b,L,x)})})}function E(w,p){var T=-1,C,O=0;return e.forEach(p,function(x,N){if(_.node(x).dummy==="border"){var L=_.predecessors(x);L.length&&(C=_.node(L[0]).order,m(p,O,N,T,C),O=N,T=C)}m(p,O,p.length,C,w.length)}),p}return e.reduce(y,E),b}function t(_,y){if(_.node(y).dummy)return e.find(_.predecessors(y),function(b){return _.node(b).dummy})}function s(_,y,b){if(y>b){var m=y;y=b,b=m}var E=_[y];E||(_[y]=E={}),E[b]=!0}function i(_,y,b){if(y>b){var m=y;y=b,b=m}return e.has(_[y],b)}function o(_,y,b,m){var E={},w={},p={};return e.forEach(y,function(T){e.forEach(T,function(C,O){E[C]=C,w[C]=C,p[C]=O})}),e.forEach(y,function(T){var C=-1;e.forEach(T,function(O){var x=m(O);if(x.length){x=e.sortBy(x,function(H){return p[H]});for(var N=(x.length-1)/2,L=Math.floor(N),M=Math.ceil(N);L<=M;++L){var F=x[L];w[O]===O&&C<p[F]&&!i(b,O,F)&&(w[F]=O,w[O]=E[O]=E[F],C=p[F])}}})}),{root:E,align:w}}function d(_,y,b,m,E){var w={},p=f(_,y,b,E),T=E?"borderLeft":"borderRight";function C(N,L){for(var M=p.nodes(),F=M.pop(),H={};F;)H[F]?N(F):(H[F]=!0,M.push(F),M=M.concat(L(F))),F=M.pop()}function O(N){w[N]=p.inEdges(N).reduce(function(L,M){return Math.max(L,w[M.v]+p.edge(M))},0)}function x(N){var L=p.outEdges(N).reduce(function(F,H){return Math.min(F,w[H.w]-p.edge(H))},Number.POSITIVE_INFINITY),M=_.node(N);L!==Number.POSITIVE_INFINITY&&M.borderType!==T&&(w[N]=Math.max(w[N],L))}return C(O,p.predecessors.bind(p)),C(x,p.successors.bind(p)),e.forEach(m,function(N){w[N]=w[b[N]]}),w}function f(_,y,b,m){var E=new a,w=_.graph(),p=g(w.nodesep,w.edgesep,m);return e.forEach(y,function(T){var C;e.forEach(T,function(O){var x=b[O];if(E.setNode(x),C){var N=b[C],L=E.edge(N,x);E.setEdge(N,x,Math.max(p(_,O,C),L||0))}C=O})}),E}function c(_,y){return e.minBy(e.values(y),function(b){var m=Number.NEGATIVE_INFINITY,E=Number.POSITIVE_INFINITY;return e.forIn(b,function(w,p){var T=v(_,p)/2;m=Math.max(w+T,m),E=Math.min(w-T,E)}),m-E})}function h(_,y){var b=e.values(y),m=e.min(b),E=e.max(b);e.forEach(["u","d"],function(w){e.forEach(["l","r"],function(p){var T=w+p,C=_[T],O;if(C!==y){var x=e.values(C);O=p==="l"?m-e.min(x):E-e.max(x),O&&(_[T]=e.mapValues(C,function(N){return N+O}))}})})}function l(_,y){return e.mapValues(_.ul,function(b,m){if(y)return _[y.toLowerCase()][m];var E=e.sortBy(e.map(_,m));return(E[1]+E[2])/2})}function q(_){var y=u.buildLayerMatrix(_),b=e.merge(n(_,y),r(_,y)),m={},E;e.forEach(["u","d"],function(p){E=p==="u"?y:e.values(y).reverse(),e.forEach(["l","r"],function(T){T==="r"&&(E=e.map(E,function(N){return e.values(N).reverse()}));var C=(p==="u"?_.predecessors:_.successors).bind(_),O=o(_,E,b,C),x=d(_,E,O.root,O.align,T==="r");T==="r"&&(x=e.mapValues(x,function(N){return-N})),m[p+T]=x})});var w=c(_,m);return h(m,w),l(m,_.graph().align)}function g(_,y,b){return function(m,E,w){var p=m.node(E),T=m.node(w),C=0,O;if(C+=p.width/2,e.has(p,"labelpos"))switch(p.labelpos.toLowerCase()){case"l":O=-p.width/2;break;case"r":O=p.width/2;break}if(O&&(C+=b?O:-O),O=0,C+=(p.dummy?y:_)/2,C+=(T.dummy?y:_)/2,C+=T.width/2,e.has(T,"labelpos"))switch(T.labelpos.toLowerCase()){case"l":O=T.width/2;break;case"r":O=-T.width/2;break}return O&&(C+=b?O:-O),O=0,C}}function v(_,y){return _.node(y).width}return Vt}var jt,Ms;function fc(){if(Ms)return jt;Ms=1;var e=G(),a=V(),u=oc().positionX;jt=n;function n(t){t=a.asNonCompoundGraph(t),r(t),e.forEach(u(t),function(s,i){t.node(i).x=s})}function r(t){var s=a.buildLayerMatrix(t),i=t.graph().ranksep,o=0;e.forEach(s,function(d){var f=e.max(e.map(d,function(c){return t.node(c).height}));e.forEach(d,function(c){t.node(c).y=o+f/2}),o+=f+i})}return jt}var Kt,Fs;function dc(){if(Fs)return Kt;Fs=1;var e=G(),a=jd(),u=Kd(),n=Yd(),r=V().normalizeRanks,t=$d(),s=V().removeEmptyRanks,i=Xd(),o=Zd(),d=Qd(),f=sc(),c=fc(),h=V(),l=Y().Graph;Kt=q;function q(R,S){var A=S&&S.debugTiming?h.time:h.notime;A("layout",function(){var k=A(" buildLayoutGraph",function(){return C(R)});A(" runLayout",function(){g(k,A)}),A(" updateInputGraph",function(){v(R,k)})})}function g(R,S){S(" makeSpaceForEdgeLabels",function(){O(R)}),S(" removeSelfEdges",function(){xo(R)}),S(" acyclic",function(){a.run(R)}),S(" nestingGraph.run",function(){i.run(R)}),S(" rank",function(){n(h.asNonCompoundGraph(R))}),S(" injectEdgeLabelProxies",function(){x(R)}),S(" removeEmptyRanks",function(){s(R)}),S(" nestingGraph.cleanup",function(){i.cleanup(R)}),S(" normalizeRanks",function(){r(R)}),S(" assignRankMinMax",function(){N(R)}),S(" removeEdgeLabelProxies",function(){L(R)}),S(" normalize.run",function(){u.run(R)}),S(" parentDummyChains",function(){t(R)}),S(" addBorderSegments",function(){o(R)}),S(" order",function(){f(R)}),S(" insertSelfEdges",function(){Lo(R)}),S(" adjustCoordinateSystem",function(){d.adjust(R)}),S(" position",function(){c(R)}),S(" positionSelfEdges",function(){Po(R)}),S(" removeBorderNodes",function(){fe(R)}),S(" normalize.undo",function(){u.undo(R)}),S(" fixupEdgeLabelCoords",function(){H(R)}),S(" undoCoordinateSystem",function(){d.undo(R)}),S(" translateGraph",function(){M(R)}),S(" assignNodeIntersects",function(){F(R)}),S(" reversePoints",function(){oe(R)}),S(" acyclic.undo",function(){a.undo(R)})}function v(R,S){e.forEach(R.nodes(),function(A){var k=R.node(A),P=S.node(A);k&&(k.x=P.x,k.y=P.y,S.children(A).length&&(k.width=P.width,k.height=P.height))}),e.forEach(R.edges(),function(A){var k=R.edge(A),P=S.edge(A);k.points=P.points,e.has(P,"x")&&(k.x=P.x,k.y=P.y)}),R.graph().width=S.graph().width,R.graph().height=S.graph().height}var _=["nodesep","edgesep","ranksep","marginx","marginy"],y={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],m=["width","height"],E={width:0,height:0},w=["minlen","weight","width","height","labeloffset"],p={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},T=["labelpos"];function C(R){var S=new l({multigraph:!0,compound:!0}),A=Ce(R.graph());return S.setGraph(e.merge({},y,Se(A,_),e.pick(A,b))),e.forEach(R.nodes(),function(k){var P=Ce(R.node(k));S.setNode(k,e.defaults(Se(P,m),E)),S.setParent(k,R.parent(k))}),e.forEach(R.edges(),function(k){var P=Ce(R.edge(k));S.setEdge(k,e.merge({},p,Se(P,w),e.pick(P,T)))}),S}function O(R){var S=R.graph();S.ranksep/=2,e.forEach(R.edges(),function(A){var k=R.edge(A);k.minlen*=2,k.labelpos.toLowerCase()!=="c"&&(S.rankdir==="TB"||S.rankdir==="BT"?k.width+=k.labeloffset:k.height+=k.labeloffset)})}function x(R){e.forEach(R.edges(),function(S){var A=R.edge(S);if(A.width&&A.height){var k=R.node(S.v),P=R.node(S.w),D={rank:(P.rank-k.rank)/2+k.rank,e:S};h.addDummyNode(R,"edge-proxy",D,"_ep")}})}function N(R){var S=0;e.forEach(R.nodes(),function(A){var k=R.node(A);k.borderTop&&(k.minRank=R.node(k.borderTop).rank,k.maxRank=R.node(k.borderBottom).rank,S=e.max(S,k.maxRank))}),R.graph().maxRank=S}function L(R){e.forEach(R.nodes(),function(S){var A=R.node(S);A.dummy==="edge-proxy"&&(R.edge(A.e).labelRank=A.rank,R.removeNode(S))})}function M(R){var S=Number.POSITIVE_INFINITY,A=0,k=Number.POSITIVE_INFINITY,P=0,D=R.graph(),U=D.marginx||0,j=D.marginy||0;function gi(K){var W=K.x,ne=K.y,_i=K.width,bi=K.height;S=Math.min(S,W-_i/2),A=Math.max(A,W+_i/2),k=Math.min(k,ne-bi/2),P=Math.max(P,ne+bi/2)}e.forEach(R.nodes(),function(K){gi(R.node(K))}),e.forEach(R.edges(),function(K){var W=R.edge(K);e.has(W,"x")&&gi(W)}),S-=U,k-=j,e.forEach(R.nodes(),function(K){var W=R.node(K);W.x-=S,W.y-=k}),e.forEach(R.edges(),function(K){var W=R.edge(K);e.forEach(W.points,function(ne){ne.x-=S,ne.y-=k}),e.has(W,"x")&&(W.x-=S),e.has(W,"y")&&(W.y-=k)}),D.width=A-S+U,D.height=P-k+j}function F(R){e.forEach(R.edges(),function(S){var A=R.edge(S),k=R.node(S.v),P=R.node(S.w),D,U;A.points?(D=A.points[0],U=A.points[A.points.length-1]):(A.points=[],D=P,U=k),A.points.unshift(h.intersectRect(k,D)),A.points.push(h.intersectRect(P,U))})}function H(R){e.forEach(R.edges(),function(S){var A=R.edge(S);if(e.has(A,"x"))switch((A.labelpos==="l"||A.labelpos==="r")&&(A.width-=A.labeloffset),A.labelpos){case"l":A.x-=A.width/2+A.labeloffset;break;case"r":A.x+=A.width/2+A.labeloffset;break}})}function oe(R){e.forEach(R.edges(),function(S){var A=R.edge(S);A.reversed&&A.points.reverse()})}function fe(R){e.forEach(R.nodes(),function(S){if(R.children(S).length){var A=R.node(S),k=R.node(A.borderTop),P=R.node(A.borderBottom),D=R.node(e.last(A.borderLeft)),U=R.node(e.last(A.borderRight));A.width=Math.abs(U.x-D.x),A.height=Math.abs(P.y-k.y),A.x=D.x+A.width/2,A.y=k.y+A.height/2}}),e.forEach(R.nodes(),function(S){R.node(S).dummy==="border"&&R.removeNode(S)})}function xo(R){e.forEach(R.edges(),function(S){if(S.v===S.w){var A=R.node(S.v);A.selfEdges||(A.selfEdges=[]),A.selfEdges.push({e:S,label:R.edge(S)}),R.removeEdge(S)}})}function Lo(R){var S=h.buildLayerMatrix(R);e.forEach(S,function(A){var k=0;e.forEach(A,function(P,D){var U=R.node(P);U.order=D+k,e.forEach(U.selfEdges,function(j){h.addDummyNode(R,"selfedge",{width:j.label.width,height:j.label.height,rank:U.rank,order:D+ ++k,e:j.e,label:j.label},"_se")}),delete U.selfEdges})})}function Po(R){e.forEach(R.nodes(),function(S){var A=R.node(S);if(A.dummy==="selfedge"){var k=R.node(A.e.v),P=k.x+k.width/2,D=k.y,U=A.x-P,j=k.height/2;R.setEdge(A.e,A.label),R.removeNode(S),A.label.points=[{x:P+2*U/3,y:D-j},{x:P+5*U/6,y:D-j},{x:P+U,y:D},{x:P+5*U/6,y:D+j},{x:P+2*U/3,y:D+j}],A.label.x=A.x,A.label.y=A.y}})}function Se(R,S){return e.mapValues(e.pick(R,S),Number)}function Ce(R){var S={};return e.forEach(R,function(A,k){S[k.toLowerCase()]=A}),S}return Kt}var zt,Gs;function cc(){if(Gs)return zt;Gs=1;var e=G(),a=V(),u=Y().Graph;zt={debugOrdering:n};function n(r){var t=a.buildLayerMatrix(r),s=new u({compound:!0,multigraph:!0}).setGraph({});return e.forEach(r.nodes(),function(i){s.setNode(i,{label:i}),s.setParent(i,"layer"+r.node(i).rank)}),e.forEach(r.edges(),function(i){s.setEdge(i.v,i.w,{},i.name)}),e.forEach(t,function(i,o){var d="layer"+o;s.setNode(d,{rank:"same"}),e.reduce(i,function(f,c){return s.setEdge(f,c,{style:"invis"}),c})}),s}return zt}var Yt,Ds;function hc(){return Ds||(Ds=1,Yt="0.8.5"),Yt}var $t,Us;function lc(){return Us||(Us=1,$t={graphlib:Y(),layout:dc(),debug:cc(),util:{time:V().time,notime:V().notime},version:hc()}),$t}var vc=lc();const Bs=I.getDefaultExportFromCjs(vc);var Xt,Hs;function pc(){if(Hs)return Xt;Hs=1;var e=ei();function a(u,n){return e(u,n)}return Xt=a,Xt}var gc=pc();const _c=I.getDefaultExportFromCjs(gc),Z="root.Triggers";function qe(e,a){const{getEdges:u}=B.useVueFlow(e),n=[];for(const r of u.value)if(r.target===a){n.push(r);const t=qe(e,r.source);t.length>0&&n.push(...t)}return n}function Ee(e,a){const{getEdges:u}=B.useVueFlow(e),n=[];for(const r of u.value)if(r.source===a){n.push(r);const t=Ee(e,r.target);t.length>0&&n.push(...t)}return n}function we(e,a){const{getEdges:u,findNode:n}=B.useVueFlow(e),r=n(a),t=r?[r]:[];for(const s of u.value)if(s.target===a){t.push(s.sourceNode);const i=we(e,s.source);i.length>0&&t.push(...i)}return t}function Re(e,a){const{getEdges:u,findNode:n}=B.useVueFlow(e),r=[n(a)];for(const t of u.value)if(t.source===a){r.push(t.targetNode);const s=Re(e,t.target);s.length>0&&r.push(...s)}return r}function Oo(e,a){return[...qe(e,a),...we(e,a),...Ee(e,a),...Re(e,a)]}function si(e,a,u,n,r,t,s){const i=new Bs.graphlib.Graph({compound:!0});i.setDefaultEdgeLabel(()=>({})),i.setGraph({rankdir:u?"LR":"TB"});for(const o of e.nodes)a.includes(o.uid)||i.setNode(o.uid,{width:ie(o),height:ae(o)});for(const o of e.clusters||[]){const d=o.cluster.uid.replace(ee,"");if(n.includes(o.cluster.uid)&&t.has(d)){const f={uid:d,type:"collapsedcluster"};i.setNode(d,{width:ie(f),height:ae(f)}),s.push(f);continue}if(!r[o.cluster.uid]){i.setNode(o.cluster.uid,{clusterLabelPos:"top"});for(const f of o.nodes||[])a.includes(f)||i.setParent(f,o.cluster.uid)}if(o.parents){const f=r[o.cluster.uid]?r[o.cluster.uid]:o.cluster.uid;a.includes(f)||i.setParent(f,o.parents[o.parents.length-1])}}for(const o of e.edges||[]){const d=Te(o.source,o.target,r,a);d&&i.setEdge(d.source,d.target)}return Bs.layout(i),i}function te(e,a){const u={x:e.x-e.width/2,y:e.y-e.height/2};if(a){const n=te(a);u.x=u.x-n.x,u.y=u.y-n.y}return u}function ie(e){return Ie(e)||se(e)||oi(e)?$.TASK_WIDTH:J(e)?$.COLLAPSED_CLUSTER_WIDTH:$.DOT_WIDTH}function ae(e){return Ie(e)||se(e)?$.TASK_HEIGHT:J(e)?$.COLLAPSED_CLUSTER_HEIGHT:$.DOT_HEIGHT}function Ie(e){return["GraphTask","SubflowGraphTask$1"].some(a=>e.type.endsWith(a))}function se(e){return e.type.endsWith("GraphTrigger")}function oi(e){return e.type.endsWith("CustomGraphNode")}function J(e){return e.type==="collapsedcluster"}function Te(e,a,u,n){const r=u[e]?u[e]:e,t=u[a]?u[a]:a;return r===t||n.includes(r)||n.includes(t)?null:{target:t,source:r}}function Ao(e){const{getEdges:a,getNodes:u,getElements:n,removeEdges:r,removeNodes:t,removeSelectedElements:s}=B.useVueFlow(e);r(a.value),t(u.value),s(n.value)}function fi(e){return e?I.flowHaveTasks(e):!1}function di(e,a){return e.uid===Z||se(e)||J(e)?"success":e.type.endsWith("SubflowGraphTask")?"primary":e.branchType=="ERROR"?"danger":e.branchType=="FINALLY"?"warning":a.has(e.uid)?"blue":"default"}function ci(e,a,u,n){if(n.some(d=>e.source.startsWith(d)&&e.target.startsWith(d))||u.includes(e.target)||e.source.startsWith(Z)||e.target.startsWith(Z))return;const r=e.target.split(".");r.pop();const t=r.join("."),s=de.afterLastDot(t),i=a[e.target];if(i.type.endsWith("GraphClusterEnd")&&a[t]?.task?.type?.endsWith("Parallel"))return;if(i.type.endsWith("GraphClusterRoot"))return[s,"before"];const o=a[e.source].type.endsWith("GraphClusterEnd");if(!o&&i.type.endsWith("GraphClusterEnd"))return[de.afterLastDot(e.source),"after"];if(o){const d=e.source.split(".");return[d[d.length-2],"after"]}return[de.afterLastDot(e.target),"before"]}function hi(e,a,u){const n=s=>{const i=s.split(".");for(let o=1;o<=i.length;o++){const d=i.slice(0,o).join("."),f=u[d]?.branchType;if(f)return f}return a[s]?.branchType??null},r=n(e.source),t=n(e.target);return[r,t].includes("ERROR")?"danger":[r,t].includes("FINALLY")?"warning":null}function No(e,a,u,n,r,t,s,i,o,d,f,c,h){const l=[],q=[ee+Z];if(!n||r&&!fi(r)){console.warn("No flow graph or tasks found"),l.push({id:"start",type:"dot",position:{x:0,y:0},style:{width:"5px",height:"5px"},sourcePosition:s?B.Position.Right:B.Position.Bottom,targetPosition:s?B.Position.Left:B.Position.Top,parentNode:void 0,draggable:!1}),l.push({id:"end",type:"dot",position:s?{x:50,y:0}:{x:0,y:50},style:{width:"5px",height:"5px"},sourcePosition:s?B.Position.Right:B.Position.Bottom,targetPosition:s?B.Position.Left:B.Position.Top,parentNode:void 0,draggable:!1}),l.push({id:"start|end",source:"start",target:"end",type:"edge",data:{edge:{relation:{relationType:"SEQUENTIAL"}},isFlowable:!1,initTask:!0,color:"primary"}});return}const g=si(n,t,s,q,i,o,d),v={},_=n.clusters||[],y=_.map(p=>p.cluster),b=y.filter(p=>p.type.endsWith("SubflowGraphCluster")).map(p=>p.taskNode.uid),m=Object.fromEntries(n.nodes.concat(d).map(p=>[p.uid,p]));for(const p of _)if(!i[p.cluster.uid]&&!o.has(p.cluster.uid)){p.cluster.taskNode?.task?.type==="io.kestra.core.tasks.flows.Dag"&&b.push(p.cluster.taskNode.uid);for(const N of p.nodes)v[N]=p.cluster;const T=p.cluster.uid,C=g.node(T),O=p.parents?p.parents[p.parents.length-1]:void 0,x=li(p.cluster);l.push({id:T,type:"cluster",parentNode:O,position:te(C,O?g.node(O):void 0),style:{width:T===Z&&s?$.TRIGGER_CLUSTER_WIDTH+"px":C.width+"px",height:T===Z&&!s?$.TRIGGER_CLUSTER_HEIGHT+"px":C.height+"px"},data:{collapsable:!0,color:x,taskNode:p.cluster.taskNode,unused:p.cluster.taskNode?m[p.cluster.taskNode.uid].unused:!1},class:`ks-topology-${x}-border rounded p-2`})}for(const p of n.nodes.concat(d))if(!t.includes(p.uid)){const T=g.node(p.uid);let C="task";he(p)?C="dot":p.type.endsWith("CustomGraphNode")?C="custom":p.type.includes("GraphTrigger")?C="trigger":p.type==="collapsedcluster"&&(C="collapsedcluster");const O=di(p,o),x=f||p.task?.type?.includes("$")||b.some(L=>p.uid.startsWith(L+".")),N=v[p.uid];l.push({id:p.uid,type:C,position:te(T,N?g.node(N.uid):void 0),style:{width:ie(p)+"px",height:ae(p)+"px"},sourcePosition:s?B.Position.Right:B.Position.Bottom,targetPosition:s?B.Position.Left:B.Position.Top,parentNode:N?N.uid:void 0,draggable:C==="task"?!x:!1,data:{node:p,parent:N||void 0,namespace:N?.taskNode?.task?.namespace??u,flowId:N?.taskNode?.task?.flowId??a,isFlowable:N?.uid===ee+p.uid&&!p.type.endsWith("SubflowGraphTask"),color:O,expandable:vi(p,v,i,h),isReadOnly:x,iconComponent:J(p)?"lightning-bolt":null,executionId:p.executionId,unused:p.unused},class:p.type==="collapsedcluster"?`ks-topology-${O}-border rounded`:""})}const E=y.filter(p=>p.taskNode).map(p=>p.taskNode.uid),w=n.edges??[];for(const p of w){const T=Te(p.source,p.target,i,t);if(T){const C=hi(p,m,v);l.push({id:T.source+"|"+T.target,source:T.source,target:T.target,type:"edge",markerEnd:he(m[T.target])?"":{id:"marker-"+(m[T.target].branchType?m[T.target].branchType?.toLocaleLowerCase():"custom"),type:B.MarkerType.ArrowClosed,color:C?`var(--ks-border-${C})`:"var(--ks-topology-edge-color)"},data:{haveAdd:!f&&c&&ci(p,m,E,b),haveDashArray:m[p.source].type.endsWith("GraphTrigger")||m[p.target].type.endsWith("GraphTrigger")||p.source.startsWith(Z),color:C,unused:p.unused},style:{zIndex:10},animated:!0})}}return l}function he(e){return["GraphClusterRoot","GraphClusterFinally","GraphClusterAfterExecution","GraphClusterEnd"].some(a=>e.type.endsWith(a))}function li(e){return e.uid===ee+Z?"success":e.type.endsWith("SubflowGraphCluster")?"primary":e.branchType==="ERROR"?"danger":"blue"}function vi(e,a,u,n){return Object.values(u).includes(e.uid)||J(e)?!0:e.type.endsWith("SubflowGraphTask")&&a[e.uid]?.uid?.replace(ee,"")!==e.uid&&n}function le(e){const u=e.nodes.map(n=>n.uid).filter(n=>!e.edges.some(r=>r.target===n));return e.nodes.filter(n=>u.includes(n.uid))}function pi(e,a){if(a)return e.edges.filter(u=>u.source===a&&u.target)}function ve(e,a){let u,n,r=[a.uid];do{if(u=r.flatMap(t=>pi(e,t)).filter(Boolean),u.length===0)return[];r=u.map(t=>t.target),n=e.nodes.filter(t=>r.includes(t.uid)&&t.task)}while(!n.length);return n}function ko(e,a,u){if(!u)return!1;let n=le(e),r=le(a);if(n.length!==r.length)return!1;let t=120;do{if(r=r.flatMap(s=>ve(a,s)),r.some(s=>s.task.id===u))return!0;if(n=n.flatMap(s=>ve(e,s)),n.length!==r.length)return!1;for(const s of r){const i=n.find(f=>f.task?.id===s.task?.id),o=i?.task??{},d=s.task??{};if(!i||Object.keys(o).length!==Object.keys(d).length||!_c(o,d))return!1}}while(n.length&&r.length&&t-- >0);return t<=0?(console.warn("areTasksIdenticalInGraphUntilTask: Infinite loop detected, stopping comparison."),!1):!0}const bc=Object.freeze(Object.defineProperty({__proto__:null,areTasksIdenticalInGraphUntilTask:ko,cleanGraph:Ao,computeClusterColor:li,flowHaveTasks:fi,generateDagreGraph:si,generateGraph:No,getEdgeColor:hi,getNextTaskNodes:ve,getNodeHeight:ae,getNodePosition:te,getNodeWidth:ie,getRootNodes:le,getTargetNodesEdges:pi,haveAdd:ci,isClusterRootOrEnd:he,isCollapsedCluster:J,isCustomNode:oi,isExpandableTask:vi,isTaskNode:Ie,isTriggerNode:se,linkedElements:Oo,nodeColor:di,predecessorsEdge:qe,predecessorsNode:we,replaceIfCollapsed:Te,successorsEdge:Ee,successorsNode:Re},Symbol.toStringTag,{value:"Module"}));exports.CLUSTER_PREFIX=ee;exports.EVENTS=Do;exports.NODE_SIZES=$;exports.SECTIONS=Go;exports.Utils=de;exports.VueFlowUtils=bc;exports.afterLastDot=no;exports.areTasksIdenticalInGraphUntilTask=ko;exports.cleanGraph=Ao;exports.computeClusterColor=li;exports.dateFilter=Js;exports.editorViewTypes=Ho;exports.executeFlowBehaviours=Vo;exports.flowHaveTasks=fi;exports.generateDagreGraph=si;exports.generateGraph=No;exports.getEdgeColor=hi;exports.getNextTaskNodes=ve;exports.getNodeHeight=ae;exports.getNodePosition=te;exports.getNodeWidth=ie;exports.getRootNodes=le;exports.getTargetNodesEdges=pi;exports.haveAdd=ci;exports.humanDuration=ro;exports.isClusterRootOrEnd=he;exports.isCollapsedCluster=J;exports.isCustomNode=oi;exports.isExpandableTask=vi;exports.isTaskNode=Ie;exports.isTriggerNode=se;exports.linkedElements=Oo;exports.logDisplayTypes=Bo;exports.nodeColor=di;exports.predecessorsEdge=qe;exports.predecessorsNode=we;exports.replaceIfCollapsed=Te;exports.requireMapValues=Qs;exports.stateDisplayValues=jo;exports.stateGlobalChartTypes=Uo;exports.storageKeys=Wo;exports.successorsEdge=Ee;exports.successorsNode=Re;
|
|
2
|
+
//# sourceMappingURL=VueFlowUtils-CF-L3pYu.cjs.map
|