mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
20 lines
422 KiB
JavaScript
20 lines
422 KiB
JavaScript
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n;"undefined"!=typeof window?n=window:"undefined"!=typeof global?n=global:"undefined"!=typeof self&&(n=self),n.mermaidAPI=t()}}(function(){var define,module,exports;return function t(n,e,r){function i(o,u){if(!e[o]){if(!n[o]){var s="function"==typeof require&&require;if(!u&&s)return s(o,!0);if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var l=e[o]={exports:{}};n[o][0].call(l.exports,function(t){var e=n[o][1][t];return i(e?e:t)},l,l.exports,t,n,e,r)}return e[o].exports}for(var a="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(){},{}],2:[function(t,n,e){(function(t){function n(t,n){for(var e=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),e++):e&&(t.splice(r,1),e--)}if(n)for(;e--;e)t.unshift("..");return t}function r(t,n){if(t.filter)return t.filter(n);for(var e=[],r=0;r<t.length;r++)n(t[r],r,t)&&e.push(t[r]);return e}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a=function(t){return i.exec(t).slice(1)};e.resolve=function(){for(var e="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o=a>=0?arguments[a]:t.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(e=o+"/"+e,i="/"===o.charAt(0))}return e=n(r(e.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+e||"."},e.normalize=function(t){var i=e.isAbsolute(t),a="/"===o(t,-1);return t=n(r(t.split("/"),function(t){return!!t}),!i).join("/"),t||i||(t="."),t&&a&&(t+="/"),(i?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(r(t,function(t){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},e.relative=function(t,n){function r(t){for(var n=0;n<t.length&&""===t[n];n++);for(var e=t.length-1;e>=0&&""===t[e];e--);return n>e?[]:t.slice(n,e-n+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var i=r(t.split("/")),a=r(n.split("/")),o=Math.min(i.length,a.length),u=o,s=0;o>s;s++)if(i[s]!==a[s]){u=s;break}for(var c=[],s=u;s<i.length;s++)c.push("..");return c=c.concat(a.slice(u)),c.join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){var n=a(t),e=n[0],r=n[1];return e||r?(r&&(r=r.substr(0,r.length-1)),e+r):"."},e.basename=function(t,n){var e=a(t)[2];return n&&e.substr(-1*n.length)===n&&(e=e.substr(0,e.length-n.length)),e},e.extname=function(t){return a(t)[3]};var o="b"==="ab".substr(-1)?function(t,n,e){return t.substr(n,e)}:function(t,n,e){return 0>n&&(n=t.length+n),t.substr(n,e)}}).call(this,t("_process"))},{_process:3}],3:[function(t,n){function e(){}var r=n.exports={};r.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,n="undefined"!=typeof window&&window.MutationObserver,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};var r=[];if(n){var i=document.createElement("div"),a=new MutationObserver(function(){var t=r.slice();r.length=0,t.forEach(function(t){t()})});return a.observe(i,{attributes:!0}),function(t){r.length||i.setAttribute("yes","no"),r.push(t)}}return e?(window.addEventListener("message",function(t){var n=t.source;if((n===window||null===n)&&"process-tick"===t.data&&(t.stopPropagation(),r.length>0)){var e=r.shift();e()}},!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=e,r.addListener=e,r.once=e,r.off=e,r.removeListener=e,r.removeAllListeners=e,r.emit=e,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,n){!function(){function t(t){return t&&(t.ownerDocument||t.document||t).documentElement}function e(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}function r(t,n){return n>t?-1:t>n?1:t>=n?0:0/0}function i(t){return null===t?0/0:+t}function a(t){return!isNaN(t)}function o(t){return{left:function(n,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=n.length);i>r;){var a=r+i>>>1;t(n[a],e)<0?r=a+1:i=a}return r},right:function(n,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=n.length);i>r;){var a=r+i>>>1;t(n[a],e)>0?i=a:r=a+1}return r}}}function u(t){return t.length}function s(t){for(var n=1;t*n%1;)n*=10;return n}function c(t,n){for(var e in n)Object.defineProperty(t.prototype,e,{value:n[e],enumerable:!1})}function l(){this._=Object.create(null)}function h(t){return(t+="")===yo||t[0]===mo?mo+t:t}function f(t){return(t+="")[0]===mo?t.slice(1):t}function d(t){return h(t)in this._}function p(t){return(t=h(t))in this._&&delete this._[t]}function g(){var t=[];for(var n in this._)t.push(f(n));return t}function y(){var t=0;for(var n in this._)++t;return t}function m(){for(var t in this._)return!1;return!0}function v(){this._=Object.create(null)}function _(t){return t}function b(t,n,e){return function(){var r=e.apply(n,arguments);return r===n?t:r}}function x(t,n){if(n in t)return n;n=n.charAt(0).toUpperCase()+n.slice(1);for(var e=0,r=vo.length;r>e;++e){var i=vo[e]+n;if(i in t)return i}}function w(){}function k(){}function A(t){function n(){for(var n,r=e,i=-1,a=r.length;++i<a;)(n=r[i].on)&&n.apply(this,arguments);return t}var e=[],r=new l;return n.on=function(n,i){var a,o=r.get(n);return arguments.length<2?o&&o.on:(o&&(o.on=null,e=e.slice(0,a=e.indexOf(o)).concat(e.slice(a+1)),r.remove(n)),i&&e.push(r.set(n,{on:i})),t)},n}function E(){eo.event.preventDefault()}function M(){for(var t,n=eo.event;t=n.sourceEvent;)n=t;return n}function D(t){for(var n=new k,e=0,r=arguments.length;++e<r;)n[arguments[e]]=A(n);return n.of=function(e,r){return function(i){try{var a=i.sourceEvent=eo.event;i.target=t,eo.event=i,n[i.type].apply(e,r)}finally{eo.event=a}}},n}function S(t){return bo(t,Ao),t}function T(t){return"function"==typeof t?t:function(){return xo(t,this)}}function C(t){return"function"==typeof t?t:function(){return wo(t,this)}}function F(t,n){function e(){this.removeAttribute(t)}function r(){this.removeAttributeNS(t.space,t.local)}function i(){this.setAttribute(t,n)}function a(){this.setAttributeNS(t.space,t.local,n)}function o(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}function u(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}return t=eo.ns.qualify(t),null==n?t.local?r:e:"function"==typeof n?t.local?u:o:t.local?a:i}function O(t){return t.trim().replace(/\s+/g," ")}function L(t){return new RegExp("(?:^|\\s+)"+eo.requote(t)+"(?:\\s+|$)","g")}function I(t){return(t+"").trim().split(/^|\s+/)}function N(t,n){function e(){for(var e=-1;++e<i;)t[e](this,n)}function r(){for(var e=-1,r=n.apply(this,arguments);++e<i;)t[e](this,r)}t=I(t).map(P);var i=t.length;return"function"==typeof n?r:e}function P(t){var n=L(t);return function(e,r){if(i=e.classList)return r?i.add(t):i.remove(t);var i=e.getAttribute("class")||"";r?(n.lastIndex=0,n.test(i)||e.setAttribute("class",O(i+" "+t))):e.setAttribute("class",O(i.replace(n," ")))}}function B(t,n,e){function r(){this.style.removeProperty(t)}function i(){this.style.setProperty(t,n,e)}function a(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}return null==n?r:"function"==typeof n?a:i}function R(t,n){function e(){delete this[t]}function r(){this[t]=n}function i(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}return null==n?e:"function"==typeof n?i:r}function j(t){function n(){var n=this.ownerDocument,e=this.namespaceURI;return e?n.createElementNS(e,t):n.createElement(t)}function e(){return this.ownerDocument.createElementNS(t.space,t.local)}return"function"==typeof t?t:(t=eo.ns.qualify(t)).local?e:n}function Y(){var t=this.parentNode;t&&t.removeChild(this)}function U(t){return{__data__:t}}function $(t){return function(){return ko(this,t)}}function z(t){return arguments.length||(t=r),function(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}}function q(t,n){for(var e=0,r=t.length;r>e;e++)for(var i,a=t[e],o=0,u=a.length;u>o;o++)(i=a[o])&&n(i,o,e);return t}function W(t){return bo(t,Mo),t}function H(t){var n,e;return function(r,i,a){var o,u=t[a].update,s=u.length;for(a!=e&&(e=a,n=0),i>=n&&(n=i+1);!(o=u[n])&&++n<s;);return o}}function G(t,n,e){function r(){var n=this[o];n&&(this.removeEventListener(t,n,n.$),delete this[o])}function i(){var i=s(n,io(arguments));r.call(this),this.addEventListener(t,this[o]=i,i.$=e),i._=n}function a(){var n,e=new RegExp("^__on([^.]+)"+eo.requote(t)+"$");for(var r in this)if(n=r.match(e)){var i=this[r];this.removeEventListener(n[1],i,i.$),delete this[r]}}var o="__on"+t,u=t.indexOf("."),s=V;u>0&&(t=t.slice(0,u));var c=Do.get(t);return c&&(t=c,s=Z),u?n?i:r:n?w:a}function V(t,n){return function(e){var r=eo.event;eo.event=e,n[0]=this.__data__;try{t.apply(this,n)}finally{eo.event=r}}}function Z(t,n){var e=V(t,n);return function(t){var n=this,r=t.relatedTarget;r&&(r===n||8&r.compareDocumentPosition(n))||e.call(n,t)}}function X(n){var r=".dragsuppress-"+ ++To,i="click"+r,a=eo.select(e(n)).on("touchmove"+r,E).on("dragstart"+r,E).on("selectstart"+r,E);if(null==So&&(So="onselectstart"in n?!1:x(n.style,"userSelect")),So){var o=t(n).style,u=o[So];o[So]="none"}return function(t){if(a.on(r,null),So&&(o[So]=u),t){var n=function(){a.on(i,null)};a.on(i,function(){E(),n()},!0),setTimeout(n,0)}}}function K(t,n){n.changedTouches&&(n=n.changedTouches[0]);var r=t.ownerSVGElement||t;if(r.createSVGPoint){var i=r.createSVGPoint();if(0>Co){var a=e(t);if(a.scrollX||a.scrollY){r=eo.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=r[0][0].getScreenCTM();Co=!(o.f||o.e),r.remove()}}return Co?(i.x=n.pageX,i.y=n.pageY):(i.x=n.clientX,i.y=n.clientY),i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}var u=t.getBoundingClientRect();return[n.clientX-u.left-t.clientLeft,n.clientY-u.top-t.clientTop]}function Q(){return eo.event.changedTouches[0].identifier}function J(t){return t>0?1:0>t?-1:0}function tt(t,n,e){return(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])}function nt(t){return t>1?0:-1>t?Lo:Math.acos(t)}function et(t){return t>1?Po:-1>t?-Po:Math.asin(t)}function rt(t){return((t=Math.exp(t))-1/t)/2}function it(t){return((t=Math.exp(t))+1/t)/2}function at(t){return((t=Math.exp(2*t))-1)/(t+1)}function ot(t){return(t=Math.sin(t/2))*t}function ut(){}function st(t,n,e){return this instanceof st?(this.h=+t,this.s=+n,void(this.l=+e)):arguments.length<2?t instanceof st?new st(t.h,t.s,t.l):wt(""+t,kt,st):new st(t,n,e)}function ct(t,n,e){function r(t){return t>360?t-=360:0>t&&(t+=360),60>t?a+(o-a)*t/60:180>t?o:240>t?a+(o-a)*(240-t)/60:a}function i(t){return Math.round(255*r(t))}var a,o;return t=isNaN(t)?0:(t%=360)<0?t+360:t,n=isNaN(n)?0:0>n?0:n>1?1:n,e=0>e?0:e>1?1:e,o=.5>=e?e*(1+n):e+n-e*n,a=2*e-o,new vt(i(t+120),i(t),i(t-120))}function lt(t,n,e){return this instanceof lt?(this.h=+t,this.c=+n,void(this.l=+e)):arguments.length<2?t instanceof lt?new lt(t.h,t.c,t.l):t instanceof ft?pt(t.l,t.a,t.b):pt((t=At((t=eo.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new lt(t,n,e)}function ht(t,n,e){return isNaN(t)&&(t=0),isNaN(n)&&(n=0),new ft(e,Math.cos(t*=Bo)*n,Math.sin(t)*n)}function ft(t,n,e){return this instanceof ft?(this.l=+t,this.a=+n,void(this.b=+e)):arguments.length<2?t instanceof ft?new ft(t.l,t.a,t.b):t instanceof lt?ht(t.h,t.c,t.l):At((t=vt(t)).r,t.g,t.b):new ft(t,n,e)}function dt(t,n,e){var r=(t+16)/116,i=r+n/500,a=r-e/200;return i=gt(i)*Vo,r=gt(r)*Zo,a=gt(a)*Xo,new vt(mt(3.2404542*i-1.5371385*r-.4985314*a),mt(-.969266*i+1.8760108*r+.041556*a),mt(.0556434*i-.2040259*r+1.0572252*a))}function pt(t,n,e){return t>0?new lt(Math.atan2(e,n)*Ro,Math.sqrt(n*n+e*e),t):new lt(0/0,0/0,t)}function gt(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function yt(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function mt(t){return Math.round(255*(.00304>=t?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function vt(t,n,e){return this instanceof vt?(this.r=~~t,this.g=~~n,void(this.b=~~e)):arguments.length<2?t instanceof vt?new vt(t.r,t.g,t.b):wt(""+t,vt,ct):new vt(t,n,e)}function _t(t){return new vt(t>>16,t>>8&255,255&t)}function bt(t){return _t(t)+""}function xt(t){return 16>t?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function wt(t,n,e){t=t.toLowerCase();var r,i,a,o=0,u=0,s=0;if(r=/([a-z]+)\((.*)\)/.exec(t))switch(i=r[2].split(","),r[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return n(Mt(i[0]),Mt(i[1]),Mt(i[2]))}return(a=Jo.get(t))?n(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&a)>>4,o=o>>4|o,u=240&a,u=u>>4|u,s=15&a,s=s<<4|s):7===t.length&&(o=(16711680&a)>>16,u=(65280&a)>>8,s=255&a)),n(o,u,s))}function kt(t,n,e){var r,i,a=Math.min(t/=255,n/=255,e/=255),o=Math.max(t,n,e),u=o-a,s=(o+a)/2;return u?(i=.5>s?u/(o+a):u/(2-o-a),r=t==o?(n-e)/u+(e>n?6:0):n==o?(e-t)/u+2:(t-n)/u+4,r*=60):(r=0/0,i=s>0&&1>s?0:r),new st(r,i,s)}function At(t,n,e){t=Et(t),n=Et(n),e=Et(e);var r=yt((.4124564*t+.3575761*n+.1804375*e)/Vo),i=yt((.2126729*t+.7151522*n+.072175*e)/Zo),a=yt((.0193339*t+.119192*n+.9503041*e)/Xo);return ft(116*i-16,500*(r-i),200*(i-a))}function Et(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Mt(t){var n=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*n):n}function Dt(t){return"function"==typeof t?t:function(){return t}}function St(t){return function(n,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Tt(n,e,t,r)}}function Tt(t,n,e,r){function i(){var t,n=s.status;if(!n&&Ft(s)||n>=200&&300>n||304===n){try{t=e.call(a,s)}catch(r){return void o.error.call(a,r)}o.load.call(a,t)}else o.error.call(a,s)}var a={},o=eo.dispatch("beforesend","progress","load","error"),u={},s=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in s||!/^(http(s)?:)?\/\//.test(t)||(s=new XDomainRequest),"onload"in s?s.onload=s.onerror=i:s.onreadystatechange=function(){s.readyState>3&&i()},s.onprogress=function(t){var n=eo.event;eo.event=t;try{o.progress.call(a,s)}finally{eo.event=n}},a.header=function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?u[t]:(null==n?delete u[t]:u[t]=n+"",a)},a.mimeType=function(t){return arguments.length?(n=null==t?null:t+"",a):n},a.responseType=function(t){return arguments.length?(c=t,a):c},a.response=function(t){return e=t,a},["get","post"].forEach(function(t){a[t]=function(){return a.send.apply(a,[t].concat(io(arguments)))}}),a.send=function(e,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),s.open(e,t,!0),null==n||"accept"in u||(u.accept=n+",*/*"),s.setRequestHeader)for(var l in u)s.setRequestHeader(l,u[l]);return null!=n&&s.overrideMimeType&&s.overrideMimeType(n),null!=c&&(s.responseType=c),null!=i&&a.on("error",i).on("load",function(t){i(null,t)}),o.beforesend.call(a,s),s.send(null==r?null:r),a},a.abort=function(){return s.abort(),a},eo.rebind(a,o,"on"),null==r?a:a.get(Ct(r))}function Ct(t){return 1===t.length?function(n,e){t(null==n?e:null)}:t}function Ft(t){var n=t.responseType;return n&&"text"!==n?t.response:t.responseText}function Ot(){var t=Lt(),n=It()-t;n>24?(isFinite(n)&&(clearTimeout(ru),ru=setTimeout(Ot,n)),eu=0):(eu=1,au(Ot))}function Lt(){var t=Date.now();for(iu=tu;iu;)t>=iu.t&&(iu.f=iu.c(t-iu.t)),iu=iu.n;return t}function It(){for(var t,n=tu,e=1/0;n;)n.f?n=t?t.n=n.n:tu=n.n:(n.t<e&&(e=n.t),n=(t=n).n);return nu=t,e}function Nt(t,n){return n-(t?Math.ceil(Math.log(t)/Math.LN10):1)}function Pt(t,n){var e=Math.pow(10,3*go(8-n));return{scale:n>8?function(t){return t/e}:function(t){return t*e},symbol:t}}function Bt(t){var n=t.decimal,e=t.thousands,r=t.grouping,i=t.currency,a=r&&e?function(t,n){for(var i=t.length,a=[],o=0,u=r[0],s=0;i>0&&u>0&&(s+u+1>n&&(u=Math.max(1,n-s)),a.push(t.substring(i-=u,i+u)),!((s+=u+1)>n));)u=r[o=(o+1)%r.length];return a.reverse().join(e)}:_;return function(t){var e=uu.exec(t),r=e[1]||" ",o=e[2]||">",u=e[3]||"-",s=e[4]||"",c=e[5],l=+e[6],h=e[7],f=e[8],d=e[9],p=1,g="",y="",m=!1,v=!0;switch(f&&(f=+f.substring(1)),(c||"0"===r&&"="===o)&&(c=r="0",o="="),d){case"n":h=!0,d="g";break;case"%":p=100,y="%",d="f";break;case"p":p=100,y="%",d="r";break;case"b":case"o":case"x":case"X":"#"===s&&(g="0"+d.toLowerCase());case"c":v=!1;case"d":m=!0,f=0;break;case"s":p=-1,d="r"}"$"===s&&(g=i[0],y=i[1]),"r"!=d||f||(d="g"),null!=f&&("g"==d?f=Math.max(1,Math.min(21,f)):("e"==d||"f"==d)&&(f=Math.max(0,Math.min(20,f)))),d=su.get(d)||Rt;var _=c&&h;return function(t){var e=y;if(m&&t%1)return"";var i=0>t||0===t&&0>1/t?(t=-t,"-"):"-"===u?"":u;if(0>p){var s=eo.formatPrefix(t,f);t=s.scale(t),e=s.symbol+y}else t*=p;t=d(t,f);var b,x,w=t.lastIndexOf(".");if(0>w){var k=v?t.lastIndexOf("e"):-1;0>k?(b=t,x=""):(b=t.substring(0,k),x=t.substring(k))}else b=t.substring(0,w),x=n+t.substring(w+1);!c&&h&&(b=a(b,1/0));var A=g.length+b.length+x.length+(_?0:i.length),E=l>A?new Array(A=l-A+1).join(r):"";return _&&(b=a(E+b,E.length?l-x.length:1/0)),i+=g,t=b+x,("<"===o?i+t+E:">"===o?E+i+t:"^"===o?E.substring(0,A>>=1)+i+t+E.substring(A):i+(_?t:E+t))+e}}}function Rt(t){return t+""}function jt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Yt(t,n,e){function r(n){var e=t(n),r=a(e,1);return r-n>n-e?e:r}function i(e){return n(e=t(new lu(e-1)),1),e}function a(t,e){return n(t=new lu(+t),e),t}function o(t,r,a){var o=i(t),u=[];if(a>1)for(;r>o;)e(o)%a||u.push(new Date(+o)),n(o,1);else for(;r>o;)u.push(new Date(+o)),n(o,1);return u}function u(t,n,e){try{lu=jt;var r=new jt;return r._=t,o(r,n,e)}finally{lu=Date}}t.floor=t,t.round=r,t.ceil=i,t.offset=a,t.range=o;var s=t.utc=Ut(t);return s.floor=s,s.round=Ut(r),s.ceil=Ut(i),s.offset=Ut(a),s.range=u,t}function Ut(t){return function(n,e){try{lu=jt;var r=new jt;return r._=n,t(r,e)._}finally{lu=Date}}}function $t(t){function n(t){function n(n){for(var e,i,a,o=[],u=-1,s=0;++u<r;)37===t.charCodeAt(u)&&(o.push(t.slice(s,u)),null!=(i=fu[e=t.charAt(++u)])&&(e=t.charAt(++u)),(a=S[e])&&(e=a(n,null==i?"e"===e?" ":"0":i)),o.push(e),s=u+1);return o.push(t.slice(s,u)),o.join("")}var r=t.length;return n.parse=function(n){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},i=e(r,t,n,0);if(i!=n.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var a=null!=r.Z&&lu!==jt,o=new(a?jt:lu);return"j"in r?o.setFullYear(r.y,0,r.j):"w"in r&&("W"in r||"U"in r)?(o.setFullYear(r.y,0,1),o.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(o.getDay()+5)%7:r.w+7*r.U-(o.getDay()+6)%7)):o.setFullYear(r.y,r.m,r.d),o.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),a?o._:o},n.toString=function(){return t},n}function e(t,n,e,r){for(var i,a,o,u=0,s=n.length,c=e.length;s>u;){if(r>=c)return-1;if(i=n.charCodeAt(u++),37===i){if(o=n.charAt(u++),a=T[o in fu?n.charAt(u++):o],!a||(r=a(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function r(t,n,e){w.lastIndex=0;var r=w.exec(n.slice(e));return r?(t.w=k.get(r[0].toLowerCase()),e+r[0].length):-1}function i(t,n,e){b.lastIndex=0;var r=b.exec(n.slice(e));return r?(t.w=x.get(r[0].toLowerCase()),e+r[0].length):-1}function a(t,n,e){M.lastIndex=0;var r=M.exec(n.slice(e));return r?(t.m=D.get(r[0].toLowerCase()),e+r[0].length):-1}function o(t,n,e){A.lastIndex=0;var r=A.exec(n.slice(e));return r?(t.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function u(t,n,r){return e(t,S.c.toString(),n,r)}function s(t,n,r){return e(t,S.x.toString(),n,r)}function c(t,n,r){return e(t,S.X.toString(),n,r)}function l(t,n,e){var r=_.get(n.slice(e,e+=2).toLowerCase());return null==r?-1:(t.p=r,e)}var h=t.dateTime,f=t.date,d=t.time,p=t.periods,g=t.days,y=t.shortDays,m=t.months,v=t.shortMonths;n.utc=function(t){function e(t){try{lu=jt;var n=new lu;return n._=t,r(n)}finally{lu=Date}}var r=n(t);return e.parse=function(t){try{lu=jt;var n=r.parse(t);return n&&n._}finally{lu=Date}},e.toString=r.toString,e},n.multi=n.utc.multi=cn;var _=eo.map(),b=qt(g),x=Wt(g),w=qt(y),k=Wt(y),A=qt(m),E=Wt(m),M=qt(v),D=Wt(v);p.forEach(function(t,n){_.set(t.toLowerCase(),n)});var S={a:function(t){return y[t.getDay()]},A:function(t){return g[t.getDay()]},b:function(t){return v[t.getMonth()]},B:function(t){return m[t.getMonth()]},c:n(h),d:function(t,n){return zt(t.getDate(),n,2)},e:function(t,n){return zt(t.getDate(),n,2)},H:function(t,n){return zt(t.getHours(),n,2)},I:function(t,n){return zt(t.getHours()%12||12,n,2)},j:function(t,n){return zt(1+cu.dayOfYear(t),n,3)},L:function(t,n){return zt(t.getMilliseconds(),n,3)},m:function(t,n){return zt(t.getMonth()+1,n,2)},M:function(t,n){return zt(t.getMinutes(),n,2)},p:function(t){return p[+(t.getHours()>=12)]},S:function(t,n){return zt(t.getSeconds(),n,2)},U:function(t,n){return zt(cu.sundayOfYear(t),n,2)},w:function(t){return t.getDay()},W:function(t,n){return zt(cu.mondayOfYear(t),n,2)},x:n(f),X:n(d),y:function(t,n){return zt(t.getFullYear()%100,n,2)},Y:function(t,n){return zt(t.getFullYear()%1e4,n,4)},Z:un,"%":function(){return"%"}},T={a:r,A:i,b:a,B:o,c:u,d:tn,e:tn,H:en,I:en,j:nn,L:on,m:Jt,M:rn,p:l,S:an,U:Gt,w:Ht,W:Vt,x:s,X:c,y:Xt,Y:Zt,Z:Kt,"%":sn};return n}function zt(t,n,e){var r=0>t?"-":"",i=(r?-t:t)+"",a=i.length;return r+(e>a?new Array(e-a+1).join(n)+i:i)}function qt(t){return new RegExp("^(?:"+t.map(eo.requote).join("|")+")","i")}function Wt(t){for(var n=new l,e=-1,r=t.length;++e<r;)n.set(t[e].toLowerCase(),e);return n}function Ht(t,n,e){du.lastIndex=0;var r=du.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function Gt(t,n,e){du.lastIndex=0;var r=du.exec(n.slice(e));return r?(t.U=+r[0],e+r[0].length):-1}function Vt(t,n,e){du.lastIndex=0;var r=du.exec(n.slice(e));return r?(t.W=+r[0],e+r[0].length):-1}function Zt(t,n,e){du.lastIndex=0;var r=du.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function Xt(t,n,e){du.lastIndex=0;var r=du.exec(n.slice(e,e+2));return r?(t.y=Qt(+r[0]),e+r[0].length):-1}function Kt(t,n,e){return/^[+-]\d{4}$/.test(n=n.slice(e,e+5))?(t.Z=-n,e+5):-1}function Qt(t){return t+(t>68?1900:2e3)}function Jt(t,n,e){du.lastIndex=0;var r=du.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function tn(t,n,e){du.lastIndex=0;var r=du.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function nn(t,n,e){du.lastIndex=0;var r=du.exec(n.slice(e,e+3));return r?(t.j=+r[0],e+r[0].length):-1}function en(t,n,e){du.lastIndex=0;var r=du.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function rn(t,n,e){du.lastIndex=0;var r=du.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function an(t,n,e){du.lastIndex=0;var r=du.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function on(t,n,e){du.lastIndex=0;var r=du.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function un(t){var n=t.getTimezoneOffset(),e=n>0?"-":"+",r=go(n)/60|0,i=go(n)%60;return e+zt(r,"0",2)+zt(i,"0",2)}function sn(t,n,e){pu.lastIndex=0;var r=pu.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function cn(t){for(var n=t.length,e=-1;++e<n;)t[e][0]=this(t[e][0]);return function(n){for(var e=0,r=t[e];!r[1](n);)r=t[++e];return r[0](n)}}function ln(){}function hn(t,n,e){var r=e.s=t+n,i=r-t,a=r-i;e.t=t-a+(n-i)}function fn(t,n){t&&vu.hasOwnProperty(t.type)&&vu[t.type](t,n)}function dn(t,n,e){var r,i=-1,a=t.length-e;for(n.lineStart();++i<a;)r=t[i],n.point(r[0],r[1],r[2]);n.lineEnd()}function pn(t,n){var e=-1,r=t.length;for(n.polygonStart();++e<r;)dn(t[e],n,1);n.polygonEnd()}function gn(){function t(t,n){t*=Bo,n=n*Bo/2+Lo/4;var e=t-r,o=e>=0?1:-1,u=o*e,s=Math.cos(n),c=Math.sin(n),l=a*c,h=i*s+l*Math.cos(u),f=l*o*Math.sin(u);bu.add(Math.atan2(f,h)),r=t,i=s,a=c}var n,e,r,i,a;xu.point=function(o,u){xu.point=t,r=(n=o)*Bo,i=Math.cos(u=(e=u)*Bo/2+Lo/4),a=Math.sin(u)},xu.lineEnd=function(){t(n,e)}}function yn(t){var n=t[0],e=t[1],r=Math.cos(e);return[r*Math.cos(n),r*Math.sin(n),Math.sin(e)]}function mn(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function vn(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function _n(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function bn(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function xn(t){var n=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}function wn(t){return[Math.atan2(t[1],t[0]),et(t[2])]}function kn(t,n){return go(t[0]-n[0])<Fo&&go(t[1]-n[1])<Fo}function An(t,n){t*=Bo;var e=Math.cos(n*=Bo);En(e*Math.cos(t),e*Math.sin(t),Math.sin(n))}function En(t,n,e){++wu,Au+=(t-Au)/wu,Eu+=(n-Eu)/wu,Mu+=(e-Mu)/wu}function Mn(){function t(t,i){t*=Bo;var a=Math.cos(i*=Bo),o=a*Math.cos(t),u=a*Math.sin(t),s=Math.sin(i),c=Math.atan2(Math.sqrt((c=e*s-r*u)*c+(c=r*o-n*s)*c+(c=n*u-e*o)*c),n*o+e*u+r*s);ku+=c,Du+=c*(n+(n=o)),Su+=c*(e+(e=u)),Tu+=c*(r+(r=s)),En(n,e,r)}var n,e,r;Lu.point=function(i,a){i*=Bo;var o=Math.cos(a*=Bo);n=o*Math.cos(i),e=o*Math.sin(i),r=Math.sin(a),Lu.point=t,En(n,e,r)}}function Dn(){Lu.point=An}function Sn(){function t(t,n){t*=Bo;var e=Math.cos(n*=Bo),o=e*Math.cos(t),u=e*Math.sin(t),s=Math.sin(n),c=i*s-a*u,l=a*o-r*s,h=r*u-i*o,f=Math.sqrt(c*c+l*l+h*h),d=r*o+i*u+a*s,p=f&&-nt(d)/f,g=Math.atan2(f,d);Cu+=p*c,Fu+=p*l,Ou+=p*h,ku+=g,Du+=g*(r+(r=o)),Su+=g*(i+(i=u)),Tu+=g*(a+(a=s)),En(r,i,a)}var n,e,r,i,a;Lu.point=function(o,u){n=o,e=u,Lu.point=t,o*=Bo;var s=Math.cos(u*=Bo);r=s*Math.cos(o),i=s*Math.sin(o),a=Math.sin(u),En(r,i,a)},Lu.lineEnd=function(){t(n,e),Lu.lineEnd=Dn,Lu.point=An}}function Tn(t,n){function e(e,r){return e=t(e,r),n(e[0],e[1])}return t.invert&&n.invert&&(e.invert=function(e,r){return e=n.invert(e,r),e&&t.invert(e[0],e[1])}),e}function Cn(){return!0}function Fn(t,n,e,r,i){var a=[],o=[];if(t.forEach(function(t){if(!((n=t.length-1)<=0)){var n,e=t[0],r=t[n];if(kn(e,r)){i.lineStart();for(var u=0;n>u;++u)i.point((e=t[u])[0],e[1]);return void i.lineEnd()}var s=new Ln(e,t,null,!0),c=new Ln(e,null,s,!1);s.o=c,a.push(s),o.push(c),s=new Ln(r,t,null,!1),c=new Ln(r,null,s,!0),s.o=c,a.push(s),o.push(c)}}),o.sort(n),On(a),On(o),a.length){for(var u=0,s=e,c=o.length;c>u;++u)o[u].e=s=!s;for(var l,h,f=a[0];;){for(var d=f,p=!0;d.v;)if((d=d.n)===f)return;l=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(p)for(var u=0,c=l.length;c>u;++u)i.point((h=l[u])[0],h[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(p){l=d.p.z;for(var u=l.length-1;u>=0;--u)i.point((h=l[u])[0],h[1])}else r(d.x,d.p.x,-1,i);d=d.p}d=d.o,l=d.z,p=!p}while(!d.v);i.lineEnd()}}}function On(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r<n;)i.n=e=t[r],e.p=i,i=e;i.n=e=t[0],e.p=i}}function Ln(t,n,e,r){this.x=t,this.z=n,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function In(t,n,e,r){return function(i,a){function o(n,e){var r=i(n,e);t(n=r[0],e=r[1])&&a.point(n,e)}function u(t,n){var e=i(t,n);y.point(e[0],e[1])}function s(){v.point=u,y.lineStart()}function c(){v.point=o,y.lineEnd()}function l(t,n){g.push([t,n]);var e=i(t,n);b.point(e[0],e[1])}function h(){b.lineStart(),g=[]}function f(){l(g[0][0],g[0][1]),b.lineEnd();var t,n=b.clean(),e=_.buffer(),r=e.length;if(g.pop(),p.push(g),g=null,r)if(1&n){t=e[0];var i,r=t.length-1,o=-1;if(r>0){for(x||(a.polygonStart(),x=!0),a.lineStart();++o<r;)a.point((i=t[o])[0],i[1]);a.lineEnd()}}else r>1&&2&n&&e.push(e.pop().concat(e.shift())),d.push(e.filter(Nn))}var d,p,g,y=n(a),m=i.invert(r[0],r[1]),v={point:o,lineStart:s,lineEnd:c,polygonStart:function(){v.point=l,v.lineStart=h,v.lineEnd=f,d=[],p=[]},polygonEnd:function(){v.point=o,v.lineStart=s,v.lineEnd=c,d=eo.merge(d);var t=Un(m,p);d.length?(x||(a.polygonStart(),x=!0),Fn(d,Bn,t,e,a)):t&&(x||(a.polygonStart(),x=!0),a.lineStart(),e(null,null,1,a),a.lineEnd()),x&&(a.polygonEnd(),x=!1),d=p=null},sphere:function(){a.polygonStart(),a.lineStart(),e(null,null,1,a),a.lineEnd(),a.polygonEnd()}},_=Pn(),b=n(_),x=!1;return v}}function Nn(t){return t.length>1}function Pn(){var t,n=[];return{lineStart:function(){n.push(t=[])},point:function(n,e){t.push([n,e])},lineEnd:w,buffer:function(){var e=n;return n=[],t=null,e},rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))}}}function Bn(t,n){return((t=t.x)[0]<0?t[1]-Po-Fo:Po-t[1])-((n=n.x)[0]<0?n[1]-Po-Fo:Po-n[1])}function Rn(t){var n,e=0/0,r=0/0,i=0/0;return{lineStart:function(){t.lineStart(),n=1},point:function(a,o){var u=a>0?Lo:-Lo,s=go(a-e);go(s-Lo)<Fo?(t.point(e,r=(r+o)/2>0?Po:-Po),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(a,r),n=0):i!==u&&s>=Lo&&(go(e-i)<Fo&&(e-=i*Fo),go(a-u)<Fo&&(a-=u*Fo),r=jn(e,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),n=0),t.point(e=a,r=o),i=u},lineEnd:function(){t.lineEnd(),e=r=0/0},clean:function(){return 2-n}}}function jn(t,n,e,r){var i,a,o=Math.sin(t-e);return go(o)>Fo?Math.atan((Math.sin(n)*(a=Math.cos(r))*Math.sin(e)-Math.sin(r)*(i=Math.cos(n))*Math.sin(t))/(i*a*o)):(n+r)/2}function Yn(t,n,e,r){var i;if(null==t)i=e*Po,r.point(-Lo,i),r.point(0,i),r.point(Lo,i),r.point(Lo,0),r.point(Lo,-i),r.point(0,-i),r.point(-Lo,-i),r.point(-Lo,0),r.point(-Lo,i);else if(go(t[0]-n[0])>Fo){var a=t[0]<n[0]?Lo:-Lo;i=e*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(n[0],n[1])}function Un(t,n){var e=t[0],r=t[1],i=[Math.sin(e),-Math.cos(e),0],a=0,o=0;bu.reset();for(var u=0,s=n.length;s>u;++u){var c=n[u],l=c.length;if(l)for(var h=c[0],f=h[0],d=h[1]/2+Lo/4,p=Math.sin(d),g=Math.cos(d),y=1;;){y===l&&(y=0),t=c[y];var m=t[0],v=t[1]/2+Lo/4,_=Math.sin(v),b=Math.cos(v),x=m-f,w=x>=0?1:-1,k=w*x,A=k>Lo,E=p*_;if(bu.add(Math.atan2(E*w*Math.sin(k),g*b+E*Math.cos(k))),a+=A?x+w*Io:x,A^f>=e^m>=e){var M=vn(yn(h),yn(t));xn(M);var D=vn(i,M);xn(D);var S=(A^x>=0?-1:1)*et(D[2]);(r>S||r===S&&(M[0]||M[1]))&&(o+=A^x>=0?1:-1)}if(!y++)break;f=m,p=_,g=b,h=t}}return(-Fo>a||Fo>a&&0>bu)^1&o}function $n(t){function n(t,n){return Math.cos(t)*Math.cos(n)>a}function e(t){var e,a,s,c,l;return{lineStart:function(){c=s=!1,l=1},point:function(h,f){var d,p=[h,f],g=n(h,f),y=o?g?0:i(h,f):g?i(h+(0>h?Lo:-Lo),f):0;if(!e&&(c=s=g)&&t.lineStart(),g!==s&&(d=r(e,p),(kn(e,d)||kn(p,d))&&(p[0]+=Fo,p[1]+=Fo,g=n(p[0],p[1]))),g!==s)l=0,g?(t.lineStart(),d=r(p,e),t.point(d[0],d[1])):(d=r(e,p),t.point(d[0],d[1]),t.lineEnd()),e=d;else if(u&&e&&o^g){var m;y&a||!(m=r(p,e,!0))||(l=0,o?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1])))}!g||e&&kn(e,p)||t.point(p[0],p[1]),e=p,s=g,a=y},lineEnd:function(){s&&t.lineEnd(),e=null},clean:function(){return l|(c&&s)<<1}}}function r(t,n,e){var r=yn(t),i=yn(n),o=[1,0,0],u=vn(r,i),s=mn(u,u),c=u[0],l=s-c*c;if(!l)return!e&&t;var h=a*s/l,f=-a*c/l,d=vn(o,u),p=bn(o,h),g=bn(u,f);_n(p,g);var y=d,m=mn(p,y),v=mn(y,y),_=m*m-v*(mn(p,p)-1);if(!(0>_)){var b=Math.sqrt(_),x=bn(y,(-m-b)/v);if(_n(x,p),x=wn(x),!e)return x;var w,k=t[0],A=n[0],E=t[1],M=n[1];k>A&&(w=k,k=A,A=w);var D=A-k,S=go(D-Lo)<Fo,T=S||Fo>D;if(!S&&E>M&&(w=E,E=M,M=w),T?S?E+M>0^x[1]<(go(x[0]-k)<Fo?E:M):E<=x[1]&&x[1]<=M:D>Lo^(k<=x[0]&&x[0]<=A)){var C=bn(y,(-m+b)/v);return _n(C,p),[x,wn(C)]}}}function i(n,e){var r=o?t:Lo-t,i=0;return-r>n?i|=1:n>r&&(i|=2),-r>e?i|=4:e>r&&(i|=8),i}var a=Math.cos(t),o=a>0,u=go(a)>Fo,s=ge(t,6*Bo);return In(n,e,s,o?[0,-t]:[-Lo,t-Lo])}function zn(t,n,e,r){return function(i){var a,o=i.a,u=i.b,s=o.x,c=o.y,l=u.x,h=u.y,f=0,d=1,p=l-s,g=h-c;if(a=t-s,p||!(a>0)){if(a/=p,0>p){if(f>a)return;d>a&&(d=a)}else if(p>0){if(a>d)return;a>f&&(f=a)}if(a=e-s,p||!(0>a)){if(a/=p,0>p){if(a>d)return;a>f&&(f=a)}else if(p>0){if(f>a)return;d>a&&(d=a)}if(a=n-c,g||!(a>0)){if(a/=g,0>g){if(f>a)return;d>a&&(d=a)}else if(g>0){if(a>d)return;a>f&&(f=a)}if(a=r-c,g||!(0>a)){if(a/=g,0>g){if(a>d)return;a>f&&(f=a)}else if(g>0){if(f>a)return;d>a&&(d=a)}return f>0&&(i.a={x:s+f*p,y:c+f*g}),1>d&&(i.b={x:s+d*p,y:c+d*g}),i}}}}}}function qn(t,n,e,r){function i(r,i){return go(r[0]-t)<Fo?i>0?0:3:go(r[0]-e)<Fo?i>0?2:1:go(r[1]-n)<Fo?i>0?1:0:i>0?3:2}function a(t,n){return o(t.x,n.x)}function o(t,n){var e=i(t,1),r=i(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0];
|
||
|
||
}return function(u){function s(t){for(var n=0,e=y.length,r=t[1],i=0;e>i;++i)for(var a,o=1,u=y[i],s=u.length,c=u[0];s>o;++o)a=u[o],c[1]<=r?a[1]>r&&tt(c,a,t)>0&&++n:a[1]<=r&&tt(c,a,t)<0&&--n,c=a;return 0!==n}function c(a,u,s,c){var l=0,h=0;if(null==a||(l=i(a,s))!==(h=i(u,s))||o(a,u)<0^s>0){do c.point(0===l||3===l?t:e,l>1?r:n);while((l=(l+s+4)%4)!==h)}else c.point(u[0],u[1])}function l(i,a){return i>=t&&e>=i&&a>=n&&r>=a}function h(t,n){l(t,n)&&u.point(t,n)}function f(){T.point=p,y&&y.push(m=[]),A=!0,k=!1,x=w=0/0}function d(){g&&(p(v,_),b&&k&&D.rejoin(),g.push(D.buffer())),T.point=h,k&&u.lineEnd()}function p(t,n){t=Math.max(-Nu,Math.min(Nu,t)),n=Math.max(-Nu,Math.min(Nu,n));var e=l(t,n);if(y&&m.push([t,n]),A)v=t,_=n,b=e,A=!1,e&&(u.lineStart(),u.point(t,n));else if(e&&k)u.point(t,n);else{var r={a:{x:x,y:w},b:{x:t,y:n}};S(r)?(k||(u.lineStart(),u.point(r.a.x,r.a.y)),u.point(r.b.x,r.b.y),e||u.lineEnd(),E=!1):e&&(u.lineStart(),u.point(t,n),E=!1)}x=t,w=n,k=e}var g,y,m,v,_,b,x,w,k,A,E,M=u,D=Pn(),S=zn(t,n,e,r),T={point:h,lineStart:f,lineEnd:d,polygonStart:function(){u=D,g=[],y=[],E=!0},polygonEnd:function(){u=M,g=eo.merge(g);var n=s([t,r]),e=E&&n,i=g.length;(e||i)&&(u.polygonStart(),e&&(u.lineStart(),c(null,null,1,u),u.lineEnd()),i&&Fn(g,a,n,c,u),u.polygonEnd()),g=y=m=null}};return T}}function Wn(t){var n=0,e=Lo/3,r=ue(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*Lo/180,e=t[1]*Lo/180):[n/Lo*180,e/Lo*180]},i}function Hn(t,n){function e(t,n){var e=Math.sqrt(a-2*i*Math.sin(n))/i;return[e*Math.sin(t*=i),o-e*Math.cos(t)]}var r=Math.sin(t),i=(r+Math.sin(n))/2,a=1+r*(2*i-r),o=Math.sqrt(a)/i;return e.invert=function(t,n){var e=o-n;return[Math.atan2(t,e)/i,et((a-(t*t+e*e)*i*i)/(2*i))]},e}function Gn(){function t(t,n){Bu+=i*t-r*n,r=t,i=n}var n,e,r,i;$u.point=function(a,o){$u.point=t,n=r=a,e=i=o},$u.lineEnd=function(){t(n,e)}}function Vn(t,n){Ru>t&&(Ru=t),t>Yu&&(Yu=t),ju>n&&(ju=n),n>Uu&&(Uu=n)}function Zn(){function t(t,n){o.push("M",t,",",n,a)}function n(t,n){o.push("M",t,",",n),u.point=e}function e(t,n){o.push("L",t,",",n)}function r(){u.point=t}function i(){o.push("Z")}var a=Xn(4.5),o=[],u={point:t,lineStart:function(){u.point=n},lineEnd:r,polygonStart:function(){u.lineEnd=i},polygonEnd:function(){u.lineEnd=r,u.point=t},pointRadius:function(t){return a=Xn(t),u},result:function(){if(o.length){var t=o.join("");return o=[],t}}};return u}function Xn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Kn(t,n){Au+=t,Eu+=n,++Mu}function Qn(){function t(t,r){var i=t-n,a=r-e,o=Math.sqrt(i*i+a*a);Du+=o*(n+t)/2,Su+=o*(e+r)/2,Tu+=o,Kn(n=t,e=r)}var n,e;qu.point=function(r,i){qu.point=t,Kn(n=r,e=i)}}function Jn(){qu.point=Kn}function te(){function t(t,n){var e=t-r,a=n-i,o=Math.sqrt(e*e+a*a);Du+=o*(r+t)/2,Su+=o*(i+n)/2,Tu+=o,o=i*t-r*n,Cu+=o*(r+t),Fu+=o*(i+n),Ou+=3*o,Kn(r=t,i=n)}var n,e,r,i;qu.point=function(a,o){qu.point=t,Kn(n=r=a,e=i=o)},qu.lineEnd=function(){t(n,e)}}function ne(t){function n(n,e){t.moveTo(n+o,e),t.arc(n,e,o,0,Io)}function e(n,e){t.moveTo(n,e),u.point=r}function r(n,e){t.lineTo(n,e)}function i(){u.point=n}function a(){t.closePath()}var o=4.5,u={point:n,lineStart:function(){u.point=e},lineEnd:i,polygonStart:function(){u.lineEnd=a},polygonEnd:function(){u.lineEnd=i,u.point=n},pointRadius:function(t){return o=t,u},result:w};return u}function ee(t){function n(t){return(u?r:e)(t)}function e(n){return ae(n,function(e,r){e=t(e,r),n.point(e[0],e[1])})}function r(n){function e(e,r){e=t(e,r),n.point(e[0],e[1])}function r(){_=0/0,A.point=a,n.lineStart()}function a(e,r){var a=yn([e,r]),o=t(e,r);i(_,b,v,x,w,k,_=o[0],b=o[1],v=e,x=a[0],w=a[1],k=a[2],u,n),n.point(_,b)}function o(){A.point=e,n.lineEnd()}function s(){r(),A.point=c,A.lineEnd=l}function c(t,n){a(h=t,f=n),d=_,p=b,g=x,y=w,m=k,A.point=a}function l(){i(_,b,v,x,w,k,d,p,h,g,y,m,u,n),A.lineEnd=o,o()}var h,f,d,p,g,y,m,v,_,b,x,w,k,A={point:e,lineStart:r,lineEnd:o,polygonStart:function(){n.polygonStart(),A.lineStart=s},polygonEnd:function(){n.polygonEnd(),A.lineStart=r}};return A}function i(n,e,r,u,s,c,l,h,f,d,p,g,y,m){var v=l-n,_=h-e,b=v*v+_*_;if(b>4*a&&y--){var x=u+d,w=s+p,k=c+g,A=Math.sqrt(x*x+w*w+k*k),E=Math.asin(k/=A),M=go(go(k)-1)<Fo||go(r-f)<Fo?(r+f)/2:Math.atan2(w,x),D=t(M,E),S=D[0],T=D[1],C=S-n,F=T-e,O=_*C-v*F;(O*O/b>a||go((v*C+_*F)/b-.5)>.3||o>u*d+s*p+c*g)&&(i(n,e,r,u,s,c,S,T,M,x/=A,w/=A,k,y,m),m.point(S,T),i(S,T,M,x,w,k,l,h,f,d,p,g,y,m))}}var a=.5,o=Math.cos(30*Bo),u=16;return n.precision=function(t){return arguments.length?(u=(a=t*t)>0&&16,n):Math.sqrt(a)},n}function re(t){var n=ee(function(n,e){return t([n*Ro,e*Ro])});return function(t){return se(n(t))}}function ie(t){this.stream=t}function ae(t,n){return{point:n,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function oe(t){return ue(function(){return t})()}function ue(t){function n(t){return t=u(t[0]*Bo,t[1]*Bo),[t[0]*f+s,c-t[1]*f]}function e(t){return t=u.invert((t[0]-s)/f,(c-t[1])/f),t&&[t[0]*Ro,t[1]*Ro]}function r(){u=Tn(o=he(m,v,b),a);var t=a(g,y);return s=d-t[0]*f,c=p+t[1]*f,i()}function i(){return l&&(l.valid=!1,l=null),n}var a,o,u,s,c,l,h=ee(function(t,n){return t=a(t,n),[t[0]*f+s,c-t[1]*f]}),f=150,d=480,p=250,g=0,y=0,m=0,v=0,b=0,x=Iu,w=_,k=null,A=null;return n.stream=function(t){return l&&(l.valid=!1),l=se(x(o,h(w(t)))),l.valid=!0,l},n.clipAngle=function(t){return arguments.length?(x=null==t?(k=t,Iu):$n((k=+t)*Bo),i()):k},n.clipExtent=function(t){return arguments.length?(A=t,w=t?qn(t[0][0],t[0][1],t[1][0],t[1][1]):_,i()):A},n.scale=function(t){return arguments.length?(f=+t,r()):f},n.translate=function(t){return arguments.length?(d=+t[0],p=+t[1],r()):[d,p]},n.center=function(t){return arguments.length?(g=t[0]%360*Bo,y=t[1]%360*Bo,r()):[g*Ro,y*Ro]},n.rotate=function(t){return arguments.length?(m=t[0]%360*Bo,v=t[1]%360*Bo,b=t.length>2?t[2]%360*Bo:0,r()):[m*Ro,v*Ro,b*Ro]},eo.rebind(n,h,"precision"),function(){return a=t.apply(this,arguments),n.invert=a.invert&&e,r()}}function se(t){return ae(t,function(n,e){t.point(n*Bo,e*Bo)})}function ce(t,n){return[t,n]}function le(t,n){return[t>Lo?t-Io:-Lo>t?t+Io:t,n]}function he(t,n,e){return t?n||e?Tn(de(t),pe(n,e)):de(t):n||e?pe(n,e):le}function fe(t){return function(n,e){return n+=t,[n>Lo?n-Io:-Lo>n?n+Io:n,e]}}function de(t){var n=fe(t);return n.invert=fe(-t),n}function pe(t,n){function e(t,n){var e=Math.cos(n),u=Math.cos(t)*e,s=Math.sin(t)*e,c=Math.sin(n),l=c*r+u*i;return[Math.atan2(s*a-l*o,u*r-c*i),et(l*a+s*o)]}var r=Math.cos(t),i=Math.sin(t),a=Math.cos(n),o=Math.sin(n);return e.invert=function(t,n){var e=Math.cos(n),u=Math.cos(t)*e,s=Math.sin(t)*e,c=Math.sin(n),l=c*a-s*o;return[Math.atan2(s*a+c*o,u*r+l*i),et(l*r-u*i)]},e}function ge(t,n){var e=Math.cos(t),r=Math.sin(t);return function(i,a,o,u){var s=o*n;null!=i?(i=ye(e,i),a=ye(e,a),(o>0?a>i:i>a)&&(i+=o*Io)):(i=t+o*Io,a=t-.5*s);for(var c,l=i;o>0?l>a:a>l;l-=s)u.point((c=wn([e,-r*Math.cos(l),-r*Math.sin(l)]))[0],c[1])}}function ye(t,n){var e=yn(n);e[0]-=t,xn(e);var r=nt(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Fo)%(2*Math.PI)}function me(t,n,e){var r=eo.range(t,n-Fo,e).concat(n);return function(t){return r.map(function(n){return[t,n]})}}function ve(t,n,e){var r=eo.range(t,n-Fo,e).concat(n);return function(t){return r.map(function(n){return[n,t]})}}function _e(t){return t.source}function be(t){return t.target}function xe(t,n,e,r){var i=Math.cos(n),a=Math.sin(n),o=Math.cos(r),u=Math.sin(r),s=i*Math.cos(t),c=i*Math.sin(t),l=o*Math.cos(e),h=o*Math.sin(e),f=2*Math.asin(Math.sqrt(ot(r-n)+i*o*ot(e-t))),d=1/Math.sin(f),p=f?function(t){var n=Math.sin(t*=f)*d,e=Math.sin(f-t)*d,r=e*s+n*l,i=e*c+n*h,o=e*a+n*u;return[Math.atan2(i,r)*Ro,Math.atan2(o,Math.sqrt(r*r+i*i))*Ro]}:function(){return[t*Ro,n*Ro]};return p.distance=f,p}function we(){function t(t,i){var a=Math.sin(i*=Bo),o=Math.cos(i),u=go((t*=Bo)-n),s=Math.cos(u);Wu+=Math.atan2(Math.sqrt((u=o*Math.sin(u))*u+(u=r*a-e*o*s)*u),e*a+r*o*s),n=t,e=a,r=o}var n,e,r;Hu.point=function(i,a){n=i*Bo,e=Math.sin(a*=Bo),r=Math.cos(a),Hu.point=t},Hu.lineEnd=function(){Hu.point=Hu.lineEnd=w}}function ke(t,n){function e(n,e){var r=Math.cos(n),i=Math.cos(e),a=t(r*i);return[a*i*Math.sin(n),a*Math.sin(e)]}return e.invert=function(t,e){var r=Math.sqrt(t*t+e*e),i=n(r),a=Math.sin(i),o=Math.cos(i);return[Math.atan2(t*a,r*o),Math.asin(r&&e*a/r)]},e}function Ae(t,n){function e(t,n){o>0?-Po+Fo>n&&(n=-Po+Fo):n>Po-Fo&&(n=Po-Fo);var e=o/Math.pow(i(n),a);return[e*Math.sin(a*t),o-e*Math.cos(a*t)]}var r=Math.cos(t),i=function(t){return Math.tan(Lo/4+t/2)},a=t===n?Math.sin(t):Math.log(r/Math.cos(n))/Math.log(i(n)/i(t)),o=r*Math.pow(i(t),a)/a;return a?(e.invert=function(t,n){var e=o-n,r=J(a)*Math.sqrt(t*t+e*e);return[Math.atan2(t,e)/a,2*Math.atan(Math.pow(o/r,1/a))-Po]},e):Me}function Ee(t,n){function e(t,n){var e=a-n;return[e*Math.sin(i*t),a-e*Math.cos(i*t)]}var r=Math.cos(t),i=t===n?Math.sin(t):(r-Math.cos(n))/(n-t),a=r/i+t;return go(i)<Fo?ce:(e.invert=function(t,n){var e=a-n;return[Math.atan2(t,e)/i,a-J(i)*Math.sqrt(t*t+e*e)]},e)}function Me(t,n){return[t,Math.log(Math.tan(Lo/4+n/2))]}function De(t){var n,e=oe(t),r=e.scale,i=e.translate,a=e.clipExtent;return e.scale=function(){var t=r.apply(e,arguments);return t===e?n?e.clipExtent(null):e:t},e.translate=function(){var t=i.apply(e,arguments);return t===e?n?e.clipExtent(null):e:t},e.clipExtent=function(t){var o=a.apply(e,arguments);if(o===e){if(n=null==t){var u=Lo*r(),s=i();a([[s[0]-u,s[1]-u],[s[0]+u,s[1]+u]])}}else n&&(o=null);return o},e.clipExtent(null)}function Se(t,n){return[Math.log(Math.tan(Lo/4+n/2)),-t]}function Te(t){return t[0]}function Ce(t){return t[1]}function Fe(t){for(var n=t.length,e=[0,1],r=2,i=2;n>i;i++){for(;r>1&&tt(t[e[r-2]],t[e[r-1]],t[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function Oe(t,n){return t[0]-n[0]||t[1]-n[1]}function Le(t,n,e){return(e[0]-n[0])*(t[1]-n[1])<(e[1]-n[1])*(t[0]-n[0])}function Ie(t,n,e,r){var i=t[0],a=e[0],o=n[0]-i,u=r[0]-a,s=t[1],c=e[1],l=n[1]-s,h=r[1]-c,f=(u*(s-c)-h*(i-a))/(h*o-u*l);return[i+f*o,s+f*l]}function Ne(t){var n=t[0],e=t[t.length-1];return!(n[0]-e[0]||n[1]-e[1])}function Pe(){rr(this),this.edge=this.site=this.circle=null}function Be(t){var n=is.pop()||new Pe;return n.site=t,n}function Re(t){Ve(t),ns.remove(t),is.push(t),rr(t)}function je(t){var n=t.circle,e=n.x,r=n.cy,i={x:e,y:r},a=t.P,o=t.N,u=[t];Re(t);for(var s=a;s.circle&&go(e-s.circle.x)<Fo&&go(r-s.circle.cy)<Fo;)a=s.P,u.unshift(s),Re(s),s=a;u.unshift(s),Ve(s);for(var c=o;c.circle&&go(e-c.circle.x)<Fo&&go(r-c.circle.cy)<Fo;)o=c.N,u.push(c),Re(c),c=o;u.push(c),Ve(c);var l,h=u.length;for(l=1;h>l;++l)c=u[l],s=u[l-1],tr(c.edge,s.site,c.site,i);s=u[0],c=u[h-1],c.edge=Qe(s.site,c.site,null,i),Ge(s),Ge(c)}function Ye(t){for(var n,e,r,i,a=t.x,o=t.y,u=ns._;u;)if(r=Ue(u,o)-a,r>Fo)u=u.L;else{if(i=a-$e(u,o),!(i>Fo)){r>-Fo?(n=u.P,e=u):i>-Fo?(n=u,e=u.N):n=e=u;break}if(!u.R){n=u;break}u=u.R}var s=Be(t);if(ns.insert(n,s),n||e){if(n===e)return Ve(n),e=Be(n.site),ns.insert(s,e),s.edge=e.edge=Qe(n.site,s.site),Ge(n),void Ge(e);if(!e)return void(s.edge=Qe(n.site,s.site));Ve(n),Ve(e);var c=n.site,l=c.x,h=c.y,f=t.x-l,d=t.y-h,p=e.site,g=p.x-l,y=p.y-h,m=2*(f*y-d*g),v=f*f+d*d,_=g*g+y*y,b={x:(y*v-d*_)/m+l,y:(f*_-g*v)/m+h};tr(e.edge,c,p,b),s.edge=Qe(c,t,null,b),e.edge=Qe(t,p,null,b),Ge(n),Ge(e)}}function Ue(t,n){var e=t.site,r=e.x,i=e.y,a=i-n;if(!a)return r;var o=t.P;if(!o)return-(1/0);e=o.site;var u=e.x,s=e.y,c=s-n;if(!c)return u;var l=u-r,h=1/a-1/c,f=l/c;return h?(-f+Math.sqrt(f*f-2*h*(l*l/(-2*c)-s+c/2+i-a/2)))/h+r:(r+u)/2}function $e(t,n){var e=t.N;if(e)return Ue(e,n);var r=t.site;return r.y===n?r.x:1/0}function ze(t){this.site=t,this.edges=[]}function qe(t){for(var n,e,r,i,a,o,u,s,c,l,h=t[0][0],f=t[1][0],d=t[0][1],p=t[1][1],g=ts,y=g.length;y--;)if(a=g[y],a&&a.prepare())for(u=a.edges,s=u.length,o=0;s>o;)l=u[o].end(),r=l.x,i=l.y,c=u[++o%s].start(),n=c.x,e=c.y,(go(r-n)>Fo||go(i-e)>Fo)&&(u.splice(o,0,new nr(Je(a.site,l,go(r-h)<Fo&&p-i>Fo?{x:h,y:go(n-h)<Fo?e:p}:go(i-p)<Fo&&f-r>Fo?{x:go(e-p)<Fo?n:f,y:p}:go(r-f)<Fo&&i-d>Fo?{x:f,y:go(n-f)<Fo?e:d}:go(i-d)<Fo&&r-h>Fo?{x:go(e-d)<Fo?n:h,y:d}:null),a.site,null)),++s)}function We(t,n){return n.angle-t.angle}function He(){rr(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ge(t){var n=t.P,e=t.N;if(n&&e){var r=n.site,i=t.site,a=e.site;if(r!==a){var o=i.x,u=i.y,s=r.x-o,c=r.y-u,l=a.x-o,h=a.y-u,f=2*(s*h-c*l);if(!(f>=-Oo)){var d=s*s+c*c,p=l*l+h*h,g=(h*d-c*p)/f,y=(s*p-l*d)/f,h=y+u,m=as.pop()||new He;m.arc=t,m.site=i,m.x=g+o,m.y=h+Math.sqrt(g*g+y*y),m.cy=h,t.circle=m;for(var v=null,_=rs._;_;)if(m.y<_.y||m.y===_.y&&m.x<=_.x){if(!_.L){v=_.P;break}_=_.L}else{if(!_.R){v=_;break}_=_.R}rs.insert(v,m),v||(es=m)}}}}function Ve(t){var n=t.circle;n&&(n.P||(es=n.N),rs.remove(n),as.push(n),rr(n),t.circle=null)}function Ze(t){for(var n,e=Ju,r=zn(t[0][0],t[0][1],t[1][0],t[1][1]),i=e.length;i--;)n=e[i],(!Xe(n,t)||!r(n)||go(n.a.x-n.b.x)<Fo&&go(n.a.y-n.b.y)<Fo)&&(n.a=n.b=null,e.splice(i,1))}function Xe(t,n){var e=t.b;if(e)return!0;var r,i,a=t.a,o=n[0][0],u=n[1][0],s=n[0][1],c=n[1][1],l=t.l,h=t.r,f=l.x,d=l.y,p=h.x,g=h.y,y=(f+p)/2,m=(d+g)/2;if(g===d){if(o>y||y>=u)return;if(f>p){if(a){if(a.y>=c)return}else a={x:y,y:s};e={x:y,y:c}}else{if(a){if(a.y<s)return}else a={x:y,y:c};e={x:y,y:s}}}else if(r=(f-p)/(g-d),i=m-r*y,-1>r||r>1)if(f>p){if(a){if(a.y>=c)return}else a={x:(s-i)/r,y:s};e={x:(c-i)/r,y:c}}else{if(a){if(a.y<s)return}else a={x:(c-i)/r,y:c};e={x:(s-i)/r,y:s}}else if(g>d){if(a){if(a.x>=u)return}else a={x:o,y:r*o+i};e={x:u,y:r*u+i}}else{if(a){if(a.x<o)return}else a={x:u,y:r*u+i};e={x:o,y:r*o+i}}return t.a=a,t.b=e,!0}function Ke(t,n){this.l=t,this.r=n,this.a=this.b=null}function Qe(t,n,e,r){var i=new Ke(t,n);return Ju.push(i),e&&tr(i,t,n,e),r&&tr(i,n,t,r),ts[t.i].edges.push(new nr(i,t,n)),ts[n.i].edges.push(new nr(i,n,t)),i}function Je(t,n,e){var r=new Ke(t,null);return r.a=n,r.b=e,Ju.push(r),r}function tr(t,n,e,r){t.a||t.b?t.l===e?t.b=r:t.a=r:(t.a=r,t.l=n,t.r=e)}function nr(t,n,e){var r=t.a,i=t.b;this.edge=t,this.site=n,this.angle=e?Math.atan2(e.y-n.y,e.x-n.x):t.l===n?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function er(){this._=null}function rr(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function ir(t,n){var e=n,r=n.R,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function ar(t,n){var e=n,r=n.L,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function or(t){for(;t.L;)t=t.L;return t}function ur(t,n){var e,r,i,a=t.sort(sr).pop();for(Ju=[],ts=new Array(t.length),ns=new er,rs=new er;;)if(i=es,a&&(!i||a.y<i.y||a.y===i.y&&a.x<i.x))(a.x!==e||a.y!==r)&&(ts[a.i]=new ze(a),Ye(a),e=a.x,r=a.y),a=t.pop();else{if(!i)break;je(i.arc)}n&&(Ze(n),qe(n));var o={cells:ts,edges:Ju};return ns=rs=Ju=ts=null,o}function sr(t,n){return n.y-t.y||n.x-t.x}function cr(t,n,e){return(t.x-e.x)*(n.y-t.y)-(t.x-n.x)*(e.y-t.y)}function lr(t){return t.x}function hr(t){return t.y}function fr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function dr(t,n,e,r,i,a){if(!t(n,e,r,i,a)){var o=.5*(e+i),u=.5*(r+a),s=n.nodes;s[0]&&dr(t,s[0],e,r,o,u),s[1]&&dr(t,s[1],o,r,i,u),s[2]&&dr(t,s[2],e,u,o,a),s[3]&&dr(t,s[3],o,u,i,a)}}function pr(t,n,e,r,i,a,o){var u,s=1/0;return function c(t,l,h,f,d){if(!(l>a||h>o||r>f||i>d)){if(p=t.point){var p,g=n-t.x,y=e-t.y,m=g*g+y*y;if(s>m){var v=Math.sqrt(s=m);r=n-v,i=e-v,a=n+v,o=e+v,u=p}}for(var _=t.nodes,b=.5*(l+f),x=.5*(h+d),w=n>=b,k=e>=x,A=k<<1|w,E=A+4;E>A;++A)if(t=_[3&A])switch(3&A){case 0:c(t,l,h,b,x);break;case 1:c(t,b,h,f,x);break;case 2:c(t,l,x,b,d);break;case 3:c(t,b,x,f,d)}}}(t,r,i,a,o),u}function gr(t,n){t=eo.rgb(t),n=eo.rgb(n);var e=t.r,r=t.g,i=t.b,a=n.r-e,o=n.g-r,u=n.b-i;return function(t){return"#"+xt(Math.round(e+a*t))+xt(Math.round(r+o*t))+xt(Math.round(i+u*t))}}function yr(t,n){var e,r={},i={};for(e in t)e in n?r[e]=_r(t[e],n[e]):i[e]=t[e];for(e in n)e in t||(i[e]=n[e]);return function(t){for(e in r)i[e]=r[e](t);return i}}function mr(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}function vr(t,n){var e,r,i,a=us.lastIndex=ss.lastIndex=0,o=-1,u=[],s=[];for(t+="",n+="";(e=us.exec(t))&&(r=ss.exec(n));)(i=r.index)>a&&(i=n.slice(a,i),u[o]?u[o]+=i:u[++o]=i),(e=e[0])===(r=r[0])?u[o]?u[o]+=r:u[++o]=r:(u[++o]=null,s.push({i:o,x:mr(e,r)})),a=ss.lastIndex;return a<n.length&&(i=n.slice(a),u[o]?u[o]+=i:u[++o]=i),u.length<2?s[0]?(n=s[0].x,function(t){return n(t)+""}):function(){return n}:(n=s.length,function(t){for(var e,r=0;n>r;++r)u[(e=s[r]).i]=e.x(t);return u.join("")})}function _r(t,n){for(var e,r=eo.interpolators.length;--r>=0&&!(e=eo.interpolators[r](t,n)););return e}function br(t,n){var e,r=[],i=[],a=t.length,o=n.length,u=Math.min(t.length,n.length);for(e=0;u>e;++e)r.push(_r(t[e],n[e]));for(;a>e;++e)i[e]=t[e];for(;o>e;++e)i[e]=n[e];return function(t){for(e=0;u>e;++e)i[e]=r[e](t);return i}}function xr(t){return function(n){return 0>=n?0:n>=1?1:t(n)}}function wr(t){return function(n){return 1-t(1-n)}}function kr(t){return function(n){return.5*(.5>n?t(2*n):2-t(2-2*n))}}function Ar(t){return t*t}function Er(t){return t*t*t}function Mr(t){if(0>=t)return 0;if(t>=1)return 1;var n=t*t,e=n*t;return 4*(.5>t?e:3*(t-n)+e-.75)}function Dr(t){return function(n){return Math.pow(n,t)}}function Sr(t){return 1-Math.cos(t*Po)}function Tr(t){return Math.pow(2,10*(t-1))}function Cr(t){return 1-Math.sqrt(1-t*t)}function Fr(t,n){var e;return arguments.length<2&&(n=.45),arguments.length?e=n/Io*Math.asin(1/t):(t=1,e=n/4),function(r){return 1+t*Math.pow(2,-10*r)*Math.sin((r-e)*Io/n)}}function Or(t){return t||(t=1.70158),function(n){return n*n*((t+1)*n-t)}}function Lr(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Ir(t,n){t=eo.hcl(t),n=eo.hcl(n);var e=t.h,r=t.c,i=t.l,a=n.h-e,o=n.c-r,u=n.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?n.c:r),isNaN(a)?(a=0,e=isNaN(e)?n.h:e):a>180?a-=360:-180>a&&(a+=360),function(t){return ht(e+a*t,r+o*t,i+u*t)+""}}function Nr(t,n){t=eo.hsl(t),n=eo.hsl(n);var e=t.h,r=t.s,i=t.l,a=n.h-e,o=n.s-r,u=n.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?n.s:r),isNaN(a)?(a=0,e=isNaN(e)?n.h:e):a>180?a-=360:-180>a&&(a+=360),function(t){return ct(e+a*t,r+o*t,i+u*t)+""}}function Pr(t,n){t=eo.lab(t),n=eo.lab(n);var e=t.l,r=t.a,i=t.b,a=n.l-e,o=n.a-r,u=n.b-i;return function(t){return dt(e+a*t,r+o*t,i+u*t)+""}}function Br(t,n){return n-=t,function(e){return Math.round(t+n*e)}}function Rr(t){var n=[t.a,t.b],e=[t.c,t.d],r=Yr(n),i=jr(n,e),a=Yr(Ur(e,n,-i))||0;n[0]*e[1]<e[0]*n[1]&&(n[0]*=-1,n[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(n[1],n[0]):Math.atan2(-e[0],e[1]))*Ro,this.translate=[t.e,t.f],this.scale=[r,a],this.skew=a?Math.atan2(i,a)*Ro:0}function jr(t,n){return t[0]*n[0]+t[1]*n[1]}function Yr(t){var n=Math.sqrt(jr(t,t));return n&&(t[0]/=n,t[1]/=n),n}function Ur(t,n,e){return t[0]+=e*n[0],t[1]+=e*n[1],t}function $r(t,n){var e,r=[],i=[],a=eo.transform(t),o=eo.transform(n),u=a.translate,s=o.translate,c=a.rotate,l=o.rotate,h=a.skew,f=o.skew,d=a.scale,p=o.scale;return u[0]!=s[0]||u[1]!=s[1]?(r.push("translate(",null,",",null,")"),i.push({i:1,x:mr(u[0],s[0])},{i:3,x:mr(u[1],s[1])})):r.push(s[0]||s[1]?"translate("+s+")":""),c!=l?(c-l>180?l+=360:l-c>180&&(c+=360),i.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:mr(c,l)})):l&&r.push(r.pop()+"rotate("+l+")"),h!=f?i.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:mr(h,f)}):f&&r.push(r.pop()+"skewX("+f+")"),d[0]!=p[0]||d[1]!=p[1]?(e=r.push(r.pop()+"scale(",null,",",null,")"),i.push({i:e-4,x:mr(d[0],p[0])},{i:e-2,x:mr(d[1],p[1])})):(1!=p[0]||1!=p[1])&&r.push(r.pop()+"scale("+p+")"),e=i.length,function(t){for(var n,a=-1;++a<e;)r[(n=i[a]).i]=n.x(t);return r.join("")}}function zr(t,n){return n=(n-=t=+t)||1/n,function(e){return(e-t)/n}}function qr(t,n){return n=(n-=t=+t)||1/n,function(e){return Math.max(0,Math.min(1,(e-t)/n))}}function Wr(t){for(var n=t.source,e=t.target,r=Gr(n,e),i=[n];n!==r;)n=n.parent,i.push(n);for(var a=i.length;e!==r;)i.splice(a,0,e),e=e.parent;return i}function Hr(t){for(var n=[],e=t.parent;null!=e;)n.push(t),t=e,e=e.parent;return n.push(t),n}function Gr(t,n){if(t===n)return t;for(var e=Hr(t),r=Hr(n),i=e.pop(),a=r.pop(),o=null;i===a;)o=i,i=e.pop(),a=r.pop();return o}function Vr(t){t.fixed|=2}function Zr(t){t.fixed&=-7}function Xr(t){t.fixed|=4,t.px=t.x,t.py=t.y}function Kr(t){t.fixed&=-5}function Qr(t,n,e){var r=0,i=0;if(t.charge=0,!t.leaf)for(var a,o=t.nodes,u=o.length,s=-1;++s<u;)a=o[s],null!=a&&(Qr(a,n,e),t.charge+=a.charge,r+=a.charge*a.cx,i+=a.charge*a.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var c=n*e[t.point.index];t.charge+=t.pointCharge=c,r+=c*t.point.x,i+=c*t.point.y}t.cx=r/t.charge,t.cy=i/t.charge}function Jr(t,n){return eo.rebind(t,n,"sort","children","value"),t.nodes=t,t.links=ai,t}function ti(t,n){for(var e=[t];null!=(t=e.pop());)if(n(t),(i=t.children)&&(r=i.length))for(var r,i;--r>=0;)e.push(i[r])}function ni(t,n){for(var e=[t],r=[];null!=(t=e.pop());)if(r.push(t),(a=t.children)&&(i=a.length))for(var i,a,o=-1;++o<i;)e.push(a[o]);for(;null!=(t=r.pop());)n(t)}function ei(t){return t.children}function ri(t){return t.value}function ii(t,n){return n.value-t.value}function ai(t){return eo.merge(t.map(function(t){return(t.children||[]).map(function(n){return{source:t,target:n}})}))}function oi(t){return t.x}function ui(t){return t.y}function si(t,n,e){t.y0=n,t.y=e}function ci(t){return eo.range(t.length)}function li(t){for(var n=-1,e=t[0].length,r=[];++n<e;)r[n]=0;return r}function hi(t){for(var n,e=1,r=0,i=t[0][1],a=t.length;a>e;++e)(n=t[e][1])>i&&(r=e,i=n);return r}function fi(t){return t.reduce(di,0)}function di(t,n){return t+n[1]}function pi(t,n){return gi(t,Math.ceil(Math.log(n.length)/Math.LN2+1))}function gi(t,n){for(var e=-1,r=+t[0],i=(t[1]-r)/n,a=[];++e<=n;)a[e]=i*e+r;return a}function yi(t){return[eo.min(t),eo.max(t)]}function mi(t,n){return t.value-n.value}function vi(t,n){var e=t._pack_next;t._pack_next=n,n._pack_prev=t,n._pack_next=e,e._pack_prev=n}function _i(t,n){t._pack_next=n,n._pack_prev=t}function bi(t,n){var e=n.x-t.x,r=n.y-t.y,i=t.r+n.r;return.999*i*i>e*e+r*r}function xi(t){function n(t){l=Math.min(t.x-t.r,l),h=Math.max(t.x+t.r,h),f=Math.min(t.y-t.r,f),d=Math.max(t.y+t.r,d)}if((e=t.children)&&(c=e.length)){var e,r,i,a,o,u,s,c,l=1/0,h=-(1/0),f=1/0,d=-(1/0);if(e.forEach(wi),r=e[0],r.x=-r.r,r.y=0,n(r),c>1&&(i=e[1],i.x=i.r,i.y=0,n(i),c>2))for(a=e[2],Ei(r,i,a),n(a),vi(r,a),r._pack_prev=a,vi(a,i),i=r._pack_next,o=3;c>o;o++){Ei(r,i,a=e[o]);var p=0,g=1,y=1;for(u=i._pack_next;u!==i;u=u._pack_next,g++)if(bi(u,a)){p=1;break}if(1==p)for(s=r._pack_prev;s!==u._pack_prev&&!bi(s,a);s=s._pack_prev,y++);p?(y>g||g==y&&i.r<r.r?_i(r,i=u):_i(r=s,i),o--):(vi(r,a),i=a,n(a))}var m=(l+h)/2,v=(f+d)/2,_=0;for(o=0;c>o;o++)a=e[o],a.x-=m,a.y-=v,_=Math.max(_,a.r+Math.sqrt(a.x*a.x+a.y*a.y));t.r=_,e.forEach(ki)}}function wi(t){t._pack_next=t._pack_prev=t}function ki(t){delete t._pack_next,delete t._pack_prev}function Ai(t,n,e,r){var i=t.children;if(t.x=n+=r*t.x,t.y=e+=r*t.y,t.r*=r,i)for(var a=-1,o=i.length;++a<o;)Ai(i[a],n,e,r)}function Ei(t,n,e){var r=t.r+e.r,i=n.x-t.x,a=n.y-t.y;if(r&&(i||a)){var o=n.r+e.r,u=i*i+a*a;o*=o,r*=r;var s=.5+(r-o)/(2*u),c=Math.sqrt(Math.max(0,2*o*(r+u)-(r-=u)*r-o*o))/(2*u);e.x=t.x+s*i+c*a,e.y=t.y+s*a-c*i}else e.x=t.x+r,e.y=t.y}function Mi(t,n){return t.parent==n.parent?1:2}function Di(t){var n=t.children;return n.length?n[0]:t.t}function Si(t){var n,e=t.children;return(n=e.length)?e[n-1]:t.t}function Ti(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}function Ci(t){for(var n,e=0,r=0,i=t.children,a=i.length;--a>=0;)n=i[a],n.z+=e,n.m+=e,e+=n.s+(r+=n.c)}function Fi(t,n,e){return t.a.parent===n.parent?t.a:e}function Oi(t){return 1+eo.max(t,function(t){return t.y})}function Li(t){return t.reduce(function(t,n){return t+n.x},0)/t.length}function Ii(t){var n=t.children;return n&&n.length?Ii(n[0]):t}function Ni(t){var n,e=t.children;return e&&(n=e.length)?Ni(e[n-1]):t}function Pi(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Bi(t,n){var e=t.x+n[3],r=t.y+n[0],i=t.dx-n[1]-n[3],a=t.dy-n[0]-n[2];return 0>i&&(e+=i/2,i=0),0>a&&(r+=a/2,a=0),{x:e,y:r,dx:i,dy:a}}function Ri(t){var n=t[0],e=t[t.length-1];return e>n?[n,e]:[e,n]}function ji(t){return t.rangeExtent?t.rangeExtent():Ri(t.range())}function Yi(t,n,e,r){var i=e(t[0],t[1]),a=r(n[0],n[1]);return function(t){return a(i(t))}}function Ui(t,n){var e,r=0,i=t.length-1,a=t[r],o=t[i];return a>o&&(e=r,r=i,i=e,e=a,a=o,o=e),t[r]=n.floor(a),t[i]=n.ceil(o),t}function $i(t){return t?{floor:function(n){return Math.floor(n/t)*t},ceil:function(n){return Math.ceil(n/t)*t}}:_s}function zi(t,n,e,r){var i=[],a=[],o=0,u=Math.min(t.length,n.length)-1;for(t[u]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++o<=u;)i.push(e(t[o-1],t[o])),a.push(r(n[o-1],n[o]));return function(n){var e=eo.bisect(t,n,1,u)-1;return a[e](i[e](n))}}function qi(t,n,e,r){function i(){var i=Math.min(t.length,n.length)>2?zi:Yi,s=r?qr:zr;return o=i(t,n,s,e),u=i(n,t,s,_r),a}function a(t){return o(t)}var o,u;return a.invert=function(t){return u(t)},a.domain=function(n){return arguments.length?(t=n.map(Number),i()):t},a.range=function(t){return arguments.length?(n=t,i()):n},a.rangeRound=function(t){return a.range(t).interpolate(Br)},a.clamp=function(t){return arguments.length?(r=t,i()):r},a.interpolate=function(t){return arguments.length?(e=t,i()):e},a.ticks=function(n){return Vi(t,n)},a.tickFormat=function(n,e){return Zi(t,n,e)},a.nice=function(n){return Hi(t,n),i()},a.copy=function(){return qi(t,n,e,r)},i()}function Wi(t,n){return eo.rebind(t,n,"range","rangeRound","interpolate","clamp")}function Hi(t,n){return Ui(t,$i(Gi(t,n)[2]))}function Gi(t,n){null==n&&(n=10);var e=Ri(t),r=e[1]-e[0],i=Math.pow(10,Math.floor(Math.log(r/n)/Math.LN10)),a=n/r*i;return.15>=a?i*=10:.35>=a?i*=5:.75>=a&&(i*=2),e[0]=Math.ceil(e[0]/i)*i,e[1]=Math.floor(e[1]/i)*i+.5*i,e[2]=i,e}function Vi(t,n){return eo.range.apply(eo,Gi(t,n))}function Zi(t,n,e){var r=Gi(t,n);if(e){var i=uu.exec(e);if(i.shift(),"s"===i[8]){var a=eo.formatPrefix(Math.max(go(r[0]),go(r[1])));return i[7]||(i[7]="."+Xi(a.scale(r[2]))),i[8]="f",e=eo.format(i.join("")),function(t){return e(a.scale(t))+a.symbol}}i[7]||(i[7]="."+Ki(i[8],r)),e=i.join("")}else e=",."+Xi(r[2])+"f";return eo.format(e)}function Xi(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function Ki(t,n){var e=Xi(n[2]);return t in bs?Math.abs(e-Xi(Math.max(go(n[0]),go(n[1]))))+ +("e"!==t):e-2*("%"===t)}function Qi(t,n,e,r){function i(t){return(e?Math.log(0>t?0:t):-Math.log(t>0?0:-t))/Math.log(n)}function a(t){return e?Math.pow(n,t):-Math.pow(n,-t)}function o(n){return t(i(n))}return o.invert=function(n){return a(t.invert(n))},o.domain=function(n){return arguments.length?(e=n[0]>=0,t.domain((r=n.map(Number)).map(i)),o):r},o.base=function(e){return arguments.length?(n=+e,t.domain(r.map(i)),o):n},o.nice=function(){var n=Ui(r.map(i),e?Math:ws);return t.domain(n),r=n.map(a),o},o.ticks=function(){var t=Ri(r),o=[],u=t[0],s=t[1],c=Math.floor(i(u)),l=Math.ceil(i(s)),h=n%1?2:n;if(isFinite(l-c)){if(e){for(;l>c;c++)for(var f=1;h>f;f++)o.push(a(c)*f);o.push(a(c))}else for(o.push(a(c));c++<l;)for(var f=h-1;f>0;f--)o.push(a(c)*f);for(c=0;o[c]<u;c++);for(l=o.length;o[l-1]>s;l--);o=o.slice(c,l)}return o},o.tickFormat=function(t,n){if(!arguments.length)return xs;arguments.length<2?n=xs:"function"!=typeof n&&(n=eo.format(n));var r,u=Math.max(.1,t/o.ticks().length),s=e?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(t){return t/a(s(i(t)+r))<=u?n(t):""}},o.copy=function(){return Qi(t.copy(),n,e,r)},Wi(o,t)}function Ji(t,n,e){function r(n){return t(i(n))}var i=ta(n),a=ta(1/n);return r.invert=function(n){return a(t.invert(n))},r.domain=function(n){return arguments.length?(t.domain((e=n.map(Number)).map(i)),r):e},r.ticks=function(t){return Vi(e,t)},r.tickFormat=function(t,n){return Zi(e,t,n)},r.nice=function(t){return r.domain(Hi(e,t))},r.exponent=function(o){return arguments.length?(i=ta(n=o),a=ta(1/n),t.domain(e.map(i)),r):n},r.copy=function(){return Ji(t.copy(),n,e)},Wi(r,t)}function ta(t){return function(n){return 0>n?-Math.pow(-n,t):Math.pow(n,t)}}function na(t,n){function e(e){return a[((i.get(e)||("range"===n.t?i.set(e,t.push(e)):0/0))-1)%a.length]}function r(n,e){return eo.range(t.length).map(function(t){return n+e*t})}var i,a,o;return e.domain=function(r){if(!arguments.length)return t;t=[],i=new l;for(var a,o=-1,u=r.length;++o<u;)i.has(a=r[o])||i.set(a,t.push(a));return e[n.t].apply(e,n.a)},e.range=function(t){return arguments.length?(a=t,o=0,n={t:"range",a:arguments},e):a},e.rangePoints=function(i,u){arguments.length<2&&(u=0);var s=i[0],c=i[1],l=t.length<2?(s=(s+c)/2,0):(c-s)/(t.length-1+u);return a=r(s+l*u/2,l),o=0,n={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(i,u){arguments.length<2&&(u=0);var s=i[0],c=i[1],l=t.length<2?(s=c=Math.round((s+c)/2),0):(c-s)/(t.length-1+u)|0;return a=r(s+Math.round(l*u/2+(c-s-(t.length-1+u)*l)/2),l),o=0,n={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(i,u,s){arguments.length<2&&(u=0),arguments.length<3&&(s=u);var c=i[1]<i[0],l=i[c-0],h=i[1-c],f=(h-l)/(t.length-u+2*s);return a=r(l+f*s,f),c&&a.reverse(),o=f*(1-u),n={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(i,u,s){arguments.length<2&&(u=0),arguments.length<3&&(s=u);var c=i[1]<i[0],l=i[c-0],h=i[1-c],f=Math.floor((h-l)/(t.length-u+2*s));return a=r(l+Math.round((h-l-(t.length-u)*f)/2),f),c&&a.reverse(),o=Math.round(f*(1-u)),n={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return o},e.rangeExtent=function(){return Ri(n.a[0])},e.copy=function(){return na(t,n)},e.domain(t)}function ea(t,n){function e(){var e=0,r=n.length;for(u=[];++e<r;)u[e-1]=eo.quantile(t,e/r);return o}function o(t){return isNaN(t=+t)?void 0:n[eo.bisect(u,t)]}var u;return o.domain=function(n){return arguments.length?(t=n.map(i).filter(a).sort(r),e()):t},o.range=function(t){return arguments.length?(n=t,e()):n},o.quantiles=function(){return u},o.invertExtent=function(e){return e=n.indexOf(e),0>e?[0/0,0/0]:[e>0?u[e-1]:t[0],e<u.length?u[e]:t[t.length-1]]},o.copy=function(){return ea(t,n)},e()}function ra(t,n,e){function r(n){return e[Math.max(0,Math.min(o,Math.floor(a*(n-t))))]}function i(){return a=e.length/(n-t),o=e.length-1,r}var a,o;return r.domain=function(e){return arguments.length?(t=+e[0],n=+e[e.length-1],i()):[t,n]},r.range=function(t){return arguments.length?(e=t,i()):e},r.invertExtent=function(n){return n=e.indexOf(n),n=0>n?0/0:n/a+t,[n,n+1/a]},r.copy=function(){return ra(t,n,e)},i()}function ia(t,n){function e(e){return e>=e?n[eo.bisect(t,e)]:void 0}return e.domain=function(n){return arguments.length?(t=n,e):t},e.range=function(t){return arguments.length?(n=t,e):n},e.invertExtent=function(e){return e=n.indexOf(e),[t[e-1],t[e]]},e.copy=function(){return ia(t,n)},e}function aa(t){function n(t){return+t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=e.map(n),n):t},n.ticks=function(n){return Vi(t,n)},n.tickFormat=function(n,e){return Zi(t,n,e)},n.copy=function(){return aa(t)},n}function oa(){return 0}function ua(t){return t.innerRadius}function sa(t){return t.outerRadius}function ca(t){return t.startAngle}function la(t){return t.endAngle}function ha(t){return t&&t.padAngle}function fa(t,n,e,r){return(t-e)*n-(n-r)*t>0?0:1}function da(t,n,e,r,i){var a=t[0]-n[0],o=t[1]-n[1],u=(i?r:-r)/Math.sqrt(a*a+o*o),s=u*o,c=-u*a,l=t[0]+s,h=t[1]+c,f=n[0]+s,d=n[1]+c,p=(l+f)/2,g=(h+d)/2,y=f-l,m=d-h,v=y*y+m*m,_=e-r,b=l*d-f*h,x=(0>m?-1:1)*Math.sqrt(_*_*v-b*b),w=(b*m-y*x)/v,k=(-b*y-m*x)/v,A=(b*m+y*x)/v,E=(-b*y+m*x)/v,M=w-p,D=k-g,S=A-p,T=E-g;return M*M+D*D>S*S+T*T&&(w=A,k=E),[[w-s,k-c],[w*e/_,k*e/_]]}function pa(t){function n(n){function o(){c.push("M",a(t(l),u))}for(var s,c=[],l=[],h=-1,f=n.length,d=Dt(e),p=Dt(r);++h<f;)i.call(this,s=n[h],h)?l.push([+d.call(this,s,h),+p.call(this,s,h)]):l.length&&(o(),l=[]);return l.length&&o(),c.length?c.join(""):null}var e=Te,r=Ce,i=Cn,a=ga,o=a.key,u=.7;return n.x=function(t){return arguments.length?(e=t,n):e},n.y=function(t){return arguments.length?(r=t,
|
||
n):r},n.defined=function(t){return arguments.length?(i=t,n):i},n.interpolate=function(t){return arguments.length?(o="function"==typeof t?a=t:(a=Ss.get(t)||ga).key,n):o},n.tension=function(t){return arguments.length?(u=t,n):u},n}function ga(t){return t.join("L")}function ya(t){return ga(t)+"Z"}function ma(t){for(var n=0,e=t.length,r=t[0],i=[r[0],",",r[1]];++n<e;)i.push("H",(r[0]+(r=t[n])[0])/2,"V",r[1]);return e>1&&i.push("H",r[0]),i.join("")}function va(t){for(var n=0,e=t.length,r=t[0],i=[r[0],",",r[1]];++n<e;)i.push("V",(r=t[n])[1],"H",r[0]);return i.join("")}function _a(t){for(var n=0,e=t.length,r=t[0],i=[r[0],",",r[1]];++n<e;)i.push("H",(r=t[n])[0],"V",r[1]);return i.join("")}function ba(t,n){return t.length<4?ga(t):t[1]+ka(t.slice(1,-1),Aa(t,n))}function xa(t,n){return t.length<3?ga(t):t[0]+ka((t.push(t[0]),t),Aa([t[t.length-2]].concat(t,[t[1]]),n))}function wa(t,n){return t.length<3?ga(t):t[0]+ka(t,Aa(t,n))}function ka(t,n){if(n.length<1||t.length!=n.length&&t.length!=n.length+2)return ga(t);var e=t.length!=n.length,r="",i=t[0],a=t[1],o=n[0],u=o,s=1;if(e&&(r+="Q"+(a[0]-2*o[0]/3)+","+(a[1]-2*o[1]/3)+","+a[0]+","+a[1],i=t[1],s=2),n.length>1){u=n[1],a=t[s],s++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(a[0]-u[0])+","+(a[1]-u[1])+","+a[0]+","+a[1];for(var c=2;c<n.length;c++,s++)a=t[s],u=n[c],r+="S"+(a[0]-u[0])+","+(a[1]-u[1])+","+a[0]+","+a[1]}if(e){var l=t[s];r+="Q"+(a[0]+2*u[0]/3)+","+(a[1]+2*u[1]/3)+","+l[0]+","+l[1]}return r}function Aa(t,n){for(var e,r=[],i=(1-n)/2,a=t[0],o=t[1],u=1,s=t.length;++u<s;)e=a,a=o,o=t[u],r.push([i*(o[0]-e[0]),i*(o[1]-e[1])]);return r}function Ea(t){if(t.length<3)return ga(t);var n=1,e=t.length,r=t[0],i=r[0],a=r[1],o=[i,i,i,(r=t[1])[0]],u=[a,a,a,r[1]],s=[i,",",a,"L",Ta(Fs,o),",",Ta(Fs,u)];for(t.push(t[e-1]);++n<=e;)r=t[n],o.shift(),o.push(r[0]),u.shift(),u.push(r[1]),Ca(s,o,u);return t.pop(),s.push("L",r),s.join("")}function Ma(t){if(t.length<4)return ga(t);for(var n,e=[],r=-1,i=t.length,a=[0],o=[0];++r<3;)n=t[r],a.push(n[0]),o.push(n[1]);for(e.push(Ta(Fs,a)+","+Ta(Fs,o)),--r;++r<i;)n=t[r],a.shift(),a.push(n[0]),o.shift(),o.push(n[1]),Ca(e,a,o);return e.join("")}function Da(t){for(var n,e,r=-1,i=t.length,a=i+4,o=[],u=[];++r<4;)e=t[r%i],o.push(e[0]),u.push(e[1]);for(n=[Ta(Fs,o),",",Ta(Fs,u)],--r;++r<a;)e=t[r%i],o.shift(),o.push(e[0]),u.shift(),u.push(e[1]),Ca(n,o,u);return n.join("")}function Sa(t,n){var e=t.length-1;if(e)for(var r,i,a=t[0][0],o=t[0][1],u=t[e][0]-a,s=t[e][1]-o,c=-1;++c<=e;)r=t[c],i=c/e,r[0]=n*r[0]+(1-n)*(a+i*u),r[1]=n*r[1]+(1-n)*(o+i*s);return Ea(t)}function Ta(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}function Ca(t,n,e){t.push("C",Ta(Ts,n),",",Ta(Ts,e),",",Ta(Cs,n),",",Ta(Cs,e),",",Ta(Fs,n),",",Ta(Fs,e))}function Fa(t,n){return(n[1]-t[1])/(n[0]-t[0])}function Oa(t){for(var n=0,e=t.length-1,r=[],i=t[0],a=t[1],o=r[0]=Fa(i,a);++n<e;)r[n]=(o+(o=Fa(i=a,a=t[n+1])))/2;return r[n]=o,r}function La(t){for(var n,e,r,i,a=[],o=Oa(t),u=-1,s=t.length-1;++u<s;)n=Fa(t[u],t[u+1]),go(n)<Fo?o[u]=o[u+1]=0:(e=o[u]/n,r=o[u+1]/n,i=e*e+r*r,i>9&&(i=3*n/Math.sqrt(i),o[u]=i*e,o[u+1]=i*r));for(u=-1;++u<=s;)i=(t[Math.min(s,u+1)][0]-t[Math.max(0,u-1)][0])/(6*(1+o[u]*o[u])),a.push([i||0,o[u]*i||0]);return a}function Ia(t){return t.length<3?ga(t):t[0]+ka(t,La(t))}function Na(t){for(var n,e,r,i=-1,a=t.length;++i<a;)n=t[i],e=n[0],r=n[1]-Po,n[0]=e*Math.cos(r),n[1]=e*Math.sin(r);return t}function Pa(t){function n(n){function s(){g.push("M",u(t(m),h),l,c(t(y.reverse()),h),"Z")}for(var f,d,p,g=[],y=[],m=[],v=-1,_=n.length,b=Dt(e),x=Dt(i),w=e===r?function(){return d}:Dt(r),k=i===a?function(){return p}:Dt(a);++v<_;)o.call(this,f=n[v],v)?(y.push([d=+b.call(this,f,v),p=+x.call(this,f,v)]),m.push([+w.call(this,f,v),+k.call(this,f,v)])):y.length&&(s(),y=[],m=[]);return y.length&&s(),g.length?g.join(""):null}var e=Te,r=Te,i=0,a=Ce,o=Cn,u=ga,s=u.key,c=u,l="L",h=.7;return n.x=function(t){return arguments.length?(e=r=t,n):r},n.x0=function(t){return arguments.length?(e=t,n):e},n.x1=function(t){return arguments.length?(r=t,n):r},n.y=function(t){return arguments.length?(i=a=t,n):a},n.y0=function(t){return arguments.length?(i=t,n):i},n.y1=function(t){return arguments.length?(a=t,n):a},n.defined=function(t){return arguments.length?(o=t,n):o},n.interpolate=function(t){return arguments.length?(s="function"==typeof t?u=t:(u=Ss.get(t)||ga).key,c=u.reverse||u,l=u.closed?"M":"L",n):s},n.tension=function(t){return arguments.length?(h=t,n):h},n}function Ba(t){return t.radius}function Ra(t){return[t.x,t.y]}function ja(t){return function(){var n=t.apply(this,arguments),e=n[0],r=n[1]-Po;return[e*Math.cos(r),e*Math.sin(r)]}}function Ya(){return 64}function Ua(){return"circle"}function $a(t){var n=Math.sqrt(t/Lo);return"M0,"+n+"A"+n+","+n+" 0 1,1 0,"+-n+"A"+n+","+n+" 0 1,1 0,"+n+"Z"}function za(t){return function(){var n,e;(n=this[t])&&(e=n[n.active])&&(--n.count?delete n[n.active]:delete this[t],n.active+=.5,e.event&&e.event.interrupt.call(this,this.__data__,e.index))}}function qa(t,n,e){return bo(t,Rs),t.namespace=n,t.id=e,t}function Wa(t,n,e,r){var i=t.id,a=t.namespace;return q(t,"function"==typeof e?function(t,o,u){t[a][i].tween.set(n,r(e.call(t,t.__data__,o,u)))}:(e=r(e),function(t){t[a][i].tween.set(n,e)}))}function Ha(t){return null==t&&(t=""),function(){this.textContent=t}}function Ga(t){return null==t?"__transition__":"__transition_"+t+"__"}function Va(t,n,e,r,i){var a=t[e]||(t[e]={active:0,count:0}),o=a[r];if(!o){var u=i.time;o=a[r]={tween:new l,time:u,delay:i.delay,duration:i.duration,ease:i.ease,index:n},i=null,++a.count,eo.timer(function(i){function s(e){if(a.active>r)return l();var i=a[a.active];i&&(--a.count,delete a[a.active],i.event&&i.event.interrupt.call(t,t.__data__,i.index)),a.active=r,o.event&&o.event.start.call(t,t.__data__,n),o.tween.forEach(function(e,r){(r=r.call(t,t.__data__,n))&&g.push(r)}),f=o.ease,h=o.duration,eo.timer(function(){return p.c=c(e||1)?Cn:c,1},0,u)}function c(e){if(a.active!==r)return 1;for(var i=e/h,u=f(i),s=g.length;s>0;)g[--s].call(t,u);return i>=1?(o.event&&o.event.end.call(t,t.__data__,n),l()):void 0}function l(){return--a.count?delete a[r]:delete t[e],1}var h,f,d=o.delay,p=iu,g=[];return p.t=d+u,i>=d?s(i-d):void(p.c=s)},0,u)}}function Za(t,n,e){t.attr("transform",function(t){var r=n(t);return"translate("+(isFinite(r)?r:e(t))+",0)"})}function Xa(t,n,e){t.attr("transform",function(t){var r=n(t);return"translate(0,"+(isFinite(r)?r:e(t))+")"})}function Ka(t){return t.toISOString()}function Qa(t,n,e){function r(n){return t(n)}function i(t,e){var r=t[1]-t[0],i=r/e,a=eo.bisect(Gs,i);return a==Gs.length?[n.year,Gi(t.map(function(t){return t/31536e6}),e)[2]]:a?n[i/Gs[a-1]<Gs[a]/i?a-1:a]:[Xs,Gi(t,e)[2]]}return r.invert=function(n){return Ja(t.invert(n))},r.domain=function(n){return arguments.length?(t.domain(n),r):t.domain().map(Ja)},r.nice=function(t,n){function e(e){return!isNaN(e)&&!t.range(e,Ja(+e+1),n).length}var a=r.domain(),o=Ri(a),u=null==t?i(o,10):"number"==typeof t&&i(o,t);return u&&(t=u[0],n=u[1]),r.domain(Ui(a,n>1?{floor:function(n){for(;e(n=t.floor(n));)n=Ja(n-1);return n},ceil:function(n){for(;e(n=t.ceil(n));)n=Ja(+n+1);return n}}:t))},r.ticks=function(t,n){var e=Ri(r.domain()),a=null==t?i(e,10):"number"==typeof t?i(e,t):!t.range&&[{range:t},n];return a&&(t=a[0],n=a[1]),t.range(e[0],Ja(+e[1]+1),1>n?1:n)},r.tickFormat=function(){return e},r.copy=function(){return Qa(t.copy(),n,e)},Wi(r,t)}function Ja(t){return new Date(t)}function to(t){return JSON.parse(t.responseText)}function no(t){var n=ao.createRange();return n.selectNode(ao.body),n.createContextualFragment(t.responseText)}var eo={version:"3.5.6"},ro=[].slice,io=function(t){return ro.call(t)},ao=this.document;if(ao)try{io(ao.documentElement.childNodes)[0].nodeType}catch(oo){io=function(t){for(var n=t.length,e=new Array(n);n--;)e[n]=t[n];return e}}if(Date.now||(Date.now=function(){return+new Date}),ao)try{ao.createElement("DIV").style.setProperty("opacity",0,"")}catch(uo){var so=this.Element.prototype,co=so.setAttribute,lo=so.setAttributeNS,ho=this.CSSStyleDeclaration.prototype,fo=ho.setProperty;so.setAttribute=function(t,n){co.call(this,t,n+"")},so.setAttributeNS=function(t,n,e){lo.call(this,t,n,e+"")},ho.setProperty=function(t,n,e){fo.call(this,t,n+"",e)}}eo.ascending=r,eo.descending=function(t,n){return t>n?-1:n>t?1:n>=t?0:0/0},eo.min=function(t,n){var e,r,i=-1,a=t.length;if(1===arguments.length){for(;++i<a;)if(null!=(r=t[i])&&r>=r){e=r;break}for(;++i<a;)null!=(r=t[i])&&e>r&&(e=r)}else{for(;++i<a;)if(null!=(r=n.call(t,t[i],i))&&r>=r){e=r;break}for(;++i<a;)null!=(r=n.call(t,t[i],i))&&e>r&&(e=r)}return e},eo.max=function(t,n){var e,r,i=-1,a=t.length;if(1===arguments.length){for(;++i<a;)if(null!=(r=t[i])&&r>=r){e=r;break}for(;++i<a;)null!=(r=t[i])&&r>e&&(e=r)}else{for(;++i<a;)if(null!=(r=n.call(t,t[i],i))&&r>=r){e=r;break}for(;++i<a;)null!=(r=n.call(t,t[i],i))&&r>e&&(e=r)}return e},eo.extent=function(t,n){var e,r,i,a=-1,o=t.length;if(1===arguments.length){for(;++a<o;)if(null!=(r=t[a])&&r>=r){e=i=r;break}for(;++a<o;)null!=(r=t[a])&&(e>r&&(e=r),r>i&&(i=r))}else{for(;++a<o;)if(null!=(r=n.call(t,t[a],a))&&r>=r){e=i=r;break}for(;++a<o;)null!=(r=n.call(t,t[a],a))&&(e>r&&(e=r),r>i&&(i=r))}return[e,i]},eo.sum=function(t,n){var e,r=0,i=t.length,o=-1;if(1===arguments.length)for(;++o<i;)a(e=+t[o])&&(r+=e);else for(;++o<i;)a(e=+n.call(t,t[o],o))&&(r+=e);return r},eo.mean=function(t,n){var e,r=0,o=t.length,u=-1,s=o;if(1===arguments.length)for(;++u<o;)a(e=i(t[u]))?r+=e:--s;else for(;++u<o;)a(e=i(n.call(t,t[u],u)))?r+=e:--s;return s?r/s:void 0},eo.quantile=function(t,n){var e=(t.length-1)*n+1,r=Math.floor(e),i=+t[r-1],a=e-r;return a?i+a*(t[r]-i):i},eo.median=function(t,n){var e,o=[],u=t.length,s=-1;if(1===arguments.length)for(;++s<u;)a(e=i(t[s]))&&o.push(e);else for(;++s<u;)a(e=i(n.call(t,t[s],s)))&&o.push(e);return o.length?eo.quantile(o.sort(r),.5):void 0},eo.variance=function(t,n){var e,r,o=t.length,u=0,s=0,c=-1,l=0;if(1===arguments.length)for(;++c<o;)a(e=i(t[c]))&&(r=e-u,u+=r/++l,s+=r*(e-u));else for(;++c<o;)a(e=i(n.call(t,t[c],c)))&&(r=e-u,u+=r/++l,s+=r*(e-u));return l>1?s/(l-1):void 0},eo.deviation=function(){var t=eo.variance.apply(this,arguments);return t?Math.sqrt(t):t};var po=o(r);eo.bisectLeft=po.left,eo.bisect=eo.bisectRight=po.right,eo.bisector=function(t){return o(1===t.length?function(n,e){return r(t(n),e)}:t)},eo.shuffle=function(t,n,e){(a=arguments.length)<3&&(e=t.length,2>a&&(n=0));for(var r,i,a=e-n;a;)i=Math.random()*a--|0,r=t[a+n],t[a+n]=t[i+n],t[i+n]=r;return t},eo.permute=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},eo.pairs=function(t){for(var n,e=0,r=t.length-1,i=t[0],a=new Array(0>r?0:r);r>e;)a[e]=[n=i,i=t[++e]];return a},eo.zip=function(){if(!(r=arguments.length))return[];for(var t=-1,n=eo.min(arguments,u),e=new Array(n);++t<n;)for(var r,i=-1,a=e[t]=new Array(r);++i<r;)a[i]=arguments[i][t];return e},eo.transpose=function(t){return eo.zip.apply(eo,t)},eo.keys=function(t){var n=[];for(var e in t)n.push(e);return n},eo.values=function(t){var n=[];for(var e in t)n.push(t[e]);return n},eo.entries=function(t){var n=[];for(var e in t)n.push({key:e,value:t[e]});return n},eo.merge=function(t){for(var n,e,r,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(e=new Array(o);--i>=0;)for(r=t[i],n=r.length;--n>=0;)e[--o]=r[n];return e};var go=Math.abs;eo.range=function(t,n,e){if(arguments.length<3&&(e=1,arguments.length<2&&(n=t,t=0)),(n-t)/e===1/0)throw new Error("infinite range");var r,i=[],a=s(go(e)),o=-1;if(t*=a,n*=a,e*=a,0>e)for(;(r=t+e*++o)>n;)i.push(r/a);else for(;(r=t+e*++o)<n;)i.push(r/a);return i},eo.map=function(t,n){var e=new l;if(t instanceof l)t.forEach(function(t,n){e.set(t,n)});else if(Array.isArray(t)){var r,i=-1,a=t.length;if(1===arguments.length)for(;++i<a;)e.set(i,t[i]);else for(;++i<a;)e.set(n.call(t,r=t[i],i),r)}else for(var o in t)e.set(o,t[o]);return e};var yo="__proto__",mo="\x00";c(l,{has:d,get:function(t){return this._[h(t)]},set:function(t,n){return this._[h(t)]=n},remove:p,keys:g,values:function(){var t=[];for(var n in this._)t.push(this._[n]);return t},entries:function(){var t=[];for(var n in this._)t.push({key:f(n),value:this._[n]});return t},size:y,empty:m,forEach:function(t){for(var n in this._)t.call(this,f(n),this._[n])}}),eo.nest=function(){function t(n,o,u){if(u>=a.length)return r?r.call(i,o):e?o.sort(e):o;for(var s,c,h,f,d=-1,p=o.length,g=a[u++],y=new l;++d<p;)(f=y.get(s=g(c=o[d])))?f.push(c):y.set(s,[c]);return n?(c=n(),h=function(e,r){c.set(e,t(n,r,u))}):(c={},h=function(e,r){c[e]=t(n,r,u)}),y.forEach(h),c}function n(t,e){if(e>=a.length)return t;var r=[],i=o[e++];return t.forEach(function(t,i){r.push({key:t,values:n(i,e)})}),i?r.sort(function(t,n){return i(t.key,n.key)}):r}var e,r,i={},a=[],o=[];return i.map=function(n,e){return t(e,n,0)},i.entries=function(e){return n(t(eo.map,e,0),0)},i.key=function(t){return a.push(t),i},i.sortKeys=function(t){return o[a.length-1]=t,i},i.sortValues=function(t){return e=t,i},i.rollup=function(t){return r=t,i},i},eo.set=function(t){var n=new v;if(t)for(var e=0,r=t.length;r>e;++e)n.add(t[e]);return n},c(v,{has:d,add:function(t){return this._[h(t+="")]=!0,t},remove:p,values:g,size:y,empty:m,forEach:function(t){for(var n in this._)t.call(this,f(n))}}),eo.behavior={},eo.rebind=function(t,n){for(var e,r=1,i=arguments.length;++r<i;)t[e=arguments[r]]=b(t,n,n[e]);return t};var vo=["webkit","ms","moz","Moz","o","O"];eo.dispatch=function(){for(var t=new k,n=-1,e=arguments.length;++n<e;)t[arguments[n]]=A(t);return t},k.prototype.on=function(t,n){var e=t.indexOf("."),r="";if(e>=0&&(r=t.slice(e+1),t=t.slice(0,e)),t)return arguments.length<2?this[t].on(r):this[t].on(r,n);if(2===arguments.length){if(null==n)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},eo.event=null,eo.requote=function(t){return t.replace(_o,"\\$&")};var _o=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,bo={}.__proto__?function(t,n){t.__proto__=n}:function(t,n){for(var e in n)t[e]=n[e]},xo=function(t,n){return n.querySelector(t)},wo=function(t,n){return n.querySelectorAll(t)},ko=function(t,n){var e=t.matches||t[x(t,"matchesSelector")];return(ko=function(t,n){return e.call(t,n)})(t,n)};"function"==typeof Sizzle&&(xo=function(t,n){return Sizzle(t,n)[0]||null},wo=Sizzle,ko=Sizzle.matchesSelector),eo.selection=function(){return eo.select(ao.documentElement)};var Ao=eo.selection.prototype=[];Ao.select=function(t){var n,e,r,i,a=[];t=T(t);for(var o=-1,u=this.length;++o<u;){a.push(n=[]),n.parentNode=(r=this[o]).parentNode;for(var s=-1,c=r.length;++s<c;)(i=r[s])?(n.push(e=t.call(i,i.__data__,s,o)),e&&"__data__"in i&&(e.__data__=i.__data__)):n.push(null)}return S(a)},Ao.selectAll=function(t){var n,e,r=[];t=C(t);for(var i=-1,a=this.length;++i<a;)for(var o=this[i],u=-1,s=o.length;++u<s;)(e=o[u])&&(r.push(n=io(t.call(e,e.__data__,u,i))),n.parentNode=e);return S(r)};var Eo={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};eo.ns={prefix:Eo,qualify:function(t){var n=t.indexOf(":"),e=t;return n>=0&&(e=t.slice(0,n),t=t.slice(n+1)),Eo.hasOwnProperty(e)?{space:Eo[e],local:t}:t}},Ao.attr=function(t,n){if(arguments.length<2){if("string"==typeof t){var e=this.node();return t=eo.ns.qualify(t),t.local?e.getAttributeNS(t.space,t.local):e.getAttribute(t)}for(n in t)this.each(F(n,t[n]));return this}return this.each(F(t,n))},Ao.classed=function(t,n){if(arguments.length<2){if("string"==typeof t){var e=this.node(),r=(t=I(t)).length,i=-1;if(n=e.classList){for(;++i<r;)if(!n.contains(t[i]))return!1}else for(n=e.getAttribute("class");++i<r;)if(!L(t[i]).test(n))return!1;return!0}for(n in t)this.each(N(n,t[n]));return this}return this.each(N(t,n))},Ao.style=function(t,n,r){var i=arguments.length;if(3>i){if("string"!=typeof t){2>i&&(n="");for(r in t)this.each(B(r,t[r],n));return this}if(2>i){var a=this.node();return e(a).getComputedStyle(a,null).getPropertyValue(t)}r=""}return this.each(B(t,n,r))},Ao.property=function(t,n){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(n in t)this.each(R(n,t[n]));return this}return this.each(R(t,n))},Ao.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},Ao.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},Ao.append=function(t){return t=j(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},Ao.insert=function(t,n){return t=j(t),n=T(n),this.select(function(){return this.insertBefore(t.apply(this,arguments),n.apply(this,arguments)||null)})},Ao.remove=function(){return this.each(Y)},Ao.data=function(t,n){function e(t,e){var r,i,a,o=t.length,h=e.length,f=Math.min(o,h),d=new Array(h),p=new Array(h),g=new Array(o);if(n){var y,m=new l,v=new Array(o);for(r=-1;++r<o;)m.has(y=n.call(i=t[r],i.__data__,r))?g[r]=i:m.set(y,i),v[r]=y;for(r=-1;++r<h;)(i=m.get(y=n.call(e,a=e[r],r)))?i!==!0&&(d[r]=i,i.__data__=a):p[r]=U(a),m.set(y,!0);for(r=-1;++r<o;)m.get(v[r])!==!0&&(g[r]=t[r])}else{for(r=-1;++r<f;)i=t[r],a=e[r],i?(i.__data__=a,d[r]=i):p[r]=U(a);for(;h>r;++r)p[r]=U(e[r]);for(;o>r;++r)g[r]=t[r]}p.update=d,p.parentNode=d.parentNode=g.parentNode=t.parentNode,u.push(p),s.push(d),c.push(g)}var r,i,a=-1,o=this.length;if(!arguments.length){for(t=new Array(o=(r=this[0]).length);++a<o;)(i=r[a])&&(t[a]=i.__data__);return t}var u=W([]),s=S([]),c=S([]);if("function"==typeof t)for(;++a<o;)e(r=this[a],t.call(r,r.parentNode.__data__,a));else for(;++a<o;)e(r=this[a],t);return s.enter=function(){return u},s.exit=function(){return c},s},Ao.datum=function(t){return arguments.length?this.property("__data__",t):this.property("__data__")},Ao.filter=function(t){var n,e,r,i=[];"function"!=typeof t&&(t=$(t));for(var a=0,o=this.length;o>a;a++){i.push(n=[]),n.parentNode=(e=this[a]).parentNode;for(var u=0,s=e.length;s>u;u++)(r=e[u])&&t.call(r,r.__data__,u,a)&&n.push(r)}return S(i)},Ao.order=function(){for(var t=-1,n=this.length;++t<n;)for(var e,r=this[t],i=r.length-1,a=r[i];--i>=0;)(e=r[i])&&(a&&a!==e.nextSibling&&a.parentNode.insertBefore(e,a),a=e);return this},Ao.sort=function(t){t=z.apply(this,arguments);for(var n=-1,e=this.length;++n<e;)this[n].sort(t);return this.order()},Ao.each=function(t){return q(this,function(n,e,r){t.call(n,n.__data__,e,r)})},Ao.call=function(t){var n=io(arguments);return t.apply(n[0]=this,n),this},Ao.empty=function(){return!this.node()},Ao.node=function(){for(var t=0,n=this.length;n>t;t++)for(var e=this[t],r=0,i=e.length;i>r;r++){var a=e[r];if(a)return a}return null},Ao.size=function(){var t=0;return q(this,function(){++t}),t};var Mo=[];eo.selection.enter=W,eo.selection.enter.prototype=Mo,Mo.append=Ao.append,Mo.empty=Ao.empty,Mo.node=Ao.node,Mo.call=Ao.call,Mo.size=Ao.size,Mo.select=function(t){for(var n,e,r,i,a,o=[],u=-1,s=this.length;++u<s;){r=(i=this[u]).update,o.push(n=[]),n.parentNode=i.parentNode;for(var c=-1,l=i.length;++c<l;)(a=i[c])?(n.push(r[c]=e=t.call(i.parentNode,a.__data__,c,u)),e.__data__=a.__data__):n.push(null)}return S(o)},Mo.insert=function(t,n){return arguments.length<2&&(n=H(this)),Ao.insert.call(this,t,n)},eo.select=function(n){var e;return"string"==typeof n?(e=[xo(n,ao)],e.parentNode=ao.documentElement):(e=[n],e.parentNode=t(n)),S([e])},eo.selectAll=function(t){var n;return"string"==typeof t?(n=io(wo(t,ao)),n.parentNode=ao.documentElement):(n=t,n.parentNode=null),S([n])},Ao.on=function(t,n,e){var r=arguments.length;if(3>r){if("string"!=typeof t){2>r&&(n=!1);for(e in t)this.each(G(e,t[e],n));return this}if(2>r)return(r=this.node()["__on"+t])&&r._;e=!1}return this.each(G(t,n,e))};var Do=eo.map({mouseenter:"mouseover",mouseleave:"mouseout"});ao&&Do.forEach(function(t){"on"+t in ao&&Do.remove(t)});var So,To=0;eo.mouse=function(t){return K(t,M())};var Co=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;eo.touch=function(t,n,e){if(arguments.length<3&&(e=n,n=M().changedTouches),n)for(var r,i=0,a=n.length;a>i;++i)if((r=n[i]).identifier===e)return K(t,r)},eo.behavior.drag=function(){function t(){this.on("mousedown.drag",a).on("touchstart.drag",o)}function n(t,n,e,a,o){return function(){function u(){var t,e,r=n(f,g);r&&(t=r[0]-_[0],e=r[1]-_[1],p|=t|e,_=r,d({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:t,dy:e}))}function s(){n(f,g)&&(m.on(a+y,null).on(o+y,null),v(p&&eo.event.target===h),d({type:"dragend"}))}var c,l=this,h=eo.event.target,f=l.parentNode,d=r.of(l,arguments),p=0,g=t(),y=".drag"+(null==g?"":"-"+g),m=eo.select(e(h)).on(a+y,u).on(o+y,s),v=X(h),_=n(f,g);i?(c=i.apply(l,arguments),c=[c.x-_[0],c.y-_[1]]):c=[0,0],d({type:"dragstart"})}}var r=D(t,"drag","dragstart","dragend"),i=null,a=n(w,eo.mouse,e,"mousemove","mouseup"),o=n(Q,eo.touch,_,"touchmove","touchend");return t.origin=function(n){return arguments.length?(i=n,t):i},eo.rebind(t,r,"on")},eo.touches=function(t,n){return arguments.length<2&&(n=M().touches),n?io(n).map(function(n){var e=K(t,n);return e.identifier=n.identifier,e}):[]};var Fo=1e-6,Oo=Fo*Fo,Lo=Math.PI,Io=2*Lo,No=Io-Fo,Po=Lo/2,Bo=Lo/180,Ro=180/Lo,jo=Math.SQRT2,Yo=2,Uo=4;eo.interpolateZoom=function(t,n){function e(t){var n=t*v;if(m){var e=it(g),o=a/(Yo*f)*(e*at(jo*n+g)-rt(g));return[r+o*c,i+o*l,a*e/it(jo*n+g)]}return[r+t*c,i+t*l,a*Math.exp(jo*n)]}var r=t[0],i=t[1],a=t[2],o=n[0],u=n[1],s=n[2],c=o-r,l=u-i,h=c*c+l*l,f=Math.sqrt(h),d=(s*s-a*a+Uo*h)/(2*a*Yo*f),p=(s*s-a*a-Uo*h)/(2*s*Yo*f),g=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(p*p+1)-p),m=y-g,v=(m||Math.log(s/a))/jo;return e.duration=1e3*v,e},eo.behavior.zoom=function(){function t(t){t.on(F,h).on(zo+".zoom",d).on("dblclick.zoom",p).on(I,f)}function n(t){return[(t[0]-A.x)/A.k,(t[1]-A.y)/A.k]}function r(t){return[t[0]*A.k+A.x,t[1]*A.k+A.y]}function i(t){A.k=Math.max(S[0],Math.min(S[1],t))}function a(t,n){n=r(n),A.x+=t[0]-n[0],A.y+=t[1]-n[1]}function o(n,e,r,o){n.__chart__={x:A.x,y:A.y,k:A.k},i(Math.pow(2,o)),a(y=e,r),n=eo.select(n),T>0&&(n=n.transition().duration(T)),n.call(t.event)}function u(){x&&x.domain(b.range().map(function(t){return(t-A.x)/A.k}).map(b.invert)),k&&k.domain(w.range().map(function(t){return(t-A.y)/A.k}).map(w.invert))}function s(t){C++||t({type:"zoomstart"})}function c(t){u(),t({type:"zoom",scale:A.k,translate:[A.x,A.y]})}function l(t){--C||(t({type:"zoomend"}),y=null)}function h(){function t(){h=1,a(eo.mouse(i),d),c(u)}function r(){f.on(O,null).on(L,null),p(h&&eo.event.target===o),l(u)}var i=this,o=eo.event.target,u=N.of(i,arguments),h=0,f=eo.select(e(i)).on(O,t).on(L,r),d=n(eo.mouse(i)),p=X(i);Bs.call(i),s(u)}function f(){function t(){var t=eo.touches(p);return d=A.k,t.forEach(function(t){t.identifier in y&&(y[t.identifier]=n(t))}),t}function e(){var n=eo.event.target;eo.select(n).on(b,r).on(x,u),w.push(n);for(var e=eo.event.changedTouches,i=0,a=e.length;a>i;++i)y[e[i].identifier]=null;var s=t(),c=Date.now();if(1===s.length){if(500>c-_){var l=s[0];o(p,l,y[l.identifier],Math.floor(Math.log(A.k)/Math.LN2)+1),E()}_=c}else if(s.length>1){var l=s[0],h=s[1],f=l[0]-h[0],d=l[1]-h[1];m=f*f+d*d}}function r(){var t,n,e,r,o=eo.touches(p);Bs.call(p);for(var u=0,s=o.length;s>u;++u,r=null)if(e=o[u],r=y[e.identifier]){if(n)break;t=e,n=r}if(r){var l=(l=e[0]-t[0])*l+(l=e[1]-t[1])*l,h=m&&Math.sqrt(l/m);t=[(t[0]+e[0])/2,(t[1]+e[1])/2],n=[(n[0]+r[0])/2,(n[1]+r[1])/2],i(h*d)}_=null,a(t,n),c(g)}function u(){if(eo.event.touches.length){for(var n=eo.event.changedTouches,e=0,r=n.length;r>e;++e)delete y[n[e].identifier];for(var i in y)return void t()}eo.selectAll(w).on(v,null),k.on(F,h).on(I,f),M(),l(g)}var d,p=this,g=N.of(p,arguments),y={},m=0,v=".zoom-"+eo.event.changedTouches[0].identifier,b="touchmove"+v,x="touchend"+v,w=[],k=eo.select(p),M=X(p);e(),s(g),k.on(F,null).on(I,e)}function d(){var t=N.of(this,arguments);v?clearTimeout(v):(Bs.call(this),g=n(y=m||eo.mouse(this)),s(t)),v=setTimeout(function(){v=null,l(t)},50),E(),i(Math.pow(2,.002*$o())*A.k),a(y,g),c(t)}function p(){var t=eo.mouse(this),e=Math.log(A.k)/Math.LN2;o(this,t,n(t),eo.event.shiftKey?Math.ceil(e)-1:Math.floor(e)+1)}var g,y,m,v,_,b,x,w,k,A={x:0,y:0,k:1},M=[960,500],S=qo,T=250,C=0,F="mousedown.zoom",O="mousemove.zoom",L="mouseup.zoom",I="touchstart.zoom",N=D(t,"zoomstart","zoom","zoomend");return zo||(zo="onwheel"in ao?($o=function(){return-eo.event.deltaY*(eo.event.deltaMode?120:1)},"wheel"):"onmousewheel"in ao?($o=function(){return eo.event.wheelDelta},"mousewheel"):($o=function(){return-eo.event.detail},"MozMousePixelScroll")),t.event=function(t){t.each(function(){var t=N.of(this,arguments),n=A;Ns?eo.select(this).transition().each("start.zoom",function(){A=this.__chart__||{x:0,y:0,k:1},s(t)}).tween("zoom:zoom",function(){var e=M[0],r=M[1],i=y?y[0]:e/2,a=y?y[1]:r/2,o=eo.interpolateZoom([(i-A.x)/A.k,(a-A.y)/A.k,e/A.k],[(i-n.x)/n.k,(a-n.y)/n.k,e/n.k]);return function(n){var r=o(n),u=e/r[2];this.__chart__=A={x:i-r[0]*u,y:a-r[1]*u,k:u},c(t)}}).each("interrupt.zoom",function(){l(t)}).each("end.zoom",function(){l(t)}):(this.__chart__=A,s(t),c(t),l(t))})},t.translate=function(n){return arguments.length?(A={x:+n[0],y:+n[1],k:A.k},u(),t):[A.x,A.y]},t.scale=function(n){return arguments.length?(A={x:A.x,y:A.y,k:+n},u(),t):A.k},t.scaleExtent=function(n){return arguments.length?(S=null==n?qo:[+n[0],+n[1]],t):S},t.center=function(n){return arguments.length?(m=n&&[+n[0],+n[1]],t):m},t.size=function(n){return arguments.length?(M=n&&[+n[0],+n[1]],t):M},t.duration=function(n){return arguments.length?(T=+n,t):T},t.x=function(n){return arguments.length?(x=n,b=n.copy(),A={x:0,y:0,k:1},t):x},t.y=function(n){return arguments.length?(k=n,w=n.copy(),A={x:0,y:0,k:1},t):k},eo.rebind(t,N,"on")};var $o,zo,qo=[0,1/0];eo.color=ut,ut.prototype.toString=function(){return this.rgb()+""},eo.hsl=st;var Wo=st.prototype=new ut;Wo.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new st(this.h,this.s,this.l/t)},Wo.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new st(this.h,this.s,t*this.l)},Wo.rgb=function(){return ct(this.h,this.s,this.l)},eo.hcl=lt;var Ho=lt.prototype=new ut;Ho.brighter=function(t){return new lt(this.h,this.c,Math.min(100,this.l+Go*(arguments.length?t:1)))},Ho.darker=function(t){return new lt(this.h,this.c,Math.max(0,this.l-Go*(arguments.length?t:1)))},Ho.rgb=function(){return ht(this.h,this.c,this.l).rgb()},eo.lab=ft;var Go=18,Vo=.95047,Zo=1,Xo=1.08883,Ko=ft.prototype=new ut;Ko.brighter=function(t){return new ft(Math.min(100,this.l+Go*(arguments.length?t:1)),this.a,this.b)},Ko.darker=function(t){return new ft(Math.max(0,this.l-Go*(arguments.length?t:1)),this.a,this.b)},Ko.rgb=function(){return dt(this.l,this.a,this.b)},eo.rgb=vt;var Qo=vt.prototype=new ut;Qo.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var n=this.r,e=this.g,r=this.b,i=30;return n||e||r?(n&&i>n&&(n=i),e&&i>e&&(e=i),r&&i>r&&(r=i),new vt(Math.min(255,n/t),Math.min(255,e/t),Math.min(255,r/t))):new vt(i,i,i)},Qo.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new vt(t*this.r,t*this.g,t*this.b)},Qo.hsl=function(){return kt(this.r,this.g,this.b)},Qo.toString=function(){return"#"+xt(this.r)+xt(this.g)+xt(this.b)};var Jo=eo.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Jo.forEach(function(t,n){Jo.set(t,_t(n))}),eo.functor=Dt,eo.xhr=St(_),eo.dsv=function(t,n){function e(t,e,a){arguments.length<3&&(a=e,e=null);var o=Tt(t,n,null==e?r:i(e),a);return o.row=function(t){return arguments.length?o.response(null==(e=t)?r:i(t)):e},o}function r(t){return e.parse(t.responseText)}function i(t){return function(n){return e.parse(n.responseText,t)}}function a(n){return n.map(o).join(t)}function o(t){return u.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}var u=new RegExp('["'+t+"\n]"),s=t.charCodeAt(0);return e.parse=function(t,n){var r;return e.parseRows(t,function(t,e){if(r)return r(t,e-1);var i=new Function("d","return {"+t.map(function(t,n){return JSON.stringify(t)+": d["+n+"]"}).join(",")+"}");r=n?function(t,e){return n(i(t),e)}:i})},e.parseRows=function(t,n){function e(){if(l>=c)return o;if(i)return i=!1,a;var n=l;if(34===t.charCodeAt(n)){for(var e=n;e++<c;)if(34===t.charCodeAt(e)){if(34!==t.charCodeAt(e+1))break;++e}l=e+2;var r=t.charCodeAt(e+1);return 13===r?(i=!0,10===t.charCodeAt(e+2)&&++l):10===r&&(i=!0),t.slice(n+1,e).replace(/""/g,'"')}for(;c>l;){var r=t.charCodeAt(l++),u=1;if(10===r)i=!0;else if(13===r)i=!0,10===t.charCodeAt(l)&&(++l,++u);else if(r!==s)continue;return t.slice(n,l-u)}return t.slice(n)}for(var r,i,a={},o={},u=[],c=t.length,l=0,h=0;(r=e())!==o;){for(var f=[];r!==a&&r!==o;)f.push(r),r=e();n&&null==(f=n(f,h++))||u.push(f)}return u},e.format=function(n){if(Array.isArray(n[0]))return e.formatRows(n);var r=new v,i=[];return n.forEach(function(t){for(var n in t)r.has(n)||i.push(r.add(n))}),[i.map(o).join(t)].concat(n.map(function(n){return i.map(function(t){return o(n[t])}).join(t)})).join("\n")},e.formatRows=function(t){return t.map(a).join("\n")},e},eo.csv=eo.dsv(",","text/csv"),eo.tsv=eo.dsv(" ","text/tab-separated-values");var tu,nu,eu,ru,iu,au=this[x(this,"requestAnimationFrame")]||function(t){setTimeout(t,17)};eo.timer=function(t,n,e){var r=arguments.length;2>r&&(n=0),3>r&&(e=Date.now());var i=e+n,a={c:t,t:i,f:!1,n:null};nu?nu.n=a:tu=a,
|
||
nu=a,eu||(ru=clearTimeout(ru),eu=1,au(Ot))},eo.timer.flush=function(){Lt(),It()},eo.round=function(t,n){return n?Math.round(t*(n=Math.pow(10,n)))/n:Math.round(t)};var ou=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Pt);eo.formatPrefix=function(t,n){var e=0;return t&&(0>t&&(t*=-1),n&&(t=eo.round(t,Nt(t,n))),e=1+Math.floor(1e-12+Math.log(t)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),ou[8+e/3]};var uu=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,su=eo.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,n){return t.toPrecision(n)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},r:function(t,n){return(t=eo.round(t,Nt(t,n))).toFixed(Math.max(0,Math.min(20,Nt(t*(1+1e-15),n))))}}),cu=eo.time={},lu=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(){hu.setUTCDate.apply(this._,arguments)},setDay:function(){hu.setUTCDay.apply(this._,arguments)},setFullYear:function(){hu.setUTCFullYear.apply(this._,arguments)},setHours:function(){hu.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){hu.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){hu.setUTCMinutes.apply(this._,arguments)},setMonth:function(){hu.setUTCMonth.apply(this._,arguments)},setSeconds:function(){hu.setUTCSeconds.apply(this._,arguments)},setTime:function(){hu.setTime.apply(this._,arguments)}};var hu=Date.prototype;cu.year=Yt(function(t){return t=cu.day(t),t.setMonth(0,1),t},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t){return t.getFullYear()}),cu.years=cu.year.range,cu.years.utc=cu.year.utc.range,cu.day=Yt(function(t){var n=new lu(2e3,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n},function(t,n){t.setDate(t.getDate()+n)},function(t){return t.getDate()-1}),cu.days=cu.day.range,cu.days.utc=cu.day.utc.range,cu.dayOfYear=function(t){var n=cu.year(t);return Math.floor((t-n-6e4*(t.getTimezoneOffset()-n.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,n){n=7-n;var e=cu[t]=Yt(function(t){return(t=cu.day(t)).setDate(t.getDate()-(t.getDay()+n)%7),t},function(t,n){t.setDate(t.getDate()+7*Math.floor(n))},function(t){var e=cu.year(t).getDay();return Math.floor((cu.dayOfYear(t)+(e+n)%7)/7)-(e!==n)});cu[t+"s"]=e.range,cu[t+"s"].utc=e.utc.range,cu[t+"OfYear"]=function(t){var e=cu.year(t).getDay();return Math.floor((cu.dayOfYear(t)+(e+n)%7)/7)}}),cu.week=cu.sunday,cu.weeks=cu.sunday.range,cu.weeks.utc=cu.sunday.utc.range,cu.weekOfYear=cu.sundayOfYear;var fu={"-":"",_:" ",0:"0"},du=/^\s*\d+/,pu=/^%/;eo.locale=function(t){return{numberFormat:Bt(t),timeFormat:$t(t)}};var gu=eo.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"]});eo.format=gu.numberFormat,eo.geo={},ln.prototype={s:0,t:0,add:function(t){hn(t,this.t,yu),hn(yu.s,this.s,this),this.s?this.t+=yu.t:this.s=yu.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var yu=new ln;eo.geo.stream=function(t,n){t&&mu.hasOwnProperty(t.type)?mu[t.type](t,n):fn(t,n)};var mu={Feature:function(t,n){fn(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r<i;)fn(e[r].geometry,n)}},vu={Sphere:function(t,n){n.sphere()},Point:function(t,n){t=t.coordinates,n.point(t[0],t[1],t[2])},MultiPoint:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)t=e[r],n.point(t[0],t[1],t[2])},LineString:function(t,n){dn(t.coordinates,n,0)},MultiLineString:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)dn(e[r],n,0)},Polygon:function(t,n){pn(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)pn(e[r],n)},GeometryCollection:function(t,n){for(var e=t.geometries,r=-1,i=e.length;++r<i;)fn(e[r],n)}};eo.geo.area=function(t){return _u=0,eo.geo.stream(t,xu),_u};var _u,bu=new ln,xu={sphere:function(){_u+=4*Lo},point:w,lineStart:w,lineEnd:w,polygonStart:function(){bu.reset(),xu.lineStart=gn},polygonEnd:function(){var t=2*bu;_u+=0>t?4*Lo+t:t,xu.lineStart=xu.lineEnd=xu.point=w}};eo.geo.bounds=function(){function t(t,n){_.push(b=[l=t,f=t]),h>n&&(h=n),n>d&&(d=n)}function n(n,e){var r=yn([n*Bo,e*Bo]);if(m){var i=vn(m,r),a=[i[1],-i[0],0],o=vn(a,i);xn(o),o=wn(o);var s=n-p,c=s>0?1:-1,g=o[0]*Ro*c,y=go(s)>180;if(y^(g>c*p&&c*n>g)){var v=o[1]*Ro;v>d&&(d=v)}else if(g=(g+360)%360-180,y^(g>c*p&&c*n>g)){var v=-o[1]*Ro;h>v&&(h=v)}else h>e&&(h=e),e>d&&(d=e);y?p>n?u(l,n)>u(l,f)&&(f=n):u(n,f)>u(l,f)&&(l=n):f>=l?(l>n&&(l=n),n>f&&(f=n)):n>p?u(l,n)>u(l,f)&&(f=n):u(n,f)>u(l,f)&&(l=n)}else t(n,e);m=r,p=n}function e(){x.point=n}function r(){b[0]=l,b[1]=f,x.point=t,m=null}function i(t,e){if(m){var r=t-p;v+=go(r)>180?r+(r>0?360:-360):r}else g=t,y=e;xu.point(t,e),n(t,e)}function a(){xu.lineStart()}function o(){i(g,y),xu.lineEnd(),go(v)>Fo&&(l=-(f=180)),b[0]=l,b[1]=f,m=null}function u(t,n){return(n-=t)<0?n+360:n}function s(t,n){return t[0]-n[0]}function c(t,n){return n[0]<=n[1]?n[0]<=t&&t<=n[1]:t<n[0]||n[1]<t}var l,h,f,d,p,g,y,m,v,_,b,x={point:t,lineStart:e,lineEnd:r,polygonStart:function(){x.point=i,x.lineStart=a,x.lineEnd=o,v=0,xu.polygonStart()},polygonEnd:function(){xu.polygonEnd(),x.point=t,x.lineStart=e,x.lineEnd=r,0>bu?(l=-(f=180),h=-(d=90)):v>Fo?d=90:-Fo>v&&(h=-90),b[0]=l,b[1]=f}};return function(t){d=f=-(l=h=1/0),_=[],eo.geo.stream(t,x);var n=_.length;if(n){_.sort(s);for(var e,r=1,i=_[0],a=[i];n>r;++r)e=_[r],c(e[0],i)||c(e[1],i)?(u(i[0],e[1])>u(i[0],i[1])&&(i[1]=e[1]),u(e[0],i[1])>u(i[0],i[1])&&(i[0]=e[0])):a.push(i=e);for(var o,e,p=-(1/0),n=a.length-1,r=0,i=a[n];n>=r;i=e,++r)e=a[r],(o=u(i[1],e[0]))>p&&(p=o,l=e[0],f=i[1])}return _=b=null,l===1/0||h===1/0?[[0/0,0/0],[0/0,0/0]]:[[l,h],[f,d]]}}(),eo.geo.centroid=function(t){wu=ku=Au=Eu=Mu=Du=Su=Tu=Cu=Fu=Ou=0,eo.geo.stream(t,Lu);var n=Cu,e=Fu,r=Ou,i=n*n+e*e+r*r;return Oo>i&&(n=Du,e=Su,r=Tu,Fo>ku&&(n=Au,e=Eu,r=Mu),i=n*n+e*e+r*r,Oo>i)?[0/0,0/0]:[Math.atan2(e,n)*Ro,et(r/Math.sqrt(i))*Ro]};var wu,ku,Au,Eu,Mu,Du,Su,Tu,Cu,Fu,Ou,Lu={sphere:w,point:An,lineStart:Mn,lineEnd:Dn,polygonStart:function(){Lu.lineStart=Sn},polygonEnd:function(){Lu.lineStart=Mn}},Iu=In(Cn,Rn,Yn,[-Lo,-Lo/2]),Nu=1e9;eo.geo.clipExtent=function(){var t,n,e,r,i,a,o={stream:function(t){return i&&(i.valid=!1),i=a(t),i.valid=!0,i},extent:function(u){return arguments.length?(a=qn(t=+u[0][0],n=+u[0][1],e=+u[1][0],r=+u[1][1]),i&&(i.valid=!1,i=null),o):[[t,n],[e,r]]}};return o.extent([[0,0],[960,500]])},(eo.geo.conicEqualArea=function(){return Wn(Hn)}).raw=Hn,eo.geo.albers=function(){return eo.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},eo.geo.albersUsa=function(){function t(t){var a=t[0],o=t[1];return n=null,e(a,o),n||(r(a,o),n)||i(a,o),n}var n,e,r,i,a=eo.geo.albers(),o=eo.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=eo.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s={point:function(t,e){n=[t,e]}};return t.invert=function(t){var n=a.scale(),e=a.translate(),r=(t[0]-e[0])/n,i=(t[1]-e[1])/n;return(i>=.12&&.234>i&&r>=-.425&&-.214>r?o:i>=.166&&.234>i&&r>=-.214&&-.115>r?u:a).invert(t)},t.stream=function(t){var n=a.stream(t),e=o.stream(t),r=u.stream(t);return{point:function(t,i){n.point(t,i),e.point(t,i),r.point(t,i)},sphere:function(){n.sphere(),e.sphere(),r.sphere()},lineStart:function(){n.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){n.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){n.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){n.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},t.precision=function(n){return arguments.length?(a.precision(n),o.precision(n),u.precision(n),t):a.precision()},t.scale=function(n){return arguments.length?(a.scale(n),o.scale(.35*n),u.scale(n),t.translate(a.translate())):a.scale()},t.translate=function(n){if(!arguments.length)return a.translate();var c=a.scale(),l=+n[0],h=+n[1];return e=a.translate(n).clipExtent([[l-.455*c,h-.238*c],[l+.455*c,h+.238*c]]).stream(s).point,r=o.translate([l-.307*c,h+.201*c]).clipExtent([[l-.425*c+Fo,h+.12*c+Fo],[l-.214*c-Fo,h+.234*c-Fo]]).stream(s).point,i=u.translate([l-.205*c,h+.212*c]).clipExtent([[l-.214*c+Fo,h+.166*c+Fo],[l-.115*c-Fo,h+.234*c-Fo]]).stream(s).point,t},t.scale(1070)};var Pu,Bu,Ru,ju,Yu,Uu,$u={point:w,lineStart:w,lineEnd:w,polygonStart:function(){Bu=0,$u.lineStart=Gn},polygonEnd:function(){$u.lineStart=$u.lineEnd=$u.point=w,Pu+=go(Bu/2)}},zu={point:Vn,lineStart:w,lineEnd:w,polygonStart:w,polygonEnd:w},qu={point:Kn,lineStart:Qn,lineEnd:Jn,polygonStart:function(){qu.lineStart=te},polygonEnd:function(){qu.point=Kn,qu.lineStart=Qn,qu.lineEnd=Jn}};eo.geo.path=function(){function t(t){return t&&("function"==typeof u&&a.pointRadius(+u.apply(this,arguments)),o&&o.valid||(o=i(a)),eo.geo.stream(t,o)),a.result()}function n(){return o=null,t}var e,r,i,a,o,u=4.5;return t.area=function(t){return Pu=0,eo.geo.stream(t,i($u)),Pu},t.centroid=function(t){return Au=Eu=Mu=Du=Su=Tu=Cu=Fu=Ou=0,eo.geo.stream(t,i(qu)),Ou?[Cu/Ou,Fu/Ou]:Tu?[Du/Tu,Su/Tu]:Mu?[Au/Mu,Eu/Mu]:[0/0,0/0]},t.bounds=function(t){return Yu=Uu=-(Ru=ju=1/0),eo.geo.stream(t,i(zu)),[[Ru,ju],[Yu,Uu]]},t.projection=function(t){return arguments.length?(i=(e=t)?t.stream||re(t):_,n()):e},t.context=function(t){return arguments.length?(a=null==(r=t)?new Zn:new ne(t),"function"!=typeof u&&a.pointRadius(u),n()):r},t.pointRadius=function(n){return arguments.length?(u="function"==typeof n?n:(a.pointRadius(+n),+n),t):u},t.projection(eo.geo.albersUsa()).context(null)},eo.geo.transform=function(t){return{stream:function(n){var e=new ie(n);for(var r in t)e[r]=t[r];return e}}},ie.prototype={point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},eo.geo.projection=oe,eo.geo.projectionMutator=ue,(eo.geo.equirectangular=function(){return oe(ce)}).raw=ce.invert=ce,eo.geo.rotation=function(t){function n(n){return n=t(n[0]*Bo,n[1]*Bo),n[0]*=Ro,n[1]*=Ro,n}return t=he(t[0]%360*Bo,t[1]*Bo,t.length>2?t[2]*Bo:0),n.invert=function(n){return n=t.invert(n[0]*Bo,n[1]*Bo),n[0]*=Ro,n[1]*=Ro,n},n},le.invert=ce,eo.geo.circle=function(){function t(){var t="function"==typeof r?r.apply(this,arguments):r,n=he(-t[0]*Bo,-t[1]*Bo,0).invert,i=[];return e(null,null,1,{point:function(t,e){i.push(t=n(t,e)),t[0]*=Ro,t[1]*=Ro}}),{type:"Polygon",coordinates:[i]}}var n,e,r=[0,0],i=6;return t.origin=function(n){return arguments.length?(r=n,t):r},t.angle=function(r){return arguments.length?(e=ge((n=+r)*Bo,i*Bo),t):n},t.precision=function(r){return arguments.length?(e=ge(n*Bo,(i=+r)*Bo),t):i},t.angle(90)},eo.geo.distance=function(t,n){var e,r=(n[0]-t[0])*Bo,i=t[1]*Bo,a=n[1]*Bo,o=Math.sin(r),u=Math.cos(r),s=Math.sin(i),c=Math.cos(i),l=Math.sin(a),h=Math.cos(a);return Math.atan2(Math.sqrt((e=h*o)*e+(e=c*l-s*h*u)*e),s*l+c*h*u)},eo.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:n()}}function n(){return eo.range(Math.ceil(a/y)*y,i,y).map(f).concat(eo.range(Math.ceil(c/m)*m,s,m).map(d)).concat(eo.range(Math.ceil(r/p)*p,e,p).filter(function(t){return go(t%y)>Fo}).map(l)).concat(eo.range(Math.ceil(u/g)*g,o,g).filter(function(t){return go(t%m)>Fo}).map(h))}var e,r,i,a,o,u,s,c,l,h,f,d,p=10,g=p,y=90,m=360,v=2.5;return t.lines=function(){return n().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[f(a).concat(d(s).slice(1),f(i).reverse().slice(1),d(c).reverse().slice(1))]}},t.extent=function(n){return arguments.length?t.majorExtent(n).minorExtent(n):t.minorExtent()},t.majorExtent=function(n){return arguments.length?(a=+n[0][0],i=+n[1][0],c=+n[0][1],s=+n[1][1],a>i&&(n=a,a=i,i=n),c>s&&(n=c,c=s,s=n),t.precision(v)):[[a,c],[i,s]]},t.minorExtent=function(n){return arguments.length?(r=+n[0][0],e=+n[1][0],u=+n[0][1],o=+n[1][1],r>e&&(n=r,r=e,e=n),u>o&&(n=u,u=o,o=n),t.precision(v)):[[r,u],[e,o]]},t.step=function(n){return arguments.length?t.majorStep(n).minorStep(n):t.minorStep()},t.majorStep=function(n){return arguments.length?(y=+n[0],m=+n[1],t):[y,m]},t.minorStep=function(n){return arguments.length?(p=+n[0],g=+n[1],t):[p,g]},t.precision=function(n){return arguments.length?(v=+n,l=me(u,o,90),h=ve(r,e,v),f=me(c,s,90),d=ve(a,i,v),t):v},t.majorExtent([[-180,-90+Fo],[180,90-Fo]]).minorExtent([[-180,-80-Fo],[180,80+Fo]])},eo.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[n||r.apply(this,arguments),e||i.apply(this,arguments)]}}var n,e,r=_e,i=be;return t.distance=function(){return eo.geo.distance(n||r.apply(this,arguments),e||i.apply(this,arguments))},t.source=function(e){return arguments.length?(r=e,n="function"==typeof e?null:e,t):r},t.target=function(n){return arguments.length?(i=n,e="function"==typeof n?null:n,t):i},t.precision=function(){return arguments.length?t:0},t},eo.geo.interpolate=function(t,n){return xe(t[0]*Bo,t[1]*Bo,n[0]*Bo,n[1]*Bo)},eo.geo.length=function(t){return Wu=0,eo.geo.stream(t,Hu),Wu};var Wu,Hu={sphere:w,point:w,lineStart:we,lineEnd:w,polygonStart:w,polygonEnd:w},Gu=ke(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(eo.geo.azimuthalEqualArea=function(){return oe(Gu)}).raw=Gu;var Vu=ke(function(t){var n=Math.acos(t);return n&&n/Math.sin(n)},_);(eo.geo.azimuthalEquidistant=function(){return oe(Vu)}).raw=Vu,(eo.geo.conicConformal=function(){return Wn(Ae)}).raw=Ae,(eo.geo.conicEquidistant=function(){return Wn(Ee)}).raw=Ee;var Zu=ke(function(t){return 1/t},Math.atan);(eo.geo.gnomonic=function(){return oe(Zu)}).raw=Zu,Me.invert=function(t,n){return[t,2*Math.atan(Math.exp(n))-Po]},(eo.geo.mercator=function(){return De(Me)}).raw=Me;var Xu=ke(function(){return 1},Math.asin);(eo.geo.orthographic=function(){return oe(Xu)}).raw=Xu;var Ku=ke(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(eo.geo.stereographic=function(){return oe(Ku)}).raw=Ku,Se.invert=function(t,n){return[-n,2*Math.atan(Math.exp(t))-Po]},(eo.geo.transverseMercator=function(){var t=De(Se),n=t.center,e=t.rotate;return t.center=function(t){return t?n([-t[1],t[0]]):(t=n(),[t[1],-t[0]])},t.rotate=function(t){return t?e([t[0],t[1],t.length>2?t[2]+90:90]):(t=e(),[t[0],t[1],t[2]-90])},e([0,0,90])}).raw=Se,eo.geom={},eo.geom.hull=function(t){function n(t){if(t.length<3)return[];var n,i=Dt(e),a=Dt(r),o=t.length,u=[],s=[];for(n=0;o>n;n++)u.push([+i.call(this,t[n],n),+a.call(this,t[n],n),n]);for(u.sort(Oe),n=0;o>n;n++)s.push([u[n][0],-u[n][1]]);var c=Fe(u),l=Fe(s),h=l[0]===c[0],f=l[l.length-1]===c[c.length-1],d=[];for(n=c.length-1;n>=0;--n)d.push(t[u[c[n]][2]]);for(n=+h;n<l.length-f;++n)d.push(t[u[l[n]][2]]);return d}var e=Te,r=Ce;return arguments.length?n(t):(n.x=function(t){return arguments.length?(e=t,n):e},n.y=function(t){return arguments.length?(r=t,n):r},n)},eo.geom.polygon=function(t){return bo(t,Qu),t};var Qu=eo.geom.polygon.prototype=[];Qu.area=function(){for(var t,n=-1,e=this.length,r=this[e-1],i=0;++n<e;)t=r,r=this[n],i+=t[1]*r[0]-t[0]*r[1];return.5*i},Qu.centroid=function(t){var n,e,r=-1,i=this.length,a=0,o=0,u=this[i-1];for(arguments.length||(t=-1/(6*this.area()));++r<i;)n=u,u=this[r],e=n[0]*u[1]-u[0]*n[1],a+=(n[0]+u[0])*e,o+=(n[1]+u[1])*e;return[a*t,o*t]},Qu.clip=function(t){for(var n,e,r,i,a,o,u=Ne(t),s=-1,c=this.length-Ne(this),l=this[c-1];++s<c;){for(n=t.slice(),t.length=0,i=this[s],a=n[(r=n.length-u)-1],e=-1;++e<r;)o=n[e],Le(o,l,i)?(Le(a,l,i)||t.push(Ie(a,o,l,i)),t.push(o)):Le(a,l,i)&&t.push(Ie(a,o,l,i)),a=o;u&&t.push(t[0]),l=i}return t};var Ju,ts,ns,es,rs,is=[],as=[];ze.prototype.prepare=function(){for(var t,n=this.edges,e=n.length;e--;)t=n[e].edge,t.b&&t.a||n.splice(e,1);return n.sort(We),n.length},nr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},er.prototype={insert:function(t,n){var e,r,i;if(t){if(n.P=t,n.N=t.N,t.N&&(t.N.P=n),t.N=n,t.R){for(t=t.R;t.L;)t=t.L;t.L=n}else t.R=n;e=t}else this._?(t=or(this._),n.P=null,n.N=t,t.P=t.L=n,e=t):(n.P=n.N=null,this._=n,e=null);for(n.L=n.R=null,n.U=e,n.C=!0,t=n;e&&e.C;)r=e.U,e===r.L?(i=r.R,i&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.R&&(ir(this,e),t=e,e=t.U),e.C=!1,r.C=!0,ar(this,r))):(i=r.L,i&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.L&&(ar(this,e),t=e,e=t.U),e.C=!1,r.C=!0,ir(this,r))),e=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var n,e,r,i=t.U,a=t.L,o=t.R;if(e=a?o?or(o):a:o,i?i.L===t?i.L=e:i.R=e:this._=e,a&&o?(r=e.C,e.C=t.C,e.L=a,a.U=e,e!==o?(i=e.U,e.U=t.U,t=e.R,i.L=t,e.R=o,o.U=e):(e.U=i,i=e,t=e.R)):(r=t.C,t=e),t&&(t.U=i),!r){if(t&&t.C)return void(t.C=!1);do{if(t===this._)break;if(t===i.L){if(n=i.R,n.C&&(n.C=!1,i.C=!0,ir(this,i),n=i.R),n.L&&n.L.C||n.R&&n.R.C){n.R&&n.R.C||(n.L.C=!1,n.C=!0,ar(this,n),n=i.R),n.C=i.C,i.C=n.R.C=!1,ir(this,i),t=this._;break}}else if(n=i.L,n.C&&(n.C=!1,i.C=!0,ar(this,i),n=i.L),n.L&&n.L.C||n.R&&n.R.C){n.L&&n.L.C||(n.R.C=!1,n.C=!0,ir(this,n),n=i.L),n.C=i.C,i.C=n.L.C=!1,ar(this,i),t=this._;break}n.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}},eo.geom.voronoi=function(t){function n(t){var n=new Array(t.length),r=u[0][0],i=u[0][1],a=u[1][0],o=u[1][1];return ur(e(t),u).cells.forEach(function(e,u){var s=e.edges,c=e.site,l=n[u]=s.length?s.map(function(t){var n=t.start();return[n.x,n.y]}):c.x>=r&&c.x<=a&&c.y>=i&&c.y<=o?[[r,o],[a,o],[a,i],[r,i]]:[];l.point=t[u]}),n}function e(t){return t.map(function(t,n){return{x:Math.round(a(t,n)/Fo)*Fo,y:Math.round(o(t,n)/Fo)*Fo,i:n}})}var r=Te,i=Ce,a=r,o=i,u=os;return t?n(t):(n.links=function(t){return ur(e(t)).edges.filter(function(t){return t.l&&t.r}).map(function(n){return{source:t[n.l.i],target:t[n.r.i]}})},n.triangles=function(t){var n=[];return ur(e(t)).cells.forEach(function(e,r){for(var i,a,o=e.site,u=e.edges.sort(We),s=-1,c=u.length,l=u[c-1].edge,h=l.l===o?l.r:l.l;++s<c;)i=l,a=h,l=u[s].edge,h=l.l===o?l.r:l.l,r<a.i&&r<h.i&&cr(o,a,h)<0&&n.push([t[r],t[a.i],t[h.i]])}),n},n.x=function(t){return arguments.length?(a=Dt(r=t),n):r},n.y=function(t){return arguments.length?(o=Dt(i=t),n):i},n.clipExtent=function(t){return arguments.length?(u=null==t?os:t,n):u===os?null:u},n.size=function(t){return arguments.length?n.clipExtent(t&&[[0,0],t]):u===os?null:u&&u[1]},n)};var os=[[-1e6,-1e6],[1e6,1e6]];eo.geom.delaunay=function(t){return eo.geom.voronoi().triangles(t)},eo.geom.quadtree=function(t,n,e,r,i){function a(t){function a(t,n,e,r,i,a,o,u){if(!isNaN(e)&&!isNaN(r))if(t.leaf){var s=t.x,l=t.y;if(null!=s)if(go(s-e)+go(l-r)<.01)c(t,n,e,r,i,a,o,u);else{var h=t.point;t.x=t.y=t.point=null,c(t,h,s,l,i,a,o,u),c(t,n,e,r,i,a,o,u)}else t.x=e,t.y=r,t.point=n}else c(t,n,e,r,i,a,o,u)}function c(t,n,e,r,i,o,u,s){var c=.5*(i+u),l=.5*(o+s),h=e>=c,f=r>=l,d=f<<1|h;t.leaf=!1,t=t.nodes[d]||(t.nodes[d]=fr()),h?i=c:u=c,f?o=l:s=l,a(t,n,e,r,i,o,u,s)}var l,h,f,d,p,g,y,m,v,_=Dt(u),b=Dt(s);if(null!=n)g=n,y=e,m=r,v=i;else if(m=v=-(g=y=1/0),h=[],f=[],p=t.length,o)for(d=0;p>d;++d)l=t[d],l.x<g&&(g=l.x),l.y<y&&(y=l.y),l.x>m&&(m=l.x),l.y>v&&(v=l.y),h.push(l.x),f.push(l.y);else for(d=0;p>d;++d){var x=+_(l=t[d],d),w=+b(l,d);g>x&&(g=x),y>w&&(y=w),x>m&&(m=x),w>v&&(v=w),h.push(x),f.push(w)}var k=m-g,A=v-y;k>A?v=y+k:m=g+A;var E=fr();if(E.add=function(t){a(E,t,+_(t,++d),+b(t,d),g,y,m,v)},E.visit=function(t){dr(t,E,g,y,m,v)},E.find=function(t){return pr(E,t[0],t[1],g,y,m,v)},d=-1,null==n){for(;++d<p;)a(E,t[d],h[d],f[d],g,y,m,v);--d}else t.forEach(E.add);return h=f=t=l=null,E}var o,u=Te,s=Ce;return(o=arguments.length)?(u=lr,s=hr,3===o&&(i=e,r=n,e=n=0),a(t)):(a.x=function(t){return arguments.length?(u=t,a):u},a.y=function(t){return arguments.length?(s=t,a):s},a.extent=function(t){return arguments.length?(null==t?n=e=r=i=null:(n=+t[0][0],e=+t[0][1],r=+t[1][0],i=+t[1][1]),a):null==n?null:[[n,e],[r,i]]},a.size=function(t){return arguments.length?(null==t?n=e=r=i=null:(n=e=0,r=+t[0],i=+t[1]),a):null==n?null:[r-n,i-e]},a)},eo.interpolateRgb=gr,eo.interpolateObject=yr,eo.interpolateNumber=mr,eo.interpolateString=vr;var us=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ss=new RegExp(us.source,"g");eo.interpolate=_r,eo.interpolators=[function(t,n){var e=typeof n;return("string"===e?Jo.has(n.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(n)?gr:vr:n instanceof ut?gr:Array.isArray(n)?br:"object"===e&&isNaN(n)?yr:mr)(t,n)}],eo.interpolateArray=br;var cs=function(){return _},ls=eo.map({linear:cs,poly:Dr,quad:function(){return Ar},cubic:function(){return Er},sin:function(){return Sr},exp:function(){return Tr},circle:function(){return Cr},elastic:Fr,back:Or,bounce:function(){return Lr}}),hs=eo.map({"in":_,out:wr,"in-out":kr,"out-in":function(t){return kr(wr(t))}});eo.ease=function(t){var n=t.indexOf("-"),e=n>=0?t.slice(0,n):t,r=n>=0?t.slice(n+1):"in";return e=ls.get(e)||cs,r=hs.get(r)||_,xr(r(e.apply(null,ro.call(arguments,1))))},eo.interpolateHcl=Ir,eo.interpolateHsl=Nr,eo.interpolateLab=Pr,eo.interpolateRound=Br,eo.transform=function(t){var n=ao.createElementNS(eo.ns.prefix.svg,"g");return(eo.transform=function(t){if(null!=t){n.setAttribute("transform",t);var e=n.transform.baseVal.consolidate()}return new Rr(e?e.matrix:fs)})(t)},Rr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var fs={a:1,b:0,c:0,d:1,e:0,f:0};eo.interpolateTransform=$r,eo.layout={},eo.layout.bundle=function(){return function(t){for(var n=[],e=-1,r=t.length;++e<r;)n.push(Wr(t[e]));return n}},eo.layout.chord=function(){function t(){var t,c,h,f,d,p={},g=[],y=eo.range(a),m=[];for(e=[],r=[],t=0,f=-1;++f<a;){for(c=0,d=-1;++d<a;)c+=i[f][d];g.push(c),m.push(eo.range(a)),t+=c}for(o&&y.sort(function(t,n){return o(g[t],g[n])}),u&&m.forEach(function(t,n){t.sort(function(t,e){return u(i[n][t],i[n][e])})}),t=(Io-l*a)/t,c=0,f=-1;++f<a;){for(h=c,d=-1;++d<a;){var v=y[f],_=m[v][d],b=i[v][_],x=c,w=c+=b*t;p[v+"-"+_]={index:v,subindex:_,startAngle:x,endAngle:w,value:b}}r[v]={index:v,startAngle:h,endAngle:c,value:(c-h)/t},c+=l}for(f=-1;++f<a;)for(d=f-1;++d<a;){var k=p[f+"-"+d],A=p[d+"-"+f];(k.value||A.value)&&e.push(k.value<A.value?{source:A,target:k}:{source:k,target:A})}s&&n()}function n(){e.sort(function(t,n){return s((t.source.value+t.target.value)/2,(n.source.value+n.target.value)/2)})}var e,r,i,a,o,u,s,c={},l=0;return c.matrix=function(t){return arguments.length?(a=(i=t)&&i.length,e=r=null,c):i},c.padding=function(t){return arguments.length?(l=t,e=r=null,c):l},c.sortGroups=function(t){return arguments.length?(o=t,e=r=null,c):o},c.sortSubgroups=function(t){return arguments.length?(u=t,e=null,c):u},c.sortChords=function(t){return arguments.length?(s=t,e&&n(),c):s},c.chords=function(){return e||t(),e},c.groups=function(){return r||t(),r},c},eo.layout.force=function(){function t(t){return function(n,e,r,i){if(n.point!==t){var a=n.cx-t.x,o=n.cy-t.y,u=i-e,s=a*a+o*o;if(s>u*u/y){if(p>s){var c=n.charge/s;t.px-=a*c,t.py-=o*c}return!0}if(n.point&&s&&p>s){var c=n.pointCharge/s;t.px-=a*c,t.py-=o*c}}return!n.charge}}function n(t){t.px=eo.event.x,t.py=eo.event.y,u.resume()}var e,r,i,a,o,u={},s=eo.dispatch("start","tick","end"),c=[1,1],l=.9,h=ds,f=ps,d=-30,p=gs,g=.1,y=.64,m=[],v=[];return u.tick=function(){if((r*=.99)<.005)return s.end({type:"end",alpha:r=0}),!0;var n,e,u,h,f,p,y,_,b,x=m.length,w=v.length;for(e=0;w>e;++e)u=v[e],h=u.source,f=u.target,_=f.x-h.x,b=f.y-h.y,(p=_*_+b*b)&&(p=r*a[e]*((p=Math.sqrt(p))-i[e])/p,_*=p,b*=p,f.x-=_*(y=h.weight/(f.weight+h.weight)),f.y-=b*y,h.x+=_*(y=1-y),h.y+=b*y);if((y=r*g)&&(_=c[0]/2,b=c[1]/2,e=-1,y))for(;++e<x;)u=m[e],u.x+=(_-u.x)*y,u.y+=(b-u.y)*y;if(d)for(Qr(n=eo.geom.quadtree(m),r,o),e=-1;++e<x;)(u=m[e]).fixed||n.visit(t(u));for(e=-1;++e<x;)u=m[e],u.fixed?(u.x=u.px,u.y=u.py):(u.x-=(u.px-(u.px=u.x))*l,u.y-=(u.py-(u.py=u.y))*l);s.tick({type:"tick",alpha:r})},u.nodes=function(t){return arguments.length?(m=t,u):m},u.links=function(t){return arguments.length?(v=t,u):v},u.size=function(t){return arguments.length?(c=t,u):c},u.linkDistance=function(t){return arguments.length?(h="function"==typeof t?t:+t,u):h},u.distance=u.linkDistance,u.linkStrength=function(t){return arguments.length?(f="function"==typeof t?t:+t,u):f},u.friction=function(t){return arguments.length?(l=+t,u):l},u.charge=function(t){return arguments.length?(d="function"==typeof t?t:+t,u):d},u.chargeDistance=function(t){return arguments.length?(p=t*t,u):Math.sqrt(p)},u.gravity=function(t){return arguments.length?(g=+t,u):g},u.theta=function(t){return arguments.length?(y=t*t,u):Math.sqrt(y)},u.alpha=function(t){return arguments.length?(t=+t,r?r=t>0?t:0:t>0&&(s.start({type:"start",alpha:r=t}),eo.timer(u.tick)),u):r},u.start=function(){function t(t,r){if(!e){for(e=new Array(s),u=0;s>u;++u)e[u]=[];for(u=0;l>u;++u){var i=v[u];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var a,o=e[n],u=-1,c=o.length;++u<c;)if(!isNaN(a=o[u][t]))return a;return Math.random()*r}var n,e,r,s=m.length,l=v.length,p=c[0],g=c[1];for(n=0;s>n;++n)(r=m[n]).index=n,r.weight=0;for(n=0;l>n;++n)r=v[n],"number"==typeof r.source&&(r.source=m[r.source]),"number"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(n=0;s>n;++n)r=m[n],isNaN(r.x)&&(r.x=t("x",p)),isNaN(r.y)&&(r.y=t("y",g)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],"function"==typeof h)for(n=0;l>n;++n)i[n]=+h.call(this,v[n],n);else for(n=0;l>n;++n)i[n]=h;if(a=[],"function"==typeof f)for(n=0;l>n;++n)a[n]=+f.call(this,v[n],n);else for(n=0;l>n;++n)a[n]=f;if(o=[],"function"==typeof d)for(n=0;s>n;++n)o[n]=+d.call(this,m[n],n);else for(n=0;s>n;++n)o[n]=d;return u.resume()},u.resume=function(){return u.alpha(.1)},u.stop=function(){return u.alpha(0)},u.drag=function(){return e||(e=eo.behavior.drag().origin(_).on("dragstart.force",Vr).on("drag.force",n).on("dragend.force",Zr)),arguments.length?void this.on("mouseover.force",Xr).on("mouseout.force",Kr).call(e):e},eo.rebind(u,s,"on")};var ds=20,ps=1,gs=1/0;eo.layout.hierarchy=function(){function t(i){var a,o=[i],u=[];for(i.depth=0;null!=(a=o.pop());)if(u.push(a),(c=e.call(t,a,a.depth))&&(s=c.length)){for(var s,c,l;--s>=0;)o.push(l=c[s]),l.parent=a,l.depth=a.depth+1;r&&(a.value=0),a.children=c}else r&&(a.value=+r.call(t,a,a.depth)||0),delete a.children;return ni(i,function(t){var e,i;n&&(e=t.children)&&e.sort(n),r&&(i=t.parent)&&(i.value+=t.value)}),u}var n=ii,e=ei,r=ri;return t.sort=function(e){return arguments.length?(n=e,t):n},t.children=function(n){return arguments.length?(e=n,t):e},t.value=function(n){return arguments.length?(r=n,t):r},t.revalue=function(n){return r&&(ti(n,function(t){t.children&&(t.value=0)}),ni(n,function(n){var e;n.children||(n.value=+r.call(t,n,n.depth)||0),(e=n.parent)&&(e.value+=n.value)})),n},t},eo.layout.partition=function(){function t(n,e,r,i){var a=n.children;if(n.x=e,n.y=n.depth*i,n.dx=r,n.dy=i,a&&(o=a.length)){var o,u,s,c=-1;for(r=n.value?r/n.value:0;++c<o;)t(u=a[c],e,s=u.value*r,i),e+=s}}function n(t){var e=t.children,r=0;if(e&&(i=e.length))for(var i,a=-1;++a<i;)r=Math.max(r,n(e[a]));return 1+r}function e(e,a){var o=r.call(this,e,a);return t(o[0],0,i[0],i[1]/n(o[0])),o}var r=eo.layout.hierarchy(),i=[1,1];return e.size=function(t){return arguments.length?(i=t,e):i},Jr(e,r)},eo.layout.pie=function(){function t(o){var u,s=o.length,c=o.map(function(e,r){return+n.call(t,e,r)}),l=+("function"==typeof r?r.apply(this,arguments):r),h=("function"==typeof i?i.apply(this,arguments):i)-l,f=Math.min(Math.abs(h)/s,+("function"==typeof a?a.apply(this,arguments):a)),d=f*(0>h?-1:1),p=(h-s*d)/eo.sum(c),g=eo.range(s),y=[];return null!=e&&g.sort(e===ys?function(t,n){return c[n]-c[t]}:function(t,n){return e(o[t],o[n])}),g.forEach(function(t){y[t]={data:o[t],value:u=c[t],startAngle:l,endAngle:l+=u*p+d,padAngle:f}}),y}var n=Number,e=ys,r=0,i=Io,a=0;return t.value=function(e){return arguments.length?(n=e,t):n},t.sort=function(n){return arguments.length?(e=n,t):e},t.startAngle=function(n){return arguments.length?(r=n,t):r},t.endAngle=function(n){return arguments.length?(i=n,t):i},t.padAngle=function(n){return arguments.length?(a=n,t):a},t};var ys={};eo.layout.stack=function(){function t(u,s){if(!(f=u.length))return u;var c=u.map(function(e,r){return n.call(t,e,r)}),l=c.map(function(n){return n.map(function(n,e){return[a.call(t,n,e),o.call(t,n,e)]})}),h=e.call(t,l,s);c=eo.permute(c,h),l=eo.permute(l,h);var f,d,p,g,y=r.call(t,l,s),m=c[0].length;for(p=0;m>p;++p)for(i.call(t,c[0][p],g=y[p],l[0][p][1]),d=1;f>d;++d)i.call(t,c[d][p],g+=l[d-1][p][1],l[d][p][1]);return u}var n=_,e=ci,r=li,i=si,a=oi,o=ui;return t.values=function(e){return arguments.length?(n=e,t):n},t.order=function(n){return arguments.length?(e="function"==typeof n?n:ms.get(n)||ci,t):e},t.offset=function(n){return arguments.length?(r="function"==typeof n?n:vs.get(n)||li,t):r},t.x=function(n){return arguments.length?(a=n,t):a},t.y=function(n){return arguments.length?(o=n,t):o},t.out=function(n){return arguments.length?(i=n,t):i},t};var ms=eo.map({"inside-out":function(t){var n,e,r=t.length,i=t.map(hi),a=t.map(fi),o=eo.range(r).sort(function(t,n){return i[t]-i[n]}),u=0,s=0,c=[],l=[];for(n=0;r>n;++n)e=o[n],s>u?(u+=a[e],c.push(e)):(s+=a[e],l.push(e));return l.reverse().concat(c)},reverse:function(t){return eo.range(t.length).reverse()},"default":ci}),vs=eo.map({silhouette:function(t){var n,e,r,i=t.length,a=t[0].length,o=[],u=0,s=[];for(e=0;a>e;++e){for(n=0,r=0;i>n;n++)r+=t[n][e][1];r>u&&(u=r),o.push(r)}for(e=0;a>e;++e)s[e]=(u-o[e])/2;return s},wiggle:function(t){var n,e,r,i,a,o,u,s,c,l=t.length,h=t[0],f=h.length,d=[];for(d[0]=s=c=0,e=1;f>e;++e){for(n=0,i=0;l>n;++n)i+=t[n][e][1];for(n=0,a=0,u=h[e][0]-h[e-1][0];l>n;++n){for(r=0,o=(t[n][e][1]-t[n][e-1][1])/(2*u);n>r;++r)o+=(t[r][e][1]-t[r][e-1][1])/u;a+=o*t[n][e][1]}d[e]=s-=i?a/i*u:0,c>s&&(c=s)}for(e=0;f>e;++e)d[e]-=c;return d},expand:function(t){var n,e,r,i=t.length,a=t[0].length,o=1/i,u=[];for(e=0;a>e;++e){for(n=0,r=0;i>n;n++)r+=t[n][e][1];if(r)for(n=0;i>n;n++)t[n][e][1]/=r;else for(n=0;i>n;n++)t[n][e][1]=o}for(e=0;a>e;++e)u[e]=0;return u},zero:li});eo.layout.histogram=function(){function t(t,a){for(var o,u,s=[],c=t.map(e,this),l=r.call(this,c,a),h=i.call(this,l,c,a),a=-1,f=c.length,d=h.length-1,p=n?1:1/f;++a<d;)o=s[a]=[],o.dx=h[a+1]-(o.x=h[a]),o.y=0;if(d>0)for(a=-1;++a<f;)u=c[a],u>=l[0]&&u<=l[1]&&(o=s[eo.bisect(h,u,1,d)-1],o.y+=p,o.push(t[a]));return s}var n=!0,e=Number,r=yi,i=pi;return t.value=function(n){return arguments.length?(e=n,t):e},t.range=function(n){return arguments.length?(r=Dt(n),t):r},t.bins=function(n){return arguments.length?(i="number"==typeof n?function(t){return gi(t,n)}:Dt(n),t):i},t.frequency=function(e){return arguments.length?(n=!!e,t):n},t},eo.layout.pack=function(){function t(t,a){var o=e.call(this,t,a),u=o[0],s=i[0],c=i[1],l=null==n?Math.sqrt:"function"==typeof n?n:function(){return n};if(u.x=u.y=0,ni(u,function(t){t.r=+l(t.value)}),ni(u,xi),r){var h=r*(n?1:Math.max(2*u.r/s,2*u.r/c))/2;ni(u,function(t){t.r+=h;
|
||
|
||
}),ni(u,xi),ni(u,function(t){t.r-=h})}return Ai(u,s/2,c/2,n?1:1/Math.max(2*u.r/s,2*u.r/c)),o}var n,e=eo.layout.hierarchy().sort(mi),r=0,i=[1,1];return t.size=function(n){return arguments.length?(i=n,t):i},t.radius=function(e){return arguments.length?(n=null==e||"function"==typeof e?e:+e,t):n},t.padding=function(n){return arguments.length?(r=+n,t):r},Jr(t,e)},eo.layout.tree=function(){function t(t,i){var l=o.call(this,t,i),h=l[0],f=n(h);if(ni(f,e),f.parent.m=-f.z,ti(f,r),c)ti(h,a);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=u(d,p)/2-d.x,m=s[0]/(p.x+u(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 n(t){for(var n,e={A:null,children:[t]},r=[e];null!=(n=r.pop());)for(var i,a=n.children,o=0,u=a.length;u>o;++o)r.push((a[o]=i={_:a[o],parent:n,children:(i=a[o].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return e.children[0]}function e(t){var n=t.children,e=t.parent.children,r=t.i?e[t.i-1]:null;if(n.length){Ci(t);var a=(n[0].z+n[n.length-1].z)/2;r?(t.z=r.z+u(t._,r._),t.m=t.z-a):t.z=a}else r&&(t.z=r.z+u(t._,r._));t.parent.A=i(t,r,t.parent.A||e[0])}function r(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function i(t,n,e){if(n){for(var r,i=t,a=t,o=n,s=i.parent.children[0],c=i.m,l=a.m,h=o.m,f=s.m;o=Si(o),i=Di(i),o&&i;)s=Di(s),a=Si(a),a.a=t,r=o.z+h-i.z-c+u(o._,i._),r>0&&(Ti(Fi(o,t,e),t,r),c+=r,l+=r),h+=o.m,c+=i.m,f+=s.m,l+=a.m;o&&!Si(a)&&(a.t=o,a.m+=h-l),i&&!Di(s)&&(s.t=i,s.m+=c-f,e=t)}return e}function a(t){t.x*=s[0],t.y=t.depth*s[1]}var o=eo.layout.hierarchy().sort(null).value(null),u=Mi,s=[1,1],c=null;return t.separation=function(n){return arguments.length?(u=n,t):u},t.size=function(n){return arguments.length?(c=null==(s=n)?a:null,t):c?null:s},t.nodeSize=function(n){return arguments.length?(c=null==(s=n)?null:a,t):c?s:null},Jr(t,o)},eo.layout.cluster=function(){function t(t,a){var o,u=n.call(this,t,a),s=u[0],c=0;ni(s,function(t){var n=t.children;n&&n.length?(t.x=Li(n),t.y=Oi(n)):(t.x=o?c+=e(t,o):0,t.y=0,o=t)});var l=Ii(s),h=Ni(s),f=l.x-e(l,h)/2,d=h.x+e(h,l)/2;return ni(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]}),u}var n=eo.layout.hierarchy().sort(null).value(null),e=Mi,r=[1,1],i=!1;return t.separation=function(n){return arguments.length?(e=n,t):e},t.size=function(n){return arguments.length?(i=null==(r=n),t):i?null:r},t.nodeSize=function(n){return arguments.length?(i=null!=(r=n),t):i?r:null},Jr(t,n)},eo.layout.treemap=function(){function t(t,n){for(var e,r,i=-1,a=t.length;++i<a;)r=(e=t[i]).value*(0>n?0:n),e.area=isNaN(r)||0>=r?0:r}function n(e){var a=e.children;if(a&&a.length){var o,u,s,c=h(e),l=[],f=a.slice(),p=1/0,g="slice"===d?c.dx:"dice"===d?c.dy:"slice-dice"===d?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(t(f,c.dx*c.dy/e.value),l.area=0;(s=f.length)>0;)l.push(o=f[s-1]),l.area+=o.area,"squarify"!==d||(u=r(l,g))<=p?(f.pop(),p=u):(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),a.forEach(n)}}function e(n){var r=n.children;if(r&&r.length){var a,o=h(n),u=r.slice(),s=[];for(t(u,o.dx*o.dy/n.value),s.area=0;a=u.pop();)s.push(a),s.area+=a.area,null!=a.z&&(i(s,a.z?o.dx:o.dy,o,!u.length),s.length=s.area=0);r.forEach(e)}}function r(t,n){for(var e,r=t.area,i=0,a=1/0,o=-1,u=t.length;++o<u;)(e=t[o].area)&&(a>e&&(a=e),e>i&&(i=e));return r*=r,n*=n,r?Math.max(n*i*p/r,r/(n*a*p)):1/0}function i(t,n,e,r){var i,a=-1,o=t.length,u=e.x,c=e.y,l=n?s(t.area/n):0;if(n==e.dx){for((r||l>e.dy)&&(l=e.dy);++a<o;)i=t[a],i.x=u,i.y=c,i.dy=l,u+=i.dx=Math.min(e.x+e.dx-u,l?s(i.area/l):0);i.z=!0,i.dx+=e.x+e.dx-u,e.y+=l,e.dy-=l}else{for((r||l>e.dx)&&(l=e.dx);++a<o;)i=t[a],i.x=u,i.y=c,i.dx=l,c+=i.dy=Math.min(e.y+e.dy-c,l?s(i.area/l):0);i.z=!1,i.dy+=e.y+e.dy-c,e.x+=l,e.dx-=l}}function a(r){var i=o||u(r),a=i[0];return a.x=0,a.y=0,a.dx=c[0],a.dy=c[1],o&&u.revalue(a),t([a],a.dx*a.dy/a.value),(o?e:n)(a),f&&(o=i),i}var o,u=eo.layout.hierarchy(),s=Math.round,c=[1,1],l=null,h=Pi,f=!1,d="squarify",p=.5*(1+Math.sqrt(5));return a.size=function(t){return arguments.length?(c=t,a):c},a.padding=function(t){function n(n){var e=t.call(a,n,n.depth);return null==e?Pi(n):Bi(n,"number"==typeof e?[e,e,e,e]:e)}function e(n){return Bi(n,t)}if(!arguments.length)return l;var r;return h=null==(l=t)?Pi:"function"==(r=typeof t)?n:"number"===r?(t=[t,t,t,t],e):e,a},a.round=function(t){return arguments.length?(s=t?Math.round:Number,a):s!=Number},a.sticky=function(t){return arguments.length?(f=t,o=null,a):f},a.ratio=function(t){return arguments.length?(p=t,a):p},a.mode=function(t){return arguments.length?(d=t+"",a):d},Jr(a,u)},eo.random={normal:function(t,n){var e=arguments.length;return 2>e&&(n=1),1>e&&(t=0),function(){var e,r,i;do e=2*Math.random()-1,r=2*Math.random()-1,i=e*e+r*r;while(!i||i>1);return t+n*e*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=eo.random.normal.apply(eo,arguments);return function(){return Math.exp(t())}},bates:function(t){var n=eo.random.irwinHall(t);return function(){return n()/t}},irwinHall:function(t){return function(){for(var n=0,e=0;t>e;e++)n+=Math.random();return n}}},eo.scale={};var _s={floor:_,ceil:_};eo.scale.linear=function(){return qi([0,1],[0,1],_r,!1)};var bs={s:1,g:1,p:1,r:1,e:1};eo.scale.log=function(){return Qi(eo.scale.linear().domain([0,1]),10,!0,[1,10])};var xs=eo.format(".0e"),ws={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};eo.scale.pow=function(){return Ji(eo.scale.linear(),1,[0,1])},eo.scale.sqrt=function(){return eo.scale.pow().exponent(.5)},eo.scale.ordinal=function(){return na([],{t:"range",a:[[]]})},eo.scale.category10=function(){return eo.scale.ordinal().range(ks)},eo.scale.category20=function(){return eo.scale.ordinal().range(As)},eo.scale.category20b=function(){return eo.scale.ordinal().range(Es)},eo.scale.category20c=function(){return eo.scale.ordinal().range(Ms)};var ks=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(bt),As=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(bt),Es=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(bt),Ms=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(bt);eo.scale.quantile=function(){return ea([],[])},eo.scale.quantize=function(){return ra(0,1,[0,1])},eo.scale.threshold=function(){return ia([.5],[0,1])},eo.scale.identity=function(){return aa([0,1])},eo.svg={},eo.svg.arc=function(){function t(){var t=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),l=o.apply(this,arguments)-Po,h=u.apply(this,arguments)-Po,f=Math.abs(h-l),d=l>h?0:1;if(t>c&&(p=c,c=t,t=p),f>=No)return n(c,d)+(t?n(t,1-d):"")+"Z";var p,g,y,m,v,_,b,x,w,k,A,E,M=0,D=0,S=[];if((m=(+s.apply(this,arguments)||0)/2)&&(y=a===Ds?Math.sqrt(t*t+c*c):+a.apply(this,arguments),d||(D*=-1),c&&(D=et(y/c*Math.sin(m))),t&&(M=et(y/t*Math.sin(m)))),c){v=c*Math.cos(l+D),_=c*Math.sin(l+D),b=c*Math.cos(h-D),x=c*Math.sin(h-D);var T=Math.abs(h-l-2*D)<=Lo?0:1;if(D&&fa(v,_,b,x)===d^T){var C=(l+h)/2;v=c*Math.cos(C),_=c*Math.sin(C),b=x=null}}else v=_=0;if(t){w=t*Math.cos(h-M),k=t*Math.sin(h-M),A=t*Math.cos(l+M),E=t*Math.sin(l+M);var F=Math.abs(l-h+2*M)<=Lo?0:1;if(M&&fa(w,k,A,E)===1-d^F){var O=(l+h)/2;w=t*Math.cos(O),k=t*Math.sin(O),A=E=null}}else w=k=0;if((p=Math.min(Math.abs(c-t)/2,+i.apply(this,arguments)))>.001){g=c>t^d?0:1;var L=null==A?[w,k]:null==b?[v,_]:Ie([v,_],[A,E],[b,x],[w,k]),I=v-L[0],N=_-L[1],P=b-L[0],B=x-L[1],R=1/Math.sin(Math.acos((I*P+N*B)/(Math.sqrt(I*I+N*N)*Math.sqrt(P*P+B*B)))/2),j=Math.sqrt(L[0]*L[0]+L[1]*L[1]);if(null!=b){var Y=Math.min(p,(c-j)/(R+1)),U=da(null==A?[w,k]:[A,E],[v,_],c,Y,d),$=da([b,x],[w,k],c,Y,d);p===Y?S.push("M",U[0],"A",Y,",",Y," 0 0,",g," ",U[1],"A",c,",",c," 0 ",1-d^fa(U[1][0],U[1][1],$[1][0],$[1][1]),",",d," ",$[1],"A",Y,",",Y," 0 0,",g," ",$[0]):S.push("M",U[0],"A",Y,",",Y," 0 1,",g," ",$[0])}else S.push("M",v,",",_);if(null!=A){var z=Math.min(p,(t-j)/(R-1)),q=da([v,_],[A,E],t,-z,d),W=da([w,k],null==b?[v,_]:[b,x],t,-z,d);p===z?S.push("L",W[0],"A",z,",",z," 0 0,",g," ",W[1],"A",t,",",t," 0 ",d^fa(W[1][0],W[1][1],q[1][0],q[1][1]),",",1-d," ",q[1],"A",z,",",z," 0 0,",g," ",q[0]):S.push("L",W[0],"A",z,",",z," 0 0,",g," ",q[0])}else S.push("L",w,",",k)}else S.push("M",v,",",_),null!=b&&S.push("A",c,",",c," 0 ",T,",",d," ",b,",",x),S.push("L",w,",",k),null!=A&&S.push("A",t,",",t," 0 ",F,",",1-d," ",A,",",E);return S.push("Z"),S.join("")}function n(t,n){return"M0,"+t+"A"+t+","+t+" 0 1,"+n+" 0,"+-t+"A"+t+","+t+" 0 1,"+n+" 0,"+t}var e=ua,r=sa,i=oa,a=Ds,o=ca,u=la,s=ha;return t.innerRadius=function(n){return arguments.length?(e=Dt(n),t):e},t.outerRadius=function(n){return arguments.length?(r=Dt(n),t):r},t.cornerRadius=function(n){return arguments.length?(i=Dt(n),t):i},t.padRadius=function(n){return arguments.length?(a=n==Ds?Ds:Dt(n),t):a},t.startAngle=function(n){return arguments.length?(o=Dt(n),t):o},t.endAngle=function(n){return arguments.length?(u=Dt(n),t):u},t.padAngle=function(n){return arguments.length?(s=Dt(n),t):s},t.centroid=function(){var t=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,n=(+o.apply(this,arguments)+ +u.apply(this,arguments))/2-Po;return[Math.cos(n)*t,Math.sin(n)*t]},t};var Ds="auto";eo.svg.line=function(){return pa(_)};var Ss=eo.map({linear:ga,"linear-closed":ya,step:ma,"step-before":va,"step-after":_a,basis:Ea,"basis-open":Ma,"basis-closed":Da,bundle:Sa,cardinal:wa,"cardinal-open":ba,"cardinal-closed":xa,monotone:Ia});Ss.forEach(function(t,n){n.key=t,n.closed=/-closed$/.test(t)});var Ts=[0,2/3,1/3,0],Cs=[0,1/3,2/3,0],Fs=[0,1/6,2/3,1/6];eo.svg.line.radial=function(){var t=pa(Na);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},va.reverse=_a,_a.reverse=va,eo.svg.area=function(){return Pa(_)},eo.svg.area.radial=function(){var t=Pa(Na);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},eo.svg.chord=function(){function t(t,u){var s=n(this,a,t,u),c=n(this,o,t,u);return"M"+s.p0+r(s.r,s.p1,s.a1-s.a0)+(e(s,c)?i(s.r,s.p1,s.r,s.p0):i(s.r,s.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+i(c.r,c.p1,s.r,s.p0))+"Z"}function n(t,n,e,r){var i=n.call(t,e,r),a=u.call(t,i,r),o=s.call(t,i,r)-Po,l=c.call(t,i,r)-Po;return{r:a,a0:o,a1:l,p0:[a*Math.cos(o),a*Math.sin(o)],p1:[a*Math.cos(l),a*Math.sin(l)]}}function e(t,n){return t.a0==n.a0&&t.a1==n.a1}function r(t,n,e){return"A"+t+","+t+" 0 "+ +(e>Lo)+",1 "+n}function i(t,n,e,r){return"Q 0,0 "+r}var a=_e,o=be,u=Ba,s=ca,c=la;return t.radius=function(n){return arguments.length?(u=Dt(n),t):u},t.source=function(n){return arguments.length?(a=Dt(n),t):a},t.target=function(n){return arguments.length?(o=Dt(n),t):o},t.startAngle=function(n){return arguments.length?(s=Dt(n),t):s},t.endAngle=function(n){return arguments.length?(c=Dt(n),t):c},t},eo.svg.diagonal=function(){function t(t,i){var a=n.call(this,t,i),o=e.call(this,t,i),u=(a.y+o.y)/2,s=[a,{x:a.x,y:u},{x:o.x,y:u},o];return s=s.map(r),"M"+s[0]+"C"+s[1]+" "+s[2]+" "+s[3]}var n=_e,e=be,r=Ra;return t.source=function(e){return arguments.length?(n=Dt(e),t):n},t.target=function(n){return arguments.length?(e=Dt(n),t):e},t.projection=function(n){return arguments.length?(r=n,t):r},t},eo.svg.diagonal.radial=function(){var t=eo.svg.diagonal(),n=Ra,e=t.projection;return t.projection=function(t){return arguments.length?e(ja(n=t)):n},t},eo.svg.symbol=function(){function t(t,r){return(Os.get(n.call(this,t,r))||$a)(e.call(this,t,r))}var n=Ua,e=Ya;return t.type=function(e){return arguments.length?(n=Dt(e),t):n},t.size=function(n){return arguments.length?(e=Dt(n),t):e},t};var Os=eo.map({circle:$a,cross:function(t){var n=Math.sqrt(t/5)/2;return"M"+-3*n+","+-n+"H"+-n+"V"+-3*n+"H"+n+"V"+-n+"H"+3*n+"V"+n+"H"+n+"V"+3*n+"H"+-n+"V"+n+"H"+-3*n+"Z"},diamond:function(t){var n=Math.sqrt(t/(2*Is)),e=n*Is;return"M0,"+-n+"L"+e+",0 0,"+n+" "+-e+",0Z"},square:function(t){var n=Math.sqrt(t)/2;return"M"+-n+","+-n+"L"+n+","+-n+" "+n+","+n+" "+-n+","+n+"Z"},"triangle-down":function(t){var n=Math.sqrt(t/Ls),e=n*Ls/2;return"M0,"+e+"L"+n+","+-e+" "+-n+","+-e+"Z"},"triangle-up":function(t){var n=Math.sqrt(t/Ls),e=n*Ls/2;return"M0,"+-e+"L"+n+","+e+" "+-n+","+e+"Z"}});eo.svg.symbolTypes=Os.keys();var Ls=Math.sqrt(3),Is=Math.tan(30*Bo);Ao.transition=function(t){for(var n,e,r=Ns||++js,i=Ga(t),a=[],o=Ps||{time:Date.now(),ease:Mr,delay:0,duration:250},u=-1,s=this.length;++u<s;){a.push(n=[]);for(var c=this[u],l=-1,h=c.length;++l<h;)(e=c[l])&&Va(e,l,i,r,o),n.push(e)}return qa(a,i,r)},Ao.interrupt=function(t){return this.each(null==t?Bs:za(Ga(t)))};var Ns,Ps,Bs=za(Ga()),Rs=[],js=0;Rs.call=Ao.call,Rs.empty=Ao.empty,Rs.node=Ao.node,Rs.size=Ao.size,eo.transition=function(t,n){return t&&t.transition?Ns?t.transition(n):t:eo.selection().transition(t)},eo.transition.prototype=Rs,Rs.select=function(t){var n,e,r,i=this.id,a=this.namespace,o=[];t=T(t);for(var u=-1,s=this.length;++u<s;){o.push(n=[]);for(var c=this[u],l=-1,h=c.length;++l<h;)(r=c[l])&&(e=t.call(r,r.__data__,l,u))?("__data__"in r&&(e.__data__=r.__data__),Va(e,l,a,i,r[a][i]),n.push(e)):n.push(null)}return qa(o,a,i)},Rs.selectAll=function(t){var n,e,r,i,a,o=this.id,u=this.namespace,s=[];t=C(t);for(var c=-1,l=this.length;++c<l;)for(var h=this[c],f=-1,d=h.length;++f<d;)if(r=h[f]){a=r[u][o],e=t.call(r,r.__data__,f,c),s.push(n=[]);for(var p=-1,g=e.length;++p<g;)(i=e[p])&&Va(i,p,u,o,a),n.push(i)}return qa(s,u,o)},Rs.filter=function(t){var n,e,r,i=[];"function"!=typeof t&&(t=$(t));for(var a=0,o=this.length;o>a;a++){i.push(n=[]);for(var e=this[a],u=0,s=e.length;s>u;u++)(r=e[u])&&t.call(r,r.__data__,u,a)&&n.push(r)}return qa(i,this.namespace,this.id)},Rs.tween=function(t,n){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(t):q(this,null==n?function(n){n[r][e].tween.remove(t)}:function(i){i[r][e].tween.set(t,n)})},Rs.attr=function(t,n){function e(){this.removeAttribute(u)}function r(){this.removeAttributeNS(u.space,u.local)}function i(t){return null==t?e:(t+="",function(){var n,e=this.getAttribute(u);return e!==t&&(n=o(e,t),function(t){this.setAttribute(u,n(t))})})}function a(t){return null==t?r:(t+="",function(){var n,e=this.getAttributeNS(u.space,u.local);return e!==t&&(n=o(e,t),function(t){this.setAttributeNS(u.space,u.local,n(t))})})}if(arguments.length<2){for(n in t)this.attr(n,t[n]);return this}var o="transform"==t?$r:_r,u=eo.ns.qualify(t);return Wa(this,"attr."+t,n,u.local?a:i)},Rs.attrTween=function(t,n){function e(t,e){var r=n.call(this,t,e,this.getAttribute(i));return r&&function(t){this.setAttribute(i,r(t))}}function r(t,e){var r=n.call(this,t,e,this.getAttributeNS(i.space,i.local));return r&&function(t){this.setAttributeNS(i.space,i.local,r(t))}}var i=eo.ns.qualify(t);return this.tween("attr."+t,i.local?r:e)},Rs.style=function(t,n,r){function i(){this.style.removeProperty(t)}function a(n){return null==n?i:(n+="",function(){var i,a=e(this).getComputedStyle(this,null).getPropertyValue(t);return a!==n&&(i=_r(a,n),function(n){this.style.setProperty(t,i(n),r)})})}var o=arguments.length;if(3>o){if("string"!=typeof t){2>o&&(n="");for(r in t)this.style(r,t[r],n);return this}r=""}return Wa(this,"style."+t,n,a)},Rs.styleTween=function(t,n,r){function i(i,a){var o=n.call(this,i,a,e(this).getComputedStyle(this,null).getPropertyValue(t));return o&&function(n){this.style.setProperty(t,o(n),r)}}return arguments.length<3&&(r=""),this.tween("style."+t,i)},Rs.text=function(t){return Wa(this,"text",t,Ha)},Rs.remove=function(){var t=this.namespace;return this.each("end.transition",function(){var n;this[t].count<2&&(n=this.parentNode)&&n.removeChild(this)})},Rs.ease=function(t){var n=this.id,e=this.namespace;return arguments.length<1?this.node()[e][n].ease:("function"!=typeof t&&(t=eo.ease.apply(eo,arguments)),q(this,function(r){r[e][n].ease=t}))},Rs.delay=function(t){var n=this.id,e=this.namespace;return arguments.length<1?this.node()[e][n].delay:q(this,"function"==typeof t?function(r,i,a){r[e][n].delay=+t.call(r,r.__data__,i,a)}:(t=+t,function(r){r[e][n].delay=t}))},Rs.duration=function(t){var n=this.id,e=this.namespace;return arguments.length<1?this.node()[e][n].duration:q(this,"function"==typeof t?function(r,i,a){r[e][n].duration=Math.max(1,t.call(r,r.__data__,i,a))}:(t=Math.max(1,t),function(r){r[e][n].duration=t}))},Rs.each=function(t,n){var e=this.id,r=this.namespace;if(arguments.length<2){var i=Ps,a=Ns;try{Ns=e,q(this,function(n,i,a){Ps=n[r][e],t.call(n,n.__data__,i,a)})}finally{Ps=i,Ns=a}}else q(this,function(i){var a=i[r][e];(a.event||(a.event=eo.dispatch("start","end","interrupt"))).on(t,n)});return this},Rs.transition=function(){for(var t,n,e,r,i=this.id,a=++js,o=this.namespace,u=[],s=0,c=this.length;c>s;s++){u.push(t=[]);for(var n=this[s],l=0,h=n.length;h>l;l++)(e=n[l])&&(r=e[o][i],Va(e,l,o,a,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),t.push(e)}return qa(u,o,a)},eo.svg.axis=function(){function t(t){t.each(function(){var t,c=eo.select(this),l=this.__chart__||e,h=this.__chart__=e.copy(),f=null==s?h.ticks?h.ticks.apply(h,u):h.domain():s,d=null==n?h.tickFormat?h.tickFormat.apply(h,u):_:n,p=c.selectAll(".tick").data(f,h),g=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Fo),y=eo.transition(p.exit()).style("opacity",Fo).remove(),m=eo.transition(p.order()).style("opacity",1),v=Math.max(i,0)+o,b=ji(h),x=c.selectAll(".domain").data([0]),w=(x.enter().append("path").attr("class","domain"),eo.transition(x));g.append("line"),g.append("text");var k,A,E,M,D=g.select("line"),S=m.select("line"),T=p.select("text").text(d),C=g.select("text"),F=m.select("text"),O="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(t=Za,k="x",E="y",A="x2",M="y2",T.attr("dy",0>O?"0em":".71em").style("text-anchor","middle"),w.attr("d","M"+b[0]+","+O*a+"V0H"+b[1]+"V"+O*a)):(t=Xa,k="y",E="x",A="y2",M="x2",T.attr("dy",".32em").style("text-anchor",0>O?"end":"start"),w.attr("d","M"+O*a+","+b[0]+"H0V"+b[1]+"H"+O*a)),D.attr(M,O*i),C.attr(E,O*v),S.attr(A,0).attr(M,O*i),F.attr(k,0).attr(E,O*v),h.rangeBand){var L=h,I=L.rangeBand()/2;l=h=function(t){return L(t)+I}}else l.rangeBand?l=h:y.call(t,h,l);g.call(t,l,h),m.call(t,h,h)})}var n,e=eo.scale.linear(),r=Ys,i=6,a=6,o=3,u=[10],s=null;return t.scale=function(n){return arguments.length?(e=n,t):e},t.orient=function(n){return arguments.length?(r=n in Us?n+"":Ys,t):r},t.ticks=function(){return arguments.length?(u=arguments,t):u},t.tickValues=function(n){return arguments.length?(s=n,t):s},t.tickFormat=function(e){return arguments.length?(n=e,t):n},t.tickSize=function(n){var e=arguments.length;return e?(i=+n,a=+arguments[e-1],t):i},t.innerTickSize=function(n){return arguments.length?(i=+n,t):i},t.outerTickSize=function(n){return arguments.length?(a=+n,t):a},t.tickPadding=function(n){return arguments.length?(o=+n,t):o},t.tickSubdivide=function(){return arguments.length&&t},t};var Ys="bottom",Us={top:1,right:1,bottom:1,left:1};eo.svg.brush=function(){function t(e){e.each(function(){var e=eo.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",a).on("touchstart.brush",a),o=e.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),e.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var u=e.selectAll(".resize").data(g,_);u.exit().remove(),u.enter().append("g").attr("class",function(t){return"resize "+t}).style("cursor",function(t){return $s[t]}).append("rect").attr("x",function(t){return/[ew]$/.test(t)?-3:null}).attr("y",function(t){return/^[ns]/.test(t)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),u.style("display",t.empty()?"none":null);var s,h=eo.transition(e),f=eo.transition(o);c&&(s=ji(c),f.attr("x",s[0]).attr("width",s[1]-s[0]),r(h)),l&&(s=ji(l),f.attr("y",s[0]).attr("height",s[1]-s[0]),i(h)),n(h)})}function n(t){t.selectAll(".resize").attr("transform",function(t){return"translate("+h[+/e$/.test(t)]+","+f[+/^s/.test(t)]+")"})}function r(t){t.select(".extent").attr("x",h[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",h[1]-h[0])}function i(t){t.select(".extent").attr("y",f[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1]-f[0])}function a(){function a(){32==eo.event.keyCode&&(T||(_=null,F[0]-=h[1],F[1]-=f[1],T=2),E())}function g(){32==eo.event.keyCode&&2==T&&(F[0]+=h[1],F[1]+=f[1],T=0,E())}function y(){var t=eo.mouse(x),e=!1;b&&(t[0]+=b[0],t[1]+=b[1]),T||(eo.event.altKey?(_||(_=[(h[0]+h[1])/2,(f[0]+f[1])/2]),F[0]=h[+(t[0]<_[0])],F[1]=f[+(t[1]<_[1])]):_=null),D&&m(t,c,0)&&(r(A),e=!0),S&&m(t,l,1)&&(i(A),e=!0),e&&(n(A),k({type:"brush",mode:T?"move":"resize"}))}function m(t,n,e){var r,i,a=ji(n),s=a[0],c=a[1],l=F[e],g=e?f:h,y=g[1]-g[0];return T&&(s-=l,c-=y+l),r=(e?p:d)?Math.max(s,Math.min(c,t[e])):t[e],T?i=(r+=l)+y:(_&&(l=Math.max(s,Math.min(c,2*_[e]-r))),r>l?(i=r,r=l):i=l),g[0]!=r||g[1]!=i?(e?u=null:o=null,g[0]=r,g[1]=i,!0):void 0}function v(){y(),A.style("pointer-events","all").selectAll(".resize").style("display",t.empty()?"none":null),eo.select("body").style("cursor",null),O.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),C(),k({type:"brushend"})}var _,b,x=this,w=eo.select(eo.event.target),k=s.of(x,arguments),A=eo.select(x),M=w.datum(),D=!/^(n|s)$/.test(M)&&c,S=!/^(e|w)$/.test(M)&&l,T=w.classed("extent"),C=X(x),F=eo.mouse(x),O=eo.select(e(x)).on("keydown.brush",a).on("keyup.brush",g);if(eo.event.changedTouches?O.on("touchmove.brush",y).on("touchend.brush",v):O.on("mousemove.brush",y).on("mouseup.brush",v),A.interrupt().selectAll("*").interrupt(),T)F[0]=h[0]-F[0],F[1]=f[0]-F[1];else if(M){var L=+/w$/.test(M),I=+/^n/.test(M);b=[h[1-L]-F[0],f[1-I]-F[1]],F[0]=h[L],F[1]=f[I]}else eo.event.altKey&&(_=F.slice());A.style("pointer-events","none").selectAll(".resize").style("display",null),eo.select("body").style("cursor",w.style("cursor")),k({type:"brushstart"}),y()}var o,u,s=D(t,"brushstart","brush","brushend"),c=null,l=null,h=[0,0],f=[0,0],d=!0,p=!0,g=zs[0];return t.event=function(t){t.each(function(){var t=s.of(this,arguments),n={x:h,y:f,i:o,j:u},e=this.__chart__||n;this.__chart__=n,Ns?eo.select(this).transition().each("start.brush",function(){o=e.i,u=e.j,h=e.x,f=e.y,t({type:"brushstart"})}).tween("brush:brush",function(){var e=br(h,n.x),r=br(f,n.y);return o=u=null,function(i){h=n.x=e(i),f=n.y=r(i),t({type:"brush",mode:"resize"})}}).each("end.brush",function(){o=n.i,u=n.j,t({type:"brush",mode:"resize"}),t({type:"brushend"})}):(t({type:"brushstart"}),t({type:"brush",mode:"resize"}),t({type:"brushend"}))})},t.x=function(n){return arguments.length?(c=n,g=zs[!c<<1|!l],t):c},t.y=function(n){return arguments.length?(l=n,g=zs[!c<<1|!l],t):l},t.clamp=function(n){return arguments.length?(c&&l?(d=!!n[0],p=!!n[1]):c?d=!!n:l&&(p=!!n),t):c&&l?[d,p]:c?d:l?p:null},t.extent=function(n){var e,r,i,a,s;return arguments.length?(c&&(e=n[0],r=n[1],l&&(e=e[0],r=r[0]),o=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(s=e,e=r,r=s),(e!=h[0]||r!=h[1])&&(h=[e,r])),l&&(i=n[0],a=n[1],c&&(i=i[1],a=a[1]),u=[i,a],l.invert&&(i=l(i),a=l(a)),i>a&&(s=i,i=a,a=s),(i!=f[0]||a!=f[1])&&(f=[i,a])),t):(c&&(o?(e=o[0],r=o[1]):(e=h[0],r=h[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(s=e,e=r,r=s))),l&&(u?(i=u[0],a=u[1]):(i=f[0],a=f[1],l.invert&&(i=l.invert(i),a=l.invert(a)),i>a&&(s=i,i=a,a=s))),c&&l?[[e,i],[r,a]]:c?[e,r]:l&&[i,a])},t.clear=function(){return t.empty()||(h=[0,0],f=[0,0],o=u=null),t},t.empty=function(){return!!c&&h[0]==h[1]||!!l&&f[0]==f[1]},eo.rebind(t,s,"on")};var $s={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},zs=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],qs=cu.format=gu.timeFormat,Ws=qs.utc,Hs=Ws("%Y-%m-%dT%H:%M:%S.%LZ");qs.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Ka:Hs,Ka.parse=function(t){var n=new Date(t);return isNaN(n)?null:n},Ka.toString=Hs.toString,cu.second=Yt(function(t){return new lu(1e3*Math.floor(t/1e3))},function(t,n){t.setTime(t.getTime()+1e3*Math.floor(n))},function(t){return t.getSeconds()}),cu.seconds=cu.second.range,cu.seconds.utc=cu.second.utc.range,cu.minute=Yt(function(t){return new lu(6e4*Math.floor(t/6e4))},function(t,n){t.setTime(t.getTime()+6e4*Math.floor(n))},function(t){return t.getMinutes()}),cu.minutes=cu.minute.range,cu.minutes.utc=cu.minute.utc.range,cu.hour=Yt(function(t){var n=t.getTimezoneOffset()/60;return new lu(36e5*(Math.floor(t/36e5-n)+n))},function(t,n){t.setTime(t.getTime()+36e5*Math.floor(n))},function(t){return t.getHours()}),cu.hours=cu.hour.range,cu.hours.utc=cu.hour.utc.range,cu.month=Yt(function(t){return t=cu.day(t),t.setDate(1),t},function(t,n){t.setMonth(t.getMonth()+n)},function(t){return t.getMonth()}),cu.months=cu.month.range,cu.months.utc=cu.month.utc.range;var Gs=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Vs=[[cu.second,1],[cu.second,5],[cu.second,15],[cu.second,30],[cu.minute,1],[cu.minute,5],[cu.minute,15],[cu.minute,30],[cu.hour,1],[cu.hour,3],[cu.hour,6],[cu.hour,12],[cu.day,1],[cu.day,2],[cu.week,1],[cu.month,1],[cu.month,3],[cu.year,1]],Zs=qs.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",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()}],["%Y",Cn]]),Xs={range:function(t,n,e){return eo.range(Math.ceil(t/e)*e,+n,e).map(Ja)},floor:_,ceil:_};Vs.year=cu.year,cu.scale=function(){return Qa(eo.scale.linear(),Vs,Zs)};var Ks=Vs.map(function(t){return[t[0].utc,t[1]]}),Qs=Ws.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",Cn]]);Ks.year=cu.year.utc,cu.scale.utc=function(){return Qa(eo.scale.linear(),Ks,Qs)},eo.text=St(function(t){return t.responseText}),eo.json=function(t,n){return Tt(t,"application/json",to,n)},eo.html=function(t,n){return Tt(t,"text/html",no,n)},eo.xml=St(function(t){return t.responseXML}),"function"==typeof define&&define.amd?define(eo):"object"==typeof n&&n.exports&&(n.exports=eo),this.d3=eo}()},{}],5:[function(t,n){n.exports={graphlib:t("./lib/graphlib"),dagre:t("./lib/dagre"),intersect:t("./lib/intersect"),render:t("./lib/render"),util:t("./lib/util"),version:t("./lib/version")}},{"./lib/dagre":12,"./lib/graphlib":13,"./lib/intersect":14,"./lib/render":29,"./lib/util":31,"./lib/version":32}],6:[function(t,n){function e(t,n,e,r){var i=t.append("marker").attr("id",n).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),o=i.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");a.applyStyle(o,e[r+"Style"])}function r(t,n,e,r){var i=t.append("marker").attr("id",n).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),o=i.append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");a.applyStyle(o,e[r+"Style"])}function i(t,n,e,r){var i=t.append("marker").attr("id",n).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),o=i.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");a.applyStyle(o,e[r+"Style"])}var a=t("./util");n.exports={"default":e,normal:e,vee:r,undirected:i}},{"./util":31}],7:[function(t,n){function e(t,n){var e=n.nodes().filter(function(t){return r.isSubgraph(n,t)}),a=t.selectAll("g.cluster").data(e,function(t){return t});return a.selectAll("*").remove(),a.enter().append("g").attr("class","cluster").attr("id",function(t){var e=n.node(t);return e.id}).style("opacity",0),r.applyTransition(a,n).style("opacity",1),a.each(function(t){var e=n.node(t),r=d3.select(this);d3.select(this).append("rect");var a=r.append("g").attr("class","label");i(a,e,e.clusterLabelPos)}),a.selectAll("rect").each(function(t){var e=n.node(t),i=d3.select(this);r.applyStyle(i,e.style)}),r.applyTransition(a.exit(),n).style("opacity",0).remove(),a}var r=t("./util"),i=t("./label/add-label");n.exports=e},{"./label/add-label":22,"./util":31}],8:[function(t,n){"use strict";function e(t,n){var e=t.selectAll("g.edgeLabel").data(n.edges(),function(t){return a.edgeToId(t)}).classed("update",!0);return e.selectAll("*").remove(),e.enter().append("g").classed("edgeLabel",!0).style("opacity",0),e.each(function(t){var e=n.edge(t),a=i(o.select(this),n.edge(t),0,0).classed("label",!0),u=a.node().getBBox();e.labelId&&a.attr("id",e.labelId),r.has(e,"width")||(e.width=u.width),r.has(e,"height")||(e.height=u.height)}),a.applyTransition(e.exit(),n).style("opacity",0).remove(),e}var r=t("./lodash"),i=t("./label/add-label"),a=t("./util"),o=t("./d3");n.exports=e},{"./d3":11,"./label/add-label":22,"./lodash":25,"./util":31}],9:[function(t,n){"use strict";function e(t,n,e){var i=t.selectAll("g.edgePath").data(n.edges(),function(t){return l.edgeToId(t)}).classed("update",!0);return o(i,n),u(i,n),l.applyTransition(i,n).style("opacity",1),i.each(function(t){var e=h.select(this),r=n.edge(t);r.elem=this,r.id&&e.attr("id",r.id),l.applyClass(e,r["class"],(e.classed("update")?"update ":"")+"edgePath")}),i.selectAll("path.path").each(function(t){var e=n.edge(t);e.arrowheadId=s.uniqueId("arrowhead");var i=h.select(this).attr("marker-end",function(){return"url(#"+e.arrowheadId+")"}).style("fill","none");l.applyTransition(i,n).attr("d",function(t){return r(n,t)}),l.applyStyle(i,e.style)}),i.selectAll("defs *").remove(),i.selectAll("defs").each(function(t){var r=n.edge(t),i=e[r.arrowhead];i(h.select(this),r.arrowheadId,r,"arrowhead")}),i}function r(t,n){var e=t.edge(n),r=t.node(n.v),a=t.node(n.w),o=e.points.slice(1,e.points.length-1);return o.unshift(c(r,o[0])),o.push(c(a,o[o.length-1])),i(e,o)}function i(t,n){var e=h.svg.line().x(function(t){return t.x}).y(function(t){return t.y});return s.has(t,"lineInterpolate")&&e.interpolate(t.lineInterpolate),s.has(t,"lineTension")&&e.tension(Number(t.lineTension)),e(n)}function a(t){var n=t.getBBox(),e=t.getTransformToElement(t.ownerSVGElement).translate(n.width/2,n.height/2);return{x:e.e,y:e.f}}function o(t,n){var e=t.enter().append("g").attr("class","edgePath").style("opacity",0);e.append("path").attr("class","path").attr("d",function(t){var e=n.edge(t),r=n.node(t.v).elem,o=s.range(e.points.length).map(function(){return a(r)});return i(e,o)}),e.append("defs")}function u(t,n){var e=t.exit();l.applyTransition(e,n).style("opacity",0).remove(),l.applyTransition(e.select("path.path"),n).attr("d",function(t){var e=n.node(t.v);if(e){var r=s.range(this.pathSegList.length).map(function(){return e});return i({},r)}return h.select(this).attr("d")})}var s=t("./lodash"),c=t("./intersect/intersect-node"),l=t("./util"),h=t("./d3");n.exports=e},{"./d3":11,"./intersect/intersect-node":18,"./lodash":25,"./util":31}],10:[function(t,n){"use strict";
|
||
|
||
function e(t,n,e){var u=n.nodes().filter(function(t){return!a.isSubgraph(n,t)}),s=t.selectAll("g.node").data(u,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 u=n.node(t),s=o.select(this),c=s.append("g").attr("class","label"),l=i(c,u),h=e[u.shape],f=r.pick(l.node().getBBox(),"width","height");u.elem=this,u.id&&s.attr("id",u.id),u.labelId&&c.attr("id",u.labelId),a.applyClass(s,u["class"],(s.classed("update")?"update ":"")+"node"),r.has(u,"width")&&(f.width=u.width),r.has(u,"height")&&(f.height=u.height),f.width+=u.paddingLeft+u.paddingRight,f.height+=u.paddingTop+u.paddingBottom,c.attr("transform","translate("+(u.paddingLeft-u.paddingRight)/2+","+(u.paddingTop-u.paddingBottom)/2+")");var d=h(o.select(this),f,u);a.applyStyle(d,u.style);var p=d.node().getBBox();u.width=p.width,u.height=p.height}),a.applyTransition(s.exit(),n).style("opacity",0).remove(),s}var r=t("./lodash"),i=t("./label/add-label"),a=t("./util"),o=t("./d3");n.exports=e},{"./d3":11,"./label/add-label":22,"./lodash":25,"./util":31}],11:[function(t,n){n.exports=window.d3},{}],12:[function(t,n){var e;if(t)try{e=t("dagre")}catch(r){}e||(e=window.dagre),n.exports=e},{dagre:33}],13:[function(t,n){var e;if(t)try{e=t("graphlib")}catch(r){}e||(e=window.graphlib),n.exports=e},{graphlib:63}],14:[function(t,n){n.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,n){function e(t,n,e){return r(t,n,n,e)}var r=t("./intersect-ellipse");n.exports=e},{"./intersect-ellipse":16}],16:[function(t,n){function e(t,n,e,r){var i=t.x,a=t.y,o=i-r.x,u=a-r.y,s=Math.sqrt(n*n*u*u+e*e*o*o),c=Math.abs(n*e*o/s);r.x<i&&(c=-c);var l=Math.abs(n*e*u/s);return r.y<a&&(l=-l),{x:i+c,y:a+l}}n.exports=e},{}],17:[function(t,n){function e(t,n,e,i){var a,o,u,s,c,l,h,f,d,p,g,y,m,v,_;return a=n.y-t.y,u=t.x-n.x,c=n.x*t.y-t.x*n.y,d=a*e.x+u*e.y+c,p=a*i.x+u*i.y+c,0!==d&&0!==p&&r(d,p)||(o=i.y-e.y,s=e.x-i.x,l=i.x*e.y-e.x*i.y,h=o*t.x+s*t.yy+l,f=o*n.x+s*n.y+l,0!==h&&0!==f&&r(h,f)||(g=a*s-o*u,0===g))?void 0:(y=Math.abs(g/2),m=u*l-s*c,v=0>m?(m-y)/g:(m+y)/g,m=o*c-a*l,_=0>m?(m-y)/g:(m+y)/g,{x:v,y:_})}function r(t,n){return t*n>0}n.exports=e},{}],18:[function(t,n){function e(t,n){return t.intersect(n)}n.exports=e},{}],19:[function(t,n){function e(t,n,e){var i=t.x,a=t.y,o=[],u=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;n.forEach(function(t){u=Math.min(u,t.x),s=Math.min(s,t.y)});for(var c=i-t.width/2-u,l=a-t.height/2-s,h=0;h<n.length;h++){var f=n[h],d=n[h<n.length-1?h+1:0],p=r(t,e,{x:c+f.x,y:l+f.y},{x:c+d.x,y:l+d.y});p&&o.push(p)}return o.length?(o.length>1&&o.sort(function(t,n){var r=t.x-e.x,i=t.y-e.y,a=Math.sqrt(r*r+i*i),o=n.x-e.x,u=n.y-e.y,s=Math.sqrt(o*o+u*u);return s>a?-1:a===s?0:1}),o[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t)}var r=t("./intersect-line");n.exports=e},{"./intersect-line":17}],20:[function(t,n){function e(t,n){var e,r,i=t.x,a=t.y,o=n.x-i,u=n.y-a,s=t.width/2,c=t.height/2;return Math.abs(u)*s>Math.abs(o)*c?(0>u&&(c=-c),e=0===u?0:c*o/u,r=c):(0>o&&(s=-s),e=s,r=0===o?0:s*u/o),{x:i+e,y:a+r}}n.exports=e},{}],21:[function(t,n){function e(t,n){var e=t.append("foreignObject").attr("width","100000"),i=e.append("xhtml:div"),a=n.label;switch(typeof a){case"function":i.insert(a);break;case"object":i.insert(function(){return a});break;default:i.html(a)}r.applyStyle(i,n.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var o,u;return i.each(function(){o=this.clientWidth,u=this.clientHeight}),e.attr("width",o).attr("height",u),e}var r=t("../util");n.exports=e},{"../util":31}],22:[function(t,n){function e(t,n,e){var o=n.label,u=t.append("g");"svg"===n.labelType?a(u,n):"string"!=typeof o||"html"===n.labelType?i(u,n):r(u,n);var s,c=u.node().getBBox();switch(e){case"top":s=-n.height/2;break;case"bottom":s=n.height/2-c.height;break;default:s=-c.height/2}return u.attr("transform","translate("+-c.width/2+","+s+")"),u}var r=t("./add-text-label"),i=t("./add-html-label"),a=t("./add-svg-label");n.exports=e},{"./add-html-label":21,"./add-svg-label":23,"./add-text-label":24}],23:[function(t,n){function e(t,n){var e=t;return e.node().appendChild(n.label),r.applyStyle(e,n.labelStyle),e}var r=t("../util");n.exports=e},{"../util":31}],24:[function(t,n){function e(t,n){for(var e=t.append("text"),a=r(n.label).split("\n"),o=0;o<a.length;o++)e.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(a[o]);return i.applyStyle(e,n.labelStyle),e}function r(t){for(var n,e="",r=!1,i=0;i<t.length;++i)if(n=t[i],r){switch(n){case"n":e+="\n";break;default:e+=n}r=!1}else"\\"===n?r=!0:e+=n;return e}var i=t("../util");n.exports=e},{"../util":31}],25:[function(t,n){var e;if(t)try{e=t("lodash")}catch(r){}e||(e=window._),n.exports=e},{lodash:83}],26:[function(t,n){"use strict";function e(t,n){function e(t){var e=n.node(t);return"translate("+e.x+","+e.y+")"}var a=t.filter(function(){return!i.select(this).classed("update")});a.attr("transform",e),r.applyTransition(t,n).style("opacity",1).attr("transform",e),r.applyTransition(a.selectAll("rect"),n).attr("width",function(t){return n.node(t).width}).attr("height",function(t){return n.node(t).height}).attr("x",function(t){var e=n.node(t);return-e.width/2}).attr("y",function(t){var e=n.node(t);return-e.height/2})}var r=t("./util"),i=t("./d3");n.exports=e},{"./d3":11,"./util":31}],27:[function(t,n){"use strict";function e(t,n){function e(t){var e=n.edge(t);return a.has(e,"x")?"translate("+e.x+","+e.y+")":""}var o=t.filter(function(){return!i.select(this).classed("update")});o.attr("transform",e),r.applyTransition(t,n).style("opacity",1).attr("transform",e)}var r=t("./util"),i=t("./d3"),a=t("./lodash");n.exports=e},{"./d3":11,"./lodash":25,"./util":31}],28:[function(t,n){"use strict";function e(t,n){function e(t){var e=n.node(t);return"translate("+e.x+","+e.y+")"}var a=t.filter(function(){return!i.select(this).classed("update")});a.attr("transform",e),r.applyTransition(t,n).style("opacity",1).attr("transform",e)}var r=t("./util"),i=t("./d3");n.exports=e},{"./d3":11,"./util":31}],29:[function(t,n){function e(){var n=t("./create-nodes"),e=t("./create-clusters"),o=t("./create-edge-labels"),s=t("./create-edge-paths"),c=t("./position-nodes"),l=t("./position-edge-labels"),h=t("./position-clusters"),f=t("./shapes"),d=t("./arrows"),p=function(t,p){r(p);var g=a(t,"output"),y=a(g,"clusters"),m=a(g,"edgePaths"),v=o(a(g,"edgeLabels"),p),_=n(a(g,"nodes"),p,f);u(p),c(_,p),l(v,p),s(m,p,d);var b=e(y,p);h(b,p),i(p)};return p.createNodes=function(t){return arguments.length?(n=t,p):n},p.createClusters=function(t){return arguments.length?(e=t,p):e},p.createEdgeLabels=function(t){return arguments.length?(o=t,p):o},p.createEdgePaths=function(t){return arguments.length?(s=t,p):s},p.shapes=function(t){return arguments.length?(f=t,p):f},p.arrows=function(t){return arguments.length?(d=t,p):d},p}function r(t){t.nodes().forEach(function(n){var e=t.node(n);o.has(e,"label")||t.children(n).length||(e.label=n),o.has(e,"paddingX")&&o.defaults(e,{paddingLeft:e.paddingX,paddingRight:e.paddingX}),o.has(e,"paddingY")&&o.defaults(e,{paddingTop:e.paddingY,paddingBottom:e.paddingY}),o.has(e,"padding")&&o.defaults(e,{paddingLeft:e.padding,paddingRight:e.padding,paddingTop:e.padding,paddingBottom:e.padding}),o.defaults(e,s),o.each(["paddingLeft","paddingRight","paddingTop","paddingBottom"],function(t){e[t]=Number(e[t])}),o.has(e,"width")&&(e._prevWidth=e.width),o.has(e,"height")&&(e._prevHeight=e.height)}),t.edges().forEach(function(n){var e=t.edge(n);o.has(e,"label")||(e.label=""),o.defaults(e,c)})}function i(t){o.each(t.nodes(),function(n){var e=t.node(n);o.has(e,"_prevWidth")?e.width=e._prevWidth:delete e.width,o.has(e,"_prevHeight")?e.height=e._prevHeight:delete e.height,delete e._prevWidth,delete e._prevHeight})}function a(t,n){var e=t.select("g."+n);return e.empty()&&(e=t.append("g").attr("class",n)),e}var o=t("./lodash"),u=t("./dagre").layout;n.exports=e;var s={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},c={arrowhead:"normal",lineInterpolate:"linear"}},{"./arrows":6,"./create-clusters":7,"./create-edge-labels":8,"./create-edge-paths":9,"./create-nodes":10,"./dagre":12,"./lodash":25,"./position-clusters":26,"./position-edge-labels":27,"./position-nodes":28,"./shapes":30}],30:[function(t,n){"use strict";function e(t,n,e){var r=t.insert("rect",":first-child").attr("rx",e.rx).attr("ry",e.ry).attr("x",-n.width/2).attr("y",-n.height/2).attr("width",n.width).attr("height",n.height);return e.intersect=function(t){return o(e,t)},r}function r(t,n,e){var r=n.width/2,i=n.height/2,a=t.insert("ellipse",":first-child").attr("x",-n.width/2).attr("y",-n.height/2).attr("rx",r).attr("ry",i);return e.intersect=function(t){return u(e,r,i,t)},a}function i(t,n,e){var r=Math.max(n.width,n.height)/2,i=t.insert("circle",":first-child").attr("x",-n.width/2).attr("y",-n.height/2).attr("r",r);return e.intersect=function(t){return s(e,r,t)},i}function a(t,n,e){var r=n.width*Math.SQRT2/2,i=n.height*Math.SQRT2/2,a=[{x:0,y:-i},{x:-r,y:0},{x:0,y:i},{x:r,y:0}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" "));return e.intersect=function(t){return c(e,a,t)},o}var o=t("./intersect/intersect-rect"),u=t("./intersect/intersect-ellipse"),s=t("./intersect/intersect-circle"),c=t("./intersect/intersect-polygon");n.exports={rect:e,ellipse:r,circle:i,diamond:a}},{"./intersect/intersect-circle":15,"./intersect/intersect-ellipse":16,"./intersect/intersect-polygon":19,"./intersect/intersect-rect":20}],31:[function(t,n){function e(t,n){return!!t.children(n).length}function r(t){return i(t.v)+":"+i(t.w)+":"+i(t.name)}function i(t){return t?String(t).replace(c,"\\:"):""}function a(t,n){n&&t.attr("style",n)}function o(t,n,e){n&&t.attr("class",n).attr("class",e+" "+t.attr("class"))}function u(t,n){var e=n.graph();if(s.isPlainObject(e)){var r=e.transition;if(s.isFunction(r))return r(t)}return t}var s=t("./lodash");n.exports={isSubgraph:e,edgeToId:r,applyStyle:a,applyClass:o,applyTransition:u};var c=/:/g},{"./lodash":25}],32:[function(t,n){n.exports="0.4.10"},{}],33:[function(t,n){n.exports={graphlib:t("./lib/graphlib"),layout:t("./lib/layout"),debug:t("./lib/debug"),util:{time:t("./lib/util").time,notime:t("./lib/util").notime},version:t("./lib/version")}},{"./lib/debug":38,"./lib/graphlib":39,"./lib/layout":41,"./lib/util":61,"./lib/version":62}],34:[function(t,n){"use strict";function e(t){function n(t){return function(n){return t.edge(n).weight}}var e="greedy"===t.graph().acyclicer?o(t,n(t)):r(t);a.each(e,function(n){var e=t.edge(n);t.removeEdge(n),e.forwardName=n.name,e.reversed=!0,t.setEdge(n.w,n.v,e,a.uniqueId("rev"))})}function r(t){function n(o){a.has(i,o)||(i[o]=!0,r[o]=!0,a.each(t.outEdges(o),function(t){a.has(r,t.w)?e.push(t):n(t.w)}),delete r[o])}var e=[],r={},i={};return a.each(t.nodes(),n),e}function i(t){a.each(t.edges(),function(n){var e=t.edge(n);if(e.reversed){t.removeEdge(n);var r=e.forwardName;delete e.reversed,delete e.forwardName,t.setEdge(n.w,n.v,e,r)}})}var a=t("./lodash"),o=t("./greedy-fas");n.exports={run:e,undo:i}},{"./greedy-fas":40,"./lodash":42}],35:[function(t,n){function e(t){function n(e){var a=t.children(e),o=t.node(e);if(a.length&&i.each(a,n),i.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var u=o.minRank,s=o.maxRank+1;s>u;++u)r(t,"borderLeft","_bl",e,o,u),r(t,"borderRight","_br",e,o,u)}}i.each(t.children(),n)}function r(t,n,e,r,i,o){var u={width:0,height:0,rank:o,borderType:n},s=i[n][o-1],c=a.addDummyNode(t,"border",u,e);i[n][o]=c,t.setParent(c,r),s&&t.setEdge(s,c,{weight:1})}var i=t("./lodash"),a=t("./util");n.exports=e},{"./lodash":42,"./util":61}],36:[function(t,n){"use strict";function e(t){var n=t.graph().rankdir.toLowerCase();("lr"===n||"rl"===n)&&i(t)}function r(t){var n=t.graph().rankdir.toLowerCase();("bt"===n||"rl"===n)&&o(t),("lr"===n||"rl"===n)&&(s(t),i(t))}function i(t){l.each(t.nodes(),function(n){a(t.node(n))}),l.each(t.edges(),function(n){a(t.edge(n))})}function a(t){var n=t.width;t.width=t.height,t.height=n}function o(t){l.each(t.nodes(),function(n){u(t.node(n))}),l.each(t.edges(),function(n){var e=t.edge(n);l.each(e.points,u),l.has(e,"y")&&u(e)})}function u(t){t.y=-t.y}function s(t){l.each(t.nodes(),function(n){c(t.node(n))}),l.each(t.edges(),function(n){var e=t.edge(n);l.each(e.points,c),l.has(e,"x")&&c(e)})}function c(t){var n=t.x;t.x=t.y,t.y=n}var l=t("./lodash");n.exports={adjust:e,undo:r}},{"./lodash":42}],37:[function(t,n){function e(){var t={};t._next=t._prev=t,this._sentinel=t}function r(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function i(t,n){return"_next"!==t&&"_prev"!==t?n:void 0}n.exports=e,e.prototype.dequeue=function(){var t=this._sentinel,n=t._prev;return n!==t?(r(n),n):void 0},e.prototype.enqueue=function(t){var n=this._sentinel;t._prev&&t._next&&r(t),t._next=n._next,n._next._prev=t,n._next=t,t._prev=n},e.prototype.toString=function(){for(var t=[],n=this._sentinel,e=n._prev;e!==n;)t.push(JSON.stringify(e,i)),e=e._prev;return"["+t.join(", ")+"]"}},{}],38:[function(t,n){function e(t){var n=i.buildLayerMatrix(t),e=new a({compound:!0,multigraph:!0}).setGraph({});return r.each(t.nodes(),function(n){e.setNode(n,{label:n}),e.setParent(n,"layer"+t.node(n).rank)}),r.each(t.edges(),function(t){e.setEdge(t.v,t.w,{},t.name)}),r.each(n,function(t,n){var i="layer"+n;e.setNode(i,{rank:"same"}),r.reduce(t,function(t,n){return e.setEdge(t,n,{style:"invis"}),n})}),e}var r=t("./lodash"),i=t("./util"),a=t("./graphlib").Graph;n.exports={debugOrdering:e}},{"./graphlib":39,"./lodash":42,"./util":61}],39:[function(t,n){var e;if("function"==typeof t)try{e=t("graphlib")}catch(r){}e||(e=window.graphlib),n.exports=e},{graphlib:63}],40:[function(t,n){function e(t,n){if(t.nodeCount()<=1)return[];var e=a(t,n||l),i=r(e.graph,e.buckets,e.zeroIdx);return u.flatten(u.map(i,function(n){return t.outEdges(n.v,n.w)}),!0)}function r(t,n,e){for(var r,a=[],o=n[n.length-1],u=n[0];t.nodeCount();){for(;r=u.dequeue();)i(t,n,e,r);for(;r=o.dequeue();)i(t,n,e,r);if(t.nodeCount())for(var s=n.length-2;s>0;--s)if(r=n[s].dequeue()){a=a.concat(i(t,n,e,r,!0));break}}return a}function i(t,n,e,r,i){var a=i?[]:void 0;return u.each(t.inEdges(r.v),function(r){var u=t.edge(r),s=t.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=u,o(n,e,s)}),u.each(t.outEdges(r.v),function(r){var i=t.edge(r),a=r.w,u=t.node(a);u["in"]-=i,o(n,e,u)}),t.removeNode(r.v),a}function a(t,n){var e=new s,r=0,i=0;u.each(t.nodes(),function(t){e.setNode(t,{v:t,"in":0,out:0})}),u.each(t.edges(),function(t){var a=e.edge(t.v,t.w)||0,o=n(t),u=a+o;e.setEdge(t.v,t.w,u),i=Math.max(i,e.node(t.v).out+=o),r=Math.max(r,e.node(t.w)["in"]+=o)});var a=u.range(i+r+3).map(function(){return new c}),l=r+1;return u.each(e.nodes(),function(t){o(a,l,e.node(t))}),{graph:e,buckets:a,zeroIdx:l}}function o(t,n,e){e.out?e["in"]?t[e.out-e["in"]+n].enqueue(e):t[t.length-1].enqueue(e):t[0].enqueue(e)}var u=t("./lodash"),s=t("./graphlib").Graph,c=t("./data/list");n.exports=e;var l=u.constant(1)},{"./data/list":37,"./graphlib":39,"./lodash":42}],41:[function(t,n){"use strict";function e(t,n){var e=n&&n.debugTiming?O.time:O.notime;e("layout",function(){var n=e(" buildLayoutGraph",function(){return a(t)});e(" runLayout",function(){r(n,e)}),e(" updateInputGraph",function(){i(t,n)})})}function r(t,n){n(" makeSpaceForEdgeLabels",function(){o(t)}),n(" removeSelfEdges",function(){g(t)}),n(" acyclic",function(){x.run(t)}),n(" nestingGraph.run",function(){D.run(t)}),n(" rank",function(){k(O.asNonCompoundGraph(t))}),n(" injectEdgeLabelProxies",function(){u(t)}),n(" removeEmptyRanks",function(){M(t)}),n(" nestingGraph.cleanup",function(){D.cleanup(t)}),n(" normalizeRanks",function(){A(t)}),n(" assignRankMinMax",function(){s(t)}),n(" removeEdgeLabelProxies",function(){c(t)}),n(" normalize.run",function(){w.run(t)}),n(" parentDummyChains",function(){E(t)}),n(" addBorderSegments",function(){S(t)}),n(" order",function(){C(t)}),n(" insertSelfEdges",function(){y(t)}),n(" adjustCoordinateSystem",function(){T.adjust(t)}),n(" position",function(){F(t)}),n(" positionSelfEdges",function(){m(t)}),n(" removeBorderNodes",function(){p(t)}),n(" normalize.undo",function(){w.undo(t)}),n(" fixupEdgeLabelCoords",function(){f(t)}),n(" undoCoordinateSystem",function(){T.undo(t)}),n(" translateGraph",function(){l(t)}),n(" assignNodeIntersects",function(){h(t)}),n(" reversePoints",function(){d(t)}),n(" acyclic.undo",function(){x.undo(t)})}function i(t,n){b.each(t.nodes(),function(e){var r=t.node(e),i=n.node(e);r&&(r.x=i.x,r.y=i.y,n.children(e).length&&(r.width=i.width,r.height=i.height))}),b.each(t.edges(),function(e){var r=t.edge(e),i=n.edge(e);r.points=i.points,b.has(i,"x")&&(r.x=i.x,r.y=i.y)}),t.graph().width=n.graph().width,t.graph().height=n.graph().height}function a(t){var n=new L({multigraph:!0,compound:!0}),e=_(t.graph());return n.setGraph(b.merge({},N,v(e,I),b.pick(e,P))),b.each(t.nodes(),function(e){var r=_(t.node(e));n.setNode(e,b.defaults(v(r,B),R)),n.setParent(e,t.parent(e))}),b.each(t.edges(),function(e){var r=_(t.edge(e));n.setEdge(e,b.merge({},Y,v(r,j),b.pick(r,U)))}),n}function o(t){var n=t.graph();n.ranksep/=2,b.each(t.edges(),function(e){var r=t.edge(e);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===n.rankdir||"BT"===n.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function u(t){b.each(t.edges(),function(n){var e=t.edge(n);if(e.width&&e.height){var r=t.node(n.v),i=t.node(n.w),a={rank:(i.rank-r.rank)/2+r.rank,e:n};O.addDummyNode(t,"edge-proxy",a,"_ep")}})}function s(t){var n=0;b.each(t.nodes(),function(e){var r=t.node(e);r.borderTop&&(r.minRank=t.node(r.borderTop).rank,r.maxRank=t.node(r.borderBottom).rank,n=b.max(n,r.maxRank))}),t.graph().maxRank=n}function c(t){b.each(t.nodes(),function(n){var e=t.node(n);"edge-proxy"===e.dummy&&(t.edge(e.e).labelRank=e.rank,t.removeNode(n))})}function l(t){function n(t){var n=t.x,o=t.y,u=t.width,s=t.height;e=Math.min(e,n-u/2),r=Math.max(r,n+u/2),i=Math.min(i,o-s/2),a=Math.max(a,o+s/2)}var e=Number.POSITIVE_INFINITY,r=0,i=Number.POSITIVE_INFINITY,a=0,o=t.graph(),u=o.marginx||0,s=o.marginy||0;b.each(t.nodes(),function(e){n(t.node(e))}),b.each(t.edges(),function(e){var r=t.edge(e);b.has(r,"x")&&n(r)}),e-=u,i-=s,b.each(t.nodes(),function(n){var r=t.node(n);r.x-=e,r.y-=i}),b.each(t.edges(),function(n){var r=t.edge(n);b.each(r.points,function(t){t.x-=e,t.y-=i}),b.has(r,"x")&&(r.x-=e),b.has(r,"y")&&(r.y-=i)}),o.width=r-e+u,o.height=a-i+s}function h(t){b.each(t.edges(),function(n){var e,r,i=t.edge(n),a=t.node(n.v),o=t.node(n.w);i.points?(e=i.points[0],r=i.points[i.points.length-1]):(i.points=[],e=o,r=a),i.points.unshift(O.intersectRect(a,e)),i.points.push(O.intersectRect(o,r))})}function f(t){b.each(t.edges(),function(n){var e=t.edge(n);if(b.has(e,"x"))switch(("l"===e.labelpos||"r"===e.labelpos)&&(e.width-=e.labeloffset),e.labelpos){case"l":e.x-=e.width/2+e.labeloffset;break;case"r":e.x+=e.width/2+e.labeloffset}})}function d(t){b.each(t.edges(),function(n){var e=t.edge(n);e.reversed&&e.points.reverse()})}function p(t){b.each(t.nodes(),function(n){if(t.children(n).length){var e=t.node(n),r=t.node(e.borderTop),i=t.node(e.borderBottom),a=t.node(b.last(e.borderLeft)),o=t.node(b.last(e.borderRight));e.width=Math.abs(o.x-a.x),e.height=Math.abs(i.y-r.y),e.x=a.x+e.width/2,e.y=r.y+e.height/2}}),b.each(t.nodes(),function(n){"border"===t.node(n).dummy&&t.removeNode(n)})}function g(t){b.each(t.edges(),function(n){if(n.v===n.w){var e=t.node(n.v);e.selfEdges||(e.selfEdges=[]),e.selfEdges.push({e:n,label:t.edge(n)}),t.removeEdge(n)}})}function y(t){var n=O.buildLayerMatrix(t);b.each(n,function(n){var e=0;b.each(n,function(n,r){var i=t.node(n);i.order=r+e,b.each(i.selfEdges,function(n){O.addDummyNode(t,"selfedge",{width:n.label.width,height:n.label.height,rank:i.rank,order:r+ ++e,e:n.e,label:n.label},"_se")}),delete i.selfEdges})})}function m(t){b.each(t.nodes(),function(n){var e=t.node(n);if("selfedge"===e.dummy){var r=t.node(e.e.v),i=r.x+r.width/2,a=r.y,o=e.x-i,u=r.height/2;t.setEdge(e.e,e.label),t.removeNode(n),e.label.points=[{x:i+2*o/3,y:a-u},{x:i+5*o/6,y:a-u},{x:i+o,y:a},{x:i+5*o/6,y:a+u},{x:i+2*o/3,y:a+u}],e.label.x=e.x,e.label.y=e.y}})}function v(t,n){return b.mapValues(b.pick(t,n),Number)}function _(t){var n={};return b.each(t,function(t,e){n[e.toLowerCase()]=t}),n}var b=t("./lodash"),x=t("./acyclic"),w=t("./normalize"),k=t("./rank"),A=t("./util").normalizeRanks,E=t("./parent-dummy-chains"),M=t("./util").removeEmptyRanks,D=t("./nesting-graph"),S=t("./add-border-segments"),T=t("./coordinate-system"),C=t("./order"),F=t("./position"),O=t("./util"),L=t("./graphlib").Graph;n.exports=e;var I=["nodesep","edgesep","ranksep","marginx","marginy"],N={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},P=["acyclicer","ranker","rankdir","align"],B=["width","height"],R={width:0,height:0},j=["minlen","weight","width","height","labeloffset"],Y={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},U=["labelpos"]},{"./acyclic":34,"./add-border-segments":35,"./coordinate-system":36,"./graphlib":39,"./lodash":42,"./nesting-graph":43,"./normalize":44,"./order":49,"./parent-dummy-chains":54,"./position":56,"./rank":58,"./util":61}],42:[function(t,n){var e;if("function"==typeof t)try{e=t("lodash")}catch(r){}e||(e=window._),n.exports=e},{lodash:83}],43:[function(t,n){function e(t){var n=s.addDummyNode(t,"root",{},"_root"),e=i(t),o=u.max(e)-1,c=2*o+1;t.graph().nestingRoot=n,u.each(t.edges(),function(n){t.edge(n).minlen*=c});var l=a(t)+1;u.each(t.children(),function(i){r(t,n,c,l,o,e,i)}),t.graph().nodeRankFactor=c}function r(t,n,e,i,a,o,c){var l=t.children(c);if(!l.length)return void(c!==n&&t.setEdge(n,c,{weight:0,minlen:e}));var h=s.addBorderNode(t,"_bt"),f=s.addBorderNode(t,"_bb"),d=t.node(c);t.setParent(h,c),d.borderTop=h,t.setParent(f,c),d.borderBottom=f,u.each(l,function(u){r(t,n,e,i,a,o,u);var s=t.node(u),l=s.borderTop?s.borderTop:u,d=s.borderBottom?s.borderBottom:u,p=s.borderTop?i:2*i,g=l!==d?1:a-o[c]+1;t.setEdge(h,l,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(d,f,{weight:p,minlen:g,nestingEdge:!0})}),t.parent(c)||t.setEdge(n,h,{weight:0,minlen:a+o[c]})}function i(t){function n(r,i){var a=t.children(r);a&&a.length&&u.each(a,function(t){n(t,i+1)}),e[r]=i}var e={};return u.each(t.children(),function(t){n(t,1)}),e}function a(t){return u.reduce(t.edges(),function(n,e){return n+t.edge(e).weight},0)}function o(t){var n=t.graph();t.removeNode(n.nestingRoot),delete n.nestingRoot,u.each(t.edges(),function(n){var e=t.edge(n);e.nestingEdge&&t.removeEdge(n)})}var u=t("./lodash"),s=t("./util");n.exports={run:e,cleanup:o}},{"./lodash":42,"./util":61}],44:[function(t,n){"use strict";function e(t){t.graph().dummyChains=[],a.each(t.edges(),function(n){r(t,n)})}function r(t,n){var e=n.v,r=t.node(e).rank,i=n.w,a=t.node(i).rank,u=n.name,s=t.edge(n),c=s.labelRank;if(a!==r+1){t.removeEdge(n);var l,h,f;for(f=0,++r;a>r;++f,++r)s.points=[],h={width:0,height:0,edgeLabel:s,edgeObj:n,rank:r},l=o.addDummyNode(t,"edge",h,"_d"),r===c&&(h.width=s.width,h.height=s.height,h.dummy="edge-label",h.labelpos=s.labelpos),t.setEdge(e,l,{weight:s.weight},u),0===f&&t.graph().dummyChains.push(l),e=l;t.setEdge(e,i,{weight:s.weight},u)}}function i(t){a.each(t.graph().dummyChains,function(n){var e,r=t.node(n),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)e=t.successors(n)[0],t.removeNode(n),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),n=e,r=t.node(n)})}var a=t("./lodash"),o=t("./util");n.exports={run:e,undo:i}},{"./lodash":42,"./util":61}],45:[function(t,n){function e(t,n,e){var i,a={};r.each(e,function(e){for(var r,o,u=t.parent(e);u;){if(r=t.parent(u),r?(o=a[r],a[r]=u):(o=i,i=u),o&&o!==u)return void n.setEdge(o,u);u=r}})}var r=t("../lodash");n.exports=e},{"../lodash":42}],46:[function(t,n){function e(t,n){return r.map(n,function(n){var e=t.inEdges(n);if(e.length){var i=r.reduce(e,function(n,e){var r=t.edge(e),i=t.node(e.v);return{sum:n.sum+r.weight*i.order,weight:n.weight+r.weight}},{sum:0,weight:0});return{v:n,barycenter:i.sum/i.weight,weight:i.weight}}return{v:n}})}var r=t("../lodash");n.exports=e},{"../lodash":42}],47:[function(t,n){function e(t,n,e){var o=r(t),u=new a({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(n){return t.node(n)});return i.each(t.nodes(),function(r){var a=t.node(r),s=t.parent(r);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(u.setNode(r),u.setParent(r,s||o),i.each(t[e](r),function(n){var e=n.v===r?n.w:n.v,a=u.edge(e,r),o=i.isUndefined(a)?0:a.weight;u.setEdge(e,r,{weight:t.edge(n).weight+o})}),i.has(a,"minRank")&&u.setNode(r,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),u}function r(t){for(var n;t.hasNode(n=i.uniqueId("_root")););return n}var i=t("../lodash"),a=t("../graphlib").Graph;n.exports=e},{"../graphlib":39,"../lodash":42}],48:[function(t,n){"use strict";function e(t,n){for(var e=0,i=1;i<n.length;++i)e+=r(t,n[i-1],n[i]);return e}function r(t,n,e){for(var r=i.zipObject(e,i.map(e,function(t,n){return n})),a=i.flatten(i.map(n,function(n){return i.chain(t.outEdges(n)).map(function(n){return{pos:r[n.w],weight:t.edge(n).weight}}).sortBy("pos").value()}),!0),o=1;o<e.length;)o<<=1;var u=2*o-1;o-=1;var s=i.map(new Array(u),function(){return 0}),c=0;return i.each(a.forEach(function(t){var n=t.pos+o;s[n]+=t.weight;for(var e=0;n>0;)n%2&&(e+=s[n+1]),n=n-1>>1,s[n]+=t.weight;c+=t.weight*e})),c}var i=t("../lodash");n.exports=e},{"../lodash":42}],49:[function(t,n){"use strict";function e(t){var n=d.maxRank(t),e=r(t,o.range(1,n+1),"inEdges"),c=r(t,o.range(n-1,-1,-1),"outEdges"),l=u(t);a(t,l);for(var h,f=Number.POSITIVE_INFINITY,p=0,g=0;4>g;++p,++g){i(p%2?e:c,p%4>=2),l=d.buildLayerMatrix(t);var y=s(t,l);f>y&&(g=0,h=o.cloneDeep(l),f=y)}a(t,h)}function r(t,n,e){return o.map(n,function(n){return l(t,n,e)})}function i(t,n){var e=new f;o.each(t,function(t){var r=t.graph().root,i=c(t,r,e,n);o.each(i.vs,function(n,e){t.node(n).order=e}),h(t,e,i.vs)})}function a(t,n){o.each(n,function(n){o.each(n,function(n,e){t.node(n).order=e})})}var o=t("../lodash"),u=t("./init-order"),s=t("./cross-count"),c=t("./sort-subgraph"),l=t("./build-layer-graph"),h=t("./add-subgraph-constraints"),f=t("../graphlib").Graph,d=t("../util");n.exports=e},{"../graphlib":39,"../lodash":42,"../util":61,"./add-subgraph-constraints":45,"./build-layer-graph":47,"./cross-count":48,"./init-order":50,"./sort-subgraph":52}],50:[function(t,n){"use strict";function e(t){function n(i){if(!r.has(e,i)){e[i]=!0;var a=t.node(i);o[a.rank].push(i),r.each(t.successors(i),n)}}var e={},i=r.filter(t.nodes(),function(n){return!t.children(n).length}),a=r.max(r.map(i,function(n){return t.node(n).rank})),o=r.map(r.range(a+1),function(){return[]}),u=r.sortBy(i,function(n){return t.node(n).rank});return r.each(u,n),o}var r=t("../lodash");n.exports=e},{"../lodash":42}],51:[function(t,n){"use strict";function e(t,n){var e={};a.each(t,function(t,n){var r=e[t.v]={indegree:0,"in":[],out:[],vs:[t.v],i:n};a.isUndefined(t.barycenter)||(r.barycenter=t.barycenter,r.weight=t.weight)}),a.each(n.edges(),function(t){var n=e[t.v],r=e[t.w];a.isUndefined(n)||a.isUndefined(r)||(r.indegree++,n.out.push(e[t.w]))});var i=a.filter(e,function(t){return!t.indegree});return r(i)}function r(t){function n(t){return function(n){n.merged||(a.isUndefined(n.barycenter)||a.isUndefined(t.barycenter)||n.barycenter>=t.barycenter)&&i(t,n)}}function e(n){return function(e){e["in"].push(n),0===--e.indegree&&t.push(e)}}for(var r=[];t.length;){var o=t.pop();r.push(o),a.each(o["in"].reverse(),n(o)),a.each(o.out,e(o))}return a.chain(r).filter(function(t){return!t.merged}).map(function(t){return a.pick(t,["vs","i","barycenter","weight"])}).value()}function i(t,n){var e=0,r=0;t.weight&&(e+=t.barycenter*t.weight,r+=t.weight),n.weight&&(e+=n.barycenter*n.weight,r+=n.weight),t.vs=n.vs.concat(t.vs),t.barycenter=e/r,t.weight=r,t.i=Math.min(n.i,t.i),n.merged=!0}var a=t("../lodash");n.exports=e},{"../lodash":42}],52:[function(t,n){function e(t,n,c,l){var h=t.children(n),f=t.node(n),d=f?f.borderLeft:void 0,p=f?f.borderRight:void 0,g={};d&&(h=a.filter(h,function(t){return t!==d&&t!==p}));var y=o(t,h);a.each(y,function(n){if(t.children(n.v).length){var r=e(t,n.v,c,l);g[n.v]=r,a.has(r,"barycenter")&&i(n,r)}});var m=u(y,c);r(m,g);var v=s(m,l);if(d&&(v.vs=a.flatten([d,v.vs,p],!0),t.predecessors(d).length)){var _=t.node(t.predecessors(d)[0]),b=t.node(t.predecessors(p)[0]);a.has(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+_.order+b.order)/(v.weight+2),v.weight+=2}return v}function r(t,n){a.each(t,function(t){t.vs=a.flatten(t.vs.map(function(t){return n[t]?n[t].vs:t}),!0)})}function i(t,n){a.isUndefined(t.barycenter)?(t.barycenter=n.barycenter,t.weight=n.weight):(t.barycenter=(t.barycenter*t.weight+n.barycenter*n.weight)/(t.weight+n.weight),t.weight+=n.weight)}var a=t("../lodash"),o=t("./barycenter"),u=t("./resolve-conflicts"),s=t("./sort");n.exports=e},{"../lodash":42,"./barycenter":46,"./resolve-conflicts":51,"./sort":53}],53:[function(t,n){function e(t,n){var e=o.partition(t,function(t){return a.has(t,"barycenter")}),u=e.lhs,s=a.sortBy(e.rhs,function(t){return-t.i}),c=[],l=0,h=0,f=0;u.sort(i(!!n)),f=r(c,s,f),a.each(u,function(t){f+=t.vs.length,c.push(t.vs),l+=t.barycenter*t.weight,h+=t.weight,f=r(c,s,f)});var d={vs:a.flatten(c,!0)};return h&&(d.barycenter=l/h,d.weight=h),d}function r(t,n,e){for(var r;n.length&&(r=a.last(n)).i<=e;)n.pop(),t.push(r.vs),e++;return e}function i(t){return function(n,e){return n.barycenter<e.barycenter?-1:n.barycenter>e.barycenter?1:t?e.i-n.i:n.i-e.i}}var a=t("../lodash"),o=t("../util");n.exports=e},{"../lodash":42,"../util":61}],54:[function(t,n){function e(t){var n=i(t);a.each(t.graph().dummyChains,function(e){for(var i=t.node(e),a=i.edgeObj,o=r(t,n,a.v,a.w),u=o.path,s=o.lca,c=0,l=u[c],h=!0;e!==a.w;){if(i=t.node(e),h){for(;(l=u[c])!==s&&t.node(l).maxRank<i.rank;)c++;l===s&&(h=!1)}if(!h){for(;c<u.length-1&&t.node(l=u[c+1]).minRank<=i.rank;)c++;l=u[c]}t.setParent(e,l),e=t.successors(e)[0]}})}function r(t,n,e,r){var i,a,o=[],u=[],s=Math.min(n[e].low,n[r].low),c=Math.max(n[e].lim,n[r].lim);i=e;do i=t.parent(i),o.push(i);while(i&&(n[i].low>s||c>n[i].lim));for(a=i,i=r;(i=t.parent(i))!==a;)u.push(i);return{path:o.concat(u.reverse()),lca:a}}function i(t){function n(i){var o=r;a.each(t.children(i),n),e[i]={low:o,lim:r++}}var e={},r=0;return a.each(t.children(),n),e}var a=t("./lodash");n.exports=e},{"./lodash":42}],55:[function(t,n){"use strict";function e(t,n){function e(n,e){var o=0,u=0,s=n.length,c=y.last(e);return y.each(e,function(n,l){var h=i(t,n),f=h?t.node(h).order:s;(h||n===c)&&(y.each(e.slice(u,l+1),function(n){y.each(t.predecessors(n),function(e){var i=t.node(e),u=i.order;!(o>u||u>f)||i.dummy&&t.node(n).dummy||a(r,e,n)})}),u=l+1,o=f)}),e}var r={};return y.reduce(n,e),r}function r(t,n){function e(n,e,r,o,u){var s;y.each(y.range(e,r),function(e){s=n[e],t.node(s).dummy&&y.each(t.predecessors(s),function(n){var e=t.node(n);e.dummy&&(e.order<o||e.order>u)&&a(i,n,s)})})}function r(n,r){var i,a=-1,o=0;return y.each(r,function(u,s){if("border"===t.node(u).dummy){var c=t.predecessors(u);c.length&&(i=t.node(c[0]).order,e(r,o,s,a,i),o=s,a=i)}e(r,o,r.length,i,n.length)}),r}var i={};return y.reduce(n,r),i}function i(t,n){return t.node(n).dummy?y.find(t.predecessors(n),function(n){return t.node(n).dummy}):void 0}function a(t,n,e){if(n>e){var r=n;n=e,e=r}var i=t[n];i||(t[n]=i={}),i[e]=!0}function o(t,n,e){if(n>e){var r=n;n=e,e=r}return y.has(t[n],e)}function u(t,n,e,r){var i={},a={},u={};return y.each(n,function(t){y.each(t,function(t,n){i[t]=t,a[t]=t,u[t]=n})}),
|
||
y.each(n,function(t){var n=-1;y.each(t,function(t){var s=r(t);if(s.length){s=y.sortBy(s,function(t){return u[t]});for(var c=(s.length-1)/2,l=Math.floor(c),h=Math.ceil(c);h>=l;++l){var f=s[l];a[t]===t&&n<u[f]&&!o(e,t,f)&&(a[f]=t,a[t]=i[t]=i[f],n=u[f])}}})}),{root:i,align:a}}function s(t,n,e,r,i){function a(t){y.has(l,t)||(l[t]=!0,u[t]=y.reduce(s.inEdges(t),function(t,n){return a(n.v),Math.max(t,u[n.v]+s.edge(n))},0))}function o(n){if(2!==l[n]){l[n]++;var e=t.node(n),r=y.reduce(s.outEdges(n),function(t,n){return o(n.w),Math.min(t,u[n.w]-s.edge(n))},Number.POSITIVE_INFINITY);r!==Number.POSITIVE_INFINITY&&e.borderType!==h&&(u[n]=Math.max(u[n],r))}}var u={},s=c(t,n,e,i),l={};y.each(s.nodes(),a);var h=i?"borderLeft":"borderRight";return y.each(s.nodes(),o),y.each(r,function(t){u[t]=u[e[t]]}),u}function c(t,n,e,r){var i=new m,a=t.graph(),o=p(a.nodesep,a.edgesep,r);return y.each(n,function(n){var r;y.each(n,function(n){var a=e[n];if(i.setNode(a),r){var u=e[r],s=i.edge(u,a);i.setEdge(u,a,Math.max(o(t,n,r),s||0))}r=n})}),i}function l(t,n){return y.min(n,function(n){var e=y.min(n,function(n,e){return n-g(t,e)/2}),r=y.max(n,function(n,e){return n+g(t,e)/2});return r-e})}function h(t,n){var e=y.min(n),r=y.max(n);y.each(["u","d"],function(i){y.each(["l","r"],function(a){var o,u=i+a,s=t[u];s!==n&&(o="l"===a?e-y.min(s):r-y.max(s),o&&(t[u]=y.mapValues(s,function(t){return t+o})))})})}function f(t,n){return y.mapValues(t.ul,function(e,r){if(n)return t[n.toLowerCase()][r];var i=y.sortBy(y.pluck(t,r));return(i[1]+i[2])/2})}function d(t){var n,i=v.buildLayerMatrix(t),a=y.merge(e(t,i),r(t,i)),o={};y.each(["u","d"],function(e){n="u"===e?i:y.values(i).reverse(),y.each(["l","r"],function(r){"r"===r&&(n=y.map(n,function(t){return y.values(t).reverse()}));var i=y.bind("u"===e?t.predecessors:t.successors,t),c=u(t,n,a,i),l=s(t,n,c.root,c.align,"r"===r);"r"===r&&(l=y.mapValues(l,function(t){return-t})),o[e+r]=l})});var c=l(t,o);return h(o,c),f(o,t.graph().align)}function p(t,n,e){return function(r,i,a){var o,u=r.node(i),s=r.node(a),c=0;if(c+=u.width/2,y.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":o=-u.width/2;break;case"r":o=u.width/2}if(o&&(c+=e?o:-o),o=0,c+=(u.dummy?n:t)/2,c+=(s.dummy?n:t)/2,c+=s.width/2,y.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":o=s.width/2;break;case"r":o=-s.width/2}return o&&(c+=e?o:-o),o=0,c}}function g(t,n){return t.node(n).width}var y=t("../lodash"),m=t("../graphlib").Graph,v=t("../util");n.exports={positionX:d,findType1Conflicts:e,findType2Conflicts:r,addConflict:a,hasConflict:o,verticalAlignment:u,horizontalCompaction:s,alignCoordinates:h,findSmallestWidthAlignment:l,balance:f}},{"../graphlib":39,"../lodash":42,"../util":61}],56:[function(t,n){"use strict";function e(t){t=a.asNonCompoundGraph(t),r(t),i.each(o(t),function(n,e){t.node(e).x=n})}function r(t){var n=a.buildLayerMatrix(t),e=t.graph().ranksep,r=0;i.each(n,function(n){var a=i.max(i.map(n,function(n){return t.node(n).height}));i.each(n,function(n){t.node(n).y=r+a/2}),r+=a+e})}var i=t("../lodash"),a=t("../util"),o=t("./bk").positionX;n.exports=e},{"../lodash":42,"../util":61,"./bk":55}],57:[function(t,n){"use strict";function e(t){var n=new u({directed:!1}),e=t.nodes()[0],o=t.nodeCount();n.setNode(e,{});for(var c,l;r(n,t)<o;)c=i(n,t),l=n.hasNode(c.v)?s(t,c):-s(t,c),a(n,t,l);return n}function r(t,n){function e(r){o.each(n.nodeEdges(r),function(i){var a=i.v,o=r===a?i.w:a;t.hasNode(o)||s(n,i)||(t.setNode(o,{}),t.setEdge(r,o,{}),e(o))})}return o.each(t.nodes(),e),t.nodeCount()}function i(t,n){return o.min(n.edges(),function(e){return t.hasNode(e.v)!==t.hasNode(e.w)?s(n,e):void 0})}function a(t,n,e){o.each(t.nodes(),function(t){n.node(t).rank+=e})}var o=t("../lodash"),u=t("../graphlib").Graph,s=t("./util").slack;n.exports=e},{"../graphlib":39,"../lodash":42,"./util":60}],58:[function(t,n){"use strict";function e(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){o(t),u(t)}function i(t){s(t)}var a=t("./util"),o=a.longestPath,u=t("./feasible-tree"),s=t("./network-simplex");n.exports=e;var c=o},{"./feasible-tree":57,"./network-simplex":59,"./util":60}],59:[function(t,n){"use strict";function e(t){t=b(t),m(t);var n=g(t);o(n),r(n,t);for(var e,i;e=s(n);)i=c(n,t,e),l(n,t,e,i)}function r(t,n){var e=_(t,t.nodes());e=e.slice(0,e.length-1),p.each(e,function(e){i(t,n,e)})}function i(t,n,e){var r=t.node(e),i=r.parent;t.edge(e,i).cutvalue=a(t,n,e)}function a(t,n,e){var r=t.node(e),i=r.parent,a=!0,o=n.edge(e,i),u=0;return o||(a=!1,o=n.edge(i,e)),u=o.weight,p.each(n.nodeEdges(e),function(r){var o=r.v===e,s=o?r.w:r.v;if(s!==i){var c=o===a,l=n.edge(r).weight;if(u+=c?l:-l,f(t,e,s)){var h=t.edge(e,s).cutvalue;u+=c?-h:h}}}),u}function o(t,n){arguments.length<2&&(n=t.nodes()[0]),u(t,{},1,n)}function u(t,n,e,r,i){var a=e,o=t.node(r);return n[r]=!0,p.each(t.neighbors(r),function(i){p.has(n,i)||(e=u(t,n,e,i,r))}),o.low=a,o.lim=e++,i?o.parent=i:delete o.parent,e}function s(t){return p.find(t.edges(),function(n){return t.edge(n).cutvalue<0})}function c(t,n,e){var r=e.v,i=e.w;n.hasEdge(r,i)||(r=e.w,i=e.v);var a=t.node(r),o=t.node(i),u=a,s=!1;a.lim>o.lim&&(u=o,s=!0);var c=p.filter(n.edges(),function(n){return s===d(t,t.node(n.v),u)&&s!==d(t,t.node(n.w),u)});return p.min(c,function(t){return y(n,t)})}function l(t,n,e,i){var a=e.v,u=e.w;t.removeEdge(a,u),t.setEdge(i.v,i.w,{}),o(t),r(t,n),h(t,n)}function h(t,n){var e=p.find(t.nodes(),function(t){return!n.node(t).parent}),r=v(t,e);r=r.slice(1),p.each(r,function(e){var r=t.node(e).parent,i=n.edge(e,r),a=!1;i||(i=n.edge(r,e),a=!0),n.node(e).rank=n.node(r).rank+(a?i.minlen:-i.minlen)})}function f(t,n,e){return t.hasEdge(n,e)}function d(t,n,e){return e.low<=n.lim&&n.lim<=e.lim}var p=t("../lodash"),g=t("./feasible-tree"),y=t("./util").slack,m=t("./util").longestPath,v=t("../graphlib").alg.preorder,_=t("../graphlib").alg.postorder,b=t("../util").simplify;n.exports=e,e.initLowLimValues=o,e.initCutValues=r,e.calcCutValue=a,e.leaveEdge=s,e.enterEdge=c,e.exchangeEdges=l},{"../graphlib":39,"../lodash":42,"../util":61,"./feasible-tree":57,"./util":60}],60:[function(t,n){"use strict";function e(t){function n(r){var a=t.node(r);if(i.has(e,r))return a.rank;e[r]=!0;var o=i.min(i.map(t.outEdges(r),function(e){return n(e.w)-t.edge(e).minlen}));return o===Number.POSITIVE_INFINITY&&(o=0),a.rank=o}var e={};i.each(t.sources(),n)}function r(t,n){return t.node(n.w).rank-t.node(n.v).rank-t.edge(n).minlen}var i=t("../lodash");n.exports={longestPath:e,slack:r}},{"../lodash":42}],61:[function(t,n){"use strict";function e(t,n,e,r){var i;do i=y.uniqueId(r);while(t.hasNode(i));return e.dummy=n,t.setNode(i,e),i}function r(t){var n=(new m).setGraph(t.graph());return y.each(t.nodes(),function(e){n.setNode(e,t.node(e))}),y.each(t.edges(),function(e){var r=n.edge(e.v,e.w)||{weight:0,minlen:1},i=t.edge(e);n.setEdge(e.v,e.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),n}function i(t){var n=new m({multigraph:t.isMultigraph()}).setGraph(t.graph());return y.each(t.nodes(),function(e){t.children(e).length||n.setNode(e,t.node(e))}),y.each(t.edges(),function(e){n.setEdge(e,t.edge(e))}),n}function a(t){var n=y.map(t.nodes(),function(n){var e={};return y.each(t.outEdges(n),function(n){e[n.w]=(e[n.w]||0)+t.edge(n).weight}),e});return y.zipObject(t.nodes(),n)}function o(t){var n=y.map(t.nodes(),function(n){var e={};return y.each(t.inEdges(n),function(n){e[n.v]=(e[n.v]||0)+t.edge(n).weight}),e});return y.zipObject(t.nodes(),n)}function u(t,n){var e=t.x,r=t.y,i=n.x-e,a=n.y-r,o=t.width/2,u=t.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var s,c;return Math.abs(a)*o>Math.abs(i)*u?(0>a&&(u=-u),s=u*i/a,c=u):(0>i&&(o=-o),s=o,c=o*a/i),{x:e+s,y:r+c}}function s(t){var n=y.map(y.range(f(t)+1),function(){return[]});return y.each(t.nodes(),function(e){var r=t.node(e),i=r.rank;y.isUndefined(i)||(n[i][r.order]=e)}),n}function c(t){var n=y.min(y.map(t.nodes(),function(n){return t.node(n).rank}));y.each(t.nodes(),function(e){var r=t.node(e);y.has(r,"rank")&&(r.rank-=n)})}function l(t){var n=y.min(y.map(t.nodes(),function(n){return t.node(n).rank})),e=[];y.each(t.nodes(),function(r){var i=t.node(r).rank-n;e[i]||(e[i]=[]),e[i].push(r)});var r=0,i=t.graph().nodeRankFactor;y.each(e,function(n,e){y.isUndefined(n)&&e%i!==0?--r:r&&y.each(n,function(n){t.node(n).rank+=r})})}function h(t,n,r,i){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=i),e(t,"border",a,n)}function f(t){return y.max(y.map(t.nodes(),function(n){var e=t.node(n).rank;return y.isUndefined(e)?void 0:e}))}function d(t,n){var e={lhs:[],rhs:[]};return y.each(t,function(t){n(t)?e.lhs.push(t):e.rhs.push(t)}),e}function p(t,n){var e=y.now();try{return n()}finally{console.log(t+" time: "+(y.now()-e)+"ms")}}function g(t,n){return n()}var y=t("./lodash"),m=t("./graphlib").Graph;n.exports={addDummyNode:e,simplify:r,asNonCompoundGraph:i,successorWeights:a,predecessorWeights:o,intersectRect:u,buildLayerMatrix:s,normalizeRanks:c,removeEmptyRanks:l,addBorderNode:h,maxRank:f,partition:d,time:p,notime:g}},{"./graphlib":39,"./lodash":42}],62:[function(t,n){n.exports="0.7.4"},{}],63:[function(t,n){var e=t("./lib");n.exports={Graph:e.Graph,json:t("./lib/json"),alg:t("./lib/alg"),version:e.version}},{"./lib":79,"./lib/alg":70,"./lib/json":80}],64:[function(t,n){function e(t){function n(a){r.has(i,a)||(i[a]=!0,e.push(a),r.each(t.successors(a),n),r.each(t.predecessors(a),n))}var e,i={},a=[];return r.each(t.nodes(),function(t){e=[],n(t),e.length&&a.push(e)}),a}var r=t("../lodash");n.exports=e},{"../lodash":81}],65:[function(t,n){function e(t,n,e){i.isArray(n)||(n=[n]);var a=[],o={};return i.each(n,function(n){if(!t.hasNode(n))throw new Error("Graph does not have node: "+n);r(t,n,"post"===e,o,a)}),a}function r(t,n,e,a,o){i.has(a,n)||(a[n]=!0,e||o.push(n),i.each(t.neighbors(n),function(n){r(t,n,e,a,o)}),e&&o.push(n))}var i=t("../lodash");n.exports=e},{"../lodash":81}],66:[function(t,n){function e(t,n,e){return i.transform(t.nodes(),function(i,a){i[a]=r(t,a,n,e)},{})}var r=t("./dijkstra"),i=t("../lodash");n.exports=e},{"../lodash":81,"./dijkstra":67}],67:[function(t,n){function e(t,n,e,i){return r(t,String(n),e||o,i||function(n){return t.outEdges(n)})}function r(t,n,e,r){var i,o,u={},s=new a,c=function(t){var n=t.v!==i?t.v:t.w,r=u[n],a=e(t),c=o.distance+a;if(0>a)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+a);c<r.distance&&(r.distance=c,r.predecessor=i,s.decrease(n,c))};for(t.nodes().forEach(function(t){var e=t===n?0:Number.POSITIVE_INFINITY;u[t]={distance:e},s.add(t,e)});s.size()>0&&(i=s.removeMin(),o=u[i],o.distance!==Number.POSITIVE_INFINITY);)r(i).forEach(c);return u}var i=t("../lodash"),a=t("../data/priority-queue");n.exports=e;var o=i.constant(1)},{"../data/priority-queue":77,"../lodash":81}],68:[function(t,n){function e(t){return r.filter(i(t),function(n){return n.length>1||1===n.length&&t.hasEdge(n[0],n[0])})}var r=t("../lodash"),i=t("./tarjan");n.exports=e},{"../lodash":81,"./tarjan":75}],69:[function(t,n){function e(t,n,e){return r(t,n||a,e||function(n){return t.outEdges(n)})}function r(t,n,e){var r={},i=t.nodes();return i.forEach(function(t){r[t]={},r[t][t]={distance:0},i.forEach(function(n){t!==n&&(r[t][n]={distance:Number.POSITIVE_INFINITY})}),e(t).forEach(function(e){var i=e.v===t?e.w:e.v,a=n(e);r[t][i]={distance:a,predecessor:t}})}),i.forEach(function(t){var n=r[t];i.forEach(function(e){var a=r[e];i.forEach(function(e){var r=a[t],i=n[e],o=a[e],u=r.distance+i.distance;u<o.distance&&(o.distance=u,o.predecessor=i.predecessor)})})}),r}var i=t("../lodash");n.exports=e;var a=i.constant(1)},{"../lodash":81}],70:[function(t,n){n.exports={components:t("./components"),dijkstra:t("./dijkstra"),dijkstraAll:t("./dijkstra-all"),findCycles:t("./find-cycles"),floydWarshall:t("./floyd-warshall"),isAcyclic:t("./is-acyclic"),postorder:t("./postorder"),preorder:t("./preorder"),prim:t("./prim"),tarjan:t("./tarjan"),topsort:t("./topsort")}},{"./components":64,"./dijkstra":67,"./dijkstra-all":66,"./find-cycles":68,"./floyd-warshall":69,"./is-acyclic":71,"./postorder":72,"./preorder":73,"./prim":74,"./tarjan":75,"./topsort":76}],71:[function(t,n){function e(t){try{r(t)}catch(n){if(n instanceof r.CycleException)return!1;throw n}return!0}var r=t("./topsort");n.exports=e},{"./topsort":76}],72:[function(t,n){function e(t,n){return r(t,n,"post")}var r=t("./dfs");n.exports=e},{"./dfs":65}],73:[function(t,n){function e(t,n){return r(t,n,"pre")}var r=t("./dfs");n.exports=e},{"./dfs":65}],74:[function(t,n){function e(t,n){function e(t){var e=t.v===o?t.w:t.v,r=c.priority(e);if(void 0!==r){var i=n(t);r>i&&(s[e]=o,c.decrease(e,i))}}var o,u=new i,s={},c=new a;if(0===t.nodeCount())return u;r.each(t.nodes(),function(t){c.add(t,Number.POSITIVE_INFINITY),u.setNode(t)}),c.decrease(t.nodes()[0],0);for(var l=!1;c.size()>0;){if(o=c.removeMin(),r.has(s,o))u.setEdge(o,s[o]);else{if(l)throw new Error("Input graph is not connected: "+t);l=!0}t.nodeEdges(o).forEach(e)}return u}var r=t("../lodash"),i=t("../graph"),a=t("../data/priority-queue");n.exports=e},{"../data/priority-queue":77,"../graph":78,"../lodash":81}],75:[function(t,n){function e(t){function n(u){var s=a[u]={onStack:!0,lowlink:e,index:e++};if(i.push(u),t.successors(u).forEach(function(t){r.has(a,t)?a[t].onStack&&(s.lowlink=Math.min(s.lowlink,a[t].index)):(n(t),s.lowlink=Math.min(s.lowlink,a[t].lowlink))}),s.lowlink===s.index){var c,l=[];do c=i.pop(),a[c].onStack=!1,l.push(c);while(u!==c);o.push(l)}}var e=0,i=[],a={},o=[];return t.nodes().forEach(function(t){r.has(a,t)||n(t)}),o}var r=t("../lodash");n.exports=e},{"../lodash":81}],76:[function(t,n){function e(t){function n(u){if(i.has(a,u))throw new r;i.has(e,u)||(a[u]=!0,e[u]=!0,i.each(t.predecessors(u),n),delete a[u],o.push(u))}var e={},a={},o=[];if(i.each(t.sinks(),n),i.size(e)!==t.nodeCount())throw new r;return o}function r(){}var i=t("../lodash");n.exports=e,e.CycleException=r},{"../lodash":81}],77:[function(t,n){function e(){this._arr=[],this._keyIndices={}}var r=t("../lodash");n.exports=e,e.prototype.size=function(){return this._arr.length},e.prototype.keys=function(){return this._arr.map(function(t){return t.key})},e.prototype.has=function(t){return r.has(this._keyIndices,t)},e.prototype.priority=function(t){var n=this._keyIndices[t];return void 0!==n?this._arr[n].priority:void 0},e.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},e.prototype.add=function(t,n){var e=this._keyIndices;if(t=String(t),!r.has(e,t)){var i=this._arr,a=i.length;return e[t]=a,i.push({key:t,priority:n}),this._decrease(a),!0}return!1},e.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},e.prototype.decrease=function(t,n){var e=this._keyIndices[t];if(n>this._arr[e].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[e].priority+" New: "+n);this._arr[e].priority=n,this._decrease(e)},e.prototype._heapify=function(t){var n=this._arr,e=2*t,r=e+1,i=t;e<n.length&&(i=n[e].priority<n[i].priority?e:i,r<n.length&&(i=n[r].priority<n[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))},e.prototype._decrease=function(t){for(var n,e=this._arr,r=e[t].priority;0!==t&&(n=t>>1,!(e[n].priority<r));)this._swap(t,n),t=n},e.prototype._swap=function(t,n){var e=this._arr,r=this._keyIndices,i=e[t],a=e[n];e[t]=a,e[n]=i,r[a.key]=t,r[i.key]=n}},{"../lodash":81}],78:[function(t,n){"use strict";function e(t){this._isDirected=s.has(t,"directed")?t.directed:!0,this._isMultigraph=s.has(t,"multigraph")?t.multigraph:!1,this._isCompound=s.has(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=s.constant(void 0),this._defaultEdgeLabelFn=s.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[l]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function r(t,n){t[n]?t[n]++:t[n]=1}function i(t,n){--t[n]||delete t[n]}function a(t,n,e,r){var i=""+n,a=""+e;if(!t&&i>a){var o=i;i=a,a=o}return i+h+a+h+(s.isUndefined(r)?c:r)}function o(t,n,e,r){var i=""+n,a=""+e;if(!t&&i>a){var o=i;i=a,a=o}var u={v:i,w:a};return r&&(u.name=r),u}function u(t,n){return a(t,n.v,n.w,n.name)}var s=t("./lodash");n.exports=e;var c="\x00",l="\x00",h="";e.prototype._nodeCount=0,e.prototype._edgeCount=0,e.prototype.isDirected=function(){return this._isDirected},e.prototype.isMultigraph=function(){return this._isMultigraph},e.prototype.isCompound=function(){return this._isCompound},e.prototype.setGraph=function(t){return this._label=t,this},e.prototype.graph=function(){return this._label},e.prototype.setDefaultNodeLabel=function(t){return s.isFunction(t)||(t=s.constant(t)),this._defaultNodeLabelFn=t,this},e.prototype.nodeCount=function(){return this._nodeCount},e.prototype.nodes=function(){return s.keys(this._nodes)},e.prototype.sources=function(){return s.filter(this.nodes(),function(t){return s.isEmpty(this._in[t])},this)},e.prototype.sinks=function(){return s.filter(this.nodes(),function(t){return s.isEmpty(this._out[t])},this)},e.prototype.setNodes=function(t,n){var e=arguments;return s.each(t,function(t){e.length>1?this.setNode(t,n):this.setNode(t)},this),this},e.prototype.setNode=function(t,n){return s.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=n),this):(this._nodes[t]=arguments.length>1?n:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=l,this._children[t]={},this._children[l][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},e.prototype.node=function(t){return this._nodes[t]},e.prototype.hasNode=function(t){return s.has(this._nodes,t)},e.prototype.removeNode=function(t){var n=this;if(s.has(this._nodes,t)){var e=function(t){n.removeEdge(n._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],s.each(this.children(t),function(t){this.setParent(t)},this),delete this._children[t]),s.each(s.keys(this._in[t]),e),delete this._in[t],delete this._preds[t],s.each(s.keys(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},e.prototype.setParent=function(t,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(s.isUndefined(n))n=l;else{n+="";for(var e=n;!s.isUndefined(e);e=this.parent(e))if(e===t)throw new Error("Setting "+n+" as parent of "+t+" would create create a cycle");this.setNode(n)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=n,this._children[n][t]=!0,this},e.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},e.prototype.parent=function(t){if(this._isCompound){var n=this._parent[t];if(n!==l)return n}},e.prototype.children=function(t){if(s.isUndefined(t)&&(t=l),this._isCompound){var n=this._children[t];if(n)return s.keys(n)}else{if(t===l)return this.nodes();if(this.hasNode(t))return[]}},e.prototype.predecessors=function(t){var n=this._preds[t];return n?s.keys(n):void 0},e.prototype.successors=function(t){var n=this._sucs[t];return n?s.keys(n):void 0},e.prototype.neighbors=function(t){var n=this.predecessors(t);return n?s.union(n,this.successors(t)):void 0},e.prototype.filterNodes=function(t){function n(t){var a=r.parent(t);return void 0===a||e.hasNode(a)?(i[t]=a,a):a in i?i[a]:n(a)}var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph()),s.each(this._nodes,function(n,r){t(r)&&e.setNode(r,n)},this),s.each(this._edgeObjs,function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,this.edge(t))},this);var r=this,i={};return this._isCompound&&s.each(e.nodes(),function(t){e.setParent(t,n(t))}),e},e.prototype.setDefaultEdgeLabel=function(t){return s.isFunction(t)||(t=s.constant(t)),this._defaultEdgeLabelFn=t,this},e.prototype.edgeCount=function(){return this._edgeCount},e.prototype.edges=function(){return s.values(this._edgeObjs)},e.prototype.setPath=function(t,n){var e=this,r=arguments;return s.reduce(t,function(t,i){return r.length>1?e.setEdge(t,i,n):e.setEdge(t,i),i}),this},e.prototype.setEdge=function(){var t,n,e,i,u=!1,c=arguments[0];"object"==typeof c&&null!==c&&"v"in c?(t=c.v,n=c.w,e=c.name,2===arguments.length&&(i=arguments[1],u=!0)):(t=c,n=arguments[1],e=arguments[3],arguments.length>2&&(i=arguments[2],u=!0)),t=""+t,n=""+n,s.isUndefined(e)||(e=""+e);var l=a(this._isDirected,t,n,e);if(s.has(this._edgeLabels,l))return u&&(this._edgeLabels[l]=i),this;if(!s.isUndefined(e)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(n),this._edgeLabels[l]=u?i:this._defaultEdgeLabelFn(t,n,e);var h=o(this._isDirected,t,n,e);return t=h.v,n=h.w,Object.freeze(h),this._edgeObjs[l]=h,r(this._preds[n],t),r(this._sucs[t],n),this._in[n][l]=h,this._out[t][l]=h,this._edgeCount++,this},e.prototype.edge=function(t,n,e){var r=1===arguments.length?u(this._isDirected,arguments[0]):a(this._isDirected,t,n,e);return this._edgeLabels[r]},e.prototype.hasEdge=function(t,n,e){var r=1===arguments.length?u(this._isDirected,arguments[0]):a(this._isDirected,t,n,e);return s.has(this._edgeLabels,r)},e.prototype.removeEdge=function(t,n,e){var r=1===arguments.length?u(this._isDirected,arguments[0]):a(this._isDirected,t,n,e),o=this._edgeObjs[r];return o&&(t=o.v,n=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],i(this._preds[n],t),i(this._sucs[t],n),delete this._in[n][r],delete this._out[t][r],this._edgeCount--),this},e.prototype.inEdges=function(t,n){var e=this._in[t];if(e){var r=s.values(e);return n?s.filter(r,function(t){return t.v===n}):r}},e.prototype.outEdges=function(t,n){var e=this._out[t];if(e){var r=s.values(e);return n?s.filter(r,function(t){return t.w===n}):r}},e.prototype.nodeEdges=function(t,n){var e=this.inEdges(t,n);return e?e.concat(this.outEdges(t,n)):void 0}},{"./lodash":81}],79:[function(t,n){n.exports={Graph:t("./graph"),version:t("./version")}},{"./graph":78,"./version":82}],80:[function(t,n){function e(t){var n={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:r(t),edges:i(t)};return o.isUndefined(t.graph())||(n.value=o.clone(t.graph())),n}function r(t){return o.map(t.nodes(),function(n){var e=t.node(n),r=t.parent(n),i={v:n};return o.isUndefined(e)||(i.value=e),o.isUndefined(r)||(i.parent=r),i})}function i(t){return o.map(t.edges(),function(n){var e=t.edge(n),r={v:n.v,w:n.w};return o.isUndefined(n.name)||(r.name=n.name),o.isUndefined(e)||(r.value=e),r})}function a(t){var n=new u(t.options).setGraph(t.value);return o.each(t.nodes,function(t){n.setNode(t.v,t.value),t.parent&&n.setParent(t.v,t.parent)}),o.each(t.edges,function(t){n.setEdge({v:t.v,w:t.w,name:t.name},t.value)}),n}var o=t("./lodash"),u=t("./graph");n.exports={write:e,read:a}},{"./graph":78,"./lodash":81}],81:[function(t,n){n.exports=t(42)},{"/Users/knut/Documents/source/mermaid/node_modules/dagre-d3/node_modules/dagre/lib/lodash.js":42,lodash:83}],82:[function(t,n){n.exports="1.0.7"},{}],83:[function(t,n,e){(function(t){(function(){function r(t,n){if(t!==n){var e=null===t,r=t===E,i=t===t,a=null===n,o=n===E,u=n===n;if(t>n&&!a||!i||e&&!o&&u||r&&u)return 1;if(n>t&&!e||!u||a&&!r&&i||o&&i)return-1}return 0}function i(t,n,e){for(var r=t.length,i=e?r:-1;e?i--:++i<r;)if(n(t[i],i,t))return i;return-1}function a(t,n,e){if(n!==n)return y(t,e);for(var r=e-1,i=t.length;++r<i;)if(t[r]===n)return r;return-1}function o(t){return"function"==typeof t||!1}function u(t){return null==t?"":t+""}function s(t,n){for(var e=-1,r=t.length;++e<r&&n.indexOf(t.charAt(e))>-1;);return e}function c(t,n){for(var e=t.length;e--&&n.indexOf(t.charAt(e))>-1;);return e}function l(t,n){return r(t.criteria,n.criteria)||t.index-n.index}function h(t,n,e){for(var i=-1,a=t.criteria,o=n.criteria,u=a.length,s=e.length;++i<u;){var c=r(a[i],o[i]);if(c){if(i>=s)return c;var l=e[i];return c*("asc"===l||l===!0?1:-1)}}return t.index-n.index}function f(t){return qt[t]}function d(t){return Wt[t]}function p(t,n,e){return n?t=Vt[t]:e&&(t=Zt[t]),"\\"+t}function g(t){return"\\"+Zt[t]}function y(t,n,e){for(var r=t.length,i=n+(e?0:-1);e?i--:++i<r;){var a=t[i];if(a!==a)return i}return-1}function m(t){return!!t&&"object"==typeof t}function v(t){return 160>=t&&t>=9&&13>=t||32==t||160==t||5760==t||6158==t||t>=8192&&(8202>=t||8232==t||8233==t||8239==t||8287==t||12288==t||65279==t)}function _(t,n){for(var e=-1,r=t.length,i=-1,a=[];++e<r;)t[e]===n&&(t[e]=q,a[++i]=e);return a}function b(t,n){for(var e,r=-1,i=t.length,a=-1,o=[];++r<i;){var u=t[r],s=n?n(u,r,t):u;r&&e===s||(e=s,o[++a]=u)}return o}function x(t){for(var n=-1,e=t.length;++n<e&&v(t.charCodeAt(n)););return n}function w(t){for(var n=t.length;n--&&v(t.charCodeAt(n)););return n}function k(t){return Ht[t]}function A(t){function n(t){if(m(t)&&!Tu(t)&&!(t instanceof K)){if(t instanceof v)return t;if(to.call(t,"__chain__")&&to.call(t,"__wrapped__"))return dr(t)}return new v(t)}function e(){}function v(t,n,e){this.__wrapped__=t,this.__actions__=e||[],this.__chain__=!!n}function K(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=So,this.__views__=[]}function nt(){var t=new K(this.__wrapped__);return t.__actions__=tn(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=tn(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=tn(this.__views__),t}function rt(){if(this.__filtered__){var t=new K(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function qt(){var t=this.__wrapped__.value(),n=this.__dir__,e=Tu(t),r=0>n,i=e?t.length:0,a=He(0,i,this.__views__),o=a.start,u=a.end,s=u-o,c=r?u:o-1,l=this.__iteratees__,h=l.length,f=0,d=ko(s,this.__takeCount__);if(!e||Y>i||i==s&&d==s)return re(r&&e?t.reverse():t,this.__actions__);var p=[];t:for(;s--&&d>f;){c+=n;for(var g=-1,y=t[c];++g<h;){var m=l[g],v=m.iteratee,_=m.type,b=v(y);if(_==$)y=b;else if(!b){if(_==U)continue t;break t}}p[f++]=y}return p}function Wt(){this.__data__={}}function Ht(t){return this.has(t)&&delete this.__data__[t]}function Gt(t){return"__proto__"==t?E:this.__data__[t]}function Vt(t){return"__proto__"!=t&&to.call(this.__data__,t)}function Zt(t,n){return"__proto__"!=t&&(this.__data__[t]=n),this}function Xt(t){var n=t?t.length:0;for(this.data={hash:mo(null),set:new lo};n--;)this.push(t[n])}function Kt(t,n){var e=t.data,r="string"==typeof n||Ii(n)?e.set.has(n):e.hash[n];return r?0:-1}function Qt(t){var n=this.data;"string"==typeof t||Ii(t)?n.set.add(t):n.hash[t]=!0}function Jt(t,n){for(var e=-1,r=t.length,i=-1,a=n.length,o=Ya(r+a);++e<r;)o[e]=t[e];for(;++i<a;)o[e++]=n[i];return o}function tn(t,n){var e=-1,r=t.length;for(n||(n=Ya(r));++e<r;)n[e]=t[e];return n}function nn(t,n){for(var e=-1,r=t.length;++e<r&&n(t[e],e,t)!==!1;);return t}function an(t,n){for(var e=t.length;e--&&n(t[e],e,t)!==!1;);return t}function on(t,n){for(var e=-1,r=t.length;++e<r;)if(!n(t[e],e,t))return!1;return!0}function un(t,n,e,r){for(var i=-1,a=t.length,o=r,u=o;++i<a;){var s=t[i],c=+n(s);e(c,o)&&(o=c,u=s)}return u}function sn(t,n){for(var e=-1,r=t.length,i=-1,a=[];++e<r;){var o=t[e];n(o,e,t)&&(a[++i]=o)}return a}function cn(t,n){for(var e=-1,r=t.length,i=Ya(r);++e<r;)i[e]=n(t[e],e,t);return i}function ln(t,n){for(var e=-1,r=n.length,i=t.length;++e<r;)t[i+e]=n[e];return t}function hn(t,n,e,r){var i=-1,a=t.length;for(r&&a&&(e=t[++i]);++i<a;)e=n(e,t[i],i,t);return e}function fn(t,n,e,r){var i=t.length;for(r&&i&&(e=t[--i]);i--;)e=n(e,t[i],i,t);return e}function dn(t,n){for(var e=-1,r=t.length;++e<r;)if(n(t[e],e,t))return!0;return!1}function pn(t,n){for(var e=t.length,r=0;e--;)r+=+n(t[e])||0;return r}function gn(t,n){return t===E?n:t}function yn(t,n,e,r){return t!==E&&to.call(r,e)?t:n}function mn(t,n,e){for(var r=-1,i=Yu(n),a=i.length;++r<a;){var o=i[r],u=t[o],s=e(u,n[o],o,t,n);(s===s?s===u:u!==u)&&(u!==E||o in t)||(t[o]=s)}return t}function vn(t,n){return null==n?t:bn(n,Yu(n),t)}function _n(t,n){for(var e=-1,r=null==t,i=!r&&Ke(t),a=i?t.length:0,o=n.length,u=Ya(o);++e<o;){var s=n[e];u[e]=i?Qe(s,a)?t[s]:E:r?E:t[s]}return u}function bn(t,n,e){e||(e={});for(var r=-1,i=n.length;++r<i;){var a=n[r];e[a]=t[a]}return e}function xn(t,n,e){var r=typeof t;return"function"==r?n===E?t:oe(t,n,e):null==t?Da:"object"==r?Yn(t):n===E?La(t):Un(t,n)}function wn(t,n,e,r,i,a,o){var u;if(e&&(u=i?e(t,r,i):e(t)),u!==E)return u;if(!Ii(t))return t;var s=Tu(t);if(s){if(u=Ge(t),!n)return tn(t,u)}else{var c=eo.call(t),l=c==X;if(c!=J&&c!=W&&(!l||i))return zt[c]?Ze(t,c,n):i?t:{};if(u=Ve(l?{}:t),!n)return vn(u,t)}a||(a=[]),o||(o=[]);for(var h=a.length;h--;)if(a[h]==t)return o[h];return a.push(t),o.push(u),(s?nn:On)(t,function(r,i){u[i]=wn(r,n,e,i,t,a,o)}),u}function kn(t,n,e){if("function"!=typeof t)throw new Za(z);return ho(function(){t.apply(E,e)},n)}function An(t,n){var e=t?t.length:0,r=[];if(!e)return r;var i=-1,o=ze(),u=o==a,s=u&&n.length>=Y?ge(n):null,c=n.length;s&&(o=Kt,u=!1,n=s);t:for(;++i<e;){var l=t[i];if(u&&l===l){for(var h=c;h--;)if(n[h]===l)continue t;r.push(l)}else o(n,l,0)<0&&r.push(l)}return r}function En(t,n){var e=!0;return Po(t,function(t,r,i){return e=!!n(t,r,i)}),e}function Mn(t,n,e,r){var i=r,a=i;return Po(t,function(t,o,u){var s=+n(t,o,u);(e(s,i)||s===r&&s===a)&&(i=s,a=t)}),a}function Dn(t,n,e,r){var i=t.length;for(e=null==e?0:+e||0,0>e&&(e=-e>i?0:i+e),r=r===E||r>i?i:+r||0,0>r&&(r+=i),i=e>r?0:r>>>0,e>>>=0;i>e;)t[e++]=n;return t}function Sn(t,n){var e=[];return Po(t,function(t,r,i){n(t,r,i)&&e.push(t)}),e}function Tn(t,n,e,r){var i;return e(t,function(t,e,a){return n(t,e,a)?(i=r?e:t,!1):void 0}),i}function Cn(t,n,e,r){r||(r=[]);for(var i=-1,a=t.length;++i<a;){var o=t[i];m(o)&&Ke(o)&&(e||Tu(o)||Ei(o))?n?Cn(o,n,e,r):ln(r,o):e||(r[r.length]=o)}return r}function Fn(t,n){return Ro(t,n,ta)}function On(t,n){return Ro(t,n,Yu)}function Ln(t,n){return jo(t,n,Yu)}function In(t,n){for(var e=-1,r=n.length,i=-1,a=[];++e<r;){var o=n[e];Li(t[o])&&(a[++i]=o)}return a}function Nn(t,n,e){if(null!=t){e!==E&&e in hr(t)&&(n=[e]);for(var r=0,i=n.length;null!=t&&i>r;)t=t[n[r++]];return r&&r==i?t:E}}function Pn(t,n,e,r,i,a){return t===n?!0:null==t||null==n||!Ii(t)&&!m(n)?t!==t&&n!==n:Bn(t,n,Pn,e,r,i,a)}function Bn(t,n,e,r,i,a,o){var u=Tu(t),s=Tu(n),c=H,l=H;u||(c=eo.call(t),c==W?c=J:c!=J&&(u=zi(t))),s||(l=eo.call(n),l==W?l=J:l!=J&&(s=zi(n)));var h=c==J,f=l==J,d=c==l;if(d&&!u&&!h)return je(t,n,c);if(!i){var p=h&&to.call(t,"__wrapped__"),g=f&&to.call(n,"__wrapped__");if(p||g)return e(p?t.value():t,g?n.value():n,r,i,a,o)}if(!d)return!1;a||(a=[]),o||(o=[]);for(var y=a.length;y--;)if(a[y]==t)return o[y]==n;a.push(t),o.push(n);var m=(u?Re:Ye)(t,n,e,r,i,a,o);return a.pop(),o.pop(),m}function Rn(t,n,e){var r=n.length,i=r,a=!e;if(null==t)return!i;for(t=hr(t);r--;){var o=n[r];if(a&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++r<i;){o=n[r];var u=o[0],s=t[u],c=o[1];if(a&&o[2]){if(s===E&&!(u in t))return!1}else{var l=e?e(s,c,u):E;if(!(l===E?Pn(c,s,e,!0):l))return!1}}return!0}function jn(t,n){var e=-1,r=Ke(t)?Ya(t.length):[];return Po(t,function(t,i,a){r[++e]=n(t,i,a)}),r}function Yn(t){var n=qe(t);if(1==n.length&&n[0][2]){var e=n[0][0],r=n[0][1];return function(t){return null==t?!1:t[e]===r&&(r!==E||e in hr(t))}}return function(t){return Rn(t,n)}}function Un(t,n){var e=Tu(t),r=tr(t)&&rr(n),i=t+"";return t=fr(t),function(a){if(null==a)return!1;var o=i;if(a=hr(a),!(!e&&r||o in a)){if(a=1==t.length?a:Nn(a,Zn(t,0,-1)),null==a)return!1;o=Mr(t),a=hr(a)}return a[o]===n?n!==E||o in a:Pn(n,a[o],E,!0)}}function $n(t,n,e,r,i){if(!Ii(t))return t;var a=Ke(n)&&(Tu(n)||zi(n)),o=a?E:Yu(n);return nn(o||n,function(u,s){if(o&&(s=u,u=n[s]),m(u))r||(r=[]),i||(i=[]),zn(t,n,s,$n,e,r,i);else{var c=t[s],l=e?e(c,u,s,t,n):E,h=l===E;h&&(l=u),l===E&&(!a||s in t)||!h&&(l===l?l===c:c!==c)||(t[s]=l)}}),t}function zn(t,n,e,r,i,a,o){
|
||
for(var u=a.length,s=n[e];u--;)if(a[u]==s)return void(t[e]=o[u]);var c=t[e],l=i?i(c,s,e,t,n):E,h=l===E;h&&(l=s,Ke(s)&&(Tu(s)||zi(s))?l=Tu(c)?c:Ke(c)?tn(c):[]:Yi(s)||Ei(s)?l=Ei(c)?Vi(c):Yi(c)?c:{}:h=!1),a.push(s),o.push(l),h?t[e]=r(l,s,i,a,o):(l===l?l!==c:c===c)&&(t[e]=l)}function qn(t){return function(n){return null==n?E:n[t]}}function Wn(t){var n=t+"";return t=fr(t),function(e){return Nn(e,t,n)}}function Hn(t,n){for(var e=t?n.length:0;e--;){var r=n[e];if(r!=i&&Qe(r)){var i=r;fo.call(t,r,1)}}return t}function Gn(t,n){return t+vo(Mo()*(n-t+1))}function Vn(t,n,e,r,i){return i(t,function(t,i,a){e=r?(r=!1,t):n(e,t,i,a)}),e}function Zn(t,n,e){var r=-1,i=t.length;n=null==n?0:+n||0,0>n&&(n=-n>i?0:i+n),e=e===E||e>i?i:+e||0,0>e&&(e+=i),i=n>e?0:e-n>>>0,n>>>=0;for(var a=Ya(i);++r<i;)a[r]=t[r+n];return a}function Xn(t,n){var e;return Po(t,function(t,r,i){return e=n(t,r,i),!e}),!!e}function Kn(t,n){var e=t.length;for(t.sort(n);e--;)t[e]=t[e].value;return t}function Qn(t,n,e){var r=Ue(),i=-1;n=cn(n,function(t){return r(t)});var a=jn(t,function(t){var e=cn(n,function(n){return n(t)});return{criteria:e,index:++i,value:t}});return Kn(a,function(t,n){return h(t,n,e)})}function Jn(t,n){var e=0;return Po(t,function(t,r,i){e+=+n(t,r,i)||0}),e}function te(t,n){var e=-1,r=ze(),i=t.length,o=r==a,u=o&&i>=Y,s=u?ge():null,c=[];s?(r=Kt,o=!1):(u=!1,s=n?[]:c);t:for(;++e<i;){var l=t[e],h=n?n(l,e,t):l;if(o&&l===l){for(var f=s.length;f--;)if(s[f]===h)continue t;n&&s.push(h),c.push(l)}else r(s,h,0)<0&&((n||u)&&s.push(h),c.push(l))}return c}function ne(t,n){for(var e=-1,r=n.length,i=Ya(r);++e<r;)i[e]=t[n[e]];return i}function ee(t,n,e,r){for(var i=t.length,a=r?i:-1;(r?a--:++a<i)&&n(t[a],a,t););return e?Zn(t,r?0:a,r?a+1:i):Zn(t,r?a+1:0,r?i:a)}function re(t,n){var e=t;e instanceof K&&(e=e.value());for(var r=-1,i=n.length;++r<i;){var a=n[r];e=a.func.apply(a.thisArg,ln([e],a.args))}return e}function ie(t,n,e){var r=0,i=t?t.length:r;if("number"==typeof n&&n===n&&Fo>=i){for(;i>r;){var a=r+i>>>1,o=t[a];(e?n>=o:n>o)&&null!==o?r=a+1:i=a}return i}return ae(t,n,Da,e)}function ae(t,n,e,r){n=e(n);for(var i=0,a=t?t.length:0,o=n!==n,u=null===n,s=n===E;a>i;){var c=vo((i+a)/2),l=e(t[c]),h=l!==E,f=l===l;if(o)var d=f||r;else d=u?f&&h&&(r||null!=l):s?f&&(r||h):null==l?!1:r?n>=l:n>l;d?i=c+1:a=c}return ko(a,Co)}function oe(t,n,e){if("function"!=typeof t)return Da;if(n===E)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 3:return function(e,r,i){return t.call(n,e,r,i)};case 4:return function(e,r,i,a){return t.call(n,e,r,i,a)};case 5:return function(e,r,i,a,o){return t.call(n,e,r,i,a,o)}}return function(){return t.apply(n,arguments)}}function ue(t){var n=new ao(t.byteLength),e=new po(n);return e.set(new po(t)),n}function se(t,n,e){for(var r=e.length,i=-1,a=wo(t.length-r,0),o=-1,u=n.length,s=Ya(u+a);++o<u;)s[o]=n[o];for(;++i<r;)s[e[i]]=t[i];for(;a--;)s[o++]=t[i++];return s}function ce(t,n,e){for(var r=-1,i=e.length,a=-1,o=wo(t.length-i,0),u=-1,s=n.length,c=Ya(o+s);++a<o;)c[a]=t[a];for(var l=a;++u<s;)c[l+u]=n[u];for(;++r<i;)c[l+e[r]]=t[a++];return c}function le(t,n){return function(e,r,i){var a=n?n():{};if(r=Ue(r,i,3),Tu(e))for(var o=-1,u=e.length;++o<u;){var s=e[o];t(a,s,r(s,o,e),e)}else Po(e,function(n,e,i){t(a,n,r(n,e,i),i)});return a}}function he(t){return mi(function(n,e){var r=-1,i=null==n?0:e.length,a=i>2?e[i-2]:E,o=i>2?e[2]:E,u=i>1?e[i-1]:E;for("function"==typeof a?(a=oe(a,u,5),i-=2):(a="function"==typeof u?u:E,i-=a?1:0),o&&Je(e[0],e[1],o)&&(a=3>i?E:a,i=1);++r<i;){var s=e[r];s&&t(n,s,a)}return n})}function fe(t,n){return function(e,r){var i=e?$o(e):0;if(!er(i))return t(e,r);for(var a=n?i:-1,o=hr(e);(n?a--:++a<i)&&r(o[a],a,o)!==!1;);return e}}function de(t){return function(n,e,r){for(var i=hr(n),a=r(n),o=a.length,u=t?o:-1;t?u--:++u<o;){var s=a[u];if(e(i[s],s,i)===!1)break}return n}}function pe(t,n){function e(){var i=this&&this!==en&&this instanceof e?r:t;return i.apply(n,arguments)}var r=me(t);return e}function ge(t){return mo&&lo?new Xt(t):null}function ye(t){return function(n){for(var e=-1,r=Aa(la(n)),i=r.length,a="";++e<i;)a=t(a,r[e],e);return a}}function me(t){return function(){var n=arguments;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var e=No(t.prototype),r=t.apply(e,n);return Ii(r)?r:e}}function ve(t){function n(e,r,i){i&&Je(e,r,i)&&(r=E);var a=Be(e,t,E,E,E,E,E,r);return a.placeholder=n.placeholder,a}return n}function _e(t,n){return mi(function(e){var r=e[0];return null==r?r:(e.push(n),t.apply(E,e))})}function be(t,n){return function(e,r,i){if(i&&Je(e,r,i)&&(r=E),r=Ue(r,i,3),1==r.length){e=Tu(e)?e:lr(e);var a=un(e,r,t,n);if(!e.length||a!==n)return a}return Mn(e,r,t,n)}}function xe(t,n){return function(e,r,a){if(r=Ue(r,a,3),Tu(e)){var o=i(e,r,n);return o>-1?e[o]:E}return Tn(e,r,t)}}function we(t){return function(n,e,r){return n&&n.length?(e=Ue(e,r,3),i(n,e,t)):-1}}function ke(t){return function(n,e,r){return e=Ue(e,r,3),Tn(n,e,t,!0)}}function Ae(t){return function(){for(var n,e=arguments.length,r=t?e:-1,i=0,a=Ya(e);t?r--:++r<e;){var o=a[i++]=arguments[r];if("function"!=typeof o)throw new Za(z);!n&&v.prototype.thru&&"wrapper"==$e(o)&&(n=new v([],!0))}for(r=n?-1:e;++r<e;){o=a[r];var u=$e(o),s="wrapper"==u?Uo(o):E;n=s&&nr(s[0])&&s[1]==(I|C|O|N)&&!s[4].length&&1==s[9]?n[$e(s[0])].apply(n,s[3]):1==o.length&&nr(o)?n[u]():n.thru(o)}return function(){var t=arguments,r=t[0];if(n&&1==t.length&&Tu(r)&&r.length>=Y)return n.plant(r).value();for(var i=0,o=e?a[i].apply(this,t):r;++i<e;)o=a[i].call(this,o);return o}}}function Ee(t,n){return function(e,r,i){return"function"==typeof r&&i===E&&Tu(e)?t(e,r):n(e,oe(r,i,3))}}function Me(t){return function(n,e,r){return("function"!=typeof e||r!==E)&&(e=oe(e,r,3)),t(n,e,ta)}}function De(t){return function(n,e,r){return("function"!=typeof e||r!==E)&&(e=oe(e,r,3)),t(n,e)}}function Se(t){return function(n,e,r){var i={};return e=Ue(e,r,3),On(n,function(n,r,a){var o=e(n,r,a);r=t?o:r,n=t?n:o,i[r]=n}),i}}function Te(t){return function(n,e,r){return n=u(n),(t?n:"")+Le(n,e,r)+(t?"":n)}}function Ce(t){var n=mi(function(e,r){var i=_(r,n.placeholder);return Be(e,t,E,r,i)});return n}function Fe(t,n){return function(e,r,i,a){var o=arguments.length<3;return"function"==typeof r&&a===E&&Tu(e)?t(e,r,i,o):Vn(e,Ue(r,a,4),i,o,n)}}function Oe(t,n,e,r,i,a,o,u,s,c){function l(){for(var v=arguments.length,b=v,x=Ya(v);b--;)x[b]=arguments[b];if(r&&(x=se(x,r,i)),a&&(x=ce(x,a,o)),p||y){var w=l.placeholder,k=_(x,w);if(v-=k.length,c>v){var A=u?tn(u):E,M=wo(c-v,0),T=p?k:E,C=p?E:k,F=p?x:E,I=p?E:x;n|=p?O:L,n&=~(p?L:O),g||(n&=~(D|S));var N=[t,n,e,F,T,I,C,A,s,M],P=Oe.apply(E,N);return nr(t)&&zo(P,N),P.placeholder=w,P}}var B=f?e:this,R=d?B[t]:t;return u&&(x=sr(x,u)),h&&s<x.length&&(x.length=s),this&&this!==en&&this instanceof l&&(R=m||me(t)),R.apply(B,x)}var h=n&I,f=n&D,d=n&S,p=n&C,g=n&T,y=n&F,m=d?E:me(t);return l}function Le(t,n,e){var r=t.length;if(n=+n,r>=n||!bo(n))return"";var i=n-r;return e=null==e?" ":e+"",ya(e,yo(i/e.length)).slice(0,i)}function Ie(t,n,e,r){function i(){for(var n=-1,u=arguments.length,s=-1,c=r.length,l=Ya(c+u);++s<c;)l[s]=r[s];for(;u--;)l[s++]=arguments[++n];var h=this&&this!==en&&this instanceof i?o:t;return h.apply(a?e:this,l)}var a=n&D,o=me(t);return i}function Ne(t){var n=qa[t];return function(t,e){return e=e===E?0:+e||0,e?(e=so(10,e),n(t*e)/e):n(t)}}function Pe(t){return function(n,e,r,i){var a=Ue(r);return null==r&&a===xn?ie(n,e,t):ae(n,e,a(r,i,1),t)}}function Be(t,n,e,r,i,a,o,u){var s=n&S;if(!s&&"function"!=typeof t)throw new Za(z);var c=r?r.length:0;if(c||(n&=~(O|L),r=i=E),c-=i?i.length:0,n&L){var l=r,h=i;r=i=E}var f=s?E:Uo(t),d=[t,n,e,r,i,l,h,a,o,u];if(f&&(ir(d,f),n=d[1],u=d[9]),d[9]=null==u?s?0:t.length:wo(u-c,0)||0,n==D)var p=pe(d[0],d[2]);else p=n!=O&&n!=(D|O)||d[4].length?Oe.apply(E,d):Ie.apply(E,d);var g=f?Yo:zo;return g(p,d)}function Re(t,n,e,r,i,a,o){var u=-1,s=t.length,c=n.length;if(s!=c&&!(i&&c>s))return!1;for(;++u<s;){var l=t[u],h=n[u],f=r?r(i?h:l,i?l:h,u):E;if(f!==E){if(f)continue;return!1}if(i){if(!dn(n,function(t){return l===t||e(l,t,r,i,a,o)}))return!1}else if(l!==h&&!e(l,h,r,i,a,o))return!1}return!0}function je(t,n,e){switch(e){case G:case V:return+t==+n;case Z:return t.name==n.name&&t.message==n.message;case Q:return t!=+t?n!=+n:t==+n;case tt:case et:return t==n+""}return!1}function Ye(t,n,e,r,i,a,o){var u=Yu(t),s=u.length,c=Yu(n),l=c.length;if(s!=l&&!i)return!1;for(var h=s;h--;){var f=u[h];if(!(i?f in n:to.call(n,f)))return!1}for(var d=i;++h<s;){f=u[h];var p=t[f],g=n[f],y=r?r(i?g:p,i?p:g,f):E;if(!(y===E?e(p,g,r,i,a,o):y))return!1;d||(d="constructor"==f)}if(!d){var m=t.constructor,v=n.constructor;if(m!=v&&"constructor"in t&&"constructor"in n&&!("function"==typeof m&&m instanceof m&&"function"==typeof v&&v instanceof v))return!1}return!0}function Ue(t,e,r){var i=n.callback||Ea;return i=i===Ea?xn:i,r?i(t,e,r):i}function $e(t){for(var n=t.name,e=Io[n],r=e?e.length:0;r--;){var i=e[r],a=i.func;if(null==a||a==t)return i.name}return n}function ze(t,e,r){var i=n.indexOf||Ar;return i=i===Ar?a:i,t?i(t,e,r):i}function qe(t){for(var n=na(t),e=n.length;e--;)n[e][2]=rr(n[e][1]);return n}function We(t,n){var e=null==t?E:t[n];return Bi(e)?e:E}function He(t,n,e){for(var r=-1,i=e.length;++r<i;){var a=e[r],o=a.size;switch(a.type){case"drop":t+=o;break;case"dropRight":n-=o;break;case"take":n=ko(n,t+o);break;case"takeRight":t=wo(t,n-o)}}return{start:t,end:n}}function Ge(t){var n=t.length,e=new t.constructor(n);return n&&"string"==typeof t[0]&&to.call(t,"index")&&(e.index=t.index,e.input=t.input),e}function Ve(t){var n=t.constructor;return"function"==typeof n&&n instanceof n||(n=Ha),new n}function Ze(t,n,e){var r=t.constructor;switch(n){case it:return ue(t);case G:case V:return new r(+t);case at:case ot:case ut:case st:case ct:case lt:case ht:case ft:case dt:var i=t.buffer;return new r(e?ue(i):i,t.byteOffset,t.length);case Q:case et:return new r(t);case tt:var a=new r(t.source,Ot.exec(t));a.lastIndex=t.lastIndex}return a}function Xe(t,n,e){null==t||tr(n,t)||(n=fr(n),t=1==n.length?t:Nn(t,Zn(n,0,-1)),n=Mr(n));var r=null==t?t:t[n];return null==r?E:r.apply(t,e)}function Ke(t){return null!=t&&er($o(t))}function Qe(t,n){return t="number"==typeof t||Nt.test(t)?+t:-1,n=null==n?Oo:n,t>-1&&t%1==0&&n>t}function Je(t,n,e){if(!Ii(e))return!1;var r=typeof n;if("number"==r?Ke(e)&&Qe(n,e.length):"string"==r&&n in e){var i=e[n];return t===t?t===i:i!==i}return!1}function tr(t,n){var e=typeof t;if("string"==e&&Et.test(t)||"number"==e)return!0;if(Tu(t))return!1;var r=!At.test(t);return r||null!=n&&t in hr(n)}function nr(t){var e=$e(t);if(!(e in K.prototype))return!1;var r=n[e];if(t===r)return!0;var i=Uo(r);return!!i&&t===i[0]}function er(t){return"number"==typeof t&&t>-1&&t%1==0&&Oo>=t}function rr(t){return t===t&&!Ii(t)}function ir(t,n){var e=t[1],r=n[1],i=e|r,a=I>i,o=r==I&&e==C||r==I&&e==N&&t[7].length<=n[8]||r==(I|N)&&e==C;if(!a&&!o)return t;r&D&&(t[2]=n[2],i|=e&D?0:T);var u=n[3];if(u){var s=t[3];t[3]=s?se(s,u,n[4]):tn(u),t[4]=s?_(t[3],q):tn(n[4])}return u=n[5],u&&(s=t[5],t[5]=s?ce(s,u,n[6]):tn(u),t[6]=s?_(t[5],q):tn(n[6])),u=n[7],u&&(t[7]=tn(u)),r&I&&(t[8]=null==t[8]?n[8]:ko(t[8],n[8])),null==t[9]&&(t[9]=n[9]),t[0]=n[0],t[1]=i,t}function ar(t,n){return t===E?n:Cu(t,n,ar)}function or(t,n){t=hr(t);for(var e=-1,r=n.length,i={};++e<r;){var a=n[e];a in t&&(i[a]=t[a])}return i}function ur(t,n){var e={};return Fn(t,function(t,r,i){n(t,r,i)&&(e[r]=t)}),e}function sr(t,n){for(var e=t.length,r=ko(n.length,e),i=tn(t);r--;){var a=n[r];t[r]=Qe(a,e)?i[a]:E}return t}function cr(t){for(var n=ta(t),e=n.length,r=e&&t.length,i=!!r&&er(r)&&(Tu(t)||Ei(t)),a=-1,o=[];++a<e;){var u=n[a];(i&&Qe(u,r)||to.call(t,u))&&o.push(u)}return o}function lr(t){return null==t?[]:Ke(t)?Ii(t)?t:Ha(t):aa(t)}function hr(t){return Ii(t)?t:Ha(t)}function fr(t){if(Tu(t))return t;var n=[];return u(t).replace(Mt,function(t,e,r,i){n.push(r?i.replace(Ct,"$1"):e||t)}),n}function dr(t){return t instanceof K?t.clone():new v(t.__wrapped__,t.__chain__,tn(t.__actions__))}function pr(t,n,e){n=(e?Je(t,n,e):null==n)?1:wo(vo(n)||1,1);for(var r=0,i=t?t.length:0,a=-1,o=Ya(yo(i/n));i>r;)o[++a]=Zn(t,r,r+=n);return o}function gr(t){for(var n=-1,e=t?t.length:0,r=-1,i=[];++n<e;){var a=t[n];a&&(i[++r]=a)}return i}function yr(t,n,e){var r=t?t.length:0;return r?((e?Je(t,n,e):null==n)&&(n=1),Zn(t,0>n?0:n)):[]}function mr(t,n,e){var r=t?t.length:0;return r?((e?Je(t,n,e):null==n)&&(n=1),n=r-(+n||0),Zn(t,0,0>n?0:n)):[]}function vr(t,n,e){return t&&t.length?ee(t,Ue(n,e,3),!0,!0):[]}function _r(t,n,e){return t&&t.length?ee(t,Ue(n,e,3),!0):[]}function br(t,n,e,r){var i=t?t.length:0;return i?(e&&"number"!=typeof e&&Je(t,n,e)&&(e=0,r=i),Dn(t,n,e,r)):[]}function xr(t){return t?t[0]:E}function wr(t,n,e){var r=t?t.length:0;return e&&Je(t,n,e)&&(n=!1),r?Cn(t,n):[]}function kr(t){var n=t?t.length:0;return n?Cn(t,!0):[]}function Ar(t,n,e){var r=t?t.length:0;if(!r)return-1;if("number"==typeof e)e=0>e?wo(r+e,0):e;else if(e){var i=ie(t,n);return r>i&&(n===n?n===t[i]:t[i]!==t[i])?i:-1}return a(t,n,e||0)}function Er(t){return mr(t,1)}function Mr(t){var n=t?t.length:0;return n?t[n-1]:E}function Dr(t,n,e){var r=t?t.length:0;if(!r)return-1;var i=r;if("number"==typeof e)i=(0>e?wo(r+e,0):ko(e||0,r-1))+1;else if(e){i=ie(t,n,!0)-1;var a=t[i];return(n===n?n===a:a!==a)?i:-1}if(n!==n)return y(t,i,!0);for(;i--;)if(t[i]===n)return i;return-1}function Sr(){var t=arguments,n=t[0];if(!n||!n.length)return n;for(var e=0,r=ze(),i=t.length;++e<i;)for(var a=0,o=t[e];(a=r(n,o,a))>-1;)fo.call(n,a,1);return n}function Tr(t,n,e){var r=[];if(!t||!t.length)return r;var i=-1,a=[],o=t.length;for(n=Ue(n,e,3);++i<o;){var u=t[i];n(u,i,t)&&(r.push(u),a.push(i))}return Hn(t,a),r}function Cr(t){return yr(t,1)}function Fr(t,n,e){var r=t?t.length:0;return r?(e&&"number"!=typeof e&&Je(t,n,e)&&(n=0,e=r),Zn(t,n,e)):[]}function Or(t,n,e){var r=t?t.length:0;return r?((e?Je(t,n,e):null==n)&&(n=1),Zn(t,0,0>n?0:n)):[]}function Lr(t,n,e){var r=t?t.length:0;return r?((e?Je(t,n,e):null==n)&&(n=1),n=r-(+n||0),Zn(t,0>n?0:n)):[]}function Ir(t,n,e){return t&&t.length?ee(t,Ue(n,e,3),!1,!0):[]}function Nr(t,n,e){return t&&t.length?ee(t,Ue(n,e,3)):[]}function Pr(t,n,e,r){var i=t?t.length:0;if(!i)return[];null!=n&&"boolean"!=typeof n&&(r=e,e=Je(t,n,r)?E:n,n=!1);var o=Ue();return(null!=e||o!==xn)&&(e=o(e,r,3)),n&&ze()==a?b(t,e):te(t,e)}function Br(t){if(!t||!t.length)return[];var n=-1,e=0;t=sn(t,function(t){return Ke(t)?(e=wo(t.length,e),!0):void 0});for(var r=Ya(e);++n<e;)r[n]=cn(t,qn(n));return r}function Rr(t,n,e){var r=t?t.length:0;if(!r)return[];var i=Br(t);return null==n?i:(n=oe(n,e,4),cn(i,function(t){return hn(t,n,E,!0)}))}function jr(){for(var t=-1,n=arguments.length;++t<n;){var e=arguments[t];if(Ke(e))var r=r?ln(An(r,e),An(e,r)):e}return r?te(r):[]}function Yr(t,n){var e=-1,r=t?t.length:0,i={};for(!r||n||Tu(t[0])||(n=[]);++e<r;){var a=t[e];n?i[a]=n[e]:a&&(i[a[0]]=a[1])}return i}function Ur(t){var e=n(t);return e.__chain__=!0,e}function $r(t,n,e){return n.call(e,t),t}function zr(t,n,e){return n.call(e,t)}function qr(){return Ur(this)}function Wr(){return new v(this.value(),this.__chain__)}function Hr(t){for(var n,r=this;r instanceof e;){var i=dr(r);n?a.__wrapped__=i:n=i;var a=i;r=r.__wrapped__}return a.__wrapped__=t,n}function Gr(){var t=this.__wrapped__,n=function(t){return e&&e.__dir__<0?t:t.reverse()};if(t instanceof K){var e=t;return this.__actions__.length&&(e=new K(this)),e=e.reverse(),e.__actions__.push({func:zr,args:[n],thisArg:E}),new v(e,this.__chain__)}return this.thru(n)}function Vr(){return this.value()+""}function Zr(){return re(this.__wrapped__,this.__actions__)}function Xr(t,n,e){var r=Tu(t)?on:En;return e&&Je(t,n,e)&&(n=E),("function"!=typeof n||e!==E)&&(n=Ue(n,e,3)),r(t,n)}function Kr(t,n,e){var r=Tu(t)?sn:Sn;return n=Ue(n,e,3),r(t,n)}function Qr(t,n){return iu(t,Yn(n))}function Jr(t,n,e,r){var i=t?$o(t):0;return er(i)||(t=aa(t),i=t.length),e="number"!=typeof e||r&&Je(n,e,r)?0:0>e?wo(i+e,0):e||0,"string"==typeof t||!Tu(t)&&$i(t)?i>=e&&t.indexOf(n,e)>-1:!!i&&ze(t,n,e)>-1}function ti(t,n,e){var r=Tu(t)?cn:jn;return n=Ue(n,e,3),r(t,n)}function ni(t,n){return ti(t,La(n))}function ei(t,n,e){var r=Tu(t)?sn:Sn;return n=Ue(n,e,3),r(t,function(t,e,r){return!n(t,e,r)})}function ri(t,n,e){if(e?Je(t,n,e):null==n){t=lr(t);var r=t.length;return r>0?t[Gn(0,r-1)]:E}var i=-1,a=Gi(t),r=a.length,o=r-1;for(n=ko(0>n?0:+n||0,r);++i<n;){var u=Gn(i,o),s=a[u];a[u]=a[i],a[i]=s}return a.length=n,a}function ii(t){return ri(t,So)}function ai(t){var n=t?$o(t):0;return er(n)?n:Yu(t).length}function oi(t,n,e){var r=Tu(t)?dn:Xn;return e&&Je(t,n,e)&&(n=E),("function"!=typeof n||e!==E)&&(n=Ue(n,e,3)),r(t,n)}function ui(t,n,e){if(null==t)return[];e&&Je(t,n,e)&&(n=E);var r=-1;n=Ue(n,e,3);var i=jn(t,function(t,e,i){return{criteria:n(t,e,i),index:++r,value:t}});return Kn(i,l)}function si(t,n,e,r){return null==t?[]:(r&&Je(n,e,r)&&(e=E),Tu(n)||(n=null==n?[]:[n]),Tu(e)||(e=null==e?[]:[e]),Qn(t,n,e))}function ci(t,n){return Kr(t,Yn(n))}function li(t,n){if("function"!=typeof n){if("function"!=typeof t)throw new Za(z);var e=t;t=n,n=e}return t=bo(t=+t)?t:0,function(){return--t<1?n.apply(this,arguments):void 0}}function hi(t,n,e){return e&&Je(t,n,e)&&(n=E),n=t&&null==n?t.length:wo(+n||0,0),Be(t,I,E,E,E,E,n)}function fi(t,n){var e;if("function"!=typeof n){if("function"!=typeof t)throw new Za(z);var r=t;t=n,n=r}return function(){return--t>0&&(e=n.apply(this,arguments)),1>=t&&(n=E),e}}function di(t,n,e){function r(){d&&oo(d),c&&oo(c),g=0,c=d=p=E}function i(n,e){e&&oo(e),c=d=p=E,n&&(g=gu(),l=t.apply(f,s),d||c||(s=f=E))}function a(){var t=n-(gu()-h);0>=t||t>n?i(p,c):d=ho(a,t)}function o(){i(m,d)}function u(){if(s=arguments,h=gu(),f=this,p=m&&(d||!v),y===!1)var e=v&&!d;else{c||v||(g=h);var r=y-(h-g),i=0>=r||r>y;i?(c&&(c=oo(c)),g=h,l=t.apply(f,s)):c||(c=ho(o,r))}return i&&d?d=oo(d):d||n===y||(d=ho(a,n)),e&&(i=!0,l=t.apply(f,s)),!i||d||c||(s=f=E),l}var s,c,l,h,f,d,p,g=0,y=!1,m=!0;if("function"!=typeof t)throw new Za(z);if(n=0>n?0:+n||0,e===!0){var v=!0;m=!1}else Ii(e)&&(v=!!e.leading,y="maxWait"in e&&wo(+e.maxWait||0,n),m="trailing"in e?!!e.trailing:m);return u.cancel=r,u}function pi(t,n){if("function"!=typeof t||n&&"function"!=typeof n)throw new Za(z);var e=function(){var r=arguments,i=n?n.apply(this,r):r[0],a=e.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return e.cache=a.set(i,o),o};return e.cache=new pi.Cache,e}function gi(t){if("function"!=typeof t)throw new Za(z);return function(){return!t.apply(this,arguments)}}function yi(t){return fi(2,t)}function mi(t,n){if("function"!=typeof t)throw new Za(z);return n=wo(n===E?t.length-1:+n||0,0),function(){for(var e=arguments,r=-1,i=wo(e.length-n,0),a=Ya(i);++r<i;)a[r]=e[n+r];switch(n){case 0:return t.call(this,a);case 1:return t.call(this,e[0],a);case 2:return t.call(this,e[0],e[1],a)}var o=Ya(n+1);for(r=-1;++r<n;)o[r]=e[r];return o[n]=a,t.apply(this,o)}}function vi(t){if("function"!=typeof t)throw new Za(z);return function(n){return t.apply(this,n)}}function _i(t,n,e){var r=!0,i=!0;if("function"!=typeof t)throw new Za(z);return e===!1?r=!1:Ii(e)&&(r="leading"in e?!!e.leading:r,i="trailing"in e?!!e.trailing:i),di(t,n,{leading:r,maxWait:+n,trailing:i})}function bi(t,n){return n=null==n?Da:n,Be(n,O,E,[t],[])}function xi(t,n,e,r){return n&&"boolean"!=typeof n&&Je(t,n,e)?n=!1:"function"==typeof n&&(r=e,e=n,n=!1),"function"==typeof e?wn(t,n,oe(e,r,1)):wn(t,n)}function wi(t,n,e){return"function"==typeof n?wn(t,!0,oe(n,e,1)):wn(t,!0)}function ki(t,n){return t>n}function Ai(t,n){return t>=n}function Ei(t){return m(t)&&Ke(t)&&to.call(t,"callee")&&!co.call(t,"callee")}function Mi(t){return t===!0||t===!1||m(t)&&eo.call(t)==G}function Di(t){return m(t)&&eo.call(t)==V}function Si(t){return!!t&&1===t.nodeType&&m(t)&&!Yi(t)}function Ti(t){return null==t?!0:Ke(t)&&(Tu(t)||$i(t)||Ei(t)||m(t)&&Li(t.splice))?!t.length:!Yu(t).length}function Ci(t,n,e,r){e="function"==typeof e?oe(e,r,3):E;var i=e?e(t,n):E;return i===E?Pn(t,n,e):!!i}function Fi(t){return m(t)&&"string"==typeof t.message&&eo.call(t)==Z}function Oi(t){return"number"==typeof t&&bo(t)}function Li(t){return Ii(t)&&eo.call(t)==X}function Ii(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function Ni(t,n,e,r){return e="function"==typeof e?oe(e,r,3):E,Rn(t,qe(n),e)}function Pi(t){return ji(t)&&t!=+t}function Bi(t){return null==t?!1:Li(t)?io.test(Ja.call(t)):m(t)&&It.test(t)}function Ri(t){return null===t}function ji(t){return"number"==typeof t||m(t)&&eo.call(t)==Q}function Yi(t){var n;if(!m(t)||eo.call(t)!=J||Ei(t)||!to.call(t,"constructor")&&(n=t.constructor,"function"==typeof n&&!(n instanceof n)))return!1;var e;return Fn(t,function(t,n){e=n}),e===E||to.call(t,e)}function Ui(t){return Ii(t)&&eo.call(t)==tt}function $i(t){return"string"==typeof t||m(t)&&eo.call(t)==et}function zi(t){return m(t)&&er(t.length)&&!!$t[eo.call(t)]}function qi(t){return t===E}function Wi(t,n){return n>t}function Hi(t,n){return n>=t}function Gi(t){var n=t?$o(t):0;return er(n)?n?tn(t):[]:aa(t)}function Vi(t){return bn(t,ta(t))}function Zi(t,n,e){var r=No(t);return e&&Je(t,n,e)&&(n=E),n?vn(r,n):r}function Xi(t){return In(t,ta(t))}function Ki(t,n,e){var r=null==t?E:Nn(t,fr(n),n+"");return r===E?e:r}function Qi(t,n){if(null==t)return!1;var e=to.call(t,n);if(!e&&!tr(n)){if(n=fr(n),t=1==n.length?t:Nn(t,Zn(n,0,-1)),null==t)return!1;n=Mr(n),e=to.call(t,n)}return e||er(t.length)&&Qe(n,t.length)&&(Tu(t)||Ei(t))}function Ji(t,n,e){e&&Je(t,n,e)&&(n=E);for(var r=-1,i=Yu(t),a=i.length,o={};++r<a;){var u=i[r],s=t[u];n?to.call(o,s)?o[s].push(u):o[s]=[u]:o[s]=u}return o}function ta(t){if(null==t)return[];Ii(t)||(t=Ha(t));var n=t.length;n=n&&er(n)&&(Tu(t)||Ei(t))&&n||0;for(var e=t.constructor,r=-1,i="function"==typeof e&&e.prototype===t,a=Ya(n),o=n>0;++r<n;)a[r]=r+"";for(var u in t)o&&Qe(u,n)||"constructor"==u&&(i||!to.call(t,u))||a.push(u);return a}function na(t){t=hr(t);for(var n=-1,e=Yu(t),r=e.length,i=Ya(r);++n<r;){var a=e[n];i[n]=[a,t[a]]}return i}function ea(t,n,e){var r=null==t?E:t[n];return r===E&&(null==t||tr(n,t)||(n=fr(n),t=1==n.length?t:Nn(t,Zn(n,0,-1)),r=null==t?E:t[Mr(n)]),r=r===E?e:r),Li(r)?r.call(t):r}function ra(t,n,e){if(null==t)return t;var r=n+"";n=null!=t[r]||tr(n,t)?[r]:fr(n);for(var i=-1,a=n.length,o=a-1,u=t;null!=u&&++i<a;){var s=n[i];Ii(u)&&(i==o?u[s]=e:null==u[s]&&(u[s]=Qe(n[i+1])?[]:{})),u=u[s]}return t}function ia(t,n,e,r){var i=Tu(t)||zi(t);if(n=Ue(n,r,4),null==e)if(i||Ii(t)){var a=t.constructor;e=i?Tu(t)?new a:[]:No(Li(a)?a.prototype:E)}else e={};return(i?nn:On)(t,function(t,r,i){return n(e,t,r,i)}),e}function aa(t){return ne(t,Yu(t))}function oa(t){return ne(t,ta(t))}function ua(t,n,e){return n=+n||0,e===E?(e=n,n=0):e=+e||0,t>=ko(n,e)&&t<wo(n,e)}function sa(t,n,e){e&&Je(t,n,e)&&(n=e=E);var r=null==t,i=null==n;if(null==e&&(i&&"boolean"==typeof t?(e=t,t=1):"boolean"==typeof n&&(e=n,i=!0)),r&&i&&(n=1,i=!1),t=+t||0,i?(n=t,t=0):n=+n||0,e||t%1||n%1){var a=Mo();return ko(t+a*(n-t+uo("1e-"+((a+"").length-1))),n)}return Gn(t,n)}function ca(t){return t=u(t),t&&t.charAt(0).toUpperCase()+t.slice(1)}function la(t){return t=u(t),t&&t.replace(Pt,f).replace(Tt,"")}function ha(t,n,e){t=u(t),n+="";var r=t.length;return e=e===E?r:ko(0>e?0:+e||0,r),e-=n.length,e>=0&&t.indexOf(n,e)==e}function fa(t){return t=u(t),t&&bt.test(t)?t.replace(vt,d):t}function da(t){return t=u(t),t&&St.test(t)?t.replace(Dt,p):t||"(?:)"}function pa(t,n,e){t=u(t),n=+n;var r=t.length;if(r>=n||!bo(n))return t;var i=(n-r)/2,a=vo(i),o=yo(i);return e=Le("",o,e),e.slice(0,a)+t+e}function ga(t,n,e){return(e?Je(t,n,e):null==n)?n=0:n&&(n=+n),t=_a(t),Eo(t,n||(Lt.test(t)?16:10))}function ya(t,n){var e="";if(t=u(t),n=+n,1>n||!t||!bo(n))return e;do n%2&&(e+=t),n=vo(n/2),t+=t;while(n);return e}function ma(t,n,e){return t=u(t),e=null==e?0:ko(0>e?0:+e||0,t.length),t.lastIndexOf(n,e)==e}function va(t,e,r){var i=n.templateSettings;r&&Je(t,e,r)&&(e=r=E),t=u(t),e=mn(vn({},r||e),i,yn);var a,o,s=mn(vn({},e.imports),i.imports,yn),c=Yu(s),l=ne(s,c),h=0,f=e.interpolate||Bt,d="__p += '",p=Ga((e.escape||Bt).source+"|"+f.source+"|"+(f===kt?Ft:Bt).source+"|"+(e.evaluate||Bt).source+"|$","g"),y="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++Ut+"]")+"\n";t.replace(p,function(n,e,r,i,u,s){return r||(r=i),d+=t.slice(h,s).replace(Rt,g),e&&(a=!0,d+="' +\n__e("+e+") +\n'"),u&&(o=!0,d+="';\n"+u+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),h=s+n.length,n}),d+="';\n";var m=e.variable;m||(d="with (obj) {\n"+d+"\n}\n"),d=(o?d.replace(pt,""):d).replace(gt,"$1").replace(yt,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=Ku(function(){return za(c,y+"return "+d).apply(E,l)});if(v.source=d,Fi(v))throw v;return v}function _a(t,n,e){var r=t;return(t=u(t))?(e?Je(r,n,e):null==n)?t.slice(x(t),w(t)+1):(n+="",t.slice(s(t,n),c(t,n)+1)):t}function ba(t,n,e){var r=t;return t=u(t),t?t.slice((e?Je(r,n,e):null==n)?x(t):s(t,n+"")):t}function xa(t,n,e){var r=t;return t=u(t),t?(e?Je(r,n,e):null==n)?t.slice(0,w(t)+1):t.slice(0,c(t,n+"")+1):t}function wa(t,n,e){e&&Je(t,n,e)&&(n=E);var r=P,i=B;if(null!=n)if(Ii(n)){var a="separator"in n?n.separator:a;r="length"in n?+n.length||0:r,i="omission"in n?u(n.omission):i}else r=+n||0;if(t=u(t),r>=t.length)return t;var o=r-i.length;if(1>o)return i;var s=t.slice(0,o);if(null==a)return s+i;if(Ui(a)){if(t.slice(o).search(a)){var c,l,h=t.slice(0,o);for(a.global||(a=Ga(a.source,(Ot.exec(a)||"")+"g")),a.lastIndex=0;c=a.exec(h);)l=c.index;s=s.slice(0,null==l?o:l)}}else if(t.indexOf(a,o)!=o){var f=s.lastIndexOf(a);f>-1&&(s=s.slice(0,f))}return s+i}function ka(t){return t=u(t),t&&_t.test(t)?t.replace(mt,k):t}function Aa(t,n,e){return e&&Je(t,n,e)&&(n=E),t=u(t),t.match(n||jt)||[]}function Ea(t,n,e){return e&&Je(t,n,e)&&(n=E),m(t)?Sa(t):xn(t,n)}function Ma(t){return function(){return t}}function Da(t){return t}function Sa(t){return Yn(wn(t,!0))}function Ta(t,n){return Un(t,wn(n,!0))}function Ca(t,n,e){if(null==e){var r=Ii(n),i=r?Yu(n):E,a=i&&i.length?In(n,i):E;(a?a.length:r)||(a=!1,e=n,n=t,t=this)}a||(a=In(n,Yu(n)));var o=!0,u=-1,s=Li(t),c=a.length;e===!1?o=!1:Ii(e)&&"chain"in e&&(o=e.chain);for(;++u<c;){var l=a[u],h=n[l];t[l]=h,s&&(t.prototype[l]=function(n){return function(){var e=this.__chain__;if(o||e){var r=t(this.__wrapped__),i=r.__actions__=tn(this.__actions__);return i.push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,ln([this.value()],arguments))}}(h))}return t}function Fa(){return en._=ro,this}function Oa(){}function La(t){return tr(t)?qn(t):Wn(t)}function Ia(t){return function(n){return Nn(t,fr(n),n+"")}}function Na(t,n,e){e&&Je(t,n,e)&&(n=e=E),t=+t||0,e=null==e?1:+e||0,null==n?(n=t,t=0):n=+n||0;for(var r=-1,i=wo(yo((n-t)/(e||1)),0),a=Ya(i);++r<i;)a[r]=t,t+=e;return a}function Pa(t,n,e){if(t=vo(t),1>t||!bo(t))return[];var r=-1,i=Ya(ko(t,To));for(n=oe(n,e,1);++r<t;)To>r?i[r]=n(r):n(r);return i}function Ba(t){var n=++no;return u(t)+n}function Ra(t,n){return(+t||0)+(+n||0)}function ja(t,n,e){return e&&Je(t,n,e)&&(n=E),n=Ue(n,e,3),1==n.length?pn(Tu(t)?t:lr(t),n):Jn(t,n)}t=t?rn.defaults(en.Object(),t,rn.pick(en,Yt)):en;{var Ya=t.Array,Ua=t.Date,$a=t.Error,za=t.Function,qa=t.Math,Wa=t.Number,Ha=t.Object,Ga=t.RegExp,Va=t.String,Za=t.TypeError,Xa=Ya.prototype,Ka=Ha.prototype,Qa=Va.prototype,Ja=za.prototype.toString,to=Ka.hasOwnProperty,no=0,eo=Ka.toString,ro=en._,io=Ga("^"+Ja.call(to).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ao=t.ArrayBuffer,oo=t.clearTimeout,uo=t.parseFloat,so=qa.pow,co=Ka.propertyIsEnumerable,lo=We(t,"Set"),ho=t.setTimeout,fo=Xa.splice,po=t.Uint8Array,go=We(t,"WeakMap"),yo=qa.ceil,mo=We(Ha,"create"),vo=qa.floor,_o=We(Ya,"isArray"),bo=t.isFinite,xo=We(Ha,"keys"),wo=qa.max,ko=qa.min,Ao=We(Ua,"now"),Eo=t.parseInt,Mo=qa.random,Do=Wa.NEGATIVE_INFINITY,So=Wa.POSITIVE_INFINITY,To=4294967295,Co=To-1,Fo=To>>>1,Oo=9007199254740991,Lo=go&&new go,Io={};n.support={}}n.templateSettings={escape:xt,evaluate:wt,interpolate:kt,variable:"",imports:{_:n}};var No=function(){function t(){}return function(n){if(Ii(n)){t.prototype=n;var e=new t;t.prototype=E}return e||{}}}(),Po=fe(On),Bo=fe(Ln,!0),Ro=de(),jo=de(!0),Yo=Lo?function(t,n){return Lo.set(t,n),t}:Da,Uo=Lo?function(t){return Lo.get(t)}:Oa,$o=qn("length"),zo=function(){var t=0,n=0;return function(e,r){var i=gu(),a=j-(i-n);if(n=i,a>0){if(++t>=R)return e}else t=0;return Yo(e,r)}}(),qo=mi(function(t,n){return m(t)&&Ke(t)?An(t,Cn(n,!1,!0)):[]}),Wo=we(),Ho=we(!0),Go=mi(function(t){for(var n=t.length,e=n,r=Ya(h),i=ze(),o=i==a,u=[];e--;){var s=t[e]=Ke(s=t[e])?s:[];r[e]=o&&s.length>=120?ge(e&&s):null}var c=t[0],l=-1,h=c?c.length:0,f=r[0];t:for(;++l<h;)if(s=c[l],(f?Kt(f,s):i(u,s,0))<0){for(var e=n;--e;){var d=r[e];if((d?Kt(d,s):i(t[e],s,0))<0)continue t}f&&f.push(s),u.push(s)}return u}),Vo=mi(function(t,n){n=Cn(n);var e=_n(t,n);return Hn(t,n.sort(r)),e}),Zo=Pe(),Xo=Pe(!0),Ko=mi(function(t){return te(Cn(t,!1,!0))}),Qo=mi(function(t,n){return Ke(t)?An(t,n):[]}),Jo=mi(Br),tu=mi(function(t){var n=t.length,e=n>2?t[n-2]:E,r=n>1?t[n-1]:E;return n>2&&"function"==typeof e?n-=2:(e=n>1&&"function"==typeof r?(--n,r):E,r=E),t.length=n,Rr(t,e,r)}),nu=mi(function(t){return t=Cn(t),this.thru(function(n){return Jt(Tu(n)?n:[hr(n)],t)})}),eu=mi(function(t,n){return _n(t,Cn(n))}),ru=le(function(t,n,e){to.call(t,e)?++t[e]:t[e]=1}),iu=xe(Po),au=xe(Bo,!0),ou=Ee(nn,Po),uu=Ee(an,Bo),su=le(function(t,n,e){to.call(t,e)?t[e].push(n):t[e]=[n]}),cu=le(function(t,n,e){t[e]=n}),lu=mi(function(t,n,e){var r=-1,i="function"==typeof n,a=tr(n),o=Ke(t)?Ya(t.length):[];return Po(t,function(t){var u=i?n:a&&null!=t?t[n]:E;o[++r]=u?u.apply(t,e):Xe(t,n,e)}),o}),hu=le(function(t,n,e){t[e?0:1].push(n)},function(){return[[],[]]}),fu=Fe(hn,Po),du=Fe(fn,Bo),pu=mi(function(t,n){if(null==t)return[];var e=n[2];return e&&Je(n[0],n[1],e)&&(n.length=1),Qn(t,Cn(n),[])}),gu=Ao||function(){return(new Ua).getTime()},yu=mi(function(t,n,e){var r=D;if(e.length){var i=_(e,yu.placeholder);r|=O}return Be(t,r,n,e,i)}),mu=mi(function(t,n){n=n.length?Cn(n):Xi(t);for(var e=-1,r=n.length;++e<r;){var i=n[e];t[i]=Be(t[i],D,t)}return t}),vu=mi(function(t,n,e){var r=D|S;if(e.length){var i=_(e,vu.placeholder);r|=O}return Be(n,r,t,e,i)}),_u=ve(C),bu=ve(F),xu=mi(function(t,n){return kn(t,1,n)}),wu=mi(function(t,n,e){return kn(t,n,e)}),ku=Ae(),Au=Ae(!0),Eu=mi(function(t,n){if(n=Cn(n),"function"!=typeof t||!on(n,o))throw new Za(z);var e=n.length;return mi(function(r){for(var i=ko(r.length,e);i--;)r[i]=n[i](r[i]);return t.apply(this,r)})}),Mu=Ce(O),Du=Ce(L),Su=mi(function(t,n){return Be(t,N,E,E,E,Cn(n))}),Tu=_o||function(t){return m(t)&&er(t.length)&&eo.call(t)==H},Cu=he($n),Fu=he(function(t,n,e){return e?mn(t,n,e):vn(t,n)}),Ou=_e(Fu,gn),Lu=_e(Cu,ar),Iu=ke(On),Nu=ke(Ln),Pu=Me(Ro),Bu=Me(jo),Ru=De(On),ju=De(Ln),Yu=xo?function(t){var n=null==t?E:t.constructor;return"function"==typeof n&&n.prototype===t||"function"!=typeof t&&Ke(t)?cr(t):Ii(t)?xo(t):[]}:cr,Uu=Se(!0),$u=Se(),zu=mi(function(t,n){if(null==t)return{};if("function"!=typeof n[0]){var n=cn(Cn(n),Va);return or(t,An(ta(t),n))}var e=oe(n[0],n[1],3);return ur(t,function(t,n,r){return!e(t,n,r)})}),qu=mi(function(t,n){return null==t?{}:"function"==typeof n[0]?ur(t,oe(n[0],n[1],3)):or(t,Cn(n))}),Wu=ye(function(t,n,e){return n=n.toLowerCase(),t+(e?n.charAt(0).toUpperCase()+n.slice(1):n)}),Hu=ye(function(t,n,e){return t+(e?"-":"")+n.toLowerCase()}),Gu=Te(),Vu=Te(!0),Zu=ye(function(t,n,e){return t+(e?"_":"")+n.toLowerCase()}),Xu=ye(function(t,n,e){return t+(e?" ":"")+(n.charAt(0).toUpperCase()+n.slice(1))}),Ku=mi(function(t,n){try{return t.apply(E,n)}catch(e){return Fi(e)?e:new $a(e)}}),Qu=mi(function(t,n){return function(e){return Xe(e,t,n);
|
||
|
||
}}),Ju=mi(function(t,n){return function(e){return Xe(t,e,n)}}),ts=Ne("ceil"),ns=Ne("floor"),es=be(ki,Do),rs=be(Wi,So),is=Ne("round");return n.prototype=e.prototype,v.prototype=No(e.prototype),v.prototype.constructor=v,K.prototype=No(e.prototype),K.prototype.constructor=K,Wt.prototype["delete"]=Ht,Wt.prototype.get=Gt,Wt.prototype.has=Vt,Wt.prototype.set=Zt,Xt.prototype.push=Qt,pi.Cache=Wt,n.after=li,n.ary=hi,n.assign=Fu,n.at=eu,n.before=fi,n.bind=yu,n.bindAll=mu,n.bindKey=vu,n.callback=Ea,n.chain=Ur,n.chunk=pr,n.compact=gr,n.constant=Ma,n.countBy=ru,n.create=Zi,n.curry=_u,n.curryRight=bu,n.debounce=di,n.defaults=Ou,n.defaultsDeep=Lu,n.defer=xu,n.delay=wu,n.difference=qo,n.drop=yr,n.dropRight=mr,n.dropRightWhile=vr,n.dropWhile=_r,n.fill=br,n.filter=Kr,n.flatten=wr,n.flattenDeep=kr,n.flow=ku,n.flowRight=Au,n.forEach=ou,n.forEachRight=uu,n.forIn=Pu,n.forInRight=Bu,n.forOwn=Ru,n.forOwnRight=ju,n.functions=Xi,n.groupBy=su,n.indexBy=cu,n.initial=Er,n.intersection=Go,n.invert=Ji,n.invoke=lu,n.keys=Yu,n.keysIn=ta,n.map=ti,n.mapKeys=Uu,n.mapValues=$u,n.matches=Sa,n.matchesProperty=Ta,n.memoize=pi,n.merge=Cu,n.method=Qu,n.methodOf=Ju,n.mixin=Ca,n.modArgs=Eu,n.negate=gi,n.omit=zu,n.once=yi,n.pairs=na,n.partial=Mu,n.partialRight=Du,n.partition=hu,n.pick=qu,n.pluck=ni,n.property=La,n.propertyOf=Ia,n.pull=Sr,n.pullAt=Vo,n.range=Na,n.rearg=Su,n.reject=ei,n.remove=Tr,n.rest=Cr,n.restParam=mi,n.set=ra,n.shuffle=ii,n.slice=Fr,n.sortBy=ui,n.sortByAll=pu,n.sortByOrder=si,n.spread=vi,n.take=Or,n.takeRight=Lr,n.takeRightWhile=Ir,n.takeWhile=Nr,n.tap=$r,n.throttle=_i,n.thru=zr,n.times=Pa,n.toArray=Gi,n.toPlainObject=Vi,n.transform=ia,n.union=Ko,n.uniq=Pr,n.unzip=Br,n.unzipWith=Rr,n.values=aa,n.valuesIn=oa,n.where=ci,n.without=Qo,n.wrap=bi,n.xor=jr,n.zip=Jo,n.zipObject=Yr,n.zipWith=tu,n.backflow=Au,n.collect=ti,n.compose=Au,n.each=ou,n.eachRight=uu,n.extend=Fu,n.iteratee=Ea,n.methods=Xi,n.object=Yr,n.select=Kr,n.tail=Cr,n.unique=Pr,Ca(n,n),n.add=Ra,n.attempt=Ku,n.camelCase=Wu,n.capitalize=ca,n.ceil=ts,n.clone=xi,n.cloneDeep=wi,n.deburr=la,n.endsWith=ha,n.escape=fa,n.escapeRegExp=da,n.every=Xr,n.find=iu,n.findIndex=Wo,n.findKey=Iu,n.findLast=au,n.findLastIndex=Ho,n.findLastKey=Nu,n.findWhere=Qr,n.first=xr,n.floor=ns,n.get=Ki,n.gt=ki,n.gte=Ai,n.has=Qi,n.identity=Da,n.includes=Jr,n.indexOf=Ar,n.inRange=ua,n.isArguments=Ei,n.isArray=Tu,n.isBoolean=Mi,n.isDate=Di,n.isElement=Si,n.isEmpty=Ti,n.isEqual=Ci,n.isError=Fi,n.isFinite=Oi,n.isFunction=Li,n.isMatch=Ni,n.isNaN=Pi,n.isNative=Bi,n.isNull=Ri,n.isNumber=ji,n.isObject=Ii,n.isPlainObject=Yi,n.isRegExp=Ui,n.isString=$i,n.isTypedArray=zi,n.isUndefined=qi,n.kebabCase=Hu,n.last=Mr,n.lastIndexOf=Dr,n.lt=Wi,n.lte=Hi,n.max=es,n.min=rs,n.noConflict=Fa,n.noop=Oa,n.now=gu,n.pad=pa,n.padLeft=Gu,n.padRight=Vu,n.parseInt=ga,n.random=sa,n.reduce=fu,n.reduceRight=du,n.repeat=ya,n.result=ea,n.round=is,n.runInContext=A,n.size=ai,n.snakeCase=Zu,n.some=oi,n.sortedIndex=Zo,n.sortedLastIndex=Xo,n.startCase=Xu,n.startsWith=ma,n.sum=ja,n.template=va,n.trim=_a,n.trimLeft=ba,n.trimRight=xa,n.trunc=wa,n.unescape=ka,n.uniqueId=Ba,n.words=Aa,n.all=Xr,n.any=oi,n.contains=Jr,n.eq=Ci,n.detect=iu,n.foldl=fu,n.foldr=du,n.head=xr,n.include=Jr,n.inject=fu,Ca(n,function(){var t={};return On(n,function(e,r){n.prototype[r]||(t[r]=e)}),t}(),!1),n.sample=ri,n.prototype.sample=function(t){return this.__chain__||null!=t?this.thru(function(n){return ri(n,t)}):ri(this.value())},n.VERSION=M,nn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){n[t].placeholder=n}),nn(["drop","take"],function(t,n){K.prototype[t]=function(e){var r=this.__filtered__;if(r&&!n)return new K(this);e=null==e?1:wo(vo(e)||0,0);var i=this.clone();return r?i.__takeCount__=ko(i.__takeCount__,e):i.__views__.push({size:e,type:t+(i.__dir__<0?"Right":"")}),i},K.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),nn(["filter","map","takeWhile"],function(t,n){var e=n+1,r=e!=$;K.prototype[t]=function(t,n){var i=this.clone();return i.__iteratees__.push({iteratee:Ue(t,n,1),type:e}),i.__filtered__=i.__filtered__||r,i}}),nn(["first","last"],function(t,n){var e="take"+(n?"Right":"");K.prototype[t]=function(){return this[e](1).value()[0]}}),nn(["initial","rest"],function(t,n){var e="drop"+(n?"":"Right");K.prototype[t]=function(){return this.__filtered__?new K(this):this[e](1)}}),nn(["pluck","where"],function(t,n){var e=n?"filter":"map",r=n?Yn:La;K.prototype[t]=function(t){return this[e](r(t))}}),K.prototype.compact=function(){return this.filter(Da)},K.prototype.reject=function(t,n){return t=Ue(t,n,1),this.filter(function(n){return!t(n)})},K.prototype.slice=function(t,n){t=null==t?0:+t||0;var e=this;return e.__filtered__&&(t>0||0>n)?new K(e):(0>t?e=e.takeRight(-t):t&&(e=e.drop(t)),n!==E&&(n=+n||0,e=0>n?e.dropRight(-n):e.take(n-t)),e)},K.prototype.takeRightWhile=function(t,n){return this.reverse().takeWhile(t,n).reverse()},K.prototype.toArray=function(){return this.take(So)},On(K.prototype,function(t,e){var r=/^(?:filter|map|reject)|While$/.test(e),i=/^(?:first|last)$/.test(e),a=n[i?"take"+("last"==e?"Right":""):e];a&&(n.prototype[e]=function(){var n=i?[1]:arguments,e=this.__chain__,o=this.__wrapped__,u=!!this.__actions__.length,s=o instanceof K,c=n[0],l=s||Tu(o);l&&r&&"function"==typeof c&&1!=c.length&&(s=l=!1);var h=function(t){return i&&e?a(t,1)[0]:a.apply(E,ln([t],n))},f={func:zr,args:[h],thisArg:E},d=s&&!u;if(i&&!e)return d?(o=o.clone(),o.__actions__.push(f),t.call(o)):a.call(E,this.value())[0];if(!i&&l){o=d?o:new K(this);var p=t.apply(o,n);return p.__actions__.push(f),new v(p,e)}return this.thru(h)})}),nn(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(t){var e=(/^(?:replace|split)$/.test(t)?Qa:Xa)[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:join|pop|replace|shift)$/.test(t);n.prototype[t]=function(){var t=arguments;return i&&!this.__chain__?e.apply(this.value(),t):this[r](function(n){return e.apply(n,t)})}}),On(K.prototype,function(t,e){var r=n[e];if(r){var i=r.name,a=Io[i]||(Io[i]=[]);a.push({name:e,func:r})}}),Io[Oe(E,S).name]=[{name:"wrapper",func:E}],K.prototype.clone=nt,K.prototype.reverse=rt,K.prototype.value=qt,n.prototype.chain=qr,n.prototype.commit=Wr,n.prototype.concat=nu,n.prototype.plant=Hr,n.prototype.reverse=Gr,n.prototype.toString=Vr,n.prototype.run=n.prototype.toJSON=n.prototype.valueOf=n.prototype.value=Zr,n.prototype.collect=n.prototype.map,n.prototype.head=n.prototype.first,n.prototype.select=n.prototype.filter,n.prototype.tail=n.prototype.rest,n}var E,M="3.10.1",D=1,S=2,T=4,C=8,F=16,O=32,L=64,I=128,N=256,P=30,B="...",R=150,j=16,Y=200,U=1,$=2,z="Expected a function",q="__lodash_placeholder__",W="[object Arguments]",H="[object Array]",G="[object Boolean]",V="[object Date]",Z="[object Error]",X="[object Function]",K="[object Map]",Q="[object Number]",J="[object Object]",tt="[object RegExp]",nt="[object Set]",et="[object String]",rt="[object WeakMap]",it="[object ArrayBuffer]",at="[object Float32Array]",ot="[object Float64Array]",ut="[object Int8Array]",st="[object Int16Array]",ct="[object Int32Array]",lt="[object Uint8Array]",ht="[object Uint8ClampedArray]",ft="[object Uint16Array]",dt="[object Uint32Array]",pt=/\b__p \+= '';/g,gt=/\b(__p \+=) '' \+/g,yt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mt=/&(?:amp|lt|gt|quot|#39|#96);/g,vt=/[&<>"'`]/g,_t=RegExp(mt.source),bt=RegExp(vt.source),xt=/<%-([\s\S]+?)%>/g,wt=/<%([\s\S]+?)%>/g,kt=/<%=([\s\S]+?)%>/g,At=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,Et=/^\w*$/,Mt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,Dt=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,St=RegExp(Dt.source),Tt=/[\u0300-\u036f\ufe20-\ufe23]/g,Ct=/\\(\\)?/g,Ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ot=/\w*$/,Lt=/^0[xX]/,It=/^\[object .+?Constructor\]$/,Nt=/^\d+$/,Pt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Bt=/($^)/,Rt=/['\n\r\u2028\u2029\\]/g,jt=function(){var t="[A-Z\\xc0-\\xd6\\xd8-\\xde]",n="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(t+"+(?="+t+n+")|"+t+"?"+n+"|"+t+"+|[0-9]+","g")}(),Yt=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],Ut=-1,$t={};$t[at]=$t[ot]=$t[ut]=$t[st]=$t[ct]=$t[lt]=$t[ht]=$t[ft]=$t[dt]=!0,$t[W]=$t[H]=$t[it]=$t[G]=$t[V]=$t[Z]=$t[X]=$t[K]=$t[Q]=$t[J]=$t[tt]=$t[nt]=$t[et]=$t[rt]=!1;var zt={};zt[W]=zt[H]=zt[it]=zt[G]=zt[V]=zt[at]=zt[ot]=zt[ut]=zt[st]=zt[ct]=zt[Q]=zt[J]=zt[tt]=zt[et]=zt[lt]=zt[ht]=zt[ft]=zt[dt]=!0,zt[Z]=zt[X]=zt[K]=zt[nt]=zt[rt]=!1;var qt={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Wt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Ht={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Gt={"function":!0,object:!0},Vt={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Zt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Xt=Gt[typeof e]&&e&&!e.nodeType&&e,Kt=Gt[typeof n]&&n&&!n.nodeType&&n,Qt=Xt&&Kt&&"object"==typeof t&&t&&t.Object&&t,Jt=Gt[typeof self]&&self&&self.Object&&self,tn=Gt[typeof window]&&window&&window.Object&&window,nn=Kt&&Kt.exports===Xt&&Xt,en=Qt||tn!==(this&&this.window)&&tn||Jt||this,rn=A();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(en._=rn,define(function(){return rn})):Xt&&Kt?nn?(Kt.exports=rn)._=rn:Xt._=rn:en._=rn}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],84:[function(t,n,e){!function(t,r){"object"==typeof e&&"undefined"!=typeof n?n.exports=r():"function"==typeof define&&define.amd?define(r):t.moment=r()}(this,function(){"use strict";function e(){return Pe.apply(null,arguments)}function r(t){Pe=t}function i(t){return"[object Array]"===Object.prototype.toString.call(t)}function a(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function o(t,n){var e,r=[];for(e=0;e<t.length;++e)r.push(n(t[e],e));return r}function u(t,n){return Object.prototype.hasOwnProperty.call(t,n)}function s(t,n){for(var e in n)u(n,e)&&(t[e]=n[e]);return u(n,"toString")&&(t.toString=n.toString),u(n,"valueOf")&&(t.valueOf=n.valueOf),t}function c(t,n,e,r){return Ct(t,n,e,r,!0).utc()}function l(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function h(t){return null==t._pf&&(t._pf=l()),t._pf}function f(t){if(null==t._isValid){var n=h(t);t._isValid=!(isNaN(t._d.getTime())||!(n.overflow<0)||n.empty||n.invalidMonth||n.invalidWeekday||n.nullInput||n.invalidFormat||n.userInvalidated),t._strict&&(t._isValid=t._isValid&&0===n.charsLeftOver&&0===n.unusedTokens.length&&void 0===n.bigHour)}return t._isValid}function d(t){var n=c(0/0);return null!=t?s(h(n),t):h(n).userInvalidated=!0,n}function p(t,n){var e,r,i;if("undefined"!=typeof n._isAMomentObject&&(t._isAMomentObject=n._isAMomentObject),"undefined"!=typeof n._i&&(t._i=n._i),"undefined"!=typeof n._f&&(t._f=n._f),"undefined"!=typeof n._l&&(t._l=n._l),"undefined"!=typeof n._strict&&(t._strict=n._strict),"undefined"!=typeof n._tzm&&(t._tzm=n._tzm),"undefined"!=typeof n._isUTC&&(t._isUTC=n._isUTC),"undefined"!=typeof n._offset&&(t._offset=n._offset),"undefined"!=typeof n._pf&&(t._pf=h(n)),"undefined"!=typeof n._locale&&(t._locale=n._locale),Re.length>0)for(e in Re)r=Re[e],i=n[r],"undefined"!=typeof i&&(t[r]=i);return t}function g(t){p(this,t),this._d=new Date(null!=t._d?t._d.getTime():0/0),je===!1&&(je=!0,e.updateOffset(this),je=!1)}function y(t){return t instanceof g||null!=t&&null!=t._isAMomentObject}function m(t){return 0>t?Math.ceil(t):Math.floor(t)}function v(t){var n=+t,e=0;return 0!==n&&isFinite(n)&&(e=m(n)),e}function _(t,n,e){var r,i=Math.min(t.length,n.length),a=Math.abs(t.length-n.length),o=0;for(r=0;i>r;r++)(e&&t[r]!==n[r]||!e&&v(t[r])!==v(n[r]))&&o++;return o+a}function b(){}function x(t){return t?t.toLowerCase().replace("_","-"):t}function w(t){for(var n,e,r,i,a=0;a<t.length;){for(i=x(t[a]).split("-"),n=i.length,e=x(t[a+1]),e=e?e.split("-"):null;n>0;){if(r=k(i.slice(0,n).join("-")))return r;if(e&&e.length>=n&&_(i,e,!0)>=n-1)break;n--}a++}return null}function k(e){var r=null;if(!Ye[e]&&"undefined"!=typeof n&&n&&n.exports)try{r=Be._abbr,t("./locale/"+e),A(r)}catch(i){}return Ye[e]}function A(t,n){var e;return t&&(e="undefined"==typeof n?M(t):E(t,n),e&&(Be=e)),Be._abbr}function E(t,n){return null!==n?(n.abbr=t,Ye[t]=Ye[t]||new b,Ye[t].set(n),A(t),Ye[t]):(delete Ye[t],null)}function M(t){var n;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Be;if(!i(t)){if(n=k(t))return n;t=[t]}return w(t)}function D(t,n){var e=t.toLowerCase();Ue[e]=Ue[e+"s"]=Ue[n]=t}function S(t){return"string"==typeof t?Ue[t]||Ue[t.toLowerCase()]:void 0}function T(t){var n,e,r={};for(e in t)u(t,e)&&(n=S(e),n&&(r[n]=t[e]));return r}function C(t,n){return function(r){return null!=r?(O(this,t,r),e.updateOffset(this,n),this):F(this,t)}}function F(t,n){return t._d["get"+(t._isUTC?"UTC":"")+n]()}function O(t,n,e){return t._d["set"+(t._isUTC?"UTC":"")+n](e)}function L(t,n){var e;if("object"==typeof t)for(e in t)this.set(e,t[e]);else if(t=S(t),"function"==typeof this[t])return this[t](n);return this}function I(t,n,e){var r=""+Math.abs(t),i=n-r.length,a=t>=0;return(a?e?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}function N(t,n,e,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&(We[t]=i),n&&(We[n[0]]=function(){return I(i.apply(this,arguments),n[1],n[2])}),e&&(We[e]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function P(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function B(t){var n,e,r=t.match($e);for(n=0,e=r.length;e>n;n++)r[n]=We[r[n]]?We[r[n]]:P(r[n]);return function(i){var a="";for(n=0;e>n;n++)a+=r[n]instanceof Function?r[n].call(i,t):r[n];return a}}function R(t,n){return t.isValid()?(n=j(n,t.localeData()),qe[n]=qe[n]||B(n),qe[n](t)):t.localeData().invalidDate()}function j(t,n){function e(t){return n.longDateFormat(t)||t}var r=5;for(ze.lastIndex=0;r>=0&&ze.test(t);)t=t.replace(ze,e),ze.lastIndex=0,r-=1;return t}function Y(t){return"function"==typeof t&&"[object Function]"===Object.prototype.toString.call(t)}function U(t,n,e){or[t]=Y(n)?n:function(t){return t&&e?e:n}}function $(t,n){return u(or,t)?or[t](n._strict,n._locale):new RegExp(z(t))}function z(t){return t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,e,r,i){return n||e||r||i}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function q(t,n){var e,r=n;for("string"==typeof t&&(t=[t]),"number"==typeof n&&(r=function(t,e){e[n]=v(t)}),e=0;e<t.length;e++)ur[t[e]]=r}function W(t,n){q(t,function(t,e,r,i){r._w=r._w||{},n(t,r._w,r,i)})}function H(t,n,e){null!=n&&u(ur,t)&&ur[t](n,e._a,e,t)}function G(t,n){return new Date(Date.UTC(t,n+1,0)).getUTCDate()}function V(t){return this._months[t.month()]}function Z(t){return this._monthsShort[t.month()]}function X(t,n,e){var r,i,a;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;12>r;r++){if(i=c([2e3,r]),e&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),e||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),e&&"MMMM"===n&&this._longMonthsParse[r].test(t))return r;if(e&&"MMM"===n&&this._shortMonthsParse[r].test(t))return r;if(!e&&this._monthsParse[r].test(t))return r}}function K(t,n){var e;return"string"==typeof n&&(n=t.localeData().monthsParse(n),"number"!=typeof n)?t:(e=Math.min(t.date(),G(t.year(),n)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](n,e),t)}function Q(t){return null!=t?(K(this,t),e.updateOffset(this,!0),this):F(this,"Month")}function J(){return G(this.year(),this.month())}function tt(t){var n,e=t._a;return e&&-2===h(t).overflow&&(n=e[cr]<0||e[cr]>11?cr:e[lr]<1||e[lr]>G(e[sr],e[cr])?lr:e[hr]<0||e[hr]>24||24===e[hr]&&(0!==e[fr]||0!==e[dr]||0!==e[pr])?hr:e[fr]<0||e[fr]>59?fr:e[dr]<0||e[dr]>59?dr:e[pr]<0||e[pr]>999?pr:-1,h(t)._overflowDayOfYear&&(sr>n||n>lr)&&(n=lr),h(t).overflow=n),t}function nt(t){e.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function et(t,n){var e=!0;return s(function(){return e&&(nt(t+"\n"+(new Error).stack),e=!1),n.apply(this,arguments)},n)}function rt(t,n){mr[t]||(nt(n),mr[t]=!0)}function it(t){var n,e,r=t._i,i=vr.exec(r);if(i){for(h(t).iso=!0,n=0,e=_r.length;e>n;n++)if(_r[n][1].exec(r)){t._f=_r[n][0];break}for(n=0,e=br.length;e>n;n++)if(br[n][1].exec(r)){t._f+=(i[6]||" ")+br[n][0];break}r.match(rr)&&(t._f+="Z"),kt(t)}else t._isValid=!1}function at(t){var n=xr.exec(t._i);return null!==n?void(t._d=new Date(+n[1])):(it(t),void(t._isValid===!1&&(delete t._isValid,e.createFromInputFallback(t))))}function ot(t,n,e,r,i,a,o){var u=new Date(t,n,e,r,i,a,o);return 1970>t&&u.setFullYear(t),u}function ut(t){var n=new Date(Date.UTC.apply(null,arguments));return 1970>t&&n.setUTCFullYear(t),n}function st(t){return ct(t)?366:365}function ct(t){return t%4===0&&t%100!==0||t%400===0}function lt(){return ct(this.year())}function ht(t,n,e){var r,i=e-n,a=e-t.day();return a>i&&(a-=7),i-7>a&&(a+=7),r=Ft(t).add(a,"d"),{week:Math.ceil(r.dayOfYear()/7),year:r.year()}}function ft(t){return ht(t,this._week.dow,this._week.doy).week}function dt(){return this._week.dow}function pt(){return this._week.doy}function gt(t){var n=this.localeData().week(this);return null==t?n:this.add(7*(t-n),"d")}function yt(t){var n=ht(this,1,4).week;return null==t?n:this.add(7*(t-n),"d")}function mt(t,n,e,r,i){var a,o=6+i-r,u=ut(t,0,1+o),s=u.getUTCDay();return i>s&&(s+=7),e=null!=e?1*e:i,a=1+o+7*(n-1)-s+e,{year:a>0?t:t-1,dayOfYear:a>0?a:st(t-1)+a}}function vt(t){var n=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?n:this.add(t-n,"d")}function _t(t,n,e){return null!=t?t:null!=n?n:e}function bt(t){var n=new Date;return t._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function xt(t){var n,e,r,i,a=[];if(!t._d){for(r=bt(t),t._w&&null==t._a[lr]&&null==t._a[cr]&&wt(t),t._dayOfYear&&(i=_t(t._a[sr],r[sr]),t._dayOfYear>st(i)&&(h(t)._overflowDayOfYear=!0),e=ut(i,0,t._dayOfYear),t._a[cr]=e.getUTCMonth(),t._a[lr]=e.getUTCDate()),n=0;3>n&&null==t._a[n];++n)t._a[n]=a[n]=r[n];for(;7>n;n++)t._a[n]=a[n]=null==t._a[n]?2===n?1:0:t._a[n];24===t._a[hr]&&0===t._a[fr]&&0===t._a[dr]&&0===t._a[pr]&&(t._nextDay=!0,t._a[hr]=0),t._d=(t._useUTC?ut:ot).apply(null,a),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[hr]=24)}}function wt(t){var n,e,r,i,a,o,u;n=t._w,null!=n.GG||null!=n.W||null!=n.E?(a=1,o=4,e=_t(n.GG,t._a[sr],ht(Ft(),1,4).year),r=_t(n.W,1),i=_t(n.E,1)):(a=t._locale._week.dow,o=t._locale._week.doy,e=_t(n.gg,t._a[sr],ht(Ft(),a,o).year),r=_t(n.w,1),null!=n.d?(i=n.d,a>i&&++r):i=null!=n.e?n.e+a:a),u=mt(e,r,i,o,a),t._a[sr]=u.year,t._dayOfYear=u.dayOfYear}function kt(t){if(t._f===e.ISO_8601)return void it(t);t._a=[],h(t).empty=!0;var n,r,i,a,o,u=""+t._i,s=u.length,c=0;for(i=j(t._f,t._locale).match($e)||[],n=0;n<i.length;n++)a=i[n],r=(u.match($(a,t))||[])[0],r&&(o=u.substr(0,u.indexOf(r)),o.length>0&&h(t).unusedInput.push(o),u=u.slice(u.indexOf(r)+r.length),c+=r.length),We[a]?(r?h(t).empty=!1:h(t).unusedTokens.push(a),H(a,r,t)):t._strict&&!r&&h(t).unusedTokens.push(a);h(t).charsLeftOver=s-c,u.length>0&&h(t).unusedInput.push(u),h(t).bigHour===!0&&t._a[hr]<=12&&t._a[hr]>0&&(h(t).bigHour=void 0),t._a[hr]=At(t._locale,t._a[hr],t._meridiem),xt(t),tt(t)}function At(t,n,e){var r;return null==e?n:null!=t.meridiemHour?t.meridiemHour(n,e):null!=t.isPM?(r=t.isPM(e),r&&12>n&&(n+=12),r||12!==n||(n=0),n):n}function Et(t){var n,e,r,i,a;if(0===t._f.length)return h(t).invalidFormat=!0,void(t._d=new Date(0/0));for(i=0;i<t._f.length;i++)a=0,n=p({},t),null!=t._useUTC&&(n._useUTC=t._useUTC),n._f=t._f[i],kt(n),f(n)&&(a+=h(n).charsLeftOver,a+=10*h(n).unusedTokens.length,h(n).score=a,(null==r||r>a)&&(r=a,e=n));s(t,e||n)}function Mt(t){if(!t._d){var n=T(t._i);t._a=[n.year,n.month,n.day||n.date,n.hour,n.minute,n.second,n.millisecond],xt(t)}}function Dt(t){var n=new g(tt(St(t)));return n._nextDay&&(n.add(1,"d"),n._nextDay=void 0),n}function St(t){var n=t._i,e=t._f;return t._locale=t._locale||M(t._l),null===n||void 0===e&&""===n?d({nullInput:!0}):("string"==typeof n&&(t._i=n=t._locale.preparse(n)),y(n)?new g(tt(n)):(i(e)?Et(t):e?kt(t):a(n)?t._d=n:Tt(t),t))}function Tt(t){var n=t._i;void 0===n?t._d=new Date:a(n)?t._d=new Date(+n):"string"==typeof n?at(t):i(n)?(t._a=o(n.slice(0),function(t){return parseInt(t,10)}),xt(t)):"object"==typeof n?Mt(t):"number"==typeof n?t._d=new Date(n):e.createFromInputFallback(t)}function Ct(t,n,e,r,i){var a={};return"boolean"==typeof e&&(r=e,e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=e,a._i=t,a._f=n,a._strict=r,Dt(a)}function Ft(t,n,e,r){return Ct(t,n,e,r,!1)}function Ot(t,n){var e,r;if(1===n.length&&i(n[0])&&(n=n[0]),!n.length)return Ft();for(e=n[0],r=1;r<n.length;++r)(!n[r].isValid()||n[r][t](e))&&(e=n[r]);return e}function Lt(){var t=[].slice.call(arguments,0);return Ot("isBefore",t)}function It(){var t=[].slice.call(arguments,0);return Ot("isAfter",t)}function Nt(t){var n=T(t),e=n.year||0,r=n.quarter||0,i=n.month||0,a=n.week||0,o=n.day||0,u=n.hour||0,s=n.minute||0,c=n.second||0,l=n.millisecond||0;this._milliseconds=+l+1e3*c+6e4*s+36e5*u,this._days=+o+7*a,this._months=+i+3*r+12*e,this._data={},this._locale=M(),this._bubble()}function Pt(t){return t instanceof Nt}function Bt(t,n){N(t,0,0,function(){var t=this.utcOffset(),e="+";return 0>t&&(t=-t,e="-"),e+I(~~(t/60),2)+n+I(~~t%60,2)})}function Rt(t){var n=(t||"").match(rr)||[],e=n[n.length-1]||[],r=(e+"").match(Mr)||["-",0,0],i=+(60*r[1])+v(r[2]);return"+"===r[0]?i:-i}function jt(t,n){var r,i;return n._isUTC?(r=n.clone(),i=(y(t)||a(t)?+t:+Ft(t))-+r,r._d.setTime(+r._d+i),e.updateOffset(r,!1),r):Ft(t).local()}function Yt(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Ut(t,n){var r,i=this._offset||0;return null!=t?("string"==typeof t&&(t=Rt(t)),Math.abs(t)<16&&(t=60*t),!this._isUTC&&n&&(r=Yt(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==t&&(!n||this._changeInProgress?rn(this,Qt(t-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?i:Yt(this)}function $t(t,n){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,n),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(Yt(this),"m")),this}function Wt(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Rt(this._i)),this}function Ht(t){return t=t?Ft(t).utcOffset():0,(this.utcOffset()-t)%60===0}function Gt(){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=St(t),t._a){var n=t._isUTC?c(t._a):Ft(t._a);this._isDSTShifted=this.isValid()&&_(t._a,n.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Zt(){return!this._isUTC}function Xt(){return this._isUTC}function Kt(){return this._isUTC&&0===this._offset}function Qt(t,n){var e,r,i,a=t,o=null;return Pt(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(a={},n?a[n]=t:a.milliseconds=t):(o=Dr.exec(t))?(e="-"===o[1]?-1:1,a={y:0,d:v(o[lr])*e,h:v(o[hr])*e,m:v(o[fr])*e,s:v(o[dr])*e,ms:v(o[pr])*e}):(o=Sr.exec(t))?(e="-"===o[1]?-1:1,a={y:Jt(o[2],e),M:Jt(o[3],e),d:Jt(o[4],e),h:Jt(o[5],e),m:Jt(o[6],e),s:Jt(o[7],e),w:Jt(o[8],e)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=nn(Ft(a.from),Ft(a.to)),a={},a.ms=i.milliseconds,a.M=i.months),r=new Nt(a),Pt(t)&&u(t,"_locale")&&(r._locale=t._locale),r}function Jt(t,n){var e=t&&parseFloat(t.replace(",","."));return(isNaN(e)?0:e)*n}function tn(t,n){var e={milliseconds:0,months:0};return e.months=n.month()-t.month()+12*(n.year()-t.year()),t.clone().add(e.months,"M").isAfter(n)&&--e.months,e.milliseconds=+n-+t.clone().add(e.months,"M"),e}function nn(t,n){var e;return n=jt(n,t),t.isBefore(n)?e=tn(t,n):(e=tn(n,t),e.milliseconds=-e.milliseconds,e.months=-e.months),e}function en(t,n){return function(e,r){var i,a;return null===r||isNaN(+r)||(rt(n,"moment()."+n+"(period, number) is deprecated. Please use moment()."+n+"(number, period)."),a=e,e=r,r=a),e="string"==typeof e?+e:e,i=Qt(e,r),rn(this,i,t),this}}function rn(t,n,r,i){var a=n._milliseconds,o=n._days,u=n._months;i=null==i?!0:i,a&&t._d.setTime(+t._d+a*r),o&&O(t,"Date",F(t,"Date")+o*r),u&&K(t,F(t,"Month")+u*r),i&&e.updateOffset(t,o||u)}function an(t,n){var e=t||Ft(),r=jt(e,this).startOf("day"),i=this.diff(r,"days",!0),a=-6>i?"sameElse":-1>i?"lastWeek":0>i?"lastDay":1>i?"sameDay":2>i?"nextDay":7>i?"nextWeek":"sameElse";return this.format(n&&n[a]||this.localeData().calendar(a,this,Ft(e)))}function on(){return new g(this)}function un(t,n){var e;return n=S("undefined"!=typeof n?n:"millisecond"),"millisecond"===n?(t=y(t)?t:Ft(t),+this>+t):(e=y(t)?+t:+Ft(t),e<+this.clone().startOf(n))}function sn(t,n){var e;return n=S("undefined"!=typeof n?n:"millisecond"),"millisecond"===n?(t=y(t)?t:Ft(t),+t>+this):(e=y(t)?+t:+Ft(t),+this.clone().endOf(n)<e)}function cn(t,n,e){return this.isAfter(t,e)&&this.isBefore(n,e)}function ln(t,n){var e;return n=S(n||"millisecond"),"millisecond"===n?(t=y(t)?t:Ft(t),+this===+t):(e=+Ft(t),+this.clone().startOf(n)<=e&&e<=+this.clone().endOf(n))}function hn(t,n,e){var r,i,a=jt(t,this),o=6e4*(a.utcOffset()-this.utcOffset());return n=S(n),"year"===n||"month"===n||"quarter"===n?(i=fn(this,a),"quarter"===n?i/=3:"year"===n&&(i/=12)):(r=this-a,i="second"===n?r/1e3:"minute"===n?r/6e4:"hour"===n?r/36e5:"day"===n?(r-o)/864e5:"week"===n?(r-o)/6048e5:r),e?i:m(i)}function fn(t,n){var e,r,i=12*(n.year()-t.year())+(n.month()-t.month()),a=t.clone().add(i,"months");return 0>n-a?(e=t.clone().add(i-1,"months"),r=(n-a)/(a-e)):(e=t.clone().add(i+1,"months"),r=(n-a)/(e-a)),-(i+r)}function dn(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function pn(){var t=this.clone().utc();return 0<t.year()&&t.year()<=9999?"function"==typeof Date.prototype.toISOString?this.toDate().toISOString():R(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):R(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function gn(t){var n=R(this,t||e.defaultFormat);return this.localeData().postformat(n)}function yn(t,n){return this.isValid()?Qt({to:this,from:t}).locale(this.locale()).humanize(!n):this.localeData().invalidDate()}function mn(t){return this.from(Ft(),t)}function vn(t,n){return this.isValid()?Qt({from:this,to:t}).locale(this.locale()).humanize(!n):this.localeData().invalidDate()}function _n(t){return this.to(Ft(),t)}function bn(t){var n;return void 0===t?this._locale._abbr:(n=M(t),null!=n&&(this._locale=n),this)}function xn(){return this._locale}function wn(t){switch(t=S(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this}function kn(t){return t=S(t),void 0===t||"millisecond"===t?this:this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms")}function An(){return+this._d-6e4*(this._offset||0)}function En(){return Math.floor(+this/1e3)}function Mn(){return this._offset?new Date(+this):this._d}function Dn(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Sn(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function Tn(){return f(this)}function Cn(){return s({},h(this))}function Fn(){return h(this).overflow}function On(t,n){N(0,[t,t.length],0,n)}function Ln(t,n,e){return ht(Ft([t,11,31+n-e]),n,e).week}function In(t){var n=ht(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==t?n:this.add(t-n,"y")}function Nn(t){var n=ht(this,1,4).year;return null==t?n:this.add(t-n,"y")}function Pn(){return Ln(this.year(),1,4)}function Bn(){var t=this.localeData()._week;return Ln(this.year(),t.dow,t.doy)}function Rn(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function jn(t,n){return"string"!=typeof t?t:isNaN(t)?(t=n.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function Yn(t){return this._weekdays[t.day()]}function Un(t){return this._weekdaysShort[t.day()]}function $n(t){return this._weekdaysMin[t.day()]}function zn(t){var n,e,r;for(this._weekdaysParse=this._weekdaysParse||[],n=0;7>n;n++)if(this._weekdaysParse[n]||(e=Ft([2e3,1]).day(n),r="^"+this.weekdays(e,"")+"|^"+this.weekdaysShort(e,"")+"|^"+this.weekdaysMin(e,""),this._weekdaysParse[n]=new RegExp(r.replace(".",""),"i")),this._weekdaysParse[n].test(t))return n}function qn(t){var n=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=jn(t,this.localeData()),this.add(t-n,"d")):n}function Wn(t){var n=(this.day()+7-this.localeData()._week.dow)%7;return null==t?n:this.add(t-n,"d")}function Hn(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)}function Gn(t,n){N(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),n)})}function Vn(t,n){return n._meridiemParse}function Zn(t){return"p"===(t+"").toLowerCase().charAt(0)}function Xn(t,n,e){return t>11?e?"pm":"PM":e?"am":"AM"}function Kn(t,n){n[pr]=v(1e3*("0."+t))}function Qn(){return this._isUTC?"UTC":""}function Jn(){return this._isUTC?"Coordinated Universal Time":""}function te(t){return Ft(1e3*t)}function ne(){return Ft.apply(null,arguments).parseZone()}function ee(t,n,e){var r=this._calendar[t];return"function"==typeof r?r.call(n,e):r}function re(t){var n=this._longDateFormat[t],e=this._longDateFormat[t.toUpperCase()];return n||!e?n:(this._longDateFormat[t]=e.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])}function ie(){return this._invalidDate}function ae(t){return this._ordinal.replace("%d",t)}function oe(t){return t}function ue(t,n,e,r){var i=this._relativeTime[e];return"function"==typeof i?i(t,n,e,r):i.replace(/%d/i,t)}function se(t,n){var e=this._relativeTime[t>0?"future":"past"];return"function"==typeof e?e(n):e.replace(/%s/i,n)}function ce(t){var n,e;for(e in t)n=t[e],"function"==typeof n?this[e]=n:this["_"+e]=n;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function le(t,n,e,r){var i=M(),a=c().set(r,n);return i[e](a,t)}function he(t,n,e,r,i){if("number"==typeof t&&(n=t,t=void 0),t=t||"",null!=n)return le(t,n,e,i);var a,o=[];for(a=0;r>a;a++)o[a]=le(t,a,e,i);return o}function fe(t,n){return he(t,n,"months",12,"month")}function de(t,n){return he(t,n,"monthsShort",12,"month")}function pe(t,n){
|
||
return he(t,n,"weekdays",7,"day")}function ge(t,n){return he(t,n,"weekdaysShort",7,"day")}function ye(t,n){return he(t,n,"weekdaysMin",7,"day")}function me(){var t=this._data;return this._milliseconds=Kr(this._milliseconds),this._days=Kr(this._days),this._months=Kr(this._months),t.milliseconds=Kr(t.milliseconds),t.seconds=Kr(t.seconds),t.minutes=Kr(t.minutes),t.hours=Kr(t.hours),t.months=Kr(t.months),t.years=Kr(t.years),this}function ve(t,n,e,r){var i=Qt(n,e);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function _e(t,n){return ve(this,t,n,1)}function be(t,n){return ve(this,t,n,-1)}function xe(t){return 0>t?Math.floor(t):Math.ceil(t)}function we(){var t,n,e,r,i,a=this._milliseconds,o=this._days,u=this._months,s=this._data;return a>=0&&o>=0&&u>=0||0>=a&&0>=o&&0>=u||(a+=864e5*xe(Ae(u)+o),o=0,u=0),s.milliseconds=a%1e3,t=m(a/1e3),s.seconds=t%60,n=m(t/60),s.minutes=n%60,e=m(n/60),s.hours=e%24,o+=m(e/24),i=m(ke(o)),u+=i,o-=xe(Ae(i)),r=m(u/12),u%=12,s.days=o,s.months=u,s.years=r,this}function ke(t){return 4800*t/146097}function Ae(t){return 146097*t/4800}function Ee(t){var n,e,r=this._milliseconds;if(t=S(t),"month"===t||"year"===t)return n=this._days+r/864e5,e=this._months+ke(n),"month"===t?e:e/12;switch(n=this._days+Math.round(Ae(this._months)),t){case"week":return n/7+r/6048e5;case"day":return n+r/864e5;case"hour":return 24*n+r/36e5;case"minute":return 1440*n+r/6e4;case"second":return 86400*n+r/1e3;case"millisecond":return Math.floor(864e5*n)+r;default:throw new Error("Unknown unit "+t)}}function Me(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*v(this._months/12)}function De(t){return function(){return this.as(t)}}function Se(t){return t=S(t),this[t+"s"]()}function Te(t){return function(){return this._data[t]}}function Ce(){return m(this.days()/7)}function Fe(t,n,e,r,i){return i.relativeTime(n||1,!!e,t,r)}function Oe(t,n,e){var r=Qt(t).abs(),i=di(r.as("s")),a=di(r.as("m")),o=di(r.as("h")),u=di(r.as("d")),s=di(r.as("M")),c=di(r.as("y")),l=i<pi.s&&["s",i]||1===a&&["m"]||a<pi.m&&["mm",a]||1===o&&["h"]||o<pi.h&&["hh",o]||1===u&&["d"]||u<pi.d&&["dd",u]||1===s&&["M"]||s<pi.M&&["MM",s]||1===c&&["y"]||["yy",c];return l[2]=n,l[3]=+t>0,l[4]=e,Fe.apply(null,l)}function Le(t,n){return void 0===pi[t]?!1:void 0===n?pi[t]:(pi[t]=n,!0)}function Ie(t){var n=this.localeData(),e=Oe(this,!t,n);return t&&(e=n.pastFuture(+this,e)),n.postformat(e)}function Ne(){var t,n,e,r=gi(this._milliseconds)/1e3,i=gi(this._days),a=gi(this._months);t=m(r/60),n=m(t/60),r%=60,t%=60,e=m(a/12),a%=12;var o=e,u=a,s=i,c=n,l=t,h=r,f=this.asSeconds();return f?(0>f?"-":"")+"P"+(o?o+"Y":"")+(u?u+"M":"")+(s?s+"D":"")+(c||l||h?"T":"")+(c?c+"H":"")+(l?l+"M":"")+(h?h+"S":""):"P0D"}var Pe,Be,Re=e.momentProperties=[],je=!1,Ye={},Ue={},$e=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ze=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,qe={},We={},He=/\d/,Ge=/\d\d/,Ve=/\d{3}/,Ze=/\d{4}/,Xe=/[+-]?\d{6}/,Ke=/\d\d?/,Qe=/\d{1,3}/,Je=/\d{1,4}/,tr=/[+-]?\d{1,6}/,nr=/\d+/,er=/[+-]?\d+/,rr=/Z|[+-]\d\d:?\d\d/gi,ir=/[+-]?\d+(\.\d{1,3})?/,ar=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,or={},ur={},sr=0,cr=1,lr=2,hr=3,fr=4,dr=5,pr=6;N("M",["MM",2],"Mo",function(){return this.month()+1}),N("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),N("MMMM",0,0,function(t){return this.localeData().months(this,t)}),D("month","M"),U("M",Ke),U("MM",Ke,Ge),U("MMM",ar),U("MMMM",ar),q(["M","MM"],function(t,n){n[cr]=v(t)-1}),q(["MMM","MMMM"],function(t,n,e,r){var i=e._locale.monthsParse(t,r,e._strict);null!=i?n[cr]=i:h(e).invalidMonth=t});var gr="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),yr="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),mr={};e.suppressDeprecationWarnings=!1;var vr=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_r=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],br=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],xr=/^\/?Date\((\-?\d+)/i;e.createFromInputFallback=et("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),N(0,["YY",2],0,function(){return this.year()%100}),N(0,["YYYY",4],0,"year"),N(0,["YYYYY",5],0,"year"),N(0,["YYYYYY",6,!0],0,"year"),D("year","y"),U("Y",er),U("YY",Ke,Ge),U("YYYY",Je,Ze),U("YYYYY",tr,Xe),U("YYYYYY",tr,Xe),q(["YYYYY","YYYYYY"],sr),q("YYYY",function(t,n){n[sr]=2===t.length?e.parseTwoDigitYear(t):v(t)}),q("YY",function(t,n){n[sr]=e.parseTwoDigitYear(t)}),e.parseTwoDigitYear=function(t){return v(t)+(v(t)>68?1900:2e3)};var wr=C("FullYear",!1);N("w",["ww",2],"wo","week"),N("W",["WW",2],"Wo","isoWeek"),D("week","w"),D("isoWeek","W"),U("w",Ke),U("ww",Ke,Ge),U("W",Ke),U("WW",Ke,Ge),W(["w","ww","W","WW"],function(t,n,e,r){n[r.substr(0,1)]=v(t)});var kr={dow:0,doy:6};N("DDD",["DDDD",3],"DDDo","dayOfYear"),D("dayOfYear","DDD"),U("DDD",Qe),U("DDDD",Ve),q(["DDD","DDDD"],function(t,n,e){e._dayOfYear=v(t)}),e.ISO_8601=function(){};var Ar=et("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=Ft.apply(null,arguments);return this>t?this:t}),Er=et("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=Ft.apply(null,arguments);return t>this?this:t});Bt("Z",":"),Bt("ZZ",""),U("Z",rr),U("ZZ",rr),q(["Z","ZZ"],function(t,n,e){e._useUTC=!0,e._tzm=Rt(t)});var Mr=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var Dr=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Sr=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;Qt.fn=Nt.prototype;var Tr=en(1,"add"),Cr=en(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var Fr=et("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});N(0,["gg",2],0,function(){return this.weekYear()%100}),N(0,["GG",2],0,function(){return this.isoWeekYear()%100}),On("gggg","weekYear"),On("ggggg","weekYear"),On("GGGG","isoWeekYear"),On("GGGGG","isoWeekYear"),D("weekYear","gg"),D("isoWeekYear","GG"),U("G",er),U("g",er),U("GG",Ke,Ge),U("gg",Ke,Ge),U("GGGG",Je,Ze),U("gggg",Je,Ze),U("GGGGG",tr,Xe),U("ggggg",tr,Xe),W(["gggg","ggggg","GGGG","GGGGG"],function(t,n,e,r){n[r.substr(0,2)]=v(t)}),W(["gg","GG"],function(t,n,r,i){n[i]=e.parseTwoDigitYear(t)}),N("Q",0,0,"quarter"),D("quarter","Q"),U("Q",He),q("Q",function(t,n){n[cr]=3*(v(t)-1)}),N("D",["DD",2],"Do","date"),D("date","D"),U("D",Ke),U("DD",Ke,Ge),U("Do",function(t,n){return t?n._ordinalParse:n._ordinalParseLenient}),q(["D","DD"],lr),q("Do",function(t,n){n[lr]=v(t.match(Ke)[0],10)});var Or=C("Date",!0);N("d",0,"do","day"),N("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),N("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),N("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),N("e",0,0,"weekday"),N("E",0,0,"isoWeekday"),D("day","d"),D("weekday","e"),D("isoWeekday","E"),U("d",Ke),U("e",Ke),U("E",Ke),U("dd",ar),U("ddd",ar),U("dddd",ar),W(["dd","ddd","dddd"],function(t,n,e){var r=e._locale.weekdaysParse(t);null!=r?n.d=r:h(e).invalidWeekday=t}),W(["d","e","E"],function(t,n,e,r){n[r]=v(t)});var Lr="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ir="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Nr="Su_Mo_Tu_We_Th_Fr_Sa".split("_");N("H",["HH",2],0,"hour"),N("h",["hh",2],0,function(){return this.hours()%12||12}),Gn("a",!0),Gn("A",!1),D("hour","h"),U("a",Vn),U("A",Vn),U("H",Ke),U("h",Ke),U("HH",Ke,Ge),U("hh",Ke,Ge),q(["H","HH"],hr),q(["a","A"],function(t,n,e){e._isPm=e._locale.isPM(t),e._meridiem=t}),q(["h","hh"],function(t,n,e){n[hr]=v(t),h(e).bigHour=!0});var Pr=/[ap]\.?m?\.?/i,Br=C("Hours",!0);N("m",["mm",2],0,"minute"),D("minute","m"),U("m",Ke),U("mm",Ke,Ge),q(["m","mm"],fr);var Rr=C("Minutes",!1);N("s",["ss",2],0,"second"),D("second","s"),U("s",Ke),U("ss",Ke,Ge),q(["s","ss"],dr);var jr=C("Seconds",!1);N("S",0,0,function(){return~~(this.millisecond()/100)}),N(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),N(0,["SSS",3],0,"millisecond"),N(0,["SSSS",4],0,function(){return 10*this.millisecond()}),N(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),N(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),N(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),N(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),N(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),D("millisecond","ms"),U("S",Qe,He),U("SS",Qe,Ge),U("SSS",Qe,Ve);var Yr;for(Yr="SSSS";Yr.length<=9;Yr+="S")U(Yr,nr);for(Yr="S";Yr.length<=9;Yr+="S")q(Yr,Kn);var Ur=C("Milliseconds",!1);N("z",0,0,"zoneAbbr"),N("zz",0,0,"zoneName");var $r=g.prototype;$r.add=Tr,$r.calendar=an,$r.clone=on,$r.diff=hn,$r.endOf=kn,$r.format=gn,$r.from=yn,$r.fromNow=mn,$r.to=vn,$r.toNow=_n,$r.get=L,$r.invalidAt=Fn,$r.isAfter=un,$r.isBefore=sn,$r.isBetween=cn,$r.isSame=ln,$r.isValid=Tn,$r.lang=Fr,$r.locale=bn,$r.localeData=xn,$r.max=Er,$r.min=Ar,$r.parsingFlags=Cn,$r.set=L,$r.startOf=wn,$r.subtract=Cr,$r.toArray=Dn,$r.toObject=Sn,$r.toDate=Mn,$r.toISOString=pn,$r.toJSON=pn,$r.toString=dn,$r.unix=En,$r.valueOf=An,$r.year=wr,$r.isLeapYear=lt,$r.weekYear=In,$r.isoWeekYear=Nn,$r.quarter=$r.quarters=Rn,$r.month=Q,$r.daysInMonth=J,$r.week=$r.weeks=gt,$r.isoWeek=$r.isoWeeks=yt,$r.weeksInYear=Bn,$r.isoWeeksInYear=Pn,$r.date=Or,$r.day=$r.days=qn,$r.weekday=Wn,$r.isoWeekday=Hn,$r.dayOfYear=vt,$r.hour=$r.hours=Br,$r.minute=$r.minutes=Rr,$r.second=$r.seconds=jr,$r.millisecond=$r.milliseconds=Ur,$r.utcOffset=Ut,$r.utc=zt,$r.local=qt,$r.parseZone=Wt,$r.hasAlignedHourOffset=Ht,$r.isDST=Gt,$r.isDSTShifted=Vt,$r.isLocal=Zt,$r.isUtcOffset=Xt,$r.isUtc=Kt,$r.isUTC=Kt,$r.zoneAbbr=Qn,$r.zoneName=Jn,$r.dates=et("dates accessor is deprecated. Use date instead.",Or),$r.months=et("months accessor is deprecated. Use month instead",Q),$r.years=et("years accessor is deprecated. Use year instead",wr),$r.zone=et("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",$t);var zr=$r,qr={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Wr={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Hr="Invalid date",Gr="%d",Vr=/\d{1,2}/,Zr={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Xr=b.prototype;Xr._calendar=qr,Xr.calendar=ee,Xr._longDateFormat=Wr,Xr.longDateFormat=re,Xr._invalidDate=Hr,Xr.invalidDate=ie,Xr._ordinal=Gr,Xr.ordinal=ae,Xr._ordinalParse=Vr,Xr.preparse=oe,Xr.postformat=oe,Xr._relativeTime=Zr,Xr.relativeTime=ue,Xr.pastFuture=se,Xr.set=ce,Xr.months=V,Xr._months=gr,Xr.monthsShort=Z,Xr._monthsShort=yr,Xr.monthsParse=X,Xr.week=ft,Xr._week=kr,Xr.firstDayOfYear=pt,Xr.firstDayOfWeek=dt,Xr.weekdays=Yn,Xr._weekdays=Lr,Xr.weekdaysMin=$n,Xr._weekdaysMin=Nr,Xr.weekdaysShort=Un,Xr._weekdaysShort=Ir,Xr.weekdaysParse=zn,Xr.isPM=Zn,Xr._meridiemParse=Pr,Xr.meridiem=Xn,A("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var n=t%10,e=1===v(t%100/10)?"th":1===n?"st":2===n?"nd":3===n?"rd":"th";return t+e}}),e.lang=et("moment.lang is deprecated. Use moment.locale instead.",A),e.langData=et("moment.langData is deprecated. Use moment.localeData instead.",M);var Kr=Math.abs,Qr=De("ms"),Jr=De("s"),ti=De("m"),ni=De("h"),ei=De("d"),ri=De("w"),ii=De("M"),ai=De("y"),oi=Te("milliseconds"),ui=Te("seconds"),si=Te("minutes"),ci=Te("hours"),li=Te("days"),hi=Te("months"),fi=Te("years"),di=Math.round,pi={s:45,m:45,h:22,d:26,M:11},gi=Math.abs,yi=Nt.prototype;yi.abs=me,yi.add=_e,yi.subtract=be,yi.as=Ee,yi.asMilliseconds=Qr,yi.asSeconds=Jr,yi.asMinutes=ti,yi.asHours=ni,yi.asDays=ei,yi.asWeeks=ri,yi.asMonths=ii,yi.asYears=ai,yi.valueOf=Me,yi._bubble=we,yi.get=Se,yi.milliseconds=oi,yi.seconds=ui,yi.minutes=si,yi.hours=ci,yi.days=li,yi.weeks=Ce,yi.months=hi,yi.years=fi,yi.humanize=Ie,yi.toISOString=Ne,yi.toString=Ne,yi.toJSON=Ne,yi.locale=bn,yi.localeData=xn,yi.toIsoString=et("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ne),yi.lang=Fr,N("X",0,0,"unix"),N("x",0,0,"valueOf"),U("x",er),U("X",ir),q("X",function(t,n,e){e._d=new Date(1e3*parseFloat(t,10))}),q("x",function(t,n,e){e._d=new Date(v(t))}),e.version="2.10.6",r(Ft),e.fn=zr,e.min=Lt,e.max=It,e.utc=c,e.unix=te,e.months=fe,e.isDate=a,e.locale=A,e.invalid=d,e.duration=Qt,e.isMoment=y,e.weekdays=pe,e.parseZone=ne,e.localeData=M,e.isDuration=Pt,e.monthsShort=de,e.weekdaysMin=ye,e.defineLocale=E,e.weekdaysShort=ge,e.normalizeUnits=S,e.relativeTimeThreshold=Le;var mi=e;return mi})},{}],85:[function(t,n){n.exports={name:"mermaid",version:"0.5.4",description:"Markdownish syntax for generating flowcharts, sequence diagrams and gantt charts.",main:"src/mermaid.js",keywords:["diagram","markdown","flowchart","sequence diagram","gantt"],bin:{mermaid:"./bin/mermaid.js"},scripts:{live:"live-server ./test/examples",lint:"node node_modules/eslint/bin/eslint.js src",watch:"source ./scripts/watch.sh",doc:"rm -r build;rm -r dist/www;gulp vartree;cp dist/www/all.html ../mermaid-pages/index.html;cp dist/mermaid.js ../mermaid-pages/javascripts/lib;cp dist/mermaid.forest.css ../mermaid-pages/stylesheets",tape:"node node_modules/.bin/tape test/cli_test-*.js",jasmine:"node node_modules/jasmine-es6/bin/jasmine.js",test:"npm run dist && npm run jasmine && npm run tape","dist-slim-mermaid":"node node_modules/browserify/bin/cmd.js src/mermaid.js -t babelify -s mermaid -o dist/mermaid.slim.js -x d3 && cat dist/mermaid.slim.js | node node_modules/uglifyjs/bin/uglifyjs -mc > dist/mermaid.slim.min.js","dist-slim-mermaidAPI":"node node_modules/browserify/bin/cmd.js src/mermaidAPI.js -t babelify -s mermaidAPI -o dist/mermaidAPI.slim.js -x d3 && cat dist/mermaidAPI.slim.js | node node_modules/uglifyjs/bin/uglifyjs -mc > dist/mermaidAPI.slim.min.js","dist-mermaid":"node node_modules/browserify/bin/cmd.js src/mermaid.js -t babelify -s mermaid -o dist/mermaid.js && cat dist/mermaid.js | node node_modules/uglifyjs/bin/uglifyjs -mc > dist/mermaid.min.js","dist-mermaidAPI":"node node_modules/browserify/bin/cmd.js src/mermaidAPI.js -t babelify -s mermaidAPI -o dist/mermaidAPI.js && cat dist/mermaidAPI.js | node node_modules/uglifyjs/bin/uglifyjs -mc > dist/mermaidAPI.min.js",dist:"npm run dist-slim-mermaid;npm run dist-slim-mermaidAPI; npm run dist-mermaid;npm run dist-mermaidAPI"},repository:{type:"git",url:"https://github.com/knsv/mermaid"},author:"Knut Sveidqvist",license:"MIT",dependencies:{chalk:"^0.5.1",d3:"~3.5.6","dagre-d3":"~0.4.8",he:"^0.5.0",minimist:"^1.1.0",mkdirp:"^0.5.0",moment:"^2.9.0",semver:"^4.1.1",which:"^1.0.8"},devDependencies:{async:"^0.9.0","babel-eslint":"^4.1.3",babelify:"^6.3.0",browserify:"~6.2.0",clone:"^0.2.0","codeclimate-test-reporter":"0.0.4",dateformat:"^1.0.11",dox:"^0.8.0",eslint:"^1.6.0","eslint-watch":"^2.1.2","event-stream":"^3.2.0",foundation:"^4.2.1-1","front-matter":"^0.2.0",gulp:"~3.9.0","gulp-bower":"0.0.10","gulp-browserify":"^0.5.0","gulp-bump":"^0.1.11","gulp-concat":"~2.4.1","gulp-data":"^1.1.1","gulp-dox":"^0.1.6","gulp-ext-replace":"^0.2.0","gulp-filelog":"^0.4.1","gulp-front-matter":"^1.2.3","gulp-hogan":"^1.1.0","gulp-if":"^1.2.5","gulp-insert":"^0.4.0","gulp-istanbul":"^0.4.0","gulp-jasmine":"~2.1.0","gulp-jison":"~1.2.0","gulp-jshint":"^1.9.0","gulp-less":"^3.0.1","gulp-livereload":"^3.8.0","gulp-marked":"^1.0.0","gulp-mdvars":"^2.0.0","gulp-qunit":"~1.2.1","gulp-rename":"~1.2.0","gulp-shell":"^0.2.10","gulp-tag-version":"^1.2.1","gulp-uglify":"~1.0.1","gulp-vartree":"^2.0.1","hogan.js":"^3.0.2",jasmine:"2.3.2","jasmine-es6":"0.0.18",jison:"~0.4.15",jsdom:"^6.5.1","jshint-stylish":"^2.0.1","map-stream":"0.0.6",marked:"^0.3.2","mock-browser":"^0.91.34",path:"^0.4.9",phantomjs:"^1.9.18",proxyquire:"^1.3.1","require-dir":"^0.3.0",rewire:"^2.1.3",rimraf:"^2.2.8",tape:"^3.0.3",uglifyjs:"^2.4.10","vinyl-source-stream":"^1.1.0",watchify:"^3.2.2"}}},{}],86:[function(t,n){"use strict";var e;if(t)try{e=t("d3")}catch(r){}e||(e=window.d3),n.exports=e,function(){var t=!1;if(t="tspans",e.selection.prototype.textwrap)return!1;if("undefined"==typeof t)var t=!1;e.selection.prototype.textwrap=e.selection.enter.prototype.textwrap=function(n,r){var i,r=parseInt(r)||0,a=this,o=function(t){var n=t[0][0],r=n.tagName.toString();if("rect"!==r)return!1;var i={};return i.x=e.select(n).attr("x")||0,i.y=e.select(n).attr("y")||0,i.width=e.select(n).attr("width")||0,i.height=e.select(n).attr("height")||0,i.attr=t.attr,i},u=function(t){if(t.attr||(t.attr=function(t){return this[t]?this[t]:void 0}),"object"==typeof t&&"undefined"!=typeof t.x&&"undefined"!=typeof t.y&&"undefined"!=typeof t.width&&"undefined"!=typeof t.height)return t;if("function"==typeof Array.isArray&&Array.isArray(t)||"[object Array]"===Object.prototype.toString.call(t)){var n=o(t);return n}return!1},s=function(t,n){var e=t;return 0!==n&&(e.x=parseInt(e.x)+n,e.y=parseInt(e.y)+n,e.width-=2*n,e.height-=2*n),e},c=u(n);if(r&&(c=s(c,r)),0!=a.length&&e&&n&&c){n=c;var l,h=function(t){var r=e.select(t[0].parentNode),a=r.select("text"),o=a.style("line-height"),u=a.text();a.remove();var s=r.append("foreignObject");s.attr("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility").attr("x",n.x).attr("y",n.y).attr("width",n.width).attr("height",n.height);var c=s.append("xhtml:div").attr("class","wrapped");c.style("height",n.height).style("width",n.width).html(u),o&&c.style("line-height",o),i=r.select("foreignObject")},f=function(t){var a,o=t[0],u=o.parentNode,s=e.select(o),c=o.getBBox().height,l=o.getBBox().width,h=c,f=s.style("line-height");if(a=f&&parseInt(f)?parseInt(f.replace("px","")):h,l>n.width){var d=s.text();if(s.text(""),d){var p,g;if(-1!==d.indexOf(" ")){var p=" ";g=d.split(" ")}else{p="";var y=d.length,m=Math.ceil(l/n.width),v=Math.floor(y/m);v*m>=y||m++;for(var _,b,g=[],x=0;m>x;x++)b=x*v,_=d.substr(b,v),g.push(_)}for(var w=[],k=0,A={},x=0;x<g.length;x++){var E,M=g[x],D=s.text(),S=o.getComputedTextLength();E=D?D+p+M:M,s.text(E);var T=o.getComputedTextLength();if(T>n.width&&D&&""!==D&&(k+=S,A={string:D,width:S,offset:k},w.push(A),s.text(""),s.text(M),x==g.length-1&&(E=M,s.text(E),T=o.getComputedTextLength())),x==g.length-1){s.text("");var C=E;C&&""!==C&&(T-k>0&&(T-=k),A={string:C,width:T,offset:k},w.push(A))}}var F;s.text("");for(var x=0;x<w.length;x++){var _=w[x].string;if(x>0){w[x-1]}x*a<n.height-1.5*a&&(F=s.append("tspan").text(_),F.attr("dy",function(){return x>0?a:void 0}),F.attr("x",function(){var t=n.x;return r&&(t+=r),t}))}}}s.attr("y",function(){var t=n.y;return a&&(t+=a),r&&(t+=r),t}),s.attr("x",function(){var t=n.x;return r&&(t+=r),t}),i=e.select(u).selectAll("text")};t&&("foreignobjects"==t?l=h:"tspans"==t&&(l=f)),t||(l="undefined"!=typeof SVGForeignObjectElement?h:f);for(var d=0;d<a.length;d++){var p=a[d];l(p)}return i}return a?a:!1}}()},{d3:4}],87:[function(t,n,e){(function(n){"use strict";function r(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n["default"]=t,n}var i=t("../../logger"),a=r(i),o=new a.Log,u="",s=!1;e.setMessage=function(t){o.debug("Setting message to: "+t),u=t},e.getMessage=function(){return u},e.setInfo=function(t){s=t},e.getInfo=function(){return s},e.parseError=function(t,e){n.mermaidAPI.parseError(t,e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../logger":102}],88:[function(t,n,e){"use strict";function r(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n["default"]=t,n}var i=t("../../logger"),a=r(i),o=t("./exampleDb"),u=t("./parser/example.js"),s=t("../../d3"),c=new a.Log;e.draw=function(t,n,e){var r;r=u.parser,r.yy=o,c.debug("Renering example diagram"),r.parse(t);var i=s.select("#"+n),a=i.append("g");a.append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("mermaid "+e),i.attr("height",100),i.attr("width",400)}},{"../../d3":86,"../../logger":102,"./exampleDb":87,"./parser/example.js":89}],89:[function(t,n,e){(function(r){"use strict";var i=function(){function t(){this.yy={}}var n=function(t,n,e,r){for(e=e||{},r=t.length;r--;e[t[r]]=n);return e},e=[6,9,10,12],r={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,message:11,say:12,TXT:13,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo",12:"say",13:"TXT"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1],[8,1],[11,2]],performAction:function(t,n,e,r,i,a){var o=a.length-1;switch(i){case 1:return r;case 4:break;case 6:r.setInfo(!0);break;case 7:r.setMessage(a[o]);break;case 8:this.$=a[o-1].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},n(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8],11:9,12:[1,10]},{1:[2,1]},n(e,[2,3]),n(e,[2,4]),n(e,[2,5]),n(e,[2,6]),n(e,[2,7]),{13:[1,11]},n(e,[2,8])],defaultActions:{4:[2,1]},parseError:function(t,n){if(!n.recoverable)throw new Error(t);this.trace(t)},parse:function(t){var n=this,e=[0],r=[null],i=[],a=this.table,o="",u=0,s=0,c=0,l=2,h=1,f=i.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,"undefined"==typeof d.yylloc&&(d.yylloc={});var y=d.yylloc;i.push(y);var m=d.options&&d.options.ranges;this.parseError="function"==typeof p.yy.parseError?p.yy.parseError:Object.getPrototypeOf(this).parseError;for(var v,_,b,x,w,k,A,E,M,D=function(){var t;return t=d.lex()||h,"number"!=typeof t&&(t=n.symbols_[t]||t),t},S={};;){if(b=e[e.length-1],this.defaultActions[b]?x=this.defaultActions[b]:((null===v||"undefined"==typeof v)&&(v=D()),x=a[b]&&a[b][v]),"undefined"==typeof x||!x.length||!x[0]){var T="";M=[];for(k in a[b])this.terminals_[k]&&k>l&&M.push("'"+this.terminals_[k]+"'");T=d.showPosition?"Parse error on line "+(u+1)+":\n"+d.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(u+1)+": Unexpected "+(v==h?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[v]||v,line:d.yylineno,loc:y,expected:M})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+v);switch(x[0]){case 1:e.push(v),r.push(d.yytext),i.push(d.yylloc),e.push(x[1]),v=null,_?(v=_,_=null):(s=d.yyleng,o=d.yytext,u=d.yylineno,y=d.yylloc,c>0&&c--);break;case 2:if(A=this.productions_[x[1]][1],S.$=r[r.length-A],S._$={first_line:i[i.length-(A||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(A||1)].first_column,last_column:i[i.length-1].last_column},m&&(S._$.range=[i[i.length-(A||1)].range[0],i[i.length-1].range[1]]),w=this.performAction.apply(S,[o,s,u,p.yy,x[1],r,i].concat(f)),"undefined"!=typeof w)return w;A&&(e=e.slice(0,-1*A*2),r=r.slice(0,-1*A),i=i.slice(0,-1*A)),e.push(this.productions_[x[1]][0]),r.push(S.$),i.push(S._$),E=a[e[e.length-2]][e[e.length-1]],e.push(E);break;case 3:return!0}}return!0}},i=function(){var t={EOF:1,parseError:function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},setInput:function(t,n){return this.yy=n||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var n=t.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===r.length?this.yylloc.first_column:0)+r[r.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"},test_match:function(t,n){var e,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,n,e,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if(e=this._input.match(this.rules[i[a]]),e&&(!n||e[0].length>n[0].length)){if(n=e,r=a,this.options.backtrack_lexer){if(t=this.test_match(e,i[a]),t!==!1)return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?(t=this.test_match(n,i[r]),t!==!1?t:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,n,e,r){switch(e){case 0:return 9;case 1:return 10;case 2:return 4;case 3:return 12;case 4:return 13;case 5:return 6;case 6:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:showInfo\b)/i,/^(?:info\b)/i,/^(?:say\b)/i,/^(?::[^#\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6],inclusive:!0}}};return t}();return r.lexer=i,t.prototype=r,r.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof e&&(e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(n){n[1]||(console.log("Usage: "+n[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(n[1]),"utf8");return e.parser.parse(i)},"undefined"!=typeof n&&t.main===n&&e.main(r.argv.slice(1)))}).call(this,t("_process"))},{_process:3,fs:1,path:2}],90:[function(t,n){"use strict";function e(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n["default"]=t,n}var r,i=t("../../logger"),a=e(i),o=new a.Log;if(t)try{r=t("dagre-d3")}catch(u){o.debug("Could not load dagre-d3")}r||(r=window.dagreD3),n.exports=r},{"../../logger":102,"dagre-d3":5}],91:[function(t,n,e){"use strict";function r(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n["default"]=t,n}var i=t("../../logger"),a=r(i),o=t("./graphDb"),u=t("./parser/flow"),s=t("./parser/dot"),c=t("../../d3"),l=t("./dagre-d3"),h=new a.Log,f={};n.exports.setConf=function(t){var n,e=Object.keys(t);for(n=0;n<e.length;n++)f[e[n]]=t[e[n]]},e.addVertices=function(t,n){var e=Object.keys(t),r=function(t,n){var e;for(e=0;e<n.length;e++)"undefined"!=typeof n[e]&&(t=t+n[e]+";");return t};e.forEach(function(e){var i,a=t[e],o="";a.classes.length>0&&(o=a.classes.join(" "));var u="";u=r(u,a.styles),i="undefined"==typeof a.text?a.id:a.text;var s="";f.htmlLabels?(s="html",i=i.replace(/fa:fa[\w\-]+/g,function(t){return'<i class="fa '+t.substring(3)+'">'})):(i=i.replace(/<br>/g,"\n"),s="text");var c=0,l="";switch(a.type){case"round":c=5,l="rect";break;case"square":l="rect";break;case"diamond":l="question";break;case"odd":l="rect_left_inv_arrow";break;case"odd_right":l="rect_left_inv_arrow";break;case"circle":l="circle";break;case"group":l="rect",i="";break;default:l="rect"}n.setNode(a.id,{labelType:s,shape:l,label:i,rx:c,ry:c,"class":o,style:u,id:a.id})})},e.addEdges=function(t,n){var e,r,i=0;"undefined"!=typeof t.defaultStyle&&(r=t.defaultStyle.toString().replace(/,/g,";")),t.forEach(function(t){i++,e="arrow_open"===t.type?"none":"normal";var a="";if("undefined"!=typeof t.style)t.style.forEach(function(t){a=a+t+";"});else switch(t.stroke){case"normal":a="fill:none","undefined"!=typeof r&&(a=r);break;case"dotted":a="stroke: #333; fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":a="stroke: #333; stroke-width: 3.5px;fill:none";
|
||
|
||
}if("undefined"==typeof t.text)"undefined"==typeof t.style?n.setEdge(t.start,t.end,{style:a,arrowhead:e},i):n.setEdge(t.start,t.end,{style:a,arrowheadStyle:"fill: #333",arrowhead:e},i);else{var o=t.text.replace(/<br>/g,"\n");"undefined"==typeof t.style?f.htmlLabels?n.setEdge(t.start,t.end,{labelType:"html",style:a,labelpos:"c",label:'<span style="background:#e8e8e8">'+t.text+"</span>",arrowheadStyle:"fill: #333",arrowhead:e},i):n.setEdge(t.start,t.end,{labelType:"text",style:"stroke: #333; stroke-width: 1.5px;fill:none",labelpos:"c",label:o,arrowheadStyle:"fill: #333",arrowhead:e},i):n.setEdge(t.start,t.end,{labelType:"text",style:a,arrowheadStyle:"fill: #333",label:o,arrowhead:e},i)}})},e.getClasses=function(t,n){var e;o.clear(),e=n?s.parser:u.parser,e.yy=o,e.parse(t);var r=o.getClasses();return"undefined"==typeof r["default"]&&(r["default"]={id:"default"},r["default"].styles=[],r["default"].clusterStyles=["rx:4px","fill: rgb(255, 255, 222)","rx: 4px","stroke: rgb(170, 170, 51)","stroke-width: 1px"],r["default"].nodeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"],r["default"].edgeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"]),r},e.draw=function(t,n,r){h.debug("Drawing flowchart");var i;o.clear(),i=r?s.parser:u.parser,i.yy=o;try{i.parse(t)}catch(a){h.debug("Parsing failed")}var d;d=o.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=o.getSubGraphs(),m=0;for(m=y.length-1;m>=0;m--)p=y[m],o.addVertex(p.id,p.title,"group",void 0);var v=o.getVertices(),_=o.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);e.addVertices(v,g),e.addEdges(_,g);var x=new l.render;x.shapes().question=function(t,n,e){var r=n.width,i=n.height,a=.8*(r+i),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],u=t.insert("polygon",":first-child").attr("points",o.map(function(t){return t.x+","+t.y}).join(" ")).attr("rx",5).attr("ry",5).attr("transform","translate("+-a/2+","+2*a/4+")");return e.intersect=function(t){return l.intersect.polygon(e,o,t)},u},x.shapes().rect_left_inv_arrow=function(t,n,e){var r=n.width,i=n.height,a=[{x:-i/2,y:0},{x:r,y:0},{x:r,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return e.intersect=function(t){return l.intersect.polygon(e,a,t)},o},x.shapes().rect_right_inv_arrow=function(t,n,e){var r=n.width,i=n.height,a=[{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}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return e.intersect=function(t){return l.intersect.polygon(e,a,t)},o},x.arrows().none=function(t,n,e,r){var i=t.append("marker").attr("id",n).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),a=i.append("path").attr("d","M 0 0 L 0 0 L 0 0 z");l.util.applyStyle(a,e[r+"Style"])};var w=c.select("#"+n),k=c.select("#"+n+" g");for(x(k,g),k.selectAll("g.node").attr("title",function(){return o.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))),o.indexNodes("subGraph"+m),m=0;m<y.length;m++)if(p=y[m],"undefined"!==p.title){var A=document.querySelectorAll("#"+n+" #"+p.id+" rect"),E=document.querySelectorAll("#"+n+" #"+p.id),M=A[0].x.baseVal.value,D=A[0].y.baseVal.value,S=A[0].width.baseVal.value,T=c.select(E[0]),C=T.append("text");C.attr("x",M+S/2),C.attr("y",D+14),C.attr("fill","black"),C.attr("stroke","none"),C.attr("id",n+"Text"),C.style("text-anchor","middle"),C.text("undefined"==typeof p.title?"Undef":p.title)}}},{"../../d3":86,"../../logger":102,"./dagre-d3":90,"./graphDb":92,"./parser/dot":93,"./parser/flow":94}],92:[function(require,module,exports){(function(global){"use strict";function _interopRequireWildcard(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n["default"]=t,n}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,n,e,r){var i;"undefined"!=typeof t&&0!==t.trim().length&&("undefined"==typeof vertices[t]&&(vertices[t]={id:t,styles:[],classes:[]}),"undefined"!=typeof n&&(i=n.trim(),'"'===i[0]&&'"'===i[i.length-1]&&(i=i.substring(1,i.length-1)),vertices[t].text=i),"undefined"!=typeof e&&(vertices[t].type=e),"undefined"!=typeof e&&(vertices[t].type=e),"undefined"!=typeof r&&null!==r&&r.forEach(function(n){vertices[t].styles.push(n)}))},exports.addLink=function(t,n,e,r){log.debug("Got edge",t,n);var i={start:t,end:n,type:void 0,text:""};r=e.text,"undefined"!=typeof r&&(i.text=r.trim(),'"'===i.text[0]&&'"'===i.text[i.text.length-1]&&(i.text=i.text.substring(1,i.text.length-1))),"undefined"!=typeof e&&(i.type=e.type,i.stroke=e.stroke),edges.push(i)},exports.updateLink=function(t,n){"default"===t?edges.defaultStyle=n:edges[t].style=n},exports.addClass=function(t,n){"undefined"==typeof classes[t]&&(classes[t]={id:t,styles:[]}),"undefined"!=typeof n&&null!==n&&n.forEach(function(n){classes[t].styles.push(n)})},exports.setDirection=function(t){direction=t},exports.setClass=function(t,n){t.indexOf(",")>0?t.split(",").forEach(function(t){"undefined"!=typeof vertices[t]&&vertices[t].classes.push(n)}):"undefined"!=typeof vertices[t]&&vertices[t].classes.push(n)};var setTooltip=function(t,n){"undefined"!=typeof n&&(tooltips[t]=n)},setClickFun=function setClickFun(id,functionName){"undefined"!=typeof functionName&&"undefined"!=typeof vertices[id]&&funs.push(function(element){var elem=d3.select(element).select("#"+id);null!==elem&&elem.on("click",function(){eval(functionName+"('"+id+"')")})})},setLink=function(t,n){"undefined"!=typeof n&&"undefined"!=typeof vertices[t]&&funs.push(function(e){var r=d3.select(e).select("#"+t);null!==r&&r.on("click",function(){window.open(n,"newTab")})})};exports.getTooltip=function(t){return tooltips[t]},exports.setClickEvent=function(t,n,e,r){t.indexOf(",")>0?t.split(",").forEach(function(t){setTooltip(t,r),setClickFun(t,n),setLink(t,e)}):(setTooltip(t,r),setClickFun(t,n),setLink(t,e))},exports.bindFunctions=function(t){funs.forEach(function(n){n(t)})},exports.getDirection=function(){return direction},exports.getVertices=function(){return vertices},exports.getEdges=function(){return edges},exports.getClasses=function(){return classes};var setupToolTips=function(t){var n=d3.select(".mermaidTooltip");null===n[0][0]&&(n=d3.select("body").append("div").attr("class","mermaidTooltip").style("opacity",0));var e=d3.select(t).select("svg"),r=e.selectAll("g.node");r.on("mouseover",function(){var t=d3.select(this),e=t.attr("title");if(null!==e){var r=this.getBoundingClientRect();n.transition().duration(200).style("opacity",".9"),n.html(t.attr("title")).style("left",r.left+(r.right-r.left)/2+"px").style("top",r.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}}).on("mouseout",function(){n.transition().duration(500).style("opacity",0);var t=d3.select(this);t.classed("hover",!1)})};funs.push(setupToolTips),exports.clear=function(){vertices={},classes={},edges=[],funs=[],funs.push(setupToolTips),subGraphs=[],subCount=0,tooltips=[]},exports.defaultStyle=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},exports.addSubGraph=function(t,n){function e(t){var n={"boolean":{},number:{},string:{}},e=[];return t.filter(function(t){var r=typeof t;return" "===t?!1:r in n?n[r].hasOwnProperty(t)?!1:n[r][t]=!0:e.indexOf(t)>=0?!1:e.push(t)})}var r=[];r=e(r.concat.apply(r,t));var i={id:"subGraph"+subCount,nodes:r,title:n};return subGraphs.push(i),subCount+=1,i.id};var getPosForId=function(t){var n;for(n=0;n<subGraphs.length;n++)if(subGraphs[n].id===t)return n;return-1},secCount=-1,posCrossRef=[],indexNodes=function t(n,e){var r=subGraphs[e].nodes;if(secCount+=1,!(secCount>2e3)){if(posCrossRef[secCount]=e,subGraphs[e].id===n)return{result:!0,count:0};for(var i=0,a=1;i<r.length;){var o=getPosForId(r[i]);if(o>=0){var u=t(n,o);if(u.result)return{result:!0,count:a+u.count};a+=u.count}i+=1}return{result:!1,count:a}}};exports.getDepthFirstPos=function(t){return posCrossRef[t]},exports.indexNodes=function(){secCount=-1,subGraphs.length>0&&indexNodes("none",subGraphs.length-1,0)},exports.getSubGraphs=function(){return subGraphs},exports.parseError=function(t,n){global.mermaidAPI.parseError(t,n)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../d3":86,"../../logger":102}],93:[function(t,n,e){(function(r){"use strict";var i=function(){function t(){this.yy={}}var n=function(t,n,e,r){for(e=e||{},r=t.length;r--;e[t[r]]=n);return e},e=[1,5],r=[1,6],i=[1,12],a=[1,13],o=[1,14],u=[1,15],s=[1,16],c=[1,17],l=[1,18],h=[1,19],f=[1,20],d=[1,21],p=[1,22],g=[8,16,17,18,19,20,21,22,23,24,25,26],y=[1,37],m=[1,33],v=[1,34],_=[1,35],b=[1,36],x=[8,10,16,17,18,19,20,21,22,23,24,25,26,28,32,37,39,40,45,57,58],w=[10,28],k=[10,28,37,57,58],A=[2,49],E=[1,45],M=[1,48],D=[1,49],S=[1,52],T=[2,65],C=[1,65],F=[1,66],O=[1,67],L=[1,68],I=[1,69],N=[1,70],P=[1,71],B=[1,72],R=[1,73],j=[8,16,17,18,19,20,21,22,23,24,25,26,47],Y=[10,28,37],U={trace:function(){},yy:{},symbols_:{error:2,expressions:3,graph:4,EOF:5,graphStatement:6,idStatement:7,"{":8,stmt_list:9,"}":10,strict:11,GRAPH:12,DIGRAPH:13,textNoTags:14,textNoTagsToken:15,ALPHA:16,NUM:17,COLON:18,PLUS:19,EQUALS:20,MULT:21,DOT:22,BRKT:23,SPACE:24,MINUS:25,keywords:26,stmt:27,";":28,node_stmt:29,edge_stmt:30,attr_stmt:31,"=":32,subgraph:33,attr_list:34,NODE:35,EDGE:36,"[":37,a_list:38,"]":39,",":40,edgeRHS:41,node_id:42,edgeop:43,port:44,":":45,compass_pt:46,SUBGRAPH:47,n:48,ne:49,e:50,se:51,s:52,sw:53,w:54,nw:55,c:56,ARROW_POINT:57,ARROW_OPEN:58,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",8:"{",10:"}",11:"strict",12:"GRAPH",13:"DIGRAPH",16:"ALPHA",17:"NUM",18:"COLON",19:"PLUS",20:"EQUALS",21:"MULT",22:"DOT",23:"BRKT",24:"SPACE",25:"MINUS",26:"keywords",28:";",32:"=",35:"NODE",36:"EDGE",37:"[",39:"]",40:",",45:":",47:"SUBGRAPH",48:"n",49:"ne",50:"e",51:"se",52:"s",53:"sw",54:"w",55:"nw",56:"c",57:"ARROW_POINT",58:"ARROW_OPEN"},productions_:[0,[3,2],[4,5],[4,6],[4,4],[6,1],[6,1],[7,1],[14,1],[14,2],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[9,1],[9,3],[27,1],[27,1],[27,1],[27,3],[27,1],[31,2],[31,2],[31,2],[34,4],[34,3],[34,3],[34,2],[38,5],[38,5],[38,3],[30,3],[30,3],[30,2],[30,2],[41,3],[41,3],[41,2],[41,2],[29,2],[29,1],[42,2],[42,1],[44,4],[44,2],[44,2],[33,5],[33,4],[33,3],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,0],[43,1],[43,1]],performAction:function(t,n,e,r,i,a){var o=a.length-1;switch(i){case 1:this.$=a[o-1];break;case 2:this.$=a[o-4];break;case 3:this.$=a[o-5];break;case 4:this.$=a[o-3];break;case 8:case 10:case 11:this.$=a[o];break;case 9:this.$=a[o-1]+""+a[o];break;case 12:case 13:case 14:case 15:case 16:case 18:case 19:case 20:this.$=a[o];break;case 17:this.$="<br>";break;case 39:this.$="oy";break;case 40:r.addLink(a[o-1],a[o].id,a[o].op),this.$="oy";break;case 42:r.addLink(a[o-1],a[o].id,a[o].op),this.$={op:a[o-2],id:a[o-1]};break;case 44:this.$={op:a[o-1],id:a[o]};break;case 48:r.addVertex(a[o-1]),this.$=a[o-1];break;case 49:r.addVertex(a[o]),this.$=a[o];break;case 66:this.$="arrow";break;case 67:this.$="arrow_open"}},table:[{3:1,4:2,6:3,11:[1,4],12:e,13:r},{1:[3]},{5:[1,7]},{7:8,8:[1,9],14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{6:23,12:e,13:r},n(g,[2,5]),n(g,[2,6]),{1:[2,1]},{8:[1,24]},{7:30,8:y,9:25,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},n([8,10,28,32,37,39,40,45,57,58],[2,7],{15:38,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p}),n(x,[2,8]),n(x,[2,10]),n(x,[2,11]),n(x,[2,12]),n(x,[2,13]),n(x,[2,14]),n(x,[2,15]),n(x,[2,16]),n(x,[2,17]),n(x,[2,18]),n(x,[2,19]),n(x,[2,20]),{7:39,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:40,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},{10:[1,41]},{10:[2,21],28:[1,42]},n(w,[2,23]),n(w,[2,24]),n(w,[2,25]),n(k,A,{44:44,32:[1,43],45:E}),n(w,[2,27],{41:46,43:47,57:M,58:D}),n(w,[2,47],{43:47,34:50,41:51,37:S,57:M,58:D}),{34:53,37:S},{34:54,37:S},{34:55,37:S},{7:56,8:[1,57],14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:58,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},n(x,[2,9]),{8:[1,59]},{10:[1,60]},{5:[2,4]},{7:30,8:y,9:61,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},{7:62,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},n(k,[2,48]),n(k,T,{14:10,15:11,7:63,46:64,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,48:C,49:F,50:O,51:L,52:I,53:N,54:P,55:B,56:R}),n(w,[2,41],{34:74,37:S}),{7:77,8:y,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,33:76,42:75,47:b},n(j,[2,66]),n(j,[2,67]),n(w,[2,46]),n(w,[2,40],{34:78,37:S}),{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:79,39:[1,80]},n(w,[2,28]),n(w,[2,29]),n(w,[2,30]),{8:[1,82]},{7:30,8:y,9:83,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},{10:[1,84]},{7:30,8:y,9:85,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},{5:[2,2]},{10:[2,22]},n(w,[2,26]),n(k,[2,51],{45:[1,86]}),n(k,[2,52]),n(k,[2,56]),n(k,[2,57]),n(k,[2,58]),n(k,[2,59]),n(k,[2,60]),n(k,[2,61]),n(k,[2,62]),n(k,[2,63]),n(k,[2,64]),n(w,[2,38]),n(Y,[2,44],{43:47,41:87,57:M,58:D}),n(Y,[2,45],{43:47,41:88,57:M,58:D}),n(k,A,{44:44,45:E}),n(w,[2,39]),{39:[1,89]},n(w,[2,34],{34:90,37:S}),{32:[1,91]},{7:30,8:y,9:92,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},{10:[1,93]},n(k,[2,55]),{10:[1,94]},n(k,T,{46:95,48:C,49:F,50:O,51:L,52:I,53:N,54:P,55:B,56:R}),n(Y,[2,42]),n(Y,[2,43]),n(w,[2,33],{34:96,37:S}),n(w,[2,32]),{7:97,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{10:[1,98]},n(k,[2,54]),{5:[2,3]},n(k,[2,50]),n(w,[2,31]),{28:[1,99],39:[2,37],40:[1,100]},n(k,[2,53]),{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:101},{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:102},{39:[2,35]},{39:[2,36]}],defaultActions:{7:[2,1],41:[2,4],60:[2,2],61:[2,22],94:[2,3],101:[2,35],102:[2,36]},parseError:function(t,n){if(!n.recoverable)throw new Error(t);this.trace(t)},parse:function(t){var n=this,e=[0],r=[null],i=[],a=this.table,o="",u=0,s=0,c=0,l=2,h=1,f=i.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,"undefined"==typeof d.yylloc&&(d.yylloc={});var y=d.yylloc;i.push(y);var m=d.options&&d.options.ranges;this.parseError="function"==typeof p.yy.parseError?p.yy.parseError:Object.getPrototypeOf(this).parseError;for(var v,_,b,x,w,k,A,E,M,D=function(){var t;return t=d.lex()||h,"number"!=typeof t&&(t=n.symbols_[t]||t),t},S={};;){if(b=e[e.length-1],this.defaultActions[b]?x=this.defaultActions[b]:((null===v||"undefined"==typeof v)&&(v=D()),x=a[b]&&a[b][v]),"undefined"==typeof x||!x.length||!x[0]){var T="";M=[];for(k in a[b])this.terminals_[k]&&k>l&&M.push("'"+this.terminals_[k]+"'");T=d.showPosition?"Parse error on line "+(u+1)+":\n"+d.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(u+1)+": Unexpected "+(v==h?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[v]||v,line:d.yylineno,loc:y,expected:M})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+v);switch(x[0]){case 1:e.push(v),r.push(d.yytext),i.push(d.yylloc),e.push(x[1]),v=null,_?(v=_,_=null):(s=d.yyleng,o=d.yytext,u=d.yylineno,y=d.yylloc,c>0&&c--);break;case 2:if(A=this.productions_[x[1]][1],S.$=r[r.length-A],S._$={first_line:i[i.length-(A||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(A||1)].first_column,last_column:i[i.length-1].last_column},m&&(S._$.range=[i[i.length-(A||1)].range[0],i[i.length-1].range[1]]),w=this.performAction.apply(S,[o,s,u,p.yy,x[1],r,i].concat(f)),"undefined"!=typeof w)return w;A&&(e=e.slice(0,-1*A*2),r=r.slice(0,-1*A),i=i.slice(0,-1*A)),e.push(this.productions_[x[1]][0]),r.push(S.$),i.push(S._$),E=a[e[e.length-2]][e[e.length-1]],e.push(E);break;case 3:return!0}}return!0}},$=function(){var t={EOF:1,parseError:function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},setInput:function(t,n){return this.yy=n||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var n=t.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===r.length?this.yylloc.first_column:0)+r[r.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"},test_match:function(t,n){var e,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,n,e,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if(e=this._input.match(this.rules[i[a]]),e&&(!n||e[0].length>n[0].length)){if(n=e,r=a,this.options.backtrack_lexer){if(t=this.test_match(e,i[a]),t!==!1)return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?(t=this.test_match(n,i[r]),t!==!1?t:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,n,e,r){switch(e){case 0:return"STYLE";case 1:return"LINKSTYLE";case 2:return"CLASSDEF";case 3:return"CLASS";case 4:return"CLICK";case 5:return 12;case 6:return 13;case 7:return 47;case 8:return 35;case 9:return 36;case 10:return"DIR";case 11:return"DIR";case 12:return"DIR";case 13:return"DIR";case 14:return"DIR";case 15:return"DIR";case 16:return 17;case 17:return 23;case 18:return 18;case 19:return 28;case 20:return 40;case 21:return 32;case 22:return 21;case 23:return 22;case 24:return"ARROW_CROSS";case 25:return 57;case 26:return"ARROW_CIRCLE";case 27:return 58;case 28:return 25;case 29:return 19;case 30:return 20;case 31:return 16;case 32:return"PIPE";case 33:return"PS";case 34:return"PE";case 35:return 37;case 36:return 39;case 37:return 8;case 38:return 10;case 39:return"QUOTE";case 40:return 24;case 41:return"NEWLINE";case 42:return 5}},rules:[/^(?:style\b)/,/^(?:linkStyle\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:digraph\b)/,/^(?:subgraph\b)/,/^(?:node\b)/,/^(?:edge\b)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9])/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:=)/,/^(?:\*)/,/^(?:\.)/,/^(?:--[x])/,/^(?:->)/,/^(?:--[o])/,/^(?:--)/,/^(?:-)/,/^(?:\+)/,/^(?:=)/,/^(?:[\u0021-\u0027\u002A-\u002E\u003F\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC_])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:\s)/,/^(?:\n)/,/^(?:$)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],inclusive:!0}}};return t}();return U.lexer=$,t.prototype=U,U.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof e&&(e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(n){n[1]||(console.log("Usage: "+n[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(n[1]),"utf8");return e.parser.parse(i)},"undefined"!=typeof n&&t.main===n&&e.main(r.argv.slice(1)))}).call(this,t("_process"))},{_process:3,fs:1,path:2}],94:[function(t,n,e){(function(r){"use strict";var i=function(){function t(){this.yy={}}var n=function(t,n,e,r){for(e=e||{},r=t.length;r--;e[t[r]]=n);return e},e=[1,4],r=[1,3],i=[1,5],a=[1,8,9,10,11,13,18,30,44,69,70,71,72,73,79,83,85,86,88,89,91,92,93],o=[2,2],u=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,31],f=[1,33],d=[1,22],p=[1,34],g=[1,24],y=[1,25],m=[1,26],v=[1,27],_=[1,28],b=[1,36],x=[1,38],w=[1,35],k=[1,37],A=[1,43],E=[1,42],M=[1,39],D=[1,40],S=[1,41],T=[1,8,9,10,11,13,18,30,32,44,69,70,71,72,73,79,83,85,86,88,89,91,92,93],C=[1,51],F=[1,50],O=[1,52],L=[1,70],I=[1,78],N=[1,79],P=[1,64],B=[1,63],R=[1,83],j=[1,82],Y=[1,80],U=[1,81],$=[1,71],z=[1,66],q=[1,65],W=[1,61],H=[1,73],G=[1,74],V=[1,75],Z=[1,76],X=[1,77],K=[1,68],Q=[1,67],J=[8,9,11],tt=[8,9,11,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62],nt=[1,112],et=[8,9,10,11,13,15,18,36,38,40,44,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,79,83,85,86,88,89,91,92,93],rt=[8,9,10,11,12,13,15,16,17,18,30,32,36,37,38,39,40,41,44,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,69,70,71,72,73,76,79,81,83,85,86,88,89,91,92,93],it=[1,114],at=[1,115],ot=[8,9,10,11,13,18,30,32,44,69,70,71,72,73,79,83,85,86,88,89,91,92,93],ut=[8,9,10,11,12,13,15,16,17,18,30,32,37,39,41,44,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,69,70,71,72,73,76,79,81,83,85,86,88,89,91,92,93],st=[13,18,44,79,83,85,86,88,89,91,92,93],ct=[13,18,44,47,63,79,83,85,86,88,89,91,92,93],lt=[1,186],ht=[1,183],ft=[1,190],dt=[1,187],pt=[1,184],gt=[1,191],yt=[1,181],mt=[1,182],vt=[1,185],_t=[1,188],bt=[1,189],xt=[1,205],wt=[8,9,11,83],kt=[8,9,10,11,44,69,78,79,81,83,85,86,87,88,89],At={trace:function(){},yy:{},symbols_:{error:2,mermaidDoc:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,DIR:13,FirstStmtSeperator:14,TAGEND:15,TAGSTART:16,UP:17,DOWN:18,ending:19,endToken:20,spaceList:21,spaceListNewline:22,verticeStatement:23,separator:24,styleStatement:25,linkStyleStatement:26,classDefStatement:27,classStatement:28,clickStatement:29,subgraph:30,text:31,end:32,vertex:33,link:34,alphaNum:35,SQS:36,SQE:37,PS:38,PE:39,DIAMOND_START:40,DIAMOND_STOP:41,alphaNumStatement:42,alphaNumToken:43,MINUS:44,linkStatement:45,arrowText:46,TESTSTR:47,"--":48,ARROW_POINT:49,ARROW_CIRCLE:50,ARROW_CROSS:51,ARROW_OPEN:52,"-.":53,DOTTED_ARROW_POINT:54,DOTTED_ARROW_CIRCLE:55,DOTTED_ARROW_CROSS:56,DOTTED_ARROW_OPEN:57,"==":58,THICK_ARROW_POINT:59,THICK_ARROW_CIRCLE:60,THICK_ARROW_CROSS:61,THICK_ARROW_OPEN:62,PIPE:63,textToken:64,STR:65,commentText:66,commentToken:67,keywords:68,STYLE:69,LINKSTYLE:70,CLASSDEF:71,CLASS:72,CLICK:73,textNoTags:74,textNoTagsToken:75,DEFAULT:76,stylesOpt:77,HEX:78,NUM:79,commentStatement:80,PCT:81,style:82,COMMA:83,styleComponent:84,ALPHA:85,COLON:86,UNIT:87,BRKT:88,DOT:89,graphCodeTokens:90,PLUS:91,EQUALS:92,MULT:93,TAG_START:94,TAG_END:95,QUOTE:96,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",
|
||
13:"DIR",15:"TAGEND",16:"TAGSTART",17:"UP",18:"DOWN",30:"subgraph",32:"end",36:"SQS",37:"SQE",38:"PS",39:"PE",40:"DIAMOND_START",41:"DIAMOND_STOP",44:"MINUS",47:"TESTSTR",48:"--",49:"ARROW_POINT",50:"ARROW_CIRCLE",51:"ARROW_CROSS",52:"ARROW_OPEN",53:"-.",54:"DOTTED_ARROW_POINT",55:"DOTTED_ARROW_CIRCLE",56:"DOTTED_ARROW_CROSS",57:"DOTTED_ARROW_OPEN",58:"==",59:"THICK_ARROW_POINT",60:"THICK_ARROW_CIRCLE",61:"THICK_ARROW_CROSS",62:"THICK_ARROW_OPEN",63:"PIPE",65:"STR",69:"STYLE",70:"LINKSTYLE",71:"CLASSDEF",72:"CLASS",73:"CLICK",76:"DEFAULT",78:"HEX",79:"NUM",81:"PCT",83:"COMMA",85:"ALPHA",86:"COLON",87:"UNIT",88:"BRKT",89:"DOT",91:"PLUS",92:"EQUALS",93:"MULT",94:"TAG_START",95:"TAG_END",96:"QUOTE"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,4],[4,4],[4,4],[4,4],[4,4],[19,2],[19,1],[20,1],[20,1],[20,1],[14,1],[14,1],[14,2],[22,2],[22,2],[22,1],[22,1],[21,2],[21,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,5],[7,4],[24,1],[24,1],[24,1],[23,3],[23,1],[33,4],[33,5],[33,6],[33,7],[33,4],[33,5],[33,4],[33,5],[33,4],[33,5],[33,1],[33,2],[35,1],[35,2],[42,1],[42,1],[42,1],[42,1],[34,2],[34,3],[34,3],[34,1],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[46,3],[31,1],[31,2],[31,1],[66,1],[66,2],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[74,1],[74,2],[27,5],[27,5],[28,5],[29,5],[29,7],[29,5],[29,7],[25,5],[25,5],[26,5],[26,5],[80,3],[77,1],[77,3],[82,1],[82,2],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[84,1],[67,1],[67,1],[64,1],[64,1],[64,1],[64,1],[64,1],[64,1],[64,1],[75,1],[75,1],[75,1],[75,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1]],performAction:function(t,n,e,r,i,a){var o=a.length-1;switch(i){case 2:this.$=[];break;case 3:a[o]!==[]&&a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 55:case 57:case 58:case 90:case 92:case 93:case 106:this.$=a[o];break;case 11:r.setDirection(a[o-1]),this.$=a[o-1];break;case 12:r.setDirection("LR"),this.$=a[o-1];break;case 13:r.setDirection("RL"),this.$=a[o-1];break;case 14:r.setDirection("BT"),this.$=a[o-1];break;case 15:r.setDirection("TB"),this.$=a[o-1];break;case 30:this.$=a[o-1];break;case 31:case 32:case 33:case 34:case 35:this.$=[];break;case 36:this.$=r.addSubGraph(a[o-1],a[o-3]);break;case 37:this.$=r.addSubGraph(a[o-1],void 0);break;case 41:r.addLink(a[o-2],a[o],a[o-1]),this.$=[a[o-2],a[o]];break;case 42:this.$=[a[o]];break;case 43:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"square");break;case 44:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"square");break;case 45:this.$=a[o-5],r.addVertex(a[o-5],a[o-2],"circle");break;case 46:this.$=a[o-6],r.addVertex(a[o-6],a[o-3],"circle");break;case 47:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"round");break;case 48:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"round");break;case 49:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"diamond");break;case 50:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"diamond");break;case 51:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"odd");break;case 52:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"odd");break;case 53:this.$=a[o],r.addVertex(a[o]);break;case 54:this.$=a[o-1],r.addVertex(a[o-1]);break;case 56:case 91:case 94:case 107:this.$=a[o-1]+""+a[o];break;case 59:this.$="v";break;case 60:this.$="-";break;case 61:a[o-1].text=a[o],this.$=a[o-1];break;case 62:case 63:a[o-2].text=a[o-1],this.$=a[o-2];break;case 64:this.$=a[o];break;case 65:this.$={type:"arrow",stroke:"normal",text:a[o-1]};break;case 66:this.$={type:"arrow_circle",stroke:"normal",text:a[o-1]};break;case 67:this.$={type:"arrow_cross",stroke:"normal",text:a[o-1]};break;case 68:this.$={type:"arrow_open",stroke:"normal",text:a[o-1]};break;case 69:this.$={type:"arrow",stroke:"dotted",text:a[o-1]};break;case 70:this.$={type:"arrow_circle",stroke:"dotted",text:a[o-1]};break;case 71:this.$={type:"arrow_cross",stroke:"dotted",text:a[o-1]};break;case 72:this.$={type:"arrow_open",stroke:"dotted",text:a[o-1]};break;case 73:this.$={type:"arrow",stroke:"thick",text:a[o-1]};break;case 74:this.$={type:"arrow_circle",stroke:"thick",text:a[o-1]};break;case 75:this.$={type:"arrow_cross",stroke:"thick",text:a[o-1]};break;case 76:this.$={type:"arrow_open",stroke:"thick",text:a[o-1]};break;case 77:this.$={type:"arrow",stroke:"normal"};break;case 78:this.$={type:"arrow_circle",stroke:"normal"};break;case 79:this.$={type:"arrow_cross",stroke:"normal"};break;case 80:this.$={type:"arrow_open",stroke:"normal"};break;case 81:this.$={type:"arrow",stroke:"dotted"};break;case 82:this.$={type:"arrow_circle",stroke:"dotted"};break;case 83:this.$={type:"arrow_cross",stroke:"dotted"};break;case 84:this.$={type:"arrow_open",stroke:"dotted"};break;case 85:this.$={type:"arrow",stroke:"thick"};break;case 86:this.$={type:"arrow_circle",stroke:"thick"};break;case 87:this.$={type:"arrow_cross",stroke:"thick"};break;case 88:this.$={type:"arrow_open",stroke:"thick"};break;case 89:this.$=a[o-1];break;case 108:case 109:this.$=a[o-4],r.addClass(a[o-2],a[o]);break;case 110:this.$=a[o-4],r.setClass(a[o-2],a[o]);break;case 111:this.$=a[o-4],r.setClickEvent(a[o-2],a[o],void 0,void 0);break;case 112:this.$=a[o-6],r.setClickEvent(a[o-4],a[o-2],void 0,a[o]);break;case 113:this.$=a[o-4],r.setClickEvent(a[o-2],void 0,a[o],void 0);break;case 114:this.$=a[o-6],r.setClickEvent(a[o-4],void 0,a[o-2],a[o]);break;case 115:this.$=a[o-4],r.addVertex(a[o-2],void 0,void 0,a[o]);break;case 116:case 117:case 118:this.$=a[o-4],r.updateLink(a[o-2],a[o]);break;case 120:this.$=[a[o]];break;case 121:a[o-2].push(a[o]),this.$=a[o-2];break;case 123:this.$=a[o-1]+a[o]}},table:[{3:1,4:2,9:e,10:r,12:i},{1:[3]},n(a,o,{5:6}),{4:7,9:e,10:r,12:i},{4:8,9:e,10:r,12:i},{10:[1,9]},{1:[2,1],6:10,7:11,8:u,9:s,10:c,11:l,13:h,18:f,23:16,25:17,26:18,27:19,28:20,29:21,30:d,33:23,35:29,42:30,43:32,44:p,69:g,70:y,71:m,72:v,73:_,79:b,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},n(a,[2,9]),n(a,[2,10]),{13:[1,44],15:[1,45],16:[1,46],17:[1,47],18:[1,48]},n(T,[2,3]),n(T,[2,4]),n(T,[2,5]),n(T,[2,6]),n(T,[2,7]),n(T,[2,8]),{8:C,9:F,11:O,24:49},{8:C,9:F,11:O,24:53},{8:C,9:F,11:O,24:54},{8:C,9:F,11:O,24:55},{8:C,9:F,11:O,24:56},{8:C,9:F,11:O,24:57},{8:C,9:F,10:L,11:O,12:I,13:N,15:P,16:B,17:R,18:j,24:59,30:Y,31:58,32:U,43:69,44:$,48:z,58:q,64:60,65:W,68:72,69:H,70:G,71:V,72:Z,73:X,75:62,76:K,79:b,81:Q,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},n(J,[2,42],{34:84,45:85,48:[1,86],49:[1,89],50:[1,90],51:[1,91],52:[1,92],53:[1,87],54:[1,93],55:[1,94],56:[1,95],57:[1,96],58:[1,88],59:[1,97],60:[1,98],61:[1,99],62:[1,100]}),{10:[1,101]},{10:[1,102]},{10:[1,103]},{10:[1,104]},{10:[1,105]},n(tt,[2,53],{43:32,21:110,42:111,10:nt,13:h,15:[1,109],18:f,36:[1,106],38:[1,107],40:[1,108],44:p,79:b,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S}),n(et,[2,55]),n(et,[2,57]),n(et,[2,58]),n(et,[2,59]),n(et,[2,60]),n(rt,[2,148]),n(rt,[2,149]),n(rt,[2,150]),n(rt,[2,151]),n(rt,[2,152]),n(rt,[2,153]),n(rt,[2,154]),n(rt,[2,155]),n(rt,[2,156]),{8:it,9:at,10:nt,14:113,21:116},{8:it,9:at,10:nt,14:117,21:116},{8:it,9:at,10:nt,14:118,21:116},{8:it,9:at,10:nt,14:119,21:116},{8:it,9:at,10:nt,14:120,21:116},n(T,[2,30]),n(T,[2,38]),n(T,[2,39]),n(T,[2,40]),n(T,[2,31]),n(T,[2,32]),n(T,[2,33]),n(T,[2,34]),n(T,[2,35]),{8:C,9:F,10:L,11:O,12:I,13:N,15:P,16:B,17:R,18:j,24:121,30:Y,32:U,43:69,44:$,48:z,58:q,64:122,68:72,69:H,70:G,71:V,72:Z,73:X,75:62,76:K,79:b,81:Q,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},n(ot,o,{5:123}),n(ut,[2,90]),n(ut,[2,92]),n(ut,[2,137]),n(ut,[2,138]),n(ut,[2,139]),n(ut,[2,140]),n(ut,[2,141]),n(ut,[2,142]),n(ut,[2,143]),n(ut,[2,144]),n(ut,[2,145]),n(ut,[2,146]),n(ut,[2,147]),n(ut,[2,95]),n(ut,[2,96]),n(ut,[2,97]),n(ut,[2,98]),n(ut,[2,99]),n(ut,[2,100]),n(ut,[2,101]),n(ut,[2,102]),n(ut,[2,103]),n(ut,[2,104]),n(ut,[2,105]),{13:h,18:f,33:124,35:29,42:30,43:32,44:p,79:b,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},n(st,[2,64],{46:125,47:[1,126],63:[1,127]}),{10:L,12:I,13:N,15:P,16:B,17:R,18:j,30:Y,31:128,32:U,43:69,44:$,48:z,58:q,64:60,65:W,68:72,69:H,70:G,71:V,72:Z,73:X,75:62,76:K,79:b,81:Q,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},{10:L,12:I,13:N,15:P,16:B,17:R,18:j,30:Y,31:129,32:U,43:69,44:$,48:z,58:q,64:60,65:W,68:72,69:H,70:G,71:V,72:Z,73:X,75:62,76:K,79:b,81:Q,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},{10:L,12:I,13:N,15:P,16:B,17:R,18:j,30:Y,31:130,32:U,43:69,44:$,48:z,58:q,64:60,65:W,68:72,69:H,70:G,71:V,72:Z,73:X,75:62,76:K,79:b,81:Q,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},n(ct,[2,77]),n(ct,[2,78]),n(ct,[2,79]),n(ct,[2,80]),n(ct,[2,81]),n(ct,[2,82]),n(ct,[2,83]),n(ct,[2,84]),n(ct,[2,85]),n(ct,[2,86]),n(ct,[2,87]),n(ct,[2,88]),{13:h,18:f,35:131,42:30,43:32,44:p,78:[1,132],79:b,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},{76:[1,133],79:[1,134]},{13:h,18:f,35:136,42:30,43:32,44:p,76:[1,135],79:b,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},{13:h,18:f,35:137,42:30,43:32,44:p,79:b,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},{13:h,18:f,35:138,42:30,43:32,44:p,79:b,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},{10:L,12:I,13:N,15:P,16:B,17:R,18:j,30:Y,31:139,32:U,43:69,44:$,48:z,58:q,64:60,65:W,68:72,69:H,70:G,71:V,72:Z,73:X,75:62,76:K,79:b,81:Q,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},{10:L,12:I,13:N,15:P,16:B,17:R,18:j,30:Y,31:141,32:U,38:[1,140],43:69,44:$,48:z,58:q,64:60,65:W,68:72,69:H,70:G,71:V,72:Z,73:X,75:62,76:K,79:b,81:Q,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},{10:L,12:I,13:N,15:P,16:B,17:R,18:j,30:Y,31:142,32:U,43:69,44:$,48:z,58:q,64:60,65:W,68:72,69:H,70:G,71:V,72:Z,73:X,75:62,76:K,79:b,81:Q,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},{10:L,12:I,13:N,15:P,16:B,17:R,18:j,30:Y,31:143,32:U,43:69,44:$,48:z,58:q,64:60,65:W,68:72,69:H,70:G,71:V,72:Z,73:X,75:62,76:K,79:b,81:Q,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},n(tt,[2,54]),n(et,[2,56]),n(tt,[2,29],{21:144,10:nt}),n(a,[2,11]),n(a,[2,21]),n(a,[2,22]),{9:[1,145]},n(a,[2,12]),n(a,[2,13]),n(a,[2,14]),n(a,[2,15]),n(ot,o,{5:146}),n(ut,[2,91]),{6:10,7:11,8:u,9:s,10:c,11:l,13:h,18:f,23:16,25:17,26:18,27:19,28:20,29:21,30:d,32:[1,147],33:23,35:29,42:30,43:32,44:p,69:g,70:y,71:m,72:v,73:_,79:b,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},n(J,[2,41]),n(st,[2,61],{10:[1,148]}),{10:[1,149]},{10:L,12:I,13:N,15:P,16:B,17:R,18:j,30:Y,31:150,32:U,43:69,44:$,48:z,58:q,64:60,65:W,68:72,69:H,70:G,71:V,72:Z,73:X,75:62,76:K,79:b,81:Q,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},{10:L,12:I,13:N,15:P,16:B,17:R,18:j,30:Y,32:U,43:69,44:$,48:z,49:[1,151],50:[1,152],51:[1,153],52:[1,154],58:q,64:122,68:72,69:H,70:G,71:V,72:Z,73:X,75:62,76:K,79:b,81:Q,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},{10:L,12:I,13:N,15:P,16:B,17:R,18:j,30:Y,32:U,43:69,44:$,48:z,54:[1,155],55:[1,156],56:[1,157],57:[1,158],58:q,64:122,68:72,69:H,70:G,71:V,72:Z,73:X,75:62,76:K,79:b,81:Q,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},{10:L,12:I,13:N,15:P,16:B,17:R,18:j,30:Y,32:U,43:69,44:$,48:z,58:q,59:[1,159],60:[1,160],61:[1,161],62:[1,162],64:122,68:72,69:H,70:G,71:V,72:Z,73:X,75:62,76:K,79:b,81:Q,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},{10:[1,163],13:h,18:f,42:111,43:32,44:p,79:b,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},{10:[1,164]},{10:[1,165]},{10:[1,166]},{10:[1,167]},{10:[1,168],13:h,18:f,42:111,43:32,44:p,79:b,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},{10:[1,169],13:h,18:f,42:111,43:32,44:p,79:b,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},{10:[1,170],13:h,18:f,42:111,43:32,44:p,79:b,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},{10:L,12:I,13:N,15:P,16:B,17:R,18:j,30:Y,32:U,37:[1,171],43:69,44:$,48:z,58:q,64:122,68:72,69:H,70:G,71:V,72:Z,73:X,75:62,76:K,79:b,81:Q,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},{10:L,12:I,13:N,15:P,16:B,17:R,18:j,30:Y,31:172,32:U,43:69,44:$,48:z,58:q,64:60,65:W,68:72,69:H,70:G,71:V,72:Z,73:X,75:62,76:K,79:b,81:Q,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},{10:L,12:I,13:N,15:P,16:B,17:R,18:j,30:Y,32:U,39:[1,173],43:69,44:$,48:z,58:q,64:122,68:72,69:H,70:G,71:V,72:Z,73:X,75:62,76:K,79:b,81:Q,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},{10:L,12:I,13:N,15:P,16:B,17:R,18:j,30:Y,32:U,41:[1,174],43:69,44:$,48:z,58:q,64:122,68:72,69:H,70:G,71:V,72:Z,73:X,75:62,76:K,79:b,81:Q,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},{10:L,12:I,13:N,15:P,16:B,17:R,18:j,30:Y,32:U,37:[1,175],43:69,44:$,48:z,58:q,64:122,68:72,69:H,70:G,71:V,72:Z,73:X,75:62,76:K,79:b,81:Q,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},n(tt,[2,28]),n(a,[2,23]),{6:10,7:11,8:u,9:s,10:c,11:l,13:h,18:f,23:16,25:17,26:18,27:19,28:20,29:21,30:d,32:[1,176],33:23,35:29,42:30,43:32,44:p,69:g,70:y,71:m,72:v,73:_,79:b,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},n(T,[2,37]),n(st,[2,63]),n(st,[2,62]),{10:L,12:I,13:N,15:P,16:B,17:R,18:j,30:Y,32:U,43:69,44:$,48:z,58:q,63:[1,177],64:122,68:72,69:H,70:G,71:V,72:Z,73:X,75:62,76:K,79:b,81:Q,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},n(st,[2,65]),n(st,[2,66]),n(st,[2,67]),n(st,[2,68]),n(st,[2,69]),n(st,[2,70]),n(st,[2,71]),n(st,[2,72]),n(st,[2,73]),n(st,[2,74]),n(st,[2,75]),n(st,[2,76]),{10:lt,44:ht,69:ft,77:178,78:dt,79:pt,81:gt,82:179,84:180,85:yt,86:mt,87:vt,88:_t,89:bt},{10:lt,44:ht,69:ft,77:192,78:dt,79:pt,81:gt,82:179,84:180,85:yt,86:mt,87:vt,88:_t,89:bt},{10:lt,44:ht,69:ft,77:193,78:dt,79:pt,81:gt,82:179,84:180,85:yt,86:mt,87:vt,88:_t,89:bt},{10:lt,44:ht,69:ft,77:194,78:dt,79:pt,81:gt,82:179,84:180,85:yt,86:mt,87:vt,88:_t,89:bt},{10:lt,44:ht,69:ft,77:195,78:dt,79:pt,81:gt,82:179,84:180,85:yt,86:mt,87:vt,88:_t,89:bt},{10:lt,44:ht,69:ft,77:196,78:dt,79:pt,81:gt,82:179,84:180,85:yt,86:mt,87:vt,88:_t,89:bt},{13:h,18:f,35:197,42:30,43:32,44:p,79:b,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},{13:h,18:f,35:198,42:30,43:32,44:p,65:[1,199],79:b,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},n(tt,[2,43],{21:200,10:nt}),{10:L,12:I,13:N,15:P,16:B,17:R,18:j,30:Y,32:U,39:[1,201],43:69,44:$,48:z,58:q,64:122,68:72,69:H,70:G,71:V,72:Z,73:X,75:62,76:K,79:b,81:Q,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S},n(tt,[2,47],{21:202,10:nt}),n(tt,[2,49],{21:203,10:nt}),n(tt,[2,51],{21:204,10:nt}),n(T,[2,36]),n([10,13,18,44,79,83,85,86,88,89,91,92,93],[2,89]),n(J,[2,115],{83:xt}),n(wt,[2,120],{84:206,10:lt,44:ht,69:ft,78:dt,79:pt,81:gt,85:yt,86:mt,87:vt,88:_t,89:bt}),n(kt,[2,122]),n(kt,[2,124]),n(kt,[2,125]),n(kt,[2,126]),n(kt,[2,127]),n(kt,[2,128]),n(kt,[2,129]),n(kt,[2,130]),n(kt,[2,131]),n(kt,[2,132]),n(kt,[2,133]),n(kt,[2,134]),n(J,[2,116],{83:xt}),n(J,[2,117],{83:xt}),n(J,[2,118],{83:xt}),n(J,[2,108],{83:xt}),n(J,[2,109],{83:xt}),n(J,[2,110],{43:32,42:111,13:h,18:f,44:p,79:b,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S}),n(J,[2,111],{43:32,42:111,10:[1,207],13:h,18:f,44:p,79:b,83:x,85:w,86:k,88:A,89:E,91:M,92:D,93:S}),n(J,[2,113],{10:[1,208]}),n(tt,[2,44]),{39:[1,209]},n(tt,[2,48]),n(tt,[2,50]),n(tt,[2,52]),{10:lt,44:ht,69:ft,78:dt,79:pt,81:gt,82:210,84:180,85:yt,86:mt,87:vt,88:_t,89:bt},n(kt,[2,123]),{65:[1,211]},{65:[1,212]},n(tt,[2,45],{21:213,10:nt}),n(wt,[2,121],{84:206,10:lt,44:ht,69:ft,78:dt,79:pt,81:gt,85:yt,86:mt,87:vt,88:_t,89:bt}),n(J,[2,112]),n(J,[2,114]),n(tt,[2,46])],defaultActions:{},parseError:function(t,n){if(!n.recoverable)throw new Error(t);this.trace(t)},parse:function(t){var n=this,e=[0],r=[null],i=[],a=this.table,o="",u=0,s=0,c=0,l=2,h=1,f=i.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,"undefined"==typeof d.yylloc&&(d.yylloc={});var y=d.yylloc;i.push(y);var m=d.options&&d.options.ranges;this.parseError="function"==typeof p.yy.parseError?p.yy.parseError:Object.getPrototypeOf(this).parseError;for(var v,_,b,x,w,k,A,E,M,D=function(){var t;return t=d.lex()||h,"number"!=typeof t&&(t=n.symbols_[t]||t),t},S={};;){if(b=e[e.length-1],this.defaultActions[b]?x=this.defaultActions[b]:((null===v||"undefined"==typeof v)&&(v=D()),x=a[b]&&a[b][v]),"undefined"==typeof x||!x.length||!x[0]){var T="";M=[];for(k in a[b])this.terminals_[k]&&k>l&&M.push("'"+this.terminals_[k]+"'");T=d.showPosition?"Parse error on line "+(u+1)+":\n"+d.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(u+1)+": Unexpected "+(v==h?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[v]||v,line:d.yylineno,loc:y,expected:M})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+v);switch(x[0]){case 1:e.push(v),r.push(d.yytext),i.push(d.yylloc),e.push(x[1]),v=null,_?(v=_,_=null):(s=d.yyleng,o=d.yytext,u=d.yylineno,y=d.yylloc,c>0&&c--);break;case 2:if(A=this.productions_[x[1]][1],S.$=r[r.length-A],S._$={first_line:i[i.length-(A||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(A||1)].first_column,last_column:i[i.length-1].last_column},m&&(S._$.range=[i[i.length-(A||1)].range[0],i[i.length-1].range[1]]),w=this.performAction.apply(S,[o,s,u,p.yy,x[1],r,i].concat(f)),"undefined"!=typeof w)return w;A&&(e=e.slice(0,-1*A*2),r=r.slice(0,-1*A),i=i.slice(0,-1*A)),e.push(this.productions_[x[1]][0]),r.push(S.$),i.push(S._$),E=a[e[e.length-2]][e[e.length-1]],e.push(E);break;case 3:return!0}}return!0}},Et=function(){var t={EOF:1,parseError:function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},setInput:function(t,n){return this.yy=n||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var n=t.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===r.length?this.yylloc.first_column:0)+r[r.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"},test_match:function(t,n){var e,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,n,e,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if(e=this._input.match(this.rules[i[a]]),e&&(!n||e[0].length>n[0].length)){if(n=e,r=a,this.options.backtrack_lexer){if(t=this.test_match(e,i[a]),t!==!1)return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?(t=this.test_match(n,i[r]),t!==!1?t:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,n,e,r){switch(e){case 0:break;case 1:this.begin("string");break;case 2:this.popState();break;case 3:return"STR";case 4:return 69;case 5:return 76;case 6:return 70;case 7:return 71;case 8:return 72;case 9:return 73;case 10:return 12;case 11:return 30;case 12:return 32;case 13:return 13;case 14:return 13;case 15:return 13;case 16:return 13;case 17:return 13;case 18:return 13;case 19:return 79;case 20:return 88;case 21:return 86;case 22:return 8;case 23:return 83;case 24:return 93;case 25:return 16;case 26:return 15;case 27:return 17;case 28:return 18;case 29:return 51;case 30:return 49;case 31:return 50;case 32:return 52;case 33:return 56;case 34:return 54;case 35:return 55;case 36:return 57;case 37:return 56;case 38:return 54;case 39:return 55;case 40:return 57;case 41:return 61;case 42:return 59;case 43:return 60;case 44:return 62;case 45:return 48;case 46:return 53;case 47:return 58;case 48:return 44;case 49:return 89;case 50:return 91;case 51:return 81;case 52:return 92;case 53:return 92;case 54:return 85;case 55:return 63;case 56:return 38;case 57:return 39;case 58:return 36;case 59:return 37;case 60:return 40;case 61:return 41;case 62:return 96;case 63:return 9;case 64:return 10;case 65:return 11}},rules:[/^(?:%%[^\n]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:v\b)/,/^(?:\s*--[x]\s*)/,/^(?:\s*-->\s*)/,/^(?:\s*--[o]\s*)/,/^(?:\s*---\s*)/,/^(?:\s*-\.-[x]\s*)/,/^(?:\s*-\.->\s*)/,/^(?:\s*-\.-[o]\s*)/,/^(?:\s*-\.-\s*)/,/^(?:\s*.-[x]\s*)/,/^(?:\s*\.->\s*)/,/^(?:\s*\.-[o]\s*)/,/^(?:\s*\.-\s*)/,/^(?:\s*==[x]\s*)/,/^(?:\s*==>\s*)/,/^(?:\s*==[o]\s*)/,/^(?:\s*==[\=]\s*)/,/^(?:\s*--\s*)/,/^(?:\s*-\.\s*)/,/^(?:\s*==\s*)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:[\u0021-\u0027\u002A-\u002E\u003F\u0041-\u005A\u005C\u005F-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC_\/])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:\n+)/,/^(?:\s)/,/^(?:$)/],conditions:{string:{rules:[2,3],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65],inclusive:!0}}};return t}();return At.lexer=Et,t.prototype=At,At.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof e&&(e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(n){n[1]||(console.log("Usage: "+n[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(n[1]),"utf8");return e.parser.parse(i)},"undefined"!=typeof n&&t.main===n&&e.main(r.argv.slice(1)))}).call(this,t("_process"))},{_process:3,fs:1,path:2}],95:[function(t,n,e){(function(n){"use strict";function r(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n["default"]=t,n}var i=t("../../logger"),a=r(i),o=t("moment"),u=new a.Log,s="",c="",l=[],h=[],f="";e.clear=function(){l=[],h=[],f="",c="",y=0,d=void 0},e.setDateFormat=function(t){s=t},e.getDateFormat=function(){return s},e.setTitle=function(t){c=t},e.getTitle=function(){return c},e.addSection=function(t){f=t,l.push(t)},e.findTaskById=function(t){var n;for(n=0;n<h.length;n++)if(h[n].id===t)return h[n]},e.getTasks=function(){var t;for(t=1e4;t<h.length;t++)h[t].startTime=o(h[t].startTime).format(s),h[t].endTime=o(h[t].endTime).format(s);return h};var d,p=function(t,n,r){r=r.trim();var i=/^after\s+([\d\w\-]+)/,a=i.exec(r.trim());if(null!==a){var s=e.findTaskById(a[1]);if("undefined"==typeof s){var c=new Date;return c.setHours(0,0,0,0),c}return s.endTime}return o(r,n.trim(),!0).isValid()?o(r,n.trim(),!0).toDate():(u.debug("Invalid date:"+r),u.debug("With date format:"+n.trim()),new Date)},g=function(t,n,e){if(e=e.trim(),o(e,n.trim(),!0).isValid())return o(e,n.trim()).toDate();var r=o(t),i=/^([\d]+)([wdhms])/,a=i.exec(e.trim());if(null!==a){switch(a[2]){case"s":r.add(a[1],"seconds");break;case"m":r.add(a[1],"minutes");break;case"h":r.add(a[1],"hours");break;case"d":r.add(a[1],"days");break;case"w":r.add(a[1],"weeks")}return r.toDate()}return r.toDate()},y=0,m=function(t){return"undefined"==typeof t?(y+=1,"task"+y):t},v=function(t,n){var r;r=":"===n.substr(0,1)?n.substr(1,n.length):n;for(var i=r.split(","),a={},o=e.getDateFormat(),u=!0;u;)u=!1,i[0].match(/^\s*active\s*$/)&&(a.active=!0,i.shift(1),u=!0),i[0].match(/^\s*done\s*$/)&&(a.done=!0,i.shift(1),u=!0),i[0].match(/^\s*crit\s*$/)&&(a.crit=!0,i.shift(1),u=!0);var s;for(s=0;s<i.length;s++)i[s]=i[s].trim();switch(i.length){case 1:a.id=m(),a.startTime=t.endTime,a.endTime=g(a.startTime,o,i[0]);break;case 2:a.id=m(),a.startTime=p(void 0,o,i[0]),a.endTime=g(a.startTime,o,i[1]);break;case 3:a.id=m(i[0]),a.startTime=p(void 0,o,i[1]),a.endTime=g(a.startTime,o,i[2])}return a};e.addTask=function(t,n){var e={section:f,type:f,description:t,task:t},r=v(d,n);e.startTime=r.startTime,e.endTime=r.endTime,e.id=r.id,e.active=r.active,e.done=r.done,e.crit=r.crit,d=e,h.push(e)},e.parseError=function(t,e){n.mermaidAPI.parseError(t,e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../logger":102,moment:84}],96:[function(t,n){"use strict";var e=t("./parser/gantt").parser;e.yy=t("./ganttDb");var r,i=t("../../d3"),a=t("moment"),o={titleTopMargin:25,barHeight:20,
|
||
barGap:4,topPadding:50,sidePadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"'};n.exports.setConf=function(t){var n=Object.keys(t);n.forEach(function(n){o[n]=t[n]})};var u;n.exports.draw=function(t,n){function s(t,n,e){var r=o.barHeight,a=r+o.barGap,u=o.topPadding,s=o.sidePadding,d=i.scale.linear().domain([0,k.length]).range(["#00B9FA","#F95002"]).interpolate(i.interpolateHcl);l(s,u,n,e),c(t,a,u,s,r,d,n,e),h(a,u,s,r,d),f(s,u,n,e)}function c(t,n,e,r,i,a,u){_.append("g").selectAll("rect").data(t).enter().append("rect").attr("x",0).attr("y",function(t,r){return r*n+e-2}).attr("width",function(){return u-r/2}).attr("height",n).attr("class",function(t){for(var n=0;n<k.length;n++)if(t.type===k[n])return"section section"+n%o.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*n+e}).attr("width",function(t){return w(t.endTime)-w(t.startTime)}).attr("height",i).attr("class",function(t){for(var n="task ",e=0,r=0;r<k.length;r++)t.type===k[r]&&(e=r%o.numberSectionStyles);return t.active?t.crit?n+" activeCrit"+e:n+" active"+e:t.done?t.crit?n+" doneCrit"+e:n+" done"+e:t.crit?n+" crit"+e:n+" task"+e}),s.append("text").text(function(t){return t.task}).attr("font-size",o.fontSize).attr("x",function(t){var n=w(t.startTime),e=w(t.endTime),i=this.getBBox().width;return i>e-n?e+i+1.5*o.sidePadding>u?n+r-5:e+r+5:(e-n)/2+n+r}).attr("y",function(t,r){return r*n+o.barHeight/2+(o.fontSize/2-2)+e}).attr("text-height",i).attr("class",function(t){for(var n=w(t.startTime),e=w(t.endTime),r=this.getBBox().width,i=0,a=0;a<k.length;a++)t.type===k[a]&&(i=a%o.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>e-n?e+r+1.5*o.sidePadding>u?"taskTextOutsideLeft taskTextOutside"+i+" "+s:"taskTextOutsideRight taskTextOutside"+i+" "+s:"taskText taskText"+i+" "+s})}function l(t,n,e,a){var u,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 o.axisFormatter&&(l=[],o.axisFormatter.forEach(function(t){var n=[];n[0]=t[0],n[1]=t[1],l.push(n)})),u=s.concat(l).concat(c);var h=i.svg.axis().scale(w).orient("bottom").tickSize(-a+n+o.gridLineStartPadding,0,0).tickFormat(i.time.format.multi(u));r>7&&230>r&&(h=h.ticks(i.time.monday.range)),_.append("g").attr("class","grid").attr("transform","translate("+t+", "+(a-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,n){for(var e=[],r=0,i=0;i<k.length;i++)e[i]=[k[i],g(k[i],E)];_.append("g").selectAll("text").data(e).enter().append("text").text(function(t){return t[0]}).attr("x",10).attr("y",function(i,a){if(!(a>0))return i[1]*t/2+n;for(var o=0;a>o;o++)return r+=e[a-1][1],i[1]*t/2+r*t+n}).attr("class",function(t){for(var n=0;n<k.length;n++)if(t[0]===k[n])return"sectionTitle sectionTitle"+n%o.numberSectionStyles;return"sectionTitle"})}function f(t,n,e,r){var i=_.append("g").attr("class","today"),a=new Date;i.append("line").attr("x1",w(a)+t).attr("x2",w(a)+t).attr("y1",o.titleTopMargin).attr("y2",r-o.titleTopMargin).attr("class","today")}function d(t){for(var n={},e=[],r=0,i=t.length;i>r;++r)n.hasOwnProperty(t[r])||(n[t[r]]=!0,e.push(t[r]));return e}function p(t){for(var n=t.length,e={};n;)e[t[--n]]=(e[t[n]]||0)+1;return e}function g(t,n){return p(n)[t]||0}e.yy.clear(),e.parse(t);var y=document.getElementById(n);u=y.parentElement.offsetWidth,"undefined"==typeof u&&(u=1200),"undefined"!=typeof o.useWidth&&(u=o.useWidth);var m=e.yy.getTasks(),v=m.length*(o.barHeight+o.barGap)+2*o.topPadding;y.setAttribute("height","100%"),y.setAttribute("viewBox","0 0 "+u+" "+v);var _=i.select("#"+n),b=i.min(m,function(t){return t.startTime}),x=i.max(m,function(t){return t.endTime}),w=i.time.scale().domain([i.min(m,function(t){return t.startTime}),i.max(m,function(t){return t.endTime})]).rangeRound([0,u-150]),k=[];r=a.duration(x-b).asDays();for(var A=0;A<m.length;A++)k.push(m[A].type);var E=k;k=d(k),s(m,u,v),"undefined"!=typeof o.useWidth&&y.setAttribute("width",u),_.append("text").text(e.yy.getTitle()).attr("x",u/2).attr("y",o.titleTopMargin).attr("class","titleText")}},{"../../d3":86,"./ganttDb":95,"./parser/gantt":97,moment:84}],97:[function(t,n,e){(function(r){"use strict";var i=function(){function t(){this.yy={}}var n=function(t,n,e,r){for(e=e||{},r=t.length;r--;e[t[r]]=n);return e},e=[6,8,10,11,12,13,14],r=[1,9],i=[1,10],a=[1,11],o=[1,12],u={trace:function(){},yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,dateFormat:11,title:12,section:13,taskTxt:14,taskData:15,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",11:"dateFormat",12:"title",13:"section",14:"taskTxt",15:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,1],[9,1],[9,2]],performAction:function(t,n,e,r,i,a){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:r.setDateFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 9:r.setTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 10:r.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 11:r.addTask(a[o-1],a[o]),this.$="task"}},table:[{3:1,4:[1,2]},{1:[3]},n(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:i,13:a,14:o},n(e,[2,7],{1:[2,1]}),n(e,[2,3]),{9:13,11:r,12:i,13:a,14:o},n(e,[2,5]),n(e,[2,6]),n(e,[2,8]),n(e,[2,9]),n(e,[2,10]),{15:[1,14]},n(e,[2,4]),n(e,[2,11])],defaultActions:{},parseError:function(t,n){if(!n.recoverable)throw new Error(t);this.trace(t)},parse:function(t){var n=this,e=[0],r=[null],i=[],a=this.table,o="",u=0,s=0,c=0,l=2,h=1,f=i.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,"undefined"==typeof d.yylloc&&(d.yylloc={});var y=d.yylloc;i.push(y);var m=d.options&&d.options.ranges;this.parseError="function"==typeof p.yy.parseError?p.yy.parseError:Object.getPrototypeOf(this).parseError;for(var v,_,b,x,w,k,A,E,M,D=function(){var t;return t=d.lex()||h,"number"!=typeof t&&(t=n.symbols_[t]||t),t},S={};;){if(b=e[e.length-1],this.defaultActions[b]?x=this.defaultActions[b]:((null===v||"undefined"==typeof v)&&(v=D()),x=a[b]&&a[b][v]),"undefined"==typeof x||!x.length||!x[0]){var T="";M=[];for(k in a[b])this.terminals_[k]&&k>l&&M.push("'"+this.terminals_[k]+"'");T=d.showPosition?"Parse error on line "+(u+1)+":\n"+d.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(u+1)+": Unexpected "+(v==h?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[v]||v,line:d.yylineno,loc:y,expected:M})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+v);switch(x[0]){case 1:e.push(v),r.push(d.yytext),i.push(d.yylloc),e.push(x[1]),v=null,_?(v=_,_=null):(s=d.yyleng,o=d.yytext,u=d.yylineno,y=d.yylloc,c>0&&c--);break;case 2:if(A=this.productions_[x[1]][1],S.$=r[r.length-A],S._$={first_line:i[i.length-(A||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(A||1)].first_column,last_column:i[i.length-1].last_column},m&&(S._$.range=[i[i.length-(A||1)].range[0],i[i.length-1].range[1]]),w=this.performAction.apply(S,[o,s,u,p.yy,x[1],r,i].concat(f)),"undefined"!=typeof w)return w;A&&(e=e.slice(0,-1*A*2),r=r.slice(0,-1*A),i=i.slice(0,-1*A)),e.push(this.productions_[x[1]][0]),r.push(S.$),i.push(S._$),E=a[e[e.length-2]][e[e.length-1]],e.push(E);break;case 3:return!0}}return!0}},s=function(){var t={EOF:1,parseError:function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},setInput:function(t,n){return this.yy=n||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var n=t.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===r.length?this.yylloc.first_column:0)+r[r.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"},test_match:function(t,n){var e,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,n,e,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if(e=this._input.match(this.rules[i[a]]),e&&(!n||e[0].length>n[0].length)){if(n=e,r=a,this.options.backtrack_lexer){if(t=this.test_match(e,i[a]),t!==!1)return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?(t=this.test_match(n,i[r]),t!==!1?t:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,n,e,r){switch(e){case 0:return 10;case 1:break;case 2:break;case 3:break;case 4:return 4;case 5:return 11;case 6:return"date";case 7:return 12;case 8:return 13;case 9:return 14;case 10:return 15;case 11:return":";case 12:return 6;case 13:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return t}();return u.lexer=s,t.prototype=u,u.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof e&&(e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(n){n[1]||(console.log("Usage: "+n[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(n[1]),"utf8");return e.parser.parse(i)},"undefined"!=typeof n&&t.main===n&&e.main(r.argv.slice(1)))}).call(this,t("_process"))},{_process:3,fs:1,path:2}],98:[function(t,n,e){(function(r){"use strict";var i=function(){function t(){this.yy={}}var n=function(t,n,e,r){for(e=e||{},r=t.length;r--;e[t[r]]=n);return e},e=[6,8,10,11,15,17,19,20,22,33],r=[2,2],i=[1,6],a=[1,8],o=[1,9],u=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,17],f=[1,18],d=[2,7],p=[6,8,10,11,15,17,18,19,20,21,22,33],g=[6,8,10,11,15,17,18,19,20,22,33],y=[1,46],m=[1,49],v=[1,53],_={trace:function(){},yy:{},symbols_:{error:2,start:3,SD:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,participant:11,actor:12,signal:13,note_statement:14,title:15,text:16,loop:17,end:18,opt:19,alt:20,"else":21,note:22,placement:23,text2:24,over:25,spaceList:26,actor_pair:27,",":28,left_of:29,right_of:30,signaltype:31,actors:32,ACTOR:33,SOLID_OPEN_ARROW:34,DOTTED_OPEN_ARROW:35,SOLID_ARROW:36,DOTTED_ARROW:37,SOLID_CROSS:38,DOTTED_CROSS:39,TXT:40,$accept:0,$end:1},terminals_:{2:"error",4:"SD",6:"EOF",8:"SPACE",10:"NL",11:"participant",15:"title",16:"text",17:"loop",18:"end",19:"opt",20:"alt",21:"else",22:"note",25:"over",28:",",29:"left_of",30:"right_of",33:"ACTOR",34:"SOLID_OPEN_ARROW",35:"DOTTED_OPEN_ARROW",36:"SOLID_ARROW",37:"DOTTED_ARROW",38:"SOLID_CROSS",39:"DOTTED_CROSS",40:"TXT"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,3],[9,2],[9,2],[9,4],[9,4],[9,4],[9,7],[14,4],[14,5],[26,2],[26,1],[27,1],[27,3],[23,1],[23,1],[13,4],[32,2],[32,1],[12,1],[31,1],[31,1],[31,1],[31,1],[31,1],[31,1],[24,1]],performAction:function(t,n,e,r,i,a){var o=a.length-1;switch(i){case 1:return r.apply(a[o-1]),a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:this.$=a[o-1];break;case 12:a[o-1].unshift({type:"loopStart",loopText:a[o-2].actor,signalType:r.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 13:a[o-1].unshift({type:"optStart",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_END}),this.$=a[o-1];break;case 14:a[o-4].unshift({type:"altStart",altText:a[o-5].actor,signalType:r.LINETYPE.ALT_START}),a[o-4].push({type:"else",altText:a[o-2].actor,signalType:r.LINETYPE.ALT_ELSE}),a[o-4]=a[o-4].concat(a[o-1]),a[o-4].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[o-4];break;case 15:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 19:this.$=a[o];break;case 20:this.$=[a[o-2],a[o]];break;case 21:this.$=r.PLACEMENT.LEFTOF;break;case 22:this.$=r.PLACEMENT.RIGHTOF;break;case 23:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 26:this.$={type:"addActor",actor:a[o]};break;case 27:this.$=r.LINETYPE.SOLID_OPEN;break;case 28:this.$=r.LINETYPE.DOTTED_OPEN;break;case 29:this.$=r.LINETYPE.SOLID;break;case 30:this.$=r.LINETYPE.DOTTED;break;case 31:this.$=r.LINETYPE.SOLID_CROSS;break;case 32:this.$=r.LINETYPE.DOTTED_CROSS;break;case 33:this.$=a[o].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},n(e,r,{5:3}),{6:[1,4],7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},n(e,d,{1:[2,1]}),n(p,[2,3]),{9:19,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},n(p,[2,5]),n(p,[2,6]),{12:20,33:f},{10:[1,21]},{10:[1,22]},{8:[1,23]},{12:24,33:f},{12:25,33:f},{12:26,33:f},{31:27,34:[1,28],35:[1,29],36:[1,30],37:[1,31],38:[1,32],39:[1,33]},{23:34,25:[1,35],29:[1,36],30:[1,37]},n([6,8,10,11,15,17,18,19,20,21,22,28,33,34,35,36,37,38,39,40],[2,26]),n(p,[2,4]),{10:[1,38]},n(p,[2,9]),n(p,[2,10]),{16:[1,39]},n(g,r,{5:40}),n(g,r,{5:41}),n([6,8,10,11,15,17,19,20,21,22,33],r,{5:42}),{12:43,33:f},{33:[2,27]},{33:[2,28]},{33:[2,29]},{33:[2,30]},{33:[2,31]},{33:[2,32]},{12:44,33:f},{8:y,26:45},{33:[2,21]},{33:[2,22]},n(p,[2,8]),{10:[1,47]},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,48],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,50],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,21:[1,51],22:h,33:f},{24:52,40:v},{24:54,40:v},{12:56,27:55,33:f},{8:y,26:57,33:[2,18]},n(p,[2,11]),n(p,[2,12]),n(p,d),n(p,[2,13]),{12:58,33:f},{10:[2,23]},{10:[2,33]},{10:[2,15]},{12:59,33:f},{28:[1,60],33:[2,19]},{33:[2,17]},n(g,r,{5:61}),{10:[2,16]},{12:62,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,63],19:c,20:l,22:h,33:f},{33:[2,20]},n(p,[2,14])],defaultActions:{28:[2,27],29:[2,28],30:[2,29],31:[2,30],32:[2,31],33:[2,32],36:[2,21],37:[2,22],52:[2,23],53:[2,33],54:[2,15],57:[2,17],59:[2,16],62:[2,20]},parseError:function(t,n){if(!n.recoverable)throw new Error(t);this.trace(t)},parse:function(t){var n=this,e=[0],r=[null],i=[],a=this.table,o="",u=0,s=0,c=0,l=2,h=1,f=i.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,"undefined"==typeof d.yylloc&&(d.yylloc={});var y=d.yylloc;i.push(y);var m=d.options&&d.options.ranges;this.parseError="function"==typeof p.yy.parseError?p.yy.parseError:Object.getPrototypeOf(this).parseError;for(var v,_,b,x,w,k,A,E,M,D=function(){var t;return t=d.lex()||h,"number"!=typeof t&&(t=n.symbols_[t]||t),t},S={};;){if(b=e[e.length-1],this.defaultActions[b]?x=this.defaultActions[b]:((null===v||"undefined"==typeof v)&&(v=D()),x=a[b]&&a[b][v]),"undefined"==typeof x||!x.length||!x[0]){var T="";M=[];for(k in a[b])this.terminals_[k]&&k>l&&M.push("'"+this.terminals_[k]+"'");T=d.showPosition?"Parse error on line "+(u+1)+":\n"+d.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(u+1)+": Unexpected "+(v==h?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[v]||v,line:d.yylineno,loc:y,expected:M})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+v);switch(x[0]){case 1:e.push(v),r.push(d.yytext),i.push(d.yylloc),e.push(x[1]),v=null,_?(v=_,_=null):(s=d.yyleng,o=d.yytext,u=d.yylineno,y=d.yylloc,c>0&&c--);break;case 2:if(A=this.productions_[x[1]][1],S.$=r[r.length-A],S._$={first_line:i[i.length-(A||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(A||1)].first_column,last_column:i[i.length-1].last_column},m&&(S._$.range=[i[i.length-(A||1)].range[0],i[i.length-1].range[1]]),w=this.performAction.apply(S,[o,s,u,p.yy,x[1],r,i].concat(f)),"undefined"!=typeof w)return w;A&&(e=e.slice(0,-1*A*2),r=r.slice(0,-1*A),i=i.slice(0,-1*A)),e.push(this.productions_[x[1]][0]),r.push(S.$),i.push(S._$),E=a[e[e.length-2]][e[e.length-1]],e.push(E);break;case 3:return!0}}return!0}},b=function(){var t={EOF:1,parseError:function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},setInput:function(t,n){return this.yy=n||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var n=t.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===r.length?this.yylloc.first_column:0)+r[r.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"},test_match:function(t,n){var e,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,n,e,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if(e=this._input.match(this.rules[i[a]]),e&&(!n||e[0].length>n[0].length)){if(n=e,r=a,this.options.backtrack_lexer){if(t=this.test_match(e,i[a]),t!==!1)return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?(t=this.test_match(n,i[r]),t!==!1?t:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,n,e,r){switch(e){case 0:return 10;case 1:return 38;case 2:return 39;case 3:return 36;case 4:return 37;case 5:break;case 6:break;case 7:break;case 8:return 11;case 9:return 19;case 10:return 17;case 11:return 20;case 12:return 21;case 13:return 18;case 14:return 29;case 15:return 30;case 16:return 25;case 17:return 22;case 18:return 15;case 19:return 4;case 20:return 28;case 21:return 10;case 22:return 33;case 23:return 34;case 24:return 35;case 25:return 36;case 26:return 37;case 27:return 40;case 28:return 6;case 29:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:[\-][x])/i,/^(?:[\-][\-][x])/i,/^(?:[\-][>][>])/i,/^(?:[\-][\-][>][>])/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:participant\b)/i,/^(?:opt\b)/i,/^(?:loop\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\->:\n,;]+)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?::[^#\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29],inclusive:!0}}};return t}();return _.lexer=b,t.prototype=_,_.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof e&&(e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(n){n[1]||(console.log("Usage: "+n[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(n[1]),"utf8");return e.parser.parse(i)},"undefined"!=typeof n&&t.main===n&&e.main(r.argv.slice(1)))}).call(this,t("_process"))},{_process:3,fs:1,path:2}],99:[function(t,n,e){(function(n){"use strict";function r(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n["default"]=t,n}var i=t("../../logger"),a=r(i),o={},u=[],s=[],c=[],l=new a.Log;e.addActor=function(t,n,e){o[t]={name:n,description:e},u.push(t)},e.addMessage=function(t,n,e,r){s.push({from:t,to:n,message:e,answer:r})},e.addSignal=function(t,n,e,r){l.debug("Adding message from="+t+" to="+n+" message="+e+" type="+r),s.push({from:t,to:n,message:e,type:r})},e.getMessages=function(){return s},e.getActors=function(){return o},e.getActor=function(t){return o[t]},e.getActorKeys=function(){return Object.keys(o)},e.clear=function(){o={},s=[]},e.LINETYPE={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16},e.ARROWTYPE={FILLED:0,OPEN:1},e.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},e.addNote=function(t,n,r){var i={actor:t,placement:n,message:r};c.push(i),s.push({from:t,to:t,message:r,type:e.LINETYPE.NOTE,placement:n})},e.parseError=function(t,e){n.mermaidAPI.parseError(t,e)},e.apply=function(t){if(t instanceof Array)t.forEach(function(t){e.apply(t)});else switch(t.type){case"addActor":e.addActor(t.actor,t.actor,t.actor);break;case"addNote":e.addNote(t.actor,t.placement,t.text);break;case"addMessage":e.addSignal(t.from,t.to,t.msg,t.signalType);break;case"loopStart":e.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":e.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":e.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":e.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":e.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":e.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":e.addSignal(void 0,void 0,void 0,t.signalType)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../logger":102}],100:[function(t,n,e){"use strict";function r(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n["default"]=t,n}var i=t("../../logger"),a=r(i),o=t("./parser/sequenceDiagram").parser;o.yy=t("./sequenceDb");var u=t("./svgDraw"),s=t("../../d3"),c=new a.Log,l={diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!1,bottomMarginAdj:1};e.bounds={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,list:[],init:function(){this.list=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,n,e,r){t[n]="undefined"==typeof t[n]?e:r(e,t[n])},updateLoops:function(t,n,r,i){var a=this,o=0;this.list.forEach(function(u){o++;var s=a.list.length-o+1;a.updateVal(u,"startx",t-s*l.boxMargin,Math.min),a.updateVal(u,"starty",n-s*l.boxMargin,Math.min),a.updateVal(u,"stopx",r+s*l.boxMargin,Math.max),a.updateVal(u,"stopy",i+s*l.boxMargin,Math.max),a.updateVal(e.bounds.data,"startx",t-s*l.boxMargin,Math.min),a.updateVal(e.bounds.data,"starty",n-s*l.boxMargin,Math.min),a.updateVal(e.bounds.data,"stopx",r+s*l.boxMargin,Math.max),a.updateVal(e.bounds.data,"stopy",i+s*l.boxMargin,Math.max)})},insert:function(t,n,r,i){var a,o,u,s;a=Math.min(t,r),u=Math.max(t,r),o=Math.min(n,i),s=Math.max(n,i),this.updateVal(e.bounds.data,"startx",a,Math.min),this.updateVal(e.bounds.data,"starty",o,Math.min),this.updateVal(e.bounds.data,"stopx",u,Math.max),this.updateVal(e.bounds.data,"stopy",s,Math.max),this.updateLoops(a,o,u,s)},newLoop:function(t){this.list.push({startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t})},endLoop:function(){var t=this.list.pop();return t},addElseToLoop:function(t){var n=this.list.pop();n.elsey=e.bounds.getVerticalPos(),n.elseText=t,this.list.push(n)},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,n,r,i){var a=u.getNoteRect();a.x=n,a.y=r,a.width=l.width,a["class"]="note";var o=t.append("g"),s=u.drawRect(o,a),c=u.getTextObj();c.x=n-4,c.y=r-13,c.textMargin=l.noteMargin,c.dy="1em",c.text=i.message,c["class"]="noteText";var h=u.drawText(o,c,l.width-l.noteMargin),f=h[0][0].getBBox().height;
|
||
|
||
f>l.width?(h.remove(),o=t.append("g"),h=u.drawText(o,c,2*l.width-l.noteMargin),f=h[0][0].getBBox().height,s.attr("width",2*l.width),e.bounds.insert(n,r,n+2*l.width,r+2*l.noteMargin+f)):e.bounds.insert(n,r,n+l.width,r+2*l.noteMargin+f),s.attr("height",f+2*l.noteMargin),e.bounds.bumpVerticalPos(f+2*l.noteMargin)},f=function(t,n,r,i,a){var u,s=t.append("g"),c=n+(r-n)/2,l=s.append("text").attr("x",c).attr("y",i-7).style("text-anchor","middle").attr("class","messageText").text(a.message);u="undefined"!=typeof l[0][0].getBBox?l[0][0].getBBox().width:l[0][0].getBoundingClientRect();var h;if(n===r){h=s.append("path").attr("d","M "+n+","+i+" C "+(n+60)+","+(i-10)+" "+(n+60)+","+(i+30)+" "+n+","+(i+20)),e.bounds.bumpVerticalPos(30);var f=Math.max(u/2,100);e.bounds.insert(n-f,e.bounds.getVerticalPos()-10,r+f,e.bounds.getVerticalPos())}else h=s.append("line"),h.attr("x1",n),h.attr("y1",i),h.attr("x2",r),h.attr("y2",i),e.bounds.insert(n,e.bounds.getVerticalPos()-10,r,e.bounds.getVerticalPos());a.type===o.yy.LINETYPE.DOTTED||a.type===o.yy.LINETYPE.DOTTED_CROSS||a.type===o.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"),(a.type===o.yy.LINETYPE.SOLID||a.type===o.yy.LINETYPE.DOTTED)&&h.attr("marker-end","url("+d+"#crosshead)"),(a.type===o.yy.LINETYPE.SOLID_CROSS||a.type===o.yy.LINETYPE.DOTTED_CROSS)&&h.attr("marker-end","url("+d+"#crosshead)")};n.exports.drawActors=function(t,n,r,i){var a;for(a=0;a<r.length;a++){var o=r[a];n[o].x=a*l.actorMargin+a*l.width,n[o].y=i,n[o].width=l.diagramMarginY,n[o].height=l.diagramMarginY,u.drawActor(t,n[o].x,i,n[o].description,l),e.bounds.insert(n[o].x,i,n[o].x+l.width,l.height)}e.bounds.bumpVerticalPos(l.height)},n.exports.setConf=function(t){var n=Object.keys(t);n.forEach(function(n){l[n]=t[n]})},n.exports.draw=function(t,r){o.yy.clear(),o.parse(t+"\n"),e.bounds.init();var i,a,d=s.select("#"+r),p=o.yy.getActors(),g=o.yy.getActorKeys(),y=o.yy.getMessages();n.exports.drawActors(d,p,g,0),u.insertArrowHead(d),u.insertArrowCrossHead(d),y.forEach(function(t){var n;switch(t.type){case o.yy.LINETYPE.NOTE:e.bounds.bumpVerticalPos(l.boxMargin),i=p[t.from].x,a=p[t.to].x,0!==t.placement?h(d,i+(l.width+l.actorMargin)/2,e.bounds.getVerticalPos(),t):h(d,i-(l.width+l.actorMargin)/2,e.bounds.getVerticalPos(),t);break;case o.yy.LINETYPE.LOOP_START:e.bounds.bumpVerticalPos(l.boxMargin),e.bounds.newLoop(t.message),e.bounds.bumpVerticalPos(l.boxMargin+l.boxTextMargin);break;case o.yy.LINETYPE.LOOP_END:n=e.bounds.endLoop(),u.drawLoop(d,n,"loop",l),e.bounds.bumpVerticalPos(l.boxMargin);break;case o.yy.LINETYPE.OPT_START:e.bounds.bumpVerticalPos(l.boxMargin),e.bounds.newLoop(t.message),e.bounds.bumpVerticalPos(l.boxMargin+l.boxTextMargin);break;case o.yy.LINETYPE.OPT_END:n=e.bounds.endLoop(),u.drawLoop(d,n,"opt",l),e.bounds.bumpVerticalPos(l.boxMargin);break;case o.yy.LINETYPE.ALT_START:e.bounds.bumpVerticalPos(l.boxMargin),e.bounds.newLoop(t.message),e.bounds.bumpVerticalPos(l.boxMargin+l.boxTextMargin);break;case o.yy.LINETYPE.ALT_ELSE:e.bounds.bumpVerticalPos(l.boxMargin),n=e.bounds.addElseToLoop(t.message),e.bounds.bumpVerticalPos(l.boxMargin);break;case o.yy.LINETYPE.ALT_END:n=e.bounds.endLoop(),u.drawLoop(d,n,"alt",l),e.bounds.bumpVerticalPos(l.boxMargin);break;default:e.bounds.bumpVerticalPos(l.messageMargin),i=p[t.from].x+l.width/2,a=p[t.to].x+l.width/2,f(d,i,a,e.bounds.getVerticalPos(),t)}}),l.mirrorActors&&(e.bounds.bumpVerticalPos(2*l.boxMargin),n.exports.drawActors(d,p,g,e.bounds.getVerticalPos()));var m=e.bounds.getBounds();c.debug("For line height fix Querying: #"+r+" .actor-line");var v=s.selectAll("#"+r+" .actor-line");v.attr("y2",m.stopy);var _=m.stopy-m.starty+2*l.diagramMarginY;l.mirrorActors&&(_=_-l.boxMargin+l.bottomMarginAdj);var b=m.stopx-m.startx+2*l.diagramMarginX;l.useMaxWidth?(d.attr("height","100%"),d.attr("width","100%"),d.attr("style","max-width:"+b+"px;")):(d.attr("height",_),d.attr("width",b)),d.attr("viewBox",m.startx-l.diagramMarginX+" -"+l.diagramMarginY+" "+b+" "+_)}},{"../../d3":86,"../../logger":102,"./parser/sequenceDiagram":98,"./sequenceDb":99,"./svgDraw":101}],101:[function(t,n,e){"use strict";e.drawRect=function(t,n){var e=t.append("rect");return e.attr("x",n.x),e.attr("y",n.y),e.attr("fill",n.fill),e.attr("stroke",n.stroke),e.attr("width",n.width),e.attr("height",n.height),e.attr("rx",n.rx),e.attr("ry",n.ry),"undefined"!=typeof n["class"]&&e.attr("class",n["class"]),e},e.drawText=function(t,n,e){var r=n.text.replace(/<br\/?>/gi," "),i=t.append("text");i.attr("x",n.x),i.attr("y",n.y),i.style("text-anchor",n.anchor),i.attr("fill",n.fill),"undefined"!=typeof n["class"]&&i.attr("class",n["class"]);var a=i.append("tspan");return a.attr("x",n.x+2*n.textMargin),a.text(r),"undefined"!=typeof i.textwrap&&i.textwrap({x:n.x,y:n.y,width:e,height:1800},n.textMargin),i},e.drawLabel=function(t,n){var r=e.getNoteRect();r.x=n.x,r.y=n.y,r.width=50,r.height=20,r.fill="#526e52",r.stroke="none",r["class"]="labelBox",e.drawRect(t,r),n.y=n.y+n.labelMargin,n.x=n.x+.5*n.labelMargin,n.fill="white",e.drawText(t,n)};var r=-1;e.drawActor=function(t,n,i,a,o){var u=n+o.width/2,s=t.append("g");0===i&&(r++,s.append("line").attr("id","actor"+r).attr("x1",u).attr("y1",5).attr("x2",u).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));var c=e.getNoteRect();c.x=n,c.y=i,c.fill="#eaeaea",c.width=o.width,c.height=o.height,c["class"]="actor",c.rx=3,c.ry=3,e.drawRect(s,c),s.append("text").attr("x",u).attr("y",i+o.height/2+5).attr("class","actor").style("text-anchor","middle").text(a)},e.drawLoop=function(t,n,r,i){var a=t.append("g"),o=function(t,n,e,r){a.append("line").attr("x1",t).attr("y1",n).attr("x2",e).attr("y2",r).attr("stroke-width",2).attr("stroke","#526e52").attr("class","loopLine")};o(n.startx,n.starty,n.stopx,n.starty),o(n.stopx,n.starty,n.stopx,n.stopy),o(n.startx,n.stopy,n.stopx,n.stopy),o(n.startx,n.starty,n.startx,n.stopy),"undefined"!=typeof n.elsey&&o(n.startx,n.elsey,n.stopx,n.elsey);var u=e.getTextObj();u.text=r,u.x=n.startx,u.y=n.starty,u.labelMargin=1.5*i.boxMargin,u["class"]="labelText",u.fill="white",e.drawLabel(a,u),u=e.getTextObj(),u.text="[ "+n.title+" ]",u.x=n.startx+(n.stopx-n.startx)/2,u.y=n.starty+1.5*i.boxMargin,u.anchor="middle",u["class"]="loopText",e.drawText(a,u),"undefined"!=typeof n.elseText&&(u.text="[ "+n.elseText+" ]",u.y=n.elsey+1.5*i.boxMargin,e.drawText(a,u))},e.insertArrowHead=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},e.insertArrowCrossHead=function(t){var n=t.append("defs"),e=n.append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},e.getTextObj=function(){var t={x:0,y:0,fill:"black","text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0};return t},e.getNoteRect=function(){var t={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};return t}},{}],102:[function(t,n,e){"use strict";function r(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function i(t){var n=t.getUTCHours(),e=t.getUTCMinutes(),r=t.getSeconds(),i=t.getMilliseconds();10>n&&(n="0"+n),10>e&&(e="0"+e),10>r&&(r="0"+r),100>i&&(i="0"+i),10>i&&(i="00"+i);var a=n+":"+e+":"+r+" ("+i+")";return a}var a=function(){function t(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(n,e,r){return e&&t(n.prototype,e),r&&t(n,r),n}}(),o={debug:1,info:2,warn:3,error:4,fatal:5,"default":5},u=o.error;e.setLogLevel=function(t){u=t};var s=function(){function t(n){r(this,t),this.level=n}return a(t,[{key:"log",value:function(t,n){var e=this.level;return"undefined"==typeof e&&(e=u),n>=e&&"undefined"!=typeof console&&"undefined"!=typeof console.log?console.log("["+i(new Date)+"] "+t):void 0}},{key:"trace",value:function(t){this.log(t,o.trace)}},{key:"debug",value:function(t){this.log(t,o.debug)}},{key:"info",value:function(t){this.log(t,o.info)}},{key:"warn",value:function(t){this.log(t,o.warn)}},{key:"error",value:function(t){this.log(t,o.error)}}]),t}();e.Log=s},{}],103:[function(t,n,e){(function(n){"use strict";function r(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n["default"]=t,n}var i=t("./logger"),a=r(i),o=new a.Log,u=t("./diagrams/flowchart/graphDb"),s=t("./utils"),c=t("./diagrams/flowchart/flowRenderer"),l=t("./diagrams/sequenceDiagram/sequenceRenderer"),h=t("./diagrams/example/exampleRenderer"),f=t("./diagrams/example/parser/example"),d=t("./diagrams/flowchart/parser/flow"),p=t("./diagrams/flowchart/parser/dot"),g=t("./diagrams/sequenceDiagram/parser/sequenceDiagram"),y=t("./diagrams/sequenceDiagram/sequenceDb"),m=t("./diagrams/example/exampleDb"),v=t("./diagrams/gantt/ganttRenderer"),_=t("./diagrams/gantt/parser/gantt"),b=t("./diagrams/gantt/ganttDb"),x=t("./d3"),w={logLevel:5,cloneCssStyles:!0,startOnLoad:!0,flowchart:{htmlLabels:!0,useMaxWidth:!0},sequenceDiagram:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,sidePadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:3,axisFormatter:[["%I:%M",function(t){return t.getHours()}],["w. %U",function(t){return 1==t.getDay()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%m-%y",function(t){return t.getMonth()}]]}};a.setLogLevel(w.logLevel);var k=function(t){var n,e=s.detectType(t);switch(e){case"graph":n=d,n.parser.yy=u;break;case"dotGraph":n=p,n.parser.yy=u;break;case"sequenceDiagram":n=g,n.parser.yy=y;break;case"info":n=f,n.parser.yy=m;break;case"gantt":n=_,n.parser.yy=b}try{return n.parse(t),!0}catch(r){return!1}};e.parse=k,e.version=function(){return t("../package.json").version},e.encodeEntities=function(t){var n=t;return n=n.replace(/style.*:\S*#.*;/g,function(t){var n=t.substring(0,t.length-1);return n}),n=n.replace(/classDef.*:\S*#.*;/g,function(t){var n=t.substring(0,t.length-1);return n}),n=n.replace(/#\w+\;/g,function(t){var n=t.substring(1,t.length-1),e=/^\+?\d+$/.test(n);return e?"fl°°"+n+"¶ß":"fl°"+n+"¶ß"})},e.decodeEntities=function(t){var n=t;return n=n.replace(/\fl\°\°/g,function(){return"&#"}),n=n.replace(/\fl\°/g,function(){return"&"}),n=n.replace(/¶ß/g,function(){return";"})};var A=function(t,n,r,i){"undefined"!=typeof i?x.select(i).append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g"):x.select("body").append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g"),window.txt=n,n=e.encodeEntities(n);var a=x.select("#d"+t).node(),f=s.detectType(n),d={};switch(f){case"graph":c.setConf(w.flowchart),c.draw(n,t,!1),w.cloneCssStyles&&(d=c.getClasses(n,!1),s.cloneCssStyles(a.firstChild,d));break;case"dotGraph":c.setConf(w.flowchart),c.draw(n,t,!0),w.cloneCssStyles&&(d=c.getClasses(n,!0),s.cloneCssStyles(a.firstChild,d));break;case"sequenceDiagram":l.setConf(w.sequenceDiagram),l.draw(n,t),w.cloneCssStyles&&s.cloneCssStyles(a.firstChild,[]);break;case"gantt":v.setConf(w.gantt),v.draw(n,t),w.cloneCssStyles&&s.cloneCssStyles(a.firstChild,[]);break;case"info":h.draw(n,t,e.version()),w.cloneCssStyles&&s.cloneCssStyles(a.firstChild,[])}x.select("#d"+t).selectAll("foreignobject div").attr("xmlns","http://www.w3.org/1999/xhtml");var p=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search;p=p.replace(/\(/g,"\\("),p=p.replace(/\)/g,"\\)");var g=x.select("#d"+t).node().innerHTML.replace(/url\(#arrowhead/g,"url("+p+"#arrowhead","g");g=e.decodeEntities(g),"undefined"!=typeof r?r(g,u.bindFunctions):o.warn("CB = undefined");var y=x.select("#d"+t).node();null!==y&&"function"==typeof y.remove&&x.select("#d"+t).node().remove()};e.render=function(t,n,e,r){"undefined"==typeof document||A(t,n,e,r)};var E=function(t){var n,e=Object.keys(t);for(n=0;n<e.length;n++)if("object"==typeof t[e[n]]){var r,i=Object.keys(t[e[n]]);for(r=0;r<i.length;r++)o.debug("Setting conf ",e[n],"-",i[r]),"undefined"==typeof w[e[n]]&&(w[e[n]]={}),o.debug("Setting config: "+e[n]+" "+i[r]+" to "+t[e[n]][i[r]]),w[e[n]][i[r]]=t[e[n]][i[r]]}else w[e[n]]=t[e[n]]};e.initialize=function(t){o.debug("Initializing mermaidAPI"),"object"==typeof t&&E(t),a.setLogLevel(w.logLevel)},e.getConfig=function(){return w},e.parseError=function(t,e){"undefined"!=typeof mermaid?n.mermaid.parseError(t,e):(o.debug("Mermaid Syntax error:"),o.debug(t))},n.mermaidAPI={render:e.render,parse:e.parse,initialize:e.initialize,detectType:s.detectType,parseError:e.parseError,getConfig:e.getConfig}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":85,"./d3":86,"./diagrams/example/exampleDb":87,"./diagrams/example/exampleRenderer":88,"./diagrams/example/parser/example":89,"./diagrams/flowchart/flowRenderer":91,"./diagrams/flowchart/graphDb":92,"./diagrams/flowchart/parser/dot":93,"./diagrams/flowchart/parser/flow":94,"./diagrams/gantt/ganttDb":95,"./diagrams/gantt/ganttRenderer":96,"./diagrams/gantt/parser/gantt":97,"./diagrams/sequenceDiagram/parser/sequenceDiagram":98,"./diagrams/sequenceDiagram/sequenceDb":99,"./diagrams/sequenceDiagram/sequenceRenderer":100,"./logger":102,"./utils":104}],104:[function(t,n,e){"use strict";function r(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n["default"]=t,n}Object.defineProperty(e,"__esModule",{value:!0});var i=t("./logger"),a=r(i),o=new a.Log,u=function(t){return t=t.replace(/^\s*%%.*\n/g,"\n"),t.match(/^\s*sequenceDiagram/)?"sequenceDiagram":t.match(/^\s*digraph/)?"dotGraph":t.match(/^\s*info/)?"info":t.match(/^\s*gantt/)?"gantt":"graph"};e.detectType=u;var s=function(t,n){for(var e,r="",i=document.styleSheets,a=0;a<i.length;a++)if("mermaid-svg-internal-css"!==i[a].title)try{var u=i[a].cssRules;if(null!==u)for(var s=0;s<u.length;s++)if(e=u[s],"undefined"!=typeof e.style){var c;c=t.querySelectorAll(e.selectorText),c.length>0&&(r+=e.selectorText+" { "+e.style.cssText+" }\n")}}catch(l){"undefined"!==e&&o.warn('Invalid CSS selector "'+e.selectorText+'"',l)}var h="",f="";for(var d in n)n.hasOwnProperty(d)&&"undefined"!=typeof d&&("default"===d?(n["default"].styles instanceof Array&&(h+="#"+t.id.trim()+" .node>rect { "+n[d].styles.join("; ")+"; }\n"),n["default"].nodeLabelStyles instanceof Array&&(h+="#"+t.id.trim()+" .node text { "+n[d].nodeLabelStyles.join("; ")+"; }\n"),n["default"].edgeLabelStyles instanceof Array&&(h+="#"+t.id.trim()+" .edgeLabel text { "+n[d].edgeLabelStyles.join("; ")+"; }\n"),n["default"].clusterStyles instanceof Array&&(h+="#"+t.id.trim()+" .cluster rect { "+n[d].clusterStyles.join("; ")+"; }\n")):n[d].styles instanceof Array&&(f+="#"+t.id.trim()+" ."+d+">rect { "+n[d].styles.join("; ")+"; }\n"));if(""!==r||""!==h||""!==f){var p=document.createElement("style");p.setAttribute("type","text/css"),p.setAttribute("title","mermaid-svg-internal-css"),p.innerHTML="/* <![CDATA[ */\n",""!==h&&(p.innerHTML+=h),""!==r&&(p.innerHTML+=r),""!==f&&(p.innerHTML+=f),p.innerHTML+="/* ]]> */\n",t.insertBefore(p,t.firstChild)}};e.cloneCssStyles=s},{"./logger":102}]},{},[103])(103)}); |