@kestra-io/ui-libs 0.0.279 → 0.0.280

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