mermaid/dist/mermaidAPI.min.js

20 lines
456 KiB
JavaScript
Raw Normal View History

2015-10-30 11:34:24 +01:00
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.mermaidAPI=t()}}(function(){var define,module,exports;return function t(e,n,r){function i(a,o){if(!n[a]){if(!e[a]){var s="function"==typeof require&&require;if(!o&&s)return s(a,!0);if(u)return u(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){var n=e[a][1][t];return i(n?n:t)},l,l.exports,t,e,n,r)}return n[a].exports}for(var u="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(){},{}],2:[function(t,e,n){(function(t){function e(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,u=function(t){return i.exec(t).slice(1)};n.resolve=function(){for(var n="",i=!1,u=arguments.length-1;u>=-1&&!i;u--){var a=u>=0?arguments[u]:t.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(n=a+"/"+n,i="/"===a.charAt(0))}return n=e(r(n.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(t){var i=n.isAbsolute(t),u="/"===a(t,-1);return t=e(r(t.split("/"),function(t){return!!t}),!i).join("/"),t||i||(t="."),t&&u&&(t+="/"),(i?"/":"")+t},n.isAbsolute=function(t){return"/"===t.charAt(0)},n.join=function(){var t=Array.prototype.slice.call(arguments,0);return n.normalize(r(t,function(t){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},n.relative=function(t,e){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=n.resolve(t).substr(1),e=n.resolve(e).substr(1);for(var i=r(t.split("/")),u=r(e.split("/")),a=Math.min(i.length,u.length),o=a,s=0;a>s;s++)if(i[s]!==u[s]){o=s;break}for(var c=[],s=o;s<i.length;s++)c.push("..");return c=c.concat(u.slice(o)),c.join("/")},n.sep="/",n.delimiter=":",n.dirname=function(t){var e=u(t),n=e[0],r=e[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},n.basename=function(t,e){var n=u(t)[2];return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},n.extname=function(t){return u(t)[3]};var a="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return 0>e&&(e=t.length+e),t.substr(e,n)}}).call(this,t("_process"))},{_process:3}],3:[function(t,e){function n(){}var r=e.exports={};r.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.MutationObserver,n="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};var r=[];if(e){var i=document.createElement("div"),u=new MutationObserver(function(){var t=r.slice();r.length=0,t.forEach(function(t){t()})});return u.observe(i,{attributes:!0}),function(t){r.length||i.setAttribute("yes","no"),r.push(t)}}return n?(window.addEventListener("message",function(t){var e=t.source;if((e===window||null===e)&&"process-tick"===t.data&&(t.stopPropagation(),r.length>0)){var n=r.shift();n()}},!0),function(t){r.push(t),window.postMessage("process-tick","*")}):function(t){setTimeout(t,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=n,r.addListener=n,r.once=n,r.off=n,r.removeListener=n,r.removeAllListeners=n,r.emit=n,r.binding=function(){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(){throw new Error("process.chdir is not supported")}},{}],4:[function(t,e){!function(){function t(t){return t&&(t.ownerDocument||t.document||t).documentElement}function n(t){return t&&(t.ownerDocument&&t.o
2015-10-19 22:08:17 +02:00
2015-10-30 11:34:24 +01:00
}return function(o){function s(t){for(var e=0,n=y.length,r=t[1],i=0;n>i;++i)for(var u,a=1,o=y[i],s=o.length,c=o[0];s>a;++a)u=o[a],c[1]<=r?u[1]>r&&tt(c,u,t)>0&&++e:u[1]<=r&&tt(c,u,t)<0&&--e,c=u;return 0!==e}function c(u,o,s,c){var l=0,h=0;if(null==u||(l=i(u,s))!==(h=i(o,s))||a(u,o)<0^s>0){do c.point(0===l||3===l?t:n,l>1?r:e);while((l=(l+s+4)%4)!==h)}else c.point(o[0],o[1])}function l(i,u){return i>=t&&n>=i&&u>=e&&r>=u}function h(t,e){l(t,e)&&o.point(t,e)}function f(){S.point=p,y&&y.push(m=[]),k=!0,A=!1,x=w=0/0}function d(){g&&(p(v,_),b&&A&&M.rejoin(),g.push(M.buffer())),S.point=h,A&&o.lineEnd()}function p(t,e){t=Math.max(-Io,Math.min(Io,t)),e=Math.max(-Io,Math.min(Io,e));var n=l(t,e);if(y&&m.push([t,e]),k)v=t,_=e,b=n,k=!1,n&&(o.lineStart(),o.point(t,e));else if(n&&A)o.point(t,e);else{var r={a:{x:x,y:w},b:{x:t,y:e}};C(r)?(A||(o.lineStart(),o.point(r.a.x,r.a.y)),o.point(r.b.x,r.b.y),n||o.lineEnd(),E=!1):n&&(o.lineStart(),o.point(t,e),E=!1)}x=t,w=e,A=n}var g,y,m,v,_,b,x,w,A,k,E,D=o,M=Ie(),C=$e(t,e,n,r),S={point:h,lineStart:f,lineEnd:d,polygonStart:function(){o=M,g=[],y=[],E=!0},polygonEnd:function(){o=D,g=na.merge(g);var e=s([t,r]),n=E&&e,i=g.length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),c(null,null,1,o),o.lineEnd()),i&&Te(g,u,e,c,o),o.polygonEnd()),g=y=m=null}};return S}}function qe(t){var e=0,n=Ba/3,r=on(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*Ba/180,n=t[1]*Ba/180):[e/Ba*180,n/Ba*180]},i}function We(t,e){function n(t,e){var n=Math.sqrt(u-2*i*Math.sin(e))/i;return[n*Math.sin(t*=i),a-n*Math.cos(t)]}var r=Math.sin(t),i=(r+Math.sin(e))/2,u=1+r*(2*i-r),a=Math.sqrt(u)/i;return n.invert=function(t,e){var n=a-e;return[Math.atan2(t,n)/i,nt((u-(t*t+n*n)*i*i)/(2*i))]},n}function Ge(){function t(t,e){Po+=i*t-r*e,r=t,i=e}var e,n,r,i;$o.point=function(u,a){$o.point=t,e=r=u,n=i=a},$o.lineEnd=function(){t(e,n)}}function He(t,e){Ro>t&&(Ro=t),t>Uo&&(Uo=t),jo>e&&(jo=e),e>Yo&&(Yo=e)}function Ve(){function t(t,e){a.push("M",t,",",e,u)}function e(t,e){a.push("M",t,",",e),o.point=n}function n(t,e){a.push("L",t,",",e)}function r(){o.point=t}function i(){a.push("Z")}var u=Xe(4.5),a=[],o={point:t,lineStart:function(){o.point=e},lineEnd:r,polygonStart:function(){o.lineEnd=i},polygonEnd:function(){o.lineEnd=r,o.point=t},pointRadius:function(t){return u=Xe(t),o},result:function(){if(a.length){var t=a.join("");return a=[],t}}};return o}function Xe(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Ze(t,e){ko+=t,Eo+=e,++Do}function Ke(){function t(t,r){var i=t-e,u=r-n,a=Math.sqrt(i*i+u*u);Mo+=a*(e+t)/2,Co+=a*(n+r)/2,So+=a,Ze(e=t,n=r)}var e,n;qo.point=function(r,i){qo.point=t,Ze(e=r,n=i)}}function Qe(){qo.point=Ze}function Je(){function t(t,e){var n=t-r,u=e-i,a=Math.sqrt(n*n+u*u);Mo+=a*(r+t)/2,Co+=a*(i+e)/2,So+=a,a=i*t-r*e,To+=a*(r+t),Fo+=a*(i+e),Bo+=3*a,Ze(r=t,i=e)}var e,n,r,i;qo.point=function(u,a){qo.point=t,Ze(e=r=u,n=i=a)},qo.lineEnd=function(){t(e,n)}}function tn(t){function e(e,n){t.moveTo(e+a,n),t.arc(e,n,a,0,Oa)}function n(e,n){t.moveTo(e,n),o.point=r}function r(e,n){t.lineTo(e,n)}function i(){o.point=e}function u(){t.closePath()}var a=4.5,o={point:e,lineStart:function(){o.point=n},lineEnd:i,polygonStart:function(){o.lineEnd=u},polygonEnd:function(){o.lineEnd=i,o.point=e},pointRadius:function(t){return a=t,o},result:w};return o}function en(t){function e(t){return(o?r:n)(t)}function n(e){return un(e,function(n,r){n=t(n,r),e.point(n[0],n[1])})}function r(e){function n(n,r){n=t(n,r),e.point(n[0],n[1])}function r(){_=0/0,k.point=u,e.lineStart()}function u(n,r){var u=ge([n,r]),a=t(n,r);i(_,b,v,x,w,A,_=a[0],b=a[1],v=n,x=u[0],w=u[1],A=u[2],o,e),e.point(_,b)}function a(){k.point=n,e.lineEnd()}function s(){r(),k.point=c,k.lineEnd=l}function c(t,e){u(h=t,f=e),d=_,p=b,g=x,y=w,m=A,k.point=u}function l(){i(_,b,v,x,w,A,d,p,h,g,y,m,o,e),k.lineEnd=a,a()}var h,f,d,p,g,y,m,v,_,b,x,w,A,k={point:n,lineStart:r,lineEnd:a,polygonStart:function(){e.polygonStart(),k.lineStart=s},polygonEnd:function(){e.polygonEnd(),k.lineStart=r}};return k}function i(e,n,r,o,s,c,l,h,f,d,p,g,y,m){var v=l-e,_=h-
e):r},e.defined=function(t){return arguments.length?(i=t,e):i},e.interpolate=function(t){return arguments.length?(a="function"==typeof t?u=t:(u=Cs.get(t)||gu).key,e):a},e.tension=function(t){return arguments.length?(o=t,e):o},e}function gu(t){return t.join("L")}function yu(t){return gu(t)+"Z"}function mu(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e<n;)i.push("H",(r[0]+(r=t[e])[0])/2,"V",r[1]);return n>1&&i.push("H",r[0]),i.join("")}function vu(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e<n;)i.push("V",(r=t[e])[1],"H",r[0]);return i.join("")}function _u(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e<n;)i.push("H",(r=t[e])[0],"V",r[1]);return i.join("")}function bu(t,e){return t.length<4?gu(t):t[1]+Au(t.slice(1,-1),ku(t,e))}function xu(t,e){return t.length<3?gu(t):t[0]+Au((t.push(t[0]),t),ku([t[t.length-2]].concat(t,[t[1]]),e))}function wu(t,e){return t.length<3?gu(t):t[0]+Au(t,ku(t,e))}function Au(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return gu(t);var n=t.length!=e.length,r="",i=t[0],u=t[1],a=e[0],o=a,s=1;if(n&&(r+="Q"+(u[0]-2*a[0]/3)+","+(u[1]-2*a[1]/3)+","+u[0]+","+u[1],i=t[1],s=2),e.length>1){o=e[1],u=t[s],s++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(u[0]-o[0])+","+(u[1]-o[1])+","+u[0]+","+u[1];for(var c=2;c<e.length;c++,s++)u=t[s],o=e[c],r+="S"+(u[0]-o[0])+","+(u[1]-o[1])+","+u[0]+","+u[1]}if(n){var l=t[s];r+="Q"+(u[0]+2*o[0]/3)+","+(u[1]+2*o[1]/3)+","+l[0]+","+l[1]}return r}function ku(t,e){for(var n,r=[],i=(1-e)/2,u=t[0],a=t[1],o=1,s=t.length;++o<s;)n=u,u=a,a=t[o],r.push([i*(a[0]-n[0]),i*(a[1]-n[1])]);return r}function Eu(t){if(t.length<3)return gu(t);var e=1,n=t.length,r=t[0],i=r[0],u=r[1],a=[i,i,i,(r=t[1])[0]],o=[u,u,u,r[1]],s=[i,",",u,"L",Su(Fs,a),",",Su(Fs,o)];for(t.push(t[n-1]);++e<=n;)r=t[e],a.shift(),a.push(r[0]),o.shift(),o.push(r[1]),Tu(s,a,o);return t.pop(),s.push("L",r),s.join("")}function Du(t){if(t.length<4)return gu(t);for(var e,n=[],r=-1,i=t.length,u=[0],a=[0];++r<3;)e=t[r],u.push(e[0]),a.push(e[1]);for(n.push(Su(Fs,u)+","+Su(Fs,a)),--r;++r<i;)e=t[r],u.shift(),u.push(e[0]),a.shift(),a.push(e[1]),Tu(n,u,a);return n.join("")}function Mu(t){for(var e,n,r=-1,i=t.length,u=i+4,a=[],o=[];++r<4;)n=t[r%i],a.push(n[0]),o.push(n[1]);for(e=[Su(Fs,a),",",Su(Fs,o)],--r;++r<u;)n=t[r%i],a.shift(),a.push(n[0]),o.shift(),o.push(n[1]),Tu(e,a,o);return e.join("")}function Cu(t,e){var n=t.length-1;if(n)for(var r,i,u=t[0][0],a=t[0][1],o=t[n][0]-u,s=t[n][1]-a,c=-1;++c<=n;)r=t[c],i=c/n,r[0]=e*r[0]+(1-e)*(u+i*o),r[1]=e*r[1]+(1-e)*(a+i*s);return Eu(t)}function Su(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function Tu(t,e,n){t.push("C",Su(Ss,e),",",Su(Ss,n),",",Su(Ts,e),",",Su(Ts,n),",",Su(Fs,e),",",Su(Fs,n))}function Fu(t,e){return(e[1]-t[1])/(e[0]-t[0])}function Bu(t){for(var e=0,n=t.length-1,r=[],i=t[0],u=t[1],a=r[0]=Fu(i,u);++e<n;)r[e]=(a+(a=Fu(i=u,u=t[e+1])))/2;return r[e]=a,r}function Ou(t){for(var e,n,r,i,u=[],a=Bu(t),o=-1,s=t.length-1;++o<s;)e=Fu(t[o],t[o+1]),pa(e)<Ta?a[o]=a[o+1]=0:(n=a[o]/e,r=a[o+1]/e,i=n*n+r*r,i>9&&(i=3*e/Math.sqrt(i),a[o]=i*n,a[o+1]=i*r));for(o=-1;++o<=s;)i=(t[Math.min(s,o+1)][0]-t[Math.max(0,o-1)][0])/(6*(1+a[o]*a[o])),u.push([i||0,a[o]*i||0]);return u}function Lu(t){return t.length<3?gu(t):t[0]+Au(t,Ou(t))}function Iu(t){for(var e,n,r,i=-1,u=t.length;++i<u;)e=t[i],n=e[0],r=e[1]-Ia,e[0]=n*Math.cos(r),e[1]=n*Math.sin(r);return t}function Nu(t){function e(e){function s(){g.push("M",o(t(m),h),l,c(t(y.reverse()),h),"Z")}for(var f,d,p,g=[],y=[],m=[],v=-1,_=e.length,b=Mt(n),x=Mt(i),w=n===r?function(){return d}:Mt(r),A=i===u?function(){return p}:Mt(u);++v<_;)a.call(this,f=e[v],v)?(y.push([d=+b.call(this,f,v),p=+x.call(this,f,v)]),m.push([+w.call(this,f,v),+A.call(this,f,v)])):y.length&&(s(),y=[],m=[]);return y.length&&s(),g.length?g.join(""):null}var n=Sn,r=Sn,i=0,u=Tn,a=Se,o=gu,s=o.key,c=o,l="L",h=.7;return e.x=function(t){return arguments.length?(n=r=t,e):r},e.x0=function(t){return arguments.length?(n=t,e):n},e.x1=function(t){return arguments.length?(r=t,e):r},e.y=function(t){return arguments.length?(i=u=t,e):u},e.y0=function(t){return arguments
to=u,eo||(no=clearTimeout(no),eo=1,io(Bt))},na.timer.flush=function(){Ot(),Lt()},na.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var uo=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Nt);na.formatPrefix=function(t,e){var n=0;return t&&(0>t&&(t*=-1),e&&(t=na.round(t,It(t,e))),n=1+Math.floor(1e-12+Math.log(t)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),uo[8+n/3]};var ao=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,oo=na.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=na.round(t,It(t,e))).toFixed(Math.max(0,Math.min(20,It(t*(1+1e-15),e))))}}),so=na.time={},co=Date;jt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){lo.setUTCDate.apply(this._,arguments)},setDay:function(){lo.setUTCDay.apply(this._,arguments)},setFullYear:function(){lo.setUTCFullYear.apply(this._,arguments)},setHours:function(){lo.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){lo.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){lo.setUTCMinutes.apply(this._,arguments)},setMonth:function(){lo.setUTCMonth.apply(this._,arguments)},setSeconds:function(){lo.setUTCSeconds.apply(this._,arguments)},setTime:function(){lo.setTime.apply(this._,arguments)}};var lo=Date.prototype;so.year=Ut(function(t){return t=so.day(t),t.setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),so.years=so.year.range,so.years.utc=so.year.utc.range,so.day=Ut(function(t){var e=new co(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),so.days=so.day.range,so.days.utc=so.day.utc.range,so.dayOfYear=function(t){var e=so.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var n=so[t]=Ut(function(t){return(t=so.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var n=so.year(t).getDay();return Math.floor((so.dayOfYear(t)+(n+e)%7)/7)-(n!==e)});so[t+"s"]=n.range,so[t+"s"].utc=n.utc.range,so[t+"OfYear"]=function(t){var n=so.year(t).getDay();return Math.floor((so.dayOfYear(t)+(n+e)%7)/7)}}),so.week=so.sunday,so.weeks=so.sunday.range,so.weeks.utc=so.sunday.utc.range,so.weekOfYear=so.sundayOfYear;var ho={"-":"",_:" ",0:"0"},fo=/^\s*\d+/,po=/^%/;na.locale=function(t){return{numberFormat:Pt(t),timeFormat:$t(t)}};var go=na.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});na.format=go.numberFormat,na.geo={},ce.prototype={s:0,t:0,add:function(t){le(t,this.t,yo),le(yo.s,this.s,this),this.s?this.t+=yo.t:this.s=yo.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var yo=
2015-10-19 22:08:17 +02:00
2015-10-30 11:34:24 +01:00
}),ei(o,xi),ei(o,function(t){t.r-=h})}return ki(o,s/2,c/2,e?1:1/Math.max(2*o.r/s,2*o.r/c)),a}var e,n=na.layout.hierarchy().sort(mi),r=0,i=[1,1];return t.size=function(e){return arguments.length?(i=e,t):i},t.radius=function(n){return arguments.length?(e=null==n||"function"==typeof n?n:+n,t):e},t.padding=function(e){return arguments.length?(r=+e,t):r},Jr(t,n)},na.layout.tree=function(){function t(t,i){var l=a.call(this,t,i),h=l[0],f=e(h);if(ei(f,n),f.parent.m=-f.z,ti(f,r),c)ti(h,u);else{var d=h,p=h,g=h;ti(h,function(t){t.x<d.x&&(d=t),t.x>p.x&&(p=t),t.depth>g.depth&&(g=t)});var y=o(d,p)/2-d.x,m=s[0]/(p.x+o(p,d)/2+y),v=s[1]/(g.depth||1);ti(h,function(t){t.x=(t.x+y)*m,t.y=t.depth*v})}return l}function e(t){for(var e,n={A:null,children:[t]},r=[n];null!=(e=r.pop());)for(var i,u=e.children,a=0,o=u.length;o>a;++a)r.push((u[a]=i={_:u[a],parent:e,children:(i=u[a].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=i);return n.children[0]}function n(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e.length){Ti(t);var u=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+o(t._,r._),t.m=t.z-u):t.z=u}else r&&(t.z=r.z+o(t._,r._));t.parent.A=i(t,r,t.parent.A||n[0])}function r(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function i(t,e,n){if(e){for(var r,i=t,u=t,a=e,s=i.parent.children[0],c=i.m,l=u.m,h=a.m,f=s.m;a=Ci(a),i=Mi(i),a&&i;)s=Mi(s),u=Ci(u),u.a=t,r=a.z+h-i.z-c+o(a._,i._),r>0&&(Si(Fi(a,t,n),t,r),c+=r,l+=r),h+=a.m,c+=i.m,f+=s.m,l+=u.m;a&&!Ci(u)&&(u.t=a,u.m+=h-l),i&&!Mi(s)&&(s.t=i,s.m+=c-f,n=t)}return n}function u(t){t.x*=s[0],t.y=t.depth*s[1]}var a=na.layout.hierarchy().sort(null).value(null),o=Di,s=[1,1],c=null;return t.separation=function(e){return arguments.length?(o=e,t):o},t.size=function(e){return arguments.length?(c=null==(s=e)?u:null,t):c?null:s},t.nodeSize=function(e){return arguments.length?(c=null==(s=e)?null:u,t):c?s:null},Jr(t,a)},na.layout.cluster=function(){function t(t,u){var a,o=e.call(this,t,u),s=o[0],c=0;ei(s,function(t){var e=t.children;e&&e.length?(t.x=Oi(e),t.y=Bi(e)):(t.x=a?c+=n(t,a):0,t.y=0,a=t)});var l=Li(s),h=Ii(s),f=l.x-n(l,h)/2,d=h.x+n(h,l)/2;return ei(s,i?function(t){t.x=(t.x-s.x)*r[0],t.y=(s.y-t.y)*r[1]}:function(t){t.x=(t.x-f)/(d-f)*r[0],t.y=(1-(s.y?t.y/s.y:1))*r[1]}),o}var e=na.layout.hierarchy().sort(null).value(null),n=Di,r=[1,1],i=!1;return t.separation=function(e){return arguments.length?(n=e,t):n},t.size=function(e){return arguments.length?(i=null==(r=e),t):i?null:r},t.nodeSize=function(e){return arguments.length?(i=null!=(r=e),t):i?r:null},Jr(t,e)},na.layout.treemap=function(){function t(t,e){for(var n,r,i=-1,u=t.length;++i<u;)r=(n=t[i]).value*(0>e?0:e),n.area=isNaN(r)||0>=r?0:r}function e(n){var u=n.children;if(u&&u.length){var a,o,s,c=h(n),l=[],f=u.slice(),p=1/0,g="slice"===d?c.dx:"dice"===d?c.dy:"slice-dice"===d?1&n.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(t(f,c.dx*c.dy/n.value),l.area=0;(s=f.length)>0;)l.push(a=f[s-1]),l.area+=a.area,"squarify"!==d||(o=r(l,g))<=p?(f.pop(),p=o):(l.area-=l.pop().area,i(l,g,c,!1),g=Math.min(c.dx,c.dy),l.length=l.area=0,p=1/0);l.length&&(i(l,g,c,!0),l.length=l.area=0),u.forEach(e)}}function n(e){var r=e.children;if(r&&r.length){var u,a=h(e),o=r.slice(),s=[];for(t(o,a.dx*a.dy/e.value),s.area=0;u=o.pop();)s.push(u),s.area+=u.area,null!=u.z&&(i(s,u.z?a.dx:a.dy,a,!o.length),s.length=s.area=0);r.forEach(n)}}function r(t,e){for(var n,r=t.area,i=0,u=1/0,a=-1,o=t.length;++a<o;)(n=t[a].area)&&(u>n&&(u=n),n>i&&(i=n));return r*=r,e*=e,r?Math.max(e*i*p/r,r/(e*u*p)):1/0}function i(t,e,n,r){var i,u=-1,a=t.length,o=n.x,c=n.y,l=e?s(t.area/e):0;if(e==n.dx){for((r||l>n.dy)&&(l=n.dy);++u<a;)i=t[u],i.x=o,i.y=c,i.dy=l,o+=i.dx=Math.min(n.x+n.dx-o,l?s(i.area/l):0);i.z=!0,i.dx+=n.x+n.dx-o,n.y+=l,n.dy-=l}else{for((r||l>n.dx)&&(l=n.dx);++u<a;)i=t[u],i.x=o,i.y=c,i.dx=l,c+=i.dy=Math.min(n.y+n.dy-c,l?s(i.area/l):0);i.z=!1,i.dy+=n.y+n.dy-c,n.x+=l,n.dx-=l}}function u(r){var i=a||o(r),u=i[0];return u.x=0,u.y=0,u.dx=c[0],u.dy=c[1],a&&o.revalue(u),t([u],u.dx*u.dy/u.value),(a?n:e)(u),f&&(a=i),i}var a,o=na.layout.hierarchy(),s=Math.round,c=[1,1],l=null,h=Ni,f=!1,d="squarify",p=.5*(1+
2015-10-19 22:08:17 +02:00
2015-10-30 11:34:24 +01:00
function n(t,e,n){var o=e.nodes().filter(function(t){return!u.isSubgraph(e,t)}),s=t.selectAll("g.node").data(o,function(t){return t}).classed("update",!0);return s.selectAll("*").remove(),s.enter().append("g").attr("class","node").style("opacity",0),s.each(function(t){var o=e.node(t),s=a.select(this),c=s.append("g").attr("class","label"),l=i(c,o),h=n[o.shape],f=r.pick(l.node().getBBox(),"width","height");o.elem=this,o.id&&s.attr("id",o.id),o.labelId&&c.attr("id",o.labelId),u.applyClass(s,o["class"],(s.classed("update")?"update ":"")+"node"),r.has(o,"width")&&(f.width=o.width),r.has(o,"height")&&(f.height=o.height),f.width+=o.paddingLeft+o.paddingRight,f.height+=o.paddingTop+o.paddingBottom,c.attr("transform","translate("+(o.paddingLeft-o.paddingRight)/2+","+(o.paddingTop-o.paddingBottom)/2+")");var d=h(a.select(this),f,o);u.applyStyle(d,o.style);var p=d.node().getBBox();o.width=p.width,o.height=p.height}),u.applyTransition(s.exit(),e).style("opacity",0).remove(),s}var r=t("./lodash"),i=t("./label/add-label"),u=t("./util"),a=t("./d3");e.exports=n},{"./d3":11,"./label/add-label":22,"./lodash":25,"./util":31}],11:[function(t,e){e.exports=window.d3},{}],12:[function(t,e){var n;if(t)try{n=t("dagre")}catch(r){}n||(n=window.dagre),e.exports=n},{dagre:33}],13:[function(t,e){var n;if(t)try{n=t("graphlib")}catch(r){}n||(n=window.graphlib),e.exports=n},{graphlib:63}],14:[function(t,e){e.exports={node:t("./intersect-node"),circle:t("./intersect-circle"),ellipse:t("./intersect-ellipse"),polygon:t("./intersect-polygon"),rect:t("./intersect-rect")}},{"./intersect-circle":15,"./intersect-ellipse":16,"./intersect-node":18,"./intersect-polygon":19,"./intersect-rect":20}],15:[function(t,e){function n(t,e,n){return r(t,e,e,n)}var r=t("./intersect-ellipse");e.exports=n},{"./intersect-ellipse":16}],16:[function(t,e){function n(t,e,n,r){var i=t.x,u=t.y,a=i-r.x,o=u-r.y,s=Math.sqrt(e*e*o*o+n*n*a*a),c=Math.abs(e*n*a/s);r.x<i&&(c=-c);var l=Math.abs(e*n*o/s);return r.y<u&&(l=-l),{x:i+c,y:u+l}}e.exports=n},{}],17:[function(t,e){function n(t,e,n,i){var u,a,o,s,c,l,h,f,d,p,g,y,m,v,_;return u=e.y-t.y,o=t.x-e.x,c=e.x*t.y-t.x*e.y,d=u*n.x+o*n.y+c,p=u*i.x+o*i.y+c,0!==d&&0!==p&&r(d,p)||(a=i.y-n.y,s=n.x-i.x,l=i.x*n.y-n.x*i.y,h=a*t.x+s*t.yy+l,f=a*e.x+s*e.y+l,0!==h&&0!==f&&r(h,f)||(g=u*s-a*o,0===g))?void 0:(y=Math.abs(g/2),m=o*l-s*c,v=0>m?(m-y)/g:(m+y)/g,m=a*c-u*l,_=0>m?(m-y)/g:(m+y)/g,{x:v,y:_})}function r(t,e){return t*e>0}e.exports=n},{}],18:[function(t,e){function n(t,e){return t.intersect(e)}e.exports=n},{}],19:[function(t,e){function n(t,e,n){var i=t.x,u=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;e.forEach(function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)});for(var c=i-t.width/2-o,l=u-t.height/2-s,h=0;h<e.length;h++){var f=e[h],d=e[h<e.length-1?h+1:0],p=r(t,n,{x:c+f.x,y:l+f.y},{x:c+d.x,y:l+d.y});p&&a.push(p)}return a.length?(a.length>1&&a.sort(function(t,e){var r=t.x-n.x,i=t.y-n.y,u=Math.sqrt(r*r+i*i),a=e.x-n.x,o=e.y-n.y,s=Math.sqrt(a*a+o*o);return s>u?-1:u===s?0:1}),a[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t)}var r=t("./intersect-line");e.exports=n},{"./intersect-line":17}],20:[function(t,e){function n(t,e){var n,r,i=t.x,u=t.y,a=e.x-i,o=e.y-u,s=t.width/2,c=t.height/2;return Math.abs(o)*s>Math.abs(a)*c?(0>o&&(c=-c),n=0===o?0:c*a/o,r=c):(0>a&&(s=-s),n=s,r=0===a?0:s*o/a),{x:i+n,y:u+r}}e.exports=n},{}],21:[function(t,e){function n(t,e){var n=t.append("foreignObject").attr("width","100000"),i=n.append("xhtml:div"),u=e.label;switch(typeof u){case"function":i.insert(u);break;case"object":i.insert(function(){return u});break;default:i.html(u)}r.applyStyle(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var a,o;return i.each(function(){a=this.clientWidth,o=this.clientHeight}),n.attr("width",a).attr("height",o),n}var r=t("../util");e.exports=n},{"../util":31}],22:[function(t,e){function n(t,e,n){var a=e.label,o=t.append("g");"svg"===e.labelType?u(o,e):"string"!=typeof a||"html"===e.labelType?i(o,e):r(o,e);var s,c=o.node().getBBox();switch(n){case"top":s=-e.height/2;break;case"bottom":s=
y.each(e,function(t){var e=-1;y.each(t,function(t){var s=r(t);if(s.length){s=y.sortBy(s,function(t){return o[t]});for(var c=(s.length-1)/2,l=Math.floor(c),h=Math.ceil(c);h>=l;++l){var f=s[l];u[t]===t&&e<o[f]&&!a(n,t,f)&&(u[f]=t,u[t]=i[t]=i[f],e=o[f])}}})}),{root:i,align:u}}function s(t,e,n,r,i){function u(t){y.has(l,t)||(l[t]=!0,o[t]=y.reduce(s.inEdges(t),function(t,e){return u(e.v),Math.max(t,o[e.v]+s.edge(e))},0))}function a(e){if(2!==l[e]){l[e]++;var n=t.node(e),r=y.reduce(s.outEdges(e),function(t,e){return a(e.w),Math.min(t,o[e.w]-s.edge(e))},Number.POSITIVE_INFINITY);r!==Number.POSITIVE_INFINITY&&n.borderType!==h&&(o[e]=Math.max(o[e],r))}}var o={},s=c(t,e,n,i),l={};y.each(s.nodes(),u);var h=i?"borderLeft":"borderRight";return y.each(s.nodes(),a),y.each(r,function(t){o[t]=o[n[t]]}),o}function c(t,e,n,r){var i=new m,u=t.graph(),a=p(u.nodesep,u.edgesep,r);return y.each(e,function(e){var r;y.each(e,function(e){var u=n[e];if(i.setNode(u),r){var o=n[r],s=i.edge(o,u);i.setEdge(o,u,Math.max(a(t,e,r),s||0))}r=e})}),i}function l(t,e){return y.min(e,function(e){var n=y.min(e,function(e,n){return e-g(t,n)/2}),r=y.max(e,function(e,n){return e+g(t,n)/2});return r-n})}function h(t,e){var n=y.min(e),r=y.max(e);y.each(["u","d"],function(i){y.each(["l","r"],function(u){var a,o=i+u,s=t[o];s!==e&&(a="l"===u?n-y.min(s):r-y.max(s),a&&(t[o]=y.mapValues(s,function(t){return t+a})))})})}function f(t,e){return y.mapValues(t.ul,function(n,r){if(e)return t[e.toLowerCase()][r];var i=y.sortBy(y.pluck(t,r));return(i[1]+i[2])/2})}function d(t){var e,i=v.buildLayerMatrix(t),u=y.merge(n(t,i),r(t,i)),a={};y.each(["u","d"],function(n){e="u"===n?i:y.values(i).reverse(),y.each(["l","r"],function(r){"r"===r&&(e=y.map(e,function(t){return y.values(t).reverse()}));var i=y.bind("u"===n?t.predecessors:t.successors,t),c=o(t,e,u,i),l=s(t,e,c.root,c.align,"r"===r);"r"===r&&(l=y.mapValues(l,function(t){return-t})),a[n+r]=l})});var c=l(t,a);return h(a,c),f(a,t.graph().align)}function p(t,e,n){return function(r,i,u){var a,o=r.node(i),s=r.node(u),c=0;if(c+=o.width/2,y.has(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":a=-o.width/2;break;case"r":a=o.width/2}if(a&&(c+=n?a:-a),a=0,c+=(o.dummy?e:t)/2,c+=(s.dummy?e:t)/2,c+=s.width/2,y.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":a=s.width/2;break;case"r":a=-s.width/2}return a&&(c+=n?a:-a),a=0,c}}function g(t,e){return t.node(e).width}var y=t("../lodash"),m=t("../graphlib").Graph,v=t("../util");e.exports={positionX:d,findType1Conflicts:n,findType2Conflicts:r,addConflict:u,hasConflict:a,verticalAlignment:o,horizontalCompaction:s,alignCoordinates:h,findSmallestWidthAlignment:l,balance:f}},{"../graphlib":39,"../lodash":42,"../util":61}],56:[function(t,e){"use strict";function n(t){t=u.asNonCompoundGraph(t),r(t),i.each(a(t),function(e,n){t.node(n).x=e})}function r(t){var e=u.buildLayerMatrix(t),n=t.graph().ranksep,r=0;i.each(e,function(e){var u=i.max(i.map(e,function(e){return t.node(e).height}));i.each(e,function(e){t.node(e).y=r+u/2}),r+=u+n})}var i=t("../lodash"),u=t("../util"),a=t("./bk").positionX;e.exports=n},{"../lodash":42,"../util":61,"./bk":55}],57:[function(t,e){"use strict";function n(t){var e=new o({directed:!1}),n=t.nodes()[0],a=t.nodeCount();e.setNode(n,{});for(var c,l;r(e,t)<a;)c=i(e,t),l=e.hasNode(c.v)?s(t,c):-s(t,c),u(e,t,l);return e}function r(t,e){function n(r){a.each(e.nodeEdges(r),function(i){var u=i.v,a=r===u?i.w:u;t.hasNode(a)||s(e,i)||(t.setNode(a,{}),t.setEdge(r,a,{}),n(a))})}return a.each(t.nodes(),n),t.nodeCount()}function i(t,e){return a.min(e.edges(),function(n){return t.hasNode(n.v)!==t.hasNode(n.w)?s(e,n):void 0})}function u(t,e,n){a.each(t.nodes(),function(t){e.node(t).rank+=n})}var a=t("../lodash"),o=t("../graphlib").Graph,s=t("./util").slack;e.exports=n},{"../graphlib":39,"../lodash":42,"./util":60}],58:[function(t,e){"use strict";function n(t){switch(t.graph().ranker){case"network-simplex":i(t);break;case"tight-tree":r(t);break;case"longest-path":c(t);break;default:i(t)}}function r(t){a(t),o(t)}function i(t){s(t)}var u=t("./util"),a=u.longestPath,o=t("./feasible-tree
for(var o=u.length,s=e[n];o--;)if(u[o]==s)return void(t[n]=a[o]);var c=t[n],l=i?i(c,s,n,t,e):E,h=l===E;h&&(l=s,Kn(s)&&(So(s)||zi(s))?l=So(c)?c:Kn(c)?te(c):[]:Ui(s)||Ei(s)?l=Ei(c)?Vi(c):Ui(c)?c:{}:h=!1),u.push(s),a.push(l),h?t[n]=r(l,s,i,u,a):(l===l?l!==c:c===c)&&(t[n]=l)}function ze(t){return function(e){return null==e?E:e[t]}}function qe(t){var e=t+"";return t=fr(t),function(n){return Le(n,t,e)}}function We(t,e){for(var n=t?e.length:0;n--;){var r=e[n];if(r!=i&&Qn(r)){var i=r;fa.call(t,r,1)}}return t}function Ge(t,e){return t+ma(Ea()*(e-t+1))}function He(t,e,n,r,i){return i(t,function(t,i,u){n=r?(r=!1,t):e(n,t,i,u)}),n}function Ve(t,e,n){var r=-1,i=t.length;e=null==e?0:+e||0,0>e&&(e=-e>i?0:i+e),n=n===E||n>i?i:+n||0,0>n&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var u=Uu(i);++r<i;)u[r]=t[r+e];return u}function Xe(t,e){var n;return Ia(t,function(t,r,i){return n=e(t,r,i),!n}),!!n}function Ze(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}function Ke(t,e,n){var r=Yn(),i=-1;e=se(e,function(t){return r(t)});var u=Re(t,function(t){var n=se(e,function(e){return e(t)});return{criteria:n,index:++i,value:t}});return Ze(u,function(t,e){return h(t,e,n)})}function Qe(t,e){var n=0;return Ia(t,function(t,r,i){n+=+e(t,r,i)||0}),n}function Je(t,e){var n=-1,r=zn(),i=t.length,a=r==u,o=a&&i>=U,s=o?gn():null,c=[];s?(r=Kt,a=!1):(o=!1,s=e?[]:c);t:for(;++n<i;){var l=t[n],h=e?e(l,n,t):l;if(a&&l===l){for(var f=s.length;f--;)if(s[f]===h)continue t;e&&s.push(h),c.push(l)}else r(s,h,0)<0&&((e||o)&&s.push(h),c.push(l))}return c}function tn(t,e){for(var n=-1,r=e.length,i=Uu(r);++n<r;)i[n]=t[e[n]];return i}function en(t,e,n,r){for(var i=t.length,u=r?i:-1;(r?u--:++u<i)&&e(t[u],u,t););return n?Ve(t,r?0:u,r?u+1:i):Ve(t,r?u+1:0,r?i:u)}function nn(t,e){var n=t;n instanceof K&&(n=n.value());for(var r=-1,i=e.length;++r<i;){var u=e[r];n=u.func.apply(u.thisArg,ce([n],u.args))}return n}function rn(t,e,n){var r=0,i=t?t.length:r;if("number"==typeof e&&e===e&&Ta>=i){for(;i>r;){var u=r+i>>>1,a=t[u];(n?e>=a:e>a)&&null!==a?r=u+1:i=u}return i}return un(t,e,Mu,n)}function un(t,e,n,r){e=n(e);for(var i=0,u=t?t.length:0,a=e!==e,o=null===e,s=e===E;u>i;){var c=ma((i+u)/2),l=n(t[c]),h=l!==E,f=l===l;if(a)var d=f||r;else d=o?f&&h&&(r||null!=l):s?f&&(r||h):null==l?!1:r?e>=l:e>l;d?i=c+1:u=c}return wa(u,Sa)}function an(t,e,n){if("function"!=typeof t)return Mu;if(e===E)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,u){return t.call(e,n,r,i,u)};case 5:return function(n,r,i,u,a){return t.call(e,n,r,i,u,a)}}return function(){return t.apply(e,arguments)}}function on(t){var e=new ua(t.byteLength),n=new da(e);return n.set(new da(t)),e}function sn(t,e,n){for(var r=n.length,i=-1,u=xa(t.length-r,0),a=-1,o=e.length,s=Uu(o+u);++a<o;)s[a]=e[a];for(;++i<r;)s[n[i]]=t[i];for(;u--;)s[a++]=t[i++];return s}function cn(t,e,n){for(var r=-1,i=n.length,u=-1,a=xa(t.length-i,0),o=-1,s=e.length,c=Uu(a+s);++u<a;)c[u]=t[u];for(var l=u;++o<s;)c[l+o]=e[o];for(;++r<i;)c[l+n[r]]=t[u++];return c}function ln(t,e){return function(n,r,i){var u=e?e():{};if(r=Yn(r,i,3),So(n))for(var a=-1,o=n.length;++a<o;){var s=n[a];t(u,s,r(s,a,n),n)}else Ia(n,function(e,n,i){t(u,e,r(e,n,i),i)});return u}}function hn(t){return mi(function(e,n){var r=-1,i=null==e?0:n.length,u=i>2?n[i-2]:E,a=i>2?n[2]:E,o=i>1?n[i-1]:E;for("function"==typeof u?(u=an(u,o,5),i-=2):(u="function"==typeof o?o:E,i-=u?1:0),a&&Jn(n[0],n[1],a)&&(u=3>i?E:u,i=1);++r<i;){var s=n[r];s&&t(e,s,u)}return e})}function fn(t,e){return function(n,r){var i=n?Ya(n):0;if(!nr(i))return t(n,r);for(var u=e?i:-1,a=hr(n);(e?u--:++u<i)&&r(a[u],u,a)!==!1;);return n}}function dn(t){return function(e,n,r){for(var i=hr(e),u=r(e),a=u.length,o=t?a:-1;t?o--:++o<a;){var s=u[o];if(n(i[s],s,i)===!1)break}return e}}function pn(t,e){function n(){var i=this&&this!==ne&&this instanceof n?r:t;return i.apply(e,arguments)}var r=mn(t);return n}function gn(t){return ya&&la?new Zt(t):null}function yn(t){return function(e){for(var n=-1,r=ku(lu(e)),i=r.length,u="";++n<i;)u=t(u,r[n],n);return u}}f
2015-10-19 22:08:17 +02:00
2015-10-30 11:34:24 +01:00
}}),Jo=mi(function(t,e){return function(n){return Zn(t,n,e)}}),ts=In("ceil"),es=In("floor"),ns=bn(Ai,Da),rs=bn(Wi,Ma),is=In("round");return e.prototype=n.prototype,v.prototype=La(n.prototype),v.prototype.constructor=v,K.prototype=La(n.prototype),K.prototype.constructor=K,Wt.prototype["delete"]=Gt,Wt.prototype.get=Ht,Wt.prototype.has=Vt,Wt.prototype.set=Xt,Zt.prototype.push=Qt,pi.Cache=Wt,e.after=li,e.ary=hi,e.assign=Fo,e.at=eo,e.before=fi,e.bind=yo,e.bindAll=mo,e.bindKey=vo,e.callback=Eu,e.chain=Yr,e.chunk=pr,e.compact=gr,e.constant=Du,e.countBy=no,e.create=Xi,e.curry=_o,e.curryRight=bo,e.debounce=di,e.defaults=Bo,e.defaultsDeep=Oo,e.defer=xo,e.delay=wo,e.difference=za,e.drop=yr,e.dropRight=mr,e.dropRightWhile=vr,e.dropWhile=_r,e.fill=br,e.filter=Kr,e.flatten=wr,e.flattenDeep=Ar,e.flow=Ao,e.flowRight=ko,e.forEach=uo,e.forEachRight=ao,e.forIn=No,e.forInRight=Po,e.forOwn=Ro,e.forOwnRight=jo,e.functions=Zi,e.groupBy=oo,e.indexBy=so,e.initial=Er,e.intersection=Ga,e.invert=Ji,e.invoke=co,e.keys=Uo,e.keysIn=tu,e.map=ti,e.mapKeys=Yo,e.mapValues=$o,e.matches=Cu,e.matchesProperty=Su,e.memoize=pi,e.merge=To,e.method=Qo,e.methodOf=Jo,e.mixin=Tu,e.modArgs=Eo,e.negate=gi,e.omit=zo,e.once=yi,e.pairs=eu,e.partial=Do,e.partialRight=Mo,e.partition=lo,e.pick=qo,e.pluck=ei,e.property=Ou,e.propertyOf=Lu,e.pull=Cr,e.pullAt=Ha,e.range=Iu,e.rearg=Co,e.reject=ni,e.remove=Sr,e.rest=Tr,e.restParam=mi,e.set=ru,e.shuffle=ii,e.slice=Fr,e.sortBy=oi,e.sortByAll=po,e.sortByOrder=si,e.spread=vi,e.take=Br,e.takeRight=Or,e.takeRightWhile=Lr,e.takeWhile=Ir,e.tap=$r,e.throttle=_i,e.thru=zr,e.times=Nu,e.toArray=Hi,e.toPlainObject=Vi,e.transform=iu,e.union=Za,e.uniq=Nr,e.unzip=Pr,e.unzipWith=Rr,e.values=uu,e.valuesIn=au,e.where=ci,e.without=Ka,e.wrap=bi,e.xor=jr,e.zip=Qa,e.zipObject=Ur,e.zipWith=Ja,e.backflow=ko,e.collect=ti,e.compose=ko,e.each=uo,e.eachRight=ao,e.extend=Fo,e.iteratee=Eu,e.methods=Zi,e.object=Ur,e.select=Kr,e.tail=Tr,e.unique=Nr,Tu(e,e),e.add=Ru,e.attempt=Ko,e.camelCase=Wo,e.capitalize=cu,e.ceil=ts,e.clone=xi,e.cloneDeep=wi,e.deburr=lu,e.endsWith=hu,e.escape=fu,e.escapeRegExp=du,e.every=Zr,e.find=ro,e.findIndex=qa,e.findKey=Lo,e.findLast=io,e.findLastIndex=Wa,e.findLastKey=Io,e.findWhere=Qr,e.first=xr,e.floor=es,e.get=Ki,e.gt=Ai,e.gte=ki,e.has=Qi,e.identity=Mu,e.includes=Jr,e.indexOf=kr,e.inRange=ou,e.isArguments=Ei,e.isArray=So,e.isBoolean=Di,e.isDate=Mi,e.isElement=Ci,e.isEmpty=Si,e.isEqual=Ti,e.isError=Fi,e.isFinite=Bi,e.isFunction=Oi,e.isMatch=Ii,e.isNaN=Ni,e.isNative=Pi,e.isNull=Ri,e.isNumber=ji,e.isObject=Li,e.isPlainObject=Ui,e.isRegExp=Yi,e.isString=$i,e.isTypedArray=zi,e.isUndefined=qi,e.kebabCase=Go,e.last=Dr,e.lastIndexOf=Mr,e.lt=Wi,e.lte=Gi,e.max=ns,e.min=rs,e.noConflict=Fu,e.noop=Bu,e.now=go,e.pad=pu,e.padLeft=Ho,e.padRight=Vo,e.parseInt=gu,e.random=su,e.reduce=ho,e.reduceRight=fo,e.repeat=yu,e.result=nu,e.round=is,e.runInContext=k,e.size=ui,e.snakeCase=Xo,e.some=ai,e.sortedIndex=Va,e.sortedLastIndex=Xa,e.startCase=Zo,e.startsWith=mu,e.sum=ju,e.template=vu,e.trim=_u,e.trimLeft=bu,e.trimRight=xu,e.trunc=wu,e.unescape=Au,e.uniqueId=Pu,e.words=ku,e.all=Zr,e.any=ai,e.contains=Jr,e.eq=Ti,e.detect=ro,e.foldl=ho,e.foldr=fo,e.head=xr,e.include=Jr,e.inject=ho,Tu(e,function(){var t={};return Fe(e,function(n,r){e.prototype[r]||(t[r]=n)}),t}(),!1),e.sample=ri,e.prototype.sample=function(t){return this.__chain__||null!=t?this.thru(function(e){return ri(e,t)}):ri(this.value())},e.VERSION=D,ee(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){e[t].placeholder=e}),ee(["drop","take"],function(t,e){K.prototype[t]=function(n){var r=this.__filtered__;if(r&&!e)return new K(this);n=null==n?1:xa(ma(n)||0,0);var i=this.clone();return r?i.__takeCount__=wa(i.__takeCount__,n):i.__views__.push({size:n,type:t+(i.__dir__<0?"Right":"")}),i},K.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),ee(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n!=$;K.prototype[t]=function(t,e){var i=this.clone();return i.__iteratees__.push({iteratee:Yn(t,e,1),type:n}),i.__filtered__=i.__filtered__||r,i}}),ee(["first","la
r._d.setTime(+r._d+i),n.updateOffset(r,!1),r):Ft(t).local()}function Ut(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Yt(t,e){var r,i=this._offset||0;return null!=t?("string"==typeof t&&(t=Rt(t)),Math.abs(t)<16&&(t=60*t),!this._isUTC&&e&&(r=Ut(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==t&&(!e||this._changeInProgress?re(this,Qt(t-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?i:Ut(this)}function $t(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function zt(t){return this.utcOffset(0,t)}function qt(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ut(this),"m")),this}function Wt(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Rt(this._i)),this}function Gt(t){return t=t?Ft(t).utcOffset():0,(this.utcOffset()-t)%60===0}function Ht(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Vt(){if("undefined"!=typeof this._isDSTShifted)return this._isDSTShifted;var t={};if(p(t,this),t=Ct(t),t._a){var e=t._isUTC?c(t._a):Ft(t._a);this._isDSTShifted=this.isValid()&&_(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Xt(){return!this._isUTC}function Zt(){return this._isUTC}function Kt(){return this._isUTC&&0===this._offset}function Qt(t,e){var n,r,i,u=t,a=null;return Nt(t)?u={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(u={},e?u[e]=t:u.milliseconds=t):(a=Mr.exec(t))?(n="-"===a[1]?-1:1,u={y:0,d:v(a[lr])*n,h:v(a[hr])*n,m:v(a[fr])*n,s:v(a[dr])*n,ms:v(a[pr])*n}):(a=Cr.exec(t))?(n="-"===a[1]?-1:1,u={y:Jt(a[2],n),M:Jt(a[3],n),d:Jt(a[4],n),h:Jt(a[5],n),m:Jt(a[6],n),s:Jt(a[7],n),w:Jt(a[8],n)}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(i=ee(Ft(u.from),Ft(u.to)),u={},u.ms=i.milliseconds,u.M=i.months),r=new It(u),Nt(t)&&o(t,"_locale")&&(r._locale=t._locale),r}function Jt(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function te(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function ee(t,e){var n;return e=jt(e,t),t.isBefore(e)?n=te(t,e):(n=te(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n}function ne(t,e){return function(n,r){var i,u;return null===r||isNaN(+r)||(rt(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),u=n,n=r,r=u),n="string"==typeof n?+n:n,i=Qt(n,r),re(this,i,t),this}}function re(t,e,r,i){var u=e._milliseconds,a=e._days,o=e._months;i=null==i?!0:i,u&&t._d.setTime(+t._d+u*r),a&&B(t,"Date",F(t,"Date")+a*r),o&&K(t,F(t,"Month")+o*r),i&&n.updateOffset(t,a||o)}function ie(t,e){var n=t||Ft(),r=jt(n,this).startOf("day"),i=this.diff(r,"days",!0),u=-6>i?"sameElse":-1>i?"lastWeek":0>i?"lastDay":1>i?"sameDay":2>i?"nextDay":7>i?"nextWeek":"sameElse";return this.format(e&&e[u]||this.localeData().calendar(u,this,Ft(n)))}function ue(){return new g(this)}function ae(t,e){var n;return e=C("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=y(t)?t:Ft(t),+this>+t):(n=y(t)?+t:+Ft(t),n<+this.clone().startOf(e))}function oe(t,e){var n;return e=C("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=y(t)?t:Ft(t),+t>+this):(n=y(t)?+t:+Ft(t),+this.clone().endOf(e)<n)}function se(t,e,n){return this.isAfter(t,n)&&this.isBefore(e,n)}function ce(t,e){var n;return e=C(e||"millisecond"),"millisecond"===e?(t=y(t)?t:Ft(t),+this===+t):(n=+Ft(t),+this.clone().startOf(e)<=n&&n<=+this.clone().endOf(e))}function le(t,e,n){var r,i,u=jt(t,this),a=6e4*(u.utcOffset()-this.utcOffset());return e=C(e),"year"===e||"month"===e||"quarter"===e?(i=he(this,u),"quarter"===e?i/=3:"year"===e&&(i/=12)):(r=this-u,i="second"===e?r/1e3:"minute"===e?r/6e4:"hour"===e?r/36e5:"day"===e?(r-a)/864e5:"week"===e?(r-a)/6048e5:r),n?i:m(i)}function he(t,e){var n,r,i=12*(e.year()-t.year())+(e.month()-t.mo
2015-10-19 22:08:17 +02:00
2015-10-30 11:34:24 +01:00
try{for(var d,p=i.values()[Symbol.iterator]();!(u=(d=p.next()).done);u=!0){var v=d.value,_=m(n,v);r.setNode(_.id,_),f.info("Org height: "+_.height)}}catch(b){a=!0,l=b}finally{try{!u&&p["return"]&&p["return"]()}finally{if(a)throw l}}var x=c.getRelations(),w=!0,A=!1,k=void 0;try{for(var E,D=x[Symbol.iterator]();!(w=(E=D.next()).done);w=!0){var M=E.value;r.setEdge(g(M.id1),g(M.id2))}}catch(b){A=!0,k=b}finally{try{!w&&D["return"]&&D["return"]()}finally{if(A)throw k}}o.layout(r),r.nodes().forEach(function(t){f.debug("Node "+t+": "+JSON.stringify(r.node(t))),h.select("#"+t).attr("transform","translate("+(r.node(t).x-r.node(t).width/2)+","+(r.node(t).y-r.node(t).height/2)+" )")}),r.edges().forEach(function(t){f.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(r.edge(t))),y(n,r.edge(t))}),n.attr("height","100%"),n.attr("width","100%")}},{"../../d3":137,"../../logger":156,"./classDb":138,"./parser/classDiagram":140,dagre:84}],140:[function(t,e,n){(function(r){"use strict";var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,11],r=[1,12],i=[1,13],u=[1,15],a=[1,16],o=[1,17],s=[6,8],c=[1,26],l=[1,27],h=[1,28],f=[1,29],d=[1,30],p=[1,31],g=[6,8,13,17,23,26,27,28,29,30,31],y=[6,8,13,17,23,26,27,28,29,30,31,45,46,47],m=[23,45,46,47],v=[23,30,31,45,46,47],_=[23,26,27,28,29,45,46,47],b=[6,8,13],x=[1,46],w={trace:function(){},yy:{},symbols_:{error:2,mermaidDoc:3,graphConfig:4,CLASS_DIAGRAM:5,NEWLINE:6,statements:7,EOF:8,statement:9,className:10,alphaNumToken:11,relationStatement:12,LABEL:13,classStatement:14,methodStatement:15,CLASS:16,STRUCT_START:17,members:18,STRUCT_STOP:19,MEMBER:20,SEPARATOR:21,relation:22,STR:23,relationType:24,lineType:25,AGGREGATION:26,EXTENSION:27,COMPOSITION:28,DEPENDENCY:29,LINE:30,DOTTED_LINE:31,commentToken:32,textToken:33,graphCodeTokens:34,textNoTagsToken:35,TAGSTART:36,TAGEND:37,"==":38,"--":39,PCT:40,DEFAULT:41,SPACE:42,MINUS:43,keywords:44,UNICODE_TEXT:45,NUM:46,ALPHA:47,$accept:0,$end:1},terminals_:{2:"error",5:"CLASS_DIAGRAM",6:"NEWLINE",8:"EOF",13:"LABEL",16:"CLASS",17:"STRUCT_START",19:"STRUCT_STOP",20:"MEMBER",21:"SEPARATOR",23:"STR",26:"AGGREGATION",27:"EXTENSION",28:"COMPOSITION",29:"DEPENDENCY",30:"LINE",31:"DOTTED_LINE",34:"graphCodeTokens",36:"TAGSTART",37:"TAGEND",38:"==",39:"--",40:"PCT",41:"DEFAULT",42:"SPACE",43:"MINUS",44:"keywords",45:"UNICODE_TEXT",46:"NUM",47:"ALPHA"},productions_:[0,[3,1],[4,4],[7,1],[7,3],[10,2],[10,1],[9,1],[9,2],[9,1],[9,1],[14,2],[14,5],[18,1],[18,2],[15,1],[15,2],[15,1],[15,1],[12,3],[12,4],[12,4],[12,5],[22,3],[22,2],[22,2],[22,1],[24,1],[24,1],[24,1],[24,1],[25,1],[25,1],[32,1],[32,1],[33,1],[33,1],[33,1],[33,1],[33,1],[33,1],[33,1],[35,1],[35,1],[35,1],[35,1],[11,1],[11,1],[11,1]],performAction:function(t,e,n,r,i,u){var a=u.length-1;switch(i){case 5:this.$=u[a-1]+u[a];break;case 6:this.$=u[a];break;case 7:r.addRelation(u[a]);break;case 8:u[a-1].title=u[a],r.addRelation(u[a-1]);break;case 12:r.addMembers(u[a-3],u[a-1]);break;case 13:this.$=[u[a]];break;case 14:u[a].push(u[a-1]),this.$=u[a];break;case 15:break;case 18:break;case 19:this.$={id1:u[a-2],id2:u[a],relation:u[a-1],relationTitle1:"none",relationTitle2:"none"};break;case 20:this.$={id1:u[a-3],id2:u[a],relation:u[a-1],relationTitle1:u[a-2],relationTitle2:"none"};break;case 21:this.$={id1:u[a-3],id2:u[a],relation:u[a-2],relationTitle1:"none",relationTitle2:u[a-1]};break;case 22:this.$={id1:u[a-4],id2:u[a],relation:u[a-2],relationTitle1:u[a-3],relationTitle2:u[a-1]};break;case 23:this.$={type1:u[a-2],type2:u[a],lineType:u[a-1]};break;case 24:this.$={type1:"none",type2:u[a],lineType:u[a-1]};break;case 25:this.$={type1:u[a-1],type2:"none",lineType:u[a]};break;case 26:this.$={type1:"none",type2:"none",lineType:u[a]};break;case 27:this.$=r.relationType.AGGREGATION;break;case 28:this.$=r.relationType.EXTENSION;break;case 29:this.$=r.relationType.COMPOSITION;break;case 30:this.$=r.relationType.DEPENDENCY;break;case 31:this.$=r.lineType.LINE;break;case 32:this.$=r.lineType.DOTTED_LINE}},table:[{3:1,4:2,5:[1,3]},{1:[3]},{1:[2,1]},{6:[1,4]},{7:5,9:6,10
r},n.draw=function(t,e,r){h.debug("Drawing flowchart");var i;a.clear(),i=r?s.parser:o.parser,i.yy=a;try{i.parse(t)}catch(u){h.debug("Parsing failed")}var d;d=a.getDirection(),"undefined"==typeof d&&(d="TD");var p,g=new l.graphlib.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:d,marginx:20,marginy:20}).setDefaultEdgeLabel(function(){return{}}),y=a.getSubGraphs(),m=0;for(m=y.length-1;m>=0;m--)p=y[m],a.addVertex(p.id,p.title,"group",void 0);var v=a.getVertices(),_=a.getEdges();m=0;var b;for(m=y.length-1;m>=0;m--)for(p=y[m],c.selectAll("cluster").append("text"),b=0;b<p.nodes.length;b++)g.setParent(p.nodes[b],p.id);n.addVertices(v,g),n.addEdges(_,g);var x=new l.render;x.shapes().question=function(t,e,n){var r=e.width,i=e.height,u=.8*(r+i),a=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("rx",5).attr("ry",5).attr("transform","translate("+-u/2+","+2*u/4+")");return n.intersect=function(t){return l.intersect.polygon(n,a,t)},o},x.shapes().rect_left_inv_arrow=function(t,e,n){var r=e.width,i=e.height,u=[{x:-i/2,y:0},{x:r,y:0},{x:r,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],a=t.insert("polygon",":first-child").attr("points",u.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return n.intersect=function(t){return l.intersect.polygon(n,u,t)},a},x.shapes().rect_right_inv_arrow=function(t,e,n){var r=e.width,i=e.height,u=[{x:0,y:0},{x:r+i/2,y:0},{x:r,y:-i/2},{x:r+i/2,y:-i},{x:0,y:-i}],a=t.insert("polygon",":first-child").attr("points",u.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return n.intersect=function(t){return l.intersect.polygon(n,u,t)},a},x.arrows().none=function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),u=i.append("path").attr("d","M 0 0 L 0 0 L 0 0 z");l.util.applyStyle(u,n[r+"Style"])};var w=c.select("#"+e),A=c.select("#"+e+" g");for(x(A,g),A.selectAll("g.node").attr("title",function(){return a.getTooltip(this.id)}),f.useMaxWidth?(w.attr("height","100%"),w.attr("width",f.width),w.attr("viewBox","0 0 "+(g.graph().width+20)+" "+(g.graph().height+20)),w.attr("style","max-width:"+(g.graph().width+20)+"px;")):(w.attr("height",g.graph().height),"undefined"==typeof f.width?w.attr("width",g.graph().width):w.attr("width",f.width),w.attr("viewBox","0 0 "+(g.graph().width+20)+" "+(g.graph().height+20))),a.indexNodes("subGraph"+m),m=0;m<y.length;m++)if(p=y[m],"undefined"!==p.title){var k=document.querySelectorAll("#"+e+" #"+p.id+" rect"),E=document.querySelectorAll("#"+e+" #"+p.id),D=k[0].x.baseVal.value,M=k[0].y.baseVal.value,C=k[0].width.baseVal.value,S=c.select(E[0]),T=S.append("text");T.attr("x",D+C/2),T.attr("y",M+14),T.attr("fill","black"),T.attr("stroke","none"),T.attr("id",e+"Text"),T.style("text-anchor","middle"),T.text("undefined"==typeof p.title?"Undef":p.title)}}},{"../../d3":137,"../../logger":156,"./dagre-d3":144,"./graphDb":146,"./parser/dot":147,"./parser/flow":148}],146:[function(require,module,exports){(function(global){"use strict";function _interopRequireWildcard(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}var _logger=require("../../logger"),Logger=_interopRequireWildcard(_logger),log=new Logger.Log,d3=require("../../d3"),vertices={},edges=[],classes=[],subGraphs=[],tooltips={},subCount=0,direction,funs=[];exports.addVertex=function(t,e,n,r){var i;"undefined"!=typeof t&&0!==t.trim().length&&("undefined"==typeof vertices[t]&&(vertices[t]={id:t,styles:[],classes:[]}),"undefined"!=typeof e&&(i=e.trim(),'"'===i[0]&&'"'===i[i.length-1]&&(i=i.substring(1,i.length-1)),vertices[t].text=i),"undefined"!=typeof n&&(vertices[t].type=n),"undefined"!=typeof n&&(vertices[t].type=n),"undefined"!=typeof r&&null!==r&&r.forEach(function(e){vertices[t].styles.push(e)}))
performAction:function(t,e,n,r,i,u){var a=u.length-1;switch(i){case 2:this.$=[];break;case 3:u[a]!==[]&&u[a-1].push(u[a]),this.$=u[a-1];break;case 4:case 57:case 59:case 60:case 92:case 94:case 95:case 108:this.$=u[a];break;case 11:r.setDirection(u[a-1]),this.$=u[a-1];break;case 12:r.setDirection("LR"),this.$=u[a-1];break;case 13:r.setDirection("RL"),this.$=u[a-1];break;case 14:r.setDirection("BT"),this.$=u[a-1];break;case 15:r.setDirection("TB"),this.$=u[a-1];break;case 30:this.$=u[a-1];break;case 31:case 32:case 33:case 34:case 35:this.$=[];break;case 36:this.$=r.addSubGraph(u[a-1],u[a-3]);break;case 37:this.$=r.addSubGraph(u[a-1],void 0);break;case 41:r.addLink(u[a-2],u[a],u[a-1]),this.$=[u[a-2],u[a]];break;case 42:this.$=[u[a]];break;case 43:this.$=u[a-3],r.addVertex(u[a-3],u[a-1],"square");break;case 44:this.$=u[a-4],r.addVertex(u[a-4],u[a-2],"square");break;case 45:this.$=u[a-5],r.addVertex(u[a-5],u[a-2],"circle");break;case 46:this.$=u[a-6],r.addVertex(u[a-6],u[a-3],"circle");break;case 47:this.$=u[a-3],r.addVertex(u[a-3],u[a-1],"ellipse");break;case 48:this.$=u[a-4],r.addVertex(u[a-4],u[a-2],"ellipse");break;case 49:this.$=u[a-3],r.addVertex(u[a-3],u[a-1],"round");break;case 50:this.$=u[a-4],r.addVertex(u[a-4],u[a-2],"round");break;case 51:this.$=u[a-3],r.addVertex(u[a-3],u[a-1],"diamond");break;case 52:this.$=u[a-4],r.addVertex(u[a-4],u[a-2],"diamond");break;case 53:this.$=u[a-3],r.addVertex(u[a-3],u[a-1],"odd");break;case 54:this.$=u[a-4],r.addVertex(u[a-4],u[a-2],"odd");break;case 55:this.$=u[a],r.addVertex(u[a]);break;case 56:this.$=u[a-1],r.addVertex(u[a-1]);break;case 58:case 93:case 96:case 109:this.$=u[a-1]+""+u[a];break;case 61:this.$="v";break;case 62:this.$="-";break;case 63:u[a-1].text=u[a],this.$=u[a-1];break;case 64:case 65:u[a-2].text=u[a-1],this.$=u[a-2];break;case 66:this.$=u[a];break;case 67:this.$={type:"arrow",stroke:"normal",text:u[a-1]};break;case 68:this.$={type:"arrow_circle",stroke:"normal",text:u[a-1]};break;case 69:this.$={type:"arrow_cross",stroke:"normal",text:u[a-1]};break;case 70:this.$={type:"arrow_open",stroke:"normal",text:u[a-1]};break;case 71:this.$={type:"arrow",stroke:"dotted",text:u[a-1]};break;case 72:this.$={type:"arrow_circle",stroke:"dotted",text:u[a-1]};break;case 73:this.$={type:"arrow_cross",stroke:"dotted",text:u[a-1]};break;case 74:this.$={type:"arrow_open",stroke:"dotted",text:u[a-1]};break;case 75:this.$={type:"arrow",stroke:"thick",text:u[a-1]};break;case 76:this.$={type:"arrow_circle",stroke:"thick",text:u[a-1]};break;case 77:this.$={type:"arrow_cross",stroke:"thick",text:u[a-1]};break;case 78:this.$={type:"arrow_open",stroke:"thick",text:u[a-1]};break;case 79:this.$={type:"arrow",stroke:"normal"};break;case 80:this.$={type:"arrow_circle",stroke:"normal"};break;case 81:this.$={type:"arrow_cross",stroke:"normal"};break;case 82:this.$={type:"arrow_open",stroke:"normal"};break;case 83:this.$={type:"arrow",stroke:"dotted"};break;case 84:this.$={type:"arrow_circle",stroke:"dotted"};break;case 85:this.$={type:"arrow_cross",stroke:"dotted"};break;case 86:this.$={type:"arrow_open",stroke:"dotted"};break;case 87:this.$={type:"arrow",stroke:"thick"};break;case 88:this.$={type:"arrow_circle",stroke:"thick"};break;case 89:this.$={type:"arrow_cross",stroke:"thick"};break;case 90:this.$={type:"arrow_open",stroke:"thick"};break;case 91:this.$=u[a-1];break;case 110:case 111:this.$=u[a-4],r.addClass(u[a-2],u[a]);break;case 112:this.$=u[a-4],r.setClass(u[a-2],u[a]);break;case 113:this.$=u[a-4],r.setClickEvent(u[a-2],u[a],void 0,void 0);break;case 114:this.$=u[a-6],r.setClickEvent(u[a-4],u[a-2],void 0,u[a]);break;case 115:this.$=u[a-4],r.setClickEvent(u[a-2],void 0,u[a],void 0);break;case 116:this.$=u[a-6],r.setClickEvent(u[a-4],void 0,u[a-2],u[a]);break;case 117:this.$=u[a-4],r.addVertex(u[a-2],void 0,void 0,u[a]);break;case 118:case 119:case 120:this.$=u[a-4],r.updateLink(u[a-2],u[a]);break;case 122:this.$=[u[a]];break;case 123:u[a-2].push(u[a]),this.$=u[a-2];break;case 125:this.$=u[a-1]+u[a]}},table:[{3:1,4:2,9:n,10:r,12:i},{1:[3]},e(u,a,{5:6}),{4:7,9:n,10:r,12:i},{4:8,9:n,10:
x[t].endTime&&(x[t].processed=!0)),x[t].processed},i=!0;for(t=0;t<x.length;t++)r(t),i=i&&x[t].processed;return i};n.parseError=function(t,n){e.mermaidAPI.parseError(t,n)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../logger":156,moment:135}],150:[function(t,e){"use strict";var n=t("./parser/gantt").parser;n.yy=t("./ganttDb");var r,i=t("../../d3"),u=t("moment"),a={titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,sidePadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"'};e.exports.setConf=function(t){var e=Object.keys(t);e.forEach(function(e){a[e]=t[e]})};var o;e.exports.draw=function(t,e){function s(t,e,n){var r=a.barHeight,u=r+a.barGap,o=a.topPadding,s=a.sidePadding,d=i.scale.linear().domain([0,A.length]).range(["#00B9FA","#F95002"]).interpolate(i.interpolateHcl);l(s,o,e,n),c(t,u,o,s,r,d,e,n),h(u,o,s,r,d),f(s,o,e,n)}function c(t,e,n,r,i,u,o){_.append("g").selectAll("rect").data(t).enter().append("rect").attr("x",0).attr("y",function(t,r){return r*e+n-2}).attr("width",function(){return o-r/2}).attr("height",e).attr("class",function(t){for(var e=0;e<A.length;e++)if(t.type===A[e])return"section section"+e%a.numberSectionStyles;return"section section0"});var s=_.append("g").selectAll("rect").data(t).enter();s.append("rect").attr("rx",3).attr("ry",3).attr("x",function(t){return w(t.startTime)+r}).attr("y",function(t,r){return r*e+n}).attr("width",function(t){return w(t.endTime)-w(t.startTime)}).attr("height",i).attr("class",function(t){for(var e="task ",n=0,r=0;r<A.length;r++)t.type===A[r]&&(n=r%a.numberSectionStyles);return t.active?t.crit?e+" activeCrit"+n:e+" active"+n:t.done?t.crit?e+" doneCrit"+n:e+" done"+n:t.crit?e+" crit"+n:e+" task"+n}),s.append("text").text(function(t){return t.task}).attr("font-size",a.fontSize).attr("x",function(t){var e=w(t.startTime),n=w(t.endTime),i=this.getBBox().width;return i>n-e?n+i+1.5*a.sidePadding>o?e+r-5:n+r+5:(n-e)/2+e+r}).attr("y",function(t,r){return r*e+a.barHeight/2+(a.fontSize/2-2)+n}).attr("text-height",i).attr("class",function(t){for(var e=w(t.startTime),n=w(t.endTime),r=this.getBBox().width,i=0,u=0;u<A.length;u++)t.type===A[u]&&(i=u%a.numberSectionStyles);var s="";return t.active&&(s=t.crit?"activeCritText"+i:"activeText"+i),t.done?s=t.crit?s+" doneCritText"+i:s+" doneText"+i:t.crit&&(s=s+" critText"+i),r>n-e?n+r+1.5*a.sidePadding>o?"taskTextOutsideLeft taskTextOutside"+i+" "+s:"taskTextOutsideRight taskTextOutside"+i+" "+s:"taskText taskText"+i+" "+s})}function l(t,e,n,u){var o,s=[[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["h1 %I:%M",function(t){return t.getMinutes()}]],c=[["%Y",function(){return!0}]],l=[["%I:%M",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}]];"undefined"!=typeof a.axisFormatter&&(l=[],a.axisFormatter.forEach(function(t){var e=[];e[0]=t[0],e[1]=t[1],l.push(e)})),o=s.concat(l).concat(c);var h=i.svg.axis().scale(w).orient("bottom").tickSize(-u+e+a.gridLineStartPadding,0,0).tickFormat(i.time.format.multi(o));r>7&&230>r&&(h=h.ticks(i.time.monday.range)),_.append("g").attr("class","grid").attr("transform","translate("+t+", "+(u-50)+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em")}function h(t,e){for(var n=[],r=0,i=0;i<A.length;i++)n[i]=[A[i],g(A[i],E)];_.append("g").selectAll("text").data(n).enter().append("text").text(function(t){return t[0]}).attr("x",10).attr("y",function(i,u){if(!(u>0))return i[1]*t/2+e;for(var a=0;u>a;a++)return r+=n[u-1][1],i[1]*t/2+r*t+e}).attr("class",function(t){for(var e=0;e<A.length;e++)if(t[0]===A[e])return"sectionTitle sectionTitle"+e%a.numberSectionStyles;return"sectionTitle"})}function f(t,e,n,r){var i=_.append("g").attr("class","today"),u=new Date;i.append("line").attr("x1",w(u)+t).attr("x2",w(u)+t).attr("y1",a.titleTopMargin).attr("y2",r-a.titleTopMargin
title:t})},endLoop:function(){var t=this.list.pop();return t},addElseToLoop:function(t){var e=this.list.pop();e.elsey=n.bounds.getVerticalPos(),e.elseText=t,this.list.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}};var h=function(t,e,r,i){var u=o.getNoteRect();u.x=e,u.y=r,u.width=l.width,u["class"]="note";var a=t.append("g"),s=o.drawRect(a,u),c=o.getTextObj();c.x=e-4,c.y=r-13,c.textMargin=l.noteMargin,c.dy="1em",c.text=i.message,c["class"]="noteText";var h=o.drawText(a,c,l.width-l.noteMargin),f=h[0][0].getBBox().height;f>l.width?(h.remove(),a=t.append("g"),h=o.drawText(a,c,2*l.width-l.noteMargin),f=h[0][0].getBBox().height,s.attr("width",2*l.width),n.bounds.insert(e,r,e+2*l.width,r+2*l.noteMargin+f)):n.bounds.insert(e,r,e+l.width,r+2*l.noteMargin+f),s.attr("height",f+2*l.noteMargin),n.bounds.bumpVerticalPos(f+2*l.noteMargin)},f=function(t,e,r,i,u){var o,s=t.append("g"),c=e+(r-e)/2,l=s.append("text").attr("x",c).attr("y",i-7).style("text-anchor","middle").attr("class","messageText").text(u.message);o="undefined"!=typeof l[0][0].getBBox?l[0][0].getBBox().width:l[0][0].getBoundingClientRect();var h;if(e===r){h=s.append("path").attr("d","M "+e+","+i+" C "+(e+60)+","+(i-10)+" "+(e+60)+","+(i+30)+" "+e+","+(i+20)),n.bounds.bumpVerticalPos(30);var f=Math.max(o/2,100);n.bounds.insert(e-f,n.bounds.getVerticalPos()-10,r+f,n.bounds.getVerticalPos())}else h=s.append("line"),h.attr("x1",e),h.attr("y1",i),h.attr("x2",r),h.attr("y2",i),n.bounds.insert(e,n.bounds.getVerticalPos()-10,r,n.bounds.getVerticalPos());u.type===a.yy.LINETYPE.DOTTED||u.type===a.yy.LINETYPE.DOTTED_CROSS||u.type===a.yy.LINETYPE.DOTTED_OPEN?(h.style("stroke-dasharray","3, 3"),h.attr("class","messageLine1")):h.attr("class","messageLine0");var d=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search;d=d.replace(/\(/g,"\\("),d=d.replace(/\)/g,"\\)"),h.attr("stroke-width",2),h.attr("stroke","black"),h.style("fill","none"),(u.type===a.yy.LINETYPE.SOLID||u.type===a.yy.LINETYPE.DOTTED)&&h.attr("marker-end","url("+d+"#arrowhead)"),(u.type===a.yy.LINETYPE.SOLID_CROSS||u.type===a.yy.LINETYPE.DOTTED_CROSS)&&h.attr("marker-end","url("+d+"#crosshead)")};e.exports.drawActors=function(t,e,r,i){var u;for(u=0;u<r.length;u++){var a=r[u];e[a].x=u*l.actorMargin+u*l.width,e[a].y=i,e[a].width=l.diagramMarginY,e[a].height=l.diagramMarginY,o.drawActor(t,e[a].x,i,e[a].description,l),n.bounds.insert(e[a].x,i,e[a].x+l.width,l.height)}n.bounds.bumpVerticalPos(l.height)},e.exports.setConf=function(t){var e=Object.keys(t);e.forEach(function(e){l[e]=t[e]})},e.exports.draw=function(t,r){a.yy.clear(),a.parse(t+"\n"),n.bounds.init();var i,u,d=s.select("#"+r),p=a.yy.getActors(),g=a.yy.getActorKeys(),y=a.yy.getMessages();e.exports.drawActors(d,p,g,0),o.insertArrowHead(d),o.insertArrowCrossHead(d),y.forEach(function(t){var e;switch(t.type){case a.yy.LINETYPE.NOTE:n.bounds.bumpVerticalPos(l.boxMargin),i=p[t.from].x,u=p[t.to].x,0!==t.placement?h(d,i+(l.width+l.actorMargin)/2,n.bounds.getVerticalPos(),t):h(d,i-(l.width+l.actorMargin)/2,n.bounds.getVerticalPos(),t);break;case a.yy.LINETYPE.LOOP_START:n.bounds.bumpVerticalPos(l.boxMargin),n.bounds.newLoop(t.message),n.bounds.bumpVerticalPos(l.boxMargin+l.boxTextMargin);break;case a.yy.LINETYPE.LOOP_END:e=n.bounds.endLoop(),o.drawLoop(d,e,"loop",l),n.bounds.bumpVerticalPos(l.boxMargin);break;case a.yy.LINETYPE.OPT_START:n.bounds.bumpVerticalPos(l.boxMargin),n.bounds.newLoop(t.message),n.bounds.bumpVerticalPos(l.boxMargin+l.boxTextMargin);break;case a.yy.LINETYPE.OPT_END:e=n.bounds.endLoop(),o.drawLoop(d,e,"opt",l),n.bounds.bumpVerticalPos(l.boxMargin);break;case a.yy.LINETYPE.ALT_START:n.bounds.bumpVerticalPos(l.boxMargin),n.bounds.newLoop(t.message),n.bounds.bumpVerticalPos(l.boxMargin+l.boxTextMargin);break;case a.yy.LINETYPE.ALT_ELSE:n.bounds.bumpVerticalPos(l.boxMargin),e=n.bounds.addElseToLoop(t.message),n.bounds.bumpVerticalPos(l.boxMargin);break;case a.yy.LIN