@kestra-io/ui-libs 0.0.246 → 0.0.248
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/FlowYamlUtils-CB_0RSKT.cjs +3 -0
- package/dist/FlowYamlUtils-CB_0RSKT.cjs.map +1 -0
- package/dist/{FlowYamlUtils-_jGSsN6-.js → FlowYamlUtils-CEYKj9tP.js} +271 -268
- package/dist/FlowYamlUtils-CEYKj9tP.js.map +1 -0
- package/dist/{VueFlowUtils-pk1IKYsw.cjs → VueFlowUtils-BhZNyVgG.cjs} +2 -2
- package/dist/{VueFlowUtils-pk1IKYsw.cjs.map → VueFlowUtils-BhZNyVgG.cjs.map} +1 -1
- package/dist/{VueFlowUtils-BM5sOO3Y.js → VueFlowUtils-BzTE7TIL.js} +2 -2
- package/dist/{VueFlowUtils-BM5sOO3Y.js.map → VueFlowUtils-BzTE7TIL.js.map} +1 -1
- package/dist/components/nodes/EdgeNode.vue.d.ts.map +1 -1
- package/dist/{index-BifZsdYJ.cjs → index-WbOzUAko.cjs} +4 -4
- package/dist/index-WbOzUAko.cjs.map +1 -0
- package/dist/{index-TmFG7Sy4.js → index-l75aC6C7.js} +291 -287
- package/dist/index-l75aC6C7.js.map +1 -0
- package/dist/kestra-flowyamlutils.cjs.js +1 -1
- package/dist/kestra-flowyamlutils.es.js +1 -1
- package/dist/kestra-index.cjs.js +1 -1
- package/dist/kestra-index.es.js +2 -2
- package/dist/kestra-vueflowutils.cjs.js +1 -1
- package/dist/kestra-vueflowutils.es.js +2 -2
- package/dist/{shikiToolset-Bh1VQivq.js → shikiToolset-6oe9HW2b.js} +2 -2
- package/dist/{shikiToolset-Bh1VQivq.js.map → shikiToolset-6oe9HW2b.js.map} +1 -1
- package/dist/{shikiToolset-BZB-GXHM.cjs → shikiToolset-BixFI44v.cjs} +2 -2
- package/dist/{shikiToolset-BZB-GXHM.cjs.map → shikiToolset-BixFI44v.cjs.map} +1 -1
- package/dist/ui-libs.css +1 -1
- package/dist/utils/FlowYamlUtils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/nodes/EdgeNode.vue +3 -2
- package/src/utils/FlowYamlUtils.test.ts +39 -0
- package/src/utils/FlowYamlUtils.ts +24 -11
- package/dist/FlowYamlUtils-Bd5okvKN.cjs +0 -3
- package/dist/FlowYamlUtils-Bd5okvKN.cjs.map +0 -1
- package/dist/FlowYamlUtils-_jGSsN6-.js.map +0 -1
- package/dist/index-BifZsdYJ.cjs.map +0 -1
- package/dist/index-TmFG7Sy4.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const B=require("@vue-flow/core"),I=require("./FlowYamlUtils-Bd5okvKN.cjs"),_i=require("vue"),Lo=require("humanize-duration"),bi=require("moment"),Po=require("moment-timezone"),Mo={TASKS:"TASKS",TRIGGERS:"TRIGGERS",TASK_RUNNERS:"TASK_RUNNERS"},Fo={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_",Go={EXECUTIONS:"executions",TASKRUNS:"taskruns"},Do={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},Uo={STORAGE_KEY:"view-type",SOURCE:"source",SOURCE_TOPOLOGY:"source-topology",SOURCE_DOC:"source-doc",TOPOLOGY:"topology",SOURCE_BLUEPRINTS:"source-blueprints"},Bo={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"},Ho={SAME_TAB:"same tab",NEW_TAB:"new tab"},Wo={INPROGRESS:"IN-PROGRESS"};var Se,yi;function Vo(){if(yi)return Se;yi=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 Se=e,Se}var Ce,mi;function Zt(){if(mi)return Ce;mi=1;var e=Vo(),a=e();return Ce=a,Ce}var Ae,qi;function Qt(){if(qi)return Ae;qi=1;var e=Zt(),a=I.requireKeys();function u(n,r){return n&&e(n,r,a)}return Ae=u,Ae}var Oe,Ei;function jo(){if(Ei)return Oe;Ei=1;var e="__lodash_hash_undefined__";function a(u){return this.__data__.set(u,e),this}return Oe=a,Oe}var Ne,wi;function Ko(){if(wi)return Ne;wi=1;function e(a){return this.__data__.has(a)}return Ne=e,Ne}var ke,Ri;function Bs(){if(Ri)return ke;Ri=1;var e=I.require_MapCache(),a=jo(),u=Ko();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,ke=n,ke}var xe,Ii;function zo(){if(Ii)return xe;Ii=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 xe=e,xe}var Le,Ti;function Hs(){if(Ti)return Le;Ti=1;function e(a,u){return a.has(u)}return Le=e,Le}var Pe,Si;function Ws(){if(Si)return Pe;Si=1;var e=Bs(),a=zo(),u=Hs(),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 Pe=t,Pe}var Me,Ci;function Yo(){if(Ci)return Me;Ci=1;function e(a){var u=-1,n=Array(a.size);return a.forEach(function(r,t){n[++u]=[t,r]}),n}return Me=e,Me}var Fe,Ai;function Jt(){if(Ai)return Fe;Ai=1;function e(a){var u=-1,n=Array(a.size);return a.forEach(function(r){n[++u]=r}),n}return Fe=e,Fe}var Ge,Oi;function $o(){if(Oi)return Ge;Oi=1;var e=I.require_Symbol(),a=I.require_Uint8Array(),u=I.requireEq(),n=Ws(),r=Yo(),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,A,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,A,k,x);return x.delete(w),H;case v:if(m)return m.call(w)==m.call(p)}return!1}return Ge=E,Ge}var De,Ni;function Xo(){if(Ni)return De;Ni=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,A=s.constructor;C!=A&&"constructor"in t&&"constructor"in s&&!(typeof C=="function"&&C instanceof C&&typeof A=="function"&&A instanceof A)&&(m=!1)}return f.delete(t),f.delete(s),m}return De=r,De}var Ue,ki;function Zo(){if(ki)return Ue;ki=1;var e=I.require_Stack(),a=Ws(),u=$o(),n=Xo(),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,A=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=A&&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 Ue=q,Ue}var Be,xi;function ei(){if(xi)return Be;xi=1;var e=Zo(),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 Be=u,Be}var He,Li;function Qo(){if(Li)return He;Li=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 He=r,He}var We,Pi;function Vs(){if(Pi)return We;Pi=1;var e=I.requireIsObject();function a(u){return u===u&&!e(u)}return We=a,We}var Ve,Mi;function Jo(){if(Mi)return Ve;Mi=1;var e=Vs(),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 Ve=u,Ve}var je,Fi;function js(){if(Fi)return je;Fi=1;function e(a,u){return function(n){return n==null?!1:n[a]===u&&(u!==void 0||a in Object(n))}}return je=e,je}var Ke,Gi;function ef(){if(Gi)return Ke;Gi=1;var e=Qo(),a=Jo(),u=js();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 Ke=n,Ke}var ze,Di;function re(){if(Di)return ze;Di=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 ze=n,ze}var Ye,Ui;function ri(){if(Ui)return Ye;Ui=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 Ye=r,Ye}var $e,Bi;function rf(){if(Bi)return $e;Bi=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,$e=u,$e}var Xe,Hi;function nf(){if(Hi)return Xe;Hi=1;var e=rf(),a=500;function u(n){var r=e(n,function(s){return t.size===a&&t.clear(),s}),t=r.cache;return r}return Xe=u,Xe}var Ze,Wi;function tf(){if(Wi)return Ze;Wi=1;var e=nf(),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 Ze=n,Ze}var Qe,Vi;function le(){if(Vi)return Qe;Vi=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 Qe=e,Qe}var Je,ji;function af(){if(ji)return Je;ji=1;var e=I.require_Symbol(),a=le(),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 Je=s,Je}var er,Ki;function Ks(){if(Ki)return er;Ki=1;var e=af();function a(u){return u==null?"":e(u)}return er=a,er}var rr,zi;function ve(){if(zi)return rr;zi=1;var e=I.requireIsArray(),a=ri(),u=tf(),n=Ks();function r(t,s){return e(t)?t:a(t,s)?[t]:u(n(t))}return rr=r,rr}var nr,Yi;function ue(){if(Yi)return nr;Yi=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 nr=a,nr}var tr,$i;function pe(){if($i)return tr;$i=1;var e=ve(),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 tr=u,tr}var ir,Xi;function uf(){if(Xi)return ir;Xi=1;var e=pe();function a(u,n,r){var t=u==null?void 0:e(u,n);return t===void 0?r:t}return ir=a,ir}var ar,Zi;function sf(){if(Zi)return ar;Zi=1;function e(a,u){return a!=null&&u in Object(a)}return ar=e,ar}var ur,Qi;function zs(){if(Qi)return ur;Qi=1;var e=ve(),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 ur=s,ur}var sr,Ji;function Ys(){if(Ji)return sr;Ji=1;var e=sf(),a=zs();function u(n,r){return n!=null&&a(n,r,e)}return sr=u,sr}var or,ea;function of(){if(ea)return or;ea=1;var e=ei(),a=uf(),u=Ys(),n=ri(),r=Vs(),t=js(),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 or=d,or}var fr,ra;function Q(){if(ra)return fr;ra=1;function e(a){return a}return fr=e,fr}var dr,na;function $s(){if(na)return dr;na=1;function e(a){return function(u){return u?.[a]}}return dr=e,dr}var cr,ta;function ff(){if(ta)return cr;ta=1;var e=pe();function a(u){return function(n){return e(n,u)}}return cr=a,cr}var hr,ia;function df(){if(ia)return hr;ia=1;var e=$s(),a=ff(),u=ri(),n=ue();function r(t){return u(t)?e(n(t)):a(t)}return hr=r,hr}var lr,aa;function X(){if(aa)return lr;aa=1;var e=ef(),a=of(),u=Q(),n=I.requireIsArray(),r=df();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 lr=t,lr}var vr,ua;function Xs(){if(ua)return vr;ua=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 vr=n,vr}const cf={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"}},hf="dateFormat",lf="timezone",vf=e=>e.charAt(0).toUpperCase()+e.slice(1),Zs=(e,a)=>{const u=_i.getCurrentInstance()?.appContext.config.globalProperties.$moment().locale(),n=_i.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(hf)??"llll",n.tz(localStorage.getItem(lf)??Po.tz.guess()).format(r)};function pf(e,a){return e.split(a).slice(1).join(a)}function Qs(e){return bi.duration(e,bi.ISO_8601).asMilliseconds()/1e3}function Js(e,a){return a=a||{maxDecimalPoints:2},a.spacer="",a.language=localStorage.getItem("lang")||"en",a.languages=cf,a.largest=2,typeof e!="number"&&(e=Qs(e)),Lo(e*1e3,a).replace(/\.([0-9])s$/i,".$10s")}function eo(e){return e.split(".").pop()}function gf(e,a,u){return u.indexOf(e)===a}const de={capitalize:vf,dateFilter:Zs,splitFirst:pf,duration:Qs,humanDuration:Js,afterLastDot:eo,distinctFilter:gf};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 pr,sa;function _f(){if(sa)return pr;sa=1;var e=I.require_baseClone(),a=4;function u(n){return e(n,a)}return pr=u,pr}var gr,oa;function ti(){if(oa)return gr;oa=1;function e(a){return function(){return a}}return gr=e,gr}var _r,fa;function bf(){if(fa)return _r;fa=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 _r=a,_r}var br,da;function ge(){if(da)return br;da=1;var e=Qt(),a=bf(),u=a(e);return br=u,br}var yr,ca;function ro(){if(ca)return yr;ca=1;var e=Q();function a(u){return typeof u=="function"?u:e}return yr=a,yr}var mr,ha;function no(){if(ha)return mr;ha=1;var e=I.require_arrayEach(),a=ge(),u=ro(),n=I.requireIsArray();function r(t,s){var i=n(t)?e:a;return i(t,u(s))}return mr=r,mr}var qr,la;function to(){return la||(la=1,qr=no()),qr}var Er,va;function yf(){if(va)return Er;va=1;var e=ge();function a(u,n){var r=[];return e(u,function(t,s,i){n(t,s,i)&&r.push(t)}),r}return Er=a,Er}var wr,pa;function io(){if(pa)return wr;pa=1;var e=I.require_arrayFilter(),a=yf(),u=X(),n=I.requireIsArray();function r(t,s){var i=n(t)?e:a;return i(t,u(s,3))}return wr=r,wr}var Rr,ga;function mf(){if(ga)return Rr;ga=1;var e=Object.prototype,a=e.hasOwnProperty;function u(n,r){return n!=null&&a.call(n,r)}return Rr=u,Rr}var Ir,_a;function ao(){if(_a)return Ir;_a=1;var e=mf(),a=zs();function u(n,r){return n!=null&&a(n,r,e)}return Ir=u,Ir}var Tr,ba;function qf(){if(ba)return Tr;ba=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 Tr=h,Tr}var Sr,ya;function uo(){if(ya)return Sr;ya=1;function e(a){return a===void 0}return Sr=e,Sr}var Cr,ma;function so(){if(ma)return Cr;ma=1;var e=ge(),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 Cr=u,Cr}var Ar,qa;function oo(){if(qa)return Ar;qa=1;var e=le(),a=X(),u=so(),n=I.requireIsArray();function r(t,s){var i=n(t)?e:u;return i(t,a(s,3))}return Ar=r,Ar}var Or,Ea;function Ef(){if(Ea)return Or;Ea=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 Or=e,Or}var Nr,wa;function wf(){if(wa)return Nr;wa=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 Nr=e,Nr}var kr,Ra;function fo(){if(Ra)return kr;Ra=1;var e=Ef(),a=ge(),u=X(),n=wf(),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 kr=t,kr}var xr,Ia;function Rf(){if(Ia)return xr;Ia=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 xr=r,xr}var Lr,Ta;function If(){if(Ta)return Lr;Ta=1;var e=$s(),a=e("length");return Lr=a,Lr}var Pr,Sa;function Tf(){if(Sa)return Pr;Sa=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 Pr=o,Pr}var Mr,Ca;function Sf(){if(Ca)return Mr;Ca=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 Mr=m,Mr}var Fr,Aa;function Cf(){if(Aa)return Fr;Aa=1;var e=If(),a=Tf(),u=Sf();function n(r){return a(r)?u(r):e(r)}return Fr=n,Fr}var Gr,Oa;function Af(){if(Oa)return Gr;Oa=1;var e=I.require_baseKeys(),a=I.require_getTag(),u=I.requireIsArrayLike(),n=Rf(),r=Cf(),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 Gr=i,Gr}var Dr,Na;function Of(){if(Na)return Dr;Na=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 Dr=f,Dr}var Ur,ka;function Nf(){if(ka)return Ur;ka=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 Ur=r,Ur}var Br,xa;function ii(){if(xa)return Br;xa=1;var e=I.require_arrayPush(),a=Nf();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 Br=u,Br}var Hr,La;function kf(){if(La)return Hr;La=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 Hr=e,Hr}var Wr,Pa;function co(){if(Pa)return Wr;Pa=1;var e=kf(),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 Wr=u,Wr}var Vr,Ma;function xf(){if(Ma)return Vr;Ma=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 Vr=n,Vr}var jr,Fa;function Lf(){if(Fa)return jr;Fa=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 jr=n,jr}var Kr,Ga;function ho(){if(Ga)return Kr;Ga=1;var e=xf(),a=Lf(),u=a(e);return Kr=u,Kr}var zr,Da;function _e(){if(Da)return zr;Da=1;var e=Q(),a=co(),u=ho();function n(r,t){return u(a(r,t,e),r+"")}return zr=n,zr}var Yr,Ua;function lo(){if(Ua)return Yr;Ua=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 Yr=e,Yr}var $r,Ba;function Pf(){if(Ba)return $r;Ba=1;function e(a){return a!==a}return $r=e,$r}var Xr,Ha;function Mf(){if(Ha)return Xr;Ha=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 Xr=e,Xr}var Zr,Wa;function Ff(){if(Wa)return Zr;Wa=1;var e=lo(),a=Pf(),u=Mf();function n(r,t,s){return t===t?u(r,t,s):e(r,a,s)}return Zr=n,Zr}var Qr,Va;function Gf(){if(Va)return Qr;Va=1;var e=Ff();function a(u,n){var r=u==null?0:u.length;return!!r&&e(u,n,0)>-1}return Qr=a,Qr}var Jr,ja;function Df(){if(ja)return Jr;ja=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 Jr=e,Jr}var en,Ka;function Uf(){if(Ka)return en;Ka=1;function e(){}return en=e,en}var rn,za;function Bf(){if(za)return rn;za=1;var e=I.require_Set(),a=Uf(),u=Jt(),n=1/0,r=e&&1/u(new e([,-0]))[1]==n?function(t){return new e(t)}:a;return rn=r,rn}var nn,Ya;function Hf(){if(Ya)return nn;Ya=1;var e=Bs(),a=Gf(),u=Df(),n=Hs(),r=Bf(),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 nn=i,nn}var tn,$a;function vo(){if($a)return tn;$a=1;var e=I.requireIsArrayLike(),a=I.requireIsObjectLike();function u(n){return a(n)&&e(n)}return tn=u,tn}var an,Xa;function Wf(){if(Xa)return an;Xa=1;var e=ii(),a=_e(),u=Hf(),n=vo(),r=a(function(t){return u(e(t,1,n,!0))});return an=r,an}var un,Za;function Vf(){if(Za)return un;Za=1;var e=le();function a(u,n){return e(n,function(r){return u[r]})}return un=a,un}var sn,Qa;function po(){if(Qa)return sn;Qa=1;var e=Vf(),a=I.requireKeys();function u(n){return n==null?[]:e(n,a(n))}return sn=u,sn}var on,Ja;function z(){if(Ja)return on;Ja=1;var e;if(typeof ni=="function")try{e={clone:_f(),constant:ti(),each:to(),filter:io(),has:ao(),isArray:I.requireIsArray(),isEmpty:qf(),isFunction:I.requireIsFunction(),isUndefined:uo(),keys:I.requireKeys(),map:oo(),reduce:fo(),size:Af(),transform:Of(),union:Wf(),values:po()}}catch{}return e||(e=window._),on=e,on}var fn,eu;function ai(){if(eu)return fn;eu=1;var e=z();fn=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 fn}var dn,ru;function jf(){return ru||(ru=1,dn="2.1.8"),dn}var cn,nu;function Kf(){return nu||(nu=1,cn={Graph:ai(),version:jf()}),cn}var hn,tu;function zf(){if(tu)return hn;tu=1;var e=z(),a=ai();hn={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 hn}var ln,iu;function Yf(){if(iu)return ln;iu=1;var e=z();ln=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 ln}var vn,au;function go(){if(au)return vn;au=1;var e=z();vn=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},vn}var pn,uu;function _o(){if(uu)return pn;uu=1;var e=z(),a=go();pn=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 pn}var gn,su;function $f(){if(su)return gn;su=1;var e=_o(),a=z();gn=u;function u(n,r,t){return a.transform(n.nodes(),function(s,i){s[i]=e(n,i,r,t)},{})}return gn}var _n,ou;function bo(){if(ou)return _n;ou=1;var e=z();_n=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 _n}var bn,fu;function Xf(){if(fu)return bn;fu=1;var e=z(),a=bo();bn=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 bn}var yn,du;function Zf(){if(du)return yn;du=1;var e=z();yn=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 yn}var mn,cu;function yo(){if(cu)return mn;cu=1;var e=z();mn=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,mn}var qn,hu;function Qf(){if(hu)return qn;hu=1;var e=yo();qn=a;function a(u){try{e(u)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return qn}var En,lu;function mo(){if(lu)return En;lu=1;var e=z();En=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 En}var wn,vu;function Jf(){if(vu)return wn;vu=1;var e=mo();wn=a;function a(u,n){return e(u,n,"post")}return wn}var Rn,pu;function ed(){if(pu)return Rn;pu=1;var e=mo();Rn=a;function a(u,n){return e(u,n,"pre")}return Rn}var In,gu;function rd(){if(gu)return In;gu=1;var e=z(),a=ai(),u=go();In=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 In}var Tn,_u;function nd(){return _u||(_u=1,Tn={components:Yf(),dijkstra:_o(),dijkstraAll:$f(),findCycles:Xf(),floydWarshall:Zf(),isAcyclic:Qf(),postorder:Jf(),preorder:ed(),prim:rd(),tarjan:bo(),topsort:yo()}),Tn}var Sn,bu;function td(){if(bu)return Sn;bu=1;var e=Kf();return Sn={Graph:e.Graph,json:zf(),alg:nd(),version:e.version},Sn}var Cn,yu;function Y(){if(yu)return Cn;yu=1;var e;if(typeof ni=="function")try{e=td()}catch{}return e||(e=window.graphlib),Cn=e,Cn}var An,mu;function be(){if(mu)return An;mu=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 An=r,An}var On,qu;function id(){if(qu)return On;qu=1;var e=_e(),a=I.requireEq(),u=be(),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 On=s,On}var Nn,Eu;function ad(){if(Eu)return Nn;Eu=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 Nn=n,Nn}var kn,wu;function ud(){if(wu)return kn;wu=1;var e=/\s/;function a(u){for(var n=u.length;n--&&e.test(u.charAt(n)););return n}return kn=a,kn}var xn,Ru;function sd(){if(Ru)return xn;Ru=1;var e=ud(),a=/^\s+/;function u(n){return n&&n.slice(0,e(n)+1).replace(a,"")}return xn=u,xn}var Ln,Iu;function od(){if(Iu)return Ln;Iu=1;var e=sd(),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 Ln=o,Ln}var Pn,Tu;function qo(){if(Tu)return Pn;Tu=1;var e=od(),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 Pn=n,Pn}var Mn,Su;function fd(){if(Su)return Mn;Su=1;var e=qo();function a(u){var n=e(u),r=n%1;return n===n?r?n-r:n:0}return Mn=a,Mn}var Fn,Cu;function dd(){if(Cu)return Fn;Cu=1;var e=lo(),a=X(),u=fd(),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 Fn=r,Fn}var Gn,Au;function cd(){if(Au)return Gn;Au=1;var e=ad(),a=dd(),u=e(a);return Gn=u,Gn}var Dn,Ou;function Eo(){if(Ou)return Dn;Ou=1;var e=ii();function a(u){var n=u==null?0:u.length;return n?e(u,1):[]}return Dn=a,Dn}var Un,Nu;function hd(){if(Nu)return Un;Nu=1;var e=Zt(),a=ro(),u=I.requireKeysIn();function n(r,t){return r==null?r:e(r,a(t),u)}return Un=n,Un}var Bn,ku;function ld(){if(ku)return Bn;ku=1;function e(a){var u=a==null?0:a.length;return u?a[u-1]:void 0}return Bn=e,Bn}var Hn,xu;function ui(){if(xu)return Hn;xu=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 Hn=a,Hn}var Wn,Lu;function vd(){if(Lu)return Wn;Lu=1;function e(a,u){return a>u}return Wn=e,Wn}var Vn,Pu;function pd(){if(Pu)return Vn;Pu=1;var e=ui(),a=vd(),u=Q();function n(r){return r&&r.length?e(r,u,a):void 0}return Vn=n,Vn}var jn,Mu;function wo(){if(Mu)return jn;Mu=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 jn=u,jn}var Kn,Fu;function gd(){if(Fu)return Kn;Fu=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 Kn=d,Kn}var zn,Gu;function Ro(){if(Gu)return zn;Gu=1;function e(a,u){if(!(u==="constructor"&&typeof a[u]=="function")&&u!="__proto__")return a[u]}return zn=e,zn}var Yn,Du;function _d(){if(Du)return Yn;Du=1;var e=I.require_copyObject(),a=I.requireKeysIn();function u(n){return e(n,a(n))}return Yn=u,Yn}var $n,Uu;function bd(){if(Uu)return $n;Uu=1;var e=wo(),a=I.require_cloneBuffer(),u=I.require_cloneTypedArray(),n=I.require_copyArray(),r=I.require_initCloneObject(),t=I.requireIsArguments(),s=I.requireIsArray(),i=vo(),o=I.requireIsBuffer(),d=I.requireIsFunction(),f=I.requireIsObject(),c=gd(),h=I.requireIsTypedArray(),l=Ro(),q=_d();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 A=E?E(p,T,y+"",v,_,w):void 0,k=A===void 0;if(k){var x=s(T),L=!x&&o(T),M=!x&&!L&&h(T);A=T,x||L||M?s(p)?A=p:i(p)?A=n(p):L?(k=!1,A=a(T,!0)):M?(k=!1,A=u(T,!0)):A=[]:c(T)||t(T)?(A=p,t(p)?A=q(p):(!f(p)||d(p))&&(A=r(T))):k=!1}k&&(w.set(T,A),m(A,T,b,E,w),w.delete(T)),e(v,y,A)}return $n=g,$n}var Xn,Bu;function yd(){if(Bu)return Xn;Bu=1;var e=I.require_Stack(),a=wo(),u=Zt(),n=bd(),r=I.requireIsObject(),t=I.requireKeysIn(),s=Ro();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 Xn=i,Xn}var Zn,Hu;function md(){if(Hu)return Zn;Hu=1;var e=_e(),a=be();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 Zn=u,Zn}var Qn,Wu;function qd(){if(Wu)return Qn;Wu=1;var e=yd(),a=md(),u=a(function(n,r,t){e(n,r,t)});return Qn=u,Qn}var Jn,Vu;function Io(){if(Vu)return Jn;Vu=1;function e(a,u){return a<u}return Jn=e,Jn}var et,ju;function Ed(){if(ju)return et;ju=1;var e=ui(),a=Io(),u=Q();function n(r){return r&&r.length?e(r,u,a):void 0}return et=n,et}var rt,Ku;function wd(){if(Ku)return rt;Ku=1;var e=ui(),a=X(),u=Io();function n(r,t){return r&&r.length?e(r,a(t,2),u):void 0}return rt=n,rt}var nt,zu;function Rd(){if(zu)return nt;zu=1;var e=I.require_root(),a=function(){return e.Date.now()};return nt=a,nt}var tt,Yu;function Id(){if(Yu)return tt;Yu=1;var e=I.require_assignValue(),a=ve(),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 tt=t,tt}var it,$u;function Td(){if($u)return it;$u=1;var e=pe(),a=Id(),u=ve();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 it=n,it}var at,Xu;function Sd(){if(Xu)return at;Xu=1;var e=Td(),a=Ys();function u(n,r){return e(n,r,function(t,s){return a(n,s)})}return at=u,at}var ut,Zu;function Cd(){if(Zu)return ut;Zu=1;var e=Eo(),a=co(),u=ho();function n(r){return u(a(r,void 0,e),r+"")}return ut=n,ut}var st,Qu;function Ad(){if(Qu)return st;Qu=1;var e=Sd(),a=Cd(),u=a(function(n,r){return n==null?{}:e(n,r)});return st=u,st}var ot,Ju;function Od(){if(Ju)return ot;Ju=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 ot=u,ot}var ft,es;function Nd(){if(es)return ft;es=1;var e=Od(),a=be(),u=qo();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 ft=n,ft}var dt,rs;function kd(){if(rs)return dt;rs=1;var e=Nd(),a=e();return dt=a,dt}var ct,ns;function xd(){if(ns)return ct;ns=1;function e(a,u){var n=a.length;for(a.sort(u);n--;)a[n]=a[n].value;return a}return ct=e,ct}var ht,ts;function Ld(){if(ts)return ht;ts=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 ht=a,ht}var lt,is;function Pd(){if(is)return lt;is=1;var e=Ld();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 lt=a,lt}var vt,as;function Md(){if(as)return vt;as=1;var e=le(),a=pe(),u=X(),n=so(),r=xd(),t=I.require_baseUnary(),s=Pd(),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 vt=d,vt}var pt,us;function Fd(){if(us)return pt;us=1;var e=ii(),a=Md(),u=_e(),n=be(),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 pt=r,pt}var gt,ss;function Gd(){if(ss)return gt;ss=1;var e=Ks(),a=0;function u(n){var r=++a;return e(n)+r}return gt=u,gt}var _t,os;function Dd(){if(os)return _t;os=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 _t=e,_t}var bt,fs;function Ud(){if(fs)return bt;fs=1;var e=I.require_assignValue(),a=Dd();function u(n,r){return a(n||[],r||[],e)}return bt=u,bt}var yt,ds;function G(){if(ds)return yt;ds=1;var e;if(typeof ni=="function")try{e={cloneDeep:I.requireCloneDeep(),constant:ti(),defaults:id(),each:to(),filter:io(),find:cd(),flatten:Eo(),forEach:no(),forIn:hd(),has:ao(),isUndefined:uo(),last:ld(),map:oo(),mapValues:Xs(),max:pd(),merge:qd(),min:Ed(),minBy:wd(),now:Rd(),pick:Ad(),range:kd(),reduce:fo(),sortBy:Fd(),uniqueId:Gd(),values:po(),zipObject:Ud()}}catch{}return e||(e=window._),yt=e,yt}var mt,cs;function Bd(){if(cs)return mt;cs=1,mt=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 mt}var qt,hs;function Hd(){if(hs)return qt;hs=1;var e=G(),a=Y().Graph,u=Bd();qt=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 qt}var Et,ls;function Wd(){if(ls)return Et;ls=1;var e=G(),a=Hd();Et={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 Et}var wt,vs;function V(){if(vs)return wt;vs=1;var e=G(),a=Y().Graph;wt={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 wt}var Rt,ps;function Vd(){if(ps)return Rt;ps=1;var e=G(),a=V();Rt={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 Rt}var It,gs;function ce(){if(gs)return It;gs=1;var e=G();It={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 It}var Tt,_s;function To(){if(_s)return Tt;_s=1;var e=G(),a=Y().Graph,u=ce().slack;Tt=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 Tt}var St,bs;function jd(){if(bs)return St;bs=1;var e=G(),a=To(),u=ce().slack,n=ce().longestPath,r=Y().alg.preorder,t=Y().alg.postorder,s=V().simplify;St=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),A=0;return C||(T=!1,C=m.edge(p,E)),A=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(A+=M?F:-F,_(b,E,L)){var H=b.edge(E,L).cutvalue;A+=M?-H:H}}}),A}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(A){e.has(m,A)||(E=h(b,m,E,A,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),A=T,k=!1;T.lim>C.lim&&(A=C,k=!0);var x=e.filter(m.edges(),function(L){return k===y(b,b.node(L.v),A)&&k!==y(b,b.node(L.w),A)});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),A=!1;C||(C=m.edge(T,p),A=!0),m.node(p).rank=m.node(T).rank+(A?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 St}var Ct,ys;function Kd(){if(ys)return Ct;ys=1;var e=ce(),a=e.longestPath,u=To(),n=jd();Ct=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 Ct}var At,ms;function zd(){if(ms)return At;ms=1;var e=G();At=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 At}var Ot,qs;function Yd(){if(qs)return Ot;qs=1;var e=G(),a=V();Ot={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 Ot}var Nt,Es;function $d(){if(Es)return Nt;Es=1;var e=G(),a=V();Nt=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 Nt}var kt,ws;function Xd(){if(ws)return kt;ws=1;var e=G();kt={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 kt}var xt,Rs;function Zd(){if(Rs)return xt;Rs=1;var e=G();xt=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 xt}var Lt,Is;function Qd(){if(Is)return Lt;Is=1;var e=G();Lt=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 Lt}var Pt,Ts;function Jd(){if(Ts)return Pt;Ts=1;var e=G();Pt=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 Pt}var Mt,Ss;function ec(){if(Ss)return Mt;Ss=1;var e=G();Mt=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 Mt}var Ft,Cs;function rc(){if(Cs)return Ft;Cs=1;var e=G(),a=V();Ft=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 Ft}var Gt,As;function nc(){if(As)return Gt;As=1;var e=G(),a=Jd(),u=ec(),n=rc();Gt=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 Gt}var Dt,Os;function tc(){if(Os)return Dt;Os=1;var e=G(),a=Y().Graph;Dt=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 Dt}var Ut,Ns;function ic(){if(Ns)return Ut;Ns=1;var e=G();Ut=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 Ut}var Bt,ks;function ac(){if(ks)return Bt;ks=1;var e=G(),a=Zd(),u=Qd(),n=nc(),r=tc(),t=ic(),s=Y().Graph,i=V();Bt=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 Bt}var Ht,xs;function uc(){if(xs)return Ht;xs=1;var e=G(),a=Y().Graph,u=V();Ht={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,A=e.last(w);return e.forEach(w,function(k,x){var L=t(_,k),M=L?_.node(L).order:C;(L||k===A)&&(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,A){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>A)&&s(b,L,k)})})}function E(w,p){var T=-1,C,A=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,A,x,T,C),A=x,T=C)}m(p,A,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,A){E[C]=C,w[C]=C,p[C]=A})}),e.forEach(y,function(T){var C=-1;e.forEach(T,function(A){var k=m(A);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[A]===A&&C<p[F]&&!i(b,A,F)&&(w[F]=A,w[A]=E[A]=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 A(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(A,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(A){var k=b[A];if(E.setNode(k),C){var x=b[C],L=E.edge(x,k);E.setEdge(x,k,Math.max(p(_,A,C),L||0))}C=A})}),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],A;if(C!==y){var k=e.values(C);A=p==="l"?m-e.min(k):E-e.max(k),A&&(_[T]=e.mapValues(C,function(x){return x+A}))}})})}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(_),A=o(_,E,b,C),k=d(_,E,A.root,A.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,A;if(C+=p.width/2,e.has(p,"labelpos"))switch(p.labelpos.toLowerCase()){case"l":A=-p.width/2;break;case"r":A=p.width/2;break}if(A&&(C+=b?A:-A),A=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":A=T.width/2;break;case"r":A=-T.width/2;break}return A&&(C+=b?A:-A),A=0,C}}function v(_,y){return _.node(y).width}return Ht}var Wt,Ls;function sc(){if(Ls)return Wt;Ls=1;var e=G(),a=V(),u=uc().positionX;Wt=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 Wt}var Vt,Ps;function oc(){if(Ps)return Vt;Ps=1;var e=G(),a=Wd(),u=Vd(),n=Kd(),r=V().normalizeRanks,t=zd(),s=V().removeEmptyRanks,i=Yd(),o=$d(),d=Xd(),f=ac(),c=sc(),h=V(),l=Y().Graph;Vt=q;function q(R,S){var O=S&&S.debugTiming?h.time:h.notime;O("layout",function(){var N=O(" buildLayoutGraph",function(){return C(R)});O(" runLayout",function(){g(N,O)}),O(" updateInputGraph",function(){v(R,N)})})}function g(R,S){S(" makeSpaceForEdgeLabels",function(){A(R)}),S(" removeSelfEdges",function(){No(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(){ko(R)}),S(" adjustCoordinateSystem",function(){d.adjust(R)}),S(" position",function(){c(R)}),S(" positionSelfEdges",function(){xo(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(O){var N=R.node(O),P=S.node(O);N&&(N.x=P.x,N.y=P.y,S.children(O).length&&(N.width=P.width,N.height=P.height))}),e.forEach(R.edges(),function(O){var N=R.edge(O),P=S.edge(O);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}),O=Te(R.graph());return S.setGraph(e.merge({},y,Ie(O,_),e.pick(O,b))),e.forEach(R.nodes(),function(N){var P=Te(R.node(N));S.setNode(N,e.defaults(Ie(P,m),E)),S.setParent(N,R.parent(N))}),e.forEach(R.edges(),function(N){var P=Te(R.edge(N));S.setEdge(N,e.merge({},p,Ie(P,w),e.pick(P,T)))}),S}function A(R){var S=R.graph();S.ranksep/=2,e.forEach(R.edges(),function(O){var N=R.edge(O);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 O=R.edge(S);if(O.width&&O.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(O){var N=R.node(O);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 O=R.node(S);O.dummy==="edge-proxy"&&(R.edge(O.e).labelRank=O.rank,R.removeNode(S))})}function M(R){var S=Number.POSITIVE_INFINITY,O=0,N=Number.POSITIVE_INFINITY,P=0,D=R.graph(),U=D.marginx||0,j=D.marginy||0;function vi(K){var W=K.x,ne=K.y,pi=K.width,gi=K.height;S=Math.min(S,W-pi/2),O=Math.max(O,W+pi/2),N=Math.min(N,ne-gi/2),P=Math.max(P,ne+gi/2)}e.forEach(R.nodes(),function(K){vi(R.node(K))}),e.forEach(R.edges(),function(K){var W=R.edge(K);e.has(W,"x")&&vi(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=O-S+U,D.height=P-N+j}function F(R){e.forEach(R.edges(),function(S){var O=R.edge(S),N=R.node(S.v),P=R.node(S.w),D,U;O.points?(D=O.points[0],U=O.points[O.points.length-1]):(O.points=[],D=P,U=N),O.points.unshift(h.intersectRect(N,D)),O.points.push(h.intersectRect(P,U))})}function H(R){e.forEach(R.edges(),function(S){var O=R.edge(S);if(e.has(O,"x"))switch((O.labelpos==="l"||O.labelpos==="r")&&(O.width-=O.labeloffset),O.labelpos){case"l":O.x-=O.width/2+O.labeloffset;break;case"r":O.x+=O.width/2+O.labeloffset;break}})}function oe(R){e.forEach(R.edges(),function(S){var O=R.edge(S);O.reversed&&O.points.reverse()})}function fe(R){e.forEach(R.nodes(),function(S){if(R.children(S).length){var O=R.node(S),N=R.node(O.borderTop),P=R.node(O.borderBottom),D=R.node(e.last(O.borderLeft)),U=R.node(e.last(O.borderRight));O.width=Math.abs(U.x-D.x),O.height=Math.abs(P.y-N.y),O.x=D.x+O.width/2,O.y=N.y+O.height/2}}),e.forEach(R.nodes(),function(S){R.node(S).dummy==="border"&&R.removeNode(S)})}function No(R){e.forEach(R.edges(),function(S){if(S.v===S.w){var O=R.node(S.v);O.selfEdges||(O.selfEdges=[]),O.selfEdges.push({e:S,label:R.edge(S)}),R.removeEdge(S)}})}function ko(R){var S=h.buildLayerMatrix(R);e.forEach(S,function(O){var N=0;e.forEach(O,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 xo(R){e.forEach(R.nodes(),function(S){var O=R.node(S);if(O.dummy==="selfedge"){var N=R.node(O.e.v),P=N.x+N.width/2,D=N.y,U=O.x-P,j=N.height/2;R.setEdge(O.e,O.label),R.removeNode(S),O.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}],O.label.x=O.x,O.label.y=O.y}})}function Ie(R,S){return e.mapValues(e.pick(R,S),Number)}function Te(R){var S={};return e.forEach(R,function(O,N){S[N.toLowerCase()]=O}),S}return Vt}var jt,Ms;function fc(){if(Ms)return jt;Ms=1;var e=G(),a=V(),u=Y().Graph;jt={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 jt}var Kt,Fs;function dc(){return Fs||(Fs=1,Kt="0.8.5"),Kt}var zt,Gs;function cc(){return Gs||(Gs=1,zt={graphlib:Y(),layout:oc(),debug:fc(),util:{time:V().time,notime:V().notime},version:dc()}),zt}var hc=cc();const Ds=I.getDefaultExportFromCjs(hc);var Yt,Us;function lc(){if(Us)return Yt;Us=1;var e=ei();function a(u,n){return e(u,n)}return Yt=a,Yt}var vc=lc();const pc=I.getDefaultExportFromCjs(vc),Z="root.Triggers";function ye(e,a){const{getEdges:u}=B.useVueFlow(e),n=[];for(const r of u.value)if(r.target===a){n.push(r);const t=ye(e,r.source);t.length>0&&n.push(...t)}return n}function me(e,a){const{getEdges:u}=B.useVueFlow(e),n=[];for(const r of u.value)if(r.source===a){n.push(r);const t=me(e,r.target);t.length>0&&n.push(...t)}return n}function qe(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=qe(e,s.source);i.length>0&&t.push(...i)}return t}function Ee(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=Ee(e,t.target);s.length>0&&r.push(...s)}return r}function So(e,a){return[...ye(e,a),...qe(e,a),...me(e,a),...Ee(e,a)]}function si(e,a,u,n,r,t,s){const i=new Ds.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=Re(o.source,o.target,r,a);d&&i.setEdge(d.source,d.target)}return Ds.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 we(e)||se(e)?$.TASK_WIDTH:J(e)?$.COLLAPSED_CLUSTER_WIDTH:$.DOT_WIDTH}function ae(e){return we(e)||se(e)?$.TASK_HEIGHT:J(e)?$.COLLAPSED_CLUSTER_HEIGHT:$.DOT_HEIGHT}function we(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 Re(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 Co(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),A=p.parents?p.parents[p.parents.length-1]:void 0,k=hi(p.cluster);l.push({id:T,type:"cluster",parentNode:A,position:te(C,A?g.node(A):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 A=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:A,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-${A}-border rounded`:""})}const E=y.filter(p=>p.taskNode).map(p=>p.taskNode.uid),w=n.edges??[];for(const p of w){const T=Re(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 $t(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 Oo(e,a){if(a)return e.edges.filter(u=>u.source===a&&u.target)}function Xt(e,a){let u,n,r=[a.uid];do{if(u=r.flatMap(t=>Oo(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 gc(e,a,u){if(!u)return!1;let n=$t(e),r=$t(a);if(n.length!==r.length)return!1;let t=120;do{if(r=r.flatMap(s=>Xt(a,s)),r.some(s=>s.task.id===u))return!0;if(n=n.flatMap(s=>Xt(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||!pc(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={isClusterRootOrEnd:he,computeClusterColor:hi,isExpandableTask:li,generateGraph:Ao,generateDagreGraph:si,getNodePosition:te,getNodeWidth:ie,getNodeHeight:ae,isTaskNode:we,isTriggerNode:se,isCollapsedCluster:J,replaceIfCollapsed:Re,cleanGraph:Co,flowHaveTasks:oi,nodeColor:fi,haveAdd:di,getEdgeColor:ci,predecessorsEdge:ye,successorsEdge:me,predecessorsNode:qe,successorsNode:Ee,linkedElements:So};exports.CLUSTER_PREFIX=ee;exports.EVENTS=Fo;exports.NODE_SIZES=$;exports.SECTIONS=Mo;exports.Utils=de;exports.VueFlowUtils=_c;exports.afterLastDot=eo;exports.areTasksIdenticalInGraphUntilTask=gc;exports.cleanGraph=Co;exports.computeClusterColor=hi;exports.dateFilter=Zs;exports.editorViewTypes=Uo;exports.executeFlowBehaviours=Ho;exports.flowHaveTasks=oi;exports.generateDagreGraph=si;exports.generateGraph=Ao;exports.getEdgeColor=ci;exports.getNextTaskNodes=Xt;exports.getNodeHeight=ae;exports.getNodePosition=te;exports.getNodeWidth=ie;exports.getRootNodes=$t;exports.getTargetNodesEdges=Oo;exports.haveAdd=di;exports.humanDuration=Js;exports.isClusterRootOrEnd=he;exports.isCollapsedCluster=J;exports.isExpandableTask=li;exports.isTaskNode=we;exports.isTriggerNode=se;exports.linkedElements=So;exports.logDisplayTypes=Do;exports.nodeColor=fi;exports.predecessorsEdge=ye;exports.predecessorsNode=qe;exports.replaceIfCollapsed=Re;exports.requireMapValues=Xs;exports.stateDisplayValues=Wo;exports.stateGlobalChartTypes=Go;exports.storageKeys=Bo;exports.successorsEdge=me;exports.successorsNode=Ee;
|
|
2
|
-
//# sourceMappingURL=VueFlowUtils-
|
|
1
|
+
"use strict";const B=require("@vue-flow/core"),I=require("./FlowYamlUtils-CB_0RSKT.cjs"),_i=require("vue"),Lo=require("humanize-duration"),bi=require("moment"),Po=require("moment-timezone"),Mo={TASKS:"TASKS",TRIGGERS:"TRIGGERS",TASK_RUNNERS:"TASK_RUNNERS"},Fo={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_",Go={EXECUTIONS:"executions",TASKRUNS:"taskruns"},Do={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},Uo={STORAGE_KEY:"view-type",SOURCE:"source",SOURCE_TOPOLOGY:"source-topology",SOURCE_DOC:"source-doc",TOPOLOGY:"topology",SOURCE_BLUEPRINTS:"source-blueprints"},Bo={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"},Ho={SAME_TAB:"same tab",NEW_TAB:"new tab"},Wo={INPROGRESS:"IN-PROGRESS"};var Se,yi;function Vo(){if(yi)return Se;yi=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 Se=e,Se}var Ce,mi;function Zt(){if(mi)return Ce;mi=1;var e=Vo(),a=e();return Ce=a,Ce}var Ae,qi;function Qt(){if(qi)return Ae;qi=1;var e=Zt(),a=I.requireKeys();function u(n,r){return n&&e(n,r,a)}return Ae=u,Ae}var Oe,Ei;function jo(){if(Ei)return Oe;Ei=1;var e="__lodash_hash_undefined__";function a(u){return this.__data__.set(u,e),this}return Oe=a,Oe}var Ne,wi;function Ko(){if(wi)return Ne;wi=1;function e(a){return this.__data__.has(a)}return Ne=e,Ne}var ke,Ri;function Bs(){if(Ri)return ke;Ri=1;var e=I.require_MapCache(),a=jo(),u=Ko();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,ke=n,ke}var xe,Ii;function zo(){if(Ii)return xe;Ii=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 xe=e,xe}var Le,Ti;function Hs(){if(Ti)return Le;Ti=1;function e(a,u){return a.has(u)}return Le=e,Le}var Pe,Si;function Ws(){if(Si)return Pe;Si=1;var e=Bs(),a=zo(),u=Hs(),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 Pe=t,Pe}var Me,Ci;function Yo(){if(Ci)return Me;Ci=1;function e(a){var u=-1,n=Array(a.size);return a.forEach(function(r,t){n[++u]=[t,r]}),n}return Me=e,Me}var Fe,Ai;function Jt(){if(Ai)return Fe;Ai=1;function e(a){var u=-1,n=Array(a.size);return a.forEach(function(r){n[++u]=r}),n}return Fe=e,Fe}var Ge,Oi;function $o(){if(Oi)return Ge;Oi=1;var e=I.require_Symbol(),a=I.require_Uint8Array(),u=I.requireEq(),n=Ws(),r=Yo(),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,A,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,A,k,x);return x.delete(w),H;case v:if(m)return m.call(w)==m.call(p)}return!1}return Ge=E,Ge}var De,Ni;function Xo(){if(Ni)return De;Ni=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,A=s.constructor;C!=A&&"constructor"in t&&"constructor"in s&&!(typeof C=="function"&&C instanceof C&&typeof A=="function"&&A instanceof A)&&(m=!1)}return f.delete(t),f.delete(s),m}return De=r,De}var Ue,ki;function Zo(){if(ki)return Ue;ki=1;var e=I.require_Stack(),a=Ws(),u=$o(),n=Xo(),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,A=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=A&&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 Ue=q,Ue}var Be,xi;function ei(){if(xi)return Be;xi=1;var e=Zo(),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 Be=u,Be}var He,Li;function Qo(){if(Li)return He;Li=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 He=r,He}var We,Pi;function Vs(){if(Pi)return We;Pi=1;var e=I.requireIsObject();function a(u){return u===u&&!e(u)}return We=a,We}var Ve,Mi;function Jo(){if(Mi)return Ve;Mi=1;var e=Vs(),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 Ve=u,Ve}var je,Fi;function js(){if(Fi)return je;Fi=1;function e(a,u){return function(n){return n==null?!1:n[a]===u&&(u!==void 0||a in Object(n))}}return je=e,je}var Ke,Gi;function ef(){if(Gi)return Ke;Gi=1;var e=Qo(),a=Jo(),u=js();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 Ke=n,Ke}var ze,Di;function re(){if(Di)return ze;Di=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 ze=n,ze}var Ye,Ui;function ri(){if(Ui)return Ye;Ui=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 Ye=r,Ye}var $e,Bi;function rf(){if(Bi)return $e;Bi=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,$e=u,$e}var Xe,Hi;function nf(){if(Hi)return Xe;Hi=1;var e=rf(),a=500;function u(n){var r=e(n,function(s){return t.size===a&&t.clear(),s}),t=r.cache;return r}return Xe=u,Xe}var Ze,Wi;function tf(){if(Wi)return Ze;Wi=1;var e=nf(),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 Ze=n,Ze}var Qe,Vi;function le(){if(Vi)return Qe;Vi=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 Qe=e,Qe}var Je,ji;function af(){if(ji)return Je;ji=1;var e=I.require_Symbol(),a=le(),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 Je=s,Je}var er,Ki;function Ks(){if(Ki)return er;Ki=1;var e=af();function a(u){return u==null?"":e(u)}return er=a,er}var rr,zi;function ve(){if(zi)return rr;zi=1;var e=I.requireIsArray(),a=ri(),u=tf(),n=Ks();function r(t,s){return e(t)?t:a(t,s)?[t]:u(n(t))}return rr=r,rr}var nr,Yi;function ue(){if(Yi)return nr;Yi=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 nr=a,nr}var tr,$i;function pe(){if($i)return tr;$i=1;var e=ve(),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 tr=u,tr}var ir,Xi;function uf(){if(Xi)return ir;Xi=1;var e=pe();function a(u,n,r){var t=u==null?void 0:e(u,n);return t===void 0?r:t}return ir=a,ir}var ar,Zi;function sf(){if(Zi)return ar;Zi=1;function e(a,u){return a!=null&&u in Object(a)}return ar=e,ar}var ur,Qi;function zs(){if(Qi)return ur;Qi=1;var e=ve(),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 ur=s,ur}var sr,Ji;function Ys(){if(Ji)return sr;Ji=1;var e=sf(),a=zs();function u(n,r){return n!=null&&a(n,r,e)}return sr=u,sr}var or,ea;function of(){if(ea)return or;ea=1;var e=ei(),a=uf(),u=Ys(),n=ri(),r=Vs(),t=js(),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 or=d,or}var fr,ra;function Q(){if(ra)return fr;ra=1;function e(a){return a}return fr=e,fr}var dr,na;function $s(){if(na)return dr;na=1;function e(a){return function(u){return u?.[a]}}return dr=e,dr}var cr,ta;function ff(){if(ta)return cr;ta=1;var e=pe();function a(u){return function(n){return e(n,u)}}return cr=a,cr}var hr,ia;function df(){if(ia)return hr;ia=1;var e=$s(),a=ff(),u=ri(),n=ue();function r(t){return u(t)?e(n(t)):a(t)}return hr=r,hr}var lr,aa;function X(){if(aa)return lr;aa=1;var e=ef(),a=of(),u=Q(),n=I.requireIsArray(),r=df();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 lr=t,lr}var vr,ua;function Xs(){if(ua)return vr;ua=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 vr=n,vr}const cf={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"}},hf="dateFormat",lf="timezone",vf=e=>e.charAt(0).toUpperCase()+e.slice(1),Zs=(e,a)=>{const u=_i.getCurrentInstance()?.appContext.config.globalProperties.$moment().locale(),n=_i.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(hf)??"llll",n.tz(localStorage.getItem(lf)??Po.tz.guess()).format(r)};function pf(e,a){return e.split(a).slice(1).join(a)}function Qs(e){return bi.duration(e,bi.ISO_8601).asMilliseconds()/1e3}function Js(e,a){return a=a||{maxDecimalPoints:2},a.spacer="",a.language=localStorage.getItem("lang")||"en",a.languages=cf,a.largest=2,typeof e!="number"&&(e=Qs(e)),Lo(e*1e3,a).replace(/\.([0-9])s$/i,".$10s")}function eo(e){return e.split(".").pop()}function gf(e,a,u){return u.indexOf(e)===a}const de={capitalize:vf,dateFilter:Zs,splitFirst:pf,duration:Qs,humanDuration:Js,afterLastDot:eo,distinctFilter:gf};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 pr,sa;function _f(){if(sa)return pr;sa=1;var e=I.require_baseClone(),a=4;function u(n){return e(n,a)}return pr=u,pr}var gr,oa;function ti(){if(oa)return gr;oa=1;function e(a){return function(){return a}}return gr=e,gr}var _r,fa;function bf(){if(fa)return _r;fa=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 _r=a,_r}var br,da;function ge(){if(da)return br;da=1;var e=Qt(),a=bf(),u=a(e);return br=u,br}var yr,ca;function ro(){if(ca)return yr;ca=1;var e=Q();function a(u){return typeof u=="function"?u:e}return yr=a,yr}var mr,ha;function no(){if(ha)return mr;ha=1;var e=I.require_arrayEach(),a=ge(),u=ro(),n=I.requireIsArray();function r(t,s){var i=n(t)?e:a;return i(t,u(s))}return mr=r,mr}var qr,la;function to(){return la||(la=1,qr=no()),qr}var Er,va;function yf(){if(va)return Er;va=1;var e=ge();function a(u,n){var r=[];return e(u,function(t,s,i){n(t,s,i)&&r.push(t)}),r}return Er=a,Er}var wr,pa;function io(){if(pa)return wr;pa=1;var e=I.require_arrayFilter(),a=yf(),u=X(),n=I.requireIsArray();function r(t,s){var i=n(t)?e:a;return i(t,u(s,3))}return wr=r,wr}var Rr,ga;function mf(){if(ga)return Rr;ga=1;var e=Object.prototype,a=e.hasOwnProperty;function u(n,r){return n!=null&&a.call(n,r)}return Rr=u,Rr}var Ir,_a;function ao(){if(_a)return Ir;_a=1;var e=mf(),a=zs();function u(n,r){return n!=null&&a(n,r,e)}return Ir=u,Ir}var Tr,ba;function qf(){if(ba)return Tr;ba=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 Tr=h,Tr}var Sr,ya;function uo(){if(ya)return Sr;ya=1;function e(a){return a===void 0}return Sr=e,Sr}var Cr,ma;function so(){if(ma)return Cr;ma=1;var e=ge(),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 Cr=u,Cr}var Ar,qa;function oo(){if(qa)return Ar;qa=1;var e=le(),a=X(),u=so(),n=I.requireIsArray();function r(t,s){var i=n(t)?e:u;return i(t,a(s,3))}return Ar=r,Ar}var Or,Ea;function Ef(){if(Ea)return Or;Ea=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 Or=e,Or}var Nr,wa;function wf(){if(wa)return Nr;wa=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 Nr=e,Nr}var kr,Ra;function fo(){if(Ra)return kr;Ra=1;var e=Ef(),a=ge(),u=X(),n=wf(),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 kr=t,kr}var xr,Ia;function Rf(){if(Ia)return xr;Ia=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 xr=r,xr}var Lr,Ta;function If(){if(Ta)return Lr;Ta=1;var e=$s(),a=e("length");return Lr=a,Lr}var Pr,Sa;function Tf(){if(Sa)return Pr;Sa=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 Pr=o,Pr}var Mr,Ca;function Sf(){if(Ca)return Mr;Ca=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 Mr=m,Mr}var Fr,Aa;function Cf(){if(Aa)return Fr;Aa=1;var e=If(),a=Tf(),u=Sf();function n(r){return a(r)?u(r):e(r)}return Fr=n,Fr}var Gr,Oa;function Af(){if(Oa)return Gr;Oa=1;var e=I.require_baseKeys(),a=I.require_getTag(),u=I.requireIsArrayLike(),n=Rf(),r=Cf(),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 Gr=i,Gr}var Dr,Na;function Of(){if(Na)return Dr;Na=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 Dr=f,Dr}var Ur,ka;function Nf(){if(ka)return Ur;ka=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 Ur=r,Ur}var Br,xa;function ii(){if(xa)return Br;xa=1;var e=I.require_arrayPush(),a=Nf();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 Br=u,Br}var Hr,La;function kf(){if(La)return Hr;La=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 Hr=e,Hr}var Wr,Pa;function co(){if(Pa)return Wr;Pa=1;var e=kf(),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 Wr=u,Wr}var Vr,Ma;function xf(){if(Ma)return Vr;Ma=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 Vr=n,Vr}var jr,Fa;function Lf(){if(Fa)return jr;Fa=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 jr=n,jr}var Kr,Ga;function ho(){if(Ga)return Kr;Ga=1;var e=xf(),a=Lf(),u=a(e);return Kr=u,Kr}var zr,Da;function _e(){if(Da)return zr;Da=1;var e=Q(),a=co(),u=ho();function n(r,t){return u(a(r,t,e),r+"")}return zr=n,zr}var Yr,Ua;function lo(){if(Ua)return Yr;Ua=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 Yr=e,Yr}var $r,Ba;function Pf(){if(Ba)return $r;Ba=1;function e(a){return a!==a}return $r=e,$r}var Xr,Ha;function Mf(){if(Ha)return Xr;Ha=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 Xr=e,Xr}var Zr,Wa;function Ff(){if(Wa)return Zr;Wa=1;var e=lo(),a=Pf(),u=Mf();function n(r,t,s){return t===t?u(r,t,s):e(r,a,s)}return Zr=n,Zr}var Qr,Va;function Gf(){if(Va)return Qr;Va=1;var e=Ff();function a(u,n){var r=u==null?0:u.length;return!!r&&e(u,n,0)>-1}return Qr=a,Qr}var Jr,ja;function Df(){if(ja)return Jr;ja=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 Jr=e,Jr}var en,Ka;function Uf(){if(Ka)return en;Ka=1;function e(){}return en=e,en}var rn,za;function Bf(){if(za)return rn;za=1;var e=I.require_Set(),a=Uf(),u=Jt(),n=1/0,r=e&&1/u(new e([,-0]))[1]==n?function(t){return new e(t)}:a;return rn=r,rn}var nn,Ya;function Hf(){if(Ya)return nn;Ya=1;var e=Bs(),a=Gf(),u=Df(),n=Hs(),r=Bf(),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 nn=i,nn}var tn,$a;function vo(){if($a)return tn;$a=1;var e=I.requireIsArrayLike(),a=I.requireIsObjectLike();function u(n){return a(n)&&e(n)}return tn=u,tn}var an,Xa;function Wf(){if(Xa)return an;Xa=1;var e=ii(),a=_e(),u=Hf(),n=vo(),r=a(function(t){return u(e(t,1,n,!0))});return an=r,an}var un,Za;function Vf(){if(Za)return un;Za=1;var e=le();function a(u,n){return e(n,function(r){return u[r]})}return un=a,un}var sn,Qa;function po(){if(Qa)return sn;Qa=1;var e=Vf(),a=I.requireKeys();function u(n){return n==null?[]:e(n,a(n))}return sn=u,sn}var on,Ja;function z(){if(Ja)return on;Ja=1;var e;if(typeof ni=="function")try{e={clone:_f(),constant:ti(),each:to(),filter:io(),has:ao(),isArray:I.requireIsArray(),isEmpty:qf(),isFunction:I.requireIsFunction(),isUndefined:uo(),keys:I.requireKeys(),map:oo(),reduce:fo(),size:Af(),transform:Of(),union:Wf(),values:po()}}catch{}return e||(e=window._),on=e,on}var fn,eu;function ai(){if(eu)return fn;eu=1;var e=z();fn=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 fn}var dn,ru;function jf(){return ru||(ru=1,dn="2.1.8"),dn}var cn,nu;function Kf(){return nu||(nu=1,cn={Graph:ai(),version:jf()}),cn}var hn,tu;function zf(){if(tu)return hn;tu=1;var e=z(),a=ai();hn={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 hn}var ln,iu;function Yf(){if(iu)return ln;iu=1;var e=z();ln=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 ln}var vn,au;function go(){if(au)return vn;au=1;var e=z();vn=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},vn}var pn,uu;function _o(){if(uu)return pn;uu=1;var e=z(),a=go();pn=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 pn}var gn,su;function $f(){if(su)return gn;su=1;var e=_o(),a=z();gn=u;function u(n,r,t){return a.transform(n.nodes(),function(s,i){s[i]=e(n,i,r,t)},{})}return gn}var _n,ou;function bo(){if(ou)return _n;ou=1;var e=z();_n=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 _n}var bn,fu;function Xf(){if(fu)return bn;fu=1;var e=z(),a=bo();bn=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 bn}var yn,du;function Zf(){if(du)return yn;du=1;var e=z();yn=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 yn}var mn,cu;function yo(){if(cu)return mn;cu=1;var e=z();mn=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,mn}var qn,hu;function Qf(){if(hu)return qn;hu=1;var e=yo();qn=a;function a(u){try{e(u)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return qn}var En,lu;function mo(){if(lu)return En;lu=1;var e=z();En=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 En}var wn,vu;function Jf(){if(vu)return wn;vu=1;var e=mo();wn=a;function a(u,n){return e(u,n,"post")}return wn}var Rn,pu;function ed(){if(pu)return Rn;pu=1;var e=mo();Rn=a;function a(u,n){return e(u,n,"pre")}return Rn}var In,gu;function rd(){if(gu)return In;gu=1;var e=z(),a=ai(),u=go();In=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 In}var Tn,_u;function nd(){return _u||(_u=1,Tn={components:Yf(),dijkstra:_o(),dijkstraAll:$f(),findCycles:Xf(),floydWarshall:Zf(),isAcyclic:Qf(),postorder:Jf(),preorder:ed(),prim:rd(),tarjan:bo(),topsort:yo()}),Tn}var Sn,bu;function td(){if(bu)return Sn;bu=1;var e=Kf();return Sn={Graph:e.Graph,json:zf(),alg:nd(),version:e.version},Sn}var Cn,yu;function Y(){if(yu)return Cn;yu=1;var e;if(typeof ni=="function")try{e=td()}catch{}return e||(e=window.graphlib),Cn=e,Cn}var An,mu;function be(){if(mu)return An;mu=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 An=r,An}var On,qu;function id(){if(qu)return On;qu=1;var e=_e(),a=I.requireEq(),u=be(),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 On=s,On}var Nn,Eu;function ad(){if(Eu)return Nn;Eu=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 Nn=n,Nn}var kn,wu;function ud(){if(wu)return kn;wu=1;var e=/\s/;function a(u){for(var n=u.length;n--&&e.test(u.charAt(n)););return n}return kn=a,kn}var xn,Ru;function sd(){if(Ru)return xn;Ru=1;var e=ud(),a=/^\s+/;function u(n){return n&&n.slice(0,e(n)+1).replace(a,"")}return xn=u,xn}var Ln,Iu;function od(){if(Iu)return Ln;Iu=1;var e=sd(),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 Ln=o,Ln}var Pn,Tu;function qo(){if(Tu)return Pn;Tu=1;var e=od(),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 Pn=n,Pn}var Mn,Su;function fd(){if(Su)return Mn;Su=1;var e=qo();function a(u){var n=e(u),r=n%1;return n===n?r?n-r:n:0}return Mn=a,Mn}var Fn,Cu;function dd(){if(Cu)return Fn;Cu=1;var e=lo(),a=X(),u=fd(),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 Fn=r,Fn}var Gn,Au;function cd(){if(Au)return Gn;Au=1;var e=ad(),a=dd(),u=e(a);return Gn=u,Gn}var Dn,Ou;function Eo(){if(Ou)return Dn;Ou=1;var e=ii();function a(u){var n=u==null?0:u.length;return n?e(u,1):[]}return Dn=a,Dn}var Un,Nu;function hd(){if(Nu)return Un;Nu=1;var e=Zt(),a=ro(),u=I.requireKeysIn();function n(r,t){return r==null?r:e(r,a(t),u)}return Un=n,Un}var Bn,ku;function ld(){if(ku)return Bn;ku=1;function e(a){var u=a==null?0:a.length;return u?a[u-1]:void 0}return Bn=e,Bn}var Hn,xu;function ui(){if(xu)return Hn;xu=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 Hn=a,Hn}var Wn,Lu;function vd(){if(Lu)return Wn;Lu=1;function e(a,u){return a>u}return Wn=e,Wn}var Vn,Pu;function pd(){if(Pu)return Vn;Pu=1;var e=ui(),a=vd(),u=Q();function n(r){return r&&r.length?e(r,u,a):void 0}return Vn=n,Vn}var jn,Mu;function wo(){if(Mu)return jn;Mu=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 jn=u,jn}var Kn,Fu;function gd(){if(Fu)return Kn;Fu=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 Kn=d,Kn}var zn,Gu;function Ro(){if(Gu)return zn;Gu=1;function e(a,u){if(!(u==="constructor"&&typeof a[u]=="function")&&u!="__proto__")return a[u]}return zn=e,zn}var Yn,Du;function _d(){if(Du)return Yn;Du=1;var e=I.require_copyObject(),a=I.requireKeysIn();function u(n){return e(n,a(n))}return Yn=u,Yn}var $n,Uu;function bd(){if(Uu)return $n;Uu=1;var e=wo(),a=I.require_cloneBuffer(),u=I.require_cloneTypedArray(),n=I.require_copyArray(),r=I.require_initCloneObject(),t=I.requireIsArguments(),s=I.requireIsArray(),i=vo(),o=I.requireIsBuffer(),d=I.requireIsFunction(),f=I.requireIsObject(),c=gd(),h=I.requireIsTypedArray(),l=Ro(),q=_d();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 A=E?E(p,T,y+"",v,_,w):void 0,k=A===void 0;if(k){var x=s(T),L=!x&&o(T),M=!x&&!L&&h(T);A=T,x||L||M?s(p)?A=p:i(p)?A=n(p):L?(k=!1,A=a(T,!0)):M?(k=!1,A=u(T,!0)):A=[]:c(T)||t(T)?(A=p,t(p)?A=q(p):(!f(p)||d(p))&&(A=r(T))):k=!1}k&&(w.set(T,A),m(A,T,b,E,w),w.delete(T)),e(v,y,A)}return $n=g,$n}var Xn,Bu;function yd(){if(Bu)return Xn;Bu=1;var e=I.require_Stack(),a=wo(),u=Zt(),n=bd(),r=I.requireIsObject(),t=I.requireKeysIn(),s=Ro();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 Xn=i,Xn}var Zn,Hu;function md(){if(Hu)return Zn;Hu=1;var e=_e(),a=be();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 Zn=u,Zn}var Qn,Wu;function qd(){if(Wu)return Qn;Wu=1;var e=yd(),a=md(),u=a(function(n,r,t){e(n,r,t)});return Qn=u,Qn}var Jn,Vu;function Io(){if(Vu)return Jn;Vu=1;function e(a,u){return a<u}return Jn=e,Jn}var et,ju;function Ed(){if(ju)return et;ju=1;var e=ui(),a=Io(),u=Q();function n(r){return r&&r.length?e(r,u,a):void 0}return et=n,et}var rt,Ku;function wd(){if(Ku)return rt;Ku=1;var e=ui(),a=X(),u=Io();function n(r,t){return r&&r.length?e(r,a(t,2),u):void 0}return rt=n,rt}var nt,zu;function Rd(){if(zu)return nt;zu=1;var e=I.require_root(),a=function(){return e.Date.now()};return nt=a,nt}var tt,Yu;function Id(){if(Yu)return tt;Yu=1;var e=I.require_assignValue(),a=ve(),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 tt=t,tt}var it,$u;function Td(){if($u)return it;$u=1;var e=pe(),a=Id(),u=ve();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 it=n,it}var at,Xu;function Sd(){if(Xu)return at;Xu=1;var e=Td(),a=Ys();function u(n,r){return e(n,r,function(t,s){return a(n,s)})}return at=u,at}var ut,Zu;function Cd(){if(Zu)return ut;Zu=1;var e=Eo(),a=co(),u=ho();function n(r){return u(a(r,void 0,e),r+"")}return ut=n,ut}var st,Qu;function Ad(){if(Qu)return st;Qu=1;var e=Sd(),a=Cd(),u=a(function(n,r){return n==null?{}:e(n,r)});return st=u,st}var ot,Ju;function Od(){if(Ju)return ot;Ju=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 ot=u,ot}var ft,es;function Nd(){if(es)return ft;es=1;var e=Od(),a=be(),u=qo();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 ft=n,ft}var dt,rs;function kd(){if(rs)return dt;rs=1;var e=Nd(),a=e();return dt=a,dt}var ct,ns;function xd(){if(ns)return ct;ns=1;function e(a,u){var n=a.length;for(a.sort(u);n--;)a[n]=a[n].value;return a}return ct=e,ct}var ht,ts;function Ld(){if(ts)return ht;ts=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 ht=a,ht}var lt,is;function Pd(){if(is)return lt;is=1;var e=Ld();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 lt=a,lt}var vt,as;function Md(){if(as)return vt;as=1;var e=le(),a=pe(),u=X(),n=so(),r=xd(),t=I.require_baseUnary(),s=Pd(),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 vt=d,vt}var pt,us;function Fd(){if(us)return pt;us=1;var e=ii(),a=Md(),u=_e(),n=be(),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 pt=r,pt}var gt,ss;function Gd(){if(ss)return gt;ss=1;var e=Ks(),a=0;function u(n){var r=++a;return e(n)+r}return gt=u,gt}var _t,os;function Dd(){if(os)return _t;os=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 _t=e,_t}var bt,fs;function Ud(){if(fs)return bt;fs=1;var e=I.require_assignValue(),a=Dd();function u(n,r){return a(n||[],r||[],e)}return bt=u,bt}var yt,ds;function G(){if(ds)return yt;ds=1;var e;if(typeof ni=="function")try{e={cloneDeep:I.requireCloneDeep(),constant:ti(),defaults:id(),each:to(),filter:io(),find:cd(),flatten:Eo(),forEach:no(),forIn:hd(),has:ao(),isUndefined:uo(),last:ld(),map:oo(),mapValues:Xs(),max:pd(),merge:qd(),min:Ed(),minBy:wd(),now:Rd(),pick:Ad(),range:kd(),reduce:fo(),sortBy:Fd(),uniqueId:Gd(),values:po(),zipObject:Ud()}}catch{}return e||(e=window._),yt=e,yt}var mt,cs;function Bd(){if(cs)return mt;cs=1,mt=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 mt}var qt,hs;function Hd(){if(hs)return qt;hs=1;var e=G(),a=Y().Graph,u=Bd();qt=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 qt}var Et,ls;function Wd(){if(ls)return Et;ls=1;var e=G(),a=Hd();Et={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 Et}var wt,vs;function V(){if(vs)return wt;vs=1;var e=G(),a=Y().Graph;wt={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 wt}var Rt,ps;function Vd(){if(ps)return Rt;ps=1;var e=G(),a=V();Rt={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 Rt}var It,gs;function ce(){if(gs)return It;gs=1;var e=G();It={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 It}var Tt,_s;function To(){if(_s)return Tt;_s=1;var e=G(),a=Y().Graph,u=ce().slack;Tt=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 Tt}var St,bs;function jd(){if(bs)return St;bs=1;var e=G(),a=To(),u=ce().slack,n=ce().longestPath,r=Y().alg.preorder,t=Y().alg.postorder,s=V().simplify;St=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),A=0;return C||(T=!1,C=m.edge(p,E)),A=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(A+=M?F:-F,_(b,E,L)){var H=b.edge(E,L).cutvalue;A+=M?-H:H}}}),A}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(A){e.has(m,A)||(E=h(b,m,E,A,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),A=T,k=!1;T.lim>C.lim&&(A=C,k=!0);var x=e.filter(m.edges(),function(L){return k===y(b,b.node(L.v),A)&&k!==y(b,b.node(L.w),A)});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),A=!1;C||(C=m.edge(T,p),A=!0),m.node(p).rank=m.node(T).rank+(A?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 St}var Ct,ys;function Kd(){if(ys)return Ct;ys=1;var e=ce(),a=e.longestPath,u=To(),n=jd();Ct=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 Ct}var At,ms;function zd(){if(ms)return At;ms=1;var e=G();At=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 At}var Ot,qs;function Yd(){if(qs)return Ot;qs=1;var e=G(),a=V();Ot={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 Ot}var Nt,Es;function $d(){if(Es)return Nt;Es=1;var e=G(),a=V();Nt=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 Nt}var kt,ws;function Xd(){if(ws)return kt;ws=1;var e=G();kt={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 kt}var xt,Rs;function Zd(){if(Rs)return xt;Rs=1;var e=G();xt=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 xt}var Lt,Is;function Qd(){if(Is)return Lt;Is=1;var e=G();Lt=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 Lt}var Pt,Ts;function Jd(){if(Ts)return Pt;Ts=1;var e=G();Pt=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 Pt}var Mt,Ss;function ec(){if(Ss)return Mt;Ss=1;var e=G();Mt=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 Mt}var Ft,Cs;function rc(){if(Cs)return Ft;Cs=1;var e=G(),a=V();Ft=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 Ft}var Gt,As;function nc(){if(As)return Gt;As=1;var e=G(),a=Jd(),u=ec(),n=rc();Gt=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 Gt}var Dt,Os;function tc(){if(Os)return Dt;Os=1;var e=G(),a=Y().Graph;Dt=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 Dt}var Ut,Ns;function ic(){if(Ns)return Ut;Ns=1;var e=G();Ut=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 Ut}var Bt,ks;function ac(){if(ks)return Bt;ks=1;var e=G(),a=Zd(),u=Qd(),n=nc(),r=tc(),t=ic(),s=Y().Graph,i=V();Bt=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 Bt}var Ht,xs;function uc(){if(xs)return Ht;xs=1;var e=G(),a=Y().Graph,u=V();Ht={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,A=e.last(w);return e.forEach(w,function(k,x){var L=t(_,k),M=L?_.node(L).order:C;(L||k===A)&&(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,A){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>A)&&s(b,L,k)})})}function E(w,p){var T=-1,C,A=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,A,x,T,C),A=x,T=C)}m(p,A,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,A){E[C]=C,w[C]=C,p[C]=A})}),e.forEach(y,function(T){var C=-1;e.forEach(T,function(A){var k=m(A);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[A]===A&&C<p[F]&&!i(b,A,F)&&(w[F]=A,w[A]=E[A]=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 A(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(A,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(A){var k=b[A];if(E.setNode(k),C){var x=b[C],L=E.edge(x,k);E.setEdge(x,k,Math.max(p(_,A,C),L||0))}C=A})}),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],A;if(C!==y){var k=e.values(C);A=p==="l"?m-e.min(k):E-e.max(k),A&&(_[T]=e.mapValues(C,function(x){return x+A}))}})})}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(_),A=o(_,E,b,C),k=d(_,E,A.root,A.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,A;if(C+=p.width/2,e.has(p,"labelpos"))switch(p.labelpos.toLowerCase()){case"l":A=-p.width/2;break;case"r":A=p.width/2;break}if(A&&(C+=b?A:-A),A=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":A=T.width/2;break;case"r":A=-T.width/2;break}return A&&(C+=b?A:-A),A=0,C}}function v(_,y){return _.node(y).width}return Ht}var Wt,Ls;function sc(){if(Ls)return Wt;Ls=1;var e=G(),a=V(),u=uc().positionX;Wt=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 Wt}var Vt,Ps;function oc(){if(Ps)return Vt;Ps=1;var e=G(),a=Wd(),u=Vd(),n=Kd(),r=V().normalizeRanks,t=zd(),s=V().removeEmptyRanks,i=Yd(),o=$d(),d=Xd(),f=ac(),c=sc(),h=V(),l=Y().Graph;Vt=q;function q(R,S){var O=S&&S.debugTiming?h.time:h.notime;O("layout",function(){var N=O(" buildLayoutGraph",function(){return C(R)});O(" runLayout",function(){g(N,O)}),O(" updateInputGraph",function(){v(R,N)})})}function g(R,S){S(" makeSpaceForEdgeLabels",function(){A(R)}),S(" removeSelfEdges",function(){No(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(){ko(R)}),S(" adjustCoordinateSystem",function(){d.adjust(R)}),S(" position",function(){c(R)}),S(" positionSelfEdges",function(){xo(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(O){var N=R.node(O),P=S.node(O);N&&(N.x=P.x,N.y=P.y,S.children(O).length&&(N.width=P.width,N.height=P.height))}),e.forEach(R.edges(),function(O){var N=R.edge(O),P=S.edge(O);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}),O=Te(R.graph());return S.setGraph(e.merge({},y,Ie(O,_),e.pick(O,b))),e.forEach(R.nodes(),function(N){var P=Te(R.node(N));S.setNode(N,e.defaults(Ie(P,m),E)),S.setParent(N,R.parent(N))}),e.forEach(R.edges(),function(N){var P=Te(R.edge(N));S.setEdge(N,e.merge({},p,Ie(P,w),e.pick(P,T)))}),S}function A(R){var S=R.graph();S.ranksep/=2,e.forEach(R.edges(),function(O){var N=R.edge(O);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 O=R.edge(S);if(O.width&&O.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(O){var N=R.node(O);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 O=R.node(S);O.dummy==="edge-proxy"&&(R.edge(O.e).labelRank=O.rank,R.removeNode(S))})}function M(R){var S=Number.POSITIVE_INFINITY,O=0,N=Number.POSITIVE_INFINITY,P=0,D=R.graph(),U=D.marginx||0,j=D.marginy||0;function vi(K){var W=K.x,ne=K.y,pi=K.width,gi=K.height;S=Math.min(S,W-pi/2),O=Math.max(O,W+pi/2),N=Math.min(N,ne-gi/2),P=Math.max(P,ne+gi/2)}e.forEach(R.nodes(),function(K){vi(R.node(K))}),e.forEach(R.edges(),function(K){var W=R.edge(K);e.has(W,"x")&&vi(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=O-S+U,D.height=P-N+j}function F(R){e.forEach(R.edges(),function(S){var O=R.edge(S),N=R.node(S.v),P=R.node(S.w),D,U;O.points?(D=O.points[0],U=O.points[O.points.length-1]):(O.points=[],D=P,U=N),O.points.unshift(h.intersectRect(N,D)),O.points.push(h.intersectRect(P,U))})}function H(R){e.forEach(R.edges(),function(S){var O=R.edge(S);if(e.has(O,"x"))switch((O.labelpos==="l"||O.labelpos==="r")&&(O.width-=O.labeloffset),O.labelpos){case"l":O.x-=O.width/2+O.labeloffset;break;case"r":O.x+=O.width/2+O.labeloffset;break}})}function oe(R){e.forEach(R.edges(),function(S){var O=R.edge(S);O.reversed&&O.points.reverse()})}function fe(R){e.forEach(R.nodes(),function(S){if(R.children(S).length){var O=R.node(S),N=R.node(O.borderTop),P=R.node(O.borderBottom),D=R.node(e.last(O.borderLeft)),U=R.node(e.last(O.borderRight));O.width=Math.abs(U.x-D.x),O.height=Math.abs(P.y-N.y),O.x=D.x+O.width/2,O.y=N.y+O.height/2}}),e.forEach(R.nodes(),function(S){R.node(S).dummy==="border"&&R.removeNode(S)})}function No(R){e.forEach(R.edges(),function(S){if(S.v===S.w){var O=R.node(S.v);O.selfEdges||(O.selfEdges=[]),O.selfEdges.push({e:S,label:R.edge(S)}),R.removeEdge(S)}})}function ko(R){var S=h.buildLayerMatrix(R);e.forEach(S,function(O){var N=0;e.forEach(O,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 xo(R){e.forEach(R.nodes(),function(S){var O=R.node(S);if(O.dummy==="selfedge"){var N=R.node(O.e.v),P=N.x+N.width/2,D=N.y,U=O.x-P,j=N.height/2;R.setEdge(O.e,O.label),R.removeNode(S),O.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}],O.label.x=O.x,O.label.y=O.y}})}function Ie(R,S){return e.mapValues(e.pick(R,S),Number)}function Te(R){var S={};return e.forEach(R,function(O,N){S[N.toLowerCase()]=O}),S}return Vt}var jt,Ms;function fc(){if(Ms)return jt;Ms=1;var e=G(),a=V(),u=Y().Graph;jt={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 jt}var Kt,Fs;function dc(){return Fs||(Fs=1,Kt="0.8.5"),Kt}var zt,Gs;function cc(){return Gs||(Gs=1,zt={graphlib:Y(),layout:oc(),debug:fc(),util:{time:V().time,notime:V().notime},version:dc()}),zt}var hc=cc();const Ds=I.getDefaultExportFromCjs(hc);var Yt,Us;function lc(){if(Us)return Yt;Us=1;var e=ei();function a(u,n){return e(u,n)}return Yt=a,Yt}var vc=lc();const pc=I.getDefaultExportFromCjs(vc),Z="root.Triggers";function ye(e,a){const{getEdges:u}=B.useVueFlow(e),n=[];for(const r of u.value)if(r.target===a){n.push(r);const t=ye(e,r.source);t.length>0&&n.push(...t)}return n}function me(e,a){const{getEdges:u}=B.useVueFlow(e),n=[];for(const r of u.value)if(r.source===a){n.push(r);const t=me(e,r.target);t.length>0&&n.push(...t)}return n}function qe(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=qe(e,s.source);i.length>0&&t.push(...i)}return t}function Ee(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=Ee(e,t.target);s.length>0&&r.push(...s)}return r}function So(e,a){return[...ye(e,a),...qe(e,a),...me(e,a),...Ee(e,a)]}function si(e,a,u,n,r,t,s){const i=new Ds.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=Re(o.source,o.target,r,a);d&&i.setEdge(d.source,d.target)}return Ds.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 we(e)||se(e)?$.TASK_WIDTH:J(e)?$.COLLAPSED_CLUSTER_WIDTH:$.DOT_WIDTH}function ae(e){return we(e)||se(e)?$.TASK_HEIGHT:J(e)?$.COLLAPSED_CLUSTER_HEIGHT:$.DOT_HEIGHT}function we(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 Re(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 Co(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),A=p.parents?p.parents[p.parents.length-1]:void 0,k=hi(p.cluster);l.push({id:T,type:"cluster",parentNode:A,position:te(C,A?g.node(A):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 A=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:A,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-${A}-border rounded`:""})}const E=y.filter(p=>p.taskNode).map(p=>p.taskNode.uid),w=n.edges??[];for(const p of w){const T=Re(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 $t(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 Oo(e,a){if(a)return e.edges.filter(u=>u.source===a&&u.target)}function Xt(e,a){let u,n,r=[a.uid];do{if(u=r.flatMap(t=>Oo(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 gc(e,a,u){if(!u)return!1;let n=$t(e),r=$t(a);if(n.length!==r.length)return!1;let t=120;do{if(r=r.flatMap(s=>Xt(a,s)),r.some(s=>s.task.id===u))return!0;if(n=n.flatMap(s=>Xt(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||!pc(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={isClusterRootOrEnd:he,computeClusterColor:hi,isExpandableTask:li,generateGraph:Ao,generateDagreGraph:si,getNodePosition:te,getNodeWidth:ie,getNodeHeight:ae,isTaskNode:we,isTriggerNode:se,isCollapsedCluster:J,replaceIfCollapsed:Re,cleanGraph:Co,flowHaveTasks:oi,nodeColor:fi,haveAdd:di,getEdgeColor:ci,predecessorsEdge:ye,successorsEdge:me,predecessorsNode:qe,successorsNode:Ee,linkedElements:So};exports.CLUSTER_PREFIX=ee;exports.EVENTS=Fo;exports.NODE_SIZES=$;exports.SECTIONS=Mo;exports.Utils=de;exports.VueFlowUtils=_c;exports.afterLastDot=eo;exports.areTasksIdenticalInGraphUntilTask=gc;exports.cleanGraph=Co;exports.computeClusterColor=hi;exports.dateFilter=Zs;exports.editorViewTypes=Uo;exports.executeFlowBehaviours=Ho;exports.flowHaveTasks=oi;exports.generateDagreGraph=si;exports.generateGraph=Ao;exports.getEdgeColor=ci;exports.getNextTaskNodes=Xt;exports.getNodeHeight=ae;exports.getNodePosition=te;exports.getNodeWidth=ie;exports.getRootNodes=$t;exports.getTargetNodesEdges=Oo;exports.haveAdd=di;exports.humanDuration=Js;exports.isClusterRootOrEnd=he;exports.isCollapsedCluster=J;exports.isExpandableTask=li;exports.isTaskNode=we;exports.isTriggerNode=se;exports.linkedElements=So;exports.logDisplayTypes=Do;exports.nodeColor=fi;exports.predecessorsEdge=ye;exports.predecessorsNode=qe;exports.replaceIfCollapsed=Re;exports.requireMapValues=Xs;exports.stateDisplayValues=Wo;exports.stateGlobalChartTypes=Go;exports.storageKeys=Bo;exports.successorsEdge=me;exports.successorsNode=Ee;
|
|
2
|
+
//# sourceMappingURL=VueFlowUtils-BhZNyVgG.cjs.map
|